From 6b8f5ace3975dde993ebdbb871b8869266045c55 Mon Sep 17 00:00:00 2001 From: weisd Date: Thu, 5 Mar 2026 13:45:29 +0800 Subject: [PATCH 1/4] feat(minio): add MinIO compatibility for lifecycle, object lock, versioning - Add minio-patches.json: DelMarkerExpiration, expiry_updated_at, del_marker_expiration, expired_object_all_versions - Codegen: BucketLifecycleConfiguration accepts both root element names (LifecycleConfiguration, BucketLifecycleConfiguration) - Codegen: skip unknown elements in BucketLifecycleConfiguration - Codegen: PutBucketVersioning uses take_versioning_configuration - Codegen: PutObjectLockConfiguration uses take_opt_object_lock_configuration - http: add take_versioning_configuration, take_opt_object_lock_configuration for literal " Enabled " (MinIO legacy format) - xml: add named_element_any for alternate root element names All changes are gated by #[cfg(feature = "minio")] or codegen patch. --- codegen/src/v1/mod.rs | 6 +- codegen/src/v1/ops.rs | 31 +- codegen/src/v1/xml.rs | 32 +- crates/s3s-aws/src/conv/generated_minio.rs | 14119 ++-- crates/s3s/src/dto/generated_minio.rs | 64581 ++++++++++--------- crates/s3s/src/http/de.rs | 53 + crates/s3s/src/ops/generated_minio.rs | 10418 +-- crates/s3s/src/xml/de.rs | 39 +- crates/s3s/src/xml/generated_minio.rs | 15507 +++-- crates/s3s/tests/xml.rs | 34 +- data/minio-patches.json | 53 + 11 files changed, 52599 insertions(+), 52274 deletions(-) diff --git a/codegen/src/v1/mod.rs b/codegen/src/v1/mod.rs index 8b239abe..1a89f49c 100644 --- a/codegen/src/v1/mod.rs +++ b/codegen/src/v1/mod.rs @@ -27,7 +27,7 @@ fn write_file(path: &str, f: impl FnOnce()) { } #[derive(Debug, Clone, Copy)] -enum Patch { +pub enum Patch { Minio, } @@ -76,7 +76,7 @@ fn inner_run(code_patch: Option) { { let path = format!("crates/s3s/src/xml/generated{suffix}.rs"); - write_file(&path, || xml::codegen(&ops, &rust_types)); + write_file(&path, || xml::codegen(&ops, &rust_types, code_patch)); } { @@ -86,7 +86,7 @@ fn inner_run(code_patch: Option) { { let path = format!("crates/s3s/src/ops/generated{suffix}.rs"); - write_file(&path, || ops::codegen(&ops, &rust_types)); + write_file(&path, || ops::codegen(&ops, &rust_types, code_patch)); } { diff --git a/codegen/src/v1/ops.rs b/codegen/src/v1/ops.rs index f8a5c603..7b5e1043 100644 --- a/codegen/src/v1/ops.rs +++ b/codegen/src/v1/ops.rs @@ -5,6 +5,7 @@ use super::{dto, rust, smithy}; use super::{headers, o}; use crate::declare_codegen; +use crate::v1::Patch; use std::cmp::Reverse; use std::collections::{BTreeMap, BTreeSet, HashMap}; @@ -151,7 +152,7 @@ pub fn is_op_output(name: &str, ops: &Operations) -> bool { name.strip_suffix("Output").is_some_and(|x| ops.contains_key(x)) } -pub fn codegen(ops: &Operations, rust_types: &RustTypes) { +pub fn codegen(ops: &Operations, rust_types: &RustTypes, patch: Option) { declare_codegen!(); for op in ops.values() { @@ -178,7 +179,7 @@ pub fn codegen(ops: &Operations, rust_types: &RustTypes) { "", ]); - codegen_http(ops, rust_types); + codegen_http(ops, rust_types, patch); codegen_router(ops, rust_types); } @@ -190,7 +191,7 @@ fn status_code_name(code: u16) -> &'static str { } } -fn codegen_http(ops: &Operations, rust_types: &RustTypes) { +fn codegen_http(ops: &Operations, rust_types: &RustTypes, patch: Option) { codegen_header_value(ops, rust_types); for op in ops.values() { @@ -202,7 +203,7 @@ fn codegen_http(ops: &Operations, rust_types: &RustTypes) { g!("impl {} {{", op.name); - codegen_op_http_de(op, rust_types); + codegen_op_http_de(op, rust_types, patch); codegen_op_http_ser(op, rust_types); g!("}}"); @@ -563,7 +564,7 @@ fn codegen_op_http_ser(op: &Operation, rust_types: &RustTypes) { } #[allow(clippy::too_many_lines)] -fn codegen_op_http_de(op: &Operation, rust_types: &RustTypes) { +fn codegen_op_http_de(op: &Operation, rust_types: &RustTypes, patch: Option) { let input = op.input.as_str(); let rust_type = &rust_types[input]; match rust_type { @@ -708,9 +709,25 @@ fn codegen_op_http_de(op: &Operation, rust_types: &RustTypes) { g!(" Err(e) => return Err(e),"); g!("}};"); } else if field.option_type { - g!("let {}: Option<{}> = http::take_opt_xml_body(req)?;", field.name, field.type_); + // MinIO compatibility: literal " Enabled " for legacy config + if op.name == "PutObjectLockConfiguration" + && field.name == "object_lock_configuration" + && matches!(patch, Some(Patch::Minio)) + { + g!("let {}: Option<{}> = http::take_opt_object_lock_configuration(req)?;", field.name, field.type_); + } else { + g!("let {}: Option<{}> = http::take_opt_xml_body(req)?;", field.name, field.type_); + } } else { - g!("let {}: {} = http::take_xml_body(req)?;", field.name, field.type_); + // MinIO compatibility: literal " Enabled " for legacy config + if op.name == "PutBucketVersioning" + && field.name == "versioning_configuration" + && matches!(patch, Some(Patch::Minio)) + { + g!("let {}: {} = http::take_versioning_configuration(req)?;", field.name, field.type_); + } else { + g!("let {}: {} = http::take_xml_body(req)?;", field.name, field.type_); + } } } }, diff --git a/codegen/src/v1/xml.rs b/codegen/src/v1/xml.rs index bbc30cf7..aa014ae3 100644 --- a/codegen/src/v1/xml.rs +++ b/codegen/src/v1/xml.rs @@ -6,6 +6,7 @@ use super::rust::default_value_literal; use crate::declare_codegen; use crate::v1::ops::is_op_output; use crate::v1::rust::StructField; +use crate::v1::Patch; use std::collections::{BTreeMap, BTreeSet, VecDeque}; use std::ops::Not; @@ -13,7 +14,7 @@ use std::ops::Not; use scoped_writer::g; use stdx::default::default; -pub fn codegen(ops: &Operations, rust_types: &RustTypes) { +pub fn codegen(ops: &Operations, rust_types: &RustTypes, patch: Option) { declare_codegen!(); g([ @@ -63,8 +64,8 @@ pub fn codegen(ops: &Operations, rust_types: &RustTypes) { g!("const XMLNS_S3: &str = \"http://s3.amazonaws.com/doc/2006-03-01/\";"); g!(); - codegen_xml_serde(ops, rust_types, &root_type_names); - codegen_xml_serde_content(ops, rust_types, &field_type_names); + codegen_xml_serde(ops, rust_types, &root_type_names, patch); + codegen_xml_serde_content(ops, rust_types, &field_type_names, patch); } pub fn is_xml_payload(field: &rust::StructField) -> bool { @@ -220,7 +221,7 @@ fn s3_unwrapped_xml_output(ops: &Operations, ty_name: &str) -> bool { ops.iter().any(|(_, op)| op.s3_unwrapped_xml_output && op.output == ty_name) } -fn codegen_xml_serde(ops: &Operations, rust_types: &RustTypes, root_type_names: &BTreeMap<&str, Option<&str>>) { +fn codegen_xml_serde(ops: &Operations, rust_types: &RustTypes, root_type_names: &BTreeMap<&str, Option<&str>>, patch: Option) { for (rust_type, xml_name) in root_type_names.iter().map(|(&name, xml_name)| (&rust_types[name], xml_name)) { let rust::Type::Struct(ty) = rust_type else { panic!("{rust_type:#?}") }; @@ -253,7 +254,15 @@ fn codegen_xml_serde(ops: &Operations, rust_types: &RustTypes, root_type_names: g!("impl<'xml> Deserialize<'xml> for {} {{", ty.name); g!("fn deserialize(d: &mut Deserializer<'xml>) -> DeResult {{"); - g!("d.named_element(\"{xml_name}\", Deserializer::content)"); + // MinIO compatibility: accept both LifecycleConfiguration and BucketLifecycleConfiguration + if ty.name == "BucketLifecycleConfiguration" && matches!(patch, Some(Patch::Minio)) { + g!("d.named_element_any("); + g!(" &[\"LifecycleConfiguration\", \"BucketLifecycleConfiguration\"],"); + g!(" Deserializer::content,"); + g!(")"); + } else { + g!("d.named_element(\"{xml_name}\", Deserializer::content)"); + } g!("}}"); g!("}}"); @@ -262,7 +271,7 @@ fn codegen_xml_serde(ops: &Operations, rust_types: &RustTypes, root_type_names: } } -fn codegen_xml_serde_content(ops: &Operations, rust_types: &RustTypes, field_type_names: &BTreeSet<&str>) { +fn codegen_xml_serde_content(ops: &Operations, rust_types: &RustTypes, field_type_names: &BTreeSet<&str>, patch: Option) { for rust_type in field_type_names.iter().map(|&name| &rust_types[name]) { match rust_type { rust::Type::Alias(_) => {} @@ -329,13 +338,13 @@ fn codegen_xml_serde_content(ops: &Operations, rust_types: &RustTypes, field_typ g!("}}"); } } - rust::Type::Struct(ty) => codegen_xml_serde_content_struct(ops, rust_types, ty), + rust::Type::Struct(ty) => codegen_xml_serde_content_struct(ops, rust_types, ty, patch), } } } #[allow(clippy::too_many_lines)] -fn codegen_xml_serde_content_struct(_ops: &Operations, rust_types: &RustTypes, ty: &rust::Struct) { +fn codegen_xml_serde_content_struct(_ops: &Operations, rust_types: &RustTypes, ty: &rust::Struct, patch: Option) { if can_impl_serialize_content(rust_types, &ty.name) { g!("impl SerializeContent for {} {{", ty.name); g!( @@ -537,7 +546,12 @@ fn codegen_xml_serde_content_struct(_ops: &Operations, rust_types: &RustTypes, t g!("Ok(())"); g!("}}"); } - g!("_ => Err(DeError::UnexpectedTagName)"); + // MinIO compatibility: skip unknown elements for BucketLifecycleConfiguration + if ty.name == "BucketLifecycleConfiguration" && matches!(patch, Some(Patch::Minio)) { + g!("_ => Ok(()),"); + } else { + g!("_ => Err(DeError::UnexpectedTagName)"); + } g!("}})?;"); } diff --git a/crates/s3s-aws/src/conv/generated_minio.rs b/crates/s3s-aws/src/conv/generated_minio.rs index c39124d3..9209be50 100644 --- a/crates/s3s-aws/src/conv/generated_minio.rs +++ b/crates/s3s-aws/src/conv/generated_minio.rs @@ -4,9280 +4,9307 @@ use super::*; impl AwsConversion for s3s::dto::AbortIncompleteMultipartUpload { type Target = aws_sdk_s3::types::AbortIncompleteMultipartUpload; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - days_after_initiation: try_from_aws(x.days_after_initiation)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +days_after_initiation: try_from_aws(x.days_after_initiation)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_days_after_initiation(try_into_aws(x.days_after_initiation)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_days_after_initiation(try_into_aws(x.days_after_initiation)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AbortMultipartUploadInput { type Target = aws_sdk_s3::operation::abort_multipart_upload::AbortMultipartUploadInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match_initiated_time: try_from_aws(x.if_match_initiated_time)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match_initiated_time(try_into_aws(x.if_match_initiated_time)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match_initiated_time: try_from_aws(x.if_match_initiated_time)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match_initiated_time(try_into_aws(x.if_match_initiated_time)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::AbortMultipartUploadOutput { type Target = aws_sdk_s3::operation::abort_multipart_upload::AbortMultipartUploadOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AccelerateConfiguration { type Target = aws_sdk_s3::types::AccelerateConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AccessControlPolicy { type Target = aws_sdk_s3::types::AccessControlPolicy; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grants: try_from_aws(x.grants)?, - owner: try_from_aws(x.owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grants: try_from_aws(x.grants)?, +owner: try_from_aws(x.owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grants(try_into_aws(x.grants)?); - y = y.set_owner(try_into_aws(x.owner)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grants(try_into_aws(x.grants)?); +y = y.set_owner(try_into_aws(x.owner)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AccessControlTranslation { type Target = aws_sdk_s3::types::AccessControlTranslation; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - owner: try_from_aws(x.owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +owner: try_from_aws(x.owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_owner(Some(try_into_aws(x.owner)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_owner(Some(try_into_aws(x.owner)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::AnalyticsAndOperator { type Target = aws_sdk_s3::types::AnalyticsAndOperator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AnalyticsConfiguration { type Target = aws_sdk_s3::types::AnalyticsConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - storage_class_analysis: unwrap_from_aws(x.storage_class_analysis, "storage_class_analysis")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +storage_class_analysis: unwrap_from_aws(x.storage_class_analysis, "storage_class_analysis")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_storage_class_analysis(Some(try_into_aws(x.storage_class_analysis)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_storage_class_analysis(Some(try_into_aws(x.storage_class_analysis)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::AnalyticsExportDestination { type Target = aws_sdk_s3::types::AnalyticsExportDestination; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AnalyticsFilter { type Target = aws_sdk_s3::types::AnalyticsFilter; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::AnalyticsFilter::And(v) => Self::And(try_from_aws(v)?), - aws_sdk_s3::types::AnalyticsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), - aws_sdk_s3::types::AnalyticsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), - _ => unimplemented!("unknown variant of aws_sdk_s3::types::AnalyticsFilter: {x:?}"), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(match x { - Self::And(v) => aws_sdk_s3::types::AnalyticsFilter::And(try_into_aws(v)?), - Self::Prefix(v) => aws_sdk_s3::types::AnalyticsFilter::Prefix(try_into_aws(v)?), - Self::Tag(v) => aws_sdk_s3::types::AnalyticsFilter::Tag(try_into_aws(v)?), - _ => unimplemented!("unknown variant of AnalyticsFilter: {x:?}"), - }) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::AnalyticsFilter::And(v) => Self::And(try_from_aws(v)?), +aws_sdk_s3::types::AnalyticsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), +aws_sdk_s3::types::AnalyticsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), +_ => unimplemented!("unknown variant of aws_sdk_s3::types::AnalyticsFilter: {x:?}"), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(match x { +Self::And(v) => aws_sdk_s3::types::AnalyticsFilter::And(try_into_aws(v)?), +Self::Prefix(v) => aws_sdk_s3::types::AnalyticsFilter::Prefix(try_into_aws(v)?), +Self::Tag(v) => aws_sdk_s3::types::AnalyticsFilter::Tag(try_into_aws(v)?), +_ => unimplemented!("unknown variant of AnalyticsFilter: {x:?}"), +}) +} } impl AwsConversion for s3s::dto::AnalyticsS3BucketDestination { type Target = aws_sdk_s3::types::AnalyticsS3BucketDestination; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: try_from_aws(x.bucket)?, - bucket_account_id: try_from_aws(x.bucket_account_id)?, - format: try_from_aws(x.format)?, - prefix: try_from_aws(x.prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_account_id(try_into_aws(x.bucket_account_id)?); - y = y.set_format(Some(try_into_aws(x.format)?)); - y = y.set_prefix(try_into_aws(x.prefix)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: try_from_aws(x.bucket)?, +bucket_account_id: try_from_aws(x.bucket_account_id)?, +format: try_from_aws(x.format)?, +prefix: try_from_aws(x.prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_account_id(try_into_aws(x.bucket_account_id)?); +y = y.set_format(Some(try_into_aws(x.format)?)); +y = y.set_prefix(try_into_aws(x.prefix)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::AnalyticsS3ExportFileFormat { type Target = aws_sdk_s3::types::AnalyticsS3ExportFileFormat; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::AnalyticsS3ExportFileFormat::Csv => Self::from_static(Self::CSV), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::AnalyticsS3ExportFileFormat::Csv => Self::from_static(Self::CSV), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::AnalyticsS3ExportFileFormat::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::AnalyticsS3ExportFileFormat::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ArchiveStatus { type Target = aws_sdk_s3::types::ArchiveStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ArchiveStatus::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), - aws_sdk_s3::types::ArchiveStatus::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ArchiveStatus::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), +aws_sdk_s3::types::ArchiveStatus::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ArchiveStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ArchiveStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Bucket { type Target = aws_sdk_s3::types::Bucket; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_region: try_from_aws(x.bucket_region)?, - creation_date: try_from_aws(x.creation_date)?, - name: try_from_aws(x.name)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_region: try_from_aws(x.bucket_region)?, +creation_date: try_from_aws(x.creation_date)?, +name: try_from_aws(x.name)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_region(try_into_aws(x.bucket_region)?); - y = y.set_creation_date(try_into_aws(x.creation_date)?); - y = y.set_name(try_into_aws(x.name)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_region(try_into_aws(x.bucket_region)?); +y = y.set_creation_date(try_into_aws(x.creation_date)?); +y = y.set_name(try_into_aws(x.name)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketAccelerateStatus { type Target = aws_sdk_s3::types::BucketAccelerateStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketAccelerateStatus::Enabled => Self::from_static(Self::ENABLED), - aws_sdk_s3::types::BucketAccelerateStatus::Suspended => Self::from_static(Self::SUSPENDED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketAccelerateStatus::Enabled => Self::from_static(Self::ENABLED), +aws_sdk_s3::types::BucketAccelerateStatus::Suspended => Self::from_static(Self::SUSPENDED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketAccelerateStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketAccelerateStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketAlreadyExists { type Target = aws_sdk_s3::types::error::BucketAlreadyExists; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketAlreadyOwnedByYou { type Target = aws_sdk_s3::types::error::BucketAlreadyOwnedByYou; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketCannedACL { type Target = aws_sdk_s3::types::BucketCannedAcl; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), - aws_sdk_s3::types::BucketCannedAcl::Private => Self::from_static(Self::PRIVATE), - aws_sdk_s3::types::BucketCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), - aws_sdk_s3::types::BucketCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), +aws_sdk_s3::types::BucketCannedAcl::Private => Self::from_static(Self::PRIVATE), +aws_sdk_s3::types::BucketCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), +aws_sdk_s3::types::BucketCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketCannedAcl::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketCannedAcl::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketInfo { type Target = aws_sdk_s3::types::BucketInfo; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - data_redundancy: try_from_aws(x.data_redundancy)?, - type_: try_from_aws(x.r#type)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +data_redundancy: try_from_aws(x.data_redundancy)?, +type_: try_from_aws(x.r#type)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_data_redundancy(try_into_aws(x.data_redundancy)?); - y = y.set_type(try_into_aws(x.type_)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_data_redundancy(try_into_aws(x.data_redundancy)?); +y = y.set_type(try_into_aws(x.type_)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketLifecycleConfiguration { type Target = aws_sdk_s3::types::BucketLifecycleConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - rules: try_from_aws(x.rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +expiry_updated_at: None, +rules: try_from_aws(x.rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_rules(Some(try_into_aws(x.rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_rules(Some(try_into_aws(x.rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::BucketLocationConstraint { type Target = aws_sdk_s3::types::BucketLocationConstraint; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketLocationConstraint::Eu => Self::from_static(Self::EU), - aws_sdk_s3::types::BucketLocationConstraint::AfSouth1 => Self::from_static(Self::AF_SOUTH_1), - aws_sdk_s3::types::BucketLocationConstraint::ApEast1 => Self::from_static(Self::AP_EAST_1), - aws_sdk_s3::types::BucketLocationConstraint::ApNortheast1 => Self::from_static(Self::AP_NORTHEAST_1), - aws_sdk_s3::types::BucketLocationConstraint::ApNortheast2 => Self::from_static(Self::AP_NORTHEAST_2), - aws_sdk_s3::types::BucketLocationConstraint::ApNortheast3 => Self::from_static(Self::AP_NORTHEAST_3), - aws_sdk_s3::types::BucketLocationConstraint::ApSouth1 => Self::from_static(Self::AP_SOUTH_1), - aws_sdk_s3::types::BucketLocationConstraint::ApSouth2 => Self::from_static(Self::AP_SOUTH_2), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast1 => Self::from_static(Self::AP_SOUTHEAST_1), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast2 => Self::from_static(Self::AP_SOUTHEAST_2), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast3 => Self::from_static(Self::AP_SOUTHEAST_3), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast4 => Self::from_static(Self::AP_SOUTHEAST_4), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast5 => Self::from_static(Self::AP_SOUTHEAST_5), - aws_sdk_s3::types::BucketLocationConstraint::CaCentral1 => Self::from_static(Self::CA_CENTRAL_1), - aws_sdk_s3::types::BucketLocationConstraint::CnNorth1 => Self::from_static(Self::CN_NORTH_1), - aws_sdk_s3::types::BucketLocationConstraint::CnNorthwest1 => Self::from_static(Self::CN_NORTHWEST_1), - aws_sdk_s3::types::BucketLocationConstraint::EuCentral1 => Self::from_static(Self::EU_CENTRAL_1), - aws_sdk_s3::types::BucketLocationConstraint::EuCentral2 => Self::from_static(Self::EU_CENTRAL_2), - aws_sdk_s3::types::BucketLocationConstraint::EuNorth1 => Self::from_static(Self::EU_NORTH_1), - aws_sdk_s3::types::BucketLocationConstraint::EuSouth1 => Self::from_static(Self::EU_SOUTH_1), - aws_sdk_s3::types::BucketLocationConstraint::EuSouth2 => Self::from_static(Self::EU_SOUTH_2), - aws_sdk_s3::types::BucketLocationConstraint::EuWest1 => Self::from_static(Self::EU_WEST_1), - aws_sdk_s3::types::BucketLocationConstraint::EuWest2 => Self::from_static(Self::EU_WEST_2), - aws_sdk_s3::types::BucketLocationConstraint::EuWest3 => Self::from_static(Self::EU_WEST_3), - aws_sdk_s3::types::BucketLocationConstraint::IlCentral1 => Self::from_static(Self::IL_CENTRAL_1), - aws_sdk_s3::types::BucketLocationConstraint::MeCentral1 => Self::from_static(Self::ME_CENTRAL_1), - aws_sdk_s3::types::BucketLocationConstraint::MeSouth1 => Self::from_static(Self::ME_SOUTH_1), - aws_sdk_s3::types::BucketLocationConstraint::SaEast1 => Self::from_static(Self::SA_EAST_1), - aws_sdk_s3::types::BucketLocationConstraint::UsEast2 => Self::from_static(Self::US_EAST_2), - aws_sdk_s3::types::BucketLocationConstraint::UsGovEast1 => Self::from_static(Self::US_GOV_EAST_1), - aws_sdk_s3::types::BucketLocationConstraint::UsGovWest1 => Self::from_static(Self::US_GOV_WEST_1), - aws_sdk_s3::types::BucketLocationConstraint::UsWest1 => Self::from_static(Self::US_WEST_1), - aws_sdk_s3::types::BucketLocationConstraint::UsWest2 => Self::from_static(Self::US_WEST_2), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketLocationConstraint::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketLocationConstraint::Eu => Self::from_static(Self::EU), +aws_sdk_s3::types::BucketLocationConstraint::AfSouth1 => Self::from_static(Self::AF_SOUTH_1), +aws_sdk_s3::types::BucketLocationConstraint::ApEast1 => Self::from_static(Self::AP_EAST_1), +aws_sdk_s3::types::BucketLocationConstraint::ApNortheast1 => Self::from_static(Self::AP_NORTHEAST_1), +aws_sdk_s3::types::BucketLocationConstraint::ApNortheast2 => Self::from_static(Self::AP_NORTHEAST_2), +aws_sdk_s3::types::BucketLocationConstraint::ApNortheast3 => Self::from_static(Self::AP_NORTHEAST_3), +aws_sdk_s3::types::BucketLocationConstraint::ApSouth1 => Self::from_static(Self::AP_SOUTH_1), +aws_sdk_s3::types::BucketLocationConstraint::ApSouth2 => Self::from_static(Self::AP_SOUTH_2), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast1 => Self::from_static(Self::AP_SOUTHEAST_1), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast2 => Self::from_static(Self::AP_SOUTHEAST_2), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast3 => Self::from_static(Self::AP_SOUTHEAST_3), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast4 => Self::from_static(Self::AP_SOUTHEAST_4), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast5 => Self::from_static(Self::AP_SOUTHEAST_5), +aws_sdk_s3::types::BucketLocationConstraint::CaCentral1 => Self::from_static(Self::CA_CENTRAL_1), +aws_sdk_s3::types::BucketLocationConstraint::CnNorth1 => Self::from_static(Self::CN_NORTH_1), +aws_sdk_s3::types::BucketLocationConstraint::CnNorthwest1 => Self::from_static(Self::CN_NORTHWEST_1), +aws_sdk_s3::types::BucketLocationConstraint::EuCentral1 => Self::from_static(Self::EU_CENTRAL_1), +aws_sdk_s3::types::BucketLocationConstraint::EuCentral2 => Self::from_static(Self::EU_CENTRAL_2), +aws_sdk_s3::types::BucketLocationConstraint::EuNorth1 => Self::from_static(Self::EU_NORTH_1), +aws_sdk_s3::types::BucketLocationConstraint::EuSouth1 => Self::from_static(Self::EU_SOUTH_1), +aws_sdk_s3::types::BucketLocationConstraint::EuSouth2 => Self::from_static(Self::EU_SOUTH_2), +aws_sdk_s3::types::BucketLocationConstraint::EuWest1 => Self::from_static(Self::EU_WEST_1), +aws_sdk_s3::types::BucketLocationConstraint::EuWest2 => Self::from_static(Self::EU_WEST_2), +aws_sdk_s3::types::BucketLocationConstraint::EuWest3 => Self::from_static(Self::EU_WEST_3), +aws_sdk_s3::types::BucketLocationConstraint::IlCentral1 => Self::from_static(Self::IL_CENTRAL_1), +aws_sdk_s3::types::BucketLocationConstraint::MeCentral1 => Self::from_static(Self::ME_CENTRAL_1), +aws_sdk_s3::types::BucketLocationConstraint::MeSouth1 => Self::from_static(Self::ME_SOUTH_1), +aws_sdk_s3::types::BucketLocationConstraint::SaEast1 => Self::from_static(Self::SA_EAST_1), +aws_sdk_s3::types::BucketLocationConstraint::UsEast2 => Self::from_static(Self::US_EAST_2), +aws_sdk_s3::types::BucketLocationConstraint::UsGovEast1 => Self::from_static(Self::US_GOV_EAST_1), +aws_sdk_s3::types::BucketLocationConstraint::UsGovWest1 => Self::from_static(Self::US_GOV_WEST_1), +aws_sdk_s3::types::BucketLocationConstraint::UsWest1 => Self::from_static(Self::US_WEST_1), +aws_sdk_s3::types::BucketLocationConstraint::UsWest2 => Self::from_static(Self::US_WEST_2), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketLocationConstraint::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketLoggingStatus { type Target = aws_sdk_s3::types::BucketLoggingStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - logging_enabled: try_from_aws(x.logging_enabled)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +logging_enabled: try_from_aws(x.logging_enabled)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketLogsPermission { type Target = aws_sdk_s3::types::BucketLogsPermission; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketLogsPermission::FullControl => Self::from_static(Self::FULL_CONTROL), - aws_sdk_s3::types::BucketLogsPermission::Read => Self::from_static(Self::READ), - aws_sdk_s3::types::BucketLogsPermission::Write => Self::from_static(Self::WRITE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketLogsPermission::FullControl => Self::from_static(Self::FULL_CONTROL), +aws_sdk_s3::types::BucketLogsPermission::Read => Self::from_static(Self::READ), +aws_sdk_s3::types::BucketLogsPermission::Write => Self::from_static(Self::WRITE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketLogsPermission::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketLogsPermission::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketType { type Target = aws_sdk_s3::types::BucketType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketType::Directory => Self::from_static(Self::DIRECTORY), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketType::Directory => Self::from_static(Self::DIRECTORY), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketVersioningStatus { type Target = aws_sdk_s3::types::BucketVersioningStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketVersioningStatus::Enabled => Self::from_static(Self::ENABLED), - aws_sdk_s3::types::BucketVersioningStatus::Suspended => Self::from_static(Self::SUSPENDED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketVersioningStatus::Enabled => Self::from_static(Self::ENABLED), +aws_sdk_s3::types::BucketVersioningStatus::Suspended => Self::from_static(Self::SUSPENDED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketVersioningStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketVersioningStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::CORSConfiguration { type Target = aws_sdk_s3::types::CorsConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - cors_rules: try_from_aws(x.cors_rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +cors_rules: try_from_aws(x.cors_rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_cors_rules(Some(try_into_aws(x.cors_rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_cors_rules(Some(try_into_aws(x.cors_rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CORSRule { type Target = aws_sdk_s3::types::CorsRule; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - allowed_headers: try_from_aws(x.allowed_headers)?, - allowed_methods: try_from_aws(x.allowed_methods)?, - allowed_origins: try_from_aws(x.allowed_origins)?, - expose_headers: try_from_aws(x.expose_headers)?, - id: try_from_aws(x.id)?, - max_age_seconds: try_from_aws(x.max_age_seconds)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_allowed_headers(try_into_aws(x.allowed_headers)?); - y = y.set_allowed_methods(Some(try_into_aws(x.allowed_methods)?)); - y = y.set_allowed_origins(Some(try_into_aws(x.allowed_origins)?)); - y = y.set_expose_headers(try_into_aws(x.expose_headers)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_max_age_seconds(try_into_aws(x.max_age_seconds)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +allowed_headers: try_from_aws(x.allowed_headers)?, +allowed_methods: try_from_aws(x.allowed_methods)?, +allowed_origins: try_from_aws(x.allowed_origins)?, +expose_headers: try_from_aws(x.expose_headers)?, +id: try_from_aws(x.id)?, +max_age_seconds: try_from_aws(x.max_age_seconds)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_allowed_headers(try_into_aws(x.allowed_headers)?); +y = y.set_allowed_methods(Some(try_into_aws(x.allowed_methods)?)); +y = y.set_allowed_origins(Some(try_into_aws(x.allowed_origins)?)); +y = y.set_expose_headers(try_into_aws(x.expose_headers)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_max_age_seconds(try_into_aws(x.max_age_seconds)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CSVInput { type Target = aws_sdk_s3::types::CsvInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - allow_quoted_record_delimiter: try_from_aws(x.allow_quoted_record_delimiter)?, - comments: try_from_aws(x.comments)?, - field_delimiter: try_from_aws(x.field_delimiter)?, - file_header_info: try_from_aws(x.file_header_info)?, - quote_character: try_from_aws(x.quote_character)?, - quote_escape_character: try_from_aws(x.quote_escape_character)?, - record_delimiter: try_from_aws(x.record_delimiter)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_allow_quoted_record_delimiter(try_into_aws(x.allow_quoted_record_delimiter)?); - y = y.set_comments(try_into_aws(x.comments)?); - y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); - y = y.set_file_header_info(try_into_aws(x.file_header_info)?); - y = y.set_quote_character(try_into_aws(x.quote_character)?); - y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); - y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +allow_quoted_record_delimiter: try_from_aws(x.allow_quoted_record_delimiter)?, +comments: try_from_aws(x.comments)?, +field_delimiter: try_from_aws(x.field_delimiter)?, +file_header_info: try_from_aws(x.file_header_info)?, +quote_character: try_from_aws(x.quote_character)?, +quote_escape_character: try_from_aws(x.quote_escape_character)?, +record_delimiter: try_from_aws(x.record_delimiter)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_allow_quoted_record_delimiter(try_into_aws(x.allow_quoted_record_delimiter)?); +y = y.set_comments(try_into_aws(x.comments)?); +y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); +y = y.set_file_header_info(try_into_aws(x.file_header_info)?); +y = y.set_quote_character(try_into_aws(x.quote_character)?); +y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); +y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CSVOutput { type Target = aws_sdk_s3::types::CsvOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - field_delimiter: try_from_aws(x.field_delimiter)?, - quote_character: try_from_aws(x.quote_character)?, - quote_escape_character: try_from_aws(x.quote_escape_character)?, - quote_fields: try_from_aws(x.quote_fields)?, - record_delimiter: try_from_aws(x.record_delimiter)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); - y = y.set_quote_character(try_into_aws(x.quote_character)?); - y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); - y = y.set_quote_fields(try_into_aws(x.quote_fields)?); - y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +field_delimiter: try_from_aws(x.field_delimiter)?, +quote_character: try_from_aws(x.quote_character)?, +quote_escape_character: try_from_aws(x.quote_escape_character)?, +quote_fields: try_from_aws(x.quote_fields)?, +record_delimiter: try_from_aws(x.record_delimiter)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); +y = y.set_quote_character(try_into_aws(x.quote_character)?); +y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); +y = y.set_quote_fields(try_into_aws(x.quote_fields)?); +y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Checksum { type Target = aws_sdk_s3::types::Checksum; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ChecksumAlgorithm { type Target = aws_sdk_s3::types::ChecksumAlgorithm; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ChecksumAlgorithm::Crc32 => Self::from_static(Self::CRC32), - aws_sdk_s3::types::ChecksumAlgorithm::Crc32C => Self::from_static(Self::CRC32C), - aws_sdk_s3::types::ChecksumAlgorithm::Crc64Nvme => Self::from_static(Self::CRC64NVME), - aws_sdk_s3::types::ChecksumAlgorithm::Sha1 => Self::from_static(Self::SHA1), - aws_sdk_s3::types::ChecksumAlgorithm::Sha256 => Self::from_static(Self::SHA256), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ChecksumAlgorithm::Crc32 => Self::from_static(Self::CRC32), +aws_sdk_s3::types::ChecksumAlgorithm::Crc32C => Self::from_static(Self::CRC32C), +aws_sdk_s3::types::ChecksumAlgorithm::Crc64Nvme => Self::from_static(Self::CRC64NVME), +aws_sdk_s3::types::ChecksumAlgorithm::Sha1 => Self::from_static(Self::SHA1), +aws_sdk_s3::types::ChecksumAlgorithm::Sha256 => Self::from_static(Self::SHA256), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ChecksumAlgorithm::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ChecksumAlgorithm::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ChecksumMode { type Target = aws_sdk_s3::types::ChecksumMode; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ChecksumMode::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ChecksumMode::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ChecksumMode::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ChecksumMode::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ChecksumType { type Target = aws_sdk_s3::types::ChecksumType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ChecksumType::Composite => Self::from_static(Self::COMPOSITE), - aws_sdk_s3::types::ChecksumType::FullObject => Self::from_static(Self::FULL_OBJECT), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ChecksumType::Composite => Self::from_static(Self::COMPOSITE), +aws_sdk_s3::types::ChecksumType::FullObject => Self::from_static(Self::FULL_OBJECT), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ChecksumType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ChecksumType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::CommonPrefix { type Target = aws_sdk_s3::types::CommonPrefix; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(try_into_aws(x.prefix)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(try_into_aws(x.prefix)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CompleteMultipartUploadInput { type Target = aws_sdk_s3::operation::complete_multipart_upload::CompleteMultipartUploadInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match: try_from_aws(x.if_match)?, - if_none_match: try_from_aws(x.if_none_match)?, - key: unwrap_from_aws(x.key, "key")?, - mpu_object_size: try_from_aws(x.mpu_object_size)?, - multipart_upload: try_from_aws(x.multipart_upload)?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_none_match(try_into_aws(x.if_none_match)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_mpu_object_size(try_into_aws(x.mpu_object_size)?); - y = y.set_multipart_upload(try_into_aws(x.multipart_upload)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match: try_from_aws(x.if_match)?, +if_none_match: try_from_aws(x.if_none_match)?, +key: unwrap_from_aws(x.key, "key")?, +mpu_object_size: try_from_aws(x.mpu_object_size)?, +multipart_upload: try_from_aws(x.multipart_upload)?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_none_match(try_into_aws(x.if_none_match)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_mpu_object_size(try_into_aws(x.mpu_object_size)?); +y = y.set_multipart_upload(try_into_aws(x.multipart_upload)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CompleteMultipartUploadOutput { type Target = aws_sdk_s3::operation::complete_multipart_upload::CompleteMultipartUploadOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: try_from_aws(x.bucket)?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - expiration: try_from_aws(x.expiration)?, - key: try_from_aws(x.key)?, - location: try_from_aws(x.location)?, - request_charged: try_from_aws(x.request_charged)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - version_id: try_from_aws(x.version_id)?, - future: None, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_location(try_into_aws(x.location)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: try_from_aws(x.bucket)?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +expiration: try_from_aws(x.expiration)?, +key: try_from_aws(x.key)?, +location: try_from_aws(x.location)?, +request_charged: try_from_aws(x.request_charged)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +version_id: try_from_aws(x.version_id)?, +future: None, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_location(try_into_aws(x.location)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CompletedMultipartUpload { type Target = aws_sdk_s3::types::CompletedMultipartUpload; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - parts: try_from_aws(x.parts)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +parts: try_from_aws(x.parts)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_parts(try_into_aws(x.parts)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_parts(try_into_aws(x.parts)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CompletedPart { type Target = aws_sdk_s3::types::CompletedPart; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - e_tag: try_from_aws(x.e_tag)?, - part_number: try_from_aws(x.part_number)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_part_number(try_into_aws(x.part_number)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +e_tag: try_from_aws(x.e_tag)?, +part_number: try_from_aws(x.part_number)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_part_number(try_into_aws(x.part_number)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CompressionType { type Target = aws_sdk_s3::types::CompressionType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::CompressionType::Bzip2 => Self::from_static(Self::BZIP2), - aws_sdk_s3::types::CompressionType::Gzip => Self::from_static(Self::GZIP), - aws_sdk_s3::types::CompressionType::None => Self::from_static(Self::NONE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::CompressionType::Bzip2 => Self::from_static(Self::BZIP2), +aws_sdk_s3::types::CompressionType::Gzip => Self::from_static(Self::GZIP), +aws_sdk_s3::types::CompressionType::None => Self::from_static(Self::NONE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::CompressionType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::CompressionType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Condition { type Target = aws_sdk_s3::types::Condition; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - http_error_code_returned_equals: try_from_aws(x.http_error_code_returned_equals)?, - key_prefix_equals: try_from_aws(x.key_prefix_equals)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +http_error_code_returned_equals: try_from_aws(x.http_error_code_returned_equals)?, +key_prefix_equals: try_from_aws(x.key_prefix_equals)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_http_error_code_returned_equals(try_into_aws(x.http_error_code_returned_equals)?); - y = y.set_key_prefix_equals(try_into_aws(x.key_prefix_equals)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_http_error_code_returned_equals(try_into_aws(x.http_error_code_returned_equals)?); +y = y.set_key_prefix_equals(try_into_aws(x.key_prefix_equals)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ContinuationEvent { type Target = aws_sdk_s3::types::ContinuationEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CopyObjectInput { type Target = aws_sdk_s3::operation::copy_object::CopyObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_type: try_from_aws(x.content_type)?, - copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, - copy_source_if_match: try_from_aws(x.copy_source_if_match)?, - copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, - copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, - copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, - copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, - copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, - copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, - expires: try_from_aws(x.expires)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - key: unwrap_from_aws(x.key, "key")?, - metadata: try_from_aws(x.metadata)?, - metadata_directive: try_from_aws(x.metadata_directive)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - tagging: try_from_aws(x.tagging)?, - tagging_directive: try_from_aws(x.tagging_directive)?, - version_id: None, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); - y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); - y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); - y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); - y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); - y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); - y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); - y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_metadata_directive(try_into_aws(x.metadata_directive)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tagging(try_into_aws(x.tagging)?); - y = y.set_tagging_directive(try_into_aws(x.tagging_directive)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_type: try_from_aws(x.content_type)?, +copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, +copy_source_if_match: try_from_aws(x.copy_source_if_match)?, +copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, +copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, +copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, +copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, +copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, +copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, +expires: try_from_aws(x.expires)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +key: unwrap_from_aws(x.key, "key")?, +metadata: try_from_aws(x.metadata)?, +metadata_directive: try_from_aws(x.metadata_directive)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +tagging: try_from_aws(x.tagging)?, +tagging_directive: try_from_aws(x.tagging_directive)?, +version_id: None, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); +y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); +y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); +y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); +y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); +y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); +y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); +y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_metadata_directive(try_into_aws(x.metadata_directive)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tagging(try_into_aws(x.tagging)?); +y = y.set_tagging_directive(try_into_aws(x.tagging_directive)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CopyObjectOutput { type Target = aws_sdk_s3::operation::copy_object::CopyObjectOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - copy_object_result: try_from_aws(x.copy_object_result)?, - copy_source_version_id: try_from_aws(x.copy_source_version_id)?, - expiration: try_from_aws(x.expiration)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_copy_object_result(try_into_aws(x.copy_object_result)?); - y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +copy_object_result: try_from_aws(x.copy_object_result)?, +copy_source_version_id: try_from_aws(x.copy_source_version_id)?, +expiration: try_from_aws(x.expiration)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_copy_object_result(try_into_aws(x.copy_object_result)?); +y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CopyObjectResult { type Target = aws_sdk_s3::types::CopyObjectResult; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - last_modified: try_from_aws(x.last_modified)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +last_modified: try_from_aws(x.last_modified)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CopyPartResult { type Target = aws_sdk_s3::types::CopyPartResult; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - e_tag: try_from_aws(x.e_tag)?, - last_modified: try_from_aws(x.last_modified)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +e_tag: try_from_aws(x.e_tag)?, +last_modified: try_from_aws(x.last_modified)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateBucketConfiguration { type Target = aws_sdk_s3::types::CreateBucketConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: try_from_aws(x.bucket)?, - location: try_from_aws(x.location)?, - location_constraint: try_from_aws(x.location_constraint)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: try_from_aws(x.bucket)?, +location: try_from_aws(x.location)?, +location_constraint: try_from_aws(x.location_constraint)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_location(try_into_aws(x.location)?); - y = y.set_location_constraint(try_into_aws(x.location_constraint)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_location(try_into_aws(x.location)?); +y = y.set_location_constraint(try_into_aws(x.location_constraint)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateBucketInput { type Target = aws_sdk_s3::operation::create_bucket::CreateBucketInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - create_bucket_configuration: try_from_aws(x.create_bucket_configuration)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write: try_from_aws(x.grant_write)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - object_lock_enabled_for_bucket: try_from_aws(x.object_lock_enabled_for_bucket)?, - object_ownership: try_from_aws(x.object_ownership)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_create_bucket_configuration(try_into_aws(x.create_bucket_configuration)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write(try_into_aws(x.grant_write)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_object_lock_enabled_for_bucket(try_into_aws(x.object_lock_enabled_for_bucket)?); - y = y.set_object_ownership(try_into_aws(x.object_ownership)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +create_bucket_configuration: try_from_aws(x.create_bucket_configuration)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write: try_from_aws(x.grant_write)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +object_lock_enabled_for_bucket: try_from_aws(x.object_lock_enabled_for_bucket)?, +object_ownership: try_from_aws(x.object_ownership)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_create_bucket_configuration(try_into_aws(x.create_bucket_configuration)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write(try_into_aws(x.grant_write)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_object_lock_enabled_for_bucket(try_into_aws(x.object_lock_enabled_for_bucket)?); +y = y.set_object_ownership(try_into_aws(x.object_ownership)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CreateBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - metadata_table_configuration: unwrap_from_aws(x.metadata_table_configuration, "metadata_table_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_metadata_table_configuration(Some(try_into_aws(x.metadata_table_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +metadata_table_configuration: unwrap_from_aws(x.metadata_table_configuration, "metadata_table_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_metadata_table_configuration(Some(try_into_aws(x.metadata_table_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CreateBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateBucketOutput { type Target = aws_sdk_s3::operation::create_bucket::CreateBucketOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - location: try_from_aws(x.location)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +location: try_from_aws(x.location)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_location(try_into_aws(x.location)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_location(try_into_aws(x.location)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateMultipartUploadInput { type Target = aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_type: try_from_aws(x.content_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - expires: try_from_aws(x.expires)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - key: unwrap_from_aws(x.key, "key")?, - metadata: try_from_aws(x.metadata)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - tagging: try_from_aws(x.tagging)?, - version_id: None, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tagging(try_into_aws(x.tagging)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_type: try_from_aws(x.content_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +expires: try_from_aws(x.expires)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +key: unwrap_from_aws(x.key, "key")?, +metadata: try_from_aws(x.metadata)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +tagging: try_from_aws(x.tagging)?, +version_id: None, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tagging(try_into_aws(x.tagging)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CreateMultipartUploadOutput { type Target = aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - abort_date: try_from_aws(x.abort_date)?, - abort_rule_id: try_from_aws(x.abort_rule_id)?, - bucket: try_from_aws(x.bucket)?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - key: try_from_aws(x.key)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - upload_id: try_from_aws(x.upload_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_abort_date(try_into_aws(x.abort_date)?); - y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_upload_id(try_into_aws(x.upload_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +abort_date: try_from_aws(x.abort_date)?, +abort_rule_id: try_from_aws(x.abort_rule_id)?, +bucket: try_from_aws(x.bucket)?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +key: try_from_aws(x.key)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +upload_id: try_from_aws(x.upload_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_abort_date(try_into_aws(x.abort_date)?); +y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_upload_id(try_into_aws(x.upload_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateSessionInput { type Target = aws_sdk_s3::operation::create_session::CreateSessionInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - session_mode: try_from_aws(x.session_mode)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_session_mode(try_into_aws(x.session_mode)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +session_mode: try_from_aws(x.session_mode)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_session_mode(try_into_aws(x.session_mode)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CreateSessionOutput { type Target = aws_sdk_s3::operation::create_session::CreateSessionOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - credentials: unwrap_from_aws(x.credentials, "credentials")?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_credentials(Some(try_into_aws(x.credentials)?)); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +credentials: unwrap_from_aws(x.credentials, "credentials")?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_credentials(Some(try_into_aws(x.credentials)?)); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DataRedundancy { type Target = aws_sdk_s3::types::DataRedundancy; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::DataRedundancy::SingleAvailabilityZone => Self::from_static(Self::SINGLE_AVAILABILITY_ZONE), - aws_sdk_s3::types::DataRedundancy::SingleLocalZone => Self::from_static(Self::SINGLE_LOCAL_ZONE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::DataRedundancy::SingleAvailabilityZone => Self::from_static(Self::SINGLE_AVAILABILITY_ZONE), +aws_sdk_s3::types::DataRedundancy::SingleLocalZone => Self::from_static(Self::SINGLE_LOCAL_ZONE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::DataRedundancy::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::DataRedundancy::from(x.as_str())) +} } impl AwsConversion for s3s::dto::DefaultRetention { type Target = aws_sdk_s3::types::DefaultRetention; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - days: try_from_aws(x.days)?, - mode: try_from_aws(x.mode)?, - years: try_from_aws(x.years)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +days: try_from_aws(x.days)?, +mode: try_from_aws(x.mode)?, +years: try_from_aws(x.years)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_days(try_into_aws(x.days)?); - y = y.set_mode(try_into_aws(x.mode)?); - y = y.set_years(try_into_aws(x.years)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_days(try_into_aws(x.days)?); +y = y.set_mode(try_into_aws(x.mode)?); +y = y.set_years(try_into_aws(x.years)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Delete { type Target = aws_sdk_s3::types::Delete; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - objects: try_from_aws(x.objects)?, - quiet: try_from_aws(x.quiet)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +objects: try_from_aws(x.objects)?, +quiet: try_from_aws(x.quiet)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_objects(Some(try_into_aws(x.objects)?)); - y = y.set_quiet(try_into_aws(x.quiet)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_objects(Some(try_into_aws(x.objects)?)); +y = y.set_quiet(try_into_aws(x.quiet)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_analytics_configuration::DeleteBucketAnalyticsConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_analytics_configuration::DeleteBucketAnalyticsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketCorsInput { type Target = aws_sdk_s3::operation::delete_bucket_cors::DeleteBucketCorsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketCorsOutput { type Target = aws_sdk_s3::operation::delete_bucket_cors::DeleteBucketCorsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketEncryptionInput { type Target = aws_sdk_s3::operation::delete_bucket_encryption::DeleteBucketEncryptionInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketEncryptionOutput { type Target = aws_sdk_s3::operation::delete_bucket_encryption::DeleteBucketEncryptionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketInput { type Target = aws_sdk_s3::operation::delete_bucket::DeleteBucketInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - force_delete: None, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +force_delete: None, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketIntelligentTieringConfigurationInput { - type Target = - aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationInput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationInput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketIntelligentTieringConfigurationOutput { - type Target = - aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationOutput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationOutput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_inventory_configuration::DeleteBucketInventoryConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_inventory_configuration::DeleteBucketInventoryConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketLifecycleInput { type Target = aws_sdk_s3::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketLifecycleOutput { type Target = aws_sdk_s3::operation::delete_bucket_lifecycle::DeleteBucketLifecycleOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_metrics_configuration::DeleteBucketMetricsConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_metrics_configuration::DeleteBucketMetricsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketOutput { type Target = aws_sdk_s3::operation::delete_bucket::DeleteBucketOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::delete_bucket_ownership_controls::DeleteBucketOwnershipControlsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::delete_bucket_ownership_controls::DeleteBucketOwnershipControlsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketPolicyInput { type Target = aws_sdk_s3::operation::delete_bucket_policy::DeleteBucketPolicyInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketPolicyOutput { type Target = aws_sdk_s3::operation::delete_bucket_policy::DeleteBucketPolicyOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketReplicationInput { type Target = aws_sdk_s3::operation::delete_bucket_replication::DeleteBucketReplicationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketReplicationOutput { type Target = aws_sdk_s3::operation::delete_bucket_replication::DeleteBucketReplicationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketTaggingInput { type Target = aws_sdk_s3::operation::delete_bucket_tagging::DeleteBucketTaggingInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketTaggingOutput { type Target = aws_sdk_s3::operation::delete_bucket_tagging::DeleteBucketTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketWebsiteInput { type Target = aws_sdk_s3::operation::delete_bucket_website::DeleteBucketWebsiteInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketWebsiteOutput { type Target = aws_sdk_s3::operation::delete_bucket_website::DeleteBucketWebsiteOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteMarkerEntry { type Target = aws_sdk_s3::types::DeleteMarkerEntry; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - is_latest: try_from_aws(x.is_latest)?, - key: try_from_aws(x.key)?, - last_modified: try_from_aws(x.last_modified)?, - owner: try_from_aws(x.owner)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_is_latest(try_into_aws(x.is_latest)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +is_latest: try_from_aws(x.is_latest)?, +key: try_from_aws(x.key)?, +last_modified: try_from_aws(x.last_modified)?, +owner: try_from_aws(x.owner)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_is_latest(try_into_aws(x.is_latest)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteMarkerReplication { type Target = aws_sdk_s3::types::DeleteMarkerReplication; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteMarkerReplicationStatus { type Target = aws_sdk_s3::types::DeleteMarkerReplicationStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::DeleteMarkerReplicationStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::DeleteMarkerReplicationStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::DeleteMarkerReplicationStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::DeleteMarkerReplicationStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::DeleteMarkerReplicationStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::DeleteMarkerReplicationStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::DeleteObjectInput { type Target = aws_sdk_s3::operation::delete_object::DeleteObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match: try_from_aws(x.if_match)?, - if_match_last_modified_time: try_from_aws(x.if_match_last_modified_time)?, - if_match_size: try_from_aws(x.if_match_size)?, - key: unwrap_from_aws(x.key, "key")?, - mfa: try_from_aws(x.mfa)?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_match_last_modified_time(try_into_aws(x.if_match_last_modified_time)?); - y = y.set_if_match_size(try_into_aws(x.if_match_size)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_mfa(try_into_aws(x.mfa)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match: try_from_aws(x.if_match)?, +if_match_last_modified_time: try_from_aws(x.if_match_last_modified_time)?, +if_match_size: try_from_aws(x.if_match_size)?, +key: unwrap_from_aws(x.key, "key")?, +mfa: try_from_aws(x.mfa)?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_match_last_modified_time(try_into_aws(x.if_match_last_modified_time)?); +y = y.set_if_match_size(try_into_aws(x.if_match_size)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_mfa(try_into_aws(x.mfa)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteObjectOutput { type Target = aws_sdk_s3::operation::delete_object::DeleteObjectOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - delete_marker: try_from_aws(x.delete_marker)?, - request_charged: try_from_aws(x.request_charged)?, - version_id: try_from_aws(x.version_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +delete_marker: try_from_aws(x.delete_marker)?, +request_charged: try_from_aws(x.request_charged)?, +version_id: try_from_aws(x.version_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteObjectTaggingInput { type Target = aws_sdk_s3::operation::delete_object_tagging::DeleteObjectTaggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteObjectTaggingOutput { type Target = aws_sdk_s3::operation::delete_object_tagging::DeleteObjectTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - version_id: try_from_aws(x.version_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +version_id: try_from_aws(x.version_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteObjectsInput { type Target = aws_sdk_s3::operation::delete_objects::DeleteObjectsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - delete: unwrap_from_aws(x.delete, "delete")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - mfa: try_from_aws(x.mfa)?, - request_payer: try_from_aws(x.request_payer)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_delete(Some(try_into_aws(x.delete)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_mfa(try_into_aws(x.mfa)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +delete: unwrap_from_aws(x.delete, "delete")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +mfa: try_from_aws(x.mfa)?, +request_payer: try_from_aws(x.request_payer)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_delete(Some(try_into_aws(x.delete)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_mfa(try_into_aws(x.mfa)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteObjectsOutput { type Target = aws_sdk_s3::operation::delete_objects::DeleteObjectsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - deleted: try_from_aws(x.deleted)?, - errors: try_from_aws(x.errors)?, - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +deleted: try_from_aws(x.deleted)?, +errors: try_from_aws(x.errors)?, +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_deleted(try_into_aws(x.deleted)?); - y = y.set_errors(try_into_aws(x.errors)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_deleted(try_into_aws(x.deleted)?); +y = y.set_errors(try_into_aws(x.errors)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeletePublicAccessBlockInput { type Target = aws_sdk_s3::operation::delete_public_access_block::DeletePublicAccessBlockInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeletePublicAccessBlockOutput { type Target = aws_sdk_s3::operation::delete_public_access_block::DeletePublicAccessBlockOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeletedObject { type Target = aws_sdk_s3::types::DeletedObject; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - delete_marker: try_from_aws(x.delete_marker)?, - delete_marker_version_id: try_from_aws(x.delete_marker_version_id)?, - key: try_from_aws(x.key)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_delete_marker_version_id(try_into_aws(x.delete_marker_version_id)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +delete_marker: try_from_aws(x.delete_marker)?, +delete_marker_version_id: try_from_aws(x.delete_marker_version_id)?, +key: try_from_aws(x.key)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_delete_marker_version_id(try_into_aws(x.delete_marker_version_id)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Destination { type Target = aws_sdk_s3::types::Destination; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_control_translation: try_from_aws(x.access_control_translation)?, - account: try_from_aws(x.account)?, - bucket: try_from_aws(x.bucket)?, - encryption_configuration: try_from_aws(x.encryption_configuration)?, - metrics: try_from_aws(x.metrics)?, - replication_time: try_from_aws(x.replication_time)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_control_translation(try_into_aws(x.access_control_translation)?); - y = y.set_account(try_into_aws(x.account)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_encryption_configuration(try_into_aws(x.encryption_configuration)?); - y = y.set_metrics(try_into_aws(x.metrics)?); - y = y.set_replication_time(try_into_aws(x.replication_time)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_control_translation: try_from_aws(x.access_control_translation)?, +account: try_from_aws(x.account)?, +bucket: try_from_aws(x.bucket)?, +encryption_configuration: try_from_aws(x.encryption_configuration)?, +metrics: try_from_aws(x.metrics)?, +replication_time: try_from_aws(x.replication_time)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_control_translation(try_into_aws(x.access_control_translation)?); +y = y.set_account(try_into_aws(x.account)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_encryption_configuration(try_into_aws(x.encryption_configuration)?); +y = y.set_metrics(try_into_aws(x.metrics)?); +y = y.set_replication_time(try_into_aws(x.replication_time)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::EncodingType { type Target = aws_sdk_s3::types::EncodingType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::EncodingType::Url => Self::from_static(Self::URL), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::EncodingType::Url => Self::from_static(Self::URL), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::EncodingType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::EncodingType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Encryption { type Target = aws_sdk_s3::types::Encryption; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - encryption_type: try_from_aws(x.encryption_type)?, - kms_context: try_from_aws(x.kms_context)?, - kms_key_id: try_from_aws(x.kms_key_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +encryption_type: try_from_aws(x.encryption_type)?, +kms_context: try_from_aws(x.kms_context)?, +kms_key_id: try_from_aws(x.kms_key_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_encryption_type(Some(try_into_aws(x.encryption_type)?)); - y = y.set_kms_context(try_into_aws(x.kms_context)?); - y = y.set_kms_key_id(try_into_aws(x.kms_key_id)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_encryption_type(Some(try_into_aws(x.encryption_type)?)); +y = y.set_kms_context(try_into_aws(x.kms_context)?); +y = y.set_kms_key_id(try_into_aws(x.kms_key_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::EncryptionConfiguration { type Target = aws_sdk_s3::types::EncryptionConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - replica_kms_key_id: try_from_aws(x.replica_kms_key_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +replica_kms_key_id: try_from_aws(x.replica_kms_key_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_replica_kms_key_id(try_into_aws(x.replica_kms_key_id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_replica_kms_key_id(try_into_aws(x.replica_kms_key_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::EncryptionTypeMismatch { type Target = aws_sdk_s3::types::error::EncryptionTypeMismatch; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::EndEvent { type Target = aws_sdk_s3::types::EndEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Error { type Target = aws_sdk_s3::types::Error; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - code: try_from_aws(x.code)?, - key: try_from_aws(x.key)?, - message: try_from_aws(x.message)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_code(try_into_aws(x.code)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_message(try_into_aws(x.message)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +code: try_from_aws(x.code)?, +key: try_from_aws(x.key)?, +message: try_from_aws(x.message)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_code(try_into_aws(x.code)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_message(try_into_aws(x.message)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ErrorDetails { type Target = aws_sdk_s3::types::ErrorDetails; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - error_code: try_from_aws(x.error_code)?, - error_message: try_from_aws(x.error_message)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +error_code: try_from_aws(x.error_code)?, +error_message: try_from_aws(x.error_message)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_error_code(try_into_aws(x.error_code)?); - y = y.set_error_message(try_into_aws(x.error_message)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_error_code(try_into_aws(x.error_code)?); +y = y.set_error_message(try_into_aws(x.error_message)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ErrorDocument { type Target = aws_sdk_s3::types::ErrorDocument; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - key: try_from_aws(x.key)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +key: try_from_aws(x.key)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_key(Some(try_into_aws(x.key)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_key(Some(try_into_aws(x.key)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::EventBridgeConfiguration { type Target = aws_sdk_s3::types::EventBridgeConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ExistingObjectReplication { type Target = aws_sdk_s3::types::ExistingObjectReplication; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ExistingObjectReplicationStatus { type Target = aws_sdk_s3::types::ExistingObjectReplicationStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ExistingObjectReplicationStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ExistingObjectReplicationStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ExistingObjectReplicationStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ExistingObjectReplicationStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ExistingObjectReplicationStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ExistingObjectReplicationStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ExpirationStatus { type Target = aws_sdk_s3::types::ExpirationStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ExpirationStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ExpirationStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ExpirationStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ExpirationStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ExpirationStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ExpirationStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ExpressionType { type Target = aws_sdk_s3::types::ExpressionType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ExpressionType::Sql => Self::from_static(Self::SQL), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ExpressionType::Sql => Self::from_static(Self::SQL), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ExpressionType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ExpressionType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::FileHeaderInfo { type Target = aws_sdk_s3::types::FileHeaderInfo; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::FileHeaderInfo::Ignore => Self::from_static(Self::IGNORE), - aws_sdk_s3::types::FileHeaderInfo::None => Self::from_static(Self::NONE), - aws_sdk_s3::types::FileHeaderInfo::Use => Self::from_static(Self::USE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::FileHeaderInfo::Ignore => Self::from_static(Self::IGNORE), +aws_sdk_s3::types::FileHeaderInfo::None => Self::from_static(Self::NONE), +aws_sdk_s3::types::FileHeaderInfo::Use => Self::from_static(Self::USE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::FileHeaderInfo::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::FileHeaderInfo::from(x.as_str())) +} } impl AwsConversion for s3s::dto::FilterRule { type Target = aws_sdk_s3::types::FilterRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - value: try_from_aws(x.value)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +value: try_from_aws(x.value)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_value(try_into_aws(x.value)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_value(try_into_aws(x.value)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::FilterRuleName { type Target = aws_sdk_s3::types::FilterRuleName; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::FilterRuleName::Prefix => Self::from_static(Self::PREFIX), - aws_sdk_s3::types::FilterRuleName::Suffix => Self::from_static(Self::SUFFIX), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::FilterRuleName::Prefix => Self::from_static(Self::PREFIX), +aws_sdk_s3::types::FilterRuleName::Suffix => Self::from_static(Self::SUFFIX), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::FilterRuleName::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::FilterRuleName::from(x.as_str())) +} } impl AwsConversion for s3s::dto::GetBucketAccelerateConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - request_payer: try_from_aws(x.request_payer)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +request_payer: try_from_aws(x.request_payer)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketAccelerateConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketAclInput { type Target = aws_sdk_s3::operation::get_bucket_acl::GetBucketAclInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketAclOutput { type Target = aws_sdk_s3::operation::get_bucket_acl::GetBucketAclOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grants: try_from_aws(x.grants)?, - owner: try_from_aws(x.owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grants: try_from_aws(x.grants)?, +owner: try_from_aws(x.owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grants(try_into_aws(x.grants)?); - y = y.set_owner(try_into_aws(x.owner)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grants(try_into_aws(x.grants)?); +y = y.set_owner(try_into_aws(x.owner)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_analytics_configuration::GetBucketAnalyticsConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_analytics_configuration::GetBucketAnalyticsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - analytics_configuration: try_from_aws(x.analytics_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +analytics_configuration: try_from_aws(x.analytics_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_analytics_configuration(try_into_aws(x.analytics_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_analytics_configuration(try_into_aws(x.analytics_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketCorsInput { type Target = aws_sdk_s3::operation::get_bucket_cors::GetBucketCorsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketCorsOutput { type Target = aws_sdk_s3::operation::get_bucket_cors::GetBucketCorsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - cors_rules: try_from_aws(x.cors_rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +cors_rules: try_from_aws(x.cors_rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_cors_rules(try_into_aws(x.cors_rules)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_cors_rules(try_into_aws(x.cors_rules)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketEncryptionInput { type Target = aws_sdk_s3::operation::get_bucket_encryption::GetBucketEncryptionInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketEncryptionOutput { type Target = aws_sdk_s3::operation::get_bucket_encryption::GetBucketEncryptionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - server_side_encryption_configuration: try_from_aws(x.server_side_encryption_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +server_side_encryption_configuration: try_from_aws(x.server_side_encryption_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_server_side_encryption_configuration(try_into_aws(x.server_side_encryption_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_server_side_encryption_configuration(try_into_aws(x.server_side_encryption_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketIntelligentTieringConfigurationInput { - type Target = - aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationInput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationInput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketIntelligentTieringConfigurationOutput { - type Target = - aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - intelligent_tiering_configuration: try_from_aws(x.intelligent_tiering_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +intelligent_tiering_configuration: try_from_aws(x.intelligent_tiering_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_intelligent_tiering_configuration(try_into_aws(x.intelligent_tiering_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_intelligent_tiering_configuration(try_into_aws(x.intelligent_tiering_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_inventory_configuration::GetBucketInventoryConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_inventory_configuration::GetBucketInventoryConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - inventory_configuration: try_from_aws(x.inventory_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +inventory_configuration: try_from_aws(x.inventory_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_inventory_configuration(try_into_aws(x.inventory_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_inventory_configuration(try_into_aws(x.inventory_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketLifecycleConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_lifecycle_configuration::GetBucketLifecycleConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketLifecycleConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_lifecycle_configuration::GetBucketLifecycleConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - rules: try_from_aws(x.rules)?, - transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +rules: try_from_aws(x.rules)?, +transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_rules(try_into_aws(x.rules)?); - y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_rules(try_into_aws(x.rules)?); +y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketLocationInput { type Target = aws_sdk_s3::operation::get_bucket_location::GetBucketLocationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketLocationOutput { type Target = aws_sdk_s3::operation::get_bucket_location::GetBucketLocationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - location_constraint: try_from_aws(x.location_constraint)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +location_constraint: try_from_aws(x.location_constraint)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_location_constraint(try_into_aws(x.location_constraint)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_location_constraint(try_into_aws(x.location_constraint)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketLoggingInput { type Target = aws_sdk_s3::operation::get_bucket_logging::GetBucketLoggingInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketLoggingOutput { type Target = aws_sdk_s3::operation::get_bucket_logging::GetBucketLoggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - logging_enabled: try_from_aws(x.logging_enabled)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +logging_enabled: try_from_aws(x.logging_enabled)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - get_bucket_metadata_table_configuration_result: try_from_aws(x.get_bucket_metadata_table_configuration_result)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +get_bucket_metadata_table_configuration_result: try_from_aws(x.get_bucket_metadata_table_configuration_result)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_get_bucket_metadata_table_configuration_result(try_into_aws(x.get_bucket_metadata_table_configuration_result)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_get_bucket_metadata_table_configuration_result(try_into_aws(x.get_bucket_metadata_table_configuration_result)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationResult { type Target = aws_sdk_s3::types::GetBucketMetadataTableConfigurationResult; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - error: try_from_aws(x.error)?, - metadata_table_configuration_result: unwrap_from_aws( - x.metadata_table_configuration_result, - "metadata_table_configuration_result", - )?, - status: try_from_aws(x.status)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_error(try_into_aws(x.error)?); - y = y.set_metadata_table_configuration_result(Some(try_into_aws(x.metadata_table_configuration_result)?)); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +error: try_from_aws(x.error)?, +metadata_table_configuration_result: unwrap_from_aws(x.metadata_table_configuration_result, "metadata_table_configuration_result")?, +status: try_from_aws(x.status)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_error(try_into_aws(x.error)?); +y = y.set_metadata_table_configuration_result(Some(try_into_aws(x.metadata_table_configuration_result)?)); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_metrics_configuration::GetBucketMetricsConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_metrics_configuration::GetBucketMetricsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - metrics_configuration: try_from_aws(x.metrics_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +metrics_configuration: try_from_aws(x.metrics_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_metrics_configuration(try_into_aws(x.metrics_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_metrics_configuration(try_into_aws(x.metrics_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketNotificationConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_notification_configuration::GetBucketNotificationConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketNotificationConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_notification_configuration::GetBucketNotificationConfigurationOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, - lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, - queue_configurations: try_from_aws(x.queue_configurations)?, - topic_configurations: try_from_aws(x.topic_configurations)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); - y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); - y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); - y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, +lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, +queue_configurations: try_from_aws(x.queue_configurations)?, +topic_configurations: try_from_aws(x.topic_configurations)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); +y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); +y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); +y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::get_bucket_ownership_controls::GetBucketOwnershipControlsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::get_bucket_ownership_controls::GetBucketOwnershipControlsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - ownership_controls: try_from_aws(x.ownership_controls)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +ownership_controls: try_from_aws(x.ownership_controls)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_ownership_controls(try_into_aws(x.ownership_controls)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_ownership_controls(try_into_aws(x.ownership_controls)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketPolicyInput { type Target = aws_sdk_s3::operation::get_bucket_policy::GetBucketPolicyInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketPolicyOutput { type Target = aws_sdk_s3::operation::get_bucket_policy::GetBucketPolicyOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - policy: try_from_aws(x.policy)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +policy: try_from_aws(x.policy)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_policy(try_into_aws(x.policy)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_policy(try_into_aws(x.policy)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketPolicyStatusInput { type Target = aws_sdk_s3::operation::get_bucket_policy_status::GetBucketPolicyStatusInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketPolicyStatusOutput { type Target = aws_sdk_s3::operation::get_bucket_policy_status::GetBucketPolicyStatusOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - policy_status: try_from_aws(x.policy_status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +policy_status: try_from_aws(x.policy_status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_policy_status(try_into_aws(x.policy_status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_policy_status(try_into_aws(x.policy_status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketReplicationInput { type Target = aws_sdk_s3::operation::get_bucket_replication::GetBucketReplicationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketReplicationOutput { type Target = aws_sdk_s3::operation::get_bucket_replication::GetBucketReplicationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - replication_configuration: try_from_aws(x.replication_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +replication_configuration: try_from_aws(x.replication_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_replication_configuration(try_into_aws(x.replication_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_replication_configuration(try_into_aws(x.replication_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketRequestPaymentInput { type Target = aws_sdk_s3::operation::get_bucket_request_payment::GetBucketRequestPaymentInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketRequestPaymentOutput { type Target = aws_sdk_s3::operation::get_bucket_request_payment::GetBucketRequestPaymentOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - payer: try_from_aws(x.payer)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +payer: try_from_aws(x.payer)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_payer(try_into_aws(x.payer)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_payer(try_into_aws(x.payer)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketTaggingInput { type Target = aws_sdk_s3::operation::get_bucket_tagging::GetBucketTaggingInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketTaggingOutput { type Target = aws_sdk_s3::operation::get_bucket_tagging::GetBucketTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - tag_set: try_from_aws(x.tag_set)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +tag_set: try_from_aws(x.tag_set)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketVersioningInput { type Target = aws_sdk_s3::operation::get_bucket_versioning::GetBucketVersioningInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketVersioningOutput { type Target = aws_sdk_s3::operation::get_bucket_versioning::GetBucketVersioningOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - mfa_delete: try_from_aws(x.mfa_delete)?, - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +mfa_delete: try_from_aws(x.mfa_delete)?, +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketWebsiteInput { type Target = aws_sdk_s3::operation::get_bucket_website::GetBucketWebsiteInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketWebsiteOutput { type Target = aws_sdk_s3::operation::get_bucket_website::GetBucketWebsiteOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - error_document: try_from_aws(x.error_document)?, - index_document: try_from_aws(x.index_document)?, - redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, - routing_rules: try_from_aws(x.routing_rules)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_error_document(try_into_aws(x.error_document)?); - y = y.set_index_document(try_into_aws(x.index_document)?); - y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); - y = y.set_routing_rules(try_into_aws(x.routing_rules)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +error_document: try_from_aws(x.error_document)?, +index_document: try_from_aws(x.index_document)?, +redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, +routing_rules: try_from_aws(x.routing_rules)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_error_document(try_into_aws(x.error_document)?); +y = y.set_index_document(try_into_aws(x.index_document)?); +y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); +y = y.set_routing_rules(try_into_aws(x.routing_rules)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectAclInput { type Target = aws_sdk_s3::operation::get_object_acl::GetObjectAclInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectAclOutput { type Target = aws_sdk_s3::operation::get_object_acl::GetObjectAclOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grants: try_from_aws(x.grants)?, - owner: try_from_aws(x.owner)?, - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grants: try_from_aws(x.grants)?, +owner: try_from_aws(x.owner)?, +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grants(try_into_aws(x.grants)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grants(try_into_aws(x.grants)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectAttributesInput { type Target = aws_sdk_s3::operation::get_object_attributes::GetObjectAttributesInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - max_parts: try_from_aws(x.max_parts)?, - object_attributes: unwrap_from_aws(x.object_attributes, "object_attributes")?, - part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_max_parts(try_into_aws(x.max_parts)?); - y = y.set_object_attributes(Some(try_into_aws(x.object_attributes)?)); - y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +max_parts: try_from_aws(x.max_parts)?, +object_attributes: unwrap_from_aws(x.object_attributes, "object_attributes")?, +part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_max_parts(try_into_aws(x.max_parts)?); +y = y.set_object_attributes(Some(try_into_aws(x.object_attributes)?)); +y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectAttributesOutput { type Target = aws_sdk_s3::operation::get_object_attributes::GetObjectAttributesOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum: try_from_aws(x.checksum)?, - delete_marker: try_from_aws(x.delete_marker)?, - e_tag: try_from_aws(x.e_tag)?, - last_modified: try_from_aws(x.last_modified)?, - object_parts: try_from_aws(x.object_parts)?, - object_size: try_from_aws(x.object_size)?, - request_charged: try_from_aws(x.request_charged)?, - storage_class: try_from_aws(x.storage_class)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum(try_into_aws(x.checksum)?); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_object_parts(try_into_aws(x.object_parts)?); - y = y.set_object_size(try_into_aws(x.object_size)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum: try_from_aws(x.checksum)?, +delete_marker: try_from_aws(x.delete_marker)?, +e_tag: try_from_aws(x.e_tag)?, +last_modified: try_from_aws(x.last_modified)?, +object_parts: try_from_aws(x.object_parts)?, +object_size: try_from_aws(x.object_size)?, +request_charged: try_from_aws(x.request_charged)?, +storage_class: try_from_aws(x.storage_class)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum(try_into_aws(x.checksum)?); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_object_parts(try_into_aws(x.object_parts)?); +y = y.set_object_size(try_into_aws(x.object_size)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectAttributesParts { type Target = aws_sdk_s3::types::GetObjectAttributesParts; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - is_truncated: try_from_aws(x.is_truncated)?, - max_parts: try_from_aws(x.max_parts)?, - next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, - part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, - parts: try_from_aws(x.parts)?, - total_parts_count: try_from_aws(x.total_parts_count)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_max_parts(try_into_aws(x.max_parts)?); - y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); - y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); - y = y.set_parts(try_into_aws(x.parts)?); - y = y.set_total_parts_count(try_into_aws(x.total_parts_count)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +is_truncated: try_from_aws(x.is_truncated)?, +max_parts: try_from_aws(x.max_parts)?, +next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, +part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, +parts: try_from_aws(x.parts)?, +total_parts_count: try_from_aws(x.total_parts_count)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_max_parts(try_into_aws(x.max_parts)?); +y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); +y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); +y = y.set_parts(try_into_aws(x.parts)?); +y = y.set_total_parts_count(try_into_aws(x.total_parts_count)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectInput { type Target = aws_sdk_s3::operation::get_object::GetObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_mode: try_from_aws(x.checksum_mode)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match: try_from_aws(x.if_match)?, - if_modified_since: try_from_aws(x.if_modified_since)?, - if_none_match: try_from_aws(x.if_none_match)?, - if_unmodified_since: try_from_aws(x.if_unmodified_since)?, - key: unwrap_from_aws(x.key, "key")?, - part_number: try_from_aws(x.part_number)?, - range: try_from_aws(x.range)?, - request_payer: try_from_aws(x.request_payer)?, - response_cache_control: try_from_aws(x.response_cache_control)?, - response_content_disposition: try_from_aws(x.response_content_disposition)?, - response_content_encoding: try_from_aws(x.response_content_encoding)?, - response_content_language: try_from_aws(x.response_content_language)?, - response_content_type: try_from_aws(x.response_content_type)?, - response_expires: try_from_aws(x.response_expires)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); - y = y.set_if_none_match(try_into_aws(x.if_none_match)?); - y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_part_number(try_into_aws(x.part_number)?); - y = y.set_range(try_into_aws(x.range)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); - y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); - y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); - y = y.set_response_content_language(try_into_aws(x.response_content_language)?); - y = y.set_response_content_type(try_into_aws(x.response_content_type)?); - y = y.set_response_expires(try_into_aws(x.response_expires)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_mode: try_from_aws(x.checksum_mode)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match: try_from_aws(x.if_match)?, +if_modified_since: try_from_aws(x.if_modified_since)?, +if_none_match: try_from_aws(x.if_none_match)?, +if_unmodified_since: try_from_aws(x.if_unmodified_since)?, +key: unwrap_from_aws(x.key, "key")?, +part_number: try_from_aws(x.part_number)?, +range: try_from_aws(x.range)?, +request_payer: try_from_aws(x.request_payer)?, +response_cache_control: try_from_aws(x.response_cache_control)?, +response_content_disposition: try_from_aws(x.response_content_disposition)?, +response_content_encoding: try_from_aws(x.response_content_encoding)?, +response_content_language: try_from_aws(x.response_content_language)?, +response_content_type: try_from_aws(x.response_content_type)?, +response_expires: try_from_aws(x.response_expires)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); +y = y.set_if_none_match(try_into_aws(x.if_none_match)?); +y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_part_number(try_into_aws(x.part_number)?); +y = y.set_range(try_into_aws(x.range)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); +y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); +y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); +y = y.set_response_content_language(try_into_aws(x.response_content_language)?); +y = y.set_response_content_type(try_into_aws(x.response_content_type)?); +y = y.set_response_expires(try_into_aws(x.response_expires)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectLegalHoldInput { type Target = aws_sdk_s3::operation::get_object_legal_hold::GetObjectLegalHoldInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectLegalHoldOutput { type Target = aws_sdk_s3::operation::get_object_legal_hold::GetObjectLegalHoldOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - legal_hold: try_from_aws(x.legal_hold)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +legal_hold: try_from_aws(x.legal_hold)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_legal_hold(try_into_aws(x.legal_hold)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_legal_hold(try_into_aws(x.legal_hold)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectLockConfigurationInput { type Target = aws_sdk_s3::operation::get_object_lock_configuration::GetObjectLockConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectLockConfigurationOutput { type Target = aws_sdk_s3::operation::get_object_lock_configuration::GetObjectLockConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - object_lock_configuration: try_from_aws(x.object_lock_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +object_lock_configuration: try_from_aws(x.object_lock_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectOutput { type Target = aws_sdk_s3::operation::get_object::GetObjectOutput; - type Error = S3Error; - - #[allow(deprecated)] - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - accept_ranges: try_from_aws(x.accept_ranges)?, - body: Some(try_from_aws(x.body)?), - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_length: try_from_aws(x.content_length)?, - content_range: try_from_aws(x.content_range)?, - content_type: try_from_aws(x.content_type)?, - delete_marker: try_from_aws(x.delete_marker)?, - e_tag: try_from_aws(x.e_tag)?, - expiration: try_from_aws(x.expiration)?, - expires: try_from_aws(x.expires)?, - last_modified: try_from_aws(x.last_modified)?, - metadata: try_from_aws(x.metadata)?, - missing_meta: try_from_aws(x.missing_meta)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - parts_count: try_from_aws(x.parts_count)?, - replication_status: try_from_aws(x.replication_status)?, - request_charged: try_from_aws(x.request_charged)?, - restore: try_from_aws(x.restore)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - tag_count: try_from_aws(x.tag_count)?, - version_id: try_from_aws(x.version_id)?, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - }) - } - - #[allow(deprecated)] - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_range(try_into_aws(x.content_range)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_missing_meta(try_into_aws(x.missing_meta)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_parts_count(try_into_aws(x.parts_count)?); - y = y.set_replication_status(try_into_aws(x.replication_status)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_restore(try_into_aws(x.restore)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tag_count(try_into_aws(x.tag_count)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - Ok(y.build()) - } +type Error = S3Error; + +#[allow(deprecated)] +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +accept_ranges: try_from_aws(x.accept_ranges)?, +body: Some(try_from_aws(x.body)?), +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_length: try_from_aws(x.content_length)?, +content_range: try_from_aws(x.content_range)?, +content_type: try_from_aws(x.content_type)?, +delete_marker: try_from_aws(x.delete_marker)?, +e_tag: try_from_aws(x.e_tag)?, +expiration: try_from_aws(x.expiration)?, +expires: try_from_aws(x.expires)?, +last_modified: try_from_aws(x.last_modified)?, +metadata: try_from_aws(x.metadata)?, +missing_meta: try_from_aws(x.missing_meta)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +parts_count: try_from_aws(x.parts_count)?, +replication_status: try_from_aws(x.replication_status)?, +request_charged: try_from_aws(x.request_charged)?, +restore: try_from_aws(x.restore)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +tag_count: try_from_aws(x.tag_count)?, +version_id: try_from_aws(x.version_id)?, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +}) +} + +#[allow(deprecated)] +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_range(try_into_aws(x.content_range)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_missing_meta(try_into_aws(x.missing_meta)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_parts_count(try_into_aws(x.parts_count)?); +y = y.set_replication_status(try_into_aws(x.replication_status)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_restore(try_into_aws(x.restore)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tag_count(try_into_aws(x.tag_count)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectRetentionInput { type Target = aws_sdk_s3::operation::get_object_retention::GetObjectRetentionInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectRetentionOutput { type Target = aws_sdk_s3::operation::get_object_retention::GetObjectRetentionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - retention: try_from_aws(x.retention)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +retention: try_from_aws(x.retention)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_retention(try_into_aws(x.retention)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_retention(try_into_aws(x.retention)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectTaggingInput { type Target = aws_sdk_s3::operation::get_object_tagging::GetObjectTaggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectTaggingOutput { type Target = aws_sdk_s3::operation::get_object_tagging::GetObjectTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - tag_set: try_from_aws(x.tag_set)?, - version_id: try_from_aws(x.version_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +tag_set: try_from_aws(x.tag_set)?, +version_id: try_from_aws(x.version_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectTorrentInput { type Target = aws_sdk_s3::operation::get_object_torrent::GetObjectTorrentInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectTorrentOutput { type Target = aws_sdk_s3::operation::get_object_torrent::GetObjectTorrentOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - body: Some(try_from_aws(x.body)?), - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +body: Some(try_from_aws(x.body)?), +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetPublicAccessBlockInput { type Target = aws_sdk_s3::operation::get_public_access_block::GetPublicAccessBlockInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetPublicAccessBlockOutput { type Target = aws_sdk_s3::operation::get_public_access_block::GetPublicAccessBlockOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - public_access_block_configuration: try_from_aws(x.public_access_block_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +public_access_block_configuration: try_from_aws(x.public_access_block_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_public_access_block_configuration(try_into_aws(x.public_access_block_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_public_access_block_configuration(try_into_aws(x.public_access_block_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GlacierJobParameters { type Target = aws_sdk_s3::types::GlacierJobParameters; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - tier: try_from_aws(x.tier)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +tier: try_from_aws(x.tier)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_tier(Some(try_into_aws(x.tier)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_tier(Some(try_into_aws(x.tier)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::Grant { type Target = aws_sdk_s3::types::Grant; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grantee: try_from_aws(x.grantee)?, - permission: try_from_aws(x.permission)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grantee: try_from_aws(x.grantee)?, +permission: try_from_aws(x.permission)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grantee(try_into_aws(x.grantee)?); - y = y.set_permission(try_into_aws(x.permission)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grantee(try_into_aws(x.grantee)?); +y = y.set_permission(try_into_aws(x.permission)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Grantee { type Target = aws_sdk_s3::types::Grantee; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - display_name: try_from_aws(x.display_name)?, - email_address: try_from_aws(x.email_address)?, - id: try_from_aws(x.id)?, - type_: try_from_aws(x.r#type)?, - uri: try_from_aws(x.uri)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_display_name(try_into_aws(x.display_name)?); - y = y.set_email_address(try_into_aws(x.email_address)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_type(Some(try_into_aws(x.type_)?)); - y = y.set_uri(try_into_aws(x.uri)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +display_name: try_from_aws(x.display_name)?, +email_address: try_from_aws(x.email_address)?, +id: try_from_aws(x.id)?, +type_: try_from_aws(x.r#type)?, +uri: try_from_aws(x.uri)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_display_name(try_into_aws(x.display_name)?); +y = y.set_email_address(try_into_aws(x.email_address)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_type(Some(try_into_aws(x.type_)?)); +y = y.set_uri(try_into_aws(x.uri)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::HeadBucketInput { type Target = aws_sdk_s3::operation::head_bucket::HeadBucketInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::HeadBucketOutput { type Target = aws_sdk_s3::operation::head_bucket::HeadBucketOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_point_alias: try_from_aws(x.access_point_alias)?, - bucket_location_name: try_from_aws(x.bucket_location_name)?, - bucket_location_type: try_from_aws(x.bucket_location_type)?, - bucket_region: try_from_aws(x.bucket_region)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_point_alias(try_into_aws(x.access_point_alias)?); - y = y.set_bucket_location_name(try_into_aws(x.bucket_location_name)?); - y = y.set_bucket_location_type(try_into_aws(x.bucket_location_type)?); - y = y.set_bucket_region(try_into_aws(x.bucket_region)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_point_alias: try_from_aws(x.access_point_alias)?, +bucket_location_name: try_from_aws(x.bucket_location_name)?, +bucket_location_type: try_from_aws(x.bucket_location_type)?, +bucket_region: try_from_aws(x.bucket_region)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_point_alias(try_into_aws(x.access_point_alias)?); +y = y.set_bucket_location_name(try_into_aws(x.bucket_location_name)?); +y = y.set_bucket_location_type(try_into_aws(x.bucket_location_type)?); +y = y.set_bucket_region(try_into_aws(x.bucket_region)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::HeadObjectInput { type Target = aws_sdk_s3::operation::head_object::HeadObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_mode: try_from_aws(x.checksum_mode)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match: try_from_aws(x.if_match)?, - if_modified_since: try_from_aws(x.if_modified_since)?, - if_none_match: try_from_aws(x.if_none_match)?, - if_unmodified_since: try_from_aws(x.if_unmodified_since)?, - key: unwrap_from_aws(x.key, "key")?, - part_number: try_from_aws(x.part_number)?, - range: try_from_aws(x.range)?, - request_payer: try_from_aws(x.request_payer)?, - response_cache_control: try_from_aws(x.response_cache_control)?, - response_content_disposition: try_from_aws(x.response_content_disposition)?, - response_content_encoding: try_from_aws(x.response_content_encoding)?, - response_content_language: try_from_aws(x.response_content_language)?, - response_content_type: try_from_aws(x.response_content_type)?, - response_expires: try_from_aws(x.response_expires)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); - y = y.set_if_none_match(try_into_aws(x.if_none_match)?); - y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_part_number(try_into_aws(x.part_number)?); - y = y.set_range(try_into_aws(x.range)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); - y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); - y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); - y = y.set_response_content_language(try_into_aws(x.response_content_language)?); - y = y.set_response_content_type(try_into_aws(x.response_content_type)?); - y = y.set_response_expires(try_into_aws(x.response_expires)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_mode: try_from_aws(x.checksum_mode)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match: try_from_aws(x.if_match)?, +if_modified_since: try_from_aws(x.if_modified_since)?, +if_none_match: try_from_aws(x.if_none_match)?, +if_unmodified_since: try_from_aws(x.if_unmodified_since)?, +key: unwrap_from_aws(x.key, "key")?, +part_number: try_from_aws(x.part_number)?, +range: try_from_aws(x.range)?, +request_payer: try_from_aws(x.request_payer)?, +response_cache_control: try_from_aws(x.response_cache_control)?, +response_content_disposition: try_from_aws(x.response_content_disposition)?, +response_content_encoding: try_from_aws(x.response_content_encoding)?, +response_content_language: try_from_aws(x.response_content_language)?, +response_content_type: try_from_aws(x.response_content_type)?, +response_expires: try_from_aws(x.response_expires)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); +y = y.set_if_none_match(try_into_aws(x.if_none_match)?); +y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_part_number(try_into_aws(x.part_number)?); +y = y.set_range(try_into_aws(x.range)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); +y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); +y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); +y = y.set_response_content_language(try_into_aws(x.response_content_language)?); +y = y.set_response_content_type(try_into_aws(x.response_content_type)?); +y = y.set_response_expires(try_into_aws(x.response_expires)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::HeadObjectOutput { type Target = aws_sdk_s3::operation::head_object::HeadObjectOutput; - type Error = S3Error; - - #[allow(deprecated)] - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - accept_ranges: try_from_aws(x.accept_ranges)?, - archive_status: try_from_aws(x.archive_status)?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_length: try_from_aws(x.content_length)?, - content_range: try_from_aws(x.content_range)?, - content_type: try_from_aws(x.content_type)?, - delete_marker: try_from_aws(x.delete_marker)?, - e_tag: try_from_aws(x.e_tag)?, - expiration: try_from_aws(x.expiration)?, - expires: try_from_aws(x.expires)?, - last_modified: try_from_aws(x.last_modified)?, - metadata: try_from_aws(x.metadata)?, - missing_meta: try_from_aws(x.missing_meta)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - parts_count: try_from_aws(x.parts_count)?, - replication_status: try_from_aws(x.replication_status)?, - request_charged: try_from_aws(x.request_charged)?, - restore: try_from_aws(x.restore)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - version_id: try_from_aws(x.version_id)?, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - }) - } - - #[allow(deprecated)] - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); - y = y.set_archive_status(try_into_aws(x.archive_status)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_range(try_into_aws(x.content_range)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_missing_meta(try_into_aws(x.missing_meta)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_parts_count(try_into_aws(x.parts_count)?); - y = y.set_replication_status(try_into_aws(x.replication_status)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_restore(try_into_aws(x.restore)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - Ok(y.build()) - } +type Error = S3Error; + +#[allow(deprecated)] +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +accept_ranges: try_from_aws(x.accept_ranges)?, +archive_status: try_from_aws(x.archive_status)?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_length: try_from_aws(x.content_length)?, +content_range: try_from_aws(x.content_range)?, +content_type: try_from_aws(x.content_type)?, +delete_marker: try_from_aws(x.delete_marker)?, +e_tag: try_from_aws(x.e_tag)?, +expiration: try_from_aws(x.expiration)?, +expires: try_from_aws(x.expires)?, +last_modified: try_from_aws(x.last_modified)?, +metadata: try_from_aws(x.metadata)?, +missing_meta: try_from_aws(x.missing_meta)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +parts_count: try_from_aws(x.parts_count)?, +replication_status: try_from_aws(x.replication_status)?, +request_charged: try_from_aws(x.request_charged)?, +restore: try_from_aws(x.restore)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +version_id: try_from_aws(x.version_id)?, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +}) +} + +#[allow(deprecated)] +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); +y = y.set_archive_status(try_into_aws(x.archive_status)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_range(try_into_aws(x.content_range)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_missing_meta(try_into_aws(x.missing_meta)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_parts_count(try_into_aws(x.parts_count)?); +y = y.set_replication_status(try_into_aws(x.replication_status)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_restore(try_into_aws(x.restore)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::IndexDocument { type Target = aws_sdk_s3::types::IndexDocument; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - suffix: try_from_aws(x.suffix)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +suffix: try_from_aws(x.suffix)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_suffix(Some(try_into_aws(x.suffix)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_suffix(Some(try_into_aws(x.suffix)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::Initiator { type Target = aws_sdk_s3::types::Initiator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - display_name: try_from_aws(x.display_name)?, - id: try_from_aws(x.id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +display_name: try_from_aws(x.display_name)?, +id: try_from_aws(x.id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_display_name(try_into_aws(x.display_name)?); - y = y.set_id(try_into_aws(x.id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_display_name(try_into_aws(x.display_name)?); +y = y.set_id(try_into_aws(x.id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InputSerialization { type Target = aws_sdk_s3::types::InputSerialization; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - csv: try_from_aws(x.csv)?, - compression_type: try_from_aws(x.compression_type)?, - json: try_from_aws(x.json)?, - parquet: try_from_aws(x.parquet)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_csv(try_into_aws(x.csv)?); - y = y.set_compression_type(try_into_aws(x.compression_type)?); - y = y.set_json(try_into_aws(x.json)?); - y = y.set_parquet(try_into_aws(x.parquet)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +csv: try_from_aws(x.csv)?, +compression_type: try_from_aws(x.compression_type)?, +json: try_from_aws(x.json)?, +parquet: try_from_aws(x.parquet)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_csv(try_into_aws(x.csv)?); +y = y.set_compression_type(try_into_aws(x.compression_type)?); +y = y.set_json(try_into_aws(x.json)?); +y = y.set_parquet(try_into_aws(x.parquet)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::IntelligentTieringAccessTier { type Target = aws_sdk_s3::types::IntelligentTieringAccessTier; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::IntelligentTieringAccessTier::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), - aws_sdk_s3::types::IntelligentTieringAccessTier::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::IntelligentTieringAccessTier::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), +aws_sdk_s3::types::IntelligentTieringAccessTier::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::IntelligentTieringAccessTier::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::IntelligentTieringAccessTier::from(x.as_str())) +} } impl AwsConversion for s3s::dto::IntelligentTieringAndOperator { type Target = aws_sdk_s3::types::IntelligentTieringAndOperator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::IntelligentTieringConfiguration { type Target = aws_sdk_s3::types::IntelligentTieringConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - status: try_from_aws(x.status)?, - tierings: try_from_aws(x.tierings)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_status(Some(try_into_aws(x.status)?)); - y = y.set_tierings(Some(try_into_aws(x.tierings)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +status: try_from_aws(x.status)?, +tierings: try_from_aws(x.tierings)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_status(Some(try_into_aws(x.status)?)); +y = y.set_tierings(Some(try_into_aws(x.tierings)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::IntelligentTieringFilter { type Target = aws_sdk_s3::types::IntelligentTieringFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - and: try_from_aws(x.and)?, - prefix: try_from_aws(x.prefix)?, - tag: try_from_aws(x.tag)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +and: try_from_aws(x.and)?, +prefix: try_from_aws(x.prefix)?, +tag: try_from_aws(x.tag)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_and(try_into_aws(x.and)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tag(try_into_aws(x.tag)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_and(try_into_aws(x.and)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tag(try_into_aws(x.tag)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::IntelligentTieringStatus { type Target = aws_sdk_s3::types::IntelligentTieringStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::IntelligentTieringStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::IntelligentTieringStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::IntelligentTieringStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::IntelligentTieringStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::IntelligentTieringStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::IntelligentTieringStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InvalidObjectState { type Target = aws_sdk_s3::types::error::InvalidObjectState; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_tier: try_from_aws(x.access_tier)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_tier: try_from_aws(x.access_tier)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_tier(try_into_aws(x.access_tier)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_tier(try_into_aws(x.access_tier)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InvalidRequest { type Target = aws_sdk_s3::types::error::InvalidRequest; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InvalidWriteOffset { type Target = aws_sdk_s3::types::error::InvalidWriteOffset; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InventoryConfiguration { type Target = aws_sdk_s3::types::InventoryConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - destination: unwrap_from_aws(x.destination, "destination")?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - included_object_versions: try_from_aws(x.included_object_versions)?, - is_enabled: try_from_aws(x.is_enabled)?, - optional_fields: try_from_aws(x.optional_fields)?, - schedule: unwrap_from_aws(x.schedule, "schedule")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_destination(Some(try_into_aws(x.destination)?)); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_included_object_versions(Some(try_into_aws(x.included_object_versions)?)); - y = y.set_is_enabled(Some(try_into_aws(x.is_enabled)?)); - y = y.set_optional_fields(try_into_aws(x.optional_fields)?); - y = y.set_schedule(Some(try_into_aws(x.schedule)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +destination: unwrap_from_aws(x.destination, "destination")?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +included_object_versions: try_from_aws(x.included_object_versions)?, +is_enabled: try_from_aws(x.is_enabled)?, +optional_fields: try_from_aws(x.optional_fields)?, +schedule: unwrap_from_aws(x.schedule, "schedule")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_destination(Some(try_into_aws(x.destination)?)); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_included_object_versions(Some(try_into_aws(x.included_object_versions)?)); +y = y.set_is_enabled(Some(try_into_aws(x.is_enabled)?)); +y = y.set_optional_fields(try_into_aws(x.optional_fields)?); +y = y.set_schedule(Some(try_into_aws(x.schedule)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::InventoryDestination { type Target = aws_sdk_s3::types::InventoryDestination; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InventoryEncryption { type Target = aws_sdk_s3::types::InventoryEncryption; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - ssekms: try_from_aws(x.ssekms)?, - sses3: try_from_aws(x.sses3)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +ssekms: try_from_aws(x.ssekms)?, +sses3: try_from_aws(x.sses3)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_ssekms(try_into_aws(x.ssekms)?); - y = y.set_sses3(try_into_aws(x.sses3)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_ssekms(try_into_aws(x.ssekms)?); +y = y.set_sses3(try_into_aws(x.sses3)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InventoryFilter { type Target = aws_sdk_s3::types::InventoryFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(Some(try_into_aws(x.prefix)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(Some(try_into_aws(x.prefix)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::InventoryFormat { type Target = aws_sdk_s3::types::InventoryFormat; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::InventoryFormat::Csv => Self::from_static(Self::CSV), - aws_sdk_s3::types::InventoryFormat::Orc => Self::from_static(Self::ORC), - aws_sdk_s3::types::InventoryFormat::Parquet => Self::from_static(Self::PARQUET), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::InventoryFormat::Csv => Self::from_static(Self::CSV), +aws_sdk_s3::types::InventoryFormat::Orc => Self::from_static(Self::ORC), +aws_sdk_s3::types::InventoryFormat::Parquet => Self::from_static(Self::PARQUET), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::InventoryFormat::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::InventoryFormat::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InventoryFrequency { type Target = aws_sdk_s3::types::InventoryFrequency; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::InventoryFrequency::Daily => Self::from_static(Self::DAILY), - aws_sdk_s3::types::InventoryFrequency::Weekly => Self::from_static(Self::WEEKLY), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::InventoryFrequency::Daily => Self::from_static(Self::DAILY), +aws_sdk_s3::types::InventoryFrequency::Weekly => Self::from_static(Self::WEEKLY), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::InventoryFrequency::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::InventoryFrequency::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InventoryIncludedObjectVersions { type Target = aws_sdk_s3::types::InventoryIncludedObjectVersions; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::InventoryIncludedObjectVersions::All => Self::from_static(Self::ALL), - aws_sdk_s3::types::InventoryIncludedObjectVersions::Current => Self::from_static(Self::CURRENT), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::InventoryIncludedObjectVersions::All => Self::from_static(Self::ALL), +aws_sdk_s3::types::InventoryIncludedObjectVersions::Current => Self::from_static(Self::CURRENT), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::InventoryIncludedObjectVersions::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::InventoryIncludedObjectVersions::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InventoryOptionalField { type Target = aws_sdk_s3::types::InventoryOptionalField; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::InventoryOptionalField::BucketKeyStatus => Self::from_static(Self::BUCKET_KEY_STATUS), - aws_sdk_s3::types::InventoryOptionalField::ChecksumAlgorithm => Self::from_static(Self::CHECKSUM_ALGORITHM), - aws_sdk_s3::types::InventoryOptionalField::ETag => Self::from_static(Self::E_TAG), - aws_sdk_s3::types::InventoryOptionalField::EncryptionStatus => Self::from_static(Self::ENCRYPTION_STATUS), - aws_sdk_s3::types::InventoryOptionalField::IntelligentTieringAccessTier => { - Self::from_static(Self::INTELLIGENT_TIERING_ACCESS_TIER) - } - aws_sdk_s3::types::InventoryOptionalField::IsMultipartUploaded => Self::from_static(Self::IS_MULTIPART_UPLOADED), - aws_sdk_s3::types::InventoryOptionalField::LastModifiedDate => Self::from_static(Self::LAST_MODIFIED_DATE), - aws_sdk_s3::types::InventoryOptionalField::ObjectAccessControlList => { - Self::from_static(Self::OBJECT_ACCESS_CONTROL_LIST) - } - aws_sdk_s3::types::InventoryOptionalField::ObjectLockLegalHoldStatus => { - Self::from_static(Self::OBJECT_LOCK_LEGAL_HOLD_STATUS) - } - aws_sdk_s3::types::InventoryOptionalField::ObjectLockMode => Self::from_static(Self::OBJECT_LOCK_MODE), - aws_sdk_s3::types::InventoryOptionalField::ObjectLockRetainUntilDate => { - Self::from_static(Self::OBJECT_LOCK_RETAIN_UNTIL_DATE) - } - aws_sdk_s3::types::InventoryOptionalField::ObjectOwner => Self::from_static(Self::OBJECT_OWNER), - aws_sdk_s3::types::InventoryOptionalField::ReplicationStatus => Self::from_static(Self::REPLICATION_STATUS), - aws_sdk_s3::types::InventoryOptionalField::Size => Self::from_static(Self::SIZE), - aws_sdk_s3::types::InventoryOptionalField::StorageClass => Self::from_static(Self::STORAGE_CLASS), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::InventoryOptionalField::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::InventoryOptionalField::BucketKeyStatus => Self::from_static(Self::BUCKET_KEY_STATUS), +aws_sdk_s3::types::InventoryOptionalField::ChecksumAlgorithm => Self::from_static(Self::CHECKSUM_ALGORITHM), +aws_sdk_s3::types::InventoryOptionalField::ETag => Self::from_static(Self::E_TAG), +aws_sdk_s3::types::InventoryOptionalField::EncryptionStatus => Self::from_static(Self::ENCRYPTION_STATUS), +aws_sdk_s3::types::InventoryOptionalField::IntelligentTieringAccessTier => Self::from_static(Self::INTELLIGENT_TIERING_ACCESS_TIER), +aws_sdk_s3::types::InventoryOptionalField::IsMultipartUploaded => Self::from_static(Self::IS_MULTIPART_UPLOADED), +aws_sdk_s3::types::InventoryOptionalField::LastModifiedDate => Self::from_static(Self::LAST_MODIFIED_DATE), +aws_sdk_s3::types::InventoryOptionalField::ObjectAccessControlList => Self::from_static(Self::OBJECT_ACCESS_CONTROL_LIST), +aws_sdk_s3::types::InventoryOptionalField::ObjectLockLegalHoldStatus => Self::from_static(Self::OBJECT_LOCK_LEGAL_HOLD_STATUS), +aws_sdk_s3::types::InventoryOptionalField::ObjectLockMode => Self::from_static(Self::OBJECT_LOCK_MODE), +aws_sdk_s3::types::InventoryOptionalField::ObjectLockRetainUntilDate => Self::from_static(Self::OBJECT_LOCK_RETAIN_UNTIL_DATE), +aws_sdk_s3::types::InventoryOptionalField::ObjectOwner => Self::from_static(Self::OBJECT_OWNER), +aws_sdk_s3::types::InventoryOptionalField::ReplicationStatus => Self::from_static(Self::REPLICATION_STATUS), +aws_sdk_s3::types::InventoryOptionalField::Size => Self::from_static(Self::SIZE), +aws_sdk_s3::types::InventoryOptionalField::StorageClass => Self::from_static(Self::STORAGE_CLASS), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::InventoryOptionalField::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InventoryS3BucketDestination { type Target = aws_sdk_s3::types::InventoryS3BucketDestination; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - account_id: try_from_aws(x.account_id)?, - bucket: try_from_aws(x.bucket)?, - encryption: try_from_aws(x.encryption)?, - format: try_from_aws(x.format)?, - prefix: try_from_aws(x.prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_account_id(try_into_aws(x.account_id)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_encryption(try_into_aws(x.encryption)?); - y = y.set_format(Some(try_into_aws(x.format)?)); - y = y.set_prefix(try_into_aws(x.prefix)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +account_id: try_from_aws(x.account_id)?, +bucket: try_from_aws(x.bucket)?, +encryption: try_from_aws(x.encryption)?, +format: try_from_aws(x.format)?, +prefix: try_from_aws(x.prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_account_id(try_into_aws(x.account_id)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_encryption(try_into_aws(x.encryption)?); +y = y.set_format(Some(try_into_aws(x.format)?)); +y = y.set_prefix(try_into_aws(x.prefix)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::InventorySchedule { type Target = aws_sdk_s3::types::InventorySchedule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - frequency: try_from_aws(x.frequency)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +frequency: try_from_aws(x.frequency)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_frequency(Some(try_into_aws(x.frequency)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_frequency(Some(try_into_aws(x.frequency)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::JSONInput { type Target = aws_sdk_s3::types::JsonInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - type_: try_from_aws(x.r#type)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +type_: try_from_aws(x.r#type)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_type(try_into_aws(x.type_)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_type(try_into_aws(x.type_)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::JSONOutput { type Target = aws_sdk_s3::types::JsonOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - record_delimiter: try_from_aws(x.record_delimiter)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +record_delimiter: try_from_aws(x.record_delimiter)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::JSONType { type Target = aws_sdk_s3::types::JsonType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::JsonType::Document => Self::from_static(Self::DOCUMENT), - aws_sdk_s3::types::JsonType::Lines => Self::from_static(Self::LINES), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::JsonType::Document => Self::from_static(Self::DOCUMENT), +aws_sdk_s3::types::JsonType::Lines => Self::from_static(Self::LINES), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::JsonType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::JsonType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::LambdaFunctionConfiguration { type Target = aws_sdk_s3::types::LambdaFunctionConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - events: try_from_aws(x.events)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - lambda_function_arn: try_from_aws(x.lambda_function_arn)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_events(Some(try_into_aws(x.events)?)); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_lambda_function_arn(Some(try_into_aws(x.lambda_function_arn)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +events: try_from_aws(x.events)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +lambda_function_arn: try_from_aws(x.lambda_function_arn)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_events(Some(try_into_aws(x.events)?)); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_lambda_function_arn(Some(try_into_aws(x.lambda_function_arn)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::LifecycleExpiration { type Target = aws_sdk_s3::types::LifecycleExpiration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - date: try_from_aws(x.date)?, - days: try_from_aws(x.days)?, - expired_object_delete_marker: try_from_aws(x.expired_object_delete_marker)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +date: try_from_aws(x.date)?, +days: try_from_aws(x.days)?, +expired_object_all_versions: None, +expired_object_delete_marker: try_from_aws(x.expired_object_delete_marker)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_date(try_into_aws(x.date)?); - y = y.set_days(try_into_aws(x.days)?); - y = y.set_expired_object_delete_marker(try_into_aws(x.expired_object_delete_marker)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_date(try_into_aws(x.date)?); +y = y.set_days(try_into_aws(x.days)?); +y = y.set_expired_object_delete_marker(try_into_aws(x.expired_object_delete_marker)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::LifecycleRule { type Target = aws_sdk_s3::types::LifecycleRule; - type Error = S3Error; - - #[allow(deprecated)] - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - abort_incomplete_multipart_upload: try_from_aws(x.abort_incomplete_multipart_upload)?, - expiration: try_from_aws(x.expiration)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - noncurrent_version_expiration: try_from_aws(x.noncurrent_version_expiration)?, - noncurrent_version_transitions: try_from_aws(x.noncurrent_version_transitions)?, - prefix: try_from_aws(x.prefix)?, - status: try_from_aws(x.status)?, - transitions: try_from_aws(x.transitions)?, - }) - } - - #[allow(deprecated)] - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_abort_incomplete_multipart_upload(try_into_aws(x.abort_incomplete_multipart_upload)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_noncurrent_version_expiration(try_into_aws(x.noncurrent_version_expiration)?); - y = y.set_noncurrent_version_transitions(try_into_aws(x.noncurrent_version_transitions)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_status(Some(try_into_aws(x.status)?)); - y = y.set_transitions(try_into_aws(x.transitions)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +#[allow(deprecated)] +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +abort_incomplete_multipart_upload: try_from_aws(x.abort_incomplete_multipart_upload)?, +del_marker_expiration: None, +expiration: try_from_aws(x.expiration)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +noncurrent_version_expiration: try_from_aws(x.noncurrent_version_expiration)?, +noncurrent_version_transitions: try_from_aws(x.noncurrent_version_transitions)?, +prefix: try_from_aws(x.prefix)?, +status: try_from_aws(x.status)?, +transitions: try_from_aws(x.transitions)?, +}) +} + +#[allow(deprecated)] +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_abort_incomplete_multipart_upload(try_into_aws(x.abort_incomplete_multipart_upload)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_noncurrent_version_expiration(try_into_aws(x.noncurrent_version_expiration)?); +y = y.set_noncurrent_version_transitions(try_into_aws(x.noncurrent_version_transitions)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_status(Some(try_into_aws(x.status)?)); +y = y.set_transitions(try_into_aws(x.transitions)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::LifecycleRuleAndOperator { type Target = aws_sdk_s3::types::LifecycleRuleAndOperator; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - object_size_greater_than: try_from_aws(x.object_size_greater_than)?, - object_size_less_than: try_from_aws(x.object_size_less_than)?, - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); - y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +object_size_greater_than: try_from_aws(x.object_size_greater_than)?, +object_size_less_than: try_from_aws(x.object_size_less_than)?, +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); +y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::LifecycleRuleFilter { type Target = aws_sdk_s3::types::LifecycleRuleFilter; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - and: try_from_aws(x.and)?, - cached_tags: s3s::dto::CachedTags::default(), - object_size_greater_than: try_from_aws(x.object_size_greater_than)?, - object_size_less_than: try_from_aws(x.object_size_less_than)?, - prefix: try_from_aws(x.prefix)?, - tag: try_from_aws(x.tag)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_and(try_into_aws(x.and)?); - y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); - y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tag(try_into_aws(x.tag)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +and: try_from_aws(x.and)?, +cached_tags: s3s::dto::CachedTags::default(), +object_size_greater_than: try_from_aws(x.object_size_greater_than)?, +object_size_less_than: try_from_aws(x.object_size_less_than)?, +prefix: try_from_aws(x.prefix)?, +tag: try_from_aws(x.tag)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_and(try_into_aws(x.and)?); +y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); +y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tag(try_into_aws(x.tag)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketAnalyticsConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_analytics_configurations::ListBucketAnalyticsConfigurationsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketAnalyticsConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_analytics_configurations::ListBucketAnalyticsConfigurationsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - analytics_configuration_list: try_from_aws(x.analytics_configuration_list)?, - continuation_token: try_from_aws(x.continuation_token)?, - is_truncated: try_from_aws(x.is_truncated)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_analytics_configuration_list(try_into_aws(x.analytics_configuration_list)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +analytics_configuration_list: try_from_aws(x.analytics_configuration_list)?, +continuation_token: try_from_aws(x.continuation_token)?, +is_truncated: try_from_aws(x.is_truncated)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_analytics_configuration_list(try_into_aws(x.analytics_configuration_list)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketIntelligentTieringConfigurationsInput { - type Target = - aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsInput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsInput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketIntelligentTieringConfigurationsOutput { - type Target = - aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - continuation_token: try_from_aws(x.continuation_token)?, - intelligent_tiering_configuration_list: try_from_aws(x.intelligent_tiering_configuration_list)?, - is_truncated: try_from_aws(x.is_truncated)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_intelligent_tiering_configuration_list(try_into_aws(x.intelligent_tiering_configuration_list)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - Ok(y.build()) - } + type Target = aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput; +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +continuation_token: try_from_aws(x.continuation_token)?, +intelligent_tiering_configuration_list: try_from_aws(x.intelligent_tiering_configuration_list)?, +is_truncated: try_from_aws(x.is_truncated)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_intelligent_tiering_configuration_list(try_into_aws(x.intelligent_tiering_configuration_list)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketInventoryConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketInventoryConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - continuation_token: try_from_aws(x.continuation_token)?, - inventory_configuration_list: try_from_aws(x.inventory_configuration_list)?, - is_truncated: try_from_aws(x.is_truncated)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_inventory_configuration_list(try_into_aws(x.inventory_configuration_list)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +continuation_token: try_from_aws(x.continuation_token)?, +inventory_configuration_list: try_from_aws(x.inventory_configuration_list)?, +is_truncated: try_from_aws(x.is_truncated)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_inventory_configuration_list(try_into_aws(x.inventory_configuration_list)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketMetricsConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketMetricsConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - continuation_token: try_from_aws(x.continuation_token)?, - is_truncated: try_from_aws(x.is_truncated)?, - metrics_configuration_list: try_from_aws(x.metrics_configuration_list)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_metrics_configuration_list(try_into_aws(x.metrics_configuration_list)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +continuation_token: try_from_aws(x.continuation_token)?, +is_truncated: try_from_aws(x.is_truncated)?, +metrics_configuration_list: try_from_aws(x.metrics_configuration_list)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_metrics_configuration_list(try_into_aws(x.metrics_configuration_list)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketsInput { type Target = aws_sdk_s3::operation::list_buckets::ListBucketsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_region: try_from_aws(x.bucket_region)?, - continuation_token: try_from_aws(x.continuation_token)?, - max_buckets: try_from_aws(x.max_buckets)?, - prefix: try_from_aws(x.prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_region(try_into_aws(x.bucket_region)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_max_buckets(try_into_aws(x.max_buckets)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_region: try_from_aws(x.bucket_region)?, +continuation_token: try_from_aws(x.continuation_token)?, +max_buckets: try_from_aws(x.max_buckets)?, +prefix: try_from_aws(x.prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_region(try_into_aws(x.bucket_region)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_max_buckets(try_into_aws(x.max_buckets)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketsOutput { type Target = aws_sdk_s3::operation::list_buckets::ListBucketsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - buckets: try_from_aws(x.buckets)?, - continuation_token: try_from_aws(x.continuation_token)?, - owner: try_from_aws(x.owner)?, - prefix: try_from_aws(x.prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_buckets(try_into_aws(x.buckets)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +buckets: try_from_aws(x.buckets)?, +continuation_token: try_from_aws(x.continuation_token)?, +owner: try_from_aws(x.owner)?, +prefix: try_from_aws(x.prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_buckets(try_into_aws(x.buckets)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListDirectoryBucketsInput { type Target = aws_sdk_s3::operation::list_directory_buckets::ListDirectoryBucketsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - continuation_token: try_from_aws(x.continuation_token)?, - max_directory_buckets: try_from_aws(x.max_directory_buckets)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +continuation_token: try_from_aws(x.continuation_token)?, +max_directory_buckets: try_from_aws(x.max_directory_buckets)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_max_directory_buckets(try_into_aws(x.max_directory_buckets)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_max_directory_buckets(try_into_aws(x.max_directory_buckets)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListDirectoryBucketsOutput { type Target = aws_sdk_s3::operation::list_directory_buckets::ListDirectoryBucketsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - buckets: try_from_aws(x.buckets)?, - continuation_token: try_from_aws(x.continuation_token)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +buckets: try_from_aws(x.buckets)?, +continuation_token: try_from_aws(x.continuation_token)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_buckets(try_into_aws(x.buckets)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_buckets(try_into_aws(x.buckets)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListMultipartUploadsInput { type Target = aws_sdk_s3::operation::list_multipart_uploads::ListMultipartUploadsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key_marker: try_from_aws(x.key_marker)?, - max_uploads: try_from_aws(x.max_uploads)?, - prefix: try_from_aws(x.prefix)?, - request_payer: try_from_aws(x.request_payer)?, - upload_id_marker: try_from_aws(x.upload_id_marker)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key_marker(try_into_aws(x.key_marker)?); - y = y.set_max_uploads(try_into_aws(x.max_uploads)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key_marker: try_from_aws(x.key_marker)?, +max_uploads: try_from_aws(x.max_uploads)?, +prefix: try_from_aws(x.prefix)?, +request_payer: try_from_aws(x.request_payer)?, +upload_id_marker: try_from_aws(x.upload_id_marker)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key_marker(try_into_aws(x.key_marker)?); +y = y.set_max_uploads(try_into_aws(x.max_uploads)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListMultipartUploadsOutput { type Target = aws_sdk_s3::operation::list_multipart_uploads::ListMultipartUploadsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: try_from_aws(x.bucket)?, - common_prefixes: try_from_aws(x.common_prefixes)?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - is_truncated: try_from_aws(x.is_truncated)?, - key_marker: try_from_aws(x.key_marker)?, - max_uploads: try_from_aws(x.max_uploads)?, - next_key_marker: try_from_aws(x.next_key_marker)?, - next_upload_id_marker: try_from_aws(x.next_upload_id_marker)?, - prefix: try_from_aws(x.prefix)?, - request_charged: try_from_aws(x.request_charged)?, - upload_id_marker: try_from_aws(x.upload_id_marker)?, - uploads: try_from_aws(x.uploads)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_key_marker(try_into_aws(x.key_marker)?); - y = y.set_max_uploads(try_into_aws(x.max_uploads)?); - y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); - y = y.set_next_upload_id_marker(try_into_aws(x.next_upload_id_marker)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); - y = y.set_uploads(try_into_aws(x.uploads)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: try_from_aws(x.bucket)?, +common_prefixes: try_from_aws(x.common_prefixes)?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +is_truncated: try_from_aws(x.is_truncated)?, +key_marker: try_from_aws(x.key_marker)?, +max_uploads: try_from_aws(x.max_uploads)?, +next_key_marker: try_from_aws(x.next_key_marker)?, +next_upload_id_marker: try_from_aws(x.next_upload_id_marker)?, +prefix: try_from_aws(x.prefix)?, +request_charged: try_from_aws(x.request_charged)?, +upload_id_marker: try_from_aws(x.upload_id_marker)?, +uploads: try_from_aws(x.uploads)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_key_marker(try_into_aws(x.key_marker)?); +y = y.set_max_uploads(try_into_aws(x.max_uploads)?); +y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); +y = y.set_next_upload_id_marker(try_into_aws(x.next_upload_id_marker)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); +y = y.set_uploads(try_into_aws(x.uploads)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListObjectVersionsInput { type Target = aws_sdk_s3::operation::list_object_versions::ListObjectVersionsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key_marker: try_from_aws(x.key_marker)?, - max_keys: try_from_aws(x.max_keys)?, - optional_object_attributes: try_from_aws(x.optional_object_attributes)?, - prefix: try_from_aws(x.prefix)?, - request_payer: try_from_aws(x.request_payer)?, - version_id_marker: try_from_aws(x.version_id_marker)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key_marker(try_into_aws(x.key_marker)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key_marker: try_from_aws(x.key_marker)?, +max_keys: try_from_aws(x.max_keys)?, +optional_object_attributes: try_from_aws(x.optional_object_attributes)?, +prefix: try_from_aws(x.prefix)?, +request_payer: try_from_aws(x.request_payer)?, +version_id_marker: try_from_aws(x.version_id_marker)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key_marker(try_into_aws(x.key_marker)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListObjectVersionsOutput { type Target = aws_sdk_s3::operation::list_object_versions::ListObjectVersionsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - common_prefixes: try_from_aws(x.common_prefixes)?, - delete_markers: try_from_aws(x.delete_markers)?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - is_truncated: try_from_aws(x.is_truncated)?, - key_marker: try_from_aws(x.key_marker)?, - max_keys: try_from_aws(x.max_keys)?, - name: try_from_aws(x.name)?, - next_key_marker: try_from_aws(x.next_key_marker)?, - next_version_id_marker: try_from_aws(x.next_version_id_marker)?, - prefix: try_from_aws(x.prefix)?, - request_charged: try_from_aws(x.request_charged)?, - version_id_marker: try_from_aws(x.version_id_marker)?, - versions: try_from_aws(x.versions)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); - y = y.set_delete_markers(try_into_aws(x.delete_markers)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_key_marker(try_into_aws(x.key_marker)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); - y = y.set_next_version_id_marker(try_into_aws(x.next_version_id_marker)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); - y = y.set_versions(try_into_aws(x.versions)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +common_prefixes: try_from_aws(x.common_prefixes)?, +delete_markers: try_from_aws(x.delete_markers)?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +is_truncated: try_from_aws(x.is_truncated)?, +key_marker: try_from_aws(x.key_marker)?, +max_keys: try_from_aws(x.max_keys)?, +name: try_from_aws(x.name)?, +next_key_marker: try_from_aws(x.next_key_marker)?, +next_version_id_marker: try_from_aws(x.next_version_id_marker)?, +prefix: try_from_aws(x.prefix)?, +request_charged: try_from_aws(x.request_charged)?, +version_id_marker: try_from_aws(x.version_id_marker)?, +versions: try_from_aws(x.versions)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); +y = y.set_delete_markers(try_into_aws(x.delete_markers)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_key_marker(try_into_aws(x.key_marker)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); +y = y.set_next_version_id_marker(try_into_aws(x.next_version_id_marker)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); +y = y.set_versions(try_into_aws(x.versions)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListObjectsInput { type Target = aws_sdk_s3::operation::list_objects::ListObjectsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - marker: try_from_aws(x.marker)?, - max_keys: try_from_aws(x.max_keys)?, - optional_object_attributes: try_from_aws(x.optional_object_attributes)?, - prefix: try_from_aws(x.prefix)?, - request_payer: try_from_aws(x.request_payer)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_marker(try_into_aws(x.marker)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +marker: try_from_aws(x.marker)?, +max_keys: try_from_aws(x.max_keys)?, +optional_object_attributes: try_from_aws(x.optional_object_attributes)?, +prefix: try_from_aws(x.prefix)?, +request_payer: try_from_aws(x.request_payer)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_marker(try_into_aws(x.marker)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListObjectsOutput { type Target = aws_sdk_s3::operation::list_objects::ListObjectsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - prefix: try_from_aws(x.prefix)?, - marker: try_from_aws(x.marker)?, - max_keys: try_from_aws(x.max_keys)?, - is_truncated: try_from_aws(x.is_truncated)?, - contents: try_from_aws(x.contents)?, - common_prefixes: try_from_aws(x.common_prefixes)?, - delimiter: try_from_aws(x.delimiter)?, - next_marker: try_from_aws(x.next_marker)?, - encoding_type: try_from_aws(x.encoding_type)?, - request_charged: try_from_aws(x.request_charged)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_marker(try_into_aws(x.marker)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_contents(try_into_aws(x.contents)?); - y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_next_marker(try_into_aws(x.next_marker)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +prefix: try_from_aws(x.prefix)?, +marker: try_from_aws(x.marker)?, +max_keys: try_from_aws(x.max_keys)?, +is_truncated: try_from_aws(x.is_truncated)?, +contents: try_from_aws(x.contents)?, +common_prefixes: try_from_aws(x.common_prefixes)?, +delimiter: try_from_aws(x.delimiter)?, +next_marker: try_from_aws(x.next_marker)?, +encoding_type: try_from_aws(x.encoding_type)?, +request_charged: try_from_aws(x.request_charged)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_marker(try_into_aws(x.marker)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_contents(try_into_aws(x.contents)?); +y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_next_marker(try_into_aws(x.next_marker)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListObjectsV2Input { type Target = aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Input; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - fetch_owner: try_from_aws(x.fetch_owner)?, - max_keys: try_from_aws(x.max_keys)?, - optional_object_attributes: try_from_aws(x.optional_object_attributes)?, - prefix: try_from_aws(x.prefix)?, - request_payer: try_from_aws(x.request_payer)?, - start_after: try_from_aws(x.start_after)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_start_after(try_into_aws(x.start_after)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +fetch_owner: try_from_aws(x.fetch_owner)?, +max_keys: try_from_aws(x.max_keys)?, +optional_object_attributes: try_from_aws(x.optional_object_attributes)?, +prefix: try_from_aws(x.prefix)?, +request_payer: try_from_aws(x.request_payer)?, +start_after: try_from_aws(x.start_after)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_start_after(try_into_aws(x.start_after)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListObjectsV2Output { type Target = aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Output; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - prefix: try_from_aws(x.prefix)?, - max_keys: try_from_aws(x.max_keys)?, - key_count: try_from_aws(x.key_count)?, - continuation_token: try_from_aws(x.continuation_token)?, - is_truncated: try_from_aws(x.is_truncated)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - contents: try_from_aws(x.contents)?, - common_prefixes: try_from_aws(x.common_prefixes)?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - start_after: try_from_aws(x.start_after)?, - request_charged: try_from_aws(x.request_charged)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_key_count(try_into_aws(x.key_count)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - y = y.set_contents(try_into_aws(x.contents)?); - y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_start_after(try_into_aws(x.start_after)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +prefix: try_from_aws(x.prefix)?, +max_keys: try_from_aws(x.max_keys)?, +key_count: try_from_aws(x.key_count)?, +continuation_token: try_from_aws(x.continuation_token)?, +is_truncated: try_from_aws(x.is_truncated)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +contents: try_from_aws(x.contents)?, +common_prefixes: try_from_aws(x.common_prefixes)?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +start_after: try_from_aws(x.start_after)?, +request_charged: try_from_aws(x.request_charged)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_key_count(try_into_aws(x.key_count)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +y = y.set_contents(try_into_aws(x.contents)?); +y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_start_after(try_into_aws(x.start_after)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListPartsInput { type Target = aws_sdk_s3::operation::list_parts::ListPartsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - max_parts: try_from_aws(x.max_parts)?, - part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_max_parts(try_into_aws(x.max_parts)?); - y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +max_parts: try_from_aws(x.max_parts)?, +part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_max_parts(try_into_aws(x.max_parts)?); +y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListPartsOutput { type Target = aws_sdk_s3::operation::list_parts::ListPartsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - abort_date: try_from_aws(x.abort_date)?, - abort_rule_id: try_from_aws(x.abort_rule_id)?, - bucket: try_from_aws(x.bucket)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - initiator: try_from_aws(x.initiator)?, - is_truncated: try_from_aws(x.is_truncated)?, - key: try_from_aws(x.key)?, - max_parts: try_from_aws(x.max_parts)?, - next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, - owner: try_from_aws(x.owner)?, - part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, - parts: try_from_aws(x.parts)?, - request_charged: try_from_aws(x.request_charged)?, - storage_class: try_from_aws(x.storage_class)?, - upload_id: try_from_aws(x.upload_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_abort_date(try_into_aws(x.abort_date)?); - y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_initiator(try_into_aws(x.initiator)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_max_parts(try_into_aws(x.max_parts)?); - y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); - y = y.set_parts(try_into_aws(x.parts)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_upload_id(try_into_aws(x.upload_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +abort_date: try_from_aws(x.abort_date)?, +abort_rule_id: try_from_aws(x.abort_rule_id)?, +bucket: try_from_aws(x.bucket)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +initiator: try_from_aws(x.initiator)?, +is_truncated: try_from_aws(x.is_truncated)?, +key: try_from_aws(x.key)?, +max_parts: try_from_aws(x.max_parts)?, +next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, +owner: try_from_aws(x.owner)?, +part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, +parts: try_from_aws(x.parts)?, +request_charged: try_from_aws(x.request_charged)?, +storage_class: try_from_aws(x.storage_class)?, +upload_id: try_from_aws(x.upload_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_abort_date(try_into_aws(x.abort_date)?); +y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_initiator(try_into_aws(x.initiator)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_max_parts(try_into_aws(x.max_parts)?); +y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); +y = y.set_parts(try_into_aws(x.parts)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_upload_id(try_into_aws(x.upload_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::LocationInfo { type Target = aws_sdk_s3::types::LocationInfo; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - type_: try_from_aws(x.r#type)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +type_: try_from_aws(x.r#type)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_type(try_into_aws(x.type_)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_type(try_into_aws(x.type_)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::LocationType { type Target = aws_sdk_s3::types::LocationType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::LocationType::AvailabilityZone => Self::from_static(Self::AVAILABILITY_ZONE), - aws_sdk_s3::types::LocationType::LocalZone => Self::from_static(Self::LOCAL_ZONE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::LocationType::AvailabilityZone => Self::from_static(Self::AVAILABILITY_ZONE), +aws_sdk_s3::types::LocationType::LocalZone => Self::from_static(Self::LOCAL_ZONE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::LocationType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::LocationType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::LoggingEnabled { type Target = aws_sdk_s3::types::LoggingEnabled; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - target_bucket: try_from_aws(x.target_bucket)?, - target_grants: try_from_aws(x.target_grants)?, - target_object_key_format: try_from_aws(x.target_object_key_format)?, - target_prefix: try_from_aws(x.target_prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_target_bucket(Some(try_into_aws(x.target_bucket)?)); - y = y.set_target_grants(try_into_aws(x.target_grants)?); - y = y.set_target_object_key_format(try_into_aws(x.target_object_key_format)?); - y = y.set_target_prefix(Some(try_into_aws(x.target_prefix)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +target_bucket: try_from_aws(x.target_bucket)?, +target_grants: try_from_aws(x.target_grants)?, +target_object_key_format: try_from_aws(x.target_object_key_format)?, +target_prefix: try_from_aws(x.target_prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_target_bucket(Some(try_into_aws(x.target_bucket)?)); +y = y.set_target_grants(try_into_aws(x.target_grants)?); +y = y.set_target_object_key_format(try_into_aws(x.target_object_key_format)?); +y = y.set_target_prefix(Some(try_into_aws(x.target_prefix)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::MFADelete { type Target = aws_sdk_s3::types::MfaDelete; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MfaDelete::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::MfaDelete::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MfaDelete::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::MfaDelete::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::MfaDelete::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::MfaDelete::from(x.as_str())) +} } impl AwsConversion for s3s::dto::MFADeleteStatus { type Target = aws_sdk_s3::types::MfaDeleteStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MfaDeleteStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::MfaDeleteStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MfaDeleteStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::MfaDeleteStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::MfaDeleteStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::MfaDeleteStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::MetadataDirective { type Target = aws_sdk_s3::types::MetadataDirective; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MetadataDirective::Copy => Self::from_static(Self::COPY), - aws_sdk_s3::types::MetadataDirective::Replace => Self::from_static(Self::REPLACE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MetadataDirective::Copy => Self::from_static(Self::COPY), +aws_sdk_s3::types::MetadataDirective::Replace => Self::from_static(Self::REPLACE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::MetadataDirective::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::MetadataDirective::from(x.as_str())) +} } impl AwsConversion for s3s::dto::MetadataEntry { type Target = aws_sdk_s3::types::MetadataEntry; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - value: try_from_aws(x.value)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +value: try_from_aws(x.value)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_value(try_into_aws(x.value)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_value(try_into_aws(x.value)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::MetadataTableConfiguration { type Target = aws_sdk_s3::types::MetadataTableConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - s3_tables_destination: unwrap_from_aws(x.s3_tables_destination, "s3_tables_destination")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3_tables_destination: unwrap_from_aws(x.s3_tables_destination, "s3_tables_destination")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3_tables_destination(Some(try_into_aws(x.s3_tables_destination)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3_tables_destination(Some(try_into_aws(x.s3_tables_destination)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::MetadataTableConfigurationResult { type Target = aws_sdk_s3::types::MetadataTableConfigurationResult; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - s3_tables_destination_result: unwrap_from_aws(x.s3_tables_destination_result, "s3_tables_destination_result")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3_tables_destination_result: unwrap_from_aws(x.s3_tables_destination_result, "s3_tables_destination_result")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3_tables_destination_result(Some(try_into_aws(x.s3_tables_destination_result)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3_tables_destination_result(Some(try_into_aws(x.s3_tables_destination_result)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Metrics { type Target = aws_sdk_s3::types::Metrics; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - event_threshold: try_from_aws(x.event_threshold)?, - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +event_threshold: try_from_aws(x.event_threshold)?, +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_event_threshold(try_into_aws(x.event_threshold)?); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_event_threshold(try_into_aws(x.event_threshold)?); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::MetricsAndOperator { type Target = aws_sdk_s3::types::MetricsAndOperator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_point_arn: try_from_aws(x.access_point_arn)?, - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_point_arn: try_from_aws(x.access_point_arn)?, +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_point_arn(try_into_aws(x.access_point_arn)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_point_arn(try_into_aws(x.access_point_arn)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::MetricsConfiguration { type Target = aws_sdk_s3::types::MetricsConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::MetricsFilter { type Target = aws_sdk_s3::types::MetricsFilter; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MetricsFilter::AccessPointArn(v) => Self::AccessPointArn(try_from_aws(v)?), - aws_sdk_s3::types::MetricsFilter::And(v) => Self::And(try_from_aws(v)?), - aws_sdk_s3::types::MetricsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), - aws_sdk_s3::types::MetricsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), - _ => unimplemented!("unknown variant of aws_sdk_s3::types::MetricsFilter: {x:?}"), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(match x { - Self::AccessPointArn(v) => aws_sdk_s3::types::MetricsFilter::AccessPointArn(try_into_aws(v)?), - Self::And(v) => aws_sdk_s3::types::MetricsFilter::And(try_into_aws(v)?), - Self::Prefix(v) => aws_sdk_s3::types::MetricsFilter::Prefix(try_into_aws(v)?), - Self::Tag(v) => aws_sdk_s3::types::MetricsFilter::Tag(try_into_aws(v)?), - _ => unimplemented!("unknown variant of MetricsFilter: {x:?}"), - }) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MetricsFilter::AccessPointArn(v) => Self::AccessPointArn(try_from_aws(v)?), +aws_sdk_s3::types::MetricsFilter::And(v) => Self::And(try_from_aws(v)?), +aws_sdk_s3::types::MetricsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), +aws_sdk_s3::types::MetricsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), +_ => unimplemented!("unknown variant of aws_sdk_s3::types::MetricsFilter: {x:?}"), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(match x { +Self::AccessPointArn(v) => aws_sdk_s3::types::MetricsFilter::AccessPointArn(try_into_aws(v)?), +Self::And(v) => aws_sdk_s3::types::MetricsFilter::And(try_into_aws(v)?), +Self::Prefix(v) => aws_sdk_s3::types::MetricsFilter::Prefix(try_into_aws(v)?), +Self::Tag(v) => aws_sdk_s3::types::MetricsFilter::Tag(try_into_aws(v)?), +_ => unimplemented!("unknown variant of MetricsFilter: {x:?}"), +}) +} } impl AwsConversion for s3s::dto::MetricsStatus { type Target = aws_sdk_s3::types::MetricsStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MetricsStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::MetricsStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MetricsStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::MetricsStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::MetricsStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::MetricsStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::MultipartUpload { type Target = aws_sdk_s3::types::MultipartUpload; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - initiated: try_from_aws(x.initiated)?, - initiator: try_from_aws(x.initiator)?, - key: try_from_aws(x.key)?, - owner: try_from_aws(x.owner)?, - storage_class: try_from_aws(x.storage_class)?, - upload_id: try_from_aws(x.upload_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_initiated(try_into_aws(x.initiated)?); - y = y.set_initiator(try_into_aws(x.initiator)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_upload_id(try_into_aws(x.upload_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +initiated: try_from_aws(x.initiated)?, +initiator: try_from_aws(x.initiator)?, +key: try_from_aws(x.key)?, +owner: try_from_aws(x.owner)?, +storage_class: try_from_aws(x.storage_class)?, +upload_id: try_from_aws(x.upload_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_initiated(try_into_aws(x.initiated)?); +y = y.set_initiator(try_into_aws(x.initiator)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_upload_id(try_into_aws(x.upload_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoSuchBucket { type Target = aws_sdk_s3::types::error::NoSuchBucket; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoSuchKey { type Target = aws_sdk_s3::types::error::NoSuchKey; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoSuchUpload { type Target = aws_sdk_s3::types::error::NoSuchUpload; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoncurrentVersionExpiration { type Target = aws_sdk_s3::types::NoncurrentVersionExpiration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, - noncurrent_days: try_from_aws(x.noncurrent_days)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, +noncurrent_days: try_from_aws(x.noncurrent_days)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); - y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); +y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoncurrentVersionTransition { type Target = aws_sdk_s3::types::NoncurrentVersionTransition; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, - noncurrent_days: try_from_aws(x.noncurrent_days)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, +noncurrent_days: try_from_aws(x.noncurrent_days)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); - y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); +y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NotFound { type Target = aws_sdk_s3::types::error::NotFound; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NotificationConfiguration { type Target = aws_sdk_s3::types::NotificationConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, - lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, - queue_configurations: try_from_aws(x.queue_configurations)?, - topic_configurations: try_from_aws(x.topic_configurations)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); - y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); - y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); - y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, +lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, +queue_configurations: try_from_aws(x.queue_configurations)?, +topic_configurations: try_from_aws(x.topic_configurations)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); +y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); +y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); +y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NotificationConfigurationFilter { type Target = aws_sdk_s3::types::NotificationConfigurationFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - key: try_from_aws(x.key)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +key: try_from_aws(x.key)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_key(try_into_aws(x.key)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_key(try_into_aws(x.key)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Object { type Target = aws_sdk_s3::types::Object; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - key: try_from_aws(x.key)?, - last_modified: try_from_aws(x.last_modified)?, - owner: try_from_aws(x.owner)?, - restore_status: try_from_aws(x.restore_status)?, - size: try_from_aws(x.size)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_restore_status(try_into_aws(x.restore_status)?); - y = y.set_size(try_into_aws(x.size)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +key: try_from_aws(x.key)?, +last_modified: try_from_aws(x.last_modified)?, +owner: try_from_aws(x.owner)?, +restore_status: try_from_aws(x.restore_status)?, +size: try_from_aws(x.size)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_restore_status(try_into_aws(x.restore_status)?); +y = y.set_size(try_into_aws(x.size)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectAlreadyInActiveTierError { type Target = aws_sdk_s3::types::error::ObjectAlreadyInActiveTierError; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectAttributes { type Target = aws_sdk_s3::types::ObjectAttributes; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectAttributes::Checksum => Self::from_static(Self::CHECKSUM), - aws_sdk_s3::types::ObjectAttributes::Etag => Self::from_static(Self::ETAG), - aws_sdk_s3::types::ObjectAttributes::ObjectParts => Self::from_static(Self::OBJECT_PARTS), - aws_sdk_s3::types::ObjectAttributes::ObjectSize => Self::from_static(Self::OBJECT_SIZE), - aws_sdk_s3::types::ObjectAttributes::StorageClass => Self::from_static(Self::STORAGE_CLASS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectAttributes::Checksum => Self::from_static(Self::CHECKSUM), +aws_sdk_s3::types::ObjectAttributes::Etag => Self::from_static(Self::ETAG), +aws_sdk_s3::types::ObjectAttributes::ObjectParts => Self::from_static(Self::OBJECT_PARTS), +aws_sdk_s3::types::ObjectAttributes::ObjectSize => Self::from_static(Self::OBJECT_SIZE), +aws_sdk_s3::types::ObjectAttributes::StorageClass => Self::from_static(Self::STORAGE_CLASS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectAttributes::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectAttributes::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectCannedACL { type Target = aws_sdk_s3::types::ObjectCannedAcl; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), - aws_sdk_s3::types::ObjectCannedAcl::AwsExecRead => Self::from_static(Self::AWS_EXEC_READ), - aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerFullControl => Self::from_static(Self::BUCKET_OWNER_FULL_CONTROL), - aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerRead => Self::from_static(Self::BUCKET_OWNER_READ), - aws_sdk_s3::types::ObjectCannedAcl::Private => Self::from_static(Self::PRIVATE), - aws_sdk_s3::types::ObjectCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), - aws_sdk_s3::types::ObjectCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectCannedAcl::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), +aws_sdk_s3::types::ObjectCannedAcl::AwsExecRead => Self::from_static(Self::AWS_EXEC_READ), +aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerFullControl => Self::from_static(Self::BUCKET_OWNER_FULL_CONTROL), +aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerRead => Self::from_static(Self::BUCKET_OWNER_READ), +aws_sdk_s3::types::ObjectCannedAcl::Private => Self::from_static(Self::PRIVATE), +aws_sdk_s3::types::ObjectCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), +aws_sdk_s3::types::ObjectCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectCannedAcl::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectIdentifier { type Target = aws_sdk_s3::types::ObjectIdentifier; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - e_tag: try_from_aws(x.e_tag)?, - key: try_from_aws(x.key)?, - last_modified_time: try_from_aws(x.last_modified_time)?, - size: try_from_aws(x.size)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_last_modified_time(try_into_aws(x.last_modified_time)?); - y = y.set_size(try_into_aws(x.size)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +e_tag: try_from_aws(x.e_tag)?, +key: try_from_aws(x.key)?, +last_modified_time: try_from_aws(x.last_modified_time)?, +size: try_from_aws(x.size)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_last_modified_time(try_into_aws(x.last_modified_time)?); +y = y.set_size(try_into_aws(x.size)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ObjectLockConfiguration { type Target = aws_sdk_s3::types::ObjectLockConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - object_lock_enabled: try_from_aws(x.object_lock_enabled)?, - rule: try_from_aws(x.rule)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +object_lock_enabled: try_from_aws(x.object_lock_enabled)?, +rule: try_from_aws(x.rule)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_object_lock_enabled(try_into_aws(x.object_lock_enabled)?); - y = y.set_rule(try_into_aws(x.rule)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_object_lock_enabled(try_into_aws(x.object_lock_enabled)?); +y = y.set_rule(try_into_aws(x.rule)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectLockEnabled { type Target = aws_sdk_s3::types::ObjectLockEnabled; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectLockEnabled::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectLockEnabled::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectLockEnabled::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectLockEnabled::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectLockLegalHold { type Target = aws_sdk_s3::types::ObjectLockLegalHold; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectLockLegalHoldStatus { type Target = aws_sdk_s3::types::ObjectLockLegalHoldStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectLockLegalHoldStatus::Off => Self::from_static(Self::OFF), - aws_sdk_s3::types::ObjectLockLegalHoldStatus::On => Self::from_static(Self::ON), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectLockLegalHoldStatus::Off => Self::from_static(Self::OFF), +aws_sdk_s3::types::ObjectLockLegalHoldStatus::On => Self::from_static(Self::ON), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectLockLegalHoldStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectLockLegalHoldStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectLockMode { type Target = aws_sdk_s3::types::ObjectLockMode; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectLockMode::Compliance => Self::from_static(Self::COMPLIANCE), - aws_sdk_s3::types::ObjectLockMode::Governance => Self::from_static(Self::GOVERNANCE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectLockMode::Compliance => Self::from_static(Self::COMPLIANCE), +aws_sdk_s3::types::ObjectLockMode::Governance => Self::from_static(Self::GOVERNANCE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectLockMode::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectLockMode::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectLockRetention { type Target = aws_sdk_s3::types::ObjectLockRetention; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - mode: try_from_aws(x.mode)?, - retain_until_date: try_from_aws(x.retain_until_date)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +mode: try_from_aws(x.mode)?, +retain_until_date: try_from_aws(x.retain_until_date)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_mode(try_into_aws(x.mode)?); - y = y.set_retain_until_date(try_into_aws(x.retain_until_date)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_mode(try_into_aws(x.mode)?); +y = y.set_retain_until_date(try_into_aws(x.retain_until_date)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectLockRetentionMode { type Target = aws_sdk_s3::types::ObjectLockRetentionMode; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectLockRetentionMode::Compliance => Self::from_static(Self::COMPLIANCE), - aws_sdk_s3::types::ObjectLockRetentionMode::Governance => Self::from_static(Self::GOVERNANCE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectLockRetentionMode::Compliance => Self::from_static(Self::COMPLIANCE), +aws_sdk_s3::types::ObjectLockRetentionMode::Governance => Self::from_static(Self::GOVERNANCE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectLockRetentionMode::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectLockRetentionMode::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectLockRule { type Target = aws_sdk_s3::types::ObjectLockRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - default_retention: try_from_aws(x.default_retention)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +default_retention: try_from_aws(x.default_retention)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_default_retention(try_into_aws(x.default_retention)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_default_retention(try_into_aws(x.default_retention)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectNotInActiveTierError { type Target = aws_sdk_s3::types::error::ObjectNotInActiveTierError; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectOwnership { type Target = aws_sdk_s3::types::ObjectOwnership; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectOwnership::BucketOwnerEnforced => Self::from_static(Self::BUCKET_OWNER_ENFORCED), - aws_sdk_s3::types::ObjectOwnership::BucketOwnerPreferred => Self::from_static(Self::BUCKET_OWNER_PREFERRED), - aws_sdk_s3::types::ObjectOwnership::ObjectWriter => Self::from_static(Self::OBJECT_WRITER), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectOwnership::BucketOwnerEnforced => Self::from_static(Self::BUCKET_OWNER_ENFORCED), +aws_sdk_s3::types::ObjectOwnership::BucketOwnerPreferred => Self::from_static(Self::BUCKET_OWNER_PREFERRED), +aws_sdk_s3::types::ObjectOwnership::ObjectWriter => Self::from_static(Self::OBJECT_WRITER), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectOwnership::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectOwnership::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectPart { type Target = aws_sdk_s3::types::ObjectPart; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - part_number: try_from_aws(x.part_number)?, - size: try_from_aws(x.size)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_part_number(try_into_aws(x.part_number)?); - y = y.set_size(try_into_aws(x.size)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +part_number: try_from_aws(x.part_number)?, +size: try_from_aws(x.size)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_part_number(try_into_aws(x.part_number)?); +y = y.set_size(try_into_aws(x.size)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectStorageClass { type Target = aws_sdk_s3::types::ObjectStorageClass; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), - aws_sdk_s3::types::ObjectStorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), - aws_sdk_s3::types::ObjectStorageClass::Glacier => Self::from_static(Self::GLACIER), - aws_sdk_s3::types::ObjectStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), - aws_sdk_s3::types::ObjectStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), - aws_sdk_s3::types::ObjectStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), - aws_sdk_s3::types::ObjectStorageClass::Outposts => Self::from_static(Self::OUTPOSTS), - aws_sdk_s3::types::ObjectStorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), - aws_sdk_s3::types::ObjectStorageClass::Snow => Self::from_static(Self::SNOW), - aws_sdk_s3::types::ObjectStorageClass::Standard => Self::from_static(Self::STANDARD), - aws_sdk_s3::types::ObjectStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectStorageClass::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), +aws_sdk_s3::types::ObjectStorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), +aws_sdk_s3::types::ObjectStorageClass::Glacier => Self::from_static(Self::GLACIER), +aws_sdk_s3::types::ObjectStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), +aws_sdk_s3::types::ObjectStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), +aws_sdk_s3::types::ObjectStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), +aws_sdk_s3::types::ObjectStorageClass::Outposts => Self::from_static(Self::OUTPOSTS), +aws_sdk_s3::types::ObjectStorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), +aws_sdk_s3::types::ObjectStorageClass::Snow => Self::from_static(Self::SNOW), +aws_sdk_s3::types::ObjectStorageClass::Standard => Self::from_static(Self::STANDARD), +aws_sdk_s3::types::ObjectStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectStorageClass::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectVersion { type Target = aws_sdk_s3::types::ObjectVersion; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - is_latest: try_from_aws(x.is_latest)?, - key: try_from_aws(x.key)?, - last_modified: try_from_aws(x.last_modified)?, - owner: try_from_aws(x.owner)?, - restore_status: try_from_aws(x.restore_status)?, - size: try_from_aws(x.size)?, - storage_class: try_from_aws(x.storage_class)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_is_latest(try_into_aws(x.is_latest)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_restore_status(try_into_aws(x.restore_status)?); - y = y.set_size(try_into_aws(x.size)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +is_latest: try_from_aws(x.is_latest)?, +key: try_from_aws(x.key)?, +last_modified: try_from_aws(x.last_modified)?, +owner: try_from_aws(x.owner)?, +restore_status: try_from_aws(x.restore_status)?, +size: try_from_aws(x.size)?, +storage_class: try_from_aws(x.storage_class)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_is_latest(try_into_aws(x.is_latest)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_restore_status(try_into_aws(x.restore_status)?); +y = y.set_size(try_into_aws(x.size)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectVersionStorageClass { type Target = aws_sdk_s3::types::ObjectVersionStorageClass; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectVersionStorageClass::Standard => Self::from_static(Self::STANDARD), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectVersionStorageClass::Standard => Self::from_static(Self::STANDARD), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectVersionStorageClass::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectVersionStorageClass::from(x.as_str())) +} } impl AwsConversion for s3s::dto::OptionalObjectAttributes { type Target = aws_sdk_s3::types::OptionalObjectAttributes; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::OptionalObjectAttributes::RestoreStatus => Self::from_static(Self::RESTORE_STATUS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::OptionalObjectAttributes::RestoreStatus => Self::from_static(Self::RESTORE_STATUS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::OptionalObjectAttributes::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::OptionalObjectAttributes::from(x.as_str())) +} } impl AwsConversion for s3s::dto::OutputLocation { type Target = aws_sdk_s3::types::OutputLocation; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { s3: try_from_aws(x.s3)? }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3: try_from_aws(x.s3)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3(try_into_aws(x.s3)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3(try_into_aws(x.s3)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::OutputSerialization { type Target = aws_sdk_s3::types::OutputSerialization; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - csv: try_from_aws(x.csv)?, - json: try_from_aws(x.json)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +csv: try_from_aws(x.csv)?, +json: try_from_aws(x.json)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_csv(try_into_aws(x.csv)?); - y = y.set_json(try_into_aws(x.json)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_csv(try_into_aws(x.csv)?); +y = y.set_json(try_into_aws(x.json)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Owner { type Target = aws_sdk_s3::types::Owner; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - display_name: try_from_aws(x.display_name)?, - id: try_from_aws(x.id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +display_name: try_from_aws(x.display_name)?, +id: try_from_aws(x.id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_display_name(try_into_aws(x.display_name)?); - y = y.set_id(try_into_aws(x.id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_display_name(try_into_aws(x.display_name)?); +y = y.set_id(try_into_aws(x.id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::OwnerOverride { type Target = aws_sdk_s3::types::OwnerOverride; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::OwnerOverride::Destination => Self::from_static(Self::DESTINATION), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::OwnerOverride::Destination => Self::from_static(Self::DESTINATION), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::OwnerOverride::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::OwnerOverride::from(x.as_str())) +} } impl AwsConversion for s3s::dto::OwnershipControls { type Target = aws_sdk_s3::types::OwnershipControls; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - rules: try_from_aws(x.rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +rules: try_from_aws(x.rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_rules(Some(try_into_aws(x.rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_rules(Some(try_into_aws(x.rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::OwnershipControlsRule { type Target = aws_sdk_s3::types::OwnershipControlsRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - object_ownership: try_from_aws(x.object_ownership)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +object_ownership: try_from_aws(x.object_ownership)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_object_ownership(Some(try_into_aws(x.object_ownership)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_object_ownership(Some(try_into_aws(x.object_ownership)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ParquetInput { type Target = aws_sdk_s3::types::ParquetInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Part { type Target = aws_sdk_s3::types::Part; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - e_tag: try_from_aws(x.e_tag)?, - last_modified: try_from_aws(x.last_modified)?, - part_number: try_from_aws(x.part_number)?, - size: try_from_aws(x.size)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_part_number(try_into_aws(x.part_number)?); - y = y.set_size(try_into_aws(x.size)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +e_tag: try_from_aws(x.e_tag)?, +last_modified: try_from_aws(x.last_modified)?, +part_number: try_from_aws(x.part_number)?, +size: try_from_aws(x.size)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_part_number(try_into_aws(x.part_number)?); +y = y.set_size(try_into_aws(x.size)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PartitionDateSource { type Target = aws_sdk_s3::types::PartitionDateSource; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::PartitionDateSource::DeliveryTime => Self::from_static(Self::DELIVERY_TIME), - aws_sdk_s3::types::PartitionDateSource::EventTime => Self::from_static(Self::EVENT_TIME), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::PartitionDateSource::DeliveryTime => Self::from_static(Self::DELIVERY_TIME), +aws_sdk_s3::types::PartitionDateSource::EventTime => Self::from_static(Self::EVENT_TIME), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::PartitionDateSource::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::PartitionDateSource::from(x.as_str())) +} } impl AwsConversion for s3s::dto::PartitionedPrefix { type Target = aws_sdk_s3::types::PartitionedPrefix; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - partition_date_source: try_from_aws(x.partition_date_source)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +partition_date_source: try_from_aws(x.partition_date_source)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_partition_date_source(try_into_aws(x.partition_date_source)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_partition_date_source(try_into_aws(x.partition_date_source)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Payer { type Target = aws_sdk_s3::types::Payer; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Payer::BucketOwner => Self::from_static(Self::BUCKET_OWNER), - aws_sdk_s3::types::Payer::Requester => Self::from_static(Self::REQUESTER), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Payer::BucketOwner => Self::from_static(Self::BUCKET_OWNER), +aws_sdk_s3::types::Payer::Requester => Self::from_static(Self::REQUESTER), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Payer::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Payer::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Permission { type Target = aws_sdk_s3::types::Permission; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Permission::FullControl => Self::from_static(Self::FULL_CONTROL), - aws_sdk_s3::types::Permission::Read => Self::from_static(Self::READ), - aws_sdk_s3::types::Permission::ReadAcp => Self::from_static(Self::READ_ACP), - aws_sdk_s3::types::Permission::Write => Self::from_static(Self::WRITE), - aws_sdk_s3::types::Permission::WriteAcp => Self::from_static(Self::WRITE_ACP), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Permission::FullControl => Self::from_static(Self::FULL_CONTROL), +aws_sdk_s3::types::Permission::Read => Self::from_static(Self::READ), +aws_sdk_s3::types::Permission::ReadAcp => Self::from_static(Self::READ_ACP), +aws_sdk_s3::types::Permission::Write => Self::from_static(Self::WRITE), +aws_sdk_s3::types::Permission::WriteAcp => Self::from_static(Self::WRITE_ACP), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Permission::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Permission::from(x.as_str())) +} } impl AwsConversion for s3s::dto::PolicyStatus { type Target = aws_sdk_s3::types::PolicyStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - is_public: try_from_aws(x.is_public)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +is_public: try_from_aws(x.is_public)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_is_public(try_into_aws(x.is_public)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_is_public(try_into_aws(x.is_public)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Progress { type Target = aws_sdk_s3::types::Progress; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bytes_processed: try_from_aws(x.bytes_processed)?, - bytes_returned: try_from_aws(x.bytes_returned)?, - bytes_scanned: try_from_aws(x.bytes_scanned)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bytes_processed: try_from_aws(x.bytes_processed)?, +bytes_returned: try_from_aws(x.bytes_returned)?, +bytes_scanned: try_from_aws(x.bytes_scanned)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); - y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); - y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); +y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); +y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ProgressEvent { type Target = aws_sdk_s3::types::ProgressEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - details: try_from_aws(x.details)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +details: try_from_aws(x.details)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_details(try_into_aws(x.details)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_details(try_into_aws(x.details)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Protocol { type Target = aws_sdk_s3::types::Protocol; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Protocol::Http => Self::from_static(Self::HTTP), - aws_sdk_s3::types::Protocol::Https => Self::from_static(Self::HTTPS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Protocol::Http => Self::from_static(Self::HTTP), +aws_sdk_s3::types::Protocol::Https => Self::from_static(Self::HTTPS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Protocol::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Protocol::from(x.as_str())) +} } impl AwsConversion for s3s::dto::PublicAccessBlockConfiguration { type Target = aws_sdk_s3::types::PublicAccessBlockConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - block_public_acls: try_from_aws(x.block_public_acls)?, - block_public_policy: try_from_aws(x.block_public_policy)?, - ignore_public_acls: try_from_aws(x.ignore_public_acls)?, - restrict_public_buckets: try_from_aws(x.restrict_public_buckets)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_block_public_acls(try_into_aws(x.block_public_acls)?); - y = y.set_block_public_policy(try_into_aws(x.block_public_policy)?); - y = y.set_ignore_public_acls(try_into_aws(x.ignore_public_acls)?); - y = y.set_restrict_public_buckets(try_into_aws(x.restrict_public_buckets)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +block_public_acls: try_from_aws(x.block_public_acls)?, +block_public_policy: try_from_aws(x.block_public_policy)?, +ignore_public_acls: try_from_aws(x.ignore_public_acls)?, +restrict_public_buckets: try_from_aws(x.restrict_public_buckets)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_block_public_acls(try_into_aws(x.block_public_acls)?); +y = y.set_block_public_policy(try_into_aws(x.block_public_policy)?); +y = y.set_ignore_public_acls(try_into_aws(x.ignore_public_acls)?); +y = y.set_restrict_public_buckets(try_into_aws(x.restrict_public_buckets)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketAccelerateConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - accelerate_configuration: unwrap_from_aws(x.accelerate_configuration, "accelerate_configuration")?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_accelerate_configuration(Some(try_into_aws(x.accelerate_configuration)?)); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +accelerate_configuration: unwrap_from_aws(x.accelerate_configuration, "accelerate_configuration")?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_accelerate_configuration(Some(try_into_aws(x.accelerate_configuration)?)); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketAccelerateConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketAclInput { type Target = aws_sdk_s3::operation::put_bucket_acl::PutBucketAclInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - access_control_policy: try_from_aws(x.access_control_policy)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write: try_from_aws(x.grant_write)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write(try_into_aws(x.grant_write)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +access_control_policy: try_from_aws(x.access_control_policy)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write: try_from_aws(x.grant_write)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write(try_into_aws(x.grant_write)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketAclOutput { type Target = aws_sdk_s3::operation::put_bucket_acl::PutBucketAclOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - analytics_configuration: unwrap_from_aws(x.analytics_configuration, "analytics_configuration")?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_analytics_configuration(Some(try_into_aws(x.analytics_configuration)?)); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +analytics_configuration: unwrap_from_aws(x.analytics_configuration, "analytics_configuration")?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_analytics_configuration(Some(try_into_aws(x.analytics_configuration)?)); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketCorsInput { type Target = aws_sdk_s3::operation::put_bucket_cors::PutBucketCorsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - cors_configuration: unwrap_from_aws(x.cors_configuration, "cors_configuration")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_cors_configuration(Some(try_into_aws(x.cors_configuration)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +cors_configuration: unwrap_from_aws(x.cors_configuration, "cors_configuration")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_cors_configuration(Some(try_into_aws(x.cors_configuration)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketCorsOutput { type Target = aws_sdk_s3::operation::put_bucket_cors::PutBucketCorsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketEncryptionInput { type Target = aws_sdk_s3::operation::put_bucket_encryption::PutBucketEncryptionInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - server_side_encryption_configuration: unwrap_from_aws( - x.server_side_encryption_configuration, - "server_side_encryption_configuration", - )?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_server_side_encryption_configuration(Some(try_into_aws(x.server_side_encryption_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +server_side_encryption_configuration: unwrap_from_aws(x.server_side_encryption_configuration, "server_side_encryption_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_server_side_encryption_configuration(Some(try_into_aws(x.server_side_encryption_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketEncryptionOutput { type Target = aws_sdk_s3::operation::put_bucket_encryption::PutBucketEncryptionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketIntelligentTieringConfigurationInput { - type Target = - aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - id: unwrap_from_aws(x.id, "id")?, - intelligent_tiering_configuration: unwrap_from_aws( - x.intelligent_tiering_configuration, - "intelligent_tiering_configuration", - )?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_intelligent_tiering_configuration(Some(try_into_aws(x.intelligent_tiering_configuration)?)); - y.build().map_err(S3Error::internal_error) - } + type Target = aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationInput; +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +id: unwrap_from_aws(x.id, "id")?, +intelligent_tiering_configuration: unwrap_from_aws(x.intelligent_tiering_configuration, "intelligent_tiering_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_intelligent_tiering_configuration(Some(try_into_aws(x.intelligent_tiering_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketIntelligentTieringConfigurationOutput { - type Target = - aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationOutput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationOutput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - inventory_configuration: unwrap_from_aws(x.inventory_configuration, "inventory_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_inventory_configuration(Some(try_into_aws(x.inventory_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +inventory_configuration: unwrap_from_aws(x.inventory_configuration, "inventory_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_inventory_configuration(Some(try_into_aws(x.inventory_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketLifecycleConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - lifecycle_configuration: try_from_aws(x.lifecycle_configuration)?, - transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_lifecycle_configuration(try_into_aws(x.lifecycle_configuration)?); - y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +lifecycle_configuration: try_from_aws(x.lifecycle_configuration)?, +transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_lifecycle_configuration(try_into_aws(x.lifecycle_configuration)?); +y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketLifecycleConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketLoggingInput { type Target = aws_sdk_s3::operation::put_bucket_logging::PutBucketLoggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_logging_status: unwrap_from_aws(x.bucket_logging_status, "bucket_logging_status")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_logging_status(Some(try_into_aws(x.bucket_logging_status)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_logging_status: unwrap_from_aws(x.bucket_logging_status, "bucket_logging_status")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_logging_status(Some(try_into_aws(x.bucket_logging_status)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketLoggingOutput { type Target = aws_sdk_s3::operation::put_bucket_logging::PutBucketLoggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - metrics_configuration: unwrap_from_aws(x.metrics_configuration, "metrics_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_metrics_configuration(Some(try_into_aws(x.metrics_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +metrics_configuration: unwrap_from_aws(x.metrics_configuration, "metrics_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_metrics_configuration(Some(try_into_aws(x.metrics_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketNotificationConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_notification_configuration::PutBucketNotificationConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - notification_configuration: unwrap_from_aws(x.notification_configuration, "notification_configuration")?, - skip_destination_validation: try_from_aws(x.skip_destination_validation)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_notification_configuration(Some(try_into_aws(x.notification_configuration)?)); - y = y.set_skip_destination_validation(try_into_aws(x.skip_destination_validation)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +notification_configuration: unwrap_from_aws(x.notification_configuration, "notification_configuration")?, +skip_destination_validation: try_from_aws(x.skip_destination_validation)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_notification_configuration(Some(try_into_aws(x.notification_configuration)?)); +y = y.set_skip_destination_validation(try_into_aws(x.skip_destination_validation)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketNotificationConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_notification_configuration::PutBucketNotificationConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - ownership_controls: unwrap_from_aws(x.ownership_controls, "ownership_controls")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_ownership_controls(Some(try_into_aws(x.ownership_controls)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +ownership_controls: unwrap_from_aws(x.ownership_controls, "ownership_controls")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_ownership_controls(Some(try_into_aws(x.ownership_controls)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketPolicyInput { type Target = aws_sdk_s3::operation::put_bucket_policy::PutBucketPolicyInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - confirm_remove_self_bucket_access: try_from_aws(x.confirm_remove_self_bucket_access)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - policy: unwrap_from_aws(x.policy, "policy")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_confirm_remove_self_bucket_access(try_into_aws(x.confirm_remove_self_bucket_access)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_policy(Some(try_into_aws(x.policy)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +confirm_remove_self_bucket_access: try_from_aws(x.confirm_remove_self_bucket_access)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +policy: unwrap_from_aws(x.policy, "policy")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_confirm_remove_self_bucket_access(try_into_aws(x.confirm_remove_self_bucket_access)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_policy(Some(try_into_aws(x.policy)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketPolicyOutput { type Target = aws_sdk_s3::operation::put_bucket_policy::PutBucketPolicyOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketReplicationInput { type Target = aws_sdk_s3::operation::put_bucket_replication::PutBucketReplicationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - replication_configuration: unwrap_from_aws(x.replication_configuration, "replication_configuration")?, - token: try_from_aws(x.token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_replication_configuration(Some(try_into_aws(x.replication_configuration)?)); - y = y.set_token(try_into_aws(x.token)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +replication_configuration: unwrap_from_aws(x.replication_configuration, "replication_configuration")?, +token: try_from_aws(x.token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_replication_configuration(Some(try_into_aws(x.replication_configuration)?)); +y = y.set_token(try_into_aws(x.token)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketReplicationOutput { type Target = aws_sdk_s3::operation::put_bucket_replication::PutBucketReplicationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketRequestPaymentInput { type Target = aws_sdk_s3::operation::put_bucket_request_payment::PutBucketRequestPaymentInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - request_payment_configuration: unwrap_from_aws(x.request_payment_configuration, "request_payment_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_request_payment_configuration(Some(try_into_aws(x.request_payment_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +request_payment_configuration: unwrap_from_aws(x.request_payment_configuration, "request_payment_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_request_payment_configuration(Some(try_into_aws(x.request_payment_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketRequestPaymentOutput { type Target = aws_sdk_s3::operation::put_bucket_request_payment::PutBucketRequestPaymentOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketTaggingInput { type Target = aws_sdk_s3::operation::put_bucket_tagging::PutBucketTaggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - tagging: unwrap_from_aws(x.tagging, "tagging")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_tagging(Some(try_into_aws(x.tagging)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +tagging: unwrap_from_aws(x.tagging, "tagging")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_tagging(Some(try_into_aws(x.tagging)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketTaggingOutput { type Target = aws_sdk_s3::operation::put_bucket_tagging::PutBucketTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketVersioningInput { type Target = aws_sdk_s3::operation::put_bucket_versioning::PutBucketVersioningInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - mfa: try_from_aws(x.mfa)?, - versioning_configuration: unwrap_from_aws(x.versioning_configuration, "versioning_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_mfa(try_into_aws(x.mfa)?); - y = y.set_versioning_configuration(Some(try_into_aws(x.versioning_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +mfa: try_from_aws(x.mfa)?, +versioning_configuration: unwrap_from_aws(x.versioning_configuration, "versioning_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_mfa(try_into_aws(x.mfa)?); +y = y.set_versioning_configuration(Some(try_into_aws(x.versioning_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketVersioningOutput { type Target = aws_sdk_s3::operation::put_bucket_versioning::PutBucketVersioningOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketWebsiteInput { type Target = aws_sdk_s3::operation::put_bucket_website::PutBucketWebsiteInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - website_configuration: unwrap_from_aws(x.website_configuration, "website_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_website_configuration(Some(try_into_aws(x.website_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +website_configuration: unwrap_from_aws(x.website_configuration, "website_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_website_configuration(Some(try_into_aws(x.website_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketWebsiteOutput { type Target = aws_sdk_s3::operation::put_bucket_website::PutBucketWebsiteOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectAclInput { type Target = aws_sdk_s3::operation::put_object_acl::PutObjectAclInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - access_control_policy: try_from_aws(x.access_control_policy)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write: try_from_aws(x.grant_write)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write(try_into_aws(x.grant_write)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +access_control_policy: try_from_aws(x.access_control_policy)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write: try_from_aws(x.grant_write)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write(try_into_aws(x.grant_write)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectAclOutput { type Target = aws_sdk_s3::operation::put_object_acl::PutObjectAclOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectInput { type Target = aws_sdk_s3::operation::put_object::PutObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - body: Some(try_from_aws(x.body)?), - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_length: try_from_aws(x.content_length)?, - content_md5: try_from_aws(x.content_md5)?, - content_type: try_from_aws(x.content_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - expires: try_from_aws(x.expires)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - if_match: try_from_aws(x.if_match)?, - if_none_match: try_from_aws(x.if_none_match)?, - key: unwrap_from_aws(x.key, "key")?, - metadata: try_from_aws(x.metadata)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - tagging: try_from_aws(x.tagging)?, - version_id: None, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - write_offset_bytes: try_from_aws(x.write_offset_bytes)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_none_match(try_into_aws(x.if_none_match)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tagging(try_into_aws(x.tagging)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - y = y.set_write_offset_bytes(try_into_aws(x.write_offset_bytes)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +body: Some(try_from_aws(x.body)?), +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_length: try_from_aws(x.content_length)?, +content_md5: try_from_aws(x.content_md5)?, +content_type: try_from_aws(x.content_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +expires: try_from_aws(x.expires)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +if_match: try_from_aws(x.if_match)?, +if_none_match: try_from_aws(x.if_none_match)?, +key: unwrap_from_aws(x.key, "key")?, +metadata: try_from_aws(x.metadata)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +tagging: try_from_aws(x.tagging)?, +version_id: None, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +write_offset_bytes: try_from_aws(x.write_offset_bytes)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_none_match(try_into_aws(x.if_none_match)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tagging(try_into_aws(x.tagging)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +y = y.set_write_offset_bytes(try_into_aws(x.write_offset_bytes)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectLegalHoldInput { type Target = aws_sdk_s3::operation::put_object_legal_hold::PutObjectLegalHoldInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - legal_hold: try_from_aws(x.legal_hold)?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_legal_hold(try_into_aws(x.legal_hold)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +legal_hold: try_from_aws(x.legal_hold)?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_legal_hold(try_into_aws(x.legal_hold)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectLegalHoldOutput { type Target = aws_sdk_s3::operation::put_object_legal_hold::PutObjectLegalHoldOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectLockConfigurationInput { type Target = aws_sdk_s3::operation::put_object_lock_configuration::PutObjectLockConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - object_lock_configuration: try_from_aws(x.object_lock_configuration)?, - request_payer: try_from_aws(x.request_payer)?, - token: try_from_aws(x.token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_token(try_into_aws(x.token)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +object_lock_configuration: try_from_aws(x.object_lock_configuration)?, +request_payer: try_from_aws(x.request_payer)?, +token: try_from_aws(x.token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_token(try_into_aws(x.token)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectLockConfigurationOutput { type Target = aws_sdk_s3::operation::put_object_lock_configuration::PutObjectLockConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectOutput { type Target = aws_sdk_s3::operation::put_object::PutObjectOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - expiration: try_from_aws(x.expiration)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - size: try_from_aws(x.size)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_size(try_into_aws(x.size)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +expiration: try_from_aws(x.expiration)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +size: try_from_aws(x.size)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_size(try_into_aws(x.size)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectRetentionInput { type Target = aws_sdk_s3::operation::put_object_retention::PutObjectRetentionInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - retention: try_from_aws(x.retention)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_retention(try_into_aws(x.retention)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +retention: try_from_aws(x.retention)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_retention(try_into_aws(x.retention)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectRetentionOutput { type Target = aws_sdk_s3::operation::put_object_retention::PutObjectRetentionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectTaggingInput { type Target = aws_sdk_s3::operation::put_object_tagging::PutObjectTaggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - tagging: unwrap_from_aws(x.tagging, "tagging")?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_tagging(Some(try_into_aws(x.tagging)?)); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +tagging: unwrap_from_aws(x.tagging, "tagging")?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_tagging(Some(try_into_aws(x.tagging)?)); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectTaggingOutput { type Target = aws_sdk_s3::operation::put_object_tagging::PutObjectTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - version_id: try_from_aws(x.version_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +version_id: try_from_aws(x.version_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutPublicAccessBlockInput { type Target = aws_sdk_s3::operation::put_public_access_block::PutPublicAccessBlockInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - public_access_block_configuration: unwrap_from_aws( - x.public_access_block_configuration, - "public_access_block_configuration", - )?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_public_access_block_configuration(Some(try_into_aws(x.public_access_block_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +public_access_block_configuration: unwrap_from_aws(x.public_access_block_configuration, "public_access_block_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_public_access_block_configuration(Some(try_into_aws(x.public_access_block_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutPublicAccessBlockOutput { type Target = aws_sdk_s3::operation::put_public_access_block::PutPublicAccessBlockOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::QueueConfiguration { type Target = aws_sdk_s3::types::QueueConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - events: try_from_aws(x.events)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - queue_arn: try_from_aws(x.queue_arn)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_events(Some(try_into_aws(x.events)?)); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_queue_arn(Some(try_into_aws(x.queue_arn)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +events: try_from_aws(x.events)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +queue_arn: try_from_aws(x.queue_arn)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_events(Some(try_into_aws(x.events)?)); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_queue_arn(Some(try_into_aws(x.queue_arn)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::QuoteFields { type Target = aws_sdk_s3::types::QuoteFields; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::QuoteFields::Always => Self::from_static(Self::ALWAYS), - aws_sdk_s3::types::QuoteFields::Asneeded => Self::from_static(Self::ASNEEDED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::QuoteFields::Always => Self::from_static(Self::ALWAYS), +aws_sdk_s3::types::QuoteFields::Asneeded => Self::from_static(Self::ASNEEDED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::QuoteFields::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::QuoteFields::from(x.as_str())) +} } impl AwsConversion for s3s::dto::RecordsEvent { type Target = aws_sdk_s3::types::RecordsEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - payload: try_from_aws(x.payload)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +payload: try_from_aws(x.payload)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_payload(try_into_aws(x.payload)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_payload(try_into_aws(x.payload)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Redirect { type Target = aws_sdk_s3::types::Redirect; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - host_name: try_from_aws(x.host_name)?, - http_redirect_code: try_from_aws(x.http_redirect_code)?, - protocol: try_from_aws(x.protocol)?, - replace_key_prefix_with: try_from_aws(x.replace_key_prefix_with)?, - replace_key_with: try_from_aws(x.replace_key_with)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_host_name(try_into_aws(x.host_name)?); - y = y.set_http_redirect_code(try_into_aws(x.http_redirect_code)?); - y = y.set_protocol(try_into_aws(x.protocol)?); - y = y.set_replace_key_prefix_with(try_into_aws(x.replace_key_prefix_with)?); - y = y.set_replace_key_with(try_into_aws(x.replace_key_with)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +host_name: try_from_aws(x.host_name)?, +http_redirect_code: try_from_aws(x.http_redirect_code)?, +protocol: try_from_aws(x.protocol)?, +replace_key_prefix_with: try_from_aws(x.replace_key_prefix_with)?, +replace_key_with: try_from_aws(x.replace_key_with)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_host_name(try_into_aws(x.host_name)?); +y = y.set_http_redirect_code(try_into_aws(x.http_redirect_code)?); +y = y.set_protocol(try_into_aws(x.protocol)?); +y = y.set_replace_key_prefix_with(try_into_aws(x.replace_key_prefix_with)?); +y = y.set_replace_key_with(try_into_aws(x.replace_key_with)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RedirectAllRequestsTo { type Target = aws_sdk_s3::types::RedirectAllRequestsTo; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - host_name: try_from_aws(x.host_name)?, - protocol: try_from_aws(x.protocol)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +host_name: try_from_aws(x.host_name)?, +protocol: try_from_aws(x.protocol)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_host_name(Some(try_into_aws(x.host_name)?)); - y = y.set_protocol(try_into_aws(x.protocol)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_host_name(Some(try_into_aws(x.host_name)?)); +y = y.set_protocol(try_into_aws(x.protocol)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicaModifications { type Target = aws_sdk_s3::types::ReplicaModifications; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicaModificationsStatus { type Target = aws_sdk_s3::types::ReplicaModificationsStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ReplicaModificationsStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ReplicaModificationsStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ReplicaModificationsStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ReplicaModificationsStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ReplicaModificationsStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ReplicaModificationsStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ReplicationConfiguration { type Target = aws_sdk_s3::types::ReplicationConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - role: try_from_aws(x.role)?, - rules: try_from_aws(x.rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +role: try_from_aws(x.role)?, +rules: try_from_aws(x.rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_role(Some(try_into_aws(x.role)?)); - y = y.set_rules(Some(try_into_aws(x.rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_role(Some(try_into_aws(x.role)?)); +y = y.set_rules(Some(try_into_aws(x.rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicationRule { type Target = aws_sdk_s3::types::ReplicationRule; - type Error = S3Error; - - #[allow(deprecated)] - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - delete_marker_replication: try_from_aws(x.delete_marker_replication)?, - delete_replication: None, - destination: unwrap_from_aws(x.destination, "destination")?, - existing_object_replication: try_from_aws(x.existing_object_replication)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - prefix: try_from_aws(x.prefix)?, - priority: try_from_aws(x.priority)?, - source_selection_criteria: try_from_aws(x.source_selection_criteria)?, - status: try_from_aws(x.status)?, - }) - } - - #[allow(deprecated)] - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_delete_marker_replication(try_into_aws(x.delete_marker_replication)?); - y = y.set_destination(Some(try_into_aws(x.destination)?)); - y = y.set_existing_object_replication(try_into_aws(x.existing_object_replication)?); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_priority(try_into_aws(x.priority)?); - y = y.set_source_selection_criteria(try_into_aws(x.source_selection_criteria)?); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +#[allow(deprecated)] +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +delete_marker_replication: try_from_aws(x.delete_marker_replication)?, +delete_replication: None, +destination: unwrap_from_aws(x.destination, "destination")?, +existing_object_replication: try_from_aws(x.existing_object_replication)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +prefix: try_from_aws(x.prefix)?, +priority: try_from_aws(x.priority)?, +source_selection_criteria: try_from_aws(x.source_selection_criteria)?, +status: try_from_aws(x.status)?, +}) +} + +#[allow(deprecated)] +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_delete_marker_replication(try_into_aws(x.delete_marker_replication)?); +y = y.set_destination(Some(try_into_aws(x.destination)?)); +y = y.set_existing_object_replication(try_into_aws(x.existing_object_replication)?); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_priority(try_into_aws(x.priority)?); +y = y.set_source_selection_criteria(try_into_aws(x.source_selection_criteria)?); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicationRuleAndOperator { type Target = aws_sdk_s3::types::ReplicationRuleAndOperator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ReplicationRuleFilter { type Target = aws_sdk_s3::types::ReplicationRuleFilter; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - and: try_from_aws(x.and)?, - cached_tags: s3s::dto::CachedTags::default(), - prefix: try_from_aws(x.prefix)?, - tag: try_from_aws(x.tag)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_and(try_into_aws(x.and)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tag(try_into_aws(x.tag)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +and: try_from_aws(x.and)?, +cached_tags: s3s::dto::CachedTags::default(), +prefix: try_from_aws(x.prefix)?, +tag: try_from_aws(x.tag)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_and(try_into_aws(x.and)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tag(try_into_aws(x.tag)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ReplicationRuleStatus { type Target = aws_sdk_s3::types::ReplicationRuleStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ReplicationRuleStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ReplicationRuleStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ReplicationRuleStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ReplicationRuleStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ReplicationRuleStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ReplicationRuleStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ReplicationStatus { type Target = aws_sdk_s3::types::ReplicationStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ReplicationStatus::Complete => Self::from_static(Self::COMPLETE), - aws_sdk_s3::types::ReplicationStatus::Completed => Self::from_static(Self::COMPLETED), - aws_sdk_s3::types::ReplicationStatus::Failed => Self::from_static(Self::FAILED), - aws_sdk_s3::types::ReplicationStatus::Pending => Self::from_static(Self::PENDING), - aws_sdk_s3::types::ReplicationStatus::Replica => Self::from_static(Self::REPLICA), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ReplicationStatus::Complete => Self::from_static(Self::COMPLETE), +aws_sdk_s3::types::ReplicationStatus::Completed => Self::from_static(Self::COMPLETED), +aws_sdk_s3::types::ReplicationStatus::Failed => Self::from_static(Self::FAILED), +aws_sdk_s3::types::ReplicationStatus::Pending => Self::from_static(Self::PENDING), +aws_sdk_s3::types::ReplicationStatus::Replica => Self::from_static(Self::REPLICA), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ReplicationStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ReplicationStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ReplicationTime { type Target = aws_sdk_s3::types::ReplicationTime; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - time: unwrap_from_aws(x.time, "time")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +time: unwrap_from_aws(x.time, "time")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(Some(try_into_aws(x.status)?)); - y = y.set_time(Some(try_into_aws(x.time)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(Some(try_into_aws(x.status)?)); +y = y.set_time(Some(try_into_aws(x.time)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicationTimeStatus { type Target = aws_sdk_s3::types::ReplicationTimeStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ReplicationTimeStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ReplicationTimeStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ReplicationTimeStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ReplicationTimeStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ReplicationTimeStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ReplicationTimeStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ReplicationTimeValue { type Target = aws_sdk_s3::types::ReplicationTimeValue; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - minutes: try_from_aws(x.minutes)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +minutes: try_from_aws(x.minutes)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_minutes(try_into_aws(x.minutes)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_minutes(try_into_aws(x.minutes)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RequestCharged { type Target = aws_sdk_s3::types::RequestCharged; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::RequestCharged::Requester => Self::from_static(Self::REQUESTER), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::RequestCharged::Requester => Self::from_static(Self::REQUESTER), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::RequestCharged::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::RequestCharged::from(x.as_str())) +} } impl AwsConversion for s3s::dto::RequestPayer { type Target = aws_sdk_s3::types::RequestPayer; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::RequestPayer::Requester => Self::from_static(Self::REQUESTER), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::RequestPayer::Requester => Self::from_static(Self::REQUESTER), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::RequestPayer::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::RequestPayer::from(x.as_str())) +} } impl AwsConversion for s3s::dto::RequestPaymentConfiguration { type Target = aws_sdk_s3::types::RequestPaymentConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - payer: try_from_aws(x.payer)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +payer: try_from_aws(x.payer)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_payer(Some(try_into_aws(x.payer)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_payer(Some(try_into_aws(x.payer)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::RequestProgress { type Target = aws_sdk_s3::types::RequestProgress; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - enabled: try_from_aws(x.enabled)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +enabled: try_from_aws(x.enabled)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_enabled(try_into_aws(x.enabled)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_enabled(try_into_aws(x.enabled)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RestoreObjectInput { type Target = aws_sdk_s3::operation::restore_object::RestoreObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - restore_request: try_from_aws(x.restore_request)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_restore_request(try_into_aws(x.restore_request)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +restore_request: try_from_aws(x.restore_request)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_restore_request(try_into_aws(x.restore_request)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::RestoreObjectOutput { type Target = aws_sdk_s3::operation::restore_object::RestoreObjectOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - restore_output_path: try_from_aws(x.restore_output_path)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +restore_output_path: try_from_aws(x.restore_output_path)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_restore_output_path(try_into_aws(x.restore_output_path)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_restore_output_path(try_into_aws(x.restore_output_path)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RestoreRequest { type Target = aws_sdk_s3::types::RestoreRequest; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - days: try_from_aws(x.days)?, - description: try_from_aws(x.description)?, - glacier_job_parameters: try_from_aws(x.glacier_job_parameters)?, - output_location: try_from_aws(x.output_location)?, - select_parameters: try_from_aws(x.select_parameters)?, - tier: try_from_aws(x.tier)?, - type_: try_from_aws(x.r#type)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_days(try_into_aws(x.days)?); - y = y.set_description(try_into_aws(x.description)?); - y = y.set_glacier_job_parameters(try_into_aws(x.glacier_job_parameters)?); - y = y.set_output_location(try_into_aws(x.output_location)?); - y = y.set_select_parameters(try_into_aws(x.select_parameters)?); - y = y.set_tier(try_into_aws(x.tier)?); - y = y.set_type(try_into_aws(x.type_)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +days: try_from_aws(x.days)?, +description: try_from_aws(x.description)?, +glacier_job_parameters: try_from_aws(x.glacier_job_parameters)?, +output_location: try_from_aws(x.output_location)?, +select_parameters: try_from_aws(x.select_parameters)?, +tier: try_from_aws(x.tier)?, +type_: try_from_aws(x.r#type)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_days(try_into_aws(x.days)?); +y = y.set_description(try_into_aws(x.description)?); +y = y.set_glacier_job_parameters(try_into_aws(x.glacier_job_parameters)?); +y = y.set_output_location(try_into_aws(x.output_location)?); +y = y.set_select_parameters(try_into_aws(x.select_parameters)?); +y = y.set_tier(try_into_aws(x.tier)?); +y = y.set_type(try_into_aws(x.type_)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RestoreRequestType { type Target = aws_sdk_s3::types::RestoreRequestType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::RestoreRequestType::Select => Self::from_static(Self::SELECT), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::RestoreRequestType::Select => Self::from_static(Self::SELECT), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::RestoreRequestType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::RestoreRequestType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::RestoreStatus { type Target = aws_sdk_s3::types::RestoreStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - is_restore_in_progress: try_from_aws(x.is_restore_in_progress)?, - restore_expiry_date: try_from_aws(x.restore_expiry_date)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +is_restore_in_progress: try_from_aws(x.is_restore_in_progress)?, +restore_expiry_date: try_from_aws(x.restore_expiry_date)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_is_restore_in_progress(try_into_aws(x.is_restore_in_progress)?); - y = y.set_restore_expiry_date(try_into_aws(x.restore_expiry_date)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_is_restore_in_progress(try_into_aws(x.is_restore_in_progress)?); +y = y.set_restore_expiry_date(try_into_aws(x.restore_expiry_date)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RoutingRule { type Target = aws_sdk_s3::types::RoutingRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - condition: try_from_aws(x.condition)?, - redirect: unwrap_from_aws(x.redirect, "redirect")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +condition: try_from_aws(x.condition)?, +redirect: unwrap_from_aws(x.redirect, "redirect")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_condition(try_into_aws(x.condition)?); - y = y.set_redirect(Some(try_into_aws(x.redirect)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_condition(try_into_aws(x.condition)?); +y = y.set_redirect(Some(try_into_aws(x.redirect)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::S3KeyFilter { type Target = aws_sdk_s3::types::S3KeyFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - filter_rules: try_from_aws(x.filter_rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +filter_rules: try_from_aws(x.filter_rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_filter_rules(try_into_aws(x.filter_rules)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_filter_rules(try_into_aws(x.filter_rules)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::S3Location { type Target = aws_sdk_s3::types::S3Location; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_control_list: try_from_aws(x.access_control_list)?, - bucket_name: try_from_aws(x.bucket_name)?, - canned_acl: try_from_aws(x.canned_acl)?, - encryption: try_from_aws(x.encryption)?, - prefix: try_from_aws(x.prefix)?, - storage_class: try_from_aws(x.storage_class)?, - tagging: try_from_aws(x.tagging)?, - user_metadata: try_from_aws(x.user_metadata)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_control_list(try_into_aws(x.access_control_list)?); - y = y.set_bucket_name(Some(try_into_aws(x.bucket_name)?)); - y = y.set_canned_acl(try_into_aws(x.canned_acl)?); - y = y.set_encryption(try_into_aws(x.encryption)?); - y = y.set_prefix(Some(try_into_aws(x.prefix)?)); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tagging(try_into_aws(x.tagging)?); - y = y.set_user_metadata(try_into_aws(x.user_metadata)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_control_list: try_from_aws(x.access_control_list)?, +bucket_name: try_from_aws(x.bucket_name)?, +canned_acl: try_from_aws(x.canned_acl)?, +encryption: try_from_aws(x.encryption)?, +prefix: try_from_aws(x.prefix)?, +storage_class: try_from_aws(x.storage_class)?, +tagging: try_from_aws(x.tagging)?, +user_metadata: try_from_aws(x.user_metadata)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_control_list(try_into_aws(x.access_control_list)?); +y = y.set_bucket_name(Some(try_into_aws(x.bucket_name)?)); +y = y.set_canned_acl(try_into_aws(x.canned_acl)?); +y = y.set_encryption(try_into_aws(x.encryption)?); +y = y.set_prefix(Some(try_into_aws(x.prefix)?)); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tagging(try_into_aws(x.tagging)?); +y = y.set_user_metadata(try_into_aws(x.user_metadata)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::S3TablesDestination { type Target = aws_sdk_s3::types::S3TablesDestination; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - table_bucket_arn: try_from_aws(x.table_bucket_arn)?, - table_name: try_from_aws(x.table_name)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +table_bucket_arn: try_from_aws(x.table_bucket_arn)?, +table_name: try_from_aws(x.table_name)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); - y = y.set_table_name(Some(try_into_aws(x.table_name)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); +y = y.set_table_name(Some(try_into_aws(x.table_name)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::S3TablesDestinationResult { type Target = aws_sdk_s3::types::S3TablesDestinationResult; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - table_arn: try_from_aws(x.table_arn)?, - table_bucket_arn: try_from_aws(x.table_bucket_arn)?, - table_name: try_from_aws(x.table_name)?, - table_namespace: try_from_aws(x.table_namespace)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_table_arn(Some(try_into_aws(x.table_arn)?)); - y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); - y = y.set_table_name(Some(try_into_aws(x.table_name)?)); - y = y.set_table_namespace(Some(try_into_aws(x.table_namespace)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +table_arn: try_from_aws(x.table_arn)?, +table_bucket_arn: try_from_aws(x.table_bucket_arn)?, +table_name: try_from_aws(x.table_name)?, +table_namespace: try_from_aws(x.table_namespace)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_table_arn(Some(try_into_aws(x.table_arn)?)); +y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); +y = y.set_table_name(Some(try_into_aws(x.table_name)?)); +y = y.set_table_namespace(Some(try_into_aws(x.table_namespace)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::SSEKMS { type Target = aws_sdk_s3::types::Ssekms; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - key_id: try_from_aws(x.key_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +key_id: try_from_aws(x.key_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_key_id(Some(try_into_aws(x.key_id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_key_id(Some(try_into_aws(x.key_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::SSES3 { type Target = aws_sdk_s3::types::Sses3; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ScanRange { type Target = aws_sdk_s3::types::ScanRange; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - end: try_from_aws(x.end)?, - start: try_from_aws(x.start)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +end: try_from_aws(x.end)?, +start: try_from_aws(x.start)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_end(try_into_aws(x.end)?); - y = y.set_start(try_into_aws(x.start)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_end(try_into_aws(x.end)?); +y = y.set_start(try_into_aws(x.start)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::SelectObjectContentEvent { type Target = aws_sdk_s3::types::SelectObjectContentEventStream; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::SelectObjectContentEventStream::Cont(v) => Self::Cont(try_from_aws(v)?), - aws_sdk_s3::types::SelectObjectContentEventStream::End(v) => Self::End(try_from_aws(v)?), - aws_sdk_s3::types::SelectObjectContentEventStream::Progress(v) => Self::Progress(try_from_aws(v)?), - aws_sdk_s3::types::SelectObjectContentEventStream::Records(v) => Self::Records(try_from_aws(v)?), - aws_sdk_s3::types::SelectObjectContentEventStream::Stats(v) => Self::Stats(try_from_aws(v)?), - _ => unimplemented!("unknown variant of aws_sdk_s3::types::SelectObjectContentEventStream: {x:?}"), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(match x { - Self::Cont(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Cont(try_into_aws(v)?), - Self::End(v) => aws_sdk_s3::types::SelectObjectContentEventStream::End(try_into_aws(v)?), - Self::Progress(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Progress(try_into_aws(v)?), - Self::Records(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Records(try_into_aws(v)?), - Self::Stats(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Stats(try_into_aws(v)?), - _ => unimplemented!("unknown variant of SelectObjectContentEvent: {x:?}"), - }) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::SelectObjectContentEventStream::Cont(v) => Self::Cont(try_from_aws(v)?), +aws_sdk_s3::types::SelectObjectContentEventStream::End(v) => Self::End(try_from_aws(v)?), +aws_sdk_s3::types::SelectObjectContentEventStream::Progress(v) => Self::Progress(try_from_aws(v)?), +aws_sdk_s3::types::SelectObjectContentEventStream::Records(v) => Self::Records(try_from_aws(v)?), +aws_sdk_s3::types::SelectObjectContentEventStream::Stats(v) => Self::Stats(try_from_aws(v)?), +_ => unimplemented!("unknown variant of aws_sdk_s3::types::SelectObjectContentEventStream: {x:?}"), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(match x { +Self::Cont(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Cont(try_into_aws(v)?), +Self::End(v) => aws_sdk_s3::types::SelectObjectContentEventStream::End(try_into_aws(v)?), +Self::Progress(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Progress(try_into_aws(v)?), +Self::Records(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Records(try_into_aws(v)?), +Self::Stats(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Stats(try_into_aws(v)?), +_ => unimplemented!("unknown variant of SelectObjectContentEvent: {x:?}"), +}) +} } impl AwsConversion for s3s::dto::SelectObjectContentOutput { type Target = aws_sdk_s3::operation::select_object_content::SelectObjectContentOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - payload: Some(crate::event_stream::from_aws(x.payload)), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +payload: Some(crate::event_stream::from_aws(x.payload)), +}) +} - fn try_into_aws(x: Self) -> S3Result { - drop(x); - unimplemented!("See https://github.com/Nugine/s3s/issues/5") - } +fn try_into_aws(x: Self) -> S3Result { +drop(x); +unimplemented!("See https://github.com/Nugine/s3s/issues/5") +} } impl AwsConversion for s3s::dto::SelectParameters { type Target = aws_sdk_s3::types::SelectParameters; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - expression: try_from_aws(x.expression)?, - expression_type: try_from_aws(x.expression_type)?, - input_serialization: unwrap_from_aws(x.input_serialization, "input_serialization")?, - output_serialization: unwrap_from_aws(x.output_serialization, "output_serialization")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_expression(Some(try_into_aws(x.expression)?)); - y = y.set_expression_type(Some(try_into_aws(x.expression_type)?)); - y = y.set_input_serialization(Some(try_into_aws(x.input_serialization)?)); - y = y.set_output_serialization(Some(try_into_aws(x.output_serialization)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +expression: try_from_aws(x.expression)?, +expression_type: try_from_aws(x.expression_type)?, +input_serialization: unwrap_from_aws(x.input_serialization, "input_serialization")?, +output_serialization: unwrap_from_aws(x.output_serialization, "output_serialization")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_expression(Some(try_into_aws(x.expression)?)); +y = y.set_expression_type(Some(try_into_aws(x.expression_type)?)); +y = y.set_input_serialization(Some(try_into_aws(x.input_serialization)?)); +y = y.set_output_serialization(Some(try_into_aws(x.output_serialization)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ServerSideEncryption { type Target = aws_sdk_s3::types::ServerSideEncryption; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ServerSideEncryption::Aes256 => Self::from_static(Self::AES256), - aws_sdk_s3::types::ServerSideEncryption::AwsKms => Self::from_static(Self::AWS_KMS), - aws_sdk_s3::types::ServerSideEncryption::AwsKmsDsse => Self::from_static(Self::AWS_KMS_DSSE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ServerSideEncryption::Aes256 => Self::from_static(Self::AES256), +aws_sdk_s3::types::ServerSideEncryption::AwsKms => Self::from_static(Self::AWS_KMS), +aws_sdk_s3::types::ServerSideEncryption::AwsKmsDsse => Self::from_static(Self::AWS_KMS_DSSE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ServerSideEncryption::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ServerSideEncryption::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ServerSideEncryptionByDefault { type Target = aws_sdk_s3::types::ServerSideEncryptionByDefault; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - kms_master_key_id: try_from_aws(x.kms_master_key_id)?, - sse_algorithm: try_from_aws(x.sse_algorithm)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +kms_master_key_id: try_from_aws(x.kms_master_key_id)?, +sse_algorithm: try_from_aws(x.sse_algorithm)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_kms_master_key_id(try_into_aws(x.kms_master_key_id)?); - y = y.set_sse_algorithm(Some(try_into_aws(x.sse_algorithm)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_kms_master_key_id(try_into_aws(x.kms_master_key_id)?); +y = y.set_sse_algorithm(Some(try_into_aws(x.sse_algorithm)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ServerSideEncryptionConfiguration { type Target = aws_sdk_s3::types::ServerSideEncryptionConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - rules: try_from_aws(x.rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +rules: try_from_aws(x.rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_rules(Some(try_into_aws(x.rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_rules(Some(try_into_aws(x.rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ServerSideEncryptionRule { type Target = aws_sdk_s3::types::ServerSideEncryptionRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - apply_server_side_encryption_by_default: try_from_aws(x.apply_server_side_encryption_by_default)?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +apply_server_side_encryption_by_default: try_from_aws(x.apply_server_side_encryption_by_default)?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_apply_server_side_encryption_by_default(try_into_aws(x.apply_server_side_encryption_by_default)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_apply_server_side_encryption_by_default(try_into_aws(x.apply_server_side_encryption_by_default)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::SessionCredentials { type Target = aws_sdk_s3::types::SessionCredentials; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_key_id: try_from_aws(x.access_key_id)?, - expiration: try_from_aws(x.expiration)?, - secret_access_key: try_from_aws(x.secret_access_key)?, - session_token: try_from_aws(x.session_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_key_id(Some(try_into_aws(x.access_key_id)?)); - y = y.set_expiration(Some(try_into_aws(x.expiration)?)); - y = y.set_secret_access_key(Some(try_into_aws(x.secret_access_key)?)); - y = y.set_session_token(Some(try_into_aws(x.session_token)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_key_id: try_from_aws(x.access_key_id)?, +expiration: try_from_aws(x.expiration)?, +secret_access_key: try_from_aws(x.secret_access_key)?, +session_token: try_from_aws(x.session_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_key_id(Some(try_into_aws(x.access_key_id)?)); +y = y.set_expiration(Some(try_into_aws(x.expiration)?)); +y = y.set_secret_access_key(Some(try_into_aws(x.secret_access_key)?)); +y = y.set_session_token(Some(try_into_aws(x.session_token)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::SessionMode { type Target = aws_sdk_s3::types::SessionMode; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::SessionMode::ReadOnly => Self::from_static(Self::READ_ONLY), - aws_sdk_s3::types::SessionMode::ReadWrite => Self::from_static(Self::READ_WRITE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::SessionMode::ReadOnly => Self::from_static(Self::READ_ONLY), +aws_sdk_s3::types::SessionMode::ReadWrite => Self::from_static(Self::READ_WRITE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::SessionMode::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::SessionMode::from(x.as_str())) +} } impl AwsConversion for s3s::dto::SimplePrefix { type Target = aws_sdk_s3::types::SimplePrefix; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::SourceSelectionCriteria { type Target = aws_sdk_s3::types::SourceSelectionCriteria; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - replica_modifications: try_from_aws(x.replica_modifications)?, - sse_kms_encrypted_objects: try_from_aws(x.sse_kms_encrypted_objects)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +replica_modifications: try_from_aws(x.replica_modifications)?, +sse_kms_encrypted_objects: try_from_aws(x.sse_kms_encrypted_objects)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_replica_modifications(try_into_aws(x.replica_modifications)?); - y = y.set_sse_kms_encrypted_objects(try_into_aws(x.sse_kms_encrypted_objects)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_replica_modifications(try_into_aws(x.replica_modifications)?); +y = y.set_sse_kms_encrypted_objects(try_into_aws(x.sse_kms_encrypted_objects)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::SseKmsEncryptedObjects { type Target = aws_sdk_s3::types::SseKmsEncryptedObjects; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::SseKmsEncryptedObjectsStatus { type Target = aws_sdk_s3::types::SseKmsEncryptedObjectsStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Stats { type Target = aws_sdk_s3::types::Stats; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bytes_processed: try_from_aws(x.bytes_processed)?, - bytes_returned: try_from_aws(x.bytes_returned)?, - bytes_scanned: try_from_aws(x.bytes_scanned)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bytes_processed: try_from_aws(x.bytes_processed)?, +bytes_returned: try_from_aws(x.bytes_returned)?, +bytes_scanned: try_from_aws(x.bytes_scanned)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); - y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); - y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); +y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); +y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::StatsEvent { type Target = aws_sdk_s3::types::StatsEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - details: try_from_aws(x.details)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +details: try_from_aws(x.details)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_details(try_into_aws(x.details)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_details(try_into_aws(x.details)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::StorageClass { type Target = aws_sdk_s3::types::StorageClass; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::StorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), - aws_sdk_s3::types::StorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), - aws_sdk_s3::types::StorageClass::Glacier => Self::from_static(Self::GLACIER), - aws_sdk_s3::types::StorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), - aws_sdk_s3::types::StorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), - aws_sdk_s3::types::StorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), - aws_sdk_s3::types::StorageClass::Outposts => Self::from_static(Self::OUTPOSTS), - aws_sdk_s3::types::StorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), - aws_sdk_s3::types::StorageClass::Snow => Self::from_static(Self::SNOW), - aws_sdk_s3::types::StorageClass::Standard => Self::from_static(Self::STANDARD), - aws_sdk_s3::types::StorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::StorageClass::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::StorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), +aws_sdk_s3::types::StorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), +aws_sdk_s3::types::StorageClass::Glacier => Self::from_static(Self::GLACIER), +aws_sdk_s3::types::StorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), +aws_sdk_s3::types::StorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), +aws_sdk_s3::types::StorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), +aws_sdk_s3::types::StorageClass::Outposts => Self::from_static(Self::OUTPOSTS), +aws_sdk_s3::types::StorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), +aws_sdk_s3::types::StorageClass::Snow => Self::from_static(Self::SNOW), +aws_sdk_s3::types::StorageClass::Standard => Self::from_static(Self::STANDARD), +aws_sdk_s3::types::StorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::StorageClass::from(x.as_str())) +} } impl AwsConversion for s3s::dto::StorageClassAnalysis { type Target = aws_sdk_s3::types::StorageClassAnalysis; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - data_export: try_from_aws(x.data_export)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +data_export: try_from_aws(x.data_export)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_data_export(try_into_aws(x.data_export)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_data_export(try_into_aws(x.data_export)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::StorageClassAnalysisDataExport { type Target = aws_sdk_s3::types::StorageClassAnalysisDataExport; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - destination: unwrap_from_aws(x.destination, "destination")?, - output_schema_version: try_from_aws(x.output_schema_version)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +destination: unwrap_from_aws(x.destination, "destination")?, +output_schema_version: try_from_aws(x.output_schema_version)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_destination(Some(try_into_aws(x.destination)?)); - y = y.set_output_schema_version(Some(try_into_aws(x.output_schema_version)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_destination(Some(try_into_aws(x.destination)?)); +y = y.set_output_schema_version(Some(try_into_aws(x.output_schema_version)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::StorageClassAnalysisSchemaVersion { type Target = aws_sdk_s3::types::StorageClassAnalysisSchemaVersion; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::V1 => Self::from_static(Self::V_1), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::V1 => Self::from_static(Self::V_1), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Tagging { type Target = aws_sdk_s3::types::Tagging; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - tag_set: try_from_aws(x.tag_set)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +tag_set: try_from_aws(x.tag_set)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::TaggingDirective { type Target = aws_sdk_s3::types::TaggingDirective; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::TaggingDirective::Copy => Self::from_static(Self::COPY), - aws_sdk_s3::types::TaggingDirective::Replace => Self::from_static(Self::REPLACE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::TaggingDirective::Copy => Self::from_static(Self::COPY), +aws_sdk_s3::types::TaggingDirective::Replace => Self::from_static(Self::REPLACE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::TaggingDirective::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::TaggingDirective::from(x.as_str())) +} } impl AwsConversion for s3s::dto::TargetGrant { type Target = aws_sdk_s3::types::TargetGrant; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grantee: try_from_aws(x.grantee)?, - permission: try_from_aws(x.permission)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grantee: try_from_aws(x.grantee)?, +permission: try_from_aws(x.permission)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grantee(try_into_aws(x.grantee)?); - y = y.set_permission(try_into_aws(x.permission)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grantee(try_into_aws(x.grantee)?); +y = y.set_permission(try_into_aws(x.permission)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::TargetObjectKeyFormat { type Target = aws_sdk_s3::types::TargetObjectKeyFormat; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - partitioned_prefix: try_from_aws(x.partitioned_prefix)?, - simple_prefix: try_from_aws(x.simple_prefix)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +partitioned_prefix: try_from_aws(x.partitioned_prefix)?, +simple_prefix: try_from_aws(x.simple_prefix)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_partitioned_prefix(try_into_aws(x.partitioned_prefix)?); - y = y.set_simple_prefix(try_into_aws(x.simple_prefix)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_partitioned_prefix(try_into_aws(x.partitioned_prefix)?); +y = y.set_simple_prefix(try_into_aws(x.simple_prefix)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Tier { type Target = aws_sdk_s3::types::Tier; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Tier::Bulk => Self::from_static(Self::BULK), - aws_sdk_s3::types::Tier::Expedited => Self::from_static(Self::EXPEDITED), - aws_sdk_s3::types::Tier::Standard => Self::from_static(Self::STANDARD), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Tier::Bulk => Self::from_static(Self::BULK), +aws_sdk_s3::types::Tier::Expedited => Self::from_static(Self::EXPEDITED), +aws_sdk_s3::types::Tier::Standard => Self::from_static(Self::STANDARD), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Tier::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Tier::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Tiering { type Target = aws_sdk_s3::types::Tiering; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_tier: try_from_aws(x.access_tier)?, - days: try_from_aws(x.days)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_tier: try_from_aws(x.access_tier)?, +days: try_from_aws(x.days)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_tier(Some(try_into_aws(x.access_tier)?)); - y = y.set_days(Some(try_into_aws(x.days)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_tier(Some(try_into_aws(x.access_tier)?)); +y = y.set_days(Some(try_into_aws(x.days)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::TooManyParts { type Target = aws_sdk_s3::types::error::TooManyParts; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::TopicConfiguration { type Target = aws_sdk_s3::types::TopicConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - events: try_from_aws(x.events)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - topic_arn: try_from_aws(x.topic_arn)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_events(Some(try_into_aws(x.events)?)); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_topic_arn(Some(try_into_aws(x.topic_arn)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +events: try_from_aws(x.events)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +topic_arn: try_from_aws(x.topic_arn)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_events(Some(try_into_aws(x.events)?)); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_topic_arn(Some(try_into_aws(x.topic_arn)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::Transition { type Target = aws_sdk_s3::types::Transition; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - date: try_from_aws(x.date)?, - days: try_from_aws(x.days)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +date: try_from_aws(x.date)?, +days: try_from_aws(x.days)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_date(try_into_aws(x.date)?); - y = y.set_days(try_into_aws(x.days)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_date(try_into_aws(x.date)?); +y = y.set_days(try_into_aws(x.days)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::TransitionDefaultMinimumObjectSize { type Target = aws_sdk_s3::types::TransitionDefaultMinimumObjectSize; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::AllStorageClasses128K => { - Self::from_static(Self::ALL_STORAGE_CLASSES_128K) - } - aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::VariesByStorageClass => { - Self::from_static(Self::VARIES_BY_STORAGE_CLASS) - } - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::AllStorageClasses128K => Self::from_static(Self::ALL_STORAGE_CLASSES_128K), +aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::VariesByStorageClass => Self::from_static(Self::VARIES_BY_STORAGE_CLASS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::from(x.as_str())) +} } impl AwsConversion for s3s::dto::TransitionStorageClass { type Target = aws_sdk_s3::types::TransitionStorageClass; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::TransitionStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), - aws_sdk_s3::types::TransitionStorageClass::Glacier => Self::from_static(Self::GLACIER), - aws_sdk_s3::types::TransitionStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), - aws_sdk_s3::types::TransitionStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), - aws_sdk_s3::types::TransitionStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), - aws_sdk_s3::types::TransitionStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::TransitionStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), +aws_sdk_s3::types::TransitionStorageClass::Glacier => Self::from_static(Self::GLACIER), +aws_sdk_s3::types::TransitionStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), +aws_sdk_s3::types::TransitionStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), +aws_sdk_s3::types::TransitionStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), +aws_sdk_s3::types::TransitionStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::TransitionStorageClass::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::TransitionStorageClass::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Type { type Target = aws_sdk_s3::types::Type; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Type::AmazonCustomerByEmail => Self::from_static(Self::AMAZON_CUSTOMER_BY_EMAIL), - aws_sdk_s3::types::Type::CanonicalUser => Self::from_static(Self::CANONICAL_USER), - aws_sdk_s3::types::Type::Group => Self::from_static(Self::GROUP), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Type::AmazonCustomerByEmail => Self::from_static(Self::AMAZON_CUSTOMER_BY_EMAIL), +aws_sdk_s3::types::Type::CanonicalUser => Self::from_static(Self::CANONICAL_USER), +aws_sdk_s3::types::Type::Group => Self::from_static(Self::GROUP), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Type::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Type::from(x.as_str())) +} } impl AwsConversion for s3s::dto::UploadPartCopyInput { type Target = aws_sdk_s3::operation::upload_part_copy::UploadPartCopyInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, - copy_source_if_match: try_from_aws(x.copy_source_if_match)?, - copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, - copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, - copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, - copy_source_range: try_from_aws(x.copy_source_range)?, - copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, - copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, - copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - part_number: unwrap_from_aws(x.part_number, "part_number")?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); - y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); - y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); - y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); - y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); - y = y.set_copy_source_range(try_into_aws(x.copy_source_range)?); - y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); - y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); - y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_part_number(Some(try_into_aws(x.part_number)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, +copy_source_if_match: try_from_aws(x.copy_source_if_match)?, +copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, +copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, +copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, +copy_source_range: try_from_aws(x.copy_source_range)?, +copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, +copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, +copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +part_number: unwrap_from_aws(x.part_number, "part_number")?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); +y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); +y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); +y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); +y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); +y = y.set_copy_source_range(try_into_aws(x.copy_source_range)?); +y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); +y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); +y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_part_number(Some(try_into_aws(x.part_number)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::UploadPartCopyOutput { type Target = aws_sdk_s3::operation::upload_part_copy::UploadPartCopyOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - copy_part_result: try_from_aws(x.copy_part_result)?, - copy_source_version_id: try_from_aws(x.copy_source_version_id)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_copy_part_result(try_into_aws(x.copy_part_result)?); - y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +copy_part_result: try_from_aws(x.copy_part_result)?, +copy_source_version_id: try_from_aws(x.copy_source_version_id)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_copy_part_result(try_into_aws(x.copy_part_result)?); +y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::UploadPartInput { type Target = aws_sdk_s3::operation::upload_part::UploadPartInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - body: Some(try_from_aws(x.body)?), - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - content_length: try_from_aws(x.content_length)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - part_number: unwrap_from_aws(x.part_number, "part_number")?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_part_number(Some(try_into_aws(x.part_number)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +body: Some(try_from_aws(x.body)?), +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +content_length: try_from_aws(x.content_length)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +part_number: unwrap_from_aws(x.part_number, "part_number")?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_part_number(Some(try_into_aws(x.part_number)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::UploadPartOutput { type Target = aws_sdk_s3::operation::upload_part::UploadPartOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - e_tag: try_from_aws(x.e_tag)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +e_tag: try_from_aws(x.e_tag)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::VersioningConfiguration { type Target = aws_sdk_s3::types::VersioningConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - exclude_folders: None, - excluded_prefixes: None, - mfa_delete: try_from_aws(x.mfa_delete)?, - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +exclude_folders: None, +excluded_prefixes: None, +mfa_delete: try_from_aws(x.mfa_delete)?, +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::WebsiteConfiguration { type Target = aws_sdk_s3::types::WebsiteConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - error_document: try_from_aws(x.error_document)?, - index_document: try_from_aws(x.index_document)?, - redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, - routing_rules: try_from_aws(x.routing_rules)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_error_document(try_into_aws(x.error_document)?); - y = y.set_index_document(try_into_aws(x.index_document)?); - y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); - y = y.set_routing_rules(try_into_aws(x.routing_rules)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +error_document: try_from_aws(x.error_document)?, +index_document: try_from_aws(x.index_document)?, +redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, +routing_rules: try_from_aws(x.routing_rules)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_error_document(try_into_aws(x.error_document)?); +y = y.set_index_document(try_into_aws(x.index_document)?); +y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); +y = y.set_routing_rules(try_into_aws(x.routing_rules)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::WriteGetObjectResponseInput { type Target = aws_sdk_s3::operation::write_get_object_response::WriteGetObjectResponseInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - accept_ranges: try_from_aws(x.accept_ranges)?, - body: Some(try_from_aws(x.body)?), - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_length: try_from_aws(x.content_length)?, - content_range: try_from_aws(x.content_range)?, - content_type: try_from_aws(x.content_type)?, - delete_marker: try_from_aws(x.delete_marker)?, - e_tag: try_from_aws(x.e_tag)?, - error_code: try_from_aws(x.error_code)?, - error_message: try_from_aws(x.error_message)?, - expiration: try_from_aws(x.expiration)?, - expires: try_from_aws(x.expires)?, - last_modified: try_from_aws(x.last_modified)?, - metadata: try_from_aws(x.metadata)?, - missing_meta: try_from_aws(x.missing_meta)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - parts_count: try_from_aws(x.parts_count)?, - replication_status: try_from_aws(x.replication_status)?, - request_charged: try_from_aws(x.request_charged)?, - request_route: unwrap_from_aws(x.request_route, "request_route")?, - request_token: unwrap_from_aws(x.request_token, "request_token")?, - restore: try_from_aws(x.restore)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - status_code: try_from_aws(x.status_code)?, - storage_class: try_from_aws(x.storage_class)?, - tag_count: try_from_aws(x.tag_count)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_range(try_into_aws(x.content_range)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_error_code(try_into_aws(x.error_code)?); - y = y.set_error_message(try_into_aws(x.error_message)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_missing_meta(try_into_aws(x.missing_meta)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_parts_count(try_into_aws(x.parts_count)?); - y = y.set_replication_status(try_into_aws(x.replication_status)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_request_route(Some(try_into_aws(x.request_route)?)); - y = y.set_request_token(Some(try_into_aws(x.request_token)?)); - y = y.set_restore(try_into_aws(x.restore)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_status_code(try_into_aws(x.status_code)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tag_count(try_into_aws(x.tag_count)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +accept_ranges: try_from_aws(x.accept_ranges)?, +body: Some(try_from_aws(x.body)?), +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_length: try_from_aws(x.content_length)?, +content_range: try_from_aws(x.content_range)?, +content_type: try_from_aws(x.content_type)?, +delete_marker: try_from_aws(x.delete_marker)?, +e_tag: try_from_aws(x.e_tag)?, +error_code: try_from_aws(x.error_code)?, +error_message: try_from_aws(x.error_message)?, +expiration: try_from_aws(x.expiration)?, +expires: try_from_aws(x.expires)?, +last_modified: try_from_aws(x.last_modified)?, +metadata: try_from_aws(x.metadata)?, +missing_meta: try_from_aws(x.missing_meta)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +parts_count: try_from_aws(x.parts_count)?, +replication_status: try_from_aws(x.replication_status)?, +request_charged: try_from_aws(x.request_charged)?, +request_route: unwrap_from_aws(x.request_route, "request_route")?, +request_token: unwrap_from_aws(x.request_token, "request_token")?, +restore: try_from_aws(x.restore)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +status_code: try_from_aws(x.status_code)?, +storage_class: try_from_aws(x.storage_class)?, +tag_count: try_from_aws(x.tag_count)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_range(try_into_aws(x.content_range)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_error_code(try_into_aws(x.error_code)?); +y = y.set_error_message(try_into_aws(x.error_message)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_missing_meta(try_into_aws(x.missing_meta)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_parts_count(try_into_aws(x.parts_count)?); +y = y.set_replication_status(try_into_aws(x.replication_status)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_request_route(Some(try_into_aws(x.request_route)?)); +y = y.set_request_token(Some(try_into_aws(x.request_token)?)); +y = y.set_restore(try_into_aws(x.restore)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_status_code(try_into_aws(x.status_code)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tag_count(try_into_aws(x.tag_count)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::WriteGetObjectResponseOutput { type Target = aws_sdk_s3::operation::write_get_object_response::WriteGetObjectResponseOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } + diff --git a/crates/s3s/src/dto/generated_minio.rs b/crates/s3s/src/dto/generated_minio.rs index 4879d5ba..8473402c 100644 --- a/crates/s3s/src/dto/generated_minio.rs +++ b/crates/s3s/src/dto/generated_minio.rs @@ -13,8 +13,8 @@ use std::fmt; use std::str::FromStr; use futures::future::BoxFuture; -use serde::{Deserialize, Serialize}; use stdx::default::default; +use serde::{Serialize, Deserialize}; pub type AbortDate = Timestamp; @@ -24,83 +24,84 @@ pub type AbortDate = Timestamp; /// the Amazon S3 User Guide.

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AbortIncompleteMultipartUpload { - ///

Specifies the number of days after which Amazon S3 aborts an incomplete multipart - /// upload.

+///

Specifies the number of days after which Amazon S3 aborts an incomplete multipart +/// upload.

pub days_after_initiation: Option, } impl fmt::Debug for AbortIncompleteMultipartUpload { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AbortIncompleteMultipartUpload"); - if let Some(ref val) = self.days_after_initiation { - d.field("days_after_initiation", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AbortIncompleteMultipartUpload"); +if let Some(ref val) = self.days_after_initiation { +d.field("days_after_initiation", val); +} +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct AbortMultipartUploadInput { - ///

The bucket name to which the upload was taking place.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+///

The bucket name to which the upload was taking place.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp. - /// If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. - /// If the initiated timestamp matches or if the multipart upload doesn’t exist, the operation returns a 204 Success (No Content) response. - ///

- /// - ///

This functionality is only supported for directory buckets.

- ///
+///

If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp. +/// If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. +/// If the initiated timestamp matches or if the multipart upload doesn’t exist, the operation returns a 204 Success (No Content) response. +///

+/// +///

This functionality is only supported for directory buckets.

+///
pub if_match_initiated_time: Option, - ///

Key of the object for which the multipart upload was initiated.

+///

Key of the object for which the multipart upload was initiated.

pub key: ObjectKey, pub request_payer: Option, - ///

Upload ID that identifies the multipart upload.

+///

Upload ID that identifies the multipart upload.

pub upload_id: MultipartUploadId, } impl fmt::Debug for AbortMultipartUploadInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AbortMultipartUploadInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match_initiated_time { - d.field("if_match_initiated_time", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AbortMultipartUploadInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match_initiated_time { +d.field("if_match_initiated_time", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() +} } impl AbortMultipartUploadInput { - #[must_use] - pub fn builder() -> builders::AbortMultipartUploadInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::AbortMultipartUploadInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] @@ -109,15 +110,16 @@ pub struct AbortMultipartUploadOutput { } impl fmt::Debug for AbortMultipartUploadOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AbortMultipartUploadOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AbortMultipartUploadOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} } + pub type AbortRuleId = String; ///

Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see @@ -125,59 +127,62 @@ pub type AbortRuleId = String; /// Transfer Acceleration in the Amazon S3 User Guide.

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AccelerateConfiguration { - ///

Specifies the transfer acceleration status of the bucket.

+///

Specifies the transfer acceleration status of the bucket.

pub status: Option, } impl fmt::Debug for AccelerateConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AccelerateConfiguration"); - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AccelerateConfiguration"); +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() } +} + pub type AcceptRanges = String; ///

Contains the elements that set the ACL permissions for an object per grantee.

#[derive(Clone, Default, PartialEq)] pub struct AccessControlPolicy { - ///

A list of grants.

+///

A list of grants.

pub grants: Option, - ///

Container for the bucket owner's display name and ID.

+///

Container for the bucket owner's display name and ID.

pub owner: Option, } impl fmt::Debug for AccessControlPolicy { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AccessControlPolicy"); - if let Some(ref val) = self.grants { - d.field("grants", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AccessControlPolicy"); +if let Some(ref val) = self.grants { +d.field("grants", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +d.finish_non_exhaustive() +} } + ///

A container for information about access control for replicas.

#[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AccessControlTranslation { - ///

Specifies the replica ownership. For default and valid values, see PUT bucket - /// replication in the Amazon S3 API Reference.

+///

Specifies the replica ownership. For default and valid values, see PUT bucket +/// replication in the Amazon S3 API Reference.

pub owner: OwnerOverride, } impl fmt::Debug for AccessControlTranslation { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AccessControlTranslation"); - d.field("owner", &self.owner); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AccessControlTranslation"); +d.field("owner", &self.owner); +d.finish_non_exhaustive() } +} + pub type AccessKeyIdType = String; @@ -210,79 +215,82 @@ pub type AllowedOrigins = List; /// all of the predicates for the filter to apply.

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AnalyticsAndOperator { - ///

The prefix to use when evaluating an AND predicate: The prefix that an object must have - /// to be included in the metrics results.

+///

The prefix to use when evaluating an AND predicate: The prefix that an object must have +/// to be included in the metrics results.

pub prefix: Option, - ///

The list of tags to use when evaluating an AND predicate.

+///

The list of tags to use when evaluating an AND predicate.

pub tags: Option, } impl fmt::Debug for AnalyticsAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AnalyticsAndOperator"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AnalyticsAndOperator"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} } + ///

Specifies the configuration and any analyses for the analytics filter of an Amazon S3 /// bucket.

#[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsConfiguration { - ///

The filter used to describe a set of objects for analyses. A filter must have exactly - /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, - /// all objects will be considered in any analysis.

+///

The filter used to describe a set of objects for analyses. A filter must have exactly +/// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, +/// all objects will be considered in any analysis.

pub filter: Option, - ///

The ID that identifies the analytics configuration.

+///

The ID that identifies the analytics configuration.

pub id: AnalyticsId, - ///

Contains data related to access patterns to be collected and made available to analyze - /// the tradeoffs between different storage classes.

+///

Contains data related to access patterns to be collected and made available to analyze +/// the tradeoffs between different storage classes.

pub storage_class_analysis: StorageClassAnalysis, } impl fmt::Debug for AnalyticsConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AnalyticsConfiguration"); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - d.field("id", &self.id); - d.field("storage_class_analysis", &self.storage_class_analysis); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AnalyticsConfiguration"); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +d.field("id", &self.id); +d.field("storage_class_analysis", &self.storage_class_analysis); +d.finish_non_exhaustive() +} } impl Default for AnalyticsConfiguration { - fn default() -> Self { - Self { - filter: None, - id: default(), - storage_class_analysis: default(), - } - } +fn default() -> Self { +Self { +filter: None, +id: default(), +storage_class_analysis: default(), +} +} } + pub type AnalyticsConfigurationList = List; ///

Where to publish the analytics results.

#[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsExportDestination { - ///

A destination signifying output to an S3 bucket.

+///

A destination signifying output to an S3 bucket.

pub s3_bucket_destination: AnalyticsS3BucketDestination, } impl fmt::Debug for AnalyticsExportDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AnalyticsExportDestination"); - d.field("s3_bucket_destination", &self.s3_bucket_destination); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AnalyticsExportDestination"); +d.field("s3_bucket_destination", &self.s3_bucket_destination); +d.finish_non_exhaustive() } +} + ///

The filter used to describe a set of objects for analyses. A filter must have exactly /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, @@ -291,12 +299,12 @@ impl fmt::Debug for AnalyticsExportDestination { #[non_exhaustive] #[serde(rename_all = "PascalCase")] pub enum AnalyticsFilter { - ///

A conjunction (logical AND) of predicates, which is used in evaluating an analytics - /// filter. The operator must have at least two predicates.

+///

A conjunction (logical AND) of predicates, which is used in evaluating an analytics +/// filter. The operator must have at least two predicates.

And(AnalyticsAndOperator), - ///

The prefix to use when evaluating an analytics filter.

+///

The prefix to use when evaluating an analytics filter.

Prefix(Prefix), - ///

The tag to use when evaluating an analytics filter.

+///

The tag to use when evaluating an analytics filter.

Tag(Tag), } @@ -305,108 +313,111 @@ pub type AnalyticsId = String; ///

Contains information about where to publish the analytics results.

#[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsS3BucketDestination { - ///

The Amazon Resource Name (ARN) of the bucket to which data is exported.

+///

The Amazon Resource Name (ARN) of the bucket to which data is exported.

pub bucket: BucketName, - ///

The account ID that owns the destination S3 bucket. If no account ID is provided, the - /// owner is not validated before exporting data.

- /// - ///

Although this value is optional, we strongly recommend that you set it to help - /// prevent problems if the destination bucket ownership changes.

- ///
+///

The account ID that owns the destination S3 bucket. If no account ID is provided, the +/// owner is not validated before exporting data.

+/// +///

Although this value is optional, we strongly recommend that you set it to help +/// prevent problems if the destination bucket ownership changes.

+///
pub bucket_account_id: Option, - ///

Specifies the file format used when exporting data to Amazon S3.

+///

Specifies the file format used when exporting data to Amazon S3.

pub format: AnalyticsS3ExportFileFormat, - ///

The prefix to use when exporting data. The prefix is prepended to all results.

+///

The prefix to use when exporting data. The prefix is prepended to all results.

pub prefix: Option, } impl fmt::Debug for AnalyticsS3BucketDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AnalyticsS3BucketDestination"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_account_id { - d.field("bucket_account_id", val); - } - d.field("format", &self.format); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AnalyticsS3BucketDestination"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_account_id { +d.field("bucket_account_id", val); +} +d.field("format", &self.format); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AnalyticsS3ExportFileFormat(Cow<'static, str>); impl AnalyticsS3ExportFileFormat { - pub const CSV: &'static str = "CSV"; +pub const CSV: &'static str = "CSV"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for AnalyticsS3ExportFileFormat { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: AnalyticsS3ExportFileFormat) -> Self { - s.0 - } +fn from(s: AnalyticsS3ExportFileFormat) -> Self { +s.0 +} } impl FromStr for AnalyticsS3ExportFileFormat { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } #[derive(Debug, Clone, PartialEq, Eq)] pub struct ArchiveStatus(Cow<'static, str>); impl ArchiveStatus { - pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; +pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; - pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; +pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for ArchiveStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: ArchiveStatus) -> Self { - s.0 - } +fn from(s: ArchiveStatus) -> Self { +s.0 +} } impl FromStr for ArchiveStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type ArnType = String; @@ -415,57 +426,58 @@ pub type ArnType = String; /// temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

#[derive(Clone, Default, PartialEq)] pub struct AssumeRoleOutput { - ///

The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you - /// can use to refer to the resulting temporary security credentials. For example, you can - /// reference these credentials as a principal in a resource-based policy by using the ARN or - /// assumed role ID. The ARN and ID include the RoleSessionName that you specified - /// when you called AssumeRole.

+///

The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you +/// can use to refer to the resulting temporary security credentials. For example, you can +/// reference these credentials as a principal in a resource-based policy by using the ARN or +/// assumed role ID. The ARN and ID include the RoleSessionName that you specified +/// when you called AssumeRole.

pub assumed_role_user: Option, - ///

The temporary security credentials, which include an access key ID, a secret access key, - /// and a security (or session) token.

- /// - ///

The size of the security token that STS API operations return is not fixed. We - /// strongly recommend that you make no assumptions about the maximum size.

- ///
+///

The temporary security credentials, which include an access key ID, a secret access key, +/// and a security (or session) token.

+/// +///

The size of the security token that STS API operations return is not fixed. We +/// strongly recommend that you make no assumptions about the maximum size.

+///
pub credentials: Option, - ///

A percentage value that indicates the packed size of the session policies and session - /// tags combined passed in the request. The request fails if the packed size is greater than 100 percent, - /// which means the policies and tags exceeded the allowed space.

+///

A percentage value that indicates the packed size of the session policies and session +/// tags combined passed in the request. The request fails if the packed size is greater than 100 percent, +/// which means the policies and tags exceeded the allowed space.

pub packed_policy_size: Option, - ///

The source identity specified by the principal that is calling the - /// AssumeRole operation.

- ///

You can require users to specify a source identity when they assume a role. You do this - /// by using the sts:SourceIdentity condition key in a role trust policy. You can - /// use source identity information in CloudTrail logs to determine who took actions with a role. - /// You can use the aws:SourceIdentity condition key to further control access to - /// Amazon Web Services resources based on the value of source identity. For more information about using - /// source identity, see Monitor and control - /// actions taken with assumed roles in the - /// IAM User Guide.

- ///

The regex used to validate this parameter is a string of characters consisting of upper- - /// and lower-case alphanumeric characters with no spaces. You can also include underscores or - /// any of the following characters: =,.@-

+///

The source identity specified by the principal that is calling the +/// AssumeRole operation.

+///

You can require users to specify a source identity when they assume a role. You do this +/// by using the sts:SourceIdentity condition key in a role trust policy. You can +/// use source identity information in CloudTrail logs to determine who took actions with a role. +/// You can use the aws:SourceIdentity condition key to further control access to +/// Amazon Web Services resources based on the value of source identity. For more information about using +/// source identity, see Monitor and control +/// actions taken with assumed roles in the +/// IAM User Guide.

+///

The regex used to validate this parameter is a string of characters consisting of upper- +/// and lower-case alphanumeric characters with no spaces. You can also include underscores or +/// any of the following characters: =,.@-

pub source_identity: Option, } impl fmt::Debug for AssumeRoleOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AssumeRoleOutput"); - if let Some(ref val) = self.assumed_role_user { - d.field("assumed_role_user", val); - } - if let Some(ref val) = self.credentials { - d.field("credentials", val); - } - if let Some(ref val) = self.packed_policy_size { - d.field("packed_policy_size", val); - } - if let Some(ref val) = self.source_identity { - d.field("source_identity", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AssumeRoleOutput"); +if let Some(ref val) = self.assumed_role_user { +d.field("assumed_role_user", val); } +if let Some(ref val) = self.credentials { +d.field("credentials", val); +} +if let Some(ref val) = self.packed_policy_size { +d.field("packed_policy_size", val); +} +if let Some(ref val) = self.source_identity { +d.field("source_identity", val); +} +d.finish_non_exhaustive() +} +} + pub type AssumedRoleIdType = String; @@ -473,158 +485,167 @@ pub type AssumedRoleIdType = String; /// returns.

#[derive(Clone, Default, PartialEq)] pub struct AssumedRoleUser { - ///

The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in - /// policies, see IAM Identifiers in the - /// IAM User Guide.

+///

The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in +/// policies, see IAM Identifiers in the +/// IAM User Guide.

pub arn: ArnType, - ///

A unique identifier that contains the role ID and the role session name of the role that - /// is being assumed. The role ID is generated by Amazon Web Services when the role is created.

+///

A unique identifier that contains the role ID and the role session name of the role that +/// is being assumed. The role ID is generated by Amazon Web Services when the role is created.

pub assumed_role_id: AssumedRoleIdType, } impl fmt::Debug for AssumedRoleUser { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AssumedRoleUser"); - d.field("arn", &self.arn); - d.field("assumed_role_id", &self.assumed_role_id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AssumedRoleUser"); +d.field("arn", &self.arn); +d.field("assumed_role_id", &self.assumed_role_id); +d.finish_non_exhaustive() +} } + + ///

In terms of implementation, a Bucket is a resource.

#[derive(Clone, Default, PartialEq)] pub struct Bucket { - ///

- /// BucketRegion indicates the Amazon Web Services region where the bucket is located. If the - /// request contains at least one valid parameter, it is included in the response.

+///

+/// BucketRegion indicates the Amazon Web Services region where the bucket is located. If the +/// request contains at least one valid parameter, it is included in the response.

pub bucket_region: Option, - ///

Date the bucket was created. This date can change when making changes to your bucket, - /// such as editing its bucket policy.

+///

Date the bucket was created. This date can change when making changes to your bucket, +/// such as editing its bucket policy.

pub creation_date: Option, - ///

The name of the bucket.

+///

The name of the bucket.

pub name: Option, } impl fmt::Debug for Bucket { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Bucket"); - if let Some(ref val) = self.bucket_region { - d.field("bucket_region", val); - } - if let Some(ref val) = self.creation_date { - d.field("creation_date", val); - } - if let Some(ref val) = self.name { - d.field("name", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Bucket"); +if let Some(ref val) = self.bucket_region { +d.field("bucket_region", val); +} +if let Some(ref val) = self.creation_date { +d.field("creation_date", val); } +if let Some(ref val) = self.name { +d.field("name", val); +} +d.finish_non_exhaustive() +} +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketAccelerateStatus(Cow<'static, str>); impl BucketAccelerateStatus { - pub const ENABLED: &'static str = "Enabled"; +pub const ENABLED: &'static str = "Enabled"; - pub const SUSPENDED: &'static str = "Suspended"; +pub const SUSPENDED: &'static str = "Suspended"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketAccelerateStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketAccelerateStatus) -> Self { - s.0 - } +fn from(s: BucketAccelerateStatus) -> Self { +s.0 +} } impl FromStr for BucketAccelerateStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

The requested bucket name is not available. The bucket namespace is shared by all users /// of the system. Select a different name and try again.

#[derive(Clone, Default, PartialEq)] -pub struct BucketAlreadyExists {} +pub struct BucketAlreadyExists { +} impl fmt::Debug for BucketAlreadyExists { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketAlreadyExists"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketAlreadyExists"); +d.finish_non_exhaustive() +} } + ///

The bucket you tried to create already exists, and you own it. Amazon S3 returns this error /// in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you /// re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 /// returns 200 OK and resets the bucket access control lists (ACLs).

#[derive(Clone, Default, PartialEq)] -pub struct BucketAlreadyOwnedByYou {} +pub struct BucketAlreadyOwnedByYou { +} impl fmt::Debug for BucketAlreadyOwnedByYou { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketAlreadyOwnedByYou"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketAlreadyOwnedByYou"); +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq)] pub struct BucketCannedACL(Cow<'static, str>); impl BucketCannedACL { - pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; +pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; - pub const PRIVATE: &'static str = "private"; +pub const PRIVATE: &'static str = "private"; - pub const PUBLIC_READ: &'static str = "public-read"; +pub const PUBLIC_READ: &'static str = "public-read"; - pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; +pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketCannedACL { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketCannedACL) -> Self { - s.0 - } +fn from(s: BucketCannedACL) -> Self { +s.0 +} } impl FromStr for BucketCannedACL { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

Specifies the information about the bucket that will be created. For more information @@ -634,25 +655,26 @@ impl FromStr for BucketCannedACL { /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct BucketInfo { - ///

The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

+///

The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

pub data_redundancy: Option, - ///

The type of bucket.

+///

The type of bucket.

pub type_: Option, } impl fmt::Debug for BucketInfo { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketInfo"); - if let Some(ref val) = self.data_redundancy { - d.field("data_redundancy", val); - } - if let Some(ref val) = self.type_ { - d.field("type_", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketInfo"); +if let Some(ref val) = self.data_redundancy { +d.field("data_redundancy", val); +} +if let Some(ref val) = self.type_ { +d.field("type_", val); +} +d.finish_non_exhaustive() +} } + pub type BucketKeyEnabled = bool; ///

Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more @@ -660,116 +682,122 @@ pub type BucketKeyEnabled = bool; /// in the Amazon S3 User Guide.

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct BucketLifecycleConfiguration { - ///

A lifecycle rule for individual objects in an Amazon S3 bucket.

+ pub expiry_updated_at: Option, +///

A lifecycle rule for individual objects in an Amazon S3 bucket.

pub rules: LifecycleRules, } impl fmt::Debug for BucketLifecycleConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketLifecycleConfiguration"); - d.field("rules", &self.rules); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketLifecycleConfiguration"); +if let Some(ref val) = self.expiry_updated_at { +d.field("expiry_updated_at", val); +} +d.field("rules", &self.rules); +d.finish_non_exhaustive() } +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketLocationConstraint(Cow<'static, str>); impl BucketLocationConstraint { - pub const EU: &'static str = "EU"; +pub const EU: &'static str = "EU"; - pub const AF_SOUTH_1: &'static str = "af-south-1"; +pub const AF_SOUTH_1: &'static str = "af-south-1"; - pub const AP_EAST_1: &'static str = "ap-east-1"; +pub const AP_EAST_1: &'static str = "ap-east-1"; - pub const AP_NORTHEAST_1: &'static str = "ap-northeast-1"; +pub const AP_NORTHEAST_1: &'static str = "ap-northeast-1"; - pub const AP_NORTHEAST_2: &'static str = "ap-northeast-2"; +pub const AP_NORTHEAST_2: &'static str = "ap-northeast-2"; - pub const AP_NORTHEAST_3: &'static str = "ap-northeast-3"; +pub const AP_NORTHEAST_3: &'static str = "ap-northeast-3"; - pub const AP_SOUTH_1: &'static str = "ap-south-1"; +pub const AP_SOUTH_1: &'static str = "ap-south-1"; - pub const AP_SOUTH_2: &'static str = "ap-south-2"; +pub const AP_SOUTH_2: &'static str = "ap-south-2"; - pub const AP_SOUTHEAST_1: &'static str = "ap-southeast-1"; +pub const AP_SOUTHEAST_1: &'static str = "ap-southeast-1"; - pub const AP_SOUTHEAST_2: &'static str = "ap-southeast-2"; +pub const AP_SOUTHEAST_2: &'static str = "ap-southeast-2"; - pub const AP_SOUTHEAST_3: &'static str = "ap-southeast-3"; +pub const AP_SOUTHEAST_3: &'static str = "ap-southeast-3"; - pub const AP_SOUTHEAST_4: &'static str = "ap-southeast-4"; +pub const AP_SOUTHEAST_4: &'static str = "ap-southeast-4"; - pub const AP_SOUTHEAST_5: &'static str = "ap-southeast-5"; +pub const AP_SOUTHEAST_5: &'static str = "ap-southeast-5"; - pub const CA_CENTRAL_1: &'static str = "ca-central-1"; +pub const CA_CENTRAL_1: &'static str = "ca-central-1"; - pub const CN_NORTH_1: &'static str = "cn-north-1"; +pub const CN_NORTH_1: &'static str = "cn-north-1"; - pub const CN_NORTHWEST_1: &'static str = "cn-northwest-1"; +pub const CN_NORTHWEST_1: &'static str = "cn-northwest-1"; - pub const EU_CENTRAL_1: &'static str = "eu-central-1"; +pub const EU_CENTRAL_1: &'static str = "eu-central-1"; - pub const EU_CENTRAL_2: &'static str = "eu-central-2"; +pub const EU_CENTRAL_2: &'static str = "eu-central-2"; - pub const EU_NORTH_1: &'static str = "eu-north-1"; +pub const EU_NORTH_1: &'static str = "eu-north-1"; - pub const EU_SOUTH_1: &'static str = "eu-south-1"; +pub const EU_SOUTH_1: &'static str = "eu-south-1"; - pub const EU_SOUTH_2: &'static str = "eu-south-2"; +pub const EU_SOUTH_2: &'static str = "eu-south-2"; - pub const EU_WEST_1: &'static str = "eu-west-1"; +pub const EU_WEST_1: &'static str = "eu-west-1"; - pub const EU_WEST_2: &'static str = "eu-west-2"; +pub const EU_WEST_2: &'static str = "eu-west-2"; - pub const EU_WEST_3: &'static str = "eu-west-3"; +pub const EU_WEST_3: &'static str = "eu-west-3"; - pub const IL_CENTRAL_1: &'static str = "il-central-1"; +pub const IL_CENTRAL_1: &'static str = "il-central-1"; - pub const ME_CENTRAL_1: &'static str = "me-central-1"; +pub const ME_CENTRAL_1: &'static str = "me-central-1"; - pub const ME_SOUTH_1: &'static str = "me-south-1"; +pub const ME_SOUTH_1: &'static str = "me-south-1"; - pub const SA_EAST_1: &'static str = "sa-east-1"; +pub const SA_EAST_1: &'static str = "sa-east-1"; - pub const US_EAST_2: &'static str = "us-east-2"; +pub const US_EAST_2: &'static str = "us-east-2"; - pub const US_GOV_EAST_1: &'static str = "us-gov-east-1"; +pub const US_GOV_EAST_1: &'static str = "us-gov-east-1"; - pub const US_GOV_WEST_1: &'static str = "us-gov-west-1"; +pub const US_GOV_WEST_1: &'static str = "us-gov-west-1"; - pub const US_WEST_1: &'static str = "us-west-1"; +pub const US_WEST_1: &'static str = "us-west-1"; - pub const US_WEST_2: &'static str = "us-west-2"; +pub const US_WEST_2: &'static str = "us-west-2"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketLocationConstraint { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketLocationConstraint) -> Self { - s.0 - } +fn from(s: BucketLocationConstraint) -> Self { +s.0 +} } impl FromStr for BucketLocationConstraint { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type BucketLocationName = String; @@ -781,53 +809,55 @@ pub struct BucketLoggingStatus { } impl fmt::Debug for BucketLoggingStatus { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketLoggingStatus"); - if let Some(ref val) = self.logging_enabled { - d.field("logging_enabled", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketLoggingStatus"); +if let Some(ref val) = self.logging_enabled { +d.field("logging_enabled", val); +} +d.finish_non_exhaustive() } +} + #[derive(Debug, Clone, PartialEq, Eq)] pub struct BucketLogsPermission(Cow<'static, str>); impl BucketLogsPermission { - pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; +pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; - pub const READ: &'static str = "READ"; +pub const READ: &'static str = "READ"; - pub const WRITE: &'static str = "WRITE"; +pub const WRITE: &'static str = "WRITE"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketLogsPermission { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketLogsPermission) -> Self { - s.0 - } +fn from(s: BucketLogsPermission) -> Self { +s.0 +} } impl FromStr for BucketLogsPermission { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type BucketName = String; @@ -838,74 +868,76 @@ pub type BucketRegion = String; pub struct BucketType(Cow<'static, str>); impl BucketType { - pub const DIRECTORY: &'static str = "Directory"; +pub const DIRECTORY: &'static str = "Directory"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketType) -> Self { - s.0 - } +fn from(s: BucketType) -> Self { +s.0 +} } impl FromStr for BucketType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketVersioningStatus(Cow<'static, str>); impl BucketVersioningStatus { - pub const ENABLED: &'static str = "Enabled"; +pub const ENABLED: &'static str = "Enabled"; - pub const SUSPENDED: &'static str = "Suspended"; +pub const SUSPENDED: &'static str = "Suspended"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketVersioningStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketVersioningStatus) -> Self { - s.0 - } +fn from(s: BucketVersioningStatus) -> Self { +s.0 +} } impl FromStr for BucketVersioningStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type Buckets = List; @@ -924,301 +956,308 @@ pub type BytesScanned = i64; /// Amazon S3 User Guide.

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CORSConfiguration { - ///

A set of origins and methods (cross-origin access that you want to allow). You can add - /// up to 100 rules to the configuration.

+///

A set of origins and methods (cross-origin access that you want to allow). You can add +/// up to 100 rules to the configuration.

pub cors_rules: CORSRules, } impl fmt::Debug for CORSConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CORSConfiguration"); - d.field("cors_rules", &self.cors_rules); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CORSConfiguration"); +d.field("cors_rules", &self.cors_rules); +d.finish_non_exhaustive() } +} + ///

Specifies a cross-origin access rule for an Amazon S3 bucket.

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CORSRule { - ///

Headers that are specified in the Access-Control-Request-Headers header. - /// These headers are allowed in a preflight OPTIONS request. In response to any preflight - /// OPTIONS request, Amazon S3 returns any requested headers that are allowed.

+///

Headers that are specified in the Access-Control-Request-Headers header. +/// These headers are allowed in a preflight OPTIONS request. In response to any preflight +/// OPTIONS request, Amazon S3 returns any requested headers that are allowed.

pub allowed_headers: Option, - ///

An HTTP method that you allow the origin to execute. Valid values are GET, - /// PUT, HEAD, POST, and DELETE.

+///

An HTTP method that you allow the origin to execute. Valid values are GET, +/// PUT, HEAD, POST, and DELETE.

pub allowed_methods: AllowedMethods, - ///

One or more origins you want customers to be able to access the bucket from.

+///

One or more origins you want customers to be able to access the bucket from.

pub allowed_origins: AllowedOrigins, - ///

One or more headers in the response that you want customers to be able to access from - /// their applications (for example, from a JavaScript XMLHttpRequest - /// object).

+///

One or more headers in the response that you want customers to be able to access from +/// their applications (for example, from a JavaScript XMLHttpRequest +/// object).

pub expose_headers: Option, - ///

Unique identifier for the rule. The value cannot be longer than 255 characters.

+///

Unique identifier for the rule. The value cannot be longer than 255 characters.

pub id: Option, - ///

The time in seconds that your browser is to cache the preflight response for the - /// specified resource.

+///

The time in seconds that your browser is to cache the preflight response for the +/// specified resource.

pub max_age_seconds: Option, } impl fmt::Debug for CORSRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CORSRule"); - if let Some(ref val) = self.allowed_headers { - d.field("allowed_headers", val); - } - d.field("allowed_methods", &self.allowed_methods); - d.field("allowed_origins", &self.allowed_origins); - if let Some(ref val) = self.expose_headers { - d.field("expose_headers", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - if let Some(ref val) = self.max_age_seconds { - d.field("max_age_seconds", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CORSRule"); +if let Some(ref val) = self.allowed_headers { +d.field("allowed_headers", val); +} +d.field("allowed_methods", &self.allowed_methods); +d.field("allowed_origins", &self.allowed_origins); +if let Some(ref val) = self.expose_headers { +d.field("expose_headers", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +if let Some(ref val) = self.max_age_seconds { +d.field("max_age_seconds", val); +} +d.finish_non_exhaustive() +} } + pub type CORSRules = List; ///

Describes how an uncompressed comma-separated values (CSV)-formatted input object is /// formatted.

#[derive(Clone, Default, PartialEq)] pub struct CSVInput { - ///

Specifies that CSV field values may contain quoted record delimiters and such records - /// should be allowed. Default value is FALSE. Setting this value to TRUE may lower - /// performance.

+///

Specifies that CSV field values may contain quoted record delimiters and such records +/// should be allowed. Default value is FALSE. Setting this value to TRUE may lower +/// performance.

pub allow_quoted_record_delimiter: Option, - ///

A single character used to indicate that a row should be ignored when the character is - /// present at the start of that row. You can specify any character to indicate a comment line. - /// The default character is #.

- ///

Default: # - ///

+///

A single character used to indicate that a row should be ignored when the character is +/// present at the start of that row. You can specify any character to indicate a comment line. +/// The default character is #.

+///

Default: # +///

pub comments: Option, - ///

A single character used to separate individual fields in a record. You can specify an - /// arbitrary delimiter.

+///

A single character used to separate individual fields in a record. You can specify an +/// arbitrary delimiter.

pub field_delimiter: Option, - ///

Describes the first line of input. Valid values are:

- ///
    - ///
  • - ///

    - /// NONE: First line is not a header.

    - ///
  • - ///
  • - ///

    - /// IGNORE: First line is a header, but you can't use the header values - /// to indicate the column in an expression. You can use column position (such as _1, _2, - /// …) to indicate the column (SELECT s._1 FROM OBJECT s).

    - ///
  • - ///
  • - ///

    - /// Use: First line is a header, and you can use the header value to - /// identify a column in an expression (SELECT "name" FROM OBJECT).

    - ///
  • - ///
+///

Describes the first line of input. Valid values are:

+///
    +///
  • +///

    +/// NONE: First line is not a header.

    +///
  • +///
  • +///

    +/// IGNORE: First line is a header, but you can't use the header values +/// to indicate the column in an expression. You can use column position (such as _1, _2, +/// …) to indicate the column (SELECT s._1 FROM OBJECT s).

    +///
  • +///
  • +///

    +/// Use: First line is a header, and you can use the header value to +/// identify a column in an expression (SELECT "name" FROM OBJECT).

    +///
  • +///
pub file_header_info: Option, - ///

A single character used for escaping when the field delimiter is part of the value. For - /// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, - /// as follows: " a , b ".

- ///

Type: String

- ///

Default: " - ///

- ///

Ancestors: CSV - ///

+///

A single character used for escaping when the field delimiter is part of the value. For +/// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, +/// as follows: " a , b ".

+///

Type: String

+///

Default: " +///

+///

Ancestors: CSV +///

pub quote_character: Option, - ///

A single character used for escaping the quotation mark character inside an already - /// escaped value. For example, the value """ a , b """ is parsed as " a , b - /// ".

+///

A single character used for escaping the quotation mark character inside an already +/// escaped value. For example, the value """ a , b """ is parsed as " a , b +/// ".

pub quote_escape_character: Option, - ///

A single character used to separate individual records in the input. Instead of the - /// default value, you can specify an arbitrary delimiter.

+///

A single character used to separate individual records in the input. Instead of the +/// default value, you can specify an arbitrary delimiter.

pub record_delimiter: Option, } impl fmt::Debug for CSVInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CSVInput"); - if let Some(ref val) = self.allow_quoted_record_delimiter { - d.field("allow_quoted_record_delimiter", val); - } - if let Some(ref val) = self.comments { - d.field("comments", val); - } - if let Some(ref val) = self.field_delimiter { - d.field("field_delimiter", val); - } - if let Some(ref val) = self.file_header_info { - d.field("file_header_info", val); - } - if let Some(ref val) = self.quote_character { - d.field("quote_character", val); - } - if let Some(ref val) = self.quote_escape_character { - d.field("quote_escape_character", val); - } - if let Some(ref val) = self.record_delimiter { - d.field("record_delimiter", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CSVInput"); +if let Some(ref val) = self.allow_quoted_record_delimiter { +d.field("allow_quoted_record_delimiter", val); } - -///

Describes how uncompressed comma-separated values (CSV)-formatted results are -/// formatted.

-#[derive(Clone, Default, PartialEq)] -pub struct CSVOutput { - ///

The value used to separate individual fields in a record. You can specify an arbitrary - /// delimiter.

+if let Some(ref val) = self.comments { +d.field("comments", val); +} +if let Some(ref val) = self.field_delimiter { +d.field("field_delimiter", val); +} +if let Some(ref val) = self.file_header_info { +d.field("file_header_info", val); +} +if let Some(ref val) = self.quote_character { +d.field("quote_character", val); +} +if let Some(ref val) = self.quote_escape_character { +d.field("quote_escape_character", val); +} +if let Some(ref val) = self.record_delimiter { +d.field("record_delimiter", val); +} +d.finish_non_exhaustive() +} +} + + +///

Describes how uncompressed comma-separated values (CSV)-formatted results are +/// formatted.

+#[derive(Clone, Default, PartialEq)] +pub struct CSVOutput { +///

The value used to separate individual fields in a record. You can specify an arbitrary +/// delimiter.

pub field_delimiter: Option, - ///

A single character used for escaping when the field delimiter is part of the value. For - /// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, - /// as follows: " a , b ".

+///

A single character used for escaping when the field delimiter is part of the value. For +/// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, +/// as follows: " a , b ".

pub quote_character: Option, - ///

The single character used for escaping the quote character inside an already escaped - /// value.

+///

The single character used for escaping the quote character inside an already escaped +/// value.

pub quote_escape_character: Option, - ///

Indicates whether to use quotation marks around output fields.

- ///
    - ///
  • - ///

    - /// ALWAYS: Always use quotation marks for output fields.

    - ///
  • - ///
  • - ///

    - /// ASNEEDED: Use quotation marks for output fields when needed.

    - ///
  • - ///
+///

Indicates whether to use quotation marks around output fields.

+///
    +///
  • +///

    +/// ALWAYS: Always use quotation marks for output fields.

    +///
  • +///
  • +///

    +/// ASNEEDED: Use quotation marks for output fields when needed.

    +///
  • +///
pub quote_fields: Option, - ///

A single character used to separate individual records in the output. Instead of the - /// default value, you can specify an arbitrary delimiter.

+///

A single character used to separate individual records in the output. Instead of the +/// default value, you can specify an arbitrary delimiter.

pub record_delimiter: Option, } impl fmt::Debug for CSVOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CSVOutput"); - if let Some(ref val) = self.field_delimiter { - d.field("field_delimiter", val); - } - if let Some(ref val) = self.quote_character { - d.field("quote_character", val); - } - if let Some(ref val) = self.quote_escape_character { - d.field("quote_escape_character", val); - } - if let Some(ref val) = self.quote_fields { - d.field("quote_fields", val); - } - if let Some(ref val) = self.record_delimiter { - d.field("record_delimiter", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CSVOutput"); +if let Some(ref val) = self.field_delimiter { +d.field("field_delimiter", val); +} +if let Some(ref val) = self.quote_character { +d.field("quote_character", val); +} +if let Some(ref val) = self.quote_escape_character { +d.field("quote_escape_character", val); +} +if let Some(ref val) = self.quote_fields { +d.field("quote_fields", val); +} +if let Some(ref val) = self.record_delimiter { +d.field("record_delimiter", val); +} +d.finish_non_exhaustive() +} } + pub type CacheControl = String; + ///

Contains all the possible checksum or digest values for an object.

#[derive(Clone, Default, PartialEq)] pub struct Checksum { - ///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc32: Option, - ///

The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc32c: Option, - ///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present - /// if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a - /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present +/// if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a +/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc64nvme: Option, - ///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_sha1: Option, - ///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_sha256: Option, - ///

The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_type: Option, } impl fmt::Debug for Checksum { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Checksum"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Checksum"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq)] pub struct ChecksumAlgorithm(Cow<'static, str>); impl ChecksumAlgorithm { - pub const CRC32: &'static str = "CRC32"; +pub const CRC32: &'static str = "CRC32"; - pub const CRC32C: &'static str = "CRC32C"; +pub const CRC32C: &'static str = "CRC32C"; - pub const CRC64NVME: &'static str = "CRC64NVME"; +pub const CRC64NVME: &'static str = "CRC64NVME"; - pub const SHA1: &'static str = "SHA1"; +pub const SHA1: &'static str = "SHA1"; - pub const SHA256: &'static str = "SHA256"; +pub const SHA256: &'static str = "SHA256"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for ChecksumAlgorithm { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: ChecksumAlgorithm) -> Self { - s.0 - } +fn from(s: ChecksumAlgorithm) -> Self { +s.0 +} } impl FromStr for ChecksumAlgorithm { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type ChecksumAlgorithmList = List; @@ -1233,36 +1272,37 @@ pub type ChecksumCRC64NVME = String; pub struct ChecksumMode(Cow<'static, str>); impl ChecksumMode { - pub const ENABLED: &'static str = "ENABLED"; +pub const ENABLED: &'static str = "ENABLED"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for ChecksumMode { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: ChecksumMode) -> Self { - s.0 - } +fn from(s: ChecksumMode) -> Self { +s.0 +} } impl FromStr for ChecksumMode { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type ChecksumSHA1 = String; @@ -1273,38 +1313,39 @@ pub type ChecksumSHA256 = String; pub struct ChecksumType(Cow<'static, str>); impl ChecksumType { - pub const COMPOSITE: &'static str = "COMPOSITE"; +pub const COMPOSITE: &'static str = "COMPOSITE"; - pub const FULL_OBJECT: &'static str = "FULL_OBJECT"; +pub const FULL_OBJECT: &'static str = "FULL_OBJECT"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for ChecksumType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: ChecksumType) -> Self { - s.0 - } +fn from(s: ChecksumType) -> Self { +s.0 +} } impl FromStr for ChecksumType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type Code = String; @@ -1317,465 +1358,470 @@ pub type Comments = String; /// is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

#[derive(Clone, Default, PartialEq)] pub struct CommonPrefix { - ///

Container for the specified common prefix.

+///

Container for the specified common prefix.

pub prefix: Option, } impl fmt::Debug for CommonPrefix { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CommonPrefix"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CommonPrefix"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} } + pub type CommonPrefixList = List; #[derive(Clone, Default, PartialEq)] pub struct CompleteMultipartUploadInput { - ///

Name of the bucket to which the multipart upload was initiated.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+///

Name of the bucket to which the multipart upload was initiated.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

pub bucket: BucketName, - ///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

pub checksum_crc32: Option, - ///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

pub checksum_crc32c: Option, - ///

This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the object. The CRC64NVME checksum is - /// always a full object checksum. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the object. The CRC64NVME checksum is +/// always a full object checksum. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

pub checksum_crc64nvme: Option, - ///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

pub checksum_sha1: Option, - ///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

pub checksum_sha256: Option, - ///

This header specifies the checksum type of the object, which determines how part-level - /// checksums are combined to create an object-level checksum for multipart objects. You can - /// use this header as a data integrity check to verify that the checksum type that is received - /// is the same checksum that was specified. If the checksum type doesn’t match the checksum - /// type that was specified for the object during the CreateMultipartUpload - /// request, it’ll result in a BadDigest error. For more information, see Checking - /// object integrity in the Amazon S3 User Guide.

+///

This header specifies the checksum type of the object, which determines how part-level +/// checksums are combined to create an object-level checksum for multipart objects. You can +/// use this header as a data integrity check to verify that the checksum type that is received +/// is the same checksum that was specified. If the checksum type doesn’t match the checksum +/// type that was specified for the object during the CreateMultipartUpload +/// request, it’ll result in a BadDigest error. For more information, see Checking +/// object integrity in the Amazon S3 User Guide.

pub checksum_type: Option, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

Uploads the object only if the ETag (entity tag) value provided during the WRITE - /// operation matches the ETag of the object in S3. If the ETag values do not match, the - /// operation returns a 412 Precondition Failed error.

- ///

If a conflicting operation occurs during the upload S3 returns a 409 - /// ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the - /// multipart upload with CreateMultipartUpload, and re-upload each part.

- ///

Expects the ETag value as a string.

- ///

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

+///

Uploads the object only if the ETag (entity tag) value provided during the WRITE +/// operation matches the ETag of the object in S3. If the ETag values do not match, the +/// operation returns a 412 Precondition Failed error.

+///

If a conflicting operation occurs during the upload S3 returns a 409 +/// ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the +/// multipart upload with CreateMultipartUpload, and re-upload each part.

+///

Expects the ETag value as a string.

+///

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

pub if_match: Option, - ///

Uploads the object only if the object key name does not already exist in the bucket - /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

- ///

If a conflicting operation occurs during the upload S3 returns a 409 - /// ConditionalRequestConflict response. On a 409 failure you should re-initiate the - /// multipart upload with CreateMultipartUpload and re-upload each part.

- ///

Expects the '*' (asterisk) character.

- ///

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

+///

Uploads the object only if the object key name does not already exist in the bucket +/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

+///

If a conflicting operation occurs during the upload S3 returns a 409 +/// ConditionalRequestConflict response. On a 409 failure you should re-initiate the +/// multipart upload with CreateMultipartUpload and re-upload each part.

+///

Expects the '*' (asterisk) character.

+///

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

pub if_none_match: Option, - ///

Object key for which the multipart upload was initiated.

+///

Object key for which the multipart upload was initiated.

pub key: ObjectKey, - ///

The expected total object size of the multipart upload request. If there’s a mismatch - /// between the specified object size value and the actual object size value, it results in an - /// HTTP 400 InvalidRequest error.

+///

The expected total object size of the multipart upload request. If there’s a mismatch +/// between the specified object size value and the actual object size value, it results in an +/// HTTP 400 InvalidRequest error.

pub mpu_object_size: Option, - ///

The container for the multipart upload request information.

+///

The container for the multipart upload request information.

pub multipart_upload: Option, pub request_payer: Option, - ///

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is - /// required only when the object was created using a checksum algorithm or if your bucket - /// policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User - /// Guide.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is +/// required only when the object was created using a checksum algorithm or if your bucket +/// policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User +/// Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_algorithm: Option, - ///

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. - /// For more information, see - /// Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. +/// For more information, see +/// Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_key: Option, - ///

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum - /// algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum +/// algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_key_md5: Option, - ///

ID for the initiated multipart upload.

+///

ID for the initiated multipart upload.

pub upload_id: MultipartUploadId, } impl fmt::Debug for CompleteMultipartUploadInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CompleteMultipartUploadInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.mpu_object_size { - d.field("mpu_object_size", val); - } - if let Some(ref val) = self.multipart_upload { - d.field("multipart_upload", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CompleteMultipartUploadInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.mpu_object_size { +d.field("mpu_object_size", val); +} +if let Some(ref val) = self.multipart_upload { +d.field("multipart_upload", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() +} } impl CompleteMultipartUploadInput { - #[must_use] - pub fn builder() -> builders::CompleteMultipartUploadInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CompleteMultipartUploadInputBuilder { +default() +} } #[derive(Default)] pub struct CompleteMultipartUploadOutput { - ///

The name of the bucket that contains the newly created object. Does not return the access point - /// ARN or access point alias if used.

- /// - ///

Access points are not supported by directory buckets.

- ///
+///

The name of the bucket that contains the newly created object. Does not return the access point +/// ARN or access point alias if used.

+/// +///

Access points are not supported by directory buckets.

+///
pub bucket: Option, - ///

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

+///

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

pub bucket_key_enabled: Option, - ///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc32: Option, - ///

The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc32c: Option, - ///

This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the object. The CRC64NVME checksum is - /// always a full object checksum. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the object. The CRC64NVME checksum is +/// always a full object checksum. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

pub checksum_crc64nvme: Option, - ///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_sha1: Option, - ///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_sha256: Option, - ///

The checksum type, which determines how part-level checksums are combined to create an - /// object-level checksum for multipart objects. You can use this header as a data integrity - /// check to verify that the checksum type that is received is the same checksum type that was - /// specified during the CreateMultipartUpload request. For more information, see - /// Checking object integrity - /// in the Amazon S3 User Guide.

+///

The checksum type, which determines how part-level checksums are combined to create an +/// object-level checksum for multipart objects. You can use this header as a data integrity +/// check to verify that the checksum type that is received is the same checksum type that was +/// specified during the CreateMultipartUpload request. For more information, see +/// Checking object integrity +/// in the Amazon S3 User Guide.

pub checksum_type: Option, - ///

Entity tag that identifies the newly created object's data. Objects with different - /// object data will have different entity tags. The entity tag is an opaque string. The entity - /// tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 - /// digest of the object data, it will contain one or more nonhexadecimal characters and/or - /// will consist of less than 32 or more than 32 hexadecimal digits. For more information about - /// how the entity tag is calculated, see Checking object - /// integrity in the Amazon S3 User Guide.

+///

Entity tag that identifies the newly created object's data. Objects with different +/// object data will have different entity tags. The entity tag is an opaque string. The entity +/// tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 +/// digest of the object data, it will contain one or more nonhexadecimal characters and/or +/// will consist of less than 32 or more than 32 hexadecimal digits. For more information about +/// how the entity tag is calculated, see Checking object +/// integrity in the Amazon S3 User Guide.

pub e_tag: Option, - ///

If the object expiration is configured, this will contain the expiration date - /// (expiry-date) and rule ID (rule-id). The value of - /// rule-id is URL-encoded.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If the object expiration is configured, this will contain the expiration date +/// (expiry-date) and rule ID (rule-id). The value of +/// rule-id is URL-encoded.

+/// +///

This functionality is not supported for directory buckets.

+///
pub expiration: Option, - ///

The object key of the newly created object.

+///

The object key of the newly created object.

pub key: Option, - ///

The URI that identifies the newly created object.

+///

The URI that identifies the newly created object.

pub location: Option, pub request_charged: Option, - ///

If present, indicates the ID of the KMS key that was used for object encryption.

+///

If present, indicates the ID of the KMS key that was used for object encryption.

pub ssekms_key_id: Option, - ///

The server-side encryption algorithm used when storing this object in Amazon S3 (for example, - /// AES256, aws:kms).

+///

The server-side encryption algorithm used when storing this object in Amazon S3 (for example, +/// AES256, aws:kms).

pub server_side_encryption: Option, - ///

Version ID of the newly created object, in case the bucket has versioning turned - /// on.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Version ID of the newly created object, in case the bucket has versioning turned +/// on.

+/// +///

This functionality is not supported for directory buckets.

+///
pub version_id: Option, - /// A future that resolves to the upload output or an error. This field is used to implement AWS-like keep-alive behavior. +/// A future that resolves to the upload output or an error. This field is used to implement AWS-like keep-alive behavior. pub future: Option>>, } impl fmt::Debug for CompleteMultipartUploadOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CompleteMultipartUploadOutput"); - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.location { - d.field("location", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if self.future.is_some() { - d.field("future", &">>"); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CompleteMultipartUploadOutput"); +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.location { +d.field("location", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +if self.future.is_some() { +d.field("future", &">>"); +} +d.finish_non_exhaustive() +} } + ///

The container for the completed multipart upload details.

#[derive(Clone, Default, PartialEq)] pub struct CompletedMultipartUpload { - ///

Array of CompletedPart data types.

- ///

If you do not supply a valid Part with your request, the service sends back - /// an HTTP 400 response.

+///

Array of CompletedPart data types.

+///

If you do not supply a valid Part with your request, the service sends back +/// an HTTP 400 response.

pub parts: Option, } impl fmt::Debug for CompletedMultipartUpload { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CompletedMultipartUpload"); - if let Some(ref val) = self.parts { - d.field("parts", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CompletedMultipartUpload"); +if let Some(ref val) = self.parts { +d.field("parts", val); +} +d.finish_non_exhaustive() } +} + ///

Details of the parts that were uploaded.

#[derive(Clone, Default, PartialEq)] pub struct CompletedPart { - ///

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc32: Option, - ///

The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc32c: Option, - ///

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc64nvme: Option, - ///

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present - /// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present +/// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_sha1: Option, - ///

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present - /// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present +/// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_sha256: Option, - ///

Entity tag returned when the part was uploaded.

+///

Entity tag returned when the part was uploaded.

pub e_tag: Option, - ///

Part number that identifies the part. This is a positive integer between 1 and - /// 10,000.

- /// - ///
    - ///
  • - ///

    - /// General purpose buckets - In - /// CompleteMultipartUpload, when a additional checksum (including - /// x-amz-checksum-crc32, x-amz-checksum-crc32c, - /// x-amz-checksum-sha1, or x-amz-checksum-sha256) is - /// applied to each part, the PartNumber must start at 1 and the part - /// numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad - /// Request status code and an InvalidPartOrder error - /// code.

    - ///
  • - ///
  • - ///

    - /// Directory buckets - In - /// CompleteMultipartUpload, the PartNumber must start at - /// 1 and the part numbers must be consecutive.

    - ///
  • - ///
- ///
+///

Part number that identifies the part. This is a positive integer between 1 and +/// 10,000.

+/// +///
    +///
  • +///

    +/// General purpose buckets - In +/// CompleteMultipartUpload, when a additional checksum (including +/// x-amz-checksum-crc32, x-amz-checksum-crc32c, +/// x-amz-checksum-sha1, or x-amz-checksum-sha256) is +/// applied to each part, the PartNumber must start at 1 and the part +/// numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad +/// Request status code and an InvalidPartOrder error +/// code.

    +///
  • +///
  • +///

    +/// Directory buckets - In +/// CompleteMultipartUpload, the PartNumber must start at +/// 1 and the part numbers must be consecutive.

    +///
  • +///
+///
pub part_number: Option, } impl fmt::Debug for CompletedPart { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CompletedPart"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CompletedPart"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +d.finish_non_exhaustive() +} } + pub type CompletedPartList = List; #[derive(Debug, Clone, PartialEq, Eq)] pub struct CompressionType(Cow<'static, str>); impl CompressionType { - pub const BZIP2: &'static str = "BZIP2"; +pub const BZIP2: &'static str = "BZIP2"; - pub const GZIP: &'static str = "GZIP"; +pub const GZIP: &'static str = "GZIP"; - pub const NONE: &'static str = "NONE"; +pub const NONE: &'static str = "NONE"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for CompressionType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: CompressionType) -> Self { - s.0 - } +fn from(s: CompressionType) -> Self { +s.0 +} } impl FromStr for CompressionType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

A container for describing a condition that must be met for the specified redirect to @@ -1784,41 +1830,42 @@ impl FromStr for CompressionType { /// request to another host where you might process the error.

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct Condition { - ///

The HTTP error code when the redirect is applied. In the event of an error, if the error - /// code equals this value, then the specified redirect is applied. Required when parent - /// element Condition is specified and sibling KeyPrefixEquals is not - /// specified. If both are specified, then both must be true for the redirect to be - /// applied.

+///

The HTTP error code when the redirect is applied. In the event of an error, if the error +/// code equals this value, then the specified redirect is applied. Required when parent +/// element Condition is specified and sibling KeyPrefixEquals is not +/// specified. If both are specified, then both must be true for the redirect to be +/// applied.

pub http_error_code_returned_equals: Option, - ///

The object key name prefix when the redirect is applied. For example, to redirect - /// requests for ExamplePage.html, the key prefix will be - /// ExamplePage.html. To redirect request for all pages with the prefix - /// docs/, the key prefix will be /docs, which identifies all - /// objects in the docs/ folder. Required when the parent element - /// Condition is specified and sibling HttpErrorCodeReturnedEquals - /// is not specified. If both conditions are specified, both must be true for the redirect to - /// be applied.

- /// - ///

Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

- ///
+///

The object key name prefix when the redirect is applied. For example, to redirect +/// requests for ExamplePage.html, the key prefix will be +/// ExamplePage.html. To redirect request for all pages with the prefix +/// docs/, the key prefix will be /docs, which identifies all +/// objects in the docs/ folder. Required when the parent element +/// Condition is specified and sibling HttpErrorCodeReturnedEquals +/// is not specified. If both conditions are specified, both must be true for the redirect to +/// be applied.

+/// +///

Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

+///
pub key_prefix_equals: Option, } impl fmt::Debug for Condition { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Condition"); - if let Some(ref val) = self.http_error_code_returned_equals { - d.field("http_error_code_returned_equals", val); - } - if let Some(ref val) = self.key_prefix_equals { - d.field("key_prefix_equals", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Condition"); +if let Some(ref val) = self.http_error_code_returned_equals { +d.field("http_error_code_returned_equals", val); +} +if let Some(ref val) = self.key_prefix_equals { +d.field("key_prefix_equals", val); +} +d.finish_non_exhaustive() +} } + pub type ConfirmRemoveSelfBucketAccess = bool; pub type ContentDisposition = String; @@ -1833,947 +1880,954 @@ pub type ContentMD5 = String; pub type ContentRange = String; + ///

#[derive(Clone, Default, PartialEq)] -pub struct ContinuationEvent {} +pub struct ContinuationEvent { +} impl fmt::Debug for ContinuationEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ContinuationEvent"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ContinuationEvent"); +d.finish_non_exhaustive() } +} + #[derive(Clone, PartialEq)] pub struct CopyObjectInput { - ///

The canned access control list (ACL) to apply to the object.

- ///

When you copy an object, the ACL metadata is not preserved and is set to - /// private by default. Only the owner has full access control. To override the - /// default ACL setting, specify a new ACL when you generate a copy request. For more - /// information, see Using ACLs.

- ///

If the destination bucket that you're copying objects to uses the bucket owner enforced - /// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. - /// Buckets that use this setting only accept PUT requests that don't specify an - /// ACL or PUT requests that specify bucket owner full control ACLs, such as the - /// bucket-owner-full-control canned ACL or an equivalent form of this ACL - /// expressed in the XML format. For more information, see Controlling ownership of - /// objects and disabling ACLs in the Amazon S3 User Guide.

- /// - ///
    - ///
  • - ///

    If your destination bucket uses the bucket owner enforced setting for Object - /// Ownership, all objects written to the bucket by any account will be owned by the - /// bucket owner.

    - ///
  • - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
- pub acl: Option, - ///

The name of the destination bucket.

- ///

- /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- /// - ///

Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, - /// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

- ///
- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. - /// - /// You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. - /// For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. - /// When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format - /// - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs. - ///

- pub bucket: BucketName, - ///

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses - /// SSE-KMS, you can enable an S3 Bucket Key for the object.

- ///

Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object - /// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect - /// bucket-level settings for S3 Bucket Key.

- ///

For more information, see Amazon S3 Bucket Keys in the - /// Amazon S3 User Guide.

- /// - ///

- /// Directory buckets - - /// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

- ///
- pub bucket_key_enabled: Option, - ///

Specifies the caching behavior along the request/reply chain.

- pub cache_control: Option, - ///

Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see - /// Checking object integrity in - /// the Amazon S3 User Guide.

- ///

When you copy an object, if the source object has a checksum, that checksum value will - /// be copied to the new object by default. If the CopyObject request does not - /// include this x-amz-checksum-algorithm header, the checksum algorithm will be - /// copied from the source object to the destination object (if it's present on the source - /// object). You can optionally specify a different checksum algorithm to use with the - /// x-amz-checksum-algorithm header. Unrecognized or unsupported values will - /// respond with the HTTP status code 400 Bad Request.

- /// - ///

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

- ///
- pub checksum_algorithm: Option, - ///

Specifies presentational information for the object. Indicates whether an object should - /// be displayed in a web browser or downloaded as a file. It allows specifying the desired - /// filename for the downloaded file.

- pub content_disposition: Option, - ///

Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

- /// - ///

For directory buckets, only the aws-chunked value is supported in this header field.

- ///
- pub content_encoding: Option, - ///

The language the content is in.

- pub content_language: Option, - ///

A standard MIME type that describes the format of the object data.

- pub content_type: Option, - ///

Specifies the source object for the copy operation. The source object can be up to 5 GB. - /// If the source object is an object that was uploaded by using a multipart upload, the object - /// copy will be a single part object after the source object is copied to the destination - /// bucket.

- ///

You specify the value of the copy source in one of two formats, depending on whether you - /// want to access the source object through an access point:

- ///
    - ///
  • - ///

    For objects not accessed through an access point, specify the name of the source bucket - /// and the key of the source object, separated by a slash (/). For example, to copy the - /// object reports/january.pdf from the general purpose bucket - /// awsexamplebucket, use - /// awsexamplebucket/reports/january.pdf. The value must be URL-encoded. - /// To copy the object reports/january.pdf from the directory bucket - /// awsexamplebucket--use1-az5--x-s3, use - /// awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must - /// be URL-encoded.

    - ///
  • - ///
  • - ///

    For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

    - /// - ///
      - ///
    • - ///

      Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

      - ///
    • - ///
    • - ///

      Access points are not supported by directory buckets.

      - ///
    • - ///
    - ///
    - ///

    Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

    - ///
  • - ///
- ///

If your source bucket versioning is enabled, the x-amz-copy-source header - /// by default identifies the current version of an object to copy. If the current version is a - /// delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use - /// the versionId query parameter. Specifically, append - /// ?versionId=<version-id> to the value (for example, - /// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). - /// If you don't specify a version ID, Amazon S3 copies the latest version of the source - /// object.

- ///

If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID - /// for the copied object. This version ID is different from the version ID of the source - /// object. Amazon S3 returns the version ID of the copied object in the - /// x-amz-version-id response header in the response.

- ///

If you do not enable versioning or suspend it on the destination bucket, the version ID - /// that Amazon S3 generates in the x-amz-version-id response header is always - /// null.

- /// - ///

- /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets.

- ///
- pub copy_source: CopySource, - ///

Copies the object if its entity tag (ETag) matches the specified tag.

- ///

If both the x-amz-copy-source-if-match and - /// x-amz-copy-source-if-unmodified-since headers are present in the request - /// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

- ///
    - ///
  • - ///

    - /// x-amz-copy-source-if-match condition evaluates to true

    - ///
  • - ///
  • - ///

    - /// x-amz-copy-source-if-unmodified-since condition evaluates to - /// false

    - ///
  • - ///
+///

The canned access control list (ACL) to apply to the object.

+///

When you copy an object, the ACL metadata is not preserved and is set to +/// private by default. Only the owner has full access control. To override the +/// default ACL setting, specify a new ACL when you generate a copy request. For more +/// information, see Using ACLs.

+///

If the destination bucket that you're copying objects to uses the bucket owner enforced +/// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. +/// Buckets that use this setting only accept PUT requests that don't specify an +/// ACL or PUT requests that specify bucket owner full control ACLs, such as the +/// bucket-owner-full-control canned ACL or an equivalent form of this ACL +/// expressed in the XML format. For more information, see Controlling ownership of +/// objects and disabling ACLs in the Amazon S3 User Guide.

+/// +///
    +///
  • +///

    If your destination bucket uses the bucket owner enforced setting for Object +/// Ownership, all objects written to the bucket by any account will be owned by the +/// bucket owner.

    +///
  • +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
+ pub acl: Option, +///

The name of the destination bucket.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+/// +///

Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, +/// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

+///
+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. +/// +/// You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. +/// For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. +/// When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format +/// +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs. +///

+ pub bucket: BucketName, +///

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses +/// SSE-KMS, you can enable an S3 Bucket Key for the object.

+///

Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object +/// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect +/// bucket-level settings for S3 Bucket Key.

+///

For more information, see Amazon S3 Bucket Keys in the +/// Amazon S3 User Guide.

+/// +///

+/// Directory buckets - +/// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

+///
+ pub bucket_key_enabled: Option, +///

Specifies the caching behavior along the request/reply chain.

+ pub cache_control: Option, +///

Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see +/// Checking object integrity in +/// the Amazon S3 User Guide.

+///

When you copy an object, if the source object has a checksum, that checksum value will +/// be copied to the new object by default. If the CopyObject request does not +/// include this x-amz-checksum-algorithm header, the checksum algorithm will be +/// copied from the source object to the destination object (if it's present on the source +/// object). You can optionally specify a different checksum algorithm to use with the +/// x-amz-checksum-algorithm header. Unrecognized or unsupported values will +/// respond with the HTTP status code 400 Bad Request.

+/// +///

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

+///
+ pub checksum_algorithm: Option, +///

Specifies presentational information for the object. Indicates whether an object should +/// be displayed in a web browser or downloaded as a file. It allows specifying the desired +/// filename for the downloaded file.

+ pub content_disposition: Option, +///

Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

+/// +///

For directory buckets, only the aws-chunked value is supported in this header field.

+///
+ pub content_encoding: Option, +///

The language the content is in.

+ pub content_language: Option, +///

A standard MIME type that describes the format of the object data.

+ pub content_type: Option, +///

Specifies the source object for the copy operation. The source object can be up to 5 GB. +/// If the source object is an object that was uploaded by using a multipart upload, the object +/// copy will be a single part object after the source object is copied to the destination +/// bucket.

+///

You specify the value of the copy source in one of two formats, depending on whether you +/// want to access the source object through an access point:

+///
    +///
  • +///

    For objects not accessed through an access point, specify the name of the source bucket +/// and the key of the source object, separated by a slash (/). For example, to copy the +/// object reports/january.pdf from the general purpose bucket +/// awsexamplebucket, use +/// awsexamplebucket/reports/january.pdf. The value must be URL-encoded. +/// To copy the object reports/january.pdf from the directory bucket +/// awsexamplebucket--use1-az5--x-s3, use +/// awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must +/// be URL-encoded.

    +///
  • +///
  • +///

    For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

    +/// +///
      +///
    • +///

      Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

      +///
    • +///
    • +///

      Access points are not supported by directory buckets.

      +///
    • +///
    +///
    +///

    Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

    +///
  • +///
+///

If your source bucket versioning is enabled, the x-amz-copy-source header +/// by default identifies the current version of an object to copy. If the current version is a +/// delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use +/// the versionId query parameter. Specifically, append +/// ?versionId=<version-id> to the value (for example, +/// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). +/// If you don't specify a version ID, Amazon S3 copies the latest version of the source +/// object.

+///

If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID +/// for the copied object. This version ID is different from the version ID of the source +/// object. Amazon S3 returns the version ID of the copied object in the +/// x-amz-version-id response header in the response.

+///

If you do not enable versioning or suspend it on the destination bucket, the version ID +/// that Amazon S3 generates in the x-amz-version-id response header is always +/// null.

+/// +///

+/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets.

+///
+ pub copy_source: CopySource, +///

Copies the object if its entity tag (ETag) matches the specified tag.

+///

If both the x-amz-copy-source-if-match and +/// x-amz-copy-source-if-unmodified-since headers are present in the request +/// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

+///
    +///
  • +///

    +/// x-amz-copy-source-if-match condition evaluates to true

    +///
  • +///
  • +///

    +/// x-amz-copy-source-if-unmodified-since condition evaluates to +/// false

    +///
  • +///
pub copy_source_if_match: Option, - ///

Copies the object if it has been modified since the specified time.

- ///

If both the x-amz-copy-source-if-none-match and - /// x-amz-copy-source-if-modified-since headers are present in the request and - /// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response - /// code:

- ///
    - ///
  • - ///

    - /// x-amz-copy-source-if-none-match condition evaluates to false

    - ///
  • - ///
  • - ///

    - /// x-amz-copy-source-if-modified-since condition evaluates to - /// true

    - ///
  • - ///
+///

Copies the object if it has been modified since the specified time.

+///

If both the x-amz-copy-source-if-none-match and +/// x-amz-copy-source-if-modified-since headers are present in the request and +/// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response +/// code:

+///
    +///
  • +///

    +/// x-amz-copy-source-if-none-match condition evaluates to false

    +///
  • +///
  • +///

    +/// x-amz-copy-source-if-modified-since condition evaluates to +/// true

    +///
  • +///
pub copy_source_if_modified_since: Option, - ///

Copies the object if its entity tag (ETag) is different than the specified ETag.

- ///

If both the x-amz-copy-source-if-none-match and - /// x-amz-copy-source-if-modified-since headers are present in the request and - /// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response - /// code:

- ///
    - ///
  • - ///

    - /// x-amz-copy-source-if-none-match condition evaluates to false

    - ///
  • - ///
  • - ///

    - /// x-amz-copy-source-if-modified-since condition evaluates to - /// true

    - ///
  • - ///
+///

Copies the object if its entity tag (ETag) is different than the specified ETag.

+///

If both the x-amz-copy-source-if-none-match and +/// x-amz-copy-source-if-modified-since headers are present in the request and +/// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response +/// code:

+///
    +///
  • +///

    +/// x-amz-copy-source-if-none-match condition evaluates to false

    +///
  • +///
  • +///

    +/// x-amz-copy-source-if-modified-since condition evaluates to +/// true

    +///
  • +///
pub copy_source_if_none_match: Option, - ///

Copies the object if it hasn't been modified since the specified time.

- ///

If both the x-amz-copy-source-if-match and - /// x-amz-copy-source-if-unmodified-since headers are present in the request - /// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

- ///
    - ///
  • - ///

    - /// x-amz-copy-source-if-match condition evaluates to true

    - ///
  • - ///
  • - ///

    - /// x-amz-copy-source-if-unmodified-since condition evaluates to - /// false

    - ///
  • - ///
+///

Copies the object if it hasn't been modified since the specified time.

+///

If both the x-amz-copy-source-if-match and +/// x-amz-copy-source-if-unmodified-since headers are present in the request +/// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

+///
    +///
  • +///

    +/// x-amz-copy-source-if-match condition evaluates to true

    +///
  • +///
  • +///

    +/// x-amz-copy-source-if-unmodified-since condition evaluates to +/// false

    +///
  • +///
pub copy_source_if_unmodified_since: Option, - ///

Specifies the algorithm to use when decrypting the source object (for example, - /// AES256).

- ///

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the - /// necessary encryption information in your request so that Amazon S3 can decrypt the object for - /// copying.

- /// - ///

This functionality is not supported when the source object is in a directory bucket.

- ///
+///

Specifies the algorithm to use when decrypting the source object (for example, +/// AES256).

+///

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the +/// necessary encryption information in your request so that Amazon S3 can decrypt the object for +/// copying.

+/// +///

This functionality is not supported when the source object is in a directory bucket.

+///
pub copy_source_sse_customer_algorithm: Option, - ///

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source - /// object. The encryption key provided in this header must be the same one that was used when - /// the source object was created.

- ///

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the - /// necessary encryption information in your request so that Amazon S3 can decrypt the object for - /// copying.

- /// - ///

This functionality is not supported when the source object is in a directory bucket.

- ///
+///

Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source +/// object. The encryption key provided in this header must be the same one that was used when +/// the source object was created.

+///

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the +/// necessary encryption information in your request so that Amazon S3 can decrypt the object for +/// copying.

+/// +///

This functionality is not supported when the source object is in a directory bucket.

+///
pub copy_source_sse_customer_key: Option, - ///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

- ///

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the - /// necessary encryption information in your request so that Amazon S3 can decrypt the object for - /// copying.

- /// - ///

This functionality is not supported when the source object is in a directory bucket.

- ///
+///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

+///

If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the +/// necessary encryption information in your request so that Amazon S3 can decrypt the object for +/// copying.

+/// +///

This functionality is not supported when the source object is in a directory bucket.

+///
pub copy_source_sse_customer_key_md5: Option, - ///

The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_source_bucket_owner: Option, - ///

The date and time at which the object is no longer cacheable.

+///

The date and time at which the object is no longer cacheable.

pub expires: Option, - ///

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub grant_full_control: Option, - ///

Allows grantee to read the object data and its metadata.

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

Allows grantee to read the object data and its metadata.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub grant_read: Option, - ///

Allows grantee to read the object ACL.

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

Allows grantee to read the object ACL.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub grant_read_acp: Option, - ///

Allows grantee to write the ACL for the applicable object.

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

Allows grantee to write the ACL for the applicable object.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub grant_write_acp: Option, - ///

The key of the destination object.

+///

The key of the destination object.

pub key: ObjectKey, - ///

A map of metadata to store with the object in S3.

+///

A map of metadata to store with the object in S3.

pub metadata: Option, - ///

Specifies whether the metadata is copied from the source object or replaced with - /// metadata that's provided in the request. When copying an object, you can preserve all - /// metadata (the default) or specify new metadata. If this header isn’t specified, - /// COPY is the default behavior.

- ///

- /// General purpose bucket - For general purpose buckets, when you - /// grant permissions, you can use the s3:x-amz-metadata-directive condition key - /// to enforce certain metadata behavior when objects are uploaded. For more information, see - /// Amazon S3 - /// condition key examples in the Amazon S3 User Guide.

- /// - ///

- /// x-amz-website-redirect-location is unique to each object and is not - /// copied when using the x-amz-metadata-directive header. To copy the value, - /// you must specify x-amz-website-redirect-location in the request - /// header.

- ///
+///

Specifies whether the metadata is copied from the source object or replaced with +/// metadata that's provided in the request. When copying an object, you can preserve all +/// metadata (the default) or specify new metadata. If this header isn’t specified, +/// COPY is the default behavior.

+///

+/// General purpose bucket - For general purpose buckets, when you +/// grant permissions, you can use the s3:x-amz-metadata-directive condition key +/// to enforce certain metadata behavior when objects are uploaded. For more information, see +/// Amazon S3 +/// condition key examples in the Amazon S3 User Guide.

+/// +///

+/// x-amz-website-redirect-location is unique to each object and is not +/// copied when using the x-amz-metadata-directive header. To copy the value, +/// you must specify x-amz-website-redirect-location in the request +/// header.

+///
pub metadata_directive: Option, - ///

Specifies whether you want to apply a legal hold to the object copy.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies whether you want to apply a legal hold to the object copy.

+/// +///

This functionality is not supported for directory buckets.

+///
pub object_lock_legal_hold_status: Option, - ///

The Object Lock mode that you want to apply to the object copy.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The Object Lock mode that you want to apply to the object copy.

+/// +///

This functionality is not supported for directory buckets.

+///
pub object_lock_mode: Option, - ///

The date and time when you want the Object Lock of the object copy to expire.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The date and time when you want the Object Lock of the object copy to expire.

+/// +///

This functionality is not supported for directory buckets.

+///
pub object_lock_retain_until_date: Option, pub request_payer: Option, - ///

Specifies the algorithm to use when encrypting the object (for example, - /// AES256).

- ///

When you perform a CopyObject operation, if you want to use a different - /// type of encryption setting for the target object, you can specify appropriate - /// encryption-related headers to encrypt the target object with an Amazon S3 managed key, a - /// KMS key, or a customer-provided key. If the encryption setting in your request is - /// different from the default encryption configuration of the destination bucket, the - /// encryption setting in your request takes precedence.

- /// - ///

This functionality is not supported when the destination bucket is a directory bucket.

- ///
+///

Specifies the algorithm to use when encrypting the object (for example, +/// AES256).

+///

When you perform a CopyObject operation, if you want to use a different +/// type of encryption setting for the target object, you can specify appropriate +/// encryption-related headers to encrypt the target object with an Amazon S3 managed key, a +/// KMS key, or a customer-provided key. If the encryption setting in your request is +/// different from the default encryption configuration of the destination bucket, the +/// encryption setting in your request takes precedence.

+/// +///

This functionality is not supported when the destination bucket is a directory bucket.

+///
pub sse_customer_algorithm: Option, - ///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded. Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

- /// - ///

This functionality is not supported when the destination bucket is a directory bucket.

- ///
+///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded. Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

+/// +///

This functionality is not supported when the destination bucket is a directory bucket.

+///
pub sse_customer_key: Option, - ///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

- /// - ///

This functionality is not supported when the destination bucket is a directory bucket.

- ///
+///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

+/// +///

This functionality is not supported when the destination bucket is a directory bucket.

+///
pub sse_customer_key_md5: Option, - ///

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use - /// for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

- ///

- /// General purpose buckets - This value must be explicitly - /// added to specify encryption context for CopyObject requests if you want an - /// additional encryption context for your destination object. The additional encryption - /// context of the source object won't be copied to the destination object. For more - /// information, see Encryption - /// context in the Amazon S3 User Guide.

- ///

- /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

+///

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use +/// for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

+///

+/// General purpose buckets - This value must be explicitly +/// added to specify encryption context for CopyObject requests if you want an +/// additional encryption context for your destination object. The additional encryption +/// context of the source object won't be copied to the destination object. For more +/// information, see Encryption +/// context in the Amazon S3 User Guide.

+///

+/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

pub ssekms_encryption_context: Option, - ///

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. - /// All GET and PUT requests for an object protected by KMS will fail if they're not made via - /// SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services - /// SDKs and Amazon Web Services CLI, see Specifying the - /// Signature Version in Request Authentication in the - /// Amazon S3 User Guide.

- ///

- /// Directory buckets - - /// To encrypt data using SSE-KMS, it's recommended to specify the - /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses - /// the bucket's default KMS customer managed key ID. If you want to explicitly set the - /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - /// - /// Incorrect key specification results in an HTTP 400 Bad Request error.

+///

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. +/// All GET and PUT requests for an object protected by KMS will fail if they're not made via +/// SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services +/// SDKs and Amazon Web Services CLI, see Specifying the +/// Signature Version in Request Authentication in the +/// Amazon S3 User Guide.

+///

+/// Directory buckets - +/// To encrypt data using SSE-KMS, it's recommended to specify the +/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses +/// the bucket's default KMS customer managed key ID. If you want to explicitly set the +/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +/// +/// Incorrect key specification results in an HTTP 400 Bad Request error.

pub ssekms_key_id: Option, - ///

The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized - /// or unsupported values won’t write a destination object and will receive a 400 Bad - /// Request response.

- ///

Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When - /// copying an object, if you don't specify encryption information in your copy request, the - /// encryption setting of the target object is set to the default encryption configuration of - /// the destination bucket. By default, all buckets have a base level of encryption - /// configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the - /// destination bucket has a different default encryption configuration, Amazon S3 uses the - /// corresponding encryption key to encrypt the target object copy.

- ///

With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in - /// its data centers and decrypts the data when you access it. For more information about - /// server-side encryption, see Using Server-Side Encryption - /// in the Amazon S3 User Guide.

- ///

- /// General purpose buckets - ///

- ///
    - ///
  • - ///

    For general purpose buckets, there are the following supported options for server-side - /// encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer - /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption - /// with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding - /// KMS key, or a customer-provided key to encrypt the target object copy.

    - ///
  • - ///
  • - ///

    When you perform a CopyObject operation, if you want to use a - /// different type of encryption setting for the target object, you can specify - /// appropriate encryption-related headers to encrypt the target object with an Amazon S3 - /// managed key, a KMS key, or a customer-provided key. If the encryption setting in - /// your request is different from the default encryption configuration of the - /// destination bucket, the encryption setting in your request takes precedence.

    - ///
  • - ///
- ///

- /// Directory buckets - ///

- ///
    - ///
  • - ///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    - ///
  • - ///
  • - ///

    To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you - /// specify SSE-KMS as the directory bucket's default encryption configuration with - /// a KMS key (specifically, a customer managed key). - /// The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS - /// configuration can only support 1 customer managed key per - /// directory bucket for the lifetime of the bucket. After you specify a customer managed key for - /// SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS - /// configuration. Then, when you perform a CopyObject operation and want to - /// specify server-side encryption settings for new object copies with SSE-KMS in the - /// encryption-related request headers, you must ensure the encryption key is the same - /// customer managed key that you specified for the directory bucket's default encryption - /// configuration. - ///

    - ///
  • - ///
+///

The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized +/// or unsupported values won’t write a destination object and will receive a 400 Bad +/// Request response.

+///

Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When +/// copying an object, if you don't specify encryption information in your copy request, the +/// encryption setting of the target object is set to the default encryption configuration of +/// the destination bucket. By default, all buckets have a base level of encryption +/// configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the +/// destination bucket has a different default encryption configuration, Amazon S3 uses the +/// corresponding encryption key to encrypt the target object copy.

+///

With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in +/// its data centers and decrypts the data when you access it. For more information about +/// server-side encryption, see Using Server-Side Encryption +/// in the Amazon S3 User Guide.

+///

+/// General purpose buckets +///

+///
    +///
  • +///

    For general purpose buckets, there are the following supported options for server-side +/// encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer +/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption +/// with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding +/// KMS key, or a customer-provided key to encrypt the target object copy.

    +///
  • +///
  • +///

    When you perform a CopyObject operation, if you want to use a +/// different type of encryption setting for the target object, you can specify +/// appropriate encryption-related headers to encrypt the target object with an Amazon S3 +/// managed key, a KMS key, or a customer-provided key. If the encryption setting in +/// your request is different from the default encryption configuration of the +/// destination bucket, the encryption setting in your request takes precedence.

    +///
  • +///
+///

+/// Directory buckets +///

+///
    +///
  • +///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    +///
  • +///
  • +///

    To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you +/// specify SSE-KMS as the directory bucket's default encryption configuration with +/// a KMS key (specifically, a customer managed key). +/// The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS +/// configuration can only support 1 customer managed key per +/// directory bucket for the lifetime of the bucket. After you specify a customer managed key for +/// SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS +/// configuration. Then, when you perform a CopyObject operation and want to +/// specify server-side encryption settings for new object copies with SSE-KMS in the +/// encryption-related request headers, you must ensure the encryption key is the same +/// customer managed key that you specified for the directory bucket's default encryption +/// configuration. +///

    +///
  • +///
pub server_side_encryption: Option, - ///

If the x-amz-storage-class header is not used, the copied object will be - /// stored in the STANDARD Storage Class by default. The STANDARD - /// storage class provides high durability and high availability. Depending on performance - /// needs, you can specify a different Storage Class.

- /// - ///
    - ///
  • - ///

    - /// Directory buckets - - /// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. - /// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    - ///
  • - ///
  • - ///

    - /// Amazon S3 on Outposts - S3 on Outposts only - /// uses the OUTPOSTS Storage Class.

    - ///
  • - ///
- ///
- ///

You can use the CopyObject action to change the storage class of an object - /// that is already stored in Amazon S3 by using the x-amz-storage-class header. For - /// more information, see Storage Classes in the - /// Amazon S3 User Guide.

- ///

Before using an object as a source object for the copy operation, you must restore a - /// copy of it if it meets any of the following conditions:

- ///
    - ///
  • - ///

    The storage class of the source object is GLACIER or - /// DEEP_ARCHIVE.

    - ///
  • - ///
  • - ///

    The storage class of the source object is INTELLIGENT_TIERING and - /// it's S3 Intelligent-Tiering access tier is Archive Access or - /// Deep Archive Access.

    - ///
  • - ///
- ///

For more information, see RestoreObject and Copying - /// Objects in the Amazon S3 User Guide.

+///

If the x-amz-storage-class header is not used, the copied object will be +/// stored in the STANDARD Storage Class by default. The STANDARD +/// storage class provides high durability and high availability. Depending on performance +/// needs, you can specify a different Storage Class.

+/// +///
    +///
  • +///

    +/// Directory buckets - +/// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. +/// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    +///
  • +///
  • +///

    +/// Amazon S3 on Outposts - S3 on Outposts only +/// uses the OUTPOSTS Storage Class.

    +///
  • +///
+///
+///

You can use the CopyObject action to change the storage class of an object +/// that is already stored in Amazon S3 by using the x-amz-storage-class header. For +/// more information, see Storage Classes in the +/// Amazon S3 User Guide.

+///

Before using an object as a source object for the copy operation, you must restore a +/// copy of it if it meets any of the following conditions:

+///
    +///
  • +///

    The storage class of the source object is GLACIER or +/// DEEP_ARCHIVE.

    +///
  • +///
  • +///

    The storage class of the source object is INTELLIGENT_TIERING and +/// it's S3 Intelligent-Tiering access tier is Archive Access or +/// Deep Archive Access.

    +///
  • +///
+///

For more information, see RestoreObject and Copying +/// Objects in the Amazon S3 User Guide.

pub storage_class: Option, - ///

The tag-set for the object copy in the destination bucket. This value must be used in - /// conjunction with the x-amz-tagging-directive if you choose - /// REPLACE for the x-amz-tagging-directive. If you choose - /// COPY for the x-amz-tagging-directive, you don't need to set - /// the x-amz-tagging header, because the tag-set will be copied from the source - /// object directly. The tag-set must be encoded as URL Query parameters.

- ///

The default value is the empty value.

- /// - ///

- /// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. - /// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

- ///
    - ///
  • - ///

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    - ///
  • - ///
  • - ///

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    - ///
  • - ///
  • - ///

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    - ///
  • - ///
- ///

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

- ///
    - ///
  • - ///

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    - ///
  • - ///
  • - ///

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    - ///
  • - ///
  • - ///

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    - ///
  • - ///
  • - ///

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    - ///
  • - ///
- ///
+///

The tag-set for the object copy in the destination bucket. This value must be used in +/// conjunction with the x-amz-tagging-directive if you choose +/// REPLACE for the x-amz-tagging-directive. If you choose +/// COPY for the x-amz-tagging-directive, you don't need to set +/// the x-amz-tagging header, because the tag-set will be copied from the source +/// object directly. The tag-set must be encoded as URL Query parameters.

+///

The default value is the empty value.

+/// +///

+/// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. +/// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

+///
    +///
  • +///

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    +///
  • +///
  • +///

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    +///
  • +///
  • +///

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    +///
  • +///
+///

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

+///
    +///
  • +///

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    +///
  • +///
  • +///

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    +///
  • +///
  • +///

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    +///
  • +///
  • +///

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    +///
  • +///
+///
pub tagging: Option, - ///

Specifies whether the object tag-set is copied from the source object or replaced with - /// the tag-set that's provided in the request.

- ///

The default value is COPY.

- /// - ///

- /// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. - /// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

- ///
    - ///
  • - ///

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    - ///
  • - ///
  • - ///

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    - ///
  • - ///
  • - ///

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    - ///
  • - ///
- ///

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

- ///
    - ///
  • - ///

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    - ///
  • - ///
  • - ///

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    - ///
  • - ///
  • - ///

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    - ///
  • - ///
  • - ///

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    - ///
  • - ///
- ///
+///

Specifies whether the object tag-set is copied from the source object or replaced with +/// the tag-set that's provided in the request.

+///

The default value is COPY.

+/// +///

+/// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. +/// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

+///
    +///
  • +///

    When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

    +///
  • +///
  • +///

    When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

    +///
  • +///
  • +///

    When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

    +///
  • +///
+///

Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

+///
    +///
  • +///

    When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

    +///
  • +///
  • +///

    When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

    +///
  • +///
  • +///

    When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

    +///
  • +///
  • +///

    When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

    +///
  • +///
+///
pub tagging_directive: Option, pub version_id: Option, - ///

If the destination bucket is configured as a website, redirects requests for this object - /// copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of - /// this header in the object metadata. This value is unique to each object and is not copied - /// when using the x-amz-metadata-directive header. Instead, you may opt to - /// provide this header in combination with the x-amz-metadata-directive - /// header.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If the destination bucket is configured as a website, redirects requests for this object +/// copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of +/// this header in the object metadata. This value is unique to each object and is not copied +/// when using the x-amz-metadata-directive header. Instead, you may opt to +/// provide this header in combination with the x-amz-metadata-directive +/// header.

+/// +///

This functionality is not supported for directory buckets.

+///
pub website_redirect_location: Option, } impl fmt::Debug for CopyObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CopyObjectInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - d.field("copy_source", &self.copy_source); - if let Some(ref val) = self.copy_source_if_match { - d.field("copy_source_if_match", val); - } - if let Some(ref val) = self.copy_source_if_modified_since { - d.field("copy_source_if_modified_since", val); - } - if let Some(ref val) = self.copy_source_if_none_match { - d.field("copy_source_if_none_match", val); - } - if let Some(ref val) = self.copy_source_if_unmodified_since { - d.field("copy_source_if_unmodified_since", val); - } - if let Some(ref val) = self.copy_source_sse_customer_algorithm { - d.field("copy_source_sse_customer_algorithm", val); - } - if let Some(ref val) = self.copy_source_sse_customer_key { - d.field("copy_source_sse_customer_key", val); - } - if let Some(ref val) = self.copy_source_sse_customer_key_md5 { - d.field("copy_source_sse_customer_key_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expected_source_bucket_owner { - d.field("expected_source_bucket_owner", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.metadata_directive { - d.field("metadata_directive", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.tagging_directive { - d.field("tagging_directive", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CopyObjectInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +d.field("copy_source", &self.copy_source); +if let Some(ref val) = self.copy_source_if_match { +d.field("copy_source_if_match", val); +} +if let Some(ref val) = self.copy_source_if_modified_since { +d.field("copy_source_if_modified_since", val); +} +if let Some(ref val) = self.copy_source_if_none_match { +d.field("copy_source_if_none_match", val); +} +if let Some(ref val) = self.copy_source_if_unmodified_since { +d.field("copy_source_if_unmodified_since", val); +} +if let Some(ref val) = self.copy_source_sse_customer_algorithm { +d.field("copy_source_sse_customer_algorithm", val); +} +if let Some(ref val) = self.copy_source_sse_customer_key { +d.field("copy_source_sse_customer_key", val); +} +if let Some(ref val) = self.copy_source_sse_customer_key_md5 { +d.field("copy_source_sse_customer_key_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.expected_source_bucket_owner { +d.field("expected_source_bucket_owner", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.metadata_directive { +d.field("metadata_directive", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tagging { +d.field("tagging", val); +} +if let Some(ref val) = self.tagging_directive { +d.field("tagging_directive", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +d.finish_non_exhaustive() +} } impl CopyObjectInput { - #[must_use] - pub fn builder() -> builders::CopyObjectInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CopyObjectInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct CopyObjectOutput { - ///

Indicates whether the copied object uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

+///

Indicates whether the copied object uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

pub bucket_key_enabled: Option, - ///

Container for all response elements.

+///

Container for all response elements.

pub copy_object_result: Option, - ///

Version ID of the source object that was copied.

- /// - ///

This functionality is not supported when the source object is in a directory bucket.

- ///
+///

Version ID of the source object that was copied.

+/// +///

This functionality is not supported when the source object is in a directory bucket.

+///
pub copy_source_version_id: Option, - ///

If the object expiration is configured, the response includes this header.

- /// - ///

Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

- ///
+///

If the object expiration is configured, the response includes this header.

+/// +///

Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

+///
pub expiration: Option, pub request_charged: Option, - ///

If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_algorithm: Option, - ///

If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_key_md5: Option, - ///

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The - /// value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption - /// context key-value pairs.

+///

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The +/// value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption +/// context key-value pairs.

pub ssekms_encryption_context: Option, - ///

If present, indicates the ID of the KMS key that was used for object encryption.

+///

If present, indicates the ID of the KMS key that was used for object encryption.

pub ssekms_key_id: Option, - ///

The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms, aws:kms:dsse).

+///

The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms, aws:kms:dsse).

pub server_side_encryption: Option, - ///

Version ID of the newly created copy.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Version ID of the newly created copy.

+/// +///

This functionality is not supported for directory buckets.

+///
pub version_id: Option, } impl fmt::Debug for CopyObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CopyObjectOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.copy_object_result { - d.field("copy_object_result", val); - } - if let Some(ref val) = self.copy_source_version_id { - d.field("copy_source_version_id", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CopyObjectOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.copy_object_result { +d.field("copy_object_result", val); +} +if let Some(ref val) = self.copy_source_version_id { +d.field("copy_source_version_id", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); } +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + ///

Container for all response elements.

#[derive(Clone, Default, PartialEq)] pub struct CopyObjectResult { - ///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc32: Option, - ///

The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc32c: Option, - ///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present - /// if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a - /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present +/// if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a +/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc64nvme: Option, - ///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_sha1: Option, - ///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

pub checksum_sha256: Option, - ///

The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_type: Option, - ///

Returns the ETag of the new object. The ETag reflects only changes to the contents of an - /// object, not its metadata.

+///

Returns the ETag of the new object. The ETag reflects only changes to the contents of an +/// object, not its metadata.

pub e_tag: Option, - ///

Creation date of the object.

+///

Creation date of the object.

pub last_modified: Option, } impl fmt::Debug for CopyObjectResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CopyObjectResult"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CopyObjectResult"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +d.finish_non_exhaustive() +} } + ///

Container for all response elements.

#[derive(Clone, Default, PartialEq)] pub struct CopyPartResult { - ///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the part. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the part. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

pub checksum_crc32: Option, - ///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the part. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the part. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

pub checksum_crc32c: Option, - ///

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

+///

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

pub checksum_crc64nvme: Option, - ///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 checksum of the part. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 checksum of the part. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

pub checksum_sha1: Option, - ///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 checksum of the part. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

+///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 checksum of the part. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

pub checksum_sha256: Option, - ///

Entity tag of the object.

+///

Entity tag of the object.

pub e_tag: Option, - ///

Date and time at which the object was uploaded.

+///

Date and time at which the object was uploaded.

pub last_modified: Option, } impl fmt::Debug for CopyPartResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CopyPartResult"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CopyPartResult"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); } +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +d.finish_non_exhaustive() +} +} + + pub type CopySourceIfMatch = ETagCondition; @@ -2796,1113 +2850,1121 @@ pub type CopySourceVersionId = String; ///

The configuration information for the bucket.

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CreateBucketConfiguration { - ///

Specifies the information about the bucket that will be created.

- /// - ///

This functionality is only supported by directory buckets.

- ///
+///

Specifies the information about the bucket that will be created.

+/// +///

This functionality is only supported by directory buckets.

+///
pub bucket: Option, - ///

Specifies the location where the bucket will be created.

- ///

- /// Directory buckets - The location type is Availability Zone or Local Zone. - /// To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the - /// error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide. - ///

- /// - ///

This functionality is only supported by directory buckets.

- ///
+///

Specifies the location where the bucket will be created.

+///

+/// Directory buckets - The location type is Availability Zone or Local Zone. +/// To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the +/// error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide. +///

+/// +///

This functionality is only supported by directory buckets.

+///
pub location: Option, - ///

Specifies the Region where the bucket will be created. You might choose a Region to - /// optimize latency, minimize costs, or address regulatory requirements. For example, if you - /// reside in Europe, you will probably find it advantageous to create buckets in the Europe - /// (Ireland) Region.

- ///

If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region - /// (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

- ///

For a list of the valid values for all of the Amazon Web Services Regions, see Regions and - /// Endpoints.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies the Region where the bucket will be created. You might choose a Region to +/// optimize latency, minimize costs, or address regulatory requirements. For example, if you +/// reside in Europe, you will probably find it advantageous to create buckets in the Europe +/// (Ireland) Region.

+///

If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region +/// (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

+///

For a list of the valid values for all of the Amazon Web Services Regions, see Regions and +/// Endpoints.

+/// +///

This functionality is not supported for directory buckets.

+///
pub location_constraint: Option, } impl fmt::Debug for CreateBucketConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketConfiguration"); - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.location { - d.field("location", val); - } - if let Some(ref val) = self.location_constraint { - d.field("location_constraint", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketConfiguration"); +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.location { +d.field("location", val); } +if let Some(ref val) = self.location_constraint { +d.field("location_constraint", val); +} +d.finish_non_exhaustive() +} +} + #[derive(Clone, Default, PartialEq)] pub struct CreateBucketInput { - ///

The canned ACL to apply to the bucket.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The canned ACL to apply to the bucket.

+/// +///

This functionality is not supported for directory buckets.

+///
pub acl: Option, - ///

The name of the bucket to create.

- ///

- /// General purpose buckets - For information about bucket naming - /// restrictions, see Bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

+///

The name of the bucket to create.

+///

+/// General purpose buckets - For information about bucket naming +/// restrictions, see Bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

pub bucket: BucketName, - ///

The configuration information for the bucket.

+///

The configuration information for the bucket.

pub create_bucket_configuration: Option, - ///

Allows grantee the read, write, read ACP, and write ACP permissions on the - /// bucket.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Allows grantee the read, write, read ACP, and write ACP permissions on the +/// bucket.

+/// +///

This functionality is not supported for directory buckets.

+///
pub grant_full_control: Option, - ///

Allows grantee to list the objects in the bucket.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Allows grantee to list the objects in the bucket.

+/// +///

This functionality is not supported for directory buckets.

+///
pub grant_read: Option, - ///

Allows grantee to read the bucket ACL.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Allows grantee to read the bucket ACL.

+/// +///

This functionality is not supported for directory buckets.

+///
pub grant_read_acp: Option, - ///

Allows grantee to create new objects in the bucket.

- ///

For the bucket and object owners of existing objects, also allows deletions and - /// overwrites of those objects.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Allows grantee to create new objects in the bucket.

+///

For the bucket and object owners of existing objects, also allows deletions and +/// overwrites of those objects.

+/// +///

This functionality is not supported for directory buckets.

+///
pub grant_write: Option, - ///

Allows grantee to write the ACL for the applicable bucket.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Allows grantee to write the ACL for the applicable bucket.

+/// +///

This functionality is not supported for directory buckets.

+///
pub grant_write_acp: Option, - ///

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies whether you want S3 Object Lock to be enabled for the new bucket.

+/// +///

This functionality is not supported for directory buckets.

+///
pub object_lock_enabled_for_bucket: Option, pub object_ownership: Option, } impl fmt::Debug for CreateBucketInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.create_bucket_configuration { - d.field("create_bucket_configuration", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write { - d.field("grant_write", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - if let Some(ref val) = self.object_lock_enabled_for_bucket { - d.field("object_lock_enabled_for_bucket", val); - } - if let Some(ref val) = self.object_ownership { - d.field("object_ownership", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.create_bucket_configuration { +d.field("create_bucket_configuration", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write { +d.field("grant_write", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +if let Some(ref val) = self.object_lock_enabled_for_bucket { +d.field("object_lock_enabled_for_bucket", val); +} +if let Some(ref val) = self.object_ownership { +d.field("object_ownership", val); +} +d.finish_non_exhaustive() +} } impl CreateBucketInput { - #[must_use] - pub fn builder() -> builders::CreateBucketInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CreateBucketInputBuilder { +default() +} } #[derive(Clone, PartialEq)] pub struct CreateBucketMetadataTableConfigurationInput { - ///

- /// The general purpose bucket that you want to create the metadata table configuration in. - ///

+///

+/// The general purpose bucket that you want to create the metadata table configuration in. +///

pub bucket: BucketName, - ///

- /// The checksum algorithm to use with your metadata table configuration. - ///

+///

+/// The checksum algorithm to use with your metadata table configuration. +///

pub checksum_algorithm: Option, - ///

- /// The Content-MD5 header for the metadata table configuration. - ///

+///

+/// The Content-MD5 header for the metadata table configuration. +///

pub content_md5: Option, - ///

- /// The expected owner of the general purpose bucket that contains your metadata table configuration. - ///

+///

+/// The expected owner of the general purpose bucket that contains your metadata table configuration. +///

pub expected_bucket_owner: Option, - ///

- /// The contents of your metadata table configuration. - ///

+///

+/// The contents of your metadata table configuration. +///

pub metadata_table_configuration: MetadataTableConfiguration, } impl fmt::Debug for CreateBucketMetadataTableConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("metadata_table_configuration", &self.metadata_table_configuration); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("metadata_table_configuration", &self.metadata_table_configuration); +d.finish_non_exhaustive() +} } impl CreateBucketMetadataTableConfigurationInput { - #[must_use] - pub fn builder() -> builders::CreateBucketMetadataTableConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CreateBucketMetadataTableConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct CreateBucketMetadataTableConfigurationOutput {} +pub struct CreateBucketMetadataTableConfigurationOutput { +} impl fmt::Debug for CreateBucketMetadataTableConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct CreateBucketOutput { - ///

A forward slash followed by the name of the bucket.

+///

A forward slash followed by the name of the bucket.

pub location: Option, } impl fmt::Debug for CreateBucketOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketOutput"); - if let Some(ref val) = self.location { - d.field("location", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketOutput"); +if let Some(ref val) = self.location { +d.field("location", val); +} +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct CreateMultipartUploadInput { - ///

The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as - /// canned ACLs. Each canned ACL has a predefined set of grantees and - /// permissions. For more information, see Canned ACL in the - /// Amazon S3 User Guide.

- ///

By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to - /// predefined groups defined by Amazon S3. These permissions are then added to the access control - /// list (ACL) on the new object. For more information, see Using ACLs. One way to grant - /// the permissions using the request headers is to specify a canned ACL with the - /// x-amz-acl request header.

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as +/// canned ACLs. Each canned ACL has a predefined set of grantees and +/// permissions. For more information, see Canned ACL in the +/// Amazon S3 User Guide.

+///

By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to +/// predefined groups defined by Amazon S3. These permissions are then added to the access control +/// list (ACL) on the new object. For more information, see Using ACLs. One way to grant +/// the permissions using the request headers is to specify a canned ACL with the +/// x-amz-acl request header.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub acl: Option, - ///

The name of the bucket where the multipart upload is initiated and where the object is - /// uploaded.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

- pub bucket: BucketName, - ///

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

- ///

- /// General purpose buckets - Setting this header to - /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with - /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 - /// Bucket Key.

- ///

- /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

- pub bucket_key_enabled: Option, - ///

Specifies caching behavior along the request/reply chain.

- pub cache_control: Option, - ///

Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see - /// Checking object integrity in - /// the Amazon S3 User Guide.

- pub checksum_algorithm: Option, - ///

Indicates the checksum type that you want Amazon S3 to use to calculate the object’s - /// checksum value. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

- pub checksum_type: Option, - ///

Specifies presentational information for the object.

+///

The name of the bucket where the multipart upload is initiated and where the object is +/// uploaded.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

+///

+/// General purpose buckets - Setting this header to +/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with +/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 +/// Bucket Key.

+///

+/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

+ pub bucket_key_enabled: Option, +///

Specifies caching behavior along the request/reply chain.

+ pub cache_control: Option, +///

Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see +/// Checking object integrity in +/// the Amazon S3 User Guide.

+ pub checksum_algorithm: Option, +///

Indicates the checksum type that you want Amazon S3 to use to calculate the object’s +/// checksum value. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

+ pub checksum_type: Option, +///

Specifies presentational information for the object.

pub content_disposition: Option, - ///

Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

- /// - ///

For directory buckets, only the aws-chunked value is supported in this header field.

- ///
+///

Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

+/// +///

For directory buckets, only the aws-chunked value is supported in this header field.

+///
pub content_encoding: Option, - ///

The language that the content is in.

+///

The language that the content is in.

pub content_language: Option, - ///

A standard MIME type describing the format of the object data.

+///

A standard MIME type describing the format of the object data.

pub content_type: Option, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The date and time at which the object is no longer cacheable.

+///

The date and time at which the object is no longer cacheable.

pub expires: Option, - ///

Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP - /// permissions on the object.

- ///

By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can use this header to explicitly grant access permissions to - /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 - /// supports in an ACL. For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

- ///

You specify each grantee as a type=value pair, where the type is one of the - /// following:

- ///
    - ///
  • - ///

    - /// id – if the value specified is the canonical user ID of an - /// Amazon Web Services account

    - ///
  • - ///
  • - ///

    - /// uri – if you are granting permissions to a predefined group

    - ///
  • - ///
  • - ///

    - /// emailAddress – if the value specified is the email address of an - /// Amazon Web Services account

    - /// - ///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    - ///
      - ///
    • - ///

      US East (N. Virginia)

      - ///
    • - ///
    • - ///

      US West (N. California)

      - ///
    • - ///
    • - ///

      US West (Oregon)

      - ///
    • - ///
    • - ///

      Asia Pacific (Singapore)

      - ///
    • - ///
    • - ///

      Asia Pacific (Sydney)

      - ///
    • - ///
    • - ///

      Asia Pacific (Tokyo)

      - ///
    • - ///
    • - ///

      Europe (Ireland)

      - ///
    • - ///
    • - ///

      South America (São Paulo)

      - ///
    • - ///
    - ///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    - ///
    - ///
  • - ///
- ///

For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

- ///

- /// x-amz-grant-read: id="11112222333", id="444455556666" - ///

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP +/// permissions on the object.

+///

By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can use this header to explicitly grant access permissions to +/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 +/// supports in an ACL. For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

+///

You specify each grantee as a type=value pair, where the type is one of the +/// following:

+///
    +///
  • +///

    +/// id – if the value specified is the canonical user ID of an +/// Amazon Web Services account

    +///
  • +///
  • +///

    +/// uri – if you are granting permissions to a predefined group

    +///
  • +///
  • +///

    +/// emailAddress – if the value specified is the email address of an +/// Amazon Web Services account

    +/// +///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    +///
      +///
    • +///

      US East (N. Virginia)

      +///
    • +///
    • +///

      US West (N. California)

      +///
    • +///
    • +///

      US West (Oregon)

      +///
    • +///
    • +///

      Asia Pacific (Singapore)

      +///
    • +///
    • +///

      Asia Pacific (Sydney)

      +///
    • +///
    • +///

      Asia Pacific (Tokyo)

      +///
    • +///
    • +///

      Europe (Ireland)

      +///
    • +///
    • +///

      South America (São Paulo)

      +///
    • +///
    +///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    +///
    +///
  • +///
+///

For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

+///

+/// x-amz-grant-read: id="11112222333", id="444455556666" +///

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub grant_full_control: Option, - ///

Specify access permissions explicitly to allow grantee to read the object data and its - /// metadata.

- ///

By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can use this header to explicitly grant access permissions to - /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 - /// supports in an ACL. For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

- ///

You specify each grantee as a type=value pair, where the type is one of the - /// following:

- ///
    - ///
  • - ///

    - /// id – if the value specified is the canonical user ID of an - /// Amazon Web Services account

    - ///
  • - ///
  • - ///

    - /// uri – if you are granting permissions to a predefined group

    - ///
  • - ///
  • - ///

    - /// emailAddress – if the value specified is the email address of an - /// Amazon Web Services account

    - /// - ///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    - ///
      - ///
    • - ///

      US East (N. Virginia)

      - ///
    • - ///
    • - ///

      US West (N. California)

      - ///
    • - ///
    • - ///

      US West (Oregon)

      - ///
    • - ///
    • - ///

      Asia Pacific (Singapore)

      - ///
    • - ///
    • - ///

      Asia Pacific (Sydney)

      - ///
    • - ///
    • - ///

      Asia Pacific (Tokyo)

      - ///
    • - ///
    • - ///

      Europe (Ireland)

      - ///
    • - ///
    • - ///

      South America (São Paulo)

      - ///
    • - ///
    - ///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    - ///
    - ///
  • - ///
- ///

For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

- ///

- /// x-amz-grant-read: id="11112222333", id="444455556666" - ///

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

Specify access permissions explicitly to allow grantee to read the object data and its +/// metadata.

+///

By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can use this header to explicitly grant access permissions to +/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 +/// supports in an ACL. For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

+///

You specify each grantee as a type=value pair, where the type is one of the +/// following:

+///
    +///
  • +///

    +/// id – if the value specified is the canonical user ID of an +/// Amazon Web Services account

    +///
  • +///
  • +///

    +/// uri – if you are granting permissions to a predefined group

    +///
  • +///
  • +///

    +/// emailAddress – if the value specified is the email address of an +/// Amazon Web Services account

    +/// +///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    +///
      +///
    • +///

      US East (N. Virginia)

      +///
    • +///
    • +///

      US West (N. California)

      +///
    • +///
    • +///

      US West (Oregon)

      +///
    • +///
    • +///

      Asia Pacific (Singapore)

      +///
    • +///
    • +///

      Asia Pacific (Sydney)

      +///
    • +///
    • +///

      Asia Pacific (Tokyo)

      +///
    • +///
    • +///

      Europe (Ireland)

      +///
    • +///
    • +///

      South America (São Paulo)

      +///
    • +///
    +///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    +///
    +///
  • +///
+///

For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

+///

+/// x-amz-grant-read: id="11112222333", id="444455556666" +///

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub grant_read: Option, - ///

Specify access permissions explicitly to allows grantee to read the object ACL.

- ///

By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can use this header to explicitly grant access permissions to - /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 - /// supports in an ACL. For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

- ///

You specify each grantee as a type=value pair, where the type is one of the - /// following:

- ///
    - ///
  • - ///

    - /// id – if the value specified is the canonical user ID of an - /// Amazon Web Services account

    - ///
  • - ///
  • - ///

    - /// uri – if you are granting permissions to a predefined group

    - ///
  • - ///
  • - ///

    - /// emailAddress – if the value specified is the email address of an - /// Amazon Web Services account

    - /// - ///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    - ///
      - ///
    • - ///

      US East (N. Virginia)

      - ///
    • - ///
    • - ///

      US West (N. California)

      - ///
    • - ///
    • - ///

      US West (Oregon)

      - ///
    • - ///
    • - ///

      Asia Pacific (Singapore)

      - ///
    • - ///
    • - ///

      Asia Pacific (Sydney)

      - ///
    • - ///
    • - ///

      Asia Pacific (Tokyo)

      - ///
    • - ///
    • - ///

      Europe (Ireland)

      - ///
    • - ///
    • - ///

      South America (São Paulo)

      - ///
    • - ///
    - ///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    - ///
    - ///
  • - ///
- ///

For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

- ///

- /// x-amz-grant-read: id="11112222333", id="444455556666" - ///

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

Specify access permissions explicitly to allows grantee to read the object ACL.

+///

By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can use this header to explicitly grant access permissions to +/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 +/// supports in an ACL. For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

+///

You specify each grantee as a type=value pair, where the type is one of the +/// following:

+///
    +///
  • +///

    +/// id – if the value specified is the canonical user ID of an +/// Amazon Web Services account

    +///
  • +///
  • +///

    +/// uri – if you are granting permissions to a predefined group

    +///
  • +///
  • +///

    +/// emailAddress – if the value specified is the email address of an +/// Amazon Web Services account

    +/// +///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    +///
      +///
    • +///

      US East (N. Virginia)

      +///
    • +///
    • +///

      US West (N. California)

      +///
    • +///
    • +///

      US West (Oregon)

      +///
    • +///
    • +///

      Asia Pacific (Singapore)

      +///
    • +///
    • +///

      Asia Pacific (Sydney)

      +///
    • +///
    • +///

      Asia Pacific (Tokyo)

      +///
    • +///
    • +///

      Europe (Ireland)

      +///
    • +///
    • +///

      South America (São Paulo)

      +///
    • +///
    +///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    +///
    +///
  • +///
+///

For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

+///

+/// x-amz-grant-read: id="11112222333", id="444455556666" +///

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub grant_read_acp: Option, - ///

Specify access permissions explicitly to allows grantee to allow grantee to write the - /// ACL for the applicable object.

- ///

By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can use this header to explicitly grant access permissions to - /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 - /// supports in an ACL. For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

- ///

You specify each grantee as a type=value pair, where the type is one of the - /// following:

- ///
    - ///
  • - ///

    - /// id – if the value specified is the canonical user ID of an - /// Amazon Web Services account

    - ///
  • - ///
  • - ///

    - /// uri – if you are granting permissions to a predefined group

    - ///
  • - ///
  • - ///

    - /// emailAddress – if the value specified is the email address of an - /// Amazon Web Services account

    - /// - ///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    - ///
      - ///
    • - ///

      US East (N. Virginia)

      - ///
    • - ///
    • - ///

      US West (N. California)

      - ///
    • - ///
    • - ///

      US West (Oregon)

      - ///
    • - ///
    • - ///

      Asia Pacific (Singapore)

      - ///
    • - ///
    • - ///

      Asia Pacific (Sydney)

      - ///
    • - ///
    • - ///

      Asia Pacific (Tokyo)

      - ///
    • - ///
    • - ///

      Europe (Ireland)

      - ///
    • - ///
    • - ///

      South America (São Paulo)

      - ///
    • - ///
    - ///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    - ///
    - ///
  • - ///
- ///

For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

- ///

- /// x-amz-grant-read: id="11112222333", id="444455556666" - ///

- /// - ///
    - ///
  • - ///

    This functionality is not supported for directory buckets.

    - ///
  • - ///
  • - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///
  • - ///
- ///
+///

Specify access permissions explicitly to allows grantee to allow grantee to write the +/// ACL for the applicable object.

+///

By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can use this header to explicitly grant access permissions to +/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 +/// supports in an ACL. For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

+///

You specify each grantee as a type=value pair, where the type is one of the +/// following:

+///
    +///
  • +///

    +/// id – if the value specified is the canonical user ID of an +/// Amazon Web Services account

    +///
  • +///
  • +///

    +/// uri – if you are granting permissions to a predefined group

    +///
  • +///
  • +///

    +/// emailAddress – if the value specified is the email address of an +/// Amazon Web Services account

    +/// +///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    +///
      +///
    • +///

      US East (N. Virginia)

      +///
    • +///
    • +///

      US West (N. California)

      +///
    • +///
    • +///

      US West (Oregon)

      +///
    • +///
    • +///

      Asia Pacific (Singapore)

      +///
    • +///
    • +///

      Asia Pacific (Sydney)

      +///
    • +///
    • +///

      Asia Pacific (Tokyo)

      +///
    • +///
    • +///

      Europe (Ireland)

      +///
    • +///
    • +///

      South America (São Paulo)

      +///
    • +///
    +///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    +///
    +///
  • +///
+///

For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

+///

+/// x-amz-grant-read: id="11112222333", id="444455556666" +///

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
pub grant_write_acp: Option, - ///

Object key for which the multipart upload is to be initiated.

+///

Object key for which the multipart upload is to be initiated.

pub key: ObjectKey, - ///

A map of metadata to store with the object in S3.

+///

A map of metadata to store with the object in S3.

pub metadata: Option, - ///

Specifies whether you want to apply a legal hold to the uploaded object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies whether you want to apply a legal hold to the uploaded object.

+/// +///

This functionality is not supported for directory buckets.

+///
pub object_lock_legal_hold_status: Option, - ///

Specifies the Object Lock mode that you want to apply to the uploaded object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies the Object Lock mode that you want to apply to the uploaded object.

+/// +///

This functionality is not supported for directory buckets.

+///
pub object_lock_mode: Option, - ///

Specifies the date and time when you want the Object Lock to expire.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies the date and time when you want the Object Lock to expire.

+/// +///

This functionality is not supported for directory buckets.

+///
pub object_lock_retain_until_date: Option, pub request_payer: Option, - ///

Specifies the algorithm to use when encrypting the object (for example, AES256).

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies the algorithm to use when encrypting the object (for example, AES256).

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_algorithm: Option, - ///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_key: Option, - ///

Specifies the 128-bit MD5 digest of the customer-provided encryption key according to - /// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption - /// key was transmitted without error.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies the 128-bit MD5 digest of the customer-provided encryption key according to +/// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption +/// key was transmitted without error.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_key_md5: Option, - ///

Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

- ///

- /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

+///

Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

+///

+/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

pub ssekms_encryption_context: Option, - ///

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same - /// account that's issuing the command, you must use the full Key ARN not the Key ID.

- ///

- /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS - /// key to use. If you specify - /// x-amz-server-side-encryption:aws:kms or - /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key - /// (aws/s3) to protect the data.

- ///

- /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the - /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses - /// the bucket's default KMS customer managed key ID. If you want to explicitly set the - /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - /// - /// Incorrect key specification results in an HTTP 400 Bad Request error.

+///

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same +/// account that's issuing the command, you must use the full Key ARN not the Key ID.

+///

+/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS +/// key to use. If you specify +/// x-amz-server-side-encryption:aws:kms or +/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key +/// (aws/s3) to protect the data.

+///

+/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the +/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses +/// the bucket's default KMS customer managed key ID. If you want to explicitly set the +/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +/// +/// Incorrect key specification results in an HTTP 400 Bad Request error.

pub ssekms_key_id: Option, - ///

The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms).

- ///
    - ///
  • - ///

    - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    - ///

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. - /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. - /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and - /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. - ///

    - /// - ///

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the - /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. - /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), - /// the encryption request headers must match the default encryption configuration of the directory bucket. - /// - ///

    - ///
    - ///
  • - ///
+///

The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms).

+///
    +///
  • +///

    +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    +///

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. +/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. +/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and +/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. +///

    +/// +///

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the +/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. +/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), +/// the encryption request headers must match the default encryption configuration of the directory bucket. +/// +///

    +///
    +///
  • +///
pub server_side_encryption: Option, - ///

By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The - /// STANDARD storage class provides high durability and high availability. Depending on - /// performance needs, you can specify a different Storage Class. For more information, see - /// Storage - /// Classes in the Amazon S3 User Guide.

- /// - ///
    - ///
  • - ///

    For directory buckets, only the S3 Express One Zone storage class is supported to store - /// newly created objects.

    - ///
  • - ///
  • - ///

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    - ///
  • - ///
- ///
+///

By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The +/// STANDARD storage class provides high durability and high availability. Depending on +/// performance needs, you can specify a different Storage Class. For more information, see +/// Storage +/// Classes in the Amazon S3 User Guide.

+/// +///
    +///
  • +///

    For directory buckets, only the S3 Express One Zone storage class is supported to store +/// newly created objects.

    +///
  • +///
  • +///

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    +///
  • +///
+///
pub storage_class: Option, - ///

The tag-set for the object. The tag-set must be encoded as URL Query parameters.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The tag-set for the object. The tag-set must be encoded as URL Query parameters.

+/// +///

This functionality is not supported for directory buckets.

+///
pub tagging: Option, pub version_id: Option, - ///

If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata.

+/// +///

This functionality is not supported for directory buckets.

+///
pub website_redirect_location: Option, } impl fmt::Debug for CreateMultipartUploadInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateMultipartUploadInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateMultipartUploadInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tagging { +d.field("tagging", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +d.finish_non_exhaustive() +} } impl CreateMultipartUploadInput { - #[must_use] - pub fn builder() -> builders::CreateMultipartUploadInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CreateMultipartUploadInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct CreateMultipartUploadOutput { - ///

If the bucket has a lifecycle rule configured with an action to abort incomplete - /// multipart uploads and the prefix in the lifecycle rule matches the object name in the - /// request, the response includes this header. The header indicates when the initiated - /// multipart upload becomes eligible for an abort operation. For more information, see - /// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in - /// the Amazon S3 User Guide.

- ///

The response also includes the x-amz-abort-rule-id header that provides the - /// ID of the lifecycle configuration rule that defines the abort action.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If the bucket has a lifecycle rule configured with an action to abort incomplete +/// multipart uploads and the prefix in the lifecycle rule matches the object name in the +/// request, the response includes this header. The header indicates when the initiated +/// multipart upload becomes eligible for an abort operation. For more information, see +/// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in +/// the Amazon S3 User Guide.

+///

The response also includes the x-amz-abort-rule-id header that provides the +/// ID of the lifecycle configuration rule that defines the abort action.

+/// +///

This functionality is not supported for directory buckets.

+///
pub abort_date: Option, - ///

This header is returned along with the x-amz-abort-date header. It - /// identifies the applicable lifecycle configuration rule that defines the action to abort - /// incomplete multipart uploads.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

This header is returned along with the x-amz-abort-date header. It +/// identifies the applicable lifecycle configuration rule that defines the action to abort +/// incomplete multipart uploads.

+/// +///

This functionality is not supported for directory buckets.

+///
pub abort_rule_id: Option, - ///

The name of the bucket to which the multipart upload was initiated. Does not return the - /// access point ARN or access point alias if used.

- /// - ///

Access points are not supported by directory buckets.

- ///
+///

The name of the bucket to which the multipart upload was initiated. Does not return the +/// access point ARN or access point alias if used.

+/// +///

Access points are not supported by directory buckets.

+///
pub bucket: Option, - ///

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

+///

Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

pub bucket_key_enabled: Option, - ///

The algorithm that was used to create a checksum of the object.

+///

The algorithm that was used to create a checksum of the object.

pub checksum_algorithm: Option, - ///

Indicates the checksum type that you want Amazon S3 to use to calculate the object’s - /// checksum value. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

+///

Indicates the checksum type that you want Amazon S3 to use to calculate the object’s +/// checksum value. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

pub checksum_type: Option, - ///

Object key for which the multipart upload was initiated.

+///

Object key for which the multipart upload was initiated.

pub key: Option, pub request_charged: Option, - ///

If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_algorithm: Option, - ///

If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_key_md5: Option, - ///

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

+///

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

pub ssekms_encryption_context: Option, - ///

If present, indicates the ID of the KMS key that was used for object encryption.

+///

If present, indicates the ID of the KMS key that was used for object encryption.

pub ssekms_key_id: Option, - ///

The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms).

+///

The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms).

pub server_side_encryption: Option, - ///

ID for the initiated multipart upload.

+///

ID for the initiated multipart upload.

pub upload_id: Option, } impl fmt::Debug for CreateMultipartUploadOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateMultipartUploadOutput"); - if let Some(ref val) = self.abort_date { - d.field("abort_date", val); - } - if let Some(ref val) = self.abort_rule_id { - d.field("abort_rule_id", val); - } - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.upload_id { - d.field("upload_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateMultipartUploadOutput"); +if let Some(ref val) = self.abort_date { +d.field("abort_date", val); +} +if let Some(ref val) = self.abort_rule_id { +d.field("abort_rule_id", val); +} +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.upload_id { +d.field("upload_id", val); +} +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct CreateSessionInput { - ///

The name of the bucket that you create a session for.

+///

The name of the bucket that you create a session for.

pub bucket: BucketName, - ///

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using KMS keys (SSE-KMS).

- ///

S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

+///

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using KMS keys (SSE-KMS).

+///

S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

pub bucket_key_enabled: Option, - ///

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets passed on - /// to Amazon Web Services KMS for future GetObject operations on - /// this object.

- ///

- /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

- ///

- /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

+///

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets passed on +/// to Amazon Web Services KMS for future GetObject operations on +/// this object.

+///

+/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

+///

+/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

pub ssekms_encryption_context: Option, - ///

If you specify x-amz-server-side-encryption with aws:kms, you must specify the - /// x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS - /// symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same - /// account that't issuing the command, you must use the full Key ARN not the Key ID.

- ///

Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - ///

+///

If you specify x-amz-server-side-encryption with aws:kms, you must specify the +/// x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS +/// symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same +/// account that't issuing the command, you must use the full Key ARN not the Key ID.

+///

Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +///

pub ssekms_key_id: Option, - ///

The server-side encryption algorithm to use when you store objects in the directory bucket.

- ///

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. - /// For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

+///

The server-side encryption algorithm to use when you store objects in the directory bucket.

+///

For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. +/// For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

pub server_side_encryption: Option, - ///

Specifies the mode of the session that will be created, either ReadWrite or - /// ReadOnly. By default, a ReadWrite session is created. A - /// ReadWrite session is capable of executing all the Zonal endpoint API operations on a - /// directory bucket. A ReadOnly session is constrained to execute the following - /// Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2, - /// GetObjectAttributes, ListParts, and - /// ListMultipartUploads.

+///

Specifies the mode of the session that will be created, either ReadWrite or +/// ReadOnly. By default, a ReadWrite session is created. A +/// ReadWrite session is capable of executing all the Zonal endpoint API operations on a +/// directory bucket. A ReadOnly session is constrained to execute the following +/// Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2, +/// GetObjectAttributes, ListParts, and +/// ListMultipartUploads.

pub session_mode: Option, } impl fmt::Debug for CreateSessionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateSessionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.session_mode { - d.field("session_mode", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateSessionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.session_mode { +d.field("session_mode", val); +} +d.finish_non_exhaustive() +} } impl CreateSessionInput { - #[must_use] - pub fn builder() -> builders::CreateSessionInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CreateSessionInputBuilder { +default() +} } #[derive(Clone, PartialEq)] pub struct CreateSessionOutput { - ///

Indicates whether to use an S3 Bucket Key for server-side encryption - /// with KMS keys (SSE-KMS).

+///

Indicates whether to use an S3 Bucket Key for server-side encryption +/// with KMS keys (SSE-KMS).

pub bucket_key_enabled: Option, - ///

The established temporary security credentials for the created session.

+///

The established temporary security credentials for the created session.

pub credentials: SessionCredentials, - ///

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets - /// passed on to Amazon Web Services KMS for future GetObject - /// operations on this object.

+///

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets +/// passed on to Amazon Web Services KMS for future GetObject +/// operations on this object.

pub ssekms_encryption_context: Option, - ///

If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS - /// symmetric encryption customer managed key that was used for object encryption.

+///

If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS +/// symmetric encryption customer managed key that was used for object encryption.

pub ssekms_key_id: Option, - ///

The server-side encryption algorithm used when you store objects in the directory bucket.

+///

The server-side encryption algorithm used when you store objects in the directory bucket.

pub server_side_encryption: Option, } impl fmt::Debug for CreateSessionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateSessionOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - d.field("credentials", &self.credentials); - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateSessionOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +d.field("credentials", &self.credentials); +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +d.finish_non_exhaustive() +} } impl Default for CreateSessionOutput { - fn default() -> Self { - Self { - bucket_key_enabled: None, - credentials: default(), - ssekms_encryption_context: None, - ssekms_key_id: None, - server_side_encryption: None, - } - } +fn default() -> Self { +Self { +bucket_key_enabled: None, +credentials: default(), +ssekms_encryption_context: None, +ssekms_key_id: None, +server_side_encryption: None, +} +} } + pub type CreationDate = Timestamp; ///

Amazon Web Services credentials for API authentication.

#[derive(Clone, PartialEq)] pub struct Credentials { - ///

The access key ID that identifies the temporary security credentials.

+///

The access key ID that identifies the temporary security credentials.

pub access_key_id: AccessKeyIdType, - ///

The date on which the current credentials expire.

+///

The date on which the current credentials expire.

pub expiration: DateType, - ///

The secret access key that can be used to sign requests.

+///

The secret access key that can be used to sign requests.

pub secret_access_key: AccessKeySecretType, - ///

The token that users must pass to the service API to use the temporary - /// credentials.

+///

The token that users must pass to the service API to use the temporary +/// credentials.

pub session_token: TokenType, } impl fmt::Debug for Credentials { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Credentials"); - d.field("access_key_id", &self.access_key_id); - d.field("expiration", &self.expiration); - d.field("secret_access_key", &self.secret_access_key); - d.field("session_token", &self.session_token); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Credentials"); +d.field("access_key_id", &self.access_key_id); +d.field("expiration", &self.expiration); +d.field("secret_access_key", &self.secret_access_key); +d.field("session_token", &self.session_token); +d.finish_non_exhaustive() } +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DataRedundancy(Cow<'static, str>); impl DataRedundancy { - pub const SINGLE_AVAILABILITY_ZONE: &'static str = "SingleAvailabilityZone"; +pub const SINGLE_AVAILABILITY_ZONE: &'static str = "SingleAvailabilityZone"; - pub const SINGLE_LOCAL_ZONE: &'static str = "SingleLocalZone"; +pub const SINGLE_LOCAL_ZONE: &'static str = "SingleLocalZone"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for DataRedundancy { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: DataRedundancy) -> Self { - s.0 - } +fn from(s: DataRedundancy) -> Self { +s.0 +} } impl FromStr for DataRedundancy { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type Date = Timestamp; @@ -3930,656 +3992,703 @@ pub type DaysAfterInitiation = i32; /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DefaultRetention { - ///

The number of days that you want to specify for the default retention period. Must be - /// used with Mode.

+///

The number of days that you want to specify for the default retention period. Must be +/// used with Mode.

pub days: Option, - ///

The default Object Lock retention mode you want to apply to new objects placed in the - /// specified bucket. Must be used with either Days or Years.

+///

The default Object Lock retention mode you want to apply to new objects placed in the +/// specified bucket. Must be used with either Days or Years.

pub mode: Option, - ///

The number of years that you want to specify for the default retention period. Must be - /// used with Mode.

+///

The number of years that you want to specify for the default retention period. Must be +/// used with Mode.

pub years: Option, } impl fmt::Debug for DefaultRetention { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DefaultRetention"); - if let Some(ref val) = self.days { - d.field("days", val); - } - if let Some(ref val) = self.mode { - d.field("mode", val); - } - if let Some(ref val) = self.years { - d.field("years", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DefaultRetention"); +if let Some(ref val) = self.days { +d.field("days", val); +} +if let Some(ref val) = self.mode { +d.field("mode", val); +} +if let Some(ref val) = self.years { +d.field("years", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct DelMarkerExpiration { + pub days: Option, +} + +impl fmt::Debug for DelMarkerExpiration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DelMarkerExpiration"); +if let Some(ref val) = self.days { +d.field("days", val); +} +d.finish_non_exhaustive() +} } + ///

Container for the objects to delete.

#[derive(Clone, Default, PartialEq)] pub struct Delete { - ///

The object to delete.

- /// - ///

- /// Directory buckets - For directory buckets, - /// an object that's composed entirely of whitespace characters is not supported by the - /// DeleteObjects API operation. The request will receive a 400 Bad - /// Request error and none of the objects in the request will be deleted.

- ///
+///

The object to delete.

+/// +///

+/// Directory buckets - For directory buckets, +/// an object that's composed entirely of whitespace characters is not supported by the +/// DeleteObjects API operation. The request will receive a 400 Bad +/// Request error and none of the objects in the request will be deleted.

+///
pub objects: ObjectIdentifierList, - ///

Element to enable quiet mode for the request. When you add this element, you must set - /// its value to true.

+///

Element to enable quiet mode for the request. When you add this element, you must set +/// its value to true.

pub quiet: Option, } impl fmt::Debug for Delete { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Delete"); - d.field("objects", &self.objects); - if let Some(ref val) = self.quiet { - d.field("quiet", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Delete"); +d.field("objects", &self.objects); +if let Some(ref val) = self.quiet { +d.field("quiet", val); +} +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketAnalyticsConfigurationInput { - ///

The name of the bucket from which an analytics configuration is deleted.

+///

The name of the bucket from which an analytics configuration is deleted.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The ID that identifies the analytics configuration.

+///

The ID that identifies the analytics configuration.

pub id: AnalyticsId, } impl fmt::Debug for DeleteBucketAnalyticsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} } impl DeleteBucketAnalyticsConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketAnalyticsConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketAnalyticsConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketAnalyticsConfigurationOutput {} +pub struct DeleteBucketAnalyticsConfigurationOutput { +} impl fmt::Debug for DeleteBucketAnalyticsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketCorsInput { - ///

Specifies the bucket whose cors configuration is being deleted.

+///

Specifies the bucket whose cors configuration is being deleted.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketCorsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketCorsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketCorsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketCorsInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketCorsInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketCorsInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketCorsOutput {} +pub struct DeleteBucketCorsOutput { +} impl fmt::Debug for DeleteBucketCorsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketCorsOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketCorsOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketEncryptionInput { - ///

The name of the bucket containing the server-side encryption configuration to - /// delete.

- ///

- /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

+///

The name of the bucket containing the server-side encryption configuration to +/// delete.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- /// - ///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

- ///
+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

+///
pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketEncryptionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketEncryptionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketEncryptionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketEncryptionInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketEncryptionInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketEncryptionInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketEncryptionOutput {} +pub struct DeleteBucketEncryptionOutput { +} impl fmt::Debug for DeleteBucketEncryptionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketEncryptionOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketEncryptionOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketInput { - ///

Specifies the bucket being deleted.

- ///

- /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

+///

Specifies the bucket being deleted.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- /// - ///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

- ///
+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

+///
pub expected_bucket_owner: Option, pub force_delete: Option, } impl fmt::Debug for DeleteBucketInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.force_delete { - d.field("force_delete", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.force_delete { +d.field("force_delete", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketIntelligentTieringConfigurationInput { - ///

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

+///

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

pub bucket: BucketName, - ///

The ID used to identify the S3 Intelligent-Tiering configuration.

+///

The ID used to identify the S3 Intelligent-Tiering configuration.

pub id: IntelligentTieringId, } impl fmt::Debug for DeleteBucketIntelligentTieringConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationInput"); - d.field("bucket", &self.bucket); - d.field("id", &self.id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationInput"); +d.field("bucket", &self.bucket); +d.field("id", &self.id); +d.finish_non_exhaustive() +} } impl DeleteBucketIntelligentTieringConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketIntelligentTieringConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketIntelligentTieringConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketIntelligentTieringConfigurationOutput {} +pub struct DeleteBucketIntelligentTieringConfigurationOutput { +} impl fmt::Debug for DeleteBucketIntelligentTieringConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketInventoryConfigurationInput { - ///

The name of the bucket containing the inventory configuration to delete.

+///

The name of the bucket containing the inventory configuration to delete.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The ID used to identify the inventory configuration.

+///

The ID used to identify the inventory configuration.

pub id: InventoryId, } impl fmt::Debug for DeleteBucketInventoryConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketInventoryConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketInventoryConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} } impl DeleteBucketInventoryConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketInventoryConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketInventoryConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketInventoryConfigurationOutput {} +pub struct DeleteBucketInventoryConfigurationOutput { +} impl fmt::Debug for DeleteBucketInventoryConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketInventoryConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketInventoryConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketLifecycleInput { - ///

The bucket name of the lifecycle to delete.

+///

The bucket name of the lifecycle to delete.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- /// - ///

This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

- ///
+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketLifecycleInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketLifecycleInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketLifecycleInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketLifecycleInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketLifecycleInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketLifecycleInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketLifecycleOutput {} +pub struct DeleteBucketLifecycleOutput { +} impl fmt::Debug for DeleteBucketLifecycleOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketLifecycleOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketLifecycleOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketMetadataTableConfigurationInput { - ///

- /// The general purpose bucket that you want to remove the metadata table configuration from. - ///

+///

+/// The general purpose bucket that you want to remove the metadata table configuration from. +///

pub bucket: BucketName, - ///

- /// The expected bucket owner of the general purpose bucket that you want to remove the - /// metadata table configuration from. - ///

+///

+/// The expected bucket owner of the general purpose bucket that you want to remove the +/// metadata table configuration from. +///

pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketMetadataTableConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketMetadataTableConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketMetadataTableConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketMetadataTableConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketMetadataTableConfigurationOutput {} +pub struct DeleteBucketMetadataTableConfigurationOutput { +} impl fmt::Debug for DeleteBucketMetadataTableConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketMetricsConfigurationInput { - ///

The name of the bucket containing the metrics configuration to delete.

+///

The name of the bucket containing the metrics configuration to delete.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The ID used to identify the metrics configuration. The ID has a 64 character limit and - /// can only contain letters, numbers, periods, dashes, and underscores.

+///

The ID used to identify the metrics configuration. The ID has a 64 character limit and +/// can only contain letters, numbers, periods, dashes, and underscores.

pub id: MetricsId, } impl fmt::Debug for DeleteBucketMetricsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketMetricsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketMetricsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} } impl DeleteBucketMetricsConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketMetricsConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketMetricsConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketMetricsConfigurationOutput {} +pub struct DeleteBucketMetricsConfigurationOutput { +} impl fmt::Debug for DeleteBucketMetricsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketMetricsConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketMetricsConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketOutput {} +pub struct DeleteBucketOutput { +} impl fmt::Debug for DeleteBucketOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketOwnershipControlsInput { - ///

The Amazon S3 bucket whose OwnershipControls you want to delete.

+///

The Amazon S3 bucket whose OwnershipControls you want to delete.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketOwnershipControlsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketOwnershipControlsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketOwnershipControlsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketOwnershipControlsInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketOwnershipControlsInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketOwnershipControlsInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketOwnershipControlsOutput {} +pub struct DeleteBucketOwnershipControlsOutput { +} impl fmt::Debug for DeleteBucketOwnershipControlsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketOwnershipControlsOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketOwnershipControlsOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketPolicyInput { - ///

The bucket name.

- ///

- /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

+///

The bucket name.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- /// - ///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

- ///
+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

+///
pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketPolicyInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketPolicyInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketPolicyInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketPolicyInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketPolicyInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketPolicyInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketPolicyOutput {} +pub struct DeleteBucketPolicyOutput { +} impl fmt::Debug for DeleteBucketPolicyOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketPolicyOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketPolicyOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketReplicationInput { - ///

The bucket name.

+///

The bucket name.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketReplicationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketReplicationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketReplicationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketReplicationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketReplicationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketReplicationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketReplicationOutput {} +pub struct DeleteBucketReplicationOutput { +} impl fmt::Debug for DeleteBucketReplicationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketReplicationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketReplicationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketTaggingInput { - ///

The bucket that has the tag set to be removed.

+///

The bucket that has the tag set to be removed.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketTaggingInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketTaggingInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketTaggingInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketTaggingOutput {} +pub struct DeleteBucketTaggingOutput { +} impl fmt::Debug for DeleteBucketTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketTaggingOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketTaggingOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketWebsiteInput { - ///

The bucket name for which you want to remove the website configuration.

+///

The bucket name for which you want to remove the website configuration.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketWebsiteInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketWebsiteInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketWebsiteInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketWebsiteInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketWebsiteInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketWebsiteInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketWebsiteOutput {} +pub struct DeleteBucketWebsiteOutput { +} impl fmt::Debug for DeleteBucketWebsiteOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketWebsiteOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketWebsiteOutput"); +d.finish_non_exhaustive() +} } + pub type DeleteMarker = bool; ///

Information about the delete marker.

#[derive(Clone, Default, PartialEq)] pub struct DeleteMarkerEntry { - ///

Specifies whether the object is (true) or is not (false) the latest version of an - /// object.

+///

Specifies whether the object is (true) or is not (false) the latest version of an +/// object.

pub is_latest: Option, - ///

The object key.

+///

The object key.

pub key: Option, - ///

Date and time when the object was last modified.

+///

Date and time when the object was last modified.

pub last_modified: Option, - ///

The account that created the delete marker.

+///

The account that created the delete marker.

pub owner: Option, - ///

Version ID of an object.

+///

Version ID of an object.

pub version_id: Option, } impl fmt::Debug for DeleteMarkerEntry { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteMarkerEntry"); - if let Some(ref val) = self.is_latest { - d.field("is_latest", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteMarkerEntry"); +if let Some(ref val) = self.is_latest { +d.field("is_latest", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); } +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + ///

Specifies whether Amazon S3 replicates delete markers. If you specify a Filter /// in your replication configuration, you must also include a @@ -4595,59 +4704,61 @@ impl fmt::Debug for DeleteMarkerEntry { /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DeleteMarkerReplication { - ///

Indicates whether to replicate delete markers.

- /// - ///

Indicates whether to replicate delete markers.

- ///
+///

Indicates whether to replicate delete markers.

+/// +///

Indicates whether to replicate delete markers.

+///
pub status: Option, } impl fmt::Debug for DeleteMarkerReplication { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteMarkerReplication"); - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteMarkerReplication"); +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeleteMarkerReplicationStatus(Cow<'static, str>); impl DeleteMarkerReplicationStatus { - pub const DISABLED: &'static str = "Disabled"; +pub const DISABLED: &'static str = "Disabled"; - pub const ENABLED: &'static str = "Enabled"; +pub const ENABLED: &'static str = "Enabled"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for DeleteMarkerReplicationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: DeleteMarkerReplicationStatus) -> Self { - s.0 - } +fn from(s: DeleteMarkerReplicationStatus) -> Self { +s.0 +} } impl FromStr for DeleteMarkerReplicationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type DeleteMarkerVersionId = String; @@ -4656,493 +4767,501 @@ pub type DeleteMarkers = List; #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectInput { - ///

The bucket name of the bucket containing the object.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+///

The bucket name of the bucket containing the object.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

pub bucket: BucketName, - ///

Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process - /// this operation. To use this header, you must have the - /// s3:BypassGovernanceRetention permission.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process +/// this operation. To use this header, you must have the +/// s3:BypassGovernanceRetention permission.

+/// +///

This functionality is not supported for directory buckets.

+///
pub bypass_governance_retention: Option, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns - /// a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No - /// Content) response.

- ///

For more information about conditional requests, see RFC 7232.

- /// - ///

This functionality is only supported for directory buckets.

- ///
+///

The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns +/// a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No +/// Content) response.

+///

For more information about conditional requests, see RFC 7232.

+/// +///

This functionality is only supported for directory buckets.

+///
pub if_match: Option, - ///

If present, the object is deleted only if its modification times matches the provided - /// Timestamp. If the Timestamp values do not match, the operation - /// returns a 412 Precondition Failed error. If the Timestamp matches - /// or if the object doesn’t exist, the operation returns a 204 Success (No - /// Content) response.

- /// - ///

This functionality is only supported for directory buckets.

- ///
+///

If present, the object is deleted only if its modification times matches the provided +/// Timestamp. If the Timestamp values do not match, the operation +/// returns a 412 Precondition Failed error. If the Timestamp matches +/// or if the object doesn’t exist, the operation returns a 204 Success (No +/// Content) response.

+/// +///

This functionality is only supported for directory buckets.

+///
pub if_match_last_modified_time: Option, - ///

If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn’t exist, - /// the operation returns a 204 Success (No Content) response.

- /// - ///

This functionality is only supported for directory buckets.

- ///
- /// - ///

You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size - /// conditional headers in conjunction with each-other or individually.

- ///
+///

If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn’t exist, +/// the operation returns a 204 Success (No Content) response.

+/// +///

This functionality is only supported for directory buckets.

+///
+/// +///

You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size +/// conditional headers in conjunction with each-other or individually.

+///
pub if_match_size: Option, - ///

Key name of the object to delete.

+///

Key name of the object to delete.

pub key: ObjectKey, - ///

The concatenation of the authentication device's serial number, a space, and the value - /// that is displayed on your authentication device. Required to permanently delete a versioned - /// object if versioning is configured with MFA delete enabled.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The concatenation of the authentication device's serial number, a space, and the value +/// that is displayed on your authentication device. Required to permanently delete a versioned +/// object if versioning is configured with MFA delete enabled.

+/// +///

This functionality is not supported for directory buckets.

+///
pub mfa: Option, pub request_payer: Option, - ///

Version ID used to reference a specific version of the object.

- /// - ///

For directory buckets in this API operation, only the null value of the version ID is supported.

- ///
+///

Version ID used to reference a specific version of the object.

+/// +///

For directory buckets in this API operation, only the null value of the version ID is supported.

+///
pub version_id: Option, } impl fmt::Debug for DeleteObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bypass_governance_retention { - d.field("bypass_governance_retention", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_match_last_modified_time { - d.field("if_match_last_modified_time", val); - } - if let Some(ref val) = self.if_match_size { - d.field("if_match_size", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.mfa { - d.field("mfa", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bypass_governance_retention { +d.field("bypass_governance_retention", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_match_last_modified_time { +d.field("if_match_last_modified_time", val); +} +if let Some(ref val) = self.if_match_size { +d.field("if_match_size", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.mfa { +d.field("mfa", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } impl DeleteObjectInput { - #[must_use] - pub fn builder() -> builders::DeleteObjectInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteObjectInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectOutput { - ///

Indicates whether the specified object version that was permanently deleted was (true) - /// or was not (false) a delete marker before deletion. In a simple DELETE, this header - /// indicates whether (true) or not (false) the current version of the object is a delete - /// marker. To learn more about delete markers, see Working with delete markers.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Indicates whether the specified object version that was permanently deleted was (true) +/// or was not (false) a delete marker before deletion. In a simple DELETE, this header +/// indicates whether (true) or not (false) the current version of the object is a delete +/// marker. To learn more about delete markers, see Working with delete markers.

+/// +///

This functionality is not supported for directory buckets.

+///
pub delete_marker: Option, pub request_charged: Option, - ///

Returns the version ID of the delete marker created as a result of the DELETE - /// operation.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Returns the version ID of the delete marker created as a result of the DELETE +/// operation.

+/// +///

This functionality is not supported for directory buckets.

+///
pub version_id: Option, } impl fmt::Debug for DeleteObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectOutput"); - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectOutput"); +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectTaggingInput { - ///

The bucket name containing the objects from which to remove the tags.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+///

The bucket name containing the objects from which to remove the tags.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The key that identifies the object in the bucket from which to remove all tags.

+///

The key that identifies the object in the bucket from which to remove all tags.

pub key: ObjectKey, - ///

The versionId of the object that the tag-set will be removed from.

+///

The versionId of the object that the tag-set will be removed from.

pub version_id: Option, } impl fmt::Debug for DeleteObjectTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } impl DeleteObjectTaggingInput { - #[must_use] - pub fn builder() -> builders::DeleteObjectTaggingInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteObjectTaggingInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectTaggingOutput { - ///

The versionId of the object the tag-set was removed from.

+///

The versionId of the object the tag-set was removed from.

pub version_id: Option, } impl fmt::Debug for DeleteObjectTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectTaggingOutput"); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectTaggingOutput"); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() } +} + #[derive(Clone, PartialEq)] pub struct DeleteObjectsInput { - ///

The bucket name containing the objects to delete.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+///

The bucket name containing the objects to delete.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

pub bucket: BucketName, - ///

Specifies whether you want to delete this object even if it has a Governance-type Object - /// Lock in place. To use this header, you must have the - /// s3:BypassGovernanceRetention permission.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Specifies whether you want to delete this object even if it has a Governance-type Object +/// Lock in place. To use this header, you must have the +/// s3:BypassGovernanceRetention permission.

+/// +///

This functionality is not supported for directory buckets.

+///
pub bypass_governance_retention: Option, - ///

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

- ///

For the x-amz-checksum-algorithm - /// header, replace - /// algorithm - /// with the supported algorithm from the following list:

- ///
    - ///
  • - ///

    - /// CRC32 - ///

    - ///
  • - ///
  • - ///

    - /// CRC32C - ///

    - ///
  • - ///
  • - ///

    - /// CRC64NVME - ///

    - ///
  • - ///
  • - ///

    - /// SHA1 - ///

    - ///
  • - ///
  • - ///

    - /// SHA256 - ///

    - ///
  • - ///
- ///

For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

- ///

If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

- ///

If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

+///

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm +/// or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

+///

For the x-amz-checksum-algorithm +/// header, replace +/// algorithm +/// with the supported algorithm from the following list:

+///
    +///
  • +///

    +/// CRC32 +///

    +///
  • +///
  • +///

    +/// CRC32C +///

    +///
  • +///
  • +///

    +/// CRC64NVME +///

    +///
  • +///
  • +///

    +/// SHA1 +///

    +///
  • +///
  • +///

    +/// SHA256 +///

    +///
  • +///
+///

For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

+///

If the individual checksum value you provide through x-amz-checksum-algorithm +/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

+///

If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

pub checksum_algorithm: Option, - ///

Container for the request.

+///

Container for the request.

pub delete: Delete, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The concatenation of the authentication device's serial number, a space, and the value - /// that is displayed on your authentication device. Required to permanently delete a versioned - /// object if versioning is configured with MFA delete enabled.

- ///

When performing the DeleteObjects operation on an MFA delete enabled - /// bucket, which attempts to delete the specified versioned objects, you must include an MFA - /// token. If you don't provide an MFA token, the entire request will fail, even if there are - /// non-versioned objects that you are trying to delete. If you provide an invalid token, - /// whether there are versioned object keys in the request or not, the entire Multi-Object - /// Delete request will fail. For information about MFA Delete, see MFA - /// Delete in the Amazon S3 User Guide.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The concatenation of the authentication device's serial number, a space, and the value +/// that is displayed on your authentication device. Required to permanently delete a versioned +/// object if versioning is configured with MFA delete enabled.

+///

When performing the DeleteObjects operation on an MFA delete enabled +/// bucket, which attempts to delete the specified versioned objects, you must include an MFA +/// token. If you don't provide an MFA token, the entire request will fail, even if there are +/// non-versioned objects that you are trying to delete. If you provide an invalid token, +/// whether there are versioned object keys in the request or not, the entire Multi-Object +/// Delete request will fail. For information about MFA Delete, see MFA +/// Delete in the Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
pub mfa: Option, pub request_payer: Option, } impl fmt::Debug for DeleteObjectsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bypass_governance_retention { - d.field("bypass_governance_retention", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - d.field("delete", &self.delete); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.mfa { - d.field("mfa", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bypass_governance_retention { +d.field("bypass_governance_retention", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +d.field("delete", &self.delete); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.mfa { +d.field("mfa", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.finish_non_exhaustive() +} } impl DeleteObjectsInput { - #[must_use] - pub fn builder() -> builders::DeleteObjectsInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteObjectsInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectsOutput { - ///

Container element for a successful delete. It identifies the object that was - /// successfully deleted.

+///

Container element for a successful delete. It identifies the object that was +/// successfully deleted.

pub deleted: Option, - ///

Container for a failed delete action that describes the object that Amazon S3 attempted to - /// delete and the error it encountered.

+///

Container for a failed delete action that describes the object that Amazon S3 attempted to +/// delete and the error it encountered.

pub errors: Option, pub request_charged: Option, } impl fmt::Debug for DeleteObjectsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectsOutput"); - if let Some(ref val) = self.deleted { - d.field("deleted", val); - } - if let Some(ref val) = self.errors { - d.field("errors", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectsOutput"); +if let Some(ref val) = self.deleted { +d.field("deleted", val); +} +if let Some(ref val) = self.errors { +d.field("errors", val); } +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + #[derive(Clone, Default, PartialEq)] pub struct DeletePublicAccessBlockInput { - ///

The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. - ///

+///

The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. +///

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, } impl fmt::Debug for DeletePublicAccessBlockInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeletePublicAccessBlockInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeletePublicAccessBlockInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeletePublicAccessBlockInput { - #[must_use] - pub fn builder() -> builders::DeletePublicAccessBlockInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeletePublicAccessBlockInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeletePublicAccessBlockOutput {} +pub struct DeletePublicAccessBlockOutput { +} impl fmt::Debug for DeletePublicAccessBlockOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeletePublicAccessBlockOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeletePublicAccessBlockOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct DeleteReplication { pub status: DeleteReplicationStatus, } impl fmt::Debug for DeleteReplication { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteReplication"); - d.field("status", &self.status); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteReplication"); +d.field("status", &self.status); +d.finish_non_exhaustive() } +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeleteReplicationStatus(Cow<'static, str>); impl DeleteReplicationStatus { - pub const DISABLED: &'static str = "Disabled"; +pub const DISABLED: &'static str = "Disabled"; - pub const ENABLED: &'static str = "Enabled"; +pub const ENABLED: &'static str = "Enabled"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for DeleteReplicationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: DeleteReplicationStatus) -> Self { - s.0 - } +fn from(s: DeleteReplicationStatus) -> Self { +s.0 +} } impl FromStr for DeleteReplicationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

Information about the deleted object.

#[derive(Clone, Default, PartialEq)] pub struct DeletedObject { - ///

Indicates whether the specified object version that was permanently deleted was (true) - /// or was not (false) a delete marker before deletion. In a simple DELETE, this header - /// indicates whether (true) or not (false) the current version of the object is a delete - /// marker. To learn more about delete markers, see Working with delete markers.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

Indicates whether the specified object version that was permanently deleted was (true) +/// or was not (false) a delete marker before deletion. In a simple DELETE, this header +/// indicates whether (true) or not (false) the current version of the object is a delete +/// marker. To learn more about delete markers, see Working with delete markers.

+/// +///

This functionality is not supported for directory buckets.

+///
pub delete_marker: Option, - ///

The version ID of the delete marker created as a result of the DELETE operation. If you - /// delete a specific object version, the value returned by this header is the version ID of - /// the object version deleted.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

The version ID of the delete marker created as a result of the DELETE operation. If you +/// delete a specific object version, the value returned by this header is the version ID of +/// the object version deleted.

+/// +///

This functionality is not supported for directory buckets.

+///
pub delete_marker_version_id: Option, - ///

The name of the deleted object.

+///

The name of the deleted object.

pub key: Option, - ///

The version ID of the deleted object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub version_id: Option, +///

The version ID of the deleted object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub version_id: Option, } impl fmt::Debug for DeletedObject { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeletedObject"); - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.delete_marker_version_id { - d.field("delete_marker_version_id", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeletedObject"); +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.delete_marker_version_id { +d.field("delete_marker_version_id", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } + pub type DeletedObjects = List; pub type Delimiter = String; @@ -5153,70 +5272,72 @@ pub type Description = String; /// Amazon S3 bucket and S3 Replication Time Control (S3 RTC).

#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct Destination { - ///

Specify this only in a cross-account scenario (where source and destination bucket - /// owners are not the same), and you want to change replica ownership to the Amazon Web Services account - /// that owns the destination bucket. If this is not specified in the replication - /// configuration, the replicas are owned by same Amazon Web Services account that owns the source - /// object.

+///

Specify this only in a cross-account scenario (where source and destination bucket +/// owners are not the same), and you want to change replica ownership to the Amazon Web Services account +/// that owns the destination bucket. If this is not specified in the replication +/// configuration, the replicas are owned by same Amazon Web Services account that owns the source +/// object.

pub access_control_translation: Option, - ///

Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to - /// change replica ownership to the Amazon Web Services account that owns the destination bucket by - /// specifying the AccessControlTranslation property, this is the account ID of - /// the destination bucket owner. For more information, see Replication Additional - /// Configuration: Changing the Replica Owner in the - /// Amazon S3 User Guide.

+///

Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to +/// change replica ownership to the Amazon Web Services account that owns the destination bucket by +/// specifying the AccessControlTranslation property, this is the account ID of +/// the destination bucket owner. For more information, see Replication Additional +/// Configuration: Changing the Replica Owner in the +/// Amazon S3 User Guide.

pub account: Option, - ///

The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the - /// results.

+///

The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the +/// results.

pub bucket: BucketName, - ///

A container that provides information about encryption. If - /// SourceSelectionCriteria is specified, you must specify this element.

+///

A container that provides information about encryption. If +/// SourceSelectionCriteria is specified, you must specify this element.

pub encryption_configuration: Option, - ///

A container specifying replication metrics-related settings enabling replication - /// metrics and events.

+///

A container specifying replication metrics-related settings enabling replication +/// metrics and events.

pub metrics: Option, - ///

A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time - /// when all objects and operations on objects must be replicated. Must be specified together - /// with a Metrics block.

+///

A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time +/// when all objects and operations on objects must be replicated. Must be specified together +/// with a Metrics block.

pub replication_time: Option, - ///

The storage class to use when replicating objects, such as S3 Standard or reduced - /// redundancy. By default, Amazon S3 uses the storage class of the source object to create the - /// object replica.

- ///

For valid values, see the StorageClass element of the PUT Bucket - /// replication action in the Amazon S3 API Reference.

+///

The storage class to use when replicating objects, such as S3 Standard or reduced +/// redundancy. By default, Amazon S3 uses the storage class of the source object to create the +/// object replica.

+///

For valid values, see the StorageClass element of the PUT Bucket +/// replication action in the Amazon S3 API Reference.

pub storage_class: Option, } impl fmt::Debug for Destination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Destination"); - if let Some(ref val) = self.access_control_translation { - d.field("access_control_translation", val); - } - if let Some(ref val) = self.account { - d.field("account", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.encryption_configuration { - d.field("encryption_configuration", val); - } - if let Some(ref val) = self.metrics { - d.field("metrics", val); - } - if let Some(ref val) = self.replication_time { - d.field("replication_time", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Destination"); +if let Some(ref val) = self.access_control_translation { +d.field("access_control_translation", val); +} +if let Some(ref val) = self.account { +d.field("account", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.encryption_configuration { +d.field("encryption_configuration", val); +} +if let Some(ref val) = self.metrics { +d.field("metrics", val); +} +if let Some(ref val) = self.replication_time { +d.field("replication_time", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() } +} + pub type DirectoryBucketToken = String; pub type DisplayName = String; + pub type EmailAddress = String; pub type EnableRequestProgress = bool; @@ -5238,68 +5359,70 @@ pub type EnableRequestProgress = bool; pub struct EncodingType(Cow<'static, str>); impl EncodingType { - pub const URL: &'static str = "url"; +pub const URL: &'static str = "url"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for EncodingType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: EncodingType) -> Self { - s.0 - } +fn from(s: EncodingType) -> Self { +s.0 +} } impl FromStr for EncodingType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

Contains the type of server-side encryption used.

#[derive(Clone, PartialEq)] pub struct Encryption { - ///

The server-side encryption algorithm used when storing job results in Amazon S3 (for example, - /// AES256, aws:kms).

+///

The server-side encryption algorithm used when storing job results in Amazon S3 (for example, +/// AES256, aws:kms).

pub encryption_type: ServerSideEncryption, - ///

If the encryption type is aws:kms, this optional value can be used to - /// specify the encryption context for the restore results.

+///

If the encryption type is aws:kms, this optional value can be used to +/// specify the encryption context for the restore results.

pub kms_context: Option, - ///

If the encryption type is aws:kms, this optional value specifies the ID of - /// the symmetric encryption customer managed key to use for encryption of job results. Amazon S3 only - /// supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service - /// Developer Guide.

+///

If the encryption type is aws:kms, this optional value specifies the ID of +/// the symmetric encryption customer managed key to use for encryption of job results. Amazon S3 only +/// supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service +/// Developer Guide.

pub kms_key_id: Option, } impl fmt::Debug for Encryption { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Encryption"); - d.field("encryption_type", &self.encryption_type); - if let Some(ref val) = self.kms_context { - d.field("kms_context", val); - } - if let Some(ref val) = self.kms_key_id { - d.field("kms_key_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Encryption"); +d.field("encryption_type", &self.encryption_type); +if let Some(ref val) = self.kms_context { +d.field("kms_context", val); +} +if let Some(ref val) = self.kms_key_id { +d.field("kms_key_id", val); +} +d.finish_non_exhaustive() +} } + ///

Specifies encryption-related information for an Amazon S3 bucket that is a destination for /// replicated objects.

/// @@ -5310,39 +5433,42 @@ impl fmt::Debug for Encryption { /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct EncryptionConfiguration { - ///

Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in - /// Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to - /// encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more - /// information, see Asymmetric keys in Amazon Web Services - /// KMS in the Amazon Web Services Key Management Service Developer - /// Guide.

+///

Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in +/// Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to +/// encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more +/// information, see Asymmetric keys in Amazon Web Services +/// KMS in the Amazon Web Services Key Management Service Developer +/// Guide.

pub replica_kms_key_id: Option, } impl fmt::Debug for EncryptionConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("EncryptionConfiguration"); - if let Some(ref val) = self.replica_kms_key_id { - d.field("replica_kms_key_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("EncryptionConfiguration"); +if let Some(ref val) = self.replica_kms_key_id { +d.field("replica_kms_key_id", val); +} +d.finish_non_exhaustive() } +} + ///

-/// The existing object was created with a different encryption type. -/// Subsequent write requests must include the appropriate encryption +/// The existing object was created with a different encryption type. +/// Subsequent write requests must include the appropriate encryption /// parameters in the request or while creating the session. ///

#[derive(Clone, Default, PartialEq)] -pub struct EncryptionTypeMismatch {} +pub struct EncryptionTypeMismatch { +} impl fmt::Debug for EncryptionTypeMismatch { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("EncryptionTypeMismatch"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("EncryptionTypeMismatch"); +d.finish_non_exhaustive() } +} + pub type End = i64; @@ -5350,32821 +5476,33227 @@ pub type End = i64; /// should not assume that the request is complete until the client receives an /// EndEvent.

#[derive(Clone, Default, PartialEq)] -pub struct EndEvent {} +pub struct EndEvent { +} impl fmt::Debug for EndEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("EndEvent"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("EndEvent"); +d.finish_non_exhaustive() } +} + ///

Container for all error elements.

#[derive(Clone, Default, PartialEq)] pub struct Error { - ///

The error code is a string that uniquely identifies an error condition. It is meant to - /// be read and understood by programs that detect and handle errors by type. The following is - /// a list of Amazon S3 error codes. For more information, see Error responses.

- ///
    - ///
  • - ///
      - ///
    • - ///

      - /// Code: AccessDenied

      - ///
    • - ///
    • - ///

      - /// Description: Access Denied

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: AccountProblem

      - ///
    • - ///
    • - ///

      - /// Description: There is a problem with your Amazon Web Services account - /// that prevents the action from completing successfully. Contact Amazon Web Services Support - /// for further assistance.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: AllAccessDisabled

      - ///
    • - ///
    • - ///

      - /// Description: All access to this Amazon S3 resource has been - /// disabled. Contact Amazon Web Services Support for further assistance.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: AmbiguousGrantByEmailAddress

      - ///
    • - ///
    • - ///

      - /// Description: The email address you provided is - /// associated with more than one account.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: AuthorizationHeaderMalformed

      - ///
    • - ///
    • - ///

      - /// Description: The authorization header you provided is - /// invalid.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: BadDigest

      - ///
    • - ///
    • - ///

      - /// Description: The Content-MD5 you specified did not - /// match what we received.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: BucketAlreadyExists

      - ///
    • - ///
    • - ///

      - /// Description: The requested bucket name is not - /// available. The bucket namespace is shared by all users of the system. Please - /// select a different name and try again.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 409 Conflict

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: BucketAlreadyOwnedByYou

      - ///
    • - ///
    • - ///

      - /// Description: The bucket you tried to create already - /// exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in - /// the North Virginia Region. For legacy compatibility, if you re-create an - /// existing bucket that you already own in the North Virginia Region, Amazon S3 returns - /// 200 OK and resets the bucket access control lists (ACLs).

      - ///
    • - ///
    • - ///

      - /// Code: 409 Conflict (in all Regions except the North - /// Virginia Region)

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: BucketNotEmpty

      - ///
    • - ///
    • - ///

      - /// Description: The bucket you tried to delete is not - /// empty.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 409 Conflict

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: CredentialsNotSupported

      - ///
    • - ///
    • - ///

      - /// Description: This request does not support - /// credentials.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: CrossLocationLoggingProhibited

      - ///
    • - ///
    • - ///

      - /// Description: Cross-location logging not allowed. - /// Buckets in one geographic location cannot log information to a bucket in - /// another location.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: EntityTooSmall

      - ///
    • - ///
    • - ///

      - /// Description: Your proposed upload is smaller than the - /// minimum allowed object size.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: EntityTooLarge

      - ///
    • - ///
    • - ///

      - /// Description: Your proposed upload exceeds the maximum - /// allowed object size.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: ExpiredToken

      - ///
    • - ///
    • - ///

      - /// Description: The provided token has expired.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: IllegalVersioningConfigurationException

      - ///
    • - ///
    • - ///

      - /// Description: Indicates that the versioning - /// configuration specified in the request is invalid.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: IncompleteBody

      - ///
    • - ///
    • - ///

      - /// Description: You did not provide the number of bytes - /// specified by the Content-Length HTTP header

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: IncorrectNumberOfFilesInPostRequest

      - ///
    • - ///
    • - ///

      - /// Description: POST requires exactly one file upload per - /// request.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InlineDataTooLarge

      - ///
    • - ///
    • - ///

      - /// Description: Inline data exceeds the maximum allowed - /// size.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InternalError

      - ///
    • - ///
    • - ///

      - /// Description: We encountered an internal error. Please - /// try again.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 500 Internal Server Error

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Server

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidAccessKeyId

      - ///
    • - ///
    • - ///

      - /// Description: The Amazon Web Services access key ID you provided does - /// not exist in our records.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidAddressingHeader

      - ///
    • - ///
    • - ///

      - /// Description: You must specify the Anonymous - /// role.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: N/A

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidArgument

      - ///
    • - ///
    • - ///

      - /// Description: Invalid Argument

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidBucketName

      - ///
    • - ///
    • - ///

      - /// Description: The specified bucket is not valid.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidBucketState

      - ///
    • - ///
    • - ///

      - /// Description: The request is not valid with the current - /// state of the bucket.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 409 Conflict

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidDigest

      - ///
    • - ///
    • - ///

      - /// Description: The Content-MD5 you specified is not - /// valid.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidEncryptionAlgorithmError

      - ///
    • - ///
    • - ///

      - /// Description: The encryption request you specified is - /// not valid. The valid value is AES256.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidLocationConstraint

      - ///
    • - ///
    • - ///

      - /// Description: The specified location constraint is not - /// valid. For more information about Regions, see How to Select - /// a Region for Your Buckets.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidObjectState

      - ///
    • - ///
    • - ///

      - /// Description: The action is not valid for the current - /// state of the object.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidPart

      - ///
    • - ///
    • - ///

      - /// Description: One or more of the specified parts could - /// not be found. The part might not have been uploaded, or the specified entity - /// tag might not have matched the part's entity tag.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidPartOrder

      - ///
    • - ///
    • - ///

      - /// Description: The list of parts was not in ascending - /// order. Parts list must be specified in order by part number.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidPayer

      - ///
    • - ///
    • - ///

      - /// Description: All access to this object has been - /// disabled. Please contact Amazon Web Services Support for further assistance.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidPolicyDocument

      - ///
    • - ///
    • - ///

      - /// Description: The content of the form does not meet the - /// conditions specified in the policy document.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRange

      - ///
    • - ///
    • - ///

      - /// Description: The requested range cannot be - /// satisfied.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 416 Requested Range Not - /// Satisfiable

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: Please use - /// AWS4-HMAC-SHA256.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: SOAP requests must be made over an HTTPS - /// connection.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: Amazon S3 Transfer Acceleration is not - /// supported for buckets with non-DNS compliant names.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: Amazon S3 Transfer Acceleration is not - /// supported for buckets with periods (.) in their names.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: Amazon S3 Transfer Accelerate endpoint only - /// supports virtual style requests.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: Amazon S3 Transfer Accelerate is not configured - /// on this bucket.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: Amazon S3 Transfer Accelerate is disabled on - /// this bucket.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: Amazon S3 Transfer Acceleration is not - /// supported on this bucket. Contact Amazon Web Services Support for more information.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidRequest

      - ///
    • - ///
    • - ///

      - /// Description: Amazon S3 Transfer Acceleration cannot be - /// enabled on this bucket. Contact Amazon Web Services Support for more information.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// Code: N/A

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidSecurity

      - ///
    • - ///
    • - ///

      - /// Description: The provided security credentials are not - /// valid.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidSOAPRequest

      - ///
    • - ///
    • - ///

      - /// Description: The SOAP request body is invalid.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidStorageClass

      - ///
    • - ///
    • - ///

      - /// Description: The storage class you specified is not - /// valid.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidTargetBucketForLogging

      - ///
    • - ///
    • - ///

      - /// Description: The target bucket for logging does not - /// exist, is not owned by you, or does not have the appropriate grants for the - /// log-delivery group.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidToken

      - ///
    • - ///
    • - ///

      - /// Description: The provided token is malformed or - /// otherwise invalid.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: InvalidURI

      - ///
    • - ///
    • - ///

      - /// Description: Couldn't parse the specified URI.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: KeyTooLongError

      - ///
    • - ///
    • - ///

      - /// Description: Your key is too long.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MalformedACLError

      - ///
    • - ///
    • - ///

      - /// Description: The XML you provided was not well-formed - /// or did not validate against our published schema.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MalformedPOSTRequest

      - ///
    • - ///
    • - ///

      - /// Description: The body of your POST request is not - /// well-formed multipart/form-data.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MalformedXML

      - ///
    • - ///
    • - ///

      - /// Description: This happens when the user sends malformed - /// XML (XML that doesn't conform to the published XSD) for the configuration. The - /// error message is, "The XML you provided was not well-formed or did not validate - /// against our published schema."

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MaxMessageLengthExceeded

      - ///
    • - ///
    • - ///

      - /// Description: Your request was too big.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MaxPostPreDataLengthExceededError

      - ///
    • - ///
    • - ///

      - /// Description: Your POST request fields preceding the - /// upload file were too large.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MetadataTooLarge

      - ///
    • - ///
    • - ///

      - /// Description: Your metadata headers exceed the maximum - /// allowed metadata size.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MethodNotAllowed

      - ///
    • - ///
    • - ///

      - /// Description: The specified method is not allowed - /// against this resource.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 405 Method Not Allowed

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MissingAttachment

      - ///
    • - ///
    • - ///

      - /// Description: A SOAP attachment was expected, but none - /// were found.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: N/A

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MissingContentLength

      - ///
    • - ///
    • - ///

      - /// Description: You must provide the Content-Length HTTP - /// header.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 411 Length Required

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MissingRequestBodyError

      - ///
    • - ///
    • - ///

      - /// Description: This happens when the user sends an empty - /// XML document as a request. The error message is, "Request body is empty." - ///

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MissingSecurityElement

      - ///
    • - ///
    • - ///

      - /// Description: The SOAP 1.1 request is missing a security - /// element.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: MissingSecurityHeader

      - ///
    • - ///
    • - ///

      - /// Description: Your request is missing a required - /// header.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NoLoggingStatusForKey

      - ///
    • - ///
    • - ///

      - /// Description: There is no such thing as a logging status - /// subresource for a key.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NoSuchBucket

      - ///
    • - ///
    • - ///

      - /// Description: The specified bucket does not - /// exist.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 404 Not Found

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NoSuchBucketPolicy

      - ///
    • - ///
    • - ///

      - /// Description: The specified bucket does not have a - /// bucket policy.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 404 Not Found

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NoSuchKey

      - ///
    • - ///
    • - ///

      - /// Description: The specified key does not exist.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 404 Not Found

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NoSuchLifecycleConfiguration

      - ///
    • - ///
    • - ///

      - /// Description: The lifecycle configuration does not - /// exist.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 404 Not Found

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NoSuchUpload

      - ///
    • - ///
    • - ///

      - /// Description: The specified multipart upload does not - /// exist. The upload ID might be invalid, or the multipart upload might have been - /// aborted or completed.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 404 Not Found

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NoSuchVersion

      - ///
    • - ///
    • - ///

      - /// Description: Indicates that the version ID specified in - /// the request does not match an existing version.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 404 Not Found

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NotImplemented

      - ///
    • - ///
    • - ///

      - /// Description: A header you provided implies - /// functionality that is not implemented.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 501 Not Implemented

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Server

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: NotSignedUp

      - ///
    • - ///
    • - ///

      - /// Description: Your account is not signed up for the Amazon S3 - /// service. You must sign up before you can use Amazon S3. You can sign up at the - /// following URL: Amazon S3 - ///

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: OperationAborted

      - ///
    • - ///
    • - ///

      - /// Description: A conflicting conditional action is - /// currently in progress against this resource. Try again.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 409 Conflict

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: PermanentRedirect

      - ///
    • - ///
    • - ///

      - /// Description: The bucket you are attempting to access - /// must be addressed using the specified endpoint. Send all future requests to - /// this endpoint.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 301 Moved Permanently

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: PreconditionFailed

      - ///
    • - ///
    • - ///

      - /// Description: At least one of the preconditions you - /// specified did not hold.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 412 Precondition Failed

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: Redirect

      - ///
    • - ///
    • - ///

      - /// Description: Temporary redirect.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 307 Moved Temporarily

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: RestoreAlreadyInProgress

      - ///
    • - ///
    • - ///

      - /// Description: Object restore is already in - /// progress.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 409 Conflict

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: RequestIsNotMultiPartContent

      - ///
    • - ///
    • - ///

      - /// Description: Bucket POST must be of the enclosure-type - /// multipart/form-data.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: RequestTimeout

      - ///
    • - ///
    • - ///

      - /// Description: Your socket connection to the server was - /// not read from or written to within the timeout period.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: RequestTimeTooSkewed

      - ///
    • - ///
    • - ///

      - /// Description: The difference between the request time - /// and the server's time is too large.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: RequestTorrentOfBucketError

      - ///
    • - ///
    • - ///

      - /// Description: Requesting the torrent file of a bucket is - /// not permitted.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: SignatureDoesNotMatch

      - ///
    • - ///
    • - ///

      - /// Description: The request signature we calculated does - /// not match the signature you provided. Check your Amazon Web Services secret access key and - /// signing method. For more information, see REST - /// Authentication and SOAP - /// Authentication for details.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 403 Forbidden

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: ServiceUnavailable

      - ///
    • - ///
    • - ///

      - /// Description: Service is unable to handle - /// request.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 503 Service Unavailable

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Server

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: SlowDown

      - ///
    • - ///
    • - ///

      - /// Description: Reduce your request rate.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 503 Slow Down

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Server

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: TemporaryRedirect

      - ///
    • - ///
    • - ///

      - /// Description: You are being redirected to the bucket - /// while DNS updates.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 307 Moved Temporarily

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: TokenRefreshRequired

      - ///
    • - ///
    • - ///

      - /// Description: The provided token must be - /// refreshed.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: TooManyBuckets

      - ///
    • - ///
    • - ///

      - /// Description: You have attempted to create more buckets - /// than allowed.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: UnexpectedContent

      - ///
    • - ///
    • - ///

      - /// Description: This request does not support - /// content.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: UnresolvableGrantByEmailAddress

      - ///
    • - ///
    • - ///

      - /// Description: The email address you provided does not - /// match any account on record.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
  • - ///
      - ///
    • - ///

      - /// Code: UserKeyMustBeSpecified

      - ///
    • - ///
    • - ///

      - /// Description: The bucket POST must contain the specified - /// field name. If it is specified, check the order of the fields.

      - ///
    • - ///
    • - ///

      - /// HTTP Status Code: 400 Bad Request

      - ///
    • - ///
    • - ///

      - /// SOAP Fault Code Prefix: Client

      - ///
    • - ///
    - ///
  • - ///
- ///

- pub code: Option, - ///

The error key.

- pub key: Option, - ///

The error message contains a generic description of the error condition in English. It - /// is intended for a human audience. Simple programs display the message directly to the end - /// user if they encounter an error condition they don't know how or don't care to handle. - /// Sophisticated programs with more exhaustive error handling and proper internationalization - /// are more likely to ignore the error message.

- pub message: Option, - ///

The version ID of the error.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub version_id: Option, -} - -impl fmt::Debug for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Error"); - if let Some(ref val) = self.code { - d.field("code", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.message { - d.field("message", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } -} - -pub type ErrorCode = String; - +///

The error code is a string that uniquely identifies an error condition. It is meant to +/// be read and understood by programs that detect and handle errors by type. The following is +/// a list of Amazon S3 error codes. For more information, see Error responses.

+///
    +///
  • +///
      +///
    • ///

      -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error code and error message. -///

      -#[derive(Clone, Default, PartialEq)] -pub struct ErrorDetails { - ///

      - /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was - /// unable to create the table, this structure contains the error code. The possible error codes and - /// error messages are as follows: - ///

      - ///
        - ///
      • - ///

        - /// AccessDeniedCreatingResources - You don't have sufficient permissions to - /// create the required resources. Make sure that you have s3tables:CreateNamespace, - /// s3tables:CreateTable, s3tables:GetTable and - /// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata - /// table, you must delete the metadata configuration for this bucket, and then create a new - /// metadata configuration. - ///

        - ///
      • - ///
      • - ///

        - /// AccessDeniedWritingToTable - Unable to write to the metadata table because of - /// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new - /// metadata table. To create a new metadata table, you must delete the metadata configuration for - /// this bucket, and then create a new metadata configuration.

        - ///
      • - ///
      • - ///

        - /// DestinationTableNotFound - The destination table doesn't exist. To create a - /// new metadata table, you must delete the metadata configuration for this bucket, and then - /// create a new metadata configuration.

        - ///
      • - ///
      • - ///

        - /// ServerInternalError - An internal error has occurred. To create a new metadata - /// table, you must delete the metadata configuration for this bucket, and then create a new - /// metadata configuration.

        - ///
      • - ///
      • - ///

        - /// TableAlreadyExists - The table that you specified already exists in the table - /// bucket's namespace. Specify a different table name. To create a new metadata table, you must - /// delete the metadata configuration for this bucket, and then create a new metadata - /// configuration.

        - ///
      • - ///
      • - ///

        - /// TableBucketNotFound - The table bucket that you specified doesn't exist in - /// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new - /// metadata table, you must delete the metadata configuration for this bucket, and then create - /// a new metadata configuration.

        - ///
      • - ///
      - pub error_code: Option, - ///

      - /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was - /// unable to create the table, this structure contains the error message. The possible error codes and - /// error messages are as follows: - ///

      - ///
        - ///
      • - ///

        - /// AccessDeniedCreatingResources - You don't have sufficient permissions to - /// create the required resources. Make sure that you have s3tables:CreateNamespace, - /// s3tables:CreateTable, s3tables:GetTable and - /// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata - /// table, you must delete the metadata configuration for this bucket, and then create a new - /// metadata configuration. - ///

        - ///
      • - ///
      • - ///

        - /// AccessDeniedWritingToTable - Unable to write to the metadata table because of - /// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new - /// metadata table. To create a new metadata table, you must delete the metadata configuration for - /// this bucket, and then create a new metadata configuration.

        - ///
      • - ///
      • - ///

        - /// DestinationTableNotFound - The destination table doesn't exist. To create a - /// new metadata table, you must delete the metadata configuration for this bucket, and then - /// create a new metadata configuration.

        - ///
      • - ///
      • - ///

        - /// ServerInternalError - An internal error has occurred. To create a new metadata - /// table, you must delete the metadata configuration for this bucket, and then create a new - /// metadata configuration.

        - ///
      • - ///
      • - ///

        - /// TableAlreadyExists - The table that you specified already exists in the table - /// bucket's namespace. Specify a different table name. To create a new metadata table, you must - /// delete the metadata configuration for this bucket, and then create a new metadata - /// configuration.

        - ///
      • - ///
      • - ///

        - /// TableBucketNotFound - The table bucket that you specified doesn't exist in - /// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new - /// metadata table, you must delete the metadata configuration for this bucket, and then create - /// a new metadata configuration.

        - ///
      • - ///
      - pub error_message: Option, -} - -impl fmt::Debug for ErrorDetails { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ErrorDetails"); - if let Some(ref val) = self.error_code { - d.field("error_code", val); - } - if let Some(ref val) = self.error_message { - d.field("error_message", val); - } - d.finish_non_exhaustive() - } -} - -///

      The error information.

      -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ErrorDocument { - ///

      The object key name to use when a 4XX class error occurs.

      - /// - ///

      Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

      - ///
      - pub key: ObjectKey, -} - -impl fmt::Debug for ErrorDocument { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ErrorDocument"); - d.field("key", &self.key); - d.finish_non_exhaustive() - } -} - -pub type ErrorMessage = String; - -pub type Errors = List; - -///

      A container for specifying the configuration for Amazon EventBridge.

      -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct EventBridgeConfiguration {} - -impl fmt::Debug for EventBridgeConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("EventBridgeConfiguration"); - d.finish_non_exhaustive() - } -} - -pub type EventList = List; - -pub type ExcludeFolders = bool; - -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ExcludedPrefix { - pub prefix: Option, -} - -impl fmt::Debug for ExcludedPrefix { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ExcludedPrefix"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } -} - -pub type ExcludedPrefixes = List; - -///

      Optional configuration to replicate existing source bucket objects.

      -/// -///

      This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the -/// Amazon S3 User Guide.

      -///
      -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ExistingObjectReplication { - ///

      Specifies whether Amazon S3 replicates existing source bucket objects.

      - pub status: ExistingObjectReplicationStatus, -} - -impl fmt::Debug for ExistingObjectReplication { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ExistingObjectReplication"); - d.field("status", &self.status); - d.finish_non_exhaustive() - } -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ExistingObjectReplicationStatus(Cow<'static, str>); - -impl ExistingObjectReplicationStatus { - pub const DISABLED: &'static str = "Disabled"; - - pub const ENABLED: &'static str = "Enabled"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} - -impl From for ExistingObjectReplicationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} - -impl From for Cow<'static, str> { - fn from(s: ExistingObjectReplicationStatus) -> Self { - s.0 - } -} - -impl FromStr for ExistingObjectReplicationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} - -pub type Expiration = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ExpirationStatus(Cow<'static, str>); - -impl ExpirationStatus { - pub const DISABLED: &'static str = "Disabled"; - - pub const ENABLED: &'static str = "Enabled"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} - -impl From for ExpirationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} - -impl From for Cow<'static, str> { - fn from(s: ExpirationStatus) -> Self { - s.0 - } -} - -impl FromStr for ExpirationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} - -pub type ExpiredObjectDeleteMarker = bool; - -pub type Expires = Timestamp; - -pub type ExposeHeader = String; - -pub type ExposeHeaders = List; - -pub type Expression = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ExpressionType(Cow<'static, str>); - -impl ExpressionType { - pub const SQL: &'static str = "SQL"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} - -impl From for ExpressionType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} - -impl From for Cow<'static, str> { - fn from(s: ExpressionType) -> Self { - s.0 - } -} - -impl FromStr for ExpressionType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} - -pub type FetchOwner = bool; - -pub type FieldDelimiter = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct FileHeaderInfo(Cow<'static, str>); - -impl FileHeaderInfo { - pub const IGNORE: &'static str = "IGNORE"; - - pub const NONE: &'static str = "NONE"; - - pub const USE: &'static str = "USE"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} - -impl From for FileHeaderInfo { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} - -impl From for Cow<'static, str> { - fn from(s: FileHeaderInfo) -> Self { - s.0 - } -} - -impl FromStr for FileHeaderInfo { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +/// Code: AccessDenied

      +///
    • +///
    • +///

      +/// Description: Access Denied

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: AccountProblem

      +///
    • +///
    • +///

      +/// Description: There is a problem with your Amazon Web Services account +/// that prevents the action from completing successfully. Contact Amazon Web Services Support +/// for further assistance.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: AllAccessDisabled

      +///
    • +///
    • +///

      +/// Description: All access to this Amazon S3 resource has been +/// disabled. Contact Amazon Web Services Support for further assistance.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: AmbiguousGrantByEmailAddress

      +///
    • +///
    • +///

      +/// Description: The email address you provided is +/// associated with more than one account.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: AuthorizationHeaderMalformed

      +///
    • +///
    • +///

      +/// Description: The authorization header you provided is +/// invalid.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// HTTP Status Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: BadDigest

      +///
    • +///
    • +///

      +/// Description: The Content-MD5 you specified did not +/// match what we received.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: BucketAlreadyExists

      +///
    • +///
    • +///

      +/// Description: The requested bucket name is not +/// available. The bucket namespace is shared by all users of the system. Please +/// select a different name and try again.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 409 Conflict

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: BucketAlreadyOwnedByYou

      +///
    • +///
    • +///

      +/// Description: The bucket you tried to create already +/// exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in +/// the North Virginia Region. For legacy compatibility, if you re-create an +/// existing bucket that you already own in the North Virginia Region, Amazon S3 returns +/// 200 OK and resets the bucket access control lists (ACLs).

      +///
    • +///
    • +///

      +/// Code: 409 Conflict (in all Regions except the North +/// Virginia Region)

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: BucketNotEmpty

      +///
    • +///
    • +///

      +/// Description: The bucket you tried to delete is not +/// empty.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 409 Conflict

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: CredentialsNotSupported

      +///
    • +///
    • +///

      +/// Description: This request does not support +/// credentials.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: CrossLocationLoggingProhibited

      +///
    • +///
    • +///

      +/// Description: Cross-location logging not allowed. +/// Buckets in one geographic location cannot log information to a bucket in +/// another location.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: EntityTooSmall

      +///
    • +///
    • +///

      +/// Description: Your proposed upload is smaller than the +/// minimum allowed object size.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: EntityTooLarge

      +///
    • +///
    • +///

      +/// Description: Your proposed upload exceeds the maximum +/// allowed object size.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: ExpiredToken

      +///
    • +///
    • +///

      +/// Description: The provided token has expired.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: IllegalVersioningConfigurationException

      +///
    • +///
    • +///

      +/// Description: Indicates that the versioning +/// configuration specified in the request is invalid.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: IncompleteBody

      +///
    • +///
    • +///

      +/// Description: You did not provide the number of bytes +/// specified by the Content-Length HTTP header

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: IncorrectNumberOfFilesInPostRequest

      +///
    • +///
    • +///

      +/// Description: POST requires exactly one file upload per +/// request.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InlineDataTooLarge

      +///
    • +///
    • +///

      +/// Description: Inline data exceeds the maximum allowed +/// size.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InternalError

      +///
    • +///
    • +///

      +/// Description: We encountered an internal error. Please +/// try again.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 500 Internal Server Error

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Server

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidAccessKeyId

      +///
    • +///
    • +///

      +/// Description: The Amazon Web Services access key ID you provided does +/// not exist in our records.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidAddressingHeader

      +///
    • +///
    • +///

      +/// Description: You must specify the Anonymous +/// role.

      +///
    • +///
    • +///

      +/// HTTP Status Code: N/A

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidArgument

      +///
    • +///
    • +///

      +/// Description: Invalid Argument

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidBucketName

      +///
    • +///
    • +///

      +/// Description: The specified bucket is not valid.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidBucketState

      +///
    • +///
    • +///

      +/// Description: The request is not valid with the current +/// state of the bucket.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 409 Conflict

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidDigest

      +///
    • +///
    • +///

      +/// Description: The Content-MD5 you specified is not +/// valid.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidEncryptionAlgorithmError

      +///
    • +///
    • +///

      +/// Description: The encryption request you specified is +/// not valid. The valid value is AES256.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidLocationConstraint

      +///
    • +///
    • +///

      +/// Description: The specified location constraint is not +/// valid. For more information about Regions, see How to Select +/// a Region for Your Buckets.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidObjectState

      +///
    • +///
    • +///

      +/// Description: The action is not valid for the current +/// state of the object.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidPart

      +///
    • +///
    • +///

      +/// Description: One or more of the specified parts could +/// not be found. The part might not have been uploaded, or the specified entity +/// tag might not have matched the part's entity tag.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidPartOrder

      +///
    • +///
    • +///

      +/// Description: The list of parts was not in ascending +/// order. Parts list must be specified in order by part number.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidPayer

      +///
    • +///
    • +///

      +/// Description: All access to this object has been +/// disabled. Please contact Amazon Web Services Support for further assistance.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidPolicyDocument

      +///
    • +///
    • +///

      +/// Description: The content of the form does not meet the +/// conditions specified in the policy document.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRange

      +///
    • +///
    • +///

      +/// Description: The requested range cannot be +/// satisfied.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 416 Requested Range Not +/// Satisfiable

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: Please use +/// AWS4-HMAC-SHA256.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: SOAP requests must be made over an HTTPS +/// connection.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: Amazon S3 Transfer Acceleration is not +/// supported for buckets with non-DNS compliant names.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: Amazon S3 Transfer Acceleration is not +/// supported for buckets with periods (.) in their names.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: Amazon S3 Transfer Accelerate endpoint only +/// supports virtual style requests.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: Amazon S3 Transfer Accelerate is not configured +/// on this bucket.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: Amazon S3 Transfer Accelerate is disabled on +/// this bucket.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: Amazon S3 Transfer Acceleration is not +/// supported on this bucket. Contact Amazon Web Services Support for more information.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidRequest

      +///
    • +///
    • +///

      +/// Description: Amazon S3 Transfer Acceleration cannot be +/// enabled on this bucket. Contact Amazon Web Services Support for more information.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// Code: N/A

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidSecurity

      +///
    • +///
    • +///

      +/// Description: The provided security credentials are not +/// valid.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidSOAPRequest

      +///
    • +///
    • +///

      +/// Description: The SOAP request body is invalid.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidStorageClass

      +///
    • +///
    • +///

      +/// Description: The storage class you specified is not +/// valid.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidTargetBucketForLogging

      +///
    • +///
    • +///

      +/// Description: The target bucket for logging does not +/// exist, is not owned by you, or does not have the appropriate grants for the +/// log-delivery group.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidToken

      +///
    • +///
    • +///

      +/// Description: The provided token is malformed or +/// otherwise invalid.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: InvalidURI

      +///
    • +///
    • +///

      +/// Description: Couldn't parse the specified URI.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: KeyTooLongError

      +///
    • +///
    • +///

      +/// Description: Your key is too long.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MalformedACLError

      +///
    • +///
    • +///

      +/// Description: The XML you provided was not well-formed +/// or did not validate against our published schema.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MalformedPOSTRequest

      +///
    • +///
    • +///

      +/// Description: The body of your POST request is not +/// well-formed multipart/form-data.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MalformedXML

      +///
    • +///
    • +///

      +/// Description: This happens when the user sends malformed +/// XML (XML that doesn't conform to the published XSD) for the configuration. The +/// error message is, "The XML you provided was not well-formed or did not validate +/// against our published schema."

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MaxMessageLengthExceeded

      +///
    • +///
    • +///

      +/// Description: Your request was too big.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MaxPostPreDataLengthExceededError

      +///
    • +///
    • +///

      +/// Description: Your POST request fields preceding the +/// upload file were too large.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MetadataTooLarge

      +///
    • +///
    • +///

      +/// Description: Your metadata headers exceed the maximum +/// allowed metadata size.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MethodNotAllowed

      +///
    • +///
    • +///

      +/// Description: The specified method is not allowed +/// against this resource.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 405 Method Not Allowed

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MissingAttachment

      +///
    • +///
    • +///

      +/// Description: A SOAP attachment was expected, but none +/// were found.

      +///
    • +///
    • +///

      +/// HTTP Status Code: N/A

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MissingContentLength

      +///
    • +///
    • +///

      +/// Description: You must provide the Content-Length HTTP +/// header.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 411 Length Required

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MissingRequestBodyError

      +///
    • +///
    • +///

      +/// Description: This happens when the user sends an empty +/// XML document as a request. The error message is, "Request body is empty." +///

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MissingSecurityElement

      +///
    • +///
    • +///

      +/// Description: The SOAP 1.1 request is missing a security +/// element.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: MissingSecurityHeader

      +///
    • +///
    • +///

      +/// Description: Your request is missing a required +/// header.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NoLoggingStatusForKey

      +///
    • +///
    • +///

      +/// Description: There is no such thing as a logging status +/// subresource for a key.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NoSuchBucket

      +///
    • +///
    • +///

      +/// Description: The specified bucket does not +/// exist.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 404 Not Found

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NoSuchBucketPolicy

      +///
    • +///
    • +///

      +/// Description: The specified bucket does not have a +/// bucket policy.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 404 Not Found

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NoSuchKey

      +///
    • +///
    • +///

      +/// Description: The specified key does not exist.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 404 Not Found

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NoSuchLifecycleConfiguration

      +///
    • +///
    • +///

      +/// Description: The lifecycle configuration does not +/// exist.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 404 Not Found

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NoSuchUpload

      +///
    • +///
    • +///

      +/// Description: The specified multipart upload does not +/// exist. The upload ID might be invalid, or the multipart upload might have been +/// aborted or completed.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 404 Not Found

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NoSuchVersion

      +///
    • +///
    • +///

      +/// Description: Indicates that the version ID specified in +/// the request does not match an existing version.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 404 Not Found

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NotImplemented

      +///
    • +///
    • +///

      +/// Description: A header you provided implies +/// functionality that is not implemented.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 501 Not Implemented

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Server

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: NotSignedUp

      +///
    • +///
    • +///

      +/// Description: Your account is not signed up for the Amazon S3 +/// service. You must sign up before you can use Amazon S3. You can sign up at the +/// following URL: Amazon S3 +///

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: OperationAborted

      +///
    • +///
    • +///

      +/// Description: A conflicting conditional action is +/// currently in progress against this resource. Try again.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 409 Conflict

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: PermanentRedirect

      +///
    • +///
    • +///

      +/// Description: The bucket you are attempting to access +/// must be addressed using the specified endpoint. Send all future requests to +/// this endpoint.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 301 Moved Permanently

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: PreconditionFailed

      +///
    • +///
    • +///

      +/// Description: At least one of the preconditions you +/// specified did not hold.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 412 Precondition Failed

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: Redirect

      +///
    • +///
    • +///

      +/// Description: Temporary redirect.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 307 Moved Temporarily

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: RestoreAlreadyInProgress

      +///
    • +///
    • +///

      +/// Description: Object restore is already in +/// progress.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 409 Conflict

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: RequestIsNotMultiPartContent

      +///
    • +///
    • +///

      +/// Description: Bucket POST must be of the enclosure-type +/// multipart/form-data.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: RequestTimeout

      +///
    • +///
    • +///

      +/// Description: Your socket connection to the server was +/// not read from or written to within the timeout period.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: RequestTimeTooSkewed

      +///
    • +///
    • +///

      +/// Description: The difference between the request time +/// and the server's time is too large.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: RequestTorrentOfBucketError

      +///
    • +///
    • +///

      +/// Description: Requesting the torrent file of a bucket is +/// not permitted.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: SignatureDoesNotMatch

      +///
    • +///
    • +///

      +/// Description: The request signature we calculated does +/// not match the signature you provided. Check your Amazon Web Services secret access key and +/// signing method. For more information, see REST +/// Authentication and SOAP +/// Authentication for details.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 403 Forbidden

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: ServiceUnavailable

      +///
    • +///
    • +///

      +/// Description: Service is unable to handle +/// request.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 503 Service Unavailable

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Server

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: SlowDown

      +///
    • +///
    • +///

      +/// Description: Reduce your request rate.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 503 Slow Down

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Server

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: TemporaryRedirect

      +///
    • +///
    • +///

      +/// Description: You are being redirected to the bucket +/// while DNS updates.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 307 Moved Temporarily

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: TokenRefreshRequired

      +///
    • +///
    • +///

      +/// Description: The provided token must be +/// refreshed.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: TooManyBuckets

      +///
    • +///
    • +///

      +/// Description: You have attempted to create more buckets +/// than allowed.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: UnexpectedContent

      +///
    • +///
    • +///

      +/// Description: This request does not support +/// content.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: UnresolvableGrantByEmailAddress

      +///
    • +///
    • +///

      +/// Description: The email address you provided does not +/// match any account on record.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
  • +///
      +///
    • +///

      +/// Code: UserKeyMustBeSpecified

      +///
    • +///
    • +///

      +/// Description: The bucket POST must contain the specified +/// field name. If it is specified, check the order of the fields.

      +///
    • +///
    • +///

      +/// HTTP Status Code: 400 Bad Request

      +///
    • +///
    • +///

      +/// SOAP Fault Code Prefix: Client

      +///
    • +///
    +///
  • +///
+///

+ pub code: Option, +///

The error key.

+ pub key: Option, +///

The error message contains a generic description of the error condition in English. It +/// is intended for a human audience. Simple programs display the message directly to the end +/// user if they encounter an error condition they don't know how or don't care to handle. +/// Sophisticated programs with more exhaustive error handling and proper internationalization +/// are more likely to ignore the error message.

+ pub message: Option, +///

The version ID of the error.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub version_id: Option, +} + +impl fmt::Debug for Error { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Error"); +if let Some(ref val) = self.code { +d.field("code", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.message { +d.field("message", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ErrorCode = String; + +///

+/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error code and error message. +///

+#[derive(Clone, Default, PartialEq)] +pub struct ErrorDetails { +///

+/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error code. The possible error codes and +/// error messages are as follows: +///

+///
    +///
  • +///

    +/// AccessDeniedCreatingResources - You don't have sufficient permissions to +/// create the required resources. Make sure that you have s3tables:CreateNamespace, +/// s3tables:CreateTable, s3tables:GetTable and +/// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata +/// table, you must delete the metadata configuration for this bucket, and then create a new +/// metadata configuration. +///

    +///
  • +///
  • +///

    +/// AccessDeniedWritingToTable - Unable to write to the metadata table because of +/// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new +/// metadata table. To create a new metadata table, you must delete the metadata configuration for +/// this bucket, and then create a new metadata configuration.

    +///
  • +///
  • +///

    +/// DestinationTableNotFound - The destination table doesn't exist. To create a +/// new metadata table, you must delete the metadata configuration for this bucket, and then +/// create a new metadata configuration.

    +///
  • +///
  • +///

    +/// ServerInternalError - An internal error has occurred. To create a new metadata +/// table, you must delete the metadata configuration for this bucket, and then create a new +/// metadata configuration.

    +///
  • +///
  • +///

    +/// TableAlreadyExists - The table that you specified already exists in the table +/// bucket's namespace. Specify a different table name. To create a new metadata table, you must +/// delete the metadata configuration for this bucket, and then create a new metadata +/// configuration.

    +///
  • +///
  • +///

    +/// TableBucketNotFound - The table bucket that you specified doesn't exist in +/// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new +/// metadata table, you must delete the metadata configuration for this bucket, and then create +/// a new metadata configuration.

    +///
  • +///
+ pub error_code: Option, +///

+/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error message. The possible error codes and +/// error messages are as follows: +///

+///
    +///
  • +///

    +/// AccessDeniedCreatingResources - You don't have sufficient permissions to +/// create the required resources. Make sure that you have s3tables:CreateNamespace, +/// s3tables:CreateTable, s3tables:GetTable and +/// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata +/// table, you must delete the metadata configuration for this bucket, and then create a new +/// metadata configuration. +///

    +///
  • +///
  • +///

    +/// AccessDeniedWritingToTable - Unable to write to the metadata table because of +/// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new +/// metadata table. To create a new metadata table, you must delete the metadata configuration for +/// this bucket, and then create a new metadata configuration.

    +///
  • +///
  • +///

    +/// DestinationTableNotFound - The destination table doesn't exist. To create a +/// new metadata table, you must delete the metadata configuration for this bucket, and then +/// create a new metadata configuration.

    +///
  • +///
  • +///

    +/// ServerInternalError - An internal error has occurred. To create a new metadata +/// table, you must delete the metadata configuration for this bucket, and then create a new +/// metadata configuration.

    +///
  • +///
  • +///

    +/// TableAlreadyExists - The table that you specified already exists in the table +/// bucket's namespace. Specify a different table name. To create a new metadata table, you must +/// delete the metadata configuration for this bucket, and then create a new metadata +/// configuration.

    +///
  • +///
  • +///

    +/// TableBucketNotFound - The table bucket that you specified doesn't exist in +/// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new +/// metadata table, you must delete the metadata configuration for this bucket, and then create +/// a new metadata configuration.

    +///
  • +///
+ pub error_message: Option, +} + +impl fmt::Debug for ErrorDetails { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ErrorDetails"); +if let Some(ref val) = self.error_code { +d.field("error_code", val); +} +if let Some(ref val) = self.error_message { +d.field("error_message", val); +} +d.finish_non_exhaustive() +} +} + + +///

The error information.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ErrorDocument { +///

The object key name to use when a 4XX class error occurs.

+/// +///

Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

+///
+ pub key: ObjectKey, +} + +impl fmt::Debug for ErrorDocument { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ErrorDocument"); +d.field("key", &self.key); +d.finish_non_exhaustive() +} +} + + +pub type ErrorMessage = String; + +pub type Errors = List; + + +///

A container for specifying the configuration for Amazon EventBridge.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct EventBridgeConfiguration { +} + +impl fmt::Debug for EventBridgeConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("EventBridgeConfiguration"); +d.finish_non_exhaustive() +} +} + + +pub type EventList = List; + +pub type ExcludeFolders = bool; + +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ExcludedPrefix { + pub prefix: Option, +} + +impl fmt::Debug for ExcludedPrefix { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ExcludedPrefix"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ExcludedPrefixes = List; + +///

Optional configuration to replicate existing source bucket objects.

+/// +///

This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the +/// Amazon S3 User Guide.

+///
+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ExistingObjectReplication { +///

Specifies whether Amazon S3 replicates existing source bucket objects.

+ pub status: ExistingObjectReplicationStatus, +} + +impl fmt::Debug for ExistingObjectReplication { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ExistingObjectReplication"); +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ExistingObjectReplicationStatus(Cow<'static, str>); + +impl ExistingObjectReplicationStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ExistingObjectReplicationStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ExistingObjectReplicationStatus) -> Self { +s.0 +} +} + +impl FromStr for ExistingObjectReplicationStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Expiration = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ExpirationStatus(Cow<'static, str>); + +impl ExpirationStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ExpirationStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ExpirationStatus) -> Self { +s.0 +} +} + +impl FromStr for ExpirationStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ExpiredObjectAllVersions = bool; + +pub type ExpiredObjectDeleteMarker = bool; + +pub type Expires = Timestamp; + +pub type ExposeHeader = String; + +pub type ExposeHeaders = List; + +pub type Expression = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ExpressionType(Cow<'static, str>); + +impl ExpressionType { +pub const SQL: &'static str = "SQL"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ExpressionType { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ExpressionType) -> Self { +s.0 +} +} + +impl FromStr for ExpressionType { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type FetchOwner = bool; + +pub type FieldDelimiter = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct FileHeaderInfo(Cow<'static, str>); + +impl FileHeaderInfo { +pub const IGNORE: &'static str = "IGNORE"; + +pub const NONE: &'static str = "NONE"; + +pub const USE: &'static str = "USE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for FileHeaderInfo { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: FileHeaderInfo) -> Self { +s.0 +} +} + +impl FromStr for FileHeaderInfo { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned +/// to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of +/// the object key name. A prefix is a specific string of characters at the beginning of an +/// object key name, which you can use to organize objects. For example, you can start the key +/// names of related objects with a prefix, such as 2023- or +/// engineering/. Then, you can use FilterRule to find objects in +/// a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it +/// is at the end of the object key name instead of at the beginning.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct FilterRule { +///

The object key name prefix or suffix identifying one or more objects to which the +/// filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and +/// suffixes are not supported. For more information, see Configuring Event Notifications +/// in the Amazon S3 User Guide.

+ pub name: Option, +///

The value that the filter searches for in object key names.

+ pub value: Option, +} + +impl fmt::Debug for FilterRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("FilterRule"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.value { +d.field("value", val); +} +d.finish_non_exhaustive() +} +} + + +///

A list of containers for the key-value pair that defines the criteria for the filter +/// rule.

+pub type FilterRuleList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct FilterRuleName(Cow<'static, str>); + +impl FilterRuleName { +pub const PREFIX: &'static str = "prefix"; + +pub const SUFFIX: &'static str = "suffix"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for FilterRuleName { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: FilterRuleName) -> Self { +s.0 +} +} + +impl FromStr for FilterRuleName { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type FilterRuleValue = String; + +pub type ForceDelete = bool; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAccelerateConfigurationInput { +///

The name of the bucket for which the accelerate configuration is retrieved.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, + pub request_payer: Option, +} + +impl fmt::Debug for GetBucketAccelerateConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAccelerateConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketAccelerateConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketAccelerateConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAccelerateConfigurationOutput { + pub request_charged: Option, +///

The accelerate configuration of the bucket.

+ pub status: Option, +} + +impl fmt::Debug for GetBucketAccelerateConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAccelerateConfigurationOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAclInput { +///

Specifies the S3 bucket whose ACL is being requested.

+///

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

+///

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketAclInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAclInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketAclInput { +#[must_use] +pub fn builder() -> builders::GetBucketAclInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAclOutput { +///

A list of grants.

+ pub grants: Option, +///

Container for the bucket owner's display name and ID.

+ pub owner: Option, +} + +impl fmt::Debug for GetBucketAclOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAclOutput"); +if let Some(ref val) = self.grants { +d.field("grants", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAnalyticsConfigurationInput { +///

The name of the bucket from which an analytics configuration is retrieved.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The ID that identifies the analytics configuration.

+ pub id: AnalyticsId, +} + +impl fmt::Debug for GetBucketAnalyticsConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAnalyticsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl GetBucketAnalyticsConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketAnalyticsConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAnalyticsConfigurationOutput { +///

The configuration and any analyses for the analytics filter.

+ pub analytics_configuration: Option, +} + +impl fmt::Debug for GetBucketAnalyticsConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAnalyticsConfigurationOutput"); +if let Some(ref val) = self.analytics_configuration { +d.field("analytics_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketCorsInput { +///

The bucket name for which to get the cors configuration.

+///

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

+///

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketCorsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketCorsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketCorsInput { +#[must_use] +pub fn builder() -> builders::GetBucketCorsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketCorsOutput { +///

A set of origins and methods (cross-origin access that you want to allow). You can add +/// up to 100 rules to the configuration.

+ pub cors_rules: Option, +} + +impl fmt::Debug for GetBucketCorsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketCorsOutput"); +if let Some(ref val) = self.cors_rules { +d.field("cors_rules", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketEncryptionInput { +///

The name of the bucket from which the server-side encryption configuration is +/// retrieved.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

+///
+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketEncryptionInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketEncryptionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketEncryptionInput { +#[must_use] +pub fn builder() -> builders::GetBucketEncryptionInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketEncryptionOutput { + pub server_side_encryption_configuration: Option, +} + +impl fmt::Debug for GetBucketEncryptionOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketEncryptionOutput"); +if let Some(ref val) = self.server_side_encryption_configuration { +d.field("server_side_encryption_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketIntelligentTieringConfigurationInput { +///

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

+ pub bucket: BucketName, +///

The ID used to identify the S3 Intelligent-Tiering configuration.

+ pub id: IntelligentTieringId, +} + +impl fmt::Debug for GetBucketIntelligentTieringConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationInput"); +d.field("bucket", &self.bucket); +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl GetBucketIntelligentTieringConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketIntelligentTieringConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketIntelligentTieringConfigurationOutput { +///

Container for S3 Intelligent-Tiering configuration.

+ pub intelligent_tiering_configuration: Option, +} + +impl fmt::Debug for GetBucketIntelligentTieringConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationOutput"); +if let Some(ref val) = self.intelligent_tiering_configuration { +d.field("intelligent_tiering_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketInventoryConfigurationInput { +///

The name of the bucket containing the inventory configuration to retrieve.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The ID used to identify the inventory configuration.

+ pub id: InventoryId, +} + +impl fmt::Debug for GetBucketInventoryConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketInventoryConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl GetBucketInventoryConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketInventoryConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketInventoryConfigurationOutput { +///

Specifies the inventory configuration.

+ pub inventory_configuration: Option, +} + +impl fmt::Debug for GetBucketInventoryConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketInventoryConfigurationOutput"); +if let Some(ref val) = self.inventory_configuration { +d.field("inventory_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLifecycleConfigurationInput { +///

The name of the bucket for which to get the lifecycle information.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketLifecycleConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLifecycleConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketLifecycleConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketLifecycleConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLifecycleConfigurationOutput { +///

Container for a lifecycle rule.

+ pub rules: Option, +///

Indicates which default minimum object size behavior is applied to the lifecycle +/// configuration.

+/// +///

This parameter applies to general purpose buckets only. It isn't supported for +/// directory bucket lifecycle configurations.

+///
+///
    +///
  • +///

    +/// all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

    +///
  • +///
  • +///

    +/// varies_by_storage_class - Objects smaller than 128 KB will +/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By +/// default, all other storage classes will prevent transitions smaller than 128 KB. +///

    +///
  • +///
+///

To customize the minimum object size for any transition you can add a filter that +/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in +/// the body of your transition rule. Custom filters always take precedence over the default +/// transition behavior.

+ pub transition_default_minimum_object_size: Option, +} + +impl fmt::Debug for GetBucketLifecycleConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLifecycleConfigurationOutput"); +if let Some(ref val) = self.rules { +d.field("rules", val); +} +if let Some(ref val) = self.transition_default_minimum_object_size { +d.field("transition_default_minimum_object_size", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLocationInput { +///

The name of the bucket for which to get the location.

+///

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

+///

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketLocationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLocationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketLocationInput { +#[must_use] +pub fn builder() -> builders::GetBucketLocationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLocationOutput { +///

Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported +/// location constraints by Region, see Regions and Endpoints.

+///

Buckets in Region us-east-1 have a LocationConstraint of +/// null. Buckets with a LocationConstraint of EU reside in eu-west-1.

+ pub location_constraint: Option, +} + +impl fmt::Debug for GetBucketLocationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLocationOutput"); +if let Some(ref val) = self.location_constraint { +d.field("location_constraint", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLoggingInput { +///

The bucket name for which to get the logging information.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketLoggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLoggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketLoggingInput { +#[must_use] +pub fn builder() -> builders::GetBucketLoggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLoggingOutput { + pub logging_enabled: Option, +} + +impl fmt::Debug for GetBucketLoggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLoggingOutput"); +if let Some(ref val) = self.logging_enabled { +d.field("logging_enabled", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetadataTableConfigurationInput { +///

+/// The general purpose bucket that contains the metadata table configuration that you want to retrieve. +///

+ pub bucket: BucketName, +///

+/// The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. +///

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketMetadataTableConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetadataTableConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketMetadataTableConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketMetadataTableConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetadataTableConfigurationOutput { +///

+/// The metadata table configuration for the general purpose bucket. +///

+ pub get_bucket_metadata_table_configuration_result: Option, +} + +impl fmt::Debug for GetBucketMetadataTableConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetadataTableConfigurationOutput"); +if let Some(ref val) = self.get_bucket_metadata_table_configuration_result { +d.field("get_bucket_metadata_table_configuration_result", val); +} +d.finish_non_exhaustive() +} +} + + +///

+/// The metadata table configuration for a general purpose bucket. +///

+#[derive(Clone, PartialEq)] +pub struct GetBucketMetadataTableConfigurationResult { +///

+/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error code and error message. +///

+ pub error: Option, +///

+/// The metadata table configuration for a general purpose bucket. +///

+ pub metadata_table_configuration_result: MetadataTableConfigurationResult, +///

+/// The status of the metadata table. The status values are: +///

+///
    +///
  • +///

    +/// CREATING - The metadata table is in the process of being created in the +/// specified table bucket.

    +///
  • +///
  • +///

    +/// ACTIVE - The metadata table has been created successfully and records +/// are being delivered to the table. +///

    +///
  • +///
  • +///

    +/// FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver +/// records. See ErrorDetails for details.

    +///
  • +///
+ pub status: MetadataTableStatus, +} + +impl fmt::Debug for GetBucketMetadataTableConfigurationResult { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetadataTableConfigurationResult"); +if let Some(ref val) = self.error { +d.field("error", val); +} +d.field("metadata_table_configuration_result", &self.metadata_table_configuration_result); +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetricsConfigurationInput { +///

The name of the bucket containing the metrics configuration to retrieve.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The ID used to identify the metrics configuration. The ID has a 64 character limit and +/// can only contain letters, numbers, periods, dashes, and underscores.

+ pub id: MetricsId, +} + +impl fmt::Debug for GetBucketMetricsConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetricsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl GetBucketMetricsConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketMetricsConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetricsConfigurationOutput { +///

Specifies the metrics configuration.

+ pub metrics_configuration: Option, +} + +impl fmt::Debug for GetBucketMetricsConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetricsConfigurationOutput"); +if let Some(ref val) = self.metrics_configuration { +d.field("metrics_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketNotificationConfigurationInput { +///

The name of the bucket for which to get the notification configuration.

+///

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

+///

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketNotificationConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketNotificationConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketNotificationConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketNotificationConfigurationInputBuilder { +default() +} +} + +///

A container for specifying the notification configuration of the bucket. If this element +/// is empty, notifications are turned off for the bucket.

+#[derive(Clone, Default, PartialEq)] +pub struct GetBucketNotificationConfigurationOutput { +///

Enables delivery of events to Amazon EventBridge.

+ pub event_bridge_configuration: Option, +///

Describes the Lambda functions to invoke and the events for which to invoke +/// them.

+ pub lambda_function_configurations: Option, +///

The Amazon Simple Queue Service queues to publish messages to and the events for which +/// to publish messages.

+ pub queue_configurations: Option, +///

The topic to which notifications are sent and the events for which notifications are +/// generated.

+ pub topic_configurations: Option, +} + +impl fmt::Debug for GetBucketNotificationConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketNotificationConfigurationOutput"); +if let Some(ref val) = self.event_bridge_configuration { +d.field("event_bridge_configuration", val); +} +if let Some(ref val) = self.lambda_function_configurations { +d.field("lambda_function_configurations", val); +} +if let Some(ref val) = self.queue_configurations { +d.field("queue_configurations", val); +} +if let Some(ref val) = self.topic_configurations { +d.field("topic_configurations", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketOwnershipControlsInput { +///

The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. +///

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketOwnershipControlsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketOwnershipControlsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketOwnershipControlsInput { +#[must_use] +pub fn builder() -> builders::GetBucketOwnershipControlsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketOwnershipControlsOutput { +///

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or +/// ObjectWriter) currently in effect for this Amazon S3 bucket.

+ pub ownership_controls: Option, +} + +impl fmt::Debug for GetBucketOwnershipControlsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketOwnershipControlsOutput"); +if let Some(ref val) = self.ownership_controls { +d.field("ownership_controls", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyInput { +///

The bucket name to get the bucket policy for.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

+///

+/// Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

+///

+/// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

+///
+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketPolicyInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketPolicyInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketPolicyInput { +#[must_use] +pub fn builder() -> builders::GetBucketPolicyInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyOutput { +///

The bucket policy as a JSON document.

+ pub policy: Option, +} + +impl fmt::Debug for GetBucketPolicyOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketPolicyOutput"); +if let Some(ref val) = self.policy { +d.field("policy", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyStatusInput { +///

The name of the Amazon S3 bucket whose policy status you want to retrieve.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketPolicyStatusInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketPolicyStatusInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketPolicyStatusInput { +#[must_use] +pub fn builder() -> builders::GetBucketPolicyStatusInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyStatusOutput { +///

The policy status for the specified bucket.

+ pub policy_status: Option, +} + +impl fmt::Debug for GetBucketPolicyStatusOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketPolicyStatusOutput"); +if let Some(ref val) = self.policy_status { +d.field("policy_status", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketReplicationInput { +///

The bucket name for which to get the replication information.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketReplicationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketReplicationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketReplicationInput { +#[must_use] +pub fn builder() -> builders::GetBucketReplicationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketReplicationOutput { + pub replication_configuration: Option, +} + +impl fmt::Debug for GetBucketReplicationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketReplicationOutput"); +if let Some(ref val) = self.replication_configuration { +d.field("replication_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketRequestPaymentInput { +///

The name of the bucket for which to get the payment request configuration

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketRequestPaymentInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketRequestPaymentInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketRequestPaymentInput { +#[must_use] +pub fn builder() -> builders::GetBucketRequestPaymentInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketRequestPaymentOutput { +///

Specifies who pays for the download and request fees.

+ pub payer: Option, +} + +impl fmt::Debug for GetBucketRequestPaymentOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketRequestPaymentOutput"); +if let Some(ref val) = self.payer { +d.field("payer", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketTaggingInput { +///

The name of the bucket for which to get the tagging information.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketTaggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketTaggingInput { +#[must_use] +pub fn builder() -> builders::GetBucketTaggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketTaggingOutput { +///

Contains the tag set.

+ pub tag_set: TagSet, +} + +impl fmt::Debug for GetBucketTaggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketTaggingOutput"); +d.field("tag_set", &self.tag_set); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketVersioningInput { +///

The name of the bucket for which to get the versioning information.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketVersioningInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketVersioningInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketVersioningInput { +#[must_use] +pub fn builder() -> builders::GetBucketVersioningInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketVersioningOutput { +///

Specifies whether MFA delete is enabled in the bucket versioning configuration. This +/// element is only returned if the bucket has been configured with MFA delete. If the bucket +/// has never been so configured, this element is not returned.

+ pub mfa_delete: Option, +///

The versioning state of the bucket.

+ pub status: Option, +} + +impl fmt::Debug for GetBucketVersioningOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketVersioningOutput"); +if let Some(ref val) = self.mfa_delete { +d.field("mfa_delete", val); +} +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketWebsiteInput { +///

The bucket name for which to get the website configuration.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketWebsiteInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketWebsiteInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketWebsiteInput { +#[must_use] +pub fn builder() -> builders::GetBucketWebsiteInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketWebsiteOutput { +///

The object key name of the website error document to use for 4XX class errors.

+ pub error_document: Option, +///

The name of the index document for the website (for example +/// index.html).

+ pub index_document: Option, +///

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 +/// bucket.

+ pub redirect_all_requests_to: Option, +///

Rules that define when a redirect is applied and the redirect behavior.

+ pub routing_rules: Option, +} + +impl fmt::Debug for GetBucketWebsiteOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketWebsiteOutput"); +if let Some(ref val) = self.error_document { +d.field("error_document", val); +} +if let Some(ref val) = self.index_document { +d.field("index_document", val); +} +if let Some(ref val) = self.redirect_all_requests_to { +d.field("redirect_all_requests_to", val); +} +if let Some(ref val) = self.routing_rules { +d.field("routing_rules", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAclInput { +///

The bucket name that contains the object for which to get the ACL information.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The key of the object for which to get the ACL information.

+ pub key: ObjectKey, + pub request_payer: Option, +///

Version ID used to reference a specific version of the object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub version_id: Option, +} + +impl fmt::Debug for GetObjectAclInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAclInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectAclInput { +#[must_use] +pub fn builder() -> builders::GetObjectAclInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAclOutput { +///

A list of grants.

+ pub grants: Option, +///

Container for the bucket owner's display name and ID.

+ pub owner: Option, + pub request_charged: Option, +} + +impl fmt::Debug for GetObjectAclOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAclOutput"); +if let Some(ref val) = self.grants { +d.field("grants", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesInput { +///

The name of the bucket that contains the object.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The object key.

+ pub key: ObjectKey, +///

Sets the maximum number of parts to return.

+ pub max_parts: Option, +///

Specifies the fields at the root level that you want returned in the response. Fields +/// that you do not specify are not returned.

+ pub object_attributes: ObjectAttributesList, +///

Specifies the part after which listing should begin. Only parts with higher part numbers +/// will be listed.

+ pub part_number_marker: Option, + pub request_payer: Option, +///

Specifies the algorithm to use when encrypting the object (for example, AES256).

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_algorithm: Option, +///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key: Option, +///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key_md5: Option, +///

The version ID used to reference a specific version of the object.

+/// +///

S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the +/// versionId query parameter in the request.

+///
+ pub version_id: Option, +} + +impl fmt::Debug for GetObjectAttributesInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAttributesInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.max_parts { +d.field("max_parts", val); +} +d.field("object_attributes", &self.object_attributes); +if let Some(ref val) = self.part_number_marker { +d.field("part_number_marker", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectAttributesInput { +#[must_use] +pub fn builder() -> builders::GetObjectAttributesInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesOutput { +///

The checksum or digest of the object.

+ pub checksum: Option, +///

Specifies whether the object retrieved was (true) or was not +/// (false) a delete marker. If false, this response header does +/// not appear in the response. To learn more about delete markers, see Working with delete markers.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub delete_marker: Option, +///

An ETag is an opaque identifier assigned by a web server to a specific version of a +/// resource found at a URL.

+ pub e_tag: Option, +///

Date and time when the object was last modified.

+ pub last_modified: Option, +///

A collection of parts associated with a multipart upload.

+ pub object_parts: Option, +///

The size of the object in bytes.

+ pub object_size: Option, + pub request_charged: Option, +///

Provides the storage class information of the object. Amazon S3 returns this header for all +/// objects except for S3 Standard storage class objects.

+///

For more information, see Storage Classes.

+/// +///

+/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub storage_class: Option, +///

The version ID of the object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub version_id: Option, +} + +impl fmt::Debug for GetObjectAttributesOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAttributesOutput"); +if let Some(ref val) = self.checksum { +d.field("checksum", val); +} +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.object_parts { +d.field("object_parts", val); +} +if let Some(ref val) = self.object_size { +d.field("object_size", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +///

A collection of parts associated with a multipart upload.

+#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesParts { +///

Indicates whether the returned list of parts is truncated. A value of true +/// indicates that the list was truncated. A list can be truncated if the number of parts +/// exceeds the limit returned in the MaxParts element.

+ pub is_truncated: Option, +///

The maximum number of parts allowed in the response.

+ pub max_parts: Option, +///

When a list is truncated, this element specifies the last part in the list, as well as +/// the value to use for the PartNumberMarker request parameter in a subsequent +/// request.

+ pub next_part_number_marker: Option, +///

The marker for the current part.

+ pub part_number_marker: Option, +///

A container for elements related to a particular part. A response can contain zero or +/// more Parts elements.

+/// +///
    +///
  • +///

    +/// General purpose buckets - For +/// GetObjectAttributes, if a additional checksum (including +/// x-amz-checksum-crc32, x-amz-checksum-crc32c, +/// x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't +/// applied to the object specified in the request, the response doesn't return +/// Part.

    +///
  • +///
  • +///

    +/// Directory buckets - For +/// GetObjectAttributes, no matter whether a additional checksum is +/// applied to the object specified in the request, the response returns +/// Part.

    +///
  • +///
+///
+ pub parts: Option, +///

The total number of parts.

+ pub total_parts_count: Option, +} + +impl fmt::Debug for GetObjectAttributesParts { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAttributesParts"); +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.max_parts { +d.field("max_parts", val); +} +if let Some(ref val) = self.next_part_number_marker { +d.field("next_part_number_marker", val); +} +if let Some(ref val) = self.part_number_marker { +d.field("part_number_marker", val); +} +if let Some(ref val) = self.parts { +d.field("parts", val); +} +if let Some(ref val) = self.total_parts_count { +d.field("total_parts_count", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectInput { +///

The bucket name containing the object.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+///

+/// Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

To retrieve the checksum, this mode must be enabled.

+ pub checksum_mode: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

Return the object only if its entity tag (ETag) is the same as the one specified in this +/// header; otherwise, return a 412 Precondition Failed error.

+///

If both of the If-Match and If-Unmodified-Since headers are +/// present in the request as follows: If-Match condition evaluates to +/// true, and; If-Unmodified-Since condition evaluates to +/// false; then, S3 returns 200 OK and the data requested.

+///

For more information about conditional requests, see RFC 7232.

+ pub if_match: Option, +///

Return the object only if it has been modified since the specified time; otherwise, +/// return a 304 Not Modified error.

+///

If both of the If-None-Match and If-Modified-Since headers are +/// present in the request as follows: If-None-Match condition evaluates to +/// false, and; If-Modified-Since condition evaluates to +/// true; then, S3 returns 304 Not Modified status code.

+///

For more information about conditional requests, see RFC 7232.

+ pub if_modified_since: Option, +///

Return the object only if its entity tag (ETag) is different from the one specified in +/// this header; otherwise, return a 304 Not Modified error.

+///

If both of the If-None-Match and If-Modified-Since headers are +/// present in the request as follows: If-None-Match condition evaluates to +/// false, and; If-Modified-Since condition evaluates to +/// true; then, S3 returns 304 Not Modified HTTP status +/// code.

+///

For more information about conditional requests, see RFC 7232.

+ pub if_none_match: Option, +///

Return the object only if it has not been modified since the specified time; otherwise, +/// return a 412 Precondition Failed error.

+///

If both of the If-Match and If-Unmodified-Since headers are +/// present in the request as follows: If-Match condition evaluates to +/// true, and; If-Unmodified-Since condition evaluates to +/// false; then, S3 returns 200 OK and the data requested.

+///

For more information about conditional requests, see RFC 7232.

+ pub if_unmodified_since: Option, +///

Key of the object to get.

+ pub key: ObjectKey, +///

Part number of the object being read. This is a positive integer between 1 and 10,000. +/// Effectively performs a 'ranged' GET request for the part specified. Useful for downloading +/// just a part of an object.

+ pub part_number: Option, +///

Downloads the specified byte range of an object. For more information about the HTTP +/// Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

+/// +///

Amazon S3 doesn't support retrieving multiple ranges of data per GET +/// request.

+///
+ pub range: Option, + pub request_payer: Option, +///

Sets the Cache-Control header of the response.

+ pub response_cache_control: Option, +///

Sets the Content-Disposition header of the response.

+ pub response_content_disposition: Option, +///

Sets the Content-Encoding header of the response.

+ pub response_content_encoding: Option, +///

Sets the Content-Language header of the response.

+ pub response_content_language: Option, +///

Sets the Content-Type header of the response.

+ pub response_content_type: Option, +///

Sets the Expires header of the response.

+ pub response_expires: Option, +///

Specifies the algorithm to use when decrypting the object (for example, +/// AES256).

+///

If you encrypt an object by using server-side encryption with customer-provided +/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, +/// you must use the following headers:

+///
    +///
  • +///

    +/// x-amz-server-side-encryption-customer-algorithm +///

    +///
  • +///
  • +///

    +/// x-amz-server-side-encryption-customer-key +///

    +///
  • +///
  • +///

    +/// x-amz-server-side-encryption-customer-key-MD5 +///

    +///
  • +///
+///

For more information about SSE-C, see Server-Side Encryption +/// (Using Customer-Provided Encryption Keys) in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_algorithm: Option, +///

Specifies the customer-provided encryption key that you originally provided for Amazon S3 to +/// encrypt the data before storing it. This value is used to decrypt the object when +/// recovering it and must match the one used when storing the data. The key must be +/// appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

+///

If you encrypt an object by using server-side encryption with customer-provided +/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, +/// you must use the following headers:

+///
    +///
  • +///

    +/// x-amz-server-side-encryption-customer-algorithm +///

    +///
  • +///
  • +///

    +/// x-amz-server-side-encryption-customer-key +///

    +///
  • +///
  • +///

    +/// x-amz-server-side-encryption-customer-key-MD5 +///

    +///
  • +///
+///

For more information about SSE-C, see Server-Side Encryption +/// (Using Customer-Provided Encryption Keys) in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key: Option, +///

Specifies the 128-bit MD5 digest of the customer-provided encryption key according to +/// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption +/// key was transmitted without error.

+///

If you encrypt an object by using server-side encryption with customer-provided +/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, +/// you must use the following headers:

+///
    +///
  • +///

    +/// x-amz-server-side-encryption-customer-algorithm +///

    +///
  • +///
  • +///

    +/// x-amz-server-side-encryption-customer-key +///

    +///
  • +///
  • +///

    +/// x-amz-server-side-encryption-customer-key-MD5 +///

    +///
  • +///
+///

For more information about SSE-C, see Server-Side Encryption +/// (Using Customer-Provided Encryption Keys) in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key_md5: Option, +///

Version ID used to reference a specific version of the object.

+///

By default, the GetObject operation returns the current version of an +/// object. To return a different version, use the versionId subresource.

+/// +///
    +///
  • +///

    If you include a versionId in your request header, you must have +/// the s3:GetObjectVersion permission to access a specific version of an +/// object. The s3:GetObject permission is not required in this +/// scenario.

    +///
  • +///
  • +///

    If you request the current version of an object without a specific +/// versionId in the request header, only the +/// s3:GetObject permission is required. The +/// s3:GetObjectVersion permission is not required in this +/// scenario.

    +///
  • +///
  • +///

    +/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the +/// versionId query parameter in the request.

    +///
  • +///
+///
+///

For more information about versioning, see PutBucketVersioning.

+ pub version_id: Option, +} + +impl fmt::Debug for GetObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_mode { +d.field("checksum_mode", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_modified_since { +d.field("if_modified_since", val); +} +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); +} +if let Some(ref val) = self.if_unmodified_since { +d.field("if_unmodified_since", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +if let Some(ref val) = self.range { +d.field("range", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.response_cache_control { +d.field("response_cache_control", val); +} +if let Some(ref val) = self.response_content_disposition { +d.field("response_content_disposition", val); +} +if let Some(ref val) = self.response_content_encoding { +d.field("response_content_encoding", val); +} +if let Some(ref val) = self.response_content_language { +d.field("response_content_language", val); +} +if let Some(ref val) = self.response_content_type { +d.field("response_content_type", val); +} +if let Some(ref val) = self.response_expires { +d.field("response_expires", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectInput { +#[must_use] +pub fn builder() -> builders::GetObjectInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLegalHoldInput { +///

The bucket name containing the object whose legal hold status you want to retrieve.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The key name for the object whose legal hold status you want to retrieve.

+ pub key: ObjectKey, + pub request_payer: Option, +///

The version ID of the object whose legal hold status you want to retrieve.

+ pub version_id: Option, +} + +impl fmt::Debug for GetObjectLegalHoldInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectLegalHoldInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectLegalHoldInput { +#[must_use] +pub fn builder() -> builders::GetObjectLegalHoldInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLegalHoldOutput { +///

The current legal hold status for the specified object.

+ pub legal_hold: Option, +} + +impl fmt::Debug for GetObjectLegalHoldOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectLegalHoldOutput"); +if let Some(ref val) = self.legal_hold { +d.field("legal_hold", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLockConfigurationInput { +///

The bucket whose Object Lock configuration you want to retrieve.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetObjectLockConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectLockConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectLockConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetObjectLockConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLockConfigurationOutput { +///

The specified bucket's Object Lock configuration.

+ pub object_lock_configuration: Option, +} + +impl fmt::Debug for GetObjectLockConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectLockConfigurationOutput"); +if let Some(ref val) = self.object_lock_configuration { +d.field("object_lock_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Default)] +pub struct GetObjectOutput { +///

Indicates that a range of bytes was specified in the request.

+ pub accept_ranges: Option, +///

Object data.

+ pub body: Option, +///

Indicates whether the object uses an S3 Bucket Key for server-side encryption with +/// Key Management Service (KMS) keys (SSE-KMS).

+ pub bucket_key_enabled: Option, +///

Specifies caching behavior along the request/reply chain.

+ pub cache_control: Option, +///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32: Option, +///

The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32c: Option, +///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more +/// information, see Checking object integrity +/// in the Amazon S3 User Guide.

+ pub checksum_crc64nvme: Option, +///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha1: Option, +///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha256: Option, +///

The checksum type, which determines how part-level checksums are combined to create an +/// object-level checksum for multipart objects. You can use this header response to verify +/// that the checksum type that is received is the same checksum type that was specified in the +/// CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_type: Option, +///

Specifies presentational information for the object.

+ pub content_disposition: Option, +///

Indicates what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

+ pub content_encoding: Option, +///

The language the content is in.

+ pub content_language: Option, +///

Size of the body in bytes.

+ pub content_length: Option, +///

The portion of the object returned in the response.

+ pub content_range: Option, +///

A standard MIME type describing the format of the object data.

+ pub content_type: Option, +///

Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If +/// false, this response header does not appear in the response.

+/// +///
    +///
  • +///

    If the current version of the object is a delete marker, Amazon S3 behaves as if the +/// object was deleted and includes x-amz-delete-marker: true in the +/// response.

    +///
  • +///
  • +///

    If the specified version in the request is a delete marker, the response +/// returns a 405 Method Not Allowed error and the Last-Modified: +/// timestamp response header.

    +///
  • +///
+///
+ pub delete_marker: Option, +///

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific +/// version of a resource found at a URL.

+ pub e_tag: Option, +///

If the object expiration is configured (see +/// PutBucketLifecycleConfiguration +/// ), the response includes this +/// header. It includes the expiry-date and rule-id key-value pairs +/// providing object expiration information. The value of the rule-id is +/// URL-encoded.

+/// +///

Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

+///
+ pub expiration: Option, +///

The date and time at which the object is no longer cacheable.

+ pub expires: Option, +///

Date and time when the object was last modified.

+///

+/// General purpose buckets - When you specify a +/// versionId of the object in your request, if the specified version in the +/// request is a delete marker, the response returns a 405 Method Not Allowed +/// error and the Last-Modified: timestamp response header.

+ pub last_modified: Option, +///

A map of metadata to store with the object in S3.

+ pub metadata: Option, +///

This is set to the number of metadata entries not returned in the headers that are +/// prefixed with x-amz-meta-. This can happen if you create metadata using an API +/// like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, +/// you can create metadata whose values are not legal HTTP headers.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub missing_meta: Option, +///

Indicates whether this object has an active legal hold. This field is only returned if +/// you have permission to view an object's legal hold status.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_legal_hold_status: Option, +///

The Object Lock mode that's currently in place for this object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_mode: Option, +///

The date and time when this object's Object Lock will expire.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_retain_until_date: Option, +///

The count of parts this object has. This value is only returned if you specify +/// partNumber in your request and the object was uploaded as a multipart +/// upload.

+ pub parts_count: Option, +///

Amazon S3 can return this if your request involves a bucket that is either a source or +/// destination in a replication rule.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub replication_status: Option, + pub request_charged: Option, +///

Provides information about object restoration action and expiration time of the restored +/// object copy.

+/// +///

This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub restore: Option, +///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_algorithm: Option, +///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key_md5: Option, +///

If present, indicates the ID of the KMS key that was used for object encryption.

+ pub ssekms_key_id: Option, +///

The server-side encryption algorithm used when you store this object in Amazon S3.

+ pub server_side_encryption: Option, +///

Provides storage class information of the object. Amazon S3 returns this header for all +/// objects except for S3 Standard storage class objects.

+/// +///

+/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub storage_class: Option, +///

The number of tags, if any, on the object, when you have the relevant permission to read +/// object tags.

+///

You can use GetObjectTagging to retrieve +/// the tag set associated with an object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub tag_count: Option, +///

Version ID of the object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub version_id: Option, +///

If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub website_redirect_location: Option, +} + +impl fmt::Debug for GetObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectOutput"); +if let Some(ref val) = self.accept_ranges { +d.field("accept_ranges", val); +} +if let Some(ref val) = self.body { +d.field("body", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_length { +d.field("content_length", val); +} +if let Some(ref val) = self.content_range { +d.field("content_range", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.missing_meta { +d.field("missing_meta", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.parts_count { +d.field("parts_count", val); +} +if let Some(ref val) = self.replication_status { +d.field("replication_status", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.restore { +d.field("restore", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tag_count { +d.field("tag_count", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +d.finish_non_exhaustive() +} +} + + +pub type GetObjectResponseStatusCode = i32; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectRetentionInput { +///

The bucket name containing the object whose retention settings you want to retrieve.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The key name for the object whose retention settings you want to retrieve.

+ pub key: ObjectKey, + pub request_payer: Option, +///

The version ID for the object whose retention settings you want to retrieve.

+ pub version_id: Option, +} + +impl fmt::Debug for GetObjectRetentionInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectRetentionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectRetentionInput { +#[must_use] +pub fn builder() -> builders::GetObjectRetentionInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectRetentionOutput { +///

The container element for an object's retention settings.

+ pub retention: Option, +} + +impl fmt::Debug for GetObjectRetentionOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectRetentionOutput"); +if let Some(ref val) = self.retention { +d.field("retention", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTaggingInput { +///

The bucket name containing the object for which to get the tagging information.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

Object key for which to get the tagging information.

+ pub key: ObjectKey, + pub request_payer: Option, +///

The versionId of the object for which to get the tagging information.

+ pub version_id: Option, +} + +impl fmt::Debug for GetObjectTaggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectTaggingInput { +#[must_use] +pub fn builder() -> builders::GetObjectTaggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTaggingOutput { +///

Contains the tag set.

+ pub tag_set: TagSet, +///

The versionId of the object for which you got the tagging information.

+ pub version_id: Option, +} + +impl fmt::Debug for GetObjectTaggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectTaggingOutput"); +d.field("tag_set", &self.tag_set); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTorrentInput { +///

The name of the bucket containing the object for which to get the torrent files.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The object key for which to get the information.

+ pub key: ObjectKey, + pub request_payer: Option, +} + +impl fmt::Debug for GetObjectTorrentInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectTorrentInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectTorrentInput { +#[must_use] +pub fn builder() -> builders::GetObjectTorrentInputBuilder { +default() +} +} + +#[derive(Default)] +pub struct GetObjectTorrentOutput { +///

A Bencoded dictionary as defined by the BitTorrent specification

+ pub body: Option, + pub request_charged: Option, +} + +impl fmt::Debug for GetObjectTorrentOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectTorrentOutput"); +if let Some(ref val) = self.body { +d.field("body", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetPublicAccessBlockInput { +///

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want +/// to retrieve.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetPublicAccessBlockInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetPublicAccessBlockInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetPublicAccessBlockInput { +#[must_use] +pub fn builder() -> builders::GetPublicAccessBlockInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetPublicAccessBlockOutput { +///

The PublicAccessBlock configuration currently in effect for this Amazon S3 +/// bucket.

+ pub public_access_block_configuration: Option, +} + +impl fmt::Debug for GetPublicAccessBlockOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetPublicAccessBlockOutput"); +if let Some(ref val) = self.public_access_block_configuration { +d.field("public_access_block_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +///

Container for S3 Glacier job parameters.

+#[derive(Clone, PartialEq)] +pub struct GlacierJobParameters { +///

Retrieval tier at which the restore will be processed.

+ pub tier: Tier, +} + +impl fmt::Debug for GlacierJobParameters { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GlacierJobParameters"); +d.field("tier", &self.tier); +d.finish_non_exhaustive() +} +} + + +///

Container for grant information.

+#[derive(Clone, Default, PartialEq)] +pub struct Grant { +///

The person being granted permissions.

+ pub grantee: Option, +///

Specifies the permission given to the grantee.

+ pub permission: Option, +} + +impl fmt::Debug for Grant { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Grant"); +if let Some(ref val) = self.grantee { +d.field("grantee", val); +} +if let Some(ref val) = self.permission { +d.field("permission", val); +} +d.finish_non_exhaustive() +} +} + + +pub type GrantFullControl = String; + +pub type GrantRead = String; + +pub type GrantReadACP = String; + +pub type GrantWrite = String; + +pub type GrantWriteACP = String; + +///

Container for the person being granted permissions.

+#[derive(Clone, PartialEq)] +pub struct Grantee { +///

Screen name of the grantee.

+ pub display_name: Option, +///

Email address of the grantee.

+/// +///

Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

+///
    +///
  • +///

    US East (N. Virginia)

    +///
  • +///
  • +///

    US West (N. California)

    +///
  • +///
  • +///

    US West (Oregon)

    +///
  • +///
  • +///

    Asia Pacific (Singapore)

    +///
  • +///
  • +///

    Asia Pacific (Sydney)

    +///
  • +///
  • +///

    Asia Pacific (Tokyo)

    +///
  • +///
  • +///

    Europe (Ireland)

    +///
  • +///
  • +///

    South America (São Paulo)

    +///
  • +///
+///

For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

+///
+ pub email_address: Option, +///

The canonical user ID of the grantee.

+ pub id: Option, +///

Type of grantee

+ pub type_: Type, +///

URI of the grantee group.

+ pub uri: Option, +} + +impl fmt::Debug for Grantee { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Grantee"); +if let Some(ref val) = self.display_name { +d.field("display_name", val); +} +if let Some(ref val) = self.email_address { +d.field("email_address", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.field("type_", &self.type_); +if let Some(ref val) = self.uri { +d.field("uri", val); +} +d.finish_non_exhaustive() +} +} + + +pub type Grants = List; + +#[derive(Clone, Default, PartialEq)] +pub struct HeadBucketInput { +///

The bucket name.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+///

+/// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for HeadBucketInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("HeadBucketInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl HeadBucketInput { +#[must_use] +pub fn builder() -> builders::HeadBucketInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct HeadBucketOutput { +///

Indicates whether the bucket name used in the request is an access point alias.

+/// +///

For directory buckets, the value of this field is false.

+///
+ pub access_point_alias: Option, +///

The name of the location where the bucket will be created.

+///

For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

+/// +///

This functionality is only supported by directory buckets.

+///
+ pub bucket_location_name: Option, +///

The type of location where the bucket is created.

+/// +///

This functionality is only supported by directory buckets.

+///
+ pub bucket_location_type: Option, +///

The Region that the bucket is located.

+ pub bucket_region: Option, +} + +impl fmt::Debug for HeadBucketOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("HeadBucketOutput"); +if let Some(ref val) = self.access_point_alias { +d.field("access_point_alias", val); +} +if let Some(ref val) = self.bucket_location_name { +d.field("bucket_location_name", val); +} +if let Some(ref val) = self.bucket_location_type { +d.field("bucket_location_type", val); +} +if let Some(ref val) = self.bucket_region { +d.field("bucket_region", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct HeadObjectInput { +///

The name of the bucket that contains the object.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

To retrieve the checksum, this parameter must be enabled.

+///

+/// General purpose buckets - +/// If you enable checksum mode and the object is uploaded with a +/// checksum +/// and encrypted with an Key Management Service (KMS) key, you must have permission to use the +/// kms:Decrypt action to retrieve the checksum.

+///

+/// Directory buckets - If you enable +/// ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service +/// (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and +/// kms:Decrypt permissions in IAM identity-based policies and KMS key +/// policies for the KMS key to retrieve the checksum of the object.

+ pub checksum_mode: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

Return the object only if its entity tag (ETag) is the same as the one specified; +/// otherwise, return a 412 (precondition failed) error.

+///

If both of the If-Match and If-Unmodified-Since headers are +/// present in the request as follows:

+///
    +///
  • +///

    +/// If-Match condition evaluates to true, and;

    +///
  • +///
  • +///

    +/// If-Unmodified-Since condition evaluates to false;

    +///
  • +///
+///

Then Amazon S3 returns 200 OK and the data requested.

+///

For more information about conditional requests, see RFC 7232.

+ pub if_match: Option, +///

Return the object only if it has been modified since the specified time; otherwise, +/// return a 304 (not modified) error.

+///

If both of the If-None-Match and If-Modified-Since headers are +/// present in the request as follows:

+///
    +///
  • +///

    +/// If-None-Match condition evaluates to false, and;

    +///
  • +///
  • +///

    +/// If-Modified-Since condition evaluates to true;

    +///
  • +///
+///

Then Amazon S3 returns the 304 Not Modified response code.

+///

For more information about conditional requests, see RFC 7232.

+ pub if_modified_since: Option, +///

Return the object only if its entity tag (ETag) is different from the one specified; +/// otherwise, return a 304 (not modified) error.

+///

If both of the If-None-Match and If-Modified-Since headers are +/// present in the request as follows:

+///
    +///
  • +///

    +/// If-None-Match condition evaluates to false, and;

    +///
  • +///
  • +///

    +/// If-Modified-Since condition evaluates to true;

    +///
  • +///
+///

Then Amazon S3 returns the 304 Not Modified response code.

+///

For more information about conditional requests, see RFC 7232.

+ pub if_none_match: Option, +///

Return the object only if it has not been modified since the specified time; otherwise, +/// return a 412 (precondition failed) error.

+///

If both of the If-Match and If-Unmodified-Since headers are +/// present in the request as follows:

+///
    +///
  • +///

    +/// If-Match condition evaluates to true, and;

    +///
  • +///
  • +///

    +/// If-Unmodified-Since condition evaluates to false;

    +///
  • +///
+///

Then Amazon S3 returns 200 OK and the data requested.

+///

For more information about conditional requests, see RFC 7232.

+ pub if_unmodified_since: Option, +///

The object key.

+ pub key: ObjectKey, +///

Part number of the object being read. This is a positive integer between 1 and 10,000. +/// Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about +/// the size of the part and the number of parts in this object.

+ pub part_number: Option, +///

HeadObject returns only the metadata for an object. If the Range is satisfiable, only +/// the ContentLength is affected in the response. If the Range is not +/// satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

+ pub range: Option, + pub request_payer: Option, +///

Sets the Cache-Control header of the response.

+ pub response_cache_control: Option, +///

Sets the Content-Disposition header of the response.

+ pub response_content_disposition: Option, +///

Sets the Content-Encoding header of the response.

+ pub response_content_encoding: Option, +///

Sets the Content-Language header of the response.

+ pub response_content_language: Option, +///

Sets the Content-Type header of the response.

+ pub response_content_type: Option, +///

Sets the Expires header of the response.

+ pub response_expires: Option, +///

Specifies the algorithm to use when encrypting the object (for example, AES256).

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_algorithm: Option, +///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key: Option, +///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key_md5: Option, +///

Version ID used to reference a specific version of the object.

+/// +///

For directory buckets in this API operation, only the null value of the version ID is supported.

+///
+ pub version_id: Option, +} + +impl fmt::Debug for HeadObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("HeadObjectInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_mode { +d.field("checksum_mode", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_modified_since { +d.field("if_modified_since", val); +} +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); +} +if let Some(ref val) = self.if_unmodified_since { +d.field("if_unmodified_since", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +if let Some(ref val) = self.range { +d.field("range", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.response_cache_control { +d.field("response_cache_control", val); +} +if let Some(ref val) = self.response_content_disposition { +d.field("response_content_disposition", val); +} +if let Some(ref val) = self.response_content_encoding { +d.field("response_content_encoding", val); +} +if let Some(ref val) = self.response_content_language { +d.field("response_content_language", val); +} +if let Some(ref val) = self.response_content_type { +d.field("response_content_type", val); +} +if let Some(ref val) = self.response_expires { +d.field("response_expires", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl HeadObjectInput { +#[must_use] +pub fn builder() -> builders::HeadObjectInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct HeadObjectOutput { +///

Indicates that a range of bytes was specified.

+ pub accept_ranges: Option, +///

The archive state of the head object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub archive_status: Option, +///

Indicates whether the object uses an S3 Bucket Key for server-side encryption with +/// Key Management Service (KMS) keys (SSE-KMS).

+ pub bucket_key_enabled: Option, +///

Specifies caching behavior along the request/reply chain.

+ pub cache_control: Option, +///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32: Option, +///

The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32c: Option, +///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more +/// information, see Checking object integrity +/// in the Amazon S3 User Guide.

+ pub checksum_crc64nvme: Option, +///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha1: Option, +///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha256: Option, +///

The checksum type, which determines how part-level checksums are combined to create an +/// object-level checksum for multipart objects. You can use this header response to verify +/// that the checksum type that is received is the same checksum type that was specified in +/// CreateMultipartUpload request. For more +/// information, see Checking object integrity +/// in the Amazon S3 User Guide.

+ pub checksum_type: Option, +///

Specifies presentational information for the object.

+ pub content_disposition: Option, +///

Indicates what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

+ pub content_encoding: Option, +///

The language the content is in.

+ pub content_language: Option, +///

Size of the body in bytes.

+ pub content_length: Option, +///

The portion of the object returned in the response for a GET request.

+ pub content_range: Option, +///

A standard MIME type describing the format of the object data.

+ pub content_type: Option, +///

Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If +/// false, this response header does not appear in the response.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub delete_marker: Option, +///

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific +/// version of a resource found at a URL.

+ pub e_tag: Option, +///

If the object expiration is configured (see +/// PutBucketLifecycleConfiguration +/// ), the response includes this +/// header. It includes the expiry-date and rule-id key-value pairs +/// providing object expiration information. The value of the rule-id is +/// URL-encoded.

+/// +///

Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

+///
+ pub expiration: Option, +///

The date and time at which the object is no longer cacheable.

+ pub expires: Option, +///

Date and time when the object was last modified.

+ pub last_modified: Option, +///

A map of metadata to store with the object in S3.

+ pub metadata: Option, +///

This is set to the number of metadata entries not returned in x-amz-meta +/// headers. This can happen if you create metadata using an API like SOAP that supports more +/// flexible metadata than the REST API. For example, using SOAP, you can create metadata whose +/// values are not legal HTTP headers.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub missing_meta: Option, +///

Specifies whether a legal hold is in effect for this object. This header is only +/// returned if the requester has the s3:GetObjectLegalHold permission. This +/// header is not returned if the specified version of this object has never had a legal hold +/// applied. For more information about S3 Object Lock, see Object Lock.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_legal_hold_status: Option, +///

The Object Lock mode, if any, that's in effect for this object. This header is only +/// returned if the requester has the s3:GetObjectRetention permission. For more +/// information about S3 Object Lock, see Object Lock.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_mode: Option, +///

The date and time when the Object Lock retention period expires. This header is only +/// returned if the requester has the s3:GetObjectRetention permission.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_retain_until_date: Option, +///

The count of parts this object has. This value is only returned if you specify +/// partNumber in your request and the object was uploaded as a multipart +/// upload.

+ pub parts_count: Option, +///

Amazon S3 can return this header if your request involves a bucket that is either a source or +/// a destination in a replication rule.

+///

In replication, you have a source bucket on which you configure replication and +/// destination bucket or buckets where Amazon S3 stores object replicas. When you request an object +/// (GetObject) or object metadata (HeadObject) from these +/// buckets, Amazon S3 will return the x-amz-replication-status header in the response +/// as follows:

+///
    +///
  • +///

    +/// If requesting an object from the source bucket, +/// Amazon S3 will return the x-amz-replication-status header if the object in +/// your request is eligible for replication.

    +///

    For example, suppose that in your replication configuration, you specify object +/// prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix +/// TaxDocs. Any objects you upload with this key name prefix, for +/// example TaxDocs/document1.pdf, are eligible for replication. For any +/// object request with this key name prefix, Amazon S3 will return the +/// x-amz-replication-status header with value PENDING, COMPLETED or +/// FAILED indicating object replication status.

    +///
  • +///
  • +///

    +/// If requesting an object from a destination +/// bucket, Amazon S3 will return the x-amz-replication-status header +/// with value REPLICA if the object in your request is a replica that Amazon S3 created and +/// there is no replica modification replication in progress.

    +///
  • +///
  • +///

    +/// When replicating objects to multiple destination +/// buckets, the x-amz-replication-status header acts +/// differently. The header of the source object will only return a value of COMPLETED +/// when replication is successful to all destinations. The header will remain at value +/// PENDING until replication has completed for all destinations. If one or more +/// destinations fails replication the header will return FAILED.

    +///
  • +///
+///

For more information, see Replication.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub replication_status: Option, + pub request_charged: Option, +///

If the object is an archived object (an object whose storage class is GLACIER), the +/// response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

+///

If an archive copy is already restored, the header value indicates when Amazon S3 is +/// scheduled to delete the object copy. For example:

+///

+/// x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 +/// GMT" +///

+///

If the object restoration is in progress, the header returns the value +/// ongoing-request="true".

+///

For more information about archiving objects, see Transitioning Objects: General Considerations.

+/// +///

This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub restore: Option, +///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_algorithm: Option, +///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key_md5: Option, +///

If present, indicates the ID of the KMS key that was used for object encryption.

+ pub ssekms_key_id: Option, +///

The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms, aws:kms:dsse).

+ pub server_side_encryption: Option, +///

Provides storage class information of the object. Amazon S3 returns this header for all +/// objects except for S3 Standard storage class objects.

+///

For more information, see Storage Classes.

+/// +///

+/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub storage_class: Option, +///

Version ID of the object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub version_id: Option, +///

If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub website_redirect_location: Option, +} + +impl fmt::Debug for HeadObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("HeadObjectOutput"); +if let Some(ref val) = self.accept_ranges { +d.field("accept_ranges", val); +} +if let Some(ref val) = self.archive_status { +d.field("archive_status", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_length { +d.field("content_length", val); +} +if let Some(ref val) = self.content_range { +d.field("content_range", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.missing_meta { +d.field("missing_meta", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.parts_count { +d.field("parts_count", val); +} +if let Some(ref val) = self.replication_status { +d.field("replication_status", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.restore { +d.field("restore", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +d.finish_non_exhaustive() +} +} + + +pub type HostName = String; + +pub type HttpErrorCodeReturnedEquals = String; + +pub type HttpRedirectCode = String; + +pub type ID = String; + +pub type IfMatch = ETagCondition; + +pub type IfMatchInitiatedTime = Timestamp; + +pub type IfMatchLastModifiedTime = Timestamp; + +pub type IfMatchSize = i64; + +pub type IfModifiedSince = Timestamp; + +pub type IfNoneMatch = ETagCondition; + +pub type IfUnmodifiedSince = Timestamp; + +///

Container for the Suffix element.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IndexDocument { +///

A suffix that is appended to a request that is for a directory on the website endpoint. +/// (For example, if the suffix is index.html and you make a request to +/// samplebucket/images/, the data that is returned will be for the object with +/// the key name images/index.html.) The suffix must not be empty and must not +/// include a slash character.

+/// +///

Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

+///
+ pub suffix: Suffix, +} + +impl fmt::Debug for IndexDocument { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("IndexDocument"); +d.field("suffix", &self.suffix); +d.finish_non_exhaustive() +} +} + + +pub type Initiated = Timestamp; + +///

Container element that identifies who initiated the multipart upload.

+#[derive(Clone, Default, PartialEq)] +pub struct Initiator { +///

Name of the Principal.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub display_name: Option, +///

If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the +/// principal is an IAM User, it provides a user ARN value.

+/// +///

+/// Directory buckets - If the principal is an +/// Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it +/// provides a user ARN value.

+///
+ pub id: Option, +} + +impl fmt::Debug for Initiator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Initiator"); +if let Some(ref val) = self.display_name { +d.field("display_name", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.finish_non_exhaustive() +} +} + + +///

Describes the serialization format of the object.

+#[derive(Clone, Default, PartialEq)] +pub struct InputSerialization { +///

Describes the serialization of a CSV-encoded object.

+ pub csv: Option, +///

Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: +/// NONE.

+ pub compression_type: Option, +///

Specifies JSON as object's input serialization format.

+ pub json: Option, +///

Specifies Parquet as object's input serialization format.

+ pub parquet: Option, +} + +impl fmt::Debug for InputSerialization { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InputSerialization"); +if let Some(ref val) = self.csv { +d.field("csv", val); +} +if let Some(ref val) = self.compression_type { +d.field("compression_type", val); +} +if let Some(ref val) = self.json { +d.field("json", val); +} +if let Some(ref val) = self.parquet { +d.field("parquet", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct IntelligentTieringAccessTier(Cow<'static, str>); + +impl IntelligentTieringAccessTier { +pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; + +pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for IntelligentTieringAccessTier { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: IntelligentTieringAccessTier) -> Self { +s.0 +} +} + +impl FromStr for IntelligentTieringAccessTier { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

A container for specifying S3 Intelligent-Tiering filters. The filters determine the +/// subset of objects to which the rule applies.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringAndOperator { +///

An object key name prefix that identifies the subset of objects to which the +/// configuration applies.

+ pub prefix: Option, +///

All of these tags must exist in the object's tag set in order for the configuration to +/// apply.

+ pub tags: Option, +} + +impl fmt::Debug for IntelligentTieringAndOperator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("IntelligentTieringAndOperator"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} +} + + +///

Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

+///

For information about the S3 Intelligent-Tiering storage class, see Storage class +/// for automatically optimizing frequently and infrequently accessed +/// objects.

+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringConfiguration { +///

Specifies a bucket filter. The configuration only includes objects that meet the +/// filter's criteria.

+ pub filter: Option, +///

The ID used to identify the S3 Intelligent-Tiering configuration.

+ pub id: IntelligentTieringId, +///

Specifies the status of the configuration.

+ pub status: IntelligentTieringStatus, +///

Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

+ pub tierings: TieringList, +} + +impl fmt::Debug for IntelligentTieringConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("IntelligentTieringConfiguration"); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +d.field("id", &self.id); +d.field("status", &self.status); +d.field("tierings", &self.tierings); +d.finish_non_exhaustive() +} +} + +impl Default for IntelligentTieringConfiguration { +fn default() -> Self { +Self { +filter: None, +id: default(), +status: String::new().into(), +tierings: default(), +} +} +} + + +pub type IntelligentTieringConfigurationList = List; + +pub type IntelligentTieringDays = i32; + +///

The Filter is used to identify objects that the S3 Intelligent-Tiering +/// configuration applies to.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringFilter { +///

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. +/// The operator must have at least two predicates, and an object must match all of the +/// predicates in order for the filter to apply.

+ pub and: Option, +///

An object key name prefix that identifies the subset of objects to which the rule +/// applies.

+/// +///

Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

+///
+ pub prefix: Option, + pub tag: Option, +} + +impl fmt::Debug for IntelligentTieringFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("IntelligentTieringFilter"); +if let Some(ref val) = self.and { +d.field("and", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tag { +d.field("tag", val); +} +d.finish_non_exhaustive() +} +} + + +pub type IntelligentTieringId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct IntelligentTieringStatus(Cow<'static, str>); + +impl IntelligentTieringStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for IntelligentTieringStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: IntelligentTieringStatus) -> Self { +s.0 +} +} + +impl FromStr for IntelligentTieringStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

Object is archived and inaccessible until restored.

+///

If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage +/// class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access +/// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you +/// must first restore a copy using RestoreObject. Otherwise, this +/// operation returns an InvalidObjectState error. For information about restoring +/// archived objects, see Restoring Archived Objects in +/// the Amazon S3 User Guide.

+#[derive(Clone, Default, PartialEq)] +pub struct InvalidObjectState { + pub access_tier: Option, + pub storage_class: Option, +} + +impl fmt::Debug for InvalidObjectState { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InvalidObjectState"); +if let Some(ref val) = self.access_tier { +d.field("access_tier", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() +} +} + + +///

You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

+///
    +///
  • +///

    Cannot specify both a write offset value and user-defined object metadata for existing objects.

    +///
  • +///
  • +///

    Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

    +///
  • +///
  • +///

    Request body cannot be empty when 'write offset' is specified.

    +///
  • +///
+#[derive(Clone, Default, PartialEq)] +pub struct InvalidRequest { +} + +impl fmt::Debug for InvalidRequest { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InvalidRequest"); +d.finish_non_exhaustive() +} +} + + +///

+/// The write offset value that you specified does not match the current object size. +///

+#[derive(Clone, Default, PartialEq)] +pub struct InvalidWriteOffset { +} + +impl fmt::Debug for InvalidWriteOffset { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InvalidWriteOffset"); +d.finish_non_exhaustive() +} +} + + +///

Specifies the inventory configuration for an Amazon S3 bucket. For more information, see +/// GET Bucket inventory in the Amazon S3 API Reference.

+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryConfiguration { +///

Contains information about where to publish the inventory results.

+ pub destination: InventoryDestination, +///

Specifies an inventory filter. The inventory only includes objects that meet the +/// filter's criteria.

+ pub filter: Option, +///

The ID used to identify the inventory configuration.

+ pub id: InventoryId, +///

Object versions to include in the inventory list. If set to All, the list +/// includes all the object versions, which adds the version-related fields +/// VersionId, IsLatest, and DeleteMarker to the +/// list. If set to Current, the list does not contain these version-related +/// fields.

+ pub included_object_versions: InventoryIncludedObjectVersions, +///

Specifies whether the inventory is enabled or disabled. If set to True, an +/// inventory list is generated. If set to False, no inventory list is +/// generated.

+ pub is_enabled: IsEnabled, +///

Contains the optional fields that are included in the inventory results.

+ pub optional_fields: Option, +///

Specifies the schedule for generating inventory results.

+ pub schedule: InventorySchedule, +} + +impl fmt::Debug for InventoryConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryConfiguration"); +d.field("destination", &self.destination); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +d.field("id", &self.id); +d.field("included_object_versions", &self.included_object_versions); +d.field("is_enabled", &self.is_enabled); +if let Some(ref val) = self.optional_fields { +d.field("optional_fields", val); +} +d.field("schedule", &self.schedule); +d.finish_non_exhaustive() +} +} + +impl Default for InventoryConfiguration { +fn default() -> Self { +Self { +destination: default(), +filter: None, +id: default(), +included_object_versions: String::new().into(), +is_enabled: default(), +optional_fields: None, +schedule: default(), +} +} +} + + +pub type InventoryConfigurationList = List; + +///

Specifies the inventory configuration for an Amazon S3 bucket.

+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryDestination { +///

Contains the bucket name, file format, bucket owner (optional), and prefix (optional) +/// where inventory results are published.

+ pub s3_bucket_destination: InventoryS3BucketDestination, +} + +impl fmt::Debug for InventoryDestination { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryDestination"); +d.field("s3_bucket_destination", &self.s3_bucket_destination); +d.finish_non_exhaustive() +} +} + +impl Default for InventoryDestination { +fn default() -> Self { +Self { +s3_bucket_destination: default(), +} +} +} + + +///

Contains the type of server-side encryption used to encrypt the inventory +/// results.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct InventoryEncryption { +///

Specifies the use of SSE-KMS to encrypt delivered inventory reports.

+ pub ssekms: Option, +///

Specifies the use of SSE-S3 to encrypt delivered inventory reports.

+ pub sses3: Option, +} + +impl fmt::Debug for InventoryEncryption { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryEncryption"); +if let Some(ref val) = self.ssekms { +d.field("ssekms", val); +} +if let Some(ref val) = self.sses3 { +d.field("sses3", val); +} +d.finish_non_exhaustive() +} +} + + +///

Specifies an inventory filter. The inventory only includes objects that meet the +/// filter's criteria.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct InventoryFilter { +///

The prefix that an object must have to be included in the inventory results.

+ pub prefix: Prefix, +} + +impl fmt::Debug for InventoryFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryFilter"); +d.field("prefix", &self.prefix); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryFormat(Cow<'static, str>); + +impl InventoryFormat { +pub const CSV: &'static str = "CSV"; + +pub const ORC: &'static str = "ORC"; + +pub const PARQUET: &'static str = "Parquet"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for InventoryFormat { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: InventoryFormat) -> Self { +s.0 +} +} + +impl FromStr for InventoryFormat { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryFrequency(Cow<'static, str>); + +impl InventoryFrequency { +pub const DAILY: &'static str = "Daily"; + +pub const WEEKLY: &'static str = "Weekly"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for InventoryFrequency { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: InventoryFrequency) -> Self { +s.0 +} +} + +impl FromStr for InventoryFrequency { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type InventoryId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryIncludedObjectVersions(Cow<'static, str>); + +impl InventoryIncludedObjectVersions { +pub const ALL: &'static str = "All"; + +pub const CURRENT: &'static str = "Current"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for InventoryIncludedObjectVersions { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: InventoryIncludedObjectVersions) -> Self { +s.0 +} +} + +impl FromStr for InventoryIncludedObjectVersions { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryOptionalField(Cow<'static, str>); + +impl InventoryOptionalField { +pub const BUCKET_KEY_STATUS: &'static str = "BucketKeyStatus"; + +pub const CHECKSUM_ALGORITHM: &'static str = "ChecksumAlgorithm"; + +pub const E_TAG: &'static str = "ETag"; + +pub const ENCRYPTION_STATUS: &'static str = "EncryptionStatus"; + +pub const INTELLIGENT_TIERING_ACCESS_TIER: &'static str = "IntelligentTieringAccessTier"; + +pub const IS_MULTIPART_UPLOADED: &'static str = "IsMultipartUploaded"; + +pub const LAST_MODIFIED_DATE: &'static str = "LastModifiedDate"; + +pub const OBJECT_ACCESS_CONTROL_LIST: &'static str = "ObjectAccessControlList"; + +pub const OBJECT_LOCK_LEGAL_HOLD_STATUS: &'static str = "ObjectLockLegalHoldStatus"; + +pub const OBJECT_LOCK_MODE: &'static str = "ObjectLockMode"; + +pub const OBJECT_LOCK_RETAIN_UNTIL_DATE: &'static str = "ObjectLockRetainUntilDate"; + +pub const OBJECT_OWNER: &'static str = "ObjectOwner"; + +pub const REPLICATION_STATUS: &'static str = "ReplicationStatus"; + +pub const SIZE: &'static str = "Size"; + +pub const STORAGE_CLASS: &'static str = "StorageClass"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for InventoryOptionalField { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: InventoryOptionalField) -> Self { +s.0 +} +} + +impl FromStr for InventoryOptionalField { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type InventoryOptionalFields = List; + +///

Contains the bucket name, file format, bucket owner (optional), and prefix (optional) +/// where inventory results are published.

+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryS3BucketDestination { +///

The account ID that owns the destination S3 bucket. If no account ID is provided, the +/// owner is not validated before exporting data.

+/// +///

Although this value is optional, we strongly recommend that you set it to help +/// prevent problems if the destination bucket ownership changes.

+///
+ pub account_id: Option, +///

The Amazon Resource Name (ARN) of the bucket where inventory results will be +/// published.

+ pub bucket: BucketName, +///

Contains the type of server-side encryption used to encrypt the inventory +/// results.

+ pub encryption: Option, +///

Specifies the output format of the inventory results.

+ pub format: InventoryFormat, +///

The prefix that is prepended to all inventory results.

+ pub prefix: Option, +} + +impl fmt::Debug for InventoryS3BucketDestination { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryS3BucketDestination"); +if let Some(ref val) = self.account_id { +d.field("account_id", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.encryption { +d.field("encryption", val); +} +d.field("format", &self.format); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} +} + +impl Default for InventoryS3BucketDestination { +fn default() -> Self { +Self { +account_id: None, +bucket: default(), +encryption: None, +format: String::new().into(), +prefix: None, +} +} +} + + +///

Specifies the schedule for generating inventory results.

+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventorySchedule { +///

Specifies how frequently inventory results are produced.

+ pub frequency: InventoryFrequency, +} + +impl fmt::Debug for InventorySchedule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventorySchedule"); +d.field("frequency", &self.frequency); +d.finish_non_exhaustive() +} +} + +impl Default for InventorySchedule { +fn default() -> Self { +Self { +frequency: String::new().into(), +} +} +} + + +pub type IsEnabled = bool; + +pub type IsLatest = bool; + +pub type IsPublic = bool; + +pub type IsRestoreInProgress = bool; + +pub type IsTruncated = bool; + +///

Specifies JSON as object's input serialization format.

+#[derive(Clone, Default, PartialEq)] +pub struct JSONInput { +///

The type of JSON. Valid values: Document, Lines.

+ pub type_: Option, +} + +impl fmt::Debug for JSONInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("JSONInput"); +if let Some(ref val) = self.type_ { +d.field("type_", val); +} +d.finish_non_exhaustive() +} +} + + +///

Specifies JSON as request's output serialization format.

+#[derive(Clone, Default, PartialEq)] +pub struct JSONOutput { +///

The value used to separate individual records in the output. If no value is specified, +/// Amazon S3 uses a newline character ('\n').

+ pub record_delimiter: Option, +} + +impl fmt::Debug for JSONOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("JSONOutput"); +if let Some(ref val) = self.record_delimiter { +d.field("record_delimiter", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct JSONType(Cow<'static, str>); + +impl JSONType { +pub const DOCUMENT: &'static str = "DOCUMENT"; + +pub const LINES: &'static str = "LINES"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for JSONType { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: JSONType) -> Self { +s.0 +} +} + +impl FromStr for JSONType { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type KMSContext = String; + +pub type KeyCount = i32; + +pub type KeyMarker = String; + +pub type KeyPrefixEquals = String; + +pub type LambdaFunctionArn = String; + +///

A container for specifying the configuration for Lambda notifications.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LambdaFunctionConfiguration { +///

The Amazon S3 bucket event for which to invoke the Lambda function. For more information, +/// see Supported +/// Event Types in the Amazon S3 User Guide.

+ pub events: EventList, + pub filter: Option, + pub id: Option, +///

The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the +/// specified event type occurs.

+ pub lambda_function_arn: LambdaFunctionArn, +} + +impl fmt::Debug for LambdaFunctionConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LambdaFunctionConfiguration"); +d.field("events", &self.events); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.field("lambda_function_arn", &self.lambda_function_arn); +d.finish_non_exhaustive() +} +} + + +pub type LambdaFunctionConfigurationList = List; + +pub type LastModified = Timestamp; + +pub type LastModifiedTime = Timestamp; + +///

Container for the expiration for the lifecycle of the object.

+///

For more information see, Managing your storage +/// lifecycle in the Amazon S3 User Guide.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleExpiration { +///

Indicates at what date the object is to be moved or deleted. The date value must conform +/// to the ISO 8601 format. The time is always midnight UTC.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub date: Option, +///

Indicates the lifetime, in days, of the objects that are subject to the rule. The value +/// must be a non-zero positive integer.

+ pub days: Option, + pub expired_object_all_versions: Option, +///

Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set +/// to true, the delete marker will be expired; if set to false the policy takes no action. +/// This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub expired_object_delete_marker: Option, +} + +impl fmt::Debug for LifecycleExpiration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LifecycleExpiration"); +if let Some(ref val) = self.date { +d.field("date", val); +} +if let Some(ref val) = self.days { +d.field("days", val); +} +if let Some(ref val) = self.expired_object_all_versions { +d.field("expired_object_all_versions", val); +} +if let Some(ref val) = self.expired_object_delete_marker { +d.field("expired_object_delete_marker", val); +} +d.finish_non_exhaustive() +} +} + + +///

A lifecycle rule for individual objects in an Amazon S3 bucket.

+///

For more information see, Managing your storage +/// lifecycle in the Amazon S3 User Guide.

+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRule { + pub abort_incomplete_multipart_upload: Option, + pub del_marker_expiration: Option, +///

Specifies the expiration for the lifecycle of the object in the form of date, days and, +/// whether the object has a delete marker.

+ pub expiration: Option, +///

The Filter is used to identify objects that a Lifecycle Rule applies to. A +/// Filter must have exactly one of Prefix, Tag, or +/// And specified. Filter is required if the +/// LifecycleRule does not contain a Prefix element.

+/// +///

+/// Tag filters are not supported for directory buckets.

+///
+ pub filter: Option, +///

Unique identifier for the rule. The value cannot be longer than 255 characters.

+ pub id: Option, + pub noncurrent_version_expiration: Option, +///

Specifies the transition rule for the lifecycle rule that describes when noncurrent +/// objects transition to a specific storage class. If your bucket is versioning-enabled (or +/// versioning is suspended), you can set this action to request that Amazon S3 transition +/// noncurrent object versions to a specific storage class at a set period in the object's +/// lifetime.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub noncurrent_version_transitions: Option, +///

Prefix identifying one or more objects to which the rule applies. This is +/// no longer used; use Filter instead.

+/// +///

Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

+///
+ pub prefix: Option, +///

If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not +/// currently being applied.

+ pub status: ExpirationStatus, +///

Specifies when an Amazon S3 object transitions to a specified storage class.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub transitions: Option, +} + +impl fmt::Debug for LifecycleRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LifecycleRule"); +if let Some(ref val) = self.abort_incomplete_multipart_upload { +d.field("abort_incomplete_multipart_upload", val); +} +if let Some(ref val) = self.del_marker_expiration { +d.field("del_marker_expiration", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +if let Some(ref val) = self.noncurrent_version_expiration { +d.field("noncurrent_version_expiration", val); +} +if let Some(ref val) = self.noncurrent_version_transitions { +d.field("noncurrent_version_transitions", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.field("status", &self.status); +if let Some(ref val) = self.transitions { +d.field("transitions", val); +} +d.finish_non_exhaustive() +} +} + + +///

This is used in a Lifecycle Rule Filter to apply a logical AND to two or more +/// predicates. The Lifecycle Rule will apply to any object matching all of the predicates +/// configured inside the And operator.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRuleAndOperator { +///

Minimum object size to which the rule applies.

+ pub object_size_greater_than: Option, +///

Maximum object size to which the rule applies.

+ pub object_size_less_than: Option, +///

Prefix identifying one or more objects to which the rule applies.

+ pub prefix: Option, +///

All of these tags must exist in the object's tag set in order for the rule to +/// apply.

+ pub tags: Option, +} + +impl fmt::Debug for LifecycleRuleAndOperator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LifecycleRuleAndOperator"); +if let Some(ref val) = self.object_size_greater_than { +d.field("object_size_greater_than", val); +} +if let Some(ref val) = self.object_size_less_than { +d.field("object_size_less_than", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} +} + + +///

The Filter is used to identify objects that a Lifecycle Rule applies to. A +/// Filter can have exactly one of Prefix, Tag, +/// ObjectSizeGreaterThan, ObjectSizeLessThan, or And +/// specified. If the Filter element is left empty, the Lifecycle Rule applies to +/// all objects in the bucket.

+#[derive(Default, Serialize, Deserialize)] +pub struct LifecycleRuleFilter { + pub and: Option, + pub cached_tags: CachedTags, +///

Minimum object size to which the rule applies.

+ pub object_size_greater_than: Option, +///

Maximum object size to which the rule applies.

+ pub object_size_less_than: Option, +///

Prefix identifying one or more objects to which the rule applies.

+/// +///

Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

+///
+ pub prefix: Option, +///

This tag must exist in the object's tag set in order for the rule to apply.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub tag: Option, +} + +impl fmt::Debug for LifecycleRuleFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LifecycleRuleFilter"); +if let Some(ref val) = self.and { +d.field("and", val); +} +d.field("cached_tags", &self.cached_tags); +if let Some(ref val) = self.object_size_greater_than { +d.field("object_size_greater_than", val); +} +if let Some(ref val) = self.object_size_less_than { +d.field("object_size_less_than", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tag { +d.field("tag", val); +} +d.finish_non_exhaustive() +} +} + +#[allow(clippy::clone_on_copy)] +impl Clone for LifecycleRuleFilter { +fn clone(&self) -> Self { +Self { +and: self.and.clone(), +cached_tags: default(), +object_size_greater_than: self.object_size_greater_than.clone(), +object_size_less_than: self.object_size_less_than.clone(), +prefix: self.prefix.clone(), +tag: self.tag.clone(), +} +} +} +impl PartialEq for LifecycleRuleFilter { +fn eq(&self, other: &Self) -> bool { +if self.and != other.and { +return false; +} +if self.object_size_greater_than != other.object_size_greater_than { +return false; +} +if self.object_size_less_than != other.object_size_less_than { +return false; +} +if self.prefix != other.prefix { +return false; +} +if self.tag != other.tag { +return false; +} +true +} +} + +pub type LifecycleRules = List; + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketAnalyticsConfigurationsInput { +///

The name of the bucket from which analytics configurations are retrieved.

+ pub bucket: BucketName, +///

The ContinuationToken that represents a placeholder from where this request +/// should begin.

+ pub continuation_token: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for ListBucketAnalyticsConfigurationsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketAnalyticsConfigurationsInput { +#[must_use] +pub fn builder() -> builders::ListBucketAnalyticsConfigurationsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketAnalyticsConfigurationsOutput { +///

The list of analytics configurations for a bucket.

+ pub analytics_configuration_list: Option, +///

The marker that is used as a starting point for this analytics configuration list +/// response. This value is present if it was sent in the request.

+ pub continuation_token: Option, +///

Indicates whether the returned list of analytics configurations is complete. A value of +/// true indicates that the list is not complete and the NextContinuationToken will be provided +/// for a subsequent request.

+ pub is_truncated: Option, +///

+/// NextContinuationToken is sent when isTruncated is true, which +/// indicates that there are more analytics configurations to list. The next request must +/// include this NextContinuationToken. The token is obfuscated and is not a +/// usable value.

+ pub next_continuation_token: Option, +} + +impl fmt::Debug for ListBucketAnalyticsConfigurationsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsOutput"); +if let Some(ref val) = self.analytics_configuration_list { +d.field("analytics_configuration_list", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketIntelligentTieringConfigurationsInput { +///

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

+ pub bucket: BucketName, +///

The ContinuationToken that represents a placeholder from where this request +/// should begin.

+ pub continuation_token: Option, +} + +impl fmt::Debug for ListBucketIntelligentTieringConfigurationsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketIntelligentTieringConfigurationsInput { +#[must_use] +pub fn builder() -> builders::ListBucketIntelligentTieringConfigurationsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketIntelligentTieringConfigurationsOutput { +///

The ContinuationToken that represents a placeholder from where this request +/// should begin.

+ pub continuation_token: Option, +///

The list of S3 Intelligent-Tiering configurations for a bucket.

+ pub intelligent_tiering_configuration_list: Option, +///

Indicates whether the returned list of analytics configurations is complete. A value of +/// true indicates that the list is not complete and the +/// NextContinuationToken will be provided for a subsequent request.

+ pub is_truncated: Option, +///

The marker used to continue this inventory configuration listing. Use the +/// NextContinuationToken from this response to continue the listing in a +/// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

+ pub next_continuation_token: Option, +} + +impl fmt::Debug for ListBucketIntelligentTieringConfigurationsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsOutput"); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.intelligent_tiering_configuration_list { +d.field("intelligent_tiering_configuration_list", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketInventoryConfigurationsInput { +///

The name of the bucket containing the inventory configurations to retrieve.

+ pub bucket: BucketName, +///

The marker used to continue an inventory configuration listing that has been truncated. +/// Use the NextContinuationToken from a previously truncated list response to +/// continue the listing. The continuation token is an opaque value that Amazon S3 +/// understands.

+ pub continuation_token: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for ListBucketInventoryConfigurationsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketInventoryConfigurationsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketInventoryConfigurationsInput { +#[must_use] +pub fn builder() -> builders::ListBucketInventoryConfigurationsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketInventoryConfigurationsOutput { +///

If sent in the request, the marker that is used as a starting point for this inventory +/// configuration list response.

+ pub continuation_token: Option, +///

The list of inventory configurations for a bucket.

+ pub inventory_configuration_list: Option, +///

Tells whether the returned list of inventory configurations is complete. A value of true +/// indicates that the list is not complete and the NextContinuationToken is provided for a +/// subsequent request.

+ pub is_truncated: Option, +///

The marker used to continue this inventory configuration listing. Use the +/// NextContinuationToken from this response to continue the listing in a +/// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

+ pub next_continuation_token: Option, +} + +impl fmt::Debug for ListBucketInventoryConfigurationsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketInventoryConfigurationsOutput"); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.inventory_configuration_list { +d.field("inventory_configuration_list", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketMetricsConfigurationsInput { +///

The name of the bucket containing the metrics configurations to retrieve.

+ pub bucket: BucketName, +///

The marker that is used to continue a metrics configuration listing that has been +/// truncated. Use the NextContinuationToken from a previously truncated list +/// response to continue the listing. The continuation token is an opaque value that Amazon S3 +/// understands.

+ pub continuation_token: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} + +impl fmt::Debug for ListBucketMetricsConfigurationsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketMetricsConfigurationsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketMetricsConfigurationsInput { +#[must_use] +pub fn builder() -> builders::ListBucketMetricsConfigurationsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketMetricsConfigurationsOutput { +///

The marker that is used as a starting point for this metrics configuration list +/// response. This value is present if it was sent in the request.

+ pub continuation_token: Option, +///

Indicates whether the returned list of metrics configurations is complete. A value of +/// true indicates that the list is not complete and the NextContinuationToken will be provided +/// for a subsequent request.

+ pub is_truncated: Option, +///

The list of metrics configurations for a bucket.

+ pub metrics_configuration_list: Option, +///

The marker used to continue a metrics configuration listing that has been truncated. Use +/// the NextContinuationToken from a previously truncated list response to +/// continue the listing. The continuation token is an opaque value that Amazon S3 +/// understands.

+ pub next_continuation_token: Option, +} + +impl fmt::Debug for ListBucketMetricsConfigurationsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketMetricsConfigurationsOutput"); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.metrics_configuration_list { +d.field("metrics_configuration_list", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketsInput { +///

Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services +/// Region must be expressed according to the Amazon Web Services Region code, such as us-west-2 +/// for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services +/// Regions, see Regions and Endpoints.

+/// +///

Requests made to a Regional endpoint that is different from the +/// bucket-region parameter are not supported. For example, if you want to +/// limit the response to your buckets in Region us-west-2, the request must be +/// made to an endpoint in Region us-west-2.

+///
+ pub bucket_region: Option, +///

+/// ContinuationToken indicates to Amazon S3 that the list is being continued on +/// this bucket with a token. ContinuationToken is obfuscated and is not a real +/// key. You can use this ContinuationToken for pagination of the list results.

+///

Length Constraints: Minimum length of 0. Maximum length of 1024.

+///

Required: No.

+/// +///

If you specify the bucket-region, prefix, or continuation-token +/// query parameters without using max-buckets to set the maximum number of buckets returned in the response, +/// Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

+///
+ pub continuation_token: Option, +///

Maximum number of buckets to be returned in response. When the number is more than the +/// count of buckets that are owned by an Amazon Web Services account, return all the buckets in +/// response.

+ pub max_buckets: Option, +///

Limits the response to bucket names that begin with the specified bucket name +/// prefix.

+ pub prefix: Option, +} + +impl fmt::Debug for ListBucketsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketsInput"); +if let Some(ref val) = self.bucket_region { +d.field("bucket_region", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.max_buckets { +d.field("max_buckets", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketsInput { +#[must_use] +pub fn builder() -> builders::ListBucketsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketsOutput { +///

The list of buckets owned by the requester.

+ pub buckets: Option, +///

+/// ContinuationToken is included in the response when there are more buckets +/// that can be listed with pagination. The next ListBuckets request to Amazon S3 can +/// be continued with this ContinuationToken. ContinuationToken is +/// obfuscated and is not a real bucket.

+ pub continuation_token: Option, +///

The owner of the buckets listed.

+ pub owner: Option, +///

If Prefix was sent with the request, it is included in the response.

+///

All bucket names in the response begin with the specified bucket name prefix.

+ pub prefix: Option, +} + +impl fmt::Debug for ListBucketsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketsOutput"); +if let Some(ref val) = self.buckets { +d.field("buckets", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListDirectoryBucketsInput { +///

+/// ContinuationToken indicates to Amazon S3 that the list is being continued on +/// buckets in this account with a token. ContinuationToken is obfuscated and is +/// not a real bucket name. You can use this ContinuationToken for the pagination +/// of the list results.

+ pub continuation_token: Option, +///

Maximum number of buckets to be returned in response. When the number is more than the +/// count of buckets that are owned by an Amazon Web Services account, return all the buckets in +/// response.

+ pub max_directory_buckets: Option, +} + +impl fmt::Debug for ListDirectoryBucketsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListDirectoryBucketsInput"); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.max_directory_buckets { +d.field("max_directory_buckets", val); +} +d.finish_non_exhaustive() +} +} + +impl ListDirectoryBucketsInput { +#[must_use] +pub fn builder() -> builders::ListDirectoryBucketsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListDirectoryBucketsOutput { +///

The list of buckets owned by the requester.

+ pub buckets: Option, +///

If ContinuationToken was sent with the request, it is included in the +/// response. You can use the returned ContinuationToken for pagination of the +/// list response.

+ pub continuation_token: Option, +} + +impl fmt::Debug for ListDirectoryBucketsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListDirectoryBucketsOutput"); +if let Some(ref val) = self.buckets { +d.field("buckets", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListMultipartUploadsInput { +///

The name of the bucket to which the multipart upload was initiated.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

Character you use to group keys.

+///

All keys that contain the same string between the prefix, if specified, and the first +/// occurrence of the delimiter after the prefix are grouped under a single result element, +/// CommonPrefixes. If you don't specify the prefix parameter, then the +/// substring starts at the beginning of the key. The keys that are grouped under +/// CommonPrefixes result element are not returned elsewhere in the +/// response.

+/// +///

+/// Directory buckets - For directory buckets, / is the only supported delimiter.

+///
+ pub delimiter: Option, + pub encoding_type: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

Specifies the multipart upload after which listing should begin.

+/// +///
    +///
  • +///

    +/// General purpose buckets - For +/// general purpose buckets, key-marker is an object key. Together with +/// upload-id-marker, this parameter specifies the multipart upload +/// after which listing should begin.

    +///

    If upload-id-marker is not specified, only the keys +/// lexicographically greater than the specified key-marker will be +/// included in the list.

    +///

    If upload-id-marker is specified, any multipart uploads for a key +/// equal to the key-marker might also be included, provided those +/// multipart uploads have upload IDs lexicographically greater than the specified +/// upload-id-marker.

    +///
  • +///
  • +///

    +/// Directory buckets - For +/// directory buckets, key-marker is obfuscated and isn't a real object +/// key. The upload-id-marker parameter isn't supported by +/// directory buckets. To list the additional multipart uploads, you only need to set +/// the value of key-marker to the NextKeyMarker value from +/// the previous response.

    +///

    In the ListMultipartUploads response, the multipart uploads aren't +/// sorted lexicographically based on the object keys. +/// +///

    +///
  • +///
+///
+ pub key_marker: Option, +///

Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response +/// body. 1,000 is the maximum number of uploads that can be returned in a response.

+ pub max_uploads: Option, +///

Lists in-progress uploads only for those keys that begin with the specified prefix. You +/// can use prefixes to separate a bucket into different grouping of keys. (You can think of +/// using prefix to make groups in the same way that you'd use a folder in a file +/// system.)

+/// +///

+/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

+///
+ pub prefix: Option, + pub request_payer: Option, +///

Together with key-marker, specifies the multipart upload after which listing should +/// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. +/// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the +/// list only if they have an upload ID lexicographically greater than the specified +/// upload-id-marker.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub upload_id_marker: Option, +} + +impl fmt::Debug for ListMultipartUploadsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListMultipartUploadsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.key_marker { +d.field("key_marker", val); +} +if let Some(ref val) = self.max_uploads { +d.field("max_uploads", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.upload_id_marker { +d.field("upload_id_marker", val); +} +d.finish_non_exhaustive() +} +} + +impl ListMultipartUploadsInput { +#[must_use] +pub fn builder() -> builders::ListMultipartUploadsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListMultipartUploadsOutput { +///

The name of the bucket to which the multipart upload was initiated. Does not return the +/// access point ARN or access point alias if used.

+ pub bucket: Option, +///

If you specify a delimiter in the request, then the result returns each distinct key +/// prefix containing the delimiter in a CommonPrefixes element. The distinct key +/// prefixes are returned in the Prefix child element.

+/// +///

+/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

+///
+ pub common_prefixes: Option, +///

Contains the delimiter you specified in the request. If you don't specify a delimiter in +/// your request, this element is absent from the response.

+/// +///

+/// Directory buckets - For directory buckets, / is the only supported delimiter.

+///
+ pub delimiter: Option, +///

Encoding type used by Amazon S3 to encode object keys in the response.

+///

If you specify the encoding-type request parameter, Amazon S3 includes this +/// element in the response, and returns encoded key name values in the following response +/// elements:

+///

+/// Delimiter, KeyMarker, Prefix, +/// NextKeyMarker, Key.

+ pub encoding_type: Option, +///

Indicates whether the returned list of multipart uploads is truncated. A value of true +/// indicates that the list was truncated. The list can be truncated if the number of multipart +/// uploads exceeds the limit allowed or specified by max uploads.

+ pub is_truncated: Option, +///

The key at or after which the listing began.

+ pub key_marker: Option, +///

Maximum number of multipart uploads that could have been included in the +/// response.

+ pub max_uploads: Option, +///

When a list is truncated, this element specifies the value that should be used for the +/// key-marker request parameter in a subsequent request.

+ pub next_key_marker: Option, +///

When a list is truncated, this element specifies the value that should be used for the +/// upload-id-marker request parameter in a subsequent request.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub next_upload_id_marker: Option, +///

When a prefix is provided in the request, this field contains the specified prefix. The +/// result contains only keys starting with the specified prefix.

+/// +///

+/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

+///
+ pub prefix: Option, + pub request_charged: Option, +///

Together with key-marker, specifies the multipart upload after which listing should +/// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. +/// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the +/// list only if they have an upload ID lexicographically greater than the specified +/// upload-id-marker.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub upload_id_marker: Option, +///

Container for elements related to a particular multipart upload. A response can contain +/// zero or more Upload elements.

+ pub uploads: Option, +} + +impl fmt::Debug for ListMultipartUploadsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListMultipartUploadsOutput"); +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.common_prefixes { +d.field("common_prefixes", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.key_marker { +d.field("key_marker", val); +} +if let Some(ref val) = self.max_uploads { +d.field("max_uploads", val); +} +if let Some(ref val) = self.next_key_marker { +d.field("next_key_marker", val); +} +if let Some(ref val) = self.next_upload_id_marker { +d.field("next_upload_id_marker", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.upload_id_marker { +d.field("upload_id_marker", val); +} +if let Some(ref val) = self.uploads { +d.field("uploads", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectVersionsInput { +///

The bucket name that contains the objects.

+ pub bucket: BucketName, +///

A delimiter is a character that you specify to group keys. All keys that contain the +/// same string between the prefix and the first occurrence of the delimiter are +/// grouped under a single result element in CommonPrefixes. These groups are +/// counted as one result against the max-keys limitation. These keys are not +/// returned elsewhere in the response.

+ pub delimiter: Option, + pub encoding_type: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

Specifies the key to start with when listing objects in a bucket.

+ pub key_marker: Option, +///

Sets the maximum number of keys returned in the response. By default, the action returns +/// up to 1,000 key names. The response might contain fewer keys but will never contain more. +/// If additional keys satisfy the search criteria, but were not returned because +/// max-keys was exceeded, the response contains +/// true. To return the additional keys, +/// see key-marker and version-id-marker.

+ pub max_keys: Option, +///

Specifies the optional fields that you want returned in the response. Fields that you do +/// not specify are not returned.

+ pub optional_object_attributes: Option, +///

Use this parameter to select only those keys that begin with the specified prefix. You +/// can use prefixes to separate a bucket into different groupings of keys. (You can think of +/// using prefix to make groups in the same way that you'd use a folder in a file +/// system.) You can use prefix with delimiter to roll up numerous +/// objects into a single result under CommonPrefixes.

+ pub prefix: Option, + pub request_payer: Option, +///

Specifies the object version you want to start listing from.

+ pub version_id_marker: Option, +} + +impl fmt::Debug for ListObjectVersionsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectVersionsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.key_marker { +d.field("key_marker", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.optional_object_attributes { +d.field("optional_object_attributes", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id_marker { +d.field("version_id_marker", val); +} +d.finish_non_exhaustive() +} +} + +impl ListObjectVersionsInput { +#[must_use] +pub fn builder() -> builders::ListObjectVersionsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectVersionsOutput { +///

All of the keys rolled up into a common prefix count as a single return when calculating +/// the number of returns.

+ pub common_prefixes: Option, +///

Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

+ pub delete_markers: Option, +///

The delimiter grouping the included keys. A delimiter is a character that you specify to +/// group keys. All keys that contain the same string between the prefix and the first +/// occurrence of the delimiter are grouped under a single result element in +/// CommonPrefixes. These groups are counted as one result against the +/// max-keys limitation. These keys are not returned elsewhere in the +/// response.

+ pub delimiter: Option, +///

Encoding type used by Amazon S3 to encode object key names in the XML response.

+///

If you specify the encoding-type request parameter, Amazon S3 includes this +/// element in the response, and returns encoded key name values in the following response +/// elements:

+///

+/// KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

+ pub encoding_type: Option, +///

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search +/// criteria. If your results were truncated, you can make a follow-up paginated request by +/// using the NextKeyMarker and NextVersionIdMarker response +/// parameters as a starting place in another request to return the rest of the results.

+ pub is_truncated: Option, +///

Marks the last key returned in a truncated response.

+ pub key_marker: Option, +///

Specifies the maximum number of objects to return.

+ pub max_keys: Option, +///

The bucket name.

+ pub name: Option, +///

When the number of responses exceeds the value of MaxKeys, +/// NextKeyMarker specifies the first key not returned that satisfies the +/// search criteria. Use this value for the key-marker request parameter in a subsequent +/// request.

+ pub next_key_marker: Option, +///

When the number of responses exceeds the value of MaxKeys, +/// NextVersionIdMarker specifies the first object version not returned that +/// satisfies the search criteria. Use this value for the version-id-marker +/// request parameter in a subsequent request.

+ pub next_version_id_marker: Option, +///

Selects objects that start with the value supplied by this parameter.

+ pub prefix: Option, + pub request_charged: Option, +///

Marks the last version of the key returned in a truncated response.

+ pub version_id_marker: Option, +///

Container for version information.

+ pub versions: Option, +} + +impl fmt::Debug for ListObjectVersionsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectVersionsOutput"); +if let Some(ref val) = self.common_prefixes { +d.field("common_prefixes", val); +} +if let Some(ref val) = self.delete_markers { +d.field("delete_markers", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.key_marker { +d.field("key_marker", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.next_key_marker { +d.field("next_key_marker", val); +} +if let Some(ref val) = self.next_version_id_marker { +d.field("next_version_id_marker", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.version_id_marker { +d.field("version_id_marker", val); +} +if let Some(ref val) = self.versions { +d.field("versions", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsInput { +///

The name of the bucket containing the objects.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

A delimiter is a character that you use to group keys.

+ pub delimiter: Option, + pub encoding_type: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this +/// specified key. Marker can be any key in the bucket.

+ pub marker: Option, +///

Sets the maximum number of keys returned in the response. By default, the action returns +/// up to 1,000 key names. The response might contain fewer keys but will never contain more. +///

+ pub max_keys: Option, +///

Specifies the optional fields that you want returned in the response. Fields that you do +/// not specify are not returned.

+ pub optional_object_attributes: Option, +///

Limits the response to keys that begin with the specified prefix.

+ pub prefix: Option, +///

Confirms that the requester knows that she or he will be charged for the list objects +/// request. Bucket owners need not specify this parameter in their requests.

+ pub request_payer: Option, +} + +impl fmt::Debug for ListObjectsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.marker { +d.field("marker", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.optional_object_attributes { +d.field("optional_object_attributes", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.finish_non_exhaustive() +} +} + +impl ListObjectsInput { +#[must_use] +pub fn builder() -> builders::ListObjectsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsOutput { +///

The bucket name.

+ pub name: Option, +///

Keys that begin with the indicated prefix.

+ pub prefix: Option, +///

Indicates where in the bucket listing begins. Marker is included in the response if it +/// was sent with the request.

+ pub marker: Option, +///

The maximum number of keys returned in the response body.

+ pub max_keys: Option, +///

A flag that indicates whether Amazon S3 returned all of the results that satisfied the search +/// criteria.

+ pub is_truncated: Option, +///

Metadata about each object returned.

+ pub contents: Option, +///

All of the keys (up to 1,000) rolled up in a common prefix count as a single return when +/// calculating the number of returns.

+///

A response can contain CommonPrefixes only if you specify a +/// delimiter.

+///

+/// CommonPrefixes contains all (if there are any) keys between +/// Prefix and the next occurrence of the string specified by the +/// delimiter.

+///

+/// CommonPrefixes lists keys that act like subdirectories in the directory +/// specified by Prefix.

+///

For example, if the prefix is notes/ and the delimiter is a slash +/// (/), as in notes/summer/july, the common prefix is +/// notes/summer/. All of the keys that roll up into a common prefix count as a +/// single return when calculating the number of returns.

+ pub common_prefixes: Option, +///

Causes keys that contain the same string between the prefix and the first occurrence of +/// the delimiter to be rolled up into a single result element in the +/// CommonPrefixes collection. These rolled-up keys are not returned elsewhere +/// in the response. Each rolled-up result counts as only one return against the +/// MaxKeys value.

+ pub delimiter: Option, +///

When the response is truncated (the IsTruncated element value in the +/// response is true), you can use the key name in this field as the +/// marker parameter in the subsequent request to get the next set of objects. +/// Amazon S3 lists objects in alphabetical order.

+/// +///

This element is returned only if you have the delimiter request +/// parameter specified. If the response does not include the NextMarker +/// element and it is truncated, you can use the value of the last Key element +/// in the response as the marker parameter in the subsequent request to get +/// the next set of object keys.

+///
+ pub next_marker: Option, +///

Encoding type used by Amazon S3 to encode the object keys in the response. +/// Responses are encoded only in UTF-8. An object key can contain any Unicode character. +/// However, the XML 1.0 parser can't parse certain characters, such as characters with an +/// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this +/// parameter to request that Amazon S3 encode the keys in the response. For more information about +/// characters to avoid in object key names, see Object key naming +/// guidelines.

+/// +///

When using the URL encoding type, non-ASCII characters that are used in an object's +/// key name will be percent-encoded according to UTF-8 code values. For example, the object +/// test_file(3).png will appear as +/// test_file%283%29.png.

+///
+ pub encoding_type: Option, + pub request_charged: Option, +} + +impl fmt::Debug for ListObjectsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectsOutput"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.marker { +d.field("marker", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.contents { +d.field("contents", val); +} +if let Some(ref val) = self.common_prefixes { +d.field("common_prefixes", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.next_marker { +d.field("next_marker", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsV2Input { +///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

+/// ContinuationToken indicates to Amazon S3 that the list is being continued on +/// this bucket with a token. ContinuationToken is obfuscated and is not a real +/// key. You can use this ContinuationToken for pagination of the list results. +///

+ pub continuation_token: Option, +///

A delimiter is a character that you use to group keys.

+/// +///
    +///
  • +///

    +/// Directory buckets - For directory buckets, / is the only supported delimiter.

    +///
  • +///
  • +///

    +/// Directory buckets - When you query +/// ListObjectsV2 with a delimiter during in-progress multipart +/// uploads, the CommonPrefixes response parameter contains the prefixes +/// that are associated with the in-progress multipart uploads. For more information +/// about multipart uploads, see Multipart Upload Overview in +/// the Amazon S3 User Guide.

    +///
  • +///
+///
+ pub delimiter: Option, +///

Encoding type used by Amazon S3 to encode the object keys in the response. +/// Responses are encoded only in UTF-8. An object key can contain any Unicode character. +/// However, the XML 1.0 parser can't parse certain characters, such as characters with an +/// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this +/// parameter to request that Amazon S3 encode the keys in the response. For more information about +/// characters to avoid in object key names, see Object key naming +/// guidelines.

+/// +///

When using the URL encoding type, non-ASCII characters that are used in an object's +/// key name will be percent-encoded according to UTF-8 code values. For example, the object +/// test_file(3).png will appear as +/// test_file%283%29.png.

+///
+ pub encoding_type: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The owner field is not present in ListObjectsV2 by default. If you want to +/// return the owner field with each key in the result, then set the FetchOwner +/// field to true.

+/// +///

+/// Directory buckets - For directory buckets, +/// the bucket owner is returned as the object owner for all objects.

+///
+ pub fetch_owner: Option, +///

Sets the maximum number of keys returned in the response. By default, the action returns +/// up to 1,000 key names. The response might contain fewer keys but will never contain +/// more.

+ pub max_keys: Option, +///

Specifies the optional fields that you want returned in the response. Fields that you do +/// not specify are not returned.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub optional_object_attributes: Option, +///

Limits the response to keys that begin with the specified prefix.

+/// +///

+/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

+///
+ pub prefix: Option, +///

Confirms that the requester knows that she or he will be charged for the list objects +/// request in V2 style. Bucket owners need not specify this parameter in their +/// requests.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub request_payer: Option, +///

StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this +/// specified key. StartAfter can be any key in the bucket.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub start_after: Option, +} + +impl fmt::Debug for ListObjectsV2Input { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectsV2Input"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.fetch_owner { +d.field("fetch_owner", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.optional_object_attributes { +d.field("optional_object_attributes", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.start_after { +d.field("start_after", val); +} +d.finish_non_exhaustive() +} +} + +impl ListObjectsV2Input { +#[must_use] +pub fn builder() -> builders::ListObjectsV2InputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsV2Output { +///

The bucket name.

+ pub name: Option, +///

Keys that begin with the indicated prefix.

+/// +///

+/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

+///
+ pub prefix: Option, +///

Sets the maximum number of keys returned in the response. By default, the action returns +/// up to 1,000 key names. The response might contain fewer keys but will never contain +/// more.

+ pub max_keys: Option, +///

+/// KeyCount is the number of keys returned with this request. +/// KeyCount will always be less than or equal to the MaxKeys +/// field. For example, if you ask for 50 keys, your result will include 50 keys or +/// fewer.

+ pub key_count: Option, +///

If ContinuationToken was sent with the request, it is included in the +/// response. You can use the returned ContinuationToken for pagination of the +/// list response. You can use this ContinuationToken for pagination of the list +/// results.

+ pub continuation_token: Option, +///

Set to false if all of the results were returned. Set to true +/// if more keys are available to return. If the number of results exceeds that specified by +/// MaxKeys, all of the results might not be returned.

+ pub is_truncated: Option, +///

+/// NextContinuationToken is sent when isTruncated is true, which +/// means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 +/// can be continued with this NextContinuationToken. +/// NextContinuationToken is obfuscated and is not a real key

+ pub next_continuation_token: Option, +///

Metadata about each object returned.

+ pub contents: Option, +///

All of the keys (up to 1,000) that share the same prefix are grouped together. When +/// counting the total numbers of returns by this API operation, this group of keys is +/// considered as one item.

+///

A response can contain CommonPrefixes only if you specify a +/// delimiter.

+///

+/// CommonPrefixes contains all (if there are any) keys between +/// Prefix and the next occurrence of the string specified by a +/// delimiter.

+///

+/// CommonPrefixes lists keys that act like subdirectories in the directory +/// specified by Prefix.

+///

For example, if the prefix is notes/ and the delimiter is a slash +/// (/) as in notes/summer/july, the common prefix is +/// notes/summer/. All of the keys that roll up into a common prefix count as a +/// single return when calculating the number of returns.

+/// +///
    +///
  • +///

    +/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    +///
  • +///
  • +///

    +/// Directory buckets - When you query +/// ListObjectsV2 with a delimiter during in-progress multipart +/// uploads, the CommonPrefixes response parameter contains the prefixes +/// that are associated with the in-progress multipart uploads. For more information +/// about multipart uploads, see Multipart Upload Overview in +/// the Amazon S3 User Guide.

    +///
  • +///
+///
+ pub common_prefixes: Option, +///

Causes keys that contain the same string between the prefix and the first +/// occurrence of the delimiter to be rolled up into a single result element in the +/// CommonPrefixes collection. These rolled-up keys are not returned elsewhere +/// in the response. Each rolled-up result counts as only one return against the +/// MaxKeys value.

+/// +///

+/// Directory buckets - For directory buckets, / is the only supported delimiter.

+///
+ pub delimiter: Option, +///

Encoding type used by Amazon S3 to encode object key names in the XML response.

+///

If you specify the encoding-type request parameter, Amazon S3 includes this +/// element in the response, and returns encoded key name values in the following response +/// elements:

+///

+/// Delimiter, Prefix, Key, and StartAfter.

+ pub encoding_type: Option, +///

If StartAfter was sent with the request, it is included in the response.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub start_after: Option, + pub request_charged: Option, +} + +impl fmt::Debug for ListObjectsV2Output { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectsV2Output"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.key_count { +d.field("key_count", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +if let Some(ref val) = self.contents { +d.field("contents", val); +} +if let Some(ref val) = self.common_prefixes { +d.field("common_prefixes", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.start_after { +d.field("start_after", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListPartsInput { +///

The name of the bucket to which the parts are being uploaded.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

Object key for which the multipart upload was initiated.

+ pub key: ObjectKey, +///

Sets the maximum number of parts to return.

+ pub max_parts: Option, +///

Specifies the part after which listing should begin. Only parts with higher part numbers +/// will be listed.

+ pub part_number_marker: Option, + pub request_payer: Option, +///

The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created +/// using a checksum algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_algorithm: Option, +///

The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. +/// For more information, see +/// Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key: Option, +///

The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum +/// algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key_md5: Option, +///

Upload ID identifying the multipart upload whose parts are being listed.

+ pub upload_id: MultipartUploadId, +} + +impl fmt::Debug for ListPartsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListPartsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.max_parts { +d.field("max_parts", val); +} +if let Some(ref val) = self.part_number_marker { +d.field("part_number_marker", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() +} +} + +impl ListPartsInput { +#[must_use] +pub fn builder() -> builders::ListPartsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListPartsOutput { +///

If the bucket has a lifecycle rule configured with an action to abort incomplete +/// multipart uploads and the prefix in the lifecycle rule matches the object name in the +/// request, then the response includes this header indicating when the initiated multipart +/// upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle +/// Configuration.

+///

The response will also include the x-amz-abort-rule-id header that will +/// provide the ID of the lifecycle configuration rule that defines this action.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub abort_date: Option, +///

This header is returned along with the x-amz-abort-date header. It +/// identifies applicable lifecycle configuration rule that defines the action to abort +/// incomplete multipart uploads.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub abort_rule_id: Option, +///

The name of the bucket to which the multipart upload was initiated. Does not return the +/// access point ARN or access point alias if used.

+ pub bucket: Option, +///

The algorithm that was used to create a checksum of the object.

+ pub checksum_algorithm: Option, +///

The checksum type, which determines how part-level checksums are combined to create an +/// object-level checksum for multipart objects. You can use this header response to verify +/// that the checksum type that is received is the same checksum type that was specified in +/// CreateMultipartUpload request. For more +/// information, see Checking object integrity +/// in the Amazon S3 User Guide.

+ pub checksum_type: Option, +///

Container element that identifies who initiated the multipart upload. If the initiator +/// is an Amazon Web Services account, this element provides the same information as the Owner +/// element. If the initiator is an IAM User, this element provides the user ARN and display +/// name.

+ pub initiator: Option, +///

Indicates whether the returned list of parts is truncated. A true value indicates that +/// the list was truncated. A list can be truncated if the number of parts exceeds the limit +/// returned in the MaxParts element.

+ pub is_truncated: Option, +///

Object key for which the multipart upload was initiated.

+ pub key: Option, +///

Maximum number of parts that were allowed in the response.

+ pub max_parts: Option, +///

When a list is truncated, this element specifies the last part in the list, as well as +/// the value to use for the part-number-marker request parameter in a subsequent +/// request.

+ pub next_part_number_marker: Option, +///

Container element that identifies the object owner, after the object is created. If +/// multipart upload is initiated by an IAM user, this element provides the parent account ID +/// and display name.

+/// +///

+/// Directory buckets - The bucket owner is +/// returned as the object owner for all the parts.

+///
+ pub owner: Option, +///

Specifies the part after which listing should begin. Only parts with higher part numbers +/// will be listed.

+ pub part_number_marker: Option, +///

Container for elements related to a particular part. A response can contain zero or more +/// Part elements.

+ pub parts: Option, + pub request_charged: Option, +///

The class of storage used to store the uploaded object.

+/// +///

+/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub storage_class: Option, +///

Upload ID identifying the multipart upload whose parts are being listed.

+ pub upload_id: Option, +} + +impl fmt::Debug for ListPartsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListPartsOutput"); +if let Some(ref val) = self.abort_date { +d.field("abort_date", val); +} +if let Some(ref val) = self.abort_rule_id { +d.field("abort_rule_id", val); +} +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.initiator { +d.field("initiator", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.max_parts { +d.field("max_parts", val); +} +if let Some(ref val) = self.next_part_number_marker { +d.field("next_part_number_marker", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.part_number_marker { +d.field("part_number_marker", val); +} +if let Some(ref val) = self.parts { +d.field("parts", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.upload_id { +d.field("upload_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type Location = String; + +///

Specifies the location where the bucket will be created.

+///

For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see +/// Working with directory buckets in the Amazon S3 User Guide.

+/// +///

This functionality is only supported by directory buckets.

+///
+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LocationInfo { +///

The name of the location where the bucket will be created.

+///

For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

+ pub name: Option, +///

The type of location where the bucket will be created.

+ pub type_: Option, +} + +impl fmt::Debug for LocationInfo { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LocationInfo"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.type_ { +d.field("type_", val); +} +d.finish_non_exhaustive() +} +} + + +pub type LocationNameAsString = String; + +pub type LocationPrefix = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct LocationType(Cow<'static, str>); + +impl LocationType { +pub const AVAILABILITY_ZONE: &'static str = "AvailabilityZone"; + +pub const LOCAL_ZONE: &'static str = "LocalZone"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for LocationType { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: LocationType) -> Self { +s.0 +} +} + +impl FromStr for LocationType { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys +/// for a bucket. For more information, see PUT Bucket logging in the +/// Amazon S3 API Reference.

+#[derive(Clone, Default, PartialEq)] +pub struct LoggingEnabled { +///

Specifies the bucket where you want Amazon S3 to store server access logs. You can have your +/// logs delivered to any bucket that you own, including the same bucket that is being logged. +/// You can also configure multiple buckets to deliver their logs to the same target bucket. In +/// this case, you should choose a different TargetPrefix for each source bucket +/// so that the delivered log files can be distinguished by key.

+ pub target_bucket: TargetBucket, +///

Container for granting information.

+///

Buckets that use the bucket owner enforced setting for Object Ownership don't support +/// target grants. For more information, see Permissions for server access log delivery in the +/// Amazon S3 User Guide.

+ pub target_grants: Option, +///

Amazon S3 key format for log objects.

+ pub target_object_key_format: Option, +///

A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a +/// single bucket, you can use a prefix to distinguish which log files came from which +/// bucket.

+ pub target_prefix: TargetPrefix, +} + +impl fmt::Debug for LoggingEnabled { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LoggingEnabled"); +d.field("target_bucket", &self.target_bucket); +if let Some(ref val) = self.target_grants { +d.field("target_grants", val); +} +if let Some(ref val) = self.target_object_key_format { +d.field("target_object_key_format", val); +} +d.field("target_prefix", &self.target_prefix); +d.finish_non_exhaustive() +} +} + + +pub type MFA = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct MFADelete(Cow<'static, str>); + +impl MFADelete { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for MFADelete { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: MFADelete) -> Self { +s.0 +} +} + +impl FromStr for MFADelete { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MFADeleteStatus(Cow<'static, str>); + +impl MFADeleteStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for MFADeleteStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: MFADeleteStatus) -> Self { +s.0 +} +} + +impl FromStr for MFADeleteStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Marker = String; + +pub type MaxAgeSeconds = i32; + +pub type MaxBuckets = i32; + +pub type MaxDirectoryBuckets = i32; + +pub type MaxKeys = i32; + +pub type MaxParts = i32; + +pub type MaxUploads = i32; + +pub type Message = String; + +pub type Metadata = Map; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MetadataDirective(Cow<'static, str>); + +impl MetadataDirective { +pub const COPY: &'static str = "COPY"; + +pub const REPLACE: &'static str = "REPLACE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for MetadataDirective { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: MetadataDirective) -> Self { +s.0 +} +} + +impl FromStr for MetadataDirective { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

A metadata key-value pair to store with an object.

+#[derive(Clone, Default, PartialEq)] +pub struct MetadataEntry { +///

Name of the object.

+ pub name: Option, +///

Value of the object.

+ pub value: Option, +} + +impl fmt::Debug for MetadataEntry { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetadataEntry"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.value { +d.field("value", val); +} +d.finish_non_exhaustive() +} +} + + +pub type MetadataKey = String; + +///

+/// The metadata table configuration for a general purpose bucket. +///

+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct MetadataTableConfiguration { +///

+/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

+ pub s3_tables_destination: S3TablesDestination, +} + +impl fmt::Debug for MetadataTableConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetadataTableConfiguration"); +d.field("s3_tables_destination", &self.s3_tables_destination); +d.finish_non_exhaustive() +} +} + +impl Default for MetadataTableConfiguration { +fn default() -> Self { +Self { +s3_tables_destination: default(), +} +} +} + + +///

+/// The metadata table configuration for a general purpose bucket. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

+#[derive(Clone, PartialEq)] +pub struct MetadataTableConfigurationResult { +///

+/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

+ pub s3_tables_destination_result: S3TablesDestinationResult, +} + +impl fmt::Debug for MetadataTableConfigurationResult { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetadataTableConfigurationResult"); +d.field("s3_tables_destination_result", &self.s3_tables_destination_result); +d.finish_non_exhaustive() +} +} + + +pub type MetadataTableStatus = String; + +pub type MetadataValue = String; + +///

A container specifying replication metrics-related settings enabling replication +/// metrics and events.

+#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct Metrics { +///

A container specifying the time threshold for emitting the +/// s3:Replication:OperationMissedThreshold event.

+ pub event_threshold: Option, +///

Specifies whether the replication metrics are enabled.

+ pub status: MetricsStatus, +} + +impl fmt::Debug for Metrics { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Metrics"); +if let Some(ref val) = self.event_threshold { +d.field("event_threshold", val); +} +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +///

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. +/// The operator must have at least two predicates, and an object must match all of the +/// predicates in order for the filter to apply.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct MetricsAndOperator { +///

The access point ARN used when evaluating an AND predicate.

+ pub access_point_arn: Option, +///

The prefix used when evaluating an AND predicate.

+ pub prefix: Option, +///

The list of tags used when evaluating an AND predicate.

+ pub tags: Option, +} + +impl fmt::Debug for MetricsAndOperator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetricsAndOperator"); +if let Some(ref val) = self.access_point_arn { +d.field("access_point_arn", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} +} + + +///

Specifies a metrics configuration for the CloudWatch request metrics (specified by the +/// metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics +/// configuration, note that this is a full replacement of the existing metrics configuration. +/// If you don't include the elements you want to keep, they are erased. For more information, +/// see PutBucketMetricsConfiguration.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct MetricsConfiguration { +///

Specifies a metrics configuration filter. The metrics configuration will only include +/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an +/// access point ARN, or a conjunction (MetricsAndOperator).

+ pub filter: Option, +///

The ID used to identify the metrics configuration. The ID has a 64 character limit and +/// can only contain letters, numbers, periods, dashes, and underscores.

+ pub id: MetricsId, +} + +impl fmt::Debug for MetricsConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetricsConfiguration"); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + + +pub type MetricsConfigurationList = List; + +///

Specifies a metrics configuration filter. The metrics configuration only includes +/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an +/// access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[non_exhaustive] +#[serde(rename_all = "PascalCase")] +pub enum MetricsFilter { +///

The access point ARN used when evaluating a metrics filter.

+ AccessPointArn(AccessPointArn), +///

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. +/// The operator must have at least two predicates, and an object must match all of the +/// predicates in order for the filter to apply.

+ And(MetricsAndOperator), +///

The prefix used when evaluating a metrics filter.

+ Prefix(Prefix), +///

The tag used when evaluating a metrics filter.

+ Tag(Tag), +} + +pub type MetricsId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct MetricsStatus(Cow<'static, str>); + +impl MetricsStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for MetricsStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: MetricsStatus) -> Self { +s.0 +} +} + +impl FromStr for MetricsStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Minutes = i32; + +pub type MissingMeta = i32; + +pub type MpuObjectSize = i64; + +///

Container for the MultipartUpload for the Amazon S3 object.

+#[derive(Clone, Default, PartialEq)] +pub struct MultipartUpload { +///

The algorithm that was used to create a checksum of the object.

+ pub checksum_algorithm: Option, +///

The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_type: Option, +///

Date and time at which the multipart upload was initiated.

+ pub initiated: Option, +///

Identifies who initiated the multipart upload.

+ pub initiator: Option, +///

Key of the object for which the multipart upload was initiated.

+ pub key: Option, +///

Specifies the owner of the object that is part of the multipart upload.

+/// +///

+/// Directory buckets - The bucket owner is +/// returned as the object owner for all the objects.

+///
+ pub owner: Option, +///

The class of storage used to store the object.

+/// +///

+/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub storage_class: Option, +///

Upload ID that identifies the multipart upload.

+ pub upload_id: Option, +} + +impl fmt::Debug for MultipartUpload { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MultipartUpload"); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.initiated { +d.field("initiated", val); +} +if let Some(ref val) = self.initiator { +d.field("initiator", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.upload_id { +d.field("upload_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type MultipartUploadId = String; + +pub type MultipartUploadList = List; + +pub type NextKeyMarker = String; + +pub type NextMarker = String; + +pub type NextPartNumberMarker = i32; + +pub type NextToken = String; + +pub type NextUploadIdMarker = String; + +pub type NextVersionIdMarker = String; + +///

The specified bucket does not exist.

+#[derive(Clone, Default, PartialEq)] +pub struct NoSuchBucket { +} + +impl fmt::Debug for NoSuchBucket { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoSuchBucket"); +d.finish_non_exhaustive() +} +} + + +///

The specified key does not exist.

+#[derive(Clone, Default, PartialEq)] +pub struct NoSuchKey { +} + +impl fmt::Debug for NoSuchKey { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoSuchKey"); +d.finish_non_exhaustive() +} +} + + +///

The specified multipart upload does not exist.

+#[derive(Clone, Default, PartialEq)] +pub struct NoSuchUpload { +} + +impl fmt::Debug for NoSuchUpload { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoSuchUpload"); +d.finish_non_exhaustive() +} +} + + +pub type NonNegativeIntegerType = i32; + +///

Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently +/// deletes the noncurrent object versions. You set this lifecycle configuration action on a +/// bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent +/// object versions at a specific period in the object's lifetime.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NoncurrentVersionExpiration { +///

Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100 +/// noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent +/// versions beyond the specified number to retain. For more information about noncurrent +/// versions, see Lifecycle configuration +/// elements in the Amazon S3 User Guide.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub newer_noncurrent_versions: Option, +///

Specifies the number of days an object is noncurrent before Amazon S3 can perform the +/// associated action. The value must be a non-zero positive integer. For information about the +/// noncurrent days calculations, see How +/// Amazon S3 Calculates When an Object Became Noncurrent in the +/// Amazon S3 User Guide.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub noncurrent_days: Option, +} + +impl fmt::Debug for NoncurrentVersionExpiration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoncurrentVersionExpiration"); +if let Some(ref val) = self.newer_noncurrent_versions { +d.field("newer_noncurrent_versions", val); +} +if let Some(ref val) = self.noncurrent_days { +d.field("noncurrent_days", val); +} +d.finish_non_exhaustive() +} +} + + +///

Container for the transition rule that describes when noncurrent objects transition to +/// the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage +/// class. If your bucket is versioning-enabled (or versioning is suspended), you can set this +/// action to request that Amazon S3 transition noncurrent object versions to the +/// STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage +/// class at a specific period in the object's lifetime.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NoncurrentVersionTransition { +///

Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before +/// transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will +/// transition any additional noncurrent versions beyond the specified number to retain. For +/// more information about noncurrent versions, see Lifecycle configuration +/// elements in the Amazon S3 User Guide.

+ pub newer_noncurrent_versions: Option, +///

Specifies the number of days an object is noncurrent before Amazon S3 can perform the +/// associated action. For information about the noncurrent days calculations, see How +/// Amazon S3 Calculates How Long an Object Has Been Noncurrent in the +/// Amazon S3 User Guide.

+ pub noncurrent_days: Option, +///

The class of storage used to store the object.

+ pub storage_class: Option, +} + +impl fmt::Debug for NoncurrentVersionTransition { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoncurrentVersionTransition"); +if let Some(ref val) = self.newer_noncurrent_versions { +d.field("newer_noncurrent_versions", val); +} +if let Some(ref val) = self.noncurrent_days { +d.field("noncurrent_days", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() +} +} + + +pub type NoncurrentVersionTransitionList = List; + +///

The specified content does not exist.

+#[derive(Clone, Default, PartialEq)] +pub struct NotFound { +} + +impl fmt::Debug for NotFound { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NotFound"); +d.finish_non_exhaustive() +} +} + + +///

A container for specifying the notification configuration of the bucket. If this element +/// is empty, notifications are turned off for the bucket.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NotificationConfiguration { +///

Enables delivery of events to Amazon EventBridge.

+ pub event_bridge_configuration: Option, +///

Describes the Lambda functions to invoke and the events for which to invoke +/// them.

+ pub lambda_function_configurations: Option, +///

The Amazon Simple Queue Service queues to publish messages to and the events for which +/// to publish messages.

+ pub queue_configurations: Option, +///

The topic to which notifications are sent and the events for which notifications are +/// generated.

+ pub topic_configurations: Option, +} + +impl fmt::Debug for NotificationConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NotificationConfiguration"); +if let Some(ref val) = self.event_bridge_configuration { +d.field("event_bridge_configuration", val); +} +if let Some(ref val) = self.lambda_function_configurations { +d.field("lambda_function_configurations", val); +} +if let Some(ref val) = self.queue_configurations { +d.field("queue_configurations", val); +} +if let Some(ref val) = self.topic_configurations { +d.field("topic_configurations", val); +} +d.finish_non_exhaustive() +} +} + + +///

Specifies object key name filtering rules. For information about key name filtering, see +/// Configuring event +/// notifications using object key name filtering in the +/// Amazon S3 User Guide.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NotificationConfigurationFilter { + pub key: Option, +} + +impl fmt::Debug for NotificationConfigurationFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NotificationConfigurationFilter"); +if let Some(ref val) = self.key { +d.field("key", val); +} +d.finish_non_exhaustive() +} +} + + +///

An optional unique identifier for configurations in a notification configuration. If you +/// don't provide one, Amazon S3 will assign an ID.

+pub type NotificationId = String; + +///

An object consists of data and its descriptive metadata.

+#[derive(Clone, Default, PartialEq)] +pub struct Object { +///

The algorithm that was used to create a checksum of the object.

+ pub checksum_algorithm: Option, +///

The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_type: Option, +///

The entity tag is a hash of the object. The ETag reflects changes only to the contents +/// of an object, not its metadata. The ETag may or may not be an MD5 digest of the object +/// data. Whether or not it is depends on how the object was created and how it is encrypted as +/// described below:

+///
    +///
  • +///

    Objects created by the PUT Object, POST Object, or Copy operation, or through the +/// Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that +/// are an MD5 digest of their object data.

    +///
  • +///
  • +///

    Objects created by the PUT Object, POST Object, or Copy operation, or through the +/// Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are +/// not an MD5 digest of their object data.

    +///
  • +///
  • +///

    If an object is created by either the Multipart Upload or Part Copy operation, the +/// ETag is not an MD5 digest, regardless of the method of encryption. If an object is +/// larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a +/// Multipart Upload, and therefore the ETag will not be an MD5 digest.

    +///
  • +///
+/// +///

+/// Directory buckets - MD5 is not supported by directory buckets.

+///
+ pub e_tag: Option, +///

The name that you assign to an object. You use the object key to retrieve the +/// object.

+ pub key: Option, +///

Creation date of the object.

+ pub last_modified: Option, +///

The owner of the object

+/// +///

+/// Directory buckets - The bucket owner is +/// returned as the object owner.

+///
+ pub owner: Option, +///

Specifies the restoration status of an object. Objects in certain storage classes must +/// be restored before they can be retrieved. For more information about these storage classes +/// and how to work with archived objects, see Working with archived +/// objects in the Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub restore_status: Option, +///

Size in bytes of the object

+ pub size: Option, +///

The class of storage used to store the object.

+/// +///

+/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

+///
+ pub storage_class: Option, +} + +impl fmt::Debug for Object { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Object"); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.restore_status { +d.field("restore_status", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() +} +} + + +///

This action is not allowed against this storage tier.

+#[derive(Clone, Default, PartialEq)] +pub struct ObjectAlreadyInActiveTierError { +} + +impl fmt::Debug for ObjectAlreadyInActiveTierError { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectAlreadyInActiveTierError"); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectAttributes(Cow<'static, str>); + +impl ObjectAttributes { +pub const CHECKSUM: &'static str = "Checksum"; + +pub const ETAG: &'static str = "ETag"; + +pub const OBJECT_PARTS: &'static str = "ObjectParts"; + +pub const OBJECT_SIZE: &'static str = "ObjectSize"; + +pub const STORAGE_CLASS: &'static str = "StorageClass"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectAttributes { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectAttributes) -> Self { +s.0 +} +} + +impl FromStr for ObjectAttributes { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ObjectAttributesList = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectCannedACL(Cow<'static, str>); + +impl ObjectCannedACL { +pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; + +pub const AWS_EXEC_READ: &'static str = "aws-exec-read"; + +pub const BUCKET_OWNER_FULL_CONTROL: &'static str = "bucket-owner-full-control"; + +pub const BUCKET_OWNER_READ: &'static str = "bucket-owner-read"; + +pub const PRIVATE: &'static str = "private"; + +pub const PUBLIC_READ: &'static str = "public-read"; + +pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectCannedACL { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectCannedACL) -> Self { +s.0 +} +} + +impl FromStr for ObjectCannedACL { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

Object Identifier is unique value to identify objects.

+#[derive(Clone, Default, PartialEq)] +pub struct ObjectIdentifier { +///

An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. +/// This header field makes the request method conditional on ETags.

+/// +///

Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

+///
+ pub e_tag: Option, +///

Key name of the object.

+/// +///

Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

+///
+ pub key: ObjectKey, +///

If present, the objects are deleted only if its modification times matches the provided Timestamp. +///

+/// +///

This functionality is only supported for directory buckets.

+///
+ pub last_modified_time: Option, +///

If present, the objects are deleted only if its size matches the provided size in bytes.

+/// +///

This functionality is only supported for directory buckets.

+///
+ pub size: Option, +///

Version ID for the specific version of the object to delete.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub version_id: Option, +} + +impl fmt::Debug for ObjectIdentifier { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectIdentifier"); +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.last_modified_time { +d.field("last_modified_time", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ObjectIdentifierList = List; + +pub type ObjectKey = String; + +pub type ObjectList = List; + +///

The container element for Object Lock configuration parameters.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ObjectLockConfiguration { +///

Indicates whether this bucket has an Object Lock configuration enabled. Enable +/// ObjectLockEnabled when you apply ObjectLockConfiguration to a +/// bucket.

+ pub object_lock_enabled: Option, +///

Specifies the Object Lock rule for the specified object. Enable the this rule when you +/// apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode +/// and a period. The period can be either Days or Years but you must +/// select one. You cannot specify Days and Years at the same +/// time.

+ pub rule: Option, +} + +impl fmt::Debug for ObjectLockConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectLockConfiguration"); +if let Some(ref val) = self.object_lock_enabled { +d.field("object_lock_enabled", val); +} +if let Some(ref val) = self.rule { +d.field("rule", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ObjectLockEnabled(Cow<'static, str>); + +impl ObjectLockEnabled { +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectLockEnabled { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectLockEnabled) -> Self { +s.0 +} +} + +impl FromStr for ObjectLockEnabled { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ObjectLockEnabledForBucket = bool; + +///

A legal hold configuration for an object.

+#[derive(Clone, Default, PartialEq)] +pub struct ObjectLockLegalHold { +///

Indicates whether the specified object has a legal hold in place.

+ pub status: Option, +} + +impl fmt::Debug for ObjectLockLegalHold { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectLockLegalHold"); +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectLockLegalHoldStatus(Cow<'static, str>); + +impl ObjectLockLegalHoldStatus { +pub const OFF: &'static str = "OFF"; + +pub const ON: &'static str = "ON"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectLockLegalHoldStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectLockLegalHoldStatus) -> Self { +s.0 +} +} + +impl FromStr for ObjectLockLegalHoldStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectLockMode(Cow<'static, str>); + +impl ObjectLockMode { +pub const COMPLIANCE: &'static str = "COMPLIANCE"; + +pub const GOVERNANCE: &'static str = "GOVERNANCE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectLockMode { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectLockMode) -> Self { +s.0 +} +} + +impl FromStr for ObjectLockMode { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ObjectLockRetainUntilDate = Timestamp; + +///

A Retention configuration for an object.

+#[derive(Clone, Default, PartialEq)] +pub struct ObjectLockRetention { +///

Indicates the Retention mode for the specified object.

+ pub mode: Option, +///

The date on which this Object Lock Retention will expire.

+ pub retain_until_date: Option, +} + +impl fmt::Debug for ObjectLockRetention { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectLockRetention"); +if let Some(ref val) = self.mode { +d.field("mode", val); +} +if let Some(ref val) = self.retain_until_date { +d.field("retain_until_date", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ObjectLockRetentionMode(Cow<'static, str>); + +impl ObjectLockRetentionMode { +pub const COMPLIANCE: &'static str = "COMPLIANCE"; + +pub const GOVERNANCE: &'static str = "GOVERNANCE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectLockRetentionMode { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectLockRetentionMode) -> Self { +s.0 +} +} + +impl FromStr for ObjectLockRetentionMode { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

The container element for an Object Lock rule.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ObjectLockRule { +///

The default Object Lock retention mode and period that you want to apply to new objects +/// placed in the specified bucket. Bucket settings require both a mode and a period. The +/// period can be either Days or Years but you must select one. You +/// cannot specify Days and Years at the same time.

+ pub default_retention: Option, +} + +impl fmt::Debug for ObjectLockRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectLockRule"); +if let Some(ref val) = self.default_retention { +d.field("default_retention", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ObjectLockToken = String; + +///

The source object of the COPY action is not in the active tier and is only stored in +/// Amazon S3 Glacier.

+#[derive(Clone, Default, PartialEq)] +pub struct ObjectNotInActiveTierError { +} + +impl fmt::Debug for ObjectNotInActiveTierError { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectNotInActiveTierError"); +d.finish_non_exhaustive() +} +} + + +///

The container element for object ownership for a bucket's ownership controls.

+///

+/// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to +/// the bucket owner if the objects are uploaded with the +/// bucket-owner-full-control canned ACL.

+///

+/// ObjectWriter - The uploading account will own the object if the object is +/// uploaded with the bucket-owner-full-control canned ACL.

+///

+/// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no +/// longer affect permissions. The bucket owner automatically owns and has full control over +/// every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL +/// or specify bucket owner full control ACLs (such as the predefined +/// bucket-owner-full-control canned ACL or a custom ACL in XML format that +/// grants the same permissions).

+///

By default, ObjectOwnership is set to BucketOwnerEnforced and +/// ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where +/// you must control access for each object individually. For more information about S3 Object +/// Ownership, see Controlling ownership of +/// objects and disabling ACLs for your bucket in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

+///
+#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectOwnership(Cow<'static, str>); + +impl ObjectOwnership { +pub const BUCKET_OWNER_ENFORCED: &'static str = "BucketOwnerEnforced"; + +pub const BUCKET_OWNER_PREFERRED: &'static str = "BucketOwnerPreferred"; + +pub const OBJECT_WRITER: &'static str = "ObjectWriter"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -///

Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned -/// to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of -/// the object key name. A prefix is a specific string of characters at the beginning of an -/// object key name, which you can use to organize objects. For example, you can start the key -/// names of related objects with a prefix, such as 2023- or -/// engineering/. Then, you can use FilterRule to find objects in -/// a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it -/// is at the end of the object key name instead of at the beginning.

-#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct FilterRule { - ///

The object key name prefix or suffix identifying one or more objects to which the - /// filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and - /// suffixes are not supported. For more information, see Configuring Event Notifications - /// in the Amazon S3 User Guide.

- pub name: Option, - ///

The value that the filter searches for in object key names.

- pub value: Option, +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl fmt::Debug for FilterRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("FilterRule"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.value { - d.field("value", val); - } - d.finish_non_exhaustive() - } } -///

A list of containers for the key-value pair that defines the criteria for the filter -/// rule.

-pub type FilterRuleList = List; +impl From for ObjectOwnership { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct FilterRuleName(Cow<'static, str>); +impl From for Cow<'static, str> { +fn from(s: ObjectOwnership) -> Self { +s.0 +} +} -impl FilterRuleName { - pub const PREFIX: &'static str = "prefix"; +impl FromStr for ObjectOwnership { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} - pub const SUFFIX: &'static str = "suffix"; +///

A container for elements related to an individual part.

+#[derive(Clone, Default, PartialEq)] +pub struct ObjectPart { +///

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32: Option, +///

The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32c: Option, +///

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a +/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc64nvme: Option, +///

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present +/// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha1: Option, +///

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present +/// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha256: Option, +///

The part number identifying the part. This value is a positive integer between 1 and +/// 10,000.

+ pub part_number: Option, +///

The size of the uploaded part in bytes.

+ pub size: Option, +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +impl fmt::Debug for ObjectPart { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectPart"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +d.finish_non_exhaustive() +} +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } + +pub type ObjectSize = i64; + +pub type ObjectSizeGreaterThanBytes = i64; + +pub type ObjectSizeLessThanBytes = i64; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectStorageClass(Cow<'static, str>); + +impl ObjectStorageClass { +pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + +pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; + +pub const GLACIER: &'static str = "GLACIER"; + +pub const GLACIER_IR: &'static str = "GLACIER_IR"; + +pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + +pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + +pub const OUTPOSTS: &'static str = "OUTPOSTS"; + +pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; + +pub const SNOW: &'static str = "SNOW"; + +pub const STANDARD: &'static str = "STANDARD"; + +pub const STANDARD_IA: &'static str = "STANDARD_IA"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl From for FilterRuleName { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl From for Cow<'static, str> { - fn from(s: FilterRuleName) -> Self { - s.0 - } } -impl FromStr for FilterRuleName { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl From for ObjectStorageClass { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -pub type FilterRuleValue = String; +impl From for Cow<'static, str> { +fn from(s: ObjectStorageClass) -> Self { +s.0 +} +} -pub type ForceDelete = bool; +impl FromStr for ObjectStorageClass { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} +///

The version of an object.

#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAccelerateConfigurationInput { - ///

The name of the bucket for which the accelerate configuration is retrieved.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - pub request_payer: Option, +pub struct ObjectVersion { +///

The algorithm that was used to create a checksum of the object.

+ pub checksum_algorithm: Option, +///

The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_type: Option, +///

The entity tag is an MD5 hash of that version of the object.

+ pub e_tag: Option, +///

Specifies whether the object is (true) or is not (false) the latest version of an +/// object.

+ pub is_latest: Option, +///

The object key.

+ pub key: Option, +///

Date and time when the object was last modified.

+ pub last_modified: Option, +///

Specifies the owner of the object.

+ pub owner: Option, +///

Specifies the restoration status of an object. Objects in certain storage classes must +/// be restored before they can be retrieved. For more information about these storage classes +/// and how to work with archived objects, see Working with archived +/// objects in the Amazon S3 User Guide.

+ pub restore_status: Option, +///

Size in bytes of the object.

+ pub size: Option, +///

The class of storage used to store the object.

+ pub storage_class: Option, +///

Version ID of an object.

+ pub version_id: Option, } -impl fmt::Debug for GetBucketAccelerateConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAccelerateConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for ObjectVersion { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectVersion"); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.is_latest { +d.field("is_latest", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.restore_status { +d.field("restore_status", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } -impl GetBucketAccelerateConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketAccelerateConfigurationInputBuilder { - default() - } + +pub type ObjectVersionId = String; + +pub type ObjectVersionList = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectVersionStorageClass(Cow<'static, str>); + +impl ObjectVersionStorageClass { +pub const STANDARD: &'static str = "STANDARD"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectVersionStorageClass { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectVersionStorageClass) -> Self { +s.0 +} +} + +impl FromStr for ObjectVersionStorageClass { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct OptionalObjectAttributes(Cow<'static, str>); + +impl OptionalObjectAttributes { +pub const RESTORE_STATUS: &'static str = "RestoreStatus"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for OptionalObjectAttributes { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } +impl From for Cow<'static, str> { +fn from(s: OptionalObjectAttributes) -> Self { +s.0 +} +} + +impl FromStr for OptionalObjectAttributes { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type OptionalObjectAttributesList = List; + +///

Describes the location where the restore job's output is stored.

#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAccelerateConfigurationOutput { - pub request_charged: Option, - ///

The accelerate configuration of the bucket.

- pub status: Option, +pub struct OutputLocation { +///

Describes an S3 location that will receive the results of the restore request.

+ pub s3: Option, } -impl fmt::Debug for GetBucketAccelerateConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAccelerateConfigurationOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for OutputLocation { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("OutputLocation"); +if let Some(ref val) = self.s3 { +d.field("s3", val); +} +d.finish_non_exhaustive() } +} + +///

Describes how results of the Select job are serialized.

#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAclInput { - ///

Specifies the S3 bucket whose ACL is being requested.

- ///

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

- ///

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +pub struct OutputSerialization { +///

Describes the serialization of CSV-encoded Select results.

+ pub csv: Option, +///

Specifies JSON as request's output serialization format.

+ pub json: Option, } -impl fmt::Debug for GetBucketAclInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAclInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for OutputSerialization { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("OutputSerialization"); +if let Some(ref val) = self.csv { +d.field("csv", val); +} +if let Some(ref val) = self.json { +d.field("json", val); +} +d.finish_non_exhaustive() +} } -impl GetBucketAclInput { - #[must_use] - pub fn builder() -> builders::GetBucketAclInputBuilder { - default() - } + +///

Container for the owner's display name and ID.

+#[derive(Clone, Default, PartialEq)] +pub struct Owner { +///

Container for the display name of the owner. This value is only supported in the +/// following Amazon Web Services Regions:

+///
    +///
  • +///

    US East (N. Virginia)

    +///
  • +///
  • +///

    US West (N. California)

    +///
  • +///
  • +///

    US West (Oregon)

    +///
  • +///
  • +///

    Asia Pacific (Singapore)

    +///
  • +///
  • +///

    Asia Pacific (Sydney)

    +///
  • +///
  • +///

    Asia Pacific (Tokyo)

    +///
  • +///
  • +///

    Europe (Ireland)

    +///
  • +///
  • +///

    South America (São Paulo)

    +///
  • +///
+/// +///

This functionality is not supported for directory buckets.

+///
+ pub display_name: Option, +///

Container for the ID of the owner.

+ pub id: Option, +} + +impl fmt::Debug for Owner { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Owner"); +if let Some(ref val) = self.display_name { +d.field("display_name", val); +} +if let Some(ref val) = self.id { +d.field("id", val); } +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct OwnerOverride(Cow<'static, str>); + +impl OwnerOverride { +pub const DESTINATION: &'static str = "Destination"; -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAclOutput { - ///

A list of grants.

- pub grants: Option, - ///

Container for the bucket owner's display name and ID.

- pub owner: Option, +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl fmt::Debug for GetBucketAclOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAclOutput"); - if let Some(ref val) = self.grants { - d.field("grants", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAnalyticsConfigurationInput { - ///

The name of the bucket from which an analytics configuration is retrieved.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - ///

The ID that identifies the analytics configuration.

- pub id: AnalyticsId, } -impl fmt::Debug for GetBucketAnalyticsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAnalyticsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +impl From for OwnerOverride { +fn from(s: String) -> Self { +Self(Cow::from(s)) } - -impl GetBucketAnalyticsConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketAnalyticsConfigurationInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAnalyticsConfigurationOutput { - ///

The configuration and any analyses for the analytics filter.

- pub analytics_configuration: Option, +impl From for Cow<'static, str> { +fn from(s: OwnerOverride) -> Self { +s.0 +} } -impl fmt::Debug for GetBucketAnalyticsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAnalyticsConfigurationOutput"); - if let Some(ref val) = self.analytics_configuration { - d.field("analytics_configuration", val); - } - d.finish_non_exhaustive() - } +impl FromStr for OwnerOverride { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } +///

The container element for a bucket's ownership controls.

#[derive(Clone, Default, PartialEq)] -pub struct GetBucketCorsInput { - ///

The bucket name for which to get the cors configuration.

- ///

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

- ///

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +pub struct OwnershipControls { +///

The container element for an ownership control rule.

+ pub rules: OwnershipControlsRules, } -impl fmt::Debug for GetBucketCorsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketCorsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for OwnershipControls { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("OwnershipControls"); +d.field("rules", &self.rules); +d.finish_non_exhaustive() } - -impl GetBucketCorsInput { - #[must_use] - pub fn builder() -> builders::GetBucketCorsInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketCorsOutput { - ///

A set of origins and methods (cross-origin access that you want to allow). You can add - /// up to 100 rules to the configuration.

- pub cors_rules: Option, -} -impl fmt::Debug for GetBucketCorsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketCorsOutput"); - if let Some(ref val) = self.cors_rules { - d.field("cors_rules", val); - } - d.finish_non_exhaustive() - } +///

The container element for an ownership control rule.

+#[derive(Clone, PartialEq)] +pub struct OwnershipControlsRule { + pub object_ownership: ObjectOwnership, } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketEncryptionInput { - ///

The name of the bucket from which the server-side encryption configuration is - /// retrieved.

- ///

- /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- /// - ///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

- ///
- pub expected_bucket_owner: Option, +impl fmt::Debug for OwnershipControlsRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("OwnershipControlsRule"); +d.field("object_ownership", &self.object_ownership); +d.finish_non_exhaustive() } - -impl fmt::Debug for GetBucketEncryptionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketEncryptionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } } -impl GetBucketEncryptionInput { - #[must_use] - pub fn builder() -> builders::GetBucketEncryptionInputBuilder { - default() - } -} +pub type OwnershipControlsRules = List; + +///

Container for Parquet.

#[derive(Clone, Default, PartialEq)] -pub struct GetBucketEncryptionOutput { - pub server_side_encryption_configuration: Option, +pub struct ParquetInput { } -impl fmt::Debug for GetBucketEncryptionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketEncryptionOutput"); - if let Some(ref val) = self.server_side_encryption_configuration { - d.field("server_side_encryption_configuration", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for ParquetInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ParquetInput"); +d.finish_non_exhaustive() } +} + +///

Container for elements related to a part.

#[derive(Clone, Default, PartialEq)] -pub struct GetBucketIntelligentTieringConfigurationInput { - ///

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

- pub bucket: BucketName, - ///

The ID used to identify the S3 Intelligent-Tiering configuration.

- pub id: IntelligentTieringId, +pub struct Part { +///

The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present +/// if the object was uploaded with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32: Option, +///

The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present +/// if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32c: Option, +///

The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a +/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc64nvme: Option, +///

The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present +/// if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha1: Option, +///

The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present +/// if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha256: Option, +///

Entity tag returned when the part was uploaded.

+ pub e_tag: Option, +///

Date and time at which the part was uploaded.

+ pub last_modified: Option, +///

Part number identifying the part. This is a positive integer between 1 and +/// 10,000.

+ pub part_number: Option, +///

Size in bytes of the uploaded part data.

+ pub size: Option, } -impl fmt::Debug for GetBucketIntelligentTieringConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationInput"); - d.field("bucket", &self.bucket); - d.field("id", &self.id); - d.finish_non_exhaustive() - } +impl fmt::Debug for Part { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Part"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); } - -impl GetBucketIntelligentTieringConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketIntelligentTieringConfigurationInputBuilder { - default() - } +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketIntelligentTieringConfigurationOutput { - ///

Container for S3 Intelligent-Tiering configuration.

- pub intelligent_tiering_configuration: Option, +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); } - -impl fmt::Debug for GetBucketIntelligentTieringConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationOutput"); - if let Some(ref val) = self.intelligent_tiering_configuration { - d.field("intelligent_tiering_configuration", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketInventoryConfigurationInput { - ///

The name of the bucket containing the inventory configuration to retrieve.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - ///

The ID used to identify the inventory configuration.

- pub id: InventoryId, +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); } - -impl fmt::Debug for GetBucketInventoryConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketInventoryConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); } - -impl GetBucketInventoryConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketInventoryConfigurationInputBuilder { - default() - } +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketInventoryConfigurationOutput { - ///

Specifies the inventory configuration.

- pub inventory_configuration: Option, +if let Some(ref val) = self.part_number { +d.field("part_number", val); } - -impl fmt::Debug for GetBucketInventoryConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketInventoryConfigurationOutput"); - if let Some(ref val) = self.inventory_configuration { - d.field("inventory_configuration", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.size { +d.field("size", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLifecycleConfigurationInput { - ///

The name of the bucket for which to get the lifecycle information.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- /// - ///

This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

- ///
- pub expected_bucket_owner: Option, +d.finish_non_exhaustive() } - -impl fmt::Debug for GetBucketLifecycleConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLifecycleConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } } -impl GetBucketLifecycleConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketLifecycleConfigurationInputBuilder { - default() - } -} -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLifecycleConfigurationOutput { - ///

Container for a lifecycle rule.

- pub rules: Option, - ///

Indicates which default minimum object size behavior is applied to the lifecycle - /// configuration.

- /// - ///

This parameter applies to general purpose buckets only. It isn't supported for - /// directory bucket lifecycle configurations.

- ///
- ///
    - ///
  • - ///

    - /// all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

    - ///
  • - ///
  • - ///

    - /// varies_by_storage_class - Objects smaller than 128 KB will - /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By - /// default, all other storage classes will prevent transitions smaller than 128 KB. - ///

    - ///
  • - ///
- ///

To customize the minimum object size for any transition you can add a filter that - /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in - /// the body of your transition rule. Custom filters always take precedence over the default - /// transition behavior.

- pub transition_default_minimum_object_size: Option, -} +pub type PartNumber = i32; -impl fmt::Debug for GetBucketLifecycleConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLifecycleConfigurationOutput"); - if let Some(ref val) = self.rules { - d.field("rules", val); - } - if let Some(ref val) = self.transition_default_minimum_object_size { - d.field("transition_default_minimum_object_size", val); - } - d.finish_non_exhaustive() - } -} +pub type PartNumberMarker = i32; -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLocationInput { - ///

The name of the bucket for which to get the location.

- ///

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

- ///

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct PartitionDateSource(Cow<'static, str>); -impl fmt::Debug for GetBucketLocationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLocationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } -} +impl PartitionDateSource { +pub const DELIVERY_TIME: &'static str = "DeliveryTime"; -impl GetBucketLocationInput { - #[must_use] - pub fn builder() -> builders::GetBucketLocationInputBuilder { - default() - } +pub const EVENT_TIME: &'static str = "EventTime"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLocationOutput { - ///

Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported - /// location constraints by Region, see Regions and Endpoints.

- ///

Buckets in Region us-east-1 have a LocationConstraint of - /// null. Buckets with a LocationConstraint of EU reside in eu-west-1.

- pub location_constraint: Option, +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl fmt::Debug for GetBucketLocationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLocationOutput"); - if let Some(ref val) = self.location_constraint { - d.field("location_constraint", val); - } - d.finish_non_exhaustive() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLoggingInput { - ///

The bucket name for which to get the logging information.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +impl From for PartitionDateSource { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -impl fmt::Debug for GetBucketLoggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLoggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl From for Cow<'static, str> { +fn from(s: PartitionDateSource) -> Self { +s.0 +} } -impl GetBucketLoggingInput { - #[must_use] - pub fn builder() -> builders::GetBucketLoggingInputBuilder { - default() - } +impl FromStr for PartitionDateSource { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } +///

Amazon S3 keys for log objects are partitioned in the following format:

+///

+/// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +///

+///

PartitionedPrefix defaults to EventTime delivery when server access logs are +/// delivered.

#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLoggingOutput { - pub logging_enabled: Option, +pub struct PartitionedPrefix { +///

Specifies the partition date source for the partitioned prefix. +/// PartitionDateSource can be EventTime or +/// DeliveryTime.

+///

For DeliveryTime, the time in the log file names corresponds to the +/// delivery time for the log files.

+///

For EventTime, The logs delivered are for a specific day only. The year, +/// month, and day correspond to the day on which the event occurred, and the hour, minutes and +/// seconds are set to 00 in the key.

+ pub partition_date_source: Option, } -impl fmt::Debug for GetBucketLoggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLoggingOutput"); - if let Some(ref val) = self.logging_enabled { - d.field("logging_enabled", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PartitionedPrefix { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PartitionedPrefix"); +if let Some(ref val) = self.partition_date_source { +d.field("partition_date_source", val); +} +d.finish_non_exhaustive() } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetadataTableConfigurationInput { - ///

- /// The general purpose bucket that contains the metadata table configuration that you want to retrieve. - ///

- pub bucket: BucketName, - ///

- /// The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. - ///

- pub expected_bucket_owner: Option, } -impl fmt::Debug for GetBucketMetadataTableConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetadataTableConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } + +pub type Parts = List; + +pub type PartsCount = i32; + +pub type PartsList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Payer(Cow<'static, str>); + +impl Payer { +pub const BUCKET_OWNER: &'static str = "BucketOwner"; + +pub const REQUESTER: &'static str = "Requester"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl GetBucketMetadataTableConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketMetadataTableConfigurationInputBuilder { - default() - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetadataTableConfigurationOutput { - ///

- /// The metadata table configuration for the general purpose bucket. - ///

- pub get_bucket_metadata_table_configuration_result: Option, } -impl fmt::Debug for GetBucketMetadataTableConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetadataTableConfigurationOutput"); - if let Some(ref val) = self.get_bucket_metadata_table_configuration_result { - d.field("get_bucket_metadata_table_configuration_result", val); - } - d.finish_non_exhaustive() - } +impl From for Payer { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -///

-/// The metadata table configuration for a general purpose bucket. -///

-#[derive(Clone, PartialEq)] -pub struct GetBucketMetadataTableConfigurationResult { - ///

- /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was - /// unable to create the table, this structure contains the error code and error message. - ///

- pub error: Option, - ///

- /// The metadata table configuration for a general purpose bucket. - ///

- pub metadata_table_configuration_result: MetadataTableConfigurationResult, - ///

- /// The status of the metadata table. The status values are: - ///

- ///
    - ///
  • - ///

    - /// CREATING - The metadata table is in the process of being created in the - /// specified table bucket.

    - ///
  • - ///
  • - ///

    - /// ACTIVE - The metadata table has been created successfully and records - /// are being delivered to the table. - ///

    - ///
  • - ///
  • - ///

    - /// FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver - /// records. See ErrorDetails for details.

    - ///
  • - ///
- pub status: MetadataTableStatus, +impl From for Cow<'static, str> { +fn from(s: Payer) -> Self { +s.0 +} } -impl fmt::Debug for GetBucketMetadataTableConfigurationResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetadataTableConfigurationResult"); - if let Some(ref val) = self.error { - d.field("error", val); - } - d.field("metadata_table_configuration_result", &self.metadata_table_configuration_result); - d.field("status", &self.status); - d.finish_non_exhaustive() - } +impl FromStr for Payer { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetricsConfigurationInput { - ///

The name of the bucket containing the metrics configuration to retrieve.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - ///

The ID used to identify the metrics configuration. The ID has a 64 character limit and - /// can only contain letters, numbers, periods, dashes, and underscores.

- pub id: MetricsId, -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Permission(Cow<'static, str>); + +impl Permission { +pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; + +pub const READ: &'static str = "READ"; + +pub const READ_ACP: &'static str = "READ_ACP"; + +pub const WRITE: &'static str = "WRITE"; + +pub const WRITE_ACP: &'static str = "WRITE_ACP"; -impl fmt::Debug for GetBucketMetricsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetricsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl GetBucketMetricsConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketMetricsConfigurationInputBuilder { - default() - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetricsConfigurationOutput { - ///

Specifies the metrics configuration.

- pub metrics_configuration: Option, } -impl fmt::Debug for GetBucketMetricsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetricsConfigurationOutput"); - if let Some(ref val) = self.metrics_configuration { - d.field("metrics_configuration", val); - } - d.finish_non_exhaustive() - } +impl From for Permission { +fn from(s: String) -> Self { +Self(Cow::from(s)) } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketNotificationConfigurationInput { - ///

The name of the bucket for which to get the notification configuration.

- ///

When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

- ///

When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, } -impl fmt::Debug for GetBucketNotificationConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketNotificationConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl From for Cow<'static, str> { +fn from(s: Permission) -> Self { +s.0 } - -impl GetBucketNotificationConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketNotificationConfigurationInputBuilder { - default() - } } -///

A container for specifying the notification configuration of the bucket. If this element -/// is empty, notifications are turned off for the bucket.

-#[derive(Clone, Default, PartialEq)] -pub struct GetBucketNotificationConfigurationOutput { - ///

Enables delivery of events to Amazon EventBridge.

- pub event_bridge_configuration: Option, - ///

Describes the Lambda functions to invoke and the events for which to invoke - /// them.

- pub lambda_function_configurations: Option, - ///

The Amazon Simple Queue Service queues to publish messages to and the events for which - /// to publish messages.

- pub queue_configurations: Option, - ///

The topic to which notifications are sent and the events for which notifications are - /// generated.

- pub topic_configurations: Option, +impl FromStr for Permission { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) } - -impl fmt::Debug for GetBucketNotificationConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketNotificationConfigurationOutput"); - if let Some(ref val) = self.event_bridge_configuration { - d.field("event_bridge_configuration", val); - } - if let Some(ref val) = self.lambda_function_configurations { - d.field("lambda_function_configurations", val); - } - if let Some(ref val) = self.queue_configurations { - d.field("queue_configurations", val); - } - if let Some(ref val) = self.topic_configurations { - d.field("topic_configurations", val); - } - d.finish_non_exhaustive() - } } +pub type Policy = String; + +///

The container element for a bucket's policy status.

#[derive(Clone, Default, PartialEq)] -pub struct GetBucketOwnershipControlsInput { - ///

The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. - ///

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +pub struct PolicyStatus { +///

The policy status for this bucket. TRUE indicates that this bucket is +/// public. FALSE indicates that the bucket is not public.

+ pub is_public: Option, } -impl fmt::Debug for GetBucketOwnershipControlsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketOwnershipControlsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PolicyStatus { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PolicyStatus"); +if let Some(ref val) = self.is_public { +d.field("is_public", val); +} +d.finish_non_exhaustive() +} } -impl GetBucketOwnershipControlsInput { - #[must_use] - pub fn builder() -> builders::GetBucketOwnershipControlsInputBuilder { - default() - } + +#[derive(Default)] +pub struct PostObjectInput { +///

The canned ACL to apply to the object. For more information, see Canned +/// ACL in the Amazon S3 User Guide.

+///

When adding a new object, you can use headers to grant ACL-based permissions to +/// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are +/// then added to the ACL on the object. By default, all objects are private. Only the owner +/// has full access control. For more information, see Access Control List (ACL) Overview +/// and Managing +/// ACLs Using the REST API in the Amazon S3 User Guide.

+///

If the bucket that you're uploading objects to uses the bucket owner enforced setting +/// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that +/// use this setting only accept PUT requests that don't specify an ACL or PUT requests that +/// specify bucket owner full control ACLs, such as the bucket-owner-full-control +/// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that +/// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a +/// 400 error with the error code AccessControlListNotSupported. +/// For more information, see Controlling ownership of +/// objects and disabling ACLs in the Amazon S3 User Guide.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
+ pub acl: Option, +///

Object data.

+ pub body: Option, +///

The bucket name to which the PUT action was initiated.

+///

+/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

+///

+/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

+/// +///

Access points and Object Lambda access points are not supported by directory buckets.

+///
+///

+/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ pub bucket: BucketName, +///

Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

+///

+/// General purpose buckets - Setting this header to +/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with +/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 +/// Bucket Key.

+///

+/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

+ pub bucket_key_enabled: Option, +///

Can be used to specify caching behavior along the request/reply chain. For more +/// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

+ pub cache_control: Option, +///

Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm +/// or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

+///

For the x-amz-checksum-algorithm +/// header, replace +/// algorithm +/// with the supported algorithm from the following list:

+///
    +///
  • +///

    +/// CRC32 +///

    +///
  • +///
  • +///

    +/// CRC32C +///

    +///
  • +///
  • +///

    +/// CRC64NVME +///

    +///
  • +///
  • +///

    +/// SHA1 +///

    +///
  • +///
  • +///

    +/// SHA256 +///

    +///
  • +///
+///

For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

+///

If the individual checksum value you provide through x-amz-checksum-algorithm +/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

+/// +///

The Content-MD5 or x-amz-sdk-checksum-algorithm header is +/// required for any request to upload an object with a retention period configured using +/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the +/// Amazon S3 User Guide.

+///
+///

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

+ pub checksum_algorithm: Option, +///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

+ pub checksum_crc32: Option, +///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

+ pub checksum_crc32c: Option, +///

This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the object. The CRC64NVME checksum is +/// always a full object checksum. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

+ pub checksum_crc64nvme: Option, +///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

+ pub checksum_sha1: Option, +///

This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

+ pub checksum_sha256: Option, +///

Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

+ pub content_disposition: Option, +///

Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

+ pub content_encoding: Option, +///

The language the content is in.

+ pub content_language: Option, +///

Size of the body in bytes. This parameter is useful when the size of the body cannot be +/// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

+ pub content_length: Option, +///

The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to +/// RFC 1864. This header can be used as a message integrity check to verify that the data is +/// the same data that was originally sent. Although it is optional, we recommend using the +/// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST +/// request authentication, see REST Authentication.

+/// +///

The Content-MD5 or x-amz-sdk-checksum-algorithm header is +/// required for any request to upload an object with a retention period configured using +/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the +/// Amazon S3 User Guide.

+///
+/// +///

This functionality is not supported for directory buckets.

+///
+ pub content_md5: Option, +///

A standard MIME type describing the format of the contents. For more information, see +/// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

+ pub content_type: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The date and time at which the object is no longer cacheable. For more information, see +/// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

+ pub expires: Option, +///

Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
+ pub grant_full_control: Option, +///

Allows grantee to read the object data and its metadata.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
+ pub grant_read: Option, +///

Allows grantee to read the object ACL.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
+ pub grant_read_acp: Option, +///

Allows grantee to write the ACL for the applicable object.

+/// +///
    +///
  • +///

    This functionality is not supported for directory buckets.

    +///
  • +///
  • +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///
  • +///
+///
+ pub grant_write_acp: Option, +///

Uploads the object only if the ETag (entity tag) value provided during the WRITE +/// operation matches the ETag of the object in S3. If the ETag values do not match, the +/// operation returns a 412 Precondition Failed error.

+///

If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

+///

Expects the ETag value as a string.

+///

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

+ pub if_match: Option, +///

Uploads the object only if the object key name does not already exist in the bucket +/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

+///

If a conflicting operation occurs during the upload S3 returns a 409 +/// ConditionalRequestConflict response. On a 409 failure you should retry the +/// upload.

+///

Expects the '*' (asterisk) character.

+///

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

+ pub if_none_match: Option, +///

Object key for which the PUT action was initiated.

+ pub key: ObjectKey, +///

A map of metadata to store with the object in S3.

+ pub metadata: Option, +///

Specifies whether a legal hold will be applied to this object. For more information +/// about S3 Object Lock, see Object Lock in the +/// Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_legal_hold_status: Option, +///

The Object Lock mode that you want to apply to this object.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_mode: Option, +///

The date and time when you want this object's Object Lock to expire. Must be formatted +/// as a timestamp parameter.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub object_lock_retain_until_date: Option, + pub request_payer: Option, +///

Specifies the algorithm to use when encrypting the object (for example, +/// AES256).

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_algorithm: Option, +///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key: Option, +///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub sse_customer_key_md5: Option, +///

Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets passed on +/// to Amazon Web Services KMS for future GetObject operations on +/// this object.

+///

+/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

+///

+/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

+ pub ssekms_encryption_context: Option, +///

Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same +/// account that's issuing the command, you must use the full Key ARN not the Key ID.

+///

+/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS +/// key to use. If you specify +/// x-amz-server-side-encryption:aws:kms or +/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key +/// (aws/s3) to protect the data.

+///

+/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the +/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses +/// the bucket's default KMS customer managed key ID. If you want to explicitly set the +/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +/// +/// Incorrect key specification results in an HTTP 400 Bad Request error.

+ pub ssekms_key_id: Option, +///

The server-side encryption algorithm that was used when you store this object in Amazon S3 +/// (for example, AES256, aws:kms, aws:kms:dsse).

+///
    +///
  • +///

    +/// General purpose buckets - You have four mutually +/// exclusive options to protect data using server-side encryption in Amazon S3, depending on +/// how you choose to manage the encryption keys. Specifically, the encryption key +/// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and +/// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by +/// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt +/// data at rest by using server-side encryption with other key options. For more +/// information, see Using Server-Side +/// Encryption in the Amazon S3 User Guide.

    +///
  • +///
  • +///

    +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    +///

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. +/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. +/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and +/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. +///

    +/// +///

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the +/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. +/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), +/// the encryption request headers must match the default encryption configuration of the directory bucket. +/// +///

    +///
    +///
  • +///
+ pub server_side_encryption: Option, +///

By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The +/// STANDARD storage class provides high durability and high availability. Depending on +/// performance needs, you can specify a different Storage Class. For more information, see +/// Storage +/// Classes in the Amazon S3 User Guide.

+/// +///
    +///
  • +///

    For directory buckets, only the S3 Express One Zone storage class is supported to store +/// newly created objects.

    +///
  • +///
  • +///

    Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

    +///
  • +///
+///
+ pub storage_class: Option, +///

The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For +/// example, "Key1=Value1")

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub tagging: Option, + pub version_id: Option, +///

If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata. For information about object metadata, see Object Key and Metadata in the +/// Amazon S3 User Guide.

+///

In the following example, the request header sets the redirect to an object +/// (anotherPage.html) in the same bucket:

+///

+/// x-amz-website-redirect-location: /anotherPage.html +///

+///

In the following example, the request header sets the object redirect to another +/// website:

+///

+/// x-amz-website-redirect-location: http://www.example.com/ +///

+///

For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and +/// How to +/// Configure Website Page Redirects in the Amazon S3 User Guide.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub website_redirect_location: Option, +///

+/// Specifies the offset for appending data to existing objects in bytes. +/// The offset must be equal to the size of the existing object being appended to. +/// If no object exists, setting this header to 0 will create a new object. +///

+/// +///

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

+///
+ pub write_offset_bytes: Option, +/// The URL to which the client is redirected upon successful upload. + pub success_action_redirect: Option, +/// The status code returned to the client upon successful upload. Valid values are 200, 201, and 204. + pub success_action_status: Option, +/// The POST policy document that was included in the request. + pub policy: Option, } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketOwnershipControlsOutput { - ///

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or - /// ObjectWriter) currently in effect for this Amazon S3 bucket.

- pub ownership_controls: Option, +impl fmt::Debug for PostObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PostObjectInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); } - -impl fmt::Debug for GetBucketOwnershipControlsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketOwnershipControlsOutput"); - if let Some(ref val) = self.ownership_controls { - d.field("ownership_controls", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.body { +d.field("body", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyInput { - ///

The bucket name to get the bucket policy for.

- ///

- /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

- ///

- /// Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

- ///

- /// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- /// - ///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

- ///
- pub expected_bucket_owner: Option, +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); } - -impl fmt::Debug for GetBucketPolicyInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketPolicyInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); } - -impl GetBucketPolicyInput { - #[must_use] - pub fn builder() -> builders::GetBucketPolicyInputBuilder { - default() - } +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyOutput { - ///

The bucket policy as a JSON document.

- pub policy: Option, +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); } - -impl fmt::Debug for GetBucketPolicyOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketPolicyOutput"); - if let Some(ref val) = self.policy { - d.field("policy", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyStatusInput { - ///

The name of the Amazon S3 bucket whose policy status you want to retrieve.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); } - -impl fmt::Debug for GetBucketPolicyStatusInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketPolicyStatusInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); } - -impl GetBucketPolicyStatusInput { - #[must_use] - pub fn builder() -> builders::GetBucketPolicyStatusInputBuilder { - default() - } +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyStatusOutput { - ///

The policy status for the specified bucket.

- pub policy_status: Option, +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); } - -impl fmt::Debug for GetBucketPolicyStatusOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketPolicyStatusOutput"); - if let Some(ref val) = self.policy_status { - d.field("policy_status", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketReplicationInput { - ///

The bucket name for which to get the replication information.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +if let Some(ref val) = self.content_language { +d.field("content_language", val); } - -impl fmt::Debug for GetBucketReplicationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketReplicationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.content_length { +d.field("content_length", val); } - -impl GetBucketReplicationInput { - #[must_use] - pub fn builder() -> builders::GetBucketReplicationInputBuilder { - default() - } +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketReplicationOutput { - pub replication_configuration: Option, +if let Some(ref val) = self.content_type { +d.field("content_type", val); } - -impl fmt::Debug for GetBucketReplicationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketReplicationOutput"); - if let Some(ref val) = self.replication_configuration { - d.field("replication_configuration", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketRequestPaymentInput { - ///

The name of the bucket for which to get the payment request configuration

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +if let Some(ref val) = self.expires { +d.field("expires", val); } - -impl fmt::Debug for GetBucketRequestPaymentInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketRequestPaymentInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); } - -impl GetBucketRequestPaymentInput { - #[must_use] - pub fn builder() -> builders::GetBucketRequestPaymentInputBuilder { - default() - } +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketRequestPaymentOutput { - ///

Specifies who pays for the download and request fees.

- pub payer: Option, +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); } - -impl fmt::Debug for GetBucketRequestPaymentOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketRequestPaymentOutput"); - if let Some(ref val) = self.payer { - d.field("payer", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketTaggingInput { - ///

The name of the bucket for which to get the tagging information.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +if let Some(ref val) = self.if_match { +d.field("if_match", val); } - -impl fmt::Debug for GetBucketTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); } - -impl GetBucketTaggingInput { - #[must_use] - pub fn builder() -> builders::GetBucketTaggingInputBuilder { - default() - } +d.field("key", &self.key); +if let Some(ref val) = self.metadata { +d.field("metadata", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketTaggingOutput { - ///

Contains the tag set.

- pub tag_set: TagSet, +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); } - -impl fmt::Debug for GetBucketTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketTaggingOutput"); - d.field("tag_set", &self.tag_set); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketVersioningInput { - ///

The name of the bucket for which to get the versioning information.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); } - -impl fmt::Debug for GetBucketVersioningInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketVersioningInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); } - -impl GetBucketVersioningInput { - #[must_use] - pub fn builder() -> builders::GetBucketVersioningInputBuilder { - default() - } +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketVersioningOutput { - ///

Specifies whether MFA delete is enabled in the bucket versioning configuration. This - /// element is only returned if the bucket has been configured with MFA delete. If the bucket - /// has never been so configured, this element is not returned.

- pub mfa_delete: Option, - ///

The versioning state of the bucket.

- pub status: Option, +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); } - -impl fmt::Debug for GetBucketVersioningOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketVersioningOutput"); - if let Some(ref val) = self.mfa_delete { - d.field("mfa_delete", val); - } - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketWebsiteInput { - ///

The bucket name for which to get the website configuration.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); } - -impl fmt::Debug for GetBucketWebsiteInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketWebsiteInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); } - -impl GetBucketWebsiteInput { - #[must_use] - pub fn builder() -> builders::GetBucketWebsiteInputBuilder { - default() - } +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketWebsiteOutput { - ///

The object key name of the website error document to use for 4XX class errors.

- pub error_document: Option, - ///

The name of the index document for the website (for example - /// index.html).

- pub index_document: Option, - ///

Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 - /// bucket.

- pub redirect_all_requests_to: Option, - ///

Rules that define when a redirect is applied and the redirect behavior.

- pub routing_rules: Option, +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); } - -impl fmt::Debug for GetBucketWebsiteOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketWebsiteOutput"); - if let Some(ref val) = self.error_document { - d.field("error_document", val); - } - if let Some(ref val) = self.index_document { - d.field("index_document", val); - } - if let Some(ref val) = self.redirect_all_requests_to { - d.field("redirect_all_requests_to", val); - } - if let Some(ref val) = self.routing_rules { - d.field("routing_rules", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.tagging { +d.field("tagging", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAclInput { - ///

The bucket name that contains the object for which to get the ACL information.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - ///

The key of the object for which to get the ACL information.

- pub key: ObjectKey, - pub request_payer: Option, - ///

Version ID used to reference a specific version of the object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub version_id: Option, +if let Some(ref val) = self.version_id { +d.field("version_id", val); } - -impl fmt::Debug for GetObjectAclInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAclInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); } - -impl GetObjectAclInput { - #[must_use] - pub fn builder() -> builders::GetObjectAclInputBuilder { - default() - } +if let Some(ref val) = self.write_offset_bytes { +d.field("write_offset_bytes", val); +} +if let Some(ref val) = self.success_action_redirect { +d.field("success_action_redirect", val); +} +if let Some(ref val) = self.success_action_status { +d.field("success_action_status", val); +} +if let Some(ref val) = self.policy { +d.field("policy", val); +} +d.finish_non_exhaustive() } - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAclOutput { - ///

A list of grants.

- pub grants: Option, - ///

Container for the bucket owner's display name and ID.

- pub owner: Option, - pub request_charged: Option, } -impl fmt::Debug for GetObjectAclOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAclOutput"); - if let Some(ref val) = self.grants { - d.field("grants", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +impl PostObjectInput { +#[must_use] +pub fn builder() -> builders::PostObjectInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesInput { - ///

The name of the bucket that contains the object.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - ///

The object key.

- pub key: ObjectKey, - ///

Sets the maximum number of parts to return.

- pub max_parts: Option, - ///

Specifies the fields at the root level that you want returned in the response. Fields - /// that you do not specify are not returned.

- pub object_attributes: ObjectAttributesList, - ///

Specifies the part after which listing should begin. Only parts with higher part numbers - /// will be listed.

- pub part_number_marker: Option, - pub request_payer: Option, - ///

Specifies the algorithm to use when encrypting the object (for example, AES256).

- /// - ///

This functionality is not supported for directory buckets.

- ///
+pub struct PostObjectOutput { +///

Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

+ pub bucket_key_enabled: Option, +///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32: Option, +///

The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_crc32c: Option, +///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header +/// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it +/// was uploaded without a checksum (and Amazon S3 added the default checksum, +/// CRC64NVME, to the uploaded object). For more information about how +/// checksums are calculated with multipart uploads, see Checking object integrity +/// in the Amazon S3 User Guide.

+ pub checksum_crc64nvme: Option, +///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha1: Option, +///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_sha256: Option, +///

This header specifies the checksum type of the object, which determines how part-level +/// checksums are combined to create an object-level checksum for multipart objects. For +/// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a +/// data integrity check to verify that the checksum type that is received is the same checksum +/// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

+ pub checksum_type: Option, +///

Entity tag for the uploaded object.

+///

+/// General purpose buckets - To ensure that data is not +/// corrupted traversing the network, for objects where the ETag is the MD5 digest of the +/// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned +/// ETag to the calculated MD5 value.

+///

+/// Directory buckets - The ETag for the object in +/// a directory bucket isn't the MD5 digest of the object.

+ pub e_tag: Option, +///

If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, +/// the response includes this header. It includes the expiry-date and +/// rule-id key-value pairs that provide information about object expiration. +/// The value of the rule-id is URL-encoded.

+/// +///

Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

+///
+ pub expiration: Option, + pub request_charged: Option, +///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_algorithm: Option, - ///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_key: Option, - ///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

- /// - ///

This functionality is not supported for directory buckets.

- ///
+///

If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

+/// +///

This functionality is not supported for directory buckets.

+///
pub sse_customer_key_md5: Option, - ///

The version ID used to reference a specific version of the object.

- /// - ///

S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the - /// versionId query parameter in the request.

- ///
+///

If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets +/// passed on to Amazon Web Services KMS for future GetObject +/// operations on this object.

+ pub ssekms_encryption_context: Option, +///

If present, indicates the ID of the KMS key that was used for object encryption.

+ pub ssekms_key_id: Option, +///

The server-side encryption algorithm used when you store this object in Amazon S3.

+ pub server_side_encryption: Option, +///

+/// The size of the object in bytes. This value is only be present if you append to an object. +///

+/// +///

This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

+///
+ pub size: Option, +///

Version ID of the object.

+///

If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID +/// for the object being stored. Amazon S3 returns this ID in the response. When you enable +/// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object +/// simultaneously, it stores all of the objects. For more information about versioning, see +/// Adding Objects to +/// Versioning-Enabled Buckets in the Amazon S3 User Guide. For +/// information about returning the versioning state of a bucket, see GetBucketVersioning.

+/// +///

This functionality is not supported for directory buckets.

+///
pub version_id: Option, } -impl fmt::Debug for GetObjectAttributesInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAttributesInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.max_parts { - d.field("max_parts", val); - } - d.field("object_attributes", &self.object_attributes); - if let Some(ref val) = self.part_number_marker { - d.field("part_number_marker", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PostObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PostObjectOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); } - -impl GetObjectAttributesInput { - #[must_use] - pub fn builder() -> builders::GetObjectAttributesInputBuilder { - default() - } +if let Some(ref val) = self.size { +d.field("size", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesOutput { - ///

The checksum or digest of the object.

- pub checksum: Option, - ///

Specifies whether the object retrieved was (true) or was not - /// (false) a delete marker. If false, this response header does - /// not appear in the response. To learn more about delete markers, see Working with delete markers.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub delete_marker: Option, - ///

An ETag is an opaque identifier assigned by a web server to a specific version of a - /// resource found at a URL.

- pub e_tag: Option, - ///

Date and time when the object was last modified.

- pub last_modified: Option, - ///

A collection of parts associated with a multipart upload.

- pub object_parts: Option, - ///

The size of the object in bytes.

- pub object_size: Option, - pub request_charged: Option, - ///

Provides the storage class information of the object. Amazon S3 returns this header for all - /// objects except for S3 Standard storage class objects.

- ///

For more information, see Storage Classes.

- /// - ///

- /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

- ///
- pub storage_class: Option, - ///

The version ID of the object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub version_id: Option, +if let Some(ref val) = self.version_id { +d.field("version_id", val); } - -impl fmt::Debug for GetObjectAttributesOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAttributesOutput"); - if let Some(ref val) = self.checksum { - d.field("checksum", val); - } - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.object_parts { - d.field("object_parts", val); - } - if let Some(ref val) = self.object_size { - d.field("object_size", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +d.finish_non_exhaustive() } - -///

A collection of parts associated with a multipart upload.

-#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesParts { - ///

Indicates whether the returned list of parts is truncated. A value of true - /// indicates that the list was truncated. A list can be truncated if the number of parts - /// exceeds the limit returned in the MaxParts element.

- pub is_truncated: Option, - ///

The maximum number of parts allowed in the response.

- pub max_parts: Option, - ///

When a list is truncated, this element specifies the last part in the list, as well as - /// the value to use for the PartNumberMarker request parameter in a subsequent - /// request.

- pub next_part_number_marker: Option, - ///

The marker for the current part.

- pub part_number_marker: Option, - ///

A container for elements related to a particular part. A response can contain zero or - /// more Parts elements.

- /// - ///
    - ///
  • - ///

    - /// General purpose buckets - For - /// GetObjectAttributes, if a additional checksum (including - /// x-amz-checksum-crc32, x-amz-checksum-crc32c, - /// x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't - /// applied to the object specified in the request, the response doesn't return - /// Part.

    - ///
  • - ///
  • - ///

    - /// Directory buckets - For - /// GetObjectAttributes, no matter whether a additional checksum is - /// applied to the object specified in the request, the response returns - /// Part.

    - ///
  • - ///
- ///
- pub parts: Option, - ///

The total number of parts.

- pub total_parts_count: Option, } -impl fmt::Debug for GetObjectAttributesParts { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAttributesParts"); - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.max_parts { - d.field("max_parts", val); - } - if let Some(ref val) = self.next_part_number_marker { - d.field("next_part_number_marker", val); - } - if let Some(ref val) = self.part_number_marker { - d.field("part_number_marker", val); - } - if let Some(ref val) = self.parts { - d.field("parts", val); - } - if let Some(ref val) = self.total_parts_count { - d.field("total_parts_count", val); - } - d.finish_non_exhaustive() - } -} +pub type Prefix = String; + +pub type Priority = i32; + +///

This data type contains information about progress of an operation.

#[derive(Clone, Default, PartialEq)] -pub struct GetObjectInput { - ///

The bucket name containing the object.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- ///

- /// Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

- pub bucket: BucketName, - ///

To retrieve the checksum, this mode must be enabled.

- pub checksum_mode: Option, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - ///

Return the object only if its entity tag (ETag) is the same as the one specified in this - /// header; otherwise, return a 412 Precondition Failed error.

- ///

If both of the If-Match and If-Unmodified-Since headers are - /// present in the request as follows: If-Match condition evaluates to - /// true, and; If-Unmodified-Since condition evaluates to - /// false; then, S3 returns 200 OK and the data requested.

- ///

For more information about conditional requests, see RFC 7232.

- pub if_match: Option, - ///

Return the object only if it has been modified since the specified time; otherwise, - /// return a 304 Not Modified error.

- ///

If both of the If-None-Match and If-Modified-Since headers are - /// present in the request as follows: If-None-Match condition evaluates to - /// false, and; If-Modified-Since condition evaluates to - /// true; then, S3 returns 304 Not Modified status code.

- ///

For more information about conditional requests, see RFC 7232.

- pub if_modified_since: Option, - ///

Return the object only if its entity tag (ETag) is different from the one specified in - /// this header; otherwise, return a 304 Not Modified error.

- ///

If both of the If-None-Match and If-Modified-Since headers are - /// present in the request as follows: If-None-Match condition evaluates to - /// false, and; If-Modified-Since condition evaluates to - /// true; then, S3 returns 304 Not Modified HTTP status - /// code.

- ///

For more information about conditional requests, see RFC 7232.

- pub if_none_match: Option, - ///

Return the object only if it has not been modified since the specified time; otherwise, - /// return a 412 Precondition Failed error.

- ///

If both of the If-Match and If-Unmodified-Since headers are - /// present in the request as follows: If-Match condition evaluates to - /// true, and; If-Unmodified-Since condition evaluates to - /// false; then, S3 returns 200 OK and the data requested.

- ///

For more information about conditional requests, see RFC 7232.

- pub if_unmodified_since: Option, - ///

Key of the object to get.

- pub key: ObjectKey, - ///

Part number of the object being read. This is a positive integer between 1 and 10,000. - /// Effectively performs a 'ranged' GET request for the part specified. Useful for downloading - /// just a part of an object.

- pub part_number: Option, - ///

Downloads the specified byte range of an object. For more information about the HTTP - /// Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

- /// - ///

Amazon S3 doesn't support retrieving multiple ranges of data per GET - /// request.

- ///
- pub range: Option, - pub request_payer: Option, - ///

Sets the Cache-Control header of the response.

- pub response_cache_control: Option, - ///

Sets the Content-Disposition header of the response.

- pub response_content_disposition: Option, - ///

Sets the Content-Encoding header of the response.

- pub response_content_encoding: Option, - ///

Sets the Content-Language header of the response.

- pub response_content_language: Option, - ///

Sets the Content-Type header of the response.

- pub response_content_type: Option, - ///

Sets the Expires header of the response.

- pub response_expires: Option, - ///

Specifies the algorithm to use when decrypting the object (for example, - /// AES256).

- ///

If you encrypt an object by using server-side encryption with customer-provided - /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, - /// you must use the following headers:

- ///
    - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-algorithm - ///

    - ///
  • - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-key - ///

    - ///
  • - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-key-MD5 - ///

    - ///
  • - ///
- ///

For more information about SSE-C, see Server-Side Encryption - /// (Using Customer-Provided Encryption Keys) in the - /// Amazon S3 User Guide.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_algorithm: Option, - ///

Specifies the customer-provided encryption key that you originally provided for Amazon S3 to - /// encrypt the data before storing it. This value is used to decrypt the object when - /// recovering it and must match the one used when storing the data. The key must be - /// appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

- ///

If you encrypt an object by using server-side encryption with customer-provided - /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, - /// you must use the following headers:

- ///
    - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-algorithm - ///

    - ///
  • - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-key - ///

    - ///
  • - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-key-MD5 - ///

    - ///
  • - ///
- ///

For more information about SSE-C, see Server-Side Encryption - /// (Using Customer-Provided Encryption Keys) in the - /// Amazon S3 User Guide.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_key: Option, - ///

Specifies the 128-bit MD5 digest of the customer-provided encryption key according to - /// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption - /// key was transmitted without error.

- ///

If you encrypt an object by using server-side encryption with customer-provided - /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, - /// you must use the following headers:

- ///
    - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-algorithm - ///

    - ///
  • - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-key - ///

    - ///
  • - ///
  • - ///

    - /// x-amz-server-side-encryption-customer-key-MD5 - ///

    - ///
  • - ///
- ///

For more information about SSE-C, see Server-Side Encryption - /// (Using Customer-Provided Encryption Keys) in the - /// Amazon S3 User Guide.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_key_md5: Option, - ///

Version ID used to reference a specific version of the object.

- ///

By default, the GetObject operation returns the current version of an - /// object. To return a different version, use the versionId subresource.

- /// - ///
    - ///
  • - ///

    If you include a versionId in your request header, you must have - /// the s3:GetObjectVersion permission to access a specific version of an - /// object. The s3:GetObject permission is not required in this - /// scenario.

    - ///
  • - ///
  • - ///

    If you request the current version of an object without a specific - /// versionId in the request header, only the - /// s3:GetObject permission is required. The - /// s3:GetObjectVersion permission is not required in this - /// scenario.

    - ///
  • - ///
  • - ///

    - /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the - /// versionId query parameter in the request.

    - ///
  • - ///
- ///
- ///

For more information about versioning, see PutBucketVersioning.

- pub version_id: Option, +pub struct Progress { +///

The current number of uncompressed object bytes processed.

+ pub bytes_processed: Option, +///

The current number of bytes of records payload data returned.

+ pub bytes_returned: Option, +///

The current number of object bytes scanned.

+ pub bytes_scanned: Option, } -impl fmt::Debug for GetObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_mode { - d.field("checksum_mode", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_modified_since { - d.field("if_modified_since", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - if let Some(ref val) = self.if_unmodified_since { - d.field("if_unmodified_since", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - if let Some(ref val) = self.range { - d.field("range", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.response_cache_control { - d.field("response_cache_control", val); - } - if let Some(ref val) = self.response_content_disposition { - d.field("response_content_disposition", val); - } - if let Some(ref val) = self.response_content_encoding { - d.field("response_content_encoding", val); - } - if let Some(ref val) = self.response_content_language { - d.field("response_content_language", val); - } - if let Some(ref val) = self.response_content_type { - d.field("response_content_type", val); - } - if let Some(ref val) = self.response_expires { - d.field("response_expires", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for Progress { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Progress"); +if let Some(ref val) = self.bytes_processed { +d.field("bytes_processed", val); } - -impl GetObjectInput { - #[must_use] - pub fn builder() -> builders::GetObjectInputBuilder { - default() - } +if let Some(ref val) = self.bytes_returned { +d.field("bytes_returned", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLegalHoldInput { - ///

The bucket name containing the object whose legal hold status you want to retrieve.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - ///

The key name for the object whose legal hold status you want to retrieve.

- pub key: ObjectKey, - pub request_payer: Option, - ///

The version ID of the object whose legal hold status you want to retrieve.

- pub version_id: Option, +if let Some(ref val) = self.bytes_scanned { +d.field("bytes_scanned", val); } - -impl fmt::Debug for GetObjectLegalHoldInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectLegalHoldInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +d.finish_non_exhaustive() } - -impl GetObjectLegalHoldInput { - #[must_use] - pub fn builder() -> builders::GetObjectLegalHoldInputBuilder { - default() - } } + +///

This data type contains information about the progress event of an operation.

#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLegalHoldOutput { - ///

The current legal hold status for the specified object.

- pub legal_hold: Option, +pub struct ProgressEvent { +///

The Progress event details.

+ pub details: Option, } -impl fmt::Debug for GetObjectLegalHoldOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectLegalHoldOutput"); - if let Some(ref val) = self.legal_hold { - d.field("legal_hold", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for ProgressEvent { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ProgressEvent"); +if let Some(ref val) = self.details { +d.field("details", val); +} +d.finish_non_exhaustive() +} } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLockConfigurationInput { - ///

The bucket whose Object Lock configuration you want to retrieve.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Protocol(Cow<'static, str>); + +impl Protocol { +pub const HTTP: &'static str = "http"; + +pub const HTTPS: &'static str = "https"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl fmt::Debug for GetObjectLockConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectLockConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl GetObjectLockConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetObjectLockConfigurationInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLockConfigurationOutput { - ///

The specified bucket's Object Lock configuration.

- pub object_lock_configuration: Option, +impl From for Protocol { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -impl fmt::Debug for GetObjectLockConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectLockConfigurationOutput"); - if let Some(ref val) = self.object_lock_configuration { - d.field("object_lock_configuration", val); - } - d.finish_non_exhaustive() - } +impl From for Cow<'static, str> { +fn from(s: Protocol) -> Self { +s.0 +} } -#[derive(Default)] -pub struct GetObjectOutput { - ///

Indicates that a range of bytes was specified in the request.

- pub accept_ranges: Option, - ///

Object data.

- pub body: Option, - ///

Indicates whether the object uses an S3 Bucket Key for server-side encryption with - /// Key Management Service (KMS) keys (SSE-KMS).

- pub bucket_key_enabled: Option, - ///

Specifies caching behavior along the request/reply chain.

- pub cache_control: Option, - ///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

- pub checksum_crc32: Option, - ///

The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

- pub checksum_crc32c: Option, - ///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more - /// information, see Checking object integrity - /// in the Amazon S3 User Guide.

- pub checksum_crc64nvme: Option, - ///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

- pub checksum_sha1: Option, - ///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

- pub checksum_sha256: Option, - ///

The checksum type, which determines how part-level checksums are combined to create an - /// object-level checksum for multipart objects. You can use this header response to verify - /// that the checksum type that is received is the same checksum type that was specified in the - /// CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

- pub checksum_type: Option, - ///

Specifies presentational information for the object.

- pub content_disposition: Option, - ///

Indicates what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

- pub content_encoding: Option, - ///

The language the content is in.

- pub content_language: Option, - ///

Size of the body in bytes.

- pub content_length: Option, - ///

The portion of the object returned in the response.

- pub content_range: Option, - ///

A standard MIME type describing the format of the object data.

- pub content_type: Option, - ///

Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If - /// false, this response header does not appear in the response.

- /// - ///
    - ///
  • - ///

    If the current version of the object is a delete marker, Amazon S3 behaves as if the - /// object was deleted and includes x-amz-delete-marker: true in the - /// response.

    - ///
  • - ///
  • - ///

    If the specified version in the request is a delete marker, the response - /// returns a 405 Method Not Allowed error and the Last-Modified: - /// timestamp response header.

    - ///
  • - ///
- ///
- pub delete_marker: Option, - ///

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific - /// version of a resource found at a URL.

- pub e_tag: Option, - ///

If the object expiration is configured (see - /// PutBucketLifecycleConfiguration - /// ), the response includes this - /// header. It includes the expiry-date and rule-id key-value pairs - /// providing object expiration information. The value of the rule-id is - /// URL-encoded.

- /// - ///

Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

- ///
- pub expiration: Option, - ///

The date and time at which the object is no longer cacheable.

- pub expires: Option, - ///

Date and time when the object was last modified.

- ///

- /// General purpose buckets - When you specify a - /// versionId of the object in your request, if the specified version in the - /// request is a delete marker, the response returns a 405 Method Not Allowed - /// error and the Last-Modified: timestamp response header.

- pub last_modified: Option, - ///

A map of metadata to store with the object in S3.

- pub metadata: Option, - ///

This is set to the number of metadata entries not returned in the headers that are - /// prefixed with x-amz-meta-. This can happen if you create metadata using an API - /// like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, - /// you can create metadata whose values are not legal HTTP headers.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub missing_meta: Option, - ///

Indicates whether this object has an active legal hold. This field is only returned if - /// you have permission to view an object's legal hold status.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub object_lock_legal_hold_status: Option, - ///

The Object Lock mode that's currently in place for this object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub object_lock_mode: Option, - ///

The date and time when this object's Object Lock will expire.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub object_lock_retain_until_date: Option, - ///

The count of parts this object has. This value is only returned if you specify - /// partNumber in your request and the object was uploaded as a multipart - /// upload.

- pub parts_count: Option, - ///

Amazon S3 can return this if your request involves a bucket that is either a source or - /// destination in a replication rule.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub replication_status: Option, - pub request_charged: Option, - ///

Provides information about object restoration action and expiration time of the restored - /// object copy.

- /// - ///

This functionality is not supported for directory buckets. - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

- ///
- pub restore: Option, - ///

If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_algorithm: Option, - ///

If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_key_md5: Option, - ///

If present, indicates the ID of the KMS key that was used for object encryption.

- pub ssekms_key_id: Option, - ///

The server-side encryption algorithm used when you store this object in Amazon S3.

- pub server_side_encryption: Option, - ///

Provides storage class information of the object. Amazon S3 returns this header for all - /// objects except for S3 Standard storage class objects.

- /// - ///

- /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

- ///
- pub storage_class: Option, - ///

The number of tags, if any, on the object, when you have the relevant permission to read - /// object tags.

- ///

You can use GetObjectTagging to retrieve - /// the tag set associated with an object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub tag_count: Option, - ///

Version ID of the object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub version_id: Option, - ///

If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub website_redirect_location: Option, +impl FromStr for Protocol { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -impl fmt::Debug for GetObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectOutput"); - if let Some(ref val) = self.accept_ranges { - d.field("accept_ranges", val); - } - if let Some(ref val) = self.body { - d.field("body", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_range { - d.field("content_range", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.missing_meta { - d.field("missing_meta", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.parts_count { - d.field("parts_count", val); - } - if let Some(ref val) = self.replication_status { - d.field("replication_status", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.restore { - d.field("restore", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tag_count { - d.field("tag_count", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - d.finish_non_exhaustive() - } +///

The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can +/// enable the configuration options in any combination. For more information about when Amazon S3 +/// considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

+#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct PublicAccessBlockConfiguration { +///

Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket +/// and objects in this bucket. Setting this element to TRUE causes the following +/// behavior:

+///
    +///
  • +///

    PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is +/// public.

    +///
  • +///
  • +///

    PUT Object calls fail if the request includes a public ACL.

    +///
  • +///
  • +///

    PUT Bucket calls fail if the request includes a public ACL.

    +///
  • +///
+///

Enabling this setting doesn't affect existing policies or ACLs.

+ pub block_public_acls: Option, +///

Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this +/// element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the +/// specified bucket policy allows public access.

+///

Enabling this setting doesn't affect existing bucket policies.

+ pub block_public_policy: Option, +///

Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this +/// bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on +/// this bucket and objects in this bucket.

+///

Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't +/// prevent new public ACLs from being set.

+ pub ignore_public_acls: Option, +///

Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting +/// this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has +/// a public policy.

+///

Enabling this setting doesn't affect previously stored bucket policies, except that +/// public and cross-account access within any public bucket policy, including non-public +/// delegation to specific accounts, is blocked.

+ pub restrict_public_buckets: Option, } -pub type GetObjectResponseStatusCode = i32; - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectRetentionInput { - ///

The bucket name containing the object whose retention settings you want to retrieve.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, - ///

The key name for the object whose retention settings you want to retrieve.

- pub key: ObjectKey, - pub request_payer: Option, - ///

The version ID for the object whose retention settings you want to retrieve.

- pub version_id: Option, +impl fmt::Debug for PublicAccessBlockConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PublicAccessBlockConfiguration"); +if let Some(ref val) = self.block_public_acls { +d.field("block_public_acls", val); } - -impl fmt::Debug for GetObjectRetentionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectRetentionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.block_public_policy { +d.field("block_public_policy", val); } - -impl GetObjectRetentionInput { - #[must_use] - pub fn builder() -> builders::GetObjectRetentionInputBuilder { - default() - } +if let Some(ref val) = self.ignore_public_acls { +d.field("ignore_public_acls", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectRetentionOutput { - ///

The container element for an object's retention settings.

- pub retention: Option, +if let Some(ref val) = self.restrict_public_buckets { +d.field("restrict_public_buckets", val); +} +d.finish_non_exhaustive() } - -impl fmt::Debug for GetObjectRetentionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectRetentionOutput"); - if let Some(ref val) = self.retention { - d.field("retention", val); - } - d.finish_non_exhaustive() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTaggingInput { - ///

The bucket name containing the object for which to get the tagging information.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ +#[derive(Clone, PartialEq)] +pub struct PutBucketAccelerateConfigurationInput { +///

Container for setting the transfer acceleration state.

+ pub accelerate_configuration: AccelerateConfiguration, +///

The name of the bucket for which the accelerate configuration is set.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

+///

If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

+ pub checksum_algorithm: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

Object key for which to get the tagging information.

- pub key: ObjectKey, - pub request_payer: Option, - ///

The versionId of the object for which to get the tagging information.

- pub version_id: Option, } -impl fmt::Debug for GetObjectTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketAccelerateConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAccelerateConfigurationInput"); +d.field("accelerate_configuration", &self.accelerate_configuration); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } -impl GetObjectTaggingInput { - #[must_use] - pub fn builder() -> builders::GetObjectTaggingInputBuilder { - default() - } +impl PutBucketAccelerateConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketAccelerateConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct GetObjectTaggingOutput { - ///

Contains the tag set.

- pub tag_set: TagSet, - ///

The versionId of the object for which you got the tagging information.

- pub version_id: Option, +pub struct PutBucketAccelerateConfigurationOutput { } -impl fmt::Debug for GetObjectTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectTaggingOutput"); - d.field("tag_set", &self.tag_set); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketAccelerateConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAccelerateConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] -pub struct GetObjectTorrentInput { - ///

The name of the bucket containing the object for which to get the torrent files.

+pub struct PutBucketAclInput { +///

The canned ACL to apply to the bucket.

+ pub acl: Option, +///

Contains the elements that set the ACL permissions for an object per grantee.

+ pub access_control_policy: Option, +///

The bucket to which to apply the ACL.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

+///

If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

+ pub checksum_algorithm: Option, +///

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, go to RFC +/// 1864. +///

+///

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

+ pub content_md5: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

The object key for which to get the information.

- pub key: ObjectKey, - pub request_payer: Option, +///

Allows grantee the read, write, read ACP, and write ACP permissions on the +/// bucket.

+ pub grant_full_control: Option, +///

Allows grantee to list the objects in the bucket.

+ pub grant_read: Option, +///

Allows grantee to read the bucket ACL.

+ pub grant_read_acp: Option, +///

Allows grantee to create new objects in the bucket.

+///

For the bucket and object owners of existing objects, also allows deletions and +/// overwrites of those objects.

+ pub grant_write: Option, +///

Allows grantee to write the ACL for the applicable bucket.

+ pub grant_write_acp: Option, } -impl fmt::Debug for GetObjectTorrentInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectTorrentInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketAclInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAclInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); } - -impl GetObjectTorrentInput { - #[must_use] - pub fn builder() -> builders::GetObjectTorrentInputBuilder { - default() - } +if let Some(ref val) = self.access_control_policy { +d.field("access_control_policy", val); } - -#[derive(Default)] -pub struct GetObjectTorrentOutput { - ///

A Bencoded dictionary as defined by the BitTorrent specification

- pub body: Option, - pub request_charged: Option, +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); } - -impl fmt::Debug for GetObjectTorrentOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectTorrentOutput"); - if let Some(ref val) = self.body { - d.field("body", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetPublicAccessBlockInput { - ///

The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want - /// to retrieve.

- pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

- pub expected_bucket_owner: Option, +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); } - -impl fmt::Debug for GetPublicAccessBlockInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetPublicAccessBlockInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); } - -impl GetPublicAccessBlockInput { - #[must_use] - pub fn builder() -> builders::GetPublicAccessBlockInputBuilder { - default() - } +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct GetPublicAccessBlockOutput { - ///

The PublicAccessBlock configuration currently in effect for this Amazon S3 - /// bucket.

- pub public_access_block_configuration: Option, +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); } - -impl fmt::Debug for GetPublicAccessBlockOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetPublicAccessBlockOutput"); - if let Some(ref val) = self.public_access_block_configuration { - d.field("public_access_block_configuration", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.grant_write { +d.field("grant_write", val); } - -///

Container for S3 Glacier job parameters.

-#[derive(Clone, PartialEq)] -pub struct GlacierJobParameters { - ///

Retrieval tier at which the restore will be processed.

- pub tier: Tier, +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); } - -impl fmt::Debug for GlacierJobParameters { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GlacierJobParameters"); - d.field("tier", &self.tier); - d.finish_non_exhaustive() - } +d.finish_non_exhaustive() } - -///

Container for grant information.

-#[derive(Clone, Default, PartialEq)] -pub struct Grant { - ///

The person being granted permissions.

- pub grantee: Option, - ///

Specifies the permission given to the grantee.

- pub permission: Option, } -impl fmt::Debug for Grant { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Grant"); - if let Some(ref val) = self.grantee { - d.field("grantee", val); - } - if let Some(ref val) = self.permission { - d.field("permission", val); - } - d.finish_non_exhaustive() - } +impl PutBucketAclInput { +#[must_use] +pub fn builder() -> builders::PutBucketAclInputBuilder { +default() +} } -pub type GrantFullControl = String; - -pub type GrantRead = String; - -pub type GrantReadACP = String; - -pub type GrantWrite = String; - -pub type GrantWriteACP = String; - -///

Container for the person being granted permissions.

-#[derive(Clone, PartialEq)] -pub struct Grantee { - ///

Screen name of the grantee.

- pub display_name: Option, - ///

Email address of the grantee.

- /// - ///

Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

- ///
    - ///
  • - ///

    US East (N. Virginia)

    - ///
  • - ///
  • - ///

    US West (N. California)

    - ///
  • - ///
  • - ///

    US West (Oregon)

    - ///
  • - ///
  • - ///

    Asia Pacific (Singapore)

    - ///
  • - ///
  • - ///

    Asia Pacific (Sydney)

    - ///
  • - ///
  • - ///

    Asia Pacific (Tokyo)

    - ///
  • - ///
  • - ///

    Europe (Ireland)

    - ///
  • - ///
  • - ///

    South America (São Paulo)

    - ///
  • - ///
- ///

For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

- ///
- pub email_address: Option, - ///

The canonical user ID of the grantee.

- pub id: Option, - ///

Type of grantee

- pub type_: Type, - ///

URI of the grantee group.

- pub uri: Option, +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAclOutput { } -impl fmt::Debug for Grantee { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Grantee"); - if let Some(ref val) = self.display_name { - d.field("display_name", val); - } - if let Some(ref val) = self.email_address { - d.field("email_address", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.field("type_", &self.type_); - if let Some(ref val) = self.uri { - d.field("uri", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketAclOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAclOutput"); +d.finish_non_exhaustive() +} } -pub type Grants = List; -#[derive(Clone, Default, PartialEq)] -pub struct HeadBucketInput { - ///

The bucket name.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- ///

- /// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+#[derive(Clone, PartialEq)] +pub struct PutBucketAnalyticsConfigurationInput { +///

The configuration and any analyses for the analytics filter.

+ pub analytics_configuration: AnalyticsConfiguration, +///

The name of the bucket to which an analytics configuration is stored.

pub bucket: BucketName, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, +///

The ID that identifies the analytics configuration.

+ pub id: AnalyticsId, } -impl fmt::Debug for HeadBucketInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("HeadBucketInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketAnalyticsConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAnalyticsConfigurationInput"); +d.field("analytics_configuration", &self.analytics_configuration); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} } -impl HeadBucketInput { - #[must_use] - pub fn builder() -> builders::HeadBucketInputBuilder { - default() - } +impl PutBucketAnalyticsConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketAnalyticsConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct HeadBucketOutput { - ///

Indicates whether the bucket name used in the request is an access point alias.

- /// - ///

For directory buckets, the value of this field is false.

- ///
- pub access_point_alias: Option, - ///

The name of the location where the bucket will be created.

- ///

For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

- /// - ///

This functionality is only supported by directory buckets.

- ///
- pub bucket_location_name: Option, - ///

The type of location where the bucket is created.

- /// - ///

This functionality is only supported by directory buckets.

- ///
- pub bucket_location_type: Option, - ///

The Region that the bucket is located.

- pub bucket_region: Option, +pub struct PutBucketAnalyticsConfigurationOutput { } -impl fmt::Debug for HeadBucketOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("HeadBucketOutput"); - if let Some(ref val) = self.access_point_alias { - d.field("access_point_alias", val); - } - if let Some(ref val) = self.bucket_location_name { - d.field("bucket_location_name", val); - } - if let Some(ref val) = self.bucket_location_type { - d.field("bucket_location_type", val); - } - if let Some(ref val) = self.bucket_region { - d.field("bucket_region", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketAnalyticsConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAnalyticsConfigurationOutput"); +d.finish_non_exhaustive() +} } -#[derive(Clone, Default, PartialEq)] -pub struct HeadObjectInput { - ///

The name of the bucket that contains the object.

- ///

- /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

- ///

- /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

- /// - ///

Access points and Object Lambda access points are not supported by directory buckets.

- ///
- ///

- /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

+ +#[derive(Clone, PartialEq)] +pub struct PutBucketCorsInput { +///

Specifies the bucket impacted by the corsconfiguration.

pub bucket: BucketName, - ///

To retrieve the checksum, this parameter must be enabled.

- ///

- /// General purpose buckets - - /// If you enable checksum mode and the object is uploaded with a - /// checksum - /// and encrypted with an Key Management Service (KMS) key, you must have permission to use the - /// kms:Decrypt action to retrieve the checksum.

- ///

- /// Directory buckets - If you enable - /// ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service - /// (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and - /// kms:Decrypt permissions in IAM identity-based policies and KMS key - /// policies for the KMS key to retrieve the checksum of the object.

- pub checksum_mode: Option, - ///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+///

Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more +/// information, see Enabling +/// Cross-Origin Resource Sharing in the +/// Amazon S3 User Guide.

+ pub cors_configuration: CORSConfiguration, +///

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

+///

If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

+ pub checksum_algorithm: Option, +///

The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, go to RFC +/// 1864. +///

+///

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

+ pub content_md5: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

pub expected_bucket_owner: Option, - ///

Return the object only if its entity tag (ETag) is the same as the one specified; - /// otherwise, return a 412 (precondition failed) error.

- ///

If both of the If-Match and If-Unmodified-Since headers are - /// present in the request as follows:

- ///
    - ///
  • - ///

    - /// If-Match condition evaluates to true, and;

    - ///
  • - ///
  • - ///

    - /// If-Unmodified-Since condition evaluates to false;

    - ///
  • - ///
- ///

Then Amazon S3 returns 200 OK and the data requested.

- ///

For more information about conditional requests, see RFC 7232.

- pub if_match: Option, - ///

Return the object only if it has been modified since the specified time; otherwise, - /// return a 304 (not modified) error.

- ///

If both of the If-None-Match and If-Modified-Since headers are - /// present in the request as follows:

- ///
    - ///
  • - ///

    - /// If-None-Match condition evaluates to false, and;

    - ///
  • - ///
  • - ///

    - /// If-Modified-Since condition evaluates to true;

    - ///
  • - ///
- ///

Then Amazon S3 returns the 304 Not Modified response code.

- ///

For more information about conditional requests, see RFC 7232.

- pub if_modified_since: Option, - ///

Return the object only if its entity tag (ETag) is different from the one specified; - /// otherwise, return a 304 (not modified) error.

- ///

If both of the If-None-Match and If-Modified-Since headers are - /// present in the request as follows:

- ///
    - ///
  • - ///

    - /// If-None-Match condition evaluates to false, and;

    - ///
  • - ///
  • - ///

    - /// If-Modified-Since condition evaluates to true;

    - ///
  • - ///
- ///

Then Amazon S3 returns the 304 Not Modified response code.

- ///

For more information about conditional requests, see RFC 7232.

- pub if_none_match: Option, - ///

Return the object only if it has not been modified since the specified time; otherwise, - /// return a 412 (precondition failed) error.

- ///

If both of the If-Match and If-Unmodified-Since headers are - /// present in the request as follows:

- ///
    - ///
  • - ///

    - /// If-Match condition evaluates to true, and;

    - ///
  • - ///
  • - ///

    - /// If-Unmodified-Since condition evaluates to false;

    - ///
  • - ///
- ///

Then Amazon S3 returns 200 OK and the data requested.

- ///

For more information about conditional requests, see RFC 7232.

- pub if_unmodified_since: Option, - ///

The object key.

- pub key: ObjectKey, - ///

Part number of the object being read. This is a positive integer between 1 and 10,000. - /// Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about - /// the size of the part and the number of parts in this object.

- pub part_number: Option, - ///

HeadObject returns only the metadata for an object. If the Range is satisfiable, only - /// the ContentLength is affected in the response. If the Range is not - /// satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

- pub range: Option, - pub request_payer: Option, - ///

Sets the Cache-Control header of the response.

- pub response_cache_control: Option, - ///

Sets the Content-Disposition header of the response.

- pub response_content_disposition: Option, - ///

Sets the Content-Encoding header of the response.

- pub response_content_encoding: Option, - ///

Sets the Content-Language header of the response.

- pub response_content_language: Option, - ///

Sets the Content-Type header of the response.

- pub response_content_type: Option, - ///

Sets the Expires header of the response.

- pub response_expires: Option, - ///

Specifies the algorithm to use when encrypting the object (for example, AES256).

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_algorithm: Option, - ///

Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_key: Option, - ///

Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_key_md5: Option, - ///

Version ID used to reference a specific version of the object.

- /// - ///

For directory buckets in this API operation, only the null value of the version ID is supported.

- ///
- pub version_id: Option, } -impl fmt::Debug for HeadObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("HeadObjectInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_mode { - d.field("checksum_mode", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_modified_since { - d.field("if_modified_since", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - if let Some(ref val) = self.if_unmodified_since { - d.field("if_unmodified_since", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - if let Some(ref val) = self.range { - d.field("range", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.response_cache_control { - d.field("response_cache_control", val); - } - if let Some(ref val) = self.response_content_disposition { - d.field("response_content_disposition", val); - } - if let Some(ref val) = self.response_content_encoding { - d.field("response_content_encoding", val); - } - if let Some(ref val) = self.response_content_language { - d.field("response_content_language", val); - } - if let Some(ref val) = self.response_content_type { - d.field("response_content_type", val); - } - if let Some(ref val) = self.response_expires { - d.field("response_expires", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketCorsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketCorsInput"); +d.field("bucket", &self.bucket); +d.field("cors_configuration", &self.cors_configuration); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl PutBucketCorsInput { +#[must_use] +pub fn builder() -> builders::PutBucketCorsInputBuilder { +default() +} } -impl HeadObjectInput { - #[must_use] - pub fn builder() -> builders::HeadObjectInputBuilder { - default() - } +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketCorsOutput { } -#[derive(Clone, Default, PartialEq)] -pub struct HeadObjectOutput { - ///

Indicates that a range of bytes was specified.

- pub accept_ranges: Option, - ///

The archive state of the head object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub archive_status: Option, - ///

Indicates whether the object uses an S3 Bucket Key for server-side encryption with - /// Key Management Service (KMS) keys (SSE-KMS).

- pub bucket_key_enabled: Option, - ///

Specifies caching behavior along the request/reply chain.

- pub cache_control: Option, - ///

The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

- pub checksum_crc32: Option, - ///

The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

- pub checksum_crc32c: Option, - ///

The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more - /// information, see Checking object integrity - /// in the Amazon S3 User Guide.

- pub checksum_crc64nvme: Option, - ///

The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

- pub checksum_sha1: Option, - ///

The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

- pub checksum_sha256: Option, - ///

The checksum type, which determines how part-level checksums are combined to create an - /// object-level checksum for multipart objects. You can use this header response to verify - /// that the checksum type that is received is the same checksum type that was specified in - /// CreateMultipartUpload request. For more - /// information, see Checking object integrity - /// in the Amazon S3 User Guide.

- pub checksum_type: Option, - ///

Specifies presentational information for the object.

- pub content_disposition: Option, - ///

Indicates what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

- pub content_encoding: Option, - ///

The language the content is in.

- pub content_language: Option, - ///

Size of the body in bytes.

- pub content_length: Option, - ///

The portion of the object returned in the response for a GET request.

- pub content_range: Option, - ///

A standard MIME type describing the format of the object data.

- pub content_type: Option, - ///

Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If - /// false, this response header does not appear in the response.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub delete_marker: Option, - ///

An entity tag (ETag) is an opaque identifier assigned by a web server to a specific - /// version of a resource found at a URL.

- pub e_tag: Option, - ///

If the object expiration is configured (see - /// PutBucketLifecycleConfiguration - /// ), the response includes this - /// header. It includes the expiry-date and rule-id key-value pairs - /// providing object expiration information. The value of the rule-id is - /// URL-encoded.

- /// - ///

Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

- ///
- pub expiration: Option, - ///

The date and time at which the object is no longer cacheable.

- pub expires: Option, - ///

Date and time when the object was last modified.

- pub last_modified: Option, - ///

A map of metadata to store with the object in S3.

- pub metadata: Option, - ///

This is set to the number of metadata entries not returned in x-amz-meta - /// headers. This can happen if you create metadata using an API like SOAP that supports more - /// flexible metadata than the REST API. For example, using SOAP, you can create metadata whose - /// values are not legal HTTP headers.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub missing_meta: Option, - ///

Specifies whether a legal hold is in effect for this object. This header is only - /// returned if the requester has the s3:GetObjectLegalHold permission. This - /// header is not returned if the specified version of this object has never had a legal hold - /// applied. For more information about S3 Object Lock, see Object Lock.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub object_lock_legal_hold_status: Option, - ///

The Object Lock mode, if any, that's in effect for this object. This header is only - /// returned if the requester has the s3:GetObjectRetention permission. For more - /// information about S3 Object Lock, see Object Lock.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub object_lock_mode: Option, - ///

The date and time when the Object Lock retention period expires. This header is only - /// returned if the requester has the s3:GetObjectRetention permission.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub object_lock_retain_until_date: Option, - ///

The count of parts this object has. This value is only returned if you specify - /// partNumber in your request and the object was uploaded as a multipart - /// upload.

- pub parts_count: Option, - ///

Amazon S3 can return this header if your request involves a bucket that is either a source or - /// a destination in a replication rule.

- ///

In replication, you have a source bucket on which you configure replication and - /// destination bucket or buckets where Amazon S3 stores object replicas. When you request an object - /// (GetObject) or object metadata (HeadObject) from these - /// buckets, Amazon S3 will return the x-amz-replication-status header in the response - /// as follows:

- ///
    - ///
  • - ///

    - /// If requesting an object from the source bucket, - /// Amazon S3 will return the x-amz-replication-status header if the object in - /// your request is eligible for replication.

    - ///

    For example, suppose that in your replication configuration, you specify object - /// prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix - /// TaxDocs. Any objects you upload with this key name prefix, for - /// example TaxDocs/document1.pdf, are eligible for replication. For any - /// object request with this key name prefix, Amazon S3 will return the - /// x-amz-replication-status header with value PENDING, COMPLETED or - /// FAILED indicating object replication status.

    - ///
  • - ///
  • - ///

    - /// If requesting an object from a destination - /// bucket, Amazon S3 will return the x-amz-replication-status header - /// with value REPLICA if the object in your request is a replica that Amazon S3 created and - /// there is no replica modification replication in progress.

    - ///
  • - ///
  • - ///

    - /// When replicating objects to multiple destination - /// buckets, the x-amz-replication-status header acts - /// differently. The header of the source object will only return a value of COMPLETED - /// when replication is successful to all destinations. The header will remain at value - /// PENDING until replication has completed for all destinations. If one or more - /// destinations fails replication the header will return FAILED.

    - ///
  • - ///
- ///

For more information, see Replication.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub replication_status: Option, - pub request_charged: Option, - ///

If the object is an archived object (an object whose storage class is GLACIER), the - /// response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

- ///

If an archive copy is already restored, the header value indicates when Amazon S3 is - /// scheduled to delete the object copy. For example:

- ///

- /// x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 - /// GMT" - ///

- ///

If the object restoration is in progress, the header returns the value - /// ongoing-request="true".

- ///

For more information about archiving objects, see Transitioning Objects: General Considerations.

- /// - ///

This functionality is not supported for directory buckets. - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

- ///
- pub restore: Option, - ///

If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_algorithm: Option, - ///

If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub sse_customer_key_md5: Option, - ///

If present, indicates the ID of the KMS key that was used for object encryption.

- pub ssekms_key_id: Option, - ///

The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms, aws:kms:dsse).

- pub server_side_encryption: Option, - ///

Provides storage class information of the object. Amazon S3 returns this header for all - /// objects except for S3 Standard storage class objects.

- ///

For more information, see Storage Classes.

- /// - ///

- /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

- ///
- pub storage_class: Option, - ///

Version ID of the object.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub version_id: Option, - ///

If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub website_redirect_location: Option, +impl fmt::Debug for PutBucketCorsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketCorsOutput"); +d.finish_non_exhaustive() +} } -impl fmt::Debug for HeadObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("HeadObjectOutput"); - if let Some(ref val) = self.accept_ranges { - d.field("accept_ranges", val); - } - if let Some(ref val) = self.archive_status { - d.field("archive_status", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_range { - d.field("content_range", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.missing_meta { - d.field("missing_meta", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.parts_count { - d.field("parts_count", val); - } - if let Some(ref val) = self.replication_status { - d.field("replication_status", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.restore { - d.field("restore", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - d.finish_non_exhaustive() - } + +#[derive(Clone, PartialEq)] +pub struct PutBucketEncryptionInput { +///

Specifies default encryption for a bucket using server-side encryption with different +/// key options.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

+ pub bucket: BucketName, +///

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

+///

If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

+/// +///

For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

+///
+ pub checksum_algorithm: Option, +///

The Base64 encoded 128-bit MD5 digest of the server-side encryption +/// configuration.

+///

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

+/// +///

This functionality is not supported for directory buckets.

+///
+ pub content_md5: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

+///
+ pub expected_bucket_owner: Option, + pub server_side_encryption_configuration: ServerSideEncryptionConfiguration, } -pub type HostName = String; +impl fmt::Debug for PutBucketEncryptionInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketEncryptionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("server_side_encryption_configuration", &self.server_side_encryption_configuration); +d.finish_non_exhaustive() +} +} -pub type HttpErrorCodeReturnedEquals = String; +impl PutBucketEncryptionInput { +#[must_use] +pub fn builder() -> builders::PutBucketEncryptionInputBuilder { +default() +} +} -pub type HttpRedirectCode = String; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketEncryptionOutput { +} -pub type ID = String; +impl fmt::Debug for PutBucketEncryptionOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketEncryptionOutput"); +d.finish_non_exhaustive() +} +} -pub type IfMatch = ETagCondition; -pub type IfMatchInitiatedTime = Timestamp; +#[derive(Clone, PartialEq)] +pub struct PutBucketIntelligentTieringConfigurationInput { +///

The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

+ pub bucket: BucketName, +///

The ID used to identify the S3 Intelligent-Tiering configuration.

+ pub id: IntelligentTieringId, +///

Container for S3 Intelligent-Tiering configuration.

+ pub intelligent_tiering_configuration: IntelligentTieringConfiguration, +} -pub type IfMatchLastModifiedTime = Timestamp; +impl fmt::Debug for PutBucketIntelligentTieringConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationInput"); +d.field("bucket", &self.bucket); +d.field("id", &self.id); +d.field("intelligent_tiering_configuration", &self.intelligent_tiering_configuration); +d.finish_non_exhaustive() +} +} -pub type IfMatchSize = i64; +impl PutBucketIntelligentTieringConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketIntelligentTieringConfigurationInputBuilder { +default() +} +} -pub type IfModifiedSince = Timestamp; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketIntelligentTieringConfigurationOutput { +} -pub type IfNoneMatch = ETagCondition; +impl fmt::Debug for PutBucketIntelligentTieringConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationOutput"); +d.finish_non_exhaustive() +} +} -pub type IfUnmodifiedSince = Timestamp; -///

Container for the Suffix element.

-#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IndexDocument { - ///

A suffix that is appended to a request that is for a directory on the website endpoint. - /// (For example, if the suffix is index.html and you make a request to - /// samplebucket/images/, the data that is returned will be for the object with - /// the key name images/index.html.) The suffix must not be empty and must not - /// include a slash character.

- /// - ///

Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

- ///
- pub suffix: Suffix, +#[derive(Clone, PartialEq)] +pub struct PutBucketInventoryConfigurationInput { +///

The name of the bucket where the inventory configuration will be stored.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The ID used to identify the inventory configuration.

+ pub id: InventoryId, +///

Specifies the inventory configuration.

+ pub inventory_configuration: InventoryConfiguration, } -impl fmt::Debug for IndexDocument { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("IndexDocument"); - d.field("suffix", &self.suffix); - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketInventoryConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketInventoryConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.field("inventory_configuration", &self.inventory_configuration); +d.finish_non_exhaustive() +} } -pub type Initiated = Timestamp; +impl PutBucketInventoryConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketInventoryConfigurationInputBuilder { +default() +} +} -///

Container element that identifies who initiated the multipart upload.

#[derive(Clone, Default, PartialEq)] -pub struct Initiator { - ///

Name of the Principal.

- /// - ///

This functionality is not supported for directory buckets.

- ///
- pub display_name: Option, - ///

If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the - /// principal is an IAM User, it provides a user ARN value.

- /// - ///

- /// Directory buckets - If the principal is an - /// Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it - /// provides a user ARN value.

- ///
- pub id: Option, +pub struct PutBucketInventoryConfigurationOutput { } -impl fmt::Debug for Initiator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Initiator"); - if let Some(ref val) = self.display_name { - d.field("display_name", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketInventoryConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketInventoryConfigurationOutput"); +d.finish_non_exhaustive() +} } -///

Describes the serialization format of the object.

+ #[derive(Clone, Default, PartialEq)] -pub struct InputSerialization { - ///

Describes the serialization of a CSV-encoded object.

- pub csv: Option, - ///

Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: - /// NONE.

- pub compression_type: Option, - ///

Specifies JSON as object's input serialization format.

- pub json: Option, - ///

Specifies Parquet as object's input serialization format.

- pub parquet: Option, +pub struct PutBucketLifecycleConfigurationInput { +///

The name of the bucket for which to set the configuration.

+ pub bucket: BucketName, +///

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

+///

If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

+ pub checksum_algorithm: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+ pub expected_bucket_owner: Option, +///

Container for lifecycle rules. You can add as many as 1,000 rules.

+ pub lifecycle_configuration: Option, +///

Indicates which default minimum object size behavior is applied to the lifecycle +/// configuration.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+///
    +///
  • +///

    +/// all_storage_classes_128K - Objects smaller than 128 KB will not +/// transition to any storage class by default.

    +///
  • +///
  • +///

    +/// varies_by_storage_class - Objects smaller than 128 KB will +/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By +/// default, all other storage classes will prevent transitions smaller than 128 KB. +///

    +///
  • +///
+///

To customize the minimum object size for any transition you can add a filter that +/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in +/// the body of your transition rule. Custom filters always take precedence over the default +/// transition behavior.

+ pub transition_default_minimum_object_size: Option, } -impl fmt::Debug for InputSerialization { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InputSerialization"); - if let Some(ref val) = self.csv { - d.field("csv", val); - } - if let Some(ref val) = self.compression_type { - d.field("compression_type", val); - } - if let Some(ref val) = self.json { - d.field("json", val); - } - if let Some(ref val) = self.parquet { - d.field("parquet", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketLifecycleConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketLifecycleConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.lifecycle_configuration { +d.field("lifecycle_configuration", val); +} +if let Some(ref val) = self.transition_default_minimum_object_size { +d.field("transition_default_minimum_object_size", val); +} +d.finish_non_exhaustive() +} } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct IntelligentTieringAccessTier(Cow<'static, str>); +impl PutBucketLifecycleConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketLifecycleConfigurationInputBuilder { +default() +} +} -impl IntelligentTieringAccessTier { - pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLifecycleConfigurationOutput { +///

Indicates which default minimum object size behavior is applied to the lifecycle +/// configuration.

+/// +///

This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

+///
+///
    +///
  • +///

    +/// all_storage_classes_128K - Objects smaller than 128 KB will not +/// transition to any storage class by default.

    +///
  • +///
  • +///

    +/// varies_by_storage_class - Objects smaller than 128 KB will +/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By +/// default, all other storage classes will prevent transitions smaller than 128 KB. +///

    +///
  • +///
+///

To customize the minimum object size for any transition you can add a filter that +/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in +/// the body of your transition rule. Custom filters always take precedence over the default +/// transition behavior.

+ pub transition_default_minimum_object_size: Option, +} + +impl fmt::Debug for PutBucketLifecycleConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketLifecycleConfigurationOutput"); +if let Some(ref val) = self.transition_default_minimum_object_size { +d.field("transition_default_minimum_object_size", val); +} +d.finish_non_exhaustive() +} +} - pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[derive(Clone, PartialEq)] +pub struct PutBucketLoggingInput { +///

The name of the bucket for which to set the logging parameters.

+ pub bucket: BucketName, +///

Container for logging status information.

+ pub bucket_logging_status: BucketLoggingStatus, +///

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

+///

If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

+ pub checksum_algorithm: Option, +///

The MD5 hash of the PutBucketLogging request body.

+///

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

+ pub content_md5: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for PutBucketLoggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketLoggingInput"); +d.field("bucket", &self.bucket); +d.field("bucket_logging_status", &self.bucket_logging_status); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() } - -impl From for IntelligentTieringAccessTier { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } } -impl From for Cow<'static, str> { - fn from(s: IntelligentTieringAccessTier) -> Self { - s.0 - } +impl PutBucketLoggingInput { +#[must_use] +pub fn builder() -> builders::PutBucketLoggingInputBuilder { +default() +} } -impl FromStr for IntelligentTieringAccessTier { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLoggingOutput { } -///

A container for specifying S3 Intelligent-Tiering filters. The filters determine the -/// subset of objects to which the rule applies.

-#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringAndOperator { - ///

An object key name prefix that identifies the subset of objects to which the - /// configuration applies.

- pub prefix: Option, - ///

All of these tags must exist in the object's tag set in order for the configuration to - /// apply.

- pub tags: Option, +impl fmt::Debug for PutBucketLoggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketLoggingOutput"); +d.finish_non_exhaustive() +} } -impl fmt::Debug for IntelligentTieringAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("IntelligentTieringAndOperator"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } + +#[derive(Clone, PartialEq)] +pub struct PutBucketMetricsConfigurationInput { +///

The name of the bucket for which the metrics configuration is set.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The ID used to identify the metrics configuration. The ID has a 64 character limit and +/// can only contain letters, numbers, periods, dashes, and underscores.

+ pub id: MetricsId, +///

Specifies the metrics configuration.

+ pub metrics_configuration: MetricsConfiguration, } -///

Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

-///

For information about the S3 Intelligent-Tiering storage class, see Storage class -/// for automatically optimizing frequently and infrequently accessed -/// objects.

-#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringConfiguration { - ///

Specifies a bucket filter. The configuration only includes objects that meet the - /// filter's criteria.

- pub filter: Option, - ///

The ID used to identify the S3 Intelligent-Tiering configuration.

- pub id: IntelligentTieringId, - ///

Specifies the status of the configuration.

- pub status: IntelligentTieringStatus, - ///

Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

- pub tierings: TieringList, +impl fmt::Debug for PutBucketMetricsConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketMetricsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.field("metrics_configuration", &self.metrics_configuration); +d.finish_non_exhaustive() +} } -impl fmt::Debug for IntelligentTieringConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("IntelligentTieringConfiguration"); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - d.field("id", &self.id); - d.field("status", &self.status); - d.field("tierings", &self.tierings); - d.finish_non_exhaustive() - } +impl PutBucketMetricsConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketMetricsConfigurationInputBuilder { +default() +} } -impl Default for IntelligentTieringConfiguration { - fn default() -> Self { - Self { - filter: None, - id: default(), - status: String::new().into(), - tierings: default(), - } - } +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketMetricsConfigurationOutput { } -pub type IntelligentTieringConfigurationList = List; +impl fmt::Debug for PutBucketMetricsConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketMetricsConfigurationOutput"); +d.finish_non_exhaustive() +} +} -pub type IntelligentTieringDays = i32; -///

The Filter is used to identify objects that the S3 Intelligent-Tiering -/// configuration applies to.

-#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringFilter { - ///

A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. - /// The operator must have at least two predicates, and an object must match all of the - /// predicates in order for the filter to apply.

- pub and: Option, - ///

An object key name prefix that identifies the subset of objects to which the rule - /// applies.

- /// - ///

Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

- ///
- pub prefix: Option, - pub tag: Option, +#[derive(Clone, PartialEq)] +pub struct PutBucketNotificationConfigurationInput { +///

The name of the bucket.

+ pub bucket: BucketName, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, + pub notification_configuration: NotificationConfiguration, +///

Skips validation of Amazon SQS, Amazon SNS, and Lambda +/// destinations. True or false value.

+ pub skip_destination_validation: Option, } -impl fmt::Debug for IntelligentTieringFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("IntelligentTieringFilter"); - if let Some(ref val) = self.and { - d.field("and", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tag { - d.field("tag", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketNotificationConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketNotificationConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("notification_configuration", &self.notification_configuration); +if let Some(ref val) = self.skip_destination_validation { +d.field("skip_destination_validation", val); +} +d.finish_non_exhaustive() +} } -pub type IntelligentTieringId = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct IntelligentTieringStatus(Cow<'static, str>); +impl PutBucketNotificationConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketNotificationConfigurationInputBuilder { +default() +} +} -impl IntelligentTieringStatus { - pub const DISABLED: &'static str = "Disabled"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketNotificationConfigurationOutput { +} - pub const ENABLED: &'static str = "Enabled"; +impl fmt::Debug for PutBucketNotificationConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketNotificationConfigurationOutput"); +d.finish_non_exhaustive() +} +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[derive(Clone, PartialEq)] +pub struct PutBucketOwnershipControlsInput { +///

The name of the Amazon S3 bucket whose OwnershipControls you want to set.

+ pub bucket: BucketName, +///

The MD5 hash of the OwnershipControls request body.

+///

For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

+ pub content_md5: Option, +///

The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

+ pub expected_bucket_owner: Option, +///

The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or +/// ObjectWriter) that you want to apply to this Amazon S3 bucket.

+ pub ownership_controls: OwnershipControls, } -impl From for IntelligentTieringStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for PutBucketOwnershipControlsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketOwnershipControlsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("ownership_controls", &self.ownership_controls); +d.finish_non_exhaustive() } - -impl From for Cow<'static, str> { - fn from(s: IntelligentTieringStatus) -> Self { - s.0 - } } -impl FromStr for IntelligentTieringStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl PutBucketOwnershipControlsInput { +#[must_use] +pub fn builder() -> builders::PutBucketOwnershipControlsInputBuilder { +default() +} } -///

Object is archived and inaccessible until restored.

-///

If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage -/// class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access -/// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you -/// must first restore a copy using RestoreObject. Otherwise, this -/// operation returns an InvalidObjectState error. For information about restoring -/// archived objects, see Restoring Archived Objects in -/// the Amazon S3 User Guide.

#[derive(Clone, Default, PartialEq)] -pub struct InvalidObjectState { - pub access_tier: Option, - pub storage_class: Option, +pub struct PutBucketOwnershipControlsOutput { } -impl fmt::Debug for InvalidObjectState { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InvalidObjectState"); - if let Some(ref val) = self.access_tier { - d.field("access_tier", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketOwnershipControlsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketOwnershipControlsOutput"); +d.finish_non_exhaustive() +} } -///

You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

+ +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketPolicyInput { +///

The name of the bucket.

+///

+/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

+ pub bucket: BucketName, +///

Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm +/// or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

+///

For the x-amz-checksum-algorithm +/// header, replace +/// algorithm +/// with the supported algorithm from the following list:

///
    ///
  • -///

    Cannot specify both a write offset value and user-defined object metadata for existing objects.

    +///

    +/// CRC32 +///

    ///
  • ///
  • -///

    Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

    +///

    +/// CRC32C +///

    ///
  • ///
  • -///

    Request body cannot be empty when 'write offset' is specified.

    +///

    +/// CRC64NVME +///

    ///
  • -///
-#[derive(Clone, Default, PartialEq)] -pub struct InvalidRequest {} - -impl fmt::Debug for InvalidRequest { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InvalidRequest"); - d.finish_non_exhaustive() - } -} - +///
  • ///

    -/// The write offset value that you specified does not match the current object size. +/// SHA1 ///

    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidWriteOffset {} - -impl fmt::Debug for InvalidWriteOffset { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InvalidWriteOffset"); - d.finish_non_exhaustive() - } +///
  • +///
  • +///

    +/// SHA256 +///

    +///
  • +/// +///

    For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If the individual checksum value you provide through x-amz-checksum-algorithm +/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    +/// +///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    +///
    + pub checksum_algorithm: Option, +///

    Set this parameter to true to confirm that you want to remove your permissions to change +/// this bucket policy in the future.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub confirm_remove_self_bucket_access: Option, +///

    The MD5 hash of the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

    +///
    + pub expected_bucket_owner: Option, +///

    The bucket policy as a JSON document.

    +///

    For directory buckets, the only IAM action supported in the bucket policy is +/// s3express:CreateSession.

    + pub policy: Policy, } -///

    Specifies the inventory configuration for an Amazon S3 bucket. For more information, see -/// GET Bucket inventory in the Amazon S3 API Reference.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryConfiguration { - ///

    Contains information about where to publish the inventory results.

    - pub destination: InventoryDestination, - ///

    Specifies an inventory filter. The inventory only includes objects that meet the - /// filter's criteria.

    - pub filter: Option, - ///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, - ///

    Object versions to include in the inventory list. If set to All, the list - /// includes all the object versions, which adds the version-related fields - /// VersionId, IsLatest, and DeleteMarker to the - /// list. If set to Current, the list does not contain these version-related - /// fields.

    - pub included_object_versions: InventoryIncludedObjectVersions, - ///

    Specifies whether the inventory is enabled or disabled. If set to True, an - /// inventory list is generated. If set to False, no inventory list is - /// generated.

    - pub is_enabled: IsEnabled, - ///

    Contains the optional fields that are included in the inventory results.

    - pub optional_fields: Option, - ///

    Specifies the schedule for generating inventory results.

    - pub schedule: InventorySchedule, +impl fmt::Debug for PutBucketPolicyInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketPolicyInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); } - -impl fmt::Debug for InventoryConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryConfiguration"); - d.field("destination", &self.destination); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - d.field("id", &self.id); - d.field("included_object_versions", &self.included_object_versions); - d.field("is_enabled", &self.is_enabled); - if let Some(ref val) = self.optional_fields { - d.field("optional_fields", val); - } - d.field("schedule", &self.schedule); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.confirm_remove_self_bucket_access { +d.field("confirm_remove_self_bucket_access", val); } - -impl Default for InventoryConfiguration { - fn default() -> Self { - Self { - destination: default(), - filter: None, - id: default(), - included_object_versions: String::new().into(), - is_enabled: default(), - optional_fields: None, - schedule: default(), - } - } +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); } - -pub type InventoryConfigurationList = List; - -///

    Specifies the inventory configuration for an Amazon S3 bucket.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryDestination { - ///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) - /// where inventory results are published.

    - pub s3_bucket_destination: InventoryS3BucketDestination, +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); } - -impl fmt::Debug for InventoryDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryDestination"); - d.field("s3_bucket_destination", &self.s3_bucket_destination); - d.finish_non_exhaustive() - } +d.field("policy", &self.policy); +d.finish_non_exhaustive() } - -impl Default for InventoryDestination { - fn default() -> Self { - Self { - s3_bucket_destination: default(), - } - } } -///

    Contains the type of server-side encryption used to encrypt the inventory -/// results.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct InventoryEncryption { - ///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    - pub ssekms: Option, - ///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    - pub sses3: Option, +impl PutBucketPolicyInput { +#[must_use] +pub fn builder() -> builders::PutBucketPolicyInputBuilder { +default() } - -impl fmt::Debug for InventoryEncryption { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryEncryption"); - if let Some(ref val) = self.ssekms { - d.field("ssekms", val); - } - if let Some(ref val) = self.sses3 { - d.field("sses3", val); - } - d.finish_non_exhaustive() - } } -///

    Specifies an inventory filter. The inventory only includes objects that meet the -/// filter's criteria.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct InventoryFilter { - ///

    The prefix that an object must have to be included in the inventory results.

    - pub prefix: Prefix, +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketPolicyOutput { } -impl fmt::Debug for InventoryFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryFilter"); - d.field("prefix", &self.prefix); - d.finish_non_exhaustive() - } +impl fmt::Debug for PutBucketPolicyOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketPolicyOutput"); +d.finish_non_exhaustive() +} } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryFormat(Cow<'static, str>); - -impl InventoryFormat { - pub const CSV: &'static str = "CSV"; - - pub const ORC: &'static str = "ORC"; - - pub const PARQUET: &'static str = "Parquet"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[derive(Clone, PartialEq)] +pub struct PutBucketReplicationInput { +///

    The name of the bucket

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, see RFC 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub replication_configuration: ReplicationConfiguration, +///

    A token to allow Object Lock to be enabled for an existing bucket.

    + pub token: Option, } -impl From for InventoryFormat { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for PutBucketReplicationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketReplicationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); } - -impl From for Cow<'static, str> { - fn from(s: InventoryFormat) -> Self { - s.0 - } +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("replication_configuration", &self.replication_configuration); +if let Some(ref val) = self.token { +d.field("token", val); +} +d.finish_non_exhaustive() } - -impl FromStr for InventoryFormat { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryFrequency(Cow<'static, str>); +impl PutBucketReplicationInput { +#[must_use] +pub fn builder() -> builders::PutBucketReplicationInputBuilder { +default() +} +} -impl InventoryFrequency { - pub const DAILY: &'static str = "Daily"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketReplicationOutput { +} - pub const WEEKLY: &'static str = "Weekly"; +impl fmt::Debug for PutBucketReplicationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketReplicationOutput"); +d.finish_non_exhaustive() +} +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[derive(Clone, PartialEq)] +pub struct PutBucketRequestPaymentInput { +///

    The bucket name.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, see RFC 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Container for Payer.

    + pub request_payment_configuration: RequestPaymentConfiguration, } -impl From for InventoryFrequency { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for PutBucketRequestPaymentInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketRequestPaymentInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); } - -impl From for Cow<'static, str> { - fn from(s: InventoryFrequency) -> Self { - s.0 - } +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("request_payment_configuration", &self.request_payment_configuration); +d.finish_non_exhaustive() } - -impl FromStr for InventoryFrequency { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -pub type InventoryId = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryIncludedObjectVersions(Cow<'static, str>); +impl PutBucketRequestPaymentInput { +#[must_use] +pub fn builder() -> builders::PutBucketRequestPaymentInputBuilder { +default() +} +} -impl InventoryIncludedObjectVersions { - pub const ALL: &'static str = "All"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketRequestPaymentOutput { +} - pub const CURRENT: &'static str = "Current"; +impl fmt::Debug for PutBucketRequestPaymentOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketRequestPaymentOutput"); +d.finish_non_exhaustive() +} +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[derive(Clone, PartialEq)] +pub struct PutBucketTaggingInput { +///

    The bucket name.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, see RFC 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Container for the TagSet and Tag elements.

    + pub tagging: Tagging, } -impl From for InventoryIncludedObjectVersions { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for PutBucketTaggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("tagging", &self.tagging); +d.finish_non_exhaustive() } - -impl From for Cow<'static, str> { - fn from(s: InventoryIncludedObjectVersions) -> Self { - s.0 - } } -impl FromStr for InventoryIncludedObjectVersions { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl PutBucketTaggingInput { +#[must_use] +pub fn builder() -> builders::PutBucketTaggingInputBuilder { +default() +} } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryOptionalField(Cow<'static, str>); +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketTaggingOutput { +} -impl InventoryOptionalField { - pub const BUCKET_KEY_STATUS: &'static str = "BucketKeyStatus"; +impl fmt::Debug for PutBucketTaggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketTaggingOutput"); +d.finish_non_exhaustive() +} +} - pub const CHECKSUM_ALGORITHM: &'static str = "ChecksumAlgorithm"; - pub const E_TAG: &'static str = "ETag"; +#[derive(Clone, PartialEq)] +pub struct PutBucketVersioningInput { +///

    The bucket name.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a +/// message integrity check to verify that the request body was not corrupted in transit. For +/// more information, see RFC +/// 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The concatenation of the authentication device's serial number, a space, and the value +/// that is displayed on your authentication device.

    + pub mfa: Option, +///

    Container for setting the versioning state.

    + pub versioning_configuration: VersioningConfiguration, +} - pub const ENCRYPTION_STATUS: &'static str = "EncryptionStatus"; +impl fmt::Debug for PutBucketVersioningInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketVersioningInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.mfa { +d.field("mfa", val); +} +d.field("versioning_configuration", &self.versioning_configuration); +d.finish_non_exhaustive() +} +} - pub const INTELLIGENT_TIERING_ACCESS_TIER: &'static str = "IntelligentTieringAccessTier"; +impl PutBucketVersioningInput { +#[must_use] +pub fn builder() -> builders::PutBucketVersioningInputBuilder { +default() +} +} - pub const IS_MULTIPART_UPLOADED: &'static str = "IsMultipartUploaded"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketVersioningOutput { +} - pub const LAST_MODIFIED_DATE: &'static str = "LastModifiedDate"; +impl fmt::Debug for PutBucketVersioningOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketVersioningOutput"); +d.finish_non_exhaustive() +} +} - pub const OBJECT_ACCESS_CONTROL_LIST: &'static str = "ObjectAccessControlList"; - pub const OBJECT_LOCK_LEGAL_HOLD_STATUS: &'static str = "ObjectLockLegalHoldStatus"; +#[derive(Clone, PartialEq)] +pub struct PutBucketWebsiteInput { +///

    The bucket name.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, see RFC 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Container for the request.

    + pub website_configuration: WebsiteConfiguration, +} - pub const OBJECT_LOCK_MODE: &'static str = "ObjectLockMode"; +impl fmt::Debug for PutBucketWebsiteInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketWebsiteInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("website_configuration", &self.website_configuration); +d.finish_non_exhaustive() +} +} - pub const OBJECT_LOCK_RETAIN_UNTIL_DATE: &'static str = "ObjectLockRetainUntilDate"; +impl PutBucketWebsiteInput { +#[must_use] +pub fn builder() -> builders::PutBucketWebsiteInputBuilder { +default() +} +} - pub const OBJECT_OWNER: &'static str = "ObjectOwner"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketWebsiteOutput { +} - pub const REPLICATION_STATUS: &'static str = "ReplicationStatus"; +impl fmt::Debug for PutBucketWebsiteOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketWebsiteOutput"); +d.finish_non_exhaustive() +} +} - pub const SIZE: &'static str = "Size"; - pub const STORAGE_CLASS: &'static str = "StorageClass"; +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectAclInput { +///

    The canned ACL to apply to the object. For more information, see Canned +/// ACL.

    + pub acl: Option, +///

    Contains the elements that set the ACL permissions for an object per grantee.

    + pub access_control_policy: Option, +///

    The bucket name that contains the object to which you want to attach the ACL.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, go to RFC +/// 1864.> +///

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Allows grantee the read, write, read ACP, and write ACP permissions on the +/// bucket.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_full_control: Option, +///

    Allows grantee to list the objects in the bucket.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_read: Option, +///

    Allows grantee to read the bucket ACL.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_read_acp: Option, +///

    Allows grantee to create new objects in the bucket.

    +///

    For the bucket and object owners of existing objects, also allows deletions and +/// overwrites of those objects.

    + pub grant_write: Option, +///

    Allows grantee to write the ACL for the applicable bucket.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_write_acp: Option, +///

    Key for which the PUT action was initiated.

    + pub key: ObjectKey, + pub request_payer: Option, +///

    Version ID used to reference a specific version of the object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +impl fmt::Debug for PutObjectAclInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectAclInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +if let Some(ref val) = self.access_control_policy { +d.field("access_control_policy", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write { +d.field("grant_write", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +impl PutObjectAclInput { +#[must_use] +pub fn builder() -> builders::PutObjectAclInputBuilder { +default() +} } -impl From for InventoryOptionalField { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectAclOutput { + pub request_charged: Option, } -impl From for Cow<'static, str> { - fn from(s: InventoryOptionalField) -> Self { - s.0 - } +impl fmt::Debug for PutObjectAclOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectAclOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} } -impl FromStr for InventoryOptionalField { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } + +#[derive(Default)] +pub struct PutObjectInput { +///

    The canned ACL to apply to the object. For more information, see Canned +/// ACL in the Amazon S3 User Guide.

    +///

    When adding a new object, you can use headers to grant ACL-based permissions to +/// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are +/// then added to the ACL on the object. By default, all objects are private. Only the owner +/// has full access control. For more information, see Access Control List (ACL) Overview +/// and Managing +/// ACLs Using the REST API in the Amazon S3 User Guide.

    +///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting +/// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that +/// use this setting only accept PUT requests that don't specify an ACL or PUT requests that +/// specify bucket owner full control ACLs, such as the bucket-owner-full-control +/// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that +/// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a +/// 400 error with the error code AccessControlListNotSupported. +/// For more information, see Controlling ownership of +/// objects and disabling ACLs in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub acl: Option, +///

    Object data.

    + pub body: Option, +///

    The bucket name to which the PUT action was initiated.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    +///

    +/// General purpose buckets - Setting this header to +/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with +/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 +/// Bucket Key.

    +///

    +/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + pub bucket_key_enabled: Option, +///

    Can be used to specify caching behavior along the request/reply chain. For more +/// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    + pub cache_control: Option, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm +/// or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    +///

    For the x-amz-checksum-algorithm +/// header, replace +/// algorithm +/// with the supported algorithm from the following list:

    +///
      +///
    • +///

      +/// CRC32 +///

      +///
    • +///
    • +///

      +/// CRC32C +///

      +///
    • +///
    • +///

      +/// CRC64NVME +///

      +///
    • +///
    • +///

      +/// SHA1 +///

      +///
    • +///
    • +///

      +/// SHA256 +///

      +///
    • +///
    +///

    For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If the individual checksum value you provide through x-amz-checksum-algorithm +/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    +/// +///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is +/// required for any request to upload an object with a retention period configured using +/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the +/// Amazon S3 User Guide.

    +///
    +///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + pub checksum_algorithm: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the object. The CRC64NVME checksum is +/// always a full object checksum. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    + pub content_disposition: Option, +///

    Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    + pub content_encoding: Option, +///

    The language the content is in.

    + pub content_language: Option, +///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be +/// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    + pub content_length: Option, +///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to +/// RFC 1864. This header can be used as a message integrity check to verify that the data is +/// the same data that was originally sent. Although it is optional, we recommend using the +/// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST +/// request authentication, see REST Authentication.

    +/// +///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is +/// required for any request to upload an object with a retention period configured using +/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the +/// Amazon S3 User Guide.

    +///
    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub content_md5: Option, +///

    A standard MIME type describing the format of the contents. For more information, see +/// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    + pub content_type: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The date and time at which the object is no longer cacheable. For more information, see +/// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    + pub expires: Option, +///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_full_control: Option, +///

    Allows grantee to read the object data and its metadata.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_read: Option, +///

    Allows grantee to read the object ACL.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_read_acp: Option, +///

    Allows grantee to write the ACL for the applicable object.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_write_acp: Option, +///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE +/// operation matches the ETag of the object in S3. If the ETag values do not match, the +/// operation returns a 412 Precondition Failed error.

    +///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    +///

    Expects the ETag value as a string.

    +///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_match: Option, +///

    Uploads the object only if the object key name does not already exist in the bucket +/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    +///

    If a conflicting operation occurs during the upload S3 returns a 409 +/// ConditionalRequestConflict response. On a 409 failure you should retry the +/// upload.

    +///

    Expects the '*' (asterisk) character.

    +///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_none_match: Option, +///

    Object key for which the PUT action was initiated.

    + pub key: ObjectKey, +///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, +///

    Specifies whether a legal hold will be applied to this object. For more information +/// about S3 Object Lock, see Object Lock in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_legal_hold_status: Option, +///

    The Object Lock mode that you want to apply to this object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_mode: Option, +///

    The date and time when you want this object's Object Lock to expire. Must be formatted +/// as a timestamp parameter.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_retain_until_date: Option, + pub request_payer: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, +/// AES256).

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets passed on +/// to Amazon Web Services KMS for future GetObject operations on +/// this object.

    +///

    +/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    +///

    +/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + pub ssekms_encryption_context: Option, +///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same +/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    +///

    +/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS +/// key to use. If you specify +/// x-amz-server-side-encryption:aws:kms or +/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key +/// (aws/s3) to protect the data.

    +///

    +/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the +/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses +/// the bucket's default KMS customer managed key ID. If you want to explicitly set the +/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +/// +/// Incorrect key specification results in an HTTP 400 Bad Request error.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 +/// (for example, AES256, aws:kms, aws:kms:dsse).

    +///
      +///
    • +///

      +/// General purpose buckets - You have four mutually +/// exclusive options to protect data using server-side encryption in Amazon S3, depending on +/// how you choose to manage the encryption keys. Specifically, the encryption key +/// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and +/// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by +/// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt +/// data at rest by using server-side encryption with other key options. For more +/// information, see Using Server-Side +/// Encryption in the Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      +///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. +/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. +/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and +/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. +///

      +/// +///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the +/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. +/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), +/// the encryption request headers must match the default encryption configuration of the directory bucket. +/// +///

      +///
      +///
    • +///
    + pub server_side_encryption: Option, +///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The +/// STANDARD storage class provides high durability and high availability. Depending on +/// performance needs, you can specify a different Storage Class. For more information, see +/// Storage +/// Classes in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      For directory buckets, only the S3 Express One Zone storage class is supported to store +/// newly created objects.

      +///
    • +///
    • +///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      +///
    • +///
    +///
    + pub storage_class: Option, +///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For +/// example, "Key1=Value1")

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub tagging: Option, + pub version_id: Option, +///

    If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata. For information about object metadata, see Object Key and Metadata in the +/// Amazon S3 User Guide.

    +///

    In the following example, the request header sets the redirect to an object +/// (anotherPage.html) in the same bucket:

    +///

    +/// x-amz-website-redirect-location: /anotherPage.html +///

    +///

    In the following example, the request header sets the object redirect to another +/// website:

    +///

    +/// x-amz-website-redirect-location: http://www.example.com/ +///

    +///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and +/// How to +/// Configure Website Page Redirects in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub website_redirect_location: Option, +///

    +/// Specifies the offset for appending data to existing objects in bytes. +/// The offset must be equal to the size of the existing object being appended to. +/// If no object exists, setting this header to 0 will create a new object. +///

    +/// +///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    +///
    + pub write_offset_bytes: Option, } -pub type InventoryOptionalFields = List; - -///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) -/// where inventory results are published.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryS3BucketDestination { - ///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the - /// owner is not validated before exporting data.

    - /// - ///

    Although this value is optional, we strongly recommend that you set it to help - /// prevent problems if the destination bucket ownership changes.

    - ///
    - pub account_id: Option, - ///

    The Amazon Resource Name (ARN) of the bucket where inventory results will be - /// published.

    - pub bucket: BucketName, - ///

    Contains the type of server-side encryption used to encrypt the inventory - /// results.

    - pub encryption: Option, - ///

    Specifies the output format of the inventory results.

    - pub format: InventoryFormat, - ///

    The prefix that is prepended to all inventory results.

    - pub prefix: Option, +impl fmt::Debug for PutObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); } - -impl fmt::Debug for InventoryS3BucketDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryS3BucketDestination"); - if let Some(ref val) = self.account_id { - d.field("account_id", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.encryption { - d.field("encryption", val); - } - d.field("format", &self.format); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.body { +d.field("body", val); } - -impl Default for InventoryS3BucketDestination { - fn default() -> Self { - Self { - account_id: None, - bucket: default(), - encryption: None, - format: String::new().into(), - prefix: None, - } - } +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); } - -///

    Specifies the schedule for generating inventory results.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventorySchedule { - ///

    Specifies how frequently inventory results are produced.

    - pub frequency: InventoryFrequency, +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); } - -impl fmt::Debug for InventorySchedule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventorySchedule"); - d.field("frequency", &self.frequency); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); } - -impl Default for InventorySchedule { - fn default() -> Self { - Self { - frequency: String::new().into(), - } - } +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); } - -pub type IsEnabled = bool; - -pub type IsLatest = bool; - -pub type IsPublic = bool; - -pub type IsRestoreInProgress = bool; - -pub type IsTruncated = bool; - -///

    Specifies JSON as object's input serialization format.

    -#[derive(Clone, Default, PartialEq)] -pub struct JSONInput { - ///

    The type of JSON. Valid values: Document, Lines.

    - pub type_: Option, +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); } - -impl fmt::Debug for JSONInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("JSONInput"); - if let Some(ref val) = self.type_ { - d.field("type_", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); } - -///

    Specifies JSON as request's output serialization format.

    -#[derive(Clone, Default, PartialEq)] -pub struct JSONOutput { - ///

    The value used to separate individual records in the output. If no value is specified, - /// Amazon S3 uses a newline character ('\n').

    - pub record_delimiter: Option, +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); } - -impl fmt::Debug for JSONOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("JSONOutput"); - if let Some(ref val) = self.record_delimiter { - d.field("record_delimiter", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); } - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct JSONType(Cow<'static, str>); - -impl JSONType { - pub const DOCUMENT: &'static str = "DOCUMENT"; - - pub const LINES: &'static str = "LINES"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); } - -impl From for JSONType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); } - -impl From for Cow<'static, str> { - fn from(s: JSONType) -> Self { - s.0 - } +if let Some(ref val) = self.content_language { +d.field("content_language", val); } - -impl FromStr for JSONType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.content_length { +d.field("content_length", val); } - -pub type KMSContext = String; - -pub type KeyCount = i32; - -pub type KeyMarker = String; - -pub type KeyPrefixEquals = String; - -pub type LambdaFunctionArn = String; - -///

    A container for specifying the configuration for Lambda notifications.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LambdaFunctionConfiguration { - ///

    The Amazon S3 bucket event for which to invoke the Lambda function. For more information, - /// see Supported - /// Event Types in the Amazon S3 User Guide.

    - pub events: EventList, - pub filter: Option, - pub id: Option, - ///

    The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the - /// specified event type occurs.

    - pub lambda_function_arn: LambdaFunctionArn, +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); } - -impl fmt::Debug for LambdaFunctionConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LambdaFunctionConfiguration"); - d.field("events", &self.events); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.field("lambda_function_arn", &self.lambda_function_arn); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.content_type { +d.field("content_type", val); } - -pub type LambdaFunctionConfigurationList = List; - -pub type LastModified = Timestamp; - -pub type LastModifiedTime = Timestamp; - -///

    Container for the expiration for the lifecycle of the object.

    -///

    For more information see, Managing your storage -/// lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleExpiration { - ///

    Indicates at what date the object is to be moved or deleted. The date value must conform - /// to the ISO 8601 format. The time is always midnight UTC.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub date: Option, - ///

    Indicates the lifetime, in days, of the objects that are subject to the rule. The value - /// must be a non-zero positive integer.

    - pub days: Option, - ///

    Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set - /// to true, the delete marker will be expired; if set to false the policy takes no action. - /// This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub expired_object_delete_marker: Option, +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); } - -impl fmt::Debug for LifecycleExpiration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LifecycleExpiration"); - if let Some(ref val) = self.date { - d.field("date", val); - } - if let Some(ref val) = self.days { - d.field("days", val); - } - if let Some(ref val) = self.expired_object_delete_marker { - d.field("expired_object_delete_marker", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.expires { +d.field("expires", val); } - -///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    -///

    For more information see, Managing your storage -/// lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRule { - pub abort_incomplete_multipart_upload: Option, - ///

    Specifies the expiration for the lifecycle of the object in the form of date, days and, - /// whether the object has a delete marker.

    - pub expiration: Option, - ///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A - /// Filter must have exactly one of Prefix, Tag, or - /// And specified. Filter is required if the - /// LifecycleRule does not contain a Prefix element.

    - /// - ///

    - /// Tag filters are not supported for directory buckets.

    - ///
    - pub filter: Option, - ///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    - pub id: Option, - pub noncurrent_version_expiration: Option, - ///

    Specifies the transition rule for the lifecycle rule that describes when noncurrent - /// objects transition to a specific storage class. If your bucket is versioning-enabled (or - /// versioning is suspended), you can set this action to request that Amazon S3 transition - /// noncurrent object versions to a specific storage class at a set period in the object's - /// lifetime.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub noncurrent_version_transitions: Option, - ///

    Prefix identifying one or more objects to which the rule applies. This is - /// no longer used; use Filter instead.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - ///

    If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not - /// currently being applied.

    - pub status: ExpirationStatus, - ///

    Specifies when an Amazon S3 object transitions to a specified storage class.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub transitions: Option, +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); } - -impl fmt::Debug for LifecycleRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LifecycleRule"); - if let Some(ref val) = self.abort_incomplete_multipart_upload { - d.field("abort_incomplete_multipart_upload", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - if let Some(ref val) = self.noncurrent_version_expiration { - d.field("noncurrent_version_expiration", val); - } - if let Some(ref val) = self.noncurrent_version_transitions { - d.field("noncurrent_version_transitions", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.field("status", &self.status); - if let Some(ref val) = self.transitions { - d.field("transitions", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); } - -///

    This is used in a Lifecycle Rule Filter to apply a logical AND to two or more -/// predicates. The Lifecycle Rule will apply to any object matching all of the predicates -/// configured inside the And operator.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRuleAndOperator { - ///

    Minimum object size to which the rule applies.

    - pub object_size_greater_than: Option, - ///

    Maximum object size to which the rule applies.

    - pub object_size_less_than: Option, - ///

    Prefix identifying one or more objects to which the rule applies.

    - pub prefix: Option, - ///

    All of these tags must exist in the object's tag set in order for the rule to - /// apply.

    - pub tags: Option, +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); } - -impl fmt::Debug for LifecycleRuleAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LifecycleRuleAndOperator"); - if let Some(ref val) = self.object_size_greater_than { - d.field("object_size_greater_than", val); - } - if let Some(ref val) = self.object_size_less_than { - d.field("object_size_less_than", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); } - -///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A -/// Filter can have exactly one of Prefix, Tag, -/// ObjectSizeGreaterThan, ObjectSizeLessThan, or And -/// specified. If the Filter element is left empty, the Lifecycle Rule applies to -/// all objects in the bucket.

    -#[derive(Default, Serialize, Deserialize)] -pub struct LifecycleRuleFilter { - pub and: Option, - pub cached_tags: CachedTags, - ///

    Minimum object size to which the rule applies.

    - pub object_size_greater_than: Option, - ///

    Maximum object size to which the rule applies.

    - pub object_size_less_than: Option, - ///

    Prefix identifying one or more objects to which the rule applies.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - ///

    This tag must exist in the object's tag set in order for the rule to apply.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub tag: Option, +if let Some(ref val) = self.if_match { +d.field("if_match", val); } - -impl fmt::Debug for LifecycleRuleFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LifecycleRuleFilter"); - if let Some(ref val) = self.and { - d.field("and", val); - } - d.field("cached_tags", &self.cached_tags); - if let Some(ref val) = self.object_size_greater_than { - d.field("object_size_greater_than", val); - } - if let Some(ref val) = self.object_size_less_than { - d.field("object_size_less_than", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tag { - d.field("tag", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); } - -#[allow(clippy::clone_on_copy)] -impl Clone for LifecycleRuleFilter { - fn clone(&self) -> Self { - Self { - and: self.and.clone(), - cached_tags: default(), - object_size_greater_than: self.object_size_greater_than.clone(), - object_size_less_than: self.object_size_less_than.clone(), - prefix: self.prefix.clone(), - tag: self.tag.clone(), - } - } +d.field("key", &self.key); +if let Some(ref val) = self.metadata { +d.field("metadata", val); } -impl PartialEq for LifecycleRuleFilter { - fn eq(&self, other: &Self) -> bool { - if self.and != other.and { - return false; - } - if self.object_size_greater_than != other.object_size_greater_than { - return false; - } - if self.object_size_less_than != other.object_size_less_than { - return false; - } - if self.prefix != other.prefix { - return false; - } - if self.tag != other.tag { - return false; - } - true - } +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); } - -pub type LifecycleRules = List; - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketAnalyticsConfigurationsInput { - ///

    The name of the bucket from which analytics configurations are retrieved.

    - pub bucket: BucketName, - ///

    The ContinuationToken that represents a placeholder from where this request - /// should begin.

    - pub continuation_token: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); } - -impl fmt::Debug for ListBucketAnalyticsConfigurationsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); } - -impl ListBucketAnalyticsConfigurationsInput { - #[must_use] - pub fn builder() -> builders::ListBucketAnalyticsConfigurationsInputBuilder { - default() - } +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketAnalyticsConfigurationsOutput { - ///

    The list of analytics configurations for a bucket.

    - pub analytics_configuration_list: Option, - ///

    The marker that is used as a starting point for this analytics configuration list - /// response. This value is present if it was sent in the request.

    - pub continuation_token: Option, - ///

    Indicates whether the returned list of analytics configurations is complete. A value of - /// true indicates that the list is not complete and the NextContinuationToken will be provided - /// for a subsequent request.

    - pub is_truncated: Option, - ///

    - /// NextContinuationToken is sent when isTruncated is true, which - /// indicates that there are more analytics configurations to list. The next request must - /// include this NextContinuationToken. The token is obfuscated and is not a - /// usable value.

    - pub next_continuation_token: Option, +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); } - -impl fmt::Debug for ListBucketAnalyticsConfigurationsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsOutput"); - if let Some(ref val) = self.analytics_configuration_list { - d.field("analytics_configuration_list", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketIntelligentTieringConfigurationsInput { - ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, - ///

    The ContinuationToken that represents a placeholder from where this request - /// should begin.

    - pub continuation_token: Option, +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); } - -impl fmt::Debug for ListBucketIntelligentTieringConfigurationsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); } - -impl ListBucketIntelligentTieringConfigurationsInput { - #[must_use] - pub fn builder() -> builders::ListBucketIntelligentTieringConfigurationsInputBuilder { - default() - } +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketIntelligentTieringConfigurationsOutput { - ///

    The ContinuationToken that represents a placeholder from where this request - /// should begin.

    - pub continuation_token: Option, - ///

    The list of S3 Intelligent-Tiering configurations for a bucket.

    - pub intelligent_tiering_configuration_list: Option, - ///

    Indicates whether the returned list of analytics configurations is complete. A value of - /// true indicates that the list is not complete and the - /// NextContinuationToken will be provided for a subsequent request.

    - pub is_truncated: Option, - ///

    The marker used to continue this inventory configuration listing. Use the - /// NextContinuationToken from this response to continue the listing in a - /// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    - pub next_continuation_token: Option, +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); } - -impl fmt::Debug for ListBucketIntelligentTieringConfigurationsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsOutput"); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.intelligent_tiering_configuration_list { - d.field("intelligent_tiering_configuration_list", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketInventoryConfigurationsInput { - ///

    The name of the bucket containing the inventory configurations to retrieve.

    - pub bucket: BucketName, - ///

    The marker used to continue an inventory configuration listing that has been truncated. - /// Use the NextContinuationToken from a previously truncated list response to - /// continue the listing. The continuation token is an opaque value that Amazon S3 - /// understands.

    - pub continuation_token: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +if let Some(ref val) = self.tagging { +d.field("tagging", val); } - -impl fmt::Debug for ListBucketInventoryConfigurationsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketInventoryConfigurationsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.version_id { +d.field("version_id", val); } - -impl ListBucketInventoryConfigurationsInput { - #[must_use] - pub fn builder() -> builders::ListBucketInventoryConfigurationsInputBuilder { - default() - } +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +if let Some(ref val) = self.write_offset_bytes { +d.field("write_offset_bytes", val); +} +d.finish_non_exhaustive() } - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketInventoryConfigurationsOutput { - ///

    If sent in the request, the marker that is used as a starting point for this inventory - /// configuration list response.

    - pub continuation_token: Option, - ///

    The list of inventory configurations for a bucket.

    - pub inventory_configuration_list: Option, - ///

    Tells whether the returned list of inventory configurations is complete. A value of true - /// indicates that the list is not complete and the NextContinuationToken is provided for a - /// subsequent request.

    - pub is_truncated: Option, - ///

    The marker used to continue this inventory configuration listing. Use the - /// NextContinuationToken from this response to continue the listing in a - /// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    - pub next_continuation_token: Option, } -impl fmt::Debug for ListBucketInventoryConfigurationsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketInventoryConfigurationsOutput"); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.inventory_configuration_list { - d.field("inventory_configuration_list", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - d.finish_non_exhaustive() - } +impl PutObjectInput { +#[must_use] +pub fn builder() -> builders::PutObjectInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct ListBucketMetricsConfigurationsInput { - ///

    The name of the bucket containing the metrics configurations to retrieve.

    +pub struct PutObjectLegalHoldInput { +///

    The bucket name containing the object that you want to place a legal hold on.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    The marker that is used to continue a metrics configuration listing that has been - /// truncated. Use the NextContinuationToken from a previously truncated list - /// response to continue the listing. The continuation token is an opaque value that Amazon S3 - /// understands.

    - pub continuation_token: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash for the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, +///

    The key name for the object that you want to place a legal hold on.

    + pub key: ObjectKey, +///

    Container element for the legal hold configuration you want to apply to the specified +/// object.

    + pub legal_hold: Option, + pub request_payer: Option, +///

    The version ID of the object that you want to place a legal hold on.

    + pub version_id: Option, } -impl fmt::Debug for ListBucketMetricsConfigurationsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketMetricsConfigurationsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutObjectLegalHoldInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectLegalHoldInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); } - -impl ListBucketMetricsConfigurationsInput { - #[must_use] - pub fn builder() -> builders::ListBucketMetricsConfigurationsInputBuilder { - default() - } +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketMetricsConfigurationsOutput { - ///

    The marker that is used as a starting point for this metrics configuration list - /// response. This value is present if it was sent in the request.

    - pub continuation_token: Option, - ///

    Indicates whether the returned list of metrics configurations is complete. A value of - /// true indicates that the list is not complete and the NextContinuationToken will be provided - /// for a subsequent request.

    - pub is_truncated: Option, - ///

    The list of metrics configurations for a bucket.

    - pub metrics_configuration_list: Option, - ///

    The marker used to continue a metrics configuration listing that has been truncated. Use - /// the NextContinuationToken from a previously truncated list response to - /// continue the listing. The continuation token is an opaque value that Amazon S3 - /// understands.

    - pub next_continuation_token: Option, +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); } - -impl fmt::Debug for ListBucketMetricsConfigurationsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketMetricsConfigurationsOutput"); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.metrics_configuration_list { - d.field("metrics_configuration_list", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - d.finish_non_exhaustive() - } +d.field("key", &self.key); +if let Some(ref val) = self.legal_hold { +d.field("legal_hold", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketsInput { - ///

    Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services - /// Region must be expressed according to the Amazon Web Services Region code, such as us-west-2 - /// for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services - /// Regions, see Regions and Endpoints.

    - /// - ///

    Requests made to a Regional endpoint that is different from the - /// bucket-region parameter are not supported. For example, if you want to - /// limit the response to your buckets in Region us-west-2, the request must be - /// made to an endpoint in Region us-west-2.

    - ///
    - pub bucket_region: Option, - ///

    - /// ContinuationToken indicates to Amazon S3 that the list is being continued on - /// this bucket with a token. ContinuationToken is obfuscated and is not a real - /// key. You can use this ContinuationToken for pagination of the list results.

    - ///

    Length Constraints: Minimum length of 0. Maximum length of 1024.

    - ///

    Required: No.

    - /// - ///

    If you specify the bucket-region, prefix, or continuation-token - /// query parameters without using max-buckets to set the maximum number of buckets returned in the response, - /// Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

    - ///
    - pub continuation_token: Option, - ///

    Maximum number of buckets to be returned in response. When the number is more than the - /// count of buckets that are owned by an Amazon Web Services account, return all the buckets in - /// response.

    - pub max_buckets: Option, - ///

    Limits the response to bucket names that begin with the specified bucket name - /// prefix.

    - pub prefix: Option, +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); } - -impl fmt::Debug for ListBucketsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketsInput"); - if let Some(ref val) = self.bucket_region { - d.field("bucket_region", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.max_buckets { - d.field("max_buckets", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.version_id { +d.field("version_id", val); } - -impl ListBucketsInput { - #[must_use] - pub fn builder() -> builders::ListBucketsInputBuilder { - default() - } +d.finish_non_exhaustive() } - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketsOutput { - ///

    The list of buckets owned by the requester.

    - pub buckets: Option, - ///

    - /// ContinuationToken is included in the response when there are more buckets - /// that can be listed with pagination. The next ListBuckets request to Amazon S3 can - /// be continued with this ContinuationToken. ContinuationToken is - /// obfuscated and is not a real bucket.

    - pub continuation_token: Option, - ///

    The owner of the buckets listed.

    - pub owner: Option, - ///

    If Prefix was sent with the request, it is included in the response.

    - ///

    All bucket names in the response begin with the specified bucket name prefix.

    - pub prefix: Option, } -impl fmt::Debug for ListBucketsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketsOutput"); - if let Some(ref val) = self.buckets { - d.field("buckets", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +impl PutObjectLegalHoldInput { +#[must_use] +pub fn builder() -> builders::PutObjectLegalHoldInputBuilder { +default() } - -#[derive(Clone, Default, PartialEq)] -pub struct ListDirectoryBucketsInput { - ///

    - /// ContinuationToken indicates to Amazon S3 that the list is being continued on - /// buckets in this account with a token. ContinuationToken is obfuscated and is - /// not a real bucket name. You can use this ContinuationToken for the pagination - /// of the list results.

    - pub continuation_token: Option, - ///

    Maximum number of buckets to be returned in response. When the number is more than the - /// count of buckets that are owned by an Amazon Web Services account, return all the buckets in - /// response.

    - pub max_directory_buckets: Option, } -impl fmt::Debug for ListDirectoryBucketsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListDirectoryBucketsInput"); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.max_directory_buckets { - d.field("max_directory_buckets", val); - } - d.finish_non_exhaustive() - } +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLegalHoldOutput { + pub request_charged: Option, } -impl ListDirectoryBucketsInput { - #[must_use] - pub fn builder() -> builders::ListDirectoryBucketsInputBuilder { - default() - } +impl fmt::Debug for PutObjectLegalHoldOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectLegalHoldOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct ListDirectoryBucketsOutput { - ///

    The list of buckets owned by the requester.

    - pub buckets: Option, - ///

    If ContinuationToken was sent with the request, it is included in the - /// response. You can use the returned ContinuationToken for pagination of the - /// list response.

    - pub continuation_token: Option, +d.finish_non_exhaustive() } - -impl fmt::Debug for ListDirectoryBucketsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListDirectoryBucketsOutput"); - if let Some(ref val) = self.buckets { - d.field("buckets", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - d.finish_non_exhaustive() - } } + #[derive(Clone, Default, PartialEq)] -pub struct ListMultipartUploadsInput { - ///

    The name of the bucket to which the multipart upload was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +pub struct PutObjectLockConfigurationInput { +///

    The bucket whose Object Lock configuration you want to create or replace.

    pub bucket: BucketName, - ///

    Character you use to group keys.

    - ///

    All keys that contain the same string between the prefix, if specified, and the first - /// occurrence of the delimiter after the prefix are grouped under a single result element, - /// CommonPrefixes. If you don't specify the prefix parameter, then the - /// substring starts at the beginning of the key. The keys that are grouped under - /// CommonPrefixes result element are not returned elsewhere in the - /// response.

    - /// - ///

    - /// Directory buckets - For directory buckets, / is the only supported delimiter.

    - ///
    - pub delimiter: Option, - pub encoding_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash for the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    Specifies the multipart upload after which listing should begin.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - For - /// general purpose buckets, key-marker is an object key. Together with - /// upload-id-marker, this parameter specifies the multipart upload - /// after which listing should begin.

      - ///

      If upload-id-marker is not specified, only the keys - /// lexicographically greater than the specified key-marker will be - /// included in the list.

      - ///

      If upload-id-marker is specified, any multipart uploads for a key - /// equal to the key-marker might also be included, provided those - /// multipart uploads have upload IDs lexicographically greater than the specified - /// upload-id-marker.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - For - /// directory buckets, key-marker is obfuscated and isn't a real object - /// key. The upload-id-marker parameter isn't supported by - /// directory buckets. To list the additional multipart uploads, you only need to set - /// the value of key-marker to the NextKeyMarker value from - /// the previous response.

      - ///

      In the ListMultipartUploads response, the multipart uploads aren't - /// sorted lexicographically based on the object keys. - /// - ///

      - ///
    • - ///
    - ///
    - pub key_marker: Option, - ///

    Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response - /// body. 1,000 is the maximum number of uploads that can be returned in a response.

    - pub max_uploads: Option, - ///

    Lists in-progress uploads only for those keys that begin with the specified prefix. You - /// can use prefixes to separate a bucket into different grouping of keys. (You can think of - /// using prefix to make groups in the same way that you'd use a folder in a file - /// system.)

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub prefix: Option, +///

    The Object Lock configuration that you want to apply to the specified bucket.

    + pub object_lock_configuration: Option, pub request_payer: Option, - ///

    Together with key-marker, specifies the multipart upload after which listing should - /// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. - /// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the - /// list only if they have an upload ID lexicographically greater than the specified - /// upload-id-marker.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub upload_id_marker: Option, +///

    A token to allow Object Lock to be enabled for an existing bucket.

    + pub token: Option, } -impl fmt::Debug for ListMultipartUploadsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListMultipartUploadsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.key_marker { - d.field("key_marker", val); - } - if let Some(ref val) = self.max_uploads { - d.field("max_uploads", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.upload_id_marker { - d.field("upload_id_marker", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutObjectLockConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectLockConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.object_lock_configuration { +d.field("object_lock_configuration", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.token { +d.field("token", val); +} +d.finish_non_exhaustive() +} } -impl ListMultipartUploadsInput { - #[must_use] - pub fn builder() -> builders::ListMultipartUploadsInputBuilder { - default() - } +impl PutObjectLockConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutObjectLockConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct ListMultipartUploadsOutput { - ///

    The name of the bucket to which the multipart upload was initiated. Does not return the - /// access point ARN or access point alias if used.

    - pub bucket: Option, - ///

    If you specify a delimiter in the request, then the result returns each distinct key - /// prefix containing the delimiter in a CommonPrefixes element. The distinct key - /// prefixes are returned in the Prefix child element.

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub common_prefixes: Option, - ///

    Contains the delimiter you specified in the request. If you don't specify a delimiter in - /// your request, this element is absent from the response.

    - /// - ///

    - /// Directory buckets - For directory buckets, / is the only supported delimiter.

    - ///
    - pub delimiter: Option, - ///

    Encoding type used by Amazon S3 to encode object keys in the response.

    - ///

    If you specify the encoding-type request parameter, Amazon S3 includes this - /// element in the response, and returns encoded key name values in the following response - /// elements:

    - ///

    - /// Delimiter, KeyMarker, Prefix, - /// NextKeyMarker, Key.

    - pub encoding_type: Option, - ///

    Indicates whether the returned list of multipart uploads is truncated. A value of true - /// indicates that the list was truncated. The list can be truncated if the number of multipart - /// uploads exceeds the limit allowed or specified by max uploads.

    - pub is_truncated: Option, - ///

    The key at or after which the listing began.

    - pub key_marker: Option, - ///

    Maximum number of multipart uploads that could have been included in the - /// response.

    - pub max_uploads: Option, - ///

    When a list is truncated, this element specifies the value that should be used for the - /// key-marker request parameter in a subsequent request.

    - pub next_key_marker: Option, - ///

    When a list is truncated, this element specifies the value that should be used for the - /// upload-id-marker request parameter in a subsequent request.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub next_upload_id_marker: Option, - ///

    When a prefix is provided in the request, this field contains the specified prefix. The - /// result contains only keys starting with the specified prefix.

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub prefix: Option, +pub struct PutObjectLockConfigurationOutput { pub request_charged: Option, - ///

    Together with key-marker, specifies the multipart upload after which listing should - /// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. - /// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the - /// list only if they have an upload ID lexicographically greater than the specified - /// upload-id-marker.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub upload_id_marker: Option, - ///

    Container for elements related to a particular multipart upload. A response can contain - /// zero or more Upload elements.

    - pub uploads: Option, } -impl fmt::Debug for ListMultipartUploadsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListMultipartUploadsOutput"); - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.common_prefixes { - d.field("common_prefixes", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.key_marker { - d.field("key_marker", val); - } - if let Some(ref val) = self.max_uploads { - d.field("max_uploads", val); - } - if let Some(ref val) = self.next_key_marker { - d.field("next_key_marker", val); - } - if let Some(ref val) = self.next_upload_id_marker { - d.field("next_upload_id_marker", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.upload_id_marker { - d.field("upload_id_marker", val); - } - if let Some(ref val) = self.uploads { - d.field("uploads", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutObjectLockConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectLockConfigurationOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectVersionsInput { - ///

    The bucket name that contains the objects.

    - pub bucket: BucketName, - ///

    A delimiter is a character that you specify to group keys. All keys that contain the - /// same string between the prefix and the first occurrence of the delimiter are - /// grouped under a single result element in CommonPrefixes. These groups are - /// counted as one result against the max-keys limitation. These keys are not - /// returned elsewhere in the response.

    - pub delimiter: Option, - pub encoding_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Specifies the key to start with when listing objects in a bucket.

    - pub key_marker: Option, - ///

    Sets the maximum number of keys returned in the response. By default, the action returns - /// up to 1,000 key names. The response might contain fewer keys but will never contain more. - /// If additional keys satisfy the search criteria, but were not returned because - /// max-keys was exceeded, the response contains - /// true. To return the additional keys, - /// see key-marker and version-id-marker.

    - pub max_keys: Option, - ///

    Specifies the optional fields that you want returned in the response. Fields that you do - /// not specify are not returned.

    - pub optional_object_attributes: Option, - ///

    Use this parameter to select only those keys that begin with the specified prefix. You - /// can use prefixes to separate a bucket into different groupings of keys. (You can think of - /// using prefix to make groups in the same way that you'd use a folder in a file - /// system.) You can use prefix with delimiter to roll up numerous - /// objects into a single result under CommonPrefixes.

    - pub prefix: Option, - pub request_payer: Option, - ///

    Specifies the object version you want to start listing from.

    - pub version_id_marker: Option, +d.finish_non_exhaustive() } - -impl fmt::Debug for ListObjectVersionsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectVersionsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.key_marker { - d.field("key_marker", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.optional_object_attributes { - d.field("optional_object_attributes", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id_marker { - d.field("version_id_marker", val); - } - d.finish_non_exhaustive() - } } -impl ListObjectVersionsInput { - #[must_use] - pub fn builder() -> builders::ListObjectVersionsInputBuilder { - default() - } -} #[derive(Clone, Default, PartialEq)] -pub struct ListObjectVersionsOutput { - ///

    All of the keys rolled up into a common prefix count as a single return when calculating - /// the number of returns.

    - pub common_prefixes: Option, - ///

    Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

    - pub delete_markers: Option, - ///

    The delimiter grouping the included keys. A delimiter is a character that you specify to - /// group keys. All keys that contain the same string between the prefix and the first - /// occurrence of the delimiter are grouped under a single result element in - /// CommonPrefixes. These groups are counted as one result against the - /// max-keys limitation. These keys are not returned elsewhere in the - /// response.

    - pub delimiter: Option, - ///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    - ///

    If you specify the encoding-type request parameter, Amazon S3 includes this - /// element in the response, and returns encoded key name values in the following response - /// elements:

    - ///

    - /// KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

    - pub encoding_type: Option, - ///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search - /// criteria. If your results were truncated, you can make a follow-up paginated request by - /// using the NextKeyMarker and NextVersionIdMarker response - /// parameters as a starting place in another request to return the rest of the results.

    - pub is_truncated: Option, - ///

    Marks the last key returned in a truncated response.

    - pub key_marker: Option, - ///

    Specifies the maximum number of objects to return.

    - pub max_keys: Option, - ///

    The bucket name.

    - pub name: Option, - ///

    When the number of responses exceeds the value of MaxKeys, - /// NextKeyMarker specifies the first key not returned that satisfies the - /// search criteria. Use this value for the key-marker request parameter in a subsequent - /// request.

    - pub next_key_marker: Option, - ///

    When the number of responses exceeds the value of MaxKeys, - /// NextVersionIdMarker specifies the first object version not returned that - /// satisfies the search criteria. Use this value for the version-id-marker - /// request parameter in a subsequent request.

    - pub next_version_id_marker: Option, - ///

    Selects objects that start with the value supplied by this parameter.

    - pub prefix: Option, +pub struct PutObjectOutput { +///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header +/// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it +/// was uploaded without a checksum (and Amazon S3 added the default checksum, +/// CRC64NVME, to the uploaded object). For more information about how +/// checksums are calculated with multipart uploads, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    This header specifies the checksum type of the object, which determines how part-level +/// checksums are combined to create an object-level checksum for multipart objects. For +/// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a +/// data integrity check to verify that the checksum type that is received is the same checksum +/// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    Entity tag for the uploaded object.

    +///

    +/// General purpose buckets - To ensure that data is not +/// corrupted traversing the network, for objects where the ETag is the MD5 digest of the +/// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned +/// ETag to the calculated MD5 value.

    +///

    +/// Directory buckets - The ETag for the object in +/// a directory bucket isn't the MD5 digest of the object.

    + pub e_tag: Option, +///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, +/// the response includes this header. It includes the expiry-date and +/// rule-id key-value pairs that provide information about object expiration. +/// The value of the rule-id is URL-encoded.

    +/// +///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    +///
    + pub expiration: Option, pub request_charged: Option, - ///

    Marks the last version of the key returned in a truncated response.

    - pub version_id_marker: Option, - ///

    Container for version information.

    - pub versions: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets +/// passed on to Amazon Web Services KMS for future GetObject +/// operations on this object.

    + pub ssekms_encryption_context: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, +///

    +/// The size of the object in bytes. This value is only be present if you append to an object. +///

    +/// +///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    +///
    + pub size: Option, +///

    Version ID of the object.

    +///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID +/// for the object being stored. Amazon S3 returns this ID in the response. When you enable +/// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object +/// simultaneously, it stores all of the objects. For more information about versioning, see +/// Adding Objects to +/// Versioning-Enabled Buckets in the Amazon S3 User Guide. For +/// information about returning the versioning state of a bucket, see GetBucketVersioning.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, } -impl fmt::Debug for ListObjectVersionsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectVersionsOutput"); - if let Some(ref val) = self.common_prefixes { - d.field("common_prefixes", val); - } - if let Some(ref val) = self.delete_markers { - d.field("delete_markers", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.key_marker { - d.field("key_marker", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.next_key_marker { - d.field("next_key_marker", val); - } - if let Some(ref val) = self.next_version_id_marker { - d.field("next_version_id_marker", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.version_id_marker { - d.field("version_id_marker", val); - } - if let Some(ref val) = self.versions { - d.field("versions", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] -pub struct ListObjectsInput { - ///

    The name of the bucket containing the objects.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +pub struct PutObjectRetentionInput { +///

    The bucket name that contains the object you want to apply this Object Retention +/// configuration to.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    A delimiter is a character that you use to group keys.

    - pub delimiter: Option, - pub encoding_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    Indicates whether this action should bypass Governance-mode restrictions.

    + pub bypass_governance_retention: Option, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash for the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this - /// specified key. Marker can be any key in the bucket.

    - pub marker: Option, - ///

    Sets the maximum number of keys returned in the response. By default, the action returns - /// up to 1,000 key names. The response might contain fewer keys but will never contain more. - ///

    - pub max_keys: Option, - ///

    Specifies the optional fields that you want returned in the response. Fields that you do - /// not specify are not returned.

    - pub optional_object_attributes: Option, - ///

    Limits the response to keys that begin with the specified prefix.

    - pub prefix: Option, - ///

    Confirms that the requester knows that she or he will be charged for the list objects - /// request. Bucket owners need not specify this parameter in their requests.

    +///

    The key name for the object that you want to apply this Object Retention configuration +/// to.

    + pub key: ObjectKey, pub request_payer: Option, +///

    The container element for the Object Retention configuration.

    + pub retention: Option, +///

    The version ID for the object that you want to apply this Object Retention configuration +/// to.

    + pub version_id: Option, } -impl fmt::Debug for ListObjectsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.marker { - d.field("marker", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.optional_object_attributes { - d.field("optional_object_attributes", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutObjectRetentionInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectRetentionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bypass_governance_retention { +d.field("bypass_governance_retention", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.retention { +d.field("retention", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } -impl ListObjectsInput { - #[must_use] - pub fn builder() -> builders::ListObjectsInputBuilder { - default() - } +impl PutObjectRetentionInput { +#[must_use] +pub fn builder() -> builders::PutObjectRetentionInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct ListObjectsOutput { - ///

    The bucket name.

    - pub name: Option, - ///

    Keys that begin with the indicated prefix.

    - pub prefix: Option, - ///

    Indicates where in the bucket listing begins. Marker is included in the response if it - /// was sent with the request.

    - pub marker: Option, - ///

    The maximum number of keys returned in the response body.

    - pub max_keys: Option, - ///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search - /// criteria.

    - pub is_truncated: Option, - ///

    Metadata about each object returned.

    - pub contents: Option, - ///

    All of the keys (up to 1,000) rolled up in a common prefix count as a single return when - /// calculating the number of returns.

    - ///

    A response can contain CommonPrefixes only if you specify a - /// delimiter.

    - ///

    - /// CommonPrefixes contains all (if there are any) keys between - /// Prefix and the next occurrence of the string specified by the - /// delimiter.

    - ///

    - /// CommonPrefixes lists keys that act like subdirectories in the directory - /// specified by Prefix.

    - ///

    For example, if the prefix is notes/ and the delimiter is a slash - /// (/), as in notes/summer/july, the common prefix is - /// notes/summer/. All of the keys that roll up into a common prefix count as a - /// single return when calculating the number of returns.

    - pub common_prefixes: Option, - ///

    Causes keys that contain the same string between the prefix and the first occurrence of - /// the delimiter to be rolled up into a single result element in the - /// CommonPrefixes collection. These rolled-up keys are not returned elsewhere - /// in the response. Each rolled-up result counts as only one return against the - /// MaxKeys value.

    - pub delimiter: Option, - ///

    When the response is truncated (the IsTruncated element value in the - /// response is true), you can use the key name in this field as the - /// marker parameter in the subsequent request to get the next set of objects. - /// Amazon S3 lists objects in alphabetical order.

    - /// - ///

    This element is returned only if you have the delimiter request - /// parameter specified. If the response does not include the NextMarker - /// element and it is truncated, you can use the value of the last Key element - /// in the response as the marker parameter in the subsequent request to get - /// the next set of object keys.

    - ///
    - pub next_marker: Option, - ///

    Encoding type used by Amazon S3 to encode the object keys in the response. - /// Responses are encoded only in UTF-8. An object key can contain any Unicode character. - /// However, the XML 1.0 parser can't parse certain characters, such as characters with an - /// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this - /// parameter to request that Amazon S3 encode the keys in the response. For more information about - /// characters to avoid in object key names, see Object key naming - /// guidelines.

    - /// - ///

    When using the URL encoding type, non-ASCII characters that are used in an object's - /// key name will be percent-encoded according to UTF-8 code values. For example, the object - /// test_file(3).png will appear as - /// test_file%283%29.png.

    - ///
    - pub encoding_type: Option, +pub struct PutObjectRetentionOutput { pub request_charged: Option, } -impl fmt::Debug for ListObjectsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectsOutput"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.marker { - d.field("marker", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.contents { - d.field("contents", val); - } - if let Some(ref val) = self.common_prefixes { - d.field("common_prefixes", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.next_marker { - d.field("next_marker", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutObjectRetentionOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectRetentionOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} } -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsV2Input { - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + +#[derive(Clone, PartialEq)] +pub struct PutObjectTaggingInput { +///

    The bucket name containing the object.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    - /// ContinuationToken indicates to Amazon S3 that the list is being continued on - /// this bucket with a token. ContinuationToken is obfuscated and is not a real - /// key. You can use this ContinuationToken for pagination of the list results. - ///

    - pub continuation_token: Option, - ///

    A delimiter is a character that you use to group keys.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - For directory buckets, / is the only supported delimiter.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - When you query - /// ListObjectsV2 with a delimiter during in-progress multipart - /// uploads, the CommonPrefixes response parameter contains the prefixes - /// that are associated with the in-progress multipart uploads. For more information - /// about multipart uploads, see Multipart Upload Overview in - /// the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - pub delimiter: Option, - ///

    Encoding type used by Amazon S3 to encode the object keys in the response. - /// Responses are encoded only in UTF-8. An object key can contain any Unicode character. - /// However, the XML 1.0 parser can't parse certain characters, such as characters with an - /// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this - /// parameter to request that Amazon S3 encode the keys in the response. For more information about - /// characters to avoid in object key names, see Object key naming - /// guidelines.

    - /// - ///

    When using the URL encoding type, non-ASCII characters that are used in an object's - /// key name will be percent-encoded according to UTF-8 code values. For example, the object - /// test_file(3).png will appear as - /// test_file%283%29.png.

    - ///
    - pub encoding_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash for the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The owner field is not present in ListObjectsV2 by default. If you want to - /// return the owner field with each key in the result, then set the FetchOwner - /// field to true.

    - /// - ///

    - /// Directory buckets - For directory buckets, - /// the bucket owner is returned as the object owner for all objects.

    - ///
    - pub fetch_owner: Option, - ///

    Sets the maximum number of keys returned in the response. By default, the action returns - /// up to 1,000 key names. The response might contain fewer keys but will never contain - /// more.

    - pub max_keys: Option, - ///

    Specifies the optional fields that you want returned in the response. Fields that you do - /// not specify are not returned.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub optional_object_attributes: Option, - ///

    Limits the response to keys that begin with the specified prefix.

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub prefix: Option, - ///

    Confirms that the requester knows that she or he will be charged for the list objects - /// request in V2 style. Bucket owners need not specify this parameter in their - /// requests.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Name of the object key.

    + pub key: ObjectKey, pub request_payer: Option, - ///

    StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this - /// specified key. StartAfter can be any key in the bucket.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub start_after: Option, +///

    Container for the TagSet and Tag elements

    + pub tagging: Tagging, +///

    The versionId of the object that the tag-set will be added to.

    + pub version_id: Option, } -impl fmt::Debug for ListObjectsV2Input { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectsV2Input"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.fetch_owner { - d.field("fetch_owner", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.optional_object_attributes { - d.field("optional_object_attributes", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.start_after { - d.field("start_after", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutObjectTaggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.field("tagging", &self.tagging); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } -impl ListObjectsV2Input { - #[must_use] - pub fn builder() -> builders::ListObjectsV2InputBuilder { - default() - } +impl PutObjectTaggingInput { +#[must_use] +pub fn builder() -> builders::PutObjectTaggingInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct ListObjectsV2Output { - ///

    The bucket name.

    - pub name: Option, - ///

    Keys that begin with the indicated prefix.

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub prefix: Option, - ///

    Sets the maximum number of keys returned in the response. By default, the action returns - /// up to 1,000 key names. The response might contain fewer keys but will never contain - /// more.

    - pub max_keys: Option, - ///

    - /// KeyCount is the number of keys returned with this request. - /// KeyCount will always be less than or equal to the MaxKeys - /// field. For example, if you ask for 50 keys, your result will include 50 keys or - /// fewer.

    - pub key_count: Option, - ///

    If ContinuationToken was sent with the request, it is included in the - /// response. You can use the returned ContinuationToken for pagination of the - /// list response. You can use this ContinuationToken for pagination of the list - /// results.

    - pub continuation_token: Option, - ///

    Set to false if all of the results were returned. Set to true - /// if more keys are available to return. If the number of results exceeds that specified by - /// MaxKeys, all of the results might not be returned.

    - pub is_truncated: Option, - ///

    - /// NextContinuationToken is sent when isTruncated is true, which - /// means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 - /// can be continued with this NextContinuationToken. - /// NextContinuationToken is obfuscated and is not a real key

    - pub next_continuation_token: Option, - ///

    Metadata about each object returned.

    - pub contents: Option, - ///

    All of the keys (up to 1,000) that share the same prefix are grouped together. When - /// counting the total numbers of returns by this API operation, this group of keys is - /// considered as one item.

    - ///

    A response can contain CommonPrefixes only if you specify a - /// delimiter.

    - ///

    - /// CommonPrefixes contains all (if there are any) keys between - /// Prefix and the next occurrence of the string specified by a - /// delimiter.

    - ///

    - /// CommonPrefixes lists keys that act like subdirectories in the directory - /// specified by Prefix.

    - ///

    For example, if the prefix is notes/ and the delimiter is a slash - /// (/) as in notes/summer/july, the common prefix is - /// notes/summer/. All of the keys that roll up into a common prefix count as a - /// single return when calculating the number of returns.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - When you query - /// ListObjectsV2 with a delimiter during in-progress multipart - /// uploads, the CommonPrefixes response parameter contains the prefixes - /// that are associated with the in-progress multipart uploads. For more information - /// about multipart uploads, see Multipart Upload Overview in - /// the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - pub common_prefixes: Option, - ///

    Causes keys that contain the same string between the prefix and the first - /// occurrence of the delimiter to be rolled up into a single result element in the - /// CommonPrefixes collection. These rolled-up keys are not returned elsewhere - /// in the response. Each rolled-up result counts as only one return against the - /// MaxKeys value.

    - /// - ///

    - /// Directory buckets - For directory buckets, / is the only supported delimiter.

    - ///
    - pub delimiter: Option, - ///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    - ///

    If you specify the encoding-type request parameter, Amazon S3 includes this - /// element in the response, and returns encoded key name values in the following response - /// elements:

    - ///

    - /// Delimiter, Prefix, Key, and StartAfter.

    - pub encoding_type: Option, - ///

    If StartAfter was sent with the request, it is included in the response.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub start_after: Option, - pub request_charged: Option, +pub struct PutObjectTaggingOutput { +///

    The versionId of the object the tag-set was added to.

    + pub version_id: Option, } -impl fmt::Debug for ListObjectsV2Output { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectsV2Output"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.key_count { - d.field("key_count", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - if let Some(ref val) = self.contents { - d.field("contents", val); - } - if let Some(ref val) = self.common_prefixes { - d.field("common_prefixes", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.start_after { - d.field("start_after", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutObjectTaggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectTaggingOutput"); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } -#[derive(Clone, Default, PartialEq)] -pub struct ListPartsInput { - ///

    The name of the bucket to which the parts are being uploaded.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + +#[derive(Clone, PartialEq)] +pub struct PutPublicAccessBlockInput { +///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want +/// to set.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash of the PutPublicAccessBlock request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, - ///

    Sets the maximum number of parts to return.

    - pub max_parts: Option, - ///

    Specifies the part after which listing should begin. Only parts with higher part numbers - /// will be listed.

    - pub part_number_marker: Option, - pub request_payer: Option, - ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created - /// using a checksum algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. - /// For more information, see - /// Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum - /// algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Upload ID identifying the multipart upload whose parts are being listed.

    - pub upload_id: MultipartUploadId, +///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 +/// bucket. You can enable the configuration options in any combination. For more information +/// about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    + pub public_access_block_configuration: PublicAccessBlockConfiguration, } -impl fmt::Debug for ListPartsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListPartsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.max_parts { - d.field("max_parts", val); - } - if let Some(ref val) = self.part_number_marker { - d.field("part_number_marker", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } +impl fmt::Debug for PutPublicAccessBlockInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutPublicAccessBlockInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("public_access_block_configuration", &self.public_access_block_configuration); +d.finish_non_exhaustive() +} } -impl ListPartsInput { - #[must_use] - pub fn builder() -> builders::ListPartsInputBuilder { - default() - } +impl PutPublicAccessBlockInput { +#[must_use] +pub fn builder() -> builders::PutPublicAccessBlockInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct ListPartsOutput { - ///

    If the bucket has a lifecycle rule configured with an action to abort incomplete - /// multipart uploads and the prefix in the lifecycle rule matches the object name in the - /// request, then the response includes this header indicating when the initiated multipart - /// upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle - /// Configuration.

    - ///

    The response will also include the x-amz-abort-rule-id header that will - /// provide the ID of the lifecycle configuration rule that defines this action.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub abort_date: Option, - ///

    This header is returned along with the x-amz-abort-date header. It - /// identifies applicable lifecycle configuration rule that defines the action to abort - /// incomplete multipart uploads.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub abort_rule_id: Option, - ///

    The name of the bucket to which the multipart upload was initiated. Does not return the - /// access point ARN or access point alias if used.

    - pub bucket: Option, - ///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, - ///

    The checksum type, which determines how part-level checksums are combined to create an - /// object-level checksum for multipart objects. You can use this header response to verify - /// that the checksum type that is received is the same checksum type that was specified in - /// CreateMultipartUpload request. For more - /// information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Container element that identifies who initiated the multipart upload. If the initiator - /// is an Amazon Web Services account, this element provides the same information as the Owner - /// element. If the initiator is an IAM User, this element provides the user ARN and display - /// name.

    - pub initiator: Option, - ///

    Indicates whether the returned list of parts is truncated. A true value indicates that - /// the list was truncated. A list can be truncated if the number of parts exceeds the limit - /// returned in the MaxParts element.

    - pub is_truncated: Option, - ///

    Object key for which the multipart upload was initiated.

    - pub key: Option, - ///

    Maximum number of parts that were allowed in the response.

    - pub max_parts: Option, - ///

    When a list is truncated, this element specifies the last part in the list, as well as - /// the value to use for the part-number-marker request parameter in a subsequent - /// request.

    - pub next_part_number_marker: Option, - ///

    Container element that identifies the object owner, after the object is created. If - /// multipart upload is initiated by an IAM user, this element provides the parent account ID - /// and display name.

    - /// - ///

    - /// Directory buckets - The bucket owner is - /// returned as the object owner for all the parts.

    - ///
    - pub owner: Option, - ///

    Specifies the part after which listing should begin. Only parts with higher part numbers - /// will be listed.

    - pub part_number_marker: Option, - ///

    Container for elements related to a particular part. A response can contain zero or more - /// Part elements.

    - pub parts: Option, - pub request_charged: Option, - ///

    The class of storage used to store the uploaded object.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, - ///

    Upload ID identifying the multipart upload whose parts are being listed.

    - pub upload_id: Option, +pub struct PutPublicAccessBlockOutput { } -impl fmt::Debug for ListPartsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListPartsOutput"); - if let Some(ref val) = self.abort_date { - d.field("abort_date", val); - } - if let Some(ref val) = self.abort_rule_id { - d.field("abort_rule_id", val); - } - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.initiator { - d.field("initiator", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.max_parts { - d.field("max_parts", val); - } - if let Some(ref val) = self.next_part_number_marker { - d.field("next_part_number_marker", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.part_number_marker { - d.field("part_number_marker", val); - } - if let Some(ref val) = self.parts { - d.field("parts", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.upload_id { - d.field("upload_id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for PutPublicAccessBlockOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutPublicAccessBlockOutput"); +d.finish_non_exhaustive() +} } -pub type Location = String; -///

    Specifies the location where the bucket will be created.

    -///

    For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see -/// Working with directory buckets in the Amazon S3 User Guide.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    +pub type QueueArn = String; + +///

    Specifies the configuration for publishing messages to an Amazon Simple Queue Service +/// (Amazon SQS) queue when Amazon S3 detects specified events.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LocationInfo { - ///

    The name of the location where the bucket will be created.

    - ///

    For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

    - pub name: Option, - ///

    The type of location where the bucket will be created.

    - pub type_: Option, +pub struct QueueConfiguration { +///

    A collection of bucket events for which to send notifications

    + pub events: EventList, + pub filter: Option, + pub id: Option, +///

    The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message +/// when it detects events of the specified type.

    + pub queue_arn: QueueArn, } -impl fmt::Debug for LocationInfo { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LocationInfo"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.type_ { - d.field("type_", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for QueueConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("QueueConfiguration"); +d.field("events", &self.events); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.field("queue_arn", &self.queue_arn); +d.finish_non_exhaustive() +} } -pub type LocationNameAsString = String; -pub type LocationPrefix = String; +pub type QueueConfigurationList = List; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct LocationType(Cow<'static, str>); +pub type Quiet = bool; -impl LocationType { - pub const AVAILABILITY_ZONE: &'static str = "AvailabilityZone"; +pub type QuoteCharacter = String; - pub const LOCAL_ZONE: &'static str = "LocalZone"; +pub type QuoteEscapeCharacter = String; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct QuoteFields(Cow<'static, str>); - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +impl QuoteFields { +pub const ALWAYS: &'static str = "ALWAYS"; -impl From for LocationType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} +pub const ASNEEDED: &'static str = "ASNEEDED"; -impl From for Cow<'static, str> { - fn from(s: LocationType) -> Self { - s.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl FromStr for LocationType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -///

    Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys -/// for a bucket. For more information, see PUT Bucket logging in the -/// Amazon S3 API Reference.

    -#[derive(Clone, Default, PartialEq)] -pub struct LoggingEnabled { - ///

    Specifies the bucket where you want Amazon S3 to store server access logs. You can have your - /// logs delivered to any bucket that you own, including the same bucket that is being logged. - /// You can also configure multiple buckets to deliver their logs to the same target bucket. In - /// this case, you should choose a different TargetPrefix for each source bucket - /// so that the delivered log files can be distinguished by key.

    - pub target_bucket: TargetBucket, - ///

    Container for granting information.

    - ///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support - /// target grants. For more information, see Permissions for server access log delivery in the - /// Amazon S3 User Guide.

    - pub target_grants: Option, - ///

    Amazon S3 key format for log objects.

    - pub target_object_key_format: Option, - ///

    A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a - /// single bucket, you can use a prefix to distinguish which log files came from which - /// bucket.

    - pub target_prefix: TargetPrefix, } -impl fmt::Debug for LoggingEnabled { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LoggingEnabled"); - d.field("target_bucket", &self.target_bucket); - if let Some(ref val) = self.target_grants { - d.field("target_grants", val); - } - if let Some(ref val) = self.target_object_key_format { - d.field("target_object_key_format", val); - } - d.field("target_prefix", &self.target_prefix); - d.finish_non_exhaustive() - } +impl From for QuoteFields { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -pub type MFA = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct MFADelete(Cow<'static, str>); +impl From for Cow<'static, str> { +fn from(s: QuoteFields) -> Self { +s.0 +} +} -impl MFADelete { - pub const DISABLED: &'static str = "Disabled"; +impl FromStr for QuoteFields { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} - pub const ENABLED: &'static str = "Enabled"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub type RecordDelimiter = String; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    The container for the records event.

    +#[derive(Clone, Default, PartialEq)] +pub struct RecordsEvent { +///

    The byte array of partial, one or more result records. S3 Select doesn't guarantee that +/// a record will be self-contained in one record frame. To ensure continuous streaming of +/// data, S3 Select might split the same record across multiple record frames instead of +/// aggregating the results in memory. Some S3 clients (for example, the SDK for Java) handle this behavior by creating a ByteStream out of the response by +/// default. Other clients might not handle this behavior by default. In those cases, you must +/// aggregate the results on the client side and parse the response.

    + pub payload: Option, } -impl From for MFADelete { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for RecordsEvent { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RecordsEvent"); +if let Some(ref val) = self.payload { +d.field("payload", val); } - -impl From for Cow<'static, str> { - fn from(s: MFADelete) -> Self { - s.0 - } +d.finish_non_exhaustive() } - -impl FromStr for MFADelete { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct MFADeleteStatus(Cow<'static, str>); -impl MFADeleteStatus { - pub const DISABLED: &'static str = "Disabled"; +///

    Specifies how requests are redirected. In the event of an error, you can specify a +/// different error code to return.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Redirect { +///

    The host name to use in the redirect request.

    + pub host_name: Option, +///

    The HTTP redirect code to use on the response. Not required if one of the siblings is +/// present.

    + pub http_redirect_code: Option, +///

    Protocol to use when redirecting requests. The default is the protocol that is used in +/// the original request.

    + pub protocol: Option, +///

    The object key prefix to use in the redirect request. For example, to redirect requests +/// for all pages with prefix docs/ (objects in the docs/ folder) to +/// documents/, you can set a condition block with KeyPrefixEquals +/// set to docs/ and in the Redirect set ReplaceKeyPrefixWith to +/// /documents. Not required if one of the siblings is present. Can be present +/// only if ReplaceKeyWith is not provided.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub replace_key_prefix_with: Option, +///

    The specific object key to use in the redirect request. For example, redirect request to +/// error.html. Not required if one of the siblings is present. Can be present +/// only if ReplaceKeyPrefixWith is not provided.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub replace_key_with: Option, +} - pub const ENABLED: &'static str = "Enabled"; +impl fmt::Debug for Redirect { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Redirect"); +if let Some(ref val) = self.host_name { +d.field("host_name", val); +} +if let Some(ref val) = self.http_redirect_code { +d.field("http_redirect_code", val); +} +if let Some(ref val) = self.protocol { +d.field("protocol", val); +} +if let Some(ref val) = self.replace_key_prefix_with { +d.field("replace_key_prefix_with", val); +} +if let Some(ref val) = self.replace_key_with { +d.field("replace_key_with", val); +} +d.finish_non_exhaustive() +} +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 +/// bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct RedirectAllRequestsTo { +///

    Name of the host where requests are redirected.

    + pub host_name: HostName, +///

    Protocol to use when redirecting requests. The default is the protocol that is used in +/// the original request.

    + pub protocol: Option, } -impl From for MFADeleteStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for RedirectAllRequestsTo { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RedirectAllRequestsTo"); +d.field("host_name", &self.host_name); +if let Some(ref val) = self.protocol { +d.field("protocol", val); } - -impl From for Cow<'static, str> { - fn from(s: MFADeleteStatus) -> Self { - s.0 - } +d.finish_non_exhaustive() } - -impl FromStr for MFADeleteStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -pub type Marker = String; - -pub type MaxAgeSeconds = i32; - -pub type MaxBuckets = i32; -pub type MaxDirectoryBuckets = i32; +pub type Region = String; -pub type MaxKeys = i32; +pub type ReplaceKeyPrefixWith = String; -pub type MaxParts = i32; +pub type ReplaceKeyWith = String; -pub type MaxUploads = i32; +pub type ReplicaKmsKeyID = String; -pub type Message = String; +///

    A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't +/// replicate replica modifications by default. In the latest version of replication +/// configuration (when Filter is specified), you can specify this element and set +/// the status to Enabled to replicate modifications on replicas.

    +/// +///

    If you don't specify the Filter element, Amazon S3 assumes that the +/// replication configuration is the earlier version, V1. In the earlier version, this +/// element is not allowed.

    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicaModifications { +///

    Specifies whether Amazon S3 replicates modifications on replicas.

    + pub status: ReplicaModificationsStatus, +} -pub type Metadata = Map; +impl fmt::Debug for ReplicaModifications { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicaModifications"); +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct MetadataDirective(Cow<'static, str>); -impl MetadataDirective { - pub const COPY: &'static str = "COPY"; +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicaModificationsStatus(Cow<'static, str>); - pub const REPLACE: &'static str = "REPLACE"; +impl ReplicaModificationsStatus { +pub const DISABLED: &'static str = "Disabled"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub const ENABLED: &'static str = "Enabled"; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl From for MetadataDirective { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl From for Cow<'static, str> { - fn from(s: MetadataDirective) -> Self { - s.0 - } } -impl FromStr for MetadataDirective { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl From for ReplicaModificationsStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) } - -///

    A metadata key-value pair to store with an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct MetadataEntry { - ///

    Name of the object.

    - pub name: Option, - ///

    Value of the object.

    - pub value: Option, } -impl fmt::Debug for MetadataEntry { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetadataEntry"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.value { - d.field("value", val); - } - d.finish_non_exhaustive() - } +impl From for Cow<'static, str> { +fn from(s: ReplicaModificationsStatus) -> Self { +s.0 } - -pub type MetadataKey = String; - -///

    -/// The metadata table configuration for a general purpose bucket. -///

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct MetadataTableConfiguration { - ///

    - /// The destination information for the metadata table configuration. The destination table bucket - /// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata - /// table name must be unique within the aws_s3_metadata namespace in the destination - /// table bucket. - ///

    - pub s3_tables_destination: S3TablesDestination, } -impl fmt::Debug for MetadataTableConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetadataTableConfiguration"); - d.field("s3_tables_destination", &self.s3_tables_destination); - d.finish_non_exhaustive() - } +impl FromStr for ReplicaModificationsStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) } - -impl Default for MetadataTableConfiguration { - fn default() -> Self { - Self { - s3_tables_destination: default(), - } - } } -///

    -/// The metadata table configuration for a general purpose bucket. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, PartialEq)] -pub struct MetadataTableConfigurationResult { - ///

    - /// The destination information for the metadata table configuration. The destination table bucket - /// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata - /// table name must be unique within the aws_s3_metadata namespace in the destination - /// table bucket. - ///

    - pub s3_tables_destination_result: S3TablesDestinationResult, +///

    A container for replication rules. You can add up to 1,000 rules. The maximum size of a +/// replication configuration is 2 MB.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationConfiguration { +///

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when +/// replicating objects. For more information, see How to Set Up Replication +/// in the Amazon S3 User Guide.

    + pub role: Role, +///

    A container for one or more replication rules. A replication configuration must have at +/// least one rule and can contain a maximum of 1,000 rules.

    + pub rules: ReplicationRules, } -impl fmt::Debug for MetadataTableConfigurationResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetadataTableConfigurationResult"); - d.field("s3_tables_destination_result", &self.s3_tables_destination_result); - d.finish_non_exhaustive() - } +impl fmt::Debug for ReplicationConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationConfiguration"); +d.field("role", &self.role); +d.field("rules", &self.rules); +d.finish_non_exhaustive() +} } -pub type MetadataTableStatus = String; - -pub type MetadataValue = String; -///

    A container specifying replication metrics-related settings enabling replication -/// metrics and events.

    +///

    Specifies which Amazon S3 objects to replicate and where to store the replicas.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct Metrics { - ///

    A container specifying the time threshold for emitting the - /// s3:Replication:OperationMissedThreshold event.

    - pub event_threshold: Option, - ///

    Specifies whether the replication metrics are enabled.

    - pub status: MetricsStatus, +pub struct ReplicationRule { + pub delete_marker_replication: Option, + pub delete_replication: Option, +///

    A container for information about the replication destination and its configurations +/// including enabling the S3 Replication Time Control (S3 RTC).

    + pub destination: Destination, +///

    Optional configuration to replicate existing source bucket objects.

    +/// +///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the +/// Amazon S3 User Guide.

    +///
    + pub existing_object_replication: Option, + pub filter: Option, +///

    A unique identifier for the rule. The maximum value is 255 characters.

    + pub id: Option, +///

    An object key name prefix that identifies the object or objects to which the rule +/// applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, +/// specify an empty string.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub prefix: Option, +///

    The priority indicates which rule has precedence whenever two or more replication rules +/// conflict. Amazon S3 will attempt to replicate objects according to all replication rules. +/// However, if there are two or more rules with the same destination bucket, then objects will +/// be replicated according to the rule with the highest priority. The higher the number, the +/// higher the priority.

    +///

    For more information, see Replication in the +/// Amazon S3 User Guide.

    + pub priority: Option, +///

    A container that describes additional filters for identifying the source objects that +/// you want to replicate. You can choose to enable or disable the replication of these +/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created +/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service +/// (SSE-KMS).

    + pub source_selection_criteria: Option, +///

    Specifies whether the rule is enabled.

    + pub status: ReplicationRuleStatus, } -impl fmt::Debug for Metrics { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Metrics"); - if let Some(ref val) = self.event_threshold { - d.field("event_threshold", val); - } - d.field("status", &self.status); - d.finish_non_exhaustive() - } +impl fmt::Debug for ReplicationRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationRule"); +if let Some(ref val) = self.delete_marker_replication { +d.field("delete_marker_replication", val); +} +if let Some(ref val) = self.delete_replication { +d.field("delete_replication", val); +} +d.field("destination", &self.destination); +if let Some(ref val) = self.existing_object_replication { +d.field("existing_object_replication", val); +} +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.priority { +d.field("priority", val); +} +if let Some(ref val) = self.source_selection_criteria { +d.field("source_selection_criteria", val); +} +d.field("status", &self.status); +d.finish_non_exhaustive() +} } -///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. -/// The operator must have at least two predicates, and an object must match all of the -/// predicates in order for the filter to apply.

    + +///

    A container for specifying rule filters. The filters determine the subset of objects to +/// which the rule applies. This element is required only if you specify more than one filter.

    +///

    For example:

    +///
      +///
    • +///

      If you specify both a Prefix and a Tag filter, wrap +/// these filters in an And tag.

      +///
    • +///
    • +///

      If you specify a filter based on multiple tags, wrap the Tag elements +/// in an And tag.

      +///
    • +///
    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct MetricsAndOperator { - ///

    The access point ARN used when evaluating an AND predicate.

    - pub access_point_arn: Option, - ///

    The prefix used when evaluating an AND predicate.

    +pub struct ReplicationRuleAndOperator { +///

    An object key name prefix that identifies the subset of objects to which the rule +/// applies.

    pub prefix: Option, - ///

    The list of tags used when evaluating an AND predicate.

    +///

    An array of tags containing key and value pairs.

    pub tags: Option, } -impl fmt::Debug for MetricsAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetricsAndOperator"); - if let Some(ref val) = self.access_point_arn { - d.field("access_point_arn", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for ReplicationRuleAndOperator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationRuleAndOperator"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); } - -///

    Specifies a metrics configuration for the CloudWatch request metrics (specified by the -/// metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics -/// configuration, note that this is a full replacement of the existing metrics configuration. -/// If you don't include the elements you want to keep, they are erased. For more information, -/// see PutBucketMetricsConfiguration.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct MetricsConfiguration { - ///

    Specifies a metrics configuration filter. The metrics configuration will only include - /// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an - /// access point ARN, or a conjunction (MetricsAndOperator).

    - pub filter: Option, - ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and - /// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() } - -impl fmt::Debug for MetricsConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetricsConfiguration"); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } } -pub type MetricsConfigurationList = List; -///

    Specifies a metrics configuration filter. The metrics configuration only includes -/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an -/// access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

    -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -#[non_exhaustive] -#[serde(rename_all = "PascalCase")] -pub enum MetricsFilter { - ///

    The access point ARN used when evaluating a metrics filter.

    - AccessPointArn(AccessPointArn), - ///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. - /// The operator must have at least two predicates, and an object must match all of the - /// predicates in order for the filter to apply.

    - And(MetricsAndOperator), - ///

    The prefix used when evaluating a metrics filter.

    - Prefix(Prefix), - ///

    The tag used when evaluating a metrics filter.

    - Tag(Tag), +///

    A filter that identifies the subset of objects to which the replication rule applies. A +/// Filter must specify exactly one Prefix, Tag, or +/// an And child element.

    +#[derive(Default, Serialize, Deserialize)] +pub struct ReplicationRuleFilter { +///

    A container for specifying rule filters. The filters determine the subset of objects to +/// which the rule applies. This element is required only if you specify more than one filter. +/// For example:

    +///
      +///
    • +///

      If you specify both a Prefix and a Tag filter, wrap +/// these filters in an And tag.

      +///
    • +///
    • +///

      If you specify a filter based on multiple tags, wrap the Tag elements +/// in an And tag.

      +///
    • +///
    + pub and: Option, + pub cached_tags: CachedTags, +///

    An object key name prefix that identifies the subset of objects to which the rule +/// applies.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub prefix: Option, +///

    A container for specifying a tag key and value.

    +///

    The rule applies only to objects that have the tag in their tag set.

    + pub tag: Option, } -pub type MetricsId = String; +impl fmt::Debug for ReplicationRuleFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationRuleFilter"); +if let Some(ref val) = self.and { +d.field("and", val); +} +d.field("cached_tags", &self.cached_tags); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tag { +d.field("tag", val); +} +d.finish_non_exhaustive() +} +} + +#[allow(clippy::clone_on_copy)] +impl Clone for ReplicationRuleFilter { +fn clone(&self) -> Self { +Self { +and: self.and.clone(), +cached_tags: default(), +prefix: self.prefix.clone(), +tag: self.tag.clone(), +} +} +} +impl PartialEq for ReplicationRuleFilter { +fn eq(&self, other: &Self) -> bool { +if self.and != other.and { +return false; +} +if self.prefix != other.prefix { +return false; +} +if self.tag != other.tag { +return false; +} +true +} +} #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct MetricsStatus(Cow<'static, str>); +pub struct ReplicationRuleStatus(Cow<'static, str>); -impl MetricsStatus { - pub const DISABLED: &'static str = "Disabled"; +impl ReplicationRuleStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; - pub const ENABLED: &'static str = "Enabled"; +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for MetricsStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl From for ReplicationRuleStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -impl From for Cow<'static, str> { - fn from(s: MetricsStatus) -> Self { - s.0 - } +impl From for Cow<'static, str> { +fn from(s: ReplicationRuleStatus) -> Self { +s.0 +} } -impl FromStr for MetricsStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl FromStr for ReplicationRuleStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -pub type Minutes = i32; +pub type ReplicationRules = List; -pub type MissingMeta = i32; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ReplicationStatus(Cow<'static, str>); -pub type MpuObjectSize = i64; +impl ReplicationStatus { +pub const COMPLETE: &'static str = "COMPLETE"; -///

    Container for the MultipartUpload for the Amazon S3 object.

    -#[derive(Clone, Default, PartialEq)] -pub struct MultipartUpload { - ///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, - ///

    The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Date and time at which the multipart upload was initiated.

    - pub initiated: Option, - ///

    Identifies who initiated the multipart upload.

    - pub initiator: Option, - ///

    Key of the object for which the multipart upload was initiated.

    - pub key: Option, - ///

    Specifies the owner of the object that is part of the multipart upload.

    - /// - ///

    - /// Directory buckets - The bucket owner is - /// returned as the object owner for all the objects.

    - ///
    - pub owner: Option, - ///

    The class of storage used to store the object.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, - ///

    Upload ID that identifies the multipart upload.

    - pub upload_id: Option, -} +pub const COMPLETED: &'static str = "COMPLETED"; -impl fmt::Debug for MultipartUpload { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MultipartUpload"); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.initiated { - d.field("initiated", val); - } - if let Some(ref val) = self.initiator { - d.field("initiator", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.upload_id { - d.field("upload_id", val); - } - d.finish_non_exhaustive() - } -} +pub const FAILED: &'static str = "FAILED"; -pub type MultipartUploadId = String; +pub const PENDING: &'static str = "PENDING"; -pub type MultipartUploadList = List; +pub const REPLICA: &'static str = "REPLICA"; -pub type NextKeyMarker = String; +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} -pub type NextMarker = String; +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} -pub type NextPartNumberMarker = i32; +} -pub type NextToken = String; +impl From for ReplicationStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} -pub type NextUploadIdMarker = String; +impl From for Cow<'static, str> { +fn from(s: ReplicationStatus) -> Self { +s.0 +} +} -pub type NextVersionIdMarker = String; +impl FromStr for ReplicationStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} -///

    The specified bucket does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchBucket {} +///

    A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is +/// enabled and the time when all objects and operations on objects must be replicated. Must be +/// specified together with a Metrics block.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicationTime { +///

    Specifies whether the replication time is enabled.

    + pub status: ReplicationTimeStatus, +///

    A container specifying the time by which replication should be complete for all objects +/// and operations on objects.

    + pub time: ReplicationTimeValue, +} -impl fmt::Debug for NoSuchBucket { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoSuchBucket"); - d.finish_non_exhaustive() - } +impl fmt::Debug for ReplicationTime { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationTime"); +d.field("status", &self.status); +d.field("time", &self.time); +d.finish_non_exhaustive() +} } -///

    The specified key does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchKey {} -impl fmt::Debug for NoSuchKey { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoSuchKey"); - d.finish_non_exhaustive() - } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicationTimeStatus(Cow<'static, str>); + +impl ReplicationTimeStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -///

    The specified multipart upload does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchUpload {} +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} -impl fmt::Debug for NoSuchUpload { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoSuchUpload"); - d.finish_non_exhaustive() - } } -pub type NonNegativeIntegerType = i32; +impl From for ReplicationTimeStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} -///

    Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently -/// deletes the noncurrent object versions. You set this lifecycle configuration action on a -/// bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent -/// object versions at a specific period in the object's lifetime.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NoncurrentVersionExpiration { - ///

    Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100 - /// noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent - /// versions beyond the specified number to retain. For more information about noncurrent - /// versions, see Lifecycle configuration - /// elements in the Amazon S3 User Guide.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub newer_noncurrent_versions: Option, - ///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the - /// associated action. The value must be a non-zero positive integer. For information about the - /// noncurrent days calculations, see How - /// Amazon S3 Calculates When an Object Became Noncurrent in the - /// Amazon S3 User Guide.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub noncurrent_days: Option, +impl From for Cow<'static, str> { +fn from(s: ReplicationTimeStatus) -> Self { +s.0 +} } -impl fmt::Debug for NoncurrentVersionExpiration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoncurrentVersionExpiration"); - if let Some(ref val) = self.newer_noncurrent_versions { - d.field("newer_noncurrent_versions", val); - } - if let Some(ref val) = self.noncurrent_days { - d.field("noncurrent_days", val); - } - d.finish_non_exhaustive() - } +impl FromStr for ReplicationTimeStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -///

    Container for the transition rule that describes when noncurrent objects transition to -/// the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage -/// class. If your bucket is versioning-enabled (or versioning is suspended), you can set this -/// action to request that Amazon S3 transition noncurrent object versions to the -/// STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage -/// class at a specific period in the object's lifetime.

    +///

    A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics +/// EventThreshold.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NoncurrentVersionTransition { - ///

    Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before - /// transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will - /// transition any additional noncurrent versions beyond the specified number to retain. For - /// more information about noncurrent versions, see Lifecycle configuration - /// elements in the Amazon S3 User Guide.

    - pub newer_noncurrent_versions: Option, - ///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the - /// associated action. For information about the noncurrent days calculations, see How - /// Amazon S3 Calculates How Long an Object Has Been Noncurrent in the - /// Amazon S3 User Guide.

    - pub noncurrent_days: Option, - ///

    The class of storage used to store the object.

    - pub storage_class: Option, +pub struct ReplicationTimeValue { +///

    Contains an integer specifying time in minutes.

    +///

    Valid value: 15

    + pub minutes: Option, } -impl fmt::Debug for NoncurrentVersionTransition { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoncurrentVersionTransition"); - if let Some(ref val) = self.newer_noncurrent_versions { - d.field("newer_noncurrent_versions", val); - } - if let Some(ref val) = self.noncurrent_days { - d.field("noncurrent_days", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for ReplicationTimeValue { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationTimeValue"); +if let Some(ref val) = self.minutes { +d.field("minutes", val); +} +d.finish_non_exhaustive() +} } -pub type NoncurrentVersionTransitionList = List; -///

    The specified content does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NotFound {} +///

    If present, indicates that the requester was successfully charged for the +/// request.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RequestCharged(Cow<'static, str>); -impl fmt::Debug for NotFound { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NotFound"); - d.finish_non_exhaustive() - } -} +impl RequestCharged { +pub const REQUESTER: &'static str = "requester"; -///

    A container for specifying the notification configuration of the bucket. If this element -/// is empty, notifications are turned off for the bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NotificationConfiguration { - ///

    Enables delivery of events to Amazon EventBridge.

    - pub event_bridge_configuration: Option, - ///

    Describes the Lambda functions to invoke and the events for which to invoke - /// them.

    - pub lambda_function_configurations: Option, - ///

    The Amazon Simple Queue Service queues to publish messages to and the events for which - /// to publish messages.

    - pub queue_configurations: Option, - ///

    The topic to which notifications are sent and the events for which notifications are - /// generated.

    - pub topic_configurations: Option, +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl fmt::Debug for NotificationConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NotificationConfiguration"); - if let Some(ref val) = self.event_bridge_configuration { - d.field("event_bridge_configuration", val); - } - if let Some(ref val) = self.lambda_function_configurations { - d.field("lambda_function_configurations", val); - } - if let Some(ref val) = self.queue_configurations { - d.field("queue_configurations", val); - } - if let Some(ref val) = self.topic_configurations { - d.field("topic_configurations", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -///

    Specifies object key name filtering rules. For information about key name filtering, see -/// Configuring event -/// notifications using object key name filtering in the -/// Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NotificationConfigurationFilter { - pub key: Option, } -impl fmt::Debug for NotificationConfigurationFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NotificationConfigurationFilter"); - if let Some(ref val) = self.key { - d.field("key", val); - } - d.finish_non_exhaustive() - } +impl From for RequestCharged { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -///

    An optional unique identifier for configurations in a notification configuration. If you -/// don't provide one, Amazon S3 will assign an ID.

    -pub type NotificationId = String; +impl From for Cow<'static, str> { +fn from(s: RequestCharged) -> Self { +s.0 +} +} -///

    An object consists of data and its descriptive metadata.

    -#[derive(Clone, Default, PartialEq)] -pub struct Object { - ///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, - ///

    The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    The entity tag is a hash of the object. The ETag reflects changes only to the contents - /// of an object, not its metadata. The ETag may or may not be an MD5 digest of the object - /// data. Whether or not it is depends on how the object was created and how it is encrypted as - /// described below:

    - ///
      - ///
    • - ///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the - /// Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that - /// are an MD5 digest of their object data.

      - ///
    • - ///
    • - ///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the - /// Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are - /// not an MD5 digest of their object data.

      - ///
    • - ///
    • - ///

      If an object is created by either the Multipart Upload or Part Copy operation, the - /// ETag is not an MD5 digest, regardless of the method of encryption. If an object is - /// larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a - /// Multipart Upload, and therefore the ETag will not be an MD5 digest.

      - ///
    • - ///
    - /// - ///

    - /// Directory buckets - MD5 is not supported by directory buckets.

    - ///
    - pub e_tag: Option, - ///

    The name that you assign to an object. You use the object key to retrieve the - /// object.

    - pub key: Option, - ///

    Creation date of the object.

    - pub last_modified: Option, - ///

    The owner of the object

    - /// - ///

    - /// Directory buckets - The bucket owner is - /// returned as the object owner.

    - ///
    - pub owner: Option, - ///

    Specifies the restoration status of an object. Objects in certain storage classes must - /// be restored before they can be retrieved. For more information about these storage classes - /// and how to work with archived objects, see Working with archived - /// objects in the Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets. - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub restore_status: Option, - ///

    Size in bytes of the object

    - pub size: Option, - ///

    The class of storage used to store the object.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, +impl FromStr for RequestCharged { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -impl fmt::Debug for Object { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Object"); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.restore_status { - d.field("restore_status", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } +///

    Confirms that the requester knows that they will be charged for the request. Bucket +/// owners need not specify this parameter in their requests. If either the source or +/// destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding +/// charges to copy the object. For information about downloading objects from Requester Pays +/// buckets, see Downloading Objects in +/// Requester Pays Buckets in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RequestPayer(Cow<'static, str>); + +impl RequestPayer { +pub const REQUESTER: &'static str = "requester"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -///

    This action is not allowed against this storage tier.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectAlreadyInActiveTierError {} +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} -impl fmt::Debug for ObjectAlreadyInActiveTierError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectAlreadyInActiveTierError"); - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectAttributes(Cow<'static, str>); +impl From for RequestPayer { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} -impl ObjectAttributes { - pub const CHECKSUM: &'static str = "Checksum"; +impl From for Cow<'static, str> { +fn from(s: RequestPayer) -> Self { +s.0 +} +} - pub const ETAG: &'static str = "ETag"; +impl FromStr for RequestPayer { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} - pub const OBJECT_PARTS: &'static str = "ObjectParts"; +///

    Container for Payer.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct RequestPaymentConfiguration { +///

    Specifies who pays for the download and request fees.

    + pub payer: Payer, +} - pub const OBJECT_SIZE: &'static str = "ObjectSize"; +impl fmt::Debug for RequestPaymentConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RequestPaymentConfiguration"); +d.field("payer", &self.payer); +d.finish_non_exhaustive() +} +} - pub const STORAGE_CLASS: &'static str = "StorageClass"; +impl Default for RequestPaymentConfiguration { +fn default() -> Self { +Self { +payer: String::new().into(), +} +} +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    Container for specifying if periodic QueryProgress messages should be +/// sent.

    +#[derive(Clone, Default, PartialEq)] +pub struct RequestProgress { +///

    Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, +/// FALSE. Default value: FALSE.

    + pub enabled: Option, } -impl From for ObjectAttributes { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for RequestProgress { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RequestProgress"); +if let Some(ref val) = self.enabled { +d.field("enabled", val); } - -impl From for Cow<'static, str> { - fn from(s: ObjectAttributes) -> Self { - s.0 - } +d.finish_non_exhaustive() } - -impl FromStr for ObjectAttributes { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -pub type ObjectAttributesList = List; -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectCannedACL(Cow<'static, str>); +pub type RequestRoute = String; -impl ObjectCannedACL { - pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; +pub type RequestToken = String; - pub const AWS_EXEC_READ: &'static str = "aws-exec-read"; +pub type ResponseCacheControl = String; - pub const BUCKET_OWNER_FULL_CONTROL: &'static str = "bucket-owner-full-control"; +pub type ResponseContentDisposition = String; - pub const BUCKET_OWNER_READ: &'static str = "bucket-owner-read"; +pub type ResponseContentEncoding = String; - pub const PRIVATE: &'static str = "private"; +pub type ResponseContentLanguage = String; - pub const PUBLIC_READ: &'static str = "public-read"; +pub type ResponseContentType = String; - pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; +pub type ResponseExpires = Timestamp; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub type Restore = String; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +pub type RestoreExpiryDate = Timestamp; -impl From for ObjectCannedACL { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[derive(Clone, Default, PartialEq)] +pub struct RestoreObjectInput { +///

    The bucket name containing the object to restore.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Object key for which the action was initiated.

    + pub key: ObjectKey, + pub request_payer: Option, + pub restore_request: Option, +///

    VersionId used to reference a specific version of the object.

    + pub version_id: Option, } -impl From for Cow<'static, str> { - fn from(s: ObjectCannedACL) -> Self { - s.0 - } +impl fmt::Debug for RestoreObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RestoreObjectInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.restore_request { +d.field("restore_request", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } -impl FromStr for ObjectCannedACL { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl RestoreObjectInput { +#[must_use] +pub fn builder() -> builders::RestoreObjectInputBuilder { +default() +} } -///

    Object Identifier is unique value to identify objects.

    #[derive(Clone, Default, PartialEq)] -pub struct ObjectIdentifier { - ///

    An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. - /// This header field makes the request method conditional on ETags.

    - /// - ///

    Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

    - ///
    - pub e_tag: Option, - ///

    Key name of the object.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub key: ObjectKey, - ///

    If present, the objects are deleted only if its modification times matches the provided Timestamp. - ///

    - /// - ///

    This functionality is only supported for directory buckets.

    - ///
    - pub last_modified_time: Option, - ///

    If present, the objects are deleted only if its size matches the provided size in bytes.

    - /// - ///

    This functionality is only supported for directory buckets.

    - ///
    - pub size: Option, - ///

    Version ID for the specific version of the object to delete.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, +pub struct RestoreObjectOutput { + pub request_charged: Option, +///

    Indicates the path in the provided S3 output location where Select results will be +/// restored to.

    + pub restore_output_path: Option, } -impl fmt::Debug for ObjectIdentifier { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectIdentifier"); - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.last_modified_time { - d.field("last_modified_time", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for RestoreObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RestoreObjectOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); } - -pub type ObjectIdentifierList = List; - -pub type ObjectKey = String; - -pub type ObjectList = List; - -///

    The container element for Object Lock configuration parameters.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ObjectLockConfiguration { - ///

    Indicates whether this bucket has an Object Lock configuration enabled. Enable - /// ObjectLockEnabled when you apply ObjectLockConfiguration to a - /// bucket.

    - pub object_lock_enabled: Option, - ///

    Specifies the Object Lock rule for the specified object. Enable the this rule when you - /// apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode - /// and a period. The period can be either Days or Years but you must - /// select one. You cannot specify Days and Years at the same - /// time.

    - pub rule: Option, +if let Some(ref val) = self.restore_output_path { +d.field("restore_output_path", val); +} +d.finish_non_exhaustive() } - -impl fmt::Debug for ObjectLockConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectLockConfiguration"); - if let Some(ref val) = self.object_lock_enabled { - d.field("object_lock_enabled", val); - } - if let Some(ref val) = self.rule { - d.field("rule", val); - } - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ObjectLockEnabled(Cow<'static, str>); - -impl ObjectLockEnabled { - pub const ENABLED: &'static str = "Enabled"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub type RestoreOutputPath = String; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    Container for restore job parameters.

    +#[derive(Clone, Default, PartialEq)] +pub struct RestoreRequest { +///

    Lifetime of the active copy in days. Do not use with restores that specify +/// OutputLocation.

    +///

    The Days element is required for regular restores, and must not be provided for select +/// requests.

    + pub days: Option, +///

    The optional description for the job.

    + pub description: Option, +///

    S3 Glacier related parameters pertaining to this job. Do not use with restores that +/// specify OutputLocation.

    + pub glacier_job_parameters: Option, +///

    Describes the location where the restore job's output is stored.

    + pub output_location: Option, +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Describes the parameters for Select job types.

    + pub select_parameters: Option, +///

    Retrieval tier at which the restore will be processed.

    + pub tier: Option, +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Type of restore request.

    + pub type_: Option, } -impl From for ObjectLockEnabled { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for RestoreRequest { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RestoreRequest"); +if let Some(ref val) = self.days { +d.field("days", val); } - -impl From for Cow<'static, str> { - fn from(s: ObjectLockEnabled) -> Self { - s.0 - } +if let Some(ref val) = self.description { +d.field("description", val); } - -impl FromStr for ObjectLockEnabled { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.glacier_job_parameters { +d.field("glacier_job_parameters", val); } - -pub type ObjectLockEnabledForBucket = bool; - -///

    A legal hold configuration for an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectLockLegalHold { - ///

    Indicates whether the specified object has a legal hold in place.

    - pub status: Option, +if let Some(ref val) = self.output_location { +d.field("output_location", val); } - -impl fmt::Debug for ObjectLockLegalHold { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectLockLegalHold"); - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.select_parameters { +d.field("select_parameters", val); +} +if let Some(ref val) = self.tier { +d.field("tier", val); } +if let Some(ref val) = self.type_ { +d.field("type_", val); +} +d.finish_non_exhaustive() +} +} + #[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectLockLegalHoldStatus(Cow<'static, str>); +pub struct RestoreRequestType(Cow<'static, str>); -impl ObjectLockLegalHoldStatus { - pub const OFF: &'static str = "OFF"; +impl RestoreRequestType { +pub const SELECT: &'static str = "SELECT"; - pub const ON: &'static str = "ON"; +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for ObjectLockLegalHoldStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl From for RestoreRequestType { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -impl From for Cow<'static, str> { - fn from(s: ObjectLockLegalHoldStatus) -> Self { - s.0 - } +impl From for Cow<'static, str> { +fn from(s: RestoreRequestType) -> Self { +s.0 +} } -impl FromStr for ObjectLockLegalHoldStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl FromStr for RestoreRequestType { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectLockMode(Cow<'static, str>); +///

    Specifies the restoration status of an object. Objects in certain storage classes must +/// be restored before they can be retrieved. For more information about these storage classes +/// and how to work with archived objects, see Working with archived +/// objects in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    +#[derive(Clone, Default, PartialEq)] +pub struct RestoreStatus { +///

    Specifies whether the object is currently being restored. If the object restoration is +/// in progress, the header returns the value TRUE. For example:

    +///

    +/// x-amz-optional-object-attributes: IsRestoreInProgress="true" +///

    +///

    If the object restoration has completed, the header returns the value +/// FALSE. For example:

    +///

    +/// x-amz-optional-object-attributes: IsRestoreInProgress="false", +/// RestoreExpiryDate="2012-12-21T00:00:00.000Z" +///

    +///

    If the object hasn't been restored, there is no header response.

    + pub is_restore_in_progress: Option, +///

    Indicates when the restored copy will expire. This value is populated only if the object +/// has already been restored. For example:

    +///

    +/// x-amz-optional-object-attributes: IsRestoreInProgress="false", +/// RestoreExpiryDate="2012-12-21T00:00:00.000Z" +///

    + pub restore_expiry_date: Option, +} -impl ObjectLockMode { - pub const COMPLIANCE: &'static str = "COMPLIANCE"; +impl fmt::Debug for RestoreStatus { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RestoreStatus"); +if let Some(ref val) = self.is_restore_in_progress { +d.field("is_restore_in_progress", val); +} +if let Some(ref val) = self.restore_expiry_date { +d.field("restore_expiry_date", val); +} +d.finish_non_exhaustive() +} +} - pub const GOVERNANCE: &'static str = "GOVERNANCE"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub type Role = String; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    Specifies the redirect behavior and when a redirect is applied. For more information +/// about routing rules, see Configuring advanced conditional redirects in the +/// Amazon S3 User Guide.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct RoutingRule { +///

    A container for describing a condition that must be met for the specified redirect to +/// apply. For example, 1. If request is for pages in the /docs folder, redirect +/// to the /documents folder. 2. If request results in HTTP error 4xx, redirect +/// request to another host where you might process the error.

    + pub condition: Option, +///

    Container for redirect information. You can redirect requests to another host, to +/// another page, or with another protocol. In the event of an error, you can specify a +/// different error code to return.

    + pub redirect: Redirect, } -impl From for ObjectLockMode { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for RoutingRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RoutingRule"); +if let Some(ref val) = self.condition { +d.field("condition", val); } - -impl From for Cow<'static, str> { - fn from(s: ObjectLockMode) -> Self { - s.0 - } +d.field("redirect", &self.redirect); +d.finish_non_exhaustive() } - -impl FromStr for ObjectLockMode { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -pub type ObjectLockRetainUntilDate = Timestamp; -///

    A Retention configuration for an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectLockRetention { - ///

    Indicates the Retention mode for the specified object.

    - pub mode: Option, - ///

    The date on which this Object Lock Retention will expire.

    - pub retain_until_date: Option, -} +pub type RoutingRules = List; -impl fmt::Debug for ObjectLockRetention { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectLockRetention"); - if let Some(ref val) = self.mode { - d.field("mode", val); - } - if let Some(ref val) = self.retain_until_date { - d.field("retain_until_date", val); - } - d.finish_non_exhaustive() - } +///

    A container for object key name prefix and suffix filtering rules.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct S3KeyFilter { + pub filter_rules: Option, } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ObjectLockRetentionMode(Cow<'static, str>); - -impl ObjectLockRetentionMode { - pub const COMPLIANCE: &'static str = "COMPLIANCE"; - - pub const GOVERNANCE: &'static str = "GOVERNANCE"; +impl fmt::Debug for S3KeyFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("S3KeyFilter"); +if let Some(ref val) = self.filter_rules { +d.field("filter_rules", val); +} +d.finish_non_exhaustive() +} +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    Describes an Amazon S3 location that will receive the results of the restore request.

    +#[derive(Clone, Default, PartialEq)] +pub struct S3Location { +///

    A list of grants that control access to the staged results.

    + pub access_control_list: Option, +///

    The name of the bucket where the restore results will be placed.

    + pub bucket_name: BucketName, +///

    The canned ACL to apply to the restore results.

    + pub canned_acl: Option, + pub encryption: Option, +///

    The prefix that is prepended to the restore results for this request.

    + pub prefix: LocationPrefix, +///

    The class of storage used to store the restore results.

    + pub storage_class: Option, +///

    The tag-set that is applied to the restore results.

    + pub tagging: Option, +///

    A list of metadata to store with the restore results in S3.

    + pub user_metadata: Option, } -impl From for ObjectLockRetentionMode { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for S3Location { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("S3Location"); +if let Some(ref val) = self.access_control_list { +d.field("access_control_list", val); } - -impl From for Cow<'static, str> { - fn from(s: ObjectLockRetentionMode) -> Self { - s.0 - } +d.field("bucket_name", &self.bucket_name); +if let Some(ref val) = self.canned_acl { +d.field("canned_acl", val); } - -impl FromStr for ObjectLockRetentionMode { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.encryption { +d.field("encryption", val); } - -///

    The container element for an Object Lock rule.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ObjectLockRule { - ///

    The default Object Lock retention mode and period that you want to apply to new objects - /// placed in the specified bucket. Bucket settings require both a mode and a period. The - /// period can be either Days or Years but you must select one. You - /// cannot specify Days and Years at the same time.

    - pub default_retention: Option, +d.field("prefix", &self.prefix); +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tagging { +d.field("tagging", val); +} +if let Some(ref val) = self.user_metadata { +d.field("user_metadata", val); +} +d.finish_non_exhaustive() } - -impl fmt::Debug for ObjectLockRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectLockRule"); - if let Some(ref val) = self.default_retention { - d.field("default_retention", val); - } - d.finish_non_exhaustive() - } } -pub type ObjectLockToken = String; -///

    The source object of the COPY action is not in the active tier and is only stored in -/// Amazon S3 Glacier.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectNotInActiveTierError {} +pub type S3TablesArn = String; -impl fmt::Debug for ObjectNotInActiveTierError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectNotInActiveTierError"); - d.finish_non_exhaustive() - } -} +pub type S3TablesBucketArn = String; -///

    The container element for object ownership for a bucket's ownership controls.

    ///

    -/// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to -/// the bucket owner if the objects are uploaded with the -/// bucket-owner-full-control canned ACL.

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct S3TablesDestination { ///

    -/// ObjectWriter - The uploading account will own the object if the object is -/// uploaded with the bucket-owner-full-control canned ACL.

    +/// The Amazon Resource Name (ARN) for the table bucket that's specified as the +/// destination in the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. +///

    + pub table_bucket_arn: S3TablesBucketArn, ///

    -/// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no -/// longer affect permissions. The bucket owner automatically owns and has full control over -/// every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL -/// or specify bucket owner full control ACLs (such as the predefined -/// bucket-owner-full-control canned ACL or a custom ACL in XML format that -/// grants the same permissions).

    -///

    By default, ObjectOwnership is set to BucketOwnerEnforced and -/// ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where -/// you must control access for each object individually. For more information about S3 Object -/// Ownership, see Controlling ownership of -/// objects and disabling ACLs for your bucket in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectOwnership(Cow<'static, str>); - -impl ObjectOwnership { - pub const BUCKET_OWNER_ENFORCED: &'static str = "BucketOwnerEnforced"; - - pub const BUCKET_OWNER_PREFERRED: &'static str = "BucketOwnerPreferred"; - - pub const OBJECT_WRITER: &'static str = "ObjectWriter"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +/// The name for the metadata table in your metadata table configuration. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    + pub table_name: S3TablesName, } -impl From for ObjectOwnership { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for S3TablesDestination { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("S3TablesDestination"); +d.field("table_bucket_arn", &self.table_bucket_arn); +d.field("table_name", &self.table_name); +d.finish_non_exhaustive() } - -impl From for Cow<'static, str> { - fn from(s: ObjectOwnership) -> Self { - s.0 - } } -impl FromStr for ObjectOwnership { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} -///

    A container for elements related to an individual part.

    +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    #[derive(Clone, Default, PartialEq)] -pub struct ObjectPart { - ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a - /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present - /// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present - /// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    The part number identifying the part. This value is a positive integer between 1 and - /// 10,000.

    - pub part_number: Option, - ///

    The size of the uploaded part in bytes.

    - pub size: Option, +pub struct S3TablesDestinationResult { +///

    +/// The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The +/// specified metadata table name must be unique within the aws_s3_metadata namespace +/// in the destination table bucket. +///

    + pub table_arn: S3TablesArn, +///

    +/// The Amazon Resource Name (ARN) for the table bucket that's specified as the +/// destination in the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. +///

    + pub table_bucket_arn: S3TablesBucketArn, +///

    +/// The name for the metadata table in your metadata table configuration. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    + pub table_name: S3TablesName, +///

    +/// The table bucket namespace for the metadata table in your metadata table configuration. This value +/// is always aws_s3_metadata. +///

    + pub table_namespace: S3TablesNamespace, } -impl fmt::Debug for ObjectPart { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectPart"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for S3TablesDestinationResult { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("S3TablesDestinationResult"); +d.field("table_arn", &self.table_arn); +d.field("table_bucket_arn", &self.table_bucket_arn); +d.field("table_name", &self.table_name); +d.field("table_namespace", &self.table_namespace); +d.finish_non_exhaustive() +} } -pub type ObjectSize = i64; - -pub type ObjectSizeGreaterThanBytes = i64; - -pub type ObjectSizeLessThanBytes = i64; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectStorageClass(Cow<'static, str>); - -impl ObjectStorageClass { - pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; - - pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; - pub const GLACIER: &'static str = "GLACIER"; +pub type S3TablesName = String; - pub const GLACIER_IR: &'static str = "GLACIER_IR"; +pub type S3TablesNamespace = String; - pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; +pub type SSECustomerAlgorithm = String; - pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; +pub type SSECustomerKey = String; - pub const OUTPOSTS: &'static str = "OUTPOSTS"; +pub type SSECustomerKeyMD5 = String; - pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; +///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SSEKMS { +///

    Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for +/// encrypting inventory reports.

    + pub key_id: SSEKMSKeyId, +} - pub const SNOW: &'static str = "SNOW"; +impl fmt::Debug for SSEKMS { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SSEKMS"); +d.field("key_id", &self.key_id); +d.finish_non_exhaustive() +} +} - pub const STANDARD: &'static str = "STANDARD"; - pub const STANDARD_IA: &'static str = "STANDARD_IA"; +pub type SSEKMSEncryptionContext = String; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub type SSEKMSKeyId = String; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SSES3 { } -impl From for ObjectStorageClass { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for SSES3 { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SSES3"); +d.finish_non_exhaustive() } - -impl From for Cow<'static, str> { - fn from(s: ObjectStorageClass) -> Self { - s.0 - } } -impl FromStr for ObjectStorageClass { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} -///

    The version of an object.

    +///

    Specifies the byte range of the object to get the records from. A record is processed +/// when its first byte is contained by the range. This parameter is optional, but when +/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the +/// start and end of the range.

    #[derive(Clone, Default, PartialEq)] -pub struct ObjectVersion { - ///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, - ///

    The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    The entity tag is an MD5 hash of that version of the object.

    - pub e_tag: Option, - ///

    Specifies whether the object is (true) or is not (false) the latest version of an - /// object.

    - pub is_latest: Option, - ///

    The object key.

    - pub key: Option, - ///

    Date and time when the object was last modified.

    - pub last_modified: Option, - ///

    Specifies the owner of the object.

    - pub owner: Option, - ///

    Specifies the restoration status of an object. Objects in certain storage classes must - /// be restored before they can be retrieved. For more information about these storage classes - /// and how to work with archived objects, see Working with archived - /// objects in the Amazon S3 User Guide.

    - pub restore_status: Option, - ///

    Size in bytes of the object.

    - pub size: Option, - ///

    The class of storage used to store the object.

    - pub storage_class: Option, - ///

    Version ID of an object.

    - pub version_id: Option, -} - -impl fmt::Debug for ObjectVersion { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectVersion"); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.is_latest { - d.field("is_latest", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.restore_status { - d.field("restore_status", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +pub struct ScanRange { +///

    Specifies the end of the byte range. This parameter is optional. Valid values: +/// non-negative integers. The default value is one less than the size of the object being +/// queried. If only the End parameter is supplied, it is interpreted to mean scan the last N +/// bytes of the file. For example, +/// 50 means scan the +/// last 50 bytes.

    + pub end: Option, +///

    Specifies the start of the byte range. This parameter is optional. Valid values: +/// non-negative integers. The default value is 0. If only start is supplied, it +/// means scan from that point to the end of the file. For example, +/// 50 means scan +/// from byte 50 until the end of the file.

    + pub start: Option, } -pub type ObjectVersionId = String; - -pub type ObjectVersionList = List; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectVersionStorageClass(Cow<'static, str>); - -impl ObjectVersionStorageClass { - pub const STANDARD: &'static str = "STANDARD"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for ScanRange { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ScanRange"); +if let Some(ref val) = self.end { +d.field("end", val); } - -impl From for ObjectVersionStorageClass { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.start { +d.field("start", val); } - -impl From for Cow<'static, str> { - fn from(s: ObjectVersionStorageClass) -> Self { - s.0 - } +d.finish_non_exhaustive() } - -impl FromStr for ObjectVersionStorageClass { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct OptionalObjectAttributes(Cow<'static, str>); - -impl OptionalObjectAttributes { - pub const RESTORE_STATUS: &'static str = "RestoreStatus"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} -impl From for OptionalObjectAttributes { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +///

    The container for selecting objects from a content event stream.

    +#[derive(Debug, Clone, PartialEq)] +#[non_exhaustive] +pub enum SelectObjectContentEvent { +///

    The Continuation Event.

    + Cont(ContinuationEvent), +///

    The End Event.

    + End(EndEvent), +///

    The Progress Event.

    + Progress(ProgressEvent), +///

    The Records Event.

    + Records(RecordsEvent), +///

    The Stats Event.

    + Stats(StatsEvent), } -impl From for Cow<'static, str> { - fn from(s: OptionalObjectAttributes) -> Self { - s.0 - } +/// +///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query +/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a +/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data +/// into records. It returns only records that match the specified SQL expression. You must +/// also specify the data serialization format for the response. For more information, see +/// S3Select API Documentation.

    +#[derive(Clone, PartialEq)] +pub struct SelectObjectContentInput { +///

    The S3 bucket.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The object key.

    + pub key: ObjectKey, +///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created +/// using a checksum algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    + pub sse_customer_algorithm: Option, +///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. +/// For more information, see +/// Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    + pub sse_customer_key: Option, +///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum +/// algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    + pub sse_customer_key_md5: Option, + pub request: SelectObjectContentRequest, } -impl FromStr for OptionalObjectAttributes { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl fmt::Debug for SelectObjectContentInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SelectObjectContentInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); } - -pub type OptionalObjectAttributesList = List; - -///

    Describes the location where the restore job's output is stored.

    -#[derive(Clone, Default, PartialEq)] -pub struct OutputLocation { - ///

    Describes an S3 location that will receive the results of the restore request.

    - pub s3: Option, +d.field("key", &self.key); +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); } - -impl fmt::Debug for OutputLocation { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("OutputLocation"); - if let Some(ref val) = self.s3 { - d.field("s3", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); } - -///

    Describes how results of the Select job are serialized.

    -#[derive(Clone, Default, PartialEq)] -pub struct OutputSerialization { - ///

    Describes the serialization of CSV-encoded Select results.

    - pub csv: Option, - ///

    Specifies JSON as request's output serialization format.

    - pub json: Option, +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); } - -impl fmt::Debug for OutputSerialization { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("OutputSerialization"); - if let Some(ref val) = self.csv { - d.field("csv", val); - } - if let Some(ref val) = self.json { - d.field("json", val); - } - d.finish_non_exhaustive() - } +d.field("request", &self.request); +d.finish_non_exhaustive() } - -///

    Container for the owner's display name and ID.

    -#[derive(Clone, Default, PartialEq)] -pub struct Owner { - ///

    Container for the display name of the owner. This value is only supported in the - /// following Amazon Web Services Regions:

    - ///
      - ///
    • - ///

      US East (N. Virginia)

      - ///
    • - ///
    • - ///

      US West (N. California)

      - ///
    • - ///
    • - ///

      US West (Oregon)

      - ///
    • - ///
    • - ///

      Asia Pacific (Singapore)

      - ///
    • - ///
    • - ///

      Asia Pacific (Sydney)

      - ///
    • - ///
    • - ///

      Asia Pacific (Tokyo)

      - ///
    • - ///
    • - ///

      Europe (Ireland)

      - ///
    • - ///
    • - ///

      South America (São Paulo)

      - ///
    • - ///
    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub display_name: Option, - ///

    Container for the ID of the owner.

    - pub id: Option, } -impl fmt::Debug for Owner { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Owner"); - if let Some(ref val) = self.display_name { - d.field("display_name", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.finish_non_exhaustive() - } +impl SelectObjectContentInput { +#[must_use] +pub fn builder() -> builders::SelectObjectContentInputBuilder { +default() } - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct OwnerOverride(Cow<'static, str>); - -impl OwnerOverride { - pub const DESTINATION: &'static str = "Destination"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for OwnerOverride { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[derive(Default)] +pub struct SelectObjectContentOutput { +///

    The array of results.

    + pub payload: Option, } -impl From for Cow<'static, str> { - fn from(s: OwnerOverride) -> Self { - s.0 - } +impl fmt::Debug for SelectObjectContentOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SelectObjectContentOutput"); +if let Some(ref val) = self.payload { +d.field("payload", val); } - -impl FromStr for OwnerOverride { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +d.finish_non_exhaustive() } - -///

    The container element for a bucket's ownership controls.

    -#[derive(Clone, Default, PartialEq)] -pub struct OwnershipControls { - ///

    The container element for an ownership control rule.

    - pub rules: OwnershipControlsRules, } -impl fmt::Debug for OwnershipControls { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("OwnershipControls"); - d.field("rules", &self.rules); - d.finish_non_exhaustive() - } -} -///

    The container element for an ownership control rule.

    +/// +///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query +/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a +/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data +/// into records. It returns only records that match the specified SQL expression. You must +/// also specify the data serialization format for the response. For more information, see +/// S3Select API Documentation.

    #[derive(Clone, PartialEq)] -pub struct OwnershipControlsRule { - pub object_ownership: ObjectOwnership, +pub struct SelectObjectContentRequest { +///

    The expression that is used to query the object.

    + pub expression: Expression, +///

    The type of the provided expression (for example, SQL).

    + pub expression_type: ExpressionType, +///

    Describes the format of the data in the object that is being queried.

    + pub input_serialization: InputSerialization, +///

    Describes the format of the data that you want Amazon S3 to return in response.

    + pub output_serialization: OutputSerialization, +///

    Specifies if periodic request progress information should be enabled.

    + pub request_progress: Option, +///

    Specifies the byte range of the object to get the records from. A record is processed +/// when its first byte is contained by the range. This parameter is optional, but when +/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the +/// start and end of the range.

    +///

    +/// ScanRangemay be used in the following ways:

    +///
      +///
    • +///

      +/// 50100 +/// - process only the records starting between the bytes 50 and 100 (inclusive, counting +/// from zero)

      +///
    • +///
    • +///

      +/// 50 - +/// process only the records starting after the byte 50

      +///
    • +///
    • +///

      +/// 50 - +/// process only the records within the last 50 bytes of the file.

      +///
    • +///
    + pub scan_range: Option, } -impl fmt::Debug for OwnershipControlsRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("OwnershipControlsRule"); - d.field("object_ownership", &self.object_ownership); - d.finish_non_exhaustive() - } +impl fmt::Debug for SelectObjectContentRequest { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SelectObjectContentRequest"); +d.field("expression", &self.expression); +d.field("expression_type", &self.expression_type); +d.field("input_serialization", &self.input_serialization); +d.field("output_serialization", &self.output_serialization); +if let Some(ref val) = self.request_progress { +d.field("request_progress", val); +} +if let Some(ref val) = self.scan_range { +d.field("scan_range", val); +} +d.finish_non_exhaustive() +} } -pub type OwnershipControlsRules = List; - -///

    Container for Parquet.

    -#[derive(Clone, Default, PartialEq)] -pub struct ParquetInput {} -impl fmt::Debug for ParquetInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ParquetInput"); - d.finish_non_exhaustive() - } +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Describes the parameters for Select job types.

    +///

    Learn How to optimize querying your data in Amazon S3 using +/// Amazon Athena, S3 Object Lambda, or client-side filtering.

    +#[derive(Clone, PartialEq)] +pub struct SelectParameters { +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    The expression that is used to query the object.

    + pub expression: Expression, +///

    The type of the provided expression (for example, SQL).

    + pub expression_type: ExpressionType, +///

    Describes the serialization format of the object.

    + pub input_serialization: InputSerialization, +///

    Describes how the results of the Select job are serialized.

    + pub output_serialization: OutputSerialization, } -///

    Container for elements related to a part.

    -#[derive(Clone, Default, PartialEq)] -pub struct Part { - ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present - /// if the object was uploaded with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present - /// if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a - /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present - /// if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present - /// if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Entity tag returned when the part was uploaded.

    - pub e_tag: Option, - ///

    Date and time at which the part was uploaded.

    - pub last_modified: Option, - ///

    Part number identifying the part. This is a positive integer between 1 and - /// 10,000.

    - pub part_number: Option, - ///

    Size in bytes of the uploaded part data.

    - pub size: Option, +impl fmt::Debug for SelectParameters { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SelectParameters"); +d.field("expression", &self.expression); +d.field("expression_type", &self.expression_type); +d.field("input_serialization", &self.input_serialization); +d.field("output_serialization", &self.output_serialization); +d.finish_non_exhaustive() } - -impl fmt::Debug for Part { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Part"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - d.finish_non_exhaustive() - } } -pub type PartNumber = i32; -pub type PartNumberMarker = i32; +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ServerSideEncryption(Cow<'static, str>); -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct PartitionDateSource(Cow<'static, str>); +impl ServerSideEncryption { +pub const AES256: &'static str = "AES256"; -impl PartitionDateSource { - pub const DELIVERY_TIME: &'static str = "DeliveryTime"; +pub const AWS_KMS: &'static str = "aws:kms"; - pub const EVENT_TIME: &'static str = "EventTime"; +pub const AWS_KMS_DSSE: &'static str = "aws:kms:dsse"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl From for PartitionDateSource { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } } -impl From for Cow<'static, str> { - fn from(s: PartitionDateSource) -> Self { - s.0 - } +impl From for ServerSideEncryption { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -impl FromStr for PartitionDateSource { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl From for Cow<'static, str> { +fn from(s: ServerSideEncryption) -> Self { +s.0 +} } -///

    Amazon S3 keys for log objects are partitioned in the following format:

    +impl FromStr for ServerSideEncryption { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Describes the default server-side encryption to apply to new objects in the bucket. If a +/// PUT Object request doesn't specify any server-side encryption, this default encryption will +/// be applied. For more information, see PutBucketEncryption.

    +/// +///
      +///
    • ///

      -/// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +/// General purpose buckets - If you don't specify +/// a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key +/// (aws/s3) in your Amazon Web Services account the first time that you add an +/// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key +/// for SSE-KMS.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. ///

      -///

      PartitionedPrefix defaults to EventTime delivery when server access logs are -/// delivered.

      -#[derive(Clone, Default, PartialEq)] -pub struct PartitionedPrefix { - ///

      Specifies the partition date source for the partitioned prefix. - /// PartitionDateSource can be EventTime or - /// DeliveryTime.

      - ///

      For DeliveryTime, the time in the log file names corresponds to the - /// delivery time for the log files.

      - ///

      For EventTime, The logs delivered are for a specific day only. The year, - /// month, and day correspond to the day on which the event occurred, and the hour, minutes and - /// seconds are set to 00 in the key.

      - pub partition_date_source: Option, +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

      +///
    • +///
    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionByDefault { +///

    Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default +/// encryption.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - This parameter is +/// allowed if and only if SSEAlgorithm is set to aws:kms or +/// aws:kms:dsse.

      +///
    • +///
    • +///

      +/// Directory buckets - This parameter is +/// allowed if and only if SSEAlgorithm is set to +/// aws:kms.

      +///
    • +///
    +///
    +///

    You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS +/// key.

    +///
      +///
    • +///

      Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab +///

      +///
    • +///
    • +///

      Key ARN: +/// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab +///

      +///
    • +///
    • +///

      Key Alias: alias/alias-name +///

      +///
    • +///
    +///

    If you are using encryption with cross-account or Amazon Web Services service operations, you must use +/// a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you're specifying +/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. +/// If you use a KMS key alias instead, then KMS resolves the key within the +/// requester’s account. This behavior can result in data that's encrypted with a +/// KMS key that belongs to the requester, and not the bucket owner. Also, if you +/// use a key ID, you can run into a LogDestination undeliverable error when creating +/// a VPC flow log.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      +///
    • +///
    +///
    +/// +///

    Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service +/// Developer Guide.

    +///
    + pub kms_master_key_id: Option, +///

    Server-side encryption algorithm to use for the default encryption.

    +/// +///

    For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

    +///
    + pub sse_algorithm: ServerSideEncryption, } -impl fmt::Debug for PartitionedPrefix { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PartitionedPrefix"); - if let Some(ref val) = self.partition_date_source { - d.field("partition_date_source", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for ServerSideEncryptionByDefault { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ServerSideEncryptionByDefault"); +if let Some(ref val) = self.kms_master_key_id { +d.field("kms_master_key_id", val); } - -pub type Parts = List; - -pub type PartsCount = i32; - -pub type PartsList = List; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Payer(Cow<'static, str>); - -impl Payer { - pub const BUCKET_OWNER: &'static str = "BucketOwner"; - - pub const REQUESTER: &'static str = "Requester"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +d.field("sse_algorithm", &self.sse_algorithm); +d.finish_non_exhaustive() } - -impl From for Payer { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } } -impl From for Cow<'static, str> { - fn from(s: Payer) -> Self { - s.0 - } -} -impl FromStr for Payer { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +///

    Specifies the default server-side-encryption configuration.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionConfiguration { +///

    Container for information about a particular server-side encryption configuration +/// rule.

    + pub rules: ServerSideEncryptionRules, } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Permission(Cow<'static, str>); - -impl Permission { - pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; - - pub const READ: &'static str = "READ"; - - pub const READ_ACP: &'static str = "READ_ACP"; - - pub const WRITE: &'static str = "WRITE"; - - pub const WRITE_ACP: &'static str = "WRITE_ACP"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for ServerSideEncryptionConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ServerSideEncryptionConfiguration"); +d.field("rules", &self.rules); +d.finish_non_exhaustive() } - -impl From for Permission { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } } -impl From for Cow<'static, str> { - fn from(s: Permission) -> Self { - s.0 - } -} -impl FromStr for Permission { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +///

    Specifies the default server-side encryption configuration.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you're specifying +/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. +/// If you use a KMS key alias instead, then KMS resolves the key within the +/// requester’s account. This behavior can result in data that's encrypted with a +/// KMS key that belongs to the requester, and not the bucket owner.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      +///
    • +///
    +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionRule { +///

    Specifies the default server-side encryption to apply to new objects in the bucket. If a +/// PUT Object request doesn't specify any server-side encryption, this default encryption will +/// be applied.

    + pub apply_server_side_encryption_by_default: Option, +///

    Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS +/// (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the +/// BucketKeyEnabled element to true causes Amazon S3 to use an S3 +/// Bucket Key.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - By default, S3 +/// Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      +///
    • +///
    +///
    + pub bucket_key_enabled: Option, } -pub type Policy = String; - -///

    The container element for a bucket's policy status.

    -#[derive(Clone, Default, PartialEq)] -pub struct PolicyStatus { - ///

    The policy status for this bucket. TRUE indicates that this bucket is - /// public. FALSE indicates that the bucket is not public.

    - pub is_public: Option, +impl fmt::Debug for ServerSideEncryptionRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ServerSideEncryptionRule"); +if let Some(ref val) = self.apply_server_side_encryption_by_default { +d.field("apply_server_side_encryption_by_default", val); } - -impl fmt::Debug for PolicyStatus { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PolicyStatus"); - if let Some(ref val) = self.is_public { - d.field("is_public", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); } - -#[derive(Default)] -pub struct PostObjectInput { - ///

    The canned ACL to apply to the object. For more information, see Canned - /// ACL in the Amazon S3 User Guide.

    - ///

    When adding a new object, you can use headers to grant ACL-based permissions to - /// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are - /// then added to the ACL on the object. By default, all objects are private. Only the owner - /// has full access control. For more information, see Access Control List (ACL) Overview - /// and Managing - /// ACLs Using the REST API in the Amazon S3 User Guide.

    - ///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting - /// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that - /// use this setting only accept PUT requests that don't specify an ACL or PUT requests that - /// specify bucket owner full control ACLs, such as the bucket-owner-full-control - /// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that - /// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a - /// 400 error with the error code AccessControlListNotSupported. - /// For more information, see Controlling ownership of - /// objects and disabling ACLs in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub acl: Option, - ///

    Object data.

    - pub body: Option, - ///

    The bucket name to which the PUT action was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    - ///

    - /// General purpose buckets - Setting this header to - /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with - /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 - /// Bucket Key.

    - ///

    - /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - pub bucket_key_enabled: Option, - ///

    Can be used to specify caching behavior along the request/reply chain. For more - /// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    - pub cache_control: Option, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    - ///

    For the x-amz-checksum-algorithm - /// header, replace - /// algorithm - /// with the supported algorithm from the following list:

    - ///
      - ///
    • - ///

      - /// CRC32 - ///

      - ///
    • - ///
    • - ///

      - /// CRC32C - ///

      - ///
    • - ///
    • - ///

      - /// CRC64NVME - ///

      - ///
    • - ///
    • - ///

      - /// SHA1 - ///

      - ///
    • - ///
    • - ///

      - /// SHA256 - ///

      - ///
    • - ///
    - ///

    For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    - /// - ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is - /// required for any request to upload an object with a retention period configured using - /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the - /// Amazon S3 User Guide.

    - ///
    - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - pub checksum_algorithm: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the object. The CRC64NVME checksum is - /// always a full object checksum. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    - pub content_disposition: Option, - ///

    Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    - pub content_encoding: Option, - ///

    The language the content is in.

    - pub content_language: Option, - ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be - /// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    - pub content_length: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to - /// RFC 1864. This header can be used as a message integrity check to verify that the data is - /// the same data that was originally sent. Although it is optional, we recommend using the - /// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST - /// request authentication, see REST Authentication.

    - /// - ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is - /// required for any request to upload an object with a retention period configured using - /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the - /// Amazon S3 User Guide.

    - ///
    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    A standard MIME type describing the format of the contents. For more information, see - /// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    - pub content_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The date and time at which the object is no longer cacheable. For more information, see - /// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    - pub expires: Option, - ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_full_control: Option, - ///

    Allows grantee to read the object data and its metadata.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read: Option, - ///

    Allows grantee to read the object ACL.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read_acp: Option, - ///

    Allows grantee to write the ACL for the applicable object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_write_acp: Option, - ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE - /// operation matches the ETag of the object in S3. If the ETag values do not match, the - /// operation returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    - ///

    Expects the ETag value as a string.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_match: Option, - ///

    Uploads the object only if the object key name does not already exist in the bucket - /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 - /// ConditionalRequestConflict response. On a 409 failure you should retry the - /// upload.

    - ///

    Expects the '*' (asterisk) character.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_none_match: Option, - ///

    Object key for which the PUT action was initiated.

    - pub key: ObjectKey, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    Specifies whether a legal hold will be applied to this object. For more information - /// about S3 Object Lock, see Object Lock in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_legal_hold_status: Option, - ///

    The Object Lock mode that you want to apply to this object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_mode: Option, - ///

    The date and time when you want this object's Object Lock to expire. Must be formatted - /// as a timestamp parameter.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_retain_until_date: Option, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, - /// AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets passed on - /// to Amazon Web Services KMS for future GetObject operations on - /// this object.

    - ///

    - /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    - pub ssekms_encryption_context: Option, - ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same - /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    - ///

    - /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS - /// key to use. If you specify - /// x-amz-server-side-encryption:aws:kms or - /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key - /// (aws/s3) to protect the data.

    - ///

    - /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the - /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses - /// the bucket's default KMS customer managed key ID. If you want to explicitly set the - /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - /// - /// Incorrect key specification results in an HTTP 400 Bad Request error.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 - /// (for example, AES256, aws:kms, aws:kms:dsse).

    - ///
      - ///
    • - ///

      - /// General purpose buckets - You have four mutually - /// exclusive options to protect data using server-side encryption in Amazon S3, depending on - /// how you choose to manage the encryption keys. Specifically, the encryption key - /// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and - /// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by - /// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt - /// data at rest by using server-side encryption with other key options. For more - /// information, see Using Server-Side - /// Encryption in the Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      - ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. - /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. - /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and - /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. - ///

      - /// - ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the - /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. - /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), - /// the encryption request headers must match the default encryption configuration of the directory bucket. - /// - ///

      - ///
      - ///
    • - ///
    - pub server_side_encryption: Option, - ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The - /// STANDARD storage class provides high durability and high availability. Depending on - /// performance needs, you can specify a different Storage Class. For more information, see - /// Storage - /// Classes in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store - /// newly created objects.

      - ///
    • - ///
    • - ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      - ///
    • - ///
    - ///
    - pub storage_class: Option, - ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For - /// example, "Key1=Value1")

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub tagging: Option, - pub version_id: Option, - ///

    If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata. For information about object metadata, see Object Key and Metadata in the - /// Amazon S3 User Guide.

    - ///

    In the following example, the request header sets the redirect to an object - /// (anotherPage.html) in the same bucket:

    - ///

    - /// x-amz-website-redirect-location: /anotherPage.html - ///

    - ///

    In the following example, the request header sets the object redirect to another - /// website:

    - ///

    - /// x-amz-website-redirect-location: http://www.example.com/ - ///

    - ///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and - /// How to - /// Configure Website Page Redirects in the Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub website_redirect_location: Option, - ///

    - /// Specifies the offset for appending data to existing objects in bytes. - /// The offset must be equal to the size of the existing object being appended to. - /// If no object exists, setting this header to 0 will create a new object. - ///

    - /// - ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    - ///
    - pub write_offset_bytes: Option, - /// The URL to which the client is redirected upon successful upload. - pub success_action_redirect: Option, - /// The status code returned to the client upon successful upload. Valid values are 200, 201, and 204. - pub success_action_status: Option, - /// The POST policy document that was included in the request. - pub policy: Option, +d.finish_non_exhaustive() } - -impl fmt::Debug for PostObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PostObjectInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - if let Some(ref val) = self.body { - d.field("body", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - if let Some(ref val) = self.write_offset_bytes { - d.field("write_offset_bytes", val); - } - if let Some(ref val) = self.success_action_redirect { - d.field("success_action_redirect", val); - } - if let Some(ref val) = self.success_action_status { - d.field("success_action_status", val); - } - if let Some(ref val) = self.policy { - d.field("policy", val); - } - d.finish_non_exhaustive() - } } -impl PostObjectInput { - #[must_use] - pub fn builder() -> builders::PostObjectInputBuilder { - default() - } -} -#[derive(Clone, Default, PartialEq)] -pub struct PostObjectOutput { - ///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header - /// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it - /// was uploaded without a checksum (and Amazon S3 added the default checksum, - /// CRC64NVME, to the uploaded object). For more information about how - /// checksums are calculated with multipart uploads, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    This header specifies the checksum type of the object, which determines how part-level - /// checksums are combined to create an object-level checksum for multipart objects. For - /// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a - /// data integrity check to verify that the checksum type that is received is the same checksum - /// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Entity tag for the uploaded object.

    - ///

    - /// General purpose buckets - To ensure that data is not - /// corrupted traversing the network, for objects where the ETag is the MD5 digest of the - /// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned - /// ETag to the calculated MD5 value.

    - ///

    - /// Directory buckets - The ETag for the object in - /// a directory bucket isn't the MD5 digest of the object.

    - pub e_tag: Option, - ///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, - /// the response includes this header. It includes the expiry-date and - /// rule-id key-value pairs that provide information about object expiration. - /// The value of the rule-id is URL-encoded.

    - /// - ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    - ///
    - pub expiration: Option, - pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets - /// passed on to Amazon Web Services KMS for future GetObject - /// operations on this object.

    - pub ssekms_encryption_context: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, - ///

    - /// The size of the object in bytes. This value is only be present if you append to an object. - ///

    - /// - ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    - ///
    - pub size: Option, - ///

    Version ID of the object.

    - ///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID - /// for the object being stored. Amazon S3 returns this ID in the response. When you enable - /// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object - /// simultaneously, it stores all of the objects. For more information about versioning, see - /// Adding Objects to - /// Versioning-Enabled Buckets in the Amazon S3 User Guide. For - /// information about returning the versioning state of a bucket, see GetBucketVersioning.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, -} +pub type ServerSideEncryptionRules = List; -impl fmt::Debug for PostObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PostObjectOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +pub type SessionCredentialValue = String; + +///

    The established temporary security credentials of the session.

    +/// +///

    +/// Directory buckets - These session +/// credentials are only supported for the authentication and authorization of Zonal endpoint API operations +/// on directory buckets.

    +///
    +#[derive(Clone, PartialEq)] +pub struct SessionCredentials { +///

    A unique identifier that's associated with a secret access key. The access key ID and +/// the secret access key are used together to sign programmatic Amazon Web Services requests +/// cryptographically.

    + pub access_key_id: AccessKeyIdValue, +///

    Temporary security credentials expire after a specified interval. After temporary +/// credentials expire, any calls that you make with those credentials will fail. So you must +/// generate a new set of temporary credentials. Temporary credentials cannot be extended or +/// refreshed beyond the original specified interval.

    + pub expiration: SessionExpiration, +///

    A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services +/// requests. Signing a request identifies the sender and prevents the request from being +/// altered.

    + pub secret_access_key: SessionCredentialValue, +///

    A part of the temporary security credentials. The session token is used to validate the +/// temporary security credentials. +/// +///

    + pub session_token: SessionCredentialValue, } -pub type Prefix = String; - -pub type Priority = i32; - -///

    This data type contains information about progress of an operation.

    -#[derive(Clone, Default, PartialEq)] -pub struct Progress { - ///

    The current number of uncompressed object bytes processed.

    - pub bytes_processed: Option, - ///

    The current number of bytes of records payload data returned.

    - pub bytes_returned: Option, - ///

    The current number of object bytes scanned.

    - pub bytes_scanned: Option, +impl fmt::Debug for SessionCredentials { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SessionCredentials"); +d.field("access_key_id", &self.access_key_id); +d.field("expiration", &self.expiration); +d.field("secret_access_key", &self.secret_access_key); +d.field("session_token", &self.session_token); +d.finish_non_exhaustive() } - -impl fmt::Debug for Progress { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Progress"); - if let Some(ref val) = self.bytes_processed { - d.field("bytes_processed", val); - } - if let Some(ref val) = self.bytes_returned { - d.field("bytes_returned", val); - } - if let Some(ref val) = self.bytes_scanned { - d.field("bytes_scanned", val); - } - d.finish_non_exhaustive() - } } -///

    This data type contains information about the progress event of an operation.

    -#[derive(Clone, Default, PartialEq)] -pub struct ProgressEvent { - ///

    The Progress event details.

    - pub details: Option, +impl Default for SessionCredentials { +fn default() -> Self { +Self { +access_key_id: default(), +expiration: default(), +secret_access_key: default(), +session_token: default(), +} } - -impl fmt::Debug for ProgressEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ProgressEvent"); - if let Some(ref val) = self.details { - d.field("details", val); - } - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Protocol(Cow<'static, str>); -impl Protocol { - pub const HTTP: &'static str = "http"; +pub type SessionExpiration = Timestamp; - pub const HTTPS: &'static str = "https"; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct SessionMode(Cow<'static, str>); - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +impl SessionMode { +pub const READ_ONLY: &'static str = "ReadOnly"; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +pub const READ_WRITE: &'static str = "ReadWrite"; -impl From for Protocol { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl From for Cow<'static, str> { - fn from(s: Protocol) -> Self { - s.0 - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl FromStr for Protocol { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can -/// enable the configuration options in any combination. For more information about when Amazon S3 -/// considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct PublicAccessBlockConfiguration { - ///

    Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket - /// and objects in this bucket. Setting this element to TRUE causes the following - /// behavior:

    - ///
      - ///
    • - ///

      PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is - /// public.

      - ///
    • - ///
    • - ///

      PUT Object calls fail if the request includes a public ACL.

      - ///
    • - ///
    • - ///

      PUT Bucket calls fail if the request includes a public ACL.

      - ///
    • - ///
    - ///

    Enabling this setting doesn't affect existing policies or ACLs.

    - pub block_public_acls: Option, - ///

    Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this - /// element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the - /// specified bucket policy allows public access.

    - ///

    Enabling this setting doesn't affect existing bucket policies.

    - pub block_public_policy: Option, - ///

    Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this - /// bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on - /// this bucket and objects in this bucket.

    - ///

    Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't - /// prevent new public ACLs from being set.

    - pub ignore_public_acls: Option, - ///

    Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting - /// this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has - /// a public policy.

    - ///

    Enabling this setting doesn't affect previously stored bucket policies, except that - /// public and cross-account access within any public bucket policy, including non-public - /// delegation to specific accounts, is blocked.

    - pub restrict_public_buckets: Option, +impl From for SessionMode { +fn from(s: String) -> Self { +Self(Cow::from(s)) } - -impl fmt::Debug for PublicAccessBlockConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PublicAccessBlockConfiguration"); - if let Some(ref val) = self.block_public_acls { - d.field("block_public_acls", val); - } - if let Some(ref val) = self.block_public_policy { - d.field("block_public_policy", val); - } - if let Some(ref val) = self.ignore_public_acls { - d.field("ignore_public_acls", val); - } - if let Some(ref val) = self.restrict_public_buckets { - d.field("restrict_public_buckets", val); - } - d.finish_non_exhaustive() - } } -#[derive(Clone, PartialEq)] -pub struct PutBucketAccelerateConfigurationInput { - ///

    Container for setting the transfer acceleration state.

    - pub accelerate_configuration: AccelerateConfiguration, - ///

    The name of the bucket for which the accelerate configuration is set.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +impl From for Cow<'static, str> { +fn from(s: SessionMode) -> Self { +s.0 } - -impl fmt::Debug for PutBucketAccelerateConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAccelerateConfigurationInput"); - d.field("accelerate_configuration", &self.accelerate_configuration); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } } -impl PutBucketAccelerateConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketAccelerateConfigurationInputBuilder { - default() - } +impl FromStr for SessionMode { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) } - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAccelerateConfigurationOutput {} - -impl fmt::Debug for PutBucketAccelerateConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAccelerateConfigurationOutput"); - d.finish_non_exhaustive() - } } +pub type Setting = bool; + +///

    To use simple format for S3 keys for log objects, set SimplePrefix to an empty +/// object.

    +///

    +/// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +///

    #[derive(Clone, Default, PartialEq)] -pub struct PutBucketAclInput { - ///

    The canned ACL to apply to the bucket.

    - pub acl: Option, - ///

    Contains the elements that set the ACL permissions for an object per grantee.

    - pub access_control_policy: Option, - ///

    The bucket to which to apply the ACL.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, go to RFC - /// 1864. - ///

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the - /// bucket.

    - pub grant_full_control: Option, - ///

    Allows grantee to list the objects in the bucket.

    - pub grant_read: Option, - ///

    Allows grantee to read the bucket ACL.

    - pub grant_read_acp: Option, - ///

    Allows grantee to create new objects in the bucket.

    - ///

    For the bucket and object owners of existing objects, also allows deletions and - /// overwrites of those objects.

    - pub grant_write: Option, - ///

    Allows grantee to write the ACL for the applicable bucket.

    - pub grant_write_acp: Option, +pub struct SimplePrefix { } -impl fmt::Debug for PutBucketAclInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAclInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - if let Some(ref val) = self.access_control_policy { - d.field("access_control_policy", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write { - d.field("grant_write", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for SimplePrefix { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SimplePrefix"); +d.finish_non_exhaustive() } - -impl PutBucketAclInput { - #[must_use] - pub fn builder() -> builders::PutBucketAclInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAclOutput {} -impl fmt::Debug for PutBucketAclOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAclOutput"); - d.finish_non_exhaustive() - } +pub type Size = i64; + +pub type SkipValidation = bool; + +pub type SourceIdentityType = String; + +///

    A container that describes additional filters for identifying the source objects that +/// you want to replicate. You can choose to enable or disable the replication of these +/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created +/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service +/// (SSE-KMS).

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SourceSelectionCriteria { +///

    A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't +/// replicate replica modifications by default. In the latest version of replication +/// configuration (when Filter is specified), you can specify this element and set +/// the status to Enabled to replicate modifications on replicas.

    +/// +///

    If you don't specify the Filter element, Amazon S3 assumes that the +/// replication configuration is the earlier version, V1. In the earlier version, this +/// element is not allowed

    +///
    + pub replica_modifications: Option, +///

    A container for filter information for the selection of Amazon S3 objects encrypted with +/// Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication +/// configuration, this element is required.

    + pub sse_kms_encrypted_objects: Option, } -#[derive(Clone, PartialEq)] -pub struct PutBucketAnalyticsConfigurationInput { - ///

    The configuration and any analyses for the analytics filter.

    - pub analytics_configuration: AnalyticsConfiguration, - ///

    The name of the bucket to which an analytics configuration is stored.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID that identifies the analytics configuration.

    - pub id: AnalyticsId, +impl fmt::Debug for SourceSelectionCriteria { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SourceSelectionCriteria"); +if let Some(ref val) = self.replica_modifications { +d.field("replica_modifications", val); +} +if let Some(ref val) = self.sse_kms_encrypted_objects { +d.field("sse_kms_encrypted_objects", val); +} +d.finish_non_exhaustive() +} } -impl fmt::Debug for PutBucketAnalyticsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAnalyticsConfigurationInput"); - d.field("analytics_configuration", &self.analytics_configuration); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } + +///

    A container for filter information for the selection of S3 objects encrypted with Amazon Web Services +/// KMS.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct SseKmsEncryptedObjects { +///

    Specifies whether Amazon S3 replicates objects created with server-side encryption using an +/// Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

    + pub status: SseKmsEncryptedObjectsStatus, } -impl PutBucketAnalyticsConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketAnalyticsConfigurationInputBuilder { - default() - } +impl fmt::Debug for SseKmsEncryptedObjects { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SseKmsEncryptedObjects"); +d.field("status", &self.status); +d.finish_non_exhaustive() +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAnalyticsConfigurationOutput {} -impl fmt::Debug for PutBucketAnalyticsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAnalyticsConfigurationOutput"); - d.finish_non_exhaustive() - } -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct SseKmsEncryptedObjectsStatus(Cow<'static, str>); -#[derive(Clone, PartialEq)] -pub struct PutBucketCorsInput { - ///

    Specifies the bucket impacted by the corsconfiguration.

    - pub bucket: BucketName, - ///

    Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more - /// information, see Enabling - /// Cross-Origin Resource Sharing in the - /// Amazon S3 User Guide.

    - pub cors_configuration: CORSConfiguration, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, go to RFC - /// 1864. - ///

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +impl SseKmsEncryptedObjectsStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl fmt::Debug for PutBucketCorsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketCorsInput"); - d.field("bucket", &self.bucket); - d.field("cors_configuration", &self.cors_configuration); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl PutBucketCorsInput { - #[must_use] - pub fn builder() -> builders::PutBucketCorsInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketCorsOutput {} +impl From for SseKmsEncryptedObjectsStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} -impl fmt::Debug for PutBucketCorsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketCorsOutput"); - d.finish_non_exhaustive() - } +impl From for Cow<'static, str> { +fn from(s: SseKmsEncryptedObjectsStatus) -> Self { +s.0 +} } -#[derive(Clone, PartialEq)] -pub struct PutBucketEncryptionInput { - ///

    Specifies default encryption for a bucket using server-side encryption with different - /// key options.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - /// - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - ///
    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the server-side encryption - /// configuration.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    - pub expected_bucket_owner: Option, - pub server_side_encryption_configuration: ServerSideEncryptionConfiguration, +impl FromStr for SseKmsEncryptedObjectsStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -impl fmt::Debug for PutBucketEncryptionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketEncryptionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("server_side_encryption_configuration", &self.server_side_encryption_configuration); - d.finish_non_exhaustive() - } +pub type Start = i64; + +pub type StartAfter = String; + +///

    Container for the stats details.

    +#[derive(Clone, Default, PartialEq)] +pub struct Stats { +///

    The total number of uncompressed object bytes processed.

    + pub bytes_processed: Option, +///

    The total number of bytes of records payload data returned.

    + pub bytes_returned: Option, +///

    The total number of object bytes scanned.

    + pub bytes_scanned: Option, } -impl PutBucketEncryptionInput { - #[must_use] - pub fn builder() -> builders::PutBucketEncryptionInputBuilder { - default() - } +impl fmt::Debug for Stats { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Stats"); +if let Some(ref val) = self.bytes_processed { +d.field("bytes_processed", val); +} +if let Some(ref val) = self.bytes_returned { +d.field("bytes_returned", val); +} +if let Some(ref val) = self.bytes_scanned { +d.field("bytes_scanned", val); +} +d.finish_non_exhaustive() } +} + +///

    Container for the Stats Event.

    #[derive(Clone, Default, PartialEq)] -pub struct PutBucketEncryptionOutput {} +pub struct StatsEvent { +///

    The Stats event details.

    + pub details: Option, +} -impl fmt::Debug for PutBucketEncryptionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketEncryptionOutput"); - d.finish_non_exhaustive() - } +impl fmt::Debug for StatsEvent { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("StatsEvent"); +if let Some(ref val) = self.details { +d.field("details", val); +} +d.finish_non_exhaustive() +} } -#[derive(Clone, PartialEq)] -pub struct PutBucketIntelligentTieringConfigurationInput { - ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, - ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, - ///

    Container for S3 Intelligent-Tiering configuration.

    - pub intelligent_tiering_configuration: IntelligentTieringConfiguration, + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct StorageClass(Cow<'static, str>); + +impl StorageClass { +pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + +pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; + +pub const GLACIER: &'static str = "GLACIER"; + +pub const GLACIER_IR: &'static str = "GLACIER_IR"; + +pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + +pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + +pub const OUTPOSTS: &'static str = "OUTPOSTS"; + +pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; + +pub const SNOW: &'static str = "SNOW"; + +pub const STANDARD: &'static str = "STANDARD"; + +pub const STANDARD_IA: &'static str = "STANDARD_IA"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl fmt::Debug for PutBucketIntelligentTieringConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationInput"); - d.field("bucket", &self.bucket); - d.field("id", &self.id); - d.field("intelligent_tiering_configuration", &self.intelligent_tiering_configuration); - d.finish_non_exhaustive() - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl PutBucketIntelligentTieringConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketIntelligentTieringConfigurationInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketIntelligentTieringConfigurationOutput {} +impl From for StorageClass { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} -impl fmt::Debug for PutBucketIntelligentTieringConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationOutput"); - d.finish_non_exhaustive() - } +impl From for Cow<'static, str> { +fn from(s: StorageClass) -> Self { +s.0 +} } -#[derive(Clone, PartialEq)] -pub struct PutBucketInventoryConfigurationInput { - ///

    The name of the bucket where the inventory configuration will be stored.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, - ///

    Specifies the inventory configuration.

    - pub inventory_configuration: InventoryConfiguration, +impl FromStr for StorageClass { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -impl fmt::Debug for PutBucketInventoryConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketInventoryConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.field("inventory_configuration", &self.inventory_configuration); - d.finish_non_exhaustive() - } +///

    Specifies data related to access patterns to be collected and made available to analyze +/// the tradeoffs between different storage classes for an Amazon S3 bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct StorageClassAnalysis { +///

    Specifies how data related to the storage class analysis for an Amazon S3 bucket should be +/// exported.

    + pub data_export: Option, } -impl PutBucketInventoryConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketInventoryConfigurationInputBuilder { - default() - } +impl fmt::Debug for StorageClassAnalysis { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("StorageClassAnalysis"); +if let Some(ref val) = self.data_export { +d.field("data_export", val); +} +d.finish_non_exhaustive() +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketInventoryConfigurationOutput {} -impl fmt::Debug for PutBucketInventoryConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketInventoryConfigurationOutput"); - d.finish_non_exhaustive() - } +///

    Container for data related to the storage class analysis for an Amazon S3 bucket for +/// export.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct StorageClassAnalysisDataExport { +///

    The place to store the data for an analysis.

    + pub destination: AnalyticsExportDestination, +///

    The version of the output schema to use when exporting data. Must be +/// V_1.

    + pub output_schema_version: StorageClassAnalysisSchemaVersion, } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLifecycleConfigurationInput { - ///

    The name of the bucket for which to set the configuration.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub expected_bucket_owner: Option, - ///

    Container for lifecycle rules. You can add as many as 1,000 rules.

    - pub lifecycle_configuration: Option, - ///

    Indicates which default minimum object size behavior is applied to the lifecycle - /// configuration.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - ///
      - ///
    • - ///

      - /// all_storage_classes_128K - Objects smaller than 128 KB will not - /// transition to any storage class by default.

      - ///
    • - ///
    • - ///

      - /// varies_by_storage_class - Objects smaller than 128 KB will - /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By - /// default, all other storage classes will prevent transitions smaller than 128 KB. - ///

      - ///
    • - ///
    - ///

    To customize the minimum object size for any transition you can add a filter that - /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in - /// the body of your transition rule. Custom filters always take precedence over the default - /// transition behavior.

    - pub transition_default_minimum_object_size: Option, +impl fmt::Debug for StorageClassAnalysisDataExport { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("StorageClassAnalysisDataExport"); +d.field("destination", &self.destination); +d.field("output_schema_version", &self.output_schema_version); +d.finish_non_exhaustive() } - -impl fmt::Debug for PutBucketLifecycleConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketLifecycleConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.lifecycle_configuration { - d.field("lifecycle_configuration", val); - } - if let Some(ref val) = self.transition_default_minimum_object_size { - d.field("transition_default_minimum_object_size", val); - } - d.finish_non_exhaustive() - } } -impl PutBucketLifecycleConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketLifecycleConfigurationInputBuilder { - default() - } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct StorageClassAnalysisSchemaVersion(Cow<'static, str>); + +impl StorageClassAnalysisSchemaVersion { +pub const V_1: &'static str = "V_1"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLifecycleConfigurationOutput { - ///

    Indicates which default minimum object size behavior is applied to the lifecycle - /// configuration.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - ///
      - ///
    • - ///

      - /// all_storage_classes_128K - Objects smaller than 128 KB will not - /// transition to any storage class by default.

      - ///
    • - ///
    • - ///

      - /// varies_by_storage_class - Objects smaller than 128 KB will - /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By - /// default, all other storage classes will prevent transitions smaller than 128 KB. - ///

      - ///
    • - ///
    - ///

    To customize the minimum object size for any transition you can add a filter that - /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in - /// the body of your transition rule. Custom filters always take precedence over the default - /// transition behavior.

    - pub transition_default_minimum_object_size: Option, +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl fmt::Debug for PutBucketLifecycleConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketLifecycleConfigurationOutput"); - if let Some(ref val) = self.transition_default_minimum_object_size { - d.field("transition_default_minimum_object_size", val); - } - d.finish_non_exhaustive() - } } -#[derive(Clone, PartialEq)] -pub struct PutBucketLoggingInput { - ///

    The name of the bucket for which to set the logging parameters.

    - pub bucket: BucketName, - ///

    Container for logging status information.

    - pub bucket_logging_status: BucketLoggingStatus, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash of the PutBucketLogging request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +impl From for StorageClassAnalysisSchemaVersion { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -impl fmt::Debug for PutBucketLoggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketLoggingInput"); - d.field("bucket", &self.bucket); - d.field("bucket_logging_status", &self.bucket_logging_status); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl From for Cow<'static, str> { +fn from(s: StorageClassAnalysisSchemaVersion) -> Self { +s.0 +} } -impl PutBucketLoggingInput { - #[must_use] - pub fn builder() -> builders::PutBucketLoggingInputBuilder { - default() - } +impl FromStr for StorageClassAnalysisSchemaVersion { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLoggingOutput {} -impl fmt::Debug for PutBucketLoggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketLoggingOutput"); - d.finish_non_exhaustive() - } -} +pub type Suffix = String; -#[derive(Clone, PartialEq)] -pub struct PutBucketMetricsConfigurationInput { - ///

    The name of the bucket for which the metrics configuration is set.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and - /// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, - ///

    Specifies the metrics configuration.

    - pub metrics_configuration: MetricsConfiguration, +///

    A container of a key value name pair.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Tag { +///

    Name of the object key.

    + pub key: Option, +///

    Value of the tag.

    + pub value: Option, } -impl fmt::Debug for PutBucketMetricsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketMetricsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.field("metrics_configuration", &self.metrics_configuration); - d.finish_non_exhaustive() - } +impl fmt::Debug for Tag { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Tag"); +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.value { +d.field("value", val); +} +d.finish_non_exhaustive() } - -impl PutBucketMetricsConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketMetricsConfigurationInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketMetricsConfigurationOutput {} -impl fmt::Debug for PutBucketMetricsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketMetricsConfigurationOutput"); - d.finish_non_exhaustive() - } -} +pub type TagCount = i32; -#[derive(Clone, PartialEq)] -pub struct PutBucketNotificationConfigurationInput { - ///

    The name of the bucket.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub notification_configuration: NotificationConfiguration, - ///

    Skips validation of Amazon SQS, Amazon SNS, and Lambda - /// destinations. True or false value.

    - pub skip_destination_validation: Option, -} +pub type TagSet = List; -impl fmt::Debug for PutBucketNotificationConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketNotificationConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("notification_configuration", &self.notification_configuration); - if let Some(ref val) = self.skip_destination_validation { - d.field("skip_destination_validation", val); - } - d.finish_non_exhaustive() - } +///

    Container for TagSet elements.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Tagging { +///

    A collection for a set of tags

    + pub tag_set: TagSet, } -impl PutBucketNotificationConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketNotificationConfigurationInputBuilder { - default() - } +impl fmt::Debug for Tagging { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Tagging"); +d.field("tag_set", &self.tag_set); +d.finish_non_exhaustive() +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketNotificationConfigurationOutput {} -impl fmt::Debug for PutBucketNotificationConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketNotificationConfigurationOutput"); - d.finish_non_exhaustive() - } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TaggingDirective(Cow<'static, str>); + +impl TaggingDirective { +pub const COPY: &'static str = "COPY"; + +pub const REPLACE: &'static str = "REPLACE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -#[derive(Clone, PartialEq)] -pub struct PutBucketOwnershipControlsInput { - ///

    The name of the Amazon S3 bucket whose OwnershipControls you want to set.

    - pub bucket: BucketName, - ///

    The MD5 hash of the OwnershipControls request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or - /// ObjectWriter) that you want to apply to this Amazon S3 bucket.

    - pub ownership_controls: OwnershipControls, +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl fmt::Debug for PutBucketOwnershipControlsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketOwnershipControlsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("ownership_controls", &self.ownership_controls); - d.finish_non_exhaustive() - } } -impl PutBucketOwnershipControlsInput { - #[must_use] - pub fn builder() -> builders::PutBucketOwnershipControlsInputBuilder { - default() - } +impl From for TaggingDirective { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketOwnershipControlsOutput {} +impl From for Cow<'static, str> { +fn from(s: TaggingDirective) -> Self { +s.0 +} +} -impl fmt::Debug for PutBucketOwnershipControlsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketOwnershipControlsOutput"); - d.finish_non_exhaustive() - } +impl FromStr for TaggingDirective { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } +pub type TaggingHeader = String; + +pub type TargetBucket = String; + +///

    Container for granting information.

    +///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support +/// target grants. For more information, see Permissions server access log delivery in the +/// Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq)] -pub struct PutBucketPolicyInput { - ///

    The name of the bucket.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    - ///

    For the x-amz-checksum-algorithm - /// header, replace - /// algorithm - /// with the supported algorithm from the following list:

    - ///
      - ///
    • - ///

      - /// CRC32 - ///

      - ///
    • - ///
    • - ///

      - /// CRC32C - ///

      - ///
    • - ///
    • - ///

      - /// CRC64NVME - ///

      - ///
    • - ///
    • - ///

      - /// SHA1 - ///

      - ///
    • - ///
    • - ///

      - /// SHA256 - ///

      - ///
    • - ///
    - ///

    For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    - /// - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - ///
    - pub checksum_algorithm: Option, - ///

    Set this parameter to true to confirm that you want to remove your permissions to change - /// this bucket policy in the future.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub confirm_remove_self_bucket_access: Option, - ///

    The MD5 hash of the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    - pub expected_bucket_owner: Option, - ///

    The bucket policy as a JSON document.

    - ///

    For directory buckets, the only IAM action supported in the bucket policy is - /// s3express:CreateSession.

    - pub policy: Policy, +pub struct TargetGrant { +///

    Container for the person being granted permissions.

    + pub grantee: Option, +///

    Logging permissions assigned to the grantee for the bucket.

    + pub permission: Option, } -impl fmt::Debug for PutBucketPolicyInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketPolicyInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.confirm_remove_self_bucket_access { - d.field("confirm_remove_self_bucket_access", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("policy", &self.policy); - d.finish_non_exhaustive() - } +impl fmt::Debug for TargetGrant { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("TargetGrant"); +if let Some(ref val) = self.grantee { +d.field("grantee", val); +} +if let Some(ref val) = self.permission { +d.field("permission", val); +} +d.finish_non_exhaustive() } - -impl PutBucketPolicyInput { - #[must_use] - pub fn builder() -> builders::PutBucketPolicyInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketPolicyOutput {} -impl fmt::Debug for PutBucketPolicyOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketPolicyOutput"); - d.finish_non_exhaustive() - } -} +pub type TargetGrants = List; -#[derive(Clone, PartialEq)] -pub struct PutBucketReplicationInput { - ///

    The name of the bucket

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, see RFC 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub replication_configuration: ReplicationConfiguration, - ///

    A token to allow Object Lock to be enabled for an existing bucket.

    - pub token: Option, +///

    Amazon S3 key format for log objects. Only one format, PartitionedPrefix or +/// SimplePrefix, is allowed.

    +#[derive(Clone, Default, PartialEq)] +pub struct TargetObjectKeyFormat { +///

    Partitioned S3 key for log objects.

    + pub partitioned_prefix: Option, +///

    To use the simple format for S3 keys for log objects. To specify SimplePrefix format, +/// set SimplePrefix to {}.

    + pub simple_prefix: Option, } -impl fmt::Debug for PutBucketReplicationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketReplicationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("replication_configuration", &self.replication_configuration); - if let Some(ref val) = self.token { - d.field("token", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for TargetObjectKeyFormat { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("TargetObjectKeyFormat"); +if let Some(ref val) = self.partitioned_prefix { +d.field("partitioned_prefix", val); +} +if let Some(ref val) = self.simple_prefix { +d.field("simple_prefix", val); +} +d.finish_non_exhaustive() } - -impl PutBucketReplicationInput { - #[must_use] - pub fn builder() -> builders::PutBucketReplicationInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketReplicationOutput {} -impl fmt::Debug for PutBucketReplicationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketReplicationOutput"); - d.finish_non_exhaustive() - } -} +pub type TargetPrefix = String; -#[derive(Clone, PartialEq)] -pub struct PutBucketRequestPaymentInput { - ///

    The bucket name.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, see RFC 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Container for Payer.

    - pub request_payment_configuration: RequestPaymentConfiguration, -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Tier(Cow<'static, str>); -impl fmt::Debug for PutBucketRequestPaymentInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketRequestPaymentInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("request_payment_configuration", &self.request_payment_configuration); - d.finish_non_exhaustive() - } -} +impl Tier { +pub const BULK: &'static str = "Bulk"; -impl PutBucketRequestPaymentInput { - #[must_use] - pub fn builder() -> builders::PutBucketRequestPaymentInputBuilder { - default() - } -} +pub const EXPEDITED: &'static str = "Expedited"; -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketRequestPaymentOutput {} +pub const STANDARD: &'static str = "Standard"; -impl fmt::Debug for PutBucketRequestPaymentOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketRequestPaymentOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -#[derive(Clone, PartialEq)] -pub struct PutBucketTaggingInput { - ///

    The bucket name.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, see RFC 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Container for the TagSet and Tag elements.

    - pub tagging: Tagging, +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl fmt::Debug for PutBucketTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("tagging", &self.tagging); - d.finish_non_exhaustive() - } } -impl PutBucketTaggingInput { - #[must_use] - pub fn builder() -> builders::PutBucketTaggingInputBuilder { - default() - } +impl From for Tier { +fn from(s: String) -> Self { +Self(Cow::from(s)) } - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketTaggingOutput {} - -impl fmt::Debug for PutBucketTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketTaggingOutput"); - d.finish_non_exhaustive() - } } -#[derive(Clone, PartialEq)] -pub struct PutBucketVersioningInput { - ///

    The bucket name.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a - /// message integrity check to verify that the request body was not corrupted in transit. For - /// more information, see RFC - /// 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The concatenation of the authentication device's serial number, a space, and the value - /// that is displayed on your authentication device.

    - pub mfa: Option, - ///

    Container for setting the versioning state.

    - pub versioning_configuration: VersioningConfiguration, +impl From for Cow<'static, str> { +fn from(s: Tier) -> Self { +s.0 } - -impl fmt::Debug for PutBucketVersioningInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketVersioningInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.mfa { - d.field("mfa", val); - } - d.field("versioning_configuration", &self.versioning_configuration); - d.finish_non_exhaustive() - } } -impl PutBucketVersioningInput { - #[must_use] - pub fn builder() -> builders::PutBucketVersioningInputBuilder { - default() - } +impl FromStr for Tier { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) } - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketVersioningOutput {} - -impl fmt::Debug for PutBucketVersioningOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketVersioningOutput"); - d.finish_non_exhaustive() - } } -#[derive(Clone, PartialEq)] -pub struct PutBucketWebsiteInput { - ///

    The bucket name.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, see RFC 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Container for the request.

    - pub website_configuration: WebsiteConfiguration, +///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by +/// automatically moving data to the most cost-effective storage access tier, without +/// additional operational overhead.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct Tiering { +///

    S3 Intelligent-Tiering access tier. See Storage class +/// for automatically optimizing frequently and infrequently accessed objects for a +/// list of access tiers in the S3 Intelligent-Tiering storage class.

    + pub access_tier: IntelligentTieringAccessTier, +///

    The number of consecutive days of no access after which an object will be eligible to be +/// transitioned to the corresponding tier. The minimum number of days specified for +/// Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least +/// 180 days. The maximum can be up to 2 years (730 days).

    + pub days: IntelligentTieringDays, } -impl fmt::Debug for PutBucketWebsiteInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketWebsiteInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("website_configuration", &self.website_configuration); - d.finish_non_exhaustive() - } +impl fmt::Debug for Tiering { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Tiering"); +d.field("access_tier", &self.access_tier); +d.field("days", &self.days); +d.finish_non_exhaustive() } - -impl PutBucketWebsiteInput { - #[must_use] - pub fn builder() -> builders::PutBucketWebsiteInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketWebsiteOutput {} -impl fmt::Debug for PutBucketWebsiteOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketWebsiteOutput"); - d.finish_non_exhaustive() - } -} +pub type TieringList = List; + +pub type Token = String; +pub type TokenType = String; + +///

    +/// You have attempted to add more parts than the maximum of 10000 +/// that are allowed for this object. You can use the CopyObject operation +/// to copy this object to another and then add more data to the newly copied object. +///

    #[derive(Clone, Default, PartialEq)] -pub struct PutObjectAclInput { - ///

    The canned ACL to apply to the object. For more information, see Canned - /// ACL.

    - pub acl: Option, - ///

    Contains the elements that set the ACL permissions for an object per grantee.

    - pub access_control_policy: Option, - ///

    The bucket name that contains the object to which you want to attach the ACL.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, go to RFC - /// 1864.> - ///

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the - /// bucket.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_full_control: Option, - ///

    Allows grantee to list the objects in the bucket.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_read: Option, - ///

    Allows grantee to read the bucket ACL.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_read_acp: Option, - ///

    Allows grantee to create new objects in the bucket.

    - ///

    For the bucket and object owners of existing objects, also allows deletions and - /// overwrites of those objects.

    - pub grant_write: Option, - ///

    Allows grantee to write the ACL for the applicable bucket.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_write_acp: Option, - ///

    Key for which the PUT action was initiated.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    Version ID used to reference a specific version of the object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, +pub struct TooManyParts { } -impl fmt::Debug for PutObjectAclInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectAclInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - if let Some(ref val) = self.access_control_policy { - d.field("access_control_policy", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write { - d.field("grant_write", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for TooManyParts { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("TooManyParts"); +d.finish_non_exhaustive() } - -impl PutObjectAclInput { - #[must_use] - pub fn builder() -> builders::PutObjectAclInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectAclOutput { - pub request_charged: Option, -} -impl fmt::Debug for PutObjectAclOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectAclOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } -} +pub type TopicArn = String; -#[derive(Default)] -pub struct PutObjectInput { - ///

    The canned ACL to apply to the object. For more information, see Canned - /// ACL in the Amazon S3 User Guide.

    - ///

    When adding a new object, you can use headers to grant ACL-based permissions to - /// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are - /// then added to the ACL on the object. By default, all objects are private. Only the owner - /// has full access control. For more information, see Access Control List (ACL) Overview - /// and Managing - /// ACLs Using the REST API in the Amazon S3 User Guide.

    - ///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting - /// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that - /// use this setting only accept PUT requests that don't specify an ACL or PUT requests that - /// specify bucket owner full control ACLs, such as the bucket-owner-full-control - /// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that - /// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a - /// 400 error with the error code AccessControlListNotSupported. - /// For more information, see Controlling ownership of - /// objects and disabling ACLs in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub acl: Option, - ///

    Object data.

    - pub body: Option, - ///

    The bucket name to which the PUT action was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    - ///

    - /// General purpose buckets - Setting this header to - /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with - /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 - /// Bucket Key.

    - ///

    - /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - pub bucket_key_enabled: Option, - ///

    Can be used to specify caching behavior along the request/reply chain. For more - /// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    - pub cache_control: Option, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    - ///

    For the x-amz-checksum-algorithm - /// header, replace - /// algorithm - /// with the supported algorithm from the following list:

    - ///
      - ///
    • - ///

      - /// CRC32 - ///

      - ///
    • - ///
    • - ///

      - /// CRC32C - ///

      - ///
    • - ///
    • - ///

      - /// CRC64NVME - ///

      - ///
    • - ///
    • - ///

      - /// SHA1 - ///

      - ///
    • - ///
    • - ///

      - /// SHA256 - ///

      - ///
    • - ///
    - ///

    For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    - /// - ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is - /// required for any request to upload an object with a retention period configured using - /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the - /// Amazon S3 User Guide.

    - ///
    - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - pub checksum_algorithm: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the object. The CRC64NVME checksum is - /// always a full object checksum. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    - pub content_disposition: Option, - ///

    Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    - pub content_encoding: Option, - ///

    The language the content is in.

    - pub content_language: Option, - ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be - /// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    - pub content_length: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to - /// RFC 1864. This header can be used as a message integrity check to verify that the data is - /// the same data that was originally sent. Although it is optional, we recommend using the - /// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST - /// request authentication, see REST Authentication.

    - /// - ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is - /// required for any request to upload an object with a retention period configured using - /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the - /// Amazon S3 User Guide.

    - ///
    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    A standard MIME type describing the format of the contents. For more information, see - /// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    - pub content_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The date and time at which the object is no longer cacheable. For more information, see - /// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    - pub expires: Option, - ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_full_control: Option, - ///

    Allows grantee to read the object data and its metadata.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read: Option, - ///

    Allows grantee to read the object ACL.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read_acp: Option, - ///

    Allows grantee to write the ACL for the applicable object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_write_acp: Option, - ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE - /// operation matches the ETag of the object in S3. If the ETag values do not match, the - /// operation returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    - ///

    Expects the ETag value as a string.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_match: Option, - ///

    Uploads the object only if the object key name does not already exist in the bucket - /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 - /// ConditionalRequestConflict response. On a 409 failure you should retry the - /// upload.

    - ///

    Expects the '*' (asterisk) character.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_none_match: Option, - ///

    Object key for which the PUT action was initiated.

    - pub key: ObjectKey, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    Specifies whether a legal hold will be applied to this object. For more information - /// about S3 Object Lock, see Object Lock in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_legal_hold_status: Option, - ///

    The Object Lock mode that you want to apply to this object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_mode: Option, - ///

    The date and time when you want this object's Object Lock to expire. Must be formatted - /// as a timestamp parameter.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_retain_until_date: Option, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, - /// AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets passed on - /// to Amazon Web Services KMS for future GetObject operations on - /// this object.

    - ///

    - /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    - pub ssekms_encryption_context: Option, - ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same - /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    - ///

    - /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS - /// key to use. If you specify - /// x-amz-server-side-encryption:aws:kms or - /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key - /// (aws/s3) to protect the data.

    - ///

    - /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the - /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses - /// the bucket's default KMS customer managed key ID. If you want to explicitly set the - /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - /// - /// Incorrect key specification results in an HTTP 400 Bad Request error.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 - /// (for example, AES256, aws:kms, aws:kms:dsse).

    - ///
      - ///
    • - ///

      - /// General purpose buckets - You have four mutually - /// exclusive options to protect data using server-side encryption in Amazon S3, depending on - /// how you choose to manage the encryption keys. Specifically, the encryption key - /// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and - /// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by - /// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt - /// data at rest by using server-side encryption with other key options. For more - /// information, see Using Server-Side - /// Encryption in the Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      - ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. - /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. - /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and - /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. - ///

      - /// - ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the - /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. - /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), - /// the encryption request headers must match the default encryption configuration of the directory bucket. - /// - ///

      - ///
      - ///
    • - ///
    - pub server_side_encryption: Option, - ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The - /// STANDARD storage class provides high durability and high availability. Depending on - /// performance needs, you can specify a different Storage Class. For more information, see - /// Storage - /// Classes in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store - /// newly created objects.

      - ///
    • - ///
    • - ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      - ///
    • - ///
    - ///
    - pub storage_class: Option, - ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For - /// example, "Key1=Value1")

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub tagging: Option, - pub version_id: Option, - ///

    If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata. For information about object metadata, see Object Key and Metadata in the - /// Amazon S3 User Guide.

    - ///

    In the following example, the request header sets the redirect to an object - /// (anotherPage.html) in the same bucket:

    - ///

    - /// x-amz-website-redirect-location: /anotherPage.html - ///

    - ///

    In the following example, the request header sets the object redirect to another - /// website:

    - ///

    - /// x-amz-website-redirect-location: http://www.example.com/ - ///

    - ///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and - /// How to - /// Configure Website Page Redirects in the Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub website_redirect_location: Option, - ///

    - /// Specifies the offset for appending data to existing objects in bytes. - /// The offset must be equal to the size of the existing object being appended to. - /// If no object exists, setting this header to 0 will create a new object. - ///

    - /// - ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    - ///
    - pub write_offset_bytes: Option, +///

    A container for specifying the configuration for publication of messages to an Amazon +/// Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct TopicConfiguration { +///

    The Amazon S3 bucket event about which to send notifications. For more information, see +/// Supported +/// Event Types in the Amazon S3 User Guide.

    + pub events: EventList, + pub filter: Option, + pub id: Option, +///

    The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message +/// when it detects events of the specified type.

    + pub topic_arn: TopicArn, } -impl fmt::Debug for PutObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - if let Some(ref val) = self.body { - d.field("body", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - if let Some(ref val) = self.write_offset_bytes { - d.field("write_offset_bytes", val); - } - d.finish_non_exhaustive() - } +impl fmt::Debug for TopicConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("TopicConfiguration"); +d.field("events", &self.events); +if let Some(ref val) = self.filter { +d.field("filter", val); } - -impl PutObjectInput { - #[must_use] - pub fn builder() -> builders::PutObjectInputBuilder { - default() - } +if let Some(ref val) = self.id { +d.field("id", val); +} +d.field("topic_arn", &self.topic_arn); +d.finish_non_exhaustive() } - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLegalHoldInput { - ///

    The bucket name containing the object that you want to place a legal hold on.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash for the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The key name for the object that you want to place a legal hold on.

    - pub key: ObjectKey, - ///

    Container element for the legal hold configuration you want to apply to the specified - /// object.

    - pub legal_hold: Option, - pub request_payer: Option, - ///

    The version ID of the object that you want to place a legal hold on.

    - pub version_id: Option, } -impl fmt::Debug for PutObjectLegalHoldInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectLegalHoldInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.legal_hold { - d.field("legal_hold", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } + +pub type TopicConfigurationList = List; + +///

    Specifies when an object transitions to a specified storage class. For more information +/// about Amazon S3 lifecycle configuration rules, see Transitioning +/// Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Transition { +///

    Indicates when objects are transitioned to the specified storage class. The date value +/// must be in ISO 8601 format. The time is always midnight UTC.

    + pub date: Option, +///

    Indicates the number of days after creation when objects are transitioned to the +/// specified storage class. If the specified storage class is INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are +/// 0 or positive integers. If the specified storage class is STANDARD_IA +/// or ONEZONE_IA, valid values are positive integers greater than 30. Be +/// aware that some storage classes have a minimum storage duration and that you're charged for +/// transitioning objects before their minimum storage duration. For more information, see +/// +/// Constraints and considerations for transitions in the +/// Amazon S3 User Guide.

    + pub days: Option, +///

    The storage class to which you want the object to transition.

    + pub storage_class: Option, } -impl PutObjectLegalHoldInput { - #[must_use] - pub fn builder() -> builders::PutObjectLegalHoldInputBuilder { - default() - } +impl fmt::Debug for Transition { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Transition"); +if let Some(ref val) = self.date { +d.field("date", val); +} +if let Some(ref val) = self.days { +d.field("days", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() } - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLegalHoldOutput { - pub request_charged: Option, } -impl fmt::Debug for PutObjectLegalHoldOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectLegalHoldOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TransitionDefaultMinimumObjectSize(Cow<'static, str>); + +impl TransitionDefaultMinimumObjectSize { +pub const ALL_STORAGE_CLASSES_128K: &'static str = "all_storage_classes_128K"; + +pub const VARIES_BY_STORAGE_CLASS: &'static str = "varies_by_storage_class"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLockConfigurationInput { - ///

    The bucket whose Object Lock configuration you want to create or replace.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash for the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The Object Lock configuration that you want to apply to the specified bucket.

    - pub object_lock_configuration: Option, - pub request_payer: Option, - ///

    A token to allow Object Lock to be enabled for an existing bucket.

    - pub token: Option, +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl fmt::Debug for PutObjectLockConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectLockConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.object_lock_configuration { - d.field("object_lock_configuration", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.token { - d.field("token", val); - } - d.finish_non_exhaustive() - } } -impl PutObjectLockConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutObjectLockConfigurationInputBuilder { - default() - } +impl From for TransitionDefaultMinimumObjectSize { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLockConfigurationOutput { - pub request_charged: Option, +impl From for Cow<'static, str> { +fn from(s: TransitionDefaultMinimumObjectSize) -> Self { +s.0 +} } -impl fmt::Debug for PutObjectLockConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectLockConfigurationOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +impl FromStr for TransitionDefaultMinimumObjectSize { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectOutput { - ///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header - /// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it - /// was uploaded without a checksum (and Amazon S3 added the default checksum, - /// CRC64NVME, to the uploaded object). For more information about how - /// checksums are calculated with multipart uploads, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    This header specifies the checksum type of the object, which determines how part-level - /// checksums are combined to create an object-level checksum for multipart objects. For - /// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a - /// data integrity check to verify that the checksum type that is received is the same checksum - /// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Entity tag for the uploaded object.

    - ///

    - /// General purpose buckets - To ensure that data is not - /// corrupted traversing the network, for objects where the ETag is the MD5 digest of the - /// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned - /// ETag to the calculated MD5 value.

    - ///

    - /// Directory buckets - The ETag for the object in - /// a directory bucket isn't the MD5 digest of the object.

    - pub e_tag: Option, - ///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, - /// the response includes this header. It includes the expiry-date and - /// rule-id key-value pairs that provide information about object expiration. - /// The value of the rule-id is URL-encoded.

    - /// - ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    - ///
    - pub expiration: Option, - pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets - /// passed on to Amazon Web Services KMS for future GetObject - /// operations on this object.

    - pub ssekms_encryption_context: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, - ///

    - /// The size of the object in bytes. This value is only be present if you append to an object. - ///

    - /// - ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    - ///
    - pub size: Option, - ///

    Version ID of the object.

    - ///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID - /// for the object being stored. Amazon S3 returns this ID in the response. When you enable - /// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object - /// simultaneously, it stores all of the objects. For more information about versioning, see - /// Adding Objects to - /// Versioning-Enabled Buckets in the Amazon S3 User Guide. For - /// information about returning the versioning state of a bucket, see GetBucketVersioning.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, +pub type TransitionList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct TransitionStorageClass(Cow<'static, str>); + +impl TransitionStorageClass { +pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + +pub const GLACIER: &'static str = "GLACIER"; + +pub const GLACIER_IR: &'static str = "GLACIER_IR"; + +pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + +pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + +pub const STANDARD_IA: &'static str = "STANDARD_IA"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -impl fmt::Debug for PutObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectRetentionInput { - ///

    The bucket name that contains the object you want to apply this Object Retention - /// configuration to.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates whether this action should bypass Governance-mode restrictions.

    - pub bypass_governance_retention: Option, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash for the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The key name for the object that you want to apply this Object Retention configuration - /// to.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    The container element for the Object Retention configuration.

    - pub retention: Option, - ///

    The version ID for the object that you want to apply this Object Retention configuration - /// to.

    - pub version_id: Option, } -impl fmt::Debug for PutObjectRetentionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectRetentionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bypass_governance_retention { - d.field("bypass_governance_retention", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.retention { - d.field("retention", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl From for TransitionStorageClass { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -impl PutObjectRetentionInput { - #[must_use] - pub fn builder() -> builders::PutObjectRetentionInputBuilder { - default() - } +impl From for Cow<'static, str> { +fn from(s: TransitionStorageClass) -> Self { +s.0 +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectRetentionOutput { - pub request_charged: Option, +impl FromStr for TransitionStorageClass { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } -impl fmt::Debug for PutObjectRetentionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectRetentionOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Type(Cow<'static, str>); + +impl Type { +pub const AMAZON_CUSTOMER_BY_EMAIL: &'static str = "AmazonCustomerByEmail"; + +pub const CANONICAL_USER: &'static str = "CanonicalUser"; + +pub const GROUP: &'static str = "Group"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 } -#[derive(Clone, PartialEq)] -pub struct PutObjectTaggingInput { - ///

    The bucket name containing the object.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash for the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Name of the object key.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    Container for the TagSet and Tag elements

    - pub tagging: Tagging, - ///

    The versionId of the object that the tag-set will be added to.

    - pub version_id: Option, +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) } -impl fmt::Debug for PutObjectTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.field("tagging", &self.tagging); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } } -impl PutObjectTaggingInput { - #[must_use] - pub fn builder() -> builders::PutObjectTaggingInputBuilder { - default() - } +impl From for Type { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectTaggingOutput { - ///

    The versionId of the object the tag-set was added to.

    - pub version_id: Option, +impl From for Cow<'static, str> { +fn from(s: Type) -> Self { +s.0 +} } -impl fmt::Debug for PutObjectTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectTaggingOutput"); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl FromStr for Type { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } +pub type URI = String; + +pub type UploadIdMarker = String; + #[derive(Clone, PartialEq)] -pub struct PutPublicAccessBlockInput { - ///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want - /// to set.

    +pub struct UploadPartCopyInput { +///

    The bucket name.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +/// +///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, +/// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    +///
    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash of the PutPublicAccessBlock request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    Specifies the source object for the copy operation. You specify the value in one of two +/// formats, depending on whether you want to access the source object through an access point:

    +///
      +///
    • +///

      For objects not accessed through an access point, specify the name of the source bucket +/// and key of the source object, separated by a slash (/). For example, to copy the +/// object reports/january.pdf from the bucket +/// awsexamplebucket, use awsexamplebucket/reports/january.pdf. +/// The value must be URL-encoded.

      +///
    • +///
    • +///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      +/// +///
        +///
      • +///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        +///
      • +///
      • +///

        Access points are not supported by directory buckets.

        +///
      • +///
      +///
      +///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      +///
    • +///
    +///

    If your bucket has versioning enabled, you could have multiple versions of the same +/// object. By default, x-amz-copy-source identifies the current version of the +/// source object to copy. To copy a specific version of the source object to copy, append +/// ?versionId=<version-id> to the x-amz-copy-source request +/// header (for example, x-amz-copy-source: +/// /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

    +///

    If the current version is a delete marker and you don't specify a versionId in the +/// x-amz-copy-source request header, Amazon S3 returns a 404 Not Found +/// error, because the object does not exist. If you specify versionId in the +/// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an +/// HTTP 400 Bad Request error, because you are not allowed to specify a delete +/// marker as a version for the x-amz-copy-source.

    +/// +///

    +/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets.

    +///
    + pub copy_source: CopySource, +///

    Copies the object if its entity tag (ETag) matches the specified tag.

    +///

    If both of the x-amz-copy-source-if-match and +/// x-amz-copy-source-if-unmodified-since headers are present in the request as +/// follows:

    +///

    +/// x-amz-copy-source-if-match condition evaluates to true, +/// and;

    +///

    +/// x-amz-copy-source-if-unmodified-since condition evaluates to +/// false;

    +///

    Amazon S3 returns 200 OK and copies the data. +///

    + pub copy_source_if_match: Option, +///

    Copies the object if it has been modified since the specified time.

    +///

    If both of the x-amz-copy-source-if-none-match and +/// x-amz-copy-source-if-modified-since headers are present in the request as +/// follows:

    +///

    +/// x-amz-copy-source-if-none-match condition evaluates to false, +/// and;

    +///

    +/// x-amz-copy-source-if-modified-since condition evaluates to +/// true;

    +///

    Amazon S3 returns 412 Precondition Failed response code. +///

    + pub copy_source_if_modified_since: Option, +///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    +///

    If both of the x-amz-copy-source-if-none-match and +/// x-amz-copy-source-if-modified-since headers are present in the request as +/// follows:

    +///

    +/// x-amz-copy-source-if-none-match condition evaluates to false, +/// and;

    +///

    +/// x-amz-copy-source-if-modified-since condition evaluates to +/// true;

    +///

    Amazon S3 returns 412 Precondition Failed response code. +///

    + pub copy_source_if_none_match: Option, +///

    Copies the object if it hasn't been modified since the specified time.

    +///

    If both of the x-amz-copy-source-if-match and +/// x-amz-copy-source-if-unmodified-since headers are present in the request as +/// follows:

    +///

    +/// x-amz-copy-source-if-match condition evaluates to true, +/// and;

    +///

    +/// x-amz-copy-source-if-unmodified-since condition evaluates to +/// false;

    +///

    Amazon S3 returns 200 OK and copies the data. +///

    + pub copy_source_if_unmodified_since: Option, +///

    The range of bytes to copy from the source object. The range value must use the form +/// bytes=first-last, where the first and last are the zero-based byte offsets to copy. For +/// example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You +/// can copy a range only if the source object is greater than 5 MB.

    + pub copy_source_range: Option, +///

    Specifies the algorithm to use when decrypting the source object (for example, +/// AES256).

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    + pub copy_source_sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source +/// object. The encryption key provided in this header must be one that was used when the +/// source object was created.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    + pub copy_source_sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    + pub copy_source_sse_customer_key_md5: Option, +///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 - /// bucket. You can enable the configuration options in any combination. For more information - /// about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    - pub public_access_block_configuration: PublicAccessBlockConfiguration, -} - -impl fmt::Debug for PutPublicAccessBlockInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutPublicAccessBlockInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("public_access_block_configuration", &self.public_access_block_configuration); - d.finish_non_exhaustive() - } +///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_source_bucket_owner: Option, +///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, +///

    Part number of part being copied. This is a positive integer between 1 and +/// 10,000.

    + pub part_number: PartNumber, + pub request_payer: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header. This must be the +/// same encryption key specified in the initiate multipart upload request.

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    + pub sse_customer_key_md5: Option, +///

    Upload ID identifying the multipart upload whose part is being copied.

    + pub upload_id: MultipartUploadId, } -impl PutPublicAccessBlockInput { - #[must_use] - pub fn builder() -> builders::PutPublicAccessBlockInputBuilder { - default() - } +impl fmt::Debug for UploadPartCopyInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("UploadPartCopyInput"); +d.field("bucket", &self.bucket); +d.field("copy_source", &self.copy_source); +if let Some(ref val) = self.copy_source_if_match { +d.field("copy_source_if_match", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct PutPublicAccessBlockOutput {} - -impl fmt::Debug for PutPublicAccessBlockOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutPublicAccessBlockOutput"); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.copy_source_if_modified_since { +d.field("copy_source_if_modified_since", val); } - -pub type QueueArn = String; - -///

    Specifies the configuration for publishing messages to an Amazon Simple Queue Service -/// (Amazon SQS) queue when Amazon S3 detects specified events.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct QueueConfiguration { - ///

    A collection of bucket events for which to send notifications

    - pub events: EventList, - pub filter: Option, - pub id: Option, - ///

    The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message - /// when it detects events of the specified type.

    - pub queue_arn: QueueArn, +if let Some(ref val) = self.copy_source_if_none_match { +d.field("copy_source_if_none_match", val); } - -impl fmt::Debug for QueueConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("QueueConfiguration"); - d.field("events", &self.events); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.field("queue_arn", &self.queue_arn); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.copy_source_if_unmodified_since { +d.field("copy_source_if_unmodified_since", val); } - -pub type QueueConfigurationList = List; - -pub type Quiet = bool; - -pub type QuoteCharacter = String; - -pub type QuoteEscapeCharacter = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct QuoteFields(Cow<'static, str>); - -impl QuoteFields { - pub const ALWAYS: &'static str = "ALWAYS"; - - pub const ASNEEDED: &'static str = "ASNEEDED"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.copy_source_range { +d.field("copy_source_range", val); } - -impl From for QuoteFields { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.copy_source_sse_customer_algorithm { +d.field("copy_source_sse_customer_algorithm", val); } - -impl From for Cow<'static, str> { - fn from(s: QuoteFields) -> Self { - s.0 - } +if let Some(ref val) = self.copy_source_sse_customer_key { +d.field("copy_source_sse_customer_key", val); } - -impl FromStr for QuoteFields { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.copy_source_sse_customer_key_md5 { +d.field("copy_source_sse_customer_key_md5", val); } - -pub type RecordDelimiter = String; - -///

    The container for the records event.

    -#[derive(Clone, Default, PartialEq)] -pub struct RecordsEvent { - ///

    The byte array of partial, one or more result records. S3 Select doesn't guarantee that - /// a record will be self-contained in one record frame. To ensure continuous streaming of - /// data, S3 Select might split the same record across multiple record frames instead of - /// aggregating the results in memory. Some S3 clients (for example, the SDK for Java) handle this behavior by creating a ByteStream out of the response by - /// default. Other clients might not handle this behavior by default. In those cases, you must - /// aggregate the results on the client side and parse the response.

    - pub payload: Option, +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); } - -impl fmt::Debug for RecordsEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RecordsEvent"); - if let Some(ref val) = self.payload { - d.field("payload", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.expected_source_bucket_owner { +d.field("expected_source_bucket_owner", val); } - -///

    Specifies how requests are redirected. In the event of an error, you can specify a -/// different error code to return.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Redirect { - ///

    The host name to use in the redirect request.

    - pub host_name: Option, - ///

    The HTTP redirect code to use on the response. Not required if one of the siblings is - /// present.

    - pub http_redirect_code: Option, - ///

    Protocol to use when redirecting requests. The default is the protocol that is used in - /// the original request.

    - pub protocol: Option, - ///

    The object key prefix to use in the redirect request. For example, to redirect requests - /// for all pages with prefix docs/ (objects in the docs/ folder) to - /// documents/, you can set a condition block with KeyPrefixEquals - /// set to docs/ and in the Redirect set ReplaceKeyPrefixWith to - /// /documents. Not required if one of the siblings is present. Can be present - /// only if ReplaceKeyWith is not provided.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub replace_key_prefix_with: Option, - ///

    The specific object key to use in the redirect request. For example, redirect request to - /// error.html. Not required if one of the siblings is present. Can be present - /// only if ReplaceKeyPrefixWith is not provided.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub replace_key_with: Option, +d.field("key", &self.key); +d.field("part_number", &self.part_number); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); } - -impl fmt::Debug for Redirect { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Redirect"); - if let Some(ref val) = self.host_name { - d.field("host_name", val); - } - if let Some(ref val) = self.http_redirect_code { - d.field("http_redirect_code", val); - } - if let Some(ref val) = self.protocol { - d.field("protocol", val); - } - if let Some(ref val) = self.replace_key_prefix_with { - d.field("replace_key_prefix_with", val); - } - if let Some(ref val) = self.replace_key_with { - d.field("replace_key_with", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); } - -///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 -/// bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct RedirectAllRequestsTo { - ///

    Name of the host where requests are redirected.

    - pub host_name: HostName, - ///

    Protocol to use when redirecting requests. The default is the protocol that is used in - /// the original request.

    - pub protocol: Option, +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() } - -impl fmt::Debug for RedirectAllRequestsTo { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RedirectAllRequestsTo"); - d.field("host_name", &self.host_name); - if let Some(ref val) = self.protocol { - d.field("protocol", val); - } - d.finish_non_exhaustive() - } } -pub type Region = String; - -pub type ReplaceKeyPrefixWith = String; - -pub type ReplaceKeyWith = String; - -pub type ReplicaKmsKeyID = String; +impl UploadPartCopyInput { +#[must_use] +pub fn builder() -> builders::UploadPartCopyInputBuilder { +default() +} +} -///

    A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't -/// replicate replica modifications by default. In the latest version of replication -/// configuration (when Filter is specified), you can specify this element and set -/// the status to Enabled to replicate modifications on replicas.

    +#[derive(Clone, Default, PartialEq)] +pub struct UploadPartCopyOutput { +///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    Container for all response elements.

    + pub copy_part_result: Option, +///

    The version of the source object that was copied, if you have enabled versioning on the +/// source bucket.

    /// -///

    If you don't specify the Filter element, Amazon S3 assumes that the -/// replication configuration is the earlier version, V1. In the earlier version, this -/// element is not allowed.

    +///

    This functionality is not supported when the source object is in a directory bucket.

    ///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicaModifications { - ///

    Specifies whether Amazon S3 replicates modifications on replicas.

    - pub status: ReplicaModificationsStatus, + pub copy_source_version_id: Option, + pub request_charged: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms).

    + pub server_side_encryption: Option, } -impl fmt::Debug for ReplicaModifications { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicaModifications"); - d.field("status", &self.status); - d.finish_non_exhaustive() - } +impl fmt::Debug for UploadPartCopyOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("UploadPartCopyOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); } - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicaModificationsStatus(Cow<'static, str>); - -impl ReplicaModificationsStatus { - pub const DISABLED: &'static str = "Disabled"; - - pub const ENABLED: &'static str = "Enabled"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.copy_part_result { +d.field("copy_part_result", val); } - -impl From for ReplicaModificationsStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.copy_source_version_id { +d.field("copy_source_version_id", val); } - -impl From for Cow<'static, str> { - fn from(s: ReplicaModificationsStatus) -> Self { - s.0 - } +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); } - -impl FromStr for ReplicaModificationsStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); } - -///

    A container for replication rules. You can add up to 1,000 rules. The maximum size of a -/// replication configuration is 2 MB.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationConfiguration { - ///

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when - /// replicating objects. For more information, see How to Set Up Replication - /// in the Amazon S3 User Guide.

    - pub role: Role, - ///

    A container for one or more replication rules. A replication configuration must have at - /// least one rule and can contain a maximum of 1,000 rules.

    - pub rules: ReplicationRules, +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); } - -impl fmt::Debug for ReplicationConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationConfiguration"); - d.field("role", &self.role); - d.field("rules", &self.rules); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +d.finish_non_exhaustive() } - -///

    Specifies which Amazon S3 objects to replicate and where to store the replicas.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRule { - pub delete_marker_replication: Option, - pub delete_replication: Option, - ///

    A container for information about the replication destination and its configurations - /// including enabling the S3 Replication Time Control (S3 RTC).

    - pub destination: Destination, - ///

    Optional configuration to replicate existing source bucket objects.

    - /// - ///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the - /// Amazon S3 User Guide.

    - ///
    - pub existing_object_replication: Option, - pub filter: Option, - ///

    A unique identifier for the rule. The maximum value is 255 characters.

    - pub id: Option, - ///

    An object key name prefix that identifies the object or objects to which the rule - /// applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, - /// specify an empty string.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - ///

    The priority indicates which rule has precedence whenever two or more replication rules - /// conflict. Amazon S3 will attempt to replicate objects according to all replication rules. - /// However, if there are two or more rules with the same destination bucket, then objects will - /// be replicated according to the rule with the highest priority. The higher the number, the - /// higher the priority.

    - ///

    For more information, see Replication in the - /// Amazon S3 User Guide.

    - pub priority: Option, - ///

    A container that describes additional filters for identifying the source objects that - /// you want to replicate. You can choose to enable or disable the replication of these - /// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created - /// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service - /// (SSE-KMS).

    - pub source_selection_criteria: Option, - ///

    Specifies whether the rule is enabled.

    - pub status: ReplicationRuleStatus, } -impl fmt::Debug for ReplicationRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationRule"); - if let Some(ref val) = self.delete_marker_replication { - d.field("delete_marker_replication", val); - } - if let Some(ref val) = self.delete_replication { - d.field("delete_replication", val); - } - d.field("destination", &self.destination); - if let Some(ref val) = self.existing_object_replication { - d.field("existing_object_replication", val); - } - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.priority { - d.field("priority", val); - } - if let Some(ref val) = self.source_selection_criteria { - d.field("source_selection_criteria", val); - } - d.field("status", &self.status); - d.finish_non_exhaustive() - } + +#[derive(Default)] +pub struct UploadPartInput { +///

    Object data.

    + pub body: Option, +///

    The name of the bucket to which the multipart upload was initiated.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    +///

    This checksum algorithm must be the same for all parts and it match the checksum value +/// supplied in the CreateMultipartUpload request.

    + pub checksum_algorithm: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be +/// determined automatically.

    + pub content_length: Option, +///

    The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated +/// when using the command from the CLI. This parameter is required if object lock parameters +/// are specified.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, +///

    Part number of part being uploaded. This is a positive integer between 1 and +/// 10,000.

    + pub part_number: PartNumber, + pub request_payer: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header. This must be the +/// same encryption key specified in the initiate multipart upload request.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    Upload ID identifying the multipart upload whose part is being uploaded.

    + pub upload_id: MultipartUploadId, } -///

    A container for specifying rule filters. The filters determine the subset of objects to -/// which the rule applies. This element is required only if you specify more than one filter.

    -///

    For example:

    -///
      -///
    • -///

      If you specify both a Prefix and a Tag filter, wrap -/// these filters in an And tag.

      -///
    • -///
    • -///

      If you specify a filter based on multiple tags, wrap the Tag elements -/// in an And tag.

      -///
    • -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRuleAndOperator { - ///

    An object key name prefix that identifies the subset of objects to which the rule - /// applies.

    - pub prefix: Option, - ///

    An array of tags containing key and value pairs.

    - pub tags: Option, +impl fmt::Debug for UploadPartInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("UploadPartInput"); +if let Some(ref val) = self.body { +d.field("body", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); } - -impl fmt::Debug for ReplicationRuleAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationRuleAndOperator"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.content_length { +d.field("content_length", val); } - -///

    A filter that identifies the subset of objects to which the replication rule applies. A -/// Filter must specify exactly one Prefix, Tag, or -/// an And child element.

    -#[derive(Default, Serialize, Deserialize)] -pub struct ReplicationRuleFilter { - ///

    A container for specifying rule filters. The filters determine the subset of objects to - /// which the rule applies. This element is required only if you specify more than one filter. - /// For example:

    - ///
      - ///
    • - ///

      If you specify both a Prefix and a Tag filter, wrap - /// these filters in an And tag.

      - ///
    • - ///
    • - ///

      If you specify a filter based on multiple tags, wrap the Tag elements - /// in an And tag.

      - ///
    • - ///
    - pub and: Option, - pub cached_tags: CachedTags, - ///

    An object key name prefix that identifies the subset of objects to which the rule - /// applies.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - ///

    A container for specifying a tag key and value.

    - ///

    The rule applies only to objects that have the tag in their tag set.

    - pub tag: Option, +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); } - -impl fmt::Debug for ReplicationRuleFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationRuleFilter"); - if let Some(ref val) = self.and { - d.field("and", val); - } - d.field("cached_tags", &self.cached_tags); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tag { - d.field("tag", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); } - -#[allow(clippy::clone_on_copy)] -impl Clone for ReplicationRuleFilter { - fn clone(&self) -> Self { - Self { - and: self.and.clone(), - cached_tags: default(), - prefix: self.prefix.clone(), - tag: self.tag.clone(), - } - } +d.field("key", &self.key); +d.field("part_number", &self.part_number); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); } -impl PartialEq for ReplicationRuleFilter { - fn eq(&self, other: &Self) -> bool { - if self.and != other.and { - return false; - } - if self.prefix != other.prefix { - return false; - } - if self.tag != other.tag { - return false; - } - true - } +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); } - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicationRuleStatus(Cow<'static, str>); - -impl ReplicationRuleStatus { - pub const DISABLED: &'static str = "Disabled"; - - pub const ENABLED: &'static str = "Enabled"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); } - -impl From for ReplicationRuleStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); } - -impl From for Cow<'static, str> { - fn from(s: ReplicationRuleStatus) -> Self { - s.0 - } +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() } - -impl FromStr for ReplicationRuleStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -pub type ReplicationRules = List; +impl UploadPartInput { +#[must_use] +pub fn builder() -> builders::UploadPartInputBuilder { +default() +} +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ReplicationStatus(Cow<'static, str>); +#[derive(Clone, Default, PartialEq)] +pub struct UploadPartOutput { +///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    Entity tag for the uploaded object.

    + pub e_tag: Option, + pub request_charged: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms).

    + pub server_side_encryption: Option, +} -impl ReplicationStatus { - pub const COMPLETE: &'static str = "COMPLETE"; +impl fmt::Debug for UploadPartOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("UploadPartOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +d.finish_non_exhaustive() +} +} - pub const COMPLETED: &'static str = "COMPLETED"; - pub const FAILED: &'static str = "FAILED"; +pub type UserMetadata = List; - pub const PENDING: &'static str = "PENDING"; +pub type Value = String; - pub const REPLICA: &'static str = "REPLICA"; +pub type VersionCount = i32; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub type VersionIdMarker = String; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    Describes the versioning state of an Amazon S3 bucket. For more information, see PUT +/// Bucket versioning in the Amazon S3 API Reference.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct VersioningConfiguration { + pub exclude_folders: Option, + pub excluded_prefixes: Option, +///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This +/// element is only returned if the bucket has been configured with MFA delete. If the bucket +/// has never been so configured, this element is not returned.

    + pub mfa_delete: Option, +///

    The versioning state of the bucket.

    + pub status: Option, } -impl From for ReplicationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for VersioningConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("VersioningConfiguration"); +if let Some(ref val) = self.exclude_folders { +d.field("exclude_folders", val); } - -impl From for Cow<'static, str> { - fn from(s: ReplicationStatus) -> Self { - s.0 - } +if let Some(ref val) = self.excluded_prefixes { +d.field("excluded_prefixes", val); } - -impl FromStr for ReplicationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.mfa_delete { +d.field("mfa_delete", val); } - -///

    A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is -/// enabled and the time when all objects and operations on objects must be replicated. Must be -/// specified together with a Metrics block.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicationTime { - ///

    Specifies whether the replication time is enabled.

    - pub status: ReplicationTimeStatus, - ///

    A container specifying the time by which replication should be complete for all objects - /// and operations on objects.

    - pub time: ReplicationTimeValue, +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() } - -impl fmt::Debug for ReplicationTime { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationTime"); - d.field("status", &self.status); - d.field("time", &self.time); - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicationTimeStatus(Cow<'static, str>); - -impl ReplicationTimeStatus { - pub const DISABLED: &'static str = "Disabled"; - - pub const ENABLED: &'static str = "Enabled"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +///

    Specifies website configuration parameters for an Amazon S3 bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct WebsiteConfiguration { +///

    The name of the error document for the website.

    + pub error_document: Option, +///

    The name of the index document for the website.

    + pub index_document: Option, +///

    The redirect behavior for every request to this bucket's website endpoint.

    +/// +///

    If you specify this property, you can't specify any other property.

    +///
    + pub redirect_all_requests_to: Option, +///

    Rules that define when a redirect is applied and the redirect behavior.

    + pub routing_rules: Option, } -impl From for ReplicationTimeStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for WebsiteConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("WebsiteConfiguration"); +if let Some(ref val) = self.error_document { +d.field("error_document", val); } - -impl From for Cow<'static, str> { - fn from(s: ReplicationTimeStatus) -> Self { - s.0 - } +if let Some(ref val) = self.index_document { +d.field("index_document", val); } - -impl FromStr for ReplicationTimeStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.redirect_all_requests_to { +d.field("redirect_all_requests_to", val); } - -///

    A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics -/// EventThreshold.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationTimeValue { - ///

    Contains an integer specifying time in minutes.

    - ///

    Valid value: 15

    - pub minutes: Option, +if let Some(ref val) = self.routing_rules { +d.field("routing_rules", val); +} +d.finish_non_exhaustive() } - -impl fmt::Debug for ReplicationTimeValue { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationTimeValue"); - if let Some(ref val) = self.minutes { - d.field("minutes", val); - } - d.finish_non_exhaustive() - } } -///

    If present, indicates that the requester was successfully charged for the -/// request.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RequestCharged(Cow<'static, str>); - -impl RequestCharged { - pub const REQUESTER: &'static str = "requester"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub type WebsiteRedirectLocation = String; - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[derive(Default)] +pub struct WriteGetObjectResponseInput { +///

    Indicates that a range of bytes was specified.

    + pub accept_ranges: Option, +///

    The object data.

    + pub body: Option, +///

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side +/// encryption with Amazon Web Services KMS (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 +/// checksum of the object returned by the Object Lambda function. This may not match the +/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values +/// only when the original GetObject request required checksum validation. For +/// more information about checksums, see Checking object +/// integrity in the Amazon S3 User Guide.

    +///

    Only one checksum header can be specified at a time. If you supply multiple checksum +/// headers, this request will fail.

    +///

    + pub checksum_crc32: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C +/// checksum of the object returned by the Object Lambda function. This may not match the +/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values +/// only when the original GetObject request required checksum validation. For +/// more information about checksums, see Checking object +/// integrity in the Amazon S3 User Guide.

    +///

    Only one checksum header can be specified at a time. If you supply multiple checksum +/// headers, this request will fail.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 +/// digest of the object returned by the Object Lambda function. This may not match the +/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values +/// only when the original GetObject request required checksum validation. For +/// more information about checksums, see Checking object +/// integrity in the Amazon S3 User Guide.

    +///

    Only one checksum header can be specified at a time. If you supply multiple checksum +/// headers, this request will fail.

    + pub checksum_sha1: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 +/// digest of the object returned by the Object Lambda function. This may not match the +/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values +/// only when the original GetObject request required checksum validation. For +/// more information about checksums, see Checking object +/// integrity in the Amazon S3 User Guide.

    +///

    Only one checksum header can be specified at a time. If you supply multiple checksum +/// headers, this request will fail.

    + pub checksum_sha256: Option, +///

    Specifies presentational information for the object.

    + pub content_disposition: Option, +///

    Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

    + pub content_encoding: Option, +///

    The language the content is in.

    + pub content_language: Option, +///

    The size of the content body in bytes.

    + pub content_length: Option, +///

    The portion of the object returned in the response.

    + pub content_range: Option, +///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, +///

    Specifies whether an object stored in Amazon S3 is (true) or is not +/// (false) a delete marker. To learn more about delete markers, see Working with delete markers.

    + pub delete_marker: Option, +///

    An opaque identifier assigned by a web server to a specific version of a resource found +/// at a URL.

    + pub e_tag: Option, +///

    A string that uniquely identifies an error condition. Returned in the <Code> tag +/// of the error XML response for a corresponding GetObject call. Cannot be used +/// with a successful StatusCode header or when the transformed object is provided +/// in the body. All error codes from S3 are sentence-cased. The regular expression (regex) +/// value is "^[A-Z][a-zA-Z]+$".

    + pub error_code: Option, +///

    Contains a generic description of the error condition. Returned in the <Message> +/// tag of the error XML response for a corresponding GetObject call. Cannot be +/// used with a successful StatusCode header or when the transformed object is +/// provided in body.

    + pub error_message: Option, +///

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes +/// this header. It includes the expiry-date and rule-id key-value +/// pairs that provide the object expiration information. The value of the rule-id +/// is URL-encoded.

    + pub expiration: Option, +///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, +///

    The date and time that the object was last modified.

    + pub last_modified: Option, +///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, +///

    Set to the number of metadata entries not returned in x-amz-meta headers. +/// This can happen if you create metadata using an API like SOAP that supports more flexible +/// metadata than the REST API. For example, using SOAP, you can create metadata whose values +/// are not legal HTTP headers.

    + pub missing_meta: Option, +///

    Indicates whether an object stored in Amazon S3 has an active legal hold.

    + pub object_lock_legal_hold_status: Option, +///

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information +/// about S3 Object Lock, see Object Lock.

    + pub object_lock_mode: Option, +///

    The date and time when Object Lock is configured to expire.

    + pub object_lock_retain_until_date: Option, +///

    The count of parts this object has.

    + pub parts_count: Option, +///

    Indicates if request involves bucket that is either a source or destination in a +/// Replication rule. For more information about S3 Replication, see Replication.

    + pub replication_status: Option, + pub request_charged: Option, +///

    Route prefix to the HTTP URL generated.

    + pub request_route: RequestRoute, +///

    A single use encrypted token that maps WriteGetObjectResponse to the end +/// user GetObject request.

    + pub request_token: RequestToken, +///

    Provides information about object restoration operation and expiration time of the +/// restored object copy.

    + pub restore: Option, +///

    Encryption algorithm used if server-side encryption with a customer-provided encryption +/// key was specified for object stored in Amazon S3.

    + pub sse_customer_algorithm: Option, +///

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data +/// stored in S3. For more information, see Protecting data +/// using server-side encryption with customer-provided encryption keys +/// (SSE-C).

    + pub sse_customer_key_md5: Option, +///

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key +/// Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in +/// Amazon S3 object.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when storing requested object in Amazon S3 (for +/// example, AES256, aws:kms).

    + pub server_side_encryption: Option, +///

    The integer status code for an HTTP response of a corresponding GetObject +/// request. The following is a list of status codes.

    +///
      +///
    • +///

      +/// 200 - OK +///

      +///
    • +///
    • +///

      +/// 206 - Partial Content +///

      +///
    • +///
    • +///

      +/// 304 - Not Modified +///

      +///
    • +///
    • +///

      +/// 400 - Bad Request +///

      +///
    • +///
    • +///

      +/// 401 - Unauthorized +///

      +///
    • +///
    • +///

      +/// 403 - Forbidden +///

      +///
    • +///
    • +///

      +/// 404 - Not Found +///

      +///
    • +///
    • +///

      +/// 405 - Method Not Allowed +///

      +///
    • +///
    • +///

      +/// 409 - Conflict +///

      +///
    • +///
    • +///

      +/// 411 - Length Required +///

      +///
    • +///
    • +///

      +/// 412 - Precondition Failed +///

      +///
    • +///
    • +///

      +/// 416 - Range Not Satisfiable +///

      +///
    • +///
    • +///

      +/// 500 - Internal Server Error +///

      +///
    • +///
    • +///

      +/// 503 - Service Unavailable +///

      +///
    • +///
    + pub status_code: Option, +///

    Provides storage class information of the object. Amazon S3 returns this header for all +/// objects except for S3 Standard storage class objects.

    +///

    For more information, see Storage Classes.

    + pub storage_class: Option, +///

    The number of tags, if any, on the object.

    + pub tag_count: Option, +///

    An ID used to reference a specific version of the object.

    + pub version_id: Option, } -impl From for RequestCharged { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl fmt::Debug for WriteGetObjectResponseInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("WriteGetObjectResponseInput"); +if let Some(ref val) = self.accept_ranges { +d.field("accept_ranges", val); } - -impl From for Cow<'static, str> { - fn from(s: RequestCharged) -> Self { - s.0 - } +if let Some(ref val) = self.body { +d.field("body", val); } - -impl FromStr for RequestCharged { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); } - -///

    Confirms that the requester knows that they will be charged for the request. Bucket -/// owners need not specify this parameter in their requests. If either the source or -/// destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding -/// charges to copy the object. For information about downloading objects from Requester Pays -/// buckets, see Downloading Objects in -/// Requester Pays Buckets in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RequestPayer(Cow<'static, str>); - -impl RequestPayer { - pub const REQUESTER: &'static str = "requester"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); } - -impl From for RequestPayer { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); } - -impl From for Cow<'static, str> { - fn from(s: RequestPayer) -> Self { - s.0 - } +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); } - -impl FromStr for RequestPayer { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); } - -///

    Container for Payer.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct RequestPaymentConfiguration { - ///

    Specifies who pays for the download and request fees.

    - pub payer: Payer, +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); } - -impl fmt::Debug for RequestPaymentConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RequestPaymentConfiguration"); - d.field("payer", &self.payer); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); } - -impl Default for RequestPaymentConfiguration { - fn default() -> Self { - Self { - payer: String::new().into(), - } - } +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); } - -///

    Container for specifying if periodic QueryProgress messages should be -/// sent.

    -#[derive(Clone, Default, PartialEq)] -pub struct RequestProgress { - ///

    Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, - /// FALSE. Default value: FALSE.

    - pub enabled: Option, +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); } - -impl fmt::Debug for RequestProgress { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RequestProgress"); - if let Some(ref val) = self.enabled { - d.field("enabled", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.content_language { +d.field("content_language", val); } - -pub type RequestRoute = String; - -pub type RequestToken = String; - -pub type ResponseCacheControl = String; - -pub type ResponseContentDisposition = String; - -pub type ResponseContentEncoding = String; - -pub type ResponseContentLanguage = String; - -pub type ResponseContentType = String; - -pub type ResponseExpires = Timestamp; - -pub type Restore = String; - -pub type RestoreExpiryDate = Timestamp; - -#[derive(Clone, Default, PartialEq)] -pub struct RestoreObjectInput { - ///

    The bucket name containing the object to restore.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Object key for which the action was initiated.

    - pub key: ObjectKey, - pub request_payer: Option, - pub restore_request: Option, - ///

    VersionId used to reference a specific version of the object.

    - pub version_id: Option, +if let Some(ref val) = self.content_length { +d.field("content_length", val); } - -impl fmt::Debug for RestoreObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RestoreObjectInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.restore_request { - d.field("restore_request", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.content_range { +d.field("content_range", val); } - -impl RestoreObjectInput { - #[must_use] - pub fn builder() -> builders::RestoreObjectInputBuilder { - default() - } +if let Some(ref val) = self.content_type { +d.field("content_type", val); } - -#[derive(Clone, Default, PartialEq)] -pub struct RestoreObjectOutput { - pub request_charged: Option, - ///

    Indicates the path in the provided S3 output location where Select results will be - /// restored to.

    - pub restore_output_path: Option, +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); } - -impl fmt::Debug for RestoreObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RestoreObjectOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.restore_output_path { - d.field("restore_output_path", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); } - -pub type RestoreOutputPath = String; - -///

    Container for restore job parameters.

    -#[derive(Clone, Default, PartialEq)] -pub struct RestoreRequest { - ///

    Lifetime of the active copy in days. Do not use with restores that specify - /// OutputLocation.

    - ///

    The Days element is required for regular restores, and must not be provided for select - /// requests.

    - pub days: Option, - ///

    The optional description for the job.

    - pub description: Option, - ///

    S3 Glacier related parameters pertaining to this job. Do not use with restores that - /// specify OutputLocation.

    - pub glacier_job_parameters: Option, - ///

    Describes the location where the restore job's output is stored.

    - pub output_location: Option, - /// - ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more - ///

    - ///
    - ///

    Describes the parameters for Select job types.

    - pub select_parameters: Option, - ///

    Retrieval tier at which the restore will be processed.

    - pub tier: Option, - /// - ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more - ///

    - ///
    - ///

    Type of restore request.

    - pub type_: Option, +if let Some(ref val) = self.error_code { +d.field("error_code", val); } - -impl fmt::Debug for RestoreRequest { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RestoreRequest"); - if let Some(ref val) = self.days { - d.field("days", val); - } - if let Some(ref val) = self.description { - d.field("description", val); - } - if let Some(ref val) = self.glacier_job_parameters { - d.field("glacier_job_parameters", val); - } - if let Some(ref val) = self.output_location { - d.field("output_location", val); - } - if let Some(ref val) = self.select_parameters { - d.field("select_parameters", val); - } - if let Some(ref val) = self.tier { - d.field("tier", val); - } - if let Some(ref val) = self.type_ { - d.field("type_", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.error_message { +d.field("error_message", val); } - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RestoreRequestType(Cow<'static, str>); - -impl RestoreRequestType { - pub const SELECT: &'static str = "SELECT"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.expiration { +d.field("expiration", val); } - -impl From for RestoreRequestType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +if let Some(ref val) = self.expires { +d.field("expires", val); } - -impl From for Cow<'static, str> { - fn from(s: RestoreRequestType) -> Self { - s.0 - } +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); } - -impl FromStr for RestoreRequestType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +if let Some(ref val) = self.metadata { +d.field("metadata", val); } - -///

    Specifies the restoration status of an object. Objects in certain storage classes must -/// be restored before they can be retrieved. For more information about these storage classes -/// and how to work with archived objects, see Working with archived -/// objects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    -#[derive(Clone, Default, PartialEq)] -pub struct RestoreStatus { - ///

    Specifies whether the object is currently being restored. If the object restoration is - /// in progress, the header returns the value TRUE. For example:

    - ///

    - /// x-amz-optional-object-attributes: IsRestoreInProgress="true" - ///

    - ///

    If the object restoration has completed, the header returns the value - /// FALSE. For example:

    - ///

    - /// x-amz-optional-object-attributes: IsRestoreInProgress="false", - /// RestoreExpiryDate="2012-12-21T00:00:00.000Z" - ///

    - ///

    If the object hasn't been restored, there is no header response.

    - pub is_restore_in_progress: Option, - ///

    Indicates when the restored copy will expire. This value is populated only if the object - /// has already been restored. For example:

    - ///

    - /// x-amz-optional-object-attributes: IsRestoreInProgress="false", - /// RestoreExpiryDate="2012-12-21T00:00:00.000Z" - ///

    - pub restore_expiry_date: Option, +if let Some(ref val) = self.missing_meta { +d.field("missing_meta", val); } - -impl fmt::Debug for RestoreStatus { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RestoreStatus"); - if let Some(ref val) = self.is_restore_in_progress { - d.field("is_restore_in_progress", val); - } - if let Some(ref val) = self.restore_expiry_date { - d.field("restore_expiry_date", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); } - -pub type Role = String; - -///

    Specifies the redirect behavior and when a redirect is applied. For more information -/// about routing rules, see Configuring advanced conditional redirects in the -/// Amazon S3 User Guide.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct RoutingRule { - ///

    A container for describing a condition that must be met for the specified redirect to - /// apply. For example, 1. If request is for pages in the /docs folder, redirect - /// to the /documents folder. 2. If request results in HTTP error 4xx, redirect - /// request to another host where you might process the error.

    - pub condition: Option, - ///

    Container for redirect information. You can redirect requests to another host, to - /// another page, or with another protocol. In the event of an error, you can specify a - /// different error code to return.

    - pub redirect: Redirect, +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); } - -impl fmt::Debug for RoutingRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RoutingRule"); - if let Some(ref val) = self.condition { - d.field("condition", val); - } - d.field("redirect", &self.redirect); - d.finish_non_exhaustive() - } +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); } - -pub type RoutingRules = List; - -///

    A container for object key name prefix and suffix filtering rules.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct S3KeyFilter { - pub filter_rules: Option, +if let Some(ref val) = self.parts_count { +d.field("parts_count", val); } - -impl fmt::Debug for S3KeyFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("S3KeyFilter"); - if let Some(ref val) = self.filter_rules { - d.field("filter_rules", val); - } - d.finish_non_exhaustive() - } +if let Some(ref val) = self.replication_status { +d.field("replication_status", val); } - -///

    Describes an Amazon S3 location that will receive the results of the restore request.

    -#[derive(Clone, Default, PartialEq)] -pub struct S3Location { - ///

    A list of grants that control access to the staged results.

    - pub access_control_list: Option, - ///

    The name of the bucket where the restore results will be placed.

    - pub bucket_name: BucketName, - ///

    The canned ACL to apply to the restore results.

    - pub canned_acl: Option, - pub encryption: Option, - ///

    The prefix that is prepended to the restore results for this request.

    - pub prefix: LocationPrefix, - ///

    The class of storage used to store the restore results.

    - pub storage_class: Option, - ///

    The tag-set that is applied to the restore results.

    - pub tagging: Option, - ///

    A list of metadata to store with the restore results in S3.

    - pub user_metadata: Option, +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); } - -impl fmt::Debug for S3Location { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("S3Location"); - if let Some(ref val) = self.access_control_list { - d.field("access_control_list", val); - } - d.field("bucket_name", &self.bucket_name); - if let Some(ref val) = self.canned_acl { - d.field("canned_acl", val); - } - if let Some(ref val) = self.encryption { - d.field("encryption", val); - } - d.field("prefix", &self.prefix); - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.user_metadata { - d.field("user_metadata", val); - } - d.finish_non_exhaustive() - } +d.field("request_route", &self.request_route); +d.field("request_token", &self.request_token); +if let Some(ref val) = self.restore { +d.field("restore", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.status_code { +d.field("status_code", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tag_count { +d.field("tag_count", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() } - -pub type S3TablesArn = String; - -pub type S3TablesBucketArn = String; - -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct S3TablesDestination { - ///

    - /// The Amazon Resource Name (ARN) for the table bucket that's specified as the - /// destination in the metadata table configuration. The destination table bucket - /// must be in the same Region and Amazon Web Services account as the general purpose bucket. - ///

    - pub table_bucket_arn: S3TablesBucketArn, - ///

    - /// The name for the metadata table in your metadata table configuration. The specified metadata - /// table name must be unique within the aws_s3_metadata namespace in the destination - /// table bucket. - ///

    - pub table_name: S3TablesName, } -impl fmt::Debug for S3TablesDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("S3TablesDestination"); - d.field("table_bucket_arn", &self.table_bucket_arn); - d.field("table_name", &self.table_name); - d.finish_non_exhaustive() - } +impl WriteGetObjectResponseInput { +#[must_use] +pub fn builder() -> builders::WriteGetObjectResponseInputBuilder { +default() +} } -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    #[derive(Clone, Default, PartialEq)] -pub struct S3TablesDestinationResult { - ///

    - /// The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The - /// specified metadata table name must be unique within the aws_s3_metadata namespace - /// in the destination table bucket. - ///

    - pub table_arn: S3TablesArn, - ///

    - /// The Amazon Resource Name (ARN) for the table bucket that's specified as the - /// destination in the metadata table configuration. The destination table bucket - /// must be in the same Region and Amazon Web Services account as the general purpose bucket. - ///

    - pub table_bucket_arn: S3TablesBucketArn, - ///

    - /// The name for the metadata table in your metadata table configuration. The specified metadata - /// table name must be unique within the aws_s3_metadata namespace in the destination - /// table bucket. - ///

    - pub table_name: S3TablesName, - ///

    - /// The table bucket namespace for the metadata table in your metadata table configuration. This value - /// is always aws_s3_metadata. - ///

    - pub table_namespace: S3TablesNamespace, +pub struct WriteGetObjectResponseOutput { } -impl fmt::Debug for S3TablesDestinationResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("S3TablesDestinationResult"); - d.field("table_arn", &self.table_arn); - d.field("table_bucket_arn", &self.table_bucket_arn); - d.field("table_name", &self.table_name); - d.field("table_namespace", &self.table_namespace); - d.finish_non_exhaustive() - } +impl fmt::Debug for WriteGetObjectResponseOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("WriteGetObjectResponseOutput"); +d.finish_non_exhaustive() +} } -pub type S3TablesName = String; - -pub type S3TablesNamespace = String; -pub type SSECustomerAlgorithm = String; +pub type WriteOffsetBytes = i64; -pub type SSECustomerKey = String; +pub type Years = i32; -pub type SSECustomerKeyMD5 = String; +#[cfg(test)] +mod tests { +use super::*; -///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SSEKMS { - ///

    Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for - /// encrypting inventory reports.

    - pub key_id: SSEKMSKeyId, +fn require_default() {} +fn require_clone() {} + +#[test] +fn test_default() { +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +} +#[test] +fn test_clone() { +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); } - -impl fmt::Debug for SSEKMS { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SSEKMS"); - d.field("key_id", &self.key_id); - d.finish_non_exhaustive() - } } +pub mod builders { +#![allow(clippy::missing_errors_doc)] -pub type SSEKMSEncryptionContext = String; +use super::*; +pub use super::build_error::BuildError; -pub type SSEKMSKeyId = String; +/// A builder for [`AbortMultipartUploadInput`] +#[derive(Default)] +pub struct AbortMultipartUploadInputBuilder { +bucket: Option, -///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SSES3 {} +expected_bucket_owner: Option, + +if_match_initiated_time: Option, + +key: Option, + +request_payer: Option, + +upload_id: Option, -impl fmt::Debug for SSES3 { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SSES3"); - d.finish_non_exhaustive() - } } -///

    Specifies the byte range of the object to get the records from. A record is processed -/// when its first byte is contained by the range. This parameter is optional, but when -/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the -/// start and end of the range.

    -#[derive(Clone, Default, PartialEq)] -pub struct ScanRange { - ///

    Specifies the end of the byte range. This parameter is optional. Valid values: - /// non-negative integers. The default value is one less than the size of the object being - /// queried. If only the End parameter is supplied, it is interpreted to mean scan the last N - /// bytes of the file. For example, - /// 50 means scan the - /// last 50 bytes.

    - pub end: Option, - ///

    Specifies the start of the byte range. This parameter is optional. Valid values: - /// non-negative integers. The default value is 0. If only start is supplied, it - /// means scan from that point to the end of the file. For example, - /// 50 means scan - /// from byte 50 until the end of the file.

    - pub start: Option, +impl AbortMultipartUploadInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for ScanRange { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ScanRange"); - if let Some(ref val) = self.end { - d.field("end", val); - } - if let Some(ref val) = self.start { - d.field("start", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -///

    The container for selecting objects from a content event stream.

    -#[derive(Debug, Clone, PartialEq)] -#[non_exhaustive] -pub enum SelectObjectContentEvent { - ///

    The Continuation Event.

    - Cont(ContinuationEvent), - ///

    The End Event.

    - End(EndEvent), - ///

    The Progress Event.

    - Progress(ProgressEvent), - ///

    The Records Event.

    - Records(RecordsEvent), - ///

    The Stats Event.

    - Stats(StatsEvent), +pub fn set_if_match_initiated_time(&mut self, field: Option) -> &mut Self { + self.if_match_initiated_time = field; +self } -/// -///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query -/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a -/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data -/// into records. It returns only records that match the specified SQL expression. You must -/// also specify the data serialization format for the response. For more information, see -/// S3Select API Documentation.

    -#[derive(Clone, PartialEq)] -pub struct SelectObjectContentInput { - ///

    The S3 bucket.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The object key.

    - pub key: ObjectKey, - ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created - /// using a checksum algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - pub sse_customer_algorithm: Option, - ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. - /// For more information, see - /// Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - pub sse_customer_key: Option, - ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum - /// algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - pub sse_customer_key_md5: Option, - pub request: SelectObjectContentRequest, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -impl fmt::Debug for SelectObjectContentInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SelectObjectContentInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("request", &self.request); - d.finish_non_exhaustive() - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl SelectObjectContentInput { - #[must_use] - pub fn builder() -> builders::SelectObjectContentInputBuilder { - default() - } +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self } -#[derive(Default)] -pub struct SelectObjectContentOutput { - ///

    The array of results.

    - pub payload: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for SelectObjectContentOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SelectObjectContentOutput"); - if let Some(ref val) = self.payload { - d.field("payload", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -/// -///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query -/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a -/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data -/// into records. It returns only records that match the specified SQL expression. You must -/// also specify the data serialization format for the response. For more information, see -/// S3Select API Documentation.

    -#[derive(Clone, PartialEq)] -pub struct SelectObjectContentRequest { - ///

    The expression that is used to query the object.

    - pub expression: Expression, - ///

    The type of the provided expression (for example, SQL).

    - pub expression_type: ExpressionType, - ///

    Describes the format of the data in the object that is being queried.

    - pub input_serialization: InputSerialization, - ///

    Describes the format of the data that you want Amazon S3 to return in response.

    - pub output_serialization: OutputSerialization, - ///

    Specifies if periodic request progress information should be enabled.

    - pub request_progress: Option, - ///

    Specifies the byte range of the object to get the records from. A record is processed - /// when its first byte is contained by the range. This parameter is optional, but when - /// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the - /// start and end of the range.

    - ///

    - /// ScanRangemay be used in the following ways:

    - ///
      - ///
    • - ///

      - /// 50100 - /// - process only the records starting between the bytes 50 and 100 (inclusive, counting - /// from zero)

      - ///
    • - ///
    • - ///

      - /// 50 - - /// process only the records starting after the byte 50

      - ///
    • - ///
    • - ///

      - /// 50 - - /// process only the records within the last 50 bytes of the file.

      - ///
    • - ///
    - pub scan_range: Option, +#[must_use] +pub fn if_match_initiated_time(mut self, field: Option) -> Self { + self.if_match_initiated_time = field; +self } -impl fmt::Debug for SelectObjectContentRequest { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SelectObjectContentRequest"); - d.field("expression", &self.expression); - d.field("expression_type", &self.expression_type); - d.field("input_serialization", &self.input_serialization); - d.field("output_serialization", &self.output_serialization); - if let Some(ref val) = self.request_progress { - d.field("request_progress", val); - } - if let Some(ref val) = self.scan_range { - d.field("scan_range", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Describes the parameters for Select job types.

    -///

    Learn How to optimize querying your data in Amazon S3 using -/// Amazon Athena, S3 Object Lambda, or client-side filtering.

    -#[derive(Clone, PartialEq)] -pub struct SelectParameters { - /// - ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more - ///

    - ///
    - ///

    The expression that is used to query the object.

    - pub expression: Expression, - ///

    The type of the provided expression (for example, SQL).

    - pub expression_type: ExpressionType, - ///

    Describes the serialization format of the object.

    - pub input_serialization: InputSerialization, - ///

    Describes how the results of the Select job are serialized.

    - pub output_serialization: OutputSerialization, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for SelectParameters { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SelectParameters"); - d.field("expression", &self.expression); - d.field("expression_type", &self.expression_type); - d.field("input_serialization", &self.input_serialization); - d.field("output_serialization", &self.output_serialization); - d.finish_non_exhaustive() - } +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ServerSideEncryption(Cow<'static, str>); +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match_initiated_time = self.if_match_initiated_time; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(AbortMultipartUploadInput { +bucket, +expected_bucket_owner, +if_match_initiated_time, +key, +request_payer, +upload_id, +}) +} -impl ServerSideEncryption { - pub const AES256: &'static str = "AES256"; +} - pub const AWS_KMS: &'static str = "aws:kms"; - pub const AWS_KMS_DSSE: &'static str = "aws:kms:dsse"; +/// A builder for [`CompleteMultipartUploadInput`] +#[derive(Default)] +pub struct CompleteMultipartUploadInputBuilder { +bucket: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +checksum_crc32: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +checksum_crc32c: Option, -impl From for ServerSideEncryption { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} +checksum_crc64nvme: Option, -impl From for Cow<'static, str> { - fn from(s: ServerSideEncryption) -> Self { - s.0 - } -} +checksum_sha1: Option, -impl FromStr for ServerSideEncryption { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} +checksum_sha256: Option, -///

    Describes the default server-side encryption to apply to new objects in the bucket. If a -/// PUT Object request doesn't specify any server-side encryption, this default encryption will -/// be applied. For more information, see PutBucketEncryption.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you don't specify -/// a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key -/// (aws/s3) in your Amazon Web Services account the first time that you add an -/// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key -/// for SSE-KMS.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -///

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

      -///
    • -///
    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionByDefault { - ///

    Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default - /// encryption.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - This parameter is - /// allowed if and only if SSEAlgorithm is set to aws:kms or - /// aws:kms:dsse.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - This parameter is - /// allowed if and only if SSEAlgorithm is set to - /// aws:kms.

      - ///
    • - ///
    - ///
    - ///

    You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS - /// key.

    - ///
      - ///
    • - ///

      Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - ///

      - ///
    • - ///
    • - ///

      Key ARN: - /// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - ///

      - ///
    • - ///
    • - ///

      Key Alias: alias/alias-name - ///

      - ///
    • - ///
    - ///

    If you are using encryption with cross-account or Amazon Web Services service operations, you must use - /// a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - If you're specifying - /// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. - /// If you use a KMS key alias instead, then KMS resolves the key within the - /// requester’s account. This behavior can result in data that's encrypted with a - /// KMS key that belongs to the requester, and not the bucket owner. Also, if you - /// use a key ID, you can run into a LogDestination undeliverable error when creating - /// a VPC flow log.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      - ///
    • - ///
    - ///
    - /// - ///

    Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service - /// Developer Guide.

    - ///
    - pub kms_master_key_id: Option, - ///

    Server-side encryption algorithm to use for the default encryption.

    - /// - ///

    For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

    - ///
    - pub sse_algorithm: ServerSideEncryption, -} +checksum_type: Option, -impl fmt::Debug for ServerSideEncryptionByDefault { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ServerSideEncryptionByDefault"); - if let Some(ref val) = self.kms_master_key_id { - d.field("kms_master_key_id", val); - } - d.field("sse_algorithm", &self.sse_algorithm); - d.finish_non_exhaustive() - } -} +expected_bucket_owner: Option, -///

    Specifies the default server-side-encryption configuration.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionConfiguration { - ///

    Container for information about a particular server-side encryption configuration - /// rule.

    - pub rules: ServerSideEncryptionRules, -} +if_match: Option, -impl fmt::Debug for ServerSideEncryptionConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ServerSideEncryptionConfiguration"); - d.field("rules", &self.rules); - d.finish_non_exhaustive() - } -} +if_none_match: Option, -///

    Specifies the default server-side encryption configuration.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you're specifying -/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. -/// If you use a KMS key alias instead, then KMS resolves the key within the -/// requester’s account. This behavior can result in data that's encrypted with a -/// KMS key that belongs to the requester, and not the bucket owner.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      -///
    • -///
    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionRule { - ///

    Specifies the default server-side encryption to apply to new objects in the bucket. If a - /// PUT Object request doesn't specify any server-side encryption, this default encryption will - /// be applied.

    - pub apply_server_side_encryption_by_default: Option, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS - /// (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the - /// BucketKeyEnabled element to true causes Amazon S3 to use an S3 - /// Bucket Key.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - By default, S3 - /// Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      - ///
    • - ///
    - ///
    - pub bucket_key_enabled: Option, -} +key: Option, -impl fmt::Debug for ServerSideEncryptionRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ServerSideEncryptionRule"); - if let Some(ref val) = self.apply_server_side_encryption_by_default { - d.field("apply_server_side_encryption_by_default", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - d.finish_non_exhaustive() - } -} +mpu_object_size: Option, -pub type ServerSideEncryptionRules = List; +multipart_upload: Option, -pub type SessionCredentialValue = String; +request_payer: Option, + +sse_customer_algorithm: Option, + +sse_customer_key: Option, + +sse_customer_key_md5: Option, + +upload_id: Option, -///

    The established temporary security credentials of the session.

    -/// -///

    -/// Directory buckets - These session -/// credentials are only supported for the authentication and authorization of Zonal endpoint API operations -/// on directory buckets.

    -///
    -#[derive(Clone, PartialEq)] -pub struct SessionCredentials { - ///

    A unique identifier that's associated with a secret access key. The access key ID and - /// the secret access key are used together to sign programmatic Amazon Web Services requests - /// cryptographically.

    - pub access_key_id: AccessKeyIdValue, - ///

    Temporary security credentials expire after a specified interval. After temporary - /// credentials expire, any calls that you make with those credentials will fail. So you must - /// generate a new set of temporary credentials. Temporary credentials cannot be extended or - /// refreshed beyond the original specified interval.

    - pub expiration: SessionExpiration, - ///

    A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services - /// requests. Signing a request identifies the sender and prevents the request from being - /// altered.

    - pub secret_access_key: SessionCredentialValue, - ///

    A part of the temporary security credentials. The session token is used to validate the - /// temporary security credentials. - /// - ///

    - pub session_token: SessionCredentialValue, } -impl fmt::Debug for SessionCredentials { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SessionCredentials"); - d.field("access_key_id", &self.access_key_id); - d.field("expiration", &self.expiration); - d.field("secret_access_key", &self.secret_access_key); - d.field("session_token", &self.session_token); - d.finish_non_exhaustive() - } +impl CompleteMultipartUploadInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl Default for SessionCredentials { - fn default() -> Self { - Self { - access_key_id: default(), - expiration: default(), - secret_access_key: default(), - session_token: default(), - } - } +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self } -pub type SessionExpiration = Timestamp; +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct SessionMode(Cow<'static, str>); +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} -impl SessionMode { - pub const READ_ONLY: &'static str = "ReadOnly"; +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} - pub const READ_WRITE: &'static str = "ReadWrite"; +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { + self.checksum_type = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl From for SessionMode { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self } -impl From for Cow<'static, str> { - fn from(s: SessionMode) -> Self { - s.0 - } +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self } -impl FromStr for SessionMode { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -pub type Setting = bool; +pub fn set_mpu_object_size(&mut self, field: Option) -> &mut Self { + self.mpu_object_size = field; +self +} -///

    To use simple format for S3 keys for log objects, set SimplePrefix to an empty -/// object.

    -///

    -/// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -///

    -#[derive(Clone, Default, PartialEq)] -pub struct SimplePrefix {} +pub fn set_multipart_upload(&mut self, field: Option) -> &mut Self { + self.multipart_upload = field; +self +} -impl fmt::Debug for SimplePrefix { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SimplePrefix"); - d.finish_non_exhaustive() - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -pub type Size = i64; +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} -pub type SkipValidation = bool; +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} -pub type SourceIdentityType = String; +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} -///

    A container that describes additional filters for identifying the source objects that -/// you want to replicate. You can choose to enable or disable the replication of these -/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created -/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service -/// (SSE-KMS).

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SourceSelectionCriteria { - ///

    A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't - /// replicate replica modifications by default. In the latest version of replication - /// configuration (when Filter is specified), you can specify this element and set - /// the status to Enabled to replicate modifications on replicas.

    - /// - ///

    If you don't specify the Filter element, Amazon S3 assumes that the - /// replication configuration is the earlier version, V1. In the earlier version, this - /// element is not allowed

    - ///
    - pub replica_modifications: Option, - ///

    A container for filter information for the selection of Amazon S3 objects encrypted with - /// Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication - /// configuration, this element is required.

    - pub sse_kms_encrypted_objects: Option, +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self } -impl fmt::Debug for SourceSelectionCriteria { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SourceSelectionCriteria"); - if let Some(ref val) = self.replica_modifications { - d.field("replica_modifications", val); - } - if let Some(ref val) = self.sse_kms_encrypted_objects { - d.field("sse_kms_encrypted_objects", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -///

    A container for filter information for the selection of S3 objects encrypted with Amazon Web Services -/// KMS.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct SseKmsEncryptedObjects { - ///

    Specifies whether Amazon S3 replicates objects created with server-side encryption using an - /// Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

    - pub status: SseKmsEncryptedObjectsStatus, +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self } -impl fmt::Debug for SseKmsEncryptedObjects { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SseKmsEncryptedObjects"); - d.field("status", &self.status); - d.finish_non_exhaustive() - } +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct SseKmsEncryptedObjectsStatus(Cow<'static, str>); +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} -impl SseKmsEncryptedObjectsStatus { - pub const DISABLED: &'static str = "Disabled"; +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} - pub const ENABLED: &'static str = "Enabled"; +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn checksum_type(mut self, field: Option) -> Self { + self.checksum_type = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl From for SseKmsEncryptedObjectsStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self } -impl From for Cow<'static, str> { - fn from(s: SseKmsEncryptedObjectsStatus) -> Self { - s.0 - } +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self } -impl FromStr for SseKmsEncryptedObjectsStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -pub type Start = i64; +#[must_use] +pub fn mpu_object_size(mut self, field: Option) -> Self { + self.mpu_object_size = field; +self +} -pub type StartAfter = String; +#[must_use] +pub fn multipart_upload(mut self, field: Option) -> Self { + self.multipart_upload = field; +self +} -///

    Container for the stats details.

    -#[derive(Clone, Default, PartialEq)] -pub struct Stats { - ///

    The total number of uncompressed object bytes processed.

    - pub bytes_processed: Option, - ///

    The total number of bytes of records payload data returned.

    - pub bytes_returned: Option, - ///

    The total number of object bytes scanned.

    - pub bytes_scanned: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for Stats { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Stats"); - if let Some(ref val) = self.bytes_processed { - d.field("bytes_processed", val); - } - if let Some(ref val) = self.bytes_returned { - d.field("bytes_returned", val); - } - if let Some(ref val) = self.bytes_scanned { - d.field("bytes_scanned", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self } -///

    Container for the Stats Event.

    -#[derive(Clone, Default, PartialEq)] -pub struct StatsEvent { - ///

    The Stats event details.

    - pub details: Option, +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self } -impl fmt::Debug for StatsEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("StatsEvent"); - if let Some(ref val) = self.details { - d.field("details", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StorageClass(Cow<'static, str>); +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self +} -impl StorageClass { - pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let checksum_type = self.checksum_type; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match = self.if_match; +let if_none_match = self.if_none_match; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let mpu_object_size = self.mpu_object_size; +let multipart_upload = self.multipart_upload; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(CompleteMultipartUploadInput { +bucket, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +checksum_type, +expected_bucket_owner, +if_match, +if_none_match, +key, +mpu_object_size, +multipart_upload, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + +} - pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; - pub const GLACIER: &'static str = "GLACIER"; +/// A builder for [`CopyObjectInput`] +#[derive(Default)] +pub struct CopyObjectInputBuilder { +acl: Option, - pub const GLACIER_IR: &'static str = "GLACIER_IR"; +bucket: Option, - pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; +bucket_key_enabled: Option, - pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; +cache_control: Option, - pub const OUTPOSTS: &'static str = "OUTPOSTS"; +checksum_algorithm: Option, - pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; +content_disposition: Option, - pub const SNOW: &'static str = "SNOW"; +content_encoding: Option, - pub const STANDARD: &'static str = "STANDARD"; +content_language: Option, - pub const STANDARD_IA: &'static str = "STANDARD_IA"; +content_type: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +copy_source: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +copy_source_if_match: Option, -impl From for StorageClass { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} +copy_source_if_modified_since: Option, -impl From for Cow<'static, str> { - fn from(s: StorageClass) -> Self { - s.0 - } -} +copy_source_if_none_match: Option, -impl FromStr for StorageClass { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} +copy_source_if_unmodified_since: Option, -///

    Specifies data related to access patterns to be collected and made available to analyze -/// the tradeoffs between different storage classes for an Amazon S3 bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct StorageClassAnalysis { - ///

    Specifies how data related to the storage class analysis for an Amazon S3 bucket should be - /// exported.

    - pub data_export: Option, -} +copy_source_sse_customer_algorithm: Option, -impl fmt::Debug for StorageClassAnalysis { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("StorageClassAnalysis"); - if let Some(ref val) = self.data_export { - d.field("data_export", val); - } - d.finish_non_exhaustive() - } -} +copy_source_sse_customer_key: Option, -///

    Container for data related to the storage class analysis for an Amazon S3 bucket for -/// export.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct StorageClassAnalysisDataExport { - ///

    The place to store the data for an analysis.

    - pub destination: AnalyticsExportDestination, - ///

    The version of the output schema to use when exporting data. Must be - /// V_1.

    - pub output_schema_version: StorageClassAnalysisSchemaVersion, -} +copy_source_sse_customer_key_md5: Option, -impl fmt::Debug for StorageClassAnalysisDataExport { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("StorageClassAnalysisDataExport"); - d.field("destination", &self.destination); - d.field("output_schema_version", &self.output_schema_version); - d.finish_non_exhaustive() - } -} +expected_bucket_owner: Option, -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StorageClassAnalysisSchemaVersion(Cow<'static, str>); +expected_source_bucket_owner: Option, -impl StorageClassAnalysisSchemaVersion { - pub const V_1: &'static str = "V_1"; +expires: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +grant_full_control: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +grant_read: Option, -impl From for StorageClassAnalysisSchemaVersion { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} +grant_read_acp: Option, -impl From for Cow<'static, str> { - fn from(s: StorageClassAnalysisSchemaVersion) -> Self { - s.0 - } -} +grant_write_acp: Option, + +key: Option, + +metadata: Option, + +metadata_directive: Option, + +object_lock_legal_hold_status: Option, + +object_lock_mode: Option, + +object_lock_retain_until_date: Option, + +request_payer: Option, + +sse_customer_algorithm: Option, + +sse_customer_key: Option, + +sse_customer_key_md5: Option, + +ssekms_encryption_context: Option, + +ssekms_key_id: Option, + +server_side_encryption: Option, + +storage_class: Option, + +tagging: Option, + +tagging_directive: Option, + +version_id: Option, + +website_redirect_location: Option, -impl FromStr for StorageClassAnalysisSchemaVersion { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -pub type Suffix = String; +impl CopyObjectInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self +} -///

    A container of a key value name pair.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Tag { - ///

    Name of the object key.

    - pub key: Option, - ///

    Value of the tag.

    - pub value: Option, +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for Tag { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Tag"); - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.value { - d.field("value", val); - } - d.finish_non_exhaustive() - } +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self } -pub type TagCount = i32; +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self +} -pub type TagSet = List; +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} -///

    Container for TagSet elements.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Tagging { - ///

    A collection for a set of tags

    - pub tag_set: TagSet, +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self } -impl fmt::Debug for Tagging { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Tagging"); - d.field("tag_set", &self.tag_set); - d.finish_non_exhaustive() - } +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct TaggingDirective(Cow<'static, str>); +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self +} -impl TaggingDirective { - pub const COPY: &'static str = "COPY"; +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self +} - pub const REPLACE: &'static str = "REPLACE"; +pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { + self.copy_source = Some(field); +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_match = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_modified_since = field; +self } -impl From for TaggingDirective { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_none_match = field; +self } -impl From for Cow<'static, str> { - fn from(s: TaggingDirective) -> Self { - s.0 - } +pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_unmodified_since = field; +self } -impl FromStr for TaggingDirective { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_algorithm = field; +self } -pub type TaggingHeader = String; +pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key = field; +self +} -pub type TargetBucket = String; +pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key_md5 = field; +self +} -///

    Container for granting information.

    -///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support -/// target grants. For more information, see Permissions server access log delivery in the -/// Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq)] -pub struct TargetGrant { - ///

    Container for the person being granted permissions.

    - pub grantee: Option, - ///

    Logging permissions assigned to the grantee for the bucket.

    - pub permission: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for TargetGrant { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("TargetGrant"); - if let Some(ref val) = self.grantee { - d.field("grantee", val); - } - if let Some(ref val) = self.permission { - d.field("permission", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_source_bucket_owner = field; +self } -pub type TargetGrants = List; +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self +} -///

    Amazon S3 key format for log objects. Only one format, PartitionedPrefix or -/// SimplePrefix, is allowed.

    -#[derive(Clone, Default, PartialEq)] -pub struct TargetObjectKeyFormat { - ///

    Partitioned S3 key for log objects.

    - pub partitioned_prefix: Option, - ///

    To use the simple format for S3 keys for log objects. To specify SimplePrefix format, - /// set SimplePrefix to {}.

    - pub simple_prefix: Option, +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self } -impl fmt::Debug for TargetObjectKeyFormat { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("TargetObjectKeyFormat"); - if let Some(ref val) = self.partitioned_prefix { - d.field("partitioned_prefix", val); - } - if let Some(ref val) = self.simple_prefix { - d.field("simple_prefix", val); - } - d.finish_non_exhaustive() - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self } -pub type TargetPrefix = String; +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Tier(Cow<'static, str>); +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} -impl Tier { - pub const BULK: &'static str = "Bulk"; +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub const EXPEDITED: &'static str = "Expedited"; +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self +} - pub const STANDARD: &'static str = "Standard"; +pub fn set_metadata_directive(&mut self, field: Option) -> &mut Self { + self.metadata_directive = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self } -impl From for Tier { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self } -impl From for Cow<'static, str> { - fn from(s: Tier) -> Self { - s.0 - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl FromStr for Tier { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self } -///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by -/// automatically moving data to the most cost-effective storage access tier, without -/// additional operational overhead.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct Tiering { - ///

    S3 Intelligent-Tiering access tier. See Storage class - /// for automatically optimizing frequently and infrequently accessed objects for a - /// list of access tiers in the S3 Intelligent-Tiering storage class.

    - pub access_tier: IntelligentTieringAccessTier, - ///

    The number of consecutive days of no access after which an object will be eligible to be - /// transitioned to the corresponding tier. The minimum number of days specified for - /// Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least - /// 180 days. The maximum can be up to 2 years (730 days).

    - pub days: IntelligentTieringDays, +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} + +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self } -impl fmt::Debug for Tiering { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Tiering"); - d.field("access_tier", &self.access_tier); - d.field("days", &self.days); - d.finish_non_exhaustive() - } +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self } -pub type TieringList = List; +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} -pub type Token = String; +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} -pub type TokenType = String; +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self +} -///

    -/// You have attempted to add more parts than the maximum of 10000 -/// that are allowed for this object. You can use the CopyObject operation -/// to copy this object to another and then add more data to the newly copied object. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct TooManyParts {} +pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; +self +} -impl fmt::Debug for TooManyParts { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("TooManyParts"); - d.finish_non_exhaustive() - } +pub fn set_tagging_directive(&mut self, field: Option) -> &mut Self { + self.tagging_directive = field; +self } -pub type TopicArn = String; +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} -///

    A container for specifying the configuration for publication of messages to an Amazon -/// Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct TopicConfiguration { - ///

    The Amazon S3 bucket event about which to send notifications. For more information, see - /// Supported - /// Event Types in the Amazon S3 User Guide.

    - pub events: EventList, - pub filter: Option, - pub id: Option, - ///

    The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message - /// when it detects events of the specified type.

    - pub topic_arn: TopicArn, +pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; +self } -impl fmt::Debug for TopicConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("TopicConfiguration"); - d.field("events", &self.events); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.field("topic_arn", &self.topic_arn); - d.finish_non_exhaustive() - } +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self } -pub type TopicConfigurationList = List; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -///

    Specifies when an object transitions to a specified storage class. For more information -/// about Amazon S3 lifecycle configuration rules, see Transitioning -/// Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Transition { - ///

    Indicates when objects are transitioned to the specified storage class. The date value - /// must be in ISO 8601 format. The time is always midnight UTC.

    - pub date: Option, - ///

    Indicates the number of days after creation when objects are transitioned to the - /// specified storage class. If the specified storage class is INTELLIGENT_TIERING, - /// GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are - /// 0 or positive integers. If the specified storage class is STANDARD_IA - /// or ONEZONE_IA, valid values are positive integers greater than 30. Be - /// aware that some storage classes have a minimum storage duration and that you're charged for - /// transitioning objects before their minimum storage duration. For more information, see - /// - /// Constraints and considerations for transitions in the - /// Amazon S3 User Guide.

    - pub days: Option, - ///

    The storage class to which you want the object to transition.

    - pub storage_class: Option, +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self } -impl fmt::Debug for Transition { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Transition"); - if let Some(ref val) = self.date { - d.field("date", val); - } - if let Some(ref val) = self.days { - d.field("days", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct TransitionDefaultMinimumObjectSize(Cow<'static, str>); +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} -impl TransitionDefaultMinimumObjectSize { - pub const ALL_STORAGE_CLASSES_128K: &'static str = "all_storage_classes_128K"; +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self +} - pub const VARIES_BY_STORAGE_CLASS: &'static str = "varies_by_storage_class"; +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self } -impl From for TransitionDefaultMinimumObjectSize { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn copy_source(mut self, field: CopySource) -> Self { + self.copy_source = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: TransitionDefaultMinimumObjectSize) -> Self { - s.0 - } +#[must_use] +pub fn copy_source_if_match(mut self, field: Option) -> Self { + self.copy_source_if_match = field; +self } -impl FromStr for TransitionDefaultMinimumObjectSize { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { + self.copy_source_if_modified_since = field; +self } -pub type TransitionList = List; +#[must_use] +pub fn copy_source_if_none_match(mut self, field: Option) -> Self { + self.copy_source_if_none_match = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct TransitionStorageClass(Cow<'static, str>); +#[must_use] +pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { + self.copy_source_if_unmodified_since = field; +self +} -impl TransitionStorageClass { - pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; +#[must_use] +pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { + self.copy_source_sse_customer_algorithm = field; +self +} - pub const GLACIER: &'static str = "GLACIER"; +#[must_use] +pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key = field; +self +} - pub const GLACIER_IR: &'static str = "GLACIER_IR"; +#[must_use] +pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key_md5 = field; +self +} - pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; +#[must_use] +pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { + self.expected_source_bucket_owner = field; +self +} - pub const STANDARD_IA: &'static str = "STANDARD_IA"; +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self } -impl From for TransitionStorageClass { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self } -impl From for Cow<'static, str> { - fn from(s: TransitionStorageClass) -> Self { - s.0 - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self } -impl FromStr for TransitionStorageClass { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Type(Cow<'static, str>); +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self +} -impl Type { - pub const AMAZON_CUSTOMER_BY_EMAIL: &'static str = "AmazonCustomerByEmail"; +#[must_use] +pub fn metadata_directive(mut self, field: Option) -> Self { + self.metadata_directive = field; +self +} - pub const CANONICAL_USER: &'static str = "CanonicalUser"; +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self +} - pub const GROUP: &'static str = "Group"; +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl From for Type { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self } -impl From for Cow<'static, str> { - fn from(s: Type) -> Self { - s.0 - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self } -impl FromStr for Type { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self } -pub type URI = String; +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} + +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} + +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; +self +} + +#[must_use] +pub fn tagging_directive(mut self, field: Option) -> Self { + self.tagging_directive = field; +self +} + +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} + +#[must_use] +pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; +self +} + +pub fn build(self) -> Result { +let acl = self.acl; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_algorithm = self.checksum_algorithm; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_type = self.content_type; +let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; +let copy_source_if_match = self.copy_source_if_match; +let copy_source_if_modified_since = self.copy_source_if_modified_since; +let copy_source_if_none_match = self.copy_source_if_none_match; +let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; +let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; +let copy_source_sse_customer_key = self.copy_source_sse_customer_key; +let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let expected_source_bucket_owner = self.expected_source_bucket_owner; +let expires = self.expires; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write_acp = self.grant_write_acp; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let metadata = self.metadata; +let metadata_directive = self.metadata_directive; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let storage_class = self.storage_class; +let tagging = self.tagging; +let tagging_directive = self.tagging_directive; +let version_id = self.version_id; +let website_redirect_location = self.website_redirect_location; +Ok(CopyObjectInput { +acl, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +content_disposition, +content_encoding, +content_language, +content_type, +copy_source, +copy_source_if_match, +copy_source_if_modified_since, +copy_source_if_none_match, +copy_source_if_unmodified_since, +copy_source_sse_customer_algorithm, +copy_source_sse_customer_key, +copy_source_sse_customer_key_md5, +expected_bucket_owner, +expected_source_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +key, +metadata, +metadata_directive, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +tagging_directive, +version_id, +website_redirect_location, +}) +} + +} + + +/// A builder for [`CreateBucketInput`] +#[derive(Default)] +pub struct CreateBucketInputBuilder { +acl: Option, -pub type UploadIdMarker = String; +bucket: Option, -#[derive(Clone, PartialEq)] -pub struct UploadPartCopyInput { - ///

    The bucket name.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - /// - ///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, - /// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    - ///
    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Specifies the source object for the copy operation. You specify the value in one of two - /// formats, depending on whether you want to access the source object through an access point:

    - ///
      - ///
    • - ///

      For objects not accessed through an access point, specify the name of the source bucket - /// and key of the source object, separated by a slash (/). For example, to copy the - /// object reports/january.pdf from the bucket - /// awsexamplebucket, use awsexamplebucket/reports/january.pdf. - /// The value must be URL-encoded.

      - ///
    • - ///
    • - ///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      - /// - ///
        - ///
      • - ///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        - ///
      • - ///
      • - ///

        Access points are not supported by directory buckets.

        - ///
      • - ///
      - ///
      - ///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      - ///
    • - ///
    - ///

    If your bucket has versioning enabled, you could have multiple versions of the same - /// object. By default, x-amz-copy-source identifies the current version of the - /// source object to copy. To copy a specific version of the source object to copy, append - /// ?versionId=<version-id> to the x-amz-copy-source request - /// header (for example, x-amz-copy-source: - /// /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

    - ///

    If the current version is a delete marker and you don't specify a versionId in the - /// x-amz-copy-source request header, Amazon S3 returns a 404 Not Found - /// error, because the object does not exist. If you specify versionId in the - /// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an - /// HTTP 400 Bad Request error, because you are not allowed to specify a delete - /// marker as a version for the x-amz-copy-source.

    - /// - ///

    - /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets.

    - ///
    - pub copy_source: CopySource, - ///

    Copies the object if its entity tag (ETag) matches the specified tag.

    - ///

    If both of the x-amz-copy-source-if-match and - /// x-amz-copy-source-if-unmodified-since headers are present in the request as - /// follows:

    - ///

    - /// x-amz-copy-source-if-match condition evaluates to true, - /// and;

    - ///

    - /// x-amz-copy-source-if-unmodified-since condition evaluates to - /// false;

    - ///

    Amazon S3 returns 200 OK and copies the data. - ///

    - pub copy_source_if_match: Option, - ///

    Copies the object if it has been modified since the specified time.

    - ///

    If both of the x-amz-copy-source-if-none-match and - /// x-amz-copy-source-if-modified-since headers are present in the request as - /// follows:

    - ///

    - /// x-amz-copy-source-if-none-match condition evaluates to false, - /// and;

    - ///

    - /// x-amz-copy-source-if-modified-since condition evaluates to - /// true;

    - ///

    Amazon S3 returns 412 Precondition Failed response code. - ///

    - pub copy_source_if_modified_since: Option, - ///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    - ///

    If both of the x-amz-copy-source-if-none-match and - /// x-amz-copy-source-if-modified-since headers are present in the request as - /// follows:

    - ///

    - /// x-amz-copy-source-if-none-match condition evaluates to false, - /// and;

    - ///

    - /// x-amz-copy-source-if-modified-since condition evaluates to - /// true;

    - ///

    Amazon S3 returns 412 Precondition Failed response code. - ///

    - pub copy_source_if_none_match: Option, - ///

    Copies the object if it hasn't been modified since the specified time.

    - ///

    If both of the x-amz-copy-source-if-match and - /// x-amz-copy-source-if-unmodified-since headers are present in the request as - /// follows:

    - ///

    - /// x-amz-copy-source-if-match condition evaluates to true, - /// and;

    - ///

    - /// x-amz-copy-source-if-unmodified-since condition evaluates to - /// false;

    - ///

    Amazon S3 returns 200 OK and copies the data. - ///

    - pub copy_source_if_unmodified_since: Option, - ///

    The range of bytes to copy from the source object. The range value must use the form - /// bytes=first-last, where the first and last are the zero-based byte offsets to copy. For - /// example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You - /// can copy a range only if the source object is greater than 5 MB.

    - pub copy_source_range: Option, - ///

    Specifies the algorithm to use when decrypting the source object (for example, - /// AES256).

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    - pub copy_source_sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source - /// object. The encryption key provided in this header must be one that was used when the - /// source object was created.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    - pub copy_source_sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    - pub copy_source_sse_customer_key_md5: Option, - ///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_source_bucket_owner: Option, - ///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, - ///

    Part number of part being copied. This is a positive integer between 1 and - /// 10,000.

    - pub part_number: PartNumber, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header. This must be the - /// same encryption key specified in the initiate multipart upload request.

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Upload ID identifying the multipart upload whose part is being copied.

    - pub upload_id: MultipartUploadId, -} +create_bucket_configuration: Option, -impl fmt::Debug for UploadPartCopyInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("UploadPartCopyInput"); - d.field("bucket", &self.bucket); - d.field("copy_source", &self.copy_source); - if let Some(ref val) = self.copy_source_if_match { - d.field("copy_source_if_match", val); - } - if let Some(ref val) = self.copy_source_if_modified_since { - d.field("copy_source_if_modified_since", val); - } - if let Some(ref val) = self.copy_source_if_none_match { - d.field("copy_source_if_none_match", val); - } - if let Some(ref val) = self.copy_source_if_unmodified_since { - d.field("copy_source_if_unmodified_since", val); - } - if let Some(ref val) = self.copy_source_range { - d.field("copy_source_range", val); - } - if let Some(ref val) = self.copy_source_sse_customer_algorithm { - d.field("copy_source_sse_customer_algorithm", val); - } - if let Some(ref val) = self.copy_source_sse_customer_key { - d.field("copy_source_sse_customer_key", val); - } - if let Some(ref val) = self.copy_source_sse_customer_key_md5 { - d.field("copy_source_sse_customer_key_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expected_source_bucket_owner { - d.field("expected_source_bucket_owner", val); - } - d.field("key", &self.key); - d.field("part_number", &self.part_number); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } -} +grant_full_control: Option, -impl UploadPartCopyInput { - #[must_use] - pub fn builder() -> builders::UploadPartCopyInputBuilder { - default() - } -} +grant_read: Option, + +grant_read_acp: Option, + +grant_write: Option, + +grant_write_acp: Option, + +object_lock_enabled_for_bucket: Option, + +object_ownership: Option, -#[derive(Clone, Default, PartialEq)] -pub struct UploadPartCopyOutput { - ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    Container for all response elements.

    - pub copy_part_result: Option, - ///

    The version of the source object that was copied, if you have enabled versioning on the - /// source bucket.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    - pub copy_source_version_id: Option, - pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms).

    - pub server_side_encryption: Option, } -impl fmt::Debug for UploadPartCopyOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("UploadPartCopyOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.copy_part_result { - d.field("copy_part_result", val); - } - if let Some(ref val) = self.copy_source_version_id { - d.field("copy_source_version_id", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - d.finish_non_exhaustive() - } +impl CreateBucketInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self } -#[derive(Default)] -pub struct UploadPartInput { - ///

    Object data.

    - pub body: Option, - ///

    The name of the bucket to which the multipart upload was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - ///

    This checksum algorithm must be the same for all parts and it match the checksum value - /// supplied in the CreateMultipartUpload request.

    - pub checksum_algorithm: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be - /// determined automatically.

    - pub content_length: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated - /// when using the command from the CLI. This parameter is required if object lock parameters - /// are specified.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, - ///

    Part number of part being uploaded. This is a positive integer between 1 and - /// 10,000.

    - pub part_number: PartNumber, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header. This must be the - /// same encryption key specified in the initiate multipart upload request.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Upload ID identifying the multipart upload whose part is being uploaded.

    - pub upload_id: MultipartUploadId, +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for UploadPartInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("UploadPartInput"); - if let Some(ref val) = self.body { - d.field("body", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - d.field("part_number", &self.part_number); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } +pub fn set_create_bucket_configuration(&mut self, field: Option) -> &mut Self { + self.create_bucket_configuration = field; +self } -impl UploadPartInput { - #[must_use] - pub fn builder() -> builders::UploadPartInputBuilder { - default() - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct UploadPartOutput { - ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Entity tag for the uploaded object.

    - pub e_tag: Option, - pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms).

    - pub server_side_encryption: Option, +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self } -impl fmt::Debug for UploadPartOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("UploadPartOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - d.finish_non_exhaustive() - } +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self } -pub type UserMetadata = List; +pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; +self +} -pub type Value = String; +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} -pub type VersionCount = i32; +pub fn set_object_lock_enabled_for_bucket(&mut self, field: Option) -> &mut Self { + self.object_lock_enabled_for_bucket = field; +self +} -pub type VersionIdMarker = String; +pub fn set_object_ownership(&mut self, field: Option) -> &mut Self { + self.object_ownership = field; +self +} -///

    Describes the versioning state of an Amazon S3 bucket. For more information, see PUT -/// Bucket versioning in the Amazon S3 API Reference.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct VersioningConfiguration { - pub exclude_folders: Option, - pub excluded_prefixes: Option, - ///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This - /// element is only returned if the bucket has been configured with MFA delete. If the bucket - /// has never been so configured, this element is not returned.

    - pub mfa_delete: Option, - ///

    The versioning state of the bucket.

    - pub status: Option, +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self } -impl fmt::Debug for VersioningConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("VersioningConfiguration"); - if let Some(ref val) = self.exclude_folders { - d.field("exclude_folders", val); - } - if let Some(ref val) = self.excluded_prefixes { - d.field("excluded_prefixes", val); - } - if let Some(ref val) = self.mfa_delete { - d.field("mfa_delete", val); - } - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} + +#[must_use] +pub fn create_bucket_configuration(mut self, field: Option) -> Self { + self.create_bucket_configuration = field; +self } -///

    Specifies website configuration parameters for an Amazon S3 bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct WebsiteConfiguration { - ///

    The name of the error document for the website.

    - pub error_document: Option, - ///

    The name of the index document for the website.

    - pub index_document: Option, - ///

    The redirect behavior for every request to this bucket's website endpoint.

    - /// - ///

    If you specify this property, you can't specify any other property.

    - ///
    - pub redirect_all_requests_to: Option, - ///

    Rules that define when a redirect is applied and the redirect behavior.

    - pub routing_rules: Option, +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self } -impl fmt::Debug for WebsiteConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("WebsiteConfiguration"); - if let Some(ref val) = self.error_document { - d.field("error_document", val); - } - if let Some(ref val) = self.index_document { - d.field("index_document", val); - } - if let Some(ref val) = self.redirect_all_requests_to { - d.field("redirect_all_requests_to", val); - } - if let Some(ref val) = self.routing_rules { - d.field("routing_rules", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self } -pub type WebsiteRedirectLocation = String; +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} -#[derive(Default)] -pub struct WriteGetObjectResponseInput { - ///

    Indicates that a range of bytes was specified.

    - pub accept_ranges: Option, - ///

    The object data.

    - pub body: Option, - ///

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side - /// encryption with Amazon Web Services KMS (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 - /// checksum of the object returned by the Object Lambda function. This may not match the - /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values - /// only when the original GetObject request required checksum validation. For - /// more information about checksums, see Checking object - /// integrity in the Amazon S3 User Guide.

    - ///

    Only one checksum header can be specified at a time. If you supply multiple checksum - /// headers, this request will fail.

    - ///

    - pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C - /// checksum of the object returned by the Object Lambda function. This may not match the - /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values - /// only when the original GetObject request required checksum validation. For - /// more information about checksums, see Checking object - /// integrity in the Amazon S3 User Guide.

    - ///

    Only one checksum header can be specified at a time. If you supply multiple checksum - /// headers, this request will fail.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 - /// digest of the object returned by the Object Lambda function. This may not match the - /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values - /// only when the original GetObject request required checksum validation. For - /// more information about checksums, see Checking object - /// integrity in the Amazon S3 User Guide.

    - ///

    Only one checksum header can be specified at a time. If you supply multiple checksum - /// headers, this request will fail.

    - pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 - /// digest of the object returned by the Object Lambda function. This may not match the - /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values - /// only when the original GetObject request required checksum validation. For - /// more information about checksums, see Checking object - /// integrity in the Amazon S3 User Guide.

    - ///

    Only one checksum header can be specified at a time. If you supply multiple checksum - /// headers, this request will fail.

    - pub checksum_sha256: Option, - ///

    Specifies presentational information for the object.

    - pub content_disposition: Option, - ///

    Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

    - pub content_encoding: Option, - ///

    The language the content is in.

    - pub content_language: Option, - ///

    The size of the content body in bytes.

    - pub content_length: Option, - ///

    The portion of the object returned in the response.

    - pub content_range: Option, - ///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, - ///

    Specifies whether an object stored in Amazon S3 is (true) or is not - /// (false) a delete marker. To learn more about delete markers, see Working with delete markers.

    - pub delete_marker: Option, - ///

    An opaque identifier assigned by a web server to a specific version of a resource found - /// at a URL.

    - pub e_tag: Option, - ///

    A string that uniquely identifies an error condition. Returned in the <Code> tag - /// of the error XML response for a corresponding GetObject call. Cannot be used - /// with a successful StatusCode header or when the transformed object is provided - /// in the body. All error codes from S3 are sentence-cased. The regular expression (regex) - /// value is "^[A-Z][a-zA-Z]+$".

    - pub error_code: Option, - ///

    Contains a generic description of the error condition. Returned in the <Message> - /// tag of the error XML response for a corresponding GetObject call. Cannot be - /// used with a successful StatusCode header or when the transformed object is - /// provided in body.

    - pub error_message: Option, - ///

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes - /// this header. It includes the expiry-date and rule-id key-value - /// pairs that provide the object expiration information. The value of the rule-id - /// is URL-encoded.

    - pub expiration: Option, - ///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, - ///

    The date and time that the object was last modified.

    - pub last_modified: Option, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    Set to the number of metadata entries not returned in x-amz-meta headers. - /// This can happen if you create metadata using an API like SOAP that supports more flexible - /// metadata than the REST API. For example, using SOAP, you can create metadata whose values - /// are not legal HTTP headers.

    - pub missing_meta: Option, - ///

    Indicates whether an object stored in Amazon S3 has an active legal hold.

    - pub object_lock_legal_hold_status: Option, - ///

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information - /// about S3 Object Lock, see Object Lock.

    - pub object_lock_mode: Option, - ///

    The date and time when Object Lock is configured to expire.

    - pub object_lock_retain_until_date: Option, - ///

    The count of parts this object has.

    - pub parts_count: Option, - ///

    Indicates if request involves bucket that is either a source or destination in a - /// Replication rule. For more information about S3 Replication, see Replication.

    - pub replication_status: Option, - pub request_charged: Option, - ///

    Route prefix to the HTTP URL generated.

    - pub request_route: RequestRoute, - ///

    A single use encrypted token that maps WriteGetObjectResponse to the end - /// user GetObject request.

    - pub request_token: RequestToken, - ///

    Provides information about object restoration operation and expiration time of the - /// restored object copy.

    - pub restore: Option, - ///

    Encryption algorithm used if server-side encryption with a customer-provided encryption - /// key was specified for object stored in Amazon S3.

    - pub sse_customer_algorithm: Option, - ///

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data - /// stored in S3. For more information, see Protecting data - /// using server-side encryption with customer-provided encryption keys - /// (SSE-C).

    - pub sse_customer_key_md5: Option, - ///

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key - /// Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in - /// Amazon S3 object.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when storing requested object in Amazon S3 (for - /// example, AES256, aws:kms).

    - pub server_side_encryption: Option, - ///

    The integer status code for an HTTP response of a corresponding GetObject - /// request. The following is a list of status codes.

    - ///
      - ///
    • - ///

      - /// 200 - OK - ///

      - ///
    • - ///
    • - ///

      - /// 206 - Partial Content - ///

      - ///
    • - ///
    • - ///

      - /// 304 - Not Modified - ///

      - ///
    • - ///
    • - ///

      - /// 400 - Bad Request - ///

      - ///
    • - ///
    • - ///

      - /// 401 - Unauthorized - ///

      - ///
    • - ///
    • - ///

      - /// 403 - Forbidden - ///

      - ///
    • - ///
    • - ///

      - /// 404 - Not Found - ///

      - ///
    • - ///
    • - ///

      - /// 405 - Method Not Allowed - ///

      - ///
    • - ///
    • - ///

      - /// 409 - Conflict - ///

      - ///
    • - ///
    • - ///

      - /// 411 - Length Required - ///

      - ///
    • - ///
    • - ///

      - /// 412 - Precondition Failed - ///

      - ///
    • - ///
    • - ///

      - /// 416 - Range Not Satisfiable - ///

      - ///
    • - ///
    • - ///

      - /// 500 - Internal Server Error - ///

      - ///
    • - ///
    • - ///

      - /// 503 - Service Unavailable - ///

      - ///
    • - ///
    - pub status_code: Option, - ///

    Provides storage class information of the object. Amazon S3 returns this header for all - /// objects except for S3 Standard storage class objects.

    - ///

    For more information, see Storage Classes.

    - pub storage_class: Option, - ///

    The number of tags, if any, on the object.

    - pub tag_count: Option, - ///

    An ID used to reference a specific version of the object.

    - pub version_id: Option, +#[must_use] +pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; +self } -impl fmt::Debug for WriteGetObjectResponseInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("WriteGetObjectResponseInput"); - if let Some(ref val) = self.accept_ranges { - d.field("accept_ranges", val); - } - if let Some(ref val) = self.body { - d.field("body", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_range { - d.field("content_range", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.error_code { - d.field("error_code", val); - } - if let Some(ref val) = self.error_message { - d.field("error_message", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.missing_meta { - d.field("missing_meta", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.parts_count { - d.field("parts_count", val); - } - if let Some(ref val) = self.replication_status { - d.field("replication_status", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.field("request_route", &self.request_route); - d.field("request_token", &self.request_token); - if let Some(ref val) = self.restore { - d.field("restore", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.status_code { - d.field("status_code", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tag_count { - d.field("tag_count", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self } -impl WriteGetObjectResponseInput { - #[must_use] - pub fn builder() -> builders::WriteGetObjectResponseInputBuilder { - default() - } +#[must_use] +pub fn object_lock_enabled_for_bucket(mut self, field: Option) -> Self { + self.object_lock_enabled_for_bucket = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct WriteGetObjectResponseOutput {} +#[must_use] +pub fn object_ownership(mut self, field: Option) -> Self { + self.object_ownership = field; +self +} -impl fmt::Debug for WriteGetObjectResponseOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("WriteGetObjectResponseOutput"); - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let acl = self.acl; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let create_bucket_configuration = self.create_bucket_configuration; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write = self.grant_write; +let grant_write_acp = self.grant_write_acp; +let object_lock_enabled_for_bucket = self.object_lock_enabled_for_bucket; +let object_ownership = self.object_ownership; +Ok(CreateBucketInput { +acl, +bucket, +create_bucket_configuration, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +object_lock_enabled_for_bucket, +object_ownership, +}) } -pub type WriteOffsetBytes = i64; +} -pub type Years = i32; -#[cfg(test)] -mod tests { - use super::*; +/// A builder for [`CreateBucketMetadataTableConfigurationInput`] +#[derive(Default)] +pub struct CreateBucketMetadataTableConfigurationInputBuilder { +bucket: Option, - fn require_default() {} - fn require_clone() {} +checksum_algorithm: Option, - #[test] - fn test_default() { - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - } - #[test] - fn test_clone() { - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - } -} -pub mod builders { - #![allow(clippy::missing_errors_doc)] +content_md5: Option, - pub use super::build_error::BuildError; - use super::*; +expected_bucket_owner: Option, - /// A builder for [`AbortMultipartUploadInput`] - #[derive(Default)] - pub struct AbortMultipartUploadInputBuilder { - bucket: Option, +metadata_table_configuration: Option, - expected_bucket_owner: Option, +} - if_match_initiated_time: Option, +impl CreateBucketMetadataTableConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - key: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - request_payer: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - upload_id: Option, - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - impl AbortMultipartUploadInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_metadata_table_configuration(&mut self, field: MetadataTableConfiguration) -> &mut Self { + self.metadata_table_configuration = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_if_match_initiated_time(&mut self, field: Option) -> &mut Self { - self.if_match_initiated_time = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } +#[must_use] +pub fn metadata_table_configuration(mut self, field: MetadataTableConfiguration) -> Self { + self.metadata_table_configuration = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let metadata_table_configuration = self.metadata_table_configuration.ok_or_else(|| BuildError::missing_field("metadata_table_configuration"))?; +Ok(CreateBucketMetadataTableConfigurationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +metadata_table_configuration, +}) +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +} - #[must_use] - pub fn if_match_initiated_time(mut self, field: Option) -> Self { - self.if_match_initiated_time = field; - self - } - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +/// A builder for [`CreateMultipartUploadInput`] +#[derive(Default)] +pub struct CreateMultipartUploadInputBuilder { +acl: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +bucket: Option, - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } +bucket_key_enabled: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match_initiated_time = self.if_match_initiated_time; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(AbortMultipartUploadInput { - bucket, - expected_bucket_owner, - if_match_initiated_time, - key, - request_payer, - upload_id, - }) - } - } +cache_control: Option, - /// A builder for [`CompleteMultipartUploadInput`] - #[derive(Default)] - pub struct CompleteMultipartUploadInputBuilder { - bucket: Option, +checksum_algorithm: Option, - checksum_crc32: Option, +checksum_type: Option, - checksum_crc32c: Option, +content_disposition: Option, - checksum_crc64nvme: Option, +content_encoding: Option, - checksum_sha1: Option, +content_language: Option, - checksum_sha256: Option, +content_type: Option, - checksum_type: Option, +expected_bucket_owner: Option, - expected_bucket_owner: Option, +expires: Option, - if_match: Option, +grant_full_control: Option, - if_none_match: Option, +grant_read: Option, - key: Option, +grant_read_acp: Option, - mpu_object_size: Option, +grant_write_acp: Option, - multipart_upload: Option, +key: Option, - request_payer: Option, +metadata: Option, - sse_customer_algorithm: Option, +object_lock_legal_hold_status: Option, - sse_customer_key: Option, +object_lock_mode: Option, - sse_customer_key_md5: Option, +object_lock_retain_until_date: Option, - upload_id: Option, - } +request_payer: Option, - impl CompleteMultipartUploadInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +sse_customer_algorithm: Option, - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } +sse_customer_key: Option, - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } +sse_customer_key_md5: Option, - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } +ssekms_encryption_context: Option, - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } +ssekms_key_id: Option, - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } +server_side_encryption: Option, - pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { - self.checksum_type = field; - self - } +storage_class: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +tagging: Option, - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } +version_id: Option, - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } +website_redirect_location: Option, - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +} - pub fn set_mpu_object_size(&mut self, field: Option) -> &mut Self { - self.mpu_object_size = field; - self - } +impl CreateMultipartUploadInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self +} - pub fn set_multipart_upload(&mut self, field: Option) -> &mut Self { - self.multipart_upload = field; - self - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { + self.checksum_type = field; +self +} - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self +} - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self +} - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self +} - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self +} - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self +} - #[must_use] - pub fn checksum_type(mut self, field: Option) -> Self { - self.checksum_type = field; - self - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self +} - #[must_use] - pub fn mpu_object_size(mut self, field: Option) -> Self { - self.mpu_object_size = field; - self - } +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self +} - #[must_use] - pub fn multipart_upload(mut self, field: Option) -> Self { - self.multipart_upload = field; - self - } +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let checksum_type = self.checksum_type; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match = self.if_match; - let if_none_match = self.if_none_match; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let mpu_object_size = self.mpu_object_size; - let multipart_upload = self.multipart_upload; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(CompleteMultipartUploadInput { - bucket, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - checksum_type, - expected_bucket_owner, - if_match, - if_none_match, - key, - mpu_object_size, - multipart_upload, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } - } +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self +} - /// A builder for [`CopyObjectInput`] - #[derive(Default)] - pub struct CopyObjectInputBuilder { - acl: Option, +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} - bucket: Option, +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} - bucket_key_enabled: Option, +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self +} - cache_control: Option, +pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; +self +} - checksum_algorithm: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - content_disposition: Option, +pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; +self +} - content_encoding: Option, +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - content_language: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - content_type: Option, +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self +} - copy_source: Option, +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self +} - copy_source_if_match: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - copy_source_if_modified_since: Option, +#[must_use] +pub fn checksum_type(mut self, field: Option) -> Self { + self.checksum_type = field; +self +} - copy_source_if_none_match: Option, +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self +} - copy_source_if_unmodified_since: Option, +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self +} - copy_source_sse_customer_algorithm: Option, +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} - copy_source_sse_customer_key: Option, +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self +} - copy_source_sse_customer_key_md5: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} - expected_source_bucket_owner: Option, +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} - expires: Option, +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self +} - grant_full_control: Option, +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} - grant_read: Option, +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self +} - grant_read_acp: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - grant_write_acp: Option, +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self +} - key: Option, +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self +} - metadata: Option, +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self +} - metadata_directive: Option, +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} - object_lock_legal_hold_status: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - object_lock_mode: Option, +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - object_lock_retain_until_date: Option, +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - request_payer: Option, +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} + +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} + +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} + +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; +self +} + +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} + +#[must_use] +pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; +self +} + +pub fn build(self) -> Result { +let acl = self.acl; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_algorithm = self.checksum_algorithm; +let checksum_type = self.checksum_type; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_type = self.content_type; +let expected_bucket_owner = self.expected_bucket_owner; +let expires = self.expires; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write_acp = self.grant_write_acp; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let metadata = self.metadata; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let storage_class = self.storage_class; +let tagging = self.tagging; +let version_id = self.version_id; +let website_redirect_location = self.website_redirect_location; +Ok(CreateMultipartUploadInput { +acl, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_type, +content_disposition, +content_encoding, +content_language, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +version_id, +website_redirect_location, +}) +} + +} + + +/// A builder for [`CreateSessionInput`] +#[derive(Default)] +pub struct CreateSessionInputBuilder { +bucket: Option, - sse_customer_algorithm: Option, +bucket_key_enabled: Option, - sse_customer_key: Option, +ssekms_encryption_context: Option, - sse_customer_key_md5: Option, +ssekms_key_id: Option, - ssekms_encryption_context: Option, +server_side_encryption: Option, - ssekms_key_id: Option, +session_mode: Option, - server_side_encryption: Option, +} - storage_class: Option, +impl CreateSessionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - tagging: Option, +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} - tagging_directive: Option, +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self +} - version_id: Option, +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} - website_redirect_location: Option, - } +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} - impl CopyObjectInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } +pub fn set_session_mode(&mut self, field: Option) -> &mut Self { + self.session_mode = field; +self +} - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self +} - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } +#[must_use] +pub fn session_mode(mut self, field: Option) -> Self { + self.session_mode = field; +self +} - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let session_mode = self.session_mode; +Ok(CreateSessionInput { +bucket, +bucket_key_enabled, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +session_mode, +}) +} - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } +} - pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { - self.copy_source = Some(field); - self - } - pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_match = field; - self - } +/// A builder for [`DeleteBucketInput`] +#[derive(Default)] +pub struct DeleteBucketInputBuilder { +bucket: Option, - pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_modified_since = field; - self - } +expected_bucket_owner: Option, - pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_none_match = field; - self - } +force_delete: Option, - pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_unmodified_since = field; - self - } +} - pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_algorithm = field; - self - } +impl DeleteBucketInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key_md5 = field; - self - } +pub fn set_force_delete(&mut self, field: Option) -> &mut Self { + self.force_delete = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_source_bucket_owner = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } +#[must_use] +pub fn force_delete(mut self, field: Option) -> Self { + self.force_delete = field; +self +} - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let force_delete = self.force_delete; +Ok(DeleteBucketInput { +bucket, +expected_bucket_owner, +force_delete, +}) +} - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } +} - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } +/// A builder for [`DeleteBucketAnalyticsConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketAnalyticsConfigurationInputBuilder { +bucket: Option, - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } +id: Option, - pub fn set_metadata_directive(&mut self, field: Option) -> &mut Self { - self.metadata_directive = field; - self - } +} - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } +impl DeleteBucketAnalyticsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } +pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(DeleteBucketAnalyticsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } +} - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } +/// A builder for [`DeleteBucketCorsInput`] +#[derive(Default)] +pub struct DeleteBucketCorsInputBuilder { +bucket: Option, - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } +expected_bucket_owner: Option, - pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; - self - } +} - pub fn set_tagging_directive(&mut self, field: Option) -> &mut Self { - self.tagging_directive = field; - self - } +impl DeleteBucketCorsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketCorsInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } +} - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`DeleteBucketEncryptionInput`] +#[derive(Default)] +pub struct DeleteBucketEncryptionInputBuilder { +bucket: Option, - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } +} - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } +impl DeleteBucketEncryptionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn copy_source(mut self, field: CopySource) -> Self { - self.copy_source = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn copy_source_if_match(mut self, field: Option) -> Self { - self.copy_source_if_match = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { - self.copy_source_if_modified_since = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketEncryptionInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn copy_source_if_none_match(mut self, field: Option) -> Self { - self.copy_source_if_none_match = field; - self - } +} - #[must_use] - pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { - self.copy_source_if_unmodified_since = field; - self - } - #[must_use] - pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { - self.copy_source_sse_customer_algorithm = field; - self - } +/// A builder for [`DeleteBucketIntelligentTieringConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketIntelligentTieringConfigurationInputBuilder { +bucket: Option, - #[must_use] - pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key = field; - self - } +id: Option, - #[must_use] - pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key_md5 = field; - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +impl DeleteBucketIntelligentTieringConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { - self.expected_source_bucket_owner = field; - self - } +pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); +self +} - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } +#[must_use] +pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); +self +} - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(DeleteBucketIntelligentTieringConfigurationInput { +bucket, +id, +}) +} - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } +} - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +/// A builder for [`DeleteBucketInventoryConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketInventoryConfigurationInputBuilder { +bucket: Option, - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn metadata_directive(mut self, field: Option) -> Self { - self.metadata_directive = field; - self - } +id: Option, - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } +} - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } +impl DeleteBucketInventoryConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); +self +} - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(DeleteBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } +} - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } +/// A builder for [`DeleteBucketLifecycleInput`] +#[derive(Default)] +pub struct DeleteBucketLifecycleInputBuilder { +bucket: Option, - #[must_use] - pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn tagging_directive(mut self, field: Option) -> Self { - self.tagging_directive = field; - self - } +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +impl DeleteBucketLifecycleInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn build(self) -> Result { - let acl = self.acl; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_algorithm = self.checksum_algorithm; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_type = self.content_type; - let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; - let copy_source_if_match = self.copy_source_if_match; - let copy_source_if_modified_since = self.copy_source_if_modified_since; - let copy_source_if_none_match = self.copy_source_if_none_match; - let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; - let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; - let copy_source_sse_customer_key = self.copy_source_sse_customer_key; - let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let expected_source_bucket_owner = self.expected_source_bucket_owner; - let expires = self.expires; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write_acp = self.grant_write_acp; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let metadata = self.metadata; - let metadata_directive = self.metadata_directive; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let storage_class = self.storage_class; - let tagging = self.tagging; - let tagging_directive = self.tagging_directive; - let version_id = self.version_id; - let website_redirect_location = self.website_redirect_location; - Ok(CopyObjectInput { - acl, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - content_disposition, - content_encoding, - content_language, - content_type, - copy_source, - copy_source_if_match, - copy_source_if_modified_since, - copy_source_if_none_match, - copy_source_if_unmodified_since, - copy_source_sse_customer_algorithm, - copy_source_sse_customer_key, - copy_source_sse_customer_key_md5, - expected_bucket_owner, - expected_source_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - key, - metadata, - metadata_directive, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - tagging_directive, - version_id, - website_redirect_location, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`CreateBucketInput`] - #[derive(Default)] - pub struct CreateBucketInputBuilder { - acl: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - bucket: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketLifecycleInput { +bucket, +expected_bucket_owner, +}) +} - create_bucket_configuration: Option, +} - grant_full_control: Option, - grant_read: Option, +/// A builder for [`DeleteBucketMetadataTableConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketMetadataTableConfigurationInputBuilder { +bucket: Option, - grant_read_acp: Option, +expected_bucket_owner: Option, - grant_write: Option, +} - grant_write_acp: Option, +impl DeleteBucketMetadataTableConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - object_lock_enabled_for_bucket: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - object_ownership: Option, - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - impl CreateBucketInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketMetadataTableConfigurationInput { +bucket, +expected_bucket_owner, +}) +} - pub fn set_create_bucket_configuration(&mut self, field: Option) -> &mut Self { - self.create_bucket_configuration = field; - self - } +} - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } +/// A builder for [`DeleteBucketMetricsConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketMetricsConfigurationInputBuilder { +bucket: Option, - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } +expected_bucket_owner: Option, - pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; - self - } +id: Option, - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } +} - pub fn set_object_lock_enabled_for_bucket(&mut self, field: Option) -> &mut Self { - self.object_lock_enabled_for_bucket = field; - self - } +impl DeleteBucketMetricsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_object_ownership(&mut self, field: Option) -> &mut Self { - self.object_ownership = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } +pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn create_bucket_configuration(mut self, field: Option) -> Self { - self.create_bucket_configuration = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } +#[must_use] +pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); +self +} - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(DeleteBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } +} - #[must_use] - pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; - self - } - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } +/// A builder for [`DeleteBucketOwnershipControlsInput`] +#[derive(Default)] +pub struct DeleteBucketOwnershipControlsInputBuilder { +bucket: Option, - #[must_use] - pub fn object_lock_enabled_for_bucket(mut self, field: Option) -> Self { - self.object_lock_enabled_for_bucket = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn object_ownership(mut self, field: Option) -> Self { - self.object_ownership = field; - self - } +} - pub fn build(self) -> Result { - let acl = self.acl; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let create_bucket_configuration = self.create_bucket_configuration; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write = self.grant_write; - let grant_write_acp = self.grant_write_acp; - let object_lock_enabled_for_bucket = self.object_lock_enabled_for_bucket; - let object_ownership = self.object_ownership; - Ok(CreateBucketInput { - acl, - bucket, - create_bucket_configuration, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - object_lock_enabled_for_bucket, - object_ownership, - }) - } - } +impl DeleteBucketOwnershipControlsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - /// A builder for [`CreateBucketMetadataTableConfigurationInput`] - #[derive(Default)] - pub struct CreateBucketMetadataTableConfigurationInputBuilder { - bucket: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - content_md5: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketOwnershipControlsInput { +bucket, +expected_bucket_owner, +}) +} - metadata_table_configuration: Option, - } +} - impl CreateBucketMetadataTableConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`DeleteBucketPolicyInput`] +#[derive(Default)] +pub struct DeleteBucketPolicyInputBuilder { +bucket: Option, - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +expected_bucket_owner: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - pub fn set_metadata_table_configuration(&mut self, field: MetadataTableConfiguration) -> &mut Self { - self.metadata_table_configuration = Some(field); - self - } +impl DeleteBucketPolicyInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketPolicyInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn metadata_table_configuration(mut self, field: MetadataTableConfiguration) -> Self { - self.metadata_table_configuration = Some(field); - self - } +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let metadata_table_configuration = self - .metadata_table_configuration - .ok_or_else(|| BuildError::missing_field("metadata_table_configuration"))?; - Ok(CreateBucketMetadataTableConfigurationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - metadata_table_configuration, - }) - } - } - /// A builder for [`CreateMultipartUploadInput`] - #[derive(Default)] - pub struct CreateMultipartUploadInputBuilder { - acl: Option, +/// A builder for [`DeleteBucketReplicationInput`] +#[derive(Default)] +pub struct DeleteBucketReplicationInputBuilder { +bucket: Option, - bucket: Option, +expected_bucket_owner: Option, - bucket_key_enabled: Option, +} - cache_control: Option, +impl DeleteBucketReplicationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - checksum_algorithm: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - checksum_type: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - content_disposition: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - content_encoding: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketReplicationInput { +bucket, +expected_bucket_owner, +}) +} - content_language: Option, +} - content_type: Option, - expected_bucket_owner: Option, +/// A builder for [`DeleteBucketTaggingInput`] +#[derive(Default)] +pub struct DeleteBucketTaggingInputBuilder { +bucket: Option, - expires: Option, +expected_bucket_owner: Option, - grant_full_control: Option, +} - grant_read: Option, +impl DeleteBucketTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - grant_read_acp: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - grant_write_acp: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - key: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - metadata: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketTaggingInput { +bucket, +expected_bucket_owner, +}) +} - object_lock_legal_hold_status: Option, +} - object_lock_mode: Option, - object_lock_retain_until_date: Option, +/// A builder for [`DeleteBucketWebsiteInput`] +#[derive(Default)] +pub struct DeleteBucketWebsiteInputBuilder { +bucket: Option, - request_payer: Option, +expected_bucket_owner: Option, - sse_customer_algorithm: Option, +} - sse_customer_key: Option, +impl DeleteBucketWebsiteInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - sse_customer_key_md5: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - ssekms_encryption_context: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - ssekms_key_id: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - server_side_encryption: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketWebsiteInput { +bucket, +expected_bucket_owner, +}) +} - storage_class: Option, +} - tagging: Option, - version_id: Option, +/// A builder for [`DeleteObjectInput`] +#[derive(Default)] +pub struct DeleteObjectInputBuilder { +bucket: Option, - website_redirect_location: Option, - } +bypass_governance_retention: Option, - impl CreateMultipartUploadInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } +expected_bucket_owner: Option, - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +if_match: Option, - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } +if_match_last_modified_time: Option, - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } +if_match_size: Option, - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +key: Option, - pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { - self.checksum_type = field; - self - } +mfa: Option, - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } +request_payer: Option, - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } +version_id: Option, - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } +} - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } +impl DeleteObjectInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; +self +} - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } +pub fn set_if_match_last_modified_time(&mut self, field: Option) -> &mut Self { + self.if_match_last_modified_time = field; +self +} - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } +pub fn set_if_match_size(&mut self, field: Option) -> &mut Self { + self.if_match_size = field; +self +} - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; +self +} - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } +#[must_use] +pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn if_match_last_modified_time(mut self, field: Option) -> Self { + self.if_match_last_modified_time = field; +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn if_match_size(mut self, field: Option) -> Self { + self.if_match_size = field; +self +} - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } +#[must_use] +pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; +self +} - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bypass_governance_retention = self.bypass_governance_retention; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match = self.if_match; +let if_match_last_modified_time = self.if_match_last_modified_time; +let if_match_size = self.if_match_size; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let mfa = self.mfa; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(DeleteObjectInput { +bucket, +bypass_governance_retention, +expected_bucket_owner, +if_match, +if_match_last_modified_time, +if_match_size, +key, +mfa, +request_payer, +version_id, +}) +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +} - pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; - self - } - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } +/// A builder for [`DeleteObjectTaggingInput`] +#[derive(Default)] +pub struct DeleteObjectTaggingInputBuilder { +bucket: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } +key: Option, - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } +version_id: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +} - #[must_use] - pub fn checksum_type(mut self, field: Option) -> Self { - self.checksum_type = field; - self - } +impl DeleteObjectTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let version_id = self.version_id; +Ok(DeleteObjectTaggingInput { +bucket, +expected_bucket_owner, +key, +version_id, +}) +} - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } +} - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +/// A builder for [`DeleteObjectsInput`] +#[derive(Default)] +pub struct DeleteObjectsInputBuilder { +bucket: Option, - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } +bypass_governance_retention: Option, - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } +checksum_algorithm: Option, - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } +delete: Option, - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +mfa: Option, - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +request_payer: Option, - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +impl DeleteObjectsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } +pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; +self +} - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } +pub fn set_delete(&mut self, field: Delete) -> &mut Self { + self.delete = Some(field); +self +} - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; - self - } +pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let acl = self.acl; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_algorithm = self.checksum_algorithm; - let checksum_type = self.checksum_type; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_type = self.content_type; - let expected_bucket_owner = self.expected_bucket_owner; - let expires = self.expires; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write_acp = self.grant_write_acp; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let metadata = self.metadata; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let storage_class = self.storage_class; - let tagging = self.tagging; - let version_id = self.version_id; - let website_redirect_location = self.website_redirect_location; - Ok(CreateMultipartUploadInput { - acl, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_type, - content_disposition, - content_encoding, - content_language, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - version_id, - website_redirect_location, - }) - } - } +#[must_use] +pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; +self +} - /// A builder for [`CreateSessionInput`] - #[derive(Default)] - pub struct CreateSessionInputBuilder { - bucket: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - bucket_key_enabled: Option, +#[must_use] +pub fn delete(mut self, field: Delete) -> Self { + self.delete = Some(field); +self +} - ssekms_encryption_context: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - ssekms_key_id: Option, +#[must_use] +pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; +self +} - server_side_encryption: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - session_mode: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bypass_governance_retention = self.bypass_governance_retention; +let checksum_algorithm = self.checksum_algorithm; +let delete = self.delete.ok_or_else(|| BuildError::missing_field("delete"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let mfa = self.mfa; +let request_payer = self.request_payer; +Ok(DeleteObjectsInput { +bucket, +bypass_governance_retention, +checksum_algorithm, +delete, +expected_bucket_owner, +mfa, +request_payer, +}) +} - impl CreateSessionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } +/// A builder for [`DeletePublicAccessBlockInput`] +#[derive(Default)] +pub struct DeletePublicAccessBlockInputBuilder { +bucket: Option, - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } +expected_bucket_owner: Option, - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } +} - pub fn set_session_mode(&mut self, field: Option) -> &mut Self { - self.session_mode = field; - self - } +impl DeletePublicAccessBlockInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeletePublicAccessBlockInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } +} - #[must_use] - pub fn session_mode(mut self, field: Option) -> Self { - self.session_mode = field; - self - } - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let session_mode = self.session_mode; - Ok(CreateSessionInput { - bucket, - bucket_key_enabled, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - session_mode, - }) - } - } +/// A builder for [`GetBucketAccelerateConfigurationInput`] +#[derive(Default)] +pub struct GetBucketAccelerateConfigurationInputBuilder { +bucket: Option, - /// A builder for [`DeleteBucketInput`] - #[derive(Default)] - pub struct DeleteBucketInputBuilder { - bucket: Option, +expected_bucket_owner: Option, - expected_bucket_owner: Option, +request_payer: Option, - force_delete: Option, - } +} - impl DeleteBucketInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +impl GetBucketAccelerateConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_force_delete(&mut self, field: Option) -> &mut Self { - self.force_delete = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn force_delete(mut self, field: Option) -> Self { - self.force_delete = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let force_delete = self.force_delete; - Ok(DeleteBucketInput { - bucket, - expected_bucket_owner, - force_delete, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let request_payer = self.request_payer; +Ok(GetBucketAccelerateConfigurationInput { +bucket, +expected_bucket_owner, +request_payer, +}) +} - /// A builder for [`DeleteBucketAnalyticsConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketAnalyticsConfigurationInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - id: Option, - } +/// A builder for [`GetBucketAclInput`] +#[derive(Default)] +pub struct GetBucketAclInputBuilder { +bucket: Option, - impl DeleteBucketAnalyticsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); - self - } +impl GetBucketAclInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(DeleteBucketAnalyticsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketAclInput { +bucket, +expected_bucket_owner, +}) +} - /// A builder for [`DeleteBucketCorsInput`] - #[derive(Default)] - pub struct DeleteBucketCorsInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - } - impl DeleteBucketCorsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +/// A builder for [`GetBucketAnalyticsConfigurationInput`] +#[derive(Default)] +pub struct GetBucketAnalyticsConfigurationInputBuilder { +bucket: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +id: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketCorsInput { - bucket, - expected_bucket_owner, - }) - } - } +impl GetBucketAnalyticsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - /// A builder for [`DeleteBucketEncryptionInput`] - #[derive(Default)] - pub struct DeleteBucketEncryptionInputBuilder { - bucket: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); +self +} - impl DeleteBucketEncryptionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(GetBucketAnalyticsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketEncryptionInput { - bucket, - expected_bucket_owner, - }) - } - } +} - /// A builder for [`DeleteBucketIntelligentTieringConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketIntelligentTieringConfigurationInputBuilder { - bucket: Option, - id: Option, - } +/// A builder for [`GetBucketCorsInput`] +#[derive(Default)] +pub struct GetBucketCorsInputBuilder { +bucket: Option, - impl DeleteBucketIntelligentTieringConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +impl GetBucketCorsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(DeleteBucketIntelligentTieringConfigurationInput { bucket, id }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`DeleteBucketInventoryConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketInventoryConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketCorsInput { +bucket, +expected_bucket_owner, +}) +} - id: Option, - } +} - impl DeleteBucketInventoryConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +/// A builder for [`GetBucketEncryptionInput`] +#[derive(Default)] +pub struct GetBucketEncryptionInputBuilder { +bucket: Option, - pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +impl GetBucketEncryptionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(DeleteBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`DeleteBucketLifecycleInput`] - #[derive(Default)] - pub struct DeleteBucketLifecycleInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketEncryptionInput { +bucket, +expected_bucket_owner, +}) +} - impl DeleteBucketLifecycleInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +/// A builder for [`GetBucketIntelligentTieringConfigurationInput`] +#[derive(Default)] +pub struct GetBucketIntelligentTieringConfigurationInputBuilder { +bucket: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +id: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketLifecycleInput { - bucket, - expected_bucket_owner, - }) - } - } +} - /// A builder for [`DeleteBucketMetadataTableConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketMetadataTableConfigurationInputBuilder { - bucket: Option, +impl GetBucketIntelligentTieringConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, - } +pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); +self +} - impl DeleteBucketMetadataTableConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(GetBucketIntelligentTieringConfigurationInput { +bucket, +id, +}) +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketMetadataTableConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } - /// A builder for [`DeleteBucketMetricsConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketMetricsConfigurationInputBuilder { - bucket: Option, +/// A builder for [`GetBucketInventoryConfigurationInput`] +#[derive(Default)] +pub struct GetBucketInventoryConfigurationInputBuilder { +bucket: Option, - expected_bucket_owner: Option, +expected_bucket_owner: Option, - id: Option, - } +id: Option, - impl DeleteBucketMetricsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +impl GetBucketInventoryConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(DeleteBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +#[must_use] +pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); +self +} - /// A builder for [`DeleteBucketOwnershipControlsInput`] - #[derive(Default)] - pub struct DeleteBucketOwnershipControlsInputBuilder { - bucket: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(GetBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} - expected_bucket_owner: Option, - } +} - impl DeleteBucketOwnershipControlsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +/// A builder for [`GetBucketLifecycleConfigurationInput`] +#[derive(Default)] +pub struct GetBucketLifecycleConfigurationInputBuilder { +bucket: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketOwnershipControlsInput { - bucket, - expected_bucket_owner, - }) - } - } +impl GetBucketLifecycleConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - /// A builder for [`DeleteBucketPolicyInput`] - #[derive(Default)] - pub struct DeleteBucketPolicyInputBuilder { - bucket: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - impl DeleteBucketPolicyInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketLifecycleConfigurationInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketPolicyInput { - bucket, - expected_bucket_owner, - }) - } - } +/// A builder for [`GetBucketLocationInput`] +#[derive(Default)] +pub struct GetBucketLocationInputBuilder { +bucket: Option, - /// A builder for [`DeleteBucketReplicationInput`] - #[derive(Default)] - pub struct DeleteBucketReplicationInputBuilder { - bucket: Option, +expected_bucket_owner: Option, - expected_bucket_owner: Option, - } +} - impl DeleteBucketReplicationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +impl GetBucketLocationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketReplicationInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketLocationInput { +bucket, +expected_bucket_owner, +}) +} - /// A builder for [`DeleteBucketTaggingInput`] - #[derive(Default)] - pub struct DeleteBucketTaggingInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - } - impl DeleteBucketTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +/// A builder for [`GetBucketLoggingInput`] +#[derive(Default)] +pub struct GetBucketLoggingInputBuilder { +bucket: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +impl GetBucketLoggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketTaggingInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`DeleteBucketWebsiteInput`] - #[derive(Default)] - pub struct DeleteBucketWebsiteInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - impl DeleteBucketWebsiteInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketLoggingInput { +bucket, +expected_bucket_owner, +}) +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +/// A builder for [`GetBucketMetadataTableConfigurationInput`] +#[derive(Default)] +pub struct GetBucketMetadataTableConfigurationInputBuilder { +bucket: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketWebsiteInput { - bucket, - expected_bucket_owner, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`DeleteObjectInput`] - #[derive(Default)] - pub struct DeleteObjectInputBuilder { - bucket: Option, +} - bypass_governance_retention: Option, +impl GetBucketMetadataTableConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - if_match: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - if_match_last_modified_time: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - if_match_size: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketMetadataTableConfigurationInput { +bucket, +expected_bucket_owner, +}) +} - key: Option, +} - mfa: Option, - request_payer: Option, +/// A builder for [`GetBucketMetricsConfigurationInput`] +#[derive(Default)] +pub struct GetBucketMetricsConfigurationInputBuilder { +bucket: Option, - version_id: Option, - } +expected_bucket_owner: Option, - impl DeleteObjectInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +id: Option, - pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; - self - } +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +impl GetBucketMetricsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_if_match_last_modified_time(&mut self, field: Option) -> &mut Self { - self.if_match_last_modified_time = field; - self - } +pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); +self +} - pub fn set_if_match_size(&mut self, field: Option) -> &mut Self { - self.if_match_size = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; - self - } +#[must_use] +pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(GetBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - #[must_use] - pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; - self - } +/// A builder for [`GetBucketNotificationConfigurationInput`] +#[derive(Default)] +pub struct GetBucketNotificationConfigurationInputBuilder { +bucket: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } +} - #[must_use] - pub fn if_match_last_modified_time(mut self, field: Option) -> Self { - self.if_match_last_modified_time = field; - self - } +impl GetBucketNotificationConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn if_match_size(mut self, field: Option) -> Self { - self.if_match_size = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketNotificationConfigurationInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bypass_governance_retention = self.bypass_governance_retention; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match = self.if_match; - let if_match_last_modified_time = self.if_match_last_modified_time; - let if_match_size = self.if_match_size; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let mfa = self.mfa; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(DeleteObjectInput { - bucket, - bypass_governance_retention, - expected_bucket_owner, - if_match, - if_match_last_modified_time, - if_match_size, - key, - mfa, - request_payer, - version_id, - }) - } - } - /// A builder for [`DeleteObjectTaggingInput`] - #[derive(Default)] - pub struct DeleteObjectTaggingInputBuilder { - bucket: Option, +/// A builder for [`GetBucketOwnershipControlsInput`] +#[derive(Default)] +pub struct GetBucketOwnershipControlsInputBuilder { +bucket: Option, - expected_bucket_owner: Option, +expected_bucket_owner: Option, - key: Option, +} - version_id: Option, - } +impl GetBucketOwnershipControlsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - impl DeleteObjectTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketOwnershipControlsInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +/// A builder for [`GetBucketPolicyInput`] +#[derive(Default)] +pub struct GetBucketPolicyInputBuilder { +bucket: Option, - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +expected_bucket_owner: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let version_id = self.version_id; - Ok(DeleteObjectTaggingInput { - bucket, - expected_bucket_owner, - key, - version_id, - }) - } - } +} - /// A builder for [`DeleteObjectsInput`] - #[derive(Default)] - pub struct DeleteObjectsInputBuilder { - bucket: Option, +impl GetBucketPolicyInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - bypass_governance_retention: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - delete: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketPolicyInput { +bucket, +expected_bucket_owner, +}) +} - mfa: Option, +} - request_payer: Option, - } - impl DeleteObjectsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +/// A builder for [`GetBucketPolicyStatusInput`] +#[derive(Default)] +pub struct GetBucketPolicyStatusInputBuilder { +bucket: Option, - pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; - self - } +expected_bucket_owner: Option, - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +} - pub fn set_delete(&mut self, field: Delete) -> &mut Self { - self.delete = Some(field); - self - } +impl GetBucketPolicyStatusInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketPolicyStatusInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; - self - } +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - #[must_use] - pub fn delete(mut self, field: Delete) -> Self { - self.delete = Some(field); - self - } +/// A builder for [`GetBucketReplicationInput`] +#[derive(Default)] +pub struct GetBucketReplicationInputBuilder { +bucket: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; - self - } +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +impl GetBucketReplicationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bypass_governance_retention = self.bypass_governance_retention; - let checksum_algorithm = self.checksum_algorithm; - let delete = self.delete.ok_or_else(|| BuildError::missing_field("delete"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let mfa = self.mfa; - let request_payer = self.request_payer; - Ok(DeleteObjectsInput { - bucket, - bypass_governance_retention, - checksum_algorithm, - delete, - expected_bucket_owner, - mfa, - request_payer, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`DeletePublicAccessBlockInput`] - #[derive(Default)] - pub struct DeletePublicAccessBlockInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - impl DeletePublicAccessBlockInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketReplicationInput { +bucket, +expected_bucket_owner, +}) +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +/// A builder for [`GetBucketRequestPaymentInput`] +#[derive(Default)] +pub struct GetBucketRequestPaymentInputBuilder { +bucket: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeletePublicAccessBlockInput { - bucket, - expected_bucket_owner, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`GetBucketAccelerateConfigurationInput`] - #[derive(Default)] - pub struct GetBucketAccelerateConfigurationInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, +impl GetBucketRequestPaymentInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - request_payer: Option, - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - impl GetBucketAccelerateConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketRequestPaymentInput { +bucket, +expected_bucket_owner, +}) +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +/// A builder for [`GetBucketTaggingInput`] +#[derive(Default)] +pub struct GetBucketTaggingInputBuilder { +bucket: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let request_payer = self.request_payer; - Ok(GetBucketAccelerateConfigurationInput { - bucket, - expected_bucket_owner, - request_payer, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`GetBucketAclInput`] - #[derive(Default)] - pub struct GetBucketAclInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - } +impl GetBucketTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - impl GetBucketAclInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketTaggingInput { +bucket, +expected_bucket_owner, +}) +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketAclInput { - bucket, - expected_bucket_owner, - }) - } - } +} - /// A builder for [`GetBucketAnalyticsConfigurationInput`] - #[derive(Default)] - pub struct GetBucketAnalyticsConfigurationInputBuilder { - bucket: Option, - expected_bucket_owner: Option, +/// A builder for [`GetBucketVersioningInput`] +#[derive(Default)] +pub struct GetBucketVersioningInputBuilder { +bucket: Option, - id: Option, - } +expected_bucket_owner: Option, - impl GetBucketAnalyticsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +impl GetBucketVersioningInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketVersioningInput { +bucket, +expected_bucket_owner, +}) +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(GetBucketAnalyticsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +} - /// A builder for [`GetBucketCorsInput`] - #[derive(Default)] - pub struct GetBucketCorsInputBuilder { - bucket: Option, - expected_bucket_owner: Option, - } +/// A builder for [`GetBucketWebsiteInput`] +#[derive(Default)] +pub struct GetBucketWebsiteInputBuilder { +bucket: Option, - impl GetBucketCorsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +impl GetBucketWebsiteInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketCorsInput { - bucket, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`GetBucketEncryptionInput`] - #[derive(Default)] - pub struct GetBucketEncryptionInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketWebsiteInput { +bucket, +expected_bucket_owner, +}) +} - impl GetBucketEncryptionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +/// A builder for [`GetObjectInput`] +#[derive(Default)] +pub struct GetObjectInputBuilder { +bucket: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +checksum_mode: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketEncryptionInput { - bucket, - expected_bucket_owner, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`GetBucketIntelligentTieringConfigurationInput`] - #[derive(Default)] - pub struct GetBucketIntelligentTieringConfigurationInputBuilder { - bucket: Option, +if_match: Option, - id: Option, - } +if_modified_since: Option, - impl GetBucketIntelligentTieringConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +if_none_match: Option, - pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); - self - } +if_unmodified_since: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +key: Option, - #[must_use] - pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); - self - } +part_number: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(GetBucketIntelligentTieringConfigurationInput { bucket, id }) - } - } +range: Option, - /// A builder for [`GetBucketInventoryConfigurationInput`] - #[derive(Default)] - pub struct GetBucketInventoryConfigurationInputBuilder { - bucket: Option, +request_payer: Option, - expected_bucket_owner: Option, +response_cache_control: Option, - id: Option, - } +response_content_disposition: Option, - impl GetBucketInventoryConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +response_content_encoding: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +response_content_language: Option, - pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); - self - } +response_content_type: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +response_expires: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +sse_customer_algorithm: Option, - #[must_use] - pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); - self - } +sse_customer_key: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(GetBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +sse_customer_key_md5: Option, - /// A builder for [`GetBucketLifecycleConfigurationInput`] - #[derive(Default)] - pub struct GetBucketLifecycleConfigurationInputBuilder { - bucket: Option, +version_id: Option, - expected_bucket_owner: Option, - } +} - impl GetBucketLifecycleConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +impl GetObjectInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { + self.checksum_mode = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketLifecycleConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { + self.if_modified_since = field; +self +} - /// A builder for [`GetBucketLocationInput`] - #[derive(Default)] - pub struct GetBucketLocationInputBuilder { - bucket: Option, +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.if_unmodified_since = field; +self +} - impl GetBucketLocationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_part_number(&mut self, field: Option) -> &mut Self { + self.part_number = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_range(&mut self, field: Option) -> &mut Self { + self.range = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketLocationInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { + self.response_cache_control = field; +self +} - /// A builder for [`GetBucketLoggingInput`] - #[derive(Default)] - pub struct GetBucketLoggingInputBuilder { - bucket: Option, +pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { + self.response_content_disposition = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { + self.response_content_encoding = field; +self +} - impl GetBucketLoggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { + self.response_content_language = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { + self.response_content_type = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_response_expires(&mut self, field: Option) -> &mut Self { + self.response_expires = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketLoggingInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - /// A builder for [`GetBucketMetadataTableConfigurationInput`] - #[derive(Default)] - pub struct GetBucketMetadataTableConfigurationInputBuilder { - bucket: Option, +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - impl GetBucketMetadataTableConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn checksum_mode(mut self, field: Option) -> Self { + self.checksum_mode = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketMetadataTableConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn if_modified_since(mut self, field: Option) -> Self { + self.if_modified_since = field; +self +} - /// A builder for [`GetBucketMetricsConfigurationInput`] - #[derive(Default)] - pub struct GetBucketMetricsConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn if_unmodified_since(mut self, field: Option) -> Self { + self.if_unmodified_since = field; +self +} - id: Option, - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - impl GetBucketMetricsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn part_number(mut self, field: Option) -> Self { + self.part_number = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn range(mut self, field: Option) -> Self { + self.range = field; +self +} - pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn response_cache_control(mut self, field: Option) -> Self { + self.response_cache_control = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn response_content_disposition(mut self, field: Option) -> Self { + self.response_content_disposition = field; +self +} - #[must_use] - pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); - self - } +#[must_use] +pub fn response_content_encoding(mut self, field: Option) -> Self { + self.response_content_encoding = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(GetBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +#[must_use] +pub fn response_content_language(mut self, field: Option) -> Self { + self.response_content_language = field; +self +} - /// A builder for [`GetBucketNotificationConfigurationInput`] - #[derive(Default)] - pub struct GetBucketNotificationConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn response_content_type(mut self, field: Option) -> Self { + self.response_content_type = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn response_expires(mut self, field: Option) -> Self { + self.response_expires = field; +self +} - impl GetBucketNotificationConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketNotificationConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_mode = self.checksum_mode; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match = self.if_match; +let if_modified_since = self.if_modified_since; +let if_none_match = self.if_none_match; +let if_unmodified_since = self.if_unmodified_since; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let part_number = self.part_number; +let range = self.range; +let request_payer = self.request_payer; +let response_cache_control = self.response_cache_control; +let response_content_disposition = self.response_content_disposition; +let response_content_encoding = self.response_content_encoding; +let response_content_language = self.response_content_language; +let response_content_type = self.response_content_type; +let response_expires = self.response_expires; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let version_id = self.version_id; +Ok(GetObjectInput { +bucket, +checksum_mode, +expected_bucket_owner, +if_match, +if_modified_since, +if_none_match, +if_unmodified_since, +key, +part_number, +range, +request_payer, +response_cache_control, +response_content_disposition, +response_content_encoding, +response_content_language, +response_content_type, +response_expires, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} + +} + + +/// A builder for [`GetObjectAclInput`] +#[derive(Default)] +pub struct GetObjectAclInputBuilder { +bucket: Option, - /// A builder for [`GetBucketOwnershipControlsInput`] - #[derive(Default)] - pub struct GetBucketOwnershipControlsInputBuilder { - bucket: Option, +expected_bucket_owner: Option, - expected_bucket_owner: Option, - } +key: Option, - impl GetBucketOwnershipControlsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +request_payer: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +version_id: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +impl GetObjectAclInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketOwnershipControlsInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`GetBucketPolicyInput`] - #[derive(Default)] - pub struct GetBucketPolicyInputBuilder { - bucket: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - expected_bucket_owner: Option, - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - impl GetBucketPolicyInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketPolicyInput { - bucket, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - /// A builder for [`GetBucketPolicyStatusInput`] - #[derive(Default)] - pub struct GetBucketPolicyStatusInputBuilder { - bucket: Option, +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - expected_bucket_owner: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(GetObjectAclInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} - impl GetBucketPolicyStatusInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +/// A builder for [`GetObjectAttributesInput`] +#[derive(Default)] +pub struct GetObjectAttributesInputBuilder { +bucket: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketPolicyStatusInput { - bucket, - expected_bucket_owner, - }) - } - } +key: Option, - /// A builder for [`GetBucketReplicationInput`] - #[derive(Default)] - pub struct GetBucketReplicationInputBuilder { - bucket: Option, +max_parts: Option, - expected_bucket_owner: Option, - } +object_attributes: ObjectAttributesList, - impl GetBucketReplicationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +part_number_marker: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +request_payer: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +sse_customer_algorithm: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +sse_customer_key: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketReplicationInput { - bucket, - expected_bucket_owner, - }) - } - } +sse_customer_key_md5: Option, - /// A builder for [`GetBucketRequestPaymentInput`] - #[derive(Default)] - pub struct GetBucketRequestPaymentInputBuilder { - bucket: Option, +version_id: Option, - expected_bucket_owner: Option, - } +} - impl GetBucketRequestPaymentInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +impl GetObjectAttributesInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_max_parts(&mut self, field: Option) -> &mut Self { + self.max_parts = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketRequestPaymentInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_object_attributes(&mut self, field: ObjectAttributesList) -> &mut Self { + self.object_attributes = field; +self +} - /// A builder for [`GetBucketTaggingInput`] - #[derive(Default)] - pub struct GetBucketTaggingInputBuilder { - bucket: Option, +pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { + self.part_number_marker = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - impl GetBucketTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketTaggingInput { - bucket, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`GetBucketVersioningInput`] - #[derive(Default)] - pub struct GetBucketVersioningInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - impl GetBucketVersioningInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn max_parts(mut self, field: Option) -> Self { + self.max_parts = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn object_attributes(mut self, field: ObjectAttributesList) -> Self { + self.object_attributes = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn part_number_marker(mut self, field: Option) -> Self { + self.part_number_marker = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketVersioningInput { - bucket, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - /// A builder for [`GetBucketWebsiteInput`] - #[derive(Default)] - pub struct GetBucketWebsiteInputBuilder { - bucket: Option, +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - impl GetBucketWebsiteInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let max_parts = self.max_parts; +let object_attributes = self.object_attributes; +let part_number_marker = self.part_number_marker; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let version_id = self.version_id; +Ok(GetObjectAttributesInput { +bucket, +expected_bucket_owner, +key, +max_parts, +object_attributes, +part_number_marker, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketWebsiteInput { - bucket, - expected_bucket_owner, - }) - } - } +/// A builder for [`GetObjectLegalHoldInput`] +#[derive(Default)] +pub struct GetObjectLegalHoldInputBuilder { +bucket: Option, - /// A builder for [`GetObjectInput`] - #[derive(Default)] - pub struct GetObjectInputBuilder { - bucket: Option, +expected_bucket_owner: Option, - checksum_mode: Option, +key: Option, - expected_bucket_owner: Option, +request_payer: Option, - if_match: Option, +version_id: Option, - if_modified_since: Option, +} - if_none_match: Option, +impl GetObjectLegalHoldInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - if_unmodified_since: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - key: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - part_number: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - range: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - request_payer: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - response_cache_control: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - response_content_disposition: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - response_content_encoding: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - response_content_language: Option, +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - response_content_type: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(GetObjectLegalHoldInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} - response_expires: Option, +} - sse_customer_algorithm: Option, - sse_customer_key: Option, +/// A builder for [`GetObjectLockConfigurationInput`] +#[derive(Default)] +pub struct GetObjectLockConfigurationInputBuilder { +bucket: Option, - sse_customer_key_md5: Option, +expected_bucket_owner: Option, - version_id: Option, - } +} - impl GetObjectInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +impl GetObjectLockConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { - self.checksum_mode = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { - self.if_modified_since = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetObjectLockConfigurationInput { +bucket, +expected_bucket_owner, +}) +} - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } +} - pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.if_unmodified_since = field; - self - } - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +/// A builder for [`GetObjectRetentionInput`] +#[derive(Default)] +pub struct GetObjectRetentionInputBuilder { +bucket: Option, - pub fn set_part_number(&mut self, field: Option) -> &mut Self { - self.part_number = field; - self - } +expected_bucket_owner: Option, - pub fn set_range(&mut self, field: Option) -> &mut Self { - self.range = field; - self - } +key: Option, - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +request_payer: Option, - pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { - self.response_cache_control = field; - self - } +version_id: Option, - pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { - self.response_content_disposition = field; - self - } +} - pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { - self.response_content_encoding = field; - self - } +impl GetObjectRetentionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { - self.response_content_language = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { - self.response_content_type = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub fn set_response_expires(&mut self, field: Option) -> &mut Self { - self.response_expires = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn checksum_mode(mut self, field: Option) -> Self { - self.checksum_mode = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(GetObjectRetentionInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } +} - #[must_use] - pub fn if_modified_since(mut self, field: Option) -> Self { - self.if_modified_since = field; - self - } - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } +/// A builder for [`GetObjectTaggingInput`] +#[derive(Default)] +pub struct GetObjectTaggingInputBuilder { +bucket: Option, - #[must_use] - pub fn if_unmodified_since(mut self, field: Option) -> Self { - self.if_unmodified_since = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +key: Option, - #[must_use] - pub fn part_number(mut self, field: Option) -> Self { - self.part_number = field; - self - } +request_payer: Option, - #[must_use] - pub fn range(mut self, field: Option) -> Self { - self.range = field; - self - } +version_id: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +} - #[must_use] - pub fn response_cache_control(mut self, field: Option) -> Self { - self.response_cache_control = field; - self - } +impl GetObjectTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn response_content_disposition(mut self, field: Option) -> Self { - self.response_content_disposition = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn response_content_encoding(mut self, field: Option) -> Self { - self.response_content_encoding = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - #[must_use] - pub fn response_content_language(mut self, field: Option) -> Self { - self.response_content_language = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn response_content_type(mut self, field: Option) -> Self { - self.response_content_type = field; - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - #[must_use] - pub fn response_expires(mut self, field: Option) -> Self { - self.response_expires = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_mode = self.checksum_mode; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match = self.if_match; - let if_modified_since = self.if_modified_since; - let if_none_match = self.if_none_match; - let if_unmodified_since = self.if_unmodified_since; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let part_number = self.part_number; - let range = self.range; - let request_payer = self.request_payer; - let response_cache_control = self.response_cache_control; - let response_content_disposition = self.response_content_disposition; - let response_content_encoding = self.response_content_encoding; - let response_content_language = self.response_content_language; - let response_content_type = self.response_content_type; - let response_expires = self.response_expires; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let version_id = self.version_id; - Ok(GetObjectInput { - bucket, - checksum_mode, - expected_bucket_owner, - if_match, - if_modified_since, - if_none_match, - if_unmodified_since, - key, - part_number, - range, - request_payer, - response_cache_control, - response_content_disposition, - response_content_encoding, - response_content_language, - response_content_type, - response_expires, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(GetObjectTaggingInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} - /// A builder for [`GetObjectAclInput`] - #[derive(Default)] - pub struct GetObjectAclInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - key: Option, +/// A builder for [`GetObjectTorrentInput`] +#[derive(Default)] +pub struct GetObjectTorrentInputBuilder { +bucket: Option, - request_payer: Option, +expected_bucket_owner: Option, - version_id: Option, - } +key: Option, - impl GetObjectAclInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +request_payer: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +impl GetObjectTorrentInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(GetObjectAclInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +Ok(GetObjectTorrentInput { +bucket, +expected_bucket_owner, +key, +request_payer, +}) +} - /// A builder for [`GetObjectAttributesInput`] - #[derive(Default)] - pub struct GetObjectAttributesInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - key: Option, +/// A builder for [`GetPublicAccessBlockInput`] +#[derive(Default)] +pub struct GetPublicAccessBlockInputBuilder { +bucket: Option, - max_parts: Option, +expected_bucket_owner: Option, - object_attributes: ObjectAttributesList, +} - part_number_marker: Option, +impl GetPublicAccessBlockInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - request_payer: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - sse_customer_algorithm: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - sse_customer_key: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - sse_customer_key_md5: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetPublicAccessBlockInput { +bucket, +expected_bucket_owner, +}) +} - version_id: Option, - } +} - impl GetObjectAttributesInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +/// A builder for [`HeadBucketInput`] +#[derive(Default)] +pub struct HeadBucketInputBuilder { +bucket: Option, - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_max_parts(&mut self, field: Option) -> &mut Self { - self.max_parts = field; - self - } +} - pub fn set_object_attributes(&mut self, field: ObjectAttributesList) -> &mut Self { - self.object_attributes = field; - self - } +impl HeadBucketInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { - self.part_number_marker = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(HeadBucketInput { +bucket, +expected_bucket_owner, +}) +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +/// A builder for [`HeadObjectInput`] +#[derive(Default)] +pub struct HeadObjectInputBuilder { +bucket: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +checksum_mode: Option, - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn max_parts(mut self, field: Option) -> Self { - self.max_parts = field; - self - } +if_match: Option, - #[must_use] - pub fn object_attributes(mut self, field: ObjectAttributesList) -> Self { - self.object_attributes = field; - self - } +if_modified_since: Option, - #[must_use] - pub fn part_number_marker(mut self, field: Option) -> Self { - self.part_number_marker = field; - self - } +if_none_match: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +if_unmodified_since: Option, - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +key: Option, - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +part_number: Option, - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +range: Option, - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +request_payer: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let max_parts = self.max_parts; - let object_attributes = self.object_attributes; - let part_number_marker = self.part_number_marker; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let version_id = self.version_id; - Ok(GetObjectAttributesInput { - bucket, - expected_bucket_owner, - key, - max_parts, - object_attributes, - part_number_marker, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } - } +response_cache_control: Option, - /// A builder for [`GetObjectLegalHoldInput`] - #[derive(Default)] - pub struct GetObjectLegalHoldInputBuilder { - bucket: Option, +response_content_disposition: Option, - expected_bucket_owner: Option, +response_content_encoding: Option, - key: Option, +response_content_language: Option, - request_payer: Option, +response_content_type: Option, - version_id: Option, - } +response_expires: Option, - impl GetObjectLegalHoldInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +sse_customer_algorithm: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +sse_customer_key: Option, - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +sse_customer_key_md5: Option, - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +version_id: Option, - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +impl HeadObjectInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { + self.checksum_mode = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { + self.if_modified_since = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(GetObjectLegalHoldInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } - } +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self +} - /// A builder for [`GetObjectLockConfigurationInput`] - #[derive(Default)] - pub struct GetObjectLockConfigurationInputBuilder { - bucket: Option, +pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.if_unmodified_since = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - impl GetObjectLockConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_part_number(&mut self, field: Option) -> &mut Self { + self.part_number = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_range(&mut self, field: Option) -> &mut Self { + self.range = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { + self.response_cache_control = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetObjectLockConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { + self.response_content_disposition = field; +self +} - /// A builder for [`GetObjectRetentionInput`] - #[derive(Default)] - pub struct GetObjectRetentionInputBuilder { - bucket: Option, +pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { + self.response_content_encoding = field; +self +} - expected_bucket_owner: Option, +pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { + self.response_content_language = field; +self +} - key: Option, +pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { + self.response_content_type = field; +self +} - request_payer: Option, +pub fn set_response_expires(&mut self, field: Option) -> &mut Self { + self.response_expires = field; +self +} - version_id: Option, - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - impl GetObjectRetentionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +#[must_use] +pub fn checksum_mode(mut self, field: Option) -> Self { + self.checksum_mode = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +#[must_use] +pub fn if_modified_since(mut self, field: Option) -> Self { + self.if_modified_since = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +#[must_use] +pub fn if_unmodified_since(mut self, field: Option) -> Self { + self.if_unmodified_since = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(GetObjectRetentionInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - /// A builder for [`GetObjectTaggingInput`] - #[derive(Default)] - pub struct GetObjectTaggingInputBuilder { - bucket: Option, +#[must_use] +pub fn part_number(mut self, field: Option) -> Self { + self.part_number = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn range(mut self, field: Option) -> Self { + self.range = field; +self +} - key: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - request_payer: Option, +#[must_use] +pub fn response_cache_control(mut self, field: Option) -> Self { + self.response_cache_control = field; +self +} - version_id: Option, - } +#[must_use] +pub fn response_content_disposition(mut self, field: Option) -> Self { + self.response_content_disposition = field; +self +} - impl GetObjectTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn response_content_encoding(mut self, field: Option) -> Self { + self.response_content_encoding = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn response_content_language(mut self, field: Option) -> Self { + self.response_content_language = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +#[must_use] +pub fn response_content_type(mut self, field: Option) -> Self { + self.response_content_type = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn response_expires(mut self, field: Option) -> Self { + self.response_expires = field; +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_mode = self.checksum_mode; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match = self.if_match; +let if_modified_since = self.if_modified_since; +let if_none_match = self.if_none_match; +let if_unmodified_since = self.if_unmodified_since; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let part_number = self.part_number; +let range = self.range; +let request_payer = self.request_payer; +let response_cache_control = self.response_cache_control; +let response_content_disposition = self.response_content_disposition; +let response_content_encoding = self.response_content_encoding; +let response_content_language = self.response_content_language; +let response_content_type = self.response_content_type; +let response_expires = self.response_expires; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let version_id = self.version_id; +Ok(HeadObjectInput { +bucket, +checksum_mode, +expected_bucket_owner, +if_match, +if_modified_since, +if_none_match, +if_unmodified_since, +key, +part_number, +range, +request_payer, +response_cache_control, +response_content_disposition, +response_content_encoding, +response_content_language, +response_content_type, +response_expires, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} + +} + + +/// A builder for [`ListBucketAnalyticsConfigurationsInput`] +#[derive(Default)] +pub struct ListBucketAnalyticsConfigurationsInputBuilder { +bucket: Option, - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +continuation_token: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(GetObjectTaggingInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`GetObjectTorrentInput`] - #[derive(Default)] - pub struct GetObjectTorrentInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, +impl ListBucketAnalyticsConfigurationsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - key: Option, +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self +} - request_payer: Option, - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - impl GetObjectTorrentInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(ListBucketAnalyticsConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +/// A builder for [`ListBucketIntelligentTieringConfigurationsInput`] +#[derive(Default)] +pub struct ListBucketIntelligentTieringConfigurationsInputBuilder { +bucket: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +continuation_token: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - Ok(GetObjectTorrentInput { - bucket, - expected_bucket_owner, - key, - request_payer, - }) - } - } +} - /// A builder for [`GetPublicAccessBlockInput`] - #[derive(Default)] - pub struct GetPublicAccessBlockInputBuilder { - bucket: Option, +impl ListBucketIntelligentTieringConfigurationsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, - } +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self +} - impl GetPublicAccessBlockInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +Ok(ListBucketIntelligentTieringConfigurationsInput { +bucket, +continuation_token, +}) +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetPublicAccessBlockInput { - bucket, - expected_bucket_owner, - }) - } - } - /// A builder for [`HeadBucketInput`] - #[derive(Default)] - pub struct HeadBucketInputBuilder { - bucket: Option, +/// A builder for [`ListBucketInventoryConfigurationsInput`] +#[derive(Default)] +pub struct ListBucketInventoryConfigurationsInputBuilder { +bucket: Option, - expected_bucket_owner: Option, - } +continuation_token: Option, - impl HeadBucketInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +impl ListBucketInventoryConfigurationsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(HeadBucketInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`HeadObjectInput`] - #[derive(Default)] - pub struct HeadObjectInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - checksum_mode: Option, +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - if_match: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(ListBucketInventoryConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} - if_modified_since: Option, +} - if_none_match: Option, - if_unmodified_since: Option, +/// A builder for [`ListBucketMetricsConfigurationsInput`] +#[derive(Default)] +pub struct ListBucketMetricsConfigurationsInputBuilder { +bucket: Option, - key: Option, +continuation_token: Option, - part_number: Option, +expected_bucket_owner: Option, - range: Option, +} - request_payer: Option, +impl ListBucketMetricsConfigurationsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - response_cache_control: Option, +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self +} - response_content_disposition: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - response_content_encoding: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - response_content_language: Option, +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self +} - response_content_type: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - response_expires: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(ListBucketMetricsConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} - sse_customer_algorithm: Option, +} - sse_customer_key: Option, - sse_customer_key_md5: Option, +/// A builder for [`ListBucketsInput`] +#[derive(Default)] +pub struct ListBucketsInputBuilder { +bucket_region: Option, - version_id: Option, - } +continuation_token: Option, - impl HeadObjectInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +max_buckets: Option, - pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { - self.checksum_mode = field; - self - } +prefix: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } +impl ListBucketsInputBuilder { +pub fn set_bucket_region(&mut self, field: Option) -> &mut Self { + self.bucket_region = field; +self +} - pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { - self.if_modified_since = field; - self - } +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self +} - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } +pub fn set_max_buckets(&mut self, field: Option) -> &mut Self { + self.max_buckets = field; +self +} - pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.if_unmodified_since = field; - self - } +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +#[must_use] +pub fn bucket_region(mut self, field: Option) -> Self { + self.bucket_region = field; +self +} - pub fn set_part_number(&mut self, field: Option) -> &mut Self { - self.part_number = field; - self - } +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self +} - pub fn set_range(&mut self, field: Option) -> &mut Self { - self.range = field; - self - } +#[must_use] +pub fn max_buckets(mut self, field: Option) -> Self { + self.max_buckets = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self +} - pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { - self.response_cache_control = field; - self - } +pub fn build(self) -> Result { +let bucket_region = self.bucket_region; +let continuation_token = self.continuation_token; +let max_buckets = self.max_buckets; +let prefix = self.prefix; +Ok(ListBucketsInput { +bucket_region, +continuation_token, +max_buckets, +prefix, +}) +} - pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { - self.response_content_disposition = field; - self - } +} - pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { - self.response_content_encoding = field; - self - } - pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { - self.response_content_language = field; - self - } +/// A builder for [`ListDirectoryBucketsInput`] +#[derive(Default)] +pub struct ListDirectoryBucketsInputBuilder { +continuation_token: Option, - pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { - self.response_content_type = field; - self - } +max_directory_buckets: Option, - pub fn set_response_expires(&mut self, field: Option) -> &mut Self { - self.response_expires = field; - self - } +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +impl ListDirectoryBucketsInputBuilder { +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +pub fn set_max_directory_buckets(&mut self, field: Option) -> &mut Self { + self.max_directory_buckets = field; +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +#[must_use] +pub fn max_directory_buckets(mut self, field: Option) -> Self { + self.max_directory_buckets = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn build(self) -> Result { +let continuation_token = self.continuation_token; +let max_directory_buckets = self.max_directory_buckets; +Ok(ListDirectoryBucketsInput { +continuation_token, +max_directory_buckets, +}) +} - #[must_use] - pub fn checksum_mode(mut self, field: Option) -> Self { - self.checksum_mode = field; - self - } +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } +/// A builder for [`ListMultipartUploadsInput`] +#[derive(Default)] +pub struct ListMultipartUploadsInputBuilder { +bucket: Option, - #[must_use] - pub fn if_modified_since(mut self, field: Option) -> Self { - self.if_modified_since = field; - self - } +delimiter: Option, - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } +encoding_type: Option, - #[must_use] - pub fn if_unmodified_since(mut self, field: Option) -> Self { - self.if_unmodified_since = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +key_marker: Option, - #[must_use] - pub fn part_number(mut self, field: Option) -> Self { - self.part_number = field; - self - } +max_uploads: Option, - #[must_use] - pub fn range(mut self, field: Option) -> Self { - self.range = field; - self - } +prefix: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +request_payer: Option, - #[must_use] - pub fn response_cache_control(mut self, field: Option) -> Self { - self.response_cache_control = field; - self - } +upload_id_marker: Option, - #[must_use] - pub fn response_content_disposition(mut self, field: Option) -> Self { - self.response_content_disposition = field; - self - } +} - #[must_use] - pub fn response_content_encoding(mut self, field: Option) -> Self { - self.response_content_encoding = field; - self - } +impl ListMultipartUploadsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn response_content_language(mut self, field: Option) -> Self { - self.response_content_language = field; - self - } +pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; +self +} - #[must_use] - pub fn response_content_type(mut self, field: Option) -> Self { - self.response_content_type = field; - self - } +pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; +self +} - #[must_use] - pub fn response_expires(mut self, field: Option) -> Self { - self.response_expires = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_key_marker(&mut self, field: Option) -> &mut Self { + self.key_marker = field; +self +} - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +pub fn set_max_uploads(&mut self, field: Option) -> &mut Self { + self.max_uploads = field; +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_mode = self.checksum_mode; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match = self.if_match; - let if_modified_since = self.if_modified_since; - let if_none_match = self.if_none_match; - let if_unmodified_since = self.if_unmodified_since; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let part_number = self.part_number; - let range = self.range; - let request_payer = self.request_payer; - let response_cache_control = self.response_cache_control; - let response_content_disposition = self.response_content_disposition; - let response_content_encoding = self.response_content_encoding; - let response_content_language = self.response_content_language; - let response_content_type = self.response_content_type; - let response_expires = self.response_expires; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let version_id = self.version_id; - Ok(HeadObjectInput { - bucket, - checksum_mode, - expected_bucket_owner, - if_match, - if_modified_since, - if_none_match, - if_unmodified_since, - key, - part_number, - range, - request_payer, - response_cache_control, - response_content_disposition, - response_content_encoding, - response_content_language, - response_content_type, - response_expires, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } - } +pub fn set_upload_id_marker(&mut self, field: Option) -> &mut Self { + self.upload_id_marker = field; +self +} - /// A builder for [`ListBucketAnalyticsConfigurationsInput`] - #[derive(Default)] - pub struct ListBucketAnalyticsConfigurationsInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - continuation_token: Option, +#[must_use] +pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; +self +} - impl ListBucketAnalyticsConfigurationsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } +#[must_use] +pub fn key_marker(mut self, field: Option) -> Self { + self.key_marker = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn max_uploads(mut self, field: Option) -> Self { + self.max_uploads = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self +} - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn upload_id_marker(mut self, field: Option) -> Self { + self.upload_id_marker = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(ListBucketAnalyticsConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let delimiter = self.delimiter; +let encoding_type = self.encoding_type; +let expected_bucket_owner = self.expected_bucket_owner; +let key_marker = self.key_marker; +let max_uploads = self.max_uploads; +let prefix = self.prefix; +let request_payer = self.request_payer; +let upload_id_marker = self.upload_id_marker; +Ok(ListMultipartUploadsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +key_marker, +max_uploads, +prefix, +request_payer, +upload_id_marker, +}) +} - /// A builder for [`ListBucketIntelligentTieringConfigurationsInput`] - #[derive(Default)] - pub struct ListBucketIntelligentTieringConfigurationsInputBuilder { - bucket: Option, +} - continuation_token: Option, - } - impl ListBucketIntelligentTieringConfigurationsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +/// A builder for [`ListObjectVersionsInput`] +#[derive(Default)] +pub struct ListObjectVersionsInputBuilder { +bucket: Option, - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } +delimiter: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +encoding_type: Option, - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } +expected_bucket_owner: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - Ok(ListBucketIntelligentTieringConfigurationsInput { - bucket, - continuation_token, - }) - } - } +key_marker: Option, - /// A builder for [`ListBucketInventoryConfigurationsInput`] - #[derive(Default)] - pub struct ListBucketInventoryConfigurationsInputBuilder { - bucket: Option, +max_keys: Option, - continuation_token: Option, +optional_object_attributes: Option, - expected_bucket_owner: Option, - } +prefix: Option, - impl ListBucketInventoryConfigurationsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +request_payer: Option, - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } +version_id_marker: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +impl ListObjectVersionsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } +pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(ListBucketInventoryConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`ListBucketMetricsConfigurationsInput`] - #[derive(Default)] - pub struct ListBucketMetricsConfigurationsInputBuilder { - bucket: Option, +pub fn set_key_marker(&mut self, field: Option) -> &mut Self { + self.key_marker = field; +self +} - continuation_token: Option, +pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; +self +} - impl ListBucketMetricsConfigurationsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self +} - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_version_id_marker(&mut self, field: Option) -> &mut Self { + self.version_id_marker = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } +#[must_use] +pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(ListBucketMetricsConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`ListBucketsInput`] - #[derive(Default)] - pub struct ListBucketsInputBuilder { - bucket_region: Option, +#[must_use] +pub fn key_marker(mut self, field: Option) -> Self { + self.key_marker = field; +self +} - continuation_token: Option, +#[must_use] +pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; +self +} - max_buckets: Option, +#[must_use] +pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; +self +} - prefix: Option, - } +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self +} - impl ListBucketsInputBuilder { - pub fn set_bucket_region(&mut self, field: Option) -> &mut Self { - self.bucket_region = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } +#[must_use] +pub fn version_id_marker(mut self, field: Option) -> Self { + self.version_id_marker = field; +self +} - pub fn set_max_buckets(&mut self, field: Option) -> &mut Self { - self.max_buckets = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let delimiter = self.delimiter; +let encoding_type = self.encoding_type; +let expected_bucket_owner = self.expected_bucket_owner; +let key_marker = self.key_marker; +let max_keys = self.max_keys; +let optional_object_attributes = self.optional_object_attributes; +let prefix = self.prefix; +let request_payer = self.request_payer; +let version_id_marker = self.version_id_marker; +Ok(ListObjectVersionsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +key_marker, +max_keys, +optional_object_attributes, +prefix, +request_payer, +version_id_marker, +}) +} - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } +} - #[must_use] - pub fn bucket_region(mut self, field: Option) -> Self { - self.bucket_region = field; - self - } - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } +/// A builder for [`ListObjectsInput`] +#[derive(Default)] +pub struct ListObjectsInputBuilder { +bucket: Option, - #[must_use] - pub fn max_buckets(mut self, field: Option) -> Self { - self.max_buckets = field; - self - } +delimiter: Option, - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } +encoding_type: Option, - pub fn build(self) -> Result { - let bucket_region = self.bucket_region; - let continuation_token = self.continuation_token; - let max_buckets = self.max_buckets; - let prefix = self.prefix; - Ok(ListBucketsInput { - bucket_region, - continuation_token, - max_buckets, - prefix, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`ListDirectoryBucketsInput`] - #[derive(Default)] - pub struct ListDirectoryBucketsInputBuilder { - continuation_token: Option, +marker: Option, - max_directory_buckets: Option, - } +max_keys: Option, - impl ListDirectoryBucketsInputBuilder { - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } +optional_object_attributes: Option, - pub fn set_max_directory_buckets(&mut self, field: Option) -> &mut Self { - self.max_directory_buckets = field; - self - } +prefix: Option, - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } +request_payer: Option, - #[must_use] - pub fn max_directory_buckets(mut self, field: Option) -> Self { - self.max_directory_buckets = field; - self - } +} - pub fn build(self) -> Result { - let continuation_token = self.continuation_token; - let max_directory_buckets = self.max_directory_buckets; - Ok(ListDirectoryBucketsInput { - continuation_token, - max_directory_buckets, - }) - } - } +impl ListObjectsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - /// A builder for [`ListMultipartUploadsInput`] - #[derive(Default)] - pub struct ListMultipartUploadsInputBuilder { - bucket: Option, +pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; +self +} - delimiter: Option, +pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; +self +} - encoding_type: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +pub fn set_marker(&mut self, field: Option) -> &mut Self { + self.marker = field; +self +} - key_marker: Option, +pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; +self +} - max_uploads: Option, +pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; +self +} - prefix: Option, +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self +} - request_payer: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - upload_id_marker: Option, - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - impl ListMultipartUploadsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; +self +} - pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; - self - } +#[must_use] +pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; +self +} - pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn marker(mut self, field: Option) -> Self { + self.marker = field; +self +} - pub fn set_key_marker(&mut self, field: Option) -> &mut Self { - self.key_marker = field; - self - } +#[must_use] +pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; +self +} - pub fn set_max_uploads(&mut self, field: Option) -> &mut Self { - self.max_uploads = field; - self - } +#[must_use] +pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; +self +} - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn set_upload_id_marker(&mut self, field: Option) -> &mut Self { - self.upload_id_marker = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let delimiter = self.delimiter; +let encoding_type = self.encoding_type; +let expected_bucket_owner = self.expected_bucket_owner; +let marker = self.marker; +let max_keys = self.max_keys; +let optional_object_attributes = self.optional_object_attributes; +let prefix = self.prefix; +let request_payer = self.request_payer; +Ok(ListObjectsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +marker, +max_keys, +optional_object_attributes, +prefix, +request_payer, +}) +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; - self - } - #[must_use] - pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; - self - } +/// A builder for [`ListObjectsV2Input`] +#[derive(Default)] +pub struct ListObjectsV2InputBuilder { +bucket: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +continuation_token: Option, - #[must_use] - pub fn key_marker(mut self, field: Option) -> Self { - self.key_marker = field; - self - } +delimiter: Option, - #[must_use] - pub fn max_uploads(mut self, field: Option) -> Self { - self.max_uploads = field; - self - } +encoding_type: Option, - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +fetch_owner: Option, - #[must_use] - pub fn upload_id_marker(mut self, field: Option) -> Self { - self.upload_id_marker = field; - self - } +max_keys: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let delimiter = self.delimiter; - let encoding_type = self.encoding_type; - let expected_bucket_owner = self.expected_bucket_owner; - let key_marker = self.key_marker; - let max_uploads = self.max_uploads; - let prefix = self.prefix; - let request_payer = self.request_payer; - let upload_id_marker = self.upload_id_marker; - Ok(ListMultipartUploadsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - key_marker, - max_uploads, - prefix, - request_payer, - upload_id_marker, - }) - } - } +optional_object_attributes: Option, - /// A builder for [`ListObjectVersionsInput`] - #[derive(Default)] - pub struct ListObjectVersionsInputBuilder { - bucket: Option, +prefix: Option, - delimiter: Option, +request_payer: Option, - encoding_type: Option, +start_after: Option, - expected_bucket_owner: Option, +} - key_marker: Option, +impl ListObjectsV2InputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - max_keys: Option, +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self +} - optional_object_attributes: Option, +pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; +self +} - prefix: Option, +pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; +self +} - request_payer: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - version_id_marker: Option, - } +pub fn set_fetch_owner(&mut self, field: Option) -> &mut Self { + self.fetch_owner = field; +self +} - impl ListObjectVersionsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; +self +} - pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; - self - } +pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; +self +} - pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; - self - } +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn set_key_marker(&mut self, field: Option) -> &mut Self { - self.key_marker = field; - self - } +pub fn set_start_after(&mut self, field: Option) -> &mut Self { + self.start_after = field; +self +} - pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; - self - } +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self +} - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } +#[must_use] +pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; +self +} - pub fn set_version_id_marker(&mut self, field: Option) -> &mut Self { - self.version_id_marker = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn fetch_owner(mut self, field: Option) -> Self { + self.fetch_owner = field; +self +} - #[must_use] - pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; - self - } +#[must_use] +pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; +self +} - #[must_use] - pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; - self - } +#[must_use] +pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self +} - #[must_use] - pub fn key_marker(mut self, field: Option) -> Self { - self.key_marker = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; - self - } +#[must_use] +pub fn start_after(mut self, field: Option) -> Self { + self.start_after = field; +self +} - #[must_use] - pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +let delimiter = self.delimiter; +let encoding_type = self.encoding_type; +let expected_bucket_owner = self.expected_bucket_owner; +let fetch_owner = self.fetch_owner; +let max_keys = self.max_keys; +let optional_object_attributes = self.optional_object_attributes; +let prefix = self.prefix; +let request_payer = self.request_payer; +let start_after = self.start_after; +Ok(ListObjectsV2Input { +bucket, +continuation_token, +delimiter, +encoding_type, +expected_bucket_owner, +fetch_owner, +max_keys, +optional_object_attributes, +prefix, +request_payer, +start_after, +}) +} - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - #[must_use] - pub fn version_id_marker(mut self, field: Option) -> Self { - self.version_id_marker = field; - self - } +/// A builder for [`ListPartsInput`] +#[derive(Default)] +pub struct ListPartsInputBuilder { +bucket: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let delimiter = self.delimiter; - let encoding_type = self.encoding_type; - let expected_bucket_owner = self.expected_bucket_owner; - let key_marker = self.key_marker; - let max_keys = self.max_keys; - let optional_object_attributes = self.optional_object_attributes; - let prefix = self.prefix; - let request_payer = self.request_payer; - let version_id_marker = self.version_id_marker; - Ok(ListObjectVersionsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - key_marker, - max_keys, - optional_object_attributes, - prefix, - request_payer, - version_id_marker, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`ListObjectsInput`] - #[derive(Default)] - pub struct ListObjectsInputBuilder { - bucket: Option, +key: Option, - delimiter: Option, +max_parts: Option, - encoding_type: Option, +part_number_marker: Option, - expected_bucket_owner: Option, +request_payer: Option, - marker: Option, +sse_customer_algorithm: Option, - max_keys: Option, +sse_customer_key: Option, - optional_object_attributes: Option, +sse_customer_key_md5: Option, - prefix: Option, +upload_id: Option, - request_payer: Option, - } +} - impl ListObjectsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +impl ListPartsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_max_parts(&mut self, field: Option) -> &mut Self { + self.max_parts = field; +self +} - pub fn set_marker(&mut self, field: Option) -> &mut Self { - self.marker = field; - self - } +pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { + self.part_number_marker = field; +self +} - pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self +} - #[must_use] - pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn marker(mut self, field: Option) -> Self { - self.marker = field; - self - } +#[must_use] +pub fn max_parts(mut self, field: Option) -> Self { + self.max_parts = field; +self +} - #[must_use] - pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; - self - } +#[must_use] +pub fn part_number_marker(mut self, field: Option) -> Self { + self.part_number_marker = field; +self +} - #[must_use] - pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let delimiter = self.delimiter; - let encoding_type = self.encoding_type; - let expected_bucket_owner = self.expected_bucket_owner; - let marker = self.marker; - let max_keys = self.max_keys; - let optional_object_attributes = self.optional_object_attributes; - let prefix = self.prefix; - let request_payer = self.request_payer; - Ok(ListObjectsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - marker, - max_keys, - optional_object_attributes, - prefix, - request_payer, - }) - } - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - /// A builder for [`ListObjectsV2Input`] - #[derive(Default)] - pub struct ListObjectsV2InputBuilder { - bucket: Option, +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self +} - continuation_token: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let max_parts = self.max_parts; +let part_number_marker = self.part_number_marker; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(ListPartsInput { +bucket, +expected_bucket_owner, +key, +max_parts, +part_number_marker, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} - delimiter: Option, +} - encoding_type: Option, - expected_bucket_owner: Option, +/// A builder for [`PostObjectInput`] +#[derive(Default)] +pub struct PostObjectInputBuilder { +acl: Option, - fetch_owner: Option, +body: Option, - max_keys: Option, +bucket: Option, - optional_object_attributes: Option, +bucket_key_enabled: Option, - prefix: Option, +cache_control: Option, - request_payer: Option, +checksum_algorithm: Option, - start_after: Option, - } +checksum_crc32: Option, - impl ListObjectsV2InputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +checksum_crc32c: Option, - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } +checksum_crc64nvme: Option, - pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; - self - } +checksum_sha1: Option, - pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; - self - } +checksum_sha256: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +content_disposition: Option, - pub fn set_fetch_owner(&mut self, field: Option) -> &mut Self { - self.fetch_owner = field; - self - } +content_encoding: Option, - pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; - self - } +content_language: Option, - pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; - self - } +content_length: Option, - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } +content_md5: Option, - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +content_type: Option, - pub fn set_start_after(&mut self, field: Option) -> &mut Self { - self.start_after = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +expires: Option, - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } +grant_full_control: Option, - #[must_use] - pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; - self - } +grant_read: Option, - #[must_use] - pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; - self - } +grant_read_acp: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +grant_write_acp: Option, - #[must_use] - pub fn fetch_owner(mut self, field: Option) -> Self { - self.fetch_owner = field; - self - } +if_match: Option, - #[must_use] - pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; - self - } +if_none_match: Option, - #[must_use] - pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; - self - } +key: Option, - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } +metadata: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +object_lock_legal_hold_status: Option, - #[must_use] - pub fn start_after(mut self, field: Option) -> Self { - self.start_after = field; - self - } +object_lock_mode: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - let delimiter = self.delimiter; - let encoding_type = self.encoding_type; - let expected_bucket_owner = self.expected_bucket_owner; - let fetch_owner = self.fetch_owner; - let max_keys = self.max_keys; - let optional_object_attributes = self.optional_object_attributes; - let prefix = self.prefix; - let request_payer = self.request_payer; - let start_after = self.start_after; - Ok(ListObjectsV2Input { - bucket, - continuation_token, - delimiter, - encoding_type, - expected_bucket_owner, - fetch_owner, - max_keys, - optional_object_attributes, - prefix, - request_payer, - start_after, - }) - } - } +object_lock_retain_until_date: Option, - /// A builder for [`ListPartsInput`] - #[derive(Default)] - pub struct ListPartsInputBuilder { - bucket: Option, +request_payer: Option, - expected_bucket_owner: Option, +sse_customer_algorithm: Option, - key: Option, +sse_customer_key: Option, - max_parts: Option, +sse_customer_key_md5: Option, - part_number_marker: Option, +ssekms_encryption_context: Option, - request_payer: Option, +ssekms_key_id: Option, - sse_customer_algorithm: Option, +server_side_encryption: Option, - sse_customer_key: Option, +storage_class: Option, - sse_customer_key_md5: Option, +tagging: Option, - upload_id: Option, - } +version_id: Option, - impl ListPartsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +website_redirect_location: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +write_offset_bytes: Option, - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +success_action_redirect: Option, - pub fn set_max_parts(&mut self, field: Option) -> &mut Self { - self.max_parts = field; - self - } +success_action_status: Option, - pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { - self.part_number_marker = field; - self - } +policy: Option, - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +impl PostObjectInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self +} - #[must_use] - pub fn max_parts(mut self, field: Option) -> Self { - self.max_parts = field; - self - } +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} - #[must_use] - pub fn part_number_marker(mut self, field: Option) -> Self { - self.part_number_marker = field; - self - } +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self +} - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let max_parts = self.max_parts; - let part_number_marker = self.part_number_marker; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(ListPartsInput { - bucket, - expected_bucket_owner, - key, - max_parts, - part_number_marker, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } - } +pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; +self +} - /// A builder for [`PostObjectInput`] - #[derive(Default)] - pub struct PostObjectInputBuilder { - acl: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - body: Option, +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self +} - bucket: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - bucket_key_enabled: Option, +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self +} - cache_control: Option, +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self +} - checksum_algorithm: Option, +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self +} - checksum_crc32: Option, +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} - checksum_crc32c: Option, +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - checksum_crc64nvme: Option, +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} - checksum_sha1: Option, +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self +} - checksum_sha256: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - content_disposition: Option, +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self +} - content_encoding: Option, +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self +} - content_language: Option, +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self +} - content_length: Option, +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self +} - content_md5: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - content_type: Option, +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - expected_bucket_owner: Option, +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - expires: Option, +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - grant_full_control: Option, +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self +} - grant_read: Option, +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} - grant_read_acp: Option, +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} - grant_write_acp: Option, +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self +} - if_match: Option, +pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; +self +} - if_none_match: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - key: Option, +pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; +self +} - metadata: Option, +pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { + self.write_offset_bytes = field; +self +} - object_lock_legal_hold_status: Option, +pub fn set_success_action_redirect(&mut self, field: Option) -> &mut Self { + self.success_action_redirect = field; +self +} - object_lock_mode: Option, +pub fn set_success_action_status(&mut self, field: Option) -> &mut Self { + self.success_action_status = field; +self +} - object_lock_retain_until_date: Option, +pub fn set_policy(&mut self, field: Option) -> &mut Self { + self.policy = field; +self +} - request_payer: Option, +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - sse_customer_algorithm: Option, +#[must_use] +pub fn body(mut self, field: Option) -> Self { + self.body = field; +self +} - sse_customer_key: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - sse_customer_key_md5: Option, +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self +} - ssekms_encryption_context: Option, +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self +} - ssekms_key_id: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - server_side_encryption: Option, +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} - storage_class: Option, +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self +} - tagging: Option, +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} - version_id: Option, +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} - website_redirect_location: Option, +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} - write_offset_bytes: Option, +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self +} - success_action_redirect: Option, +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self +} - success_action_status: Option, +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} - policy: Option, - } +#[must_use] +pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; +self +} - impl PostObjectInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; - self - } +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self +} - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self +} - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self +} - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self +} - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self +} - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self +} - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self +} - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self +} - pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; - self - } +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; +self +} + +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} + +#[must_use] +pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; +self +} + +#[must_use] +pub fn write_offset_bytes(mut self, field: Option) -> Self { + self.write_offset_bytes = field; +self +} + +#[must_use] +pub fn success_action_redirect(mut self, field: Option) -> Self { + self.success_action_redirect = field; +self +} + +#[must_use] +pub fn success_action_status(mut self, field: Option) -> Self { + self.success_action_status = field; +self +} + +#[must_use] +pub fn policy(mut self, field: Option) -> Self { + self.policy = field; +self +} + +pub fn build(self) -> Result { +let acl = self.acl; +let body = self.body; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_algorithm = self.checksum_algorithm; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_length = self.content_length; +let content_md5 = self.content_md5; +let content_type = self.content_type; +let expected_bucket_owner = self.expected_bucket_owner; +let expires = self.expires; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write_acp = self.grant_write_acp; +let if_match = self.if_match; +let if_none_match = self.if_none_match; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let metadata = self.metadata; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let storage_class = self.storage_class; +let tagging = self.tagging; +let version_id = self.version_id; +let website_redirect_location = self.website_redirect_location; +let write_offset_bytes = self.write_offset_bytes; +let success_action_redirect = self.success_action_redirect; +let success_action_status = self.success_action_status; +let policy = self.policy; +Ok(PostObjectInput { +acl, +body, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_md5, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +if_match, +if_none_match, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +version_id, +website_redirect_location, +write_offset_bytes, +success_action_redirect, +success_action_status, +policy, +}) +} + +} + + +/// A builder for [`PutBucketAccelerateConfigurationInput`] +#[derive(Default)] +pub struct PutBucketAccelerateConfigurationInputBuilder { +accelerate_configuration: Option, - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } +bucket: Option, - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } +checksum_algorithm: Option, - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } +} - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } +impl PutBucketAccelerateConfigurationInputBuilder { +pub fn set_accelerate_configuration(&mut self, field: AccelerateConfiguration) -> &mut Self { + self.accelerate_configuration = Some(field); +self +} - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn accelerate_configuration(mut self, field: AccelerateConfiguration) -> Self { + self.accelerate_configuration = Some(field); +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } +pub fn build(self) -> Result { +let accelerate_configuration = self.accelerate_configuration.ok_or_else(|| BuildError::missing_field("accelerate_configuration"))?; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(PutBucketAccelerateConfigurationInput { +accelerate_configuration, +bucket, +checksum_algorithm, +expected_bucket_owner, +}) +} - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } +} - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } - pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; - self - } +/// A builder for [`PutBucketAclInput`] +#[derive(Default)] +pub struct PutBucketAclInputBuilder { +acl: Option, - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +access_control_policy: Option, - pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; - self - } +bucket: Option, - pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { - self.write_offset_bytes = field; - self - } +checksum_algorithm: Option, - pub fn set_success_action_redirect(&mut self, field: Option) -> &mut Self { - self.success_action_redirect = field; - self - } +content_md5: Option, - pub fn set_success_action_status(&mut self, field: Option) -> &mut Self { - self.success_action_status = field; - self - } +expected_bucket_owner: Option, - pub fn set_policy(&mut self, field: Option) -> &mut Self { - self.policy = field; - self - } +grant_full_control: Option, - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } +grant_read: Option, - #[must_use] - pub fn body(mut self, field: Option) -> Self { - self.body = field; - self - } +grant_read_acp: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +grant_write: Option, - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } +grant_write_acp: Option, - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +impl PutBucketAclInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self +} - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } +pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { + self.access_control_policy = field; +self +} - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self +} - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self +} - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} - #[must_use] - pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; - self - } +pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; +self +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn access_control_policy(mut self, field: Option) -> Self { + self.access_control_policy = field; +self +} - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self +} - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +#[must_use] +pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; +self +} - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self +} - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } +pub fn build(self) -> Result { +let acl = self.acl; +let access_control_policy = self.access_control_policy; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write = self.grant_write; +let grant_write_acp = self.grant_write_acp; +Ok(PutBucketAclInput { +acl, +access_control_policy, +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +}) +} - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } +} - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +/// A builder for [`PutBucketAnalyticsConfigurationInput`] +#[derive(Default)] +pub struct PutBucketAnalyticsConfigurationInputBuilder { +analytics_configuration: Option, - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +bucket: Option, - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +id: Option, - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } +} - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } +impl PutBucketAnalyticsConfigurationInputBuilder { +pub fn set_analytics_configuration(&mut self, field: AnalyticsConfiguration) -> &mut Self { + self.analytics_configuration = Some(field); +self +} - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; - self - } +pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +#[must_use] +pub fn analytics_configuration(mut self, field: AnalyticsConfiguration) -> Self { + self.analytics_configuration = Some(field); +self +} - #[must_use] - pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn write_offset_bytes(mut self, field: Option) -> Self { - self.write_offset_bytes = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn success_action_redirect(mut self, field: Option) -> Self { - self.success_action_redirect = field; - self - } +#[must_use] +pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); +self +} - #[must_use] - pub fn success_action_status(mut self, field: Option) -> Self { - self.success_action_status = field; - self - } +pub fn build(self) -> Result { +let analytics_configuration = self.analytics_configuration.ok_or_else(|| BuildError::missing_field("analytics_configuration"))?; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(PutBucketAnalyticsConfigurationInput { +analytics_configuration, +bucket, +expected_bucket_owner, +id, +}) +} - #[must_use] - pub fn policy(mut self, field: Option) -> Self { - self.policy = field; - self - } +} - pub fn build(self) -> Result { - let acl = self.acl; - let body = self.body; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_algorithm = self.checksum_algorithm; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_length = self.content_length; - let content_md5 = self.content_md5; - let content_type = self.content_type; - let expected_bucket_owner = self.expected_bucket_owner; - let expires = self.expires; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write_acp = self.grant_write_acp; - let if_match = self.if_match; - let if_none_match = self.if_none_match; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let metadata = self.metadata; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let storage_class = self.storage_class; - let tagging = self.tagging; - let version_id = self.version_id; - let website_redirect_location = self.website_redirect_location; - let write_offset_bytes = self.write_offset_bytes; - let success_action_redirect = self.success_action_redirect; - let success_action_status = self.success_action_status; - let policy = self.policy; - Ok(PostObjectInput { - acl, - body, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_md5, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - if_match, - if_none_match, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - version_id, - website_redirect_location, - write_offset_bytes, - success_action_redirect, - success_action_status, - policy, - }) - } - } - /// A builder for [`PutBucketAccelerateConfigurationInput`] - #[derive(Default)] - pub struct PutBucketAccelerateConfigurationInputBuilder { - accelerate_configuration: Option, +/// A builder for [`PutBucketCorsInput`] +#[derive(Default)] +pub struct PutBucketCorsInputBuilder { +bucket: Option, - bucket: Option, +cors_configuration: Option, - checksum_algorithm: Option, +checksum_algorithm: Option, - expected_bucket_owner: Option, - } +content_md5: Option, - impl PutBucketAccelerateConfigurationInputBuilder { - pub fn set_accelerate_configuration(&mut self, field: AccelerateConfiguration) -> &mut Self { - self.accelerate_configuration = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +impl PutBucketCorsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_cors_configuration(&mut self, field: CORSConfiguration) -> &mut Self { + self.cors_configuration = Some(field); +self +} - #[must_use] - pub fn accelerate_configuration(mut self, field: AccelerateConfiguration) -> Self { - self.accelerate_configuration = Some(field); - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let accelerate_configuration = self - .accelerate_configuration - .ok_or_else(|| BuildError::missing_field("accelerate_configuration"))?; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(PutBucketAccelerateConfigurationInput { - accelerate_configuration, - bucket, - checksum_algorithm, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn cors_configuration(mut self, field: CORSConfiguration) -> Self { + self.cors_configuration = Some(field); +self +} - /// A builder for [`PutBucketAclInput`] - #[derive(Default)] - pub struct PutBucketAclInputBuilder { - acl: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - access_control_policy: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - checksum_algorithm: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let cors_configuration = self.cors_configuration.ok_or_else(|| BuildError::missing_field("cors_configuration"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(PutBucketCorsInput { +bucket, +cors_configuration, +checksum_algorithm, +content_md5, +expected_bucket_owner, +}) +} - content_md5: Option, +} - expected_bucket_owner: Option, - grant_full_control: Option, +/// A builder for [`PutBucketEncryptionInput`] +#[derive(Default)] +pub struct PutBucketEncryptionInputBuilder { +bucket: Option, - grant_read: Option, +checksum_algorithm: Option, - grant_read_acp: Option, +content_md5: Option, - grant_write: Option, +expected_bucket_owner: Option, - grant_write_acp: Option, - } +server_side_encryption_configuration: Option, - impl PutBucketAclInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } +} - pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { - self.access_control_policy = field; - self - } +impl PutBucketEncryptionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_server_side_encryption_configuration(&mut self, field: ServerSideEncryptionConfiguration) -> &mut Self { + self.server_side_encryption_configuration = Some(field); +self +} - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } +#[must_use] +pub fn server_side_encryption_configuration(mut self, field: ServerSideEncryptionConfiguration) -> Self { + self.server_side_encryption_configuration = Some(field); +self +} - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let server_side_encryption_configuration = self.server_side_encryption_configuration.ok_or_else(|| BuildError::missing_field("server_side_encryption_configuration"))?; +Ok(PutBucketEncryptionInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +server_side_encryption_configuration, +}) +} - #[must_use] - pub fn access_control_policy(mut self, field: Option) -> Self { - self.access_control_policy = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`PutBucketIntelligentTieringConfigurationInput`] +#[derive(Default)] +pub struct PutBucketIntelligentTieringConfigurationInputBuilder { +bucket: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +id: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +intelligent_tiering_configuration: Option, - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } +} - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } +impl PutBucketIntelligentTieringConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } +pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); +self +} - #[must_use] - pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; - self - } +pub fn set_intelligent_tiering_configuration(&mut self, field: IntelligentTieringConfiguration) -> &mut Self { + self.intelligent_tiering_configuration = Some(field); +self +} - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let acl = self.acl; - let access_control_policy = self.access_control_policy; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write = self.grant_write; - let grant_write_acp = self.grant_write_acp; - Ok(PutBucketAclInput { - acl, - access_control_policy, - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - }) - } - } +#[must_use] +pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); +self +} - /// A builder for [`PutBucketAnalyticsConfigurationInput`] - #[derive(Default)] - pub struct PutBucketAnalyticsConfigurationInputBuilder { - analytics_configuration: Option, +#[must_use] +pub fn intelligent_tiering_configuration(mut self, field: IntelligentTieringConfiguration) -> Self { + self.intelligent_tiering_configuration = Some(field); +self +} - bucket: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +let intelligent_tiering_configuration = self.intelligent_tiering_configuration.ok_or_else(|| BuildError::missing_field("intelligent_tiering_configuration"))?; +Ok(PutBucketIntelligentTieringConfigurationInput { +bucket, +id, +intelligent_tiering_configuration, +}) +} - expected_bucket_owner: Option, +} - id: Option, - } - impl PutBucketAnalyticsConfigurationInputBuilder { - pub fn set_analytics_configuration(&mut self, field: AnalyticsConfiguration) -> &mut Self { - self.analytics_configuration = Some(field); - self - } +/// A builder for [`PutBucketInventoryConfigurationInput`] +#[derive(Default)] +pub struct PutBucketInventoryConfigurationInputBuilder { +bucket: Option, - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +id: Option, - pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); - self - } +inventory_configuration: Option, - #[must_use] - pub fn analytics_configuration(mut self, field: AnalyticsConfiguration) -> Self { - self.analytics_configuration = Some(field); - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +impl PutBucketInventoryConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); - self - } +pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); +self +} - pub fn build(self) -> Result { - let analytics_configuration = self - .analytics_configuration - .ok_or_else(|| BuildError::missing_field("analytics_configuration"))?; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(PutBucketAnalyticsConfigurationInput { - analytics_configuration, - bucket, - expected_bucket_owner, - id, - }) - } - } +pub fn set_inventory_configuration(&mut self, field: InventoryConfiguration) -> &mut Self { + self.inventory_configuration = Some(field); +self +} - /// A builder for [`PutBucketCorsInput`] - #[derive(Default)] - pub struct PutBucketCorsInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - cors_configuration: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); +self +} - content_md5: Option, +#[must_use] +pub fn inventory_configuration(mut self, field: InventoryConfiguration) -> Self { + self.inventory_configuration = Some(field); +self +} - expected_bucket_owner: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +let inventory_configuration = self.inventory_configuration.ok_or_else(|| BuildError::missing_field("inventory_configuration"))?; +Ok(PutBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +inventory_configuration, +}) +} - impl PutBucketCorsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_cors_configuration(&mut self, field: CORSConfiguration) -> &mut Self { - self.cors_configuration = Some(field); - self - } - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`PutBucketLifecycleConfigurationInput`] +#[derive(Default)] +pub struct PutBucketLifecycleConfigurationInputBuilder { +bucket: Option, - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +checksum_algorithm: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +lifecycle_configuration: Option, - #[must_use] - pub fn cors_configuration(mut self, field: CORSConfiguration) -> Self { - self.cors_configuration = Some(field); - self - } +transition_default_minimum_object_size: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +impl PutBucketLifecycleConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let cors_configuration = self - .cors_configuration - .ok_or_else(|| BuildError::missing_field("cors_configuration"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(PutBucketCorsInput { - bucket, - cors_configuration, - checksum_algorithm, - content_md5, - expected_bucket_owner, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`PutBucketEncryptionInput`] - #[derive(Default)] - pub struct PutBucketEncryptionInputBuilder { - bucket: Option, +pub fn set_lifecycle_configuration(&mut self, field: Option) -> &mut Self { + self.lifecycle_configuration = field; +self +} - checksum_algorithm: Option, +pub fn set_transition_default_minimum_object_size(&mut self, field: Option) -> &mut Self { + self.transition_default_minimum_object_size = field; +self +} - content_md5: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - server_side_encryption_configuration: Option, - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - impl PutBucketEncryptionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn lifecycle_configuration(mut self, field: Option) -> Self { + self.lifecycle_configuration = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn transition_default_minimum_object_size(mut self, field: Option) -> Self { + self.transition_default_minimum_object_size = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let expected_bucket_owner = self.expected_bucket_owner; +let lifecycle_configuration = self.lifecycle_configuration; +let transition_default_minimum_object_size = self.transition_default_minimum_object_size; +Ok(PutBucketLifecycleConfigurationInput { +bucket, +checksum_algorithm, +expected_bucket_owner, +lifecycle_configuration, +transition_default_minimum_object_size, +}) +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - pub fn set_server_side_encryption_configuration(&mut self, field: ServerSideEncryptionConfiguration) -> &mut Self { - self.server_side_encryption_configuration = Some(field); - self - } - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +/// A builder for [`PutBucketLoggingInput`] +#[derive(Default)] +pub struct PutBucketLoggingInputBuilder { +bucket: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +bucket_logging_status: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +checksum_algorithm: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +content_md5: Option, - #[must_use] - pub fn server_side_encryption_configuration(mut self, field: ServerSideEncryptionConfiguration) -> Self { - self.server_side_encryption_configuration = Some(field); - self - } +expected_bucket_owner: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let server_side_encryption_configuration = self - .server_side_encryption_configuration - .ok_or_else(|| BuildError::missing_field("server_side_encryption_configuration"))?; - Ok(PutBucketEncryptionInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - server_side_encryption_configuration, - }) - } - } +} - /// A builder for [`PutBucketIntelligentTieringConfigurationInput`] - #[derive(Default)] - pub struct PutBucketIntelligentTieringConfigurationInputBuilder { - bucket: Option, +impl PutBucketLoggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - id: Option, +pub fn set_bucket_logging_status(&mut self, field: BucketLoggingStatus) -> &mut Self { + self.bucket_logging_status = Some(field); +self +} - intelligent_tiering_configuration: Option, - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - impl PutBucketIntelligentTieringConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_intelligent_tiering_configuration(&mut self, field: IntelligentTieringConfiguration) -> &mut Self { - self.intelligent_tiering_configuration = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket_logging_status(mut self, field: BucketLoggingStatus) -> Self { + self.bucket_logging_status = Some(field); +self +} - #[must_use] - pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn intelligent_tiering_configuration(mut self, field: IntelligentTieringConfiguration) -> Self { - self.intelligent_tiering_configuration = Some(field); - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - let intelligent_tiering_configuration = self - .intelligent_tiering_configuration - .ok_or_else(|| BuildError::missing_field("intelligent_tiering_configuration"))?; - Ok(PutBucketIntelligentTieringConfigurationInput { - bucket, - id, - intelligent_tiering_configuration, - }) - } - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`PutBucketInventoryConfigurationInput`] - #[derive(Default)] - pub struct PutBucketInventoryConfigurationInputBuilder { - bucket: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_logging_status = self.bucket_logging_status.ok_or_else(|| BuildError::missing_field("bucket_logging_status"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(PutBucketLoggingInput { +bucket, +bucket_logging_status, +checksum_algorithm, +content_md5, +expected_bucket_owner, +}) +} - expected_bucket_owner: Option, +} - id: Option, - inventory_configuration: Option, - } +/// A builder for [`PutBucketMetricsConfigurationInput`] +#[derive(Default)] +pub struct PutBucketMetricsConfigurationInputBuilder { +bucket: Option, - impl PutBucketInventoryConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +expected_bucket_owner: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +id: Option, - pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); - self - } +metrics_configuration: Option, - pub fn set_inventory_configuration(&mut self, field: InventoryConfiguration) -> &mut Self { - self.inventory_configuration = Some(field); - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +impl PutBucketMetricsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); - self - } +pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); +self +} - #[must_use] - pub fn inventory_configuration(mut self, field: InventoryConfiguration) -> Self { - self.inventory_configuration = Some(field); - self - } +pub fn set_metrics_configuration(&mut self, field: MetricsConfiguration) -> &mut Self { + self.metrics_configuration = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - let inventory_configuration = self - .inventory_configuration - .ok_or_else(|| BuildError::missing_field("inventory_configuration"))?; - Ok(PutBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - inventory_configuration, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`PutBucketLifecycleConfigurationInput`] - #[derive(Default)] - pub struct PutBucketLifecycleConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn metrics_configuration(mut self, field: MetricsConfiguration) -> Self { + self.metrics_configuration = Some(field); +self +} - lifecycle_configuration: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +let metrics_configuration = self.metrics_configuration.ok_or_else(|| BuildError::missing_field("metrics_configuration"))?; +Ok(PutBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +metrics_configuration, +}) +} - transition_default_minimum_object_size: Option, - } +} - impl PutBucketLifecycleConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`PutBucketNotificationConfigurationInput`] +#[derive(Default)] +pub struct PutBucketNotificationConfigurationInputBuilder { +bucket: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - pub fn set_lifecycle_configuration(&mut self, field: Option) -> &mut Self { - self.lifecycle_configuration = field; - self - } +notification_configuration: Option, - pub fn set_transition_default_minimum_object_size( - &mut self, - field: Option, - ) -> &mut Self { - self.transition_default_minimum_object_size = field; - self - } +skip_destination_validation: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +impl PutBucketNotificationConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn lifecycle_configuration(mut self, field: Option) -> Self { - self.lifecycle_configuration = field; - self - } +pub fn set_notification_configuration(&mut self, field: NotificationConfiguration) -> &mut Self { + self.notification_configuration = Some(field); +self +} - #[must_use] - pub fn transition_default_minimum_object_size(mut self, field: Option) -> Self { - self.transition_default_minimum_object_size = field; - self - } +pub fn set_skip_destination_validation(&mut self, field: Option) -> &mut Self { + self.skip_destination_validation = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let expected_bucket_owner = self.expected_bucket_owner; - let lifecycle_configuration = self.lifecycle_configuration; - let transition_default_minimum_object_size = self.transition_default_minimum_object_size; - Ok(PutBucketLifecycleConfigurationInput { - bucket, - checksum_algorithm, - expected_bucket_owner, - lifecycle_configuration, - transition_default_minimum_object_size, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`PutBucketLoggingInput`] - #[derive(Default)] - pub struct PutBucketLoggingInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - bucket_logging_status: Option, +#[must_use] +pub fn notification_configuration(mut self, field: NotificationConfiguration) -> Self { + self.notification_configuration = Some(field); +self +} - checksum_algorithm: Option, +#[must_use] +pub fn skip_destination_validation(mut self, field: Option) -> Self { + self.skip_destination_validation = field; +self +} - content_md5: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let notification_configuration = self.notification_configuration.ok_or_else(|| BuildError::missing_field("notification_configuration"))?; +let skip_destination_validation = self.skip_destination_validation; +Ok(PutBucketNotificationConfigurationInput { +bucket, +expected_bucket_owner, +notification_configuration, +skip_destination_validation, +}) +} - expected_bucket_owner: Option, - } +} - impl PutBucketLoggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - pub fn set_bucket_logging_status(&mut self, field: BucketLoggingStatus) -> &mut Self { - self.bucket_logging_status = Some(field); - self - } +/// A builder for [`PutBucketOwnershipControlsInput`] +#[derive(Default)] +pub struct PutBucketOwnershipControlsInputBuilder { +bucket: Option, - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +content_md5: Option, - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +expected_bucket_owner: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +ownership_controls: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn bucket_logging_status(mut self, field: BucketLoggingStatus) -> Self { - self.bucket_logging_status = Some(field); - self - } +impl PutBucketOwnershipControlsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_ownership_controls(&mut self, field: OwnershipControls) -> &mut Self { + self.ownership_controls = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_logging_status = self - .bucket_logging_status - .ok_or_else(|| BuildError::missing_field("bucket_logging_status"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(PutBucketLoggingInput { - bucket, - bucket_logging_status, - checksum_algorithm, - content_md5, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`PutBucketMetricsConfigurationInput`] - #[derive(Default)] - pub struct PutBucketMetricsConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - id: Option, +#[must_use] +pub fn ownership_controls(mut self, field: OwnershipControls) -> Self { + self.ownership_controls = Some(field); +self +} - metrics_configuration: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let ownership_controls = self.ownership_controls.ok_or_else(|| BuildError::missing_field("ownership_controls"))?; +Ok(PutBucketOwnershipControlsInput { +bucket, +content_md5, +expected_bucket_owner, +ownership_controls, +}) +} - impl PutBucketMetricsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); - self - } +/// A builder for [`PutBucketPolicyInput`] +#[derive(Default)] +pub struct PutBucketPolicyInputBuilder { +bucket: Option, - pub fn set_metrics_configuration(&mut self, field: MetricsConfiguration) -> &mut Self { - self.metrics_configuration = Some(field); - self - } +checksum_algorithm: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +confirm_remove_self_bucket_access: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +content_md5: Option, - #[must_use] - pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn metrics_configuration(mut self, field: MetricsConfiguration) -> Self { - self.metrics_configuration = Some(field); - self - } +policy: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - let metrics_configuration = self - .metrics_configuration - .ok_or_else(|| BuildError::missing_field("metrics_configuration"))?; - Ok(PutBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - metrics_configuration, - }) - } - } +} - /// A builder for [`PutBucketNotificationConfigurationInput`] - #[derive(Default)] - pub struct PutBucketNotificationConfigurationInputBuilder { - bucket: Option, +impl PutBucketPolicyInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - notification_configuration: Option, +pub fn set_confirm_remove_self_bucket_access(&mut self, field: Option) -> &mut Self { + self.confirm_remove_self_bucket_access = field; +self +} - skip_destination_validation: Option, - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - impl PutBucketNotificationConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_policy(&mut self, field: Policy) -> &mut Self { + self.policy = Some(field); +self +} - pub fn set_notification_configuration(&mut self, field: NotificationConfiguration) -> &mut Self { - self.notification_configuration = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_skip_destination_validation(&mut self, field: Option) -> &mut Self { - self.skip_destination_validation = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn confirm_remove_self_bucket_access(mut self, field: Option) -> Self { + self.confirm_remove_self_bucket_access = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn notification_configuration(mut self, field: NotificationConfiguration) -> Self { - self.notification_configuration = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn skip_destination_validation(mut self, field: Option) -> Self { - self.skip_destination_validation = field; - self - } +#[must_use] +pub fn policy(mut self, field: Policy) -> Self { + self.policy = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let notification_configuration = self - .notification_configuration - .ok_or_else(|| BuildError::missing_field("notification_configuration"))?; - let skip_destination_validation = self.skip_destination_validation; - Ok(PutBucketNotificationConfigurationInput { - bucket, - expected_bucket_owner, - notification_configuration, - skip_destination_validation, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let confirm_remove_self_bucket_access = self.confirm_remove_self_bucket_access; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let policy = self.policy.ok_or_else(|| BuildError::missing_field("policy"))?; +Ok(PutBucketPolicyInput { +bucket, +checksum_algorithm, +confirm_remove_self_bucket_access, +content_md5, +expected_bucket_owner, +policy, +}) +} - /// A builder for [`PutBucketOwnershipControlsInput`] - #[derive(Default)] - pub struct PutBucketOwnershipControlsInputBuilder { - bucket: Option, +} - content_md5: Option, - expected_bucket_owner: Option, +/// A builder for [`PutBucketReplicationInput`] +#[derive(Default)] +pub struct PutBucketReplicationInputBuilder { +bucket: Option, - ownership_controls: Option, - } +checksum_algorithm: Option, - impl PutBucketOwnershipControlsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +content_md5: Option, - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +expected_bucket_owner: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +replication_configuration: Option, - pub fn set_ownership_controls(&mut self, field: OwnershipControls) -> &mut Self { - self.ownership_controls = Some(field); - self - } +token: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +impl PutBucketReplicationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn ownership_controls(mut self, field: OwnershipControls) -> Self { - self.ownership_controls = Some(field); - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let ownership_controls = self - .ownership_controls - .ok_or_else(|| BuildError::missing_field("ownership_controls"))?; - Ok(PutBucketOwnershipControlsInput { - bucket, - content_md5, - expected_bucket_owner, - ownership_controls, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`PutBucketPolicyInput`] - #[derive(Default)] - pub struct PutBucketPolicyInputBuilder { - bucket: Option, +pub fn set_replication_configuration(&mut self, field: ReplicationConfiguration) -> &mut Self { + self.replication_configuration = Some(field); +self +} - checksum_algorithm: Option, +pub fn set_token(&mut self, field: Option) -> &mut Self { + self.token = field; +self +} - confirm_remove_self_bucket_access: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - content_md5: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - policy: Option, - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - impl PutBucketPolicyInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn replication_configuration(mut self, field: ReplicationConfiguration) -> Self { + self.replication_configuration = Some(field); +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn token(mut self, field: Option) -> Self { + self.token = field; +self +} - pub fn set_confirm_remove_self_bucket_access(&mut self, field: Option) -> &mut Self { - self.confirm_remove_self_bucket_access = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let replication_configuration = self.replication_configuration.ok_or_else(|| BuildError::missing_field("replication_configuration"))?; +let token = self.token; +Ok(PutBucketReplicationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +replication_configuration, +token, +}) +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - pub fn set_policy(&mut self, field: Policy) -> &mut Self { - self.policy = Some(field); - self - } +/// A builder for [`PutBucketRequestPaymentInput`] +#[derive(Default)] +pub struct PutBucketRequestPaymentInputBuilder { +bucket: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +checksum_algorithm: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +content_md5: Option, - #[must_use] - pub fn confirm_remove_self_bucket_access(mut self, field: Option) -> Self { - self.confirm_remove_self_bucket_access = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +request_payment_configuration: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +} - #[must_use] - pub fn policy(mut self, field: Policy) -> Self { - self.policy = Some(field); - self - } +impl PutBucketRequestPaymentInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let confirm_remove_self_bucket_access = self.confirm_remove_self_bucket_access; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let policy = self.policy.ok_or_else(|| BuildError::missing_field("policy"))?; - Ok(PutBucketPolicyInput { - bucket, - checksum_algorithm, - confirm_remove_self_bucket_access, - content_md5, - expected_bucket_owner, - policy, - }) - } - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - /// A builder for [`PutBucketReplicationInput`] - #[derive(Default)] - pub struct PutBucketReplicationInputBuilder { - bucket: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - checksum_algorithm: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - content_md5: Option, +pub fn set_request_payment_configuration(&mut self, field: RequestPaymentConfiguration) -> &mut Self { + self.request_payment_configuration = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - replication_configuration: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - token: Option, - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - impl PutBucketReplicationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn request_payment_configuration(mut self, field: RequestPaymentConfiguration) -> Self { + self.request_payment_configuration = Some(field); +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let request_payment_configuration = self.request_payment_configuration.ok_or_else(|| BuildError::missing_field("request_payment_configuration"))?; +Ok(PutBucketRequestPaymentInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +request_payment_configuration, +}) +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +} - pub fn set_replication_configuration(&mut self, field: ReplicationConfiguration) -> &mut Self { - self.replication_configuration = Some(field); - self - } - pub fn set_token(&mut self, field: Option) -> &mut Self { - self.token = field; - self - } +/// A builder for [`PutBucketTaggingInput`] +#[derive(Default)] +pub struct PutBucketTaggingInputBuilder { +bucket: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +checksum_algorithm: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +content_md5: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +tagging: Option, - #[must_use] - pub fn replication_configuration(mut self, field: ReplicationConfiguration) -> Self { - self.replication_configuration = Some(field); - self - } +} - #[must_use] - pub fn token(mut self, field: Option) -> Self { - self.token = field; - self - } +impl PutBucketTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let replication_configuration = self - .replication_configuration - .ok_or_else(|| BuildError::missing_field("replication_configuration"))?; - let token = self.token; - Ok(PutBucketReplicationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - replication_configuration, - token, - }) - } - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - /// A builder for [`PutBucketRequestPaymentInput`] - #[derive(Default)] - pub struct PutBucketRequestPaymentInputBuilder { - bucket: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - checksum_algorithm: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - content_md5: Option, +pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { + self.tagging = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - request_payment_configuration: Option, - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - impl PutBucketRequestPaymentInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn tagging(mut self, field: Tagging) -> Self { + self.tagging = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; +Ok(PutBucketTaggingInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +tagging, +}) +} - pub fn set_request_payment_configuration(&mut self, field: RequestPaymentConfiguration) -> &mut Self { - self.request_payment_configuration = Some(field); - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`PutBucketVersioningInput`] +#[derive(Default)] +pub struct PutBucketVersioningInputBuilder { +bucket: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +checksum_algorithm: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +content_md5: Option, - #[must_use] - pub fn request_payment_configuration(mut self, field: RequestPaymentConfiguration) -> Self { - self.request_payment_configuration = Some(field); - self - } +expected_bucket_owner: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let request_payment_configuration = self - .request_payment_configuration - .ok_or_else(|| BuildError::missing_field("request_payment_configuration"))?; - Ok(PutBucketRequestPaymentInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - request_payment_configuration, - }) - } - } +mfa: Option, - /// A builder for [`PutBucketTaggingInput`] - #[derive(Default)] - pub struct PutBucketTaggingInputBuilder { - bucket: Option, +versioning_configuration: Option, - checksum_algorithm: Option, +} - content_md5: Option, +impl PutBucketVersioningInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - tagging: Option, - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - impl PutBucketTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +pub fn set_versioning_configuration(&mut self, field: VersioningConfiguration) -> &mut Self { + self.versioning_configuration = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { - self.tagging = Some(field); - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn versioning_configuration(mut self, field: VersioningConfiguration) -> Self { + self.versioning_configuration = Some(field); +self +} - #[must_use] - pub fn tagging(mut self, field: Tagging) -> Self { - self.tagging = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let mfa = self.mfa; +let versioning_configuration = self.versioning_configuration.ok_or_else(|| BuildError::missing_field("versioning_configuration"))?; +Ok(PutBucketVersioningInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +mfa, +versioning_configuration, +}) +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; - Ok(PutBucketTaggingInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - tagging, - }) - } - } +} - /// A builder for [`PutBucketVersioningInput`] - #[derive(Default)] - pub struct PutBucketVersioningInputBuilder { - bucket: Option, - checksum_algorithm: Option, +/// A builder for [`PutBucketWebsiteInput`] +#[derive(Default)] +pub struct PutBucketWebsiteInputBuilder { +bucket: Option, - content_md5: Option, +checksum_algorithm: Option, - expected_bucket_owner: Option, +content_md5: Option, - mfa: Option, +expected_bucket_owner: Option, - versioning_configuration: Option, - } +website_configuration: Option, - impl PutBucketVersioningInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +impl PutBucketWebsiteInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_versioning_configuration(&mut self, field: VersioningConfiguration) -> &mut Self { - self.versioning_configuration = Some(field); - self - } +pub fn set_website_configuration(&mut self, field: WebsiteConfiguration) -> &mut Self { + self.website_configuration = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; - self - } +#[must_use] +pub fn website_configuration(mut self, field: WebsiteConfiguration) -> Self { + self.website_configuration = Some(field); +self +} - #[must_use] - pub fn versioning_configuration(mut self, field: VersioningConfiguration) -> Self { - self.versioning_configuration = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let website_configuration = self.website_configuration.ok_or_else(|| BuildError::missing_field("website_configuration"))?; +Ok(PutBucketWebsiteInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +website_configuration, +}) +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let mfa = self.mfa; - let versioning_configuration = self - .versioning_configuration - .ok_or_else(|| BuildError::missing_field("versioning_configuration"))?; - Ok(PutBucketVersioningInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - mfa, - versioning_configuration, - }) - } - } +} - /// A builder for [`PutBucketWebsiteInput`] - #[derive(Default)] - pub struct PutBucketWebsiteInputBuilder { - bucket: Option, - checksum_algorithm: Option, +/// A builder for [`PutObjectInput`] +#[derive(Default)] +pub struct PutObjectInputBuilder { +acl: Option, - content_md5: Option, +body: Option, - expected_bucket_owner: Option, +bucket: Option, - website_configuration: Option, - } +bucket_key_enabled: Option, - impl PutBucketWebsiteInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +cache_control: Option, - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +checksum_algorithm: Option, - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +checksum_crc32: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +checksum_crc32c: Option, - pub fn set_website_configuration(&mut self, field: WebsiteConfiguration) -> &mut Self { - self.website_configuration = Some(field); - self - } +checksum_crc64nvme: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +checksum_sha1: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +checksum_sha256: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +content_disposition: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +content_encoding: Option, - #[must_use] - pub fn website_configuration(mut self, field: WebsiteConfiguration) -> Self { - self.website_configuration = Some(field); - self - } +content_language: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let website_configuration = self - .website_configuration - .ok_or_else(|| BuildError::missing_field("website_configuration"))?; - Ok(PutBucketWebsiteInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - website_configuration, - }) - } - } +content_length: Option, - /// A builder for [`PutObjectInput`] - #[derive(Default)] - pub struct PutObjectInputBuilder { - acl: Option, +content_md5: Option, - body: Option, +content_type: Option, - bucket: Option, +expected_bucket_owner: Option, - bucket_key_enabled: Option, +expires: Option, - cache_control: Option, +grant_full_control: Option, - checksum_algorithm: Option, +grant_read: Option, - checksum_crc32: Option, +grant_read_acp: Option, - checksum_crc32c: Option, +grant_write_acp: Option, - checksum_crc64nvme: Option, +if_match: Option, - checksum_sha1: Option, +if_none_match: Option, - checksum_sha256: Option, +key: Option, - content_disposition: Option, +metadata: Option, - content_encoding: Option, +object_lock_legal_hold_status: Option, - content_language: Option, +object_lock_mode: Option, - content_length: Option, +object_lock_retain_until_date: Option, - content_md5: Option, +request_payer: Option, - content_type: Option, +sse_customer_algorithm: Option, - expected_bucket_owner: Option, +sse_customer_key: Option, - expires: Option, +sse_customer_key_md5: Option, - grant_full_control: Option, +ssekms_encryption_context: Option, - grant_read: Option, +ssekms_key_id: Option, - grant_read_acp: Option, +server_side_encryption: Option, - grant_write_acp: Option, +storage_class: Option, - if_match: Option, +tagging: Option, - if_none_match: Option, +version_id: Option, - key: Option, +website_redirect_location: Option, - metadata: Option, +write_offset_bytes: Option, - object_lock_legal_hold_status: Option, +} - object_lock_mode: Option, +impl PutObjectInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self +} - object_lock_retain_until_date: Option, +pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; +self +} - request_payer: Option, +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - sse_customer_algorithm: Option, +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} - sse_customer_key: Option, +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self +} - sse_customer_key_md5: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - ssekms_encryption_context: Option, +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self +} - ssekms_key_id: Option, +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} - server_side_encryption: Option, +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} - storage_class: Option, +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} - tagging: Option, +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} - version_id: Option, +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self +} - website_redirect_location: Option, +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self +} - write_offset_bytes: Option, - } +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self +} - impl PutObjectInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } +pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; +self +} - pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self +} - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self +} - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self +} - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self +} - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self +} - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self +} - pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; - self - } +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self +} - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self +} - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self +} - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } +pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } +pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; +self +} - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } +pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { + self.write_offset_bytes = field; +self +} - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } +#[must_use] +pub fn body(mut self, field: Option) -> Self { + self.body = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self +} - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} - pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; - self - } +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self +} - pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; - self - } +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self +} - pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { - self.write_offset_bytes = field; - self - } +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } +#[must_use] +pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; +self +} - #[must_use] - pub fn body(mut self, field: Option) -> Self { - self.body = field; - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self +} - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self +} - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self +} - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self +} - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self +} - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self +} - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self +} - #[must_use] - pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; - self - } +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} + +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} + +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; +self +} + +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} + +#[must_use] +pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; +self +} + +#[must_use] +pub fn write_offset_bytes(mut self, field: Option) -> Self { + self.write_offset_bytes = field; +self +} + +pub fn build(self) -> Result { +let acl = self.acl; +let body = self.body; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_algorithm = self.checksum_algorithm; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_length = self.content_length; +let content_md5 = self.content_md5; +let content_type = self.content_type; +let expected_bucket_owner = self.expected_bucket_owner; +let expires = self.expires; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write_acp = self.grant_write_acp; +let if_match = self.if_match; +let if_none_match = self.if_none_match; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let metadata = self.metadata; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let storage_class = self.storage_class; +let tagging = self.tagging; +let version_id = self.version_id; +let website_redirect_location = self.website_redirect_location; +let write_offset_bytes = self.write_offset_bytes; +Ok(PutObjectInput { +acl, +body, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_md5, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +if_match, +if_none_match, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +version_id, +website_redirect_location, +write_offset_bytes, +}) +} + +} + + +/// A builder for [`PutObjectAclInput`] +#[derive(Default)] +pub struct PutObjectAclInputBuilder { +acl: Option, - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } +access_control_policy: Option, - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } +bucket: Option, - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } +checksum_algorithm: Option, - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } +content_md5: Option, - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } +grant_full_control: Option, - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } +grant_read: Option, - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } +grant_read_acp: Option, - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } +grant_write: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +grant_write_acp: Option, - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +key: Option, - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +request_payer: Option, - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +version_id: Option, - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } +} - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } +impl PutObjectAclInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self +} - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } +pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { + self.access_control_policy = field; +self +} - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn write_offset_bytes(mut self, field: Option) -> Self { - self.write_offset_bytes = field; - self - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self +} - pub fn build(self) -> Result { - let acl = self.acl; - let body = self.body; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_algorithm = self.checksum_algorithm; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_length = self.content_length; - let content_md5 = self.content_md5; - let content_type = self.content_type; - let expected_bucket_owner = self.expected_bucket_owner; - let expires = self.expires; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write_acp = self.grant_write_acp; - let if_match = self.if_match; - let if_none_match = self.if_none_match; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let metadata = self.metadata; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let storage_class = self.storage_class; - let tagging = self.tagging; - let version_id = self.version_id; - let website_redirect_location = self.website_redirect_location; - let write_offset_bytes = self.write_offset_bytes; - Ok(PutObjectInput { - acl, - body, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_md5, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - if_match, - if_none_match, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - version_id, - website_redirect_location, - write_offset_bytes, - }) - } - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self +} - /// A builder for [`PutObjectAclInput`] - #[derive(Default)] - pub struct PutObjectAclInputBuilder { - acl: Option, +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} - access_control_policy: Option, +pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; +self +} - bucket: Option, +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - checksum_algorithm: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - content_md5: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - expected_bucket_owner: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - grant_full_control: Option, +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - grant_read: Option, +#[must_use] +pub fn access_control_policy(mut self, field: Option) -> Self { + self.access_control_policy = field; +self +} - grant_read_acp: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - grant_write: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - grant_write_acp: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - key: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - request_payer: Option, +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} - version_id: Option, - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self +} - impl PutObjectAclInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} - pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { - self.access_control_policy = field; - self - } +#[must_use] +pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; +self +} - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } +pub fn build(self) -> Result { +let acl = self.acl; +let access_control_policy = self.access_control_policy; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write = self.grant_write; +let grant_write_acp = self.grant_write_acp; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(PutObjectAclInput { +acl, +access_control_policy, +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +key, +request_payer, +version_id, +}) +} - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } +} - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; - self - } +/// A builder for [`PutObjectLegalHoldInput`] +#[derive(Default)] +pub struct PutObjectLegalHoldInputBuilder { +bucket: Option, - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } +checksum_algorithm: Option, - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +content_md5: Option, - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +expected_bucket_owner: Option, - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +key: Option, - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } +legal_hold: Option, - #[must_use] - pub fn access_control_policy(mut self, field: Option) -> Self { - self.access_control_policy = field; - self - } +request_payer: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +version_id: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +impl PutObjectLegalHoldInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - #[must_use] - pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; - self - } +pub fn set_legal_hold(&mut self, field: Option) -> &mut Self { + self.legal_hold = field; +self +} - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - pub fn build(self) -> Result { - let acl = self.acl; - let access_control_policy = self.access_control_policy; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write = self.grant_write; - let grant_write_acp = self.grant_write_acp; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(PutObjectAclInput { - acl, - access_control_policy, - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - key, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - /// A builder for [`PutObjectLegalHoldInput`] - #[derive(Default)] - pub struct PutObjectLegalHoldInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - content_md5: Option, +#[must_use] +pub fn legal_hold(mut self, field: Option) -> Self { + self.legal_hold = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - key: Option, +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - legal_hold: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let legal_hold = self.legal_hold; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(PutObjectLegalHoldInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +legal_hold, +request_payer, +version_id, +}) +} - request_payer: Option, +} - version_id: Option, - } - impl PutObjectLegalHoldInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +/// A builder for [`PutObjectLockConfigurationInput`] +#[derive(Default)] +pub struct PutObjectLockConfigurationInputBuilder { +bucket: Option, - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +checksum_algorithm: Option, - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +content_md5: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +object_lock_configuration: Option, - pub fn set_legal_hold(&mut self, field: Option) -> &mut Self { - self.legal_hold = field; - self - } +request_payer: Option, - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +token: Option, - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +impl PutObjectLockConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +pub fn set_object_lock_configuration(&mut self, field: Option) -> &mut Self { + self.object_lock_configuration = field; +self +} - #[must_use] - pub fn legal_hold(mut self, field: Option) -> Self { - self.legal_hold = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +pub fn set_token(&mut self, field: Option) -> &mut Self { + self.token = field; +self +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let legal_hold = self.legal_hold; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(PutObjectLegalHoldInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - legal_hold, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - /// A builder for [`PutObjectLockConfigurationInput`] - #[derive(Default)] - pub struct PutObjectLockConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - content_md5: Option, +#[must_use] +pub fn object_lock_configuration(mut self, field: Option) -> Self { + self.object_lock_configuration = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - object_lock_configuration: Option, +#[must_use] +pub fn token(mut self, field: Option) -> Self { + self.token = field; +self +} - request_payer: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let object_lock_configuration = self.object_lock_configuration; +let request_payer = self.request_payer; +let token = self.token; +Ok(PutObjectLockConfigurationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +object_lock_configuration, +request_payer, +token, +}) +} - token: Option, - } +} - impl PutObjectLockConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`PutObjectRetentionInput`] +#[derive(Default)] +pub struct PutObjectRetentionInputBuilder { +bucket: Option, - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +bypass_governance_retention: Option, - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +checksum_algorithm: Option, - pub fn set_object_lock_configuration(&mut self, field: Option) -> &mut Self { - self.object_lock_configuration = field; - self - } +content_md5: Option, - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +expected_bucket_owner: Option, - pub fn set_token(&mut self, field: Option) -> &mut Self { - self.token = field; - self - } +key: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +request_payer: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +retention: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +version_id: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +} - #[must_use] - pub fn object_lock_configuration(mut self, field: Option) -> Self { - self.object_lock_configuration = field; - self - } +impl PutObjectRetentionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; +self +} - #[must_use] - pub fn token(mut self, field: Option) -> Self { - self.token = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let object_lock_configuration = self.object_lock_configuration; - let request_payer = self.request_payer; - let token = self.token; - Ok(PutObjectLockConfigurationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - object_lock_configuration, - request_payer, - token, - }) - } - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - /// A builder for [`PutObjectRetentionInput`] - #[derive(Default)] - pub struct PutObjectRetentionInputBuilder { - bucket: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - bypass_governance_retention: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - checksum_algorithm: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - content_md5: Option, +pub fn set_retention(&mut self, field: Option) -> &mut Self { + self.retention = field; +self +} - expected_bucket_owner: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - key: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - request_payer: Option, +#[must_use] +pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; +self +} - retention: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - version_id: Option, - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - impl PutObjectRetentionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn retention(mut self, field: Option) -> Self { + self.retention = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bypass_governance_retention = self.bypass_governance_retention; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let retention = self.retention; +let version_id = self.version_id; +Ok(PutObjectRetentionInput { +bucket, +bypass_governance_retention, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +request_payer, +retention, +version_id, +}) +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +} - pub fn set_retention(&mut self, field: Option) -> &mut Self { - self.retention = field; - self - } - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +/// A builder for [`PutObjectTaggingInput`] +#[derive(Default)] +pub struct PutObjectTaggingInputBuilder { +bucket: Option, - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +checksum_algorithm: Option, - #[must_use] - pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; - self - } +content_md5: Option, - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +key: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +request_payer: Option, - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +tagging: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +version_id: Option, - #[must_use] - pub fn retention(mut self, field: Option) -> Self { - self.retention = field; - self - } +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +impl PutObjectTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bypass_governance_retention = self.bypass_governance_retention; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let retention = self.retention; - let version_id = self.version_id; - Ok(PutObjectRetentionInput { - bucket, - bypass_governance_retention, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - request_payer, - retention, - version_id, - }) - } - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - /// A builder for [`PutObjectTaggingInput`] - #[derive(Default)] - pub struct PutObjectTaggingInputBuilder { - bucket: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - checksum_algorithm: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - content_md5: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - expected_bucket_owner: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - key: Option, +pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { + self.tagging = Some(field); +self +} - request_payer: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - tagging: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - version_id: Option, - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - impl PutObjectTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +#[must_use] +pub fn tagging(mut self, field: Tagging) -> Self { + self.tagging = Some(field); +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { - self.tagging = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; +let version_id = self.version_id; +Ok(PutObjectTaggingInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +request_payer, +tagging, +version_id, +}) +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`PutPublicAccessBlockInput`] +#[derive(Default)] +pub struct PutPublicAccessBlockInputBuilder { +bucket: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +checksum_algorithm: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +content_md5: Option, - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +public_access_block_configuration: Option, - #[must_use] - pub fn tagging(mut self, field: Tagging) -> Self { - self.tagging = Some(field); - self - } +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +impl PutPublicAccessBlockInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; - let version_id = self.version_id; - Ok(PutObjectTaggingInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - request_payer, - tagging, - version_id, - }) - } - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - /// A builder for [`PutPublicAccessBlockInput`] - #[derive(Default)] - pub struct PutPublicAccessBlockInputBuilder { - bucket: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - checksum_algorithm: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - content_md5: Option, +pub fn set_public_access_block_configuration(&mut self, field: PublicAccessBlockConfiguration) -> &mut Self { + self.public_access_block_configuration = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - public_access_block_configuration: Option, - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - impl PutPublicAccessBlockInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn public_access_block_configuration(mut self, field: PublicAccessBlockConfiguration) -> Self { + self.public_access_block_configuration = Some(field); +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let public_access_block_configuration = self.public_access_block_configuration.ok_or_else(|| BuildError::missing_field("public_access_block_configuration"))?; +Ok(PutPublicAccessBlockInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +public_access_block_configuration, +}) +} - pub fn set_public_access_block_configuration(&mut self, field: PublicAccessBlockConfiguration) -> &mut Self { - self.public_access_block_configuration = Some(field); - self - } +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +/// A builder for [`RestoreObjectInput`] +#[derive(Default)] +pub struct RestoreObjectInputBuilder { +bucket: Option, - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +checksum_algorithm: Option, - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +expected_bucket_owner: Option, - #[must_use] - pub fn public_access_block_configuration(mut self, field: PublicAccessBlockConfiguration) -> Self { - self.public_access_block_configuration = Some(field); - self - } +key: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let public_access_block_configuration = self - .public_access_block_configuration - .ok_or_else(|| BuildError::missing_field("public_access_block_configuration"))?; - Ok(PutPublicAccessBlockInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - public_access_block_configuration, - }) - } - } +request_payer: Option, - /// A builder for [`RestoreObjectInput`] - #[derive(Default)] - pub struct RestoreObjectInputBuilder { - bucket: Option, +restore_request: Option, - checksum_algorithm: Option, +version_id: Option, - expected_bucket_owner: Option, +} - key: Option, +impl RestoreObjectInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - request_payer: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - restore_request: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - version_id: Option, - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - impl RestoreObjectInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +pub fn set_restore_request(&mut self, field: Option) -> &mut Self { + self.restore_request = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - pub fn set_restore_request(&mut self, field: Option) -> &mut Self { - self.restore_request = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn restore_request(mut self, field: Option) -> Self { + self.restore_request = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let restore_request = self.restore_request; +let version_id = self.version_id; +Ok(RestoreObjectInput { +bucket, +checksum_algorithm, +expected_bucket_owner, +key, +request_payer, +restore_request, +version_id, +}) +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +} - #[must_use] - pub fn restore_request(mut self, field: Option) -> Self { - self.restore_request = field; - self - } - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } +/// A builder for [`SelectObjectContentInput`] +#[derive(Default)] +pub struct SelectObjectContentInputBuilder { +bucket: Option, - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let restore_request = self.restore_request; - let version_id = self.version_id; - Ok(RestoreObjectInput { - bucket, - checksum_algorithm, - expected_bucket_owner, - key, - request_payer, - restore_request, - version_id, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`SelectObjectContentInput`] - #[derive(Default)] - pub struct SelectObjectContentInputBuilder { - bucket: Option, +key: Option, - expected_bucket_owner: Option, +sse_customer_algorithm: Option, - key: Option, +sse_customer_key: Option, - sse_customer_algorithm: Option, +sse_customer_key_md5: Option, - sse_customer_key: Option, +request: Option, - sse_customer_key_md5: Option, +} - request: Option, - } +impl SelectObjectContentInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - impl SelectObjectContentInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_request(&mut self, field: SelectObjectContentRequest) -> &mut Self { + self.request = Some(field); +self +} - pub fn set_request(&mut self, field: SelectObjectContentRequest) -> &mut Self { - self.request = Some(field); - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn request(mut self, field: SelectObjectContentRequest) -> Self { + self.request = Some(field); +self +} - #[must_use] - pub fn request(mut self, field: SelectObjectContentRequest) -> Self { - self.request = Some(field); - self - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let request = self.request.ok_or_else(|| BuildError::missing_field("request"))?; +Ok(SelectObjectContentInput { +bucket, +expected_bucket_owner, +key, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +request, +}) +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let request = self.request.ok_or_else(|| BuildError::missing_field("request"))?; - Ok(SelectObjectContentInput { - bucket, - expected_bucket_owner, - key, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - request, - }) - } - } +} - /// A builder for [`UploadPartInput`] - #[derive(Default)] - pub struct UploadPartInputBuilder { - body: Option, - bucket: Option, +/// A builder for [`UploadPartInput`] +#[derive(Default)] +pub struct UploadPartInputBuilder { +body: Option, - checksum_algorithm: Option, +bucket: Option, - checksum_crc32: Option, +checksum_algorithm: Option, - checksum_crc32c: Option, +checksum_crc32: Option, - checksum_crc64nvme: Option, +checksum_crc32c: Option, - checksum_sha1: Option, +checksum_crc64nvme: Option, - checksum_sha256: Option, +checksum_sha1: Option, - content_length: Option, +checksum_sha256: Option, - content_md5: Option, +content_length: Option, - expected_bucket_owner: Option, +content_md5: Option, - key: Option, +expected_bucket_owner: Option, - part_number: Option, +key: Option, - request_payer: Option, +part_number: Option, - sse_customer_algorithm: Option, +request_payer: Option, - sse_customer_key: Option, +sse_customer_algorithm: Option, - sse_customer_key_md5: Option, +sse_customer_key: Option, - upload_id: Option, - } +sse_customer_key_md5: Option, - impl UploadPartInputBuilder { - pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; - self - } +upload_id: Option, - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +} - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } +impl UploadPartInputBuilder { +pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; +self +} - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self +} - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} - pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; - self - } +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { - self.part_number = Some(field); - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { + self.part_number = Some(field); +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn body(mut self, field: Option) -> Self { - self.body = field; - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self +} - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } +#[must_use] +pub fn body(mut self, field: Option) -> Self { + self.body = field; +self +} - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self +} - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} - #[must_use] - pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; - self - } +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn part_number(mut self, field: PartNumber) -> Self { - self.part_number = Some(field); - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn part_number(mut self, field: PartNumber) -> Self { + self.part_number = Some(field); +self +} - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - pub fn build(self) -> Result { - let body = self.body; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let content_length = self.content_length; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(UploadPartInput { - body, - bucket, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_length, - content_md5, - expected_bucket_owner, - key, - part_number, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - /// A builder for [`UploadPartCopyInput`] - #[derive(Default)] - pub struct UploadPartCopyInputBuilder { - bucket: Option, +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self +} - copy_source: Option, +pub fn build(self) -> Result { +let body = self.body; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let content_length = self.content_length; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(UploadPartInput { +body, +bucket, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_length, +content_md5, +expected_bucket_owner, +key, +part_number, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + +} - copy_source_if_match: Option, - copy_source_if_modified_since: Option, +/// A builder for [`UploadPartCopyInput`] +#[derive(Default)] +pub struct UploadPartCopyInputBuilder { +bucket: Option, - copy_source_if_none_match: Option, +copy_source: Option, - copy_source_if_unmodified_since: Option, +copy_source_if_match: Option, - copy_source_range: Option, +copy_source_if_modified_since: Option, - copy_source_sse_customer_algorithm: Option, +copy_source_if_none_match: Option, - copy_source_sse_customer_key: Option, +copy_source_if_unmodified_since: Option, - copy_source_sse_customer_key_md5: Option, +copy_source_range: Option, - expected_bucket_owner: Option, +copy_source_sse_customer_algorithm: Option, - expected_source_bucket_owner: Option, +copy_source_sse_customer_key: Option, - key: Option, +copy_source_sse_customer_key_md5: Option, - part_number: Option, +expected_bucket_owner: Option, - request_payer: Option, +expected_source_bucket_owner: Option, - sse_customer_algorithm: Option, +key: Option, - sse_customer_key: Option, +part_number: Option, - sse_customer_key_md5: Option, +request_payer: Option, - upload_id: Option, - } +sse_customer_algorithm: Option, - impl UploadPartCopyInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } +sse_customer_key: Option, - pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { - self.copy_source = Some(field); - self - } +sse_customer_key_md5: Option, - pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_match = field; - self - } +upload_id: Option, - pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_modified_since = field; - self - } +} - pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_none_match = field; - self - } +impl UploadPartCopyInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_unmodified_since = field; - self - } +pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { + self.copy_source = Some(field); +self +} - pub fn set_copy_source_range(&mut self, field: Option) -> &mut Self { - self.copy_source_range = field; - self - } +pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_match = field; +self +} - pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_algorithm = field; - self - } +pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_modified_since = field; +self +} - pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key = field; - self - } +pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_none_match = field; +self +} - pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key_md5 = field; - self - } +pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_unmodified_since = field; +self +} - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } +pub fn set_copy_source_range(&mut self, field: Option) -> &mut Self { + self.copy_source_range = field; +self +} - pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_source_bucket_owner = field; - self - } +pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_algorithm = field; +self +} - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } +pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key = field; +self +} - pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { - self.part_number = Some(field); - self - } +pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key_md5 = field; +self +} - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_source_bucket_owner = field; +self +} - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { + self.part_number = Some(field); +self +} - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - #[must_use] - pub fn copy_source(mut self, field: CopySource) -> Self { - self.copy_source = Some(field); - self - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn copy_source_if_match(mut self, field: Option) -> Self { - self.copy_source_if_match = field; - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { - self.copy_source_if_modified_since = field; - self - } +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self +} - #[must_use] - pub fn copy_source_if_none_match(mut self, field: Option) -> Self { - self.copy_source_if_none_match = field; - self - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { - self.copy_source_if_unmodified_since = field; - self - } +#[must_use] +pub fn copy_source(mut self, field: CopySource) -> Self { + self.copy_source = Some(field); +self +} - #[must_use] - pub fn copy_source_range(mut self, field: Option) -> Self { - self.copy_source_range = field; - self - } +#[must_use] +pub fn copy_source_if_match(mut self, field: Option) -> Self { + self.copy_source_if_match = field; +self +} - #[must_use] - pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { - self.copy_source_sse_customer_algorithm = field; - self - } +#[must_use] +pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { + self.copy_source_if_modified_since = field; +self +} - #[must_use] - pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key = field; - self - } +#[must_use] +pub fn copy_source_if_none_match(mut self, field: Option) -> Self { + self.copy_source_if_none_match = field; +self +} - #[must_use] - pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { + self.copy_source_if_unmodified_since = field; +self +} - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } +#[must_use] +pub fn copy_source_range(mut self, field: Option) -> Self { + self.copy_source_range = field; +self +} - #[must_use] - pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { - self.expected_source_bucket_owner = field; - self - } +#[must_use] +pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { + self.copy_source_sse_customer_algorithm = field; +self +} - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } +#[must_use] +pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key = field; +self +} - #[must_use] - pub fn part_number(mut self, field: PartNumber) -> Self { - self.part_number = Some(field); - self - } +#[must_use] +pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { + self.expected_source_bucket_owner = field; +self +} - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn part_number(mut self, field: PartNumber) -> Self { + self.part_number = Some(field); +self +} - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; - let copy_source_if_match = self.copy_source_if_match; - let copy_source_if_modified_since = self.copy_source_if_modified_since; - let copy_source_if_none_match = self.copy_source_if_none_match; - let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; - let copy_source_range = self.copy_source_range; - let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; - let copy_source_sse_customer_key = self.copy_source_sse_customer_key; - let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let expected_source_bucket_owner = self.expected_source_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(UploadPartCopyInput { - bucket, - copy_source, - copy_source_if_match, - copy_source_if_modified_since, - copy_source_if_none_match, - copy_source_if_unmodified_since, - copy_source_range, - copy_source_sse_customer_algorithm, - copy_source_sse_customer_key, - copy_source_sse_customer_key_md5, - expected_bucket_owner, - expected_source_bucket_owner, - key, - part_number, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - /// A builder for [`WriteGetObjectResponseInput`] - #[derive(Default)] - pub struct WriteGetObjectResponseInputBuilder { - accept_ranges: Option, +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - body: Option, +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - bucket_key_enabled: Option, +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self +} - cache_control: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; +let copy_source_if_match = self.copy_source_if_match; +let copy_source_if_modified_since = self.copy_source_if_modified_since; +let copy_source_if_none_match = self.copy_source_if_none_match; +let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; +let copy_source_range = self.copy_source_range; +let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; +let copy_source_sse_customer_key = self.copy_source_sse_customer_key; +let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let expected_source_bucket_owner = self.expected_source_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(UploadPartCopyInput { +bucket, +copy_source, +copy_source_if_match, +copy_source_if_modified_since, +copy_source_if_none_match, +copy_source_if_unmodified_since, +copy_source_range, +copy_source_sse_customer_algorithm, +copy_source_sse_customer_key, +copy_source_sse_customer_key_md5, +expected_bucket_owner, +expected_source_bucket_owner, +key, +part_number, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + +} - checksum_crc32: Option, - checksum_crc32c: Option, +/// A builder for [`WriteGetObjectResponseInput`] +#[derive(Default)] +pub struct WriteGetObjectResponseInputBuilder { +accept_ranges: Option, + +body: Option, - checksum_crc64nvme: Option, +bucket_key_enabled: Option, - checksum_sha1: Option, +cache_control: Option, - checksum_sha256: Option, +checksum_crc32: Option, - content_disposition: Option, +checksum_crc32c: Option, - content_encoding: Option, +checksum_crc64nvme: Option, - content_language: Option, +checksum_sha1: Option, - content_length: Option, +checksum_sha256: Option, - content_range: Option, +content_disposition: Option, - content_type: Option, +content_encoding: Option, - delete_marker: Option, +content_language: Option, - e_tag: Option, +content_length: Option, - error_code: Option, +content_range: Option, - error_message: Option, +content_type: Option, - expiration: Option, +delete_marker: Option, - expires: Option, +e_tag: Option, - last_modified: Option, +error_code: Option, - metadata: Option, +error_message: Option, - missing_meta: Option, +expiration: Option, - object_lock_legal_hold_status: Option, +expires: Option, - object_lock_mode: Option, +last_modified: Option, - object_lock_retain_until_date: Option, +metadata: Option, - parts_count: Option, +missing_meta: Option, - replication_status: Option, +object_lock_legal_hold_status: Option, - request_charged: Option, +object_lock_mode: Option, - request_route: Option, +object_lock_retain_until_date: Option, - request_token: Option, +parts_count: Option, - restore: Option, +replication_status: Option, - sse_customer_algorithm: Option, +request_charged: Option, - sse_customer_key_md5: Option, +request_route: Option, - ssekms_key_id: Option, +request_token: Option, - server_side_encryption: Option, +restore: Option, - status_code: Option, +sse_customer_algorithm: Option, - storage_class: Option, +sse_customer_key_md5: Option, - tag_count: Option, +ssekms_key_id: Option, - version_id: Option, - } +server_side_encryption: Option, - impl WriteGetObjectResponseInputBuilder { - pub fn set_accept_ranges(&mut self, field: Option) -> &mut Self { - self.accept_ranges = field; - self - } +status_code: Option, - pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; - self - } +storage_class: Option, - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } +tag_count: Option, - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } +version_id: Option, - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } +} - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } +impl WriteGetObjectResponseInputBuilder { +pub fn set_accept_ranges(&mut self, field: Option) -> &mut Self { + self.accept_ranges = field; +self +} - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } +pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; +self +} - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self +} - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self +} - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} - pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; - self - } +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} - pub fn set_content_range(&mut self, field: Option) -> &mut Self { - self.content_range = field; - self - } +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self +} - pub fn set_delete_marker(&mut self, field: Option) -> &mut Self { - self.delete_marker = field; - self - } +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self +} - pub fn set_e_tag(&mut self, field: Option) -> &mut Self { - self.e_tag = field; - self - } +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self +} - pub fn set_error_code(&mut self, field: Option) -> &mut Self { - self.error_code = field; - self - } +pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; +self +} - pub fn set_error_message(&mut self, field: Option) -> &mut Self { - self.error_message = field; - self - } +pub fn set_content_range(&mut self, field: Option) -> &mut Self { + self.content_range = field; +self +} - pub fn set_expiration(&mut self, field: Option) -> &mut Self { - self.expiration = field; - self - } +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self +} - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } +pub fn set_delete_marker(&mut self, field: Option) -> &mut Self { + self.delete_marker = field; +self +} - pub fn set_last_modified(&mut self, field: Option) -> &mut Self { - self.last_modified = field; - self - } +pub fn set_e_tag(&mut self, field: Option) -> &mut Self { + self.e_tag = field; +self +} - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } +pub fn set_error_code(&mut self, field: Option) -> &mut Self { + self.error_code = field; +self +} - pub fn set_missing_meta(&mut self, field: Option) -> &mut Self { - self.missing_meta = field; - self - } +pub fn set_error_message(&mut self, field: Option) -> &mut Self { + self.error_message = field; +self +} - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } +pub fn set_expiration(&mut self, field: Option) -> &mut Self { + self.expiration = field; +self +} - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self +} - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } +pub fn set_last_modified(&mut self, field: Option) -> &mut Self { + self.last_modified = field; +self +} - pub fn set_parts_count(&mut self, field: Option) -> &mut Self { - self.parts_count = field; - self - } +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self +} - pub fn set_replication_status(&mut self, field: Option) -> &mut Self { - self.replication_status = field; - self - } +pub fn set_missing_meta(&mut self, field: Option) -> &mut Self { + self.missing_meta = field; +self +} - pub fn set_request_charged(&mut self, field: Option) -> &mut Self { - self.request_charged = field; - self - } +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self +} - pub fn set_request_route(&mut self, field: RequestRoute) -> &mut Self { - self.request_route = Some(field); - self - } +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self +} - pub fn set_request_token(&mut self, field: RequestToken) -> &mut Self { - self.request_token = Some(field); - self - } +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self +} - pub fn set_restore(&mut self, field: Option) -> &mut Self { - self.restore = field; - self - } +pub fn set_parts_count(&mut self, field: Option) -> &mut Self { + self.parts_count = field; +self +} - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } +pub fn set_replication_status(&mut self, field: Option) -> &mut Self { + self.replication_status = field; +self +} - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } +pub fn set_request_charged(&mut self, field: Option) -> &mut Self { + self.request_charged = field; +self +} - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } +pub fn set_request_route(&mut self, field: RequestRoute) -> &mut Self { + self.request_route = Some(field); +self +} - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } +pub fn set_request_token(&mut self, field: RequestToken) -> &mut Self { + self.request_token = Some(field); +self +} - pub fn set_status_code(&mut self, field: Option) -> &mut Self { - self.status_code = field; - self - } +pub fn set_restore(&mut self, field: Option) -> &mut Self { + self.restore = field; +self +} - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - pub fn set_tag_count(&mut self, field: Option) -> &mut Self { - self.tag_count = field; - self - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} - #[must_use] - pub fn accept_ranges(mut self, field: Option) -> Self { - self.accept_ranges = field; - self - } +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} - #[must_use] - pub fn body(mut self, field: Option) -> Self { - self.body = field; - self - } +pub fn set_status_code(&mut self, field: Option) -> &mut Self { + self.status_code = field; +self +} - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self +} - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } +pub fn set_tag_count(&mut self, field: Option) -> &mut Self { + self.tag_count = field; +self +} - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } +#[must_use] +pub fn accept_ranges(mut self, field: Option) -> Self { + self.accept_ranges = field; +self +} - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } +#[must_use] +pub fn body(mut self, field: Option) -> Self { + self.body = field; +self +} - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self +} - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self +} - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self +} - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} - #[must_use] - pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; - self - } +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} - #[must_use] - pub fn content_range(mut self, field: Option) -> Self { - self.content_range = field; - self - } +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self +} - #[must_use] - pub fn delete_marker(mut self, field: Option) -> Self { - self.delete_marker = field; - self - } +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self +} - #[must_use] - pub fn e_tag(mut self, field: Option) -> Self { - self.e_tag = field; - self - } +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} - #[must_use] - pub fn error_code(mut self, field: Option) -> Self { - self.error_code = field; - self - } +#[must_use] +pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; +self +} - #[must_use] - pub fn error_message(mut self, field: Option) -> Self { - self.error_message = field; - self - } +#[must_use] +pub fn content_range(mut self, field: Option) -> Self { + self.content_range = field; +self +} - #[must_use] - pub fn expiration(mut self, field: Option) -> Self { - self.expiration = field; - self - } +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self +} - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } +#[must_use] +pub fn delete_marker(mut self, field: Option) -> Self { + self.delete_marker = field; +self +} - #[must_use] - pub fn last_modified(mut self, field: Option) -> Self { - self.last_modified = field; - self - } +#[must_use] +pub fn e_tag(mut self, field: Option) -> Self { + self.e_tag = field; +self +} - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } +#[must_use] +pub fn error_code(mut self, field: Option) -> Self { + self.error_code = field; +self +} - #[must_use] - pub fn missing_meta(mut self, field: Option) -> Self { - self.missing_meta = field; - self - } +#[must_use] +pub fn error_message(mut self, field: Option) -> Self { + self.error_message = field; +self +} - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } +#[must_use] +pub fn expiration(mut self, field: Option) -> Self { + self.expiration = field; +self +} - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } +#[must_use] +pub fn last_modified(mut self, field: Option) -> Self { + self.last_modified = field; +self +} - #[must_use] - pub fn parts_count(mut self, field: Option) -> Self { - self.parts_count = field; - self - } +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self +} - #[must_use] - pub fn replication_status(mut self, field: Option) -> Self { - self.replication_status = field; - self - } +#[must_use] +pub fn missing_meta(mut self, field: Option) -> Self { + self.missing_meta = field; +self +} - #[must_use] - pub fn request_charged(mut self, field: Option) -> Self { - self.request_charged = field; - self - } +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self +} - #[must_use] - pub fn request_route(mut self, field: RequestRoute) -> Self { - self.request_route = Some(field); - self - } +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self +} - #[must_use] - pub fn request_token(mut self, field: RequestToken) -> Self { - self.request_token = Some(field); - self - } +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} - #[must_use] - pub fn restore(mut self, field: Option) -> Self { - self.restore = field; - self - } +#[must_use] +pub fn parts_count(mut self, field: Option) -> Self { + self.parts_count = field; +self +} - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } +#[must_use] +pub fn replication_status(mut self, field: Option) -> Self { + self.replication_status = field; +self +} - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } +#[must_use] +pub fn request_charged(mut self, field: Option) -> Self { + self.request_charged = field; +self +} - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } +#[must_use] +pub fn request_route(mut self, field: RequestRoute) -> Self { + self.request_route = Some(field); +self +} - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } +#[must_use] +pub fn request_token(mut self, field: RequestToken) -> Self { + self.request_token = Some(field); +self +} - #[must_use] - pub fn status_code(mut self, field: Option) -> Self { - self.status_code = field; - self - } +#[must_use] +pub fn restore(mut self, field: Option) -> Self { + self.restore = field; +self +} - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} + +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} + +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} + +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn status_code(mut self, field: Option) -> Self { + self.status_code = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tag_count(mut self, field: Option) -> Self { + self.tag_count = field; +self +} + +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} + +pub fn build(self) -> Result { +let accept_ranges = self.accept_ranges; +let body = self.body; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_length = self.content_length; +let content_range = self.content_range; +let content_type = self.content_type; +let delete_marker = self.delete_marker; +let e_tag = self.e_tag; +let error_code = self.error_code; +let error_message = self.error_message; +let expiration = self.expiration; +let expires = self.expires; +let last_modified = self.last_modified; +let metadata = self.metadata; +let missing_meta = self.missing_meta; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let parts_count = self.parts_count; +let replication_status = self.replication_status; +let request_charged = self.request_charged; +let request_route = self.request_route.ok_or_else(|| BuildError::missing_field("request_route"))?; +let request_token = self.request_token.ok_or_else(|| BuildError::missing_field("request_token"))?; +let restore = self.restore; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let status_code = self.status_code; +let storage_class = self.storage_class; +let tag_count = self.tag_count; +let version_id = self.version_id; +Ok(WriteGetObjectResponseInput { +accept_ranges, +body, +bucket_key_enabled, +cache_control, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_range, +content_type, +delete_marker, +e_tag, +error_code, +error_message, +expiration, +expires, +last_modified, +metadata, +missing_meta, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +parts_count, +replication_status, +request_charged, +request_route, +request_token, +restore, +sse_customer_algorithm, +sse_customer_key_md5, +ssekms_key_id, +server_side_encryption, +status_code, +storage_class, +tag_count, +version_id, +}) +} - #[must_use] - pub fn tag_count(mut self, field: Option) -> Self { - self.tag_count = field; - self - } +} - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - pub fn build(self) -> Result { - let accept_ranges = self.accept_ranges; - let body = self.body; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_length = self.content_length; - let content_range = self.content_range; - let content_type = self.content_type; - let delete_marker = self.delete_marker; - let e_tag = self.e_tag; - let error_code = self.error_code; - let error_message = self.error_message; - let expiration = self.expiration; - let expires = self.expires; - let last_modified = self.last_modified; - let metadata = self.metadata; - let missing_meta = self.missing_meta; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let parts_count = self.parts_count; - let replication_status = self.replication_status; - let request_charged = self.request_charged; - let request_route = self.request_route.ok_or_else(|| BuildError::missing_field("request_route"))?; - let request_token = self.request_token.ok_or_else(|| BuildError::missing_field("request_token"))?; - let restore = self.restore; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let status_code = self.status_code; - let storage_class = self.storage_class; - let tag_count = self.tag_count; - let version_id = self.version_id; - Ok(WriteGetObjectResponseInput { - accept_ranges, - body, - bucket_key_enabled, - cache_control, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_range, - content_type, - delete_marker, - e_tag, - error_code, - error_message, - expiration, - expires, - last_modified, - metadata, - missing_meta, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - parts_count, - replication_status, - request_charged, - request_route, - request_token, - restore, - sse_customer_algorithm, - sse_customer_key_md5, - ssekms_key_id, - server_side_encryption, - status_code, - storage_class, - tag_count, - version_id, - }) - } - } } -pub trait DtoExt { - /// Modifies all empty string fields from `Some("")` to `None` - fn ignore_empty_strings(&mut self); +pub trait DtoExt { + /// Modifies all empty string fields from `Some("")` to `None` + fn ignore_empty_strings(&mut self); +} +impl DtoExt for AbortIncompleteMultipartUpload { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for AbortMultipartUploadInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} +} +impl DtoExt for AbortMultipartUploadOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} +} +impl DtoExt for AccelerateConfiguration { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} +} +impl DtoExt for AccessControlPolicy { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for AccessControlTranslation { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for AnalyticsAndOperator { + fn ignore_empty_strings(&mut self) { +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for AnalyticsConfiguration { + fn ignore_empty_strings(&mut self) { +self.storage_class_analysis.ignore_empty_strings(); +} +} +impl DtoExt for AnalyticsExportDestination { + fn ignore_empty_strings(&mut self) { +self.s3_bucket_destination.ignore_empty_strings(); +} +} +impl DtoExt for AnalyticsS3BucketDestination { + fn ignore_empty_strings(&mut self) { +if self.bucket_account_id.as_deref() == Some("") { + self.bucket_account_id = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for AssumeRoleOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.assumed_role_user { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.credentials { +val.ignore_empty_strings(); +} +if self.source_identity.as_deref() == Some("") { + self.source_identity = None; +} +} +} +impl DtoExt for AssumedRoleUser { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for Bucket { + fn ignore_empty_strings(&mut self) { +if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; +} +if self.name.as_deref() == Some("") { + self.name = None; +} +} +} +impl DtoExt for BucketInfo { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.data_redundancy + && val.as_str() == "" { + self.data_redundancy = None; +} +if let Some(ref val) = self.type_ + && val.as_str() == "" { + self.type_ = None; +} +} +} +impl DtoExt for BucketLifecycleConfiguration { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for BucketLoggingStatus { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.logging_enabled { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for CORSConfiguration { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for CORSRule { + fn ignore_empty_strings(&mut self) { +if self.id.as_deref() == Some("") { + self.id = None; +} +} +} +impl DtoExt for CSVInput { + fn ignore_empty_strings(&mut self) { +if self.comments.as_deref() == Some("") { + self.comments = None; +} +if self.field_delimiter.as_deref() == Some("") { + self.field_delimiter = None; +} +if let Some(ref val) = self.file_header_info + && val.as_str() == "" { + self.file_header_info = None; +} +if self.quote_character.as_deref() == Some("") { + self.quote_character = None; +} +if self.quote_escape_character.as_deref() == Some("") { + self.quote_escape_character = None; +} +if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; +} +} +} +impl DtoExt for CSVOutput { + fn ignore_empty_strings(&mut self) { +if self.field_delimiter.as_deref() == Some("") { + self.field_delimiter = None; +} +if self.quote_character.as_deref() == Some("") { + self.quote_character = None; +} +if self.quote_escape_character.as_deref() == Some("") { + self.quote_escape_character = None; +} +if let Some(ref val) = self.quote_fields + && val.as_str() == "" { + self.quote_fields = None; +} +if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; +} +} +} +impl DtoExt for Checksum { + fn ignore_empty_strings(&mut self) { +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +} +} +impl DtoExt for CommonPrefix { + fn ignore_empty_strings(&mut self) { +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for CompleteMultipartUploadInput { + fn ignore_empty_strings(&mut self) { +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref mut val) = self.multipart_upload { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +} +} +impl DtoExt for CompleteMultipartUploadOutput { + fn ignore_empty_strings(&mut self) { +if self.bucket.as_deref() == Some("") { + self.bucket = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if self.location.as_deref() == Some("") { + self.location = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for CompletedMultipartUpload { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for CompletedPart { + fn ignore_empty_strings(&mut self) { +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +} +} +impl DtoExt for Condition { + fn ignore_empty_strings(&mut self) { +if self.http_error_code_returned_equals.as_deref() == Some("") { + self.http_error_code_returned_equals = None; +} +if self.key_prefix_equals.as_deref() == Some("") { + self.key_prefix_equals = None; +} +} +} +impl DtoExt for CopyObjectInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { + self.copy_source_sse_customer_algorithm = None; +} +if self.copy_source_sse_customer_key.as_deref() == Some("") { + self.copy_source_sse_customer_key = None; +} +if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { + self.copy_source_sse_customer_key_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.expected_source_bucket_owner.as_deref() == Some("") { + self.expected_source_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.metadata_directive + && val.as_str() == "" { + self.metadata_directive = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.tagging.as_deref() == Some("") { + self.tagging = None; +} +if let Some(ref val) = self.tagging_directive + && val.as_str() == "" { + self.tagging_directive = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} +} +impl DtoExt for CopyObjectOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.copy_object_result { +val.ignore_empty_strings(); +} +if self.copy_source_version_id.as_deref() == Some("") { + self.copy_source_version_id = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; } -impl DtoExt for AbortIncompleteMultipartUpload { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for AbortMultipartUploadInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } } -impl DtoExt for AbortMultipartUploadOutput { +impl DtoExt for CopyObjectResult { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; } -impl DtoExt for AccelerateConfiguration { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; } -impl DtoExt for AccessControlPolicy { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - } +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; } -impl DtoExt for AccessControlTranslation { - fn ignore_empty_strings(&mut self) {} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; } -impl DtoExt for AnalyticsAndOperator { - fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; } -impl DtoExt for AnalyticsConfiguration { - fn ignore_empty_strings(&mut self) { - self.storage_class_analysis.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; } -impl DtoExt for AnalyticsExportDestination { - fn ignore_empty_strings(&mut self) { - self.s3_bucket_destination.ignore_empty_strings(); - } } -impl DtoExt for AnalyticsS3BucketDestination { - fn ignore_empty_strings(&mut self) { - if self.bucket_account_id.as_deref() == Some("") { - self.bucket_account_id = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } } -impl DtoExt for AssumeRoleOutput { +impl DtoExt for CopyPartResult { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.assumed_role_user { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.credentials { - val.ignore_empty_strings(); - } - if self.source_identity.as_deref() == Some("") { - self.source_identity = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; } -impl DtoExt for AssumedRoleUser { - fn ignore_empty_strings(&mut self) {} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; } -impl DtoExt for Bucket { - fn ignore_empty_strings(&mut self) { - if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; - } - if self.name.as_deref() == Some("") { - self.name = None; - } - } +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; } -impl DtoExt for BucketInfo { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.data_redundancy - && val.as_str() == "" - { - self.data_redundancy = None; - } - if let Some(ref val) = self.type_ - && val.as_str() == "" - { - self.type_ = None; - } - } +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; } -impl DtoExt for BucketLifecycleConfiguration { - fn ignore_empty_strings(&mut self) {} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; } -impl DtoExt for BucketLoggingStatus { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.logging_enabled { - val.ignore_empty_strings(); - } - } } -impl DtoExt for CORSConfiguration { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for CORSRule { +impl DtoExt for CreateBucketConfiguration { fn ignore_empty_strings(&mut self) { - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if let Some(ref mut val) = self.bucket { +val.ignore_empty_strings(); } -impl DtoExt for CSVInput { - fn ignore_empty_strings(&mut self) { - if self.comments.as_deref() == Some("") { - self.comments = None; - } - if self.field_delimiter.as_deref() == Some("") { - self.field_delimiter = None; - } - if let Some(ref val) = self.file_header_info - && val.as_str() == "" - { - self.file_header_info = None; - } - if self.quote_character.as_deref() == Some("") { - self.quote_character = None; - } - if self.quote_escape_character.as_deref() == Some("") { - self.quote_escape_character = None; - } - if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; - } - } +if let Some(ref mut val) = self.location { +val.ignore_empty_strings(); } -impl DtoExt for CSVOutput { - fn ignore_empty_strings(&mut self) { - if self.field_delimiter.as_deref() == Some("") { - self.field_delimiter = None; - } - if self.quote_character.as_deref() == Some("") { - self.quote_character = None; - } - if self.quote_escape_character.as_deref() == Some("") { - self.quote_escape_character = None; - } - if let Some(ref val) = self.quote_fields - && val.as_str() == "" - { - self.quote_fields = None; - } - if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; - } - } +if let Some(ref val) = self.location_constraint + && val.as_str() == "" { + self.location_constraint = None; } -impl DtoExt for Checksum { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - } } -impl DtoExt for CommonPrefix { - fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } } -impl DtoExt for CompleteMultipartUploadInput { +impl DtoExt for CreateBucketInput { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref mut val) = self.multipart_upload { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; } -impl DtoExt for CompleteMultipartUploadOutput { - fn ignore_empty_strings(&mut self) { - if self.bucket.as_deref() == Some("") { - self.bucket = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if self.location.as_deref() == Some("") { - self.location = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref mut val) = self.create_bucket_configuration { +val.ignore_empty_strings(); } -impl DtoExt for CompletedMultipartUpload { - fn ignore_empty_strings(&mut self) {} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; } -impl DtoExt for CompletedPart { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - } +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; } -impl DtoExt for Condition { - fn ignore_empty_strings(&mut self) { - if self.http_error_code_returned_equals.as_deref() == Some("") { - self.http_error_code_returned_equals = None; - } - if self.key_prefix_equals.as_deref() == Some("") { - self.key_prefix_equals = None; - } - } +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; } -impl DtoExt for CopyObjectInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { - self.copy_source_sse_customer_algorithm = None; - } - if self.copy_source_sse_customer_key.as_deref() == Some("") { - self.copy_source_sse_customer_key = None; - } - if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { - self.copy_source_sse_customer_key_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.expected_source_bucket_owner.as_deref() == Some("") { - self.expected_source_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.metadata_directive - && val.as_str() == "" - { - self.metadata_directive = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.tagging.as_deref() == Some("") { - self.tagging = None; - } - if let Some(ref val) = self.tagging_directive - && val.as_str() == "" - { - self.tagging_directive = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } +if self.grant_write.as_deref() == Some("") { + self.grant_write = None; } -impl DtoExt for CopyObjectOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.copy_object_result { - val.ignore_empty_strings(); - } - if self.copy_source_version_id.as_deref() == Some("") { - self.copy_source_version_id = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; } -impl DtoExt for CopyObjectResult { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - } +if let Some(ref val) = self.object_ownership + && val.as_str() == "" { + self.object_ownership = None; } -impl DtoExt for CopyPartResult { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - } } -impl DtoExt for CreateBucketConfiguration { +} +impl DtoExt for CreateBucketMetadataTableConfigurationInput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.bucket { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.location { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.location_constraint - && val.as_str() == "" - { - self.location_constraint = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; } -impl DtoExt for CreateBucketInput { +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.metadata_table_configuration.ignore_empty_strings(); +} +} +impl DtoExt for CreateBucketOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if let Some(ref mut val) = self.create_bucket_configuration { - val.ignore_empty_strings(); - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write.as_deref() == Some("") { - self.grant_write = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.object_ownership - && val.as_str() == "" - { - self.object_ownership = None; - } - } +if self.location.as_deref() == Some("") { + self.location = None; } -impl DtoExt for CreateBucketMetadataTableConfigurationInput { +} +} +impl DtoExt for CreateMultipartUploadInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.metadata_table_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.tagging.as_deref() == Some("") { + self.tagging = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; } -impl DtoExt for CreateBucketOutput { - fn ignore_empty_strings(&mut self) { - if self.location.as_deref() == Some("") { - self.location = None; - } - } } -impl DtoExt for CreateMultipartUploadInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.tagging.as_deref() == Some("") { - self.tagging = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } } impl DtoExt for CreateMultipartUploadOutput { fn ignore_empty_strings(&mut self) { - if self.abort_rule_id.as_deref() == Some("") { - self.abort_rule_id = None; - } - if self.bucket.as_deref() == Some("") { - self.bucket = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.upload_id.as_deref() == Some("") { - self.upload_id = None; - } - } +if self.abort_rule_id.as_deref() == Some("") { + self.abort_rule_id = None; +} +if self.bucket.as_deref() == Some("") { + self.bucket = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.upload_id.as_deref() == Some("") { + self.upload_id = None; +} +} } impl DtoExt for CreateSessionInput { fn ignore_empty_strings(&mut self) { - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.session_mode - && val.as_str() == "" - { - self.session_mode = None; - } - } +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.session_mode + && val.as_str() == "" { + self.session_mode = None; +} +} } impl DtoExt for CreateSessionOutput { fn ignore_empty_strings(&mut self) { - self.credentials.ignore_empty_strings(); - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - } +self.credentials.ignore_empty_strings(); +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +} } impl DtoExt for Credentials { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for DefaultRetention { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.mode - && val.as_str() == "" - { - self.mode = None; - } - } +if let Some(ref val) = self.mode + && val.as_str() == "" { + self.mode = None; +} +} +} +impl DtoExt for DelMarkerExpiration { + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for Delete { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for DeleteBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketCorsInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketEncryptionInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketIntelligentTieringConfigurationInput { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for DeleteBucketInventoryConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketLifecycleInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketMetadataTableConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketOwnershipControlsInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketPolicyInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketReplicationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketTaggingInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteBucketWebsiteInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteMarkerEntry { fn ignore_empty_strings(&mut self) { - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.key.as_deref() == Some("") { + self.key = None; +} +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for DeleteMarkerReplication { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} } impl DtoExt for DeleteObjectInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.mfa.as_deref() == Some("") { - self.mfa = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.mfa.as_deref() == Some("") { + self.mfa = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for DeleteObjectOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for DeleteObjectTaggingInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for DeleteObjectTaggingOutput { fn ignore_empty_strings(&mut self) { - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for DeleteObjectsInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - self.delete.ignore_empty_strings(); - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.mfa.as_deref() == Some("") { - self.mfa = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +self.delete.ignore_empty_strings(); +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.mfa.as_deref() == Some("") { + self.mfa = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} } impl DtoExt for DeleteObjectsOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for DeletePublicAccessBlockInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for DeleteReplication { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for DeletedObject { fn ignore_empty_strings(&mut self) { - if self.delete_marker_version_id.as_deref() == Some("") { - self.delete_marker_version_id = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.delete_marker_version_id.as_deref() == Some("") { + self.delete_marker_version_id = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for Destination { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.access_control_translation { - val.ignore_empty_strings(); - } - if self.account.as_deref() == Some("") { - self.account = None; - } - if let Some(ref mut val) = self.encryption_configuration { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.metrics { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.replication_time { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } +if let Some(ref mut val) = self.access_control_translation { +val.ignore_empty_strings(); +} +if self.account.as_deref() == Some("") { + self.account = None; +} +if let Some(ref mut val) = self.encryption_configuration { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.metrics { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.replication_time { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +} } impl DtoExt for Encryption { fn ignore_empty_strings(&mut self) { - if self.kms_context.as_deref() == Some("") { - self.kms_context = None; - } - if self.kms_key_id.as_deref() == Some("") { - self.kms_key_id = None; - } - } +if self.kms_context.as_deref() == Some("") { + self.kms_context = None; +} +if self.kms_key_id.as_deref() == Some("") { + self.kms_key_id = None; +} +} } impl DtoExt for EncryptionConfiguration { fn ignore_empty_strings(&mut self) { - if self.replica_kms_key_id.as_deref() == Some("") { - self.replica_kms_key_id = None; - } - } +if self.replica_kms_key_id.as_deref() == Some("") { + self.replica_kms_key_id = None; +} +} } impl DtoExt for Error { fn ignore_empty_strings(&mut self) { - if self.code.as_deref() == Some("") { - self.code = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if self.message.as_deref() == Some("") { - self.message = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.code.as_deref() == Some("") { + self.code = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if self.message.as_deref() == Some("") { + self.message = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for ErrorDetails { fn ignore_empty_strings(&mut self) { - if self.error_code.as_deref() == Some("") { - self.error_code = None; - } - if self.error_message.as_deref() == Some("") { - self.error_message = None; - } - } +if self.error_code.as_deref() == Some("") { + self.error_code = None; +} +if self.error_message.as_deref() == Some("") { + self.error_message = None; +} +} } impl DtoExt for ErrorDocument { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ExcludedPrefix { fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for ExistingObjectReplication { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for FilterRule { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.name - && val.as_str() == "" - { - self.name = None; - } - if self.value.as_deref() == Some("") { - self.value = None; - } - } +if let Some(ref val) = self.name + && val.as_str() == "" { + self.name = None; +} +if self.value.as_deref() == Some("") { + self.value = None; +} +} } impl DtoExt for GetBucketAccelerateConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} } impl DtoExt for GetBucketAccelerateConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} } impl DtoExt for GetBucketAclInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketAclOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketAnalyticsConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.analytics_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.analytics_configuration { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketCorsInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketCorsOutput { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for GetBucketEncryptionInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketEncryptionOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.server_side_encryption_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.server_side_encryption_configuration { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketIntelligentTieringConfigurationInput { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for GetBucketIntelligentTieringConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.intelligent_tiering_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.intelligent_tiering_configuration { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketInventoryConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketInventoryConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.inventory_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.inventory_configuration { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketLifecycleConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketLifecycleConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" - { - self.transition_default_minimum_object_size = None; - } - } +if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" { + self.transition_default_minimum_object_size = None; +} +} } impl DtoExt for GetBucketLocationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketLocationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.location_constraint - && val.as_str() == "" - { - self.location_constraint = None; - } - } +if let Some(ref val) = self.location_constraint + && val.as_str() == "" { + self.location_constraint = None; +} +} } impl DtoExt for GetBucketLoggingInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketLoggingOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.logging_enabled { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.logging_enabled { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketMetadataTableConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketMetadataTableConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.get_bucket_metadata_table_configuration_result { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.get_bucket_metadata_table_configuration_result { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketMetadataTableConfigurationResult { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.error { - val.ignore_empty_strings(); - } - self.metadata_table_configuration_result.ignore_empty_strings(); - } +if let Some(ref mut val) = self.error { +val.ignore_empty_strings(); +} +self.metadata_table_configuration_result.ignore_empty_strings(); +} } impl DtoExt for GetBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketMetricsConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.metrics_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.metrics_configuration { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketNotificationConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketNotificationConfigurationOutput { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for GetBucketOwnershipControlsInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketOwnershipControlsOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.ownership_controls { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.ownership_controls { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketPolicyInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketPolicyOutput { fn ignore_empty_strings(&mut self) { - if self.policy.as_deref() == Some("") { - self.policy = None; - } - } +if self.policy.as_deref() == Some("") { + self.policy = None; +} +} } impl DtoExt for GetBucketPolicyStatusInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketPolicyStatusOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.policy_status { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.policy_status { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketReplicationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketReplicationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.replication_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.replication_configuration { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetBucketRequestPaymentInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketRequestPaymentOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.payer - && val.as_str() == "" - { - self.payer = None; - } - } +if let Some(ref val) = self.payer + && val.as_str() == "" { + self.payer = None; +} +} } impl DtoExt for GetBucketTaggingInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketTaggingOutput { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for GetBucketVersioningInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketVersioningOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.mfa_delete - && val.as_str() == "" - { - self.mfa_delete = None; - } - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if let Some(ref val) = self.mfa_delete + && val.as_str() == "" { + self.mfa_delete = None; +} +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} } impl DtoExt for GetBucketWebsiteInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetBucketWebsiteOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.error_document { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.index_document { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.redirect_all_requests_to { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.error_document { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.index_document { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.redirect_all_requests_to { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetObjectAclInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for GetObjectAclOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for GetObjectAttributesInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for GetObjectAttributesOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.checksum { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.object_parts { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref mut val) = self.checksum { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.object_parts { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for GetObjectAttributesParts { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for GetObjectInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_mode - && val.as_str() == "" - { - self.checksum_mode = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.response_cache_control.as_deref() == Some("") { - self.response_cache_control = None; - } - if self.response_content_disposition.as_deref() == Some("") { - self.response_content_disposition = None; - } - if self.response_content_encoding.as_deref() == Some("") { - self.response_content_encoding = None; - } - if self.response_content_language.as_deref() == Some("") { - self.response_content_language = None; - } - if self.response_content_type.as_deref() == Some("") { - self.response_content_type = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_mode + && val.as_str() == "" { + self.checksum_mode = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.response_cache_control.as_deref() == Some("") { + self.response_cache_control = None; +} +if self.response_content_disposition.as_deref() == Some("") { + self.response_content_disposition = None; +} +if self.response_content_encoding.as_deref() == Some("") { + self.response_content_encoding = None; +} +if self.response_content_language.as_deref() == Some("") { + self.response_content_language = None; +} +if self.response_content_type.as_deref() == Some("") { + self.response_content_type = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for GetObjectLegalHoldInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for GetObjectLegalHoldOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.legal_hold { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.legal_hold { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetObjectLockConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetObjectLockConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.object_lock_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.object_lock_configuration { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetObjectOutput { fn ignore_empty_strings(&mut self) { - if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_range.as_deref() == Some("") { - self.content_range = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.replication_status - && val.as_str() == "" - { - self.replication_status = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.restore.as_deref() == Some("") { - self.restore = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } +if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_range.as_deref() == Some("") { + self.content_range = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.replication_status + && val.as_str() == "" { + self.replication_status = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.restore.as_deref() == Some("") { + self.restore = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} } impl DtoExt for GetObjectRetentionInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for GetObjectRetentionOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.retention { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.retention { +val.ignore_empty_strings(); +} +} } impl DtoExt for GetObjectTaggingInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for GetObjectTaggingOutput { fn ignore_empty_strings(&mut self) { - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for GetObjectTorrentInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} } impl DtoExt for GetObjectTorrentOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for GetPublicAccessBlockInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for GetPublicAccessBlockOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.public_access_block_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.public_access_block_configuration { +val.ignore_empty_strings(); +} +} } impl DtoExt for GlacierJobParameters { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for Grant { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.grantee { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.permission - && val.as_str() == "" - { - self.permission = None; - } - } +if let Some(ref mut val) = self.grantee { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.permission + && val.as_str() == "" { + self.permission = None; +} +} } impl DtoExt for Grantee { fn ignore_empty_strings(&mut self) { - if self.display_name.as_deref() == Some("") { - self.display_name = None; - } - if self.email_address.as_deref() == Some("") { - self.email_address = None; - } - if self.id.as_deref() == Some("") { - self.id = None; - } - if self.uri.as_deref() == Some("") { - self.uri = None; - } - } +if self.display_name.as_deref() == Some("") { + self.display_name = None; +} +if self.email_address.as_deref() == Some("") { + self.email_address = None; +} +if self.id.as_deref() == Some("") { + self.id = None; +} +if self.uri.as_deref() == Some("") { + self.uri = None; +} +} } impl DtoExt for HeadBucketInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for HeadBucketOutput { fn ignore_empty_strings(&mut self) { - if self.bucket_location_name.as_deref() == Some("") { - self.bucket_location_name = None; - } - if let Some(ref val) = self.bucket_location_type - && val.as_str() == "" - { - self.bucket_location_type = None; - } - if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; - } - } +if self.bucket_location_name.as_deref() == Some("") { + self.bucket_location_name = None; +} +if let Some(ref val) = self.bucket_location_type + && val.as_str() == "" { + self.bucket_location_type = None; +} +if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; +} +} } impl DtoExt for HeadObjectInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_mode - && val.as_str() == "" - { - self.checksum_mode = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.response_cache_control.as_deref() == Some("") { - self.response_cache_control = None; - } - if self.response_content_disposition.as_deref() == Some("") { - self.response_content_disposition = None; - } - if self.response_content_encoding.as_deref() == Some("") { - self.response_content_encoding = None; - } - if self.response_content_language.as_deref() == Some("") { - self.response_content_language = None; - } - if self.response_content_type.as_deref() == Some("") { - self.response_content_type = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_mode + && val.as_str() == "" { + self.checksum_mode = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.response_cache_control.as_deref() == Some("") { + self.response_cache_control = None; +} +if self.response_content_disposition.as_deref() == Some("") { + self.response_content_disposition = None; +} +if self.response_content_encoding.as_deref() == Some("") { + self.response_content_encoding = None; +} +if self.response_content_language.as_deref() == Some("") { + self.response_content_language = None; +} +if self.response_content_type.as_deref() == Some("") { + self.response_content_type = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for HeadObjectOutput { fn ignore_empty_strings(&mut self) { - if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; - } - if let Some(ref val) = self.archive_status - && val.as_str() == "" - { - self.archive_status = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_range.as_deref() == Some("") { - self.content_range = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.replication_status - && val.as_str() == "" - { - self.replication_status = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.restore.as_deref() == Some("") { - self.restore = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } +if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; +} +if let Some(ref val) = self.archive_status + && val.as_str() == "" { + self.archive_status = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_range.as_deref() == Some("") { + self.content_range = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.replication_status + && val.as_str() == "" { + self.replication_status = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.restore.as_deref() == Some("") { + self.restore = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} } impl DtoExt for IndexDocument { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for Initiator { fn ignore_empty_strings(&mut self) { - if self.display_name.as_deref() == Some("") { - self.display_name = None; - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if self.display_name.as_deref() == Some("") { + self.display_name = None; +} +if self.id.as_deref() == Some("") { + self.id = None; +} +} } impl DtoExt for InputSerialization { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.csv { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.compression_type - && val.as_str() == "" - { - self.compression_type = None; - } - if let Some(ref mut val) = self.json { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.csv { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.compression_type + && val.as_str() == "" { + self.compression_type = None; +} +if let Some(ref mut val) = self.json { +val.ignore_empty_strings(); +} +} } impl DtoExt for IntelligentTieringAndOperator { fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for IntelligentTieringConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +} } impl DtoExt for IntelligentTieringFilter { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.and { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref mut val) = self.tag { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.and { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref mut val) = self.tag { +val.ignore_empty_strings(); +} +} } impl DtoExt for InvalidObjectState { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.access_tier - && val.as_str() == "" - { - self.access_tier = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } +if let Some(ref val) = self.access_tier + && val.as_str() == "" { + self.access_tier = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +} } impl DtoExt for InventoryConfiguration { fn ignore_empty_strings(&mut self) { - self.destination.ignore_empty_strings(); - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - self.schedule.ignore_empty_strings(); - } +self.destination.ignore_empty_strings(); +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +self.schedule.ignore_empty_strings(); +} } impl DtoExt for InventoryDestination { fn ignore_empty_strings(&mut self) { - self.s3_bucket_destination.ignore_empty_strings(); - } +self.s3_bucket_destination.ignore_empty_strings(); +} } impl DtoExt for InventoryEncryption { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.ssekms { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.ssekms { +val.ignore_empty_strings(); +} +} } impl DtoExt for InventoryFilter { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for InventoryS3BucketDestination { fn ignore_empty_strings(&mut self) { - if self.account_id.as_deref() == Some("") { - self.account_id = None; - } - if let Some(ref mut val) = self.encryption { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.account_id.as_deref() == Some("") { + self.account_id = None; +} +if let Some(ref mut val) = self.encryption { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for InventorySchedule { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for JSONInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.type_ - && val.as_str() == "" - { - self.type_ = None; - } - } +if let Some(ref val) = self.type_ + && val.as_str() == "" { + self.type_ = None; +} +} } impl DtoExt for JSONOutput { fn ignore_empty_strings(&mut self) { - if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; - } - } +if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; +} +} } impl DtoExt for LambdaFunctionConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +} } impl DtoExt for LifecycleExpiration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for LifecycleRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.abort_incomplete_multipart_upload { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.expiration { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - if let Some(ref mut val) = self.noncurrent_version_expiration { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if let Some(ref mut val) = self.abort_incomplete_multipart_upload { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.del_marker_expiration { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.expiration { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +if let Some(ref mut val) = self.noncurrent_version_expiration { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for LifecycleRuleAndOperator { fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for LifecycleRuleFilter { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.and { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref mut val) = self.tag { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.and { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref mut val) = self.tag { +val.ignore_empty_strings(); +} +} } impl DtoExt for ListBucketAnalyticsConfigurationsInput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for ListBucketAnalyticsConfigurationsOutput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +} } impl DtoExt for ListBucketIntelligentTieringConfigurationsInput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +} } impl DtoExt for ListBucketIntelligentTieringConfigurationsOutput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +} } impl DtoExt for ListBucketInventoryConfigurationsInput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for ListBucketInventoryConfigurationsOutput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +} } impl DtoExt for ListBucketMetricsConfigurationsInput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for ListBucketMetricsConfigurationsOutput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +} } impl DtoExt for ListBucketsInput { fn ignore_empty_strings(&mut self) { - if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; - } - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; +} +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for ListBucketsOutput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for ListDirectoryBucketsInput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +} } impl DtoExt for ListDirectoryBucketsOutput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +} } impl DtoExt for ListMultipartUploadsInput { fn ignore_empty_strings(&mut self) { - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.key_marker.as_deref() == Some("") { - self.key_marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.upload_id_marker.as_deref() == Some("") { - self.upload_id_marker = None; - } - } +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.key_marker.as_deref() == Some("") { + self.key_marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.upload_id_marker.as_deref() == Some("") { + self.upload_id_marker = None; +} +} } impl DtoExt for ListMultipartUploadsOutput { fn ignore_empty_strings(&mut self) { - if self.bucket.as_deref() == Some("") { - self.bucket = None; - } - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.key_marker.as_deref() == Some("") { - self.key_marker = None; - } - if self.next_key_marker.as_deref() == Some("") { - self.next_key_marker = None; - } - if self.next_upload_id_marker.as_deref() == Some("") { - self.next_upload_id_marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.upload_id_marker.as_deref() == Some("") { - self.upload_id_marker = None; - } - } +if self.bucket.as_deref() == Some("") { + self.bucket = None; +} +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.key_marker.as_deref() == Some("") { + self.key_marker = None; +} +if self.next_key_marker.as_deref() == Some("") { + self.next_key_marker = None; +} +if self.next_upload_id_marker.as_deref() == Some("") { + self.next_upload_id_marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.upload_id_marker.as_deref() == Some("") { + self.upload_id_marker = None; +} +} } impl DtoExt for ListObjectVersionsInput { fn ignore_empty_strings(&mut self) { - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.key_marker.as_deref() == Some("") { - self.key_marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id_marker.as_deref() == Some("") { - self.version_id_marker = None; - } - } +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.key_marker.as_deref() == Some("") { + self.key_marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id_marker.as_deref() == Some("") { + self.version_id_marker = None; +} +} } impl DtoExt for ListObjectVersionsOutput { fn ignore_empty_strings(&mut self) { - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.key_marker.as_deref() == Some("") { - self.key_marker = None; - } - if self.name.as_deref() == Some("") { - self.name = None; - } - if self.next_key_marker.as_deref() == Some("") { - self.next_key_marker = None; - } - if self.next_version_id_marker.as_deref() == Some("") { - self.next_version_id_marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.version_id_marker.as_deref() == Some("") { - self.version_id_marker = None; - } - } +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.key_marker.as_deref() == Some("") { + self.key_marker = None; +} +if self.name.as_deref() == Some("") { + self.name = None; +} +if self.next_key_marker.as_deref() == Some("") { + self.next_key_marker = None; +} +if self.next_version_id_marker.as_deref() == Some("") { + self.next_version_id_marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.version_id_marker.as_deref() == Some("") { + self.version_id_marker = None; +} +} } impl DtoExt for ListObjectsInput { fn ignore_empty_strings(&mut self) { - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.marker.as_deref() == Some("") { - self.marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.marker.as_deref() == Some("") { + self.marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} } impl DtoExt for ListObjectsOutput { fn ignore_empty_strings(&mut self) { - if self.name.as_deref() == Some("") { - self.name = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if self.marker.as_deref() == Some("") { - self.marker = None; - } - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if self.next_marker.as_deref() == Some("") { - self.next_marker = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if self.name.as_deref() == Some("") { + self.name = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if self.marker.as_deref() == Some("") { + self.marker = None; +} +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if self.next_marker.as_deref() == Some("") { + self.next_marker = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for ListObjectsV2Input { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.start_after.as_deref() == Some("") { - self.start_after = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.start_after.as_deref() == Some("") { + self.start_after = None; +} +} +} +impl DtoExt for ListObjectsV2Output { + fn ignore_empty_strings(&mut self) { +if self.name.as_deref() == Some("") { + self.name = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.start_after.as_deref() == Some("") { + self.start_after = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} } -impl DtoExt for ListObjectsV2Output { - fn ignore_empty_strings(&mut self) { - if self.name.as_deref() == Some("") { - self.name = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.start_after.as_deref() == Some("") { - self.start_after = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } } impl DtoExt for ListPartsInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +} } impl DtoExt for ListPartsOutput { fn ignore_empty_strings(&mut self) { - if self.abort_rule_id.as_deref() == Some("") { - self.abort_rule_id = None; - } - if self.bucket.as_deref() == Some("") { - self.bucket = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if let Some(ref mut val) = self.initiator { - val.ignore_empty_strings(); - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.upload_id.as_deref() == Some("") { - self.upload_id = None; - } - } +if self.abort_rule_id.as_deref() == Some("") { + self.abort_rule_id = None; +} +if self.bucket.as_deref() == Some("") { + self.bucket = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if let Some(ref mut val) = self.initiator { +val.ignore_empty_strings(); +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.upload_id.as_deref() == Some("") { + self.upload_id = None; +} +} } impl DtoExt for LocationInfo { fn ignore_empty_strings(&mut self) { - if self.name.as_deref() == Some("") { - self.name = None; - } - if let Some(ref val) = self.type_ - && val.as_str() == "" - { - self.type_ = None; - } - } +if self.name.as_deref() == Some("") { + self.name = None; +} +if let Some(ref val) = self.type_ + && val.as_str() == "" { + self.type_ = None; +} +} } impl DtoExt for LoggingEnabled { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.target_object_key_format { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.target_object_key_format { +val.ignore_empty_strings(); +} +} } impl DtoExt for MetadataEntry { fn ignore_empty_strings(&mut self) { - if self.name.as_deref() == Some("") { - self.name = None; - } - if self.value.as_deref() == Some("") { - self.value = None; - } - } +if self.name.as_deref() == Some("") { + self.name = None; +} +if self.value.as_deref() == Some("") { + self.value = None; +} +} } impl DtoExt for MetadataTableConfiguration { fn ignore_empty_strings(&mut self) { - self.s3_tables_destination.ignore_empty_strings(); - } +self.s3_tables_destination.ignore_empty_strings(); +} } impl DtoExt for MetadataTableConfigurationResult { fn ignore_empty_strings(&mut self) { - self.s3_tables_destination_result.ignore_empty_strings(); - } +self.s3_tables_destination_result.ignore_empty_strings(); +} } impl DtoExt for Metrics { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.event_threshold { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.event_threshold { +val.ignore_empty_strings(); +} +} } impl DtoExt for MetricsAndOperator { fn ignore_empty_strings(&mut self) { - if self.access_point_arn.as_deref() == Some("") { - self.access_point_arn = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.access_point_arn.as_deref() == Some("") { + self.access_point_arn = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for MetricsConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for MultipartUpload { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if let Some(ref mut val) = self.initiator { - val.ignore_empty_strings(); - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.upload_id.as_deref() == Some("") { - self.upload_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if let Some(ref mut val) = self.initiator { +val.ignore_empty_strings(); +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.upload_id.as_deref() == Some("") { + self.upload_id = None; +} +} } impl DtoExt for NoncurrentVersionExpiration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for NoncurrentVersionTransition { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +} } impl DtoExt for NotificationConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for NotificationConfigurationFilter { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.key { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.key { +val.ignore_empty_strings(); +} +} } impl DtoExt for Object { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.restore_status { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.restore_status { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +} } impl DtoExt for ObjectIdentifier { fn ignore_empty_strings(&mut self) { - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for ObjectLockConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.object_lock_enabled - && val.as_str() == "" - { - self.object_lock_enabled = None; - } - if let Some(ref mut val) = self.rule { - val.ignore_empty_strings(); - } - } +if let Some(ref val) = self.object_lock_enabled + && val.as_str() == "" { + self.object_lock_enabled = None; +} +if let Some(ref mut val) = self.rule { +val.ignore_empty_strings(); +} +} } impl DtoExt for ObjectLockLegalHold { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} } impl DtoExt for ObjectLockRetention { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.mode - && val.as_str() == "" - { - self.mode = None; - } - } +if let Some(ref val) = self.mode + && val.as_str() == "" { + self.mode = None; +} +} } impl DtoExt for ObjectLockRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.default_retention { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.default_retention { +val.ignore_empty_strings(); +} +} } impl DtoExt for ObjectPart { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +} } impl DtoExt for ObjectVersion { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.restore_status { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.restore_status { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for OutputLocation { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.s3 { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.s3 { +val.ignore_empty_strings(); +} +} } impl DtoExt for OutputSerialization { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.csv { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.json { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.csv { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.json { +val.ignore_empty_strings(); +} +} } impl DtoExt for Owner { fn ignore_empty_strings(&mut self) { - if self.display_name.as_deref() == Some("") { - self.display_name = None; - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if self.display_name.as_deref() == Some("") { + self.display_name = None; +} +if self.id.as_deref() == Some("") { + self.id = None; +} +} } impl DtoExt for OwnershipControls { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for OwnershipControlsRule { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for Part { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +} } impl DtoExt for PartitionedPrefix { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.partition_date_source - && val.as_str() == "" - { - self.partition_date_source = None; - } - } +if let Some(ref val) = self.partition_date_source + && val.as_str() == "" { + self.partition_date_source = None; +} +} } impl DtoExt for PolicyStatus { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for PostObjectInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.tagging.as_deref() == Some("") { - self.tagging = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.tagging.as_deref() == Some("") { + self.tagging = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} } impl DtoExt for PostObjectOutput { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for Progress { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ProgressEvent { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.details { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.details { +val.ignore_empty_strings(); +} +} } impl DtoExt for PublicAccessBlockConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for PutBucketAccelerateConfigurationInput { fn ignore_empty_strings(&mut self) { - self.accelerate_configuration.ignore_empty_strings(); - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +self.accelerate_configuration.ignore_empty_strings(); +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketAclInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if let Some(ref mut val) = self.access_control_policy { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write.as_deref() == Some("") { - self.grant_write = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if let Some(ref mut val) = self.access_control_policy { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write.as_deref() == Some("") { + self.grant_write = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +} } impl DtoExt for PutBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { - self.analytics_configuration.ignore_empty_strings(); - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +self.analytics_configuration.ignore_empty_strings(); +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketCorsInput { fn ignore_empty_strings(&mut self) { - self.cors_configuration.ignore_empty_strings(); - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +self.cors_configuration.ignore_empty_strings(); +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketEncryptionInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.server_side_encryption_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.server_side_encryption_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketIntelligentTieringConfigurationInput { fn ignore_empty_strings(&mut self) { - self.intelligent_tiering_configuration.ignore_empty_strings(); - } +self.intelligent_tiering_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketInventoryConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.inventory_configuration.ignore_empty_strings(); - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.inventory_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketLifecycleConfigurationInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref mut val) = self.lifecycle_configuration { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" - { - self.transition_default_minimum_object_size = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref mut val) = self.lifecycle_configuration { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" { + self.transition_default_minimum_object_size = None; +} +} } impl DtoExt for PutBucketLifecycleConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" - { - self.transition_default_minimum_object_size = None; - } - } +if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" { + self.transition_default_minimum_object_size = None; +} +} } impl DtoExt for PutBucketLoggingInput { fn ignore_empty_strings(&mut self) { - self.bucket_logging_status.ignore_empty_strings(); - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +self.bucket_logging_status.ignore_empty_strings(); +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.metrics_configuration.ignore_empty_strings(); - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.metrics_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketNotificationConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.notification_configuration.ignore_empty_strings(); - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.notification_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketOwnershipControlsInput { fn ignore_empty_strings(&mut self) { - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.ownership_controls.ignore_empty_strings(); - } +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.ownership_controls.ignore_empty_strings(); +} } impl DtoExt for PutBucketPolicyInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketReplicationInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.replication_configuration.ignore_empty_strings(); - if self.token.as_deref() == Some("") { - self.token = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.replication_configuration.ignore_empty_strings(); +if self.token.as_deref() == Some("") { + self.token = None; +} +} } impl DtoExt for PutBucketRequestPaymentInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.request_payment_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.request_payment_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketTaggingInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.tagging.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.tagging.ignore_empty_strings(); +} } impl DtoExt for PutBucketVersioningInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.mfa.as_deref() == Some("") { - self.mfa = None; - } - self.versioning_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.mfa.as_deref() == Some("") { + self.mfa = None; +} +self.versioning_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketWebsiteInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.website_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.website_configuration.ignore_empty_strings(); +} } impl DtoExt for PutObjectAclInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if let Some(ref mut val) = self.access_control_policy { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write.as_deref() == Some("") { - self.grant_write = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if let Some(ref mut val) = self.access_control_policy { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write.as_deref() == Some("") { + self.grant_write = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectAclOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} +} +impl DtoExt for PutObjectInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.tagging.as_deref() == Some("") { + self.tagging = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} } -impl DtoExt for PutObjectInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.tagging.as_deref() == Some("") { - self.tagging = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } } impl DtoExt for PutObjectLegalHoldInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref mut val) = self.legal_hold { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref mut val) = self.legal_hold { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectLegalHoldOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for PutObjectLockConfigurationInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref mut val) = self.object_lock_configuration { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.token.as_deref() == Some("") { - self.token = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref mut val) = self.object_lock_configuration { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.token.as_deref() == Some("") { + self.token = None; +} +} } impl DtoExt for PutObjectLockConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for PutObjectOutput { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectRetentionInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if let Some(ref mut val) = self.retention { - val.ignore_empty_strings(); - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if let Some(ref mut val) = self.retention { +val.ignore_empty_strings(); +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectRetentionOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for PutObjectTaggingInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - self.tagging.ignore_empty_strings(); - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +self.tagging.ignore_empty_strings(); +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectTaggingOutput { fn ignore_empty_strings(&mut self) { - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutPublicAccessBlockInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.public_access_block_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.public_access_block_configuration.ignore_empty_strings(); +} } impl DtoExt for QueueConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +} } impl DtoExt for RecordsEvent { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for Redirect { fn ignore_empty_strings(&mut self) { - if self.host_name.as_deref() == Some("") { - self.host_name = None; - } - if self.http_redirect_code.as_deref() == Some("") { - self.http_redirect_code = None; - } - if let Some(ref val) = self.protocol - && val.as_str() == "" - { - self.protocol = None; - } - if self.replace_key_prefix_with.as_deref() == Some("") { - self.replace_key_prefix_with = None; - } - if self.replace_key_with.as_deref() == Some("") { - self.replace_key_with = None; - } - } +if self.host_name.as_deref() == Some("") { + self.host_name = None; +} +if self.http_redirect_code.as_deref() == Some("") { + self.http_redirect_code = None; +} +if let Some(ref val) = self.protocol + && val.as_str() == "" { + self.protocol = None; +} +if self.replace_key_prefix_with.as_deref() == Some("") { + self.replace_key_prefix_with = None; +} +if self.replace_key_with.as_deref() == Some("") { + self.replace_key_with = None; +} +} } impl DtoExt for RedirectAllRequestsTo { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.protocol - && val.as_str() == "" - { - self.protocol = None; - } - } +if let Some(ref val) = self.protocol + && val.as_str() == "" { + self.protocol = None; +} +} } impl DtoExt for ReplicaModifications { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ReplicationConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ReplicationRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.delete_marker_replication { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.delete_replication { - val.ignore_empty_strings(); - } - self.destination.ignore_empty_strings(); - if let Some(ref mut val) = self.existing_object_replication { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref mut val) = self.source_selection_criteria { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.delete_marker_replication { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.delete_replication { +val.ignore_empty_strings(); +} +self.destination.ignore_empty_strings(); +if let Some(ref mut val) = self.existing_object_replication { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref mut val) = self.source_selection_criteria { +val.ignore_empty_strings(); +} +} } impl DtoExt for ReplicationRuleAndOperator { fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for ReplicationRuleFilter { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.and { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref mut val) = self.tag { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.and { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref mut val) = self.tag { +val.ignore_empty_strings(); +} +} } impl DtoExt for ReplicationTime { fn ignore_empty_strings(&mut self) { - self.time.ignore_empty_strings(); - } +self.time.ignore_empty_strings(); +} } impl DtoExt for ReplicationTimeValue { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for RequestPaymentConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for RequestProgress { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for RestoreObjectInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if let Some(ref mut val) = self.restore_request { - val.ignore_empty_strings(); - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if let Some(ref mut val) = self.restore_request { +val.ignore_empty_strings(); +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for RestoreObjectOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.restore_output_path.as_deref() == Some("") { - self.restore_output_path = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.restore_output_path.as_deref() == Some("") { + self.restore_output_path = None; +} +} } impl DtoExt for RestoreRequest { fn ignore_empty_strings(&mut self) { - if self.description.as_deref() == Some("") { - self.description = None; - } - if let Some(ref mut val) = self.glacier_job_parameters { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.output_location { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.select_parameters { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.tier - && val.as_str() == "" - { - self.tier = None; - } - if let Some(ref val) = self.type_ - && val.as_str() == "" - { - self.type_ = None; - } - } +if self.description.as_deref() == Some("") { + self.description = None; +} +if let Some(ref mut val) = self.glacier_job_parameters { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.output_location { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.select_parameters { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.tier + && val.as_str() == "" { + self.tier = None; +} +if let Some(ref val) = self.type_ + && val.as_str() == "" { + self.type_ = None; +} +} } impl DtoExt for RestoreStatus { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for RoutingRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.condition { - val.ignore_empty_strings(); - } - self.redirect.ignore_empty_strings(); - } +if let Some(ref mut val) = self.condition { +val.ignore_empty_strings(); +} +self.redirect.ignore_empty_strings(); +} +} +impl DtoExt for S3KeyFilter { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for S3Location { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.canned_acl + && val.as_str() == "" { + self.canned_acl = None; +} +if let Some(ref mut val) = self.encryption { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if let Some(ref mut val) = self.tagging { +val.ignore_empty_strings(); +} } -impl DtoExt for S3KeyFilter { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for S3Location { +impl DtoExt for S3TablesDestination { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.canned_acl - && val.as_str() == "" - { - self.canned_acl = None; - } - if let Some(ref mut val) = self.encryption { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if let Some(ref mut val) = self.tagging { - val.ignore_empty_strings(); - } - } } -impl DtoExt for S3TablesDestination { - fn ignore_empty_strings(&mut self) {} } impl DtoExt for S3TablesDestinationResult { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for SSEKMS { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ScanRange { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for SelectObjectContentInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - self.request.ignore_empty_strings(); - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +self.request.ignore_empty_strings(); +} } impl DtoExt for SelectObjectContentOutput { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for SelectObjectContentRequest { fn ignore_empty_strings(&mut self) { - self.input_serialization.ignore_empty_strings(); - self.output_serialization.ignore_empty_strings(); - if let Some(ref mut val) = self.request_progress { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.scan_range { - val.ignore_empty_strings(); - } - } +self.input_serialization.ignore_empty_strings(); +self.output_serialization.ignore_empty_strings(); +if let Some(ref mut val) = self.request_progress { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.scan_range { +val.ignore_empty_strings(); +} +} } impl DtoExt for SelectParameters { fn ignore_empty_strings(&mut self) { - self.input_serialization.ignore_empty_strings(); - self.output_serialization.ignore_empty_strings(); - } +self.input_serialization.ignore_empty_strings(); +self.output_serialization.ignore_empty_strings(); +} } impl DtoExt for ServerSideEncryptionByDefault { fn ignore_empty_strings(&mut self) { - if self.kms_master_key_id.as_deref() == Some("") { - self.kms_master_key_id = None; - } - } +if self.kms_master_key_id.as_deref() == Some("") { + self.kms_master_key_id = None; +} +} } impl DtoExt for ServerSideEncryptionConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ServerSideEncryptionRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.apply_server_side_encryption_by_default { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.apply_server_side_encryption_by_default { +val.ignore_empty_strings(); +} +} } impl DtoExt for SessionCredentials { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for SourceSelectionCriteria { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.replica_modifications { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.sse_kms_encrypted_objects { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.replica_modifications { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.sse_kms_encrypted_objects { +val.ignore_empty_strings(); +} +} } impl DtoExt for SseKmsEncryptedObjects { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for Stats { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for StatsEvent { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.details { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.details { +val.ignore_empty_strings(); +} +} } impl DtoExt for StorageClassAnalysis { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.data_export { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.data_export { +val.ignore_empty_strings(); +} +} } impl DtoExt for StorageClassAnalysisDataExport { fn ignore_empty_strings(&mut self) { - self.destination.ignore_empty_strings(); - } +self.destination.ignore_empty_strings(); +} } impl DtoExt for Tag { fn ignore_empty_strings(&mut self) { - if self.key.as_deref() == Some("") { - self.key = None; - } - if self.value.as_deref() == Some("") { - self.value = None; - } - } +if self.key.as_deref() == Some("") { + self.key = None; +} +if self.value.as_deref() == Some("") { + self.value = None; +} +} } impl DtoExt for Tagging { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for TargetGrant { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.grantee { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.permission - && val.as_str() == "" - { - self.permission = None; - } - } +if let Some(ref mut val) = self.grantee { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.permission + && val.as_str() == "" { + self.permission = None; +} +} } impl DtoExt for TargetObjectKeyFormat { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.partitioned_prefix { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.partitioned_prefix { +val.ignore_empty_strings(); +} +} } impl DtoExt for Tiering { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for TopicConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +} } impl DtoExt for Transition { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +} } impl DtoExt for UploadPartCopyInput { fn ignore_empty_strings(&mut self) { - if self.copy_source_range.as_deref() == Some("") { - self.copy_source_range = None; - } - if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { - self.copy_source_sse_customer_algorithm = None; - } - if self.copy_source_sse_customer_key.as_deref() == Some("") { - self.copy_source_sse_customer_key = None; - } - if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { - self.copy_source_sse_customer_key_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.expected_source_bucket_owner.as_deref() == Some("") { - self.expected_source_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - } +if self.copy_source_range.as_deref() == Some("") { + self.copy_source_range = None; +} +if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { + self.copy_source_sse_customer_algorithm = None; +} +if self.copy_source_sse_customer_key.as_deref() == Some("") { + self.copy_source_sse_customer_key = None; +} +if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { + self.copy_source_sse_customer_key_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.expected_source_bucket_owner.as_deref() == Some("") { + self.expected_source_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +} } impl DtoExt for UploadPartCopyOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.copy_part_result { - val.ignore_empty_strings(); - } - if self.copy_source_version_id.as_deref() == Some("") { - self.copy_source_version_id = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - } +if let Some(ref mut val) = self.copy_part_result { +val.ignore_empty_strings(); +} +if self.copy_source_version_id.as_deref() == Some("") { + self.copy_source_version_id = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +} } impl DtoExt for UploadPartInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +} } impl DtoExt for UploadPartOutput { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +} } impl DtoExt for VersioningConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.mfa_delete - && val.as_str() == "" - { - self.mfa_delete = None; - } - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if let Some(ref val) = self.mfa_delete + && val.as_str() == "" { + self.mfa_delete = None; +} +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} } impl DtoExt for WebsiteConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.error_document { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.index_document { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.redirect_all_requests_to { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.error_document { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.index_document { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.redirect_all_requests_to { +val.ignore_empty_strings(); +} +} } impl DtoExt for WriteGetObjectResponseInput { fn ignore_empty_strings(&mut self) { - if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_range.as_deref() == Some("") { - self.content_range = None; - } - if self.error_code.as_deref() == Some("") { - self.error_code = None; - } - if self.error_message.as_deref() == Some("") { - self.error_message = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.replication_status - && val.as_str() == "" - { - self.replication_status = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.restore.as_deref() == Some("") { - self.restore = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_range.as_deref() == Some("") { + self.content_range = None; +} +if self.error_code.as_deref() == Some("") { + self.error_code = None; +} +if self.error_message.as_deref() == Some("") { + self.error_message = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.replication_status + && val.as_str() == "" { + self.replication_status = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.restore.as_deref() == Some("") { + self.restore = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } // NOTE: PostObject is a synthetic API in s3s. @@ -38308,6 +38840,7 @@ pub(crate) fn post_object_output_into_put_object_output(x: PostObjectOutput) -> } } + #[derive(Debug, Default)] pub struct CachedTags(std::sync::OnceLock>); @@ -38343,16 +38876,16 @@ impl<'de> serde::Deserialize<'de> for CachedTags { D: serde::Deserializer<'de>, { // Deserialize and ignore the data, return default (empty cache) - use serde::de::{MapAccess, Visitor}; + use serde::de::{Visitor, MapAccess}; struct CachedTagsVisitor; - + impl<'de> Visitor<'de> for CachedTagsVisitor { type Value = CachedTags; - + fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { formatter.write_str("a map") } - + fn visit_map(self, mut access: M) -> Result where M: MapAccess<'de>, @@ -38362,7 +38895,7 @@ impl<'de> serde::Deserialize<'de> for CachedTags { Ok(CachedTags::default()) } } - + deserializer.deserialize_map(CachedTagsVisitor) } } @@ -38383,7 +38916,7 @@ impl CachedTags { if let Some(tags) = get_and_tags() { for tag in tags { - let (Some(k), Some(v)) = (&tag.key, &tag.value) else { continue }; + let (Some(k), Some(v)) = (&tag.key, &tag.value) else {continue}; if !k.is_empty() { map.insert(k.clone(), v.clone()); } @@ -38491,3 +39024,5 @@ mod minio_tests { assert!(filter.test_tags(&object_tags).not()); } } + + diff --git a/crates/s3s/src/http/de.rs b/crates/s3s/src/http/de.rs index ec9156a5..00ec6957 100644 --- a/crates/s3s/src/http/de.rs +++ b/crates/s3s/src/http/de.rs @@ -258,6 +258,59 @@ where result } +/// MinIO compatibility: literal `" Enabled "` (with spaces) for legacy object lock/versioning config. +#[cfg(feature = "minio")] +fn is_minio_enabled_literal(bytes: &[u8]) -> bool { + bytes.trim_ascii() == b"Enabled" +} + +/// MinIO compatibility: take ObjectLockConfiguration, accepting literal `" Enabled "` as enabled. +#[cfg(feature = "minio")] +pub fn take_opt_object_lock_configuration(req: &mut Request) -> S3Result> { + use crate::dto::{ObjectLockConfiguration, ObjectLockEnabled}; + use stdx::default::default; + + let bytes = req.body.take_bytes().expect("full body not found"); + if bytes.is_empty() { + return Ok(None); + } + if is_minio_enabled_literal(&bytes) { + return Ok(Some(ObjectLockConfiguration { + object_lock_enabled: Some(ObjectLockEnabled::from("Enabled".to_owned())), + rule: None, + ..default() + })); + } + let result = deserialize_xml::(&bytes).map(Some); + if result.is_err() { + error!(?bytes, "malformed xml body"); + } + result +} + +/// MinIO compatibility: take VersioningConfiguration, accepting literal `" Enabled "` as enabled. +#[cfg(feature = "minio")] +pub fn take_versioning_configuration(req: &mut Request) -> S3Result { + use crate::dto::{BucketVersioningStatus, VersioningConfiguration}; + use stdx::default::default; + + let bytes = req.body.take_bytes().expect("full body not found"); + if bytes.is_empty() { + return Err(S3ErrorCode::MissingRequestBodyError.into()); + } + if is_minio_enabled_literal(&bytes) { + return Ok(VersioningConfiguration { + status: Some(BucketVersioningStatus::from("Enabled".to_owned())), + ..default() + }); + } + let result = deserialize_xml::(&bytes); + if result.is_err() { + error!(?bytes, "malformed xml body"); + } + result +} + pub fn take_string_body(req: &mut Request) -> S3Result { let bytes = req.body.take_bytes().expect("full body not found"); match String::from_utf8_simd(bytes.into()) { diff --git a/crates/s3s/src/ops/generated_minio.rs b/crates/s3s/src/ops/generated_minio.rs index 6d045216..63325dba 100644 --- a/crates/s3s/src/ops/generated_minio.rs +++ b/crates/s3s/src/ops/generated_minio.rs @@ -108,6590 +108,6801 @@ #![allow(clippy::unnecessary_wraps)] use crate::dto::*; -use crate::error::*; use crate::header::*; use crate::http; -use crate::ops::CallContext; +use crate::error::*; use crate::path::S3Path; +use crate::ops::CallContext; use std::borrow::Cow; impl http::TryIntoHeaderValue for ArchiveStatus { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for BucketCannedACL { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ChecksumAlgorithm { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ChecksumMode { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ChecksumType { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for LocationType { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for MetadataDirective { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectAttributes { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectCannedACL { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectLockLegalHoldStatus { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectLockMode { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectOwnership { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for OptionalObjectAttributes { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ReplicationStatus { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for RequestCharged { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for RequestPayer { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ServerSideEncryption { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for SessionMode { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for StorageClass { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for TaggingDirective { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for TransitionDefaultMinimumObjectSize { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryFromHeaderValue for ArchiveStatus { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for BucketCannedACL { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ChecksumAlgorithm { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ChecksumMode { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ChecksumType { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for LocationType { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for MetadataDirective { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectAttributes { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectCannedACL { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectLockLegalHoldStatus { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectLockMode { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectOwnership { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for OptionalObjectAttributes { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ReplicationStatus { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for RequestCharged { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for RequestPayer { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ServerSideEncryption { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for SessionMode { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for StorageClass { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for TaggingDirective { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for TransitionDefaultMinimumObjectSize { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } pub struct AbortMultipartUpload; impl AbortMultipartUpload { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let if_match_initiated_time: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_INITIATED_TIME, TimestampFormat::HttpDate)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let if_match_initiated_time: Option = http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_INITIATED_TIME, TimestampFormat::HttpDate)?; - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - Ok(AbortMultipartUploadInput { - bucket, - expected_bucket_owner, - if_match_initiated_time, - key, - request_payer, - upload_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(AbortMultipartUploadInput { +bucket, +expected_bucket_owner, +if_match_initiated_time, +key, +request_payer, +upload_id, +}) +} + + +pub fn serialize_http(x: AbortMultipartUploadOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: AbortMultipartUploadOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for AbortMultipartUpload { - fn name(&self) -> &'static str { - "AbortMultipartUpload" - } +fn name(&self) -> &'static str { +"AbortMultipartUpload" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.abort_multipart_upload(&mut s3_req).await?; - } - let result = s3.abort_multipart_upload(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.abort_multipart_upload(&mut s3_req).await?; +} +let result = s3.abort_multipart_upload(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CompleteMultipartUpload; impl CompleteMultipartUpload { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; +let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; +let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; - let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; +let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; - let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; +let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; - let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; +let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - let mpu_object_size: Option = http::parse_opt_header(req, &X_AMZ_MP_OBJECT_SIZE)?; +let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - let multipart_upload: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); - } - Err(e) => return Err(e), - }; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - - Ok(CompleteMultipartUploadInput { - bucket, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - checksum_type, - expected_bucket_owner, - if_match, - if_none_match, - key, - mpu_object_size, - multipart_upload, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) +let mpu_object_size: Option = http::parse_opt_header(req, &X_AMZ_MP_OBJECT_SIZE)?; + +let multipart_upload: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); } + Err(e) => return Err(e), +}; + +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(CompleteMultipartUploadInput { +bucket, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +checksum_type, +expected_bucket_owner, +if_match, +if_none_match, +key, +mpu_object_size, +multipart_upload, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + + } #[async_trait::async_trait] impl super::Operation for CompleteMultipartUpload { - fn name(&self) -> &'static str { - "CompleteMultipartUpload" - } +fn name(&self) -> &'static str { +"CompleteMultipartUpload" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.complete_multipart_upload(&mut s3_req).await?; - } - let result = s3.complete_multipart_upload(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.complete_multipart_upload(&mut s3_req).await?; +} +let result = s3.complete_multipart_upload(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CopyObject; impl CopyObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; - let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; +let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; - let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; +let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; - let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; +let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; - let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; +let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; - let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; +let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; - let copy_source_if_modified_since: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; +let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; - let copy_source_if_none_match: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; +let copy_source_if_modified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - let copy_source_if_unmodified_since: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; +let copy_source_if_none_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; - let copy_source_sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let copy_source_if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; - let copy_source_sse_customer_key: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let copy_source_sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let copy_source_sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let copy_source_sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let copy_source_sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; +let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let metadata: Option = http::parse_opt_metadata(req)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let metadata_directive: Option = http::parse_opt_header(req, &X_AMZ_METADATA_DIRECTIVE)?; - let object_lock_legal_hold_status: Option = - http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; +let metadata: Option = http::parse_opt_metadata(req)?; - let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; +let metadata_directive: Option = http::parse_opt_header(req, &X_AMZ_METADATA_DIRECTIVE)?; - let object_lock_retain_until_date: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; +let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let ssekms_encryption_context: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; +let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; - let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; - let tagging_directive: Option = http::parse_opt_header(req, &X_AMZ_TAGGING_DIRECTIVE)?; +let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; - let website_redirect_location: Option = - http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; +let tagging_directive: Option = http::parse_opt_header(req, &X_AMZ_TAGGING_DIRECTIVE)?; - Ok(CopyObjectInput { - acl, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - content_disposition, - content_encoding, - content_language, - content_type, - copy_source, - copy_source_if_match, - copy_source_if_modified_since, - copy_source_if_none_match, - copy_source_if_unmodified_since, - copy_source_sse_customer_algorithm, - copy_source_sse_customer_key, - copy_source_sse_customer_key_md5, - expected_bucket_owner, - expected_source_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - key, - metadata, - metadata_directive, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - tagging_directive, - version_id, - website_redirect_location, - }) - } +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; + +Ok(CopyObjectInput { +acl, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +content_disposition, +content_encoding, +content_language, +content_type, +copy_source, +copy_source_if_match, +copy_source_if_modified_since, +copy_source_if_none_match, +copy_source_if_unmodified_since, +copy_source_sse_customer_algorithm, +copy_source_sse_customer_key, +copy_source_sse_customer_key_md5, +expected_bucket_owner, +expected_source_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +key, +metadata, +metadata_directive, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +tagging_directive, +version_id, +website_redirect_location, +}) +} + + +pub fn serialize_http(x: CopyObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.copy_object_result { + http::set_xml_body(&mut res, val)?; +} +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; +http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: CopyObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.copy_object_result { - http::set_xml_body(&mut res, val)?; - } - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; - http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for CopyObject { - fn name(&self) -> &'static str { - "CopyObject" - } +fn name(&self) -> &'static str { +"CopyObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.copy_object(&mut s3_req).await?; - } - let result = s3.copy_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.copy_object(&mut s3_req).await?; +} +let result = s3.copy_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CreateBucket; impl CreateBucket { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let create_bucket_configuration: Option = http::take_opt_xml_body(req)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let create_bucket_configuration: Option = http::take_opt_xml_body(req)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; - let object_lock_enabled_for_bucket: Option = - http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_ENABLED)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let object_ownership: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_OWNERSHIP)?; +let object_lock_enabled_for_bucket: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_ENABLED)?; - Ok(CreateBucketInput { - acl, - bucket, - create_bucket_configuration, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - object_lock_enabled_for_bucket, - object_ownership, - }) - } +let object_ownership: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_OWNERSHIP)?; + +Ok(CreateBucketInput { +acl, +bucket, +create_bucket_configuration, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +object_lock_enabled_for_bucket, +object_ownership, +}) +} + + +pub fn serialize_http(x: CreateBucketOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, LOCATION, x.location)?; +Ok(res) +} - pub fn serialize_http(x: CreateBucketOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, LOCATION, x.location)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for CreateBucket { - fn name(&self) -> &'static str { - "CreateBucket" - } +fn name(&self) -> &'static str { +"CreateBucket" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.create_bucket(&mut s3_req).await?; - } - let result = s3.create_bucket(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.create_bucket(&mut s3_req).await?; +} +let result = s3.create_bucket(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CreateBucketMetadataTableConfiguration; impl CreateBucketMetadataTableConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let metadata_table_configuration: MetadataTableConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(CreateBucketMetadataTableConfigurationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - metadata_table_configuration, - }) - } +let metadata_table_configuration: MetadataTableConfiguration = http::take_xml_body(req)?; + +Ok(CreateBucketMetadataTableConfigurationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +metadata_table_configuration, +}) +} + + +pub fn serialize_http(_: CreateBucketMetadataTableConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: CreateBucketMetadataTableConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for CreateBucketMetadataTableConfiguration { - fn name(&self) -> &'static str { - "CreateBucketMetadataTableConfiguration" - } +fn name(&self) -> &'static str { +"CreateBucketMetadataTableConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.create_bucket_metadata_table_configuration(&mut s3_req).await?; - } - let result = s3.create_bucket_metadata_table_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.create_bucket_metadata_table_configuration(&mut s3_req).await?; +} +let result = s3.create_bucket_metadata_table_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CreateMultipartUpload; impl CreateMultipartUpload { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; - let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; +let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; - let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; +let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; - let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; +let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; - let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; +let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; - let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let metadata: Option = http::parse_opt_metadata(req)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let object_lock_legal_hold_status: Option = - http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; +let metadata: Option = http::parse_opt_metadata(req)?; - let object_lock_retain_until_date: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; +let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let ssekms_encryption_context: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; +let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; - let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; - let website_redirect_location: Option = - http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; +let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; - Ok(CreateMultipartUploadInput { - acl, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_type, - content_disposition, - content_encoding, - content_language, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - version_id, - website_redirect_location, - }) - } +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; + +Ok(CreateMultipartUploadInput { +acl, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_type, +content_disposition, +content_encoding, +content_language, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +version_id, +website_redirect_location, +}) +} + + +pub fn serialize_http(x: CreateMultipartUploadOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; +http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_ALGORITHM, x.checksum_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +Ok(res) +} - pub fn serialize_http(x: CreateMultipartUploadOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; - http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_ALGORITHM, x.checksum_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for CreateMultipartUpload { - fn name(&self) -> &'static str { - "CreateMultipartUpload" - } +fn name(&self) -> &'static str { +"CreateMultipartUpload" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.create_multipart_upload(&mut s3_req).await?; - } - let result = s3.create_multipart_upload(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.create_multipart_upload(&mut s3_req).await?; +} +let result = s3.create_multipart_upload(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CreateSession; impl CreateSession { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let ssekms_encryption_context: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; +let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; - let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - let session_mode: Option = http::parse_opt_header(req, &X_AMZ_CREATE_SESSION_MODE)?; +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; - Ok(CreateSessionInput { - bucket, - bucket_key_enabled, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - session_mode, - }) - } +let session_mode: Option = http::parse_opt_header(req, &X_AMZ_CREATE_SESSION_MODE)?; + +Ok(CreateSessionInput { +bucket, +bucket_key_enabled, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +session_mode, +}) +} + + +pub fn serialize_http(x: CreateSessionOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +Ok(res) +} - pub fn serialize_http(x: CreateSessionOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for CreateSession { - fn name(&self) -> &'static str { - "CreateSession" - } +fn name(&self) -> &'static str { +"CreateSession" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.create_session(&mut s3_req).await?; - } - let result = s3.create_session(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.create_session(&mut s3_req).await?; +} +let result = s3.create_session(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucket; impl DeleteBucket { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let force_delete: Option = http::parse_opt_header(req, &X_MINIO_FORCE_DELETE)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketInput { - bucket, - expected_bucket_owner, - force_delete, - }) - } +let force_delete: Option = http::parse_opt_header(req, &X_MINIO_FORCE_DELETE)?; + +Ok(DeleteBucketInput { +bucket, +expected_bucket_owner, +force_delete, +}) +} + + +pub fn serialize_http(_: DeleteBucketOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucket { - fn name(&self) -> &'static str { - "DeleteBucket" - } +fn name(&self) -> &'static str { +"DeleteBucket" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket(&mut s3_req).await?; - } - let result = s3.delete_bucket(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket(&mut s3_req).await?; +} +let result = s3.delete_bucket(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketAnalyticsConfiguration; impl DeleteBucketAnalyticsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: AnalyticsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketAnalyticsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: AnalyticsId = http::parse_query(req, "id")?; + +Ok(DeleteBucketAnalyticsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(_: DeleteBucketAnalyticsConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketAnalyticsConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketAnalyticsConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketAnalyticsConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketAnalyticsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_analytics_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_analytics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_analytics_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_analytics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketCors; impl DeleteBucketCors { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketCorsInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketCorsInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketCorsOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketCorsOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketCors { - fn name(&self) -> &'static str { - "DeleteBucketCors" - } +fn name(&self) -> &'static str { +"DeleteBucketCors" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_cors(&mut s3_req).await?; - } - let result = s3.delete_bucket_cors(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_cors(&mut s3_req).await?; +} +let result = s3.delete_bucket_cors(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketEncryption; impl DeleteBucketEncryption { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketEncryptionInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketEncryptionInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketEncryptionOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketEncryptionOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketEncryption { - fn name(&self) -> &'static str { - "DeleteBucketEncryption" - } +fn name(&self) -> &'static str { +"DeleteBucketEncryption" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_encryption(&mut s3_req).await?; - } - let result = s3.delete_bucket_encryption(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_encryption(&mut s3_req).await?; +} +let result = s3.delete_bucket_encryption(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketIntelligentTieringConfiguration; impl DeleteBucketIntelligentTieringConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let id: IntelligentTieringId = http::parse_query(req, "id")?; - Ok(DeleteBucketIntelligentTieringConfigurationInput { bucket, id }) - } +let id: IntelligentTieringId = http::parse_query(req, "id")?; + +Ok(DeleteBucketIntelligentTieringConfigurationInput { +bucket, +id, +}) +} + + +pub fn serialize_http(_: DeleteBucketIntelligentTieringConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketIntelligentTieringConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketIntelligentTieringConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketIntelligentTieringConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketIntelligentTieringConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_intelligent_tiering_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_intelligent_tiering_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_intelligent_tiering_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_intelligent_tiering_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketInventoryConfiguration; impl DeleteBucketInventoryConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: InventoryId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: InventoryId = http::parse_query(req, "id")?; + +Ok(DeleteBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(_: DeleteBucketInventoryConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketInventoryConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketInventoryConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketInventoryConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketInventoryConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_inventory_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_inventory_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_inventory_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_inventory_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketLifecycle; impl DeleteBucketLifecycle { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketLifecycleInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketLifecycleInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketLifecycleOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketLifecycleOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketLifecycle { - fn name(&self) -> &'static str { - "DeleteBucketLifecycle" - } +fn name(&self) -> &'static str { +"DeleteBucketLifecycle" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_lifecycle(&mut s3_req).await?; - } - let result = s3.delete_bucket_lifecycle(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_lifecycle(&mut s3_req).await?; +} +let result = s3.delete_bucket_lifecycle(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketMetadataTableConfiguration; impl DeleteBucketMetadataTableConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketMetadataTableConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketMetadataTableConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketMetadataTableConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketMetadataTableConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketMetadataTableConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketMetadataTableConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketMetadataTableConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_metadata_table_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_metadata_table_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_metadata_table_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_metadata_table_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketMetricsConfiguration; impl DeleteBucketMetricsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: MetricsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: MetricsId = http::parse_query(req, "id")?; + +Ok(DeleteBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(_: DeleteBucketMetricsConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketMetricsConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketMetricsConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketMetricsConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketMetricsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_metrics_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_metrics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_metrics_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_metrics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketOwnershipControls; impl DeleteBucketOwnershipControls { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketOwnershipControlsInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketOwnershipControlsInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketOwnershipControlsOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketOwnershipControlsOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketOwnershipControls { - fn name(&self) -> &'static str { - "DeleteBucketOwnershipControls" - } +fn name(&self) -> &'static str { +"DeleteBucketOwnershipControls" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_ownership_controls(&mut s3_req).await?; - } - let result = s3.delete_bucket_ownership_controls(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_ownership_controls(&mut s3_req).await?; +} +let result = s3.delete_bucket_ownership_controls(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketPolicy; impl DeleteBucketPolicy { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketPolicyInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - pub fn serialize_http(_: DeleteBucketPolicyOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } +Ok(DeleteBucketPolicyInput { +bucket, +expected_bucket_owner, +}) } -#[async_trait::async_trait] -impl super::Operation for DeleteBucketPolicy { - fn name(&self) -> &'static str { - "DeleteBucketPolicy" - } - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_policy(&mut s3_req).await?; - } - let result = s3.delete_bucket_policy(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +pub fn serialize_http(_: DeleteBucketPolicyOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} + +} + +#[async_trait::async_trait] +impl super::Operation for DeleteBucketPolicy { +fn name(&self) -> &'static str { +"DeleteBucketPolicy" +} + +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_policy(&mut s3_req).await?; +} +let result = s3.delete_bucket_policy(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketReplication; impl DeleteBucketReplication { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketReplicationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketReplicationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketReplicationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketReplicationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketReplication { - fn name(&self) -> &'static str { - "DeleteBucketReplication" - } +fn name(&self) -> &'static str { +"DeleteBucketReplication" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_replication(&mut s3_req).await?; - } - let result = s3.delete_bucket_replication(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_replication(&mut s3_req).await?; +} +let result = s3.delete_bucket_replication(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketTagging; impl DeleteBucketTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketTaggingInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketTaggingInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketTaggingOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketTaggingOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketTagging { - fn name(&self) -> &'static str { - "DeleteBucketTagging" - } +fn name(&self) -> &'static str { +"DeleteBucketTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_tagging(&mut s3_req).await?; - } - let result = s3.delete_bucket_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_tagging(&mut s3_req).await?; +} +let result = s3.delete_bucket_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketWebsite; impl DeleteBucketWebsite { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketWebsiteInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketWebsiteInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketWebsiteOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketWebsiteOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketWebsite { - fn name(&self) -> &'static str { - "DeleteBucketWebsite" - } +fn name(&self) -> &'static str { +"DeleteBucketWebsite" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_website(&mut s3_req).await?; - } - let result = s3.delete_bucket_website(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_website(&mut s3_req).await?; +} +let result = s3.delete_bucket_website(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteObject; impl DeleteObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let bypass_governance_retention: Option = - http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let if_match_last_modified_time: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_LAST_MODIFIED_TIME, TimestampFormat::HttpDate)?; +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - let if_match_size: Option = http::parse_opt_header(req, &X_AMZ_IF_MATCH_SIZE)?; +let if_match_last_modified_time: Option = http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_LAST_MODIFIED_TIME, TimestampFormat::HttpDate)?; - let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; +let if_match_size: Option = http::parse_opt_header(req, &X_AMZ_IF_MATCH_SIZE)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; - Ok(DeleteObjectInput { - bucket, - bypass_governance_retention, - expected_bucket_owner, - if_match, - if_match_last_modified_time, - if_match_size, - key, - mfa, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(DeleteObjectInput { +bucket, +bypass_governance_retention, +expected_bucket_owner, +if_match, +if_match_last_modified_time, +if_match_size, +key, +mfa, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: DeleteObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); +http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: DeleteObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); - http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for DeleteObject { - fn name(&self) -> &'static str { - "DeleteObject" - } +fn name(&self) -> &'static str { +"DeleteObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_object(&mut s3_req).await?; - } - let result = s3.delete_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_object(&mut s3_req).await?; +} +let result = s3.delete_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteObjectTagging; impl DeleteObjectTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteObjectTaggingInput { - bucket, - expected_bucket_owner, - key, - version_id, - }) - } - pub fn serialize_http(x: DeleteObjectTaggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(DeleteObjectTaggingInput { +bucket, +expected_bucket_owner, +key, +version_id, +}) +} + + +pub fn serialize_http(x: DeleteObjectTaggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} + } #[async_trait::async_trait] impl super::Operation for DeleteObjectTagging { - fn name(&self) -> &'static str { - "DeleteObjectTagging" - } +fn name(&self) -> &'static str { +"DeleteObjectTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_object_tagging(&mut s3_req).await?; - } - let result = s3.delete_object_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_object_tagging(&mut s3_req).await?; +} +let result = s3.delete_object_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteObjects; impl DeleteObjects { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let bypass_governance_retention: Option = - http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let delete: Delete = http::take_xml_body(req)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let delete: Delete = http::take_xml_body(req)?; - let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; - Ok(DeleteObjectsInput { - bucket, - bypass_governance_retention, - checksum_algorithm, - delete, - expected_bucket_owner, - mfa, - request_payer, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +Ok(DeleteObjectsInput { +bucket, +bypass_governance_retention, +checksum_algorithm, +delete, +expected_bucket_owner, +mfa, +request_payer, +}) +} + + +pub fn serialize_http(x: DeleteObjectsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: DeleteObjectsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for DeleteObjects { - fn name(&self) -> &'static str { - "DeleteObjects" - } +fn name(&self) -> &'static str { +"DeleteObjects" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_objects(&mut s3_req).await?; - } - let result = s3.delete_objects(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_objects(&mut s3_req).await?; +} +let result = s3.delete_objects(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeletePublicAccessBlock; impl DeletePublicAccessBlock { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeletePublicAccessBlockInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeletePublicAccessBlockInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeletePublicAccessBlockOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeletePublicAccessBlockOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeletePublicAccessBlock { - fn name(&self) -> &'static str { - "DeletePublicAccessBlock" - } +fn name(&self) -> &'static str { +"DeletePublicAccessBlock" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_public_access_block(&mut s3_req).await?; - } - let result = s3.delete_public_access_block(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_public_access_block(&mut s3_req).await?; +} +let result = s3.delete_public_access_block(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketAccelerateConfiguration; impl GetBucketAccelerateConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketAccelerateConfigurationInput { - bucket, - expected_bucket_owner, - request_payer, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +Ok(GetBucketAccelerateConfigurationInput { +bucket, +expected_bucket_owner, +request_payer, +}) +} + + +pub fn serialize_http(x: GetBucketAccelerateConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketAccelerateConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketAccelerateConfiguration { - fn name(&self) -> &'static str { - "GetBucketAccelerateConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketAccelerateConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_accelerate_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_accelerate_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_accelerate_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_accelerate_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketAcl; impl GetBucketAcl { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketAclInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketAclInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketAclOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketAclOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketAcl { - fn name(&self) -> &'static str { - "GetBucketAcl" - } +fn name(&self) -> &'static str { +"GetBucketAcl" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_acl(&mut s3_req).await?; - } - let result = s3.get_bucket_acl(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_acl(&mut s3_req).await?; +} +let result = s3.get_bucket_acl(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketAnalyticsConfiguration; impl GetBucketAnalyticsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: AnalyticsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketAnalyticsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: AnalyticsId = http::parse_query(req, "id")?; + +Ok(GetBucketAnalyticsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(x: GetBucketAnalyticsConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.analytics_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketAnalyticsConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.analytics_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketAnalyticsConfiguration { - fn name(&self) -> &'static str { - "GetBucketAnalyticsConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketAnalyticsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_analytics_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_analytics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_analytics_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_analytics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketCors; impl GetBucketCors { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketCorsInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketCorsInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketCorsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketCorsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketCors { - fn name(&self) -> &'static str { - "GetBucketCors" - } +fn name(&self) -> &'static str { +"GetBucketCors" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_cors(&mut s3_req).await?; - } - let result = s3.get_bucket_cors(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_cors(&mut s3_req).await?; +} +let result = s3.get_bucket_cors(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketEncryption; impl GetBucketEncryption { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketEncryptionInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketEncryptionInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketEncryptionOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.server_side_encryption_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketEncryptionOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.server_side_encryption_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketEncryption { - fn name(&self) -> &'static str { - "GetBucketEncryption" - } +fn name(&self) -> &'static str { +"GetBucketEncryption" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_encryption(&mut s3_req).await?; - } - let result = s3.get_bucket_encryption(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_encryption(&mut s3_req).await?; +} +let result = s3.get_bucket_encryption(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketIntelligentTieringConfiguration; impl GetBucketIntelligentTieringConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let id: IntelligentTieringId = http::parse_query(req, "id")?; - Ok(GetBucketIntelligentTieringConfigurationInput { bucket, id }) - } +let id: IntelligentTieringId = http::parse_query(req, "id")?; + +Ok(GetBucketIntelligentTieringConfigurationInput { +bucket, +id, +}) +} + + +pub fn serialize_http(x: GetBucketIntelligentTieringConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.intelligent_tiering_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketIntelligentTieringConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.intelligent_tiering_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketIntelligentTieringConfiguration { - fn name(&self) -> &'static str { - "GetBucketIntelligentTieringConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketIntelligentTieringConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_intelligent_tiering_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_intelligent_tiering_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_intelligent_tiering_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_intelligent_tiering_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketInventoryConfiguration; impl GetBucketInventoryConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: InventoryId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: InventoryId = http::parse_query(req, "id")?; + +Ok(GetBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(x: GetBucketInventoryConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.inventory_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketInventoryConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.inventory_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketInventoryConfiguration { - fn name(&self) -> &'static str { - "GetBucketInventoryConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketInventoryConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_inventory_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_inventory_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_inventory_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_inventory_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketLifecycleConfiguration; impl GetBucketLifecycleConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketLifecycleConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketLifecycleConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketLifecycleConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, x.transition_default_minimum_object_size)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketLifecycleConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header( - &mut res, - X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, - x.transition_default_minimum_object_size, - )?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketLifecycleConfiguration { - fn name(&self) -> &'static str { - "GetBucketLifecycleConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketLifecycleConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_lifecycle_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_lifecycle_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_lifecycle_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_lifecycle_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketLocation; impl GetBucketLocation { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketLocationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketLocationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketLocationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketLocationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketLocation { - fn name(&self) -> &'static str { - "GetBucketLocation" - } +fn name(&self) -> &'static str { +"GetBucketLocation" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_location(&mut s3_req).await?; - } - let result = s3.get_bucket_location(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_location(&mut s3_req).await?; +} +let result = s3.get_bucket_location(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketLogging; impl GetBucketLogging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketLoggingInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketLoggingInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketLoggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketLoggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketLogging { - fn name(&self) -> &'static str { - "GetBucketLogging" - } +fn name(&self) -> &'static str { +"GetBucketLogging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_logging(&mut s3_req).await?; - } - let result = s3.get_bucket_logging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_logging(&mut s3_req).await?; +} +let result = s3.get_bucket_logging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketMetadataTableConfiguration; impl GetBucketMetadataTableConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketMetadataTableConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketMetadataTableConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketMetadataTableConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.get_bucket_metadata_table_configuration_result { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketMetadataTableConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.get_bucket_metadata_table_configuration_result { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketMetadataTableConfiguration { - fn name(&self) -> &'static str { - "GetBucketMetadataTableConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketMetadataTableConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_metadata_table_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_metadata_table_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_metadata_table_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_metadata_table_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketMetricsConfiguration; impl GetBucketMetricsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: MetricsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: MetricsId = http::parse_query(req, "id")?; + +Ok(GetBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(x: GetBucketMetricsConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.metrics_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketMetricsConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.metrics_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketMetricsConfiguration { - fn name(&self) -> &'static str { - "GetBucketMetricsConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketMetricsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_metrics_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_metrics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_metrics_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_metrics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketNotificationConfiguration; impl GetBucketNotificationConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketNotificationConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketNotificationConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketNotificationConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketNotificationConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketNotificationConfiguration { - fn name(&self) -> &'static str { - "GetBucketNotificationConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketNotificationConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_notification_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_notification_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_notification_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_notification_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketOwnershipControls; impl GetBucketOwnershipControls { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketOwnershipControlsInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketOwnershipControlsInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketOwnershipControlsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.ownership_controls { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketOwnershipControlsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.ownership_controls { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketOwnershipControls { - fn name(&self) -> &'static str { - "GetBucketOwnershipControls" - } +fn name(&self) -> &'static str { +"GetBucketOwnershipControls" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_ownership_controls(&mut s3_req).await?; - } - let result = s3.get_bucket_ownership_controls(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_ownership_controls(&mut s3_req).await?; +} +let result = s3.get_bucket_ownership_controls(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketPolicy; impl GetBucketPolicy { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketPolicyInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketPolicyInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketPolicyOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(val) = x.policy { +res.body = http::Body::from(val); +} +Ok(res) +} - pub fn serialize_http(x: GetBucketPolicyOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(val) = x.policy { - res.body = http::Body::from(val); - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketPolicy { - fn name(&self) -> &'static str { - "GetBucketPolicy" - } +fn name(&self) -> &'static str { +"GetBucketPolicy" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_policy(&mut s3_req).await?; - } - let result = s3.get_bucket_policy(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_policy(&mut s3_req).await?; +} +let result = s3.get_bucket_policy(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketPolicyStatus; impl GetBucketPolicyStatus { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketPolicyStatusInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketPolicyStatusInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketPolicyStatusOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.policy_status { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketPolicyStatusOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.policy_status { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketPolicyStatus { - fn name(&self) -> &'static str { - "GetBucketPolicyStatus" - } +fn name(&self) -> &'static str { +"GetBucketPolicyStatus" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_policy_status(&mut s3_req).await?; - } - let result = s3.get_bucket_policy_status(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_policy_status(&mut s3_req).await?; +} +let result = s3.get_bucket_policy_status(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketReplication; impl GetBucketReplication { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketReplicationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketReplicationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketReplicationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.replication_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketReplicationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.replication_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketReplication { - fn name(&self) -> &'static str { - "GetBucketReplication" - } +fn name(&self) -> &'static str { +"GetBucketReplication" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_replication(&mut s3_req).await?; - } - let result = s3.get_bucket_replication(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_replication(&mut s3_req).await?; +} +let result = s3.get_bucket_replication(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketRequestPayment; impl GetBucketRequestPayment { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketRequestPaymentInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketRequestPaymentInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketRequestPaymentOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketRequestPaymentOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketRequestPayment { - fn name(&self) -> &'static str { - "GetBucketRequestPayment" - } +fn name(&self) -> &'static str { +"GetBucketRequestPayment" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_request_payment(&mut s3_req).await?; - } - let result = s3.get_bucket_request_payment(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_request_payment(&mut s3_req).await?; +} +let result = s3.get_bucket_request_payment(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketTagging; impl GetBucketTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketTaggingInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketTaggingInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketTaggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketTaggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketTagging { - fn name(&self) -> &'static str { - "GetBucketTagging" - } +fn name(&self) -> &'static str { +"GetBucketTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_tagging(&mut s3_req).await?; - } - let result = s3.get_bucket_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_tagging(&mut s3_req).await?; +} +let result = s3.get_bucket_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketVersioning; impl GetBucketVersioning { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketVersioningInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketVersioningInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketVersioningOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketVersioningOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketVersioning { - fn name(&self) -> &'static str { - "GetBucketVersioning" - } +fn name(&self) -> &'static str { +"GetBucketVersioning" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_versioning(&mut s3_req).await?; - } - let result = s3.get_bucket_versioning(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_versioning(&mut s3_req).await?; +} +let result = s3.get_bucket_versioning(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketWebsite; impl GetBucketWebsite { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketWebsiteInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketWebsiteInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketWebsiteOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketWebsiteOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketWebsite { - fn name(&self) -> &'static str { - "GetBucketWebsite" - } +fn name(&self) -> &'static str { +"GetBucketWebsite" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_website(&mut s3_req).await?; - } - let result = s3.get_bucket_website(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_website(&mut s3_req).await?; +} +let result = s3.get_bucket_website(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObject; impl GetObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let if_modified_since: Option = - http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + +let if_modified_since: Option = http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + +let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + +let if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; - let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - let if_unmodified_since: Option = - http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; +let part_number: Option = http::parse_opt_query(req, "partNumber")?; - let part_number: Option = http::parse_opt_query(req, "partNumber")?; +let range: Option = http::parse_opt_header(req, &RANGE)?; - let range: Option = http::parse_opt_header(req, &RANGE)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; - let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; +let response_content_disposition: Option = http::parse_opt_query(req, "response-content-disposition")?; - let response_content_disposition: Option = - http::parse_opt_query(req, "response-content-disposition")?; +let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; - let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; +let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; - let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; +let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; - let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; +let response_expires: Option = http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; - let response_expires: Option = - http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let version_id: Option = http::parse_opt_query(req, "versionId")?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +Ok(GetObjectInput { +bucket, +checksum_mode, +expected_bucket_owner, +if_match, +if_modified_since, +if_none_match, +if_unmodified_since, +key, +part_number, +range, +request_payer, +response_cache_control, +response_content_disposition, +response_content_encoding, +response_content_language, +response_content_type, +response_expires, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} - Ok(GetObjectInput { - bucket, - checksum_mode, - expected_bucket_owner, - if_match, - if_modified_since, - if_none_match, - if_unmodified_since, - key, - part_number, - range, - request_payer, - response_cache_control, - response_content_disposition, - response_content_encoding, - response_content_language, - response_content_type, - response_expires, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } - pub fn serialize_http(x: GetObjectOutput) -> S3Result { - let mut res = http::Response::default(); - if x.content_range.is_some() { - res.status = http::StatusCode::PARTIAL_CONTENT; - } - if let Some(val) = x.body { - http::set_stream_body(&mut res, val); - } - http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; - http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; - http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; - http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; - http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; - http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; - http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; - http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; - http::add_opt_header(&mut res, ETAG, x.e_tag)?; - http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; - http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; - http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; - http::add_opt_metadata(&mut res, x.metadata)?; - http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; - http::add_opt_header_timestamp( - &mut res, - X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, - x.object_lock_retain_until_date, - TimestampFormat::DateTime, - )?; - http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; - http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; - http::add_opt_header(&mut res, X_AMZ_TAGGING_COUNT, x.tag_count)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; - Ok(res) - } +pub fn serialize_http(x: GetObjectOutput) -> S3Result { +let mut res = http::Response::default(); +if x.content_range.is_some() { + res.status = http::StatusCode::PARTIAL_CONTENT; +} +if let Some(val) = x.body { +http::set_stream_body(&mut res, val); +} +http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; +http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; +http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; +http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; +http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; +http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; +http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; +http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; +http::add_opt_header(&mut res, ETAG, x.e_tag)?; +http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; +http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; +http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; +http::add_opt_metadata(&mut res, x.metadata)?; +http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; +http::add_opt_header_timestamp(&mut res, X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, x.object_lock_retain_until_date, TimestampFormat::DateTime)?; +http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; +http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; +http::add_opt_header(&mut res, X_AMZ_TAGGING_COUNT, x.tag_count)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; +Ok(res) +} + } #[async_trait::async_trait] impl super::Operation for GetObject { - fn name(&self) -> &'static str { - "GetObject" - } +fn name(&self) -> &'static str { +"GetObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object(&mut s3_req).await?; - } - let overridden_headers = super::get_object::extract_overridden_response_headers(&s3_req)?; - let result = s3.get_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(overridden_headers); - super::get_object::merge_custom_headers(&mut resp, s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object(&mut s3_req).await?; +} +let overridden_headers = super::get_object::extract_overridden_response_headers(&s3_req)?; +let result = s3.get_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(overridden_headers); +super::get_object::merge_custom_headers(&mut resp, s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectAcl; impl GetObjectAcl { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(GetObjectAclInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectAclInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectAclOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: GetObjectAclOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectAcl { - fn name(&self) -> &'static str { - "GetObjectAcl" - } +fn name(&self) -> &'static str { +"GetObjectAcl" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_acl(&mut s3_req).await?; - } - let result = s3.get_object_acl(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_acl(&mut s3_req).await?; +} +let result = s3.get_object_acl(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectAttributes; impl GetObjectAttributes { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_parts: Option = http::parse_opt_header(req, &X_AMZ_MAX_PARTS)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let object_attributes: ObjectAttributesList = http::parse_list_header(req, &X_AMZ_OBJECT_ATTRIBUTES)?; - let part_number_marker: Option = http::parse_opt_header(req, &X_AMZ_PART_NUMBER_MARKER)?; +let max_parts: Option = http::parse_opt_header(req, &X_AMZ_MAX_PARTS)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let object_attributes: ObjectAttributesList = http::parse_list_header(req, &X_AMZ_OBJECT_ATTRIBUTES)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let part_number_marker: Option = http::parse_opt_header(req, &X_AMZ_PART_NUMBER_MARKER)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(GetObjectAttributesInput { - bucket, - expected_bucket_owner, - key, - max_parts, - object_attributes, - part_number_marker, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectAttributesInput { +bucket, +expected_bucket_owner, +key, +max_parts, +object_attributes, +part_number_marker, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectAttributesOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; +http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: GetObjectAttributesOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; - http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectAttributes { - fn name(&self) -> &'static str { - "GetObjectAttributes" - } +fn name(&self) -> &'static str { +"GetObjectAttributes" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_attributes(&mut s3_req).await?; - } - let result = s3.get_object_attributes(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_attributes(&mut s3_req).await?; +} +let result = s3.get_object_attributes(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectLegalHold; impl GetObjectLegalHold { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(GetObjectLegalHoldInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectLegalHoldInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectLegalHoldOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.legal_hold { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetObjectLegalHoldOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.legal_hold { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectLegalHold { - fn name(&self) -> &'static str { - "GetObjectLegalHold" - } +fn name(&self) -> &'static str { +"GetObjectLegalHold" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_legal_hold(&mut s3_req).await?; - } - let result = s3.get_object_legal_hold(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_legal_hold(&mut s3_req).await?; +} +let result = s3.get_object_legal_hold(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectLockConfiguration; impl GetObjectLockConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetObjectLockConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetObjectLockConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetObjectLockConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.object_lock_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetObjectLockConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.object_lock_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectLockConfiguration { - fn name(&self) -> &'static str { - "GetObjectLockConfiguration" - } +fn name(&self) -> &'static str { +"GetObjectLockConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_lock_configuration(&mut s3_req).await?; - } - let result = s3.get_object_lock_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_lock_configuration(&mut s3_req).await?; +} +let result = s3.get_object_lock_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectRetention; impl GetObjectRetention { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(GetObjectRetentionInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectRetentionInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectRetentionOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.retention { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetObjectRetentionOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.retention { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectRetention { - fn name(&self) -> &'static str { - "GetObjectRetention" - } +fn name(&self) -> &'static str { +"GetObjectRetention" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_retention(&mut s3_req).await?; - } - let result = s3.get_object_retention(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_retention(&mut s3_req).await?; +} +let result = s3.get_object_retention(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectTagging; impl GetObjectTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(GetObjectTaggingInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectTaggingInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectTaggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: GetObjectTaggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectTagging { - fn name(&self) -> &'static str { - "GetObjectTagging" - } +fn name(&self) -> &'static str { +"GetObjectTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_tagging(&mut s3_req).await?; - } - let result = s3.get_object_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_tagging(&mut s3_req).await?; +} +let result = s3.get_object_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectTorrent; impl GetObjectTorrent { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetObjectTorrentInput { - bucket, - expected_bucket_owner, - key, - request_payer, - }) - } - pub fn serialize_http(x: GetObjectTorrentOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(val) = x.body { - http::set_stream_body(&mut res, val); - } - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +Ok(GetObjectTorrentInput { +bucket, +expected_bucket_owner, +key, +request_payer, +}) +} + + +pub fn serialize_http(x: GetObjectTorrentOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(val) = x.body { +http::set_stream_body(&mut res, val); +} +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} + } #[async_trait::async_trait] impl super::Operation for GetObjectTorrent { - fn name(&self) -> &'static str { - "GetObjectTorrent" - } +fn name(&self) -> &'static str { +"GetObjectTorrent" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_torrent(&mut s3_req).await?; - } - let result = s3.get_object_torrent(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_torrent(&mut s3_req).await?; +} +let result = s3.get_object_torrent(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) } +} + +pub struct GetPublicAccessBlock; + +impl GetPublicAccessBlock { +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); + -pub struct GetPublicAccessBlock; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -impl GetPublicAccessBlock { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +Ok(GetPublicAccessBlockInput { +bucket, +expected_bucket_owner, +}) +} - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetPublicAccessBlockInput { - bucket, - expected_bucket_owner, - }) - } +pub fn serialize_http(x: GetPublicAccessBlockOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.public_access_block_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetPublicAccessBlockOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.public_access_block_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetPublicAccessBlock { - fn name(&self) -> &'static str { - "GetPublicAccessBlock" - } +fn name(&self) -> &'static str { +"GetPublicAccessBlock" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_public_access_block(&mut s3_req).await?; - } - let result = s3.get_public_access_block(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_public_access_block(&mut s3_req).await?; +} +let result = s3.get_public_access_block(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct HeadBucket; impl HeadBucket { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(HeadBucketInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(HeadBucketInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: HeadBucketOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_ACCESS_POINT_ALIAS, x.access_point_alias)?; +http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_NAME, x.bucket_location_name)?; +http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_TYPE, x.bucket_location_type)?; +http::add_opt_header(&mut res, X_AMZ_BUCKET_REGION, x.bucket_region)?; +Ok(res) +} - pub fn serialize_http(x: HeadBucketOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_ACCESS_POINT_ALIAS, x.access_point_alias)?; - http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_NAME, x.bucket_location_name)?; - http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_TYPE, x.bucket_location_type)?; - http::add_opt_header(&mut res, X_AMZ_BUCKET_REGION, x.bucket_region)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for HeadBucket { - fn name(&self) -> &'static str { - "HeadBucket" - } +fn name(&self) -> &'static str { +"HeadBucket" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.head_bucket(&mut s3_req).await?; - } - let result = s3.head_bucket(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.head_bucket(&mut s3_req).await?; +} +let result = s3.head_bucket(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct HeadObject; impl HeadObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + +let if_modified_since: Option = http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + +let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +let if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; - let if_modified_since: Option = - http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; +let part_number: Option = http::parse_opt_query(req, "partNumber")?; - let if_unmodified_since: Option = - http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; +let range: Option = http::parse_opt_header(req, &RANGE)?; - let part_number: Option = http::parse_opt_query(req, "partNumber")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let range: Option = http::parse_opt_header(req, &RANGE)?; +let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let response_content_disposition: Option = http::parse_opt_query(req, "response-content-disposition")?; - let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; +let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; - let response_content_disposition: Option = - http::parse_opt_query(req, "response-content-disposition")?; +let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; - let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; +let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; - let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; +let response_expires: Option = http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; - let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let response_expires: Option = - http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let version_id: Option = http::parse_opt_query(req, "versionId")?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +Ok(HeadObjectInput { +bucket, +checksum_mode, +expected_bucket_owner, +if_match, +if_modified_since, +if_none_match, +if_unmodified_since, +key, +part_number, +range, +request_payer, +response_cache_control, +response_content_disposition, +response_content_encoding, +response_content_language, +response_content_type, +response_expires, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(HeadObjectInput { - bucket, - checksum_mode, - expected_bucket_owner, - if_match, - if_modified_since, - if_none_match, - if_unmodified_since, - key, - part_number, - range, - request_payer, - response_cache_control, - response_content_disposition, - response_content_encoding, - response_content_language, - response_content_type, - response_expires, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } +pub fn serialize_http(x: HeadObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; +http::add_opt_header(&mut res, X_AMZ_ARCHIVE_STATUS, x.archive_status)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; +http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; +http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; +http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; +http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; +http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; +http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; +http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; +http::add_opt_header(&mut res, ETAG, x.e_tag)?; +http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; +http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; +http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; +http::add_opt_metadata(&mut res, x.metadata)?; +http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; +http::add_opt_header_timestamp(&mut res, X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, x.object_lock_retain_until_date, TimestampFormat::DateTime)?; +http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; +http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; +Ok(res) +} - pub fn serialize_http(x: HeadObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; - http::add_opt_header(&mut res, X_AMZ_ARCHIVE_STATUS, x.archive_status)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; - http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; - http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; - http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; - http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; - http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; - http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; - http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; - http::add_opt_header(&mut res, ETAG, x.e_tag)?; - http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; - http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; - http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; - http::add_opt_metadata(&mut res, x.metadata)?; - http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; - http::add_opt_header_timestamp( - &mut res, - X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, - x.object_lock_retain_until_date, - TimestampFormat::DateTime, - )?; - http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; - http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for HeadObject { - fn name(&self) -> &'static str { - "HeadObject" - } +fn name(&self) -> &'static str { +"HeadObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.head_object(&mut s3_req).await?; - } - let result = s3.head_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.head_object(&mut s3_req).await?; +} +let result = s3.head_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBucketAnalyticsConfigurations; impl ListBucketAnalyticsConfigurations { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - Ok(ListBucketAnalyticsConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(ListBucketAnalyticsConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: ListBucketAnalyticsConfigurationsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketAnalyticsConfigurationsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBucketAnalyticsConfigurations { - fn name(&self) -> &'static str { - "ListBucketAnalyticsConfigurations" - } +fn name(&self) -> &'static str { +"ListBucketAnalyticsConfigurations" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_bucket_analytics_configurations(&mut s3_req).await?; - } - let result = s3.list_bucket_analytics_configurations(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_bucket_analytics_configurations(&mut s3_req).await?; +} +let result = s3.list_bucket_analytics_configurations(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBucketIntelligentTieringConfigurations; impl ListBucketIntelligentTieringConfigurations { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - Ok(ListBucketIntelligentTieringConfigurationsInput { - bucket, - continuation_token, - }) - } +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + +Ok(ListBucketIntelligentTieringConfigurationsInput { +bucket, +continuation_token, +}) +} + + +pub fn serialize_http(x: ListBucketIntelligentTieringConfigurationsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketIntelligentTieringConfigurationsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBucketIntelligentTieringConfigurations { - fn name(&self) -> &'static str { - "ListBucketIntelligentTieringConfigurations" - } +fn name(&self) -> &'static str { +"ListBucketIntelligentTieringConfigurations" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_bucket_intelligent_tiering_configurations(&mut s3_req).await?; - } - let result = s3.list_bucket_intelligent_tiering_configurations(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_bucket_intelligent_tiering_configurations(&mut s3_req).await?; +} +let result = s3.list_bucket_intelligent_tiering_configurations(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBucketInventoryConfigurations; impl ListBucketInventoryConfigurations { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - Ok(ListBucketInventoryConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(ListBucketInventoryConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: ListBucketInventoryConfigurationsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketInventoryConfigurationsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBucketInventoryConfigurations { - fn name(&self) -> &'static str { - "ListBucketInventoryConfigurations" - } +fn name(&self) -> &'static str { +"ListBucketInventoryConfigurations" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_bucket_inventory_configurations(&mut s3_req).await?; - } - let result = s3.list_bucket_inventory_configurations(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_bucket_inventory_configurations(&mut s3_req).await?; +} +let result = s3.list_bucket_inventory_configurations(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBucketMetricsConfigurations; impl ListBucketMetricsConfigurations { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - Ok(ListBucketMetricsConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(ListBucketMetricsConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: ListBucketMetricsConfigurationsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketMetricsConfigurationsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBucketMetricsConfigurations { - fn name(&self) -> &'static str { - "ListBucketMetricsConfigurations" - } +fn name(&self) -> &'static str { +"ListBucketMetricsConfigurations" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_bucket_metrics_configurations(&mut s3_req).await?; - } - let result = s3.list_bucket_metrics_configurations(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_bucket_metrics_configurations(&mut s3_req).await?; +} +let result = s3.list_bucket_metrics_configurations(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBuckets; impl ListBuckets { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket_region: Option = http::parse_opt_query(req, "bucket-region")?; +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket_region: Option = http::parse_opt_query(req, "bucket-region")?; - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let max_buckets: Option = http::parse_opt_query(req, "max-buckets")?; +let max_buckets: Option = http::parse_opt_query(req, "max-buckets")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - Ok(ListBucketsInput { - bucket_region, - continuation_token, - max_buckets, - prefix, - }) - } +Ok(ListBucketsInput { +bucket_region, +continuation_token, +max_buckets, +prefix, +}) +} + + +pub fn serialize_http(x: ListBucketsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBuckets { - fn name(&self) -> &'static str { - "ListBuckets" - } +fn name(&self) -> &'static str { +"ListBuckets" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_buckets(&mut s3_req).await?; - } - let result = s3.list_buckets(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_buckets(&mut s3_req).await?; +} +let result = s3.list_buckets(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListDirectoryBuckets; impl ListDirectoryBuckets { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let max_directory_buckets: Option = http::parse_opt_query(req, "max-directory-buckets")?; +let max_directory_buckets: Option = http::parse_opt_query(req, "max-directory-buckets")?; - Ok(ListDirectoryBucketsInput { - continuation_token, - max_directory_buckets, - }) - } +Ok(ListDirectoryBucketsInput { +continuation_token, +max_directory_buckets, +}) +} + + +pub fn serialize_http(x: ListDirectoryBucketsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListDirectoryBucketsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListDirectoryBuckets { - fn name(&self) -> &'static str { - "ListDirectoryBuckets" - } +fn name(&self) -> &'static str { +"ListDirectoryBuckets" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_directory_buckets(&mut s3_req).await?; - } - let result = s3.list_directory_buckets(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_directory_buckets(&mut s3_req).await?; +} +let result = s3.list_directory_buckets(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListMultipartUploads; impl ListMultipartUploads { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; +let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; - let key_marker: Option = http::parse_opt_query(req, "key-marker")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_uploads: Option = http::parse_opt_query(req, "max-uploads")?; +let key_marker: Option = http::parse_opt_query(req, "key-marker")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let max_uploads: Option = http::parse_opt_query(req, "max-uploads")?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - let upload_id_marker: Option = http::parse_opt_query(req, "upload-id-marker")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(ListMultipartUploadsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - key_marker, - max_uploads, - prefix, - request_payer, - upload_id_marker, - }) - } +let upload_id_marker: Option = http::parse_opt_query(req, "upload-id-marker")?; + +Ok(ListMultipartUploadsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +key_marker, +max_uploads, +prefix, +request_payer, +upload_id_marker, +}) +} + + +pub fn serialize_http(x: ListMultipartUploadsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: ListMultipartUploadsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListMultipartUploads { - fn name(&self) -> &'static str { - "ListMultipartUploads" - } +fn name(&self) -> &'static str { +"ListMultipartUploads" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_multipart_uploads(&mut s3_req).await?; - } - let result = s3.list_multipart_uploads(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_multipart_uploads(&mut s3_req).await?; +} +let result = s3.list_multipart_uploads(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListObjectVersions; impl ListObjectVersions { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; +let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; - let key_marker: Option = http::parse_opt_query(req, "key-marker")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_keys: Option = http::parse_opt_query(req, "max-keys")?; +let key_marker: Option = http::parse_opt_query(req, "key-marker")?; - let optional_object_attributes: Option = - http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; +let max_keys: Option = http::parse_opt_query(req, "max-keys")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - let version_id_marker: Option = http::parse_opt_query(req, "version-id-marker")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(ListObjectVersionsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - key_marker, - max_keys, - optional_object_attributes, - prefix, - request_payer, - version_id_marker, - }) - } +let version_id_marker: Option = http::parse_opt_query(req, "version-id-marker")?; - pub fn serialize_http(x: ListObjectVersionsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } +Ok(ListObjectVersionsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +key_marker, +max_keys, +optional_object_attributes, +prefix, +request_payer, +version_id_marker, +}) } -#[async_trait::async_trait] -impl super::Operation for ListObjectVersions { - fn name(&self) -> &'static str { - "ListObjectVersions" - } - - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_object_versions(&mut s3_req).await?; - } - let result = s3.list_object_versions(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } + +pub fn serialize_http(x: ListObjectVersionsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} + +} + +#[async_trait::async_trait] +impl super::Operation for ListObjectVersions { +fn name(&self) -> &'static str { +"ListObjectVersions" +} + +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_object_versions(&mut s3_req).await?; +} +let result = s3.list_object_versions(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListObjects; impl ListObjects { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; +let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; - let marker: Option = http::parse_opt_query(req, "marker")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_keys: Option = http::parse_opt_query(req, "max-keys")?; +let marker: Option = http::parse_opt_query(req, "marker")?; - let optional_object_attributes: Option = - http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; +let max_keys: Option = http::parse_opt_query(req, "max-keys")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - Ok(ListObjectsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - marker, - max_keys, - optional_object_attributes, - prefix, - request_payer, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +Ok(ListObjectsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +marker, +max_keys, +optional_object_attributes, +prefix, +request_payer, +}) +} + + +pub fn serialize_http(x: ListObjectsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: ListObjectsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListObjects { - fn name(&self) -> &'static str { - "ListObjects" - } +fn name(&self) -> &'static str { +"ListObjects" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_objects(&mut s3_req).await?; - } - let result = s3.list_objects(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_objects(&mut s3_req).await?; +} +let result = s3.list_objects(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListObjectsV2; impl ListObjectsV2 { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let delimiter: Option = http::parse_opt_query(req, "delimiter")?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; +let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; - let fetch_owner: Option = http::parse_opt_query(req, "fetch-owner")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_keys: Option = http::parse_opt_query(req, "max-keys")?; +let fetch_owner: Option = http::parse_opt_query(req, "fetch-owner")?; - let optional_object_attributes: Option = - http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; +let max_keys: Option = http::parse_opt_query(req, "max-keys")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - let start_after: Option = http::parse_opt_query(req, "start-after")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(ListObjectsV2Input { - bucket, - continuation_token, - delimiter, - encoding_type, - expected_bucket_owner, - fetch_owner, - max_keys, - optional_object_attributes, - prefix, - request_payer, - start_after, - }) - } +let start_after: Option = http::parse_opt_query(req, "start-after")?; + +Ok(ListObjectsV2Input { +bucket, +continuation_token, +delimiter, +encoding_type, +expected_bucket_owner, +fetch_owner, +max_keys, +optional_object_attributes, +prefix, +request_payer, +start_after, +}) +} + + +pub fn serialize_http(x: ListObjectsV2Output) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: ListObjectsV2Output) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListObjectsV2 { - fn name(&self) -> &'static str { - "ListObjectsV2" - } +fn name(&self) -> &'static str { +"ListObjectsV2" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_objects_v2(&mut s3_req).await?; - } - let result = s3.list_objects_v2(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_objects_v2(&mut s3_req).await?; +} +let result = s3.list_objects_v2(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListParts; impl ListParts { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_parts: Option = http::parse_opt_query(req, "max-parts")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let part_number_marker: Option = http::parse_opt_query(req, "part-number-marker")?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let max_parts: Option = http::parse_opt_query(req, "max-parts")?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let part_number_marker: Option = http::parse_opt_query(req, "part-number-marker")?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(ListPartsInput { - bucket, - expected_bucket_owner, - key, - max_parts, - part_number_marker, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(ListPartsInput { +bucket, +expected_bucket_owner, +key, +max_parts, +part_number_marker, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + + +pub fn serialize_http(x: ListPartsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; +http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: ListPartsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; - http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListParts { - fn name(&self) -> &'static str { - "ListParts" - } +fn name(&self) -> &'static str { +"ListParts" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_parts(&mut s3_req).await?; - } - let result = s3.list_parts(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_parts(&mut s3_req).await?; +} +let result = s3.list_parts(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketAccelerateConfiguration; impl PutBucketAccelerateConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let accelerate_configuration: AccelerateConfiguration = http::take_xml_body(req)?; +let accelerate_configuration: AccelerateConfiguration = http::take_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - Ok(PutBucketAccelerateConfigurationInput { - accelerate_configuration, - bucket, - checksum_algorithm, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(PutBucketAccelerateConfigurationInput { +accelerate_configuration, +bucket, +checksum_algorithm, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: PutBucketAccelerateConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketAccelerateConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketAccelerateConfiguration { - fn name(&self) -> &'static str { - "PutBucketAccelerateConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketAccelerateConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_accelerate_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_accelerate_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_accelerate_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_accelerate_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketAcl; impl PutBucketAcl { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let access_control_policy: Option = http::take_opt_xml_body(req)?; +let access_control_policy: Option = http::take_opt_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; - Ok(PutBucketAclInput { - acl, - access_control_policy, - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - }) - } +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + +Ok(PutBucketAclInput { +acl, +access_control_policy, +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +}) +} + + +pub fn serialize_http(_: PutBucketAclOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketAclOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketAcl { - fn name(&self) -> &'static str { - "PutBucketAcl" - } +fn name(&self) -> &'static str { +"PutBucketAcl" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_acl(&mut s3_req).await?; - } - let result = s3.put_bucket_acl(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_acl(&mut s3_req).await?; +} +let result = s3.put_bucket_acl(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketAnalyticsConfiguration; impl PutBucketAnalyticsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let analytics_configuration: AnalyticsConfiguration = http::take_xml_body(req)?; +let analytics_configuration: AnalyticsConfiguration = http::take_xml_body(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: AnalyticsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketAnalyticsConfigurationInput { - analytics_configuration, - bucket, - expected_bucket_owner, - id, - }) - } +let id: AnalyticsId = http::parse_query(req, "id")?; + +Ok(PutBucketAnalyticsConfigurationInput { +analytics_configuration, +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(_: PutBucketAnalyticsConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketAnalyticsConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketAnalyticsConfiguration { - fn name(&self) -> &'static str { - "PutBucketAnalyticsConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketAnalyticsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_analytics_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_analytics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_analytics_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_analytics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketCors; impl PutBucketCors { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let cors_configuration: CORSConfiguration = http::take_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let cors_configuration: CORSConfiguration = http::take_xml_body(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - Ok(PutBucketCorsInput { - bucket, - cors_configuration, - checksum_algorithm, - content_md5, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(PutBucketCorsInput { +bucket, +cors_configuration, +checksum_algorithm, +content_md5, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: PutBucketCorsOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketCorsOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketCors { - fn name(&self) -> &'static str { - "PutBucketCors" - } +fn name(&self) -> &'static str { +"PutBucketCors" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_cors(&mut s3_req).await?; - } - let result = s3.put_bucket_cors(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_cors(&mut s3_req).await?; +} +let result = s3.put_bucket_cors(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketEncryption; impl PutBucketEncryption { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let server_side_encryption_configuration: ServerSideEncryptionConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketEncryptionInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - server_side_encryption_configuration, - }) - } +let server_side_encryption_configuration: ServerSideEncryptionConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketEncryptionInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +server_side_encryption_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketEncryptionOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketEncryptionOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketEncryption { - fn name(&self) -> &'static str { - "PutBucketEncryption" - } +fn name(&self) -> &'static str { +"PutBucketEncryption" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_encryption(&mut s3_req).await?; - } - let result = s3.put_bucket_encryption(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_encryption(&mut s3_req).await?; +} +let result = s3.put_bucket_encryption(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketIntelligentTieringConfiguration; impl PutBucketIntelligentTieringConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let id: IntelligentTieringId = http::parse_query(req, "id")?; - let intelligent_tiering_configuration: IntelligentTieringConfiguration = http::take_xml_body(req)?; +let id: IntelligentTieringId = http::parse_query(req, "id")?; - Ok(PutBucketIntelligentTieringConfigurationInput { - bucket, - id, - intelligent_tiering_configuration, - }) - } +let intelligent_tiering_configuration: IntelligentTieringConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketIntelligentTieringConfigurationInput { +bucket, +id, +intelligent_tiering_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketIntelligentTieringConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketIntelligentTieringConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketIntelligentTieringConfiguration { - fn name(&self) -> &'static str { - "PutBucketIntelligentTieringConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketIntelligentTieringConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_intelligent_tiering_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_intelligent_tiering_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_intelligent_tiering_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_intelligent_tiering_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketInventoryConfiguration; impl PutBucketInventoryConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: InventoryId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let inventory_configuration: InventoryConfiguration = http::take_xml_body(req)?; +let id: InventoryId = http::parse_query(req, "id")?; - Ok(PutBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - inventory_configuration, - }) - } +let inventory_configuration: InventoryConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +inventory_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketInventoryConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketInventoryConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketInventoryConfiguration { - fn name(&self) -> &'static str { - "PutBucketInventoryConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketInventoryConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_inventory_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_inventory_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_inventory_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_inventory_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketLifecycleConfiguration; impl PutBucketLifecycleConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let lifecycle_configuration: Option = http::take_opt_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +let lifecycle_configuration: Option = http::take_opt_xml_body(req)?; + +let transition_default_minimum_object_size: Option = http::parse_opt_header(req, &X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE)?; + +Ok(PutBucketLifecycleConfigurationInput { +bucket, +checksum_algorithm, +expected_bucket_owner, +lifecycle_configuration, +transition_default_minimum_object_size, +}) +} - let transition_default_minimum_object_size: Option = - http::parse_opt_header(req, &X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE)?; - Ok(PutBucketLifecycleConfigurationInput { - bucket, - checksum_algorithm, - expected_bucket_owner, - lifecycle_configuration, - transition_default_minimum_object_size, - }) - } +pub fn serialize_http(x: PutBucketLifecycleConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, x.transition_default_minimum_object_size)?; +Ok(res) +} - pub fn serialize_http(x: PutBucketLifecycleConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header( - &mut res, - X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, - x.transition_default_minimum_object_size, - )?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutBucketLifecycleConfiguration { - fn name(&self) -> &'static str { - "PutBucketLifecycleConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketLifecycleConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_lifecycle_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_lifecycle_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_lifecycle_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_lifecycle_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketLogging; impl PutBucketLogging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let bucket_logging_status: BucketLoggingStatus = http::take_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let bucket_logging_status: BucketLoggingStatus = http::take_xml_body(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - Ok(PutBucketLoggingInput { - bucket, - bucket_logging_status, - checksum_algorithm, - content_md5, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(PutBucketLoggingInput { +bucket, +bucket_logging_status, +checksum_algorithm, +content_md5, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: PutBucketLoggingOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketLoggingOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketLogging { - fn name(&self) -> &'static str { - "PutBucketLogging" - } +fn name(&self) -> &'static str { +"PutBucketLogging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_logging(&mut s3_req).await?; - } - let result = s3.put_bucket_logging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_logging(&mut s3_req).await?; +} +let result = s3.put_bucket_logging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketMetricsConfiguration; impl PutBucketMetricsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: MetricsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let metrics_configuration: MetricsConfiguration = http::take_xml_body(req)?; +let id: MetricsId = http::parse_query(req, "id")?; - Ok(PutBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - metrics_configuration, - }) - } +let metrics_configuration: MetricsConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +metrics_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketMetricsConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketMetricsConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketMetricsConfiguration { - fn name(&self) -> &'static str { - "PutBucketMetricsConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketMetricsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_metrics_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_metrics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_metrics_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_metrics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketNotificationConfiguration; impl PutBucketNotificationConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let notification_configuration: NotificationConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let skip_destination_validation: Option = - http::parse_opt_header(req, &X_AMZ_SKIP_DESTINATION_VALIDATION)?; +let notification_configuration: NotificationConfiguration = http::take_xml_body(req)?; - Ok(PutBucketNotificationConfigurationInput { - bucket, - expected_bucket_owner, - notification_configuration, - skip_destination_validation, - }) - } +let skip_destination_validation: Option = http::parse_opt_header(req, &X_AMZ_SKIP_DESTINATION_VALIDATION)?; + +Ok(PutBucketNotificationConfigurationInput { +bucket, +expected_bucket_owner, +notification_configuration, +skip_destination_validation, +}) +} + + +pub fn serialize_http(_: PutBucketNotificationConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketNotificationConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketNotificationConfiguration { - fn name(&self) -> &'static str { - "PutBucketNotificationConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketNotificationConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_notification_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_notification_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_notification_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_notification_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketOwnershipControls; impl PutBucketOwnershipControls { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let ownership_controls: OwnershipControls = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketOwnershipControlsInput { - bucket, - content_md5, - expected_bucket_owner, - ownership_controls, - }) - } +let ownership_controls: OwnershipControls = http::take_xml_body(req)?; + +Ok(PutBucketOwnershipControlsInput { +bucket, +content_md5, +expected_bucket_owner, +ownership_controls, +}) +} + + +pub fn serialize_http(_: PutBucketOwnershipControlsOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketOwnershipControlsOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketOwnershipControls { - fn name(&self) -> &'static str { - "PutBucketOwnershipControls" - } +fn name(&self) -> &'static str { +"PutBucketOwnershipControls" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_ownership_controls(&mut s3_req).await?; - } - let result = s3.put_bucket_ownership_controls(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_ownership_controls(&mut s3_req).await?; +} +let result = s3.put_bucket_ownership_controls(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketPolicy; impl PutBucketPolicy { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let confirm_remove_self_bucket_access: Option = - http::parse_opt_header(req, &X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let confirm_remove_self_bucket_access: Option = http::parse_opt_header(req, &X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let policy: Policy = http::take_string_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketPolicyInput { - bucket, - checksum_algorithm, - confirm_remove_self_bucket_access, - content_md5, - expected_bucket_owner, - policy, - }) - } +let policy: Policy = http::take_string_body(req)?; + +Ok(PutBucketPolicyInput { +bucket, +checksum_algorithm, +confirm_remove_self_bucket_access, +content_md5, +expected_bucket_owner, +policy, +}) +} + + +pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketPolicy { - fn name(&self) -> &'static str { - "PutBucketPolicy" - } +fn name(&self) -> &'static str { +"PutBucketPolicy" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_policy(&mut s3_req).await?; - } - let result = s3.put_bucket_policy(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_policy(&mut s3_req).await?; +} +let result = s3.put_bucket_policy(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketReplication; impl PutBucketReplication { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let replication_configuration: ReplicationConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; +let replication_configuration: ReplicationConfiguration = http::take_xml_body(req)?; - Ok(PutBucketReplicationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - replication_configuration, - token, - }) - } +let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; + +Ok(PutBucketReplicationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +replication_configuration, +token, +}) +} + + +pub fn serialize_http(_: PutBucketReplicationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketReplicationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketReplication { - fn name(&self) -> &'static str { - "PutBucketReplication" - } +fn name(&self) -> &'static str { +"PutBucketReplication" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_replication(&mut s3_req).await?; - } - let result = s3.put_bucket_replication(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_replication(&mut s3_req).await?; +} +let result = s3.put_bucket_replication(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketRequestPayment; impl PutBucketRequestPayment { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let request_payment_configuration: RequestPaymentConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketRequestPaymentInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - request_payment_configuration, - }) - } +let request_payment_configuration: RequestPaymentConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketRequestPaymentInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +request_payment_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketRequestPaymentOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketRequestPaymentOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketRequestPayment { - fn name(&self) -> &'static str { - "PutBucketRequestPayment" - } +fn name(&self) -> &'static str { +"PutBucketRequestPayment" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_request_payment(&mut s3_req).await?; - } - let result = s3.put_bucket_request_payment(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_request_payment(&mut s3_req).await?; +} +let result = s3.put_bucket_request_payment(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketTagging; impl PutBucketTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let tagging: Tagging = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketTaggingInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - tagging, - }) - } +let tagging: Tagging = http::take_xml_body(req)?; + +Ok(PutBucketTaggingInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +tagging, +}) +} + + +pub fn serialize_http(_: PutBucketTaggingOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketTaggingOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketTagging { - fn name(&self) -> &'static str { - "PutBucketTagging" - } +fn name(&self) -> &'static str { +"PutBucketTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_tagging(&mut s3_req).await?; - } - let result = s3.put_bucket_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_tagging(&mut s3_req).await?; +} +let result = s3.put_bucket_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} +} + +pub struct PutBucketVersioning; + +impl PutBucketVersioning { +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); + + +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; + +let versioning_configuration: VersioningConfiguration = http::take_versioning_configuration(req)?; + +Ok(PutBucketVersioningInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +mfa, +versioning_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketVersioningOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} + +} + +#[async_trait::async_trait] +impl super::Operation for PutBucketVersioning { +fn name(&self) -> &'static str { +"PutBucketVersioning" +} + +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_versioning(&mut s3_req).await?; +} +let result = s3.put_bucket_versioning(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} +} + +pub struct PutBucketWebsite; + +impl PutBucketWebsite { +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); + + +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +let website_configuration: WebsiteConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketWebsiteInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +website_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketWebsiteOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} + +} + +#[async_trait::async_trait] +impl super::Operation for PutBucketWebsite { +fn name(&self) -> &'static str { +"PutBucketWebsite" } -pub struct PutBucketVersioning; +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_website(&mut s3_req).await?; +} +let result = s3.put_bucket_website(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} +} -impl PutBucketVersioning { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub struct PutObject; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +impl PutObject { +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +if let Some(m) = req.s3ext.multipart.take() { + return Self::deserialize_http_multipart(req, m); +} - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; +let body: Option = Some(http::take_stream_body(req)); - let versioning_configuration: VersioningConfiguration = http::take_xml_body(req)?; - Ok(PutBucketVersioningInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - mfa, - versioning_configuration, - }) - } +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - pub fn serialize_http(_: PutBucketVersioningOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } -} +let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; -#[async_trait::async_trait] -impl super::Operation for PutBucketVersioning { - fn name(&self) -> &'static str { - "PutBucketVersioning" - } +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_versioning(&mut s3_req).await?; - } - let result = s3.put_bucket_versioning(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } -} +let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; -pub struct PutBucketWebsite; +let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; -impl PutBucketWebsite { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; - let website_configuration: WebsiteConfiguration = http::take_xml_body(req)?; +let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; - Ok(PutBucketWebsiteInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - website_configuration, - }) - } +let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; - pub fn serialize_http(_: PutBucketWebsiteOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } -} +let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; -#[async_trait::async_trait] -impl super::Operation for PutBucketWebsite { - fn name(&self) -> &'static str { - "PutBucketWebsite" - } +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_website(&mut s3_req).await?; - } - let result = s3.put_bucket_website(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } -} +let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; -pub struct PutObject; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -impl PutObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - if let Some(m) = req.s3ext.multipart.take() { - return Self::deserialize_http_multipart(req, m); - } +let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; - let (bucket, key) = http::unwrap_object(req); +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let body: Option = Some(http::take_stream_body(req)); +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; +let metadata: Option = http::parse_opt_metadata(req)?; - let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; +let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; +let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; - let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; +let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; - let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; - let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; +let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let version_id: Option = http::parse_opt_query(req, "versionId")?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let write_offset_bytes: Option = http::parse_opt_header(req, &X_AMZ_WRITE_OFFSET_BYTES)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +Ok(PutObjectInput { +acl, +body, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_md5, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +if_match, +if_none_match, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +version_id, +website_redirect_location, +write_offset_bytes, +}) +} - let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; +pub fn deserialize_http_multipart(req: &mut http::Request, m: http::Multipart) -> S3Result { +let bucket = http::unwrap_bucket(req); +let key = http::parse_field_value(&m, "key")?.ok_or_else(|| invalid_request!("missing key"))?; - let metadata: Option = http::parse_opt_metadata(req)?; +let vec_stream = req.s3ext.vec_stream.take().expect("missing vec stream"); - let object_lock_legal_hold_status: Option = - http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; +let content_length = i64::try_from(vec_stream.exact_remaining_length()) + .map_err(|e| s3_error!(e, InvalidArgument, "content-length overflow"))?; +let content_length = (content_length != 0).then_some(content_length); - let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; +let body: Option = Some(StreamingBlob::new(vec_stream)); - let object_lock_retain_until_date: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; +let acl: Option = http::parse_field_value(&m, "x-amz-acl")?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let bucket_key_enabled: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-bucket-key-enabled")?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let cache_control: Option = http::parse_field_value(&m, "cache-control")?; - let ssekms_encryption_context: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; +let checksum_algorithm: Option = http::parse_field_value(&m, "x-amz-sdk-checksum-algorithm")?; - let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; +let checksum_crc32: Option = http::parse_field_value(&m, "x-amz-checksum-crc32")?; - let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; +let checksum_crc32c: Option = http::parse_field_value(&m, "x-amz-checksum-crc32c")?; - let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; +let checksum_crc64nvme: Option = http::parse_field_value(&m, "x-amz-checksum-crc64nvme")?; - let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; +let checksum_sha1: Option = http::parse_field_value(&m, "x-amz-checksum-sha1")?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let checksum_sha256: Option = http::parse_field_value(&m, "x-amz-checksum-sha256")?; - let website_redirect_location: Option = - http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; +let content_disposition: Option = http::parse_field_value(&m, "content-disposition")?; - let write_offset_bytes: Option = http::parse_opt_header(req, &X_AMZ_WRITE_OFFSET_BYTES)?; +let content_encoding: Option = http::parse_field_value(&m, "content-encoding")?; - Ok(PutObjectInput { - acl, - body, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_md5, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - if_match, - if_none_match, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - version_id, - website_redirect_location, - write_offset_bytes, - }) - } +let content_language: Option = http::parse_field_value(&m, "content-language")?; - pub fn deserialize_http_multipart(req: &mut http::Request, m: http::Multipart) -> S3Result { - let bucket = http::unwrap_bucket(req); - let key = http::parse_field_value(&m, "key")?.ok_or_else(|| invalid_request!("missing key"))?; +let content_md5: Option = http::parse_field_value(&m, "content-md5")?; - let vec_stream = req.s3ext.vec_stream.take().expect("missing vec stream"); +let content_type: Option = http::parse_field_value(&m, "content-type")?; - let content_length = i64::try_from(vec_stream.exact_remaining_length()) - .map_err(|e| s3_error!(e, InvalidArgument, "content-length overflow"))?; - let content_length = (content_length != 0).then_some(content_length); +let expected_bucket_owner: Option = http::parse_field_value(&m, "x-amz-expected-bucket-owner")?; - let body: Option = Some(StreamingBlob::new(vec_stream)); +let expires: Option = http::parse_field_value_timestamp(&m, "expires", TimestampFormat::HttpDate)?; - let acl: Option = http::parse_field_value(&m, "x-amz-acl")?; +let grant_full_control: Option = http::parse_field_value(&m, "x-amz-grant-full-control")?; - let bucket_key_enabled: Option = - http::parse_field_value(&m, "x-amz-server-side-encryption-bucket-key-enabled")?; +let grant_read: Option = http::parse_field_value(&m, "x-amz-grant-read")?; - let cache_control: Option = http::parse_field_value(&m, "cache-control")?; +let grant_read_acp: Option = http::parse_field_value(&m, "x-amz-grant-read-acp")?; - let checksum_algorithm: Option = http::parse_field_value(&m, "x-amz-sdk-checksum-algorithm")?; +let grant_write_acp: Option = http::parse_field_value(&m, "x-amz-grant-write-acp")?; - let checksum_crc32: Option = http::parse_field_value(&m, "x-amz-checksum-crc32")?; +let if_match: Option = http::parse_field_value(&m, "if-match")?; - let checksum_crc32c: Option = http::parse_field_value(&m, "x-amz-checksum-crc32c")?; +let if_none_match: Option = http::parse_field_value(&m, "if-none-match")?; - let checksum_crc64nvme: Option = http::parse_field_value(&m, "x-amz-checksum-crc64nvme")?; - let checksum_sha1: Option = http::parse_field_value(&m, "x-amz-checksum-sha1")?; +let metadata: Option = { + let mut metadata = Metadata::default(); + for (name, value) in m.fields() { + if let Some(key) = name.strip_prefix("x-amz-meta-") { + if key.is_empty() { continue; } + metadata.insert(key.to_owned(), value.clone()); + } + } + if metadata.is_empty() { None } else { Some(metadata) } +}; - let checksum_sha256: Option = http::parse_field_value(&m, "x-amz-checksum-sha256")?; +let object_lock_legal_hold_status: Option = http::parse_field_value(&m, "x-amz-object-lock-legal-hold")?; - let content_disposition: Option = http::parse_field_value(&m, "content-disposition")?; +let object_lock_mode: Option = http::parse_field_value(&m, "x-amz-object-lock-mode")?; - let content_encoding: Option = http::parse_field_value(&m, "content-encoding")?; +let object_lock_retain_until_date: Option = http::parse_field_value_timestamp(&m, "x-amz-object-lock-retain-until-date", TimestampFormat::DateTime)?; - let content_language: Option = http::parse_field_value(&m, "content-language")?; +let request_payer: Option = http::parse_field_value(&m, "x-amz-request-payer")?; - let content_md5: Option = http::parse_field_value(&m, "content-md5")?; +let sse_customer_algorithm: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-algorithm")?; - let content_type: Option = http::parse_field_value(&m, "content-type")?; +let sse_customer_key: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key")?; - let expected_bucket_owner: Option = http::parse_field_value(&m, "x-amz-expected-bucket-owner")?; +let sse_customer_key_md5: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key-md5")?; - let expires: Option = http::parse_field_value_timestamp(&m, "expires", TimestampFormat::HttpDate)?; +let ssekms_encryption_context: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-context")?; - let grant_full_control: Option = http::parse_field_value(&m, "x-amz-grant-full-control")?; +let ssekms_key_id: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-aws-kms-key-id")?; - let grant_read: Option = http::parse_field_value(&m, "x-amz-grant-read")?; +let server_side_encryption: Option = http::parse_field_value(&m, "x-amz-server-side-encryption")?; - let grant_read_acp: Option = http::parse_field_value(&m, "x-amz-grant-read-acp")?; +let storage_class: Option = http::parse_field_value(&m, "x-amz-storage-class")?; - let grant_write_acp: Option = http::parse_field_value(&m, "x-amz-grant-write-acp")?; +let tagging: Option = http::parse_field_value(&m, "x-amz-tagging")?; - let if_match: Option = http::parse_field_value(&m, "if-match")?; +let version_id: Option = http::parse_opt_query(req, "versionId")?; - let if_none_match: Option = http::parse_field_value(&m, "if-none-match")?; +let website_redirect_location: Option = http::parse_field_value(&m, "x-amz-website-redirect-location")?; - let metadata: Option = { - let mut metadata = Metadata::default(); - for (name, value) in m.fields() { - if let Some(key) = name.strip_prefix("x-amz-meta-") { - if key.is_empty() { - continue; - } - metadata.insert(key.to_owned(), value.clone()); - } - } - if metadata.is_empty() { None } else { Some(metadata) } - }; +let write_offset_bytes: Option = http::parse_field_value(&m, "x-amz-write-offset-bytes")?; - let object_lock_legal_hold_status: Option = - http::parse_field_value(&m, "x-amz-object-lock-legal-hold")?; - - let object_lock_mode: Option = http::parse_field_value(&m, "x-amz-object-lock-mode")?; - - let object_lock_retain_until_date: Option = - http::parse_field_value_timestamp(&m, "x-amz-object-lock-retain-until-date", TimestampFormat::DateTime)?; - - let request_payer: Option = http::parse_field_value(&m, "x-amz-request-payer")?; - - let sse_customer_algorithm: Option = - http::parse_field_value(&m, "x-amz-server-side-encryption-customer-algorithm")?; - - let sse_customer_key: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key")?; - - let sse_customer_key_md5: Option = - http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key-md5")?; - - let ssekms_encryption_context: Option = - http::parse_field_value(&m, "x-amz-server-side-encryption-context")?; - - let ssekms_key_id: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-aws-kms-key-id")?; - - let server_side_encryption: Option = http::parse_field_value(&m, "x-amz-server-side-encryption")?; - - let storage_class: Option = http::parse_field_value(&m, "x-amz-storage-class")?; - - let tagging: Option = http::parse_field_value(&m, "x-amz-tagging")?; - - let version_id: Option = http::parse_opt_query(req, "versionId")?; - - let website_redirect_location: Option = - http::parse_field_value(&m, "x-amz-website-redirect-location")?; - - let write_offset_bytes: Option = http::parse_field_value(&m, "x-amz-write-offset-bytes")?; - - Ok(PutObjectInput { - acl, - body, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_md5, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - if_match, - if_none_match, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - version_id, - website_redirect_location, - write_offset_bytes, - }) - } +Ok(PutObjectInput { +acl, +body, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_md5, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +if_match, +if_none_match, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +version_id, +website_redirect_location, +write_offset_bytes, +}) +} + +pub fn serialize_http(x: PutObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; +http::add_opt_header(&mut res, ETAG, x.e_tag)?; +http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_SIZE, x.size)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; - http::add_opt_header(&mut res, ETAG, x.e_tag)?; - http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_SIZE, x.size)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObject { - fn name(&self) -> &'static str { - "PutObject" - } +fn name(&self) -> &'static str { +"PutObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object(&mut s3_req).await?; - } - let result = s3.put_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object(&mut s3_req).await?; +} +let result = s3.put_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectAcl; impl PutObjectAcl { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let access_control_policy: Option = http::take_opt_xml_body(req)?; +let access_control_policy: Option = http::take_opt_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(PutObjectAclInput { - acl, - access_control_policy, - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(PutObjectAclInput { +acl, +access_control_policy, +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: PutObjectAclOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectAclOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObjectAcl { - fn name(&self) -> &'static str { - "PutObjectAcl" - } +fn name(&self) -> &'static str { +"PutObjectAcl" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_acl(&mut s3_req).await?; - } - let result = s3.put_object_acl(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_acl(&mut s3_req).await?; +} +let result = s3.put_object_acl(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectLegalHold; impl PutObjectLegalHold { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let legal_hold: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); - } - Err(e) => return Err(e), - }; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - - Ok(PutObjectLegalHoldInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - legal_hold, - request_payer, - version_id, - }) +let legal_hold: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); } + Err(e) => return Err(e), +}; + +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(PutObjectLegalHoldInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +legal_hold, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: PutObjectLegalHoldOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectLegalHoldOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObjectLegalHold { - fn name(&self) -> &'static str { - "PutObjectLegalHold" - } +fn name(&self) -> &'static str { +"PutObjectLegalHold" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_legal_hold(&mut s3_req).await?; - } - let result = s3.put_object_legal_hold(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_legal_hold(&mut s3_req).await?; +} +let result = s3.put_object_legal_hold(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectLockConfiguration; impl PutObjectLockConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let object_lock_configuration: Option = http::take_opt_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let object_lock_configuration: Option = http::take_opt_object_lock_configuration(req)?; - let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(PutObjectLockConfigurationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - object_lock_configuration, - request_payer, - token, - }) - } +let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; + +Ok(PutObjectLockConfigurationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +object_lock_configuration, +request_payer, +token, +}) +} + + +pub fn serialize_http(x: PutObjectLockConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectLockConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObjectLockConfiguration { - fn name(&self) -> &'static str { - "PutObjectLockConfiguration" - } +fn name(&self) -> &'static str { +"PutObjectLockConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_lock_configuration(&mut s3_req).await?; - } - let result = s3.put_object_lock_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_lock_configuration(&mut s3_req).await?; +} +let result = s3.put_object_lock_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectRetention; impl PutObjectRetention { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let bypass_governance_retention: Option = - http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let retention: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); - } - Err(e) => return Err(e), - }; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - - Ok(PutObjectRetentionInput { - bucket, - bypass_governance_retention, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - request_payer, - retention, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - pub fn serialize_http(x: PutObjectRetentionOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) +let retention: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); } + Err(e) => return Err(e), +}; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(PutObjectRetentionInput { +bucket, +bypass_governance_retention, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +request_payer, +retention, +version_id, +}) +} + + +pub fn serialize_http(x: PutObjectRetentionOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} + } #[async_trait::async_trait] impl super::Operation for PutObjectRetention { - fn name(&self) -> &'static str { - "PutObjectRetention" - } +fn name(&self) -> &'static str { +"PutObjectRetention" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_retention(&mut s3_req).await?; - } - let result = s3.put_object_retention(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_retention(&mut s3_req).await?; +} +let result = s3.put_object_retention(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectTagging; impl PutObjectTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let tagging: Tagging = http::take_xml_body(req)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(PutObjectTaggingInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - request_payer, - tagging, - version_id, - }) - } +let tagging: Tagging = http::take_xml_body(req)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(PutObjectTaggingInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +request_payer, +tagging, +version_id, +}) +} + + +pub fn serialize_http(x: PutObjectTaggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectTaggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObjectTagging { - fn name(&self) -> &'static str { - "PutObjectTagging" - } +fn name(&self) -> &'static str { +"PutObjectTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_tagging(&mut s3_req).await?; - } - let result = s3.put_object_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_tagging(&mut s3_req).await?; +} +let result = s3.put_object_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutPublicAccessBlock; impl PutPublicAccessBlock { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let public_access_block_configuration: PublicAccessBlockConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutPublicAccessBlockInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - public_access_block_configuration, - }) - } +let public_access_block_configuration: PublicAccessBlockConfiguration = http::take_xml_body(req)?; + +Ok(PutPublicAccessBlockInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +public_access_block_configuration, +}) +} + + +pub fn serialize_http(_: PutPublicAccessBlockOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutPublicAccessBlockOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutPublicAccessBlock { - fn name(&self) -> &'static str { - "PutPublicAccessBlock" - } +fn name(&self) -> &'static str { +"PutPublicAccessBlock" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_public_access_block(&mut s3_req).await?; - } - let result = s3.put_public_access_block(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_public_access_block(&mut s3_req).await?; +} +let result = s3.put_public_access_block(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct RestoreObject; impl RestoreObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let restore_request: Option = http::take_opt_xml_body(req)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(RestoreObjectInput { - bucket, - checksum_algorithm, - expected_bucket_owner, - key, - request_payer, - restore_request, - version_id, - }) - } +let restore_request: Option = http::take_opt_xml_body(req)?; - pub fn serialize_http(x: RestoreObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_RESTORE_OUTPUT_PATH, x.restore_output_path)?; - Ok(res) - } +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(RestoreObjectInput { +bucket, +checksum_algorithm, +expected_bucket_owner, +key, +request_payer, +restore_request, +version_id, +}) } -#[async_trait::async_trait] -impl super::Operation for RestoreObject { - fn name(&self) -> &'static str { - "RestoreObject" - } - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.restore_object(&mut s3_req).await?; - } - let result = s3.restore_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +pub fn serialize_http(x: RestoreObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_RESTORE_OUTPUT_PATH, x.restore_output_path)?; +Ok(res) +} + +} + +#[async_trait::async_trait] +impl super::Operation for RestoreObject { +fn name(&self) -> &'static str { +"RestoreObject" +} + +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.restore_object(&mut s3_req).await?; +} +let result = s3.restore_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct SelectObjectContent; impl SelectObjectContent { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let request: SelectObjectContentRequest = http::take_xml_body(req)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(SelectObjectContentInput { - bucket, - expected_bucket_owner, - key, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - request, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let request: SelectObjectContentRequest = http::take_xml_body(req)?; + +Ok(SelectObjectContentInput { +bucket, +expected_bucket_owner, +key, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +request, +}) +} + + +pub fn serialize_http(x: SelectObjectContentOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(val) = x.payload { +http::set_event_stream_body(&mut res, val); +} +Ok(res) +} - pub fn serialize_http(x: SelectObjectContentOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(val) = x.payload { - http::set_event_stream_body(&mut res, val); - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for SelectObjectContent { - fn name(&self) -> &'static str { - "SelectObjectContent" - } +fn name(&self) -> &'static str { +"SelectObjectContent" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.select_object_content(&mut s3_req).await?; - } - let result = s3.select_object_content(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.select_object_content(&mut s3_req).await?; +} +let result = s3.select_object_content(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct UploadPart; impl UploadPart { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let body: Option = Some(http::take_stream_body(req)); +let body: Option = Some(http::take_stream_body(req)); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; +let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; +let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; - let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; +let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; - let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; +let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; - let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; +let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let part_number: PartNumber = http::parse_query(req, "partNumber")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let part_number: PartNumber = http::parse_query(req, "partNumber")?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(UploadPartInput { - body, - bucket, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_length, - content_md5, - expected_bucket_owner, - key, - part_number, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(UploadPartInput { +body, +bucket, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_length, +content_md5, +expected_bucket_owner, +key, +part_number, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + + +pub fn serialize_http(x: UploadPartOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; +http::add_opt_header(&mut res, ETAG, x.e_tag)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +Ok(res) +} - pub fn serialize_http(x: UploadPartOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; - http::add_opt_header(&mut res, ETAG, x.e_tag)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for UploadPart { - fn name(&self) -> &'static str { - "UploadPart" - } +fn name(&self) -> &'static str { +"UploadPart" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.upload_part(&mut s3_req).await?; - } - let result = s3.upload_part(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.upload_part(&mut s3_req).await?; +} +let result = s3.upload_part(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct UploadPartCopy; impl UploadPartCopy { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; - let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; +let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; - let copy_source_if_modified_since: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; +let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; - let copy_source_if_none_match: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; +let copy_source_if_modified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - let copy_source_if_unmodified_since: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; +let copy_source_if_none_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; - let copy_source_range: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_RANGE)?; +let copy_source_if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; - let copy_source_sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let copy_source_range: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_RANGE)?; - let copy_source_sse_customer_key: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let copy_source_sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let copy_source_sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let copy_source_sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let copy_source_sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let part_number: PartNumber = http::parse_query(req, "partNumber")?; +let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let part_number: PartNumber = http::parse_query(req, "partNumber")?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(UploadPartCopyInput { - bucket, - copy_source, - copy_source_if_match, - copy_source_if_modified_since, - copy_source_if_none_match, - copy_source_if_unmodified_since, - copy_source_range, - copy_source_sse_customer_algorithm, - copy_source_sse_customer_key, - copy_source_sse_customer_key_md5, - expected_bucket_owner, - expected_source_bucket_owner, - key, - part_number, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(UploadPartCopyInput { +bucket, +copy_source, +copy_source_if_match, +copy_source_if_modified_since, +copy_source_if_none_match, +copy_source_if_unmodified_since, +copy_source_range, +copy_source_sse_customer_algorithm, +copy_source_sse_customer_key, +copy_source_sse_customer_key_md5, +expected_bucket_owner, +expected_source_bucket_owner, +key, +part_number, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + + +pub fn serialize_http(x: UploadPartCopyOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.copy_part_result { + http::set_xml_body(&mut res, val)?; +} +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +Ok(res) +} - pub fn serialize_http(x: UploadPartCopyOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.copy_part_result { - http::set_xml_body(&mut res, val)?; - } - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for UploadPartCopy { - fn name(&self) -> &'static str { - "UploadPartCopy" - } +fn name(&self) -> &'static str { +"UploadPartCopy" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.upload_part_copy(&mut s3_req).await?; - } - let result = s3.upload_part_copy(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.upload_part_copy(&mut s3_req).await?; +} +let result = s3.upload_part_copy(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct WriteGetObjectResponse; impl WriteGetObjectResponse { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let accept_ranges: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_ACCEPT_RANGES)?; +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let accept_ranges: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_ACCEPT_RANGES)?; - let body: Option = Some(http::take_stream_body(req)); +let body: Option = Some(http::take_stream_body(req)); - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let cache_control: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CACHE_CONTROL)?; +let cache_control: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CACHE_CONTROL)?; - let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32)?; +let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C)?; +let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C)?; - let checksum_crc64nvme: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME)?; +let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME)?; - let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1)?; +let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1)?; - let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA256)?; +let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA256)?; - let content_disposition: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_DISPOSITION)?; +let content_disposition: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_DISPOSITION)?; - let content_encoding: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_ENCODING)?; +let content_encoding: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_ENCODING)?; - let content_language: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_LANGUAGE)?; +let content_language: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_LANGUAGE)?; - let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; +let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; - let content_range: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_RANGE)?; +let content_range: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_RANGE)?; - let content_type: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_TYPE)?; +let content_type: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_TYPE)?; - let delete_marker: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_DELETE_MARKER)?; +let delete_marker: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_DELETE_MARKER)?; - let e_tag: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_E_TAG)?; +let e_tag: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_E_TAG)?; - let error_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_CODE)?; +let error_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_CODE)?; - let error_message: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_MESSAGE)?; +let error_message: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_MESSAGE)?; - let expiration: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_EXPIRATION)?; +let expiration: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_EXPIRATION)?; - let expires: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_EXPIRES, TimestampFormat::HttpDate)?; +let expires: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_EXPIRES, TimestampFormat::HttpDate)?; - let last_modified: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_LAST_MODIFIED, TimestampFormat::HttpDate)?; +let last_modified: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_LAST_MODIFIED, TimestampFormat::HttpDate)?; - let metadata: Option = http::parse_opt_metadata(req)?; +let metadata: Option = http::parse_opt_metadata(req)?; - let missing_meta: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MISSING_META)?; +let missing_meta: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MISSING_META)?; - let object_lock_legal_hold_status: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; +let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE)?; +let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE)?; - let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp( - req, - &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, - TimestampFormat::DateTime, - )?; +let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let parts_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT)?; - - let replication_status: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS)?; - - let request_charged: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED)?; - - let request_route: RequestRoute = http::parse_header(req, &X_AMZ_REQUEST_ROUTE)?; - - let request_token: RequestToken = http::parse_header(req, &X_AMZ_REQUEST_TOKEN)?; - - let restore: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_RESTORE)?; - - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - - let ssekms_key_id: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - - let server_side_encryption: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION)?; - - let status_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_STATUS)?; - - let storage_class: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS)?; - - let tag_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_TAGGING_COUNT)?; - - let version_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_VERSION_ID)?; - - Ok(WriteGetObjectResponseInput { - accept_ranges, - body, - bucket_key_enabled, - cache_control, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_range, - content_type, - delete_marker, - e_tag, - error_code, - error_message, - expiration, - expires, - last_modified, - metadata, - missing_meta, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - parts_count, - replication_status, - request_charged, - request_route, - request_token, - restore, - sse_customer_algorithm, - sse_customer_key_md5, - ssekms_key_id, - server_side_encryption, - status_code, - storage_class, - tag_count, - version_id, - }) - } +let parts_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT)?; + +let replication_status: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS)?; + +let request_charged: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED)?; + +let request_route: RequestRoute = http::parse_header(req, &X_AMZ_REQUEST_ROUTE)?; + +let request_token: RequestToken = http::parse_header(req, &X_AMZ_REQUEST_TOKEN)?; + +let restore: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_RESTORE)?; + +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION)?; + +let status_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_STATUS)?; + +let storage_class: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS)?; + +let tag_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_TAGGING_COUNT)?; + +let version_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_VERSION_ID)?; + +Ok(WriteGetObjectResponseInput { +accept_ranges, +body, +bucket_key_enabled, +cache_control, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_range, +content_type, +delete_marker, +e_tag, +error_code, +error_message, +expiration, +expires, +last_modified, +metadata, +missing_meta, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +parts_count, +replication_status, +request_charged, +request_route, +request_token, +restore, +sse_customer_algorithm, +sse_customer_key_md5, +ssekms_key_id, +server_side_encryption, +status_code, +storage_class, +tag_count, +version_id, +}) +} + + +pub fn serialize_http(_: WriteGetObjectResponseOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: WriteGetObjectResponseOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for WriteGetObjectResponse { - fn name(&self) -> &'static str { - "WriteGetObjectResponse" - } +fn name(&self) -> &'static str { +"WriteGetObjectResponse" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.write_get_object_response(&mut s3_req).await?; - } - let result = s3.write_get_object_response(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.write_get_object_response(&mut s3_req).await?; +} +let result = s3.write_get_object_response(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PostObject; @@ -6746,8 +6957,10 @@ impl PostObject { .append_pair("etag", etag_str); let mut res = http::Response::with_status(http::StatusCode::SEE_OTHER); - res.headers - .insert(hyper::header::LOCATION, url.as_str().parse().map_err(|e| s3_error!(e, InternalError))?); + res.headers.insert( + hyper::header::LOCATION, + url.as_str().parse().map_err(|e| s3_error!(e, InternalError))? + ); return Ok(res); } @@ -6813,361 +7026,366 @@ impl super::Operation for PostObject { Err(err) => return super::serialize_error(err, false), }; // Serialize with POST-specific response behavior - let mut resp = - Self::serialize_http(&bucket, &key, success_action_redirect.as_deref(), success_action_status, &s3_resp.output)?; + let mut resp = Self::serialize_http( + &bucket, + &key, + success_action_redirect.as_deref(), + success_action_status, + &s3_resp.output, + )?; resp.headers.extend(s3_resp.headers); resp.extensions.extend(s3_resp.extensions); Ok(resp) } } -pub fn resolve_route( - req: &http::Request, - s3_path: &S3Path, - qs: Option<&http::OrderedQs>, -) -> S3Result<(&'static dyn super::Operation, bool)> { - match req.method { - hyper::Method::HEAD => match s3_path { - S3Path::Root => Err(super::unknown_operation()), - S3Path::Bucket { .. } => Ok((&HeadBucket as &'static dyn super::Operation, false)), - S3Path::Object { .. } => Ok((&HeadObject as &'static dyn super::Operation, false)), - }, - hyper::Method::GET => match s3_path { - S3Path::Root => { - if let Some(qs) = qs { - if super::check_query_pattern(qs, "x-id", "ListDirectoryBuckets") { - return Ok((&ListDirectoryBuckets as &'static dyn super::Operation, false)); - } - } - Ok((&ListBuckets as &'static dyn super::Operation, false)) - } - S3Path::Bucket { .. } => { - if let Some(qs) = qs { - if qs.has("analytics") && qs.has("id") { - return Ok((&GetBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("intelligent-tiering") && qs.has("id") { - return Ok((&GetBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("inventory") && qs.has("id") { - return Ok((&GetBucketInventoryConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("metrics") && qs.has("id") { - return Ok((&GetBucketMetricsConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("session") { - return Ok((&CreateSession as &'static dyn super::Operation, false)); - } - if qs.has("accelerate") { - return Ok((&GetBucketAccelerateConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("acl") { - return Ok((&GetBucketAcl as &'static dyn super::Operation, false)); - } - if qs.has("cors") { - return Ok((&GetBucketCors as &'static dyn super::Operation, false)); - } - if qs.has("encryption") { - return Ok((&GetBucketEncryption as &'static dyn super::Operation, false)); - } - if qs.has("lifecycle") { - return Ok((&GetBucketLifecycleConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("location") { - return Ok((&GetBucketLocation as &'static dyn super::Operation, false)); - } - if qs.has("logging") { - return Ok((&GetBucketLogging as &'static dyn super::Operation, false)); - } - if qs.has("metadataTable") { - return Ok((&GetBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("notification") { - return Ok((&GetBucketNotificationConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("ownershipControls") { - return Ok((&GetBucketOwnershipControls as &'static dyn super::Operation, false)); - } - if qs.has("policy") { - return Ok((&GetBucketPolicy as &'static dyn super::Operation, false)); - } - if qs.has("policyStatus") { - return Ok((&GetBucketPolicyStatus as &'static dyn super::Operation, false)); - } - if qs.has("replication") { - return Ok((&GetBucketReplication as &'static dyn super::Operation, false)); - } - if qs.has("requestPayment") { - return Ok((&GetBucketRequestPayment as &'static dyn super::Operation, false)); - } - if qs.has("tagging") { - return Ok((&GetBucketTagging as &'static dyn super::Operation, false)); - } - if qs.has("versioning") { - return Ok((&GetBucketVersioning as &'static dyn super::Operation, false)); - } - if qs.has("website") { - return Ok((&GetBucketWebsite as &'static dyn super::Operation, false)); - } - if qs.has("object-lock") { - return Ok((&GetObjectLockConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("publicAccessBlock") { - return Ok((&GetPublicAccessBlock as &'static dyn super::Operation, false)); - } - if qs.has("analytics") && !qs.has("id") { - return Ok((&ListBucketAnalyticsConfigurations as &'static dyn super::Operation, false)); - } - if qs.has("intelligent-tiering") && !qs.has("id") { - return Ok((&ListBucketIntelligentTieringConfigurations as &'static dyn super::Operation, false)); - } - if qs.has("inventory") && !qs.has("id") { - return Ok((&ListBucketInventoryConfigurations as &'static dyn super::Operation, false)); - } - if qs.has("metrics") && !qs.has("id") { - return Ok((&ListBucketMetricsConfigurations as &'static dyn super::Operation, false)); - } - if qs.has("uploads") { - return Ok((&ListMultipartUploads as &'static dyn super::Operation, false)); - } - if qs.has("versions") { - return Ok((&ListObjectVersions as &'static dyn super::Operation, false)); - } - if super::check_query_pattern(qs, "list-type", "2") { - return Ok((&ListObjectsV2 as &'static dyn super::Operation, false)); - } - } - Ok((&ListObjects as &'static dyn super::Operation, false)) - } - S3Path::Object { .. } => { - if let Some(qs) = qs { - if qs.has("attributes") { - return Ok((&GetObjectAttributes as &'static dyn super::Operation, false)); - } - if qs.has("acl") { - return Ok((&GetObjectAcl as &'static dyn super::Operation, false)); - } - if qs.has("legal-hold") { - return Ok((&GetObjectLegalHold as &'static dyn super::Operation, false)); - } - if qs.has("retention") { - return Ok((&GetObjectRetention as &'static dyn super::Operation, false)); - } - if qs.has("tagging") { - return Ok((&GetObjectTagging as &'static dyn super::Operation, false)); - } - if qs.has("torrent") { - return Ok((&GetObjectTorrent as &'static dyn super::Operation, false)); - } - } - if let Some(qs) = qs - && qs.has("uploadId") - { - return Ok((&ListParts as &'static dyn super::Operation, false)); - } - Ok((&GetObject as &'static dyn super::Operation, false)) - } - }, - hyper::Method::POST => match s3_path { - S3Path::Root => Err(super::unknown_operation()), - S3Path::Bucket { .. } => { - if let Some(qs) = qs { - if qs.has("metadataTable") { - return Ok((&CreateBucketMetadataTableConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("delete") { - return Ok((&DeleteObjects as &'static dyn super::Operation, true)); - } - } - if req.headers.contains_key("x-amz-request-route") && req.headers.contains_key("x-amz-request-token") { - return Ok((&WriteGetObjectResponse as &'static dyn super::Operation, false)); - } - Err(super::unknown_operation()) - } - S3Path::Object { .. } => { - if let Some(qs) = qs { - if qs.has("select") && super::check_query_pattern(qs, "select-type", "2") { - return Ok((&SelectObjectContent as &'static dyn super::Operation, true)); - } - if qs.has("uploads") { - return Ok((&CreateMultipartUpload as &'static dyn super::Operation, false)); - } - if qs.has("restore") { - return Ok((&RestoreObject as &'static dyn super::Operation, true)); - } - } - if let Some(qs) = qs - && qs.has("uploadId") - { - return Ok((&CompleteMultipartUpload as &'static dyn super::Operation, true)); - } - Err(super::unknown_operation()) - } - }, - hyper::Method::PUT => match s3_path { - S3Path::Root => Err(super::unknown_operation()), - S3Path::Bucket { .. } => { - if let Some(qs) = qs { - if qs.has("analytics") { - return Ok((&PutBucketAnalyticsConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("intelligent-tiering") { - return Ok((&PutBucketIntelligentTieringConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("inventory") { - return Ok((&PutBucketInventoryConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("metrics") { - return Ok((&PutBucketMetricsConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("accelerate") { - return Ok((&PutBucketAccelerateConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("acl") { - return Ok((&PutBucketAcl as &'static dyn super::Operation, true)); - } - if qs.has("cors") { - return Ok((&PutBucketCors as &'static dyn super::Operation, true)); - } - if qs.has("encryption") { - return Ok((&PutBucketEncryption as &'static dyn super::Operation, true)); - } - if qs.has("lifecycle") { - return Ok((&PutBucketLifecycleConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("logging") { - return Ok((&PutBucketLogging as &'static dyn super::Operation, true)); - } - if qs.has("notification") { - return Ok((&PutBucketNotificationConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("ownershipControls") { - return Ok((&PutBucketOwnershipControls as &'static dyn super::Operation, true)); - } - if qs.has("policy") { - return Ok((&PutBucketPolicy as &'static dyn super::Operation, true)); - } - if qs.has("replication") { - return Ok((&PutBucketReplication as &'static dyn super::Operation, true)); - } - if qs.has("requestPayment") { - return Ok((&PutBucketRequestPayment as &'static dyn super::Operation, true)); - } - if qs.has("tagging") { - return Ok((&PutBucketTagging as &'static dyn super::Operation, true)); - } - if qs.has("versioning") { - return Ok((&PutBucketVersioning as &'static dyn super::Operation, true)); - } - if qs.has("website") { - return Ok((&PutBucketWebsite as &'static dyn super::Operation, true)); - } - if qs.has("object-lock") { - return Ok((&PutObjectLockConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("publicAccessBlock") { - return Ok((&PutPublicAccessBlock as &'static dyn super::Operation, true)); - } - } - Ok((&CreateBucket as &'static dyn super::Operation, true)) - } - S3Path::Object { .. } => { - if let Some(qs) = qs { - if qs.has("acl") { - return Ok((&PutObjectAcl as &'static dyn super::Operation, true)); - } - if qs.has("legal-hold") { - return Ok((&PutObjectLegalHold as &'static dyn super::Operation, true)); - } - if qs.has("retention") { - return Ok((&PutObjectRetention as &'static dyn super::Operation, true)); - } - if qs.has("tagging") { - return Ok((&PutObjectTagging as &'static dyn super::Operation, true)); - } - } - if let Some(qs) = qs - && qs.has("partNumber") - && qs.has("uploadId") - && req.headers.contains_key("x-amz-copy-source") - { - return Ok((&UploadPartCopy as &'static dyn super::Operation, false)); - } - if let Some(qs) = qs - && qs.has("partNumber") - && qs.has("uploadId") - { - return Ok((&UploadPart as &'static dyn super::Operation, false)); - } - if req.headers.contains_key("x-amz-copy-source") { - return Ok((&CopyObject as &'static dyn super::Operation, false)); - } - Ok((&PutObject as &'static dyn super::Operation, false)) - } - }, - hyper::Method::DELETE => match s3_path { - S3Path::Root => Err(super::unknown_operation()), - S3Path::Bucket { .. } => { - if let Some(qs) = qs { - if qs.has("analytics") { - return Ok((&DeleteBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("intelligent-tiering") { - return Ok((&DeleteBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("inventory") { - return Ok((&DeleteBucketInventoryConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("metrics") { - return Ok((&DeleteBucketMetricsConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("cors") { - return Ok((&DeleteBucketCors as &'static dyn super::Operation, false)); - } - if qs.has("encryption") { - return Ok((&DeleteBucketEncryption as &'static dyn super::Operation, false)); - } - if qs.has("lifecycle") { - return Ok((&DeleteBucketLifecycle as &'static dyn super::Operation, false)); - } - if qs.has("metadataTable") { - return Ok((&DeleteBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("ownershipControls") { - return Ok((&DeleteBucketOwnershipControls as &'static dyn super::Operation, false)); - } - if qs.has("policy") { - return Ok((&DeleteBucketPolicy as &'static dyn super::Operation, false)); - } - if qs.has("replication") { - return Ok((&DeleteBucketReplication as &'static dyn super::Operation, false)); - } - if qs.has("tagging") { - return Ok((&DeleteBucketTagging as &'static dyn super::Operation, false)); - } - if qs.has("website") { - return Ok((&DeleteBucketWebsite as &'static dyn super::Operation, false)); - } - if qs.has("publicAccessBlock") { - return Ok((&DeletePublicAccessBlock as &'static dyn super::Operation, false)); - } - } - Ok((&DeleteBucket as &'static dyn super::Operation, false)) - } - S3Path::Object { .. } => { - if let Some(qs) = qs { - if qs.has("tagging") { - return Ok((&DeleteObjectTagging as &'static dyn super::Operation, false)); - } - } - if let Some(qs) = qs - && qs.has("uploadId") - { - return Ok((&AbortMultipartUpload as &'static dyn super::Operation, false)); - } - Ok((&DeleteObject as &'static dyn super::Operation, false)) - } - }, - _ => Err(super::unknown_operation()), - } +pub fn resolve_route(req: &http::Request, s3_path: &S3Path, qs: Option<&http::OrderedQs>)-> S3Result<(&'static dyn super::Operation, bool)> { +match req.method { +hyper::Method::HEAD => match s3_path { +S3Path::Root => { +Err(super::unknown_operation()) +} +S3Path::Bucket{ .. } => { +Ok((&HeadBucket as &'static dyn super::Operation, false)) +} +S3Path::Object{ .. } => { +Ok((&HeadObject as &'static dyn super::Operation, false)) +} +} +hyper::Method::GET => match s3_path { +S3Path::Root => { +if let Some(qs) = qs { +if super::check_query_pattern(qs, "x-id","ListDirectoryBuckets") { +return Ok((&ListDirectoryBuckets as &'static dyn super::Operation, false)); +} +} +Ok((&ListBuckets as &'static dyn super::Operation, false)) +} +S3Path::Bucket{ .. } => { +if let Some(qs) = qs { +if qs.has("analytics") && qs.has("id") { +return Ok((&GetBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("intelligent-tiering") && qs.has("id") { +return Ok((&GetBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("inventory") && qs.has("id") { +return Ok((&GetBucketInventoryConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("metrics") && qs.has("id") { +return Ok((&GetBucketMetricsConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("session") { +return Ok((&CreateSession as &'static dyn super::Operation, false)); +} +if qs.has("accelerate") { +return Ok((&GetBucketAccelerateConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("acl") { +return Ok((&GetBucketAcl as &'static dyn super::Operation, false)); +} +if qs.has("cors") { +return Ok((&GetBucketCors as &'static dyn super::Operation, false)); +} +if qs.has("encryption") { +return Ok((&GetBucketEncryption as &'static dyn super::Operation, false)); +} +if qs.has("lifecycle") { +return Ok((&GetBucketLifecycleConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("location") { +return Ok((&GetBucketLocation as &'static dyn super::Operation, false)); +} +if qs.has("logging") { +return Ok((&GetBucketLogging as &'static dyn super::Operation, false)); +} +if qs.has("metadataTable") { +return Ok((&GetBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("notification") { +return Ok((&GetBucketNotificationConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("ownershipControls") { +return Ok((&GetBucketOwnershipControls as &'static dyn super::Operation, false)); +} +if qs.has("policy") { +return Ok((&GetBucketPolicy as &'static dyn super::Operation, false)); +} +if qs.has("policyStatus") { +return Ok((&GetBucketPolicyStatus as &'static dyn super::Operation, false)); +} +if qs.has("replication") { +return Ok((&GetBucketReplication as &'static dyn super::Operation, false)); +} +if qs.has("requestPayment") { +return Ok((&GetBucketRequestPayment as &'static dyn super::Operation, false)); +} +if qs.has("tagging") { +return Ok((&GetBucketTagging as &'static dyn super::Operation, false)); +} +if qs.has("versioning") { +return Ok((&GetBucketVersioning as &'static dyn super::Operation, false)); +} +if qs.has("website") { +return Ok((&GetBucketWebsite as &'static dyn super::Operation, false)); +} +if qs.has("object-lock") { +return Ok((&GetObjectLockConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("publicAccessBlock") { +return Ok((&GetPublicAccessBlock as &'static dyn super::Operation, false)); +} +if qs.has("analytics") && !qs.has("id") { +return Ok((&ListBucketAnalyticsConfigurations as &'static dyn super::Operation, false)); +} +if qs.has("intelligent-tiering") && !qs.has("id") { +return Ok((&ListBucketIntelligentTieringConfigurations as &'static dyn super::Operation, false)); +} +if qs.has("inventory") && !qs.has("id") { +return Ok((&ListBucketInventoryConfigurations as &'static dyn super::Operation, false)); +} +if qs.has("metrics") && !qs.has("id") { +return Ok((&ListBucketMetricsConfigurations as &'static dyn super::Operation, false)); +} +if qs.has("uploads") { +return Ok((&ListMultipartUploads as &'static dyn super::Operation, false)); +} +if qs.has("versions") { +return Ok((&ListObjectVersions as &'static dyn super::Operation, false)); +} +if super::check_query_pattern(qs, "list-type","2") { +return Ok((&ListObjectsV2 as &'static dyn super::Operation, false)); +} +} +Ok((&ListObjects as &'static dyn super::Operation, false)) +} +S3Path::Object{ .. } => { +if let Some(qs) = qs { +if qs.has("attributes") { +return Ok((&GetObjectAttributes as &'static dyn super::Operation, false)); +} +if qs.has("acl") { +return Ok((&GetObjectAcl as &'static dyn super::Operation, false)); +} +if qs.has("legal-hold") { +return Ok((&GetObjectLegalHold as &'static dyn super::Operation, false)); +} +if qs.has("retention") { +return Ok((&GetObjectRetention as &'static dyn super::Operation, false)); +} +if qs.has("tagging") { +return Ok((&GetObjectTagging as &'static dyn super::Operation, false)); +} +if qs.has("torrent") { +return Ok((&GetObjectTorrent as &'static dyn super::Operation, false)); +} +} +if let Some(qs) = qs + && qs.has("uploadId") { +return Ok((&ListParts as &'static dyn super::Operation, false)); +} +Ok((&GetObject as &'static dyn super::Operation, false)) +} +} +hyper::Method::POST => match s3_path { +S3Path::Root => { +Err(super::unknown_operation()) +} +S3Path::Bucket{ .. } => { +if let Some(qs) = qs { +if qs.has("metadataTable") { +return Ok((&CreateBucketMetadataTableConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("delete") { +return Ok((&DeleteObjects as &'static dyn super::Operation, true)); +} +} +if req.headers.contains_key("x-amz-request-route") && req.headers.contains_key("x-amz-request-token") { +return Ok((&WriteGetObjectResponse as &'static dyn super::Operation, false)); +} +Err(super::unknown_operation()) +} +S3Path::Object{ .. } => { +if let Some(qs) = qs { +if qs.has("select") && super::check_query_pattern(qs, "select-type","2") { +return Ok((&SelectObjectContent as &'static dyn super::Operation, true)); +} +if qs.has("uploads") { +return Ok((&CreateMultipartUpload as &'static dyn super::Operation, false)); +} +if qs.has("restore") { +return Ok((&RestoreObject as &'static dyn super::Operation, true)); +} +} +if let Some(qs) = qs + && qs.has("uploadId") { +return Ok((&CompleteMultipartUpload as &'static dyn super::Operation, true)); +} +Err(super::unknown_operation()) +} +} +hyper::Method::PUT => match s3_path { +S3Path::Root => { +Err(super::unknown_operation()) +} +S3Path::Bucket{ .. } => { +if let Some(qs) = qs { +if qs.has("analytics") { +return Ok((&PutBucketAnalyticsConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("intelligent-tiering") { +return Ok((&PutBucketIntelligentTieringConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("inventory") { +return Ok((&PutBucketInventoryConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("metrics") { +return Ok((&PutBucketMetricsConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("accelerate") { +return Ok((&PutBucketAccelerateConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("acl") { +return Ok((&PutBucketAcl as &'static dyn super::Operation, true)); +} +if qs.has("cors") { +return Ok((&PutBucketCors as &'static dyn super::Operation, true)); +} +if qs.has("encryption") { +return Ok((&PutBucketEncryption as &'static dyn super::Operation, true)); +} +if qs.has("lifecycle") { +return Ok((&PutBucketLifecycleConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("logging") { +return Ok((&PutBucketLogging as &'static dyn super::Operation, true)); +} +if qs.has("notification") { +return Ok((&PutBucketNotificationConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("ownershipControls") { +return Ok((&PutBucketOwnershipControls as &'static dyn super::Operation, true)); +} +if qs.has("policy") { +return Ok((&PutBucketPolicy as &'static dyn super::Operation, true)); +} +if qs.has("replication") { +return Ok((&PutBucketReplication as &'static dyn super::Operation, true)); +} +if qs.has("requestPayment") { +return Ok((&PutBucketRequestPayment as &'static dyn super::Operation, true)); +} +if qs.has("tagging") { +return Ok((&PutBucketTagging as &'static dyn super::Operation, true)); +} +if qs.has("versioning") { +return Ok((&PutBucketVersioning as &'static dyn super::Operation, true)); +} +if qs.has("website") { +return Ok((&PutBucketWebsite as &'static dyn super::Operation, true)); +} +if qs.has("object-lock") { +return Ok((&PutObjectLockConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("publicAccessBlock") { +return Ok((&PutPublicAccessBlock as &'static dyn super::Operation, true)); +} +} +Ok((&CreateBucket as &'static dyn super::Operation, true)) +} +S3Path::Object{ .. } => { +if let Some(qs) = qs { +if qs.has("acl") { +return Ok((&PutObjectAcl as &'static dyn super::Operation, true)); +} +if qs.has("legal-hold") { +return Ok((&PutObjectLegalHold as &'static dyn super::Operation, true)); +} +if qs.has("retention") { +return Ok((&PutObjectRetention as &'static dyn super::Operation, true)); +} +if qs.has("tagging") { +return Ok((&PutObjectTagging as &'static dyn super::Operation, true)); +} +} +if let Some(qs) = qs + && qs.has("partNumber") && qs.has("uploadId") && req.headers.contains_key("x-amz-copy-source") { +return Ok((&UploadPartCopy as &'static dyn super::Operation, false)); +} +if let Some(qs) = qs + && qs.has("partNumber") && qs.has("uploadId") { +return Ok((&UploadPart as &'static dyn super::Operation, false)); +} +if req.headers.contains_key("x-amz-copy-source") { +return Ok((&CopyObject as &'static dyn super::Operation, false)); +} +Ok((&PutObject as &'static dyn super::Operation, false)) +} +} +hyper::Method::DELETE => match s3_path { +S3Path::Root => { +Err(super::unknown_operation()) +} +S3Path::Bucket{ .. } => { +if let Some(qs) = qs { +if qs.has("analytics") { +return Ok((&DeleteBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("intelligent-tiering") { +return Ok((&DeleteBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("inventory") { +return Ok((&DeleteBucketInventoryConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("metrics") { +return Ok((&DeleteBucketMetricsConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("cors") { +return Ok((&DeleteBucketCors as &'static dyn super::Operation, false)); +} +if qs.has("encryption") { +return Ok((&DeleteBucketEncryption as &'static dyn super::Operation, false)); +} +if qs.has("lifecycle") { +return Ok((&DeleteBucketLifecycle as &'static dyn super::Operation, false)); +} +if qs.has("metadataTable") { +return Ok((&DeleteBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("ownershipControls") { +return Ok((&DeleteBucketOwnershipControls as &'static dyn super::Operation, false)); +} +if qs.has("policy") { +return Ok((&DeleteBucketPolicy as &'static dyn super::Operation, false)); +} +if qs.has("replication") { +return Ok((&DeleteBucketReplication as &'static dyn super::Operation, false)); +} +if qs.has("tagging") { +return Ok((&DeleteBucketTagging as &'static dyn super::Operation, false)); +} +if qs.has("website") { +return Ok((&DeleteBucketWebsite as &'static dyn super::Operation, false)); +} +if qs.has("publicAccessBlock") { +return Ok((&DeletePublicAccessBlock as &'static dyn super::Operation, false)); +} +} +Ok((&DeleteBucket as &'static dyn super::Operation, false)) +} +S3Path::Object{ .. } => { +if let Some(qs) = qs { +if qs.has("tagging") { +return Ok((&DeleteObjectTagging as &'static dyn super::Operation, false)); +} +} +if let Some(qs) = qs + && qs.has("uploadId") { +return Ok((&AbortMultipartUpload as &'static dyn super::Operation, false)); +} +Ok((&DeleteObject as &'static dyn super::Operation, false)) +} +} +_ => Err(super::unknown_operation()) +} } diff --git a/crates/s3s/src/xml/de.rs b/crates/s3s/src/xml/de.rs index e0402953..c8d0cf74 100644 --- a/crates/s3s/src/xml/de.rs +++ b/crates/s3s/src/xml/de.rs @@ -175,8 +175,28 @@ impl<'xml> Deserializer<'xml> { } } - /// Expects an end event - fn expect_end(&mut self, name: &[u8]) -> DeResult { + /// Expects a start event with any of the given names. Returns the matched name (owned). + fn expect_start_any(&mut self, names: &[&str]) -> DeResult> { + let names_bytes: Vec> = names.iter().map(|s| s.as_bytes().to_vec()).collect(); + loop { + match self.next_event()? { + DeEvent::Start(x) => { + let name = x.name().as_ref().to_vec(); + if names_bytes.iter().any(|n| *n == name) { + return Ok(name); + } + return Err(unexpected_tag_name()); + } + DeEvent::End(_) => return Err(unexpected_end()), + DeEvent::Text(_) => continue, + DeEvent::Eof => return Err(unexpected_eof()), + } + } + } + + /// Expects an end event (accepts both `&[u8]` and `AsRef<[u8]>` for flexibility) + fn expect_end(&mut self, name: impl AsRef<[u8]>) -> DeResult { + let name = name.as_ref(); loop { match self.next_event()? { DeEvent::Start(_) => return Err(unexpected_start()), @@ -215,6 +235,21 @@ impl<'xml> Deserializer<'xml> { Ok(ans) } + /// Deserializes an element with any of the given root names (MinIO compatibility). + /// + /// # Errors + /// Returns an error if the deserialization fails. + pub fn named_element_any( + &mut self, + names: &[&str], + f: impl FnOnce(&mut Self) -> DeResult, + ) -> DeResult { + let name = self.expect_start_any(names)?; + let ans = f(self)?; + self.expect_end(name)?; + Ok(ans) + } + pub fn element(&mut self, f: impl FnOnce(&mut Self, &[u8]) -> DeResult) -> DeResult { loop { match self.peek_event()? { diff --git a/crates/s3s/src/xml/generated_minio.rs b/crates/s3s/src/xml/generated_minio.rs index f6b8d23d..88f9867a 100644 --- a/crates/s3s/src/xml/generated_minio.rs +++ b/crates/s3s/src/xml/generated_minio.rs @@ -260,6 +260,8 @@ use std::io::Write; // DeserializeContent: DaysAfterInitiation // SerializeContent: DefaultRetention // DeserializeContent: DefaultRetention +// SerializeContent: DelMarkerExpiration +// DeserializeContent: DelMarkerExpiration // SerializeContent: Delete // DeserializeContent: Delete // SerializeContent: DeleteMarker @@ -327,6 +329,8 @@ use std::io::Write; // DeserializeContent: ExistingObjectReplicationStatus // SerializeContent: ExpirationStatus // DeserializeContent: ExpirationStatus +// SerializeContent: ExpiredObjectAllVersions +// DeserializeContent: ExpiredObjectAllVersions // SerializeContent: ExpiredObjectDeleteMarker // DeserializeContent: ExpiredObjectDeleteMarker // SerializeContent: ExposeHeader @@ -832,9495 +836,8834 @@ use std::io::Write; const XMLNS_S3: &str = "http://s3.amazonaws.com/doc/2006-03-01/"; impl Serialize for AccelerateConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("AccelerateConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("AccelerateConfiguration", self) +} } impl<'xml> Deserialize<'xml> for AccelerateConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("AccelerateConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("AccelerateConfiguration", Deserializer::content) +} } impl Serialize for AccessControlPolicy { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("AccessControlPolicy", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("AccessControlPolicy", self) +} } impl<'xml> Deserialize<'xml> for AccessControlPolicy { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("AccessControlPolicy", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("AccessControlPolicy", Deserializer::content) +} } impl Serialize for AnalyticsConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("AnalyticsConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("AnalyticsConfiguration", self) +} } impl<'xml> Deserialize<'xml> for AnalyticsConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("AnalyticsConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("AnalyticsConfiguration", Deserializer::content) +} } impl Serialize for BucketLifecycleConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("LifecycleConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("LifecycleConfiguration", self) +} } impl<'xml> Deserialize<'xml> for BucketLifecycleConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("LifecycleConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element_any( + &["LifecycleConfiguration", "BucketLifecycleConfiguration"], + Deserializer::content, +) +} } impl Serialize for BucketLoggingStatus { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("BucketLoggingStatus", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("BucketLoggingStatus", self) +} } impl<'xml> Deserialize<'xml> for BucketLoggingStatus { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("BucketLoggingStatus", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("BucketLoggingStatus", Deserializer::content) +} } impl Serialize for CORSConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CORSConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CORSConfiguration", self) +} } impl<'xml> Deserialize<'xml> for CORSConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CORSConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CORSConfiguration", Deserializer::content) +} } impl Serialize for CompleteMultipartUploadOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("CompleteMultipartUploadResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("CompleteMultipartUploadResult", XMLNS_S3, self) +} } impl Serialize for CompletedMultipartUpload { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CompleteMultipartUpload", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CompleteMultipartUpload", self) +} } impl<'xml> Deserialize<'xml> for CompletedMultipartUpload { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CompleteMultipartUpload", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CompleteMultipartUpload", Deserializer::content) +} } impl Serialize for CopyObjectResult { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CopyObjectResult", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CopyObjectResult", self) +} } impl<'xml> Deserialize<'xml> for CopyObjectResult { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CopyObjectResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CopyObjectResult", Deserializer::content) +} } impl Serialize for CopyPartResult { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CopyPartResult", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CopyPartResult", self) +} } impl<'xml> Deserialize<'xml> for CopyPartResult { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CopyPartResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CopyPartResult", Deserializer::content) +} } impl Serialize for CreateBucketConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CreateBucketConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CreateBucketConfiguration", self) +} } impl<'xml> Deserialize<'xml> for CreateBucketConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CreateBucketConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CreateBucketConfiguration", Deserializer::content) +} } impl Serialize for CreateMultipartUploadOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("InitiateMultipartUploadResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("InitiateMultipartUploadResult", XMLNS_S3, self) +} } impl Serialize for CreateSessionOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("CreateSessionResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("CreateSessionResult", XMLNS_S3, self) +} } impl Serialize for Delete { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Delete", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Delete", self) +} } impl<'xml> Deserialize<'xml> for Delete { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Delete", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Delete", Deserializer::content) +} } impl Serialize for DeleteObjectsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("DeleteResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("DeleteResult", XMLNS_S3, self) +} } impl Serialize for GetBucketAccelerateConfigurationOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("AccelerateConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("AccelerateConfiguration", XMLNS_S3, self) +} } impl Serialize for GetBucketAclOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketAclOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("AccessControlPolicy", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("AccessControlPolicy", Deserializer::content) +} } impl Serialize for GetBucketCorsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("CORSConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("CORSConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketCorsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CORSConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CORSConfiguration", Deserializer::content) +} } impl Serialize for GetBucketLifecycleConfigurationOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("LifecycleConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("LifecycleConfiguration", XMLNS_S3, self) +} } impl Serialize for GetBucketLoggingOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("BucketLoggingStatus", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("BucketLoggingStatus", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketLoggingOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("BucketLoggingStatus", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("BucketLoggingStatus", Deserializer::content) +} } impl Serialize for GetBucketMetadataTableConfigurationResult { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("GetBucketMetadataTableConfigurationResult", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("GetBucketMetadataTableConfigurationResult", self) +} } impl<'xml> Deserialize<'xml> for GetBucketMetadataTableConfigurationResult { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("GetBucketMetadataTableConfigurationResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("GetBucketMetadataTableConfigurationResult", Deserializer::content) +} } impl Serialize for GetBucketNotificationConfigurationOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("NotificationConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("NotificationConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketNotificationConfigurationOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("NotificationConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("NotificationConfiguration", Deserializer::content) +} } impl Serialize for GetBucketRequestPaymentOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("RequestPaymentConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("RequestPaymentConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketRequestPaymentOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("RequestPaymentConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("RequestPaymentConfiguration", Deserializer::content) +} } impl Serialize for GetBucketTaggingOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("Tagging", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("Tagging", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketTaggingOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Tagging", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Tagging", Deserializer::content) +} } impl Serialize for GetBucketVersioningOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("VersioningConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("VersioningConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketVersioningOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("VersioningConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("VersioningConfiguration", Deserializer::content) +} } impl Serialize for GetBucketWebsiteOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("WebsiteConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("WebsiteConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketWebsiteOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("WebsiteConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("WebsiteConfiguration", Deserializer::content) +} } impl Serialize for GetObjectAclOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) +} } impl Serialize for GetObjectAttributesOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("GetObjectAttributesResponse", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("GetObjectAttributesResponse", XMLNS_S3, self) +} } impl Serialize for GetObjectTaggingOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("Tagging", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("Tagging", XMLNS_S3, self) +} } impl Serialize for IntelligentTieringConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("IntelligentTieringConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("IntelligentTieringConfiguration", self) +} } impl<'xml> Deserialize<'xml> for IntelligentTieringConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("IntelligentTieringConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("IntelligentTieringConfiguration", Deserializer::content) +} } impl Serialize for InventoryConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("InventoryConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("InventoryConfiguration", self) +} } impl<'xml> Deserialize<'xml> for InventoryConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("InventoryConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("InventoryConfiguration", Deserializer::content) +} } impl Serialize for ListBucketAnalyticsConfigurationsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListBucketAnalyticsConfigurationResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListBucketAnalyticsConfigurationResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketAnalyticsConfigurationsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListBucketAnalyticsConfigurationResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListBucketAnalyticsConfigurationResult", Deserializer::content) +} } impl Serialize for ListBucketIntelligentTieringConfigurationsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListBucketIntelligentTieringConfigurationsOutput", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListBucketIntelligentTieringConfigurationsOutput", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketIntelligentTieringConfigurationsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListBucketIntelligentTieringConfigurationsOutput", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListBucketIntelligentTieringConfigurationsOutput", Deserializer::content) +} } impl Serialize for ListBucketInventoryConfigurationsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListInventoryConfigurationsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListInventoryConfigurationsResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketInventoryConfigurationsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListInventoryConfigurationsResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListInventoryConfigurationsResult", Deserializer::content) +} } impl Serialize for ListBucketMetricsConfigurationsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListMetricsConfigurationsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListMetricsConfigurationsResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketMetricsConfigurationsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListMetricsConfigurationsResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListMetricsConfigurationsResult", Deserializer::content) +} } impl Serialize for ListBucketsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListAllMyBucketsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListAllMyBucketsResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListAllMyBucketsResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListAllMyBucketsResult", Deserializer::content) +} } impl Serialize for ListDirectoryBucketsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListAllMyDirectoryBucketsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListAllMyDirectoryBucketsResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListDirectoryBucketsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListAllMyDirectoryBucketsResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListAllMyDirectoryBucketsResult", Deserializer::content) +} } impl Serialize for ListMultipartUploadsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListMultipartUploadsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListMultipartUploadsResult", XMLNS_S3, self) +} } impl Serialize for ListObjectVersionsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListVersionsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListVersionsResult", XMLNS_S3, self) +} } impl Serialize for ListObjectsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListBucketResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListBucketResult", XMLNS_S3, self) +} } impl Serialize for ListObjectsV2Output { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListBucketResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListBucketResult", XMLNS_S3, self) +} } impl Serialize for ListPartsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListPartsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListPartsResult", XMLNS_S3, self) +} } impl Serialize for MetadataTableConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("MetadataTableConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("MetadataTableConfiguration", self) +} } impl<'xml> Deserialize<'xml> for MetadataTableConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("MetadataTableConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("MetadataTableConfiguration", Deserializer::content) +} } impl Serialize for MetricsConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("MetricsConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("MetricsConfiguration", self) +} } impl<'xml> Deserialize<'xml> for MetricsConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("MetricsConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("MetricsConfiguration", Deserializer::content) +} } impl Serialize for NotificationConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("NotificationConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("NotificationConfiguration", self) +} } impl<'xml> Deserialize<'xml> for NotificationConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("NotificationConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("NotificationConfiguration", Deserializer::content) +} } impl Serialize for ObjectLockConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("ObjectLockConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("ObjectLockConfiguration", self) +} } impl<'xml> Deserialize<'xml> for ObjectLockConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ObjectLockConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ObjectLockConfiguration", Deserializer::content) +} } impl Serialize for ObjectLockLegalHold { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("LegalHold", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("LegalHold", self) +} } impl<'xml> Deserialize<'xml> for ObjectLockLegalHold { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("LegalHold", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("LegalHold", Deserializer::content) +} } impl Serialize for ObjectLockRetention { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Retention", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Retention", self) +} } impl<'xml> Deserialize<'xml> for ObjectLockRetention { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Retention", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Retention", Deserializer::content) +} } impl Serialize for OwnershipControls { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("OwnershipControls", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("OwnershipControls", self) +} } impl<'xml> Deserialize<'xml> for OwnershipControls { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("OwnershipControls", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("OwnershipControls", Deserializer::content) +} } impl Serialize for PolicyStatus { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("PolicyStatus", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("PolicyStatus", self) +} } impl<'xml> Deserialize<'xml> for PolicyStatus { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("PolicyStatus", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("PolicyStatus", Deserializer::content) +} } impl Serialize for Progress { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Progress", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Progress", self) +} } impl<'xml> Deserialize<'xml> for Progress { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Progress", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Progress", Deserializer::content) +} } impl Serialize for PublicAccessBlockConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("PublicAccessBlockConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("PublicAccessBlockConfiguration", self) +} } impl<'xml> Deserialize<'xml> for PublicAccessBlockConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("PublicAccessBlockConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("PublicAccessBlockConfiguration", Deserializer::content) +} } impl Serialize for ReplicationConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("ReplicationConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("ReplicationConfiguration", self) +} } impl<'xml> Deserialize<'xml> for ReplicationConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ReplicationConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ReplicationConfiguration", Deserializer::content) +} } impl Serialize for RequestPaymentConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("RequestPaymentConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("RequestPaymentConfiguration", self) +} } impl<'xml> Deserialize<'xml> for RequestPaymentConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("RequestPaymentConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("RequestPaymentConfiguration", Deserializer::content) +} } impl Serialize for RestoreRequest { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("RestoreRequest", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("RestoreRequest", self) +} } impl<'xml> Deserialize<'xml> for RestoreRequest { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("RestoreRequest", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("RestoreRequest", Deserializer::content) +} } impl Serialize for SelectObjectContentRequest { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("SelectObjectContentRequest", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("SelectObjectContentRequest", self) +} } impl<'xml> Deserialize<'xml> for SelectObjectContentRequest { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("SelectObjectContentRequest", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("SelectObjectContentRequest", Deserializer::content) +} } impl Serialize for ServerSideEncryptionConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("ServerSideEncryptionConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("ServerSideEncryptionConfiguration", self) +} } impl<'xml> Deserialize<'xml> for ServerSideEncryptionConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ServerSideEncryptionConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ServerSideEncryptionConfiguration", Deserializer::content) +} } impl Serialize for Stats { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Stats", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Stats", self) +} } impl<'xml> Deserialize<'xml> for Stats { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Stats", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Stats", Deserializer::content) +} } impl Serialize for Tagging { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Tagging", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Tagging", self) +} } impl<'xml> Deserialize<'xml> for Tagging { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Tagging", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Tagging", Deserializer::content) +} } impl Serialize for VersioningConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("VersioningConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("VersioningConfiguration", self) +} } impl<'xml> Deserialize<'xml> for VersioningConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("VersioningConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("VersioningConfiguration", Deserializer::content) +} } impl Serialize for WebsiteConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("WebsiteConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("WebsiteConfiguration", self) +} } impl<'xml> Deserialize<'xml> for WebsiteConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("WebsiteConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("WebsiteConfiguration", Deserializer::content) +} } impl SerializeContent for AbortIncompleteMultipartUpload { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.days_after_initiation { - s.content("DaysAfterInitiation", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.days_after_initiation { +s.content("DaysAfterInitiation", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AbortIncompleteMultipartUpload { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut days_after_initiation: Option = None; - d.for_each_element(|d, x| match x { - b"DaysAfterInitiation" => { - if days_after_initiation.is_some() { - return Err(DeError::DuplicateField); - } - days_after_initiation = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { days_after_initiation }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut days_after_initiation: Option = None; +d.for_each_element(|d, x| match x { +b"DaysAfterInitiation" => { +if days_after_initiation.is_some() { return Err(DeError::DuplicateField); } +days_after_initiation = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +days_after_initiation, +}) +} } impl SerializeContent for AccelerateConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AccelerateConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status, +}) +} } impl SerializeContent for AccessControlPolicy { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.grants { - s.list("AccessControlList", "Grant", iter)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.grants { +s.list("AccessControlList", "Grant", iter)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AccessControlPolicy { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut grants: Option = None; - let mut owner: Option = None; - d.for_each_element(|d, x| match x { - b"AccessControlList" => { - if grants.is_some() { - return Err(DeError::DuplicateField); - } - grants = Some(d.list_content("Grant")?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { grants, owner }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut grants: Option = None; +let mut owner: Option = None; +d.for_each_element(|d, x| match x { +b"AccessControlList" => { +if grants.is_some() { return Err(DeError::DuplicateField); } +grants = Some(d.list_content("Grant")?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +grants, +owner, +}) +} } impl SerializeContent for AccessControlTranslation { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Owner", &self.owner)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Owner", &self.owner)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AccessControlTranslation { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut owner: Option = None; - d.for_each_element(|d, x| match x { - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - owner: owner.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut owner: Option = None; +d.for_each_element(|d, x| match x { +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +owner: owner.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for AnalyticsAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix, tags }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +tags, +}) +} } impl SerializeContent for AnalyticsConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - s.content("Id", &self.id)?; - s.content("StorageClassAnalysis", &self.storage_class_analysis)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +s.content("Id", &self.id)?; +s.content("StorageClassAnalysis", &self.storage_class_analysis)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut filter: Option = None; - let mut id: Option = None; - let mut storage_class_analysis: Option = None; - d.for_each_element(|d, x| match x { - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"StorageClassAnalysis" => { - if storage_class_analysis.is_some() { - return Err(DeError::DuplicateField); - } - storage_class_analysis = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - filter, - id: id.ok_or(DeError::MissingField)?, - storage_class_analysis: storage_class_analysis.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut filter: Option = None; +let mut id: Option = None; +let mut storage_class_analysis: Option = None; +d.for_each_element(|d, x| match x { +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"StorageClassAnalysis" => { +if storage_class_analysis.is_some() { return Err(DeError::DuplicateField); } +storage_class_analysis = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +filter, +id: id.ok_or(DeError::MissingField)?, +storage_class_analysis: storage_class_analysis.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for AnalyticsExportDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("S3BucketDestination", &self.s3_bucket_destination)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("S3BucketDestination", &self.s3_bucket_destination)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsExportDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3_bucket_destination: Option = None; - d.for_each_element(|d, x| match x { - b"S3BucketDestination" => { - if s3_bucket_destination.is_some() { - return Err(DeError::DuplicateField); - } - s3_bucket_destination = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3_bucket_destination: Option = None; +d.for_each_element(|d, x| match x { +b"S3BucketDestination" => { +if s3_bucket_destination.is_some() { return Err(DeError::DuplicateField); } +s3_bucket_destination = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for AnalyticsFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - match self { - Self::And(x) => s.content("And", x), - Self::Prefix(x) => s.content("Prefix", x), - Self::Tag(x) => s.content("Tag", x), - } - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +match self { +Self::And(x) => s.content("And", x), +Self::Prefix(x) => s.content("Prefix", x), +Self::Tag(x) => s.content("Tag", x), +} +} } impl<'xml> DeserializeContent<'xml> for AnalyticsFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.element(|d, x| match x { - b"And" => Ok(Self::And(d.content()?)), - b"Prefix" => Ok(Self::Prefix(d.content()?)), - b"Tag" => Ok(Self::Tag(d.content()?)), - _ => Err(DeError::UnexpectedTagName), - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.element(|d, x| match x { +b"And" => Ok(Self::And(d.content()?)), +b"Prefix" => Ok(Self::Prefix(d.content()?)), +b"Tag" => Ok(Self::Tag(d.content()?)), +_ => Err(DeError::UnexpectedTagName) +}) +} } impl SerializeContent for AnalyticsS3BucketDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Bucket", &self.bucket)?; - if let Some(ref val) = self.bucket_account_id { - s.content("BucketAccountId", val)?; - } - s.content("Format", &self.format)?; - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Bucket", &self.bucket)?; +if let Some(ref val) = self.bucket_account_id { +s.content("BucketAccountId", val)?; +} +s.content("Format", &self.format)?; +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsS3BucketDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bucket: Option = None; - let mut bucket_account_id: Option = None; - let mut format: Option = None; - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Bucket" => { - if bucket.is_some() { - return Err(DeError::DuplicateField); - } - bucket = Some(d.content()?); - Ok(()) - } - b"BucketAccountId" => { - if bucket_account_id.is_some() { - return Err(DeError::DuplicateField); - } - bucket_account_id = Some(d.content()?); - Ok(()) - } - b"Format" => { - if format.is_some() { - return Err(DeError::DuplicateField); - } - format = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bucket: bucket.ok_or(DeError::MissingField)?, - bucket_account_id, - format: format.ok_or(DeError::MissingField)?, - prefix, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bucket: Option = None; +let mut bucket_account_id: Option = None; +let mut format: Option = None; +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Bucket" => { +if bucket.is_some() { return Err(DeError::DuplicateField); } +bucket = Some(d.content()?); +Ok(()) +} +b"BucketAccountId" => { +if bucket_account_id.is_some() { return Err(DeError::DuplicateField); } +bucket_account_id = Some(d.content()?); +Ok(()) +} +b"Format" => { +if format.is_some() { return Err(DeError::DuplicateField); } +format = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bucket: bucket.ok_or(DeError::MissingField)?, +bucket_account_id, +format: format.ok_or(DeError::MissingField)?, +prefix, +}) +} } impl SerializeContent for AnalyticsS3ExportFileFormat { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsS3ExportFileFormat { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"CSV" => Ok(Self::from_static(AnalyticsS3ExportFileFormat::CSV)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"CSV" => Ok(Self::from_static(AnalyticsS3ExportFileFormat::CSV)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for AssumeRoleOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.assumed_role_user { - s.content("AssumedRoleUser", val)?; - } - if let Some(ref val) = self.credentials { - s.content("Credentials", val)?; - } - if let Some(ref val) = self.packed_policy_size { - s.content("PackedPolicySize", val)?; - } - if let Some(ref val) = self.source_identity { - s.content("SourceIdentity", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.assumed_role_user { +s.content("AssumedRoleUser", val)?; +} +if let Some(ref val) = self.credentials { +s.content("Credentials", val)?; +} +if let Some(ref val) = self.packed_policy_size { +s.content("PackedPolicySize", val)?; +} +if let Some(ref val) = self.source_identity { +s.content("SourceIdentity", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AssumeRoleOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut assumed_role_user: Option = None; - let mut credentials: Option = None; - let mut packed_policy_size: Option = None; - let mut source_identity: Option = None; - d.for_each_element(|d, x| match x { - b"AssumedRoleUser" => { - if assumed_role_user.is_some() { - return Err(DeError::DuplicateField); - } - assumed_role_user = Some(d.content()?); - Ok(()) - } - b"Credentials" => { - if credentials.is_some() { - return Err(DeError::DuplicateField); - } - credentials = Some(d.content()?); - Ok(()) - } - b"PackedPolicySize" => { - if packed_policy_size.is_some() { - return Err(DeError::DuplicateField); - } - packed_policy_size = Some(d.content()?); - Ok(()) - } - b"SourceIdentity" => { - if source_identity.is_some() { - return Err(DeError::DuplicateField); - } - source_identity = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - assumed_role_user, - credentials, - packed_policy_size, - source_identity, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut assumed_role_user: Option = None; +let mut credentials: Option = None; +let mut packed_policy_size: Option = None; +let mut source_identity: Option = None; +d.for_each_element(|d, x| match x { +b"AssumedRoleUser" => { +if assumed_role_user.is_some() { return Err(DeError::DuplicateField); } +assumed_role_user = Some(d.content()?); +Ok(()) +} +b"Credentials" => { +if credentials.is_some() { return Err(DeError::DuplicateField); } +credentials = Some(d.content()?); +Ok(()) +} +b"PackedPolicySize" => { +if packed_policy_size.is_some() { return Err(DeError::DuplicateField); } +packed_policy_size = Some(d.content()?); +Ok(()) +} +b"SourceIdentity" => { +if source_identity.is_some() { return Err(DeError::DuplicateField); } +source_identity = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +assumed_role_user, +credentials, +packed_policy_size, +source_identity, +}) +} } impl SerializeContent for AssumedRoleUser { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Arn", &self.arn)?; - s.content("AssumedRoleId", &self.assumed_role_id)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Arn", &self.arn)?; +s.content("AssumedRoleId", &self.assumed_role_id)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AssumedRoleUser { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut arn: Option = None; - let mut assumed_role_id: Option = None; - d.for_each_element(|d, x| match x { - b"Arn" => { - if arn.is_some() { - return Err(DeError::DuplicateField); - } - arn = Some(d.content()?); - Ok(()) - } - b"AssumedRoleId" => { - if assumed_role_id.is_some() { - return Err(DeError::DuplicateField); - } - assumed_role_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - arn: arn.ok_or(DeError::MissingField)?, - assumed_role_id: assumed_role_id.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut arn: Option = None; +let mut assumed_role_id: Option = None; +d.for_each_element(|d, x| match x { +b"Arn" => { +if arn.is_some() { return Err(DeError::DuplicateField); } +arn = Some(d.content()?); +Ok(()) +} +b"AssumedRoleId" => { +if assumed_role_id.is_some() { return Err(DeError::DuplicateField); } +assumed_role_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +arn: arn.ok_or(DeError::MissingField)?, +assumed_role_id: assumed_role_id.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Bucket { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket_region { - s.content("BucketRegion", val)?; - } - if let Some(ref val) = self.creation_date { - s.timestamp("CreationDate", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket_region { +s.content("BucketRegion", val)?; +} +if let Some(ref val) = self.creation_date { +s.timestamp("CreationDate", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Bucket { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bucket_region: Option = None; - let mut creation_date: Option = None; - let mut name: Option = None; - d.for_each_element(|d, x| match x { - b"BucketRegion" => { - if bucket_region.is_some() { - return Err(DeError::DuplicateField); - } - bucket_region = Some(d.content()?); - Ok(()) - } - b"CreationDate" => { - if creation_date.is_some() { - return Err(DeError::DuplicateField); - } - creation_date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Name" => { - if name.is_some() { - return Err(DeError::DuplicateField); - } - name = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bucket_region, - creation_date, - name, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bucket_region: Option = None; +let mut creation_date: Option = None; +let mut name: Option = None; +d.for_each_element(|d, x| match x { +b"BucketRegion" => { +if bucket_region.is_some() { return Err(DeError::DuplicateField); } +bucket_region = Some(d.content()?); +Ok(()) +} +b"CreationDate" => { +if creation_date.is_some() { return Err(DeError::DuplicateField); } +creation_date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Name" => { +if name.is_some() { return Err(DeError::DuplicateField); } +name = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bucket_region, +creation_date, +name, +}) +} } impl SerializeContent for BucketAccelerateStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketAccelerateStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Enabled" => Ok(Self::from_static(BucketAccelerateStatus::ENABLED)), - b"Suspended" => Ok(Self::from_static(BucketAccelerateStatus::SUSPENDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Enabled" => Ok(Self::from_static(BucketAccelerateStatus::ENABLED)), +b"Suspended" => Ok(Self::from_static(BucketAccelerateStatus::SUSPENDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for BucketInfo { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.data_redundancy { - s.content("DataRedundancy", val)?; - } - if let Some(ref val) = self.type_ { - s.content("Type", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.data_redundancy { +s.content("DataRedundancy", val)?; +} +if let Some(ref val) = self.type_ { +s.content("Type", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for BucketInfo { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut data_redundancy: Option = None; - let mut type_: Option = None; - d.for_each_element(|d, x| match x { - b"DataRedundancy" => { - if data_redundancy.is_some() { - return Err(DeError::DuplicateField); - } - data_redundancy = Some(d.content()?); - Ok(()) - } - b"Type" => { - if type_.is_some() { - return Err(DeError::DuplicateField); - } - type_ = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { data_redundancy, type_ }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut data_redundancy: Option = None; +let mut type_: Option = None; +d.for_each_element(|d, x| match x { +b"DataRedundancy" => { +if data_redundancy.is_some() { return Err(DeError::DuplicateField); } +data_redundancy = Some(d.content()?); +Ok(()) +} +b"Type" => { +if type_.is_some() { return Err(DeError::DuplicateField); } +type_ = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +data_redundancy, +type_, +}) +} } impl SerializeContent for BucketLifecycleConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.rules; - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.expiry_updated_at { +s.timestamp("ExpiryUpdatedAt", val, TimestampFormat::DateTime)?; +} +{ +let iter = &self.rules; +s.flattened_list("Rule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for BucketLifecycleConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut rules: Option = None; - d.for_each_element(|d, x| match x { - b"Rule" => { - let ans: LifecycleRule = d.content()?; - rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - rules: rules.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut expiry_updated_at: Option = None; +let mut rules: Option = None; +d.for_each_element(|d, x| match x { +b"ExpiryUpdatedAt" => { +if expiry_updated_at.is_some() { return Err(DeError::DuplicateField); } +expiry_updated_at = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Rule" => { +let ans: LifecycleRule = d.content()?; +rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Ok(()), +})?; +Ok(Self { +expiry_updated_at, +rules: rules.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for BucketLocationConstraint { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketLocationConstraint { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"EU" => Ok(Self::from_static(BucketLocationConstraint::EU)), - b"af-south-1" => Ok(Self::from_static(BucketLocationConstraint::AF_SOUTH_1)), - b"ap-east-1" => Ok(Self::from_static(BucketLocationConstraint::AP_EAST_1)), - b"ap-northeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_1)), - b"ap-northeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_2)), - b"ap-northeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_3)), - b"ap-south-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_1)), - b"ap-south-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_2)), - b"ap-southeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_1)), - b"ap-southeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_2)), - b"ap-southeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_3)), - b"ap-southeast-4" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_4)), - b"ap-southeast-5" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_5)), - b"ca-central-1" => Ok(Self::from_static(BucketLocationConstraint::CA_CENTRAL_1)), - b"cn-north-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTH_1)), - b"cn-northwest-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTHWEST_1)), - b"eu-central-1" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_1)), - b"eu-central-2" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_2)), - b"eu-north-1" => Ok(Self::from_static(BucketLocationConstraint::EU_NORTH_1)), - b"eu-south-1" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_1)), - b"eu-south-2" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_2)), - b"eu-west-1" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_1)), - b"eu-west-2" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_2)), - b"eu-west-3" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_3)), - b"il-central-1" => Ok(Self::from_static(BucketLocationConstraint::IL_CENTRAL_1)), - b"me-central-1" => Ok(Self::from_static(BucketLocationConstraint::ME_CENTRAL_1)), - b"me-south-1" => Ok(Self::from_static(BucketLocationConstraint::ME_SOUTH_1)), - b"sa-east-1" => Ok(Self::from_static(BucketLocationConstraint::SA_EAST_1)), - b"us-east-2" => Ok(Self::from_static(BucketLocationConstraint::US_EAST_2)), - b"us-gov-east-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_EAST_1)), - b"us-gov-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_WEST_1)), - b"us-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_1)), - b"us-west-2" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_2)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"EU" => Ok(Self::from_static(BucketLocationConstraint::EU)), +b"af-south-1" => Ok(Self::from_static(BucketLocationConstraint::AF_SOUTH_1)), +b"ap-east-1" => Ok(Self::from_static(BucketLocationConstraint::AP_EAST_1)), +b"ap-northeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_1)), +b"ap-northeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_2)), +b"ap-northeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_3)), +b"ap-south-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_1)), +b"ap-south-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_2)), +b"ap-southeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_1)), +b"ap-southeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_2)), +b"ap-southeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_3)), +b"ap-southeast-4" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_4)), +b"ap-southeast-5" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_5)), +b"ca-central-1" => Ok(Self::from_static(BucketLocationConstraint::CA_CENTRAL_1)), +b"cn-north-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTH_1)), +b"cn-northwest-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTHWEST_1)), +b"eu-central-1" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_1)), +b"eu-central-2" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_2)), +b"eu-north-1" => Ok(Self::from_static(BucketLocationConstraint::EU_NORTH_1)), +b"eu-south-1" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_1)), +b"eu-south-2" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_2)), +b"eu-west-1" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_1)), +b"eu-west-2" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_2)), +b"eu-west-3" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_3)), +b"il-central-1" => Ok(Self::from_static(BucketLocationConstraint::IL_CENTRAL_1)), +b"me-central-1" => Ok(Self::from_static(BucketLocationConstraint::ME_CENTRAL_1)), +b"me-south-1" => Ok(Self::from_static(BucketLocationConstraint::ME_SOUTH_1)), +b"sa-east-1" => Ok(Self::from_static(BucketLocationConstraint::SA_EAST_1)), +b"us-east-2" => Ok(Self::from_static(BucketLocationConstraint::US_EAST_2)), +b"us-gov-east-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_EAST_1)), +b"us-gov-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_WEST_1)), +b"us-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_1)), +b"us-west-2" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_2)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for BucketLoggingStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.logging_enabled { - s.content("LoggingEnabled", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.logging_enabled { +s.content("LoggingEnabled", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for BucketLoggingStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut logging_enabled: Option = None; - d.for_each_element(|d, x| match x { - b"LoggingEnabled" => { - if logging_enabled.is_some() { - return Err(DeError::DuplicateField); - } - logging_enabled = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { logging_enabled }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut logging_enabled: Option = None; +d.for_each_element(|d, x| match x { +b"LoggingEnabled" => { +if logging_enabled.is_some() { return Err(DeError::DuplicateField); } +logging_enabled = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +logging_enabled, +}) +} } impl SerializeContent for BucketLogsPermission { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketLogsPermission { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"FULL_CONTROL" => Ok(Self::from_static(BucketLogsPermission::FULL_CONTROL)), - b"READ" => Ok(Self::from_static(BucketLogsPermission::READ)), - b"WRITE" => Ok(Self::from_static(BucketLogsPermission::WRITE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"FULL_CONTROL" => Ok(Self::from_static(BucketLogsPermission::FULL_CONTROL)), +b"READ" => Ok(Self::from_static(BucketLogsPermission::READ)), +b"WRITE" => Ok(Self::from_static(BucketLogsPermission::WRITE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for BucketType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Directory" => Ok(Self::from_static(BucketType::DIRECTORY)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Directory" => Ok(Self::from_static(BucketType::DIRECTORY)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for BucketVersioningStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketVersioningStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Enabled" => Ok(Self::from_static(BucketVersioningStatus::ENABLED)), - b"Suspended" => Ok(Self::from_static(BucketVersioningStatus::SUSPENDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Enabled" => Ok(Self::from_static(BucketVersioningStatus::ENABLED)), +b"Suspended" => Ok(Self::from_static(BucketVersioningStatus::SUSPENDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for CORSConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.cors_rules; - s.flattened_list("CORSRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.cors_rules; +s.flattened_list("CORSRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CORSConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut cors_rules: Option = None; - d.for_each_element(|d, x| match x { - b"CORSRule" => { - let ans: CORSRule = d.content()?; - cors_rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - cors_rules: cors_rules.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut cors_rules: Option = None; +d.for_each_element(|d, x| match x { +b"CORSRule" => { +let ans: CORSRule = d.content()?; +cors_rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +cors_rules: cors_rules.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for CORSRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.allowed_headers { - s.flattened_list("AllowedHeader", iter)?; - } - { - let iter = &self.allowed_methods; - s.flattened_list("AllowedMethod", iter)?; - } - { - let iter = &self.allowed_origins; - s.flattened_list("AllowedOrigin", iter)?; - } - if let Some(iter) = &self.expose_headers { - s.flattened_list("ExposeHeader", iter)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - if let Some(ref val) = self.max_age_seconds { - s.content("MaxAgeSeconds", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.allowed_headers { +s.flattened_list("AllowedHeader", iter)?; +} +{ +let iter = &self.allowed_methods; +s.flattened_list("AllowedMethod", iter)?; +} +{ +let iter = &self.allowed_origins; +s.flattened_list("AllowedOrigin", iter)?; +} +if let Some(iter) = &self.expose_headers { +s.flattened_list("ExposeHeader", iter)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +if let Some(ref val) = self.max_age_seconds { +s.content("MaxAgeSeconds", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CORSRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut allowed_headers: Option = None; - let mut allowed_methods: Option = None; - let mut allowed_origins: Option = None; - let mut expose_headers: Option = None; - let mut id: Option = None; - let mut max_age_seconds: Option = None; - d.for_each_element(|d, x| match x { - b"AllowedHeader" => { - let ans: AllowedHeader = d.content()?; - allowed_headers.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"AllowedMethod" => { - let ans: AllowedMethod = d.content()?; - allowed_methods.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"AllowedOrigin" => { - let ans: AllowedOrigin = d.content()?; - allowed_origins.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ExposeHeader" => { - let ans: ExposeHeader = d.content()?; - expose_headers.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"MaxAgeSeconds" => { - if max_age_seconds.is_some() { - return Err(DeError::DuplicateField); - } - max_age_seconds = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - allowed_headers, - allowed_methods: allowed_methods.ok_or(DeError::MissingField)?, - allowed_origins: allowed_origins.ok_or(DeError::MissingField)?, - expose_headers, - id, - max_age_seconds, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut allowed_headers: Option = None; +let mut allowed_methods: Option = None; +let mut allowed_origins: Option = None; +let mut expose_headers: Option = None; +let mut id: Option = None; +let mut max_age_seconds: Option = None; +d.for_each_element(|d, x| match x { +b"AllowedHeader" => { +let ans: AllowedHeader = d.content()?; +allowed_headers.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"AllowedMethod" => { +let ans: AllowedMethod = d.content()?; +allowed_methods.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"AllowedOrigin" => { +let ans: AllowedOrigin = d.content()?; +allowed_origins.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ExposeHeader" => { +let ans: ExposeHeader = d.content()?; +expose_headers.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"MaxAgeSeconds" => { +if max_age_seconds.is_some() { return Err(DeError::DuplicateField); } +max_age_seconds = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +allowed_headers, +allowed_methods: allowed_methods.ok_or(DeError::MissingField)?, +allowed_origins: allowed_origins.ok_or(DeError::MissingField)?, +expose_headers, +id, +max_age_seconds, +}) +} } impl SerializeContent for CSVInput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.allow_quoted_record_delimiter { - s.content("AllowQuotedRecordDelimiter", val)?; - } - if let Some(ref val) = self.comments { - s.content("Comments", val)?; - } - if let Some(ref val) = self.field_delimiter { - s.content("FieldDelimiter", val)?; - } - if let Some(ref val) = self.file_header_info { - s.content("FileHeaderInfo", val)?; - } - if let Some(ref val) = self.quote_character { - s.content("QuoteCharacter", val)?; - } - if let Some(ref val) = self.quote_escape_character { - s.content("QuoteEscapeCharacter", val)?; - } - if let Some(ref val) = self.record_delimiter { - s.content("RecordDelimiter", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.allow_quoted_record_delimiter { +s.content("AllowQuotedRecordDelimiter", val)?; +} +if let Some(ref val) = self.comments { +s.content("Comments", val)?; +} +if let Some(ref val) = self.field_delimiter { +s.content("FieldDelimiter", val)?; +} +if let Some(ref val) = self.file_header_info { +s.content("FileHeaderInfo", val)?; +} +if let Some(ref val) = self.quote_character { +s.content("QuoteCharacter", val)?; +} +if let Some(ref val) = self.quote_escape_character { +s.content("QuoteEscapeCharacter", val)?; +} +if let Some(ref val) = self.record_delimiter { +s.content("RecordDelimiter", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CSVInput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut allow_quoted_record_delimiter: Option = None; - let mut comments: Option = None; - let mut field_delimiter: Option = None; - let mut file_header_info: Option = None; - let mut quote_character: Option = None; - let mut quote_escape_character: Option = None; - let mut record_delimiter: Option = None; - d.for_each_element(|d, x| match x { - b"AllowQuotedRecordDelimiter" => { - if allow_quoted_record_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - allow_quoted_record_delimiter = Some(d.content()?); - Ok(()) - } - b"Comments" => { - if comments.is_some() { - return Err(DeError::DuplicateField); - } - comments = Some(d.content()?); - Ok(()) - } - b"FieldDelimiter" => { - if field_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - field_delimiter = Some(d.content()?); - Ok(()) - } - b"FileHeaderInfo" => { - if file_header_info.is_some() { - return Err(DeError::DuplicateField); - } - file_header_info = Some(d.content()?); - Ok(()) - } - b"QuoteCharacter" => { - if quote_character.is_some() { - return Err(DeError::DuplicateField); - } - quote_character = Some(d.content()?); - Ok(()) - } - b"QuoteEscapeCharacter" => { - if quote_escape_character.is_some() { - return Err(DeError::DuplicateField); - } - quote_escape_character = Some(d.content()?); - Ok(()) - } - b"RecordDelimiter" => { - if record_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - record_delimiter = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - allow_quoted_record_delimiter, - comments, - field_delimiter, - file_header_info, - quote_character, - quote_escape_character, - record_delimiter, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut allow_quoted_record_delimiter: Option = None; +let mut comments: Option = None; +let mut field_delimiter: Option = None; +let mut file_header_info: Option = None; +let mut quote_character: Option = None; +let mut quote_escape_character: Option = None; +let mut record_delimiter: Option = None; +d.for_each_element(|d, x| match x { +b"AllowQuotedRecordDelimiter" => { +if allow_quoted_record_delimiter.is_some() { return Err(DeError::DuplicateField); } +allow_quoted_record_delimiter = Some(d.content()?); +Ok(()) +} +b"Comments" => { +if comments.is_some() { return Err(DeError::DuplicateField); } +comments = Some(d.content()?); +Ok(()) +} +b"FieldDelimiter" => { +if field_delimiter.is_some() { return Err(DeError::DuplicateField); } +field_delimiter = Some(d.content()?); +Ok(()) +} +b"FileHeaderInfo" => { +if file_header_info.is_some() { return Err(DeError::DuplicateField); } +file_header_info = Some(d.content()?); +Ok(()) +} +b"QuoteCharacter" => { +if quote_character.is_some() { return Err(DeError::DuplicateField); } +quote_character = Some(d.content()?); +Ok(()) +} +b"QuoteEscapeCharacter" => { +if quote_escape_character.is_some() { return Err(DeError::DuplicateField); } +quote_escape_character = Some(d.content()?); +Ok(()) +} +b"RecordDelimiter" => { +if record_delimiter.is_some() { return Err(DeError::DuplicateField); } +record_delimiter = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +allow_quoted_record_delimiter, +comments, +field_delimiter, +file_header_info, +quote_character, +quote_escape_character, +record_delimiter, +}) +} } impl SerializeContent for CSVOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.field_delimiter { - s.content("FieldDelimiter", val)?; - } - if let Some(ref val) = self.quote_character { - s.content("QuoteCharacter", val)?; - } - if let Some(ref val) = self.quote_escape_character { - s.content("QuoteEscapeCharacter", val)?; - } - if let Some(ref val) = self.quote_fields { - s.content("QuoteFields", val)?; - } - if let Some(ref val) = self.record_delimiter { - s.content("RecordDelimiter", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.field_delimiter { +s.content("FieldDelimiter", val)?; +} +if let Some(ref val) = self.quote_character { +s.content("QuoteCharacter", val)?; +} +if let Some(ref val) = self.quote_escape_character { +s.content("QuoteEscapeCharacter", val)?; +} +if let Some(ref val) = self.quote_fields { +s.content("QuoteFields", val)?; +} +if let Some(ref val) = self.record_delimiter { +s.content("RecordDelimiter", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CSVOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut field_delimiter: Option = None; - let mut quote_character: Option = None; - let mut quote_escape_character: Option = None; - let mut quote_fields: Option = None; - let mut record_delimiter: Option = None; - d.for_each_element(|d, x| match x { - b"FieldDelimiter" => { - if field_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - field_delimiter = Some(d.content()?); - Ok(()) - } - b"QuoteCharacter" => { - if quote_character.is_some() { - return Err(DeError::DuplicateField); - } - quote_character = Some(d.content()?); - Ok(()) - } - b"QuoteEscapeCharacter" => { - if quote_escape_character.is_some() { - return Err(DeError::DuplicateField); - } - quote_escape_character = Some(d.content()?); - Ok(()) - } - b"QuoteFields" => { - if quote_fields.is_some() { - return Err(DeError::DuplicateField); - } - quote_fields = Some(d.content()?); - Ok(()) - } - b"RecordDelimiter" => { - if record_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - record_delimiter = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - field_delimiter, - quote_character, - quote_escape_character, - quote_fields, - record_delimiter, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut field_delimiter: Option = None; +let mut quote_character: Option = None; +let mut quote_escape_character: Option = None; +let mut quote_fields: Option = None; +let mut record_delimiter: Option = None; +d.for_each_element(|d, x| match x { +b"FieldDelimiter" => { +if field_delimiter.is_some() { return Err(DeError::DuplicateField); } +field_delimiter = Some(d.content()?); +Ok(()) +} +b"QuoteCharacter" => { +if quote_character.is_some() { return Err(DeError::DuplicateField); } +quote_character = Some(d.content()?); +Ok(()) +} +b"QuoteEscapeCharacter" => { +if quote_escape_character.is_some() { return Err(DeError::DuplicateField); } +quote_escape_character = Some(d.content()?); +Ok(()) +} +b"QuoteFields" => { +if quote_fields.is_some() { return Err(DeError::DuplicateField); } +quote_fields = Some(d.content()?); +Ok(()) +} +b"RecordDelimiter" => { +if record_delimiter.is_some() { return Err(DeError::DuplicateField); } +record_delimiter = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +field_delimiter, +quote_character, +quote_escape_character, +quote_fields, +record_delimiter, +}) +} } impl SerializeContent for Checksum { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Checksum { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut checksum_type: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - checksum_type, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut checksum_type: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +checksum_type, +}) +} } impl SerializeContent for ChecksumAlgorithm { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ChecksumAlgorithm { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"CRC32" => Ok(Self::from_static(ChecksumAlgorithm::CRC32)), - b"CRC32C" => Ok(Self::from_static(ChecksumAlgorithm::CRC32C)), - b"CRC64NVME" => Ok(Self::from_static(ChecksumAlgorithm::CRC64NVME)), - b"SHA1" => Ok(Self::from_static(ChecksumAlgorithm::SHA1)), - b"SHA256" => Ok(Self::from_static(ChecksumAlgorithm::SHA256)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"CRC32" => Ok(Self::from_static(ChecksumAlgorithm::CRC32)), +b"CRC32C" => Ok(Self::from_static(ChecksumAlgorithm::CRC32C)), +b"CRC64NVME" => Ok(Self::from_static(ChecksumAlgorithm::CRC64NVME)), +b"SHA1" => Ok(Self::from_static(ChecksumAlgorithm::SHA1)), +b"SHA256" => Ok(Self::from_static(ChecksumAlgorithm::SHA256)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ChecksumType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ChecksumType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"COMPOSITE" => Ok(Self::from_static(ChecksumType::COMPOSITE)), - b"FULL_OBJECT" => Ok(Self::from_static(ChecksumType::FULL_OBJECT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"COMPOSITE" => Ok(Self::from_static(ChecksumType::COMPOSITE)), +b"FULL_OBJECT" => Ok(Self::from_static(ChecksumType::FULL_OBJECT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for CommonPrefix { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CommonPrefix { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +}) +} } impl SerializeContent for CompleteMultipartUploadOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.location { - s.content("Location", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.location { +s.content("Location", val)?; +} +Ok(()) +} } impl SerializeContent for CompletedMultipartUpload { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.parts { - s.flattened_list("Part", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.parts { +s.flattened_list("Part", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CompletedMultipartUpload { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut parts: Option = None; - d.for_each_element(|d, x| match x { - b"Part" => { - let ans: CompletedPart = d.content()?; - parts.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { parts }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut parts: Option = None; +d.for_each_element(|d, x| match x { +b"Part" => { +let ans: CompletedPart = d.content()?; +parts.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +parts, +}) +} } impl SerializeContent for CompletedPart { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.part_number { - s.content("PartNumber", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.part_number { +s.content("PartNumber", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CompletedPart { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut e_tag: Option = None; - let mut part_number: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"PartNumber" => { - if part_number.is_some() { - return Err(DeError::DuplicateField); - } - part_number = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - e_tag, - part_number, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut e_tag: Option = None; +let mut part_number: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"PartNumber" => { +if part_number.is_some() { return Err(DeError::DuplicateField); } +part_number = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +e_tag, +part_number, +}) +} } impl SerializeContent for CompressionType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for CompressionType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"BZIP2" => Ok(Self::from_static(CompressionType::BZIP2)), - b"GZIP" => Ok(Self::from_static(CompressionType::GZIP)), - b"NONE" => Ok(Self::from_static(CompressionType::NONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"BZIP2" => Ok(Self::from_static(CompressionType::BZIP2)), +b"GZIP" => Ok(Self::from_static(CompressionType::GZIP)), +b"NONE" => Ok(Self::from_static(CompressionType::NONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Condition { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.http_error_code_returned_equals { - s.content("HttpErrorCodeReturnedEquals", val)?; - } - if let Some(ref val) = self.key_prefix_equals { - s.content("KeyPrefixEquals", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.http_error_code_returned_equals { +s.content("HttpErrorCodeReturnedEquals", val)?; +} +if let Some(ref val) = self.key_prefix_equals { +s.content("KeyPrefixEquals", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Condition { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut http_error_code_returned_equals: Option = None; - let mut key_prefix_equals: Option = None; - d.for_each_element(|d, x| match x { - b"HttpErrorCodeReturnedEquals" => { - if http_error_code_returned_equals.is_some() { - return Err(DeError::DuplicateField); - } - http_error_code_returned_equals = Some(d.content()?); - Ok(()) - } - b"KeyPrefixEquals" => { - if key_prefix_equals.is_some() { - return Err(DeError::DuplicateField); - } - key_prefix_equals = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - http_error_code_returned_equals, - key_prefix_equals, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut http_error_code_returned_equals: Option = None; +let mut key_prefix_equals: Option = None; +d.for_each_element(|d, x| match x { +b"HttpErrorCodeReturnedEquals" => { +if http_error_code_returned_equals.is_some() { return Err(DeError::DuplicateField); } +http_error_code_returned_equals = Some(d.content()?); +Ok(()) +} +b"KeyPrefixEquals" => { +if key_prefix_equals.is_some() { return Err(DeError::DuplicateField); } +key_prefix_equals = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +http_error_code_returned_equals, +key_prefix_equals, +}) +} } impl SerializeContent for CopyObjectResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CopyObjectResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut checksum_type: Option = None; - let mut e_tag: Option = None; - let mut last_modified: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - checksum_type, - e_tag, - last_modified, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut checksum_type: Option = None; +let mut e_tag: Option = None; +let mut last_modified: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +checksum_type, +e_tag, +last_modified, +}) +} } impl SerializeContent for CopyPartResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CopyPartResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut e_tag: Option = None; - let mut last_modified: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - e_tag, - last_modified, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut e_tag: Option = None; +let mut last_modified: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +e_tag, +last_modified, +}) +} } impl SerializeContent for CreateBucketConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(ref val) = self.location { - s.content("Location", val)?; - } - if let Some(ref val) = self.location_constraint { - s.content("LocationConstraint", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(ref val) = self.location { +s.content("Location", val)?; +} +if let Some(ref val) = self.location_constraint { +s.content("LocationConstraint", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CreateBucketConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bucket: Option = None; - let mut location: Option = None; - let mut location_constraint: Option = None; - d.for_each_element(|d, x| match x { - b"Bucket" => { - if bucket.is_some() { - return Err(DeError::DuplicateField); - } - bucket = Some(d.content()?); - Ok(()) - } - b"Location" => { - if location.is_some() { - return Err(DeError::DuplicateField); - } - location = Some(d.content()?); - Ok(()) - } - b"LocationConstraint" => { - if location_constraint.is_some() { - return Err(DeError::DuplicateField); - } - location_constraint = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bucket, - location, - location_constraint, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bucket: Option = None; +let mut location: Option = None; +let mut location_constraint: Option = None; +d.for_each_element(|d, x| match x { +b"Bucket" => { +if bucket.is_some() { return Err(DeError::DuplicateField); } +bucket = Some(d.content()?); +Ok(()) +} +b"Location" => { +if location.is_some() { return Err(DeError::DuplicateField); } +location = Some(d.content()?); +Ok(()) +} +b"LocationConstraint" => { +if location_constraint.is_some() { return Err(DeError::DuplicateField); } +location_constraint = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bucket, +location, +location_constraint, +}) +} } impl SerializeContent for CreateMultipartUploadOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.upload_id { - s.content("UploadId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.upload_id { +s.content("UploadId", val)?; +} +Ok(()) +} } impl SerializeContent for CreateSessionOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Credentials", &self.credentials)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Credentials", &self.credentials)?; +Ok(()) +} } impl SerializeContent for Credentials { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("AccessKeyId", &self.access_key_id)?; - s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; - s.content("SecretAccessKey", &self.secret_access_key)?; - s.content("SessionToken", &self.session_token)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("AccessKeyId", &self.access_key_id)?; +s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; +s.content("SecretAccessKey", &self.secret_access_key)?; +s.content("SessionToken", &self.session_token)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Credentials { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_key_id: Option = None; - let mut expiration: Option = None; - let mut secret_access_key: Option = None; - let mut session_token: Option = None; - d.for_each_element(|d, x| match x { - b"AccessKeyId" => { - if access_key_id.is_some() { - return Err(DeError::DuplicateField); - } - access_key_id = Some(d.content()?); - Ok(()) - } - b"Expiration" => { - if expiration.is_some() { - return Err(DeError::DuplicateField); - } - expiration = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"SecretAccessKey" => { - if secret_access_key.is_some() { - return Err(DeError::DuplicateField); - } - secret_access_key = Some(d.content()?); - Ok(()) - } - b"SessionToken" => { - if session_token.is_some() { - return Err(DeError::DuplicateField); - } - session_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_key_id: access_key_id.ok_or(DeError::MissingField)?, - expiration: expiration.ok_or(DeError::MissingField)?, - secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, - session_token: session_token.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_key_id: Option = None; +let mut expiration: Option = None; +let mut secret_access_key: Option = None; +let mut session_token: Option = None; +d.for_each_element(|d, x| match x { +b"AccessKeyId" => { +if access_key_id.is_some() { return Err(DeError::DuplicateField); } +access_key_id = Some(d.content()?); +Ok(()) +} +b"Expiration" => { +if expiration.is_some() { return Err(DeError::DuplicateField); } +expiration = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"SecretAccessKey" => { +if secret_access_key.is_some() { return Err(DeError::DuplicateField); } +secret_access_key = Some(d.content()?); +Ok(()) +} +b"SessionToken" => { +if session_token.is_some() { return Err(DeError::DuplicateField); } +session_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_key_id: access_key_id.ok_or(DeError::MissingField)?, +expiration: expiration.ok_or(DeError::MissingField)?, +secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, +session_token: session_token.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for DataRedundancy { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for DataRedundancy { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"SingleAvailabilityZone" => Ok(Self::from_static(DataRedundancy::SINGLE_AVAILABILITY_ZONE)), - b"SingleLocalZone" => Ok(Self::from_static(DataRedundancy::SINGLE_LOCAL_ZONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"SingleAvailabilityZone" => Ok(Self::from_static(DataRedundancy::SINGLE_AVAILABILITY_ZONE)), +b"SingleLocalZone" => Ok(Self::from_static(DataRedundancy::SINGLE_LOCAL_ZONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for DefaultRetention { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.days { - s.content("Days", val)?; - } - if let Some(ref val) = self.mode { - s.content("Mode", val)?; - } - if let Some(ref val) = self.years { - s.content("Years", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +if let Some(ref val) = self.mode { +s.content("Mode", val)?; +} +if let Some(ref val) = self.years { +s.content("Years", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DefaultRetention { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut days: Option = None; - let mut mode: Option = None; - let mut years: Option = None; - d.for_each_element(|d, x| match x { - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - b"Mode" => { - if mode.is_some() { - return Err(DeError::DuplicateField); - } - mode = Some(d.content()?); - Ok(()) - } - b"Years" => { - if years.is_some() { - return Err(DeError::DuplicateField); - } - years = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { days, mode, years }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut days: Option = None; +let mut mode: Option = None; +let mut years: Option = None; +d.for_each_element(|d, x| match x { +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +b"Mode" => { +if mode.is_some() { return Err(DeError::DuplicateField); } +mode = Some(d.content()?); +Ok(()) +} +b"Years" => { +if years.is_some() { return Err(DeError::DuplicateField); } +years = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +days, +mode, +years, +}) +} +} +impl SerializeContent for DelMarkerExpiration { +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +Ok(()) +} +} + +impl<'xml> DeserializeContent<'xml> for DelMarkerExpiration { +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut days: Option = None; +d.for_each_element(|d, x| match x { +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +days, +}) +} } impl SerializeContent for Delete { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.objects; - s.flattened_list("Object", iter)?; - } - if let Some(ref val) = self.quiet { - s.content("Quiet", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.objects; +s.flattened_list("Object", iter)?; +} +if let Some(ref val) = self.quiet { +s.content("Quiet", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Delete { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut objects: Option = None; - let mut quiet: Option = None; - d.for_each_element(|d, x| match x { - b"Object" => { - let ans: ObjectIdentifier = d.content()?; - objects.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Quiet" => { - if quiet.is_some() { - return Err(DeError::DuplicateField); - } - quiet = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - objects: objects.ok_or(DeError::MissingField)?, - quiet, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut objects: Option = None; +let mut quiet: Option = None; +d.for_each_element(|d, x| match x { +b"Object" => { +let ans: ObjectIdentifier = d.content()?; +objects.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Quiet" => { +if quiet.is_some() { return Err(DeError::DuplicateField); } +quiet = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +objects: objects.ok_or(DeError::MissingField)?, +quiet, +}) +} } impl SerializeContent for DeleteMarkerEntry { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.is_latest { - s.content("IsLatest", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.is_latest { +s.content("IsLatest", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DeleteMarkerEntry { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut is_latest: Option = None; - let mut key: Option = None; - let mut last_modified: Option = None; - let mut owner: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"IsLatest" => { - if is_latest.is_some() { - return Err(DeError::DuplicateField); - } - is_latest = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - is_latest, - key, - last_modified, - owner, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut is_latest: Option = None; +let mut key: Option = None; +let mut last_modified: Option = None; +let mut owner: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"IsLatest" => { +if is_latest.is_some() { return Err(DeError::DuplicateField); } +is_latest = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +is_latest, +key, +last_modified, +owner, +version_id, +}) +} } impl SerializeContent for DeleteMarkerReplication { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DeleteMarkerReplication { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status, +}) +} } impl SerializeContent for DeleteMarkerReplicationStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for DeleteMarkerReplicationStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for DeleteObjectsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.deleted { - s.flattened_list("Deleted", iter)?; - } - if let Some(iter) = &self.errors { - s.flattened_list("Error", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.deleted { +s.flattened_list("Deleted", iter)?; +} +if let Some(iter) = &self.errors { +s.flattened_list("Error", iter)?; +} +Ok(()) +} } impl SerializeContent for DeleteReplication { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DeleteReplication { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for DeleteReplicationStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for DeleteReplicationStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(DeleteReplicationStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(DeleteReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(DeleteReplicationStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(DeleteReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for DeletedObject { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.delete_marker { - s.content("DeleteMarker", val)?; - } - if let Some(ref val) = self.delete_marker_version_id { - s.content("DeleteMarkerVersionId", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.delete_marker { +s.content("DeleteMarker", val)?; +} +if let Some(ref val) = self.delete_marker_version_id { +s.content("DeleteMarkerVersionId", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DeletedObject { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut delete_marker: Option = None; - let mut delete_marker_version_id: Option = None; - let mut key: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"DeleteMarker" => { - if delete_marker.is_some() { - return Err(DeError::DuplicateField); - } - delete_marker = Some(d.content()?); - Ok(()) - } - b"DeleteMarkerVersionId" => { - if delete_marker_version_id.is_some() { - return Err(DeError::DuplicateField); - } - delete_marker_version_id = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - delete_marker, - delete_marker_version_id, - key, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut delete_marker: Option = None; +let mut delete_marker_version_id: Option = None; +let mut key: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"DeleteMarker" => { +if delete_marker.is_some() { return Err(DeError::DuplicateField); } +delete_marker = Some(d.content()?); +Ok(()) +} +b"DeleteMarkerVersionId" => { +if delete_marker_version_id.is_some() { return Err(DeError::DuplicateField); } +delete_marker_version_id = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +delete_marker, +delete_marker_version_id, +key, +version_id, +}) +} } impl SerializeContent for Destination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.access_control_translation { - s.content("AccessControlTranslation", val)?; - } - if let Some(ref val) = self.account { - s.content("Account", val)?; - } - s.content("Bucket", &self.bucket)?; - if let Some(ref val) = self.encryption_configuration { - s.content("EncryptionConfiguration", val)?; - } - if let Some(ref val) = self.metrics { - s.content("Metrics", val)?; - } - if let Some(ref val) = self.replication_time { - s.content("ReplicationTime", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.access_control_translation { +s.content("AccessControlTranslation", val)?; +} +if let Some(ref val) = self.account { +s.content("Account", val)?; +} +s.content("Bucket", &self.bucket)?; +if let Some(ref val) = self.encryption_configuration { +s.content("EncryptionConfiguration", val)?; +} +if let Some(ref val) = self.metrics { +s.content("Metrics", val)?; +} +if let Some(ref val) = self.replication_time { +s.content("ReplicationTime", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Destination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_control_translation: Option = None; - let mut account: Option = None; - let mut bucket: Option = None; - let mut encryption_configuration: Option = None; - let mut metrics: Option = None; - let mut replication_time: Option = None; - let mut storage_class: Option = None; - d.for_each_element(|d, x| match x { - b"AccessControlTranslation" => { - if access_control_translation.is_some() { - return Err(DeError::DuplicateField); - } - access_control_translation = Some(d.content()?); - Ok(()) - } - b"Account" => { - if account.is_some() { - return Err(DeError::DuplicateField); - } - account = Some(d.content()?); - Ok(()) - } - b"Bucket" => { - if bucket.is_some() { - return Err(DeError::DuplicateField); - } - bucket = Some(d.content()?); - Ok(()) - } - b"EncryptionConfiguration" => { - if encryption_configuration.is_some() { - return Err(DeError::DuplicateField); - } - encryption_configuration = Some(d.content()?); - Ok(()) - } - b"Metrics" => { - if metrics.is_some() { - return Err(DeError::DuplicateField); - } - metrics = Some(d.content()?); - Ok(()) - } - b"ReplicationTime" => { - if replication_time.is_some() { - return Err(DeError::DuplicateField); - } - replication_time = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_control_translation, - account, - bucket: bucket.ok_or(DeError::MissingField)?, - encryption_configuration, - metrics, - replication_time, - storage_class, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_control_translation: Option = None; +let mut account: Option = None; +let mut bucket: Option = None; +let mut encryption_configuration: Option = None; +let mut metrics: Option = None; +let mut replication_time: Option = None; +let mut storage_class: Option = None; +d.for_each_element(|d, x| match x { +b"AccessControlTranslation" => { +if access_control_translation.is_some() { return Err(DeError::DuplicateField); } +access_control_translation = Some(d.content()?); +Ok(()) +} +b"Account" => { +if account.is_some() { return Err(DeError::DuplicateField); } +account = Some(d.content()?); +Ok(()) +} +b"Bucket" => { +if bucket.is_some() { return Err(DeError::DuplicateField); } +bucket = Some(d.content()?); +Ok(()) +} +b"EncryptionConfiguration" => { +if encryption_configuration.is_some() { return Err(DeError::DuplicateField); } +encryption_configuration = Some(d.content()?); +Ok(()) +} +b"Metrics" => { +if metrics.is_some() { return Err(DeError::DuplicateField); } +metrics = Some(d.content()?); +Ok(()) +} +b"ReplicationTime" => { +if replication_time.is_some() { return Err(DeError::DuplicateField); } +replication_time = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_control_translation, +account, +bucket: bucket.ok_or(DeError::MissingField)?, +encryption_configuration, +metrics, +replication_time, +storage_class, +}) +} } impl SerializeContent for EncodingType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for EncodingType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"url" => Ok(Self::from_static(EncodingType::URL)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"url" => Ok(Self::from_static(EncodingType::URL)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Encryption { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("EncryptionType", &self.encryption_type)?; - if let Some(ref val) = self.kms_context { - s.content("KMSContext", val)?; - } - if let Some(ref val) = self.kms_key_id { - s.content("KMSKeyId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("EncryptionType", &self.encryption_type)?; +if let Some(ref val) = self.kms_context { +s.content("KMSContext", val)?; +} +if let Some(ref val) = self.kms_key_id { +s.content("KMSKeyId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Encryption { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut encryption_type: Option = None; - let mut kms_context: Option = None; - let mut kms_key_id: Option = None; - d.for_each_element(|d, x| match x { - b"EncryptionType" => { - if encryption_type.is_some() { - return Err(DeError::DuplicateField); - } - encryption_type = Some(d.content()?); - Ok(()) - } - b"KMSContext" => { - if kms_context.is_some() { - return Err(DeError::DuplicateField); - } - kms_context = Some(d.content()?); - Ok(()) - } - b"KMSKeyId" => { - if kms_key_id.is_some() { - return Err(DeError::DuplicateField); - } - kms_key_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - encryption_type: encryption_type.ok_or(DeError::MissingField)?, - kms_context, - kms_key_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut encryption_type: Option = None; +let mut kms_context: Option = None; +let mut kms_key_id: Option = None; +d.for_each_element(|d, x| match x { +b"EncryptionType" => { +if encryption_type.is_some() { return Err(DeError::DuplicateField); } +encryption_type = Some(d.content()?); +Ok(()) +} +b"KMSContext" => { +if kms_context.is_some() { return Err(DeError::DuplicateField); } +kms_context = Some(d.content()?); +Ok(()) +} +b"KMSKeyId" => { +if kms_key_id.is_some() { return Err(DeError::DuplicateField); } +kms_key_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +encryption_type: encryption_type.ok_or(DeError::MissingField)?, +kms_context, +kms_key_id, +}) +} } impl SerializeContent for EncryptionConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.replica_kms_key_id { - s.content("ReplicaKmsKeyID", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.replica_kms_key_id { +s.content("ReplicaKmsKeyID", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for EncryptionConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut replica_kms_key_id: Option = None; - d.for_each_element(|d, x| match x { - b"ReplicaKmsKeyID" => { - if replica_kms_key_id.is_some() { - return Err(DeError::DuplicateField); - } - replica_kms_key_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { replica_kms_key_id }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut replica_kms_key_id: Option = None; +d.for_each_element(|d, x| match x { +b"ReplicaKmsKeyID" => { +if replica_kms_key_id.is_some() { return Err(DeError::DuplicateField); } +replica_kms_key_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +replica_kms_key_id, +}) +} } impl SerializeContent for Error { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.code { - s.content("Code", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.message { - s.content("Message", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.code { +s.content("Code", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.message { +s.content("Message", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Error { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut code: Option = None; - let mut key: Option = None; - let mut message: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"Code" => { - if code.is_some() { - return Err(DeError::DuplicateField); - } - code = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"Message" => { - if message.is_some() { - return Err(DeError::DuplicateField); - } - message = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - code, - key, - message, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut code: Option = None; +let mut key: Option = None; +let mut message: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"Code" => { +if code.is_some() { return Err(DeError::DuplicateField); } +code = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"Message" => { +if message.is_some() { return Err(DeError::DuplicateField); } +message = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +code, +key, +message, +version_id, +}) +} } impl SerializeContent for ErrorDetails { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.error_code { - s.content("ErrorCode", val)?; - } - if let Some(ref val) = self.error_message { - s.content("ErrorMessage", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.error_code { +s.content("ErrorCode", val)?; +} +if let Some(ref val) = self.error_message { +s.content("ErrorMessage", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ErrorDetails { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut error_code: Option = None; - let mut error_message: Option = None; - d.for_each_element(|d, x| match x { - b"ErrorCode" => { - if error_code.is_some() { - return Err(DeError::DuplicateField); - } - error_code = Some(d.content()?); - Ok(()) - } - b"ErrorMessage" => { - if error_message.is_some() { - return Err(DeError::DuplicateField); - } - error_message = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - error_code, - error_message, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut error_code: Option = None; +let mut error_message: Option = None; +d.for_each_element(|d, x| match x { +b"ErrorCode" => { +if error_code.is_some() { return Err(DeError::DuplicateField); } +error_code = Some(d.content()?); +Ok(()) +} +b"ErrorMessage" => { +if error_message.is_some() { return Err(DeError::DuplicateField); } +error_message = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +error_code, +error_message, +}) +} } impl SerializeContent for ErrorDocument { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Key", &self.key)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Key", &self.key)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ErrorDocument { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut key: Option = None; - d.for_each_element(|d, x| match x { - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - key: key.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut key: Option = None; +d.for_each_element(|d, x| match x { +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +key: key.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for EventBridgeConfiguration { - fn serialize_content(&self, _: &mut Serializer) -> SerResult { - Ok(()) - } +fn serialize_content(&self, _: &mut Serializer) -> SerResult { +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for EventBridgeConfiguration { - fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { - Ok(Self {}) - } +fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { +Ok(Self { +}) +} } impl SerializeContent for ExcludedPrefix { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ExcludedPrefix { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +}) +} } impl SerializeContent for ExistingObjectReplication { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ExistingObjectReplication { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ExistingObjectReplicationStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ExistingObjectReplicationStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ExpirationStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ExpirationStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ExpirationStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ExpirationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ExpirationStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ExpirationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ExpressionType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ExpressionType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"SQL" => Ok(Self::from_static(ExpressionType::SQL)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"SQL" => Ok(Self::from_static(ExpressionType::SQL)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for FileHeaderInfo { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for FileHeaderInfo { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"IGNORE" => Ok(Self::from_static(FileHeaderInfo::IGNORE)), - b"NONE" => Ok(Self::from_static(FileHeaderInfo::NONE)), - b"USE" => Ok(Self::from_static(FileHeaderInfo::USE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"IGNORE" => Ok(Self::from_static(FileHeaderInfo::IGNORE)), +b"NONE" => Ok(Self::from_static(FileHeaderInfo::NONE)), +b"USE" => Ok(Self::from_static(FileHeaderInfo::USE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for FilterRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.value { - s.content("Value", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.value { +s.content("Value", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for FilterRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut name: Option = None; - let mut value: Option = None; - d.for_each_element(|d, x| match x { - b"Name" => { - if name.is_some() { - return Err(DeError::DuplicateField); - } - name = Some(d.content()?); - Ok(()) - } - b"Value" => { - if value.is_some() { - return Err(DeError::DuplicateField); - } - value = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { name, value }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut name: Option = None; +let mut value: Option = None; +d.for_each_element(|d, x| match x { +b"Name" => { +if name.is_some() { return Err(DeError::DuplicateField); } +name = Some(d.content()?); +Ok(()) +} +b"Value" => { +if value.is_some() { return Err(DeError::DuplicateField); } +value = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +name, +value, +}) +} } impl SerializeContent for FilterRuleName { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for FilterRuleName { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"prefix" => Ok(Self::from_static(FilterRuleName::PREFIX)), - b"suffix" => Ok(Self::from_static(FilterRuleName::SUFFIX)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"prefix" => Ok(Self::from_static(FilterRuleName::PREFIX)), +b"suffix" => Ok(Self::from_static(FilterRuleName::SUFFIX)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for GetBucketAccelerateConfigurationOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl SerializeContent for GetBucketAclOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.grants { - s.list("AccessControlList", "Grant", iter)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.grants { +s.list("AccessControlList", "Grant", iter)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketAclOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut grants: Option = None; - let mut owner: Option = None; - d.for_each_element(|d, x| match x { - b"AccessControlList" => { - if grants.is_some() { - return Err(DeError::DuplicateField); - } - grants = Some(d.list_content("Grant")?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { grants, owner }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut grants: Option = None; +let mut owner: Option = None; +d.for_each_element(|d, x| match x { +b"AccessControlList" => { +if grants.is_some() { return Err(DeError::DuplicateField); } +grants = Some(d.list_content("Grant")?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +grants, +owner, +}) +} } impl SerializeContent for GetBucketCorsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.cors_rules { - s.flattened_list("CORSRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.cors_rules { +s.flattened_list("CORSRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketCorsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut cors_rules: Option = None; - d.for_each_element(|d, x| match x { - b"CORSRule" => { - let ans: CORSRule = d.content()?; - cors_rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { cors_rules }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut cors_rules: Option = None; +d.for_each_element(|d, x| match x { +b"CORSRule" => { +let ans: CORSRule = d.content()?; +cors_rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +cors_rules, +}) +} } impl SerializeContent for GetBucketLifecycleConfigurationOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.rules { - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.rules { +s.flattened_list("Rule", iter)?; +} +Ok(()) +} } impl SerializeContent for GetBucketLocationOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.location_constraint { - s.content("LocationConstraint", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.location_constraint { +s.content("LocationConstraint", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketLocationOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut location_constraint: Option = None; - d.for_each_element(|d, x| match x { - b"LocationConstraint" => { - if location_constraint.is_some() { - return Err(DeError::DuplicateField); - } - location_constraint = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { location_constraint }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut location_constraint: Option = None; +d.for_each_element(|d, x| match x { +b"LocationConstraint" => { +if location_constraint.is_some() { return Err(DeError::DuplicateField); } +location_constraint = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +location_constraint, +}) +} } impl SerializeContent for GetBucketLoggingOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.logging_enabled { - s.content("LoggingEnabled", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.logging_enabled { +s.content("LoggingEnabled", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketLoggingOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut logging_enabled: Option = None; - d.for_each_element(|d, x| match x { - b"LoggingEnabled" => { - if logging_enabled.is_some() { - return Err(DeError::DuplicateField); - } - logging_enabled = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { logging_enabled }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut logging_enabled: Option = None; +d.for_each_element(|d, x| match x { +b"LoggingEnabled" => { +if logging_enabled.is_some() { return Err(DeError::DuplicateField); } +logging_enabled = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +logging_enabled, +}) +} } impl SerializeContent for GetBucketMetadataTableConfigurationResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.error { - s.content("Error", val)?; - } - s.content("MetadataTableConfigurationResult", &self.metadata_table_configuration_result)?; - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.error { +s.content("Error", val)?; +} +s.content("MetadataTableConfigurationResult", &self.metadata_table_configuration_result)?; +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketMetadataTableConfigurationResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut error: Option = None; - let mut metadata_table_configuration_result: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Error" => { - if error.is_some() { - return Err(DeError::DuplicateField); - } - error = Some(d.content()?); - Ok(()) - } - b"MetadataTableConfigurationResult" => { - if metadata_table_configuration_result.is_some() { - return Err(DeError::DuplicateField); - } - metadata_table_configuration_result = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - error, - metadata_table_configuration_result: metadata_table_configuration_result.ok_or(DeError::MissingField)?, - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut error: Option = None; +let mut metadata_table_configuration_result: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Error" => { +if error.is_some() { return Err(DeError::DuplicateField); } +error = Some(d.content()?); +Ok(()) +} +b"MetadataTableConfigurationResult" => { +if metadata_table_configuration_result.is_some() { return Err(DeError::DuplicateField); } +metadata_table_configuration_result = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +error, +metadata_table_configuration_result: metadata_table_configuration_result.ok_or(DeError::MissingField)?, +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for GetBucketNotificationConfigurationOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.event_bridge_configuration { - s.content("EventBridgeConfiguration", val)?; - } - if let Some(iter) = &self.lambda_function_configurations { - s.flattened_list("CloudFunctionConfiguration", iter)?; - } - if let Some(iter) = &self.queue_configurations { - s.flattened_list("QueueConfiguration", iter)?; - } - if let Some(iter) = &self.topic_configurations { - s.flattened_list("TopicConfiguration", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.event_bridge_configuration { +s.content("EventBridgeConfiguration", val)?; +} +if let Some(iter) = &self.lambda_function_configurations { +s.flattened_list("CloudFunctionConfiguration", iter)?; +} +if let Some(iter) = &self.queue_configurations { +s.flattened_list("QueueConfiguration", iter)?; +} +if let Some(iter) = &self.topic_configurations { +s.flattened_list("TopicConfiguration", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketNotificationConfigurationOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut event_bridge_configuration: Option = None; - let mut lambda_function_configurations: Option = None; - let mut queue_configurations: Option = None; - let mut topic_configurations: Option = None; - d.for_each_element(|d, x| match x { - b"EventBridgeConfiguration" => { - if event_bridge_configuration.is_some() { - return Err(DeError::DuplicateField); - } - event_bridge_configuration = Some(d.content()?); - Ok(()) - } - b"CloudFunctionConfiguration" => { - let ans: LambdaFunctionConfiguration = d.content()?; - lambda_function_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"QueueConfiguration" => { - let ans: QueueConfiguration = d.content()?; - queue_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"TopicConfiguration" => { - let ans: TopicConfiguration = d.content()?; - topic_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - event_bridge_configuration, - lambda_function_configurations, - queue_configurations, - topic_configurations, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut event_bridge_configuration: Option = None; +let mut lambda_function_configurations: Option = None; +let mut queue_configurations: Option = None; +let mut topic_configurations: Option = None; +d.for_each_element(|d, x| match x { +b"EventBridgeConfiguration" => { +if event_bridge_configuration.is_some() { return Err(DeError::DuplicateField); } +event_bridge_configuration = Some(d.content()?); +Ok(()) +} +b"CloudFunctionConfiguration" => { +let ans: LambdaFunctionConfiguration = d.content()?; +lambda_function_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"QueueConfiguration" => { +let ans: QueueConfiguration = d.content()?; +queue_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"TopicConfiguration" => { +let ans: TopicConfiguration = d.content()?; +topic_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +event_bridge_configuration, +lambda_function_configurations, +queue_configurations, +topic_configurations, +}) +} } impl SerializeContent for GetBucketRequestPaymentOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.payer { - s.content("Payer", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.payer { +s.content("Payer", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketRequestPaymentOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut payer: Option = None; - d.for_each_element(|d, x| match x { - b"Payer" => { - if payer.is_some() { - return Err(DeError::DuplicateField); - } - payer = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { payer }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut payer: Option = None; +d.for_each_element(|d, x| match x { +b"Payer" => { +if payer.is_some() { return Err(DeError::DuplicateField); } +payer = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +payer, +}) +} } impl SerializeContent for GetBucketTaggingOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.tag_set; - s.list("TagSet", "Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.tag_set; +s.list("TagSet", "Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketTaggingOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut tag_set: Option = None; - d.for_each_element(|d, x| match x { - b"TagSet" => { - if tag_set.is_some() { - return Err(DeError::DuplicateField); - } - tag_set = Some(d.list_content("Tag")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - tag_set: tag_set.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut tag_set: Option = None; +d.for_each_element(|d, x| match x { +b"TagSet" => { +if tag_set.is_some() { return Err(DeError::DuplicateField); } +tag_set = Some(d.list_content("Tag")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +tag_set: tag_set.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for GetBucketVersioningOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.mfa_delete { - s.content("MfaDelete", val)?; - } - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.mfa_delete { +s.content("MfaDelete", val)?; +} +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketVersioningOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut mfa_delete: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"MfaDelete" => { - if mfa_delete.is_some() { - return Err(DeError::DuplicateField); - } - mfa_delete = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { mfa_delete, status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut mfa_delete: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"MfaDelete" => { +if mfa_delete.is_some() { return Err(DeError::DuplicateField); } +mfa_delete = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +mfa_delete, +status, +}) +} } impl SerializeContent for GetBucketWebsiteOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.error_document { - s.content("ErrorDocument", val)?; - } - if let Some(ref val) = self.index_document { - s.content("IndexDocument", val)?; - } - if let Some(ref val) = self.redirect_all_requests_to { - s.content("RedirectAllRequestsTo", val)?; - } - if let Some(iter) = &self.routing_rules { - s.list("RoutingRules", "RoutingRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.error_document { +s.content("ErrorDocument", val)?; +} +if let Some(ref val) = self.index_document { +s.content("IndexDocument", val)?; +} +if let Some(ref val) = self.redirect_all_requests_to { +s.content("RedirectAllRequestsTo", val)?; +} +if let Some(iter) = &self.routing_rules { +s.list("RoutingRules", "RoutingRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketWebsiteOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut error_document: Option = None; - let mut index_document: Option = None; - let mut redirect_all_requests_to: Option = None; - let mut routing_rules: Option = None; - d.for_each_element(|d, x| match x { - b"ErrorDocument" => { - if error_document.is_some() { - return Err(DeError::DuplicateField); - } - error_document = Some(d.content()?); - Ok(()) - } - b"IndexDocument" => { - if index_document.is_some() { - return Err(DeError::DuplicateField); - } - index_document = Some(d.content()?); - Ok(()) - } - b"RedirectAllRequestsTo" => { - if redirect_all_requests_to.is_some() { - return Err(DeError::DuplicateField); - } - redirect_all_requests_to = Some(d.content()?); - Ok(()) - } - b"RoutingRules" => { - if routing_rules.is_some() { - return Err(DeError::DuplicateField); - } - routing_rules = Some(d.list_content("RoutingRule")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - error_document, - index_document, - redirect_all_requests_to, - routing_rules, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut error_document: Option = None; +let mut index_document: Option = None; +let mut redirect_all_requests_to: Option = None; +let mut routing_rules: Option = None; +d.for_each_element(|d, x| match x { +b"ErrorDocument" => { +if error_document.is_some() { return Err(DeError::DuplicateField); } +error_document = Some(d.content()?); +Ok(()) +} +b"IndexDocument" => { +if index_document.is_some() { return Err(DeError::DuplicateField); } +index_document = Some(d.content()?); +Ok(()) +} +b"RedirectAllRequestsTo" => { +if redirect_all_requests_to.is_some() { return Err(DeError::DuplicateField); } +redirect_all_requests_to = Some(d.content()?); +Ok(()) +} +b"RoutingRules" => { +if routing_rules.is_some() { return Err(DeError::DuplicateField); } +routing_rules = Some(d.list_content("RoutingRule")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +error_document, +index_document, +redirect_all_requests_to, +routing_rules, +}) +} } impl SerializeContent for GetObjectAclOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.grants { - s.list("AccessControlList", "Grant", iter)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.grants { +s.list("AccessControlList", "Grant", iter)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +Ok(()) +} } impl SerializeContent for GetObjectAttributesOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum { - s.content("Checksum", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.object_parts { - s.content("ObjectParts", val)?; - } - if let Some(ref val) = self.object_size { - s.content("ObjectSize", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum { +s.content("Checksum", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.object_parts { +s.content("ObjectParts", val)?; +} +if let Some(ref val) = self.object_size { +s.content("ObjectSize", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl SerializeContent for GetObjectAttributesParts { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.max_parts { - s.content("MaxParts", val)?; - } - if let Some(ref val) = self.next_part_number_marker { - s.content("NextPartNumberMarker", val)?; - } - if let Some(ref val) = self.part_number_marker { - s.content("PartNumberMarker", val)?; - } - if let Some(iter) = &self.parts { - s.flattened_list("Part", iter)?; - } - if let Some(ref val) = self.total_parts_count { - s.content("PartsCount", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.max_parts { +s.content("MaxParts", val)?; +} +if let Some(ref val) = self.next_part_number_marker { +s.content("NextPartNumberMarker", val)?; +} +if let Some(ref val) = self.part_number_marker { +s.content("PartNumberMarker", val)?; +} +if let Some(iter) = &self.parts { +s.flattened_list("Part", iter)?; +} +if let Some(ref val) = self.total_parts_count { +s.content("PartsCount", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetObjectAttributesParts { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut is_truncated: Option = None; - let mut max_parts: Option = None; - let mut next_part_number_marker: Option = None; - let mut part_number_marker: Option = None; - let mut parts: Option = None; - let mut total_parts_count: Option = None; - d.for_each_element(|d, x| match x { - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"MaxParts" => { - if max_parts.is_some() { - return Err(DeError::DuplicateField); - } - max_parts = Some(d.content()?); - Ok(()) - } - b"NextPartNumberMarker" => { - if next_part_number_marker.is_some() { - return Err(DeError::DuplicateField); - } - next_part_number_marker = Some(d.content()?); - Ok(()) - } - b"PartNumberMarker" => { - if part_number_marker.is_some() { - return Err(DeError::DuplicateField); - } - part_number_marker = Some(d.content()?); - Ok(()) - } - b"Part" => { - let ans: ObjectPart = d.content()?; - parts.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"PartsCount" => { - if total_parts_count.is_some() { - return Err(DeError::DuplicateField); - } - total_parts_count = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - is_truncated, - max_parts, - next_part_number_marker, - part_number_marker, - parts, - total_parts_count, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut is_truncated: Option = None; +let mut max_parts: Option = None; +let mut next_part_number_marker: Option = None; +let mut part_number_marker: Option = None; +let mut parts: Option = None; +let mut total_parts_count: Option = None; +d.for_each_element(|d, x| match x { +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"MaxParts" => { +if max_parts.is_some() { return Err(DeError::DuplicateField); } +max_parts = Some(d.content()?); +Ok(()) +} +b"NextPartNumberMarker" => { +if next_part_number_marker.is_some() { return Err(DeError::DuplicateField); } +next_part_number_marker = Some(d.content()?); +Ok(()) +} +b"PartNumberMarker" => { +if part_number_marker.is_some() { return Err(DeError::DuplicateField); } +part_number_marker = Some(d.content()?); +Ok(()) +} +b"Part" => { +let ans: ObjectPart = d.content()?; +parts.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"PartsCount" => { +if total_parts_count.is_some() { return Err(DeError::DuplicateField); } +total_parts_count = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +is_truncated, +max_parts, +next_part_number_marker, +part_number_marker, +parts, +total_parts_count, +}) +} } impl SerializeContent for GetObjectTaggingOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.tag_set; - s.list("TagSet", "Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.tag_set; +s.list("TagSet", "Tag", iter)?; +} +Ok(()) +} } impl SerializeContent for GlacierJobParameters { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Tier", &self.tier)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Tier", &self.tier)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GlacierJobParameters { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut tier: Option = None; - d.for_each_element(|d, x| match x { - b"Tier" => { - if tier.is_some() { - return Err(DeError::DuplicateField); - } - tier = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - tier: tier.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut tier: Option = None; +d.for_each_element(|d, x| match x { +b"Tier" => { +if tier.is_some() { return Err(DeError::DuplicateField); } +tier = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +tier: tier.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Grant { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.grantee { - let attrs = [ - ("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), - ("xsi:type", val.type_.as_str()), - ]; - s.content_with_attrs("Grantee", &attrs, val)?; - } - if let Some(ref val) = self.permission { - s.content("Permission", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.grantee { +let attrs = [ +("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), +("xsi:type", val.type_.as_str()), +]; +s.content_with_attrs("Grantee", &attrs, val)?; +} +if let Some(ref val) = self.permission { +s.content("Permission", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Grant { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut grantee: Option = None; - let mut permission: Option = None; - d.for_each_element_with_start(|d, x, start| match x { - b"Grantee" => { - if grantee.is_some() { - return Err(DeError::DuplicateField); - } - let mut type_: Option = None; - for attr in start.attributes() { - let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; - if attr.key.as_ref() == b"xsi:type" { - type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); - } - } - let mut display_name: Option = None; - let mut email_address: Option = None; - let mut id: Option = None; - let mut uri: Option = None; - d.for_each_element(|d, x| match x { - b"DisplayName" => { - if display_name.is_some() { - return Err(DeError::DuplicateField); - } - display_name = Some(d.content()?); - Ok(()) - } - b"EmailAddress" => { - if email_address.is_some() { - return Err(DeError::DuplicateField); - } - email_address = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"URI" => { - if uri.is_some() { - return Err(DeError::DuplicateField); - } - uri = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - grantee = Some(Grantee { - display_name, - email_address, - id, - type_: type_.ok_or(DeError::MissingField)?, - uri, - }); - Ok(()) - } - b"Permission" => { - if permission.is_some() { - return Err(DeError::DuplicateField); - } - permission = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { grantee, permission }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut grantee: Option = None; +let mut permission: Option = None; +d.for_each_element_with_start(|d, x, start| match x { +b"Grantee" => { +if grantee.is_some() { return Err(DeError::DuplicateField); } +let mut type_: Option = None; +for attr in start.attributes() { + let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; + if attr.key.as_ref() == b"xsi:type" { + type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); + } +} +let mut display_name: Option = None; +let mut email_address: Option = None; +let mut id: Option = None; +let mut uri: Option = None; +d.for_each_element(|d, x| match x { +b"DisplayName" => { + if display_name.is_some() { return Err(DeError::DuplicateField); } + display_name = Some(d.content()?); + Ok(()) +} +b"EmailAddress" => { + if email_address.is_some() { return Err(DeError::DuplicateField); } + email_address = Some(d.content()?); + Ok(()) +} +b"ID" => { + if id.is_some() { return Err(DeError::DuplicateField); } + id = Some(d.content()?); + Ok(()) +} +b"URI" => { + if uri.is_some() { return Err(DeError::DuplicateField); } + uri = Some(d.content()?); + Ok(()) +} +_ => Err(DeError::UnexpectedTagName), +})?; +grantee = Some(Grantee { +display_name, +email_address, +id, +type_: type_.ok_or(DeError::MissingField)?, +uri, +}); +Ok(()) +} +b"Permission" => { +if permission.is_some() { return Err(DeError::DuplicateField); } +permission = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +grantee, +permission, +}) +} } impl SerializeContent for Grantee { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.display_name { - s.content("DisplayName", val)?; - } - if let Some(ref val) = self.email_address { - s.content("EmailAddress", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - if let Some(ref val) = self.uri { - s.content("URI", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.display_name { +s.content("DisplayName", val)?; +} +if let Some(ref val) = self.email_address { +s.content("EmailAddress", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +if let Some(ref val) = self.uri { +s.content("URI", val)?; +} +Ok(()) +} } impl SerializeContent for IndexDocument { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Suffix", &self.suffix)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Suffix", &self.suffix)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for IndexDocument { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut suffix: Option = None; - d.for_each_element(|d, x| match x { - b"Suffix" => { - if suffix.is_some() { - return Err(DeError::DuplicateField); - } - suffix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - suffix: suffix.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut suffix: Option = None; +d.for_each_element(|d, x| match x { +b"Suffix" => { +if suffix.is_some() { return Err(DeError::DuplicateField); } +suffix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +suffix: suffix.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Initiator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.display_name { - s.content("DisplayName", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.display_name { +s.content("DisplayName", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Initiator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut display_name: Option = None; - let mut id: Option = None; - d.for_each_element(|d, x| match x { - b"DisplayName" => { - if display_name.is_some() { - return Err(DeError::DuplicateField); - } - display_name = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { display_name, id }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut display_name: Option = None; +let mut id: Option = None; +d.for_each_element(|d, x| match x { +b"DisplayName" => { +if display_name.is_some() { return Err(DeError::DuplicateField); } +display_name = Some(d.content()?); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +display_name, +id, +}) +} } impl SerializeContent for InputSerialization { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.csv { - s.content("CSV", val)?; - } - if let Some(ref val) = self.compression_type { - s.content("CompressionType", val)?; - } - if let Some(ref val) = self.json { - s.content("JSON", val)?; - } - if let Some(ref val) = self.parquet { - s.content("Parquet", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.csv { +s.content("CSV", val)?; +} +if let Some(ref val) = self.compression_type { +s.content("CompressionType", val)?; +} +if let Some(ref val) = self.json { +s.content("JSON", val)?; +} +if let Some(ref val) = self.parquet { +s.content("Parquet", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InputSerialization { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut csv: Option = None; - let mut compression_type: Option = None; - let mut json: Option = None; - let mut parquet: Option = None; - d.for_each_element(|d, x| match x { - b"CSV" => { - if csv.is_some() { - return Err(DeError::DuplicateField); - } - csv = Some(d.content()?); - Ok(()) - } - b"CompressionType" => { - if compression_type.is_some() { - return Err(DeError::DuplicateField); - } - compression_type = Some(d.content()?); - Ok(()) - } - b"JSON" => { - if json.is_some() { - return Err(DeError::DuplicateField); - } - json = Some(d.content()?); - Ok(()) - } - b"Parquet" => { - if parquet.is_some() { - return Err(DeError::DuplicateField); - } - parquet = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - csv, - compression_type, - json, - parquet, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut csv: Option = None; +let mut compression_type: Option = None; +let mut json: Option = None; +let mut parquet: Option = None; +d.for_each_element(|d, x| match x { +b"CSV" => { +if csv.is_some() { return Err(DeError::DuplicateField); } +csv = Some(d.content()?); +Ok(()) +} +b"CompressionType" => { +if compression_type.is_some() { return Err(DeError::DuplicateField); } +compression_type = Some(d.content()?); +Ok(()) +} +b"JSON" => { +if json.is_some() { return Err(DeError::DuplicateField); } +json = Some(d.content()?); +Ok(()) +} +b"Parquet" => { +if parquet.is_some() { return Err(DeError::DuplicateField); } +parquet = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +csv, +compression_type, +json, +parquet, +}) +} } impl SerializeContent for IntelligentTieringAccessTier { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringAccessTier { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::ARCHIVE_ACCESS)), - b"DEEP_ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::DEEP_ARCHIVE_ACCESS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::ARCHIVE_ACCESS)), +b"DEEP_ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::DEEP_ARCHIVE_ACCESS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for IntelligentTieringAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix, tags }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +tags, +}) +} } impl SerializeContent for IntelligentTieringConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - s.content("Id", &self.id)?; - s.content("Status", &self.status)?; - { - let iter = &self.tierings; - s.flattened_list("Tiering", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +s.content("Id", &self.id)?; +s.content("Status", &self.status)?; +{ +let iter = &self.tierings; +s.flattened_list("Tiering", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut filter: Option = None; - let mut id: Option = None; - let mut status: Option = None; - let mut tierings: Option = None; - d.for_each_element(|d, x| match x { - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - b"Tiering" => { - let ans: Tiering = d.content()?; - tierings.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - filter, - id: id.ok_or(DeError::MissingField)?, - status: status.ok_or(DeError::MissingField)?, - tierings: tierings.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut filter: Option = None; +let mut id: Option = None; +let mut status: Option = None; +let mut tierings: Option = None; +d.for_each_element(|d, x| match x { +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +b"Tiering" => { +let ans: Tiering = d.content()?; +tierings.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +filter, +id: id.ok_or(DeError::MissingField)?, +status: status.ok_or(DeError::MissingField)?, +tierings: tierings.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for IntelligentTieringFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.and { - s.content("And", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.tag { - s.content("Tag", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.and { +s.content("And", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.tag { +s.content("Tag", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut and: Option = None; - let mut prefix: Option = None; - let mut tag: Option = None; - d.for_each_element(|d, x| match x { - b"And" => { - if and.is_some() { - return Err(DeError::DuplicateField); - } - and = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - if tag.is_some() { - return Err(DeError::DuplicateField); - } - tag = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { and, prefix, tag }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut and: Option = None; +let mut prefix: Option = None; +let mut tag: Option = None; +d.for_each_element(|d, x| match x { +b"And" => { +if and.is_some() { return Err(DeError::DuplicateField); } +and = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +if tag.is_some() { return Err(DeError::DuplicateField); } +tag = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +and, +prefix, +tag, +}) +} } impl SerializeContent for IntelligentTieringStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(IntelligentTieringStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(IntelligentTieringStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(IntelligentTieringStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(IntelligentTieringStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for InventoryConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Destination", &self.destination)?; - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - s.content("Id", &self.id)?; - s.content("IncludedObjectVersions", &self.included_object_versions)?; - s.content("IsEnabled", &self.is_enabled)?; - if let Some(iter) = &self.optional_fields { - s.list("OptionalFields", "Field", iter)?; - } - s.content("Schedule", &self.schedule)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Destination", &self.destination)?; +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +s.content("Id", &self.id)?; +s.content("IncludedObjectVersions", &self.included_object_versions)?; +s.content("IsEnabled", &self.is_enabled)?; +if let Some(iter) = &self.optional_fields { +s.list("OptionalFields", "Field", iter)?; +} +s.content("Schedule", &self.schedule)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut destination: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut included_object_versions: Option = None; - let mut is_enabled: Option = None; - let mut optional_fields: Option = None; - let mut schedule: Option = None; - d.for_each_element(|d, x| match x { - b"Destination" => { - if destination.is_some() { - return Err(DeError::DuplicateField); - } - destination = Some(d.content()?); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"IncludedObjectVersions" => { - if included_object_versions.is_some() { - return Err(DeError::DuplicateField); - } - included_object_versions = Some(d.content()?); - Ok(()) - } - b"IsEnabled" => { - if is_enabled.is_some() { - return Err(DeError::DuplicateField); - } - is_enabled = Some(d.content()?); - Ok(()) - } - b"OptionalFields" => { - if optional_fields.is_some() { - return Err(DeError::DuplicateField); - } - optional_fields = Some(d.list_content("Field")?); - Ok(()) - } - b"Schedule" => { - if schedule.is_some() { - return Err(DeError::DuplicateField); - } - schedule = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - destination: destination.ok_or(DeError::MissingField)?, - filter, - id: id.ok_or(DeError::MissingField)?, - included_object_versions: included_object_versions.ok_or(DeError::MissingField)?, - is_enabled: is_enabled.ok_or(DeError::MissingField)?, - optional_fields, - schedule: schedule.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut destination: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut included_object_versions: Option = None; +let mut is_enabled: Option = None; +let mut optional_fields: Option = None; +let mut schedule: Option = None; +d.for_each_element(|d, x| match x { +b"Destination" => { +if destination.is_some() { return Err(DeError::DuplicateField); } +destination = Some(d.content()?); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"IncludedObjectVersions" => { +if included_object_versions.is_some() { return Err(DeError::DuplicateField); } +included_object_versions = Some(d.content()?); +Ok(()) +} +b"IsEnabled" => { +if is_enabled.is_some() { return Err(DeError::DuplicateField); } +is_enabled = Some(d.content()?); +Ok(()) +} +b"OptionalFields" => { +if optional_fields.is_some() { return Err(DeError::DuplicateField); } +optional_fields = Some(d.list_content("Field")?); +Ok(()) +} +b"Schedule" => { +if schedule.is_some() { return Err(DeError::DuplicateField); } +schedule = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +destination: destination.ok_or(DeError::MissingField)?, +filter, +id: id.ok_or(DeError::MissingField)?, +included_object_versions: included_object_versions.ok_or(DeError::MissingField)?, +is_enabled: is_enabled.ok_or(DeError::MissingField)?, +optional_fields, +schedule: schedule.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for InventoryDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("S3BucketDestination", &self.s3_bucket_destination)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("S3BucketDestination", &self.s3_bucket_destination)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3_bucket_destination: Option = None; - d.for_each_element(|d, x| match x { - b"S3BucketDestination" => { - if s3_bucket_destination.is_some() { - return Err(DeError::DuplicateField); - } - s3_bucket_destination = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3_bucket_destination: Option = None; +d.for_each_element(|d, x| match x { +b"S3BucketDestination" => { +if s3_bucket_destination.is_some() { return Err(DeError::DuplicateField); } +s3_bucket_destination = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for InventoryEncryption { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.ssekms { - s.content("SSE-KMS", val)?; - } - if let Some(ref val) = self.sses3 { - s.content("SSE-S3", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.ssekms { +s.content("SSE-KMS", val)?; +} +if let Some(ref val) = self.sses3 { +s.content("SSE-S3", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryEncryption { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut ssekms: Option = None; - let mut sses3: Option = None; - d.for_each_element(|d, x| match x { - b"SSE-KMS" => { - if ssekms.is_some() { - return Err(DeError::DuplicateField); - } - ssekms = Some(d.content()?); - Ok(()) - } - b"SSE-S3" => { - if sses3.is_some() { - return Err(DeError::DuplicateField); - } - sses3 = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { ssekms, sses3 }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut ssekms: Option = None; +let mut sses3: Option = None; +d.for_each_element(|d, x| match x { +b"SSE-KMS" => { +if ssekms.is_some() { return Err(DeError::DuplicateField); } +ssekms = Some(d.content()?); +Ok(()) +} +b"SSE-S3" => { +if sses3.is_some() { return Err(DeError::DuplicateField); } +sses3 = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +ssekms, +sses3, +}) +} } impl SerializeContent for InventoryFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Prefix", &self.prefix)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Prefix", &self.prefix)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - prefix: prefix.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix: prefix.ok_or(DeError::MissingField)?, +}) +} +} +impl SerializeContent for InventoryFormat { +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) } -impl SerializeContent for InventoryFormat { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } } impl<'xml> DeserializeContent<'xml> for InventoryFormat { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"CSV" => Ok(Self::from_static(InventoryFormat::CSV)), - b"ORC" => Ok(Self::from_static(InventoryFormat::ORC)), - b"Parquet" => Ok(Self::from_static(InventoryFormat::PARQUET)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"CSV" => Ok(Self::from_static(InventoryFormat::CSV)), +b"ORC" => Ok(Self::from_static(InventoryFormat::ORC)), +b"Parquet" => Ok(Self::from_static(InventoryFormat::PARQUET)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for InventoryFrequency { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for InventoryFrequency { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Daily" => Ok(Self::from_static(InventoryFrequency::DAILY)), - b"Weekly" => Ok(Self::from_static(InventoryFrequency::WEEKLY)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Daily" => Ok(Self::from_static(InventoryFrequency::DAILY)), +b"Weekly" => Ok(Self::from_static(InventoryFrequency::WEEKLY)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for InventoryIncludedObjectVersions { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for InventoryIncludedObjectVersions { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"All" => Ok(Self::from_static(InventoryIncludedObjectVersions::ALL)), - b"Current" => Ok(Self::from_static(InventoryIncludedObjectVersions::CURRENT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"All" => Ok(Self::from_static(InventoryIncludedObjectVersions::ALL)), +b"Current" => Ok(Self::from_static(InventoryIncludedObjectVersions::CURRENT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for InventoryOptionalField { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for InventoryOptionalField { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"BucketKeyStatus" => Ok(Self::from_static(InventoryOptionalField::BUCKET_KEY_STATUS)), - b"ChecksumAlgorithm" => Ok(Self::from_static(InventoryOptionalField::CHECKSUM_ALGORITHM)), - b"ETag" => Ok(Self::from_static(InventoryOptionalField::E_TAG)), - b"EncryptionStatus" => Ok(Self::from_static(InventoryOptionalField::ENCRYPTION_STATUS)), - b"IntelligentTieringAccessTier" => Ok(Self::from_static(InventoryOptionalField::INTELLIGENT_TIERING_ACCESS_TIER)), - b"IsMultipartUploaded" => Ok(Self::from_static(InventoryOptionalField::IS_MULTIPART_UPLOADED)), - b"LastModifiedDate" => Ok(Self::from_static(InventoryOptionalField::LAST_MODIFIED_DATE)), - b"ObjectAccessControlList" => Ok(Self::from_static(InventoryOptionalField::OBJECT_ACCESS_CONTROL_LIST)), - b"ObjectLockLegalHoldStatus" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_LEGAL_HOLD_STATUS)), - b"ObjectLockMode" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_MODE)), - b"ObjectLockRetainUntilDate" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_RETAIN_UNTIL_DATE)), - b"ObjectOwner" => Ok(Self::from_static(InventoryOptionalField::OBJECT_OWNER)), - b"ReplicationStatus" => Ok(Self::from_static(InventoryOptionalField::REPLICATION_STATUS)), - b"Size" => Ok(Self::from_static(InventoryOptionalField::SIZE)), - b"StorageClass" => Ok(Self::from_static(InventoryOptionalField::STORAGE_CLASS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"BucketKeyStatus" => Ok(Self::from_static(InventoryOptionalField::BUCKET_KEY_STATUS)), +b"ChecksumAlgorithm" => Ok(Self::from_static(InventoryOptionalField::CHECKSUM_ALGORITHM)), +b"ETag" => Ok(Self::from_static(InventoryOptionalField::E_TAG)), +b"EncryptionStatus" => Ok(Self::from_static(InventoryOptionalField::ENCRYPTION_STATUS)), +b"IntelligentTieringAccessTier" => Ok(Self::from_static(InventoryOptionalField::INTELLIGENT_TIERING_ACCESS_TIER)), +b"IsMultipartUploaded" => Ok(Self::from_static(InventoryOptionalField::IS_MULTIPART_UPLOADED)), +b"LastModifiedDate" => Ok(Self::from_static(InventoryOptionalField::LAST_MODIFIED_DATE)), +b"ObjectAccessControlList" => Ok(Self::from_static(InventoryOptionalField::OBJECT_ACCESS_CONTROL_LIST)), +b"ObjectLockLegalHoldStatus" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_LEGAL_HOLD_STATUS)), +b"ObjectLockMode" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_MODE)), +b"ObjectLockRetainUntilDate" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_RETAIN_UNTIL_DATE)), +b"ObjectOwner" => Ok(Self::from_static(InventoryOptionalField::OBJECT_OWNER)), +b"ReplicationStatus" => Ok(Self::from_static(InventoryOptionalField::REPLICATION_STATUS)), +b"Size" => Ok(Self::from_static(InventoryOptionalField::SIZE)), +b"StorageClass" => Ok(Self::from_static(InventoryOptionalField::STORAGE_CLASS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for InventoryS3BucketDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.account_id { - s.content("AccountId", val)?; - } - s.content("Bucket", &self.bucket)?; - if let Some(ref val) = self.encryption { - s.content("Encryption", val)?; - } - s.content("Format", &self.format)?; - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.account_id { +s.content("AccountId", val)?; +} +s.content("Bucket", &self.bucket)?; +if let Some(ref val) = self.encryption { +s.content("Encryption", val)?; +} +s.content("Format", &self.format)?; +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryS3BucketDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut account_id: Option = None; - let mut bucket: Option = None; - let mut encryption: Option = None; - let mut format: Option = None; - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"AccountId" => { - if account_id.is_some() { - return Err(DeError::DuplicateField); - } - account_id = Some(d.content()?); - Ok(()) - } - b"Bucket" => { - if bucket.is_some() { - return Err(DeError::DuplicateField); - } - bucket = Some(d.content()?); - Ok(()) - } - b"Encryption" => { - if encryption.is_some() { - return Err(DeError::DuplicateField); - } - encryption = Some(d.content()?); - Ok(()) - } - b"Format" => { - if format.is_some() { - return Err(DeError::DuplicateField); - } - format = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - account_id, - bucket: bucket.ok_or(DeError::MissingField)?, - encryption, - format: format.ok_or(DeError::MissingField)?, - prefix, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut account_id: Option = None; +let mut bucket: Option = None; +let mut encryption: Option = None; +let mut format: Option = None; +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"AccountId" => { +if account_id.is_some() { return Err(DeError::DuplicateField); } +account_id = Some(d.content()?); +Ok(()) +} +b"Bucket" => { +if bucket.is_some() { return Err(DeError::DuplicateField); } +bucket = Some(d.content()?); +Ok(()) +} +b"Encryption" => { +if encryption.is_some() { return Err(DeError::DuplicateField); } +encryption = Some(d.content()?); +Ok(()) +} +b"Format" => { +if format.is_some() { return Err(DeError::DuplicateField); } +format = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +account_id, +bucket: bucket.ok_or(DeError::MissingField)?, +encryption, +format: format.ok_or(DeError::MissingField)?, +prefix, +}) +} } impl SerializeContent for InventorySchedule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Frequency", &self.frequency)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Frequency", &self.frequency)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventorySchedule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut frequency: Option = None; - d.for_each_element(|d, x| match x { - b"Frequency" => { - if frequency.is_some() { - return Err(DeError::DuplicateField); - } - frequency = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - frequency: frequency.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut frequency: Option = None; +d.for_each_element(|d, x| match x { +b"Frequency" => { +if frequency.is_some() { return Err(DeError::DuplicateField); } +frequency = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +frequency: frequency.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for JSONInput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.type_ { - s.content("Type", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.type_ { +s.content("Type", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for JSONInput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut type_: Option = None; - d.for_each_element(|d, x| match x { - b"Type" => { - if type_.is_some() { - return Err(DeError::DuplicateField); - } - type_ = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { type_ }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut type_: Option = None; +d.for_each_element(|d, x| match x { +b"Type" => { +if type_.is_some() { return Err(DeError::DuplicateField); } +type_ = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +type_, +}) +} } impl SerializeContent for JSONOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.record_delimiter { - s.content("RecordDelimiter", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.record_delimiter { +s.content("RecordDelimiter", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for JSONOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut record_delimiter: Option = None; - d.for_each_element(|d, x| match x { - b"RecordDelimiter" => { - if record_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - record_delimiter = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { record_delimiter }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut record_delimiter: Option = None; +d.for_each_element(|d, x| match x { +b"RecordDelimiter" => { +if record_delimiter.is_some() { return Err(DeError::DuplicateField); } +record_delimiter = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +record_delimiter, +}) +} } impl SerializeContent for JSONType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for JSONType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DOCUMENT" => Ok(Self::from_static(JSONType::DOCUMENT)), - b"LINES" => Ok(Self::from_static(JSONType::LINES)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DOCUMENT" => Ok(Self::from_static(JSONType::DOCUMENT)), +b"LINES" => Ok(Self::from_static(JSONType::LINES)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for LambdaFunctionConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.events; - s.flattened_list("Event", iter)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("Id", val)?; - } - s.content("CloudFunction", &self.lambda_function_arn)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.events; +s.flattened_list("Event", iter)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("Id", val)?; +} +s.content("CloudFunction", &self.lambda_function_arn)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LambdaFunctionConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut events: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut lambda_function_arn: Option = None; - d.for_each_element(|d, x| match x { - b"Event" => { - let ans: Event = d.content()?; - events.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"CloudFunction" => { - if lambda_function_arn.is_some() { - return Err(DeError::DuplicateField); - } - lambda_function_arn = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - events: events.ok_or(DeError::MissingField)?, - filter, - id, - lambda_function_arn: lambda_function_arn.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut events: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut lambda_function_arn: Option = None; +d.for_each_element(|d, x| match x { +b"Event" => { +let ans: Event = d.content()?; +events.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"CloudFunction" => { +if lambda_function_arn.is_some() { return Err(DeError::DuplicateField); } +lambda_function_arn = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +events: events.ok_or(DeError::MissingField)?, +filter, +id, +lambda_function_arn: lambda_function_arn.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for LifecycleExpiration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.date { - s.timestamp("Date", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.days { - s.content("Days", val)?; - } - if let Some(ref val) = self.expired_object_delete_marker { - s.content("ExpiredObjectDeleteMarker", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.date { +s.timestamp("Date", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +if let Some(ref val) = self.expired_object_all_versions { +s.content("ExpiredObjectAllVersions", val)?; +} +if let Some(ref val) = self.expired_object_delete_marker { +s.content("ExpiredObjectDeleteMarker", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LifecycleExpiration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut date: Option = None; - let mut days: Option = None; - let mut expired_object_delete_marker: Option = None; - d.for_each_element(|d, x| match x { - b"Date" => { - if date.is_some() { - return Err(DeError::DuplicateField); - } - date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - b"ExpiredObjectDeleteMarker" => { - if expired_object_delete_marker.is_some() { - return Err(DeError::DuplicateField); - } - expired_object_delete_marker = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - date, - days, - expired_object_delete_marker, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut date: Option = None; +let mut days: Option = None; +let mut expired_object_all_versions: Option = None; +let mut expired_object_delete_marker: Option = None; +d.for_each_element(|d, x| match x { +b"Date" => { +if date.is_some() { return Err(DeError::DuplicateField); } +date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +b"ExpiredObjectAllVersions" => { +if expired_object_all_versions.is_some() { return Err(DeError::DuplicateField); } +expired_object_all_versions = Some(d.content()?); +Ok(()) +} +b"ExpiredObjectDeleteMarker" => { +if expired_object_delete_marker.is_some() { return Err(DeError::DuplicateField); } +expired_object_delete_marker = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +date, +days, +expired_object_all_versions, +expired_object_delete_marker, +}) +} } impl SerializeContent for LifecycleRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.abort_incomplete_multipart_upload { - s.content("AbortIncompleteMultipartUpload", val)?; - } - if let Some(ref val) = self.expiration { - s.content("Expiration", val)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - if let Some(ref val) = self.noncurrent_version_expiration { - s.content("NoncurrentVersionExpiration", val)?; - } - if let Some(iter) = &self.noncurrent_version_transitions { - s.flattened_list("NoncurrentVersionTransition", iter)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - s.content("Status", &self.status)?; - if let Some(iter) = &self.transitions { - s.flattened_list("Transition", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.abort_incomplete_multipart_upload { +s.content("AbortIncompleteMultipartUpload", val)?; +} +if let Some(ref val) = self.del_marker_expiration { +s.content("DelMarkerExpiration", val)?; +} +if let Some(ref val) = self.expiration { +s.content("Expiration", val)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +if let Some(ref val) = self.noncurrent_version_expiration { +s.content("NoncurrentVersionExpiration", val)?; +} +if let Some(iter) = &self.noncurrent_version_transitions { +s.flattened_list("NoncurrentVersionTransition", iter)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +s.content("Status", &self.status)?; +if let Some(iter) = &self.transitions { +s.flattened_list("Transition", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LifecycleRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut abort_incomplete_multipart_upload: Option = None; - let mut expiration: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut noncurrent_version_expiration: Option = None; - let mut noncurrent_version_transitions: Option = None; - let mut prefix: Option = None; - let mut status: Option = None; - let mut transitions: Option = None; - d.for_each_element(|d, x| match x { - b"AbortIncompleteMultipartUpload" => { - if abort_incomplete_multipart_upload.is_some() { - return Err(DeError::DuplicateField); - } - abort_incomplete_multipart_upload = Some(d.content()?); - Ok(()) - } - b"Expiration" => { - if expiration.is_some() { - return Err(DeError::DuplicateField); - } - expiration = Some(d.content()?); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"NoncurrentVersionExpiration" => { - if noncurrent_version_expiration.is_some() { - return Err(DeError::DuplicateField); - } - noncurrent_version_expiration = Some(d.content()?); - Ok(()) - } - b"NoncurrentVersionTransition" => { - let ans: NoncurrentVersionTransition = d.content()?; - noncurrent_version_transitions.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - b"Transition" => { - let ans: Transition = d.content()?; - transitions.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - abort_incomplete_multipart_upload, - expiration, - filter, - id, - noncurrent_version_expiration, - noncurrent_version_transitions, - prefix, - status: status.ok_or(DeError::MissingField)?, - transitions, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut abort_incomplete_multipart_upload: Option = None; +let mut del_marker_expiration: Option = None; +let mut expiration: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut noncurrent_version_expiration: Option = None; +let mut noncurrent_version_transitions: Option = None; +let mut prefix: Option = None; +let mut status: Option = None; +let mut transitions: Option = None; +d.for_each_element(|d, x| match x { +b"AbortIncompleteMultipartUpload" => { +if abort_incomplete_multipart_upload.is_some() { return Err(DeError::DuplicateField); } +abort_incomplete_multipart_upload = Some(d.content()?); +Ok(()) +} +b"DelMarkerExpiration" => { +if del_marker_expiration.is_some() { return Err(DeError::DuplicateField); } +del_marker_expiration = Some(d.content()?); +Ok(()) +} +b"Expiration" => { +if expiration.is_some() { return Err(DeError::DuplicateField); } +expiration = Some(d.content()?); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"NoncurrentVersionExpiration" => { +if noncurrent_version_expiration.is_some() { return Err(DeError::DuplicateField); } +noncurrent_version_expiration = Some(d.content()?); +Ok(()) +} +b"NoncurrentVersionTransition" => { +let ans: NoncurrentVersionTransition = d.content()?; +noncurrent_version_transitions.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +b"Transition" => { +let ans: Transition = d.content()?; +transitions.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +abort_incomplete_multipart_upload, +del_marker_expiration, +expiration, +filter, +id, +noncurrent_version_expiration, +noncurrent_version_transitions, +prefix, +status: status.ok_or(DeError::MissingField)?, +transitions, +}) +} } impl SerializeContent for LifecycleRuleAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.object_size_greater_than { - s.content("ObjectSizeGreaterThan", val)?; - } - if let Some(ref val) = self.object_size_less_than { - s.content("ObjectSizeLessThan", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.object_size_greater_than { +s.content("ObjectSizeGreaterThan", val)?; +} +if let Some(ref val) = self.object_size_less_than { +s.content("ObjectSizeLessThan", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LifecycleRuleAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut object_size_greater_than: Option = None; - let mut object_size_less_than: Option = None; - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"ObjectSizeGreaterThan" => { - if object_size_greater_than.is_some() { - return Err(DeError::DuplicateField); - } - object_size_greater_than = Some(d.content()?); - Ok(()) - } - b"ObjectSizeLessThan" => { - if object_size_less_than.is_some() { - return Err(DeError::DuplicateField); - } - object_size_less_than = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - object_size_greater_than, - object_size_less_than, - prefix, - tags, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut object_size_greater_than: Option = None; +let mut object_size_less_than: Option = None; +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"ObjectSizeGreaterThan" => { +if object_size_greater_than.is_some() { return Err(DeError::DuplicateField); } +object_size_greater_than = Some(d.content()?); +Ok(()) +} +b"ObjectSizeLessThan" => { +if object_size_less_than.is_some() { return Err(DeError::DuplicateField); } +object_size_less_than = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +object_size_greater_than, +object_size_less_than, +prefix, +tags, +}) +} } impl SerializeContent for LifecycleRuleFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.and { - s.content("And", val)?; - } - if let Some(ref val) = self.object_size_greater_than { - s.content("ObjectSizeGreaterThan", val)?; - } - if let Some(ref val) = self.object_size_less_than { - s.content("ObjectSizeLessThan", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.tag { - s.content("Tag", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.and { +s.content("And", val)?; +} +if let Some(ref val) = self.object_size_greater_than { +s.content("ObjectSizeGreaterThan", val)?; +} +if let Some(ref val) = self.object_size_less_than { +s.content("ObjectSizeLessThan", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.tag { +s.content("Tag", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LifecycleRuleFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut and: Option = None; - let mut object_size_greater_than: Option = None; - let mut object_size_less_than: Option = None; - let mut prefix: Option = None; - let mut tag: Option = None; - d.for_each_element(|d, x| match x { - b"And" => { - if and.is_some() { - return Err(DeError::DuplicateField); - } - and = Some(d.content()?); - Ok(()) - } - b"ObjectSizeGreaterThan" => { - if object_size_greater_than.is_some() { - return Err(DeError::DuplicateField); - } - object_size_greater_than = Some(d.content()?); - Ok(()) - } - b"ObjectSizeLessThan" => { - if object_size_less_than.is_some() { - return Err(DeError::DuplicateField); - } - object_size_less_than = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - if tag.is_some() { - return Err(DeError::DuplicateField); - } - tag = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - and, - cached_tags: CachedTags::default(), - object_size_greater_than, - object_size_less_than, - prefix, - tag, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut and: Option = None; +let mut object_size_greater_than: Option = None; +let mut object_size_less_than: Option = None; +let mut prefix: Option = None; +let mut tag: Option = None; +d.for_each_element(|d, x| match x { +b"And" => { +if and.is_some() { return Err(DeError::DuplicateField); } +and = Some(d.content()?); +Ok(()) +} +b"ObjectSizeGreaterThan" => { +if object_size_greater_than.is_some() { return Err(DeError::DuplicateField); } +object_size_greater_than = Some(d.content()?); +Ok(()) +} +b"ObjectSizeLessThan" => { +if object_size_less_than.is_some() { return Err(DeError::DuplicateField); } +object_size_less_than = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +if tag.is_some() { return Err(DeError::DuplicateField); } +tag = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +and, +cached_tags: CachedTags::default(), +object_size_greater_than, +object_size_less_than, +prefix, +tag, +}) +} } impl SerializeContent for ListBucketAnalyticsConfigurationsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.analytics_configuration_list { - s.flattened_list("AnalyticsConfiguration", iter)?; - } - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.analytics_configuration_list { +s.flattened_list("AnalyticsConfiguration", iter)?; +} +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketAnalyticsConfigurationsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut analytics_configuration_list: Option = None; - let mut continuation_token: Option = None; - let mut is_truncated: Option = None; - let mut next_continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"AnalyticsConfiguration" => { - let ans: AnalyticsConfiguration = d.content()?; - analytics_configuration_list.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"NextContinuationToken" => { - if next_continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - next_continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - analytics_configuration_list, - continuation_token, - is_truncated, - next_continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut analytics_configuration_list: Option = None; +let mut continuation_token: Option = None; +let mut is_truncated: Option = None; +let mut next_continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"AnalyticsConfiguration" => { +let ans: AnalyticsConfiguration = d.content()?; +analytics_configuration_list.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"NextContinuationToken" => { +if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } +next_continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +analytics_configuration_list, +continuation_token, +is_truncated, +next_continuation_token, +}) +} } impl SerializeContent for ListBucketIntelligentTieringConfigurationsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(iter) = &self.intelligent_tiering_configuration_list { - s.flattened_list("IntelligentTieringConfiguration", iter)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(iter) = &self.intelligent_tiering_configuration_list { +s.flattened_list("IntelligentTieringConfiguration", iter)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketIntelligentTieringConfigurationsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut continuation_token: Option = None; - let mut intelligent_tiering_configuration_list: Option = None; - let mut is_truncated: Option = None; - let mut next_continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"IntelligentTieringConfiguration" => { - let ans: IntelligentTieringConfiguration = d.content()?; - intelligent_tiering_configuration_list.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"NextContinuationToken" => { - if next_continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - next_continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - continuation_token, - intelligent_tiering_configuration_list, - is_truncated, - next_continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut continuation_token: Option = None; +let mut intelligent_tiering_configuration_list: Option = None; +let mut is_truncated: Option = None; +let mut next_continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"IntelligentTieringConfiguration" => { +let ans: IntelligentTieringConfiguration = d.content()?; +intelligent_tiering_configuration_list.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"NextContinuationToken" => { +if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } +next_continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +continuation_token, +intelligent_tiering_configuration_list, +is_truncated, +next_continuation_token, +}) +} } impl SerializeContent for ListBucketInventoryConfigurationsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(iter) = &self.inventory_configuration_list { - s.flattened_list("InventoryConfiguration", iter)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(iter) = &self.inventory_configuration_list { +s.flattened_list("InventoryConfiguration", iter)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketInventoryConfigurationsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut continuation_token: Option = None; - let mut inventory_configuration_list: Option = None; - let mut is_truncated: Option = None; - let mut next_continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"InventoryConfiguration" => { - let ans: InventoryConfiguration = d.content()?; - inventory_configuration_list.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"NextContinuationToken" => { - if next_continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - next_continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - continuation_token, - inventory_configuration_list, - is_truncated, - next_continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut continuation_token: Option = None; +let mut inventory_configuration_list: Option = None; +let mut is_truncated: Option = None; +let mut next_continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"InventoryConfiguration" => { +let ans: InventoryConfiguration = d.content()?; +inventory_configuration_list.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"NextContinuationToken" => { +if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } +next_continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +continuation_token, +inventory_configuration_list, +is_truncated, +next_continuation_token, +}) +} } impl SerializeContent for ListBucketMetricsConfigurationsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(iter) = &self.metrics_configuration_list { - s.flattened_list("MetricsConfiguration", iter)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(iter) = &self.metrics_configuration_list { +s.flattened_list("MetricsConfiguration", iter)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketMetricsConfigurationsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut continuation_token: Option = None; - let mut is_truncated: Option = None; - let mut metrics_configuration_list: Option = None; - let mut next_continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"MetricsConfiguration" => { - let ans: MetricsConfiguration = d.content()?; - metrics_configuration_list.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"NextContinuationToken" => { - if next_continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - next_continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - continuation_token, - is_truncated, - metrics_configuration_list, - next_continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut continuation_token: Option = None; +let mut is_truncated: Option = None; +let mut metrics_configuration_list: Option = None; +let mut next_continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"MetricsConfiguration" => { +let ans: MetricsConfiguration = d.content()?; +metrics_configuration_list.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"NextContinuationToken" => { +if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } +next_continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +continuation_token, +is_truncated, +metrics_configuration_list, +next_continuation_token, +}) +} } impl SerializeContent for ListBucketsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.buckets { - s.list("Buckets", "Bucket", iter)?; - } - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.buckets { +s.list("Buckets", "Bucket", iter)?; +} +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut buckets: Option = None; - let mut continuation_token: Option = None; - let mut owner: Option = None; - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Buckets" => { - if buckets.is_some() { - return Err(DeError::DuplicateField); - } - buckets = Some(d.list_content("Bucket")?); - Ok(()) - } - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - buckets, - continuation_token, - owner, - prefix, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut buckets: Option = None; +let mut continuation_token: Option = None; +let mut owner: Option = None; +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Buckets" => { +if buckets.is_some() { return Err(DeError::DuplicateField); } +buckets = Some(d.list_content("Bucket")?); +Ok(()) +} +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +buckets, +continuation_token, +owner, +prefix, +}) +} } impl SerializeContent for ListDirectoryBucketsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.buckets { - s.list("Buckets", "Bucket", iter)?; - } - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.buckets { +s.list("Buckets", "Bucket", iter)?; +} +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListDirectoryBucketsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut buckets: Option = None; - let mut continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"Buckets" => { - if buckets.is_some() { - return Err(DeError::DuplicateField); - } - buckets = Some(d.list_content("Bucket")?); - Ok(()) - } - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - buckets, - continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut buckets: Option = None; +let mut continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"Buckets" => { +if buckets.is_some() { return Err(DeError::DuplicateField); } +buckets = Some(d.list_content("Bucket")?); +Ok(()) +} +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +buckets, +continuation_token, +}) +} } impl SerializeContent for ListMultipartUploadsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(iter) = &self.common_prefixes { - s.flattened_list("CommonPrefixes", iter)?; - } - if let Some(ref val) = self.delimiter { - s.content("Delimiter", val)?; - } - if let Some(ref val) = self.encoding_type { - s.content("EncodingType", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.key_marker { - s.content("KeyMarker", val)?; - } - if let Some(ref val) = self.max_uploads { - s.content("MaxUploads", val)?; - } - if let Some(ref val) = self.next_key_marker { - s.content("NextKeyMarker", val)?; - } - if let Some(ref val) = self.next_upload_id_marker { - s.content("NextUploadIdMarker", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.upload_id_marker { - s.content("UploadIdMarker", val)?; - } - if let Some(iter) = &self.uploads { - s.flattened_list("Upload", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(iter) = &self.common_prefixes { +s.flattened_list("CommonPrefixes", iter)?; +} +if let Some(ref val) = self.delimiter { +s.content("Delimiter", val)?; +} +if let Some(ref val) = self.encoding_type { +s.content("EncodingType", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.key_marker { +s.content("KeyMarker", val)?; +} +if let Some(ref val) = self.max_uploads { +s.content("MaxUploads", val)?; +} +if let Some(ref val) = self.next_key_marker { +s.content("NextKeyMarker", val)?; +} +if let Some(ref val) = self.next_upload_id_marker { +s.content("NextUploadIdMarker", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.upload_id_marker { +s.content("UploadIdMarker", val)?; +} +if let Some(iter) = &self.uploads { +s.flattened_list("Upload", iter)?; +} +Ok(()) +} } impl SerializeContent for ListObjectVersionsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.common_prefixes { - s.flattened_list("CommonPrefixes", iter)?; - } - if let Some(iter) = &self.delete_markers { - s.flattened_list("DeleteMarker", iter)?; - } - if let Some(ref val) = self.delimiter { - s.content("Delimiter", val)?; - } - if let Some(ref val) = self.encoding_type { - s.content("EncodingType", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.key_marker { - s.content("KeyMarker", val)?; - } - if let Some(ref val) = self.max_keys { - s.content("MaxKeys", val)?; - } - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.next_key_marker { - s.content("NextKeyMarker", val)?; - } - if let Some(ref val) = self.next_version_id_marker { - s.content("NextVersionIdMarker", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.version_id_marker { - s.content("VersionIdMarker", val)?; - } - if let Some(iter) = &self.versions { - s.flattened_list("Version", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.common_prefixes { +s.flattened_list("CommonPrefixes", iter)?; +} +if let Some(iter) = &self.delete_markers { +s.flattened_list("DeleteMarker", iter)?; +} +if let Some(ref val) = self.delimiter { +s.content("Delimiter", val)?; +} +if let Some(ref val) = self.encoding_type { +s.content("EncodingType", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.key_marker { +s.content("KeyMarker", val)?; +} +if let Some(ref val) = self.max_keys { +s.content("MaxKeys", val)?; +} +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.next_key_marker { +s.content("NextKeyMarker", val)?; +} +if let Some(ref val) = self.next_version_id_marker { +s.content("NextVersionIdMarker", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.version_id_marker { +s.content("VersionIdMarker", val)?; +} +if let Some(iter) = &self.versions { +s.flattened_list("Version", iter)?; +} +Ok(()) +} } impl SerializeContent for ListObjectsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.marker { - s.content("Marker", val)?; - } - if let Some(ref val) = self.max_keys { - s.content("MaxKeys", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(iter) = &self.contents { - s.flattened_list("Contents", iter)?; - } - if let Some(iter) = &self.common_prefixes { - s.flattened_list("CommonPrefixes", iter)?; - } - if let Some(ref val) = self.delimiter { - s.content("Delimiter", val)?; - } - if let Some(ref val) = self.next_marker { - s.content("NextMarker", val)?; - } - if let Some(ref val) = self.encoding_type { - s.content("EncodingType", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.marker { +s.content("Marker", val)?; +} +if let Some(ref val) = self.max_keys { +s.content("MaxKeys", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(iter) = &self.contents { +s.flattened_list("Contents", iter)?; +} +if let Some(iter) = &self.common_prefixes { +s.flattened_list("CommonPrefixes", iter)?; +} +if let Some(ref val) = self.delimiter { +s.content("Delimiter", val)?; +} +if let Some(ref val) = self.next_marker { +s.content("NextMarker", val)?; +} +if let Some(ref val) = self.encoding_type { +s.content("EncodingType", val)?; +} +Ok(()) +} } impl SerializeContent for ListObjectsV2Output { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.max_keys { - s.content("MaxKeys", val)?; - } - if let Some(ref val) = self.key_count { - s.content("KeyCount", val)?; - } - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - if let Some(iter) = &self.contents { - s.flattened_list("Contents", iter)?; - } - if let Some(iter) = &self.common_prefixes { - s.flattened_list("CommonPrefixes", iter)?; - } - if let Some(ref val) = self.delimiter { - s.content("Delimiter", val)?; - } - if let Some(ref val) = self.encoding_type { - s.content("EncodingType", val)?; - } - if let Some(ref val) = self.start_after { - s.content("StartAfter", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.max_keys { +s.content("MaxKeys", val)?; +} +if let Some(ref val) = self.key_count { +s.content("KeyCount", val)?; +} +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +if let Some(iter) = &self.contents { +s.flattened_list("Contents", iter)?; +} +if let Some(iter) = &self.common_prefixes { +s.flattened_list("CommonPrefixes", iter)?; +} +if let Some(ref val) = self.delimiter { +s.content("Delimiter", val)?; +} +if let Some(ref val) = self.encoding_type { +s.content("EncodingType", val)?; +} +if let Some(ref val) = self.start_after { +s.content("StartAfter", val)?; +} +Ok(()) +} } impl SerializeContent for ListPartsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(ref val) = self.checksum_algorithm { - s.content("ChecksumAlgorithm", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.initiator { - s.content("Initiator", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.max_parts { - s.content("MaxParts", val)?; - } - if let Some(ref val) = self.next_part_number_marker { - s.content("NextPartNumberMarker", val)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.part_number_marker { - s.content("PartNumberMarker", val)?; - } - if let Some(iter) = &self.parts { - s.flattened_list("Part", iter)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - if let Some(ref val) = self.upload_id { - s.content("UploadId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(ref val) = self.checksum_algorithm { +s.content("ChecksumAlgorithm", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.initiator { +s.content("Initiator", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.max_parts { +s.content("MaxParts", val)?; +} +if let Some(ref val) = self.next_part_number_marker { +s.content("NextPartNumberMarker", val)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.part_number_marker { +s.content("PartNumberMarker", val)?; +} +if let Some(iter) = &self.parts { +s.flattened_list("Part", iter)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +if let Some(ref val) = self.upload_id { +s.content("UploadId", val)?; +} +Ok(()) +} } impl SerializeContent for LocationInfo { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.type_ { - s.content("Type", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.type_ { +s.content("Type", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LocationInfo { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut name: Option = None; - let mut type_: Option = None; - d.for_each_element(|d, x| match x { - b"Name" => { - if name.is_some() { - return Err(DeError::DuplicateField); - } - name = Some(d.content()?); - Ok(()) - } - b"Type" => { - if type_.is_some() { - return Err(DeError::DuplicateField); - } - type_ = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { name, type_ }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut name: Option = None; +let mut type_: Option = None; +d.for_each_element(|d, x| match x { +b"Name" => { +if name.is_some() { return Err(DeError::DuplicateField); } +name = Some(d.content()?); +Ok(()) +} +b"Type" => { +if type_.is_some() { return Err(DeError::DuplicateField); } +type_ = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +name, +type_, +}) +} } impl SerializeContent for LocationType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for LocationType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"AvailabilityZone" => Ok(Self::from_static(LocationType::AVAILABILITY_ZONE)), - b"LocalZone" => Ok(Self::from_static(LocationType::LOCAL_ZONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"AvailabilityZone" => Ok(Self::from_static(LocationType::AVAILABILITY_ZONE)), +b"LocalZone" => Ok(Self::from_static(LocationType::LOCAL_ZONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for LoggingEnabled { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("TargetBucket", &self.target_bucket)?; - if let Some(iter) = &self.target_grants { - s.list("TargetGrants", "Grant", iter)?; - } - if let Some(ref val) = self.target_object_key_format { - s.content("TargetObjectKeyFormat", val)?; - } - s.content("TargetPrefix", &self.target_prefix)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("TargetBucket", &self.target_bucket)?; +if let Some(iter) = &self.target_grants { +s.list("TargetGrants", "Grant", iter)?; +} +if let Some(ref val) = self.target_object_key_format { +s.content("TargetObjectKeyFormat", val)?; +} +s.content("TargetPrefix", &self.target_prefix)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LoggingEnabled { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut target_bucket: Option = None; - let mut target_grants: Option = None; - let mut target_object_key_format: Option = None; - let mut target_prefix: Option = None; - d.for_each_element(|d, x| match x { - b"TargetBucket" => { - if target_bucket.is_some() { - return Err(DeError::DuplicateField); - } - target_bucket = Some(d.content()?); - Ok(()) - } - b"TargetGrants" => { - if target_grants.is_some() { - return Err(DeError::DuplicateField); - } - target_grants = Some(d.list_content("Grant")?); - Ok(()) - } - b"TargetObjectKeyFormat" => { - if target_object_key_format.is_some() { - return Err(DeError::DuplicateField); - } - target_object_key_format = Some(d.content()?); - Ok(()) - } - b"TargetPrefix" => { - if target_prefix.is_some() { - return Err(DeError::DuplicateField); - } - target_prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - target_bucket: target_bucket.ok_or(DeError::MissingField)?, - target_grants, - target_object_key_format, - target_prefix: target_prefix.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut target_bucket: Option = None; +let mut target_grants: Option = None; +let mut target_object_key_format: Option = None; +let mut target_prefix: Option = None; +d.for_each_element(|d, x| match x { +b"TargetBucket" => { +if target_bucket.is_some() { return Err(DeError::DuplicateField); } +target_bucket = Some(d.content()?); +Ok(()) +} +b"TargetGrants" => { +if target_grants.is_some() { return Err(DeError::DuplicateField); } +target_grants = Some(d.list_content("Grant")?); +Ok(()) +} +b"TargetObjectKeyFormat" => { +if target_object_key_format.is_some() { return Err(DeError::DuplicateField); } +target_object_key_format = Some(d.content()?); +Ok(()) +} +b"TargetPrefix" => { +if target_prefix.is_some() { return Err(DeError::DuplicateField); } +target_prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +target_bucket: target_bucket.ok_or(DeError::MissingField)?, +target_grants, +target_object_key_format, +target_prefix: target_prefix.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for MFADelete { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for MFADelete { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(MFADelete::DISABLED)), - b"Enabled" => Ok(Self::from_static(MFADelete::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(MFADelete::DISABLED)), +b"Enabled" => Ok(Self::from_static(MFADelete::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for MFADeleteStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for MFADeleteStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(MFADeleteStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(MFADeleteStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(MFADeleteStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(MFADeleteStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for MetadataEntry { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.value { - s.content("Value", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.value { +s.content("Value", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetadataEntry { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut name: Option = None; - let mut value: Option = None; - d.for_each_element(|d, x| match x { - b"Name" => { - if name.is_some() { - return Err(DeError::DuplicateField); - } - name = Some(d.content()?); - Ok(()) - } - b"Value" => { - if value.is_some() { - return Err(DeError::DuplicateField); - } - value = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { name, value }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut name: Option = None; +let mut value: Option = None; +d.for_each_element(|d, x| match x { +b"Name" => { +if name.is_some() { return Err(DeError::DuplicateField); } +name = Some(d.content()?); +Ok(()) +} +b"Value" => { +if value.is_some() { return Err(DeError::DuplicateField); } +value = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +name, +value, +}) +} } impl SerializeContent for MetadataTableConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("S3TablesDestination", &self.s3_tables_destination)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("S3TablesDestination", &self.s3_tables_destination)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetadataTableConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3_tables_destination: Option = None; - d.for_each_element(|d, x| match x { - b"S3TablesDestination" => { - if s3_tables_destination.is_some() { - return Err(DeError::DuplicateField); - } - s3_tables_destination = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - s3_tables_destination: s3_tables_destination.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3_tables_destination: Option = None; +d.for_each_element(|d, x| match x { +b"S3TablesDestination" => { +if s3_tables_destination.is_some() { return Err(DeError::DuplicateField); } +s3_tables_destination = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3_tables_destination: s3_tables_destination.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for MetadataTableConfigurationResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("S3TablesDestinationResult", &self.s3_tables_destination_result)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("S3TablesDestinationResult", &self.s3_tables_destination_result)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetadataTableConfigurationResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3_tables_destination_result: Option = None; - d.for_each_element(|d, x| match x { - b"S3TablesDestinationResult" => { - if s3_tables_destination_result.is_some() { - return Err(DeError::DuplicateField); - } - s3_tables_destination_result = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - s3_tables_destination_result: s3_tables_destination_result.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3_tables_destination_result: Option = None; +d.for_each_element(|d, x| match x { +b"S3TablesDestinationResult" => { +if s3_tables_destination_result.is_some() { return Err(DeError::DuplicateField); } +s3_tables_destination_result = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3_tables_destination_result: s3_tables_destination_result.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Metrics { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.event_threshold { - s.content("EventThreshold", val)?; - } - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.event_threshold { +s.content("EventThreshold", val)?; +} +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Metrics { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut event_threshold: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"EventThreshold" => { - if event_threshold.is_some() { - return Err(DeError::DuplicateField); - } - event_threshold = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - event_threshold, - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut event_threshold: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"EventThreshold" => { +if event_threshold.is_some() { return Err(DeError::DuplicateField); } +event_threshold = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +event_threshold, +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for MetricsAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.access_point_arn { - s.content("AccessPointArn", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.access_point_arn { +s.content("AccessPointArn", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetricsAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_point_arn: Option = None; - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"AccessPointArn" => { - if access_point_arn.is_some() { - return Err(DeError::DuplicateField); - } - access_point_arn = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_point_arn, - prefix, - tags, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_point_arn: Option = None; +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"AccessPointArn" => { +if access_point_arn.is_some() { return Err(DeError::DuplicateField); } +access_point_arn = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_point_arn, +prefix, +tags, +}) +} } impl SerializeContent for MetricsConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - s.content("Id", &self.id)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +s.content("Id", &self.id)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetricsConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut filter: Option = None; - let mut id: Option = None; - d.for_each_element(|d, x| match x { - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - filter, - id: id.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut filter: Option = None; +let mut id: Option = None; +d.for_each_element(|d, x| match x { +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +filter, +id: id.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for MetricsFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - match self { - Self::AccessPointArn(x) => s.content("AccessPointArn", x), - Self::And(x) => s.content("And", x), - Self::Prefix(x) => s.content("Prefix", x), - Self::Tag(x) => s.content("Tag", x), - } - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +match self { +Self::AccessPointArn(x) => s.content("AccessPointArn", x), +Self::And(x) => s.content("And", x), +Self::Prefix(x) => s.content("Prefix", x), +Self::Tag(x) => s.content("Tag", x), +} +} } impl<'xml> DeserializeContent<'xml> for MetricsFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.element(|d, x| match x { - b"AccessPointArn" => Ok(Self::AccessPointArn(d.content()?)), - b"And" => Ok(Self::And(d.content()?)), - b"Prefix" => Ok(Self::Prefix(d.content()?)), - b"Tag" => Ok(Self::Tag(d.content()?)), - _ => Err(DeError::UnexpectedTagName), - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.element(|d, x| match x { +b"AccessPointArn" => Ok(Self::AccessPointArn(d.content()?)), +b"And" => Ok(Self::And(d.content()?)), +b"Prefix" => Ok(Self::Prefix(d.content()?)), +b"Tag" => Ok(Self::Tag(d.content()?)), +_ => Err(DeError::UnexpectedTagName) +}) +} } impl SerializeContent for MetricsStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for MetricsStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(MetricsStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(MetricsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(MetricsStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(MetricsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for MultipartUpload { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_algorithm { - s.content("ChecksumAlgorithm", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.initiated { - s.timestamp("Initiated", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.initiator { - s.content("Initiator", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - if let Some(ref val) = self.upload_id { - s.content("UploadId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_algorithm { +s.content("ChecksumAlgorithm", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.initiated { +s.timestamp("Initiated", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.initiator { +s.content("Initiator", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +if let Some(ref val) = self.upload_id { +s.content("UploadId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MultipartUpload { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_algorithm: Option = None; - let mut checksum_type: Option = None; - let mut initiated: Option = None; - let mut initiator: Option = None; - let mut key: Option = None; - let mut owner: Option = None; - let mut storage_class: Option = None; - let mut upload_id: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumAlgorithm" => { - if checksum_algorithm.is_some() { - return Err(DeError::DuplicateField); - } - checksum_algorithm = Some(d.content()?); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - b"Initiated" => { - if initiated.is_some() { - return Err(DeError::DuplicateField); - } - initiated = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Initiator" => { - if initiator.is_some() { - return Err(DeError::DuplicateField); - } - initiator = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - b"UploadId" => { - if upload_id.is_some() { - return Err(DeError::DuplicateField); - } - upload_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_algorithm, - checksum_type, - initiated, - initiator, - key, - owner, - storage_class, - upload_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_algorithm: Option = None; +let mut checksum_type: Option = None; +let mut initiated: Option = None; +let mut initiator: Option = None; +let mut key: Option = None; +let mut owner: Option = None; +let mut storage_class: Option = None; +let mut upload_id: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumAlgorithm" => { +if checksum_algorithm.is_some() { return Err(DeError::DuplicateField); } +checksum_algorithm = Some(d.content()?); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +b"Initiated" => { +if initiated.is_some() { return Err(DeError::DuplicateField); } +initiated = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Initiator" => { +if initiator.is_some() { return Err(DeError::DuplicateField); } +initiator = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +b"UploadId" => { +if upload_id.is_some() { return Err(DeError::DuplicateField); } +upload_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_algorithm, +checksum_type, +initiated, +initiator, +key, +owner, +storage_class, +upload_id, +}) +} +} +impl SerializeContent for NoncurrentVersionExpiration { +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.newer_noncurrent_versions { +s.content("NewerNoncurrentVersions", val)?; +} +if let Some(ref val) = self.noncurrent_days { +s.content("NoncurrentDays", val)?; +} +Ok(()) } -impl SerializeContent for NoncurrentVersionExpiration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.newer_noncurrent_versions { - s.content("NewerNoncurrentVersions", val)?; - } - if let Some(ref val) = self.noncurrent_days { - s.content("NoncurrentDays", val)?; - } - Ok(()) - } } impl<'xml> DeserializeContent<'xml> for NoncurrentVersionExpiration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut newer_noncurrent_versions: Option = None; - let mut noncurrent_days: Option = None; - d.for_each_element(|d, x| match x { - b"NewerNoncurrentVersions" => { - if newer_noncurrent_versions.is_some() { - return Err(DeError::DuplicateField); - } - newer_noncurrent_versions = Some(d.content()?); - Ok(()) - } - b"NoncurrentDays" => { - if noncurrent_days.is_some() { - return Err(DeError::DuplicateField); - } - noncurrent_days = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - newer_noncurrent_versions, - noncurrent_days, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut newer_noncurrent_versions: Option = None; +let mut noncurrent_days: Option = None; +d.for_each_element(|d, x| match x { +b"NewerNoncurrentVersions" => { +if newer_noncurrent_versions.is_some() { return Err(DeError::DuplicateField); } +newer_noncurrent_versions = Some(d.content()?); +Ok(()) +} +b"NoncurrentDays" => { +if noncurrent_days.is_some() { return Err(DeError::DuplicateField); } +noncurrent_days = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +newer_noncurrent_versions, +noncurrent_days, +}) +} } impl SerializeContent for NoncurrentVersionTransition { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.newer_noncurrent_versions { - s.content("NewerNoncurrentVersions", val)?; - } - if let Some(ref val) = self.noncurrent_days { - s.content("NoncurrentDays", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.newer_noncurrent_versions { +s.content("NewerNoncurrentVersions", val)?; +} +if let Some(ref val) = self.noncurrent_days { +s.content("NoncurrentDays", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for NoncurrentVersionTransition { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut newer_noncurrent_versions: Option = None; - let mut noncurrent_days: Option = None; - let mut storage_class: Option = None; - d.for_each_element(|d, x| match x { - b"NewerNoncurrentVersions" => { - if newer_noncurrent_versions.is_some() { - return Err(DeError::DuplicateField); - } - newer_noncurrent_versions = Some(d.content()?); - Ok(()) - } - b"NoncurrentDays" => { - if noncurrent_days.is_some() { - return Err(DeError::DuplicateField); - } - noncurrent_days = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - newer_noncurrent_versions, - noncurrent_days, - storage_class, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut newer_noncurrent_versions: Option = None; +let mut noncurrent_days: Option = None; +let mut storage_class: Option = None; +d.for_each_element(|d, x| match x { +b"NewerNoncurrentVersions" => { +if newer_noncurrent_versions.is_some() { return Err(DeError::DuplicateField); } +newer_noncurrent_versions = Some(d.content()?); +Ok(()) +} +b"NoncurrentDays" => { +if noncurrent_days.is_some() { return Err(DeError::DuplicateField); } +noncurrent_days = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +newer_noncurrent_versions, +noncurrent_days, +storage_class, +}) +} } impl SerializeContent for NotificationConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.event_bridge_configuration { - s.content("EventBridgeConfiguration", val)?; - } - if let Some(iter) = &self.lambda_function_configurations { - s.flattened_list("CloudFunctionConfiguration", iter)?; - } - if let Some(iter) = &self.queue_configurations { - s.flattened_list("QueueConfiguration", iter)?; - } - if let Some(iter) = &self.topic_configurations { - s.flattened_list("TopicConfiguration", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.event_bridge_configuration { +s.content("EventBridgeConfiguration", val)?; +} +if let Some(iter) = &self.lambda_function_configurations { +s.flattened_list("CloudFunctionConfiguration", iter)?; +} +if let Some(iter) = &self.queue_configurations { +s.flattened_list("QueueConfiguration", iter)?; +} +if let Some(iter) = &self.topic_configurations { +s.flattened_list("TopicConfiguration", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for NotificationConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut event_bridge_configuration: Option = None; - let mut lambda_function_configurations: Option = None; - let mut queue_configurations: Option = None; - let mut topic_configurations: Option = None; - d.for_each_element(|d, x| match x { - b"EventBridgeConfiguration" => { - if event_bridge_configuration.is_some() { - return Err(DeError::DuplicateField); - } - event_bridge_configuration = Some(d.content()?); - Ok(()) - } - b"CloudFunctionConfiguration" => { - let ans: LambdaFunctionConfiguration = d.content()?; - lambda_function_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"QueueConfiguration" => { - let ans: QueueConfiguration = d.content()?; - queue_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"TopicConfiguration" => { - let ans: TopicConfiguration = d.content()?; - topic_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - event_bridge_configuration, - lambda_function_configurations, - queue_configurations, - topic_configurations, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut event_bridge_configuration: Option = None; +let mut lambda_function_configurations: Option = None; +let mut queue_configurations: Option = None; +let mut topic_configurations: Option = None; +d.for_each_element(|d, x| match x { +b"EventBridgeConfiguration" => { +if event_bridge_configuration.is_some() { return Err(DeError::DuplicateField); } +event_bridge_configuration = Some(d.content()?); +Ok(()) +} +b"CloudFunctionConfiguration" => { +let ans: LambdaFunctionConfiguration = d.content()?; +lambda_function_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"QueueConfiguration" => { +let ans: QueueConfiguration = d.content()?; +queue_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"TopicConfiguration" => { +let ans: TopicConfiguration = d.content()?; +topic_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +event_bridge_configuration, +lambda_function_configurations, +queue_configurations, +topic_configurations, +}) +} } impl SerializeContent for NotificationConfigurationFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.key { - s.content("S3Key", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.key { +s.content("S3Key", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for NotificationConfigurationFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut key: Option = None; - d.for_each_element(|d, x| match x { - b"S3Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { key }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut key: Option = None; +d.for_each_element(|d, x| match x { +b"S3Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +key, +}) +} } impl SerializeContent for Object { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.checksum_algorithm { - s.flattened_list("ChecksumAlgorithm", iter)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.restore_status { - s.content("RestoreStatus", val)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.checksum_algorithm { +s.flattened_list("ChecksumAlgorithm", iter)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.restore_status { +s.content("RestoreStatus", val)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Object { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_algorithm: Option = None; - let mut checksum_type: Option = None; - let mut e_tag: Option = None; - let mut key: Option = None; - let mut last_modified: Option = None; - let mut owner: Option = None; - let mut restore_status: Option = None; - let mut size: Option = None; - let mut storage_class: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumAlgorithm" => { - let ans: ChecksumAlgorithm = d.content()?; - checksum_algorithm.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"RestoreStatus" => { - if restore_status.is_some() { - return Err(DeError::DuplicateField); - } - restore_status = Some(d.content()?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_algorithm, - checksum_type, - e_tag, - key, - last_modified, - owner, - restore_status, - size, - storage_class, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_algorithm: Option = None; +let mut checksum_type: Option = None; +let mut e_tag: Option = None; +let mut key: Option = None; +let mut last_modified: Option = None; +let mut owner: Option = None; +let mut restore_status: Option = None; +let mut size: Option = None; +let mut storage_class: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumAlgorithm" => { +let ans: ChecksumAlgorithm = d.content()?; +checksum_algorithm.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"RestoreStatus" => { +if restore_status.is_some() { return Err(DeError::DuplicateField); } +restore_status = Some(d.content()?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_algorithm, +checksum_type, +e_tag, +key, +last_modified, +owner, +restore_status, +size, +storage_class, +}) +} } impl SerializeContent for ObjectCannedACL { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectCannedACL { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"authenticated-read" => Ok(Self::from_static(ObjectCannedACL::AUTHENTICATED_READ)), - b"aws-exec-read" => Ok(Self::from_static(ObjectCannedACL::AWS_EXEC_READ)), - b"bucket-owner-full-control" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_FULL_CONTROL)), - b"bucket-owner-read" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_READ)), - b"private" => Ok(Self::from_static(ObjectCannedACL::PRIVATE)), - b"public-read" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ)), - b"public-read-write" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ_WRITE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"authenticated-read" => Ok(Self::from_static(ObjectCannedACL::AUTHENTICATED_READ)), +b"aws-exec-read" => Ok(Self::from_static(ObjectCannedACL::AWS_EXEC_READ)), +b"bucket-owner-full-control" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_FULL_CONTROL)), +b"bucket-owner-read" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_READ)), +b"private" => Ok(Self::from_static(ObjectCannedACL::PRIVATE)), +b"public-read" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ)), +b"public-read-write" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ_WRITE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for ObjectIdentifier { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - s.content("Key", &self.key)?; - if let Some(ref val) = self.last_modified_time { - s.timestamp("LastModifiedTime", val, TimestampFormat::HttpDate)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +s.content("Key", &self.key)?; +if let Some(ref val) = self.last_modified_time { +s.timestamp("LastModifiedTime", val, TimestampFormat::HttpDate)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectIdentifier { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut e_tag: Option = None; - let mut key: Option = None; - let mut last_modified_time: Option = None; - let mut size: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"LastModifiedTime" => { - if last_modified_time.is_some() { - return Err(DeError::DuplicateField); - } - last_modified_time = Some(d.timestamp(TimestampFormat::HttpDate)?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - e_tag, - key: key.ok_or(DeError::MissingField)?, - last_modified_time, - size, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut e_tag: Option = None; +let mut key: Option = None; +let mut last_modified_time: Option = None; +let mut size: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"LastModifiedTime" => { +if last_modified_time.is_some() { return Err(DeError::DuplicateField); } +last_modified_time = Some(d.timestamp(TimestampFormat::HttpDate)?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +e_tag, +key: key.ok_or(DeError::MissingField)?, +last_modified_time, +size, +version_id, +}) +} } impl SerializeContent for ObjectLockConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.object_lock_enabled { - s.content("ObjectLockEnabled", val)?; - } - if let Some(ref val) = self.rule { - s.content("Rule", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.object_lock_enabled { +s.content("ObjectLockEnabled", val)?; +} +if let Some(ref val) = self.rule { +s.content("Rule", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut object_lock_enabled: Option = None; - let mut rule: Option = None; - d.for_each_element(|d, x| match x { - b"ObjectLockEnabled" => { - if object_lock_enabled.is_some() { - return Err(DeError::DuplicateField); - } - object_lock_enabled = Some(d.content()?); - Ok(()) - } - b"Rule" => { - if rule.is_some() { - return Err(DeError::DuplicateField); - } - rule = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - object_lock_enabled, - rule, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut object_lock_enabled: Option = None; +let mut rule: Option = None; +d.for_each_element(|d, x| match x { +b"ObjectLockEnabled" => { +if object_lock_enabled.is_some() { return Err(DeError::DuplicateField); } +object_lock_enabled = Some(d.content()?); +Ok(()) +} +b"Rule" => { +if rule.is_some() { return Err(DeError::DuplicateField); } +rule = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +object_lock_enabled, +rule, +}) +} } impl SerializeContent for ObjectLockEnabled { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockEnabled { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Enabled" => Ok(Self::from_static(ObjectLockEnabled::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Enabled" => Ok(Self::from_static(ObjectLockEnabled::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ObjectLockLegalHold { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockLegalHold { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status, +}) +} } impl SerializeContent for ObjectLockLegalHoldStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockLegalHoldStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"OFF" => Ok(Self::from_static(ObjectLockLegalHoldStatus::OFF)), - b"ON" => Ok(Self::from_static(ObjectLockLegalHoldStatus::ON)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"OFF" => Ok(Self::from_static(ObjectLockLegalHoldStatus::OFF)), +b"ON" => Ok(Self::from_static(ObjectLockLegalHoldStatus::ON)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ObjectLockRetention { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.mode { - s.content("Mode", val)?; - } - if let Some(ref val) = self.retain_until_date { - s.timestamp("RetainUntilDate", val, TimestampFormat::DateTime)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.mode { +s.content("Mode", val)?; +} +if let Some(ref val) = self.retain_until_date { +s.timestamp("RetainUntilDate", val, TimestampFormat::DateTime)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockRetention { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut mode: Option = None; - let mut retain_until_date: Option = None; - d.for_each_element(|d, x| match x { - b"Mode" => { - if mode.is_some() { - return Err(DeError::DuplicateField); - } - mode = Some(d.content()?); - Ok(()) - } - b"RetainUntilDate" => { - if retain_until_date.is_some() { - return Err(DeError::DuplicateField); - } - retain_until_date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { mode, retain_until_date }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut mode: Option = None; +let mut retain_until_date: Option = None; +d.for_each_element(|d, x| match x { +b"Mode" => { +if mode.is_some() { return Err(DeError::DuplicateField); } +mode = Some(d.content()?); +Ok(()) +} +b"RetainUntilDate" => { +if retain_until_date.is_some() { return Err(DeError::DuplicateField); } +retain_until_date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +mode, +retain_until_date, +}) +} } impl SerializeContent for ObjectLockRetentionMode { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockRetentionMode { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"COMPLIANCE" => Ok(Self::from_static(ObjectLockRetentionMode::COMPLIANCE)), - b"GOVERNANCE" => Ok(Self::from_static(ObjectLockRetentionMode::GOVERNANCE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"COMPLIANCE" => Ok(Self::from_static(ObjectLockRetentionMode::COMPLIANCE)), +b"GOVERNANCE" => Ok(Self::from_static(ObjectLockRetentionMode::GOVERNANCE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ObjectLockRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.default_retention { - s.content("DefaultRetention", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.default_retention { +s.content("DefaultRetention", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut default_retention: Option = None; - d.for_each_element(|d, x| match x { - b"DefaultRetention" => { - if default_retention.is_some() { - return Err(DeError::DuplicateField); - } - default_retention = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { default_retention }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut default_retention: Option = None; +d.for_each_element(|d, x| match x { +b"DefaultRetention" => { +if default_retention.is_some() { return Err(DeError::DuplicateField); } +default_retention = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +default_retention, +}) +} } impl SerializeContent for ObjectOwnership { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectOwnership { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"BucketOwnerEnforced" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_ENFORCED)), - b"BucketOwnerPreferred" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_PREFERRED)), - b"ObjectWriter" => Ok(Self::from_static(ObjectOwnership::OBJECT_WRITER)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"BucketOwnerEnforced" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_ENFORCED)), +b"BucketOwnerPreferred" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_PREFERRED)), +b"ObjectWriter" => Ok(Self::from_static(ObjectOwnership::OBJECT_WRITER)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ObjectPart { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.part_number { - s.content("PartNumber", val)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.part_number { +s.content("PartNumber", val)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectPart { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut part_number: Option = None; - let mut size: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"PartNumber" => { - if part_number.is_some() { - return Err(DeError::DuplicateField); - } - part_number = Some(d.content()?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - part_number, - size, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut part_number: Option = None; +let mut size: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"PartNumber" => { +if part_number.is_some() { return Err(DeError::DuplicateField); } +part_number = Some(d.content()?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +part_number, +size, +}) +} } impl SerializeContent for ObjectStorageClass { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectStorageClass { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DEEP_ARCHIVE" => Ok(Self::from_static(ObjectStorageClass::DEEP_ARCHIVE)), - b"EXPRESS_ONEZONE" => Ok(Self::from_static(ObjectStorageClass::EXPRESS_ONEZONE)), - b"GLACIER" => Ok(Self::from_static(ObjectStorageClass::GLACIER)), - b"GLACIER_IR" => Ok(Self::from_static(ObjectStorageClass::GLACIER_IR)), - b"INTELLIGENT_TIERING" => Ok(Self::from_static(ObjectStorageClass::INTELLIGENT_TIERING)), - b"ONEZONE_IA" => Ok(Self::from_static(ObjectStorageClass::ONEZONE_IA)), - b"OUTPOSTS" => Ok(Self::from_static(ObjectStorageClass::OUTPOSTS)), - b"REDUCED_REDUNDANCY" => Ok(Self::from_static(ObjectStorageClass::REDUCED_REDUNDANCY)), - b"SNOW" => Ok(Self::from_static(ObjectStorageClass::SNOW)), - b"STANDARD" => Ok(Self::from_static(ObjectStorageClass::STANDARD)), - b"STANDARD_IA" => Ok(Self::from_static(ObjectStorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DEEP_ARCHIVE" => Ok(Self::from_static(ObjectStorageClass::DEEP_ARCHIVE)), +b"EXPRESS_ONEZONE" => Ok(Self::from_static(ObjectStorageClass::EXPRESS_ONEZONE)), +b"GLACIER" => Ok(Self::from_static(ObjectStorageClass::GLACIER)), +b"GLACIER_IR" => Ok(Self::from_static(ObjectStorageClass::GLACIER_IR)), +b"INTELLIGENT_TIERING" => Ok(Self::from_static(ObjectStorageClass::INTELLIGENT_TIERING)), +b"ONEZONE_IA" => Ok(Self::from_static(ObjectStorageClass::ONEZONE_IA)), +b"OUTPOSTS" => Ok(Self::from_static(ObjectStorageClass::OUTPOSTS)), +b"REDUCED_REDUNDANCY" => Ok(Self::from_static(ObjectStorageClass::REDUCED_REDUNDANCY)), +b"SNOW" => Ok(Self::from_static(ObjectStorageClass::SNOW)), +b"STANDARD" => Ok(Self::from_static(ObjectStorageClass::STANDARD)), +b"STANDARD_IA" => Ok(Self::from_static(ObjectStorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for ObjectVersion { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.checksum_algorithm { - s.flattened_list("ChecksumAlgorithm", iter)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.is_latest { - s.content("IsLatest", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.restore_status { - s.content("RestoreStatus", val)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.checksum_algorithm { +s.flattened_list("ChecksumAlgorithm", iter)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.is_latest { +s.content("IsLatest", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.restore_status { +s.content("RestoreStatus", val)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectVersion { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_algorithm: Option = None; - let mut checksum_type: Option = None; - let mut e_tag: Option = None; - let mut is_latest: Option = None; - let mut key: Option = None; - let mut last_modified: Option = None; - let mut owner: Option = None; - let mut restore_status: Option = None; - let mut size: Option = None; - let mut storage_class: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumAlgorithm" => { - let ans: ChecksumAlgorithm = d.content()?; - checksum_algorithm.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"IsLatest" => { - if is_latest.is_some() { - return Err(DeError::DuplicateField); - } - is_latest = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"RestoreStatus" => { - if restore_status.is_some() { - return Err(DeError::DuplicateField); - } - restore_status = Some(d.content()?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_algorithm, - checksum_type, - e_tag, - is_latest, - key, - last_modified, - owner, - restore_status, - size, - storage_class, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_algorithm: Option = None; +let mut checksum_type: Option = None; +let mut e_tag: Option = None; +let mut is_latest: Option = None; +let mut key: Option = None; +let mut last_modified: Option = None; +let mut owner: Option = None; +let mut restore_status: Option = None; +let mut size: Option = None; +let mut storage_class: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumAlgorithm" => { +let ans: ChecksumAlgorithm = d.content()?; +checksum_algorithm.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"IsLatest" => { +if is_latest.is_some() { return Err(DeError::DuplicateField); } +is_latest = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"RestoreStatus" => { +if restore_status.is_some() { return Err(DeError::DuplicateField); } +restore_status = Some(d.content()?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_algorithm, +checksum_type, +e_tag, +is_latest, +key, +last_modified, +owner, +restore_status, +size, +storage_class, +version_id, +}) +} } impl SerializeContent for ObjectVersionStorageClass { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectVersionStorageClass { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"STANDARD" => Ok(Self::from_static(ObjectVersionStorageClass::STANDARD)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"STANDARD" => Ok(Self::from_static(ObjectVersionStorageClass::STANDARD)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for OutputLocation { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.s3 { - s.content("S3", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.s3 { +s.content("S3", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for OutputLocation { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3: Option = None; - d.for_each_element(|d, x| match x { - b"S3" => { - if s3.is_some() { - return Err(DeError::DuplicateField); - } - s3 = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { s3 }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3: Option = None; +d.for_each_element(|d, x| match x { +b"S3" => { +if s3.is_some() { return Err(DeError::DuplicateField); } +s3 = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3, +}) +} } impl SerializeContent for OutputSerialization { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.csv { - s.content("CSV", val)?; - } - if let Some(ref val) = self.json { - s.content("JSON", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.csv { +s.content("CSV", val)?; +} +if let Some(ref val) = self.json { +s.content("JSON", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for OutputSerialization { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut csv: Option = None; - let mut json: Option = None; - d.for_each_element(|d, x| match x { - b"CSV" => { - if csv.is_some() { - return Err(DeError::DuplicateField); - } - csv = Some(d.content()?); - Ok(()) - } - b"JSON" => { - if json.is_some() { - return Err(DeError::DuplicateField); - } - json = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { csv, json }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut csv: Option = None; +let mut json: Option = None; +d.for_each_element(|d, x| match x { +b"CSV" => { +if csv.is_some() { return Err(DeError::DuplicateField); } +csv = Some(d.content()?); +Ok(()) +} +b"JSON" => { +if json.is_some() { return Err(DeError::DuplicateField); } +json = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +csv, +json, +}) +} } impl SerializeContent for Owner { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.display_name { - s.content("DisplayName", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.display_name { +s.content("DisplayName", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Owner { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut display_name: Option = None; - let mut id: Option = None; - d.for_each_element(|d, x| match x { - b"DisplayName" => { - if display_name.is_some() { - return Err(DeError::DuplicateField); - } - display_name = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { display_name, id }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut display_name: Option = None; +let mut id: Option = None; +d.for_each_element(|d, x| match x { +b"DisplayName" => { +if display_name.is_some() { return Err(DeError::DuplicateField); } +display_name = Some(d.content()?); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +display_name, +id, +}) +} } impl SerializeContent for OwnerOverride { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for OwnerOverride { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Destination" => Ok(Self::from_static(OwnerOverride::DESTINATION)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Destination" => Ok(Self::from_static(OwnerOverride::DESTINATION)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for OwnershipControls { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.rules; - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.rules; +s.flattened_list("Rule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for OwnershipControls { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut rules: Option = None; - d.for_each_element(|d, x| match x { - b"Rule" => { - let ans: OwnershipControlsRule = d.content()?; - rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - rules: rules.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut rules: Option = None; +d.for_each_element(|d, x| match x { +b"Rule" => { +let ans: OwnershipControlsRule = d.content()?; +rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +rules: rules.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for OwnershipControlsRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("ObjectOwnership", &self.object_ownership)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("ObjectOwnership", &self.object_ownership)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for OwnershipControlsRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut object_ownership: Option = None; - d.for_each_element(|d, x| match x { - b"ObjectOwnership" => { - if object_ownership.is_some() { - return Err(DeError::DuplicateField); - } - object_ownership = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - object_ownership: object_ownership.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut object_ownership: Option = None; +d.for_each_element(|d, x| match x { +b"ObjectOwnership" => { +if object_ownership.is_some() { return Err(DeError::DuplicateField); } +object_ownership = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +object_ownership: object_ownership.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ParquetInput { - fn serialize_content(&self, _: &mut Serializer) -> SerResult { - Ok(()) - } +fn serialize_content(&self, _: &mut Serializer) -> SerResult { +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ParquetInput { - fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { - Ok(Self {}) - } +fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { +Ok(Self { +}) +} } impl SerializeContent for Part { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.part_number { - s.content("PartNumber", val)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.part_number { +s.content("PartNumber", val)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Part { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut e_tag: Option = None; - let mut last_modified: Option = None; - let mut part_number: Option = None; - let mut size: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"PartNumber" => { - if part_number.is_some() { - return Err(DeError::DuplicateField); - } - part_number = Some(d.content()?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - e_tag, - last_modified, - part_number, - size, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut e_tag: Option = None; +let mut last_modified: Option = None; +let mut part_number: Option = None; +let mut size: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"PartNumber" => { +if part_number.is_some() { return Err(DeError::DuplicateField); } +part_number = Some(d.content()?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +e_tag, +last_modified, +part_number, +size, +}) +} } impl SerializeContent for PartitionDateSource { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for PartitionDateSource { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DeliveryTime" => Ok(Self::from_static(PartitionDateSource::DELIVERY_TIME)), - b"EventTime" => Ok(Self::from_static(PartitionDateSource::EVENT_TIME)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DeliveryTime" => Ok(Self::from_static(PartitionDateSource::DELIVERY_TIME)), +b"EventTime" => Ok(Self::from_static(PartitionDateSource::EVENT_TIME)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for PartitionedPrefix { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.partition_date_source { - s.content("PartitionDateSource", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.partition_date_source { +s.content("PartitionDateSource", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for PartitionedPrefix { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut partition_date_source: Option = None; - d.for_each_element(|d, x| match x { - b"PartitionDateSource" => { - if partition_date_source.is_some() { - return Err(DeError::DuplicateField); - } - partition_date_source = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { partition_date_source }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut partition_date_source: Option = None; +d.for_each_element(|d, x| match x { +b"PartitionDateSource" => { +if partition_date_source.is_some() { return Err(DeError::DuplicateField); } +partition_date_source = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +partition_date_source, +}) +} } impl SerializeContent for Payer { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Payer { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"BucketOwner" => Ok(Self::from_static(Payer::BUCKET_OWNER)), - b"Requester" => Ok(Self::from_static(Payer::REQUESTER)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"BucketOwner" => Ok(Self::from_static(Payer::BUCKET_OWNER)), +b"Requester" => Ok(Self::from_static(Payer::REQUESTER)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Permission { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Permission { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"FULL_CONTROL" => Ok(Self::from_static(Permission::FULL_CONTROL)), - b"READ" => Ok(Self::from_static(Permission::READ)), - b"READ_ACP" => Ok(Self::from_static(Permission::READ_ACP)), - b"WRITE" => Ok(Self::from_static(Permission::WRITE)), - b"WRITE_ACP" => Ok(Self::from_static(Permission::WRITE_ACP)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"FULL_CONTROL" => Ok(Self::from_static(Permission::FULL_CONTROL)), +b"READ" => Ok(Self::from_static(Permission::READ)), +b"READ_ACP" => Ok(Self::from_static(Permission::READ_ACP)), +b"WRITE" => Ok(Self::from_static(Permission::WRITE)), +b"WRITE_ACP" => Ok(Self::from_static(Permission::WRITE_ACP)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for PolicyStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.is_public { - s.content("IsPublic", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.is_public { +s.content("IsPublic", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for PolicyStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut is_public: Option = None; - d.for_each_element(|d, x| match x { - b"IsPublic" => { - if is_public.is_some() { - return Err(DeError::DuplicateField); - } - is_public = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { is_public }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut is_public: Option = None; +d.for_each_element(|d, x| match x { +b"IsPublic" => { +if is_public.is_some() { return Err(DeError::DuplicateField); } +is_public = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +is_public, +}) +} } impl SerializeContent for Progress { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bytes_processed { - s.content("BytesProcessed", val)?; - } - if let Some(ref val) = self.bytes_returned { - s.content("BytesReturned", val)?; - } - if let Some(ref val) = self.bytes_scanned { - s.content("BytesScanned", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bytes_processed { +s.content("BytesProcessed", val)?; +} +if let Some(ref val) = self.bytes_returned { +s.content("BytesReturned", val)?; +} +if let Some(ref val) = self.bytes_scanned { +s.content("BytesScanned", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Progress { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bytes_processed: Option = None; - let mut bytes_returned: Option = None; - let mut bytes_scanned: Option = None; - d.for_each_element(|d, x| match x { - b"BytesProcessed" => { - if bytes_processed.is_some() { - return Err(DeError::DuplicateField); - } - bytes_processed = Some(d.content()?); - Ok(()) - } - b"BytesReturned" => { - if bytes_returned.is_some() { - return Err(DeError::DuplicateField); - } - bytes_returned = Some(d.content()?); - Ok(()) - } - b"BytesScanned" => { - if bytes_scanned.is_some() { - return Err(DeError::DuplicateField); - } - bytes_scanned = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bytes_processed, - bytes_returned, - bytes_scanned, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bytes_processed: Option = None; +let mut bytes_returned: Option = None; +let mut bytes_scanned: Option = None; +d.for_each_element(|d, x| match x { +b"BytesProcessed" => { +if bytes_processed.is_some() { return Err(DeError::DuplicateField); } +bytes_processed = Some(d.content()?); +Ok(()) +} +b"BytesReturned" => { +if bytes_returned.is_some() { return Err(DeError::DuplicateField); } +bytes_returned = Some(d.content()?); +Ok(()) +} +b"BytesScanned" => { +if bytes_scanned.is_some() { return Err(DeError::DuplicateField); } +bytes_scanned = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bytes_processed, +bytes_returned, +bytes_scanned, +}) +} } impl SerializeContent for Protocol { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Protocol { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"http" => Ok(Self::from_static(Protocol::HTTP)), - b"https" => Ok(Self::from_static(Protocol::HTTPS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"http" => Ok(Self::from_static(Protocol::HTTP)), +b"https" => Ok(Self::from_static(Protocol::HTTPS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for PublicAccessBlockConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.block_public_acls { - s.content("BlockPublicAcls", val)?; - } - if let Some(ref val) = self.block_public_policy { - s.content("BlockPublicPolicy", val)?; - } - if let Some(ref val) = self.ignore_public_acls { - s.content("IgnorePublicAcls", val)?; - } - if let Some(ref val) = self.restrict_public_buckets { - s.content("RestrictPublicBuckets", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.block_public_acls { +s.content("BlockPublicAcls", val)?; +} +if let Some(ref val) = self.block_public_policy { +s.content("BlockPublicPolicy", val)?; +} +if let Some(ref val) = self.ignore_public_acls { +s.content("IgnorePublicAcls", val)?; +} +if let Some(ref val) = self.restrict_public_buckets { +s.content("RestrictPublicBuckets", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for PublicAccessBlockConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut block_public_acls: Option = None; - let mut block_public_policy: Option = None; - let mut ignore_public_acls: Option = None; - let mut restrict_public_buckets: Option = None; - d.for_each_element(|d, x| match x { - b"BlockPublicAcls" => { - if block_public_acls.is_some() { - return Err(DeError::DuplicateField); - } - block_public_acls = Some(d.content()?); - Ok(()) - } - b"BlockPublicPolicy" => { - if block_public_policy.is_some() { - return Err(DeError::DuplicateField); - } - block_public_policy = Some(d.content()?); - Ok(()) - } - b"IgnorePublicAcls" => { - if ignore_public_acls.is_some() { - return Err(DeError::DuplicateField); - } - ignore_public_acls = Some(d.content()?); - Ok(()) - } - b"RestrictPublicBuckets" => { - if restrict_public_buckets.is_some() { - return Err(DeError::DuplicateField); - } - restrict_public_buckets = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - block_public_acls, - block_public_policy, - ignore_public_acls, - restrict_public_buckets, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut block_public_acls: Option = None; +let mut block_public_policy: Option = None; +let mut ignore_public_acls: Option = None; +let mut restrict_public_buckets: Option = None; +d.for_each_element(|d, x| match x { +b"BlockPublicAcls" => { +if block_public_acls.is_some() { return Err(DeError::DuplicateField); } +block_public_acls = Some(d.content()?); +Ok(()) +} +b"BlockPublicPolicy" => { +if block_public_policy.is_some() { return Err(DeError::DuplicateField); } +block_public_policy = Some(d.content()?); +Ok(()) +} +b"IgnorePublicAcls" => { +if ignore_public_acls.is_some() { return Err(DeError::DuplicateField); } +ignore_public_acls = Some(d.content()?); +Ok(()) +} +b"RestrictPublicBuckets" => { +if restrict_public_buckets.is_some() { return Err(DeError::DuplicateField); } +restrict_public_buckets = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +block_public_acls, +block_public_policy, +ignore_public_acls, +restrict_public_buckets, +}) +} } impl SerializeContent for QueueConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.events; - s.flattened_list("Event", iter)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("Id", val)?; - } - s.content("Queue", &self.queue_arn)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.events; +s.flattened_list("Event", iter)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("Id", val)?; +} +s.content("Queue", &self.queue_arn)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for QueueConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut events: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut queue_arn: Option = None; - d.for_each_element(|d, x| match x { - b"Event" => { - let ans: Event = d.content()?; - events.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"Queue" => { - if queue_arn.is_some() { - return Err(DeError::DuplicateField); - } - queue_arn = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - events: events.ok_or(DeError::MissingField)?, - filter, - id, - queue_arn: queue_arn.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut events: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut queue_arn: Option = None; +d.for_each_element(|d, x| match x { +b"Event" => { +let ans: Event = d.content()?; +events.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"Queue" => { +if queue_arn.is_some() { return Err(DeError::DuplicateField); } +queue_arn = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +events: events.ok_or(DeError::MissingField)?, +filter, +id, +queue_arn: queue_arn.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for QuoteFields { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for QuoteFields { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"ALWAYS" => Ok(Self::from_static(QuoteFields::ALWAYS)), - b"ASNEEDED" => Ok(Self::from_static(QuoteFields::ASNEEDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"ALWAYS" => Ok(Self::from_static(QuoteFields::ALWAYS)), +b"ASNEEDED" => Ok(Self::from_static(QuoteFields::ASNEEDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Redirect { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.host_name { - s.content("HostName", val)?; - } - if let Some(ref val) = self.http_redirect_code { - s.content("HttpRedirectCode", val)?; - } - if let Some(ref val) = self.protocol { - s.content("Protocol", val)?; - } - if let Some(ref val) = self.replace_key_prefix_with { - s.content("ReplaceKeyPrefixWith", val)?; - } - if let Some(ref val) = self.replace_key_with { - s.content("ReplaceKeyWith", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.host_name { +s.content("HostName", val)?; +} +if let Some(ref val) = self.http_redirect_code { +s.content("HttpRedirectCode", val)?; +} +if let Some(ref val) = self.protocol { +s.content("Protocol", val)?; +} +if let Some(ref val) = self.replace_key_prefix_with { +s.content("ReplaceKeyPrefixWith", val)?; +} +if let Some(ref val) = self.replace_key_with { +s.content("ReplaceKeyWith", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Redirect { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut host_name: Option = None; - let mut http_redirect_code: Option = None; - let mut protocol: Option = None; - let mut replace_key_prefix_with: Option = None; - let mut replace_key_with: Option = None; - d.for_each_element(|d, x| match x { - b"HostName" => { - if host_name.is_some() { - return Err(DeError::DuplicateField); - } - host_name = Some(d.content()?); - Ok(()) - } - b"HttpRedirectCode" => { - if http_redirect_code.is_some() { - return Err(DeError::DuplicateField); - } - http_redirect_code = Some(d.content()?); - Ok(()) - } - b"Protocol" => { - if protocol.is_some() { - return Err(DeError::DuplicateField); - } - protocol = Some(d.content()?); - Ok(()) - } - b"ReplaceKeyPrefixWith" => { - if replace_key_prefix_with.is_some() { - return Err(DeError::DuplicateField); - } - replace_key_prefix_with = Some(d.content()?); - Ok(()) - } - b"ReplaceKeyWith" => { - if replace_key_with.is_some() { - return Err(DeError::DuplicateField); - } - replace_key_with = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - host_name, - http_redirect_code, - protocol, - replace_key_prefix_with, - replace_key_with, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut host_name: Option = None; +let mut http_redirect_code: Option = None; +let mut protocol: Option = None; +let mut replace_key_prefix_with: Option = None; +let mut replace_key_with: Option = None; +d.for_each_element(|d, x| match x { +b"HostName" => { +if host_name.is_some() { return Err(DeError::DuplicateField); } +host_name = Some(d.content()?); +Ok(()) +} +b"HttpRedirectCode" => { +if http_redirect_code.is_some() { return Err(DeError::DuplicateField); } +http_redirect_code = Some(d.content()?); +Ok(()) +} +b"Protocol" => { +if protocol.is_some() { return Err(DeError::DuplicateField); } +protocol = Some(d.content()?); +Ok(()) +} +b"ReplaceKeyPrefixWith" => { +if replace_key_prefix_with.is_some() { return Err(DeError::DuplicateField); } +replace_key_prefix_with = Some(d.content()?); +Ok(()) +} +b"ReplaceKeyWith" => { +if replace_key_with.is_some() { return Err(DeError::DuplicateField); } +replace_key_with = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +host_name, +http_redirect_code, +protocol, +replace_key_prefix_with, +replace_key_with, +}) +} } impl SerializeContent for RedirectAllRequestsTo { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("HostName", &self.host_name)?; - if let Some(ref val) = self.protocol { - s.content("Protocol", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("HostName", &self.host_name)?; +if let Some(ref val) = self.protocol { +s.content("Protocol", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RedirectAllRequestsTo { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut host_name: Option = None; - let mut protocol: Option = None; - d.for_each_element(|d, x| match x { - b"HostName" => { - if host_name.is_some() { - return Err(DeError::DuplicateField); - } - host_name = Some(d.content()?); - Ok(()) - } - b"Protocol" => { - if protocol.is_some() { - return Err(DeError::DuplicateField); - } - protocol = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - host_name: host_name.ok_or(DeError::MissingField)?, - protocol, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut host_name: Option = None; +let mut protocol: Option = None; +d.for_each_element(|d, x| match x { +b"HostName" => { +if host_name.is_some() { return Err(DeError::DuplicateField); } +host_name = Some(d.content()?); +Ok(()) +} +b"Protocol" => { +if protocol.is_some() { return Err(DeError::DuplicateField); } +protocol = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +host_name: host_name.ok_or(DeError::MissingField)?, +protocol, +}) +} } impl SerializeContent for ReplicaModifications { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicaModifications { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ReplicaModificationsStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ReplicaModificationsStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ReplicaModificationsStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ReplicaModificationsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ReplicaModificationsStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ReplicaModificationsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} +} +impl SerializeContent for ReplicationConfiguration { +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Role", &self.role)?; +{ +let iter = &self.rules; +s.flattened_list("Rule", iter)?; +} +Ok(()) +} +} + +impl<'xml> DeserializeContent<'xml> for ReplicationConfiguration { +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut role: Option = None; +let mut rules: Option = None; +d.for_each_element(|d, x| match x { +b"Role" => { +if role.is_some() { return Err(DeError::DuplicateField); } +role = Some(d.content()?); +Ok(()) +} +b"Rule" => { +let ans: ReplicationRule = d.content()?; +rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +role: role.ok_or(DeError::MissingField)?, +rules: rules.ok_or(DeError::MissingField)?, +}) +} +} +impl SerializeContent for ReplicationRule { +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.delete_marker_replication { +s.content("DeleteMarkerReplication", val)?; +} +if let Some(ref val) = self.delete_replication { +s.content("DeleteReplication", val)?; +} +s.content("Destination", &self.destination)?; +if let Some(ref val) = self.existing_object_replication { +s.content("ExistingObjectReplication", val)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.priority { +s.content("Priority", val)?; } -impl SerializeContent for ReplicationConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Role", &self.role)?; - { - let iter = &self.rules; - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +if let Some(ref val) = self.source_selection_criteria { +s.content("SourceSelectionCriteria", val)?; } - -impl<'xml> DeserializeContent<'xml> for ReplicationConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut role: Option = None; - let mut rules: Option = None; - d.for_each_element(|d, x| match x { - b"Role" => { - if role.is_some() { - return Err(DeError::DuplicateField); - } - role = Some(d.content()?); - Ok(()) - } - b"Rule" => { - let ans: ReplicationRule = d.content()?; - rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - role: role.ok_or(DeError::MissingField)?, - rules: rules.ok_or(DeError::MissingField)?, - }) - } +s.content("Status", &self.status)?; +Ok(()) } -impl SerializeContent for ReplicationRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.delete_marker_replication { - s.content("DeleteMarkerReplication", val)?; - } - if let Some(ref val) = self.delete_replication { - s.content("DeleteReplication", val)?; - } - s.content("Destination", &self.destination)?; - if let Some(ref val) = self.existing_object_replication { - s.content("ExistingObjectReplication", val)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.priority { - s.content("Priority", val)?; - } - if let Some(ref val) = self.source_selection_criteria { - s.content("SourceSelectionCriteria", val)?; - } - s.content("Status", &self.status)?; - Ok(()) - } } impl<'xml> DeserializeContent<'xml> for ReplicationRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut delete_marker_replication: Option = None; - let mut delete_replication: Option = None; - let mut destination: Option = None; - let mut existing_object_replication: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut prefix: Option = None; - let mut priority: Option = None; - let mut source_selection_criteria: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"DeleteMarkerReplication" => { - if delete_marker_replication.is_some() { - return Err(DeError::DuplicateField); - } - delete_marker_replication = Some(d.content()?); - Ok(()) - } - b"DeleteReplication" => { - if delete_replication.is_some() { - return Err(DeError::DuplicateField); - } - delete_replication = Some(d.content()?); - Ok(()) - } - b"Destination" => { - if destination.is_some() { - return Err(DeError::DuplicateField); - } - destination = Some(d.content()?); - Ok(()) - } - b"ExistingObjectReplication" => { - if existing_object_replication.is_some() { - return Err(DeError::DuplicateField); - } - existing_object_replication = Some(d.content()?); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Priority" => { - if priority.is_some() { - return Err(DeError::DuplicateField); - } - priority = Some(d.content()?); - Ok(()) - } - b"SourceSelectionCriteria" => { - if source_selection_criteria.is_some() { - return Err(DeError::DuplicateField); - } - source_selection_criteria = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - delete_marker_replication, - delete_replication, - destination: destination.ok_or(DeError::MissingField)?, - existing_object_replication, - filter, - id, - prefix, - priority, - source_selection_criteria, - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut delete_marker_replication: Option = None; +let mut delete_replication: Option = None; +let mut destination: Option = None; +let mut existing_object_replication: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut prefix: Option = None; +let mut priority: Option = None; +let mut source_selection_criteria: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"DeleteMarkerReplication" => { +if delete_marker_replication.is_some() { return Err(DeError::DuplicateField); } +delete_marker_replication = Some(d.content()?); +Ok(()) +} +b"DeleteReplication" => { +if delete_replication.is_some() { return Err(DeError::DuplicateField); } +delete_replication = Some(d.content()?); +Ok(()) +} +b"Destination" => { +if destination.is_some() { return Err(DeError::DuplicateField); } +destination = Some(d.content()?); +Ok(()) +} +b"ExistingObjectReplication" => { +if existing_object_replication.is_some() { return Err(DeError::DuplicateField); } +existing_object_replication = Some(d.content()?); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Priority" => { +if priority.is_some() { return Err(DeError::DuplicateField); } +priority = Some(d.content()?); +Ok(()) +} +b"SourceSelectionCriteria" => { +if source_selection_criteria.is_some() { return Err(DeError::DuplicateField); } +source_selection_criteria = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +delete_marker_replication, +delete_replication, +destination: destination.ok_or(DeError::MissingField)?, +existing_object_replication, +filter, +id, +prefix, +priority, +source_selection_criteria, +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ReplicationRuleAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicationRuleAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix, tags }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +tags, +}) +} } impl SerializeContent for ReplicationRuleFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.and { - s.content("And", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.tag { - s.content("Tag", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.and { +s.content("And", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.tag { +s.content("Tag", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicationRuleFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut and: Option = None; - let mut prefix: Option = None; - let mut tag: Option = None; - d.for_each_element(|d, x| match x { - b"And" => { - if and.is_some() { - return Err(DeError::DuplicateField); - } - and = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - if tag.is_some() { - return Err(DeError::DuplicateField); - } - tag = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - and, - cached_tags: CachedTags::default(), - prefix, - tag, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut and: Option = None; +let mut prefix: Option = None; +let mut tag: Option = None; +d.for_each_element(|d, x| match x { +b"And" => { +if and.is_some() { return Err(DeError::DuplicateField); } +and = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +if tag.is_some() { return Err(DeError::DuplicateField); } +tag = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +and, +cached_tags: CachedTags::default(), +prefix, +tag, +}) +} } impl SerializeContent for ReplicationRuleStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ReplicationRuleStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ReplicationRuleStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ReplicationRuleStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ReplicationRuleStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ReplicationRuleStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ReplicationTime { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - s.content("Time", &self.time)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +s.content("Time", &self.time)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicationTime { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - let mut time: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - b"Time" => { - if time.is_some() { - return Err(DeError::DuplicateField); - } - time = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - time: time.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +let mut time: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +b"Time" => { +if time.is_some() { return Err(DeError::DuplicateField); } +time = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +time: time.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ReplicationTimeStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ReplicationTimeStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ReplicationTimeStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ReplicationTimeStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ReplicationTimeStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ReplicationTimeStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ReplicationTimeValue { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.minutes { - s.content("Minutes", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.minutes { +s.content("Minutes", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicationTimeValue { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut minutes: Option = None; - d.for_each_element(|d, x| match x { - b"Minutes" => { - if minutes.is_some() { - return Err(DeError::DuplicateField); - } - minutes = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { minutes }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut minutes: Option = None; +d.for_each_element(|d, x| match x { +b"Minutes" => { +if minutes.is_some() { return Err(DeError::DuplicateField); } +minutes = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +minutes, +}) +} } impl SerializeContent for RequestPaymentConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Payer", &self.payer)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Payer", &self.payer)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RequestPaymentConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut payer: Option = None; - d.for_each_element(|d, x| match x { - b"Payer" => { - if payer.is_some() { - return Err(DeError::DuplicateField); - } - payer = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - payer: payer.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut payer: Option = None; +d.for_each_element(|d, x| match x { +b"Payer" => { +if payer.is_some() { return Err(DeError::DuplicateField); } +payer = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +payer: payer.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for RequestProgress { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.enabled { - s.content("Enabled", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.enabled { +s.content("Enabled", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RequestProgress { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut enabled: Option = None; - d.for_each_element(|d, x| match x { - b"Enabled" => { - if enabled.is_some() { - return Err(DeError::DuplicateField); - } - enabled = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { enabled }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut enabled: Option = None; +d.for_each_element(|d, x| match x { +b"Enabled" => { +if enabled.is_some() { return Err(DeError::DuplicateField); } +enabled = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +enabled, +}) +} } impl SerializeContent for RestoreRequest { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.days { - s.content("Days", val)?; - } - if let Some(ref val) = self.description { - s.content("Description", val)?; - } - if let Some(ref val) = self.glacier_job_parameters { - s.content("GlacierJobParameters", val)?; - } - if let Some(ref val) = self.output_location { - s.content("OutputLocation", val)?; - } - if let Some(ref val) = self.select_parameters { - s.content("SelectParameters", val)?; - } - if let Some(ref val) = self.tier { - s.content("Tier", val)?; - } - if let Some(ref val) = self.type_ { - s.content("Type", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +if let Some(ref val) = self.description { +s.content("Description", val)?; +} +if let Some(ref val) = self.glacier_job_parameters { +s.content("GlacierJobParameters", val)?; +} +if let Some(ref val) = self.output_location { +s.content("OutputLocation", val)?; +} +if let Some(ref val) = self.select_parameters { +s.content("SelectParameters", val)?; +} +if let Some(ref val) = self.tier { +s.content("Tier", val)?; +} +if let Some(ref val) = self.type_ { +s.content("Type", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RestoreRequest { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut days: Option = None; - let mut description: Option = None; - let mut glacier_job_parameters: Option = None; - let mut output_location: Option = None; - let mut select_parameters: Option = None; - let mut tier: Option = None; - let mut type_: Option = None; - d.for_each_element(|d, x| match x { - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - b"Description" => { - if description.is_some() { - return Err(DeError::DuplicateField); - } - description = Some(d.content()?); - Ok(()) - } - b"GlacierJobParameters" => { - if glacier_job_parameters.is_some() { - return Err(DeError::DuplicateField); - } - glacier_job_parameters = Some(d.content()?); - Ok(()) - } - b"OutputLocation" => { - if output_location.is_some() { - return Err(DeError::DuplicateField); - } - output_location = Some(d.content()?); - Ok(()) - } - b"SelectParameters" => { - if select_parameters.is_some() { - return Err(DeError::DuplicateField); - } - select_parameters = Some(d.content()?); - Ok(()) - } - b"Tier" => { - if tier.is_some() { - return Err(DeError::DuplicateField); - } - tier = Some(d.content()?); - Ok(()) - } - b"Type" => { - if type_.is_some() { - return Err(DeError::DuplicateField); - } - type_ = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - days, - description, - glacier_job_parameters, - output_location, - select_parameters, - tier, - type_, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut days: Option = None; +let mut description: Option = None; +let mut glacier_job_parameters: Option = None; +let mut output_location: Option = None; +let mut select_parameters: Option = None; +let mut tier: Option = None; +let mut type_: Option = None; +d.for_each_element(|d, x| match x { +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +b"Description" => { +if description.is_some() { return Err(DeError::DuplicateField); } +description = Some(d.content()?); +Ok(()) +} +b"GlacierJobParameters" => { +if glacier_job_parameters.is_some() { return Err(DeError::DuplicateField); } +glacier_job_parameters = Some(d.content()?); +Ok(()) +} +b"OutputLocation" => { +if output_location.is_some() { return Err(DeError::DuplicateField); } +output_location = Some(d.content()?); +Ok(()) +} +b"SelectParameters" => { +if select_parameters.is_some() { return Err(DeError::DuplicateField); } +select_parameters = Some(d.content()?); +Ok(()) +} +b"Tier" => { +if tier.is_some() { return Err(DeError::DuplicateField); } +tier = Some(d.content()?); +Ok(()) +} +b"Type" => { +if type_.is_some() { return Err(DeError::DuplicateField); } +type_ = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +days, +description, +glacier_job_parameters, +output_location, +select_parameters, +tier, +type_, +}) +} } impl SerializeContent for RestoreRequestType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for RestoreRequestType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"SELECT" => Ok(Self::from_static(RestoreRequestType::SELECT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"SELECT" => Ok(Self::from_static(RestoreRequestType::SELECT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for RestoreStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.is_restore_in_progress { - s.content("IsRestoreInProgress", val)?; - } - if let Some(ref val) = self.restore_expiry_date { - s.timestamp("RestoreExpiryDate", val, TimestampFormat::DateTime)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.is_restore_in_progress { +s.content("IsRestoreInProgress", val)?; +} +if let Some(ref val) = self.restore_expiry_date { +s.timestamp("RestoreExpiryDate", val, TimestampFormat::DateTime)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RestoreStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut is_restore_in_progress: Option = None; - let mut restore_expiry_date: Option = None; - d.for_each_element(|d, x| match x { - b"IsRestoreInProgress" => { - if is_restore_in_progress.is_some() { - return Err(DeError::DuplicateField); - } - is_restore_in_progress = Some(d.content()?); - Ok(()) - } - b"RestoreExpiryDate" => { - if restore_expiry_date.is_some() { - return Err(DeError::DuplicateField); - } - restore_expiry_date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - is_restore_in_progress, - restore_expiry_date, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut is_restore_in_progress: Option = None; +let mut restore_expiry_date: Option = None; +d.for_each_element(|d, x| match x { +b"IsRestoreInProgress" => { +if is_restore_in_progress.is_some() { return Err(DeError::DuplicateField); } +is_restore_in_progress = Some(d.content()?); +Ok(()) +} +b"RestoreExpiryDate" => { +if restore_expiry_date.is_some() { return Err(DeError::DuplicateField); } +restore_expiry_date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +is_restore_in_progress, +restore_expiry_date, +}) +} } impl SerializeContent for RoutingRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.condition { - s.content("Condition", val)?; - } - s.content("Redirect", &self.redirect)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.condition { +s.content("Condition", val)?; +} +s.content("Redirect", &self.redirect)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RoutingRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut condition: Option = None; - let mut redirect: Option = None; - d.for_each_element(|d, x| match x { - b"Condition" => { - if condition.is_some() { - return Err(DeError::DuplicateField); - } - condition = Some(d.content()?); - Ok(()) - } - b"Redirect" => { - if redirect.is_some() { - return Err(DeError::DuplicateField); - } - redirect = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - condition, - redirect: redirect.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut condition: Option = None; +let mut redirect: Option = None; +d.for_each_element(|d, x| match x { +b"Condition" => { +if condition.is_some() { return Err(DeError::DuplicateField); } +condition = Some(d.content()?); +Ok(()) +} +b"Redirect" => { +if redirect.is_some() { return Err(DeError::DuplicateField); } +redirect = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +condition, +redirect: redirect.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for S3KeyFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.filter_rules { - s.flattened_list("FilterRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.filter_rules { +s.flattened_list("FilterRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for S3KeyFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut filter_rules: Option = None; - d.for_each_element(|d, x| match x { - b"FilterRule" => { - let ans: FilterRule = d.content()?; - filter_rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { filter_rules }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut filter_rules: Option = None; +d.for_each_element(|d, x| match x { +b"FilterRule" => { +let ans: FilterRule = d.content()?; +filter_rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +filter_rules, +}) +} } impl SerializeContent for S3Location { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.access_control_list { - s.list("AccessControlList", "Grant", iter)?; - } - s.content("BucketName", &self.bucket_name)?; - if let Some(ref val) = self.canned_acl { - s.content("CannedACL", val)?; - } - if let Some(ref val) = self.encryption { - s.content("Encryption", val)?; - } - s.content("Prefix", &self.prefix)?; - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - if let Some(ref val) = self.tagging { - s.content("Tagging", val)?; - } - if let Some(iter) = &self.user_metadata { - s.list("UserMetadata", "MetadataEntry", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.access_control_list { +s.list("AccessControlList", "Grant", iter)?; +} +s.content("BucketName", &self.bucket_name)?; +if let Some(ref val) = self.canned_acl { +s.content("CannedACL", val)?; +} +if let Some(ref val) = self.encryption { +s.content("Encryption", val)?; +} +s.content("Prefix", &self.prefix)?; +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +if let Some(ref val) = self.tagging { +s.content("Tagging", val)?; +} +if let Some(iter) = &self.user_metadata { +s.list("UserMetadata", "MetadataEntry", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for S3Location { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_control_list: Option = None; - let mut bucket_name: Option = None; - let mut canned_acl: Option = None; - let mut encryption: Option = None; - let mut prefix: Option = None; - let mut storage_class: Option = None; - let mut tagging: Option = None; - let mut user_metadata: Option = None; - d.for_each_element(|d, x| match x { - b"AccessControlList" => { - if access_control_list.is_some() { - return Err(DeError::DuplicateField); - } - access_control_list = Some(d.list_content("Grant")?); - Ok(()) - } - b"BucketName" => { - if bucket_name.is_some() { - return Err(DeError::DuplicateField); - } - bucket_name = Some(d.content()?); - Ok(()) - } - b"CannedACL" => { - if canned_acl.is_some() { - return Err(DeError::DuplicateField); - } - canned_acl = Some(d.content()?); - Ok(()) - } - b"Encryption" => { - if encryption.is_some() { - return Err(DeError::DuplicateField); - } - encryption = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - b"Tagging" => { - if tagging.is_some() { - return Err(DeError::DuplicateField); - } - tagging = Some(d.content()?); - Ok(()) - } - b"UserMetadata" => { - if user_metadata.is_some() { - return Err(DeError::DuplicateField); - } - user_metadata = Some(d.list_content("MetadataEntry")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_control_list, - bucket_name: bucket_name.ok_or(DeError::MissingField)?, - canned_acl, - encryption, - prefix: prefix.ok_or(DeError::MissingField)?, - storage_class, - tagging, - user_metadata, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_control_list: Option = None; +let mut bucket_name: Option = None; +let mut canned_acl: Option = None; +let mut encryption: Option = None; +let mut prefix: Option = None; +let mut storage_class: Option = None; +let mut tagging: Option = None; +let mut user_metadata: Option = None; +d.for_each_element(|d, x| match x { +b"AccessControlList" => { +if access_control_list.is_some() { return Err(DeError::DuplicateField); } +access_control_list = Some(d.list_content("Grant")?); +Ok(()) +} +b"BucketName" => { +if bucket_name.is_some() { return Err(DeError::DuplicateField); } +bucket_name = Some(d.content()?); +Ok(()) +} +b"CannedACL" => { +if canned_acl.is_some() { return Err(DeError::DuplicateField); } +canned_acl = Some(d.content()?); +Ok(()) +} +b"Encryption" => { +if encryption.is_some() { return Err(DeError::DuplicateField); } +encryption = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +b"Tagging" => { +if tagging.is_some() { return Err(DeError::DuplicateField); } +tagging = Some(d.content()?); +Ok(()) +} +b"UserMetadata" => { +if user_metadata.is_some() { return Err(DeError::DuplicateField); } +user_metadata = Some(d.list_content("MetadataEntry")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_control_list, +bucket_name: bucket_name.ok_or(DeError::MissingField)?, +canned_acl, +encryption, +prefix: prefix.ok_or(DeError::MissingField)?, +storage_class, +tagging, +user_metadata, +}) +} } impl SerializeContent for S3TablesDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("TableBucketArn", &self.table_bucket_arn)?; - s.content("TableName", &self.table_name)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("TableBucketArn", &self.table_bucket_arn)?; +s.content("TableName", &self.table_name)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for S3TablesDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut table_bucket_arn: Option = None; - let mut table_name: Option = None; - d.for_each_element(|d, x| match x { - b"TableBucketArn" => { - if table_bucket_arn.is_some() { - return Err(DeError::DuplicateField); - } - table_bucket_arn = Some(d.content()?); - Ok(()) - } - b"TableName" => { - if table_name.is_some() { - return Err(DeError::DuplicateField); - } - table_name = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, - table_name: table_name.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut table_bucket_arn: Option = None; +let mut table_name: Option = None; +d.for_each_element(|d, x| match x { +b"TableBucketArn" => { +if table_bucket_arn.is_some() { return Err(DeError::DuplicateField); } +table_bucket_arn = Some(d.content()?); +Ok(()) +} +b"TableName" => { +if table_name.is_some() { return Err(DeError::DuplicateField); } +table_name = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, +table_name: table_name.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for S3TablesDestinationResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("TableArn", &self.table_arn)?; - s.content("TableBucketArn", &self.table_bucket_arn)?; - s.content("TableName", &self.table_name)?; - s.content("TableNamespace", &self.table_namespace)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("TableArn", &self.table_arn)?; +s.content("TableBucketArn", &self.table_bucket_arn)?; +s.content("TableName", &self.table_name)?; +s.content("TableNamespace", &self.table_namespace)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for S3TablesDestinationResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut table_arn: Option = None; - let mut table_bucket_arn: Option = None; - let mut table_name: Option = None; - let mut table_namespace: Option = None; - d.for_each_element(|d, x| match x { - b"TableArn" => { - if table_arn.is_some() { - return Err(DeError::DuplicateField); - } - table_arn = Some(d.content()?); - Ok(()) - } - b"TableBucketArn" => { - if table_bucket_arn.is_some() { - return Err(DeError::DuplicateField); - } - table_bucket_arn = Some(d.content()?); - Ok(()) - } - b"TableName" => { - if table_name.is_some() { - return Err(DeError::DuplicateField); - } - table_name = Some(d.content()?); - Ok(()) - } - b"TableNamespace" => { - if table_namespace.is_some() { - return Err(DeError::DuplicateField); - } - table_namespace = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - table_arn: table_arn.ok_or(DeError::MissingField)?, - table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, - table_name: table_name.ok_or(DeError::MissingField)?, - table_namespace: table_namespace.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut table_arn: Option = None; +let mut table_bucket_arn: Option = None; +let mut table_name: Option = None; +let mut table_namespace: Option = None; +d.for_each_element(|d, x| match x { +b"TableArn" => { +if table_arn.is_some() { return Err(DeError::DuplicateField); } +table_arn = Some(d.content()?); +Ok(()) +} +b"TableBucketArn" => { +if table_bucket_arn.is_some() { return Err(DeError::DuplicateField); } +table_bucket_arn = Some(d.content()?); +Ok(()) +} +b"TableName" => { +if table_name.is_some() { return Err(DeError::DuplicateField); } +table_name = Some(d.content()?); +Ok(()) +} +b"TableNamespace" => { +if table_namespace.is_some() { return Err(DeError::DuplicateField); } +table_namespace = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +table_arn: table_arn.ok_or(DeError::MissingField)?, +table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, +table_name: table_name.ok_or(DeError::MissingField)?, +table_namespace: table_namespace.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for SSEKMS { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("KeyId", &self.key_id)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("KeyId", &self.key_id)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SSEKMS { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut key_id: Option = None; - d.for_each_element(|d, x| match x { - b"KeyId" => { - if key_id.is_some() { - return Err(DeError::DuplicateField); - } - key_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - key_id: key_id.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut key_id: Option = None; +d.for_each_element(|d, x| match x { +b"KeyId" => { +if key_id.is_some() { return Err(DeError::DuplicateField); } +key_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +key_id: key_id.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for SSES3 { - fn serialize_content(&self, _: &mut Serializer) -> SerResult { - Ok(()) - } +fn serialize_content(&self, _: &mut Serializer) -> SerResult { +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SSES3 { - fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { - Ok(Self {}) - } +fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { +Ok(Self { +}) +} } impl SerializeContent for ScanRange { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.end { - s.content("End", val)?; - } - if let Some(ref val) = self.start { - s.content("Start", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.end { +s.content("End", val)?; +} +if let Some(ref val) = self.start { +s.content("Start", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ScanRange { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut end: Option = None; - let mut start: Option = None; - d.for_each_element(|d, x| match x { - b"End" => { - if end.is_some() { - return Err(DeError::DuplicateField); - } - end = Some(d.content()?); - Ok(()) - } - b"Start" => { - if start.is_some() { - return Err(DeError::DuplicateField); - } - start = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { end, start }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut end: Option = None; +let mut start: Option = None; +d.for_each_element(|d, x| match x { +b"End" => { +if end.is_some() { return Err(DeError::DuplicateField); } +end = Some(d.content()?); +Ok(()) +} +b"Start" => { +if start.is_some() { return Err(DeError::DuplicateField); } +start = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +end, +start, +}) +} } impl SerializeContent for SelectObjectContentRequest { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Expression", &self.expression)?; - s.content("ExpressionType", &self.expression_type)?; - s.content("InputSerialization", &self.input_serialization)?; - s.content("OutputSerialization", &self.output_serialization)?; - if let Some(ref val) = self.request_progress { - s.content("RequestProgress", val)?; - } - if let Some(ref val) = self.scan_range { - s.content("ScanRange", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Expression", &self.expression)?; +s.content("ExpressionType", &self.expression_type)?; +s.content("InputSerialization", &self.input_serialization)?; +s.content("OutputSerialization", &self.output_serialization)?; +if let Some(ref val) = self.request_progress { +s.content("RequestProgress", val)?; +} +if let Some(ref val) = self.scan_range { +s.content("ScanRange", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SelectObjectContentRequest { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut expression: Option = None; - let mut expression_type: Option = None; - let mut input_serialization: Option = None; - let mut output_serialization: Option = None; - let mut request_progress: Option = None; - let mut scan_range: Option = None; - d.for_each_element(|d, x| match x { - b"Expression" => { - if expression.is_some() { - return Err(DeError::DuplicateField); - } - expression = Some(d.content()?); - Ok(()) - } - b"ExpressionType" => { - if expression_type.is_some() { - return Err(DeError::DuplicateField); - } - expression_type = Some(d.content()?); - Ok(()) - } - b"InputSerialization" => { - if input_serialization.is_some() { - return Err(DeError::DuplicateField); - } - input_serialization = Some(d.content()?); - Ok(()) - } - b"OutputSerialization" => { - if output_serialization.is_some() { - return Err(DeError::DuplicateField); - } - output_serialization = Some(d.content()?); - Ok(()) - } - b"RequestProgress" => { - if request_progress.is_some() { - return Err(DeError::DuplicateField); - } - request_progress = Some(d.content()?); - Ok(()) - } - b"ScanRange" => { - if scan_range.is_some() { - return Err(DeError::DuplicateField); - } - scan_range = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - expression: expression.ok_or(DeError::MissingField)?, - expression_type: expression_type.ok_or(DeError::MissingField)?, - input_serialization: input_serialization.ok_or(DeError::MissingField)?, - output_serialization: output_serialization.ok_or(DeError::MissingField)?, - request_progress, - scan_range, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut expression: Option = None; +let mut expression_type: Option = None; +let mut input_serialization: Option = None; +let mut output_serialization: Option = None; +let mut request_progress: Option = None; +let mut scan_range: Option = None; +d.for_each_element(|d, x| match x { +b"Expression" => { +if expression.is_some() { return Err(DeError::DuplicateField); } +expression = Some(d.content()?); +Ok(()) +} +b"ExpressionType" => { +if expression_type.is_some() { return Err(DeError::DuplicateField); } +expression_type = Some(d.content()?); +Ok(()) +} +b"InputSerialization" => { +if input_serialization.is_some() { return Err(DeError::DuplicateField); } +input_serialization = Some(d.content()?); +Ok(()) +} +b"OutputSerialization" => { +if output_serialization.is_some() { return Err(DeError::DuplicateField); } +output_serialization = Some(d.content()?); +Ok(()) +} +b"RequestProgress" => { +if request_progress.is_some() { return Err(DeError::DuplicateField); } +request_progress = Some(d.content()?); +Ok(()) +} +b"ScanRange" => { +if scan_range.is_some() { return Err(DeError::DuplicateField); } +scan_range = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +expression: expression.ok_or(DeError::MissingField)?, +expression_type: expression_type.ok_or(DeError::MissingField)?, +input_serialization: input_serialization.ok_or(DeError::MissingField)?, +output_serialization: output_serialization.ok_or(DeError::MissingField)?, +request_progress, +scan_range, +}) +} } impl SerializeContent for SelectParameters { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Expression", &self.expression)?; - s.content("ExpressionType", &self.expression_type)?; - s.content("InputSerialization", &self.input_serialization)?; - s.content("OutputSerialization", &self.output_serialization)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Expression", &self.expression)?; +s.content("ExpressionType", &self.expression_type)?; +s.content("InputSerialization", &self.input_serialization)?; +s.content("OutputSerialization", &self.output_serialization)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SelectParameters { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut expression: Option = None; - let mut expression_type: Option = None; - let mut input_serialization: Option = None; - let mut output_serialization: Option = None; - d.for_each_element(|d, x| match x { - b"Expression" => { - if expression.is_some() { - return Err(DeError::DuplicateField); - } - expression = Some(d.content()?); - Ok(()) - } - b"ExpressionType" => { - if expression_type.is_some() { - return Err(DeError::DuplicateField); - } - expression_type = Some(d.content()?); - Ok(()) - } - b"InputSerialization" => { - if input_serialization.is_some() { - return Err(DeError::DuplicateField); - } - input_serialization = Some(d.content()?); - Ok(()) - } - b"OutputSerialization" => { - if output_serialization.is_some() { - return Err(DeError::DuplicateField); - } - output_serialization = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - expression: expression.ok_or(DeError::MissingField)?, - expression_type: expression_type.ok_or(DeError::MissingField)?, - input_serialization: input_serialization.ok_or(DeError::MissingField)?, - output_serialization: output_serialization.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut expression: Option = None; +let mut expression_type: Option = None; +let mut input_serialization: Option = None; +let mut output_serialization: Option = None; +d.for_each_element(|d, x| match x { +b"Expression" => { +if expression.is_some() { return Err(DeError::DuplicateField); } +expression = Some(d.content()?); +Ok(()) +} +b"ExpressionType" => { +if expression_type.is_some() { return Err(DeError::DuplicateField); } +expression_type = Some(d.content()?); +Ok(()) +} +b"InputSerialization" => { +if input_serialization.is_some() { return Err(DeError::DuplicateField); } +input_serialization = Some(d.content()?); +Ok(()) +} +b"OutputSerialization" => { +if output_serialization.is_some() { return Err(DeError::DuplicateField); } +output_serialization = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +expression: expression.ok_or(DeError::MissingField)?, +expression_type: expression_type.ok_or(DeError::MissingField)?, +input_serialization: input_serialization.ok_or(DeError::MissingField)?, +output_serialization: output_serialization.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ServerSideEncryption { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ServerSideEncryption { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"AES256" => Ok(Self::from_static(ServerSideEncryption::AES256)), - b"aws:kms" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS)), - b"aws:kms:dsse" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS_DSSE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"AES256" => Ok(Self::from_static(ServerSideEncryption::AES256)), +b"aws:kms" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS)), +b"aws:kms:dsse" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS_DSSE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ServerSideEncryptionByDefault { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.kms_master_key_id { - s.content("KMSMasterKeyID", val)?; - } - s.content("SSEAlgorithm", &self.sse_algorithm)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.kms_master_key_id { +s.content("KMSMasterKeyID", val)?; +} +s.content("SSEAlgorithm", &self.sse_algorithm)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionByDefault { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut kms_master_key_id: Option = None; - let mut sse_algorithm: Option = None; - d.for_each_element(|d, x| match x { - b"KMSMasterKeyID" => { - if kms_master_key_id.is_some() { - return Err(DeError::DuplicateField); - } - kms_master_key_id = Some(d.content()?); - Ok(()) - } - b"SSEAlgorithm" => { - if sse_algorithm.is_some() { - return Err(DeError::DuplicateField); - } - sse_algorithm = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - kms_master_key_id, - sse_algorithm: sse_algorithm.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut kms_master_key_id: Option = None; +let mut sse_algorithm: Option = None; +d.for_each_element(|d, x| match x { +b"KMSMasterKeyID" => { +if kms_master_key_id.is_some() { return Err(DeError::DuplicateField); } +kms_master_key_id = Some(d.content()?); +Ok(()) +} +b"SSEAlgorithm" => { +if sse_algorithm.is_some() { return Err(DeError::DuplicateField); } +sse_algorithm = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +kms_master_key_id, +sse_algorithm: sse_algorithm.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ServerSideEncryptionConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.rules; - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.rules; +s.flattened_list("Rule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut rules: Option = None; - d.for_each_element(|d, x| match x { - b"Rule" => { - let ans: ServerSideEncryptionRule = d.content()?; - rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - rules: rules.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut rules: Option = None; +d.for_each_element(|d, x| match x { +b"Rule" => { +let ans: ServerSideEncryptionRule = d.content()?; +rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +rules: rules.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ServerSideEncryptionRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.apply_server_side_encryption_by_default { - s.content("ApplyServerSideEncryptionByDefault", val)?; - } - if let Some(ref val) = self.bucket_key_enabled { - s.content("BucketKeyEnabled", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.apply_server_side_encryption_by_default { +s.content("ApplyServerSideEncryptionByDefault", val)?; +} +if let Some(ref val) = self.bucket_key_enabled { +s.content("BucketKeyEnabled", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut apply_server_side_encryption_by_default: Option = None; - let mut bucket_key_enabled: Option = None; - d.for_each_element(|d, x| match x { - b"ApplyServerSideEncryptionByDefault" => { - if apply_server_side_encryption_by_default.is_some() { - return Err(DeError::DuplicateField); - } - apply_server_side_encryption_by_default = Some(d.content()?); - Ok(()) - } - b"BucketKeyEnabled" => { - if bucket_key_enabled.is_some() { - return Err(DeError::DuplicateField); - } - bucket_key_enabled = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - apply_server_side_encryption_by_default, - bucket_key_enabled, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut apply_server_side_encryption_by_default: Option = None; +let mut bucket_key_enabled: Option = None; +d.for_each_element(|d, x| match x { +b"ApplyServerSideEncryptionByDefault" => { +if apply_server_side_encryption_by_default.is_some() { return Err(DeError::DuplicateField); } +apply_server_side_encryption_by_default = Some(d.content()?); +Ok(()) +} +b"BucketKeyEnabled" => { +if bucket_key_enabled.is_some() { return Err(DeError::DuplicateField); } +bucket_key_enabled = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +apply_server_side_encryption_by_default, +bucket_key_enabled, +}) +} } impl SerializeContent for SessionCredentials { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("AccessKeyId", &self.access_key_id)?; - s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; - s.content("SecretAccessKey", &self.secret_access_key)?; - s.content("SessionToken", &self.session_token)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("AccessKeyId", &self.access_key_id)?; +s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; +s.content("SecretAccessKey", &self.secret_access_key)?; +s.content("SessionToken", &self.session_token)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SessionCredentials { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_key_id: Option = None; - let mut expiration: Option = None; - let mut secret_access_key: Option = None; - let mut session_token: Option = None; - d.for_each_element(|d, x| match x { - b"AccessKeyId" => { - if access_key_id.is_some() { - return Err(DeError::DuplicateField); - } - access_key_id = Some(d.content()?); - Ok(()) - } - b"Expiration" => { - if expiration.is_some() { - return Err(DeError::DuplicateField); - } - expiration = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"SecretAccessKey" => { - if secret_access_key.is_some() { - return Err(DeError::DuplicateField); - } - secret_access_key = Some(d.content()?); - Ok(()) - } - b"SessionToken" => { - if session_token.is_some() { - return Err(DeError::DuplicateField); - } - session_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_key_id: access_key_id.ok_or(DeError::MissingField)?, - expiration: expiration.ok_or(DeError::MissingField)?, - secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, - session_token: session_token.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_key_id: Option = None; +let mut expiration: Option = None; +let mut secret_access_key: Option = None; +let mut session_token: Option = None; +d.for_each_element(|d, x| match x { +b"AccessKeyId" => { +if access_key_id.is_some() { return Err(DeError::DuplicateField); } +access_key_id = Some(d.content()?); +Ok(()) +} +b"Expiration" => { +if expiration.is_some() { return Err(DeError::DuplicateField); } +expiration = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"SecretAccessKey" => { +if secret_access_key.is_some() { return Err(DeError::DuplicateField); } +secret_access_key = Some(d.content()?); +Ok(()) +} +b"SessionToken" => { +if session_token.is_some() { return Err(DeError::DuplicateField); } +session_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_key_id: access_key_id.ok_or(DeError::MissingField)?, +expiration: expiration.ok_or(DeError::MissingField)?, +secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, +session_token: session_token.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for SimplePrefix { - fn serialize_content(&self, _: &mut Serializer) -> SerResult { - Ok(()) - } +fn serialize_content(&self, _: &mut Serializer) -> SerResult { +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SimplePrefix { - fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { - Ok(Self {}) - } +fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { +Ok(Self { +}) +} } impl SerializeContent for SourceSelectionCriteria { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.replica_modifications { - s.content("ReplicaModifications", val)?; - } - if let Some(ref val) = self.sse_kms_encrypted_objects { - s.content("SseKmsEncryptedObjects", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.replica_modifications { +s.content("ReplicaModifications", val)?; +} +if let Some(ref val) = self.sse_kms_encrypted_objects { +s.content("SseKmsEncryptedObjects", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SourceSelectionCriteria { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut replica_modifications: Option = None; - let mut sse_kms_encrypted_objects: Option = None; - d.for_each_element(|d, x| match x { - b"ReplicaModifications" => { - if replica_modifications.is_some() { - return Err(DeError::DuplicateField); - } - replica_modifications = Some(d.content()?); - Ok(()) - } - b"SseKmsEncryptedObjects" => { - if sse_kms_encrypted_objects.is_some() { - return Err(DeError::DuplicateField); - } - sse_kms_encrypted_objects = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - replica_modifications, - sse_kms_encrypted_objects, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut replica_modifications: Option = None; +let mut sse_kms_encrypted_objects: Option = None; +d.for_each_element(|d, x| match x { +b"ReplicaModifications" => { +if replica_modifications.is_some() { return Err(DeError::DuplicateField); } +replica_modifications = Some(d.content()?); +Ok(()) +} +b"SseKmsEncryptedObjects" => { +if sse_kms_encrypted_objects.is_some() { return Err(DeError::DuplicateField); } +sse_kms_encrypted_objects = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +replica_modifications, +sse_kms_encrypted_objects, +}) +} } impl SerializeContent for SseKmsEncryptedObjects { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SseKmsEncryptedObjects { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for SseKmsEncryptedObjectsStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for SseKmsEncryptedObjectsStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Stats { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bytes_processed { - s.content("BytesProcessed", val)?; - } - if let Some(ref val) = self.bytes_returned { - s.content("BytesReturned", val)?; - } - if let Some(ref val) = self.bytes_scanned { - s.content("BytesScanned", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bytes_processed { +s.content("BytesProcessed", val)?; +} +if let Some(ref val) = self.bytes_returned { +s.content("BytesReturned", val)?; +} +if let Some(ref val) = self.bytes_scanned { +s.content("BytesScanned", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Stats { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bytes_processed: Option = None; - let mut bytes_returned: Option = None; - let mut bytes_scanned: Option = None; - d.for_each_element(|d, x| match x { - b"BytesProcessed" => { - if bytes_processed.is_some() { - return Err(DeError::DuplicateField); - } - bytes_processed = Some(d.content()?); - Ok(()) - } - b"BytesReturned" => { - if bytes_returned.is_some() { - return Err(DeError::DuplicateField); - } - bytes_returned = Some(d.content()?); - Ok(()) - } - b"BytesScanned" => { - if bytes_scanned.is_some() { - return Err(DeError::DuplicateField); - } - bytes_scanned = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bytes_processed, - bytes_returned, - bytes_scanned, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bytes_processed: Option = None; +let mut bytes_returned: Option = None; +let mut bytes_scanned: Option = None; +d.for_each_element(|d, x| match x { +b"BytesProcessed" => { +if bytes_processed.is_some() { return Err(DeError::DuplicateField); } +bytes_processed = Some(d.content()?); +Ok(()) +} +b"BytesReturned" => { +if bytes_returned.is_some() { return Err(DeError::DuplicateField); } +bytes_returned = Some(d.content()?); +Ok(()) +} +b"BytesScanned" => { +if bytes_scanned.is_some() { return Err(DeError::DuplicateField); } +bytes_scanned = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bytes_processed, +bytes_returned, +bytes_scanned, +}) +} } impl SerializeContent for StorageClass { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for StorageClass { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DEEP_ARCHIVE" => Ok(Self::from_static(StorageClass::DEEP_ARCHIVE)), - b"EXPRESS_ONEZONE" => Ok(Self::from_static(StorageClass::EXPRESS_ONEZONE)), - b"GLACIER" => Ok(Self::from_static(StorageClass::GLACIER)), - b"GLACIER_IR" => Ok(Self::from_static(StorageClass::GLACIER_IR)), - b"INTELLIGENT_TIERING" => Ok(Self::from_static(StorageClass::INTELLIGENT_TIERING)), - b"ONEZONE_IA" => Ok(Self::from_static(StorageClass::ONEZONE_IA)), - b"OUTPOSTS" => Ok(Self::from_static(StorageClass::OUTPOSTS)), - b"REDUCED_REDUNDANCY" => Ok(Self::from_static(StorageClass::REDUCED_REDUNDANCY)), - b"SNOW" => Ok(Self::from_static(StorageClass::SNOW)), - b"STANDARD" => Ok(Self::from_static(StorageClass::STANDARD)), - b"STANDARD_IA" => Ok(Self::from_static(StorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DEEP_ARCHIVE" => Ok(Self::from_static(StorageClass::DEEP_ARCHIVE)), +b"EXPRESS_ONEZONE" => Ok(Self::from_static(StorageClass::EXPRESS_ONEZONE)), +b"GLACIER" => Ok(Self::from_static(StorageClass::GLACIER)), +b"GLACIER_IR" => Ok(Self::from_static(StorageClass::GLACIER_IR)), +b"INTELLIGENT_TIERING" => Ok(Self::from_static(StorageClass::INTELLIGENT_TIERING)), +b"ONEZONE_IA" => Ok(Self::from_static(StorageClass::ONEZONE_IA)), +b"OUTPOSTS" => Ok(Self::from_static(StorageClass::OUTPOSTS)), +b"REDUCED_REDUNDANCY" => Ok(Self::from_static(StorageClass::REDUCED_REDUNDANCY)), +b"SNOW" => Ok(Self::from_static(StorageClass::SNOW)), +b"STANDARD" => Ok(Self::from_static(StorageClass::STANDARD)), +b"STANDARD_IA" => Ok(Self::from_static(StorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for StorageClassAnalysis { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.data_export { - s.content("DataExport", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.data_export { +s.content("DataExport", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysis { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut data_export: Option = None; - d.for_each_element(|d, x| match x { - b"DataExport" => { - if data_export.is_some() { - return Err(DeError::DuplicateField); - } - data_export = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { data_export }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut data_export: Option = None; +d.for_each_element(|d, x| match x { +b"DataExport" => { +if data_export.is_some() { return Err(DeError::DuplicateField); } +data_export = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +data_export, +}) +} } impl SerializeContent for StorageClassAnalysisDataExport { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Destination", &self.destination)?; - s.content("OutputSchemaVersion", &self.output_schema_version)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Destination", &self.destination)?; +s.content("OutputSchemaVersion", &self.output_schema_version)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysisDataExport { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut destination: Option = None; - let mut output_schema_version: Option = None; - d.for_each_element(|d, x| match x { - b"Destination" => { - if destination.is_some() { - return Err(DeError::DuplicateField); - } - destination = Some(d.content()?); - Ok(()) - } - b"OutputSchemaVersion" => { - if output_schema_version.is_some() { - return Err(DeError::DuplicateField); - } - output_schema_version = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - destination: destination.ok_or(DeError::MissingField)?, - output_schema_version: output_schema_version.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut destination: Option = None; +let mut output_schema_version: Option = None; +d.for_each_element(|d, x| match x { +b"Destination" => { +if destination.is_some() { return Err(DeError::DuplicateField); } +destination = Some(d.content()?); +Ok(()) +} +b"OutputSchemaVersion" => { +if output_schema_version.is_some() { return Err(DeError::DuplicateField); } +output_schema_version = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +destination: destination.ok_or(DeError::MissingField)?, +output_schema_version: output_schema_version.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for StorageClassAnalysisSchemaVersion { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysisSchemaVersion { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"V_1" => Ok(Self::from_static(StorageClassAnalysisSchemaVersion::V_1)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"V_1" => Ok(Self::from_static(StorageClassAnalysisSchemaVersion::V_1)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Tag { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.value { - s.content("Value", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.value { +s.content("Value", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Tag { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut key: Option = None; - let mut value: Option = None; - d.for_each_element(|d, x| match x { - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"Value" => { - if value.is_some() { - return Err(DeError::DuplicateField); - } - value = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { key, value }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut key: Option = None; +let mut value: Option = None; +d.for_each_element(|d, x| match x { +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"Value" => { +if value.is_some() { return Err(DeError::DuplicateField); } +value = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +key, +value, +}) +} } impl SerializeContent for Tagging { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.tag_set; - s.list("TagSet", "Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.tag_set; +s.list("TagSet", "Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Tagging { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut tag_set: Option = None; - d.for_each_element(|d, x| match x { - b"TagSet" => { - if tag_set.is_some() { - return Err(DeError::DuplicateField); - } - tag_set = Some(d.list_content("Tag")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - tag_set: tag_set.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut tag_set: Option = None; +d.for_each_element(|d, x| match x { +b"TagSet" => { +if tag_set.is_some() { return Err(DeError::DuplicateField); } +tag_set = Some(d.list_content("Tag")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +tag_set: tag_set.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for TargetGrant { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.grantee { - let attrs = [ - ("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), - ("xsi:type", val.type_.as_str()), - ]; - s.content_with_attrs("Grantee", &attrs, val)?; - } - if let Some(ref val) = self.permission { - s.content("Permission", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.grantee { +let attrs = [ +("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), +("xsi:type", val.type_.as_str()), +]; +s.content_with_attrs("Grantee", &attrs, val)?; +} +if let Some(ref val) = self.permission { +s.content("Permission", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for TargetGrant { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut grantee: Option = None; - let mut permission: Option = None; - d.for_each_element_with_start(|d, x, start| match x { - b"Grantee" => { - if grantee.is_some() { - return Err(DeError::DuplicateField); - } - let mut type_: Option = None; - for attr in start.attributes() { - let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; - if attr.key.as_ref() == b"xsi:type" { - type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); - } - } - let mut display_name: Option = None; - let mut email_address: Option = None; - let mut id: Option = None; - let mut uri: Option = None; - d.for_each_element(|d, x| match x { - b"DisplayName" => { - if display_name.is_some() { - return Err(DeError::DuplicateField); - } - display_name = Some(d.content()?); - Ok(()) - } - b"EmailAddress" => { - if email_address.is_some() { - return Err(DeError::DuplicateField); - } - email_address = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"URI" => { - if uri.is_some() { - return Err(DeError::DuplicateField); - } - uri = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - grantee = Some(Grantee { - display_name, - email_address, - id, - type_: type_.ok_or(DeError::MissingField)?, - uri, - }); - Ok(()) - } - b"Permission" => { - if permission.is_some() { - return Err(DeError::DuplicateField); - } - permission = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { grantee, permission }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut grantee: Option = None; +let mut permission: Option = None; +d.for_each_element_with_start(|d, x, start| match x { +b"Grantee" => { +if grantee.is_some() { return Err(DeError::DuplicateField); } +let mut type_: Option = None; +for attr in start.attributes() { + let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; + if attr.key.as_ref() == b"xsi:type" { + type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); + } +} +let mut display_name: Option = None; +let mut email_address: Option = None; +let mut id: Option = None; +let mut uri: Option = None; +d.for_each_element(|d, x| match x { +b"DisplayName" => { + if display_name.is_some() { return Err(DeError::DuplicateField); } + display_name = Some(d.content()?); + Ok(()) +} +b"EmailAddress" => { + if email_address.is_some() { return Err(DeError::DuplicateField); } + email_address = Some(d.content()?); + Ok(()) +} +b"ID" => { + if id.is_some() { return Err(DeError::DuplicateField); } + id = Some(d.content()?); + Ok(()) +} +b"URI" => { + if uri.is_some() { return Err(DeError::DuplicateField); } + uri = Some(d.content()?); + Ok(()) +} +_ => Err(DeError::UnexpectedTagName), +})?; +grantee = Some(Grantee { +display_name, +email_address, +id, +type_: type_.ok_or(DeError::MissingField)?, +uri, +}); +Ok(()) +} +b"Permission" => { +if permission.is_some() { return Err(DeError::DuplicateField); } +permission = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +grantee, +permission, +}) +} } impl SerializeContent for TargetObjectKeyFormat { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.partitioned_prefix { - s.content("PartitionedPrefix", val)?; - } - if let Some(ref val) = self.simple_prefix { - s.content("SimplePrefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.partitioned_prefix { +s.content("PartitionedPrefix", val)?; +} +if let Some(ref val) = self.simple_prefix { +s.content("SimplePrefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for TargetObjectKeyFormat { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut partitioned_prefix: Option = None; - let mut simple_prefix: Option = None; - d.for_each_element(|d, x| match x { - b"PartitionedPrefix" => { - if partitioned_prefix.is_some() { - return Err(DeError::DuplicateField); - } - partitioned_prefix = Some(d.content()?); - Ok(()) - } - b"SimplePrefix" => { - if simple_prefix.is_some() { - return Err(DeError::DuplicateField); - } - simple_prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - partitioned_prefix, - simple_prefix, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut partitioned_prefix: Option = None; +let mut simple_prefix: Option = None; +d.for_each_element(|d, x| match x { +b"PartitionedPrefix" => { +if partitioned_prefix.is_some() { return Err(DeError::DuplicateField); } +partitioned_prefix = Some(d.content()?); +Ok(()) +} +b"SimplePrefix" => { +if simple_prefix.is_some() { return Err(DeError::DuplicateField); } +simple_prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +partitioned_prefix, +simple_prefix, +}) +} } impl SerializeContent for Tier { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Tier { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Bulk" => Ok(Self::from_static(Tier::BULK)), - b"Expedited" => Ok(Self::from_static(Tier::EXPEDITED)), - b"Standard" => Ok(Self::from_static(Tier::STANDARD)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Bulk" => Ok(Self::from_static(Tier::BULK)), +b"Expedited" => Ok(Self::from_static(Tier::EXPEDITED)), +b"Standard" => Ok(Self::from_static(Tier::STANDARD)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Tiering { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("AccessTier", &self.access_tier)?; - s.content("Days", &self.days)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("AccessTier", &self.access_tier)?; +s.content("Days", &self.days)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Tiering { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_tier: Option = None; - let mut days: Option = None; - d.for_each_element(|d, x| match x { - b"AccessTier" => { - if access_tier.is_some() { - return Err(DeError::DuplicateField); - } - access_tier = Some(d.content()?); - Ok(()) - } - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_tier: access_tier.ok_or(DeError::MissingField)?, - days: days.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_tier: Option = None; +let mut days: Option = None; +d.for_each_element(|d, x| match x { +b"AccessTier" => { +if access_tier.is_some() { return Err(DeError::DuplicateField); } +access_tier = Some(d.content()?); +Ok(()) +} +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_tier: access_tier.ok_or(DeError::MissingField)?, +days: days.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for TopicConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.events; - s.flattened_list("Event", iter)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("Id", val)?; - } - s.content("Topic", &self.topic_arn)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.events; +s.flattened_list("Event", iter)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("Id", val)?; +} +s.content("Topic", &self.topic_arn)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for TopicConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut events: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut topic_arn: Option = None; - d.for_each_element(|d, x| match x { - b"Event" => { - let ans: Event = d.content()?; - events.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"Topic" => { - if topic_arn.is_some() { - return Err(DeError::DuplicateField); - } - topic_arn = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - events: events.ok_or(DeError::MissingField)?, - filter, - id, - topic_arn: topic_arn.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut events: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut topic_arn: Option = None; +d.for_each_element(|d, x| match x { +b"Event" => { +let ans: Event = d.content()?; +events.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"Topic" => { +if topic_arn.is_some() { return Err(DeError::DuplicateField); } +topic_arn = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +events: events.ok_or(DeError::MissingField)?, +filter, +id, +topic_arn: topic_arn.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Transition { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.date { - s.timestamp("Date", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.days { - s.content("Days", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.date { +s.timestamp("Date", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Transition { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut date: Option = None; - let mut days: Option = None; - let mut storage_class: Option = None; - d.for_each_element(|d, x| match x { - b"Date" => { - if date.is_some() { - return Err(DeError::DuplicateField); - } - date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - date, - days, - storage_class, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut date: Option = None; +let mut days: Option = None; +let mut storage_class: Option = None; +d.for_each_element(|d, x| match x { +b"Date" => { +if date.is_some() { return Err(DeError::DuplicateField); } +date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +date, +days, +storage_class, +}) +} } impl SerializeContent for TransitionStorageClass { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for TransitionStorageClass { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DEEP_ARCHIVE" => Ok(Self::from_static(TransitionStorageClass::DEEP_ARCHIVE)), - b"GLACIER" => Ok(Self::from_static(TransitionStorageClass::GLACIER)), - b"GLACIER_IR" => Ok(Self::from_static(TransitionStorageClass::GLACIER_IR)), - b"INTELLIGENT_TIERING" => Ok(Self::from_static(TransitionStorageClass::INTELLIGENT_TIERING)), - b"ONEZONE_IA" => Ok(Self::from_static(TransitionStorageClass::ONEZONE_IA)), - b"STANDARD_IA" => Ok(Self::from_static(TransitionStorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DEEP_ARCHIVE" => Ok(Self::from_static(TransitionStorageClass::DEEP_ARCHIVE)), +b"GLACIER" => Ok(Self::from_static(TransitionStorageClass::GLACIER)), +b"GLACIER_IR" => Ok(Self::from_static(TransitionStorageClass::GLACIER_IR)), +b"INTELLIGENT_TIERING" => Ok(Self::from_static(TransitionStorageClass::INTELLIGENT_TIERING)), +b"ONEZONE_IA" => Ok(Self::from_static(TransitionStorageClass::ONEZONE_IA)), +b"STANDARD_IA" => Ok(Self::from_static(TransitionStorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Type { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Type { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"AmazonCustomerByEmail" => Ok(Self::from_static(Type::AMAZON_CUSTOMER_BY_EMAIL)), - b"CanonicalUser" => Ok(Self::from_static(Type::CANONICAL_USER)), - b"Group" => Ok(Self::from_static(Type::GROUP)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"AmazonCustomerByEmail" => Ok(Self::from_static(Type::AMAZON_CUSTOMER_BY_EMAIL)), +b"CanonicalUser" => Ok(Self::from_static(Type::CANONICAL_USER)), +b"Group" => Ok(Self::from_static(Type::GROUP)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for VersioningConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.exclude_folders { - s.content("ExcludeFolders", val)?; - } - if let Some(iter) = &self.excluded_prefixes { - s.flattened_list("ExcludedPrefixes", iter)?; - } - if let Some(ref val) = self.mfa_delete { - s.content("MfaDelete", val)?; - } - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.exclude_folders { +s.content("ExcludeFolders", val)?; +} +if let Some(iter) = &self.excluded_prefixes { +s.flattened_list("ExcludedPrefixes", iter)?; +} +if let Some(ref val) = self.mfa_delete { +s.content("MfaDelete", val)?; +} +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for VersioningConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut exclude_folders: Option = None; - let mut excluded_prefixes: Option = None; - let mut mfa_delete: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"ExcludeFolders" => { - if exclude_folders.is_some() { - return Err(DeError::DuplicateField); - } - exclude_folders = Some(d.content()?); - Ok(()) - } - b"ExcludedPrefixes" => { - let ans: ExcludedPrefix = d.content()?; - excluded_prefixes.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"MfaDelete" => { - if mfa_delete.is_some() { - return Err(DeError::DuplicateField); - } - mfa_delete = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - exclude_folders, - excluded_prefixes, - mfa_delete, - status, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut exclude_folders: Option = None; +let mut excluded_prefixes: Option = None; +let mut mfa_delete: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"ExcludeFolders" => { +if exclude_folders.is_some() { return Err(DeError::DuplicateField); } +exclude_folders = Some(d.content()?); +Ok(()) +} +b"ExcludedPrefixes" => { +let ans: ExcludedPrefix = d.content()?; +excluded_prefixes.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"MfaDelete" => { +if mfa_delete.is_some() { return Err(DeError::DuplicateField); } +mfa_delete = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +exclude_folders, +excluded_prefixes, +mfa_delete, +status, +}) +} } impl SerializeContent for WebsiteConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.error_document { - s.content("ErrorDocument", val)?; - } - if let Some(ref val) = self.index_document { - s.content("IndexDocument", val)?; - } - if let Some(ref val) = self.redirect_all_requests_to { - s.content("RedirectAllRequestsTo", val)?; - } - if let Some(iter) = &self.routing_rules { - s.list("RoutingRules", "RoutingRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.error_document { +s.content("ErrorDocument", val)?; +} +if let Some(ref val) = self.index_document { +s.content("IndexDocument", val)?; +} +if let Some(ref val) = self.redirect_all_requests_to { +s.content("RedirectAllRequestsTo", val)?; +} +if let Some(iter) = &self.routing_rules { +s.list("RoutingRules", "RoutingRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for WebsiteConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut error_document: Option = None; - let mut index_document: Option = None; - let mut redirect_all_requests_to: Option = None; - let mut routing_rules: Option = None; - d.for_each_element(|d, x| match x { - b"ErrorDocument" => { - if error_document.is_some() { - return Err(DeError::DuplicateField); - } - error_document = Some(d.content()?); - Ok(()) - } - b"IndexDocument" => { - if index_document.is_some() { - return Err(DeError::DuplicateField); - } - index_document = Some(d.content()?); - Ok(()) - } - b"RedirectAllRequestsTo" => { - if redirect_all_requests_to.is_some() { - return Err(DeError::DuplicateField); - } - redirect_all_requests_to = Some(d.content()?); - Ok(()) - } - b"RoutingRules" => { - if routing_rules.is_some() { - return Err(DeError::DuplicateField); - } - routing_rules = Some(d.list_content("RoutingRule")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - error_document, - index_document, - redirect_all_requests_to, - routing_rules, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut error_document: Option = None; +let mut index_document: Option = None; +let mut redirect_all_requests_to: Option = None; +let mut routing_rules: Option = None; +d.for_each_element(|d, x| match x { +b"ErrorDocument" => { +if error_document.is_some() { return Err(DeError::DuplicateField); } +error_document = Some(d.content()?); +Ok(()) +} +b"IndexDocument" => { +if index_document.is_some() { return Err(DeError::DuplicateField); } +index_document = Some(d.content()?); +Ok(()) +} +b"RedirectAllRequestsTo" => { +if redirect_all_requests_to.is_some() { return Err(DeError::DuplicateField); } +redirect_all_requests_to = Some(d.content()?); +Ok(()) +} +b"RoutingRules" => { +if routing_rules.is_some() { return Err(DeError::DuplicateField); } +routing_rules = Some(d.list_content("RoutingRule")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +error_document, +index_document, +redirect_all_requests_to, +routing_rules, +}) +} } diff --git a/crates/s3s/tests/xml.rs b/crates/s3s/tests/xml.rs index 20077b2b..e7a2b11f 100644 --- a/crates/s3s/tests/xml.rs +++ b/crates/s3s/tests/xml.rs @@ -199,9 +199,8 @@ fn tagging() { #[test] fn lifecycle_expiration() { let val = s3s::dto::LifecycleExpiration { - date: None, days: Some(365), - expired_object_delete_marker: None, + ..Default::default() }; let ans = serialize_content(&val).unwrap(); @@ -285,6 +284,37 @@ fn assume_role_output() { test_serde(&val); } +#[cfg(feature = "minio")] +#[test] +fn minio_bucket_lifecycle_configuration_root() { + // MinIO compatibility: accept both LifecycleConfiguration and BucketLifecycleConfiguration + let xml_bucket = r" + + + r1 + Enabled + 30 + + + "; + let val = deserialize::(xml_bucket.as_bytes()).unwrap(); + assert_eq!(val.rules.len(), 1); + assert_eq!(val.rules[0].id.as_deref(), Some("r1")); + + let xml_std = r" + + + r2 + Enabled + 30 + + + "; + let val2 = deserialize::(xml_std.as_bytes()).unwrap(); + assert_eq!(val2.rules.len(), 1); + assert_eq!(val2.rules[0].id.as_deref(), Some("r2")); +} + #[cfg(feature = "minio")] #[test] fn minio_versioning_configuration() { diff --git a/data/minio-patches.json b/data/minio-patches.json index 1de7eee3..813dab89 100644 --- a/data/minio-patches.json +++ b/data/minio-patches.json @@ -173,6 +173,59 @@ } } } + }, + "com.amazonaws.s3#DelMarkerExpiration": { + "type": "structure", + "members": { + "Days": { + "target": "com.amazonaws.s3#Days" + } + }, + "traits": { + "s3s#minio": "" + } + }, + "com.amazonaws.s3#BucketLifecycleConfiguration": { + "type": "structure", + "members": { + "ExpiryUpdatedAt": { + "target": "com.amazonaws.s3#Date", + "traits": { + "smithy.api#xmlName": "ExpiryUpdatedAt", + "s3s#minio": "" + } + } + } + }, + "com.amazonaws.s3#LifecycleRule": { + "type": "structure", + "members": { + "DelMarkerExpiration": { + "target": "com.amazonaws.s3#DelMarkerExpiration", + "traits": { + "smithy.api#xmlName": "DelMarkerExpiration", + "s3s#minio": "" + } + } + } + }, + "com.amazonaws.s3#ExpiredObjectAllVersions": { + "type": "boolean", + "traits": { + "s3s#minio": "" + } + }, + "com.amazonaws.s3#LifecycleExpiration": { + "type": "structure", + "members": { + "ExpiredObjectAllVersions": { + "target": "com.amazonaws.s3#ExpiredObjectAllVersions", + "traits": { + "smithy.api#xmlName": "ExpiredObjectAllVersions", + "s3s#minio": "" + } + } + } } } } \ No newline at end of file From 9dce0d0c9f652668b5ee1cedda866bb1e6175ec0 Mon Sep 17 00:00:00 2001 From: weisd Date: Thu, 5 Mar 2026 13:50:20 +0800 Subject: [PATCH 2/4] chore: regenerate all generated files via codegen --- crates/s3s-aws/src/conv/generated.rs | 14094 ++-- crates/s3s-aws/src/proxy/generated.rs | 4900 +- crates/s3s-aws/src/proxy/generated_minio.rs | 4900 +- crates/s3s/src/access/generated.rs | 1490 +- crates/s3s/src/access/generated_minio.rs | 1490 +- crates/s3s/src/dto/generated.rs | 66600 +++++++++--------- crates/s3s/src/error/generated.rs | 4859 +- crates/s3s/src/error/generated_minio.rs | 4859 +- crates/s3s/src/header/generated.rs | 61 +- crates/s3s/src/header/generated_minio.rs | 61 +- crates/s3s/src/ops/generated.rs | 10396 +-- crates/s3s/src/s3_trait.rs | 14144 ++-- crates/s3s/src/xml/generated.rs | 15274 ++-- 13 files changed, 71118 insertions(+), 72010 deletions(-) diff --git a/crates/s3s-aws/src/conv/generated.rs b/crates/s3s-aws/src/conv/generated.rs index 54deba94..d45ca871 100644 --- a/crates/s3s-aws/src/conv/generated.rs +++ b/crates/s3s-aws/src/conv/generated.rs @@ -4,9271 +4,9295 @@ use super::*; impl AwsConversion for s3s::dto::AbortIncompleteMultipartUpload { type Target = aws_sdk_s3::types::AbortIncompleteMultipartUpload; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - days_after_initiation: try_from_aws(x.days_after_initiation)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +days_after_initiation: try_from_aws(x.days_after_initiation)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_days_after_initiation(try_into_aws(x.days_after_initiation)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_days_after_initiation(try_into_aws(x.days_after_initiation)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AbortMultipartUploadInput { type Target = aws_sdk_s3::operation::abort_multipart_upload::AbortMultipartUploadInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match_initiated_time: try_from_aws(x.if_match_initiated_time)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match_initiated_time(try_into_aws(x.if_match_initiated_time)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match_initiated_time: try_from_aws(x.if_match_initiated_time)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match_initiated_time(try_into_aws(x.if_match_initiated_time)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::AbortMultipartUploadOutput { type Target = aws_sdk_s3::operation::abort_multipart_upload::AbortMultipartUploadOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AccelerateConfiguration { type Target = aws_sdk_s3::types::AccelerateConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AccessControlPolicy { type Target = aws_sdk_s3::types::AccessControlPolicy; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grants: try_from_aws(x.grants)?, - owner: try_from_aws(x.owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grants: try_from_aws(x.grants)?, +owner: try_from_aws(x.owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grants(try_into_aws(x.grants)?); - y = y.set_owner(try_into_aws(x.owner)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grants(try_into_aws(x.grants)?); +y = y.set_owner(try_into_aws(x.owner)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AccessControlTranslation { type Target = aws_sdk_s3::types::AccessControlTranslation; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - owner: try_from_aws(x.owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +owner: try_from_aws(x.owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_owner(Some(try_into_aws(x.owner)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_owner(Some(try_into_aws(x.owner)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::AnalyticsAndOperator { type Target = aws_sdk_s3::types::AnalyticsAndOperator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AnalyticsConfiguration { type Target = aws_sdk_s3::types::AnalyticsConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - storage_class_analysis: unwrap_from_aws(x.storage_class_analysis, "storage_class_analysis")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +storage_class_analysis: unwrap_from_aws(x.storage_class_analysis, "storage_class_analysis")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_storage_class_analysis(Some(try_into_aws(x.storage_class_analysis)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_storage_class_analysis(Some(try_into_aws(x.storage_class_analysis)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::AnalyticsExportDestination { type Target = aws_sdk_s3::types::AnalyticsExportDestination; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::AnalyticsFilter { type Target = aws_sdk_s3::types::AnalyticsFilter; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::AnalyticsFilter::And(v) => Self::And(try_from_aws(v)?), - aws_sdk_s3::types::AnalyticsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), - aws_sdk_s3::types::AnalyticsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), - _ => unimplemented!("unknown variant of aws_sdk_s3::types::AnalyticsFilter: {x:?}"), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(match x { - Self::And(v) => aws_sdk_s3::types::AnalyticsFilter::And(try_into_aws(v)?), - Self::Prefix(v) => aws_sdk_s3::types::AnalyticsFilter::Prefix(try_into_aws(v)?), - Self::Tag(v) => aws_sdk_s3::types::AnalyticsFilter::Tag(try_into_aws(v)?), - _ => unimplemented!("unknown variant of AnalyticsFilter: {x:?}"), - }) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::AnalyticsFilter::And(v) => Self::And(try_from_aws(v)?), +aws_sdk_s3::types::AnalyticsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), +aws_sdk_s3::types::AnalyticsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), +_ => unimplemented!("unknown variant of aws_sdk_s3::types::AnalyticsFilter: {x:?}"), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(match x { +Self::And(v) => aws_sdk_s3::types::AnalyticsFilter::And(try_into_aws(v)?), +Self::Prefix(v) => aws_sdk_s3::types::AnalyticsFilter::Prefix(try_into_aws(v)?), +Self::Tag(v) => aws_sdk_s3::types::AnalyticsFilter::Tag(try_into_aws(v)?), +_ => unimplemented!("unknown variant of AnalyticsFilter: {x:?}"), +}) +} } impl AwsConversion for s3s::dto::AnalyticsS3BucketDestination { type Target = aws_sdk_s3::types::AnalyticsS3BucketDestination; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: try_from_aws(x.bucket)?, - bucket_account_id: try_from_aws(x.bucket_account_id)?, - format: try_from_aws(x.format)?, - prefix: try_from_aws(x.prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_account_id(try_into_aws(x.bucket_account_id)?); - y = y.set_format(Some(try_into_aws(x.format)?)); - y = y.set_prefix(try_into_aws(x.prefix)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: try_from_aws(x.bucket)?, +bucket_account_id: try_from_aws(x.bucket_account_id)?, +format: try_from_aws(x.format)?, +prefix: try_from_aws(x.prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_account_id(try_into_aws(x.bucket_account_id)?); +y = y.set_format(Some(try_into_aws(x.format)?)); +y = y.set_prefix(try_into_aws(x.prefix)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::AnalyticsS3ExportFileFormat { type Target = aws_sdk_s3::types::AnalyticsS3ExportFileFormat; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::AnalyticsS3ExportFileFormat::Csv => Self::from_static(Self::CSV), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::AnalyticsS3ExportFileFormat::Csv => Self::from_static(Self::CSV), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::AnalyticsS3ExportFileFormat::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::AnalyticsS3ExportFileFormat::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ArchiveStatus { type Target = aws_sdk_s3::types::ArchiveStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ArchiveStatus::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), - aws_sdk_s3::types::ArchiveStatus::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ArchiveStatus::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), +aws_sdk_s3::types::ArchiveStatus::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ArchiveStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ArchiveStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Bucket { type Target = aws_sdk_s3::types::Bucket; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_region: try_from_aws(x.bucket_region)?, - creation_date: try_from_aws(x.creation_date)?, - name: try_from_aws(x.name)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_region: try_from_aws(x.bucket_region)?, +creation_date: try_from_aws(x.creation_date)?, +name: try_from_aws(x.name)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_region(try_into_aws(x.bucket_region)?); - y = y.set_creation_date(try_into_aws(x.creation_date)?); - y = y.set_name(try_into_aws(x.name)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_region(try_into_aws(x.bucket_region)?); +y = y.set_creation_date(try_into_aws(x.creation_date)?); +y = y.set_name(try_into_aws(x.name)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketAccelerateStatus { type Target = aws_sdk_s3::types::BucketAccelerateStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketAccelerateStatus::Enabled => Self::from_static(Self::ENABLED), - aws_sdk_s3::types::BucketAccelerateStatus::Suspended => Self::from_static(Self::SUSPENDED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketAccelerateStatus::Enabled => Self::from_static(Self::ENABLED), +aws_sdk_s3::types::BucketAccelerateStatus::Suspended => Self::from_static(Self::SUSPENDED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketAccelerateStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketAccelerateStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketAlreadyExists { type Target = aws_sdk_s3::types::error::BucketAlreadyExists; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketAlreadyOwnedByYou { type Target = aws_sdk_s3::types::error::BucketAlreadyOwnedByYou; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketCannedACL { type Target = aws_sdk_s3::types::BucketCannedAcl; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), - aws_sdk_s3::types::BucketCannedAcl::Private => Self::from_static(Self::PRIVATE), - aws_sdk_s3::types::BucketCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), - aws_sdk_s3::types::BucketCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), +aws_sdk_s3::types::BucketCannedAcl::Private => Self::from_static(Self::PRIVATE), +aws_sdk_s3::types::BucketCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), +aws_sdk_s3::types::BucketCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketCannedAcl::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketCannedAcl::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketInfo { type Target = aws_sdk_s3::types::BucketInfo; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - data_redundancy: try_from_aws(x.data_redundancy)?, - type_: try_from_aws(x.r#type)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +data_redundancy: try_from_aws(x.data_redundancy)?, +type_: try_from_aws(x.r#type)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_data_redundancy(try_into_aws(x.data_redundancy)?); - y = y.set_type(try_into_aws(x.type_)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_data_redundancy(try_into_aws(x.data_redundancy)?); +y = y.set_type(try_into_aws(x.type_)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketLifecycleConfiguration { type Target = aws_sdk_s3::types::BucketLifecycleConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - rules: try_from_aws(x.rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +rules: try_from_aws(x.rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_rules(Some(try_into_aws(x.rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_rules(Some(try_into_aws(x.rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::BucketLocationConstraint { type Target = aws_sdk_s3::types::BucketLocationConstraint; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketLocationConstraint::Eu => Self::from_static(Self::EU), - aws_sdk_s3::types::BucketLocationConstraint::AfSouth1 => Self::from_static(Self::AF_SOUTH_1), - aws_sdk_s3::types::BucketLocationConstraint::ApEast1 => Self::from_static(Self::AP_EAST_1), - aws_sdk_s3::types::BucketLocationConstraint::ApNortheast1 => Self::from_static(Self::AP_NORTHEAST_1), - aws_sdk_s3::types::BucketLocationConstraint::ApNortheast2 => Self::from_static(Self::AP_NORTHEAST_2), - aws_sdk_s3::types::BucketLocationConstraint::ApNortheast3 => Self::from_static(Self::AP_NORTHEAST_3), - aws_sdk_s3::types::BucketLocationConstraint::ApSouth1 => Self::from_static(Self::AP_SOUTH_1), - aws_sdk_s3::types::BucketLocationConstraint::ApSouth2 => Self::from_static(Self::AP_SOUTH_2), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast1 => Self::from_static(Self::AP_SOUTHEAST_1), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast2 => Self::from_static(Self::AP_SOUTHEAST_2), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast3 => Self::from_static(Self::AP_SOUTHEAST_3), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast4 => Self::from_static(Self::AP_SOUTHEAST_4), - aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast5 => Self::from_static(Self::AP_SOUTHEAST_5), - aws_sdk_s3::types::BucketLocationConstraint::CaCentral1 => Self::from_static(Self::CA_CENTRAL_1), - aws_sdk_s3::types::BucketLocationConstraint::CnNorth1 => Self::from_static(Self::CN_NORTH_1), - aws_sdk_s3::types::BucketLocationConstraint::CnNorthwest1 => Self::from_static(Self::CN_NORTHWEST_1), - aws_sdk_s3::types::BucketLocationConstraint::EuCentral1 => Self::from_static(Self::EU_CENTRAL_1), - aws_sdk_s3::types::BucketLocationConstraint::EuCentral2 => Self::from_static(Self::EU_CENTRAL_2), - aws_sdk_s3::types::BucketLocationConstraint::EuNorth1 => Self::from_static(Self::EU_NORTH_1), - aws_sdk_s3::types::BucketLocationConstraint::EuSouth1 => Self::from_static(Self::EU_SOUTH_1), - aws_sdk_s3::types::BucketLocationConstraint::EuSouth2 => Self::from_static(Self::EU_SOUTH_2), - aws_sdk_s3::types::BucketLocationConstraint::EuWest1 => Self::from_static(Self::EU_WEST_1), - aws_sdk_s3::types::BucketLocationConstraint::EuWest2 => Self::from_static(Self::EU_WEST_2), - aws_sdk_s3::types::BucketLocationConstraint::EuWest3 => Self::from_static(Self::EU_WEST_3), - aws_sdk_s3::types::BucketLocationConstraint::IlCentral1 => Self::from_static(Self::IL_CENTRAL_1), - aws_sdk_s3::types::BucketLocationConstraint::MeCentral1 => Self::from_static(Self::ME_CENTRAL_1), - aws_sdk_s3::types::BucketLocationConstraint::MeSouth1 => Self::from_static(Self::ME_SOUTH_1), - aws_sdk_s3::types::BucketLocationConstraint::SaEast1 => Self::from_static(Self::SA_EAST_1), - aws_sdk_s3::types::BucketLocationConstraint::UsEast2 => Self::from_static(Self::US_EAST_2), - aws_sdk_s3::types::BucketLocationConstraint::UsGovEast1 => Self::from_static(Self::US_GOV_EAST_1), - aws_sdk_s3::types::BucketLocationConstraint::UsGovWest1 => Self::from_static(Self::US_GOV_WEST_1), - aws_sdk_s3::types::BucketLocationConstraint::UsWest1 => Self::from_static(Self::US_WEST_1), - aws_sdk_s3::types::BucketLocationConstraint::UsWest2 => Self::from_static(Self::US_WEST_2), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketLocationConstraint::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketLocationConstraint::Eu => Self::from_static(Self::EU), +aws_sdk_s3::types::BucketLocationConstraint::AfSouth1 => Self::from_static(Self::AF_SOUTH_1), +aws_sdk_s3::types::BucketLocationConstraint::ApEast1 => Self::from_static(Self::AP_EAST_1), +aws_sdk_s3::types::BucketLocationConstraint::ApNortheast1 => Self::from_static(Self::AP_NORTHEAST_1), +aws_sdk_s3::types::BucketLocationConstraint::ApNortheast2 => Self::from_static(Self::AP_NORTHEAST_2), +aws_sdk_s3::types::BucketLocationConstraint::ApNortheast3 => Self::from_static(Self::AP_NORTHEAST_3), +aws_sdk_s3::types::BucketLocationConstraint::ApSouth1 => Self::from_static(Self::AP_SOUTH_1), +aws_sdk_s3::types::BucketLocationConstraint::ApSouth2 => Self::from_static(Self::AP_SOUTH_2), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast1 => Self::from_static(Self::AP_SOUTHEAST_1), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast2 => Self::from_static(Self::AP_SOUTHEAST_2), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast3 => Self::from_static(Self::AP_SOUTHEAST_3), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast4 => Self::from_static(Self::AP_SOUTHEAST_4), +aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast5 => Self::from_static(Self::AP_SOUTHEAST_5), +aws_sdk_s3::types::BucketLocationConstraint::CaCentral1 => Self::from_static(Self::CA_CENTRAL_1), +aws_sdk_s3::types::BucketLocationConstraint::CnNorth1 => Self::from_static(Self::CN_NORTH_1), +aws_sdk_s3::types::BucketLocationConstraint::CnNorthwest1 => Self::from_static(Self::CN_NORTHWEST_1), +aws_sdk_s3::types::BucketLocationConstraint::EuCentral1 => Self::from_static(Self::EU_CENTRAL_1), +aws_sdk_s3::types::BucketLocationConstraint::EuCentral2 => Self::from_static(Self::EU_CENTRAL_2), +aws_sdk_s3::types::BucketLocationConstraint::EuNorth1 => Self::from_static(Self::EU_NORTH_1), +aws_sdk_s3::types::BucketLocationConstraint::EuSouth1 => Self::from_static(Self::EU_SOUTH_1), +aws_sdk_s3::types::BucketLocationConstraint::EuSouth2 => Self::from_static(Self::EU_SOUTH_2), +aws_sdk_s3::types::BucketLocationConstraint::EuWest1 => Self::from_static(Self::EU_WEST_1), +aws_sdk_s3::types::BucketLocationConstraint::EuWest2 => Self::from_static(Self::EU_WEST_2), +aws_sdk_s3::types::BucketLocationConstraint::EuWest3 => Self::from_static(Self::EU_WEST_3), +aws_sdk_s3::types::BucketLocationConstraint::IlCentral1 => Self::from_static(Self::IL_CENTRAL_1), +aws_sdk_s3::types::BucketLocationConstraint::MeCentral1 => Self::from_static(Self::ME_CENTRAL_1), +aws_sdk_s3::types::BucketLocationConstraint::MeSouth1 => Self::from_static(Self::ME_SOUTH_1), +aws_sdk_s3::types::BucketLocationConstraint::SaEast1 => Self::from_static(Self::SA_EAST_1), +aws_sdk_s3::types::BucketLocationConstraint::UsEast2 => Self::from_static(Self::US_EAST_2), +aws_sdk_s3::types::BucketLocationConstraint::UsGovEast1 => Self::from_static(Self::US_GOV_EAST_1), +aws_sdk_s3::types::BucketLocationConstraint::UsGovWest1 => Self::from_static(Self::US_GOV_WEST_1), +aws_sdk_s3::types::BucketLocationConstraint::UsWest1 => Self::from_static(Self::US_WEST_1), +aws_sdk_s3::types::BucketLocationConstraint::UsWest2 => Self::from_static(Self::US_WEST_2), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketLocationConstraint::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketLoggingStatus { type Target = aws_sdk_s3::types::BucketLoggingStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - logging_enabled: try_from_aws(x.logging_enabled)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +logging_enabled: try_from_aws(x.logging_enabled)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::BucketLogsPermission { type Target = aws_sdk_s3::types::BucketLogsPermission; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketLogsPermission::FullControl => Self::from_static(Self::FULL_CONTROL), - aws_sdk_s3::types::BucketLogsPermission::Read => Self::from_static(Self::READ), - aws_sdk_s3::types::BucketLogsPermission::Write => Self::from_static(Self::WRITE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketLogsPermission::FullControl => Self::from_static(Self::FULL_CONTROL), +aws_sdk_s3::types::BucketLogsPermission::Read => Self::from_static(Self::READ), +aws_sdk_s3::types::BucketLogsPermission::Write => Self::from_static(Self::WRITE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketLogsPermission::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketLogsPermission::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketType { type Target = aws_sdk_s3::types::BucketType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketType::Directory => Self::from_static(Self::DIRECTORY), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketType::Directory => Self::from_static(Self::DIRECTORY), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::BucketVersioningStatus { type Target = aws_sdk_s3::types::BucketVersioningStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::BucketVersioningStatus::Enabled => Self::from_static(Self::ENABLED), - aws_sdk_s3::types::BucketVersioningStatus::Suspended => Self::from_static(Self::SUSPENDED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::BucketVersioningStatus::Enabled => Self::from_static(Self::ENABLED), +aws_sdk_s3::types::BucketVersioningStatus::Suspended => Self::from_static(Self::SUSPENDED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::BucketVersioningStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::BucketVersioningStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::CORSConfiguration { type Target = aws_sdk_s3::types::CorsConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - cors_rules: try_from_aws(x.cors_rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +cors_rules: try_from_aws(x.cors_rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_cors_rules(Some(try_into_aws(x.cors_rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_cors_rules(Some(try_into_aws(x.cors_rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CORSRule { type Target = aws_sdk_s3::types::CorsRule; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - allowed_headers: try_from_aws(x.allowed_headers)?, - allowed_methods: try_from_aws(x.allowed_methods)?, - allowed_origins: try_from_aws(x.allowed_origins)?, - expose_headers: try_from_aws(x.expose_headers)?, - id: try_from_aws(x.id)?, - max_age_seconds: try_from_aws(x.max_age_seconds)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_allowed_headers(try_into_aws(x.allowed_headers)?); - y = y.set_allowed_methods(Some(try_into_aws(x.allowed_methods)?)); - y = y.set_allowed_origins(Some(try_into_aws(x.allowed_origins)?)); - y = y.set_expose_headers(try_into_aws(x.expose_headers)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_max_age_seconds(try_into_aws(x.max_age_seconds)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +allowed_headers: try_from_aws(x.allowed_headers)?, +allowed_methods: try_from_aws(x.allowed_methods)?, +allowed_origins: try_from_aws(x.allowed_origins)?, +expose_headers: try_from_aws(x.expose_headers)?, +id: try_from_aws(x.id)?, +max_age_seconds: try_from_aws(x.max_age_seconds)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_allowed_headers(try_into_aws(x.allowed_headers)?); +y = y.set_allowed_methods(Some(try_into_aws(x.allowed_methods)?)); +y = y.set_allowed_origins(Some(try_into_aws(x.allowed_origins)?)); +y = y.set_expose_headers(try_into_aws(x.expose_headers)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_max_age_seconds(try_into_aws(x.max_age_seconds)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CSVInput { type Target = aws_sdk_s3::types::CsvInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - allow_quoted_record_delimiter: try_from_aws(x.allow_quoted_record_delimiter)?, - comments: try_from_aws(x.comments)?, - field_delimiter: try_from_aws(x.field_delimiter)?, - file_header_info: try_from_aws(x.file_header_info)?, - quote_character: try_from_aws(x.quote_character)?, - quote_escape_character: try_from_aws(x.quote_escape_character)?, - record_delimiter: try_from_aws(x.record_delimiter)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_allow_quoted_record_delimiter(try_into_aws(x.allow_quoted_record_delimiter)?); - y = y.set_comments(try_into_aws(x.comments)?); - y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); - y = y.set_file_header_info(try_into_aws(x.file_header_info)?); - y = y.set_quote_character(try_into_aws(x.quote_character)?); - y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); - y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +allow_quoted_record_delimiter: try_from_aws(x.allow_quoted_record_delimiter)?, +comments: try_from_aws(x.comments)?, +field_delimiter: try_from_aws(x.field_delimiter)?, +file_header_info: try_from_aws(x.file_header_info)?, +quote_character: try_from_aws(x.quote_character)?, +quote_escape_character: try_from_aws(x.quote_escape_character)?, +record_delimiter: try_from_aws(x.record_delimiter)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_allow_quoted_record_delimiter(try_into_aws(x.allow_quoted_record_delimiter)?); +y = y.set_comments(try_into_aws(x.comments)?); +y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); +y = y.set_file_header_info(try_into_aws(x.file_header_info)?); +y = y.set_quote_character(try_into_aws(x.quote_character)?); +y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); +y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CSVOutput { type Target = aws_sdk_s3::types::CsvOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - field_delimiter: try_from_aws(x.field_delimiter)?, - quote_character: try_from_aws(x.quote_character)?, - quote_escape_character: try_from_aws(x.quote_escape_character)?, - quote_fields: try_from_aws(x.quote_fields)?, - record_delimiter: try_from_aws(x.record_delimiter)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); - y = y.set_quote_character(try_into_aws(x.quote_character)?); - y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); - y = y.set_quote_fields(try_into_aws(x.quote_fields)?); - y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +field_delimiter: try_from_aws(x.field_delimiter)?, +quote_character: try_from_aws(x.quote_character)?, +quote_escape_character: try_from_aws(x.quote_escape_character)?, +quote_fields: try_from_aws(x.quote_fields)?, +record_delimiter: try_from_aws(x.record_delimiter)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); +y = y.set_quote_character(try_into_aws(x.quote_character)?); +y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); +y = y.set_quote_fields(try_into_aws(x.quote_fields)?); +y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Checksum { type Target = aws_sdk_s3::types::Checksum; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ChecksumAlgorithm { type Target = aws_sdk_s3::types::ChecksumAlgorithm; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ChecksumAlgorithm::Crc32 => Self::from_static(Self::CRC32), - aws_sdk_s3::types::ChecksumAlgorithm::Crc32C => Self::from_static(Self::CRC32C), - aws_sdk_s3::types::ChecksumAlgorithm::Crc64Nvme => Self::from_static(Self::CRC64NVME), - aws_sdk_s3::types::ChecksumAlgorithm::Sha1 => Self::from_static(Self::SHA1), - aws_sdk_s3::types::ChecksumAlgorithm::Sha256 => Self::from_static(Self::SHA256), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ChecksumAlgorithm::Crc32 => Self::from_static(Self::CRC32), +aws_sdk_s3::types::ChecksumAlgorithm::Crc32C => Self::from_static(Self::CRC32C), +aws_sdk_s3::types::ChecksumAlgorithm::Crc64Nvme => Self::from_static(Self::CRC64NVME), +aws_sdk_s3::types::ChecksumAlgorithm::Sha1 => Self::from_static(Self::SHA1), +aws_sdk_s3::types::ChecksumAlgorithm::Sha256 => Self::from_static(Self::SHA256), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ChecksumAlgorithm::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ChecksumAlgorithm::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ChecksumMode { type Target = aws_sdk_s3::types::ChecksumMode; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ChecksumMode::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ChecksumMode::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ChecksumMode::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ChecksumMode::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ChecksumType { type Target = aws_sdk_s3::types::ChecksumType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ChecksumType::Composite => Self::from_static(Self::COMPOSITE), - aws_sdk_s3::types::ChecksumType::FullObject => Self::from_static(Self::FULL_OBJECT), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ChecksumType::Composite => Self::from_static(Self::COMPOSITE), +aws_sdk_s3::types::ChecksumType::FullObject => Self::from_static(Self::FULL_OBJECT), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ChecksumType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ChecksumType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::CommonPrefix { type Target = aws_sdk_s3::types::CommonPrefix; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(try_into_aws(x.prefix)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(try_into_aws(x.prefix)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CompleteMultipartUploadInput { type Target = aws_sdk_s3::operation::complete_multipart_upload::CompleteMultipartUploadInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match: try_from_aws(x.if_match)?, - if_none_match: try_from_aws(x.if_none_match)?, - key: unwrap_from_aws(x.key, "key")?, - mpu_object_size: try_from_aws(x.mpu_object_size)?, - multipart_upload: try_from_aws(x.multipart_upload)?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_none_match(try_into_aws(x.if_none_match)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_mpu_object_size(try_into_aws(x.mpu_object_size)?); - y = y.set_multipart_upload(try_into_aws(x.multipart_upload)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match: try_from_aws(x.if_match)?, +if_none_match: try_from_aws(x.if_none_match)?, +key: unwrap_from_aws(x.key, "key")?, +mpu_object_size: try_from_aws(x.mpu_object_size)?, +multipart_upload: try_from_aws(x.multipart_upload)?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_none_match(try_into_aws(x.if_none_match)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_mpu_object_size(try_into_aws(x.mpu_object_size)?); +y = y.set_multipart_upload(try_into_aws(x.multipart_upload)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CompleteMultipartUploadOutput { type Target = aws_sdk_s3::operation::complete_multipart_upload::CompleteMultipartUploadOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: try_from_aws(x.bucket)?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - expiration: try_from_aws(x.expiration)?, - key: try_from_aws(x.key)?, - location: try_from_aws(x.location)?, - request_charged: try_from_aws(x.request_charged)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - version_id: try_from_aws(x.version_id)?, - future: None, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_location(try_into_aws(x.location)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: try_from_aws(x.bucket)?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +expiration: try_from_aws(x.expiration)?, +key: try_from_aws(x.key)?, +location: try_from_aws(x.location)?, +request_charged: try_from_aws(x.request_charged)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +version_id: try_from_aws(x.version_id)?, +future: None, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_location(try_into_aws(x.location)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CompletedMultipartUpload { type Target = aws_sdk_s3::types::CompletedMultipartUpload; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - parts: try_from_aws(x.parts)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +parts: try_from_aws(x.parts)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_parts(try_into_aws(x.parts)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_parts(try_into_aws(x.parts)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CompletedPart { type Target = aws_sdk_s3::types::CompletedPart; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - e_tag: try_from_aws(x.e_tag)?, - part_number: try_from_aws(x.part_number)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_part_number(try_into_aws(x.part_number)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +e_tag: try_from_aws(x.e_tag)?, +part_number: try_from_aws(x.part_number)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_part_number(try_into_aws(x.part_number)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CompressionType { type Target = aws_sdk_s3::types::CompressionType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::CompressionType::Bzip2 => Self::from_static(Self::BZIP2), - aws_sdk_s3::types::CompressionType::Gzip => Self::from_static(Self::GZIP), - aws_sdk_s3::types::CompressionType::None => Self::from_static(Self::NONE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::CompressionType::Bzip2 => Self::from_static(Self::BZIP2), +aws_sdk_s3::types::CompressionType::Gzip => Self::from_static(Self::GZIP), +aws_sdk_s3::types::CompressionType::None => Self::from_static(Self::NONE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::CompressionType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::CompressionType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Condition { type Target = aws_sdk_s3::types::Condition; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - http_error_code_returned_equals: try_from_aws(x.http_error_code_returned_equals)?, - key_prefix_equals: try_from_aws(x.key_prefix_equals)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +http_error_code_returned_equals: try_from_aws(x.http_error_code_returned_equals)?, +key_prefix_equals: try_from_aws(x.key_prefix_equals)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_http_error_code_returned_equals(try_into_aws(x.http_error_code_returned_equals)?); - y = y.set_key_prefix_equals(try_into_aws(x.key_prefix_equals)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_http_error_code_returned_equals(try_into_aws(x.http_error_code_returned_equals)?); +y = y.set_key_prefix_equals(try_into_aws(x.key_prefix_equals)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ContinuationEvent { type Target = aws_sdk_s3::types::ContinuationEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CopyObjectInput { type Target = aws_sdk_s3::operation::copy_object::CopyObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_type: try_from_aws(x.content_type)?, - copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, - copy_source_if_match: try_from_aws(x.copy_source_if_match)?, - copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, - copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, - copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, - copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, - copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, - copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, - expires: try_from_aws(x.expires)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - key: unwrap_from_aws(x.key, "key")?, - metadata: try_from_aws(x.metadata)?, - metadata_directive: try_from_aws(x.metadata_directive)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - tagging: try_from_aws(x.tagging)?, - tagging_directive: try_from_aws(x.tagging_directive)?, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); - y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); - y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); - y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); - y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); - y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); - y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); - y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_metadata_directive(try_into_aws(x.metadata_directive)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tagging(try_into_aws(x.tagging)?); - y = y.set_tagging_directive(try_into_aws(x.tagging_directive)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_type: try_from_aws(x.content_type)?, +copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, +copy_source_if_match: try_from_aws(x.copy_source_if_match)?, +copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, +copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, +copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, +copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, +copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, +copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, +expires: try_from_aws(x.expires)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +key: unwrap_from_aws(x.key, "key")?, +metadata: try_from_aws(x.metadata)?, +metadata_directive: try_from_aws(x.metadata_directive)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +tagging: try_from_aws(x.tagging)?, +tagging_directive: try_from_aws(x.tagging_directive)?, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); +y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); +y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); +y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); +y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); +y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); +y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); +y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_metadata_directive(try_into_aws(x.metadata_directive)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tagging(try_into_aws(x.tagging)?); +y = y.set_tagging_directive(try_into_aws(x.tagging_directive)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CopyObjectOutput { type Target = aws_sdk_s3::operation::copy_object::CopyObjectOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - copy_object_result: try_from_aws(x.copy_object_result)?, - copy_source_version_id: try_from_aws(x.copy_source_version_id)?, - expiration: try_from_aws(x.expiration)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_copy_object_result(try_into_aws(x.copy_object_result)?); - y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +copy_object_result: try_from_aws(x.copy_object_result)?, +copy_source_version_id: try_from_aws(x.copy_source_version_id)?, +expiration: try_from_aws(x.expiration)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_copy_object_result(try_into_aws(x.copy_object_result)?); +y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CopyObjectResult { type Target = aws_sdk_s3::types::CopyObjectResult; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - last_modified: try_from_aws(x.last_modified)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +last_modified: try_from_aws(x.last_modified)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CopyPartResult { type Target = aws_sdk_s3::types::CopyPartResult; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - e_tag: try_from_aws(x.e_tag)?, - last_modified: try_from_aws(x.last_modified)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +e_tag: try_from_aws(x.e_tag)?, +last_modified: try_from_aws(x.last_modified)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateBucketConfiguration { type Target = aws_sdk_s3::types::CreateBucketConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: try_from_aws(x.bucket)?, - location: try_from_aws(x.location)?, - location_constraint: try_from_aws(x.location_constraint)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: try_from_aws(x.bucket)?, +location: try_from_aws(x.location)?, +location_constraint: try_from_aws(x.location_constraint)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_location(try_into_aws(x.location)?); - y = y.set_location_constraint(try_into_aws(x.location_constraint)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_location(try_into_aws(x.location)?); +y = y.set_location_constraint(try_into_aws(x.location_constraint)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateBucketInput { type Target = aws_sdk_s3::operation::create_bucket::CreateBucketInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - create_bucket_configuration: try_from_aws(x.create_bucket_configuration)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write: try_from_aws(x.grant_write)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - object_lock_enabled_for_bucket: try_from_aws(x.object_lock_enabled_for_bucket)?, - object_ownership: try_from_aws(x.object_ownership)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_create_bucket_configuration(try_into_aws(x.create_bucket_configuration)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write(try_into_aws(x.grant_write)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_object_lock_enabled_for_bucket(try_into_aws(x.object_lock_enabled_for_bucket)?); - y = y.set_object_ownership(try_into_aws(x.object_ownership)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +create_bucket_configuration: try_from_aws(x.create_bucket_configuration)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write: try_from_aws(x.grant_write)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +object_lock_enabled_for_bucket: try_from_aws(x.object_lock_enabled_for_bucket)?, +object_ownership: try_from_aws(x.object_ownership)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_create_bucket_configuration(try_into_aws(x.create_bucket_configuration)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write(try_into_aws(x.grant_write)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_object_lock_enabled_for_bucket(try_into_aws(x.object_lock_enabled_for_bucket)?); +y = y.set_object_ownership(try_into_aws(x.object_ownership)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CreateBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - metadata_table_configuration: unwrap_from_aws(x.metadata_table_configuration, "metadata_table_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_metadata_table_configuration(Some(try_into_aws(x.metadata_table_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +metadata_table_configuration: unwrap_from_aws(x.metadata_table_configuration, "metadata_table_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_metadata_table_configuration(Some(try_into_aws(x.metadata_table_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CreateBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateBucketOutput { type Target = aws_sdk_s3::operation::create_bucket::CreateBucketOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - location: try_from_aws(x.location)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +location: try_from_aws(x.location)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_location(try_into_aws(x.location)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_location(try_into_aws(x.location)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateMultipartUploadInput { type Target = aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_type: try_from_aws(x.content_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - expires: try_from_aws(x.expires)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - key: unwrap_from_aws(x.key, "key")?, - metadata: try_from_aws(x.metadata)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - tagging: try_from_aws(x.tagging)?, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tagging(try_into_aws(x.tagging)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_type: try_from_aws(x.content_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +expires: try_from_aws(x.expires)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +key: unwrap_from_aws(x.key, "key")?, +metadata: try_from_aws(x.metadata)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +tagging: try_from_aws(x.tagging)?, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tagging(try_into_aws(x.tagging)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CreateMultipartUploadOutput { type Target = aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - abort_date: try_from_aws(x.abort_date)?, - abort_rule_id: try_from_aws(x.abort_rule_id)?, - bucket: try_from_aws(x.bucket)?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - key: try_from_aws(x.key)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - upload_id: try_from_aws(x.upload_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_abort_date(try_into_aws(x.abort_date)?); - y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_upload_id(try_into_aws(x.upload_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +abort_date: try_from_aws(x.abort_date)?, +abort_rule_id: try_from_aws(x.abort_rule_id)?, +bucket: try_from_aws(x.bucket)?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +key: try_from_aws(x.key)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +upload_id: try_from_aws(x.upload_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_abort_date(try_into_aws(x.abort_date)?); +y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_upload_id(try_into_aws(x.upload_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::CreateSessionInput { type Target = aws_sdk_s3::operation::create_session::CreateSessionInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - session_mode: try_from_aws(x.session_mode)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_session_mode(try_into_aws(x.session_mode)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +session_mode: try_from_aws(x.session_mode)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_session_mode(try_into_aws(x.session_mode)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::CreateSessionOutput { type Target = aws_sdk_s3::operation::create_session::CreateSessionOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - credentials: unwrap_from_aws(x.credentials, "credentials")?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_credentials(Some(try_into_aws(x.credentials)?)); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +credentials: unwrap_from_aws(x.credentials, "credentials")?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_credentials(Some(try_into_aws(x.credentials)?)); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DataRedundancy { type Target = aws_sdk_s3::types::DataRedundancy; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::DataRedundancy::SingleAvailabilityZone => Self::from_static(Self::SINGLE_AVAILABILITY_ZONE), - aws_sdk_s3::types::DataRedundancy::SingleLocalZone => Self::from_static(Self::SINGLE_LOCAL_ZONE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::DataRedundancy::SingleAvailabilityZone => Self::from_static(Self::SINGLE_AVAILABILITY_ZONE), +aws_sdk_s3::types::DataRedundancy::SingleLocalZone => Self::from_static(Self::SINGLE_LOCAL_ZONE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::DataRedundancy::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::DataRedundancy::from(x.as_str())) +} } impl AwsConversion for s3s::dto::DefaultRetention { type Target = aws_sdk_s3::types::DefaultRetention; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - days: try_from_aws(x.days)?, - mode: try_from_aws(x.mode)?, - years: try_from_aws(x.years)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +days: try_from_aws(x.days)?, +mode: try_from_aws(x.mode)?, +years: try_from_aws(x.years)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_days(try_into_aws(x.days)?); - y = y.set_mode(try_into_aws(x.mode)?); - y = y.set_years(try_into_aws(x.years)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_days(try_into_aws(x.days)?); +y = y.set_mode(try_into_aws(x.mode)?); +y = y.set_years(try_into_aws(x.years)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Delete { type Target = aws_sdk_s3::types::Delete; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - objects: try_from_aws(x.objects)?, - quiet: try_from_aws(x.quiet)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +objects: try_from_aws(x.objects)?, +quiet: try_from_aws(x.quiet)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_objects(Some(try_into_aws(x.objects)?)); - y = y.set_quiet(try_into_aws(x.quiet)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_objects(Some(try_into_aws(x.objects)?)); +y = y.set_quiet(try_into_aws(x.quiet)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_analytics_configuration::DeleteBucketAnalyticsConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_analytics_configuration::DeleteBucketAnalyticsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketCorsInput { type Target = aws_sdk_s3::operation::delete_bucket_cors::DeleteBucketCorsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketCorsOutput { type Target = aws_sdk_s3::operation::delete_bucket_cors::DeleteBucketCorsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketEncryptionInput { type Target = aws_sdk_s3::operation::delete_bucket_encryption::DeleteBucketEncryptionInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketEncryptionOutput { type Target = aws_sdk_s3::operation::delete_bucket_encryption::DeleteBucketEncryptionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketInput { type Target = aws_sdk_s3::operation::delete_bucket::DeleteBucketInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketIntelligentTieringConfigurationInput { - type Target = - aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationInput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationInput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketIntelligentTieringConfigurationOutput { - type Target = - aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationOutput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationOutput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_inventory_configuration::DeleteBucketInventoryConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_inventory_configuration::DeleteBucketInventoryConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketLifecycleInput { type Target = aws_sdk_s3::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketLifecycleOutput { type Target = aws_sdk_s3::operation::delete_bucket_lifecycle::DeleteBucketLifecycleOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_metrics_configuration::DeleteBucketMetricsConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_metrics_configuration::DeleteBucketMetricsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketOutput { type Target = aws_sdk_s3::operation::delete_bucket::DeleteBucketOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::delete_bucket_ownership_controls::DeleteBucketOwnershipControlsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::delete_bucket_ownership_controls::DeleteBucketOwnershipControlsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketPolicyInput { type Target = aws_sdk_s3::operation::delete_bucket_policy::DeleteBucketPolicyInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketPolicyOutput { type Target = aws_sdk_s3::operation::delete_bucket_policy::DeleteBucketPolicyOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketReplicationInput { type Target = aws_sdk_s3::operation::delete_bucket_replication::DeleteBucketReplicationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketReplicationOutput { type Target = aws_sdk_s3::operation::delete_bucket_replication::DeleteBucketReplicationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketTaggingInput { type Target = aws_sdk_s3::operation::delete_bucket_tagging::DeleteBucketTaggingInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketTaggingOutput { type Target = aws_sdk_s3::operation::delete_bucket_tagging::DeleteBucketTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteBucketWebsiteInput { type Target = aws_sdk_s3::operation::delete_bucket_website::DeleteBucketWebsiteInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteBucketWebsiteOutput { type Target = aws_sdk_s3::operation::delete_bucket_website::DeleteBucketWebsiteOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteMarkerEntry { type Target = aws_sdk_s3::types::DeleteMarkerEntry; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - is_latest: try_from_aws(x.is_latest)?, - key: try_from_aws(x.key)?, - last_modified: try_from_aws(x.last_modified)?, - owner: try_from_aws(x.owner)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_is_latest(try_into_aws(x.is_latest)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +is_latest: try_from_aws(x.is_latest)?, +key: try_from_aws(x.key)?, +last_modified: try_from_aws(x.last_modified)?, +owner: try_from_aws(x.owner)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_is_latest(try_into_aws(x.is_latest)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteMarkerReplication { type Target = aws_sdk_s3::types::DeleteMarkerReplication; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteMarkerReplicationStatus { type Target = aws_sdk_s3::types::DeleteMarkerReplicationStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::DeleteMarkerReplicationStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::DeleteMarkerReplicationStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::DeleteMarkerReplicationStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::DeleteMarkerReplicationStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::DeleteMarkerReplicationStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::DeleteMarkerReplicationStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::DeleteObjectInput { type Target = aws_sdk_s3::operation::delete_object::DeleteObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match: try_from_aws(x.if_match)?, - if_match_last_modified_time: try_from_aws(x.if_match_last_modified_time)?, - if_match_size: try_from_aws(x.if_match_size)?, - key: unwrap_from_aws(x.key, "key")?, - mfa: try_from_aws(x.mfa)?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_match_last_modified_time(try_into_aws(x.if_match_last_modified_time)?); - y = y.set_if_match_size(try_into_aws(x.if_match_size)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_mfa(try_into_aws(x.mfa)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match: try_from_aws(x.if_match)?, +if_match_last_modified_time: try_from_aws(x.if_match_last_modified_time)?, +if_match_size: try_from_aws(x.if_match_size)?, +key: unwrap_from_aws(x.key, "key")?, +mfa: try_from_aws(x.mfa)?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_match_last_modified_time(try_into_aws(x.if_match_last_modified_time)?); +y = y.set_if_match_size(try_into_aws(x.if_match_size)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_mfa(try_into_aws(x.mfa)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteObjectOutput { type Target = aws_sdk_s3::operation::delete_object::DeleteObjectOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - delete_marker: try_from_aws(x.delete_marker)?, - request_charged: try_from_aws(x.request_charged)?, - version_id: try_from_aws(x.version_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +delete_marker: try_from_aws(x.delete_marker)?, +request_charged: try_from_aws(x.request_charged)?, +version_id: try_from_aws(x.version_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteObjectTaggingInput { type Target = aws_sdk_s3::operation::delete_object_tagging::DeleteObjectTaggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteObjectTaggingOutput { type Target = aws_sdk_s3::operation::delete_object_tagging::DeleteObjectTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - version_id: try_from_aws(x.version_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +version_id: try_from_aws(x.version_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeleteObjectsInput { type Target = aws_sdk_s3::operation::delete_objects::DeleteObjectsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - delete: unwrap_from_aws(x.delete, "delete")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - mfa: try_from_aws(x.mfa)?, - request_payer: try_from_aws(x.request_payer)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_delete(Some(try_into_aws(x.delete)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_mfa(try_into_aws(x.mfa)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +delete: unwrap_from_aws(x.delete, "delete")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +mfa: try_from_aws(x.mfa)?, +request_payer: try_from_aws(x.request_payer)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_delete(Some(try_into_aws(x.delete)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_mfa(try_into_aws(x.mfa)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeleteObjectsOutput { type Target = aws_sdk_s3::operation::delete_objects::DeleteObjectsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - deleted: try_from_aws(x.deleted)?, - errors: try_from_aws(x.errors)?, - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +deleted: try_from_aws(x.deleted)?, +errors: try_from_aws(x.errors)?, +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_deleted(try_into_aws(x.deleted)?); - y = y.set_errors(try_into_aws(x.errors)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_deleted(try_into_aws(x.deleted)?); +y = y.set_errors(try_into_aws(x.errors)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeletePublicAccessBlockInput { type Target = aws_sdk_s3::operation::delete_public_access_block::DeletePublicAccessBlockInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::DeletePublicAccessBlockOutput { type Target = aws_sdk_s3::operation::delete_public_access_block::DeletePublicAccessBlockOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::DeletedObject { type Target = aws_sdk_s3::types::DeletedObject; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - delete_marker: try_from_aws(x.delete_marker)?, - delete_marker_version_id: try_from_aws(x.delete_marker_version_id)?, - key: try_from_aws(x.key)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_delete_marker_version_id(try_into_aws(x.delete_marker_version_id)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +delete_marker: try_from_aws(x.delete_marker)?, +delete_marker_version_id: try_from_aws(x.delete_marker_version_id)?, +key: try_from_aws(x.key)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_delete_marker_version_id(try_into_aws(x.delete_marker_version_id)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Destination { type Target = aws_sdk_s3::types::Destination; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_control_translation: try_from_aws(x.access_control_translation)?, - account: try_from_aws(x.account)?, - bucket: try_from_aws(x.bucket)?, - encryption_configuration: try_from_aws(x.encryption_configuration)?, - metrics: try_from_aws(x.metrics)?, - replication_time: try_from_aws(x.replication_time)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_control_translation(try_into_aws(x.access_control_translation)?); - y = y.set_account(try_into_aws(x.account)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_encryption_configuration(try_into_aws(x.encryption_configuration)?); - y = y.set_metrics(try_into_aws(x.metrics)?); - y = y.set_replication_time(try_into_aws(x.replication_time)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_control_translation: try_from_aws(x.access_control_translation)?, +account: try_from_aws(x.account)?, +bucket: try_from_aws(x.bucket)?, +encryption_configuration: try_from_aws(x.encryption_configuration)?, +metrics: try_from_aws(x.metrics)?, +replication_time: try_from_aws(x.replication_time)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_control_translation(try_into_aws(x.access_control_translation)?); +y = y.set_account(try_into_aws(x.account)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_encryption_configuration(try_into_aws(x.encryption_configuration)?); +y = y.set_metrics(try_into_aws(x.metrics)?); +y = y.set_replication_time(try_into_aws(x.replication_time)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::EncodingType { type Target = aws_sdk_s3::types::EncodingType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::EncodingType::Url => Self::from_static(Self::URL), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::EncodingType::Url => Self::from_static(Self::URL), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::EncodingType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::EncodingType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Encryption { type Target = aws_sdk_s3::types::Encryption; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - encryption_type: try_from_aws(x.encryption_type)?, - kms_context: try_from_aws(x.kms_context)?, - kms_key_id: try_from_aws(x.kms_key_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +encryption_type: try_from_aws(x.encryption_type)?, +kms_context: try_from_aws(x.kms_context)?, +kms_key_id: try_from_aws(x.kms_key_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_encryption_type(Some(try_into_aws(x.encryption_type)?)); - y = y.set_kms_context(try_into_aws(x.kms_context)?); - y = y.set_kms_key_id(try_into_aws(x.kms_key_id)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_encryption_type(Some(try_into_aws(x.encryption_type)?)); +y = y.set_kms_context(try_into_aws(x.kms_context)?); +y = y.set_kms_key_id(try_into_aws(x.kms_key_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::EncryptionConfiguration { type Target = aws_sdk_s3::types::EncryptionConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - replica_kms_key_id: try_from_aws(x.replica_kms_key_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +replica_kms_key_id: try_from_aws(x.replica_kms_key_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_replica_kms_key_id(try_into_aws(x.replica_kms_key_id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_replica_kms_key_id(try_into_aws(x.replica_kms_key_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::EncryptionTypeMismatch { type Target = aws_sdk_s3::types::error::EncryptionTypeMismatch; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::EndEvent { type Target = aws_sdk_s3::types::EndEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Error { type Target = aws_sdk_s3::types::Error; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - code: try_from_aws(x.code)?, - key: try_from_aws(x.key)?, - message: try_from_aws(x.message)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_code(try_into_aws(x.code)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_message(try_into_aws(x.message)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +code: try_from_aws(x.code)?, +key: try_from_aws(x.key)?, +message: try_from_aws(x.message)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_code(try_into_aws(x.code)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_message(try_into_aws(x.message)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ErrorDetails { type Target = aws_sdk_s3::types::ErrorDetails; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - error_code: try_from_aws(x.error_code)?, - error_message: try_from_aws(x.error_message)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +error_code: try_from_aws(x.error_code)?, +error_message: try_from_aws(x.error_message)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_error_code(try_into_aws(x.error_code)?); - y = y.set_error_message(try_into_aws(x.error_message)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_error_code(try_into_aws(x.error_code)?); +y = y.set_error_message(try_into_aws(x.error_message)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ErrorDocument { type Target = aws_sdk_s3::types::ErrorDocument; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - key: try_from_aws(x.key)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +key: try_from_aws(x.key)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_key(Some(try_into_aws(x.key)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_key(Some(try_into_aws(x.key)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::EventBridgeConfiguration { type Target = aws_sdk_s3::types::EventBridgeConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ExistingObjectReplication { type Target = aws_sdk_s3::types::ExistingObjectReplication; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ExistingObjectReplicationStatus { type Target = aws_sdk_s3::types::ExistingObjectReplicationStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ExistingObjectReplicationStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ExistingObjectReplicationStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ExistingObjectReplicationStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ExistingObjectReplicationStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ExistingObjectReplicationStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ExistingObjectReplicationStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ExpirationStatus { type Target = aws_sdk_s3::types::ExpirationStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ExpirationStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ExpirationStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ExpirationStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ExpirationStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ExpirationStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ExpirationStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ExpressionType { type Target = aws_sdk_s3::types::ExpressionType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ExpressionType::Sql => Self::from_static(Self::SQL), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ExpressionType::Sql => Self::from_static(Self::SQL), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ExpressionType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ExpressionType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::FileHeaderInfo { type Target = aws_sdk_s3::types::FileHeaderInfo; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::FileHeaderInfo::Ignore => Self::from_static(Self::IGNORE), - aws_sdk_s3::types::FileHeaderInfo::None => Self::from_static(Self::NONE), - aws_sdk_s3::types::FileHeaderInfo::Use => Self::from_static(Self::USE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::FileHeaderInfo::Ignore => Self::from_static(Self::IGNORE), +aws_sdk_s3::types::FileHeaderInfo::None => Self::from_static(Self::NONE), +aws_sdk_s3::types::FileHeaderInfo::Use => Self::from_static(Self::USE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::FileHeaderInfo::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::FileHeaderInfo::from(x.as_str())) +} } impl AwsConversion for s3s::dto::FilterRule { type Target = aws_sdk_s3::types::FilterRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - value: try_from_aws(x.value)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +value: try_from_aws(x.value)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_value(try_into_aws(x.value)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_value(try_into_aws(x.value)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::FilterRuleName { type Target = aws_sdk_s3::types::FilterRuleName; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::FilterRuleName::Prefix => Self::from_static(Self::PREFIX), - aws_sdk_s3::types::FilterRuleName::Suffix => Self::from_static(Self::SUFFIX), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::FilterRuleName::Prefix => Self::from_static(Self::PREFIX), +aws_sdk_s3::types::FilterRuleName::Suffix => Self::from_static(Self::SUFFIX), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::FilterRuleName::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::FilterRuleName::from(x.as_str())) +} } impl AwsConversion for s3s::dto::GetBucketAccelerateConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - request_payer: try_from_aws(x.request_payer)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +request_payer: try_from_aws(x.request_payer)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketAccelerateConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketAclInput { type Target = aws_sdk_s3::operation::get_bucket_acl::GetBucketAclInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketAclOutput { type Target = aws_sdk_s3::operation::get_bucket_acl::GetBucketAclOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grants: try_from_aws(x.grants)?, - owner: try_from_aws(x.owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grants: try_from_aws(x.grants)?, +owner: try_from_aws(x.owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grants(try_into_aws(x.grants)?); - y = y.set_owner(try_into_aws(x.owner)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grants(try_into_aws(x.grants)?); +y = y.set_owner(try_into_aws(x.owner)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_analytics_configuration::GetBucketAnalyticsConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_analytics_configuration::GetBucketAnalyticsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - analytics_configuration: try_from_aws(x.analytics_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +analytics_configuration: try_from_aws(x.analytics_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_analytics_configuration(try_into_aws(x.analytics_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_analytics_configuration(try_into_aws(x.analytics_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketCorsInput { type Target = aws_sdk_s3::operation::get_bucket_cors::GetBucketCorsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketCorsOutput { type Target = aws_sdk_s3::operation::get_bucket_cors::GetBucketCorsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - cors_rules: try_from_aws(x.cors_rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +cors_rules: try_from_aws(x.cors_rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_cors_rules(try_into_aws(x.cors_rules)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_cors_rules(try_into_aws(x.cors_rules)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketEncryptionInput { type Target = aws_sdk_s3::operation::get_bucket_encryption::GetBucketEncryptionInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketEncryptionOutput { type Target = aws_sdk_s3::operation::get_bucket_encryption::GetBucketEncryptionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - server_side_encryption_configuration: try_from_aws(x.server_side_encryption_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +server_side_encryption_configuration: try_from_aws(x.server_side_encryption_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_server_side_encryption_configuration(try_into_aws(x.server_side_encryption_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_server_side_encryption_configuration(try_into_aws(x.server_side_encryption_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketIntelligentTieringConfigurationInput { - type Target = - aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationInput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationInput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketIntelligentTieringConfigurationOutput { - type Target = - aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - intelligent_tiering_configuration: try_from_aws(x.intelligent_tiering_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +intelligent_tiering_configuration: try_from_aws(x.intelligent_tiering_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_intelligent_tiering_configuration(try_into_aws(x.intelligent_tiering_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_intelligent_tiering_configuration(try_into_aws(x.intelligent_tiering_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_inventory_configuration::GetBucketInventoryConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_inventory_configuration::GetBucketInventoryConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - inventory_configuration: try_from_aws(x.inventory_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +inventory_configuration: try_from_aws(x.inventory_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_inventory_configuration(try_into_aws(x.inventory_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_inventory_configuration(try_into_aws(x.inventory_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketLifecycleConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_lifecycle_configuration::GetBucketLifecycleConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketLifecycleConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_lifecycle_configuration::GetBucketLifecycleConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - rules: try_from_aws(x.rules)?, - transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +rules: try_from_aws(x.rules)?, +transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_rules(try_into_aws(x.rules)?); - y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_rules(try_into_aws(x.rules)?); +y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketLocationInput { type Target = aws_sdk_s3::operation::get_bucket_location::GetBucketLocationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketLocationOutput { type Target = aws_sdk_s3::operation::get_bucket_location::GetBucketLocationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - location_constraint: try_from_aws(x.location_constraint)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +location_constraint: try_from_aws(x.location_constraint)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_location_constraint(try_into_aws(x.location_constraint)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_location_constraint(try_into_aws(x.location_constraint)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketLoggingInput { type Target = aws_sdk_s3::operation::get_bucket_logging::GetBucketLoggingInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketLoggingOutput { type Target = aws_sdk_s3::operation::get_bucket_logging::GetBucketLoggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - logging_enabled: try_from_aws(x.logging_enabled)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +logging_enabled: try_from_aws(x.logging_enabled)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - get_bucket_metadata_table_configuration_result: try_from_aws(x.get_bucket_metadata_table_configuration_result)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +get_bucket_metadata_table_configuration_result: try_from_aws(x.get_bucket_metadata_table_configuration_result)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_get_bucket_metadata_table_configuration_result(try_into_aws(x.get_bucket_metadata_table_configuration_result)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_get_bucket_metadata_table_configuration_result(try_into_aws(x.get_bucket_metadata_table_configuration_result)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationResult { type Target = aws_sdk_s3::types::GetBucketMetadataTableConfigurationResult; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - error: try_from_aws(x.error)?, - metadata_table_configuration_result: unwrap_from_aws( - x.metadata_table_configuration_result, - "metadata_table_configuration_result", - )?, - status: try_from_aws(x.status)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_error(try_into_aws(x.error)?); - y = y.set_metadata_table_configuration_result(Some(try_into_aws(x.metadata_table_configuration_result)?)); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +error: try_from_aws(x.error)?, +metadata_table_configuration_result: unwrap_from_aws(x.metadata_table_configuration_result, "metadata_table_configuration_result")?, +status: try_from_aws(x.status)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_error(try_into_aws(x.error)?); +y = y.set_metadata_table_configuration_result(Some(try_into_aws(x.metadata_table_configuration_result)?)); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_metrics_configuration::GetBucketMetricsConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_metrics_configuration::GetBucketMetricsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - metrics_configuration: try_from_aws(x.metrics_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +metrics_configuration: try_from_aws(x.metrics_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_metrics_configuration(try_into_aws(x.metrics_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_metrics_configuration(try_into_aws(x.metrics_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketNotificationConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_notification_configuration::GetBucketNotificationConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketNotificationConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_notification_configuration::GetBucketNotificationConfigurationOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, - lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, - queue_configurations: try_from_aws(x.queue_configurations)?, - topic_configurations: try_from_aws(x.topic_configurations)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); - y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); - y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); - y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, +lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, +queue_configurations: try_from_aws(x.queue_configurations)?, +topic_configurations: try_from_aws(x.topic_configurations)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); +y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); +y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); +y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::get_bucket_ownership_controls::GetBucketOwnershipControlsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::get_bucket_ownership_controls::GetBucketOwnershipControlsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - ownership_controls: try_from_aws(x.ownership_controls)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +ownership_controls: try_from_aws(x.ownership_controls)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_ownership_controls(try_into_aws(x.ownership_controls)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_ownership_controls(try_into_aws(x.ownership_controls)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketPolicyInput { type Target = aws_sdk_s3::operation::get_bucket_policy::GetBucketPolicyInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketPolicyOutput { type Target = aws_sdk_s3::operation::get_bucket_policy::GetBucketPolicyOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - policy: try_from_aws(x.policy)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +policy: try_from_aws(x.policy)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_policy(try_into_aws(x.policy)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_policy(try_into_aws(x.policy)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketPolicyStatusInput { type Target = aws_sdk_s3::operation::get_bucket_policy_status::GetBucketPolicyStatusInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketPolicyStatusOutput { type Target = aws_sdk_s3::operation::get_bucket_policy_status::GetBucketPolicyStatusOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - policy_status: try_from_aws(x.policy_status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +policy_status: try_from_aws(x.policy_status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_policy_status(try_into_aws(x.policy_status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_policy_status(try_into_aws(x.policy_status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketReplicationInput { type Target = aws_sdk_s3::operation::get_bucket_replication::GetBucketReplicationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketReplicationOutput { type Target = aws_sdk_s3::operation::get_bucket_replication::GetBucketReplicationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - replication_configuration: try_from_aws(x.replication_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +replication_configuration: try_from_aws(x.replication_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_replication_configuration(try_into_aws(x.replication_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_replication_configuration(try_into_aws(x.replication_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketRequestPaymentInput { type Target = aws_sdk_s3::operation::get_bucket_request_payment::GetBucketRequestPaymentInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketRequestPaymentOutput { type Target = aws_sdk_s3::operation::get_bucket_request_payment::GetBucketRequestPaymentOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - payer: try_from_aws(x.payer)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +payer: try_from_aws(x.payer)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_payer(try_into_aws(x.payer)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_payer(try_into_aws(x.payer)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketTaggingInput { type Target = aws_sdk_s3::operation::get_bucket_tagging::GetBucketTaggingInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketTaggingOutput { type Target = aws_sdk_s3::operation::get_bucket_tagging::GetBucketTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - tag_set: try_from_aws(x.tag_set)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +tag_set: try_from_aws(x.tag_set)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketVersioningInput { type Target = aws_sdk_s3::operation::get_bucket_versioning::GetBucketVersioningInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketVersioningOutput { type Target = aws_sdk_s3::operation::get_bucket_versioning::GetBucketVersioningOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - mfa_delete: try_from_aws(x.mfa_delete)?, - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +mfa_delete: try_from_aws(x.mfa_delete)?, +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetBucketWebsiteInput { type Target = aws_sdk_s3::operation::get_bucket_website::GetBucketWebsiteInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetBucketWebsiteOutput { type Target = aws_sdk_s3::operation::get_bucket_website::GetBucketWebsiteOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - error_document: try_from_aws(x.error_document)?, - index_document: try_from_aws(x.index_document)?, - redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, - routing_rules: try_from_aws(x.routing_rules)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_error_document(try_into_aws(x.error_document)?); - y = y.set_index_document(try_into_aws(x.index_document)?); - y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); - y = y.set_routing_rules(try_into_aws(x.routing_rules)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +error_document: try_from_aws(x.error_document)?, +index_document: try_from_aws(x.index_document)?, +redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, +routing_rules: try_from_aws(x.routing_rules)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_error_document(try_into_aws(x.error_document)?); +y = y.set_index_document(try_into_aws(x.index_document)?); +y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); +y = y.set_routing_rules(try_into_aws(x.routing_rules)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectAclInput { type Target = aws_sdk_s3::operation::get_object_acl::GetObjectAclInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectAclOutput { type Target = aws_sdk_s3::operation::get_object_acl::GetObjectAclOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grants: try_from_aws(x.grants)?, - owner: try_from_aws(x.owner)?, - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grants: try_from_aws(x.grants)?, +owner: try_from_aws(x.owner)?, +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grants(try_into_aws(x.grants)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grants(try_into_aws(x.grants)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectAttributesInput { type Target = aws_sdk_s3::operation::get_object_attributes::GetObjectAttributesInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - max_parts: try_from_aws(x.max_parts)?, - object_attributes: unwrap_from_aws(x.object_attributes, "object_attributes")?, - part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_max_parts(try_into_aws(x.max_parts)?); - y = y.set_object_attributes(Some(try_into_aws(x.object_attributes)?)); - y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +max_parts: try_from_aws(x.max_parts)?, +object_attributes: unwrap_from_aws(x.object_attributes, "object_attributes")?, +part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_max_parts(try_into_aws(x.max_parts)?); +y = y.set_object_attributes(Some(try_into_aws(x.object_attributes)?)); +y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectAttributesOutput { type Target = aws_sdk_s3::operation::get_object_attributes::GetObjectAttributesOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum: try_from_aws(x.checksum)?, - delete_marker: try_from_aws(x.delete_marker)?, - e_tag: try_from_aws(x.e_tag)?, - last_modified: try_from_aws(x.last_modified)?, - object_parts: try_from_aws(x.object_parts)?, - object_size: try_from_aws(x.object_size)?, - request_charged: try_from_aws(x.request_charged)?, - storage_class: try_from_aws(x.storage_class)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum(try_into_aws(x.checksum)?); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_object_parts(try_into_aws(x.object_parts)?); - y = y.set_object_size(try_into_aws(x.object_size)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum: try_from_aws(x.checksum)?, +delete_marker: try_from_aws(x.delete_marker)?, +e_tag: try_from_aws(x.e_tag)?, +last_modified: try_from_aws(x.last_modified)?, +object_parts: try_from_aws(x.object_parts)?, +object_size: try_from_aws(x.object_size)?, +request_charged: try_from_aws(x.request_charged)?, +storage_class: try_from_aws(x.storage_class)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum(try_into_aws(x.checksum)?); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_object_parts(try_into_aws(x.object_parts)?); +y = y.set_object_size(try_into_aws(x.object_size)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectAttributesParts { type Target = aws_sdk_s3::types::GetObjectAttributesParts; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - is_truncated: try_from_aws(x.is_truncated)?, - max_parts: try_from_aws(x.max_parts)?, - next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, - part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, - parts: try_from_aws(x.parts)?, - total_parts_count: try_from_aws(x.total_parts_count)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_max_parts(try_into_aws(x.max_parts)?); - y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); - y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); - y = y.set_parts(try_into_aws(x.parts)?); - y = y.set_total_parts_count(try_into_aws(x.total_parts_count)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +is_truncated: try_from_aws(x.is_truncated)?, +max_parts: try_from_aws(x.max_parts)?, +next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, +part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, +parts: try_from_aws(x.parts)?, +total_parts_count: try_from_aws(x.total_parts_count)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_max_parts(try_into_aws(x.max_parts)?); +y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); +y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); +y = y.set_parts(try_into_aws(x.parts)?); +y = y.set_total_parts_count(try_into_aws(x.total_parts_count)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectInput { type Target = aws_sdk_s3::operation::get_object::GetObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_mode: try_from_aws(x.checksum_mode)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match: try_from_aws(x.if_match)?, - if_modified_since: try_from_aws(x.if_modified_since)?, - if_none_match: try_from_aws(x.if_none_match)?, - if_unmodified_since: try_from_aws(x.if_unmodified_since)?, - key: unwrap_from_aws(x.key, "key")?, - part_number: try_from_aws(x.part_number)?, - range: try_from_aws(x.range)?, - request_payer: try_from_aws(x.request_payer)?, - response_cache_control: try_from_aws(x.response_cache_control)?, - response_content_disposition: try_from_aws(x.response_content_disposition)?, - response_content_encoding: try_from_aws(x.response_content_encoding)?, - response_content_language: try_from_aws(x.response_content_language)?, - response_content_type: try_from_aws(x.response_content_type)?, - response_expires: try_from_aws(x.response_expires)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); - y = y.set_if_none_match(try_into_aws(x.if_none_match)?); - y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_part_number(try_into_aws(x.part_number)?); - y = y.set_range(try_into_aws(x.range)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); - y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); - y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); - y = y.set_response_content_language(try_into_aws(x.response_content_language)?); - y = y.set_response_content_type(try_into_aws(x.response_content_type)?); - y = y.set_response_expires(try_into_aws(x.response_expires)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_mode: try_from_aws(x.checksum_mode)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match: try_from_aws(x.if_match)?, +if_modified_since: try_from_aws(x.if_modified_since)?, +if_none_match: try_from_aws(x.if_none_match)?, +if_unmodified_since: try_from_aws(x.if_unmodified_since)?, +key: unwrap_from_aws(x.key, "key")?, +part_number: try_from_aws(x.part_number)?, +range: try_from_aws(x.range)?, +request_payer: try_from_aws(x.request_payer)?, +response_cache_control: try_from_aws(x.response_cache_control)?, +response_content_disposition: try_from_aws(x.response_content_disposition)?, +response_content_encoding: try_from_aws(x.response_content_encoding)?, +response_content_language: try_from_aws(x.response_content_language)?, +response_content_type: try_from_aws(x.response_content_type)?, +response_expires: try_from_aws(x.response_expires)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); +y = y.set_if_none_match(try_into_aws(x.if_none_match)?); +y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_part_number(try_into_aws(x.part_number)?); +y = y.set_range(try_into_aws(x.range)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); +y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); +y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); +y = y.set_response_content_language(try_into_aws(x.response_content_language)?); +y = y.set_response_content_type(try_into_aws(x.response_content_type)?); +y = y.set_response_expires(try_into_aws(x.response_expires)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectLegalHoldInput { type Target = aws_sdk_s3::operation::get_object_legal_hold::GetObjectLegalHoldInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectLegalHoldOutput { type Target = aws_sdk_s3::operation::get_object_legal_hold::GetObjectLegalHoldOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - legal_hold: try_from_aws(x.legal_hold)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +legal_hold: try_from_aws(x.legal_hold)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_legal_hold(try_into_aws(x.legal_hold)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_legal_hold(try_into_aws(x.legal_hold)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectLockConfigurationInput { type Target = aws_sdk_s3::operation::get_object_lock_configuration::GetObjectLockConfigurationInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectLockConfigurationOutput { type Target = aws_sdk_s3::operation::get_object_lock_configuration::GetObjectLockConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - object_lock_configuration: try_from_aws(x.object_lock_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +object_lock_configuration: try_from_aws(x.object_lock_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectOutput { type Target = aws_sdk_s3::operation::get_object::GetObjectOutput; - type Error = S3Error; - - #[allow(deprecated)] - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - accept_ranges: try_from_aws(x.accept_ranges)?, - body: Some(try_from_aws(x.body)?), - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_length: try_from_aws(x.content_length)?, - content_range: try_from_aws(x.content_range)?, - content_type: try_from_aws(x.content_type)?, - delete_marker: try_from_aws(x.delete_marker)?, - e_tag: try_from_aws(x.e_tag)?, - expiration: try_from_aws(x.expiration)?, - expires: try_from_aws(x.expires)?, - last_modified: try_from_aws(x.last_modified)?, - metadata: try_from_aws(x.metadata)?, - missing_meta: try_from_aws(x.missing_meta)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - parts_count: try_from_aws(x.parts_count)?, - replication_status: try_from_aws(x.replication_status)?, - request_charged: try_from_aws(x.request_charged)?, - restore: try_from_aws(x.restore)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - tag_count: try_from_aws(x.tag_count)?, - version_id: try_from_aws(x.version_id)?, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - }) - } - - #[allow(deprecated)] - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_range(try_into_aws(x.content_range)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_missing_meta(try_into_aws(x.missing_meta)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_parts_count(try_into_aws(x.parts_count)?); - y = y.set_replication_status(try_into_aws(x.replication_status)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_restore(try_into_aws(x.restore)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tag_count(try_into_aws(x.tag_count)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - Ok(y.build()) - } +type Error = S3Error; + +#[allow(deprecated)] +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +accept_ranges: try_from_aws(x.accept_ranges)?, +body: Some(try_from_aws(x.body)?), +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_length: try_from_aws(x.content_length)?, +content_range: try_from_aws(x.content_range)?, +content_type: try_from_aws(x.content_type)?, +delete_marker: try_from_aws(x.delete_marker)?, +e_tag: try_from_aws(x.e_tag)?, +expiration: try_from_aws(x.expiration)?, +expires: try_from_aws(x.expires)?, +last_modified: try_from_aws(x.last_modified)?, +metadata: try_from_aws(x.metadata)?, +missing_meta: try_from_aws(x.missing_meta)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +parts_count: try_from_aws(x.parts_count)?, +replication_status: try_from_aws(x.replication_status)?, +request_charged: try_from_aws(x.request_charged)?, +restore: try_from_aws(x.restore)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +tag_count: try_from_aws(x.tag_count)?, +version_id: try_from_aws(x.version_id)?, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +}) +} + +#[allow(deprecated)] +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_range(try_into_aws(x.content_range)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_missing_meta(try_into_aws(x.missing_meta)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_parts_count(try_into_aws(x.parts_count)?); +y = y.set_replication_status(try_into_aws(x.replication_status)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_restore(try_into_aws(x.restore)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tag_count(try_into_aws(x.tag_count)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectRetentionInput { type Target = aws_sdk_s3::operation::get_object_retention::GetObjectRetentionInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectRetentionOutput { type Target = aws_sdk_s3::operation::get_object_retention::GetObjectRetentionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - retention: try_from_aws(x.retention)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +retention: try_from_aws(x.retention)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_retention(try_into_aws(x.retention)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_retention(try_into_aws(x.retention)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetObjectTaggingInput { type Target = aws_sdk_s3::operation::get_object_tagging::GetObjectTaggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectTaggingOutput { type Target = aws_sdk_s3::operation::get_object_tagging::GetObjectTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - tag_set: try_from_aws(x.tag_set)?, - version_id: try_from_aws(x.version_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +tag_set: try_from_aws(x.tag_set)?, +version_id: try_from_aws(x.version_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectTorrentInput { type Target = aws_sdk_s3::operation::get_object_torrent::GetObjectTorrentInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetObjectTorrentOutput { type Target = aws_sdk_s3::operation::get_object_torrent::GetObjectTorrentOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - body: Some(try_from_aws(x.body)?), - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +body: Some(try_from_aws(x.body)?), +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GetPublicAccessBlockInput { type Target = aws_sdk_s3::operation::get_public_access_block::GetPublicAccessBlockInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::GetPublicAccessBlockOutput { type Target = aws_sdk_s3::operation::get_public_access_block::GetPublicAccessBlockOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - public_access_block_configuration: try_from_aws(x.public_access_block_configuration)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +public_access_block_configuration: try_from_aws(x.public_access_block_configuration)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_public_access_block_configuration(try_into_aws(x.public_access_block_configuration)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_public_access_block_configuration(try_into_aws(x.public_access_block_configuration)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::GlacierJobParameters { type Target = aws_sdk_s3::types::GlacierJobParameters; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - tier: try_from_aws(x.tier)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +tier: try_from_aws(x.tier)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_tier(Some(try_into_aws(x.tier)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_tier(Some(try_into_aws(x.tier)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::Grant { type Target = aws_sdk_s3::types::Grant; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grantee: try_from_aws(x.grantee)?, - permission: try_from_aws(x.permission)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grantee: try_from_aws(x.grantee)?, +permission: try_from_aws(x.permission)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grantee(try_into_aws(x.grantee)?); - y = y.set_permission(try_into_aws(x.permission)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grantee(try_into_aws(x.grantee)?); +y = y.set_permission(try_into_aws(x.permission)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Grantee { type Target = aws_sdk_s3::types::Grantee; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - display_name: try_from_aws(x.display_name)?, - email_address: try_from_aws(x.email_address)?, - id: try_from_aws(x.id)?, - type_: try_from_aws(x.r#type)?, - uri: try_from_aws(x.uri)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_display_name(try_into_aws(x.display_name)?); - y = y.set_email_address(try_into_aws(x.email_address)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_type(Some(try_into_aws(x.type_)?)); - y = y.set_uri(try_into_aws(x.uri)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +display_name: try_from_aws(x.display_name)?, +email_address: try_from_aws(x.email_address)?, +id: try_from_aws(x.id)?, +type_: try_from_aws(x.r#type)?, +uri: try_from_aws(x.uri)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_display_name(try_into_aws(x.display_name)?); +y = y.set_email_address(try_into_aws(x.email_address)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_type(Some(try_into_aws(x.type_)?)); +y = y.set_uri(try_into_aws(x.uri)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::HeadBucketInput { type Target = aws_sdk_s3::operation::head_bucket::HeadBucketInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::HeadBucketOutput { type Target = aws_sdk_s3::operation::head_bucket::HeadBucketOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_point_alias: try_from_aws(x.access_point_alias)?, - bucket_location_name: try_from_aws(x.bucket_location_name)?, - bucket_location_type: try_from_aws(x.bucket_location_type)?, - bucket_region: try_from_aws(x.bucket_region)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_point_alias(try_into_aws(x.access_point_alias)?); - y = y.set_bucket_location_name(try_into_aws(x.bucket_location_name)?); - y = y.set_bucket_location_type(try_into_aws(x.bucket_location_type)?); - y = y.set_bucket_region(try_into_aws(x.bucket_region)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_point_alias: try_from_aws(x.access_point_alias)?, +bucket_location_name: try_from_aws(x.bucket_location_name)?, +bucket_location_type: try_from_aws(x.bucket_location_type)?, +bucket_region: try_from_aws(x.bucket_region)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_point_alias(try_into_aws(x.access_point_alias)?); +y = y.set_bucket_location_name(try_into_aws(x.bucket_location_name)?); +y = y.set_bucket_location_type(try_into_aws(x.bucket_location_type)?); +y = y.set_bucket_region(try_into_aws(x.bucket_region)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::HeadObjectInput { type Target = aws_sdk_s3::operation::head_object::HeadObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_mode: try_from_aws(x.checksum_mode)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - if_match: try_from_aws(x.if_match)?, - if_modified_since: try_from_aws(x.if_modified_since)?, - if_none_match: try_from_aws(x.if_none_match)?, - if_unmodified_since: try_from_aws(x.if_unmodified_since)?, - key: unwrap_from_aws(x.key, "key")?, - part_number: try_from_aws(x.part_number)?, - range: try_from_aws(x.range)?, - request_payer: try_from_aws(x.request_payer)?, - response_cache_control: try_from_aws(x.response_cache_control)?, - response_content_disposition: try_from_aws(x.response_content_disposition)?, - response_content_encoding: try_from_aws(x.response_content_encoding)?, - response_content_language: try_from_aws(x.response_content_language)?, - response_content_type: try_from_aws(x.response_content_type)?, - response_expires: try_from_aws(x.response_expires)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); - y = y.set_if_none_match(try_into_aws(x.if_none_match)?); - y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_part_number(try_into_aws(x.part_number)?); - y = y.set_range(try_into_aws(x.range)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); - y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); - y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); - y = y.set_response_content_language(try_into_aws(x.response_content_language)?); - y = y.set_response_content_type(try_into_aws(x.response_content_type)?); - y = y.set_response_expires(try_into_aws(x.response_expires)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_mode: try_from_aws(x.checksum_mode)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +if_match: try_from_aws(x.if_match)?, +if_modified_since: try_from_aws(x.if_modified_since)?, +if_none_match: try_from_aws(x.if_none_match)?, +if_unmodified_since: try_from_aws(x.if_unmodified_since)?, +key: unwrap_from_aws(x.key, "key")?, +part_number: try_from_aws(x.part_number)?, +range: try_from_aws(x.range)?, +request_payer: try_from_aws(x.request_payer)?, +response_cache_control: try_from_aws(x.response_cache_control)?, +response_content_disposition: try_from_aws(x.response_content_disposition)?, +response_content_encoding: try_from_aws(x.response_content_encoding)?, +response_content_language: try_from_aws(x.response_content_language)?, +response_content_type: try_from_aws(x.response_content_type)?, +response_expires: try_from_aws(x.response_expires)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); +y = y.set_if_none_match(try_into_aws(x.if_none_match)?); +y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_part_number(try_into_aws(x.part_number)?); +y = y.set_range(try_into_aws(x.range)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); +y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); +y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); +y = y.set_response_content_language(try_into_aws(x.response_content_language)?); +y = y.set_response_content_type(try_into_aws(x.response_content_type)?); +y = y.set_response_expires(try_into_aws(x.response_expires)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::HeadObjectOutput { type Target = aws_sdk_s3::operation::head_object::HeadObjectOutput; - type Error = S3Error; - - #[allow(deprecated)] - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - accept_ranges: try_from_aws(x.accept_ranges)?, - archive_status: try_from_aws(x.archive_status)?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_length: try_from_aws(x.content_length)?, - content_range: try_from_aws(x.content_range)?, - content_type: try_from_aws(x.content_type)?, - delete_marker: try_from_aws(x.delete_marker)?, - e_tag: try_from_aws(x.e_tag)?, - expiration: try_from_aws(x.expiration)?, - expires: try_from_aws(x.expires)?, - last_modified: try_from_aws(x.last_modified)?, - metadata: try_from_aws(x.metadata)?, - missing_meta: try_from_aws(x.missing_meta)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - parts_count: try_from_aws(x.parts_count)?, - replication_status: try_from_aws(x.replication_status)?, - request_charged: try_from_aws(x.request_charged)?, - restore: try_from_aws(x.restore)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - version_id: try_from_aws(x.version_id)?, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - }) - } - - #[allow(deprecated)] - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); - y = y.set_archive_status(try_into_aws(x.archive_status)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_range(try_into_aws(x.content_range)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_missing_meta(try_into_aws(x.missing_meta)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_parts_count(try_into_aws(x.parts_count)?); - y = y.set_replication_status(try_into_aws(x.replication_status)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_restore(try_into_aws(x.restore)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - Ok(y.build()) - } +type Error = S3Error; + +#[allow(deprecated)] +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +accept_ranges: try_from_aws(x.accept_ranges)?, +archive_status: try_from_aws(x.archive_status)?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_length: try_from_aws(x.content_length)?, +content_range: try_from_aws(x.content_range)?, +content_type: try_from_aws(x.content_type)?, +delete_marker: try_from_aws(x.delete_marker)?, +e_tag: try_from_aws(x.e_tag)?, +expiration: try_from_aws(x.expiration)?, +expires: try_from_aws(x.expires)?, +last_modified: try_from_aws(x.last_modified)?, +metadata: try_from_aws(x.metadata)?, +missing_meta: try_from_aws(x.missing_meta)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +parts_count: try_from_aws(x.parts_count)?, +replication_status: try_from_aws(x.replication_status)?, +request_charged: try_from_aws(x.request_charged)?, +restore: try_from_aws(x.restore)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +version_id: try_from_aws(x.version_id)?, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +}) +} + +#[allow(deprecated)] +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); +y = y.set_archive_status(try_into_aws(x.archive_status)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_range(try_into_aws(x.content_range)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_missing_meta(try_into_aws(x.missing_meta)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_parts_count(try_into_aws(x.parts_count)?); +y = y.set_replication_status(try_into_aws(x.replication_status)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_restore(try_into_aws(x.restore)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::IndexDocument { type Target = aws_sdk_s3::types::IndexDocument; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - suffix: try_from_aws(x.suffix)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +suffix: try_from_aws(x.suffix)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_suffix(Some(try_into_aws(x.suffix)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_suffix(Some(try_into_aws(x.suffix)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::Initiator { type Target = aws_sdk_s3::types::Initiator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - display_name: try_from_aws(x.display_name)?, - id: try_from_aws(x.id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +display_name: try_from_aws(x.display_name)?, +id: try_from_aws(x.id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_display_name(try_into_aws(x.display_name)?); - y = y.set_id(try_into_aws(x.id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_display_name(try_into_aws(x.display_name)?); +y = y.set_id(try_into_aws(x.id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InputSerialization { type Target = aws_sdk_s3::types::InputSerialization; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - csv: try_from_aws(x.csv)?, - compression_type: try_from_aws(x.compression_type)?, - json: try_from_aws(x.json)?, - parquet: try_from_aws(x.parquet)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_csv(try_into_aws(x.csv)?); - y = y.set_compression_type(try_into_aws(x.compression_type)?); - y = y.set_json(try_into_aws(x.json)?); - y = y.set_parquet(try_into_aws(x.parquet)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +csv: try_from_aws(x.csv)?, +compression_type: try_from_aws(x.compression_type)?, +json: try_from_aws(x.json)?, +parquet: try_from_aws(x.parquet)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_csv(try_into_aws(x.csv)?); +y = y.set_compression_type(try_into_aws(x.compression_type)?); +y = y.set_json(try_into_aws(x.json)?); +y = y.set_parquet(try_into_aws(x.parquet)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::IntelligentTieringAccessTier { type Target = aws_sdk_s3::types::IntelligentTieringAccessTier; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::IntelligentTieringAccessTier::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), - aws_sdk_s3::types::IntelligentTieringAccessTier::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::IntelligentTieringAccessTier::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), +aws_sdk_s3::types::IntelligentTieringAccessTier::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::IntelligentTieringAccessTier::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::IntelligentTieringAccessTier::from(x.as_str())) +} } impl AwsConversion for s3s::dto::IntelligentTieringAndOperator { type Target = aws_sdk_s3::types::IntelligentTieringAndOperator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::IntelligentTieringConfiguration { type Target = aws_sdk_s3::types::IntelligentTieringConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - status: try_from_aws(x.status)?, - tierings: try_from_aws(x.tierings)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_status(Some(try_into_aws(x.status)?)); - y = y.set_tierings(Some(try_into_aws(x.tierings)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +status: try_from_aws(x.status)?, +tierings: try_from_aws(x.tierings)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_status(Some(try_into_aws(x.status)?)); +y = y.set_tierings(Some(try_into_aws(x.tierings)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::IntelligentTieringFilter { type Target = aws_sdk_s3::types::IntelligentTieringFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - and: try_from_aws(x.and)?, - prefix: try_from_aws(x.prefix)?, - tag: try_from_aws(x.tag)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +and: try_from_aws(x.and)?, +prefix: try_from_aws(x.prefix)?, +tag: try_from_aws(x.tag)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_and(try_into_aws(x.and)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tag(try_into_aws(x.tag)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_and(try_into_aws(x.and)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tag(try_into_aws(x.tag)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::IntelligentTieringStatus { type Target = aws_sdk_s3::types::IntelligentTieringStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::IntelligentTieringStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::IntelligentTieringStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::IntelligentTieringStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::IntelligentTieringStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::IntelligentTieringStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::IntelligentTieringStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InvalidObjectState { type Target = aws_sdk_s3::types::error::InvalidObjectState; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_tier: try_from_aws(x.access_tier)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_tier: try_from_aws(x.access_tier)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_tier(try_into_aws(x.access_tier)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_tier(try_into_aws(x.access_tier)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InvalidRequest { type Target = aws_sdk_s3::types::error::InvalidRequest; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InvalidWriteOffset { type Target = aws_sdk_s3::types::error::InvalidWriteOffset; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InventoryConfiguration { type Target = aws_sdk_s3::types::InventoryConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - destination: unwrap_from_aws(x.destination, "destination")?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - included_object_versions: try_from_aws(x.included_object_versions)?, - is_enabled: try_from_aws(x.is_enabled)?, - optional_fields: try_from_aws(x.optional_fields)?, - schedule: unwrap_from_aws(x.schedule, "schedule")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_destination(Some(try_into_aws(x.destination)?)); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_included_object_versions(Some(try_into_aws(x.included_object_versions)?)); - y = y.set_is_enabled(Some(try_into_aws(x.is_enabled)?)); - y = y.set_optional_fields(try_into_aws(x.optional_fields)?); - y = y.set_schedule(Some(try_into_aws(x.schedule)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +destination: unwrap_from_aws(x.destination, "destination")?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +included_object_versions: try_from_aws(x.included_object_versions)?, +is_enabled: try_from_aws(x.is_enabled)?, +optional_fields: try_from_aws(x.optional_fields)?, +schedule: unwrap_from_aws(x.schedule, "schedule")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_destination(Some(try_into_aws(x.destination)?)); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_included_object_versions(Some(try_into_aws(x.included_object_versions)?)); +y = y.set_is_enabled(Some(try_into_aws(x.is_enabled)?)); +y = y.set_optional_fields(try_into_aws(x.optional_fields)?); +y = y.set_schedule(Some(try_into_aws(x.schedule)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::InventoryDestination { type Target = aws_sdk_s3::types::InventoryDestination; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InventoryEncryption { type Target = aws_sdk_s3::types::InventoryEncryption; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - ssekms: try_from_aws(x.ssekms)?, - sses3: try_from_aws(x.sses3)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +ssekms: try_from_aws(x.ssekms)?, +sses3: try_from_aws(x.sses3)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_ssekms(try_into_aws(x.ssekms)?); - y = y.set_sses3(try_into_aws(x.sses3)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_ssekms(try_into_aws(x.ssekms)?); +y = y.set_sses3(try_into_aws(x.sses3)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::InventoryFilter { type Target = aws_sdk_s3::types::InventoryFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(Some(try_into_aws(x.prefix)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(Some(try_into_aws(x.prefix)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::InventoryFormat { type Target = aws_sdk_s3::types::InventoryFormat; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::InventoryFormat::Csv => Self::from_static(Self::CSV), - aws_sdk_s3::types::InventoryFormat::Orc => Self::from_static(Self::ORC), - aws_sdk_s3::types::InventoryFormat::Parquet => Self::from_static(Self::PARQUET), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::InventoryFormat::Csv => Self::from_static(Self::CSV), +aws_sdk_s3::types::InventoryFormat::Orc => Self::from_static(Self::ORC), +aws_sdk_s3::types::InventoryFormat::Parquet => Self::from_static(Self::PARQUET), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::InventoryFormat::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::InventoryFormat::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InventoryFrequency { type Target = aws_sdk_s3::types::InventoryFrequency; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::InventoryFrequency::Daily => Self::from_static(Self::DAILY), - aws_sdk_s3::types::InventoryFrequency::Weekly => Self::from_static(Self::WEEKLY), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::InventoryFrequency::Daily => Self::from_static(Self::DAILY), +aws_sdk_s3::types::InventoryFrequency::Weekly => Self::from_static(Self::WEEKLY), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::InventoryFrequency::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::InventoryFrequency::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InventoryIncludedObjectVersions { type Target = aws_sdk_s3::types::InventoryIncludedObjectVersions; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::InventoryIncludedObjectVersions::All => Self::from_static(Self::ALL), - aws_sdk_s3::types::InventoryIncludedObjectVersions::Current => Self::from_static(Self::CURRENT), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::InventoryIncludedObjectVersions::All => Self::from_static(Self::ALL), +aws_sdk_s3::types::InventoryIncludedObjectVersions::Current => Self::from_static(Self::CURRENT), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::InventoryIncludedObjectVersions::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::InventoryIncludedObjectVersions::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InventoryOptionalField { type Target = aws_sdk_s3::types::InventoryOptionalField; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::InventoryOptionalField::BucketKeyStatus => Self::from_static(Self::BUCKET_KEY_STATUS), - aws_sdk_s3::types::InventoryOptionalField::ChecksumAlgorithm => Self::from_static(Self::CHECKSUM_ALGORITHM), - aws_sdk_s3::types::InventoryOptionalField::ETag => Self::from_static(Self::E_TAG), - aws_sdk_s3::types::InventoryOptionalField::EncryptionStatus => Self::from_static(Self::ENCRYPTION_STATUS), - aws_sdk_s3::types::InventoryOptionalField::IntelligentTieringAccessTier => { - Self::from_static(Self::INTELLIGENT_TIERING_ACCESS_TIER) - } - aws_sdk_s3::types::InventoryOptionalField::IsMultipartUploaded => Self::from_static(Self::IS_MULTIPART_UPLOADED), - aws_sdk_s3::types::InventoryOptionalField::LastModifiedDate => Self::from_static(Self::LAST_MODIFIED_DATE), - aws_sdk_s3::types::InventoryOptionalField::ObjectAccessControlList => { - Self::from_static(Self::OBJECT_ACCESS_CONTROL_LIST) - } - aws_sdk_s3::types::InventoryOptionalField::ObjectLockLegalHoldStatus => { - Self::from_static(Self::OBJECT_LOCK_LEGAL_HOLD_STATUS) - } - aws_sdk_s3::types::InventoryOptionalField::ObjectLockMode => Self::from_static(Self::OBJECT_LOCK_MODE), - aws_sdk_s3::types::InventoryOptionalField::ObjectLockRetainUntilDate => { - Self::from_static(Self::OBJECT_LOCK_RETAIN_UNTIL_DATE) - } - aws_sdk_s3::types::InventoryOptionalField::ObjectOwner => Self::from_static(Self::OBJECT_OWNER), - aws_sdk_s3::types::InventoryOptionalField::ReplicationStatus => Self::from_static(Self::REPLICATION_STATUS), - aws_sdk_s3::types::InventoryOptionalField::Size => Self::from_static(Self::SIZE), - aws_sdk_s3::types::InventoryOptionalField::StorageClass => Self::from_static(Self::STORAGE_CLASS), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::InventoryOptionalField::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::InventoryOptionalField::BucketKeyStatus => Self::from_static(Self::BUCKET_KEY_STATUS), +aws_sdk_s3::types::InventoryOptionalField::ChecksumAlgorithm => Self::from_static(Self::CHECKSUM_ALGORITHM), +aws_sdk_s3::types::InventoryOptionalField::ETag => Self::from_static(Self::E_TAG), +aws_sdk_s3::types::InventoryOptionalField::EncryptionStatus => Self::from_static(Self::ENCRYPTION_STATUS), +aws_sdk_s3::types::InventoryOptionalField::IntelligentTieringAccessTier => Self::from_static(Self::INTELLIGENT_TIERING_ACCESS_TIER), +aws_sdk_s3::types::InventoryOptionalField::IsMultipartUploaded => Self::from_static(Self::IS_MULTIPART_UPLOADED), +aws_sdk_s3::types::InventoryOptionalField::LastModifiedDate => Self::from_static(Self::LAST_MODIFIED_DATE), +aws_sdk_s3::types::InventoryOptionalField::ObjectAccessControlList => Self::from_static(Self::OBJECT_ACCESS_CONTROL_LIST), +aws_sdk_s3::types::InventoryOptionalField::ObjectLockLegalHoldStatus => Self::from_static(Self::OBJECT_LOCK_LEGAL_HOLD_STATUS), +aws_sdk_s3::types::InventoryOptionalField::ObjectLockMode => Self::from_static(Self::OBJECT_LOCK_MODE), +aws_sdk_s3::types::InventoryOptionalField::ObjectLockRetainUntilDate => Self::from_static(Self::OBJECT_LOCK_RETAIN_UNTIL_DATE), +aws_sdk_s3::types::InventoryOptionalField::ObjectOwner => Self::from_static(Self::OBJECT_OWNER), +aws_sdk_s3::types::InventoryOptionalField::ReplicationStatus => Self::from_static(Self::REPLICATION_STATUS), +aws_sdk_s3::types::InventoryOptionalField::Size => Self::from_static(Self::SIZE), +aws_sdk_s3::types::InventoryOptionalField::StorageClass => Self::from_static(Self::STORAGE_CLASS), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::InventoryOptionalField::from(x.as_str())) +} } impl AwsConversion for s3s::dto::InventoryS3BucketDestination { type Target = aws_sdk_s3::types::InventoryS3BucketDestination; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - account_id: try_from_aws(x.account_id)?, - bucket: try_from_aws(x.bucket)?, - encryption: try_from_aws(x.encryption)?, - format: try_from_aws(x.format)?, - prefix: try_from_aws(x.prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_account_id(try_into_aws(x.account_id)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_encryption(try_into_aws(x.encryption)?); - y = y.set_format(Some(try_into_aws(x.format)?)); - y = y.set_prefix(try_into_aws(x.prefix)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +account_id: try_from_aws(x.account_id)?, +bucket: try_from_aws(x.bucket)?, +encryption: try_from_aws(x.encryption)?, +format: try_from_aws(x.format)?, +prefix: try_from_aws(x.prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_account_id(try_into_aws(x.account_id)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_encryption(try_into_aws(x.encryption)?); +y = y.set_format(Some(try_into_aws(x.format)?)); +y = y.set_prefix(try_into_aws(x.prefix)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::InventorySchedule { type Target = aws_sdk_s3::types::InventorySchedule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - frequency: try_from_aws(x.frequency)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +frequency: try_from_aws(x.frequency)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_frequency(Some(try_into_aws(x.frequency)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_frequency(Some(try_into_aws(x.frequency)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::JSONInput { type Target = aws_sdk_s3::types::JsonInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - type_: try_from_aws(x.r#type)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +type_: try_from_aws(x.r#type)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_type(try_into_aws(x.type_)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_type(try_into_aws(x.type_)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::JSONOutput { type Target = aws_sdk_s3::types::JsonOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - record_delimiter: try_from_aws(x.record_delimiter)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +record_delimiter: try_from_aws(x.record_delimiter)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::JSONType { type Target = aws_sdk_s3::types::JsonType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::JsonType::Document => Self::from_static(Self::DOCUMENT), - aws_sdk_s3::types::JsonType::Lines => Self::from_static(Self::LINES), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::JsonType::Document => Self::from_static(Self::DOCUMENT), +aws_sdk_s3::types::JsonType::Lines => Self::from_static(Self::LINES), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::JsonType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::JsonType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::LambdaFunctionConfiguration { type Target = aws_sdk_s3::types::LambdaFunctionConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - events: try_from_aws(x.events)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - lambda_function_arn: try_from_aws(x.lambda_function_arn)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_events(Some(try_into_aws(x.events)?)); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_lambda_function_arn(Some(try_into_aws(x.lambda_function_arn)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +events: try_from_aws(x.events)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +lambda_function_arn: try_from_aws(x.lambda_function_arn)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_events(Some(try_into_aws(x.events)?)); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_lambda_function_arn(Some(try_into_aws(x.lambda_function_arn)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::LifecycleExpiration { type Target = aws_sdk_s3::types::LifecycleExpiration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - date: try_from_aws(x.date)?, - days: try_from_aws(x.days)?, - expired_object_delete_marker: try_from_aws(x.expired_object_delete_marker)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +date: try_from_aws(x.date)?, +days: try_from_aws(x.days)?, +expired_object_delete_marker: try_from_aws(x.expired_object_delete_marker)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_date(try_into_aws(x.date)?); - y = y.set_days(try_into_aws(x.days)?); - y = y.set_expired_object_delete_marker(try_into_aws(x.expired_object_delete_marker)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_date(try_into_aws(x.date)?); +y = y.set_days(try_into_aws(x.days)?); +y = y.set_expired_object_delete_marker(try_into_aws(x.expired_object_delete_marker)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::LifecycleRule { type Target = aws_sdk_s3::types::LifecycleRule; - type Error = S3Error; - - #[allow(deprecated)] - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - abort_incomplete_multipart_upload: try_from_aws(x.abort_incomplete_multipart_upload)?, - expiration: try_from_aws(x.expiration)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - noncurrent_version_expiration: try_from_aws(x.noncurrent_version_expiration)?, - noncurrent_version_transitions: try_from_aws(x.noncurrent_version_transitions)?, - prefix: try_from_aws(x.prefix)?, - status: try_from_aws(x.status)?, - transitions: try_from_aws(x.transitions)?, - }) - } - - #[allow(deprecated)] - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_abort_incomplete_multipart_upload(try_into_aws(x.abort_incomplete_multipart_upload)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_noncurrent_version_expiration(try_into_aws(x.noncurrent_version_expiration)?); - y = y.set_noncurrent_version_transitions(try_into_aws(x.noncurrent_version_transitions)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_status(Some(try_into_aws(x.status)?)); - y = y.set_transitions(try_into_aws(x.transitions)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +#[allow(deprecated)] +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +abort_incomplete_multipart_upload: try_from_aws(x.abort_incomplete_multipart_upload)?, +expiration: try_from_aws(x.expiration)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +noncurrent_version_expiration: try_from_aws(x.noncurrent_version_expiration)?, +noncurrent_version_transitions: try_from_aws(x.noncurrent_version_transitions)?, +prefix: try_from_aws(x.prefix)?, +status: try_from_aws(x.status)?, +transitions: try_from_aws(x.transitions)?, +}) +} + +#[allow(deprecated)] +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_abort_incomplete_multipart_upload(try_into_aws(x.abort_incomplete_multipart_upload)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_noncurrent_version_expiration(try_into_aws(x.noncurrent_version_expiration)?); +y = y.set_noncurrent_version_transitions(try_into_aws(x.noncurrent_version_transitions)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_status(Some(try_into_aws(x.status)?)); +y = y.set_transitions(try_into_aws(x.transitions)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::LifecycleRuleAndOperator { type Target = aws_sdk_s3::types::LifecycleRuleAndOperator; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - object_size_greater_than: try_from_aws(x.object_size_greater_than)?, - object_size_less_than: try_from_aws(x.object_size_less_than)?, - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); - y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +object_size_greater_than: try_from_aws(x.object_size_greater_than)?, +object_size_less_than: try_from_aws(x.object_size_less_than)?, +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); +y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::LifecycleRuleFilter { type Target = aws_sdk_s3::types::LifecycleRuleFilter; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - and: try_from_aws(x.and)?, - object_size_greater_than: try_from_aws(x.object_size_greater_than)?, - object_size_less_than: try_from_aws(x.object_size_less_than)?, - prefix: try_from_aws(x.prefix)?, - tag: try_from_aws(x.tag)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_and(try_into_aws(x.and)?); - y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); - y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tag(try_into_aws(x.tag)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +and: try_from_aws(x.and)?, +object_size_greater_than: try_from_aws(x.object_size_greater_than)?, +object_size_less_than: try_from_aws(x.object_size_less_than)?, +prefix: try_from_aws(x.prefix)?, +tag: try_from_aws(x.tag)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_and(try_into_aws(x.and)?); +y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); +y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tag(try_into_aws(x.tag)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketAnalyticsConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_analytics_configurations::ListBucketAnalyticsConfigurationsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketAnalyticsConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_analytics_configurations::ListBucketAnalyticsConfigurationsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - analytics_configuration_list: try_from_aws(x.analytics_configuration_list)?, - continuation_token: try_from_aws(x.continuation_token)?, - is_truncated: try_from_aws(x.is_truncated)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_analytics_configuration_list(try_into_aws(x.analytics_configuration_list)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +analytics_configuration_list: try_from_aws(x.analytics_configuration_list)?, +continuation_token: try_from_aws(x.continuation_token)?, +is_truncated: try_from_aws(x.is_truncated)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_analytics_configuration_list(try_into_aws(x.analytics_configuration_list)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketIntelligentTieringConfigurationsInput { - type Target = - aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsInput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsInput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketIntelligentTieringConfigurationsOutput { - type Target = - aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - continuation_token: try_from_aws(x.continuation_token)?, - intelligent_tiering_configuration_list: try_from_aws(x.intelligent_tiering_configuration_list)?, - is_truncated: try_from_aws(x.is_truncated)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_intelligent_tiering_configuration_list(try_into_aws(x.intelligent_tiering_configuration_list)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - Ok(y.build()) - } + type Target = aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput; +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +continuation_token: try_from_aws(x.continuation_token)?, +intelligent_tiering_configuration_list: try_from_aws(x.intelligent_tiering_configuration_list)?, +is_truncated: try_from_aws(x.is_truncated)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_intelligent_tiering_configuration_list(try_into_aws(x.intelligent_tiering_configuration_list)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketInventoryConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketInventoryConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - continuation_token: try_from_aws(x.continuation_token)?, - inventory_configuration_list: try_from_aws(x.inventory_configuration_list)?, - is_truncated: try_from_aws(x.is_truncated)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_inventory_configuration_list(try_into_aws(x.inventory_configuration_list)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +continuation_token: try_from_aws(x.continuation_token)?, +inventory_configuration_list: try_from_aws(x.inventory_configuration_list)?, +is_truncated: try_from_aws(x.is_truncated)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_inventory_configuration_list(try_into_aws(x.inventory_configuration_list)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketMetricsConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketMetricsConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - continuation_token: try_from_aws(x.continuation_token)?, - is_truncated: try_from_aws(x.is_truncated)?, - metrics_configuration_list: try_from_aws(x.metrics_configuration_list)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_metrics_configuration_list(try_into_aws(x.metrics_configuration_list)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +continuation_token: try_from_aws(x.continuation_token)?, +is_truncated: try_from_aws(x.is_truncated)?, +metrics_configuration_list: try_from_aws(x.metrics_configuration_list)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_metrics_configuration_list(try_into_aws(x.metrics_configuration_list)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListBucketsInput { type Target = aws_sdk_s3::operation::list_buckets::ListBucketsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_region: try_from_aws(x.bucket_region)?, - continuation_token: try_from_aws(x.continuation_token)?, - max_buckets: try_from_aws(x.max_buckets)?, - prefix: try_from_aws(x.prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_region(try_into_aws(x.bucket_region)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_max_buckets(try_into_aws(x.max_buckets)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_region: try_from_aws(x.bucket_region)?, +continuation_token: try_from_aws(x.continuation_token)?, +max_buckets: try_from_aws(x.max_buckets)?, +prefix: try_from_aws(x.prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_region(try_into_aws(x.bucket_region)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_max_buckets(try_into_aws(x.max_buckets)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListBucketsOutput { type Target = aws_sdk_s3::operation::list_buckets::ListBucketsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - buckets: try_from_aws(x.buckets)?, - continuation_token: try_from_aws(x.continuation_token)?, - owner: try_from_aws(x.owner)?, - prefix: try_from_aws(x.prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_buckets(try_into_aws(x.buckets)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +buckets: try_from_aws(x.buckets)?, +continuation_token: try_from_aws(x.continuation_token)?, +owner: try_from_aws(x.owner)?, +prefix: try_from_aws(x.prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_buckets(try_into_aws(x.buckets)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListDirectoryBucketsInput { type Target = aws_sdk_s3::operation::list_directory_buckets::ListDirectoryBucketsInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - continuation_token: try_from_aws(x.continuation_token)?, - max_directory_buckets: try_from_aws(x.max_directory_buckets)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +continuation_token: try_from_aws(x.continuation_token)?, +max_directory_buckets: try_from_aws(x.max_directory_buckets)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_max_directory_buckets(try_into_aws(x.max_directory_buckets)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_max_directory_buckets(try_into_aws(x.max_directory_buckets)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListDirectoryBucketsOutput { type Target = aws_sdk_s3::operation::list_directory_buckets::ListDirectoryBucketsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - buckets: try_from_aws(x.buckets)?, - continuation_token: try_from_aws(x.continuation_token)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +buckets: try_from_aws(x.buckets)?, +continuation_token: try_from_aws(x.continuation_token)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_buckets(try_into_aws(x.buckets)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_buckets(try_into_aws(x.buckets)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListMultipartUploadsInput { type Target = aws_sdk_s3::operation::list_multipart_uploads::ListMultipartUploadsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key_marker: try_from_aws(x.key_marker)?, - max_uploads: try_from_aws(x.max_uploads)?, - prefix: try_from_aws(x.prefix)?, - request_payer: try_from_aws(x.request_payer)?, - upload_id_marker: try_from_aws(x.upload_id_marker)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key_marker(try_into_aws(x.key_marker)?); - y = y.set_max_uploads(try_into_aws(x.max_uploads)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key_marker: try_from_aws(x.key_marker)?, +max_uploads: try_from_aws(x.max_uploads)?, +prefix: try_from_aws(x.prefix)?, +request_payer: try_from_aws(x.request_payer)?, +upload_id_marker: try_from_aws(x.upload_id_marker)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key_marker(try_into_aws(x.key_marker)?); +y = y.set_max_uploads(try_into_aws(x.max_uploads)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListMultipartUploadsOutput { type Target = aws_sdk_s3::operation::list_multipart_uploads::ListMultipartUploadsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: try_from_aws(x.bucket)?, - common_prefixes: try_from_aws(x.common_prefixes)?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - is_truncated: try_from_aws(x.is_truncated)?, - key_marker: try_from_aws(x.key_marker)?, - max_uploads: try_from_aws(x.max_uploads)?, - next_key_marker: try_from_aws(x.next_key_marker)?, - next_upload_id_marker: try_from_aws(x.next_upload_id_marker)?, - prefix: try_from_aws(x.prefix)?, - request_charged: try_from_aws(x.request_charged)?, - upload_id_marker: try_from_aws(x.upload_id_marker)?, - uploads: try_from_aws(x.uploads)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_key_marker(try_into_aws(x.key_marker)?); - y = y.set_max_uploads(try_into_aws(x.max_uploads)?); - y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); - y = y.set_next_upload_id_marker(try_into_aws(x.next_upload_id_marker)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); - y = y.set_uploads(try_into_aws(x.uploads)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: try_from_aws(x.bucket)?, +common_prefixes: try_from_aws(x.common_prefixes)?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +is_truncated: try_from_aws(x.is_truncated)?, +key_marker: try_from_aws(x.key_marker)?, +max_uploads: try_from_aws(x.max_uploads)?, +next_key_marker: try_from_aws(x.next_key_marker)?, +next_upload_id_marker: try_from_aws(x.next_upload_id_marker)?, +prefix: try_from_aws(x.prefix)?, +request_charged: try_from_aws(x.request_charged)?, +upload_id_marker: try_from_aws(x.upload_id_marker)?, +uploads: try_from_aws(x.uploads)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_key_marker(try_into_aws(x.key_marker)?); +y = y.set_max_uploads(try_into_aws(x.max_uploads)?); +y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); +y = y.set_next_upload_id_marker(try_into_aws(x.next_upload_id_marker)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); +y = y.set_uploads(try_into_aws(x.uploads)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListObjectVersionsInput { type Target = aws_sdk_s3::operation::list_object_versions::ListObjectVersionsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key_marker: try_from_aws(x.key_marker)?, - max_keys: try_from_aws(x.max_keys)?, - optional_object_attributes: try_from_aws(x.optional_object_attributes)?, - prefix: try_from_aws(x.prefix)?, - request_payer: try_from_aws(x.request_payer)?, - version_id_marker: try_from_aws(x.version_id_marker)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key_marker(try_into_aws(x.key_marker)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key_marker: try_from_aws(x.key_marker)?, +max_keys: try_from_aws(x.max_keys)?, +optional_object_attributes: try_from_aws(x.optional_object_attributes)?, +prefix: try_from_aws(x.prefix)?, +request_payer: try_from_aws(x.request_payer)?, +version_id_marker: try_from_aws(x.version_id_marker)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key_marker(try_into_aws(x.key_marker)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListObjectVersionsOutput { type Target = aws_sdk_s3::operation::list_object_versions::ListObjectVersionsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - common_prefixes: try_from_aws(x.common_prefixes)?, - delete_markers: try_from_aws(x.delete_markers)?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - is_truncated: try_from_aws(x.is_truncated)?, - key_marker: try_from_aws(x.key_marker)?, - max_keys: try_from_aws(x.max_keys)?, - name: try_from_aws(x.name)?, - next_key_marker: try_from_aws(x.next_key_marker)?, - next_version_id_marker: try_from_aws(x.next_version_id_marker)?, - prefix: try_from_aws(x.prefix)?, - request_charged: try_from_aws(x.request_charged)?, - version_id_marker: try_from_aws(x.version_id_marker)?, - versions: try_from_aws(x.versions)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); - y = y.set_delete_markers(try_into_aws(x.delete_markers)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_key_marker(try_into_aws(x.key_marker)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); - y = y.set_next_version_id_marker(try_into_aws(x.next_version_id_marker)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); - y = y.set_versions(try_into_aws(x.versions)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +common_prefixes: try_from_aws(x.common_prefixes)?, +delete_markers: try_from_aws(x.delete_markers)?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +is_truncated: try_from_aws(x.is_truncated)?, +key_marker: try_from_aws(x.key_marker)?, +max_keys: try_from_aws(x.max_keys)?, +name: try_from_aws(x.name)?, +next_key_marker: try_from_aws(x.next_key_marker)?, +next_version_id_marker: try_from_aws(x.next_version_id_marker)?, +prefix: try_from_aws(x.prefix)?, +request_charged: try_from_aws(x.request_charged)?, +version_id_marker: try_from_aws(x.version_id_marker)?, +versions: try_from_aws(x.versions)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); +y = y.set_delete_markers(try_into_aws(x.delete_markers)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_key_marker(try_into_aws(x.key_marker)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); +y = y.set_next_version_id_marker(try_into_aws(x.next_version_id_marker)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); +y = y.set_versions(try_into_aws(x.versions)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListObjectsInput { type Target = aws_sdk_s3::operation::list_objects::ListObjectsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - marker: try_from_aws(x.marker)?, - max_keys: try_from_aws(x.max_keys)?, - optional_object_attributes: try_from_aws(x.optional_object_attributes)?, - prefix: try_from_aws(x.prefix)?, - request_payer: try_from_aws(x.request_payer)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_marker(try_into_aws(x.marker)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +marker: try_from_aws(x.marker)?, +max_keys: try_from_aws(x.max_keys)?, +optional_object_attributes: try_from_aws(x.optional_object_attributes)?, +prefix: try_from_aws(x.prefix)?, +request_payer: try_from_aws(x.request_payer)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_marker(try_into_aws(x.marker)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListObjectsOutput { type Target = aws_sdk_s3::operation::list_objects::ListObjectsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - prefix: try_from_aws(x.prefix)?, - marker: try_from_aws(x.marker)?, - max_keys: try_from_aws(x.max_keys)?, - is_truncated: try_from_aws(x.is_truncated)?, - contents: try_from_aws(x.contents)?, - common_prefixes: try_from_aws(x.common_prefixes)?, - delimiter: try_from_aws(x.delimiter)?, - next_marker: try_from_aws(x.next_marker)?, - encoding_type: try_from_aws(x.encoding_type)?, - request_charged: try_from_aws(x.request_charged)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_marker(try_into_aws(x.marker)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_contents(try_into_aws(x.contents)?); - y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_next_marker(try_into_aws(x.next_marker)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +prefix: try_from_aws(x.prefix)?, +marker: try_from_aws(x.marker)?, +max_keys: try_from_aws(x.max_keys)?, +is_truncated: try_from_aws(x.is_truncated)?, +contents: try_from_aws(x.contents)?, +common_prefixes: try_from_aws(x.common_prefixes)?, +delimiter: try_from_aws(x.delimiter)?, +next_marker: try_from_aws(x.next_marker)?, +encoding_type: try_from_aws(x.encoding_type)?, +request_charged: try_from_aws(x.request_charged)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_marker(try_into_aws(x.marker)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_contents(try_into_aws(x.contents)?); +y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_next_marker(try_into_aws(x.next_marker)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListObjectsV2Input { type Target = aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Input; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - continuation_token: try_from_aws(x.continuation_token)?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - fetch_owner: try_from_aws(x.fetch_owner)?, - max_keys: try_from_aws(x.max_keys)?, - optional_object_attributes: try_from_aws(x.optional_object_attributes)?, - prefix: try_from_aws(x.prefix)?, - request_payer: try_from_aws(x.request_payer)?, - start_after: try_from_aws(x.start_after)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_start_after(try_into_aws(x.start_after)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +continuation_token: try_from_aws(x.continuation_token)?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +fetch_owner: try_from_aws(x.fetch_owner)?, +max_keys: try_from_aws(x.max_keys)?, +optional_object_attributes: try_from_aws(x.optional_object_attributes)?, +prefix: try_from_aws(x.prefix)?, +request_payer: try_from_aws(x.request_payer)?, +start_after: try_from_aws(x.start_after)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_start_after(try_into_aws(x.start_after)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListObjectsV2Output { type Target = aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Output; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - prefix: try_from_aws(x.prefix)?, - max_keys: try_from_aws(x.max_keys)?, - key_count: try_from_aws(x.key_count)?, - continuation_token: try_from_aws(x.continuation_token)?, - is_truncated: try_from_aws(x.is_truncated)?, - next_continuation_token: try_from_aws(x.next_continuation_token)?, - contents: try_from_aws(x.contents)?, - common_prefixes: try_from_aws(x.common_prefixes)?, - delimiter: try_from_aws(x.delimiter)?, - encoding_type: try_from_aws(x.encoding_type)?, - start_after: try_from_aws(x.start_after)?, - request_charged: try_from_aws(x.request_charged)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_max_keys(try_into_aws(x.max_keys)?); - y = y.set_key_count(try_into_aws(x.key_count)?); - y = y.set_continuation_token(try_into_aws(x.continuation_token)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); - y = y.set_contents(try_into_aws(x.contents)?); - y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); - y = y.set_delimiter(try_into_aws(x.delimiter)?); - y = y.set_encoding_type(try_into_aws(x.encoding_type)?); - y = y.set_start_after(try_into_aws(x.start_after)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +prefix: try_from_aws(x.prefix)?, +max_keys: try_from_aws(x.max_keys)?, +key_count: try_from_aws(x.key_count)?, +continuation_token: try_from_aws(x.continuation_token)?, +is_truncated: try_from_aws(x.is_truncated)?, +next_continuation_token: try_from_aws(x.next_continuation_token)?, +contents: try_from_aws(x.contents)?, +common_prefixes: try_from_aws(x.common_prefixes)?, +delimiter: try_from_aws(x.delimiter)?, +encoding_type: try_from_aws(x.encoding_type)?, +start_after: try_from_aws(x.start_after)?, +request_charged: try_from_aws(x.request_charged)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_max_keys(try_into_aws(x.max_keys)?); +y = y.set_key_count(try_into_aws(x.key_count)?); +y = y.set_continuation_token(try_into_aws(x.continuation_token)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); +y = y.set_contents(try_into_aws(x.contents)?); +y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); +y = y.set_delimiter(try_into_aws(x.delimiter)?); +y = y.set_encoding_type(try_into_aws(x.encoding_type)?); +y = y.set_start_after(try_into_aws(x.start_after)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ListPartsInput { type Target = aws_sdk_s3::operation::list_parts::ListPartsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - max_parts: try_from_aws(x.max_parts)?, - part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_max_parts(try_into_aws(x.max_parts)?); - y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +max_parts: try_from_aws(x.max_parts)?, +part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_max_parts(try_into_aws(x.max_parts)?); +y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ListPartsOutput { type Target = aws_sdk_s3::operation::list_parts::ListPartsOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - abort_date: try_from_aws(x.abort_date)?, - abort_rule_id: try_from_aws(x.abort_rule_id)?, - bucket: try_from_aws(x.bucket)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - initiator: try_from_aws(x.initiator)?, - is_truncated: try_from_aws(x.is_truncated)?, - key: try_from_aws(x.key)?, - max_parts: try_from_aws(x.max_parts)?, - next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, - owner: try_from_aws(x.owner)?, - part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, - parts: try_from_aws(x.parts)?, - request_charged: try_from_aws(x.request_charged)?, - storage_class: try_from_aws(x.storage_class)?, - upload_id: try_from_aws(x.upload_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_abort_date(try_into_aws(x.abort_date)?); - y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); - y = y.set_bucket(try_into_aws(x.bucket)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_initiator(try_into_aws(x.initiator)?); - y = y.set_is_truncated(try_into_aws(x.is_truncated)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_max_parts(try_into_aws(x.max_parts)?); - y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); - y = y.set_parts(try_into_aws(x.parts)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_upload_id(try_into_aws(x.upload_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +abort_date: try_from_aws(x.abort_date)?, +abort_rule_id: try_from_aws(x.abort_rule_id)?, +bucket: try_from_aws(x.bucket)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +initiator: try_from_aws(x.initiator)?, +is_truncated: try_from_aws(x.is_truncated)?, +key: try_from_aws(x.key)?, +max_parts: try_from_aws(x.max_parts)?, +next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, +owner: try_from_aws(x.owner)?, +part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, +parts: try_from_aws(x.parts)?, +request_charged: try_from_aws(x.request_charged)?, +storage_class: try_from_aws(x.storage_class)?, +upload_id: try_from_aws(x.upload_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_abort_date(try_into_aws(x.abort_date)?); +y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); +y = y.set_bucket(try_into_aws(x.bucket)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_initiator(try_into_aws(x.initiator)?); +y = y.set_is_truncated(try_into_aws(x.is_truncated)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_max_parts(try_into_aws(x.max_parts)?); +y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); +y = y.set_parts(try_into_aws(x.parts)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_upload_id(try_into_aws(x.upload_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::LocationInfo { type Target = aws_sdk_s3::types::LocationInfo; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - type_: try_from_aws(x.r#type)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +type_: try_from_aws(x.r#type)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_type(try_into_aws(x.type_)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_type(try_into_aws(x.type_)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::LocationType { type Target = aws_sdk_s3::types::LocationType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::LocationType::AvailabilityZone => Self::from_static(Self::AVAILABILITY_ZONE), - aws_sdk_s3::types::LocationType::LocalZone => Self::from_static(Self::LOCAL_ZONE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::LocationType::AvailabilityZone => Self::from_static(Self::AVAILABILITY_ZONE), +aws_sdk_s3::types::LocationType::LocalZone => Self::from_static(Self::LOCAL_ZONE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::LocationType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::LocationType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::LoggingEnabled { type Target = aws_sdk_s3::types::LoggingEnabled; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - target_bucket: try_from_aws(x.target_bucket)?, - target_grants: try_from_aws(x.target_grants)?, - target_object_key_format: try_from_aws(x.target_object_key_format)?, - target_prefix: try_from_aws(x.target_prefix)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_target_bucket(Some(try_into_aws(x.target_bucket)?)); - y = y.set_target_grants(try_into_aws(x.target_grants)?); - y = y.set_target_object_key_format(try_into_aws(x.target_object_key_format)?); - y = y.set_target_prefix(Some(try_into_aws(x.target_prefix)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +target_bucket: try_from_aws(x.target_bucket)?, +target_grants: try_from_aws(x.target_grants)?, +target_object_key_format: try_from_aws(x.target_object_key_format)?, +target_prefix: try_from_aws(x.target_prefix)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_target_bucket(Some(try_into_aws(x.target_bucket)?)); +y = y.set_target_grants(try_into_aws(x.target_grants)?); +y = y.set_target_object_key_format(try_into_aws(x.target_object_key_format)?); +y = y.set_target_prefix(Some(try_into_aws(x.target_prefix)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::MFADelete { type Target = aws_sdk_s3::types::MfaDelete; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MfaDelete::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::MfaDelete::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MfaDelete::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::MfaDelete::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::MfaDelete::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::MfaDelete::from(x.as_str())) +} } impl AwsConversion for s3s::dto::MFADeleteStatus { type Target = aws_sdk_s3::types::MfaDeleteStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MfaDeleteStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::MfaDeleteStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MfaDeleteStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::MfaDeleteStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::MfaDeleteStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::MfaDeleteStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::MetadataDirective { type Target = aws_sdk_s3::types::MetadataDirective; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MetadataDirective::Copy => Self::from_static(Self::COPY), - aws_sdk_s3::types::MetadataDirective::Replace => Self::from_static(Self::REPLACE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MetadataDirective::Copy => Self::from_static(Self::COPY), +aws_sdk_s3::types::MetadataDirective::Replace => Self::from_static(Self::REPLACE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::MetadataDirective::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::MetadataDirective::from(x.as_str())) +} } impl AwsConversion for s3s::dto::MetadataEntry { type Target = aws_sdk_s3::types::MetadataEntry; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - name: try_from_aws(x.name)?, - value: try_from_aws(x.value)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +name: try_from_aws(x.name)?, +value: try_from_aws(x.value)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_name(try_into_aws(x.name)?); - y = y.set_value(try_into_aws(x.value)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_name(try_into_aws(x.name)?); +y = y.set_value(try_into_aws(x.value)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::MetadataTableConfiguration { type Target = aws_sdk_s3::types::MetadataTableConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - s3_tables_destination: unwrap_from_aws(x.s3_tables_destination, "s3_tables_destination")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3_tables_destination: unwrap_from_aws(x.s3_tables_destination, "s3_tables_destination")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3_tables_destination(Some(try_into_aws(x.s3_tables_destination)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3_tables_destination(Some(try_into_aws(x.s3_tables_destination)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::MetadataTableConfigurationResult { type Target = aws_sdk_s3::types::MetadataTableConfigurationResult; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - s3_tables_destination_result: unwrap_from_aws(x.s3_tables_destination_result, "s3_tables_destination_result")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3_tables_destination_result: unwrap_from_aws(x.s3_tables_destination_result, "s3_tables_destination_result")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3_tables_destination_result(Some(try_into_aws(x.s3_tables_destination_result)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3_tables_destination_result(Some(try_into_aws(x.s3_tables_destination_result)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Metrics { type Target = aws_sdk_s3::types::Metrics; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - event_threshold: try_from_aws(x.event_threshold)?, - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +event_threshold: try_from_aws(x.event_threshold)?, +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_event_threshold(try_into_aws(x.event_threshold)?); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_event_threshold(try_into_aws(x.event_threshold)?); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::MetricsAndOperator { type Target = aws_sdk_s3::types::MetricsAndOperator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_point_arn: try_from_aws(x.access_point_arn)?, - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_point_arn: try_from_aws(x.access_point_arn)?, +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_point_arn(try_into_aws(x.access_point_arn)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_point_arn(try_into_aws(x.access_point_arn)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::MetricsConfiguration { type Target = aws_sdk_s3::types::MetricsConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::MetricsFilter { type Target = aws_sdk_s3::types::MetricsFilter; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MetricsFilter::AccessPointArn(v) => Self::AccessPointArn(try_from_aws(v)?), - aws_sdk_s3::types::MetricsFilter::And(v) => Self::And(try_from_aws(v)?), - aws_sdk_s3::types::MetricsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), - aws_sdk_s3::types::MetricsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), - _ => unimplemented!("unknown variant of aws_sdk_s3::types::MetricsFilter: {x:?}"), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(match x { - Self::AccessPointArn(v) => aws_sdk_s3::types::MetricsFilter::AccessPointArn(try_into_aws(v)?), - Self::And(v) => aws_sdk_s3::types::MetricsFilter::And(try_into_aws(v)?), - Self::Prefix(v) => aws_sdk_s3::types::MetricsFilter::Prefix(try_into_aws(v)?), - Self::Tag(v) => aws_sdk_s3::types::MetricsFilter::Tag(try_into_aws(v)?), - _ => unimplemented!("unknown variant of MetricsFilter: {x:?}"), - }) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MetricsFilter::AccessPointArn(v) => Self::AccessPointArn(try_from_aws(v)?), +aws_sdk_s3::types::MetricsFilter::And(v) => Self::And(try_from_aws(v)?), +aws_sdk_s3::types::MetricsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), +aws_sdk_s3::types::MetricsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), +_ => unimplemented!("unknown variant of aws_sdk_s3::types::MetricsFilter: {x:?}"), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(match x { +Self::AccessPointArn(v) => aws_sdk_s3::types::MetricsFilter::AccessPointArn(try_into_aws(v)?), +Self::And(v) => aws_sdk_s3::types::MetricsFilter::And(try_into_aws(v)?), +Self::Prefix(v) => aws_sdk_s3::types::MetricsFilter::Prefix(try_into_aws(v)?), +Self::Tag(v) => aws_sdk_s3::types::MetricsFilter::Tag(try_into_aws(v)?), +_ => unimplemented!("unknown variant of MetricsFilter: {x:?}"), +}) +} } impl AwsConversion for s3s::dto::MetricsStatus { type Target = aws_sdk_s3::types::MetricsStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::MetricsStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::MetricsStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::MetricsStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::MetricsStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::MetricsStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::MetricsStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::MultipartUpload { type Target = aws_sdk_s3::types::MultipartUpload; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - initiated: try_from_aws(x.initiated)?, - initiator: try_from_aws(x.initiator)?, - key: try_from_aws(x.key)?, - owner: try_from_aws(x.owner)?, - storage_class: try_from_aws(x.storage_class)?, - upload_id: try_from_aws(x.upload_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_initiated(try_into_aws(x.initiated)?); - y = y.set_initiator(try_into_aws(x.initiator)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_upload_id(try_into_aws(x.upload_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +initiated: try_from_aws(x.initiated)?, +initiator: try_from_aws(x.initiator)?, +key: try_from_aws(x.key)?, +owner: try_from_aws(x.owner)?, +storage_class: try_from_aws(x.storage_class)?, +upload_id: try_from_aws(x.upload_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_initiated(try_into_aws(x.initiated)?); +y = y.set_initiator(try_into_aws(x.initiator)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_upload_id(try_into_aws(x.upload_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoSuchBucket { type Target = aws_sdk_s3::types::error::NoSuchBucket; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoSuchKey { type Target = aws_sdk_s3::types::error::NoSuchKey; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoSuchUpload { type Target = aws_sdk_s3::types::error::NoSuchUpload; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoncurrentVersionExpiration { type Target = aws_sdk_s3::types::NoncurrentVersionExpiration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, - noncurrent_days: try_from_aws(x.noncurrent_days)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, +noncurrent_days: try_from_aws(x.noncurrent_days)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); - y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); +y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NoncurrentVersionTransition { type Target = aws_sdk_s3::types::NoncurrentVersionTransition; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, - noncurrent_days: try_from_aws(x.noncurrent_days)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, +noncurrent_days: try_from_aws(x.noncurrent_days)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); - y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); +y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NotFound { type Target = aws_sdk_s3::types::error::NotFound; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NotificationConfiguration { type Target = aws_sdk_s3::types::NotificationConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, - lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, - queue_configurations: try_from_aws(x.queue_configurations)?, - topic_configurations: try_from_aws(x.topic_configurations)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); - y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); - y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); - y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, +lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, +queue_configurations: try_from_aws(x.queue_configurations)?, +topic_configurations: try_from_aws(x.topic_configurations)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); +y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); +y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); +y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::NotificationConfigurationFilter { type Target = aws_sdk_s3::types::NotificationConfigurationFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - key: try_from_aws(x.key)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +key: try_from_aws(x.key)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_key(try_into_aws(x.key)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_key(try_into_aws(x.key)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Object { type Target = aws_sdk_s3::types::Object; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - key: try_from_aws(x.key)?, - last_modified: try_from_aws(x.last_modified)?, - owner: try_from_aws(x.owner)?, - restore_status: try_from_aws(x.restore_status)?, - size: try_from_aws(x.size)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_restore_status(try_into_aws(x.restore_status)?); - y = y.set_size(try_into_aws(x.size)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +key: try_from_aws(x.key)?, +last_modified: try_from_aws(x.last_modified)?, +owner: try_from_aws(x.owner)?, +restore_status: try_from_aws(x.restore_status)?, +size: try_from_aws(x.size)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_restore_status(try_into_aws(x.restore_status)?); +y = y.set_size(try_into_aws(x.size)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectAlreadyInActiveTierError { type Target = aws_sdk_s3::types::error::ObjectAlreadyInActiveTierError; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectAttributes { type Target = aws_sdk_s3::types::ObjectAttributes; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectAttributes::Checksum => Self::from_static(Self::CHECKSUM), - aws_sdk_s3::types::ObjectAttributes::Etag => Self::from_static(Self::ETAG), - aws_sdk_s3::types::ObjectAttributes::ObjectParts => Self::from_static(Self::OBJECT_PARTS), - aws_sdk_s3::types::ObjectAttributes::ObjectSize => Self::from_static(Self::OBJECT_SIZE), - aws_sdk_s3::types::ObjectAttributes::StorageClass => Self::from_static(Self::STORAGE_CLASS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectAttributes::Checksum => Self::from_static(Self::CHECKSUM), +aws_sdk_s3::types::ObjectAttributes::Etag => Self::from_static(Self::ETAG), +aws_sdk_s3::types::ObjectAttributes::ObjectParts => Self::from_static(Self::OBJECT_PARTS), +aws_sdk_s3::types::ObjectAttributes::ObjectSize => Self::from_static(Self::OBJECT_SIZE), +aws_sdk_s3::types::ObjectAttributes::StorageClass => Self::from_static(Self::STORAGE_CLASS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectAttributes::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectAttributes::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectCannedACL { type Target = aws_sdk_s3::types::ObjectCannedAcl; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), - aws_sdk_s3::types::ObjectCannedAcl::AwsExecRead => Self::from_static(Self::AWS_EXEC_READ), - aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerFullControl => Self::from_static(Self::BUCKET_OWNER_FULL_CONTROL), - aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerRead => Self::from_static(Self::BUCKET_OWNER_READ), - aws_sdk_s3::types::ObjectCannedAcl::Private => Self::from_static(Self::PRIVATE), - aws_sdk_s3::types::ObjectCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), - aws_sdk_s3::types::ObjectCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectCannedAcl::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), +aws_sdk_s3::types::ObjectCannedAcl::AwsExecRead => Self::from_static(Self::AWS_EXEC_READ), +aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerFullControl => Self::from_static(Self::BUCKET_OWNER_FULL_CONTROL), +aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerRead => Self::from_static(Self::BUCKET_OWNER_READ), +aws_sdk_s3::types::ObjectCannedAcl::Private => Self::from_static(Self::PRIVATE), +aws_sdk_s3::types::ObjectCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), +aws_sdk_s3::types::ObjectCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectCannedAcl::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectIdentifier { type Target = aws_sdk_s3::types::ObjectIdentifier; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - e_tag: try_from_aws(x.e_tag)?, - key: try_from_aws(x.key)?, - last_modified_time: try_from_aws(x.last_modified_time)?, - size: try_from_aws(x.size)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_last_modified_time(try_into_aws(x.last_modified_time)?); - y = y.set_size(try_into_aws(x.size)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +e_tag: try_from_aws(x.e_tag)?, +key: try_from_aws(x.key)?, +last_modified_time: try_from_aws(x.last_modified_time)?, +size: try_from_aws(x.size)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_last_modified_time(try_into_aws(x.last_modified_time)?); +y = y.set_size(try_into_aws(x.size)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ObjectLockConfiguration { type Target = aws_sdk_s3::types::ObjectLockConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - object_lock_enabled: try_from_aws(x.object_lock_enabled)?, - rule: try_from_aws(x.rule)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +object_lock_enabled: try_from_aws(x.object_lock_enabled)?, +rule: try_from_aws(x.rule)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_object_lock_enabled(try_into_aws(x.object_lock_enabled)?); - y = y.set_rule(try_into_aws(x.rule)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_object_lock_enabled(try_into_aws(x.object_lock_enabled)?); +y = y.set_rule(try_into_aws(x.rule)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectLockEnabled { type Target = aws_sdk_s3::types::ObjectLockEnabled; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectLockEnabled::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectLockEnabled::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectLockEnabled::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectLockEnabled::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectLockLegalHold { type Target = aws_sdk_s3::types::ObjectLockLegalHold; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectLockLegalHoldStatus { type Target = aws_sdk_s3::types::ObjectLockLegalHoldStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectLockLegalHoldStatus::Off => Self::from_static(Self::OFF), - aws_sdk_s3::types::ObjectLockLegalHoldStatus::On => Self::from_static(Self::ON), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectLockLegalHoldStatus::Off => Self::from_static(Self::OFF), +aws_sdk_s3::types::ObjectLockLegalHoldStatus::On => Self::from_static(Self::ON), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectLockLegalHoldStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectLockLegalHoldStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectLockMode { type Target = aws_sdk_s3::types::ObjectLockMode; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectLockMode::Compliance => Self::from_static(Self::COMPLIANCE), - aws_sdk_s3::types::ObjectLockMode::Governance => Self::from_static(Self::GOVERNANCE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectLockMode::Compliance => Self::from_static(Self::COMPLIANCE), +aws_sdk_s3::types::ObjectLockMode::Governance => Self::from_static(Self::GOVERNANCE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectLockMode::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectLockMode::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectLockRetention { type Target = aws_sdk_s3::types::ObjectLockRetention; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - mode: try_from_aws(x.mode)?, - retain_until_date: try_from_aws(x.retain_until_date)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +mode: try_from_aws(x.mode)?, +retain_until_date: try_from_aws(x.retain_until_date)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_mode(try_into_aws(x.mode)?); - y = y.set_retain_until_date(try_into_aws(x.retain_until_date)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_mode(try_into_aws(x.mode)?); +y = y.set_retain_until_date(try_into_aws(x.retain_until_date)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectLockRetentionMode { type Target = aws_sdk_s3::types::ObjectLockRetentionMode; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectLockRetentionMode::Compliance => Self::from_static(Self::COMPLIANCE), - aws_sdk_s3::types::ObjectLockRetentionMode::Governance => Self::from_static(Self::GOVERNANCE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectLockRetentionMode::Compliance => Self::from_static(Self::COMPLIANCE), +aws_sdk_s3::types::ObjectLockRetentionMode::Governance => Self::from_static(Self::GOVERNANCE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectLockRetentionMode::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectLockRetentionMode::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectLockRule { type Target = aws_sdk_s3::types::ObjectLockRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - default_retention: try_from_aws(x.default_retention)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +default_retention: try_from_aws(x.default_retention)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_default_retention(try_into_aws(x.default_retention)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_default_retention(try_into_aws(x.default_retention)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectNotInActiveTierError { type Target = aws_sdk_s3::types::error::ObjectNotInActiveTierError; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectOwnership { type Target = aws_sdk_s3::types::ObjectOwnership; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectOwnership::BucketOwnerEnforced => Self::from_static(Self::BUCKET_OWNER_ENFORCED), - aws_sdk_s3::types::ObjectOwnership::BucketOwnerPreferred => Self::from_static(Self::BUCKET_OWNER_PREFERRED), - aws_sdk_s3::types::ObjectOwnership::ObjectWriter => Self::from_static(Self::OBJECT_WRITER), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectOwnership::BucketOwnerEnforced => Self::from_static(Self::BUCKET_OWNER_ENFORCED), +aws_sdk_s3::types::ObjectOwnership::BucketOwnerPreferred => Self::from_static(Self::BUCKET_OWNER_PREFERRED), +aws_sdk_s3::types::ObjectOwnership::ObjectWriter => Self::from_static(Self::OBJECT_WRITER), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectOwnership::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectOwnership::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectPart { type Target = aws_sdk_s3::types::ObjectPart; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - part_number: try_from_aws(x.part_number)?, - size: try_from_aws(x.size)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_part_number(try_into_aws(x.part_number)?); - y = y.set_size(try_into_aws(x.size)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +part_number: try_from_aws(x.part_number)?, +size: try_from_aws(x.size)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_part_number(try_into_aws(x.part_number)?); +y = y.set_size(try_into_aws(x.size)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectStorageClass { type Target = aws_sdk_s3::types::ObjectStorageClass; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), - aws_sdk_s3::types::ObjectStorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), - aws_sdk_s3::types::ObjectStorageClass::Glacier => Self::from_static(Self::GLACIER), - aws_sdk_s3::types::ObjectStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), - aws_sdk_s3::types::ObjectStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), - aws_sdk_s3::types::ObjectStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), - aws_sdk_s3::types::ObjectStorageClass::Outposts => Self::from_static(Self::OUTPOSTS), - aws_sdk_s3::types::ObjectStorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), - aws_sdk_s3::types::ObjectStorageClass::Snow => Self::from_static(Self::SNOW), - aws_sdk_s3::types::ObjectStorageClass::Standard => Self::from_static(Self::STANDARD), - aws_sdk_s3::types::ObjectStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectStorageClass::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), +aws_sdk_s3::types::ObjectStorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), +aws_sdk_s3::types::ObjectStorageClass::Glacier => Self::from_static(Self::GLACIER), +aws_sdk_s3::types::ObjectStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), +aws_sdk_s3::types::ObjectStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), +aws_sdk_s3::types::ObjectStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), +aws_sdk_s3::types::ObjectStorageClass::Outposts => Self::from_static(Self::OUTPOSTS), +aws_sdk_s3::types::ObjectStorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), +aws_sdk_s3::types::ObjectStorageClass::Snow => Self::from_static(Self::SNOW), +aws_sdk_s3::types::ObjectStorageClass::Standard => Self::from_static(Self::STANDARD), +aws_sdk_s3::types::ObjectStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectStorageClass::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ObjectVersion { type Target = aws_sdk_s3::types::ObjectVersion; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - is_latest: try_from_aws(x.is_latest)?, - key: try_from_aws(x.key)?, - last_modified: try_from_aws(x.last_modified)?, - owner: try_from_aws(x.owner)?, - restore_status: try_from_aws(x.restore_status)?, - size: try_from_aws(x.size)?, - storage_class: try_from_aws(x.storage_class)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_is_latest(try_into_aws(x.is_latest)?); - y = y.set_key(try_into_aws(x.key)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_owner(try_into_aws(x.owner)?); - y = y.set_restore_status(try_into_aws(x.restore_status)?); - y = y.set_size(try_into_aws(x.size)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +is_latest: try_from_aws(x.is_latest)?, +key: try_from_aws(x.key)?, +last_modified: try_from_aws(x.last_modified)?, +owner: try_from_aws(x.owner)?, +restore_status: try_from_aws(x.restore_status)?, +size: try_from_aws(x.size)?, +storage_class: try_from_aws(x.storage_class)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_is_latest(try_into_aws(x.is_latest)?); +y = y.set_key(try_into_aws(x.key)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_owner(try_into_aws(x.owner)?); +y = y.set_restore_status(try_into_aws(x.restore_status)?); +y = y.set_size(try_into_aws(x.size)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ObjectVersionStorageClass { type Target = aws_sdk_s3::types::ObjectVersionStorageClass; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ObjectVersionStorageClass::Standard => Self::from_static(Self::STANDARD), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ObjectVersionStorageClass::Standard => Self::from_static(Self::STANDARD), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ObjectVersionStorageClass::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ObjectVersionStorageClass::from(x.as_str())) +} } impl AwsConversion for s3s::dto::OptionalObjectAttributes { type Target = aws_sdk_s3::types::OptionalObjectAttributes; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::OptionalObjectAttributes::RestoreStatus => Self::from_static(Self::RESTORE_STATUS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::OptionalObjectAttributes::RestoreStatus => Self::from_static(Self::RESTORE_STATUS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::OptionalObjectAttributes::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::OptionalObjectAttributes::from(x.as_str())) +} } impl AwsConversion for s3s::dto::OutputLocation { type Target = aws_sdk_s3::types::OutputLocation; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { s3: try_from_aws(x.s3)? }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +s3: try_from_aws(x.s3)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_s3(try_into_aws(x.s3)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_s3(try_into_aws(x.s3)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::OutputSerialization { type Target = aws_sdk_s3::types::OutputSerialization; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - csv: try_from_aws(x.csv)?, - json: try_from_aws(x.json)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +csv: try_from_aws(x.csv)?, +json: try_from_aws(x.json)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_csv(try_into_aws(x.csv)?); - y = y.set_json(try_into_aws(x.json)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_csv(try_into_aws(x.csv)?); +y = y.set_json(try_into_aws(x.json)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Owner { type Target = aws_sdk_s3::types::Owner; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - display_name: try_from_aws(x.display_name)?, - id: try_from_aws(x.id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +display_name: try_from_aws(x.display_name)?, +id: try_from_aws(x.id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_display_name(try_into_aws(x.display_name)?); - y = y.set_id(try_into_aws(x.id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_display_name(try_into_aws(x.display_name)?); +y = y.set_id(try_into_aws(x.id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::OwnerOverride { type Target = aws_sdk_s3::types::OwnerOverride; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::OwnerOverride::Destination => Self::from_static(Self::DESTINATION), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::OwnerOverride::Destination => Self::from_static(Self::DESTINATION), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::OwnerOverride::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::OwnerOverride::from(x.as_str())) +} } impl AwsConversion for s3s::dto::OwnershipControls { type Target = aws_sdk_s3::types::OwnershipControls; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - rules: try_from_aws(x.rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +rules: try_from_aws(x.rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_rules(Some(try_into_aws(x.rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_rules(Some(try_into_aws(x.rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::OwnershipControlsRule { type Target = aws_sdk_s3::types::OwnershipControlsRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - object_ownership: try_from_aws(x.object_ownership)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +object_ownership: try_from_aws(x.object_ownership)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_object_ownership(Some(try_into_aws(x.object_ownership)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_object_ownership(Some(try_into_aws(x.object_ownership)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ParquetInput { type Target = aws_sdk_s3::types::ParquetInput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Part { type Target = aws_sdk_s3::types::Part; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - e_tag: try_from_aws(x.e_tag)?, - last_modified: try_from_aws(x.last_modified)?, - part_number: try_from_aws(x.part_number)?, - size: try_from_aws(x.size)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_part_number(try_into_aws(x.part_number)?); - y = y.set_size(try_into_aws(x.size)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +e_tag: try_from_aws(x.e_tag)?, +last_modified: try_from_aws(x.last_modified)?, +part_number: try_from_aws(x.part_number)?, +size: try_from_aws(x.size)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_part_number(try_into_aws(x.part_number)?); +y = y.set_size(try_into_aws(x.size)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PartitionDateSource { type Target = aws_sdk_s3::types::PartitionDateSource; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::PartitionDateSource::DeliveryTime => Self::from_static(Self::DELIVERY_TIME), - aws_sdk_s3::types::PartitionDateSource::EventTime => Self::from_static(Self::EVENT_TIME), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::PartitionDateSource::DeliveryTime => Self::from_static(Self::DELIVERY_TIME), +aws_sdk_s3::types::PartitionDateSource::EventTime => Self::from_static(Self::EVENT_TIME), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::PartitionDateSource::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::PartitionDateSource::from(x.as_str())) +} } impl AwsConversion for s3s::dto::PartitionedPrefix { type Target = aws_sdk_s3::types::PartitionedPrefix; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - partition_date_source: try_from_aws(x.partition_date_source)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +partition_date_source: try_from_aws(x.partition_date_source)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_partition_date_source(try_into_aws(x.partition_date_source)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_partition_date_source(try_into_aws(x.partition_date_source)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Payer { type Target = aws_sdk_s3::types::Payer; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Payer::BucketOwner => Self::from_static(Self::BUCKET_OWNER), - aws_sdk_s3::types::Payer::Requester => Self::from_static(Self::REQUESTER), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Payer::BucketOwner => Self::from_static(Self::BUCKET_OWNER), +aws_sdk_s3::types::Payer::Requester => Self::from_static(Self::REQUESTER), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Payer::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Payer::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Permission { type Target = aws_sdk_s3::types::Permission; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Permission::FullControl => Self::from_static(Self::FULL_CONTROL), - aws_sdk_s3::types::Permission::Read => Self::from_static(Self::READ), - aws_sdk_s3::types::Permission::ReadAcp => Self::from_static(Self::READ_ACP), - aws_sdk_s3::types::Permission::Write => Self::from_static(Self::WRITE), - aws_sdk_s3::types::Permission::WriteAcp => Self::from_static(Self::WRITE_ACP), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Permission::FullControl => Self::from_static(Self::FULL_CONTROL), +aws_sdk_s3::types::Permission::Read => Self::from_static(Self::READ), +aws_sdk_s3::types::Permission::ReadAcp => Self::from_static(Self::READ_ACP), +aws_sdk_s3::types::Permission::Write => Self::from_static(Self::WRITE), +aws_sdk_s3::types::Permission::WriteAcp => Self::from_static(Self::WRITE_ACP), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Permission::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Permission::from(x.as_str())) +} } impl AwsConversion for s3s::dto::PolicyStatus { type Target = aws_sdk_s3::types::PolicyStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - is_public: try_from_aws(x.is_public)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +is_public: try_from_aws(x.is_public)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_is_public(try_into_aws(x.is_public)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_is_public(try_into_aws(x.is_public)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Progress { type Target = aws_sdk_s3::types::Progress; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bytes_processed: try_from_aws(x.bytes_processed)?, - bytes_returned: try_from_aws(x.bytes_returned)?, - bytes_scanned: try_from_aws(x.bytes_scanned)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bytes_processed: try_from_aws(x.bytes_processed)?, +bytes_returned: try_from_aws(x.bytes_returned)?, +bytes_scanned: try_from_aws(x.bytes_scanned)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); - y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); - y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); +y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); +y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ProgressEvent { type Target = aws_sdk_s3::types::ProgressEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - details: try_from_aws(x.details)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +details: try_from_aws(x.details)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_details(try_into_aws(x.details)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_details(try_into_aws(x.details)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Protocol { type Target = aws_sdk_s3::types::Protocol; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Protocol::Http => Self::from_static(Self::HTTP), - aws_sdk_s3::types::Protocol::Https => Self::from_static(Self::HTTPS), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Protocol::Http => Self::from_static(Self::HTTP), +aws_sdk_s3::types::Protocol::Https => Self::from_static(Self::HTTPS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Protocol::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Protocol::from(x.as_str())) +} } impl AwsConversion for s3s::dto::PublicAccessBlockConfiguration { type Target = aws_sdk_s3::types::PublicAccessBlockConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - block_public_acls: try_from_aws(x.block_public_acls)?, - block_public_policy: try_from_aws(x.block_public_policy)?, - ignore_public_acls: try_from_aws(x.ignore_public_acls)?, - restrict_public_buckets: try_from_aws(x.restrict_public_buckets)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_block_public_acls(try_into_aws(x.block_public_acls)?); - y = y.set_block_public_policy(try_into_aws(x.block_public_policy)?); - y = y.set_ignore_public_acls(try_into_aws(x.ignore_public_acls)?); - y = y.set_restrict_public_buckets(try_into_aws(x.restrict_public_buckets)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +block_public_acls: try_from_aws(x.block_public_acls)?, +block_public_policy: try_from_aws(x.block_public_policy)?, +ignore_public_acls: try_from_aws(x.ignore_public_acls)?, +restrict_public_buckets: try_from_aws(x.restrict_public_buckets)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_block_public_acls(try_into_aws(x.block_public_acls)?); +y = y.set_block_public_policy(try_into_aws(x.block_public_policy)?); +y = y.set_ignore_public_acls(try_into_aws(x.ignore_public_acls)?); +y = y.set_restrict_public_buckets(try_into_aws(x.restrict_public_buckets)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketAccelerateConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - accelerate_configuration: unwrap_from_aws(x.accelerate_configuration, "accelerate_configuration")?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_accelerate_configuration(Some(try_into_aws(x.accelerate_configuration)?)); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +accelerate_configuration: unwrap_from_aws(x.accelerate_configuration, "accelerate_configuration")?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_accelerate_configuration(Some(try_into_aws(x.accelerate_configuration)?)); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketAccelerateConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketAclInput { type Target = aws_sdk_s3::operation::put_bucket_acl::PutBucketAclInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - access_control_policy: try_from_aws(x.access_control_policy)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write: try_from_aws(x.grant_write)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write(try_into_aws(x.grant_write)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +access_control_policy: try_from_aws(x.access_control_policy)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write: try_from_aws(x.grant_write)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write(try_into_aws(x.grant_write)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketAclOutput { type Target = aws_sdk_s3::operation::put_bucket_acl::PutBucketAclOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - analytics_configuration: unwrap_from_aws(x.analytics_configuration, "analytics_configuration")?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_analytics_configuration(Some(try_into_aws(x.analytics_configuration)?)); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +analytics_configuration: unwrap_from_aws(x.analytics_configuration, "analytics_configuration")?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_analytics_configuration(Some(try_into_aws(x.analytics_configuration)?)); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketCorsInput { type Target = aws_sdk_s3::operation::put_bucket_cors::PutBucketCorsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - cors_configuration: unwrap_from_aws(x.cors_configuration, "cors_configuration")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_cors_configuration(Some(try_into_aws(x.cors_configuration)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +cors_configuration: unwrap_from_aws(x.cors_configuration, "cors_configuration")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_cors_configuration(Some(try_into_aws(x.cors_configuration)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketCorsOutput { type Target = aws_sdk_s3::operation::put_bucket_cors::PutBucketCorsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketEncryptionInput { type Target = aws_sdk_s3::operation::put_bucket_encryption::PutBucketEncryptionInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - server_side_encryption_configuration: unwrap_from_aws( - x.server_side_encryption_configuration, - "server_side_encryption_configuration", - )?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_server_side_encryption_configuration(Some(try_into_aws(x.server_side_encryption_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +server_side_encryption_configuration: unwrap_from_aws(x.server_side_encryption_configuration, "server_side_encryption_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_server_side_encryption_configuration(Some(try_into_aws(x.server_side_encryption_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketEncryptionOutput { type Target = aws_sdk_s3::operation::put_bucket_encryption::PutBucketEncryptionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketIntelligentTieringConfigurationInput { - type Target = - aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - id: unwrap_from_aws(x.id, "id")?, - intelligent_tiering_configuration: unwrap_from_aws( - x.intelligent_tiering_configuration, - "intelligent_tiering_configuration", - )?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_intelligent_tiering_configuration(Some(try_into_aws(x.intelligent_tiering_configuration)?)); - y.build().map_err(S3Error::internal_error) - } + type Target = aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationInput; +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +id: unwrap_from_aws(x.id, "id")?, +intelligent_tiering_configuration: unwrap_from_aws(x.intelligent_tiering_configuration, "intelligent_tiering_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_intelligent_tiering_configuration(Some(try_into_aws(x.intelligent_tiering_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketIntelligentTieringConfigurationOutput { - type Target = - aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationOutput; - type Error = S3Error; + type Target = aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationOutput; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - inventory_configuration: unwrap_from_aws(x.inventory_configuration, "inventory_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_inventory_configuration(Some(try_into_aws(x.inventory_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +inventory_configuration: unwrap_from_aws(x.inventory_configuration, "inventory_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_inventory_configuration(Some(try_into_aws(x.inventory_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketLifecycleConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - lifecycle_configuration: try_from_aws(x.lifecycle_configuration)?, - transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_lifecycle_configuration(try_into_aws(x.lifecycle_configuration)?); - y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +lifecycle_configuration: try_from_aws(x.lifecycle_configuration)?, +transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_lifecycle_configuration(try_into_aws(x.lifecycle_configuration)?); +y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketLifecycleConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketLoggingInput { type Target = aws_sdk_s3::operation::put_bucket_logging::PutBucketLoggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_logging_status: unwrap_from_aws(x.bucket_logging_status, "bucket_logging_status")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_logging_status(Some(try_into_aws(x.bucket_logging_status)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_logging_status: unwrap_from_aws(x.bucket_logging_status, "bucket_logging_status")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_logging_status(Some(try_into_aws(x.bucket_logging_status)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketLoggingOutput { type Target = aws_sdk_s3::operation::put_bucket_logging::PutBucketLoggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - id: unwrap_from_aws(x.id, "id")?, - metrics_configuration: unwrap_from_aws(x.metrics_configuration, "metrics_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_id(Some(try_into_aws(x.id)?)); - y = y.set_metrics_configuration(Some(try_into_aws(x.metrics_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +id: unwrap_from_aws(x.id, "id")?, +metrics_configuration: unwrap_from_aws(x.metrics_configuration, "metrics_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_id(Some(try_into_aws(x.id)?)); +y = y.set_metrics_configuration(Some(try_into_aws(x.metrics_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketNotificationConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_notification_configuration::PutBucketNotificationConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - notification_configuration: unwrap_from_aws(x.notification_configuration, "notification_configuration")?, - skip_destination_validation: try_from_aws(x.skip_destination_validation)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_notification_configuration(Some(try_into_aws(x.notification_configuration)?)); - y = y.set_skip_destination_validation(try_into_aws(x.skip_destination_validation)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +notification_configuration: unwrap_from_aws(x.notification_configuration, "notification_configuration")?, +skip_destination_validation: try_from_aws(x.skip_destination_validation)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_notification_configuration(Some(try_into_aws(x.notification_configuration)?)); +y = y.set_skip_destination_validation(try_into_aws(x.skip_destination_validation)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketNotificationConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_notification_configuration::PutBucketNotificationConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - ownership_controls: unwrap_from_aws(x.ownership_controls, "ownership_controls")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_ownership_controls(Some(try_into_aws(x.ownership_controls)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +ownership_controls: unwrap_from_aws(x.ownership_controls, "ownership_controls")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_ownership_controls(Some(try_into_aws(x.ownership_controls)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketPolicyInput { type Target = aws_sdk_s3::operation::put_bucket_policy::PutBucketPolicyInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - confirm_remove_self_bucket_access: try_from_aws(x.confirm_remove_self_bucket_access)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - policy: unwrap_from_aws(x.policy, "policy")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_confirm_remove_self_bucket_access(try_into_aws(x.confirm_remove_self_bucket_access)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_policy(Some(try_into_aws(x.policy)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +confirm_remove_self_bucket_access: try_from_aws(x.confirm_remove_self_bucket_access)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +policy: unwrap_from_aws(x.policy, "policy")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_confirm_remove_self_bucket_access(try_into_aws(x.confirm_remove_self_bucket_access)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_policy(Some(try_into_aws(x.policy)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketPolicyOutput { type Target = aws_sdk_s3::operation::put_bucket_policy::PutBucketPolicyOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketReplicationInput { type Target = aws_sdk_s3::operation::put_bucket_replication::PutBucketReplicationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - replication_configuration: unwrap_from_aws(x.replication_configuration, "replication_configuration")?, - token: try_from_aws(x.token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_replication_configuration(Some(try_into_aws(x.replication_configuration)?)); - y = y.set_token(try_into_aws(x.token)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +replication_configuration: unwrap_from_aws(x.replication_configuration, "replication_configuration")?, +token: try_from_aws(x.token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_replication_configuration(Some(try_into_aws(x.replication_configuration)?)); +y = y.set_token(try_into_aws(x.token)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketReplicationOutput { type Target = aws_sdk_s3::operation::put_bucket_replication::PutBucketReplicationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketRequestPaymentInput { type Target = aws_sdk_s3::operation::put_bucket_request_payment::PutBucketRequestPaymentInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - request_payment_configuration: unwrap_from_aws(x.request_payment_configuration, "request_payment_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_request_payment_configuration(Some(try_into_aws(x.request_payment_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +request_payment_configuration: unwrap_from_aws(x.request_payment_configuration, "request_payment_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_request_payment_configuration(Some(try_into_aws(x.request_payment_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketRequestPaymentOutput { type Target = aws_sdk_s3::operation::put_bucket_request_payment::PutBucketRequestPaymentOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketTaggingInput { type Target = aws_sdk_s3::operation::put_bucket_tagging::PutBucketTaggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - tagging: unwrap_from_aws(x.tagging, "tagging")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_tagging(Some(try_into_aws(x.tagging)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +tagging: unwrap_from_aws(x.tagging, "tagging")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_tagging(Some(try_into_aws(x.tagging)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketTaggingOutput { type Target = aws_sdk_s3::operation::put_bucket_tagging::PutBucketTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketVersioningInput { type Target = aws_sdk_s3::operation::put_bucket_versioning::PutBucketVersioningInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - mfa: try_from_aws(x.mfa)?, - versioning_configuration: unwrap_from_aws(x.versioning_configuration, "versioning_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_mfa(try_into_aws(x.mfa)?); - y = y.set_versioning_configuration(Some(try_into_aws(x.versioning_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +mfa: try_from_aws(x.mfa)?, +versioning_configuration: unwrap_from_aws(x.versioning_configuration, "versioning_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_mfa(try_into_aws(x.mfa)?); +y = y.set_versioning_configuration(Some(try_into_aws(x.versioning_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketVersioningOutput { type Target = aws_sdk_s3::operation::put_bucket_versioning::PutBucketVersioningOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutBucketWebsiteInput { type Target = aws_sdk_s3::operation::put_bucket_website::PutBucketWebsiteInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - website_configuration: unwrap_from_aws(x.website_configuration, "website_configuration")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_website_configuration(Some(try_into_aws(x.website_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +website_configuration: unwrap_from_aws(x.website_configuration, "website_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_website_configuration(Some(try_into_aws(x.website_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutBucketWebsiteOutput { type Target = aws_sdk_s3::operation::put_bucket_website::PutBucketWebsiteOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectAclInput { type Target = aws_sdk_s3::operation::put_object_acl::PutObjectAclInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - access_control_policy: try_from_aws(x.access_control_policy)?, - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write: try_from_aws(x.grant_write)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write(try_into_aws(x.grant_write)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +access_control_policy: try_from_aws(x.access_control_policy)?, +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write: try_from_aws(x.grant_write)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write(try_into_aws(x.grant_write)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectAclOutput { type Target = aws_sdk_s3::operation::put_object_acl::PutObjectAclOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectInput { type Target = aws_sdk_s3::operation::put_object::PutObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - acl: try_from_aws(x.acl)?, - body: Some(try_from_aws(x.body)?), - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_length: try_from_aws(x.content_length)?, - content_md5: try_from_aws(x.content_md5)?, - content_type: try_from_aws(x.content_type)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - expires: try_from_aws(x.expires)?, - grant_full_control: try_from_aws(x.grant_full_control)?, - grant_read: try_from_aws(x.grant_read)?, - grant_read_acp: try_from_aws(x.grant_read_acp)?, - grant_write_acp: try_from_aws(x.grant_write_acp)?, - if_match: try_from_aws(x.if_match)?, - if_none_match: try_from_aws(x.if_none_match)?, - key: unwrap_from_aws(x.key, "key")?, - metadata: try_from_aws(x.metadata)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - storage_class: try_from_aws(x.storage_class)?, - tagging: try_from_aws(x.tagging)?, - website_redirect_location: try_from_aws(x.website_redirect_location)?, - write_offset_bytes: try_from_aws(x.write_offset_bytes)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_acl(try_into_aws(x.acl)?); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); - y = y.set_grant_read(try_into_aws(x.grant_read)?); - y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); - y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); - y = y.set_if_match(try_into_aws(x.if_match)?); - y = y.set_if_none_match(try_into_aws(x.if_none_match)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tagging(try_into_aws(x.tagging)?); - y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); - y = y.set_write_offset_bytes(try_into_aws(x.write_offset_bytes)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +acl: try_from_aws(x.acl)?, +body: Some(try_from_aws(x.body)?), +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_length: try_from_aws(x.content_length)?, +content_md5: try_from_aws(x.content_md5)?, +content_type: try_from_aws(x.content_type)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +expires: try_from_aws(x.expires)?, +grant_full_control: try_from_aws(x.grant_full_control)?, +grant_read: try_from_aws(x.grant_read)?, +grant_read_acp: try_from_aws(x.grant_read_acp)?, +grant_write_acp: try_from_aws(x.grant_write_acp)?, +if_match: try_from_aws(x.if_match)?, +if_none_match: try_from_aws(x.if_none_match)?, +key: unwrap_from_aws(x.key, "key")?, +metadata: try_from_aws(x.metadata)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +storage_class: try_from_aws(x.storage_class)?, +tagging: try_from_aws(x.tagging)?, +website_redirect_location: try_from_aws(x.website_redirect_location)?, +write_offset_bytes: try_from_aws(x.write_offset_bytes)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_acl(try_into_aws(x.acl)?); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); +y = y.set_grant_read(try_into_aws(x.grant_read)?); +y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); +y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); +y = y.set_if_match(try_into_aws(x.if_match)?); +y = y.set_if_none_match(try_into_aws(x.if_none_match)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tagging(try_into_aws(x.tagging)?); +y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); +y = y.set_write_offset_bytes(try_into_aws(x.write_offset_bytes)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectLegalHoldInput { type Target = aws_sdk_s3::operation::put_object_legal_hold::PutObjectLegalHoldInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - legal_hold: try_from_aws(x.legal_hold)?, - request_payer: try_from_aws(x.request_payer)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_legal_hold(try_into_aws(x.legal_hold)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +legal_hold: try_from_aws(x.legal_hold)?, +request_payer: try_from_aws(x.request_payer)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_legal_hold(try_into_aws(x.legal_hold)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectLegalHoldOutput { type Target = aws_sdk_s3::operation::put_object_legal_hold::PutObjectLegalHoldOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectLockConfigurationInput { type Target = aws_sdk_s3::operation::put_object_lock_configuration::PutObjectLockConfigurationInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - object_lock_configuration: try_from_aws(x.object_lock_configuration)?, - request_payer: try_from_aws(x.request_payer)?, - token: try_from_aws(x.token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_token(try_into_aws(x.token)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +object_lock_configuration: try_from_aws(x.object_lock_configuration)?, +request_payer: try_from_aws(x.request_payer)?, +token: try_from_aws(x.token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_token(try_into_aws(x.token)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectLockConfigurationOutput { type Target = aws_sdk_s3::operation::put_object_lock_configuration::PutObjectLockConfigurationOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectOutput { type Target = aws_sdk_s3::operation::put_object::PutObjectOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - checksum_type: try_from_aws(x.checksum_type)?, - e_tag: try_from_aws(x.e_tag)?, - expiration: try_from_aws(x.expiration)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - size: try_from_aws(x.size)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_checksum_type(try_into_aws(x.checksum_type)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_size(try_into_aws(x.size)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +checksum_type: try_from_aws(x.checksum_type)?, +e_tag: try_from_aws(x.e_tag)?, +expiration: try_from_aws(x.expiration)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +size: try_from_aws(x.size)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_checksum_type(try_into_aws(x.checksum_type)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_size(try_into_aws(x.size)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectRetentionInput { type Target = aws_sdk_s3::operation::put_object_retention::PutObjectRetentionInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - retention: try_from_aws(x.retention)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_retention(try_into_aws(x.retention)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +retention: try_from_aws(x.retention)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_retention(try_into_aws(x.retention)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectRetentionOutput { type Target = aws_sdk_s3::operation::put_object_retention::PutObjectRetentionOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutObjectTaggingInput { type Target = aws_sdk_s3::operation::put_object_tagging::PutObjectTaggingInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - tagging: unwrap_from_aws(x.tagging, "tagging")?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_tagging(Some(try_into_aws(x.tagging)?)); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +tagging: unwrap_from_aws(x.tagging, "tagging")?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_tagging(Some(try_into_aws(x.tagging)?)); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutObjectTaggingOutput { type Target = aws_sdk_s3::operation::put_object_tagging::PutObjectTaggingOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - version_id: try_from_aws(x.version_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +version_id: try_from_aws(x.version_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_version_id(try_into_aws(x.version_id)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_version_id(try_into_aws(x.version_id)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::PutPublicAccessBlockInput { type Target = aws_sdk_s3::operation::put_public_access_block::PutPublicAccessBlockInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - public_access_block_configuration: unwrap_from_aws( - x.public_access_block_configuration, - "public_access_block_configuration", - )?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_public_access_block_configuration(Some(try_into_aws(x.public_access_block_configuration)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +public_access_block_configuration: unwrap_from_aws(x.public_access_block_configuration, "public_access_block_configuration")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_public_access_block_configuration(Some(try_into_aws(x.public_access_block_configuration)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::PutPublicAccessBlockOutput { type Target = aws_sdk_s3::operation::put_public_access_block::PutPublicAccessBlockOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::QueueConfiguration { type Target = aws_sdk_s3::types::QueueConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - events: try_from_aws(x.events)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - queue_arn: try_from_aws(x.queue_arn)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_events(Some(try_into_aws(x.events)?)); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_queue_arn(Some(try_into_aws(x.queue_arn)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +events: try_from_aws(x.events)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +queue_arn: try_from_aws(x.queue_arn)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_events(Some(try_into_aws(x.events)?)); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_queue_arn(Some(try_into_aws(x.queue_arn)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::QuoteFields { type Target = aws_sdk_s3::types::QuoteFields; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::QuoteFields::Always => Self::from_static(Self::ALWAYS), - aws_sdk_s3::types::QuoteFields::Asneeded => Self::from_static(Self::ASNEEDED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::QuoteFields::Always => Self::from_static(Self::ALWAYS), +aws_sdk_s3::types::QuoteFields::Asneeded => Self::from_static(Self::ASNEEDED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::QuoteFields::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::QuoteFields::from(x.as_str())) +} } impl AwsConversion for s3s::dto::RecordsEvent { type Target = aws_sdk_s3::types::RecordsEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - payload: try_from_aws(x.payload)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +payload: try_from_aws(x.payload)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_payload(try_into_aws(x.payload)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_payload(try_into_aws(x.payload)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Redirect { type Target = aws_sdk_s3::types::Redirect; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - host_name: try_from_aws(x.host_name)?, - http_redirect_code: try_from_aws(x.http_redirect_code)?, - protocol: try_from_aws(x.protocol)?, - replace_key_prefix_with: try_from_aws(x.replace_key_prefix_with)?, - replace_key_with: try_from_aws(x.replace_key_with)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_host_name(try_into_aws(x.host_name)?); - y = y.set_http_redirect_code(try_into_aws(x.http_redirect_code)?); - y = y.set_protocol(try_into_aws(x.protocol)?); - y = y.set_replace_key_prefix_with(try_into_aws(x.replace_key_prefix_with)?); - y = y.set_replace_key_with(try_into_aws(x.replace_key_with)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +host_name: try_from_aws(x.host_name)?, +http_redirect_code: try_from_aws(x.http_redirect_code)?, +protocol: try_from_aws(x.protocol)?, +replace_key_prefix_with: try_from_aws(x.replace_key_prefix_with)?, +replace_key_with: try_from_aws(x.replace_key_with)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_host_name(try_into_aws(x.host_name)?); +y = y.set_http_redirect_code(try_into_aws(x.http_redirect_code)?); +y = y.set_protocol(try_into_aws(x.protocol)?); +y = y.set_replace_key_prefix_with(try_into_aws(x.replace_key_prefix_with)?); +y = y.set_replace_key_with(try_into_aws(x.replace_key_with)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RedirectAllRequestsTo { type Target = aws_sdk_s3::types::RedirectAllRequestsTo; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - host_name: try_from_aws(x.host_name)?, - protocol: try_from_aws(x.protocol)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +host_name: try_from_aws(x.host_name)?, +protocol: try_from_aws(x.protocol)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_host_name(Some(try_into_aws(x.host_name)?)); - y = y.set_protocol(try_into_aws(x.protocol)?); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_host_name(Some(try_into_aws(x.host_name)?)); +y = y.set_protocol(try_into_aws(x.protocol)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicaModifications { type Target = aws_sdk_s3::types::ReplicaModifications; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicaModificationsStatus { type Target = aws_sdk_s3::types::ReplicaModificationsStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ReplicaModificationsStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ReplicaModificationsStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ReplicaModificationsStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ReplicaModificationsStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ReplicaModificationsStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ReplicaModificationsStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ReplicationConfiguration { type Target = aws_sdk_s3::types::ReplicationConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - role: try_from_aws(x.role)?, - rules: try_from_aws(x.rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +role: try_from_aws(x.role)?, +rules: try_from_aws(x.rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_role(Some(try_into_aws(x.role)?)); - y = y.set_rules(Some(try_into_aws(x.rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_role(Some(try_into_aws(x.role)?)); +y = y.set_rules(Some(try_into_aws(x.rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicationRule { type Target = aws_sdk_s3::types::ReplicationRule; - type Error = S3Error; - - #[allow(deprecated)] - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - delete_marker_replication: try_from_aws(x.delete_marker_replication)?, - destination: unwrap_from_aws(x.destination, "destination")?, - existing_object_replication: try_from_aws(x.existing_object_replication)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - prefix: try_from_aws(x.prefix)?, - priority: try_from_aws(x.priority)?, - source_selection_criteria: try_from_aws(x.source_selection_criteria)?, - status: try_from_aws(x.status)?, - }) - } - - #[allow(deprecated)] - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_delete_marker_replication(try_into_aws(x.delete_marker_replication)?); - y = y.set_destination(Some(try_into_aws(x.destination)?)); - y = y.set_existing_object_replication(try_into_aws(x.existing_object_replication)?); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_priority(try_into_aws(x.priority)?); - y = y.set_source_selection_criteria(try_into_aws(x.source_selection_criteria)?); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +#[allow(deprecated)] +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +delete_marker_replication: try_from_aws(x.delete_marker_replication)?, +destination: unwrap_from_aws(x.destination, "destination")?, +existing_object_replication: try_from_aws(x.existing_object_replication)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +prefix: try_from_aws(x.prefix)?, +priority: try_from_aws(x.priority)?, +source_selection_criteria: try_from_aws(x.source_selection_criteria)?, +status: try_from_aws(x.status)?, +}) +} + +#[allow(deprecated)] +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_delete_marker_replication(try_into_aws(x.delete_marker_replication)?); +y = y.set_destination(Some(try_into_aws(x.destination)?)); +y = y.set_existing_object_replication(try_into_aws(x.existing_object_replication)?); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_priority(try_into_aws(x.priority)?); +y = y.set_source_selection_criteria(try_into_aws(x.source_selection_criteria)?); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicationRuleAndOperator { type Target = aws_sdk_s3::types::ReplicationRuleAndOperator; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - prefix: try_from_aws(x.prefix)?, - tags: try_from_aws(x.tags)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +prefix: try_from_aws(x.prefix)?, +tags: try_from_aws(x.tags)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tags(try_into_aws(x.tags)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tags(try_into_aws(x.tags)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ReplicationRuleFilter { type Target = aws_sdk_s3::types::ReplicationRuleFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - and: try_from_aws(x.and)?, - prefix: try_from_aws(x.prefix)?, - tag: try_from_aws(x.tag)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +and: try_from_aws(x.and)?, +prefix: try_from_aws(x.prefix)?, +tag: try_from_aws(x.tag)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_and(try_into_aws(x.and)?); - y = y.set_prefix(try_into_aws(x.prefix)?); - y = y.set_tag(try_into_aws(x.tag)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_and(try_into_aws(x.and)?); +y = y.set_prefix(try_into_aws(x.prefix)?); +y = y.set_tag(try_into_aws(x.tag)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ReplicationRuleStatus { type Target = aws_sdk_s3::types::ReplicationRuleStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ReplicationRuleStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ReplicationRuleStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ReplicationRuleStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ReplicationRuleStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ReplicationRuleStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ReplicationRuleStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ReplicationStatus { type Target = aws_sdk_s3::types::ReplicationStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ReplicationStatus::Complete => Self::from_static(Self::COMPLETE), - aws_sdk_s3::types::ReplicationStatus::Completed => Self::from_static(Self::COMPLETED), - aws_sdk_s3::types::ReplicationStatus::Failed => Self::from_static(Self::FAILED), - aws_sdk_s3::types::ReplicationStatus::Pending => Self::from_static(Self::PENDING), - aws_sdk_s3::types::ReplicationStatus::Replica => Self::from_static(Self::REPLICA), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ReplicationStatus::Complete => Self::from_static(Self::COMPLETE), +aws_sdk_s3::types::ReplicationStatus::Completed => Self::from_static(Self::COMPLETED), +aws_sdk_s3::types::ReplicationStatus::Failed => Self::from_static(Self::FAILED), +aws_sdk_s3::types::ReplicationStatus::Pending => Self::from_static(Self::PENDING), +aws_sdk_s3::types::ReplicationStatus::Replica => Self::from_static(Self::REPLICA), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ReplicationStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ReplicationStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ReplicationTime { type Target = aws_sdk_s3::types::ReplicationTime; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - time: unwrap_from_aws(x.time, "time")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +time: unwrap_from_aws(x.time, "time")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(Some(try_into_aws(x.status)?)); - y = y.set_time(Some(try_into_aws(x.time)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(Some(try_into_aws(x.status)?)); +y = y.set_time(Some(try_into_aws(x.time)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ReplicationTimeStatus { type Target = aws_sdk_s3::types::ReplicationTimeStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ReplicationTimeStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::ReplicationTimeStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ReplicationTimeStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::ReplicationTimeStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ReplicationTimeStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ReplicationTimeStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ReplicationTimeValue { type Target = aws_sdk_s3::types::ReplicationTimeValue; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - minutes: try_from_aws(x.minutes)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +minutes: try_from_aws(x.minutes)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_minutes(try_into_aws(x.minutes)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_minutes(try_into_aws(x.minutes)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RequestCharged { type Target = aws_sdk_s3::types::RequestCharged; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::RequestCharged::Requester => Self::from_static(Self::REQUESTER), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::RequestCharged::Requester => Self::from_static(Self::REQUESTER), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::RequestCharged::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::RequestCharged::from(x.as_str())) +} } impl AwsConversion for s3s::dto::RequestPayer { type Target = aws_sdk_s3::types::RequestPayer; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::RequestPayer::Requester => Self::from_static(Self::REQUESTER), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::RequestPayer::Requester => Self::from_static(Self::REQUESTER), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::RequestPayer::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::RequestPayer::from(x.as_str())) +} } impl AwsConversion for s3s::dto::RequestPaymentConfiguration { type Target = aws_sdk_s3::types::RequestPaymentConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - payer: try_from_aws(x.payer)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +payer: try_from_aws(x.payer)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_payer(Some(try_into_aws(x.payer)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_payer(Some(try_into_aws(x.payer)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::RequestProgress { type Target = aws_sdk_s3::types::RequestProgress; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - enabled: try_from_aws(x.enabled)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +enabled: try_from_aws(x.enabled)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_enabled(try_into_aws(x.enabled)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_enabled(try_into_aws(x.enabled)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RestoreObjectInput { type Target = aws_sdk_s3::operation::restore_object::RestoreObjectInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - request_payer: try_from_aws(x.request_payer)?, - restore_request: try_from_aws(x.restore_request)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_restore_request(try_into_aws(x.restore_request)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +request_payer: try_from_aws(x.request_payer)?, +restore_request: try_from_aws(x.restore_request)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_restore_request(try_into_aws(x.restore_request)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::RestoreObjectOutput { type Target = aws_sdk_s3::operation::restore_object::RestoreObjectOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - request_charged: try_from_aws(x.request_charged)?, - restore_output_path: try_from_aws(x.restore_output_path)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +request_charged: try_from_aws(x.request_charged)?, +restore_output_path: try_from_aws(x.restore_output_path)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_restore_output_path(try_into_aws(x.restore_output_path)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_restore_output_path(try_into_aws(x.restore_output_path)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RestoreRequest { type Target = aws_sdk_s3::types::RestoreRequest; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - days: try_from_aws(x.days)?, - description: try_from_aws(x.description)?, - glacier_job_parameters: try_from_aws(x.glacier_job_parameters)?, - output_location: try_from_aws(x.output_location)?, - select_parameters: try_from_aws(x.select_parameters)?, - tier: try_from_aws(x.tier)?, - type_: try_from_aws(x.r#type)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_days(try_into_aws(x.days)?); - y = y.set_description(try_into_aws(x.description)?); - y = y.set_glacier_job_parameters(try_into_aws(x.glacier_job_parameters)?); - y = y.set_output_location(try_into_aws(x.output_location)?); - y = y.set_select_parameters(try_into_aws(x.select_parameters)?); - y = y.set_tier(try_into_aws(x.tier)?); - y = y.set_type(try_into_aws(x.type_)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +days: try_from_aws(x.days)?, +description: try_from_aws(x.description)?, +glacier_job_parameters: try_from_aws(x.glacier_job_parameters)?, +output_location: try_from_aws(x.output_location)?, +select_parameters: try_from_aws(x.select_parameters)?, +tier: try_from_aws(x.tier)?, +type_: try_from_aws(x.r#type)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_days(try_into_aws(x.days)?); +y = y.set_description(try_into_aws(x.description)?); +y = y.set_glacier_job_parameters(try_into_aws(x.glacier_job_parameters)?); +y = y.set_output_location(try_into_aws(x.output_location)?); +y = y.set_select_parameters(try_into_aws(x.select_parameters)?); +y = y.set_tier(try_into_aws(x.tier)?); +y = y.set_type(try_into_aws(x.type_)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RestoreRequestType { type Target = aws_sdk_s3::types::RestoreRequestType; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::RestoreRequestType::Select => Self::from_static(Self::SELECT), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::RestoreRequestType::Select => Self::from_static(Self::SELECT), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::RestoreRequestType::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::RestoreRequestType::from(x.as_str())) +} } impl AwsConversion for s3s::dto::RestoreStatus { type Target = aws_sdk_s3::types::RestoreStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - is_restore_in_progress: try_from_aws(x.is_restore_in_progress)?, - restore_expiry_date: try_from_aws(x.restore_expiry_date)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +is_restore_in_progress: try_from_aws(x.is_restore_in_progress)?, +restore_expiry_date: try_from_aws(x.restore_expiry_date)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_is_restore_in_progress(try_into_aws(x.is_restore_in_progress)?); - y = y.set_restore_expiry_date(try_into_aws(x.restore_expiry_date)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_is_restore_in_progress(try_into_aws(x.is_restore_in_progress)?); +y = y.set_restore_expiry_date(try_into_aws(x.restore_expiry_date)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::RoutingRule { type Target = aws_sdk_s3::types::RoutingRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - condition: try_from_aws(x.condition)?, - redirect: unwrap_from_aws(x.redirect, "redirect")?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +condition: try_from_aws(x.condition)?, +redirect: unwrap_from_aws(x.redirect, "redirect")?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_condition(try_into_aws(x.condition)?); - y = y.set_redirect(Some(try_into_aws(x.redirect)?)); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_condition(try_into_aws(x.condition)?); +y = y.set_redirect(Some(try_into_aws(x.redirect)?)); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::S3KeyFilter { type Target = aws_sdk_s3::types::S3KeyFilter; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - filter_rules: try_from_aws(x.filter_rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +filter_rules: try_from_aws(x.filter_rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_filter_rules(try_into_aws(x.filter_rules)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_filter_rules(try_into_aws(x.filter_rules)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::S3Location { type Target = aws_sdk_s3::types::S3Location; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_control_list: try_from_aws(x.access_control_list)?, - bucket_name: try_from_aws(x.bucket_name)?, - canned_acl: try_from_aws(x.canned_acl)?, - encryption: try_from_aws(x.encryption)?, - prefix: try_from_aws(x.prefix)?, - storage_class: try_from_aws(x.storage_class)?, - tagging: try_from_aws(x.tagging)?, - user_metadata: try_from_aws(x.user_metadata)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_control_list(try_into_aws(x.access_control_list)?); - y = y.set_bucket_name(Some(try_into_aws(x.bucket_name)?)); - y = y.set_canned_acl(try_into_aws(x.canned_acl)?); - y = y.set_encryption(try_into_aws(x.encryption)?); - y = y.set_prefix(Some(try_into_aws(x.prefix)?)); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tagging(try_into_aws(x.tagging)?); - y = y.set_user_metadata(try_into_aws(x.user_metadata)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_control_list: try_from_aws(x.access_control_list)?, +bucket_name: try_from_aws(x.bucket_name)?, +canned_acl: try_from_aws(x.canned_acl)?, +encryption: try_from_aws(x.encryption)?, +prefix: try_from_aws(x.prefix)?, +storage_class: try_from_aws(x.storage_class)?, +tagging: try_from_aws(x.tagging)?, +user_metadata: try_from_aws(x.user_metadata)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_control_list(try_into_aws(x.access_control_list)?); +y = y.set_bucket_name(Some(try_into_aws(x.bucket_name)?)); +y = y.set_canned_acl(try_into_aws(x.canned_acl)?); +y = y.set_encryption(try_into_aws(x.encryption)?); +y = y.set_prefix(Some(try_into_aws(x.prefix)?)); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tagging(try_into_aws(x.tagging)?); +y = y.set_user_metadata(try_into_aws(x.user_metadata)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::S3TablesDestination { type Target = aws_sdk_s3::types::S3TablesDestination; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - table_bucket_arn: try_from_aws(x.table_bucket_arn)?, - table_name: try_from_aws(x.table_name)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +table_bucket_arn: try_from_aws(x.table_bucket_arn)?, +table_name: try_from_aws(x.table_name)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); - y = y.set_table_name(Some(try_into_aws(x.table_name)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); +y = y.set_table_name(Some(try_into_aws(x.table_name)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::S3TablesDestinationResult { type Target = aws_sdk_s3::types::S3TablesDestinationResult; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - table_arn: try_from_aws(x.table_arn)?, - table_bucket_arn: try_from_aws(x.table_bucket_arn)?, - table_name: try_from_aws(x.table_name)?, - table_namespace: try_from_aws(x.table_namespace)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_table_arn(Some(try_into_aws(x.table_arn)?)); - y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); - y = y.set_table_name(Some(try_into_aws(x.table_name)?)); - y = y.set_table_namespace(Some(try_into_aws(x.table_namespace)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +table_arn: try_from_aws(x.table_arn)?, +table_bucket_arn: try_from_aws(x.table_bucket_arn)?, +table_name: try_from_aws(x.table_name)?, +table_namespace: try_from_aws(x.table_namespace)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_table_arn(Some(try_into_aws(x.table_arn)?)); +y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); +y = y.set_table_name(Some(try_into_aws(x.table_name)?)); +y = y.set_table_namespace(Some(try_into_aws(x.table_namespace)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::SSEKMS { type Target = aws_sdk_s3::types::Ssekms; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - key_id: try_from_aws(x.key_id)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +key_id: try_from_aws(x.key_id)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_key_id(Some(try_into_aws(x.key_id)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_key_id(Some(try_into_aws(x.key_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::SSES3 { type Target = aws_sdk_s3::types::Sses3; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::ScanRange { type Target = aws_sdk_s3::types::ScanRange; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - end: try_from_aws(x.end)?, - start: try_from_aws(x.start)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +end: try_from_aws(x.end)?, +start: try_from_aws(x.start)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_end(try_into_aws(x.end)?); - y = y.set_start(try_into_aws(x.start)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_end(try_into_aws(x.end)?); +y = y.set_start(try_into_aws(x.start)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::SelectObjectContentEvent { type Target = aws_sdk_s3::types::SelectObjectContentEventStream; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::SelectObjectContentEventStream::Cont(v) => Self::Cont(try_from_aws(v)?), - aws_sdk_s3::types::SelectObjectContentEventStream::End(v) => Self::End(try_from_aws(v)?), - aws_sdk_s3::types::SelectObjectContentEventStream::Progress(v) => Self::Progress(try_from_aws(v)?), - aws_sdk_s3::types::SelectObjectContentEventStream::Records(v) => Self::Records(try_from_aws(v)?), - aws_sdk_s3::types::SelectObjectContentEventStream::Stats(v) => Self::Stats(try_from_aws(v)?), - _ => unimplemented!("unknown variant of aws_sdk_s3::types::SelectObjectContentEventStream: {x:?}"), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(match x { - Self::Cont(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Cont(try_into_aws(v)?), - Self::End(v) => aws_sdk_s3::types::SelectObjectContentEventStream::End(try_into_aws(v)?), - Self::Progress(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Progress(try_into_aws(v)?), - Self::Records(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Records(try_into_aws(v)?), - Self::Stats(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Stats(try_into_aws(v)?), - _ => unimplemented!("unknown variant of SelectObjectContentEvent: {x:?}"), - }) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::SelectObjectContentEventStream::Cont(v) => Self::Cont(try_from_aws(v)?), +aws_sdk_s3::types::SelectObjectContentEventStream::End(v) => Self::End(try_from_aws(v)?), +aws_sdk_s3::types::SelectObjectContentEventStream::Progress(v) => Self::Progress(try_from_aws(v)?), +aws_sdk_s3::types::SelectObjectContentEventStream::Records(v) => Self::Records(try_from_aws(v)?), +aws_sdk_s3::types::SelectObjectContentEventStream::Stats(v) => Self::Stats(try_from_aws(v)?), +_ => unimplemented!("unknown variant of aws_sdk_s3::types::SelectObjectContentEventStream: {x:?}"), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(match x { +Self::Cont(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Cont(try_into_aws(v)?), +Self::End(v) => aws_sdk_s3::types::SelectObjectContentEventStream::End(try_into_aws(v)?), +Self::Progress(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Progress(try_into_aws(v)?), +Self::Records(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Records(try_into_aws(v)?), +Self::Stats(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Stats(try_into_aws(v)?), +_ => unimplemented!("unknown variant of SelectObjectContentEvent: {x:?}"), +}) +} } impl AwsConversion for s3s::dto::SelectObjectContentOutput { type Target = aws_sdk_s3::operation::select_object_content::SelectObjectContentOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - payload: Some(crate::event_stream::from_aws(x.payload)), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +payload: Some(crate::event_stream::from_aws(x.payload)), +}) +} - fn try_into_aws(x: Self) -> S3Result { - drop(x); - unimplemented!("See https://github.com/Nugine/s3s/issues/5") - } +fn try_into_aws(x: Self) -> S3Result { +drop(x); +unimplemented!("See https://github.com/Nugine/s3s/issues/5") +} } impl AwsConversion for s3s::dto::SelectParameters { type Target = aws_sdk_s3::types::SelectParameters; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - expression: try_from_aws(x.expression)?, - expression_type: try_from_aws(x.expression_type)?, - input_serialization: unwrap_from_aws(x.input_serialization, "input_serialization")?, - output_serialization: unwrap_from_aws(x.output_serialization, "output_serialization")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_expression(Some(try_into_aws(x.expression)?)); - y = y.set_expression_type(Some(try_into_aws(x.expression_type)?)); - y = y.set_input_serialization(Some(try_into_aws(x.input_serialization)?)); - y = y.set_output_serialization(Some(try_into_aws(x.output_serialization)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +expression: try_from_aws(x.expression)?, +expression_type: try_from_aws(x.expression_type)?, +input_serialization: unwrap_from_aws(x.input_serialization, "input_serialization")?, +output_serialization: unwrap_from_aws(x.output_serialization, "output_serialization")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_expression(Some(try_into_aws(x.expression)?)); +y = y.set_expression_type(Some(try_into_aws(x.expression_type)?)); +y = y.set_input_serialization(Some(try_into_aws(x.input_serialization)?)); +y = y.set_output_serialization(Some(try_into_aws(x.output_serialization)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ServerSideEncryption { type Target = aws_sdk_s3::types::ServerSideEncryption; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::ServerSideEncryption::Aes256 => Self::from_static(Self::AES256), - aws_sdk_s3::types::ServerSideEncryption::AwsKms => Self::from_static(Self::AWS_KMS), - aws_sdk_s3::types::ServerSideEncryption::AwsKmsDsse => Self::from_static(Self::AWS_KMS_DSSE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::ServerSideEncryption::Aes256 => Self::from_static(Self::AES256), +aws_sdk_s3::types::ServerSideEncryption::AwsKms => Self::from_static(Self::AWS_KMS), +aws_sdk_s3::types::ServerSideEncryption::AwsKmsDsse => Self::from_static(Self::AWS_KMS_DSSE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::ServerSideEncryption::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::ServerSideEncryption::from(x.as_str())) +} } impl AwsConversion for s3s::dto::ServerSideEncryptionByDefault { type Target = aws_sdk_s3::types::ServerSideEncryptionByDefault; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - kms_master_key_id: try_from_aws(x.kms_master_key_id)?, - sse_algorithm: try_from_aws(x.sse_algorithm)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +kms_master_key_id: try_from_aws(x.kms_master_key_id)?, +sse_algorithm: try_from_aws(x.sse_algorithm)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_kms_master_key_id(try_into_aws(x.kms_master_key_id)?); - y = y.set_sse_algorithm(Some(try_into_aws(x.sse_algorithm)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_kms_master_key_id(try_into_aws(x.kms_master_key_id)?); +y = y.set_sse_algorithm(Some(try_into_aws(x.sse_algorithm)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ServerSideEncryptionConfiguration { type Target = aws_sdk_s3::types::ServerSideEncryptionConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - rules: try_from_aws(x.rules)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +rules: try_from_aws(x.rules)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_rules(Some(try_into_aws(x.rules)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_rules(Some(try_into_aws(x.rules)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::ServerSideEncryptionRule { type Target = aws_sdk_s3::types::ServerSideEncryptionRule; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - apply_server_side_encryption_by_default: try_from_aws(x.apply_server_side_encryption_by_default)?, - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +apply_server_side_encryption_by_default: try_from_aws(x.apply_server_side_encryption_by_default)?, +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_apply_server_side_encryption_by_default(try_into_aws(x.apply_server_side_encryption_by_default)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_apply_server_side_encryption_by_default(try_into_aws(x.apply_server_side_encryption_by_default)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::SessionCredentials { type Target = aws_sdk_s3::types::SessionCredentials; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_key_id: try_from_aws(x.access_key_id)?, - expiration: try_from_aws(x.expiration)?, - secret_access_key: try_from_aws(x.secret_access_key)?, - session_token: try_from_aws(x.session_token)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_key_id(Some(try_into_aws(x.access_key_id)?)); - y = y.set_expiration(Some(try_into_aws(x.expiration)?)); - y = y.set_secret_access_key(Some(try_into_aws(x.secret_access_key)?)); - y = y.set_session_token(Some(try_into_aws(x.session_token)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_key_id: try_from_aws(x.access_key_id)?, +expiration: try_from_aws(x.expiration)?, +secret_access_key: try_from_aws(x.secret_access_key)?, +session_token: try_from_aws(x.session_token)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_key_id(Some(try_into_aws(x.access_key_id)?)); +y = y.set_expiration(Some(try_into_aws(x.expiration)?)); +y = y.set_secret_access_key(Some(try_into_aws(x.secret_access_key)?)); +y = y.set_session_token(Some(try_into_aws(x.session_token)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::SessionMode { type Target = aws_sdk_s3::types::SessionMode; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::SessionMode::ReadOnly => Self::from_static(Self::READ_ONLY), - aws_sdk_s3::types::SessionMode::ReadWrite => Self::from_static(Self::READ_WRITE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::SessionMode::ReadOnly => Self::from_static(Self::READ_ONLY), +aws_sdk_s3::types::SessionMode::ReadWrite => Self::from_static(Self::READ_WRITE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::SessionMode::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::SessionMode::from(x.as_str())) +} } impl AwsConversion for s3s::dto::SimplePrefix { type Target = aws_sdk_s3::types::SimplePrefix; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::SourceSelectionCriteria { type Target = aws_sdk_s3::types::SourceSelectionCriteria; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - replica_modifications: try_from_aws(x.replica_modifications)?, - sse_kms_encrypted_objects: try_from_aws(x.sse_kms_encrypted_objects)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +replica_modifications: try_from_aws(x.replica_modifications)?, +sse_kms_encrypted_objects: try_from_aws(x.sse_kms_encrypted_objects)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_replica_modifications(try_into_aws(x.replica_modifications)?); - y = y.set_sse_kms_encrypted_objects(try_into_aws(x.sse_kms_encrypted_objects)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_replica_modifications(try_into_aws(x.replica_modifications)?); +y = y.set_sse_kms_encrypted_objects(try_into_aws(x.sse_kms_encrypted_objects)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::SseKmsEncryptedObjects { type Target = aws_sdk_s3::types::SseKmsEncryptedObjects; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_status(Some(try_into_aws(x.status)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_status(Some(try_into_aws(x.status)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::SseKmsEncryptedObjectsStatus { type Target = aws_sdk_s3::types::SseKmsEncryptedObjectsStatus; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Disabled => Self::from_static(Self::DISABLED), - aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Enabled => Self::from_static(Self::ENABLED), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Disabled => Self::from_static(Self::DISABLED), +aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Enabled => Self::from_static(Self::ENABLED), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Stats { type Target = aws_sdk_s3::types::Stats; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bytes_processed: try_from_aws(x.bytes_processed)?, - bytes_returned: try_from_aws(x.bytes_returned)?, - bytes_scanned: try_from_aws(x.bytes_scanned)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bytes_processed: try_from_aws(x.bytes_processed)?, +bytes_returned: try_from_aws(x.bytes_returned)?, +bytes_scanned: try_from_aws(x.bytes_scanned)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); - y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); - y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); +y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); +y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::StatsEvent { type Target = aws_sdk_s3::types::StatsEvent; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - details: try_from_aws(x.details)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +details: try_from_aws(x.details)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_details(try_into_aws(x.details)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_details(try_into_aws(x.details)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::StorageClass { type Target = aws_sdk_s3::types::StorageClass; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::StorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), - aws_sdk_s3::types::StorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), - aws_sdk_s3::types::StorageClass::Glacier => Self::from_static(Self::GLACIER), - aws_sdk_s3::types::StorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), - aws_sdk_s3::types::StorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), - aws_sdk_s3::types::StorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), - aws_sdk_s3::types::StorageClass::Outposts => Self::from_static(Self::OUTPOSTS), - aws_sdk_s3::types::StorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), - aws_sdk_s3::types::StorageClass::Snow => Self::from_static(Self::SNOW), - aws_sdk_s3::types::StorageClass::Standard => Self::from_static(Self::STANDARD), - aws_sdk_s3::types::StorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), - _ => Self::from(x.as_str().to_owned()), - }) - } - - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::StorageClass::from(x.as_str())) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::StorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), +aws_sdk_s3::types::StorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), +aws_sdk_s3::types::StorageClass::Glacier => Self::from_static(Self::GLACIER), +aws_sdk_s3::types::StorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), +aws_sdk_s3::types::StorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), +aws_sdk_s3::types::StorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), +aws_sdk_s3::types::StorageClass::Outposts => Self::from_static(Self::OUTPOSTS), +aws_sdk_s3::types::StorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), +aws_sdk_s3::types::StorageClass::Snow => Self::from_static(Self::SNOW), +aws_sdk_s3::types::StorageClass::Standard => Self::from_static(Self::STANDARD), +aws_sdk_s3::types::StorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), +_ => Self::from(x.as_str().to_owned()), +}) +} + +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::StorageClass::from(x.as_str())) +} } impl AwsConversion for s3s::dto::StorageClassAnalysis { type Target = aws_sdk_s3::types::StorageClassAnalysis; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - data_export: try_from_aws(x.data_export)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +data_export: try_from_aws(x.data_export)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_data_export(try_into_aws(x.data_export)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_data_export(try_into_aws(x.data_export)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::StorageClassAnalysisDataExport { type Target = aws_sdk_s3::types::StorageClassAnalysisDataExport; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - destination: unwrap_from_aws(x.destination, "destination")?, - output_schema_version: try_from_aws(x.output_schema_version)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +destination: unwrap_from_aws(x.destination, "destination")?, +output_schema_version: try_from_aws(x.output_schema_version)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_destination(Some(try_into_aws(x.destination)?)); - y = y.set_output_schema_version(Some(try_into_aws(x.output_schema_version)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_destination(Some(try_into_aws(x.destination)?)); +y = y.set_output_schema_version(Some(try_into_aws(x.output_schema_version)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::StorageClassAnalysisSchemaVersion { type Target = aws_sdk_s3::types::StorageClassAnalysisSchemaVersion; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::V1 => Self::from_static(Self::V_1), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::V1 => Self::from_static(Self::V_1), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Tagging { type Target = aws_sdk_s3::types::Tagging; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - tag_set: try_from_aws(x.tag_set)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +tag_set: try_from_aws(x.tag_set)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::TaggingDirective { type Target = aws_sdk_s3::types::TaggingDirective; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::TaggingDirective::Copy => Self::from_static(Self::COPY), - aws_sdk_s3::types::TaggingDirective::Replace => Self::from_static(Self::REPLACE), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::TaggingDirective::Copy => Self::from_static(Self::COPY), +aws_sdk_s3::types::TaggingDirective::Replace => Self::from_static(Self::REPLACE), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::TaggingDirective::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::TaggingDirective::from(x.as_str())) +} } impl AwsConversion for s3s::dto::TargetGrant { type Target = aws_sdk_s3::types::TargetGrant; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - grantee: try_from_aws(x.grantee)?, - permission: try_from_aws(x.permission)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +grantee: try_from_aws(x.grantee)?, +permission: try_from_aws(x.permission)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_grantee(try_into_aws(x.grantee)?); - y = y.set_permission(try_into_aws(x.permission)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_grantee(try_into_aws(x.grantee)?); +y = y.set_permission(try_into_aws(x.permission)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::TargetObjectKeyFormat { type Target = aws_sdk_s3::types::TargetObjectKeyFormat; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - partitioned_prefix: try_from_aws(x.partitioned_prefix)?, - simple_prefix: try_from_aws(x.simple_prefix)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +partitioned_prefix: try_from_aws(x.partitioned_prefix)?, +simple_prefix: try_from_aws(x.simple_prefix)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_partitioned_prefix(try_into_aws(x.partitioned_prefix)?); - y = y.set_simple_prefix(try_into_aws(x.simple_prefix)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_partitioned_prefix(try_into_aws(x.partitioned_prefix)?); +y = y.set_simple_prefix(try_into_aws(x.simple_prefix)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::Tier { type Target = aws_sdk_s3::types::Tier; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Tier::Bulk => Self::from_static(Self::BULK), - aws_sdk_s3::types::Tier::Expedited => Self::from_static(Self::EXPEDITED), - aws_sdk_s3::types::Tier::Standard => Self::from_static(Self::STANDARD), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Tier::Bulk => Self::from_static(Self::BULK), +aws_sdk_s3::types::Tier::Expedited => Self::from_static(Self::EXPEDITED), +aws_sdk_s3::types::Tier::Standard => Self::from_static(Self::STANDARD), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Tier::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Tier::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Tiering { type Target = aws_sdk_s3::types::Tiering; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - access_tier: try_from_aws(x.access_tier)?, - days: try_from_aws(x.days)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +access_tier: try_from_aws(x.access_tier)?, +days: try_from_aws(x.days)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_access_tier(Some(try_into_aws(x.access_tier)?)); - y = y.set_days(Some(try_into_aws(x.days)?)); - y.build().map_err(S3Error::internal_error) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_access_tier(Some(try_into_aws(x.access_tier)?)); +y = y.set_days(Some(try_into_aws(x.days)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::TooManyParts { type Target = aws_sdk_s3::types::error::TooManyParts; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::TopicConfiguration { type Target = aws_sdk_s3::types::TopicConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - events: try_from_aws(x.events)?, - filter: try_from_aws(x.filter)?, - id: try_from_aws(x.id)?, - topic_arn: try_from_aws(x.topic_arn)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_events(Some(try_into_aws(x.events)?)); - y = y.set_filter(try_into_aws(x.filter)?); - y = y.set_id(try_into_aws(x.id)?); - y = y.set_topic_arn(Some(try_into_aws(x.topic_arn)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +events: try_from_aws(x.events)?, +filter: try_from_aws(x.filter)?, +id: try_from_aws(x.id)?, +topic_arn: try_from_aws(x.topic_arn)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_events(Some(try_into_aws(x.events)?)); +y = y.set_filter(try_into_aws(x.filter)?); +y = y.set_id(try_into_aws(x.id)?); +y = y.set_topic_arn(Some(try_into_aws(x.topic_arn)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::Transition { type Target = aws_sdk_s3::types::Transition; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - date: try_from_aws(x.date)?, - days: try_from_aws(x.days)?, - storage_class: try_from_aws(x.storage_class)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +date: try_from_aws(x.date)?, +days: try_from_aws(x.days)?, +storage_class: try_from_aws(x.storage_class)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_date(try_into_aws(x.date)?); - y = y.set_days(try_into_aws(x.days)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_date(try_into_aws(x.date)?); +y = y.set_days(try_into_aws(x.days)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::TransitionDefaultMinimumObjectSize { type Target = aws_sdk_s3::types::TransitionDefaultMinimumObjectSize; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::AllStorageClasses128K => { - Self::from_static(Self::ALL_STORAGE_CLASSES_128K) - } - aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::VariesByStorageClass => { - Self::from_static(Self::VARIES_BY_STORAGE_CLASS) - } - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::AllStorageClasses128K => Self::from_static(Self::ALL_STORAGE_CLASSES_128K), +aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::VariesByStorageClass => Self::from_static(Self::VARIES_BY_STORAGE_CLASS), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::from(x.as_str())) +} } impl AwsConversion for s3s::dto::TransitionStorageClass { type Target = aws_sdk_s3::types::TransitionStorageClass; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::TransitionStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), - aws_sdk_s3::types::TransitionStorageClass::Glacier => Self::from_static(Self::GLACIER), - aws_sdk_s3::types::TransitionStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), - aws_sdk_s3::types::TransitionStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), - aws_sdk_s3::types::TransitionStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), - aws_sdk_s3::types::TransitionStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::TransitionStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), +aws_sdk_s3::types::TransitionStorageClass::Glacier => Self::from_static(Self::GLACIER), +aws_sdk_s3::types::TransitionStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), +aws_sdk_s3::types::TransitionStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), +aws_sdk_s3::types::TransitionStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), +aws_sdk_s3::types::TransitionStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::TransitionStorageClass::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::TransitionStorageClass::from(x.as_str())) +} } impl AwsConversion for s3s::dto::Type { type Target = aws_sdk_s3::types::Type; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(match x { - aws_sdk_s3::types::Type::AmazonCustomerByEmail => Self::from_static(Self::AMAZON_CUSTOMER_BY_EMAIL), - aws_sdk_s3::types::Type::CanonicalUser => Self::from_static(Self::CANONICAL_USER), - aws_sdk_s3::types::Type::Group => Self::from_static(Self::GROUP), - _ => Self::from(x.as_str().to_owned()), - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(match x { +aws_sdk_s3::types::Type::AmazonCustomerByEmail => Self::from_static(Self::AMAZON_CUSTOMER_BY_EMAIL), +aws_sdk_s3::types::Type::CanonicalUser => Self::from_static(Self::CANONICAL_USER), +aws_sdk_s3::types::Type::Group => Self::from_static(Self::GROUP), +_ => Self::from(x.as_str().to_owned()), +}) +} - fn try_into_aws(x: Self) -> S3Result { - Ok(aws_sdk_s3::types::Type::from(x.as_str())) - } +fn try_into_aws(x: Self) -> S3Result { +Ok(aws_sdk_s3::types::Type::from(x.as_str())) +} } impl AwsConversion for s3s::dto::UploadPartCopyInput { type Target = aws_sdk_s3::operation::upload_part_copy::UploadPartCopyInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket: unwrap_from_aws(x.bucket, "bucket")?, - copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, - copy_source_if_match: try_from_aws(x.copy_source_if_match)?, - copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, - copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, - copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, - copy_source_range: try_from_aws(x.copy_source_range)?, - copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, - copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, - copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - part_number: unwrap_from_aws(x.part_number, "part_number")?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); - y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); - y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); - y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); - y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); - y = y.set_copy_source_range(try_into_aws(x.copy_source_range)?); - y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); - y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); - y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_part_number(Some(try_into_aws(x.part_number)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket: unwrap_from_aws(x.bucket, "bucket")?, +copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, +copy_source_if_match: try_from_aws(x.copy_source_if_match)?, +copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, +copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, +copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, +copy_source_range: try_from_aws(x.copy_source_range)?, +copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, +copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, +copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +part_number: unwrap_from_aws(x.part_number, "part_number")?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); +y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); +y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); +y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); +y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); +y = y.set_copy_source_range(try_into_aws(x.copy_source_range)?); +y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); +y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); +y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_part_number(Some(try_into_aws(x.part_number)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::UploadPartCopyOutput { type Target = aws_sdk_s3::operation::upload_part_copy::UploadPartCopyOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - copy_part_result: try_from_aws(x.copy_part_result)?, - copy_source_version_id: try_from_aws(x.copy_source_version_id)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_copy_part_result(try_into_aws(x.copy_part_result)?); - y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +copy_part_result: try_from_aws(x.copy_part_result)?, +copy_source_version_id: try_from_aws(x.copy_source_version_id)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_copy_part_result(try_into_aws(x.copy_part_result)?); +y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::UploadPartInput { type Target = aws_sdk_s3::operation::upload_part::UploadPartInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - body: Some(try_from_aws(x.body)?), - bucket: unwrap_from_aws(x.bucket, "bucket")?, - checksum_algorithm: try_from_aws(x.checksum_algorithm)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - content_length: try_from_aws(x.content_length)?, - content_md5: try_from_aws(x.content_md5)?, - expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, - key: unwrap_from_aws(x.key, "key")?, - part_number: unwrap_from_aws(x.part_number, "part_number")?, - request_payer: try_from_aws(x.request_payer)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key: try_from_aws(x.sse_customer_key)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_bucket(Some(try_into_aws(x.bucket)?)); - y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_md5(try_into_aws(x.content_md5)?); - y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); - y = y.set_key(Some(try_into_aws(x.key)?)); - y = y.set_part_number(Some(try_into_aws(x.part_number)?)); - y = y.set_request_payer(try_into_aws(x.request_payer)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +body: Some(try_from_aws(x.body)?), +bucket: unwrap_from_aws(x.bucket, "bucket")?, +checksum_algorithm: try_from_aws(x.checksum_algorithm)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +content_length: try_from_aws(x.content_length)?, +content_md5: try_from_aws(x.content_md5)?, +expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, +key: unwrap_from_aws(x.key, "key")?, +part_number: unwrap_from_aws(x.part_number, "part_number")?, +request_payer: try_from_aws(x.request_payer)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key: try_from_aws(x.sse_customer_key)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_bucket(Some(try_into_aws(x.bucket)?)); +y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_md5(try_into_aws(x.content_md5)?); +y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); +y = y.set_key(Some(try_into_aws(x.key)?)); +y = y.set_part_number(Some(try_into_aws(x.part_number)?)); +y = y.set_request_payer(try_into_aws(x.request_payer)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::UploadPartOutput { type Target = aws_sdk_s3::operation::upload_part::UploadPartOutput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - e_tag: try_from_aws(x.e_tag)?, - request_charged: try_from_aws(x.request_charged)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +e_tag: try_from_aws(x.e_tag)?, +request_charged: try_from_aws(x.request_charged)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::VersioningConfiguration { type Target = aws_sdk_s3::types::VersioningConfiguration; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - mfa_delete: try_from_aws(x.mfa_delete)?, - status: try_from_aws(x.status)?, - }) - } +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +mfa_delete: try_from_aws(x.mfa_delete)?, +status: try_from_aws(x.status)?, +}) +} - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); - y = y.set_status(try_into_aws(x.status)?); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); +y = y.set_status(try_into_aws(x.status)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::WebsiteConfiguration { type Target = aws_sdk_s3::types::WebsiteConfiguration; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - error_document: try_from_aws(x.error_document)?, - index_document: try_from_aws(x.index_document)?, - redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, - routing_rules: try_from_aws(x.routing_rules)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_error_document(try_into_aws(x.error_document)?); - y = y.set_index_document(try_into_aws(x.index_document)?); - y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); - y = y.set_routing_rules(try_into_aws(x.routing_rules)?); - Ok(y.build()) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +error_document: try_from_aws(x.error_document)?, +index_document: try_from_aws(x.index_document)?, +redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, +routing_rules: try_from_aws(x.routing_rules)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_error_document(try_into_aws(x.error_document)?); +y = y.set_index_document(try_into_aws(x.index_document)?); +y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); +y = y.set_routing_rules(try_into_aws(x.routing_rules)?); +Ok(y.build()) +} } impl AwsConversion for s3s::dto::WriteGetObjectResponseInput { type Target = aws_sdk_s3::operation::write_get_object_response::WriteGetObjectResponseInput; - type Error = S3Error; - - fn try_from_aws(x: Self::Target) -> S3Result { - Ok(Self { - accept_ranges: try_from_aws(x.accept_ranges)?, - body: Some(try_from_aws(x.body)?), - bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, - cache_control: try_from_aws(x.cache_control)?, - checksum_crc32: try_from_aws(x.checksum_crc32)?, - checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, - checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, - checksum_sha1: try_from_aws(x.checksum_sha1)?, - checksum_sha256: try_from_aws(x.checksum_sha256)?, - content_disposition: try_from_aws(x.content_disposition)?, - content_encoding: try_from_aws(x.content_encoding)?, - content_language: try_from_aws(x.content_language)?, - content_length: try_from_aws(x.content_length)?, - content_range: try_from_aws(x.content_range)?, - content_type: try_from_aws(x.content_type)?, - delete_marker: try_from_aws(x.delete_marker)?, - e_tag: try_from_aws(x.e_tag)?, - error_code: try_from_aws(x.error_code)?, - error_message: try_from_aws(x.error_message)?, - expiration: try_from_aws(x.expiration)?, - expires: try_from_aws(x.expires)?, - last_modified: try_from_aws(x.last_modified)?, - metadata: try_from_aws(x.metadata)?, - missing_meta: try_from_aws(x.missing_meta)?, - object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, - object_lock_mode: try_from_aws(x.object_lock_mode)?, - object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, - parts_count: try_from_aws(x.parts_count)?, - replication_status: try_from_aws(x.replication_status)?, - request_charged: try_from_aws(x.request_charged)?, - request_route: unwrap_from_aws(x.request_route, "request_route")?, - request_token: unwrap_from_aws(x.request_token, "request_token")?, - restore: try_from_aws(x.restore)?, - sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, - sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, - ssekms_key_id: try_from_aws(x.ssekms_key_id)?, - server_side_encryption: try_from_aws(x.server_side_encryption)?, - status_code: try_from_aws(x.status_code)?, - storage_class: try_from_aws(x.storage_class)?, - tag_count: try_from_aws(x.tag_count)?, - version_id: try_from_aws(x.version_id)?, - }) - } - - fn try_into_aws(x: Self) -> S3Result { - let mut y = Self::Target::builder(); - y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); - y = y.set_body(try_into_aws(x.body)?); - y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); - y = y.set_cache_control(try_into_aws(x.cache_control)?); - y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); - y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); - y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); - y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); - y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); - y = y.set_content_disposition(try_into_aws(x.content_disposition)?); - y = y.set_content_encoding(try_into_aws(x.content_encoding)?); - y = y.set_content_language(try_into_aws(x.content_language)?); - y = y.set_content_length(try_into_aws(x.content_length)?); - y = y.set_content_range(try_into_aws(x.content_range)?); - y = y.set_content_type(try_into_aws(x.content_type)?); - y = y.set_delete_marker(try_into_aws(x.delete_marker)?); - y = y.set_e_tag(try_into_aws(x.e_tag)?); - y = y.set_error_code(try_into_aws(x.error_code)?); - y = y.set_error_message(try_into_aws(x.error_message)?); - y = y.set_expiration(try_into_aws(x.expiration)?); - y = y.set_expires(try_into_aws(x.expires)?); - y = y.set_last_modified(try_into_aws(x.last_modified)?); - y = y.set_metadata(try_into_aws(x.metadata)?); - y = y.set_missing_meta(try_into_aws(x.missing_meta)?); - y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); - y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); - y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); - y = y.set_parts_count(try_into_aws(x.parts_count)?); - y = y.set_replication_status(try_into_aws(x.replication_status)?); - y = y.set_request_charged(try_into_aws(x.request_charged)?); - y = y.set_request_route(Some(try_into_aws(x.request_route)?)); - y = y.set_request_token(Some(try_into_aws(x.request_token)?)); - y = y.set_restore(try_into_aws(x.restore)?); - y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); - y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); - y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); - y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); - y = y.set_status_code(try_into_aws(x.status_code)?); - y = y.set_storage_class(try_into_aws(x.storage_class)?); - y = y.set_tag_count(try_into_aws(x.tag_count)?); - y = y.set_version_id(try_into_aws(x.version_id)?); - y.build().map_err(S3Error::internal_error) - } +type Error = S3Error; + +fn try_from_aws(x: Self::Target) -> S3Result { +Ok(Self { +accept_ranges: try_from_aws(x.accept_ranges)?, +body: Some(try_from_aws(x.body)?), +bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, +cache_control: try_from_aws(x.cache_control)?, +checksum_crc32: try_from_aws(x.checksum_crc32)?, +checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, +checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, +checksum_sha1: try_from_aws(x.checksum_sha1)?, +checksum_sha256: try_from_aws(x.checksum_sha256)?, +content_disposition: try_from_aws(x.content_disposition)?, +content_encoding: try_from_aws(x.content_encoding)?, +content_language: try_from_aws(x.content_language)?, +content_length: try_from_aws(x.content_length)?, +content_range: try_from_aws(x.content_range)?, +content_type: try_from_aws(x.content_type)?, +delete_marker: try_from_aws(x.delete_marker)?, +e_tag: try_from_aws(x.e_tag)?, +error_code: try_from_aws(x.error_code)?, +error_message: try_from_aws(x.error_message)?, +expiration: try_from_aws(x.expiration)?, +expires: try_from_aws(x.expires)?, +last_modified: try_from_aws(x.last_modified)?, +metadata: try_from_aws(x.metadata)?, +missing_meta: try_from_aws(x.missing_meta)?, +object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, +object_lock_mode: try_from_aws(x.object_lock_mode)?, +object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, +parts_count: try_from_aws(x.parts_count)?, +replication_status: try_from_aws(x.replication_status)?, +request_charged: try_from_aws(x.request_charged)?, +request_route: unwrap_from_aws(x.request_route, "request_route")?, +request_token: unwrap_from_aws(x.request_token, "request_token")?, +restore: try_from_aws(x.restore)?, +sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, +sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, +ssekms_key_id: try_from_aws(x.ssekms_key_id)?, +server_side_encryption: try_from_aws(x.server_side_encryption)?, +status_code: try_from_aws(x.status_code)?, +storage_class: try_from_aws(x.storage_class)?, +tag_count: try_from_aws(x.tag_count)?, +version_id: try_from_aws(x.version_id)?, +}) +} + +fn try_into_aws(x: Self) -> S3Result { +let mut y = Self::Target::builder(); +y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); +y = y.set_body(try_into_aws(x.body)?); +y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); +y = y.set_cache_control(try_into_aws(x.cache_control)?); +y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); +y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); +y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); +y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); +y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); +y = y.set_content_disposition(try_into_aws(x.content_disposition)?); +y = y.set_content_encoding(try_into_aws(x.content_encoding)?); +y = y.set_content_language(try_into_aws(x.content_language)?); +y = y.set_content_length(try_into_aws(x.content_length)?); +y = y.set_content_range(try_into_aws(x.content_range)?); +y = y.set_content_type(try_into_aws(x.content_type)?); +y = y.set_delete_marker(try_into_aws(x.delete_marker)?); +y = y.set_e_tag(try_into_aws(x.e_tag)?); +y = y.set_error_code(try_into_aws(x.error_code)?); +y = y.set_error_message(try_into_aws(x.error_message)?); +y = y.set_expiration(try_into_aws(x.expiration)?); +y = y.set_expires(try_into_aws(x.expires)?); +y = y.set_last_modified(try_into_aws(x.last_modified)?); +y = y.set_metadata(try_into_aws(x.metadata)?); +y = y.set_missing_meta(try_into_aws(x.missing_meta)?); +y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); +y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); +y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); +y = y.set_parts_count(try_into_aws(x.parts_count)?); +y = y.set_replication_status(try_into_aws(x.replication_status)?); +y = y.set_request_charged(try_into_aws(x.request_charged)?); +y = y.set_request_route(Some(try_into_aws(x.request_route)?)); +y = y.set_request_token(Some(try_into_aws(x.request_token)?)); +y = y.set_restore(try_into_aws(x.restore)?); +y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); +y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); +y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); +y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); +y = y.set_status_code(try_into_aws(x.status_code)?); +y = y.set_storage_class(try_into_aws(x.storage_class)?); +y = y.set_tag_count(try_into_aws(x.tag_count)?); +y = y.set_version_id(try_into_aws(x.version_id)?); +y.build().map_err(S3Error::internal_error) +} } impl AwsConversion for s3s::dto::WriteGetObjectResponseOutput { type Target = aws_sdk_s3::operation::write_get_object_response::WriteGetObjectResponseOutput; - type Error = S3Error; +type Error = S3Error; - fn try_from_aws(x: Self::Target) -> S3Result { - let _ = x; - Ok(Self {}) - } +fn try_from_aws(x: Self::Target) -> S3Result { +let _ = x; +Ok(Self { +}) +} - fn try_into_aws(x: Self) -> S3Result { - let _ = x; - let y = Self::Target::builder(); - Ok(y.build()) - } +fn try_into_aws(x: Self) -> S3Result { +let _ = x; +let y = Self::Target::builder(); +Ok(y.build()) } +} + diff --git a/crates/s3s-aws/src/proxy/generated.rs b/crates/s3s-aws/src/proxy/generated.rs index 36073ae7..e0297a2b 100644 --- a/crates/s3s-aws/src/proxy/generated.rs +++ b/crates/s3s-aws/src/proxy/generated.rs @@ -2,2599 +2,2327 @@ use super::*; -use crate::conv::string_from_integer; use crate::conv::{try_from_aws, try_into_aws}; +use crate::conv::string_from_integer; use s3s::S3; -use s3s::S3Result; use s3s::{S3Request, S3Response}; +use s3s::S3Result; use tracing::debug; #[async_trait::async_trait] impl S3 for Proxy { - #[tracing::instrument(skip(self, req))] - async fn abort_multipart_upload( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.abort_multipart_upload(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn complete_multipart_upload( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.complete_multipart_upload(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); - b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); - b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); - b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); - b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); - b = b.set_checksum_type(try_into_aws(input.checksum_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_none_match(try_into_aws(input.if_none_match)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?); - b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn copy_object(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.copy_object(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_cache_control(try_into_aws(input.cache_control)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_disposition(try_into_aws(input.content_disposition)?); - b = b.set_content_encoding(try_into_aws(input.content_encoding)?); - b = b.set_content_language(try_into_aws(input.content_language)?); - b = b.set_content_type(try_into_aws(input.content_type)?); - b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); - b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); - b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); - b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); - b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); - b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); - b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); - b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); - b = b.set_expires(try_into_aws(input.expires)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_metadata(try_into_aws(input.metadata)?); - b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?); - b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); - b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); - b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_storage_class(try_into_aws(input.storage_class)?); - b = b.set_tagging(try_into_aws(input.tagging)?); - b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?); - b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn create_bucket( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.create_bucket(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write(try_into_aws(input.grant_write)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?); - b = b.set_object_ownership(try_into_aws(input.object_ownership)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn create_bucket_metadata_table_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.create_bucket_metadata_table_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn create_multipart_upload( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.create_multipart_upload(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_cache_control(try_into_aws(input.cache_control)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_checksum_type(try_into_aws(input.checksum_type)?); - b = b.set_content_disposition(try_into_aws(input.content_disposition)?); - b = b.set_content_encoding(try_into_aws(input.content_encoding)?); - b = b.set_content_language(try_into_aws(input.content_language)?); - b = b.set_content_type(try_into_aws(input.content_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_expires(try_into_aws(input.expires)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_metadata(try_into_aws(input.metadata)?); - b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); - b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); - b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_storage_class(try_into_aws(input.storage_class)?); - b = b.set_tagging(try_into_aws(input.tagging)?); - b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn create_session( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.create_session(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_session_mode(try_into_aws(input.session_mode)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_analytics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_analytics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_cors( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_cors(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_encryption( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_encryption(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_intelligent_tiering_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_intelligent_tiering_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_inventory_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_inventory_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_lifecycle( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_lifecycle(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_metadata_table_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_metadata_table_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_metrics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_metrics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_ownership_controls( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_ownership_controls(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_policy( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_policy(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_replication( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_replication(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_website( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_website(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_object( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_object(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?); - b = b.set_if_match_size(try_into_aws(input.if_match_size)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_mfa(try_into_aws(input.mfa)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_object_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_object_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_objects( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_objects(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_delete(Some(try_into_aws(input.delete)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_mfa(try_into_aws(input.mfa)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_public_access_block( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_public_access_block(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_accelerate_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_accelerate_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_acl( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_acl(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_analytics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_analytics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_cors( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_cors(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_encryption( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_encryption(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_intelligent_tiering_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_intelligent_tiering_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_inventory_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_inventory_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_lifecycle_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_lifecycle_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_location( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_location(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_logging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_logging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_metadata_table_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_metadata_table_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_metrics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_metrics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_notification_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_notification_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_ownership_controls( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_ownership_controls(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_policy( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_policy(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_policy_status( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_policy_status(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_replication( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_replication(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_request_payment( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_request_payment(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_versioning( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_versioning(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_website( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_website(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); - b = b.set_if_none_match(try_into_aws(input.if_none_match)?); - b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_part_number(try_into_aws(input.part_number)?); - b = b.set_range(try_into_aws(input.range)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); - b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); - b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); - b = b.set_response_content_language(try_into_aws(input.response_content_language)?); - b = b.set_response_content_type(try_into_aws(input.response_content_type)?); - b = b.set_response_expires(try_into_aws(input.response_expires)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_acl( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_acl(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_attributes( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_attributes(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_max_parts(try_into_aws(input.max_parts)?); - b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?)); - b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_legal_hold( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_legal_hold(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_lock_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_lock_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_retention( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_retention(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_torrent( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_torrent(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_public_access_block( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_public_access_block(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn head_bucket(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.head_bucket(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn head_object(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.head_object(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); - b = b.set_if_none_match(try_into_aws(input.if_none_match)?); - b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_part_number(try_into_aws(input.part_number)?); - b = b.set_range(try_into_aws(input.range)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); - b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); - b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); - b = b.set_response_content_language(try_into_aws(input.response_content_language)?); - b = b.set_response_content_type(try_into_aws(input.response_content_type)?); - b = b.set_response_expires(try_into_aws(input.response_expires)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_bucket_analytics_configurations( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_bucket_analytics_configurations(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_bucket_intelligent_tiering_configurations( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_bucket_intelligent_tiering_configurations(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_bucket_inventory_configurations( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_bucket_inventory_configurations(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_bucket_metrics_configurations( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_bucket_metrics_configurations(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_buckets( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_buckets(); - b = b.set_bucket_region(try_into_aws(input.bucket_region)?); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_max_buckets(try_into_aws(input.max_buckets)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_directory_buckets( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_directory_buckets(); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_max_directory_buckets(try_into_aws(input.max_directory_buckets)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_multipart_uploads( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_multipart_uploads(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_delimiter(try_into_aws(input.delimiter)?); - b = b.set_encoding_type(try_into_aws(input.encoding_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key_marker(try_into_aws(input.key_marker)?); - b = b.set_max_uploads(try_into_aws(input.max_uploads)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_object_versions( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_object_versions(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_delimiter(try_into_aws(input.delimiter)?); - b = b.set_encoding_type(try_into_aws(input.encoding_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key_marker(try_into_aws(input.key_marker)?); - b = b.set_max_keys(try_into_aws(input.max_keys)?); - b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_objects( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_objects(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_delimiter(try_into_aws(input.delimiter)?); - b = b.set_encoding_type(try_into_aws(input.encoding_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_marker(try_into_aws(input.marker)?); - b = b.set_max_keys(try_into_aws(input.max_keys)?); - b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_objects_v2( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_objects_v2(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_delimiter(try_into_aws(input.delimiter)?); - b = b.set_encoding_type(try_into_aws(input.encoding_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?); - b = b.set_max_keys(try_into_aws(input.max_keys)?); - b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_start_after(try_into_aws(input.start_after)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_parts(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_parts(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_max_parts(try_into_aws(input.max_parts)?); - b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_accelerate_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_accelerate_configuration(); - b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?)); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_acl( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_acl(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write(try_into_aws(input.grant_write)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_analytics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_analytics_configuration(); - b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?)); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_cors( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_cors(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_encryption( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_encryption(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_intelligent_tiering_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_intelligent_tiering_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_id(Some(try_into_aws(input.id)?)); - b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_inventory_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_inventory_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_lifecycle_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_lifecycle_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?); - b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_logging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_logging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_metrics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_metrics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_notification_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_notification_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?)); - b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_ownership_controls( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_ownership_controls(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_policy( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_policy(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_policy(Some(try_into_aws(input.policy)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_replication( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_replication(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?)); - b = b.set_token(try_into_aws(input.token)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_request_payment( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_request_payment(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_tagging(Some(try_into_aws(input.tagging)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_versioning( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_versioning(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_mfa(try_into_aws(input.mfa)?); - b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_website( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_website(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_body(try_into_aws(input.body)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_cache_control(try_into_aws(input.cache_control)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); - b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); - b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); - b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); - b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); - b = b.set_content_disposition(try_into_aws(input.content_disposition)?); - b = b.set_content_encoding(try_into_aws(input.content_encoding)?); - b = b.set_content_language(try_into_aws(input.content_language)?); - b = b.set_content_length(try_into_aws(input.content_length)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_content_type(try_into_aws(input.content_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_expires(try_into_aws(input.expires)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_none_match(try_into_aws(input.if_none_match)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_metadata(try_into_aws(input.metadata)?); - b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); - b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); - b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_storage_class(try_into_aws(input.storage_class)?); - b = b.set_tagging(try_into_aws(input.tagging)?); - b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); - b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_acl( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_acl(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write(try_into_aws(input.grant_write)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_legal_hold( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_legal_hold(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_legal_hold(try_into_aws(input.legal_hold)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_lock_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_lock_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_token(try_into_aws(input.token)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_retention( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_retention(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_retention(try_into_aws(input.retention)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_tagging(Some(try_into_aws(input.tagging)?)); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_public_access_block( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_public_access_block(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn restore_object( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.restore_object(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_restore_request(try_into_aws(input.restore_request)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn select_object_content( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.select_object_content(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_expression(Some(try_into_aws(input.request.expression)?)); - b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?)); - b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?)); - b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?)); - b = b.set_request_progress(try_into_aws(input.request.request_progress)?); - b = b.set_scan_range(try_into_aws(input.request.scan_range)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn upload_part(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.upload_part(); - b = b.set_body(try_into_aws(input.body)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); - b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); - b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); - b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); - b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); - b = b.set_content_length(try_into_aws(input.content_length)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_part_number(Some(try_into_aws(input.part_number)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn upload_part_copy( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.upload_part_copy(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); - b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); - b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); - b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); - b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); - b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?); - b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); - b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); - b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_part_number(Some(try_into_aws(input.part_number)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn write_get_object_response( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.write_get_object_response(); - b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?); - b = b.set_body(try_into_aws(input.body)?); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_cache_control(try_into_aws(input.cache_control)?); - b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); - b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); - b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); - b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); - b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); - b = b.set_content_disposition(try_into_aws(input.content_disposition)?); - b = b.set_content_encoding(try_into_aws(input.content_encoding)?); - b = b.set_content_language(try_into_aws(input.content_language)?); - b = b.set_content_length(try_into_aws(input.content_length)?); - b = b.set_content_range(try_into_aws(input.content_range)?); - b = b.set_content_type(try_into_aws(input.content_type)?); - b = b.set_delete_marker(try_into_aws(input.delete_marker)?); - b = b.set_e_tag(try_into_aws(input.e_tag)?); - b = b.set_error_code(try_into_aws(input.error_code)?); - b = b.set_error_message(try_into_aws(input.error_message)?); - b = b.set_expiration(try_into_aws(input.expiration)?); - b = b.set_expires(try_into_aws(input.expires)?); - b = b.set_last_modified(try_into_aws(input.last_modified)?); - b = b.set_metadata(try_into_aws(input.metadata)?); - b = b.set_missing_meta(try_into_aws(input.missing_meta)?); - b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); - b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); - b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); - b = b.set_parts_count(try_into_aws(input.parts_count)?); - b = b.set_replication_status(try_into_aws(input.replication_status)?); - b = b.set_request_charged(try_into_aws(input.request_charged)?); - b = b.set_request_route(Some(try_into_aws(input.request_route)?)); - b = b.set_request_token(Some(try_into_aws(input.request_token)?)); - b = b.set_restore(try_into_aws(input.restore)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_status_code(try_into_aws(input.status_code)?); - b = b.set_storage_class(try_into_aws(input.storage_class)?); - b = b.set_tag_count(try_into_aws(input.tag_count)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } +#[tracing::instrument(skip(self, req))] +async fn abort_multipart_upload(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.abort_multipart_upload(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn complete_multipart_upload(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.complete_multipart_upload(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); +b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); +b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); +b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); +b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); +b = b.set_checksum_type(try_into_aws(input.checksum_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_none_match(try_into_aws(input.if_none_match)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?); +b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn copy_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.copy_object(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_cache_control(try_into_aws(input.cache_control)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_disposition(try_into_aws(input.content_disposition)?); +b = b.set_content_encoding(try_into_aws(input.content_encoding)?); +b = b.set_content_language(try_into_aws(input.content_language)?); +b = b.set_content_type(try_into_aws(input.content_type)?); +b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); +b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); +b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); +b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); +b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); +b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); +b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); +b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); +b = b.set_expires(try_into_aws(input.expires)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_metadata(try_into_aws(input.metadata)?); +b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?); +b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); +b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); +b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_storage_class(try_into_aws(input.storage_class)?); +b = b.set_tagging(try_into_aws(input.tagging)?); +b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?); +b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn create_bucket(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.create_bucket(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write(try_into_aws(input.grant_write)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?); +b = b.set_object_ownership(try_into_aws(input.object_ownership)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn create_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.create_bucket_metadata_table_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn create_multipart_upload(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.create_multipart_upload(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_cache_control(try_into_aws(input.cache_control)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_checksum_type(try_into_aws(input.checksum_type)?); +b = b.set_content_disposition(try_into_aws(input.content_disposition)?); +b = b.set_content_encoding(try_into_aws(input.content_encoding)?); +b = b.set_content_language(try_into_aws(input.content_language)?); +b = b.set_content_type(try_into_aws(input.content_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_expires(try_into_aws(input.expires)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_metadata(try_into_aws(input.metadata)?); +b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); +b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); +b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_storage_class(try_into_aws(input.storage_class)?); +b = b.set_tagging(try_into_aws(input.tagging)?); +b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn create_session(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.create_session(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_session_mode(try_into_aws(input.session_mode)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_analytics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_cors(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_cors(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_encryption(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_encryption(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_intelligent_tiering_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_inventory_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_lifecycle(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_lifecycle(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_metadata_table_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_metrics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_ownership_controls(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_policy(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_policy(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_replication(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_replication(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_website(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_website(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_object(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?); +b = b.set_if_match_size(try_into_aws(input.if_match_size)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_mfa(try_into_aws(input.mfa)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_object_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_object_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_objects(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_objects(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_delete(Some(try_into_aws(input.delete)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_mfa(try_into_aws(input.mfa)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_public_access_block(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_public_access_block(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_accelerate_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_accelerate_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_acl(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_acl(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_analytics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_cors(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_cors(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_encryption(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_encryption(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_intelligent_tiering_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_inventory_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_lifecycle_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_lifecycle_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_location(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_location(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_logging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_logging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_metadata_table_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_metrics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_notification_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_notification_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_ownership_controls(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_policy(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_policy(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_policy_status(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_policy_status(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_replication(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_replication(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_request_payment(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_request_payment(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_versioning(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_versioning(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_website(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_website(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); +b = b.set_if_none_match(try_into_aws(input.if_none_match)?); +b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_part_number(try_into_aws(input.part_number)?); +b = b.set_range(try_into_aws(input.range)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); +b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); +b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); +b = b.set_response_content_language(try_into_aws(input.response_content_language)?); +b = b.set_response_content_type(try_into_aws(input.response_content_type)?); +b = b.set_response_expires(try_into_aws(input.response_expires)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_acl(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_acl(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_attributes(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_attributes(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_max_parts(try_into_aws(input.max_parts)?); +b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?)); +b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_legal_hold(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_legal_hold(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_lock_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_lock_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_retention(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_retention(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_torrent(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_torrent(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_public_access_block(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_public_access_block(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn head_bucket(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.head_bucket(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn head_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.head_object(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); +b = b.set_if_none_match(try_into_aws(input.if_none_match)?); +b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_part_number(try_into_aws(input.part_number)?); +b = b.set_range(try_into_aws(input.range)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); +b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); +b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); +b = b.set_response_content_language(try_into_aws(input.response_content_language)?); +b = b.set_response_content_type(try_into_aws(input.response_content_type)?); +b = b.set_response_expires(try_into_aws(input.response_expires)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_bucket_analytics_configurations(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_bucket_analytics_configurations(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_bucket_intelligent_tiering_configurations(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_bucket_intelligent_tiering_configurations(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_bucket_inventory_configurations(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_bucket_inventory_configurations(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_bucket_metrics_configurations(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_bucket_metrics_configurations(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_buckets(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_buckets(); +b = b.set_bucket_region(try_into_aws(input.bucket_region)?); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_max_buckets(try_into_aws(input.max_buckets)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_directory_buckets(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_directory_buckets(); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_max_directory_buckets(try_into_aws(input.max_directory_buckets)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_multipart_uploads(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_multipart_uploads(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_delimiter(try_into_aws(input.delimiter)?); +b = b.set_encoding_type(try_into_aws(input.encoding_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key_marker(try_into_aws(input.key_marker)?); +b = b.set_max_uploads(try_into_aws(input.max_uploads)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_object_versions(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_object_versions(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_delimiter(try_into_aws(input.delimiter)?); +b = b.set_encoding_type(try_into_aws(input.encoding_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key_marker(try_into_aws(input.key_marker)?); +b = b.set_max_keys(try_into_aws(input.max_keys)?); +b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_objects(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_objects(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_delimiter(try_into_aws(input.delimiter)?); +b = b.set_encoding_type(try_into_aws(input.encoding_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_marker(try_into_aws(input.marker)?); +b = b.set_max_keys(try_into_aws(input.max_keys)?); +b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_objects_v2(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_objects_v2(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_delimiter(try_into_aws(input.delimiter)?); +b = b.set_encoding_type(try_into_aws(input.encoding_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?); +b = b.set_max_keys(try_into_aws(input.max_keys)?); +b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_start_after(try_into_aws(input.start_after)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_parts(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_parts(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_max_parts(try_into_aws(input.max_parts)?); +b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_accelerate_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_accelerate_configuration(); +b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?)); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_acl(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_acl(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write(try_into_aws(input.grant_write)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_analytics_configuration(); +b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?)); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_cors(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_cors(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_encryption(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_encryption(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_intelligent_tiering_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_id(Some(try_into_aws(input.id)?)); +b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_inventory_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_lifecycle_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_lifecycle_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?); +b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_logging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_logging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_metrics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_notification_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_notification_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?)); +b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_ownership_controls(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_policy(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_policy(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_policy(Some(try_into_aws(input.policy)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_replication(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_replication(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?)); +b = b.set_token(try_into_aws(input.token)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_request_payment(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_request_payment(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_tagging(Some(try_into_aws(input.tagging)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_versioning(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_versioning(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_mfa(try_into_aws(input.mfa)?); +b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_website(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_website(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_body(try_into_aws(input.body)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_cache_control(try_into_aws(input.cache_control)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); +b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); +b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); +b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); +b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); +b = b.set_content_disposition(try_into_aws(input.content_disposition)?); +b = b.set_content_encoding(try_into_aws(input.content_encoding)?); +b = b.set_content_language(try_into_aws(input.content_language)?); +b = b.set_content_length(try_into_aws(input.content_length)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_content_type(try_into_aws(input.content_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_expires(try_into_aws(input.expires)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_none_match(try_into_aws(input.if_none_match)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_metadata(try_into_aws(input.metadata)?); +b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); +b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); +b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_storage_class(try_into_aws(input.storage_class)?); +b = b.set_tagging(try_into_aws(input.tagging)?); +b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); +b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_acl(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_acl(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write(try_into_aws(input.grant_write)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_legal_hold(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_legal_hold(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_legal_hold(try_into_aws(input.legal_hold)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_lock_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_lock_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_token(try_into_aws(input.token)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_retention(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_retention(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_retention(try_into_aws(input.retention)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_tagging(Some(try_into_aws(input.tagging)?)); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_public_access_block(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_public_access_block(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn restore_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.restore_object(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_restore_request(try_into_aws(input.restore_request)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn select_object_content(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.select_object_content(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_expression(Some(try_into_aws(input.request.expression)?)); +b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?)); +b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?)); +b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?)); +b = b.set_request_progress(try_into_aws(input.request.request_progress)?); +b = b.set_scan_range(try_into_aws(input.request.scan_range)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn upload_part(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.upload_part(); +b = b.set_body(try_into_aws(input.body)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); +b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); +b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); +b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); +b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); +b = b.set_content_length(try_into_aws(input.content_length)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_part_number(Some(try_into_aws(input.part_number)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn upload_part_copy(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.upload_part_copy(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); +b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); +b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); +b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); +b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); +b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?); +b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); +b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); +b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_part_number(Some(try_into_aws(input.part_number)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn write_get_object_response(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.write_get_object_response(); +b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?); +b = b.set_body(try_into_aws(input.body)?); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_cache_control(try_into_aws(input.cache_control)?); +b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); +b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); +b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); +b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); +b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); +b = b.set_content_disposition(try_into_aws(input.content_disposition)?); +b = b.set_content_encoding(try_into_aws(input.content_encoding)?); +b = b.set_content_language(try_into_aws(input.content_language)?); +b = b.set_content_length(try_into_aws(input.content_length)?); +b = b.set_content_range(try_into_aws(input.content_range)?); +b = b.set_content_type(try_into_aws(input.content_type)?); +b = b.set_delete_marker(try_into_aws(input.delete_marker)?); +b = b.set_e_tag(try_into_aws(input.e_tag)?); +b = b.set_error_code(try_into_aws(input.error_code)?); +b = b.set_error_message(try_into_aws(input.error_message)?); +b = b.set_expiration(try_into_aws(input.expiration)?); +b = b.set_expires(try_into_aws(input.expires)?); +b = b.set_last_modified(try_into_aws(input.last_modified)?); +b = b.set_metadata(try_into_aws(input.metadata)?); +b = b.set_missing_meta(try_into_aws(input.missing_meta)?); +b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); +b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); +b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); +b = b.set_parts_count(try_into_aws(input.parts_count)?); +b = b.set_replication_status(try_into_aws(input.replication_status)?); +b = b.set_request_charged(try_into_aws(input.request_charged)?); +b = b.set_request_route(Some(try_into_aws(input.request_route)?)); +b = b.set_request_token(Some(try_into_aws(input.request_token)?)); +b = b.set_restore(try_into_aws(input.restore)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_status_code(try_into_aws(input.status_code)?); +b = b.set_storage_class(try_into_aws(input.storage_class)?); +b = b.set_tag_count(try_into_aws(input.tag_count)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + } diff --git a/crates/s3s-aws/src/proxy/generated_minio.rs b/crates/s3s-aws/src/proxy/generated_minio.rs index 36073ae7..e0297a2b 100644 --- a/crates/s3s-aws/src/proxy/generated_minio.rs +++ b/crates/s3s-aws/src/proxy/generated_minio.rs @@ -2,2599 +2,2327 @@ use super::*; -use crate::conv::string_from_integer; use crate::conv::{try_from_aws, try_into_aws}; +use crate::conv::string_from_integer; use s3s::S3; -use s3s::S3Result; use s3s::{S3Request, S3Response}; +use s3s::S3Result; use tracing::debug; #[async_trait::async_trait] impl S3 for Proxy { - #[tracing::instrument(skip(self, req))] - async fn abort_multipart_upload( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.abort_multipart_upload(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn complete_multipart_upload( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.complete_multipart_upload(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); - b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); - b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); - b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); - b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); - b = b.set_checksum_type(try_into_aws(input.checksum_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_none_match(try_into_aws(input.if_none_match)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?); - b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn copy_object(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.copy_object(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_cache_control(try_into_aws(input.cache_control)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_disposition(try_into_aws(input.content_disposition)?); - b = b.set_content_encoding(try_into_aws(input.content_encoding)?); - b = b.set_content_language(try_into_aws(input.content_language)?); - b = b.set_content_type(try_into_aws(input.content_type)?); - b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); - b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); - b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); - b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); - b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); - b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); - b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); - b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); - b = b.set_expires(try_into_aws(input.expires)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_metadata(try_into_aws(input.metadata)?); - b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?); - b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); - b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); - b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_storage_class(try_into_aws(input.storage_class)?); - b = b.set_tagging(try_into_aws(input.tagging)?); - b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?); - b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn create_bucket( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.create_bucket(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write(try_into_aws(input.grant_write)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?); - b = b.set_object_ownership(try_into_aws(input.object_ownership)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn create_bucket_metadata_table_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.create_bucket_metadata_table_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn create_multipart_upload( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.create_multipart_upload(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_cache_control(try_into_aws(input.cache_control)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_checksum_type(try_into_aws(input.checksum_type)?); - b = b.set_content_disposition(try_into_aws(input.content_disposition)?); - b = b.set_content_encoding(try_into_aws(input.content_encoding)?); - b = b.set_content_language(try_into_aws(input.content_language)?); - b = b.set_content_type(try_into_aws(input.content_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_expires(try_into_aws(input.expires)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_metadata(try_into_aws(input.metadata)?); - b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); - b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); - b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_storage_class(try_into_aws(input.storage_class)?); - b = b.set_tagging(try_into_aws(input.tagging)?); - b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn create_session( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.create_session(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_session_mode(try_into_aws(input.session_mode)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_analytics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_analytics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_cors( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_cors(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_encryption( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_encryption(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_intelligent_tiering_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_intelligent_tiering_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_inventory_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_inventory_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_lifecycle( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_lifecycle(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_metadata_table_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_metadata_table_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_metrics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_metrics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_ownership_controls( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_ownership_controls(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_policy( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_policy(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_replication( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_replication(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_bucket_website( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_bucket_website(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_object( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_object(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?); - b = b.set_if_match_size(try_into_aws(input.if_match_size)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_mfa(try_into_aws(input.mfa)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_object_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_object_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_objects( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_objects(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_delete(Some(try_into_aws(input.delete)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_mfa(try_into_aws(input.mfa)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn delete_public_access_block( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.delete_public_access_block(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_accelerate_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_accelerate_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_acl( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_acl(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_analytics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_analytics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_cors( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_cors(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_encryption( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_encryption(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_intelligent_tiering_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_intelligent_tiering_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_inventory_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_inventory_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_lifecycle_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_lifecycle_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_location( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_location(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_logging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_logging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_metadata_table_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_metadata_table_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_metrics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_metrics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_notification_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_notification_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_ownership_controls( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_ownership_controls(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_policy( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_policy(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_policy_status( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_policy_status(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_replication( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_replication(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_request_payment( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_request_payment(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_versioning( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_versioning(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_bucket_website( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_bucket_website(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); - b = b.set_if_none_match(try_into_aws(input.if_none_match)?); - b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_part_number(try_into_aws(input.part_number)?); - b = b.set_range(try_into_aws(input.range)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); - b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); - b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); - b = b.set_response_content_language(try_into_aws(input.response_content_language)?); - b = b.set_response_content_type(try_into_aws(input.response_content_type)?); - b = b.set_response_expires(try_into_aws(input.response_expires)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_acl( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_acl(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_attributes( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_attributes(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_max_parts(try_into_aws(input.max_parts)?); - b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?)); - b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_legal_hold( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_legal_hold(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_lock_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_lock_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_retention( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_retention(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_object_torrent( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_object_torrent(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn get_public_access_block( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.get_public_access_block(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn head_bucket(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.head_bucket(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn head_object(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.head_object(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); - b = b.set_if_none_match(try_into_aws(input.if_none_match)?); - b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_part_number(try_into_aws(input.part_number)?); - b = b.set_range(try_into_aws(input.range)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); - b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); - b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); - b = b.set_response_content_language(try_into_aws(input.response_content_language)?); - b = b.set_response_content_type(try_into_aws(input.response_content_type)?); - b = b.set_response_expires(try_into_aws(input.response_expires)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_bucket_analytics_configurations( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_bucket_analytics_configurations(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_bucket_intelligent_tiering_configurations( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_bucket_intelligent_tiering_configurations(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_bucket_inventory_configurations( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_bucket_inventory_configurations(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_bucket_metrics_configurations( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_bucket_metrics_configurations(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_buckets( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_buckets(); - b = b.set_bucket_region(try_into_aws(input.bucket_region)?); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_max_buckets(try_into_aws(input.max_buckets)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_directory_buckets( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_directory_buckets(); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_max_directory_buckets(try_into_aws(input.max_directory_buckets)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_multipart_uploads( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_multipart_uploads(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_delimiter(try_into_aws(input.delimiter)?); - b = b.set_encoding_type(try_into_aws(input.encoding_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key_marker(try_into_aws(input.key_marker)?); - b = b.set_max_uploads(try_into_aws(input.max_uploads)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_object_versions( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_object_versions(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_delimiter(try_into_aws(input.delimiter)?); - b = b.set_encoding_type(try_into_aws(input.encoding_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key_marker(try_into_aws(input.key_marker)?); - b = b.set_max_keys(try_into_aws(input.max_keys)?); - b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_objects( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_objects(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_delimiter(try_into_aws(input.delimiter)?); - b = b.set_encoding_type(try_into_aws(input.encoding_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_marker(try_into_aws(input.marker)?); - b = b.set_max_keys(try_into_aws(input.max_keys)?); - b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_objects_v2( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_objects_v2(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_continuation_token(try_into_aws(input.continuation_token)?); - b = b.set_delimiter(try_into_aws(input.delimiter)?); - b = b.set_encoding_type(try_into_aws(input.encoding_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?); - b = b.set_max_keys(try_into_aws(input.max_keys)?); - b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); - b = b.set_prefix(try_into_aws(input.prefix)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_start_after(try_into_aws(input.start_after)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn list_parts(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.list_parts(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_max_parts(try_into_aws(input.max_parts)?); - b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_accelerate_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_accelerate_configuration(); - b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?)); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_acl( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_acl(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write(try_into_aws(input.grant_write)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_analytics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_analytics_configuration(); - b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?)); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_cors( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_cors(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_encryption( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_encryption(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_intelligent_tiering_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_intelligent_tiering_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_id(Some(try_into_aws(input.id)?)); - b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_inventory_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_inventory_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_lifecycle_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_lifecycle_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?); - b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_logging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_logging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_metrics_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_metrics_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_id(Some(try_into_aws(input.id)?)); - b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_notification_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_notification_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?)); - b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_ownership_controls( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_ownership_controls(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_policy( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_policy(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_policy(Some(try_into_aws(input.policy)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_replication( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_replication(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?)); - b = b.set_token(try_into_aws(input.token)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_request_payment( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_request_payment(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_tagging(Some(try_into_aws(input.tagging)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_versioning( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_versioning(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_mfa(try_into_aws(input.mfa)?); - b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_bucket_website( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_bucket_website(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_body(try_into_aws(input.body)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_cache_control(try_into_aws(input.cache_control)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); - b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); - b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); - b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); - b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); - b = b.set_content_disposition(try_into_aws(input.content_disposition)?); - b = b.set_content_encoding(try_into_aws(input.content_encoding)?); - b = b.set_content_language(try_into_aws(input.content_language)?); - b = b.set_content_length(try_into_aws(input.content_length)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_content_type(try_into_aws(input.content_type)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_expires(try_into_aws(input.expires)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_if_match(try_into_aws(input.if_match)?); - b = b.set_if_none_match(try_into_aws(input.if_none_match)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_metadata(try_into_aws(input.metadata)?); - b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); - b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); - b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_storage_class(try_into_aws(input.storage_class)?); - b = b.set_tagging(try_into_aws(input.tagging)?); - b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); - b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_acl( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_acl(); - b = b.set_acl(try_into_aws(input.acl)?); - b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); - b = b.set_grant_read(try_into_aws(input.grant_read)?); - b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); - b = b.set_grant_write(try_into_aws(input.grant_write)?); - b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_legal_hold( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_legal_hold(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_legal_hold(try_into_aws(input.legal_hold)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_lock_configuration( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_lock_configuration(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_token(try_into_aws(input.token)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_retention( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_retention(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_retention(try_into_aws(input.retention)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_object_tagging( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_object_tagging(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_tagging(Some(try_into_aws(input.tagging)?)); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn put_public_access_block( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.put_public_access_block(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn restore_object( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.restore_object(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_restore_request(try_into_aws(input.restore_request)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn select_object_content( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.select_object_content(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_expression(Some(try_into_aws(input.request.expression)?)); - b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?)); - b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?)); - b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?)); - b = b.set_request_progress(try_into_aws(input.request.request_progress)?); - b = b.set_scan_range(try_into_aws(input.request.scan_range)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn upload_part(&self, req: S3Request) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.upload_part(); - b = b.set_body(try_into_aws(input.body)?); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); - b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); - b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); - b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); - b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); - b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); - b = b.set_content_length(try_into_aws(input.content_length)?); - b = b.set_content_md5(try_into_aws(input.content_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_part_number(Some(try_into_aws(input.part_number)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn upload_part_copy( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.upload_part_copy(); - b = b.set_bucket(Some(try_into_aws(input.bucket)?)); - b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); - b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); - b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); - b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); - b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); - b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?); - b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); - b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); - b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); - b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); - b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); - b = b.set_key(Some(try_into_aws(input.key)?)); - b = b.set_part_number(Some(try_into_aws(input.part_number)?)); - b = b.set_request_payer(try_into_aws(input.request_payer)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } - - #[tracing::instrument(skip(self, req))] - async fn write_get_object_response( - &self, - req: S3Request, - ) -> S3Result> { - let input = req.input; - debug!(?input); - let mut b = self.0.write_get_object_response(); - b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?); - b = b.set_body(try_into_aws(input.body)?); - b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); - b = b.set_cache_control(try_into_aws(input.cache_control)?); - b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); - b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); - b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); - b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); - b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); - b = b.set_content_disposition(try_into_aws(input.content_disposition)?); - b = b.set_content_encoding(try_into_aws(input.content_encoding)?); - b = b.set_content_language(try_into_aws(input.content_language)?); - b = b.set_content_length(try_into_aws(input.content_length)?); - b = b.set_content_range(try_into_aws(input.content_range)?); - b = b.set_content_type(try_into_aws(input.content_type)?); - b = b.set_delete_marker(try_into_aws(input.delete_marker)?); - b = b.set_e_tag(try_into_aws(input.e_tag)?); - b = b.set_error_code(try_into_aws(input.error_code)?); - b = b.set_error_message(try_into_aws(input.error_message)?); - b = b.set_expiration(try_into_aws(input.expiration)?); - b = b.set_expires(try_into_aws(input.expires)?); - b = b.set_last_modified(try_into_aws(input.last_modified)?); - b = b.set_metadata(try_into_aws(input.metadata)?); - b = b.set_missing_meta(try_into_aws(input.missing_meta)?); - b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); - b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); - b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); - b = b.set_parts_count(try_into_aws(input.parts_count)?); - b = b.set_replication_status(try_into_aws(input.replication_status)?); - b = b.set_request_charged(try_into_aws(input.request_charged)?); - b = b.set_request_route(Some(try_into_aws(input.request_route)?)); - b = b.set_request_token(Some(try_into_aws(input.request_token)?)); - b = b.set_restore(try_into_aws(input.restore)?); - b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); - b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); - b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); - b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); - b = b.set_status_code(try_into_aws(input.status_code)?); - b = b.set_storage_class(try_into_aws(input.storage_class)?); - b = b.set_tag_count(try_into_aws(input.tag_count)?); - b = b.set_version_id(try_into_aws(input.version_id)?); - let result = b.send().await; - match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - } - Err(e) => Err(wrap_sdk_error!(e)), - } - } +#[tracing::instrument(skip(self, req))] +async fn abort_multipart_upload(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.abort_multipart_upload(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn complete_multipart_upload(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.complete_multipart_upload(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); +b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); +b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); +b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); +b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); +b = b.set_checksum_type(try_into_aws(input.checksum_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_none_match(try_into_aws(input.if_none_match)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?); +b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn copy_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.copy_object(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_cache_control(try_into_aws(input.cache_control)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_disposition(try_into_aws(input.content_disposition)?); +b = b.set_content_encoding(try_into_aws(input.content_encoding)?); +b = b.set_content_language(try_into_aws(input.content_language)?); +b = b.set_content_type(try_into_aws(input.content_type)?); +b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); +b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); +b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); +b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); +b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); +b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); +b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); +b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); +b = b.set_expires(try_into_aws(input.expires)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_metadata(try_into_aws(input.metadata)?); +b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?); +b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); +b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); +b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_storage_class(try_into_aws(input.storage_class)?); +b = b.set_tagging(try_into_aws(input.tagging)?); +b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?); +b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn create_bucket(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.create_bucket(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write(try_into_aws(input.grant_write)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?); +b = b.set_object_ownership(try_into_aws(input.object_ownership)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn create_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.create_bucket_metadata_table_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn create_multipart_upload(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.create_multipart_upload(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_cache_control(try_into_aws(input.cache_control)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_checksum_type(try_into_aws(input.checksum_type)?); +b = b.set_content_disposition(try_into_aws(input.content_disposition)?); +b = b.set_content_encoding(try_into_aws(input.content_encoding)?); +b = b.set_content_language(try_into_aws(input.content_language)?); +b = b.set_content_type(try_into_aws(input.content_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_expires(try_into_aws(input.expires)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_metadata(try_into_aws(input.metadata)?); +b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); +b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); +b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_storage_class(try_into_aws(input.storage_class)?); +b = b.set_tagging(try_into_aws(input.tagging)?); +b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn create_session(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.create_session(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_session_mode(try_into_aws(input.session_mode)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_analytics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_cors(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_cors(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_encryption(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_encryption(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_intelligent_tiering_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_inventory_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_lifecycle(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_lifecycle(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_metadata_table_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_metrics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_ownership_controls(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_policy(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_policy(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_replication(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_replication(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_bucket_website(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_bucket_website(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_object(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?); +b = b.set_if_match_size(try_into_aws(input.if_match_size)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_mfa(try_into_aws(input.mfa)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_object_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_object_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_objects(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_objects(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_delete(Some(try_into_aws(input.delete)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_mfa(try_into_aws(input.mfa)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn delete_public_access_block(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.delete_public_access_block(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_accelerate_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_accelerate_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_acl(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_acl(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_analytics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_cors(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_cors(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_encryption(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_encryption(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_intelligent_tiering_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_inventory_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_lifecycle_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_lifecycle_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_location(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_location(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_logging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_logging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_metadata_table_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_metrics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_notification_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_notification_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_ownership_controls(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_policy(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_policy(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_policy_status(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_policy_status(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_replication(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_replication(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_request_payment(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_request_payment(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_versioning(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_versioning(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_bucket_website(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_bucket_website(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); +b = b.set_if_none_match(try_into_aws(input.if_none_match)?); +b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_part_number(try_into_aws(input.part_number)?); +b = b.set_range(try_into_aws(input.range)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); +b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); +b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); +b = b.set_response_content_language(try_into_aws(input.response_content_language)?); +b = b.set_response_content_type(try_into_aws(input.response_content_type)?); +b = b.set_response_expires(try_into_aws(input.response_expires)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_acl(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_acl(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_attributes(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_attributes(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_max_parts(try_into_aws(input.max_parts)?); +b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?)); +b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_legal_hold(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_legal_hold(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_lock_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_lock_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_retention(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_retention(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_object_torrent(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_object_torrent(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn get_public_access_block(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.get_public_access_block(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn head_bucket(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.head_bucket(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn head_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.head_object(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); +b = b.set_if_none_match(try_into_aws(input.if_none_match)?); +b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_part_number(try_into_aws(input.part_number)?); +b = b.set_range(try_into_aws(input.range)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); +b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); +b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); +b = b.set_response_content_language(try_into_aws(input.response_content_language)?); +b = b.set_response_content_type(try_into_aws(input.response_content_type)?); +b = b.set_response_expires(try_into_aws(input.response_expires)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_bucket_analytics_configurations(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_bucket_analytics_configurations(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_bucket_intelligent_tiering_configurations(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_bucket_intelligent_tiering_configurations(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_bucket_inventory_configurations(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_bucket_inventory_configurations(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_bucket_metrics_configurations(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_bucket_metrics_configurations(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_buckets(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_buckets(); +b = b.set_bucket_region(try_into_aws(input.bucket_region)?); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_max_buckets(try_into_aws(input.max_buckets)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_directory_buckets(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_directory_buckets(); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_max_directory_buckets(try_into_aws(input.max_directory_buckets)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_multipart_uploads(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_multipart_uploads(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_delimiter(try_into_aws(input.delimiter)?); +b = b.set_encoding_type(try_into_aws(input.encoding_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key_marker(try_into_aws(input.key_marker)?); +b = b.set_max_uploads(try_into_aws(input.max_uploads)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_object_versions(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_object_versions(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_delimiter(try_into_aws(input.delimiter)?); +b = b.set_encoding_type(try_into_aws(input.encoding_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key_marker(try_into_aws(input.key_marker)?); +b = b.set_max_keys(try_into_aws(input.max_keys)?); +b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_objects(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_objects(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_delimiter(try_into_aws(input.delimiter)?); +b = b.set_encoding_type(try_into_aws(input.encoding_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_marker(try_into_aws(input.marker)?); +b = b.set_max_keys(try_into_aws(input.max_keys)?); +b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_objects_v2(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_objects_v2(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_continuation_token(try_into_aws(input.continuation_token)?); +b = b.set_delimiter(try_into_aws(input.delimiter)?); +b = b.set_encoding_type(try_into_aws(input.encoding_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?); +b = b.set_max_keys(try_into_aws(input.max_keys)?); +b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); +b = b.set_prefix(try_into_aws(input.prefix)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_start_after(try_into_aws(input.start_after)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn list_parts(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.list_parts(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_max_parts(try_into_aws(input.max_parts)?); +b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_accelerate_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_accelerate_configuration(); +b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?)); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_acl(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_acl(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write(try_into_aws(input.grant_write)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_analytics_configuration(); +b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?)); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_cors(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_cors(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_encryption(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_encryption(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_intelligent_tiering_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_id(Some(try_into_aws(input.id)?)); +b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_inventory_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_lifecycle_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_lifecycle_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?); +b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_logging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_logging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_metrics_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_id(Some(try_into_aws(input.id)?)); +b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_notification_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_notification_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?)); +b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_ownership_controls(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_policy(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_policy(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_policy(Some(try_into_aws(input.policy)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_replication(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_replication(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?)); +b = b.set_token(try_into_aws(input.token)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_request_payment(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_request_payment(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_tagging(Some(try_into_aws(input.tagging)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_versioning(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_versioning(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_mfa(try_into_aws(input.mfa)?); +b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_bucket_website(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_bucket_website(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_body(try_into_aws(input.body)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_cache_control(try_into_aws(input.cache_control)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); +b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); +b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); +b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); +b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); +b = b.set_content_disposition(try_into_aws(input.content_disposition)?); +b = b.set_content_encoding(try_into_aws(input.content_encoding)?); +b = b.set_content_language(try_into_aws(input.content_language)?); +b = b.set_content_length(try_into_aws(input.content_length)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_content_type(try_into_aws(input.content_type)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_expires(try_into_aws(input.expires)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_if_match(try_into_aws(input.if_match)?); +b = b.set_if_none_match(try_into_aws(input.if_none_match)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_metadata(try_into_aws(input.metadata)?); +b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); +b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); +b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_storage_class(try_into_aws(input.storage_class)?); +b = b.set_tagging(try_into_aws(input.tagging)?); +b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); +b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_acl(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_acl(); +b = b.set_acl(try_into_aws(input.acl)?); +b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); +b = b.set_grant_read(try_into_aws(input.grant_read)?); +b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); +b = b.set_grant_write(try_into_aws(input.grant_write)?); +b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_legal_hold(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_legal_hold(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_legal_hold(try_into_aws(input.legal_hold)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_lock_configuration(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_lock_configuration(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_token(try_into_aws(input.token)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_retention(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_retention(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_retention(try_into_aws(input.retention)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_object_tagging(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_object_tagging(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_tagging(Some(try_into_aws(input.tagging)?)); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn put_public_access_block(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.put_public_access_block(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn restore_object(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.restore_object(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_restore_request(try_into_aws(input.restore_request)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn select_object_content(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.select_object_content(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_expression(Some(try_into_aws(input.request.expression)?)); +b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?)); +b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?)); +b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?)); +b = b.set_request_progress(try_into_aws(input.request.request_progress)?); +b = b.set_scan_range(try_into_aws(input.request.scan_range)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn upload_part(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.upload_part(); +b = b.set_body(try_into_aws(input.body)?); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); +b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); +b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); +b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); +b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); +b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); +b = b.set_content_length(try_into_aws(input.content_length)?); +b = b.set_content_md5(try_into_aws(input.content_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_part_number(Some(try_into_aws(input.part_number)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn upload_part_copy(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.upload_part_copy(); +b = b.set_bucket(Some(try_into_aws(input.bucket)?)); +b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); +b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); +b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); +b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); +b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); +b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?); +b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); +b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); +b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); +b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); +b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); +b = b.set_key(Some(try_into_aws(input.key)?)); +b = b.set_part_number(Some(try_into_aws(input.part_number)?)); +b = b.set_request_payer(try_into_aws(input.request_payer)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + +#[tracing::instrument(skip(self, req))] +async fn write_get_object_response(&self, req: S3Request) -> S3Result> { +let input = req.input; +debug!(?input); +let mut b = self.0.write_get_object_response(); +b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?); +b = b.set_body(try_into_aws(input.body)?); +b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); +b = b.set_cache_control(try_into_aws(input.cache_control)?); +b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); +b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); +b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); +b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); +b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); +b = b.set_content_disposition(try_into_aws(input.content_disposition)?); +b = b.set_content_encoding(try_into_aws(input.content_encoding)?); +b = b.set_content_language(try_into_aws(input.content_language)?); +b = b.set_content_length(try_into_aws(input.content_length)?); +b = b.set_content_range(try_into_aws(input.content_range)?); +b = b.set_content_type(try_into_aws(input.content_type)?); +b = b.set_delete_marker(try_into_aws(input.delete_marker)?); +b = b.set_e_tag(try_into_aws(input.e_tag)?); +b = b.set_error_code(try_into_aws(input.error_code)?); +b = b.set_error_message(try_into_aws(input.error_message)?); +b = b.set_expiration(try_into_aws(input.expiration)?); +b = b.set_expires(try_into_aws(input.expires)?); +b = b.set_last_modified(try_into_aws(input.last_modified)?); +b = b.set_metadata(try_into_aws(input.metadata)?); +b = b.set_missing_meta(try_into_aws(input.missing_meta)?); +b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); +b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); +b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); +b = b.set_parts_count(try_into_aws(input.parts_count)?); +b = b.set_replication_status(try_into_aws(input.replication_status)?); +b = b.set_request_charged(try_into_aws(input.request_charged)?); +b = b.set_request_route(Some(try_into_aws(input.request_route)?)); +b = b.set_request_token(Some(try_into_aws(input.request_token)?)); +b = b.set_restore(try_into_aws(input.restore)?); +b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); +b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); +b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); +b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); +b = b.set_status_code(try_into_aws(input.status_code)?); +b = b.set_storage_class(try_into_aws(input.storage_class)?); +b = b.set_tag_count(try_into_aws(input.tag_count)?); +b = b.set_version_id(try_into_aws(input.version_id)?); +let result = b.send().await; +match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + }, + Err(e) => Err(wrap_sdk_error!(e)), +} +} + } diff --git a/crates/s3s/src/access/generated.rs b/crates/s3s/src/access/generated.rs index 381b2908..0e9f26d7 100644 --- a/crates/s3s/src/access/generated.rs +++ b/crates/s3s/src/access/generated.rs @@ -10,782 +10,716 @@ use crate::protocol::S3Request; #[async_trait::async_trait] pub trait S3Access: Send + Sync + 'static { - /// Checks whether the current request has accesses to the resources. - /// - /// This method is called before deserializing the operation input. - /// - /// By default, this method rejects all anonymous requests - /// and returns [`AccessDenied`](crate::S3ErrorCode::AccessDenied) error. - /// - /// An access control provider can override this method to implement custom logic. - /// - /// Common fields in the context: - /// + [`cx.credentials()`](S3AccessContext::credentials) - /// + [`cx.s3_path()`](S3AccessContext::s3_path) - /// + [`cx.s3_op().name()`](crate::S3Operation::name) - /// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut) - async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> { - super::default_check(cx) - } - /// Checks whether the AbortMultipartUpload request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn abort_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CompleteMultipartUpload request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn complete_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CopyObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn copy_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CreateBucket request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn create_bucket(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CreateBucketMetadataTableConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn create_bucket_metadata_table_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CreateMultipartUpload request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn create_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CreateSession request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn create_session(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucket request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketAnalyticsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_analytics_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketCors request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketEncryption request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketIntelligentTieringConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_intelligent_tiering_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketInventoryConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_inventory_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketLifecycle request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_lifecycle(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketMetadataTableConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_metadata_table_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketMetricsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_metrics_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketOwnershipControls request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketPolicy request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketReplication request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketWebsite request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteObjectTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteObjects request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_objects(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeletePublicAccessBlock request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketAccelerateConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_accelerate_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketAcl request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketAnalyticsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_analytics_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketCors request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketEncryption request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketIntelligentTieringConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_intelligent_tiering_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketInventoryConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_inventory_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketLifecycleConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_lifecycle_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketLocation request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_location(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketLogging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketMetadataTableConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_metadata_table_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketMetricsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketNotificationConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_notification_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketOwnershipControls request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketPolicy request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketPolicyStatus request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_policy_status(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketReplication request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketRequestPayment request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketVersioning request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketWebsite request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectAcl request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectAttributes request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_attributes(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectLegalHold request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectLockConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectRetention request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectTorrent request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_torrent(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetPublicAccessBlock request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the HeadBucket request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn head_bucket(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the HeadObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn head_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBucketAnalyticsConfigurations request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_bucket_analytics_configurations( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBucketIntelligentTieringConfigurations request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_bucket_intelligent_tiering_configurations( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBucketInventoryConfigurations request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_bucket_inventory_configurations( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBucketMetricsConfigurations request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_bucket_metrics_configurations( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBuckets request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_buckets(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListDirectoryBuckets request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_directory_buckets(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListMultipartUploads request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_multipart_uploads(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListObjectVersions request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_object_versions(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListObjects request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_objects(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListObjectsV2 request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_objects_v2(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListParts request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_parts(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PostObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn post_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketAccelerateConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_accelerate_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketAcl request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketAnalyticsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_analytics_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketCors request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketEncryption request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketIntelligentTieringConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_intelligent_tiering_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketInventoryConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_inventory_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketLifecycleConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_lifecycle_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketLogging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketMetricsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketNotificationConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_notification_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketOwnershipControls request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketPolicy request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketReplication request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketRequestPayment request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketVersioning request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketWebsite request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectAcl request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectLegalHold request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectLockConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectRetention request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutPublicAccessBlock request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the RestoreObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn restore_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the SelectObjectContent request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn select_object_content(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the UploadPart request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn upload_part(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the UploadPartCopy request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn upload_part_copy(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the WriteGetObjectResponse request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn write_get_object_response(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } + +/// Checks whether the current request has accesses to the resources. +/// +/// This method is called before deserializing the operation input. +/// +/// By default, this method rejects all anonymous requests +/// and returns [`AccessDenied`](crate::S3ErrorCode::AccessDenied) error. +/// +/// An access control provider can override this method to implement custom logic. +/// +/// Common fields in the context: +/// + [`cx.credentials()`](S3AccessContext::credentials) +/// + [`cx.s3_path()`](S3AccessContext::s3_path) +/// + [`cx.s3_op().name()`](crate::S3Operation::name) +/// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut) +async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> { + super::default_check(cx) +} +/// Checks whether the AbortMultipartUpload request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn abort_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CompleteMultipartUpload request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn complete_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CopyObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn copy_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CreateBucket request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn create_bucket(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CreateBucketMetadataTableConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn create_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CreateMultipartUpload request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn create_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CreateSession request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn create_session(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucket request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketAnalyticsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketCors request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketEncryption request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketIntelligentTieringConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketInventoryConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) } + +/// Checks whether the DeleteBucketLifecycle request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_lifecycle(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketMetadataTableConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketMetricsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketOwnershipControls request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketPolicy request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketReplication request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketWebsite request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteObjectTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteObjects request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_objects(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeletePublicAccessBlock request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketAccelerateConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_accelerate_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketAcl request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketAnalyticsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketCors request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketEncryption request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketIntelligentTieringConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketInventoryConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketLifecycleConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_lifecycle_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketLocation request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_location(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketLogging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketMetadataTableConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketMetricsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketNotificationConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_notification_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketOwnershipControls request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketPolicy request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketPolicyStatus request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_policy_status(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketReplication request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketRequestPayment request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketVersioning request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketWebsite request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectAcl request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectAttributes request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_attributes(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectLegalHold request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectLockConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectRetention request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectTorrent request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_torrent(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetPublicAccessBlock request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the HeadBucket request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn head_bucket(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the HeadObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn head_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBucketAnalyticsConfigurations request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_bucket_analytics_configurations(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBucketIntelligentTieringConfigurations request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_bucket_intelligent_tiering_configurations(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBucketInventoryConfigurations request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_bucket_inventory_configurations(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBucketMetricsConfigurations request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_bucket_metrics_configurations(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBuckets request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_buckets(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListDirectoryBuckets request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_directory_buckets(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListMultipartUploads request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_multipart_uploads(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListObjectVersions request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_object_versions(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListObjects request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_objects(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListObjectsV2 request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_objects_v2(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListParts request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_parts(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PostObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn post_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketAccelerateConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_accelerate_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketAcl request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketAnalyticsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketCors request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketEncryption request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketIntelligentTieringConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketInventoryConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketLifecycleConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_lifecycle_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketLogging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketMetricsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketNotificationConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_notification_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketOwnershipControls request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketPolicy request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketReplication request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketRequestPayment request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketVersioning request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketWebsite request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectAcl request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectLegalHold request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectLockConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectRetention request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutPublicAccessBlock request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the RestoreObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn restore_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the SelectObjectContent request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn select_object_content(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the UploadPart request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn upload_part(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the UploadPartCopy request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn upload_part_copy(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the WriteGetObjectResponse request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn write_get_object_response(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +} + diff --git a/crates/s3s/src/access/generated_minio.rs b/crates/s3s/src/access/generated_minio.rs index 381b2908..0e9f26d7 100644 --- a/crates/s3s/src/access/generated_minio.rs +++ b/crates/s3s/src/access/generated_minio.rs @@ -10,782 +10,716 @@ use crate::protocol::S3Request; #[async_trait::async_trait] pub trait S3Access: Send + Sync + 'static { - /// Checks whether the current request has accesses to the resources. - /// - /// This method is called before deserializing the operation input. - /// - /// By default, this method rejects all anonymous requests - /// and returns [`AccessDenied`](crate::S3ErrorCode::AccessDenied) error. - /// - /// An access control provider can override this method to implement custom logic. - /// - /// Common fields in the context: - /// + [`cx.credentials()`](S3AccessContext::credentials) - /// + [`cx.s3_path()`](S3AccessContext::s3_path) - /// + [`cx.s3_op().name()`](crate::S3Operation::name) - /// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut) - async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> { - super::default_check(cx) - } - /// Checks whether the AbortMultipartUpload request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn abort_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CompleteMultipartUpload request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn complete_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CopyObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn copy_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CreateBucket request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn create_bucket(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CreateBucketMetadataTableConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn create_bucket_metadata_table_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CreateMultipartUpload request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn create_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the CreateSession request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn create_session(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucket request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketAnalyticsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_analytics_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketCors request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketEncryption request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketIntelligentTieringConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_intelligent_tiering_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketInventoryConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_inventory_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketLifecycle request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_lifecycle(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketMetadataTableConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_metadata_table_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketMetricsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_metrics_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketOwnershipControls request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketPolicy request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketReplication request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteBucketWebsite request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteObjectTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeleteObjects request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_objects(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the DeletePublicAccessBlock request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn delete_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketAccelerateConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_accelerate_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketAcl request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketAnalyticsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_analytics_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketCors request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketEncryption request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketIntelligentTieringConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_intelligent_tiering_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketInventoryConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_inventory_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketLifecycleConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_lifecycle_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketLocation request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_location(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketLogging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketMetadataTableConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_metadata_table_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketMetricsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketNotificationConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_notification_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketOwnershipControls request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketPolicy request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketPolicyStatus request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_policy_status(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketReplication request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketRequestPayment request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketVersioning request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetBucketWebsite request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectAcl request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectAttributes request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_attributes(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectLegalHold request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectLockConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectRetention request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetObjectTorrent request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_object_torrent(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the GetPublicAccessBlock request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn get_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the HeadBucket request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn head_bucket(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the HeadObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn head_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBucketAnalyticsConfigurations request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_bucket_analytics_configurations( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBucketIntelligentTieringConfigurations request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_bucket_intelligent_tiering_configurations( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBucketInventoryConfigurations request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_bucket_inventory_configurations( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBucketMetricsConfigurations request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_bucket_metrics_configurations( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListBuckets request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_buckets(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListDirectoryBuckets request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_directory_buckets(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListMultipartUploads request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_multipart_uploads(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListObjectVersions request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_object_versions(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListObjects request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_objects(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListObjectsV2 request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_objects_v2(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the ListParts request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn list_parts(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PostObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn post_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketAccelerateConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_accelerate_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketAcl request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketAnalyticsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_analytics_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketCors request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketEncryption request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketIntelligentTieringConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_intelligent_tiering_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketInventoryConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_inventory_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketLifecycleConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_lifecycle_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketLogging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketMetricsConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketNotificationConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_notification_configuration( - &self, - _req: &mut S3Request, - ) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketOwnershipControls request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketPolicy request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketReplication request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketRequestPayment request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketVersioning request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutBucketWebsite request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectAcl request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectLegalHold request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectLockConfiguration request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectRetention request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutObjectTagging request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the PutPublicAccessBlock request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn put_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the RestoreObject request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn restore_object(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the SelectObjectContent request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn select_object_content(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the UploadPart request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn upload_part(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the UploadPartCopy request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn upload_part_copy(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } - - /// Checks whether the WriteGetObjectResponse request has accesses to the resources. - /// - /// This method returns `Ok(())` by default. - async fn write_get_object_response(&self, _req: &mut S3Request) -> S3Result<()> { - Ok(()) - } + +/// Checks whether the current request has accesses to the resources. +/// +/// This method is called before deserializing the operation input. +/// +/// By default, this method rejects all anonymous requests +/// and returns [`AccessDenied`](crate::S3ErrorCode::AccessDenied) error. +/// +/// An access control provider can override this method to implement custom logic. +/// +/// Common fields in the context: +/// + [`cx.credentials()`](S3AccessContext::credentials) +/// + [`cx.s3_path()`](S3AccessContext::s3_path) +/// + [`cx.s3_op().name()`](crate::S3Operation::name) +/// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut) +async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> { + super::default_check(cx) +} +/// Checks whether the AbortMultipartUpload request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn abort_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CompleteMultipartUpload request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn complete_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CopyObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn copy_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CreateBucket request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn create_bucket(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CreateBucketMetadataTableConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn create_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CreateMultipartUpload request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn create_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the CreateSession request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn create_session(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucket request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketAnalyticsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketCors request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketEncryption request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketIntelligentTieringConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketInventoryConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) } + +/// Checks whether the DeleteBucketLifecycle request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_lifecycle(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketMetadataTableConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketMetricsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketOwnershipControls request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketPolicy request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketReplication request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteBucketWebsite request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteObjectTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeleteObjects request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_objects(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the DeletePublicAccessBlock request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn delete_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketAccelerateConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_accelerate_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketAcl request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketAnalyticsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketCors request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketEncryption request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketIntelligentTieringConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketInventoryConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketLifecycleConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_lifecycle_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketLocation request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_location(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketLogging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketMetadataTableConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketMetricsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketNotificationConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_notification_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketOwnershipControls request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketPolicy request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketPolicyStatus request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_policy_status(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketReplication request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketRequestPayment request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketVersioning request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetBucketWebsite request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectAcl request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectAttributes request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_attributes(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectLegalHold request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectLockConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectRetention request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetObjectTorrent request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_object_torrent(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the GetPublicAccessBlock request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn get_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the HeadBucket request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn head_bucket(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the HeadObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn head_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBucketAnalyticsConfigurations request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_bucket_analytics_configurations(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBucketIntelligentTieringConfigurations request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_bucket_intelligent_tiering_configurations(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBucketInventoryConfigurations request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_bucket_inventory_configurations(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBucketMetricsConfigurations request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_bucket_metrics_configurations(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListBuckets request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_buckets(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListDirectoryBuckets request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_directory_buckets(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListMultipartUploads request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_multipart_uploads(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListObjectVersions request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_object_versions(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListObjects request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_objects(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListObjectsV2 request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_objects_v2(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the ListParts request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn list_parts(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PostObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn post_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketAccelerateConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_accelerate_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketAcl request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketAnalyticsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketCors request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketEncryption request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketIntelligentTieringConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketInventoryConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketLifecycleConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_lifecycle_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketLogging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketMetricsConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketNotificationConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_notification_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketOwnershipControls request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketPolicy request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketReplication request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketRequestPayment request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketVersioning request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutBucketWebsite request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectAcl request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectLegalHold request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectLockConfiguration request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectRetention request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutObjectTagging request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the PutPublicAccessBlock request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn put_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the RestoreObject request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn restore_object(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the SelectObjectContent request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn select_object_content(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the UploadPart request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn upload_part(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the UploadPartCopy request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn upload_part_copy(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +/// Checks whether the WriteGetObjectResponse request has accesses to the resources. +/// +/// This method returns `Ok(())` by default. +async fn write_get_object_response(&self, _req: &mut S3Request) -> S3Result<()> { +Ok(()) +} + +} + diff --git a/crates/s3s/src/dto/generated.rs b/crates/s3s/src/dto/generated.rs index 3f55ba58..0e56364f 100644 --- a/crates/s3s/src/dto/generated.rs +++ b/crates/s3s/src/dto/generated.rs @@ -13,8 +13,8 @@ use std::fmt; use std::str::FromStr; use futures::future::BoxFuture; -use serde::{Deserialize, Serialize}; use stdx::default::default; +use serde::{Serialize, Deserialize}; pub type AbortDate = Timestamp; @@ -24,83 +24,84 @@ pub type AbortDate = Timestamp; /// the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AbortIncompleteMultipartUpload { - ///

    Specifies the number of days after which Amazon S3 aborts an incomplete multipart - /// upload.

    +///

    Specifies the number of days after which Amazon S3 aborts an incomplete multipart +/// upload.

    pub days_after_initiation: Option, } impl fmt::Debug for AbortIncompleteMultipartUpload { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AbortIncompleteMultipartUpload"); - if let Some(ref val) = self.days_after_initiation { - d.field("days_after_initiation", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AbortIncompleteMultipartUpload"); +if let Some(ref val) = self.days_after_initiation { +d.field("days_after_initiation", val); +} +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct AbortMultipartUploadInput { - ///

    The bucket name to which the upload was taking place.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +///

    The bucket name to which the upload was taking place.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp. - /// If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. - /// If the initiated timestamp matches or if the multipart upload doesn’t exist, the operation returns a 204 Success (No Content) response. - ///

    - /// - ///

    This functionality is only supported for directory buckets.

    - ///
    +///

    If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp. +/// If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. +/// If the initiated timestamp matches or if the multipart upload doesn’t exist, the operation returns a 204 Success (No Content) response. +///

    +/// +///

    This functionality is only supported for directory buckets.

    +///
    pub if_match_initiated_time: Option, - ///

    Key of the object for which the multipart upload was initiated.

    +///

    Key of the object for which the multipart upload was initiated.

    pub key: ObjectKey, pub request_payer: Option, - ///

    Upload ID that identifies the multipart upload.

    +///

    Upload ID that identifies the multipart upload.

    pub upload_id: MultipartUploadId, } impl fmt::Debug for AbortMultipartUploadInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AbortMultipartUploadInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match_initiated_time { - d.field("if_match_initiated_time", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AbortMultipartUploadInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match_initiated_time { +d.field("if_match_initiated_time", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() +} } impl AbortMultipartUploadInput { - #[must_use] - pub fn builder() -> builders::AbortMultipartUploadInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::AbortMultipartUploadInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] @@ -109,14 +110,15 @@ pub struct AbortMultipartUploadOutput { } impl fmt::Debug for AbortMultipartUploadOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AbortMultipartUploadOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AbortMultipartUploadOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() } +} + pub type AbortRuleId = String; @@ -125,59 +127,62 @@ pub type AbortRuleId = String; /// Transfer Acceleration in the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AccelerateConfiguration { - ///

    Specifies the transfer acceleration status of the bucket.

    +///

    Specifies the transfer acceleration status of the bucket.

    pub status: Option, } impl fmt::Debug for AccelerateConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AccelerateConfiguration"); - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AccelerateConfiguration"); +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() } +} + pub type AcceptRanges = String; ///

    Contains the elements that set the ACL permissions for an object per grantee.

    #[derive(Clone, Default, PartialEq)] pub struct AccessControlPolicy { - ///

    A list of grants.

    +///

    A list of grants.

    pub grants: Option, - ///

    Container for the bucket owner's display name and ID.

    +///

    Container for the bucket owner's display name and ID.

    pub owner: Option, } impl fmt::Debug for AccessControlPolicy { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AccessControlPolicy"); - if let Some(ref val) = self.grants { - d.field("grants", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AccessControlPolicy"); +if let Some(ref val) = self.grants { +d.field("grants", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +d.finish_non_exhaustive() +} } + ///

    A container for information about access control for replicas.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AccessControlTranslation { - ///

    Specifies the replica ownership. For default and valid values, see PUT bucket - /// replication in the Amazon S3 API Reference.

    +///

    Specifies the replica ownership. For default and valid values, see PUT bucket +/// replication in the Amazon S3 API Reference.

    pub owner: OwnerOverride, } impl fmt::Debug for AccessControlTranslation { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AccessControlTranslation"); - d.field("owner", &self.owner); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AccessControlTranslation"); +d.field("owner", &self.owner); +d.finish_non_exhaustive() } +} + pub type AccessKeyIdType = String; @@ -210,79 +215,82 @@ pub type AllowedOrigins = List; /// all of the predicates for the filter to apply.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AnalyticsAndOperator { - ///

    The prefix to use when evaluating an AND predicate: The prefix that an object must have - /// to be included in the metrics results.

    +///

    The prefix to use when evaluating an AND predicate: The prefix that an object must have +/// to be included in the metrics results.

    pub prefix: Option, - ///

    The list of tags to use when evaluating an AND predicate.

    +///

    The list of tags to use when evaluating an AND predicate.

    pub tags: Option, } impl fmt::Debug for AnalyticsAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AnalyticsAndOperator"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AnalyticsAndOperator"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} } + ///

    Specifies the configuration and any analyses for the analytics filter of an Amazon S3 /// bucket.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsConfiguration { - ///

    The filter used to describe a set of objects for analyses. A filter must have exactly - /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, - /// all objects will be considered in any analysis.

    +///

    The filter used to describe a set of objects for analyses. A filter must have exactly +/// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, +/// all objects will be considered in any analysis.

    pub filter: Option, - ///

    The ID that identifies the analytics configuration.

    +///

    The ID that identifies the analytics configuration.

    pub id: AnalyticsId, - ///

    Contains data related to access patterns to be collected and made available to analyze - /// the tradeoffs between different storage classes.

    +///

    Contains data related to access patterns to be collected and made available to analyze +/// the tradeoffs between different storage classes.

    pub storage_class_analysis: StorageClassAnalysis, } impl fmt::Debug for AnalyticsConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AnalyticsConfiguration"); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - d.field("id", &self.id); - d.field("storage_class_analysis", &self.storage_class_analysis); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AnalyticsConfiguration"); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +d.field("id", &self.id); +d.field("storage_class_analysis", &self.storage_class_analysis); +d.finish_non_exhaustive() +} } impl Default for AnalyticsConfiguration { - fn default() -> Self { - Self { - filter: None, - id: default(), - storage_class_analysis: default(), - } - } +fn default() -> Self { +Self { +filter: None, +id: default(), +storage_class_analysis: default(), +} +} } + pub type AnalyticsConfigurationList = List; ///

    Where to publish the analytics results.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsExportDestination { - ///

    A destination signifying output to an S3 bucket.

    +///

    A destination signifying output to an S3 bucket.

    pub s3_bucket_destination: AnalyticsS3BucketDestination, } impl fmt::Debug for AnalyticsExportDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AnalyticsExportDestination"); - d.field("s3_bucket_destination", &self.s3_bucket_destination); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AnalyticsExportDestination"); +d.field("s3_bucket_destination", &self.s3_bucket_destination); +d.finish_non_exhaustive() } +} + ///

    The filter used to describe a set of objects for analyses. A filter must have exactly /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, @@ -291,12 +299,12 @@ impl fmt::Debug for AnalyticsExportDestination { #[non_exhaustive] #[serde(rename_all = "PascalCase")] pub enum AnalyticsFilter { - ///

    A conjunction (logical AND) of predicates, which is used in evaluating an analytics - /// filter. The operator must have at least two predicates.

    +///

    A conjunction (logical AND) of predicates, which is used in evaluating an analytics +/// filter. The operator must have at least two predicates.

    And(AnalyticsAndOperator), - ///

    The prefix to use when evaluating an analytics filter.

    +///

    The prefix to use when evaluating an analytics filter.

    Prefix(Prefix), - ///

    The tag to use when evaluating an analytics filter.

    +///

    The tag to use when evaluating an analytics filter.

    Tag(Tag), } @@ -305,108 +313,111 @@ pub type AnalyticsId = String; ///

    Contains information about where to publish the analytics results.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsS3BucketDestination { - ///

    The Amazon Resource Name (ARN) of the bucket to which data is exported.

    +///

    The Amazon Resource Name (ARN) of the bucket to which data is exported.

    pub bucket: BucketName, - ///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the - /// owner is not validated before exporting data.

    - /// - ///

    Although this value is optional, we strongly recommend that you set it to help - /// prevent problems if the destination bucket ownership changes.

    - ///
    +///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the +/// owner is not validated before exporting data.

    +/// +///

    Although this value is optional, we strongly recommend that you set it to help +/// prevent problems if the destination bucket ownership changes.

    +///
    pub bucket_account_id: Option, - ///

    Specifies the file format used when exporting data to Amazon S3.

    +///

    Specifies the file format used when exporting data to Amazon S3.

    pub format: AnalyticsS3ExportFileFormat, - ///

    The prefix to use when exporting data. The prefix is prepended to all results.

    +///

    The prefix to use when exporting data. The prefix is prepended to all results.

    pub prefix: Option, } impl fmt::Debug for AnalyticsS3BucketDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AnalyticsS3BucketDestination"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_account_id { - d.field("bucket_account_id", val); - } - d.field("format", &self.format); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AnalyticsS3BucketDestination"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_account_id { +d.field("bucket_account_id", val); +} +d.field("format", &self.format); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AnalyticsS3ExportFileFormat(Cow<'static, str>); impl AnalyticsS3ExportFileFormat { - pub const CSV: &'static str = "CSV"; +pub const CSV: &'static str = "CSV"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for AnalyticsS3ExportFileFormat { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: AnalyticsS3ExportFileFormat) -> Self { - s.0 - } +fn from(s: AnalyticsS3ExportFileFormat) -> Self { +s.0 +} } impl FromStr for AnalyticsS3ExportFileFormat { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } #[derive(Debug, Clone, PartialEq, Eq)] pub struct ArchiveStatus(Cow<'static, str>); impl ArchiveStatus { - pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; +pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; - pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; +pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for ArchiveStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: ArchiveStatus) -> Self { - s.0 - } +fn from(s: ArchiveStatus) -> Self { +s.0 +} } impl FromStr for ArchiveStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type ArnType = String; @@ -415,57 +426,58 @@ pub type ArnType = String; /// temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

    #[derive(Clone, Default, PartialEq)] pub struct AssumeRoleOutput { - ///

    The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you - /// can use to refer to the resulting temporary security credentials. For example, you can - /// reference these credentials as a principal in a resource-based policy by using the ARN or - /// assumed role ID. The ARN and ID include the RoleSessionName that you specified - /// when you called AssumeRole.

    +///

    The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you +/// can use to refer to the resulting temporary security credentials. For example, you can +/// reference these credentials as a principal in a resource-based policy by using the ARN or +/// assumed role ID. The ARN and ID include the RoleSessionName that you specified +/// when you called AssumeRole.

    pub assumed_role_user: Option, - ///

    The temporary security credentials, which include an access key ID, a secret access key, - /// and a security (or session) token.

    - /// - ///

    The size of the security token that STS API operations return is not fixed. We - /// strongly recommend that you make no assumptions about the maximum size.

    - ///
    +///

    The temporary security credentials, which include an access key ID, a secret access key, +/// and a security (or session) token.

    +/// +///

    The size of the security token that STS API operations return is not fixed. We +/// strongly recommend that you make no assumptions about the maximum size.

    +///
    pub credentials: Option, - ///

    A percentage value that indicates the packed size of the session policies and session - /// tags combined passed in the request. The request fails if the packed size is greater than 100 percent, - /// which means the policies and tags exceeded the allowed space.

    +///

    A percentage value that indicates the packed size of the session policies and session +/// tags combined passed in the request. The request fails if the packed size is greater than 100 percent, +/// which means the policies and tags exceeded the allowed space.

    pub packed_policy_size: Option, - ///

    The source identity specified by the principal that is calling the - /// AssumeRole operation.

    - ///

    You can require users to specify a source identity when they assume a role. You do this - /// by using the sts:SourceIdentity condition key in a role trust policy. You can - /// use source identity information in CloudTrail logs to determine who took actions with a role. - /// You can use the aws:SourceIdentity condition key to further control access to - /// Amazon Web Services resources based on the value of source identity. For more information about using - /// source identity, see Monitor and control - /// actions taken with assumed roles in the - /// IAM User Guide.

    - ///

    The regex used to validate this parameter is a string of characters consisting of upper- - /// and lower-case alphanumeric characters with no spaces. You can also include underscores or - /// any of the following characters: =,.@-

    +///

    The source identity specified by the principal that is calling the +/// AssumeRole operation.

    +///

    You can require users to specify a source identity when they assume a role. You do this +/// by using the sts:SourceIdentity condition key in a role trust policy. You can +/// use source identity information in CloudTrail logs to determine who took actions with a role. +/// You can use the aws:SourceIdentity condition key to further control access to +/// Amazon Web Services resources based on the value of source identity. For more information about using +/// source identity, see Monitor and control +/// actions taken with assumed roles in the +/// IAM User Guide.

    +///

    The regex used to validate this parameter is a string of characters consisting of upper- +/// and lower-case alphanumeric characters with no spaces. You can also include underscores or +/// any of the following characters: =,.@-

    pub source_identity: Option, } impl fmt::Debug for AssumeRoleOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AssumeRoleOutput"); - if let Some(ref val) = self.assumed_role_user { - d.field("assumed_role_user", val); - } - if let Some(ref val) = self.credentials { - d.field("credentials", val); - } - if let Some(ref val) = self.packed_policy_size { - d.field("packed_policy_size", val); - } - if let Some(ref val) = self.source_identity { - d.field("source_identity", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AssumeRoleOutput"); +if let Some(ref val) = self.assumed_role_user { +d.field("assumed_role_user", val); +} +if let Some(ref val) = self.credentials { +d.field("credentials", val); +} +if let Some(ref val) = self.packed_policy_size { +d.field("packed_policy_size", val); } +if let Some(ref val) = self.source_identity { +d.field("source_identity", val); +} +d.finish_non_exhaustive() +} +} + pub type AssumedRoleIdType = String; @@ -473,158 +485,167 @@ pub type AssumedRoleIdType = String; /// returns.

    #[derive(Clone, Default, PartialEq)] pub struct AssumedRoleUser { - ///

    The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in - /// policies, see IAM Identifiers in the - /// IAM User Guide.

    +///

    The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in +/// policies, see IAM Identifiers in the +/// IAM User Guide.

    pub arn: ArnType, - ///

    A unique identifier that contains the role ID and the role session name of the role that - /// is being assumed. The role ID is generated by Amazon Web Services when the role is created.

    +///

    A unique identifier that contains the role ID and the role session name of the role that +/// is being assumed. The role ID is generated by Amazon Web Services when the role is created.

    pub assumed_role_id: AssumedRoleIdType, } impl fmt::Debug for AssumedRoleUser { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("AssumedRoleUser"); - d.field("arn", &self.arn); - d.field("assumed_role_id", &self.assumed_role_id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("AssumedRoleUser"); +d.field("arn", &self.arn); +d.field("assumed_role_id", &self.assumed_role_id); +d.finish_non_exhaustive() +} } + + ///

    In terms of implementation, a Bucket is a resource.

    #[derive(Clone, Default, PartialEq)] pub struct Bucket { - ///

    - /// BucketRegion indicates the Amazon Web Services region where the bucket is located. If the - /// request contains at least one valid parameter, it is included in the response.

    +///

    +/// BucketRegion indicates the Amazon Web Services region where the bucket is located. If the +/// request contains at least one valid parameter, it is included in the response.

    pub bucket_region: Option, - ///

    Date the bucket was created. This date can change when making changes to your bucket, - /// such as editing its bucket policy.

    +///

    Date the bucket was created. This date can change when making changes to your bucket, +/// such as editing its bucket policy.

    pub creation_date: Option, - ///

    The name of the bucket.

    +///

    The name of the bucket.

    pub name: Option, } impl fmt::Debug for Bucket { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Bucket"); - if let Some(ref val) = self.bucket_region { - d.field("bucket_region", val); - } - if let Some(ref val) = self.creation_date { - d.field("creation_date", val); - } - if let Some(ref val) = self.name { - d.field("name", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Bucket"); +if let Some(ref val) = self.bucket_region { +d.field("bucket_region", val); +} +if let Some(ref val) = self.creation_date { +d.field("creation_date", val); +} +if let Some(ref val) = self.name { +d.field("name", val); +} +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketAccelerateStatus(Cow<'static, str>); impl BucketAccelerateStatus { - pub const ENABLED: &'static str = "Enabled"; +pub const ENABLED: &'static str = "Enabled"; - pub const SUSPENDED: &'static str = "Suspended"; +pub const SUSPENDED: &'static str = "Suspended"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketAccelerateStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketAccelerateStatus) -> Self { - s.0 - } +fn from(s: BucketAccelerateStatus) -> Self { +s.0 +} } impl FromStr for BucketAccelerateStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

    The requested bucket name is not available. The bucket namespace is shared by all users /// of the system. Select a different name and try again.

    #[derive(Clone, Default, PartialEq)] -pub struct BucketAlreadyExists {} +pub struct BucketAlreadyExists { +} impl fmt::Debug for BucketAlreadyExists { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketAlreadyExists"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketAlreadyExists"); +d.finish_non_exhaustive() } +} + ///

    The bucket you tried to create already exists, and you own it. Amazon S3 returns this error /// in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you /// re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 /// returns 200 OK and resets the bucket access control lists (ACLs).

    #[derive(Clone, Default, PartialEq)] -pub struct BucketAlreadyOwnedByYou {} +pub struct BucketAlreadyOwnedByYou { +} impl fmt::Debug for BucketAlreadyOwnedByYou { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketAlreadyOwnedByYou"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketAlreadyOwnedByYou"); +d.finish_non_exhaustive() } +} + #[derive(Debug, Clone, PartialEq, Eq)] pub struct BucketCannedACL(Cow<'static, str>); impl BucketCannedACL { - pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; +pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; - pub const PRIVATE: &'static str = "private"; +pub const PRIVATE: &'static str = "private"; - pub const PUBLIC_READ: &'static str = "public-read"; +pub const PUBLIC_READ: &'static str = "public-read"; - pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; +pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketCannedACL { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketCannedACL) -> Self { - s.0 - } +fn from(s: BucketCannedACL) -> Self { +s.0 +} } impl FromStr for BucketCannedACL { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

    Specifies the information about the bucket that will be created. For more information @@ -634,24 +655,25 @@ impl FromStr for BucketCannedACL { /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct BucketInfo { - ///

    The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

    +///

    The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

    pub data_redundancy: Option, - ///

    The type of bucket.

    +///

    The type of bucket.

    pub type_: Option, } impl fmt::Debug for BucketInfo { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketInfo"); - if let Some(ref val) = self.data_redundancy { - d.field("data_redundancy", val); - } - if let Some(ref val) = self.type_ { - d.field("type_", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketInfo"); +if let Some(ref val) = self.data_redundancy { +d.field("data_redundancy", val); +} +if let Some(ref val) = self.type_ { +d.field("type_", val); +} +d.finish_non_exhaustive() } +} + pub type BucketKeyEnabled = bool; @@ -660,116 +682,118 @@ pub type BucketKeyEnabled = bool; /// in the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct BucketLifecycleConfiguration { - ///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    +///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    pub rules: LifecycleRules, } impl fmt::Debug for BucketLifecycleConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketLifecycleConfiguration"); - d.field("rules", &self.rules); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketLifecycleConfiguration"); +d.field("rules", &self.rules); +d.finish_non_exhaustive() } +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketLocationConstraint(Cow<'static, str>); impl BucketLocationConstraint { - pub const EU: &'static str = "EU"; +pub const EU: &'static str = "EU"; - pub const AF_SOUTH_1: &'static str = "af-south-1"; +pub const AF_SOUTH_1: &'static str = "af-south-1"; - pub const AP_EAST_1: &'static str = "ap-east-1"; +pub const AP_EAST_1: &'static str = "ap-east-1"; - pub const AP_NORTHEAST_1: &'static str = "ap-northeast-1"; +pub const AP_NORTHEAST_1: &'static str = "ap-northeast-1"; - pub const AP_NORTHEAST_2: &'static str = "ap-northeast-2"; +pub const AP_NORTHEAST_2: &'static str = "ap-northeast-2"; - pub const AP_NORTHEAST_3: &'static str = "ap-northeast-3"; +pub const AP_NORTHEAST_3: &'static str = "ap-northeast-3"; - pub const AP_SOUTH_1: &'static str = "ap-south-1"; +pub const AP_SOUTH_1: &'static str = "ap-south-1"; - pub const AP_SOUTH_2: &'static str = "ap-south-2"; +pub const AP_SOUTH_2: &'static str = "ap-south-2"; - pub const AP_SOUTHEAST_1: &'static str = "ap-southeast-1"; +pub const AP_SOUTHEAST_1: &'static str = "ap-southeast-1"; - pub const AP_SOUTHEAST_2: &'static str = "ap-southeast-2"; +pub const AP_SOUTHEAST_2: &'static str = "ap-southeast-2"; - pub const AP_SOUTHEAST_3: &'static str = "ap-southeast-3"; +pub const AP_SOUTHEAST_3: &'static str = "ap-southeast-3"; - pub const AP_SOUTHEAST_4: &'static str = "ap-southeast-4"; +pub const AP_SOUTHEAST_4: &'static str = "ap-southeast-4"; - pub const AP_SOUTHEAST_5: &'static str = "ap-southeast-5"; +pub const AP_SOUTHEAST_5: &'static str = "ap-southeast-5"; - pub const CA_CENTRAL_1: &'static str = "ca-central-1"; +pub const CA_CENTRAL_1: &'static str = "ca-central-1"; - pub const CN_NORTH_1: &'static str = "cn-north-1"; +pub const CN_NORTH_1: &'static str = "cn-north-1"; - pub const CN_NORTHWEST_1: &'static str = "cn-northwest-1"; +pub const CN_NORTHWEST_1: &'static str = "cn-northwest-1"; - pub const EU_CENTRAL_1: &'static str = "eu-central-1"; +pub const EU_CENTRAL_1: &'static str = "eu-central-1"; - pub const EU_CENTRAL_2: &'static str = "eu-central-2"; +pub const EU_CENTRAL_2: &'static str = "eu-central-2"; - pub const EU_NORTH_1: &'static str = "eu-north-1"; +pub const EU_NORTH_1: &'static str = "eu-north-1"; - pub const EU_SOUTH_1: &'static str = "eu-south-1"; +pub const EU_SOUTH_1: &'static str = "eu-south-1"; - pub const EU_SOUTH_2: &'static str = "eu-south-2"; +pub const EU_SOUTH_2: &'static str = "eu-south-2"; - pub const EU_WEST_1: &'static str = "eu-west-1"; +pub const EU_WEST_1: &'static str = "eu-west-1"; - pub const EU_WEST_2: &'static str = "eu-west-2"; +pub const EU_WEST_2: &'static str = "eu-west-2"; - pub const EU_WEST_3: &'static str = "eu-west-3"; +pub const EU_WEST_3: &'static str = "eu-west-3"; - pub const IL_CENTRAL_1: &'static str = "il-central-1"; +pub const IL_CENTRAL_1: &'static str = "il-central-1"; - pub const ME_CENTRAL_1: &'static str = "me-central-1"; +pub const ME_CENTRAL_1: &'static str = "me-central-1"; - pub const ME_SOUTH_1: &'static str = "me-south-1"; +pub const ME_SOUTH_1: &'static str = "me-south-1"; - pub const SA_EAST_1: &'static str = "sa-east-1"; +pub const SA_EAST_1: &'static str = "sa-east-1"; - pub const US_EAST_2: &'static str = "us-east-2"; +pub const US_EAST_2: &'static str = "us-east-2"; - pub const US_GOV_EAST_1: &'static str = "us-gov-east-1"; +pub const US_GOV_EAST_1: &'static str = "us-gov-east-1"; - pub const US_GOV_WEST_1: &'static str = "us-gov-west-1"; +pub const US_GOV_WEST_1: &'static str = "us-gov-west-1"; - pub const US_WEST_1: &'static str = "us-west-1"; +pub const US_WEST_1: &'static str = "us-west-1"; - pub const US_WEST_2: &'static str = "us-west-2"; +pub const US_WEST_2: &'static str = "us-west-2"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketLocationConstraint { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketLocationConstraint) -> Self { - s.0 - } +fn from(s: BucketLocationConstraint) -> Self { +s.0 +} } impl FromStr for BucketLocationConstraint { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type BucketLocationName = String; @@ -781,53 +805,55 @@ pub struct BucketLoggingStatus { } impl fmt::Debug for BucketLoggingStatus { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("BucketLoggingStatus"); - if let Some(ref val) = self.logging_enabled { - d.field("logging_enabled", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("BucketLoggingStatus"); +if let Some(ref val) = self.logging_enabled { +d.field("logging_enabled", val); +} +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq)] pub struct BucketLogsPermission(Cow<'static, str>); impl BucketLogsPermission { - pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; +pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; - pub const READ: &'static str = "READ"; +pub const READ: &'static str = "READ"; - pub const WRITE: &'static str = "WRITE"; +pub const WRITE: &'static str = "WRITE"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketLogsPermission { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketLogsPermission) -> Self { - s.0 - } +fn from(s: BucketLogsPermission) -> Self { +s.0 +} } impl FromStr for BucketLogsPermission { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type BucketName = String; @@ -838,74 +864,76 @@ pub type BucketRegion = String; pub struct BucketType(Cow<'static, str>); impl BucketType { - pub const DIRECTORY: &'static str = "Directory"; +pub const DIRECTORY: &'static str = "Directory"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketType) -> Self { - s.0 - } +fn from(s: BucketType) -> Self { +s.0 +} } impl FromStr for BucketType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketVersioningStatus(Cow<'static, str>); impl BucketVersioningStatus { - pub const ENABLED: &'static str = "Enabled"; +pub const ENABLED: &'static str = "Enabled"; - pub const SUSPENDED: &'static str = "Suspended"; +pub const SUSPENDED: &'static str = "Suspended"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for BucketVersioningStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: BucketVersioningStatus) -> Self { - s.0 - } +fn from(s: BucketVersioningStatus) -> Self { +s.0 +} } impl FromStr for BucketVersioningStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type Buckets = List; @@ -924,62 +952,64 @@ pub type BytesScanned = i64; /// Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CORSConfiguration { - ///

    A set of origins and methods (cross-origin access that you want to allow). You can add - /// up to 100 rules to the configuration.

    +///

    A set of origins and methods (cross-origin access that you want to allow). You can add +/// up to 100 rules to the configuration.

    pub cors_rules: CORSRules, } impl fmt::Debug for CORSConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CORSConfiguration"); - d.field("cors_rules", &self.cors_rules); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CORSConfiguration"); +d.field("cors_rules", &self.cors_rules); +d.finish_non_exhaustive() +} } + ///

    Specifies a cross-origin access rule for an Amazon S3 bucket.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CORSRule { - ///

    Headers that are specified in the Access-Control-Request-Headers header. - /// These headers are allowed in a preflight OPTIONS request. In response to any preflight - /// OPTIONS request, Amazon S3 returns any requested headers that are allowed.

    +///

    Headers that are specified in the Access-Control-Request-Headers header. +/// These headers are allowed in a preflight OPTIONS request. In response to any preflight +/// OPTIONS request, Amazon S3 returns any requested headers that are allowed.

    pub allowed_headers: Option, - ///

    An HTTP method that you allow the origin to execute. Valid values are GET, - /// PUT, HEAD, POST, and DELETE.

    +///

    An HTTP method that you allow the origin to execute. Valid values are GET, +/// PUT, HEAD, POST, and DELETE.

    pub allowed_methods: AllowedMethods, - ///

    One or more origins you want customers to be able to access the bucket from.

    +///

    One or more origins you want customers to be able to access the bucket from.

    pub allowed_origins: AllowedOrigins, - ///

    One or more headers in the response that you want customers to be able to access from - /// their applications (for example, from a JavaScript XMLHttpRequest - /// object).

    +///

    One or more headers in the response that you want customers to be able to access from +/// their applications (for example, from a JavaScript XMLHttpRequest +/// object).

    pub expose_headers: Option, - ///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    +///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    pub id: Option, - ///

    The time in seconds that your browser is to cache the preflight response for the - /// specified resource.

    +///

    The time in seconds that your browser is to cache the preflight response for the +/// specified resource.

    pub max_age_seconds: Option, } impl fmt::Debug for CORSRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CORSRule"); - if let Some(ref val) = self.allowed_headers { - d.field("allowed_headers", val); - } - d.field("allowed_methods", &self.allowed_methods); - d.field("allowed_origins", &self.allowed_origins); - if let Some(ref val) = self.expose_headers { - d.field("expose_headers", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - if let Some(ref val) = self.max_age_seconds { - d.field("max_age_seconds", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CORSRule"); +if let Some(ref val) = self.allowed_headers { +d.field("allowed_headers", val); +} +d.field("allowed_methods", &self.allowed_methods); +d.field("allowed_origins", &self.allowed_origins); +if let Some(ref val) = self.expose_headers { +d.field("expose_headers", val); +} +if let Some(ref val) = self.id { +d.field("id", val); } +if let Some(ref val) = self.max_age_seconds { +d.field("max_age_seconds", val); +} +d.finish_non_exhaustive() +} +} + pub type CORSRules = List; @@ -987,238 +1017,242 @@ pub type CORSRules = List; /// formatted.

    #[derive(Clone, Default, PartialEq)] pub struct CSVInput { - ///

    Specifies that CSV field values may contain quoted record delimiters and such records - /// should be allowed. Default value is FALSE. Setting this value to TRUE may lower - /// performance.

    +///

    Specifies that CSV field values may contain quoted record delimiters and such records +/// should be allowed. Default value is FALSE. Setting this value to TRUE may lower +/// performance.

    pub allow_quoted_record_delimiter: Option, - ///

    A single character used to indicate that a row should be ignored when the character is - /// present at the start of that row. You can specify any character to indicate a comment line. - /// The default character is #.

    - ///

    Default: # - ///

    +///

    A single character used to indicate that a row should be ignored when the character is +/// present at the start of that row. You can specify any character to indicate a comment line. +/// The default character is #.

    +///

    Default: # +///

    pub comments: Option, - ///

    A single character used to separate individual fields in a record. You can specify an - /// arbitrary delimiter.

    +///

    A single character used to separate individual fields in a record. You can specify an +/// arbitrary delimiter.

    pub field_delimiter: Option, - ///

    Describes the first line of input. Valid values are:

    - ///
      - ///
    • - ///

      - /// NONE: First line is not a header.

      - ///
    • - ///
    • - ///

      - /// IGNORE: First line is a header, but you can't use the header values - /// to indicate the column in an expression. You can use column position (such as _1, _2, - /// …) to indicate the column (SELECT s._1 FROM OBJECT s).

      - ///
    • - ///
    • - ///

      - /// Use: First line is a header, and you can use the header value to - /// identify a column in an expression (SELECT "name" FROM OBJECT).

      - ///
    • - ///
    +///

    Describes the first line of input. Valid values are:

    +///
      +///
    • +///

      +/// NONE: First line is not a header.

      +///
    • +///
    • +///

      +/// IGNORE: First line is a header, but you can't use the header values +/// to indicate the column in an expression. You can use column position (such as _1, _2, +/// …) to indicate the column (SELECT s._1 FROM OBJECT s).

      +///
    • +///
    • +///

      +/// Use: First line is a header, and you can use the header value to +/// identify a column in an expression (SELECT "name" FROM OBJECT).

      +///
    • +///
    pub file_header_info: Option, - ///

    A single character used for escaping when the field delimiter is part of the value. For - /// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, - /// as follows: " a , b ".

    - ///

    Type: String

    - ///

    Default: " - ///

    - ///

    Ancestors: CSV - ///

    +///

    A single character used for escaping when the field delimiter is part of the value. For +/// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, +/// as follows: " a , b ".

    +///

    Type: String

    +///

    Default: " +///

    +///

    Ancestors: CSV +///

    pub quote_character: Option, - ///

    A single character used for escaping the quotation mark character inside an already - /// escaped value. For example, the value """ a , b """ is parsed as " a , b - /// ".

    +///

    A single character used for escaping the quotation mark character inside an already +/// escaped value. For example, the value """ a , b """ is parsed as " a , b +/// ".

    pub quote_escape_character: Option, - ///

    A single character used to separate individual records in the input. Instead of the - /// default value, you can specify an arbitrary delimiter.

    +///

    A single character used to separate individual records in the input. Instead of the +/// default value, you can specify an arbitrary delimiter.

    pub record_delimiter: Option, } impl fmt::Debug for CSVInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CSVInput"); - if let Some(ref val) = self.allow_quoted_record_delimiter { - d.field("allow_quoted_record_delimiter", val); - } - if let Some(ref val) = self.comments { - d.field("comments", val); - } - if let Some(ref val) = self.field_delimiter { - d.field("field_delimiter", val); - } - if let Some(ref val) = self.file_header_info { - d.field("file_header_info", val); - } - if let Some(ref val) = self.quote_character { - d.field("quote_character", val); - } - if let Some(ref val) = self.quote_escape_character { - d.field("quote_escape_character", val); - } - if let Some(ref val) = self.record_delimiter { - d.field("record_delimiter", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CSVInput"); +if let Some(ref val) = self.allow_quoted_record_delimiter { +d.field("allow_quoted_record_delimiter", val); +} +if let Some(ref val) = self.comments { +d.field("comments", val); } +if let Some(ref val) = self.field_delimiter { +d.field("field_delimiter", val); +} +if let Some(ref val) = self.file_header_info { +d.field("file_header_info", val); +} +if let Some(ref val) = self.quote_character { +d.field("quote_character", val); +} +if let Some(ref val) = self.quote_escape_character { +d.field("quote_escape_character", val); +} +if let Some(ref val) = self.record_delimiter { +d.field("record_delimiter", val); +} +d.finish_non_exhaustive() +} +} + ///

    Describes how uncompressed comma-separated values (CSV)-formatted results are /// formatted.

    #[derive(Clone, Default, PartialEq)] pub struct CSVOutput { - ///

    The value used to separate individual fields in a record. You can specify an arbitrary - /// delimiter.

    +///

    The value used to separate individual fields in a record. You can specify an arbitrary +/// delimiter.

    pub field_delimiter: Option, - ///

    A single character used for escaping when the field delimiter is part of the value. For - /// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, - /// as follows: " a , b ".

    +///

    A single character used for escaping when the field delimiter is part of the value. For +/// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, +/// as follows: " a , b ".

    pub quote_character: Option, - ///

    The single character used for escaping the quote character inside an already escaped - /// value.

    +///

    The single character used for escaping the quote character inside an already escaped +/// value.

    pub quote_escape_character: Option, - ///

    Indicates whether to use quotation marks around output fields.

    - ///
      - ///
    • - ///

      - /// ALWAYS: Always use quotation marks for output fields.

      - ///
    • - ///
    • - ///

      - /// ASNEEDED: Use quotation marks for output fields when needed.

      - ///
    • - ///
    +///

    Indicates whether to use quotation marks around output fields.

    +///
      +///
    • +///

      +/// ALWAYS: Always use quotation marks for output fields.

      +///
    • +///
    • +///

      +/// ASNEEDED: Use quotation marks for output fields when needed.

      +///
    • +///
    pub quote_fields: Option, - ///

    A single character used to separate individual records in the output. Instead of the - /// default value, you can specify an arbitrary delimiter.

    +///

    A single character used to separate individual records in the output. Instead of the +/// default value, you can specify an arbitrary delimiter.

    pub record_delimiter: Option, } impl fmt::Debug for CSVOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CSVOutput"); - if let Some(ref val) = self.field_delimiter { - d.field("field_delimiter", val); - } - if let Some(ref val) = self.quote_character { - d.field("quote_character", val); - } - if let Some(ref val) = self.quote_escape_character { - d.field("quote_escape_character", val); - } - if let Some(ref val) = self.quote_fields { - d.field("quote_fields", val); - } - if let Some(ref val) = self.record_delimiter { - d.field("record_delimiter", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CSVOutput"); +if let Some(ref val) = self.field_delimiter { +d.field("field_delimiter", val); +} +if let Some(ref val) = self.quote_character { +d.field("quote_character", val); +} +if let Some(ref val) = self.quote_escape_character { +d.field("quote_escape_character", val); +} +if let Some(ref val) = self.quote_fields { +d.field("quote_fields", val); } +if let Some(ref val) = self.record_delimiter { +d.field("record_delimiter", val); +} +d.finish_non_exhaustive() +} +} + pub type CacheControl = String; ///

    Contains all the possible checksum or digest values for an object.

    #[derive(Clone, Default, PartialEq)] pub struct Checksum { - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present - /// if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a - /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present +/// if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a +/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, - ///

    The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, } impl fmt::Debug for Checksum { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Checksum"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Checksum"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq)] pub struct ChecksumAlgorithm(Cow<'static, str>); impl ChecksumAlgorithm { - pub const CRC32: &'static str = "CRC32"; +pub const CRC32: &'static str = "CRC32"; - pub const CRC32C: &'static str = "CRC32C"; +pub const CRC32C: &'static str = "CRC32C"; - pub const CRC64NVME: &'static str = "CRC64NVME"; +pub const CRC64NVME: &'static str = "CRC64NVME"; - pub const SHA1: &'static str = "SHA1"; +pub const SHA1: &'static str = "SHA1"; - pub const SHA256: &'static str = "SHA256"; +pub const SHA256: &'static str = "SHA256"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for ChecksumAlgorithm { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: ChecksumAlgorithm) -> Self { - s.0 - } +fn from(s: ChecksumAlgorithm) -> Self { +s.0 +} } impl FromStr for ChecksumAlgorithm { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type ChecksumAlgorithmList = List; @@ -1233,36 +1267,37 @@ pub type ChecksumCRC64NVME = String; pub struct ChecksumMode(Cow<'static, str>); impl ChecksumMode { - pub const ENABLED: &'static str = "ENABLED"; +pub const ENABLED: &'static str = "ENABLED"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for ChecksumMode { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: ChecksumMode) -> Self { - s.0 - } +fn from(s: ChecksumMode) -> Self { +s.0 +} } impl FromStr for ChecksumMode { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type ChecksumSHA1 = String; @@ -1273,38 +1308,39 @@ pub type ChecksumSHA256 = String; pub struct ChecksumType(Cow<'static, str>); impl ChecksumType { - pub const COMPOSITE: &'static str = "COMPOSITE"; +pub const COMPOSITE: &'static str = "COMPOSITE"; - pub const FULL_OBJECT: &'static str = "FULL_OBJECT"; +pub const FULL_OBJECT: &'static str = "FULL_OBJECT"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for ChecksumType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: ChecksumType) -> Self { - s.0 - } +fn from(s: ChecksumType) -> Self { +s.0 +} } impl FromStr for ChecksumType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type Code = String; @@ -1317,424 +1353,428 @@ pub type Comments = String; /// is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

    #[derive(Clone, Default, PartialEq)] pub struct CommonPrefix { - ///

    Container for the specified common prefix.

    +///

    Container for the specified common prefix.

    pub prefix: Option, } impl fmt::Debug for CommonPrefix { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CommonPrefix"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CommonPrefix"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() } +} + pub type CommonPrefixList = List; #[derive(Clone, Default, PartialEq)] pub struct CompleteMultipartUploadInput { - ///

    Name of the bucket to which the multipart upload was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +///

    Name of the bucket to which the multipart upload was initiated.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the object. The CRC64NVME checksum is - /// always a full object checksum. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the object. The CRC64NVME checksum is +/// always a full object checksum. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    pub checksum_sha256: Option, - ///

    This header specifies the checksum type of the object, which determines how part-level - /// checksums are combined to create an object-level checksum for multipart objects. You can - /// use this header as a data integrity check to verify that the checksum type that is received - /// is the same checksum that was specified. If the checksum type doesn’t match the checksum - /// type that was specified for the object during the CreateMultipartUpload - /// request, it’ll result in a BadDigest error. For more information, see Checking - /// object integrity in the Amazon S3 User Guide.

    +///

    This header specifies the checksum type of the object, which determines how part-level +/// checksums are combined to create an object-level checksum for multipart objects. You can +/// use this header as a data integrity check to verify that the checksum type that is received +/// is the same checksum that was specified. If the checksum type doesn’t match the checksum +/// type that was specified for the object during the CreateMultipartUpload +/// request, it’ll result in a BadDigest error. For more information, see Checking +/// object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE - /// operation matches the ETag of the object in S3. If the ETag values do not match, the - /// operation returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 - /// ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the - /// multipart upload with CreateMultipartUpload, and re-upload each part.

    - ///

    Expects the ETag value as a string.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    +///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE +/// operation matches the ETag of the object in S3. If the ETag values do not match, the +/// operation returns a 412 Precondition Failed error.

    +///

    If a conflicting operation occurs during the upload S3 returns a 409 +/// ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the +/// multipart upload with CreateMultipartUpload, and re-upload each part.

    +///

    Expects the ETag value as a string.

    +///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    pub if_match: Option, - ///

    Uploads the object only if the object key name does not already exist in the bucket - /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 - /// ConditionalRequestConflict response. On a 409 failure you should re-initiate the - /// multipart upload with CreateMultipartUpload and re-upload each part.

    - ///

    Expects the '*' (asterisk) character.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    +///

    Uploads the object only if the object key name does not already exist in the bucket +/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    +///

    If a conflicting operation occurs during the upload S3 returns a 409 +/// ConditionalRequestConflict response. On a 409 failure you should re-initiate the +/// multipart upload with CreateMultipartUpload and re-upload each part.

    +///

    Expects the '*' (asterisk) character.

    +///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    pub if_none_match: Option, - ///

    Object key for which the multipart upload was initiated.

    +///

    Object key for which the multipart upload was initiated.

    pub key: ObjectKey, - ///

    The expected total object size of the multipart upload request. If there’s a mismatch - /// between the specified object size value and the actual object size value, it results in an - /// HTTP 400 InvalidRequest error.

    +///

    The expected total object size of the multipart upload request. If there’s a mismatch +/// between the specified object size value and the actual object size value, it results in an +/// HTTP 400 InvalidRequest error.

    pub mpu_object_size: Option, - ///

    The container for the multipart upload request information.

    +///

    The container for the multipart upload request information.

    pub multipart_upload: Option, pub request_payer: Option, - ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is - /// required only when the object was created using a checksum algorithm or if your bucket - /// policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User - /// Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is +/// required only when the object was created using a checksum algorithm or if your bucket +/// policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User +/// Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_algorithm: Option, - ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. - /// For more information, see - /// Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. +/// For more information, see +/// Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_key: Option, - ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum - /// algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum +/// algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_key_md5: Option, - ///

    ID for the initiated multipart upload.

    +///

    ID for the initiated multipart upload.

    pub upload_id: MultipartUploadId, } impl fmt::Debug for CompleteMultipartUploadInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CompleteMultipartUploadInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.mpu_object_size { - d.field("mpu_object_size", val); - } - if let Some(ref val) = self.multipart_upload { - d.field("multipart_upload", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CompleteMultipartUploadInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.mpu_object_size { +d.field("mpu_object_size", val); +} +if let Some(ref val) = self.multipart_upload { +d.field("multipart_upload", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() +} } impl CompleteMultipartUploadInput { - #[must_use] - pub fn builder() -> builders::CompleteMultipartUploadInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CompleteMultipartUploadInputBuilder { +default() +} } #[derive(Default)] pub struct CompleteMultipartUploadOutput { - ///

    The name of the bucket that contains the newly created object. Does not return the access point - /// ARN or access point alias if used.

    - /// - ///

    Access points are not supported by directory buckets.

    - ///
    +///

    The name of the bucket that contains the newly created object. Does not return the access point +/// ARN or access point alias if used.

    +/// +///

    Access points are not supported by directory buckets.

    +///
    pub bucket: Option, - ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    +///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    pub bucket_key_enabled: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the object. The CRC64NVME checksum is - /// always a full object checksum. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the object. The CRC64NVME checksum is +/// always a full object checksum. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, - ///

    The checksum type, which determines how part-level checksums are combined to create an - /// object-level checksum for multipart objects. You can use this header as a data integrity - /// check to verify that the checksum type that is received is the same checksum type that was - /// specified during the CreateMultipartUpload request. For more information, see - /// Checking object integrity - /// in the Amazon S3 User Guide.

    +///

    The checksum type, which determines how part-level checksums are combined to create an +/// object-level checksum for multipart objects. You can use this header as a data integrity +/// check to verify that the checksum type that is received is the same checksum type that was +/// specified during the CreateMultipartUpload request. For more information, see +/// Checking object integrity +/// in the Amazon S3 User Guide.

    pub checksum_type: Option, - ///

    Entity tag that identifies the newly created object's data. Objects with different - /// object data will have different entity tags. The entity tag is an opaque string. The entity - /// tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 - /// digest of the object data, it will contain one or more nonhexadecimal characters and/or - /// will consist of less than 32 or more than 32 hexadecimal digits. For more information about - /// how the entity tag is calculated, see Checking object - /// integrity in the Amazon S3 User Guide.

    +///

    Entity tag that identifies the newly created object's data. Objects with different +/// object data will have different entity tags. The entity tag is an opaque string. The entity +/// tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 +/// digest of the object data, it will contain one or more nonhexadecimal characters and/or +/// will consist of less than 32 or more than 32 hexadecimal digits. For more information about +/// how the entity tag is calculated, see Checking object +/// integrity in the Amazon S3 User Guide.

    pub e_tag: Option, - ///

    If the object expiration is configured, this will contain the expiration date - /// (expiry-date) and rule ID (rule-id). The value of - /// rule-id is URL-encoded.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    If the object expiration is configured, this will contain the expiration date +/// (expiry-date) and rule ID (rule-id). The value of +/// rule-id is URL-encoded.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub expiration: Option, - ///

    The object key of the newly created object.

    +///

    The object key of the newly created object.

    pub key: Option, - ///

    The URI that identifies the newly created object.

    +///

    The URI that identifies the newly created object.

    pub location: Option, pub request_charged: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when storing this object in Amazon S3 (for example, - /// AES256, aws:kms).

    +///

    The server-side encryption algorithm used when storing this object in Amazon S3 (for example, +/// AES256, aws:kms).

    pub server_side_encryption: Option, - ///

    Version ID of the newly created object, in case the bucket has versioning turned - /// on.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Version ID of the newly created object, in case the bucket has versioning turned +/// on.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub version_id: Option, - /// A future that resolves to the upload output or an error. This field is used to implement AWS-like keep-alive behavior. +/// A future that resolves to the upload output or an error. This field is used to implement AWS-like keep-alive behavior. pub future: Option>>, } impl fmt::Debug for CompleteMultipartUploadOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CompleteMultipartUploadOutput"); - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.location { - d.field("location", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if self.future.is_some() { - d.field("future", &">>"); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CompleteMultipartUploadOutput"); +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.location { +d.field("location", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +if self.future.is_some() { +d.field("future", &">>"); +} +d.finish_non_exhaustive() } +} + ///

    The container for the completed multipart upload details.

    #[derive(Clone, Default, PartialEq)] pub struct CompletedMultipartUpload { - ///

    Array of CompletedPart data types.

    - ///

    If you do not supply a valid Part with your request, the service sends back - /// an HTTP 400 response.

    +///

    Array of CompletedPart data types.

    +///

    If you do not supply a valid Part with your request, the service sends back +/// an HTTP 400 response.

    pub parts: Option, } impl fmt::Debug for CompletedMultipartUpload { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CompletedMultipartUpload"); - if let Some(ref val) = self.parts { - d.field("parts", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CompletedMultipartUpload"); +if let Some(ref val) = self.parts { +d.field("parts", val); +} +d.finish_non_exhaustive() } +} + ///

    Details of the parts that were uploaded.

    #[derive(Clone, Default, PartialEq)] pub struct CompletedPart { - ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present - /// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present +/// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present - /// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present +/// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, - ///

    Entity tag returned when the part was uploaded.

    +///

    Entity tag returned when the part was uploaded.

    pub e_tag: Option, - ///

    Part number that identifies the part. This is a positive integer between 1 and - /// 10,000.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - In - /// CompleteMultipartUpload, when a additional checksum (including - /// x-amz-checksum-crc32, x-amz-checksum-crc32c, - /// x-amz-checksum-sha1, or x-amz-checksum-sha256) is - /// applied to each part, the PartNumber must start at 1 and the part - /// numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad - /// Request status code and an InvalidPartOrder error - /// code.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - In - /// CompleteMultipartUpload, the PartNumber must start at - /// 1 and the part numbers must be consecutive.

      - ///
    • - ///
    - ///
    +///

    Part number that identifies the part. This is a positive integer between 1 and +/// 10,000.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - In +/// CompleteMultipartUpload, when a additional checksum (including +/// x-amz-checksum-crc32, x-amz-checksum-crc32c, +/// x-amz-checksum-sha1, or x-amz-checksum-sha256) is +/// applied to each part, the PartNumber must start at 1 and the part +/// numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad +/// Request status code and an InvalidPartOrder error +/// code.

      +///
    • +///
    • +///

      +/// Directory buckets - In +/// CompleteMultipartUpload, the PartNumber must start at +/// 1 and the part numbers must be consecutive.

      +///
    • +///
    +///
    pub part_number: Option, } impl fmt::Debug for CompletedPart { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CompletedPart"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CompletedPart"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +d.finish_non_exhaustive() } +} + pub type CompletedPartList = List; @@ -1742,40 +1782,41 @@ pub type CompletedPartList = List; pub struct CompressionType(Cow<'static, str>); impl CompressionType { - pub const BZIP2: &'static str = "BZIP2"; +pub const BZIP2: &'static str = "BZIP2"; - pub const GZIP: &'static str = "GZIP"; +pub const GZIP: &'static str = "GZIP"; - pub const NONE: &'static str = "NONE"; +pub const NONE: &'static str = "NONE"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for CompressionType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: CompressionType) -> Self { - s.0 - } +fn from(s: CompressionType) -> Self { +s.0 +} } impl FromStr for CompressionType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

    A container for describing a condition that must be met for the specified redirect to @@ -1784,40 +1825,41 @@ impl FromStr for CompressionType { /// request to another host where you might process the error.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct Condition { - ///

    The HTTP error code when the redirect is applied. In the event of an error, if the error - /// code equals this value, then the specified redirect is applied. Required when parent - /// element Condition is specified and sibling KeyPrefixEquals is not - /// specified. If both are specified, then both must be true for the redirect to be - /// applied.

    +///

    The HTTP error code when the redirect is applied. In the event of an error, if the error +/// code equals this value, then the specified redirect is applied. Required when parent +/// element Condition is specified and sibling KeyPrefixEquals is not +/// specified. If both are specified, then both must be true for the redirect to be +/// applied.

    pub http_error_code_returned_equals: Option, - ///

    The object key name prefix when the redirect is applied. For example, to redirect - /// requests for ExamplePage.html, the key prefix will be - /// ExamplePage.html. To redirect request for all pages with the prefix - /// docs/, the key prefix will be /docs, which identifies all - /// objects in the docs/ folder. Required when the parent element - /// Condition is specified and sibling HttpErrorCodeReturnedEquals - /// is not specified. If both conditions are specified, both must be true for the redirect to - /// be applied.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    +///

    The object key name prefix when the redirect is applied. For example, to redirect +/// requests for ExamplePage.html, the key prefix will be +/// ExamplePage.html. To redirect request for all pages with the prefix +/// docs/, the key prefix will be /docs, which identifies all +/// objects in the docs/ folder. Required when the parent element +/// Condition is specified and sibling HttpErrorCodeReturnedEquals +/// is not specified. If both conditions are specified, both must be true for the redirect to +/// be applied.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    pub key_prefix_equals: Option, } impl fmt::Debug for Condition { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Condition"); - if let Some(ref val) = self.http_error_code_returned_equals { - d.field("http_error_code_returned_equals", val); - } - if let Some(ref val) = self.key_prefix_equals { - d.field("key_prefix_equals", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Condition"); +if let Some(ref val) = self.http_error_code_returned_equals { +d.field("http_error_code_returned_equals", val); } +if let Some(ref val) = self.key_prefix_equals { +d.field("key_prefix_equals", val); +} +d.finish_non_exhaustive() +} +} + pub type ConfirmRemoveSelfBucketAccess = bool; @@ -1833,943 +1875,950 @@ pub type ContentMD5 = String; pub type ContentRange = String; + ///

    #[derive(Clone, Default, PartialEq)] -pub struct ContinuationEvent {} +pub struct ContinuationEvent { +} impl fmt::Debug for ContinuationEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ContinuationEvent"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ContinuationEvent"); +d.finish_non_exhaustive() +} } + #[derive(Clone, PartialEq)] pub struct CopyObjectInput { - ///

    The canned access control list (ACL) to apply to the object.

    - ///

    When you copy an object, the ACL metadata is not preserved and is set to - /// private by default. Only the owner has full access control. To override the - /// default ACL setting, specify a new ACL when you generate a copy request. For more - /// information, see Using ACLs.

    - ///

    If the destination bucket that you're copying objects to uses the bucket owner enforced - /// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. - /// Buckets that use this setting only accept PUT requests that don't specify an - /// ACL or PUT requests that specify bucket owner full control ACLs, such as the - /// bucket-owner-full-control canned ACL or an equivalent form of this ACL - /// expressed in the XML format. For more information, see Controlling ownership of - /// objects and disabling ACLs in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      If your destination bucket uses the bucket owner enforced setting for Object - /// Ownership, all objects written to the bucket by any account will be owned by the - /// bucket owner.

      - ///
    • - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    +///

    The canned access control list (ACL) to apply to the object.

    +///

    When you copy an object, the ACL metadata is not preserved and is set to +/// private by default. Only the owner has full access control. To override the +/// default ACL setting, specify a new ACL when you generate a copy request. For more +/// information, see Using ACLs.

    +///

    If the destination bucket that you're copying objects to uses the bucket owner enforced +/// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. +/// Buckets that use this setting only accept PUT requests that don't specify an +/// ACL or PUT requests that specify bucket owner full control ACLs, such as the +/// bucket-owner-full-control canned ACL or an equivalent form of this ACL +/// expressed in the XML format. For more information, see Controlling ownership of +/// objects and disabling ACLs in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      If your destination bucket uses the bucket owner enforced setting for Object +/// Ownership, all objects written to the bucket by any account will be owned by the +/// bucket owner.

      +///
    • +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    pub acl: Option, - ///

    The name of the destination bucket.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - /// - ///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, - /// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    - ///
    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. - /// - /// You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. - /// For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. - /// When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format - /// - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs. - ///

    +///

    The name of the destination bucket.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +/// +///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, +/// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    +///
    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. +/// +/// You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. +/// For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. +/// When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format +/// +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs. +///

    pub bucket: BucketName, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses - /// SSE-KMS, you can enable an S3 Bucket Key for the object.

    - ///

    Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object - /// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect - /// bucket-level settings for S3 Bucket Key.

    - ///

    For more information, see Amazon S3 Bucket Keys in the - /// Amazon S3 User Guide.

    - /// - ///

    - /// Directory buckets - - /// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - ///
    +///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses +/// SSE-KMS, you can enable an S3 Bucket Key for the object.

    +///

    Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object +/// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect +/// bucket-level settings for S3 Bucket Key.

    +///

    For more information, see Amazon S3 Bucket Keys in the +/// Amazon S3 User Guide.

    +/// +///

    +/// Directory buckets - +/// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    +///
    pub bucket_key_enabled: Option, - ///

    Specifies the caching behavior along the request/reply chain.

    +///

    Specifies the caching behavior along the request/reply chain.

    pub cache_control: Option, - ///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see - /// Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    When you copy an object, if the source object has a checksum, that checksum value will - /// be copied to the new object by default. If the CopyObject request does not - /// include this x-amz-checksum-algorithm header, the checksum algorithm will be - /// copied from the source object to the destination object (if it's present on the source - /// object). You can optionally specify a different checksum algorithm to use with the - /// x-amz-checksum-algorithm header. Unrecognized or unsupported values will - /// respond with the HTTP status code 400 Bad Request.

    - /// - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - ///
    +///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see +/// Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    When you copy an object, if the source object has a checksum, that checksum value will +/// be copied to the new object by default. If the CopyObject request does not +/// include this x-amz-checksum-algorithm header, the checksum algorithm will be +/// copied from the source object to the destination object (if it's present on the source +/// object). You can optionally specify a different checksum algorithm to use with the +/// x-amz-checksum-algorithm header. Unrecognized or unsupported values will +/// respond with the HTTP status code 400 Bad Request.

    +/// +///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    +///
    pub checksum_algorithm: Option, - ///

    Specifies presentational information for the object. Indicates whether an object should - /// be displayed in a web browser or downloaded as a file. It allows specifying the desired - /// filename for the downloaded file.

    +///

    Specifies presentational information for the object. Indicates whether an object should +/// be displayed in a web browser or downloaded as a file. It allows specifying the desired +/// filename for the downloaded file.

    pub content_disposition: Option, - ///

    Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

    - /// - ///

    For directory buckets, only the aws-chunked value is supported in this header field.

    - ///
    +///

    Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

    +/// +///

    For directory buckets, only the aws-chunked value is supported in this header field.

    +///
    pub content_encoding: Option, - ///

    The language the content is in.

    +///

    The language the content is in.

    pub content_language: Option, - ///

    A standard MIME type that describes the format of the object data.

    +///

    A standard MIME type that describes the format of the object data.

    pub content_type: Option, - ///

    Specifies the source object for the copy operation. The source object can be up to 5 GB. - /// If the source object is an object that was uploaded by using a multipart upload, the object - /// copy will be a single part object after the source object is copied to the destination - /// bucket.

    - ///

    You specify the value of the copy source in one of two formats, depending on whether you - /// want to access the source object through an access point:

    - ///
      - ///
    • - ///

      For objects not accessed through an access point, specify the name of the source bucket - /// and the key of the source object, separated by a slash (/). For example, to copy the - /// object reports/january.pdf from the general purpose bucket - /// awsexamplebucket, use - /// awsexamplebucket/reports/january.pdf. The value must be URL-encoded. - /// To copy the object reports/january.pdf from the directory bucket - /// awsexamplebucket--use1-az5--x-s3, use - /// awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must - /// be URL-encoded.

      - ///
    • - ///
    • - ///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      - /// - ///
        - ///
      • - ///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        - ///
      • - ///
      • - ///

        Access points are not supported by directory buckets.

        - ///
      • - ///
      - ///
      - ///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      - ///
    • - ///
    - ///

    If your source bucket versioning is enabled, the x-amz-copy-source header - /// by default identifies the current version of an object to copy. If the current version is a - /// delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use - /// the versionId query parameter. Specifically, append - /// ?versionId=<version-id> to the value (for example, - /// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). - /// If you don't specify a version ID, Amazon S3 copies the latest version of the source - /// object.

    - ///

    If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID - /// for the copied object. This version ID is different from the version ID of the source - /// object. Amazon S3 returns the version ID of the copied object in the - /// x-amz-version-id response header in the response.

    - ///

    If you do not enable versioning or suspend it on the destination bucket, the version ID - /// that Amazon S3 generates in the x-amz-version-id response header is always - /// null.

    - /// - ///

    - /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets.

    - ///
    +///

    Specifies the source object for the copy operation. The source object can be up to 5 GB. +/// If the source object is an object that was uploaded by using a multipart upload, the object +/// copy will be a single part object after the source object is copied to the destination +/// bucket.

    +///

    You specify the value of the copy source in one of two formats, depending on whether you +/// want to access the source object through an access point:

    +///
      +///
    • +///

      For objects not accessed through an access point, specify the name of the source bucket +/// and the key of the source object, separated by a slash (/). For example, to copy the +/// object reports/january.pdf from the general purpose bucket +/// awsexamplebucket, use +/// awsexamplebucket/reports/january.pdf. The value must be URL-encoded. +/// To copy the object reports/january.pdf from the directory bucket +/// awsexamplebucket--use1-az5--x-s3, use +/// awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must +/// be URL-encoded.

      +///
    • +///
    • +///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      +/// +///
        +///
      • +///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        +///
      • +///
      • +///

        Access points are not supported by directory buckets.

        +///
      • +///
      +///
      +///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      +///
    • +///
    +///

    If your source bucket versioning is enabled, the x-amz-copy-source header +/// by default identifies the current version of an object to copy. If the current version is a +/// delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use +/// the versionId query parameter. Specifically, append +/// ?versionId=<version-id> to the value (for example, +/// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). +/// If you don't specify a version ID, Amazon S3 copies the latest version of the source +/// object.

    +///

    If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID +/// for the copied object. This version ID is different from the version ID of the source +/// object. Amazon S3 returns the version ID of the copied object in the +/// x-amz-version-id response header in the response.

    +///

    If you do not enable versioning or suspend it on the destination bucket, the version ID +/// that Amazon S3 generates in the x-amz-version-id response header is always +/// null.

    +/// +///

    +/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets.

    +///
    pub copy_source: CopySource, - ///

    Copies the object if its entity tag (ETag) matches the specified tag.

    - ///

    If both the x-amz-copy-source-if-match and - /// x-amz-copy-source-if-unmodified-since headers are present in the request - /// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    - ///
      - ///
    • - ///

      - /// x-amz-copy-source-if-match condition evaluates to true

      - ///
    • - ///
    • - ///

      - /// x-amz-copy-source-if-unmodified-since condition evaluates to - /// false

      - ///
    • - ///
    +///

    Copies the object if its entity tag (ETag) matches the specified tag.

    +///

    If both the x-amz-copy-source-if-match and +/// x-amz-copy-source-if-unmodified-since headers are present in the request +/// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    +///
      +///
    • +///

      +/// x-amz-copy-source-if-match condition evaluates to true

      +///
    • +///
    • +///

      +/// x-amz-copy-source-if-unmodified-since condition evaluates to +/// false

      +///
    • +///
    pub copy_source_if_match: Option, - ///

    Copies the object if it has been modified since the specified time.

    - ///

    If both the x-amz-copy-source-if-none-match and - /// x-amz-copy-source-if-modified-since headers are present in the request and - /// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response - /// code:

    - ///
      - ///
    • - ///

      - /// x-amz-copy-source-if-none-match condition evaluates to false

      - ///
    • - ///
    • - ///

      - /// x-amz-copy-source-if-modified-since condition evaluates to - /// true

      - ///
    • - ///
    +///

    Copies the object if it has been modified since the specified time.

    +///

    If both the x-amz-copy-source-if-none-match and +/// x-amz-copy-source-if-modified-since headers are present in the request and +/// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response +/// code:

    +///
      +///
    • +///

      +/// x-amz-copy-source-if-none-match condition evaluates to false

      +///
    • +///
    • +///

      +/// x-amz-copy-source-if-modified-since condition evaluates to +/// true

      +///
    • +///
    pub copy_source_if_modified_since: Option, - ///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    - ///

    If both the x-amz-copy-source-if-none-match and - /// x-amz-copy-source-if-modified-since headers are present in the request and - /// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response - /// code:

    - ///
      - ///
    • - ///

      - /// x-amz-copy-source-if-none-match condition evaluates to false

      - ///
    • - ///
    • - ///

      - /// x-amz-copy-source-if-modified-since condition evaluates to - /// true

      - ///
    • - ///
    +///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    +///

    If both the x-amz-copy-source-if-none-match and +/// x-amz-copy-source-if-modified-since headers are present in the request and +/// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response +/// code:

    +///
      +///
    • +///

      +/// x-amz-copy-source-if-none-match condition evaluates to false

      +///
    • +///
    • +///

      +/// x-amz-copy-source-if-modified-since condition evaluates to +/// true

      +///
    • +///
    pub copy_source_if_none_match: Option, - ///

    Copies the object if it hasn't been modified since the specified time.

    - ///

    If both the x-amz-copy-source-if-match and - /// x-amz-copy-source-if-unmodified-since headers are present in the request - /// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    - ///
      - ///
    • - ///

      - /// x-amz-copy-source-if-match condition evaluates to true

      - ///
    • - ///
    • - ///

      - /// x-amz-copy-source-if-unmodified-since condition evaluates to - /// false

      - ///
    • - ///
    +///

    Copies the object if it hasn't been modified since the specified time.

    +///

    If both the x-amz-copy-source-if-match and +/// x-amz-copy-source-if-unmodified-since headers are present in the request +/// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    +///
      +///
    • +///

      +/// x-amz-copy-source-if-match condition evaluates to true

      +///
    • +///
    • +///

      +/// x-amz-copy-source-if-unmodified-since condition evaluates to +/// false

      +///
    • +///
    pub copy_source_if_unmodified_since: Option, - ///

    Specifies the algorithm to use when decrypting the source object (for example, - /// AES256).

    - ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the - /// necessary encryption information in your request so that Amazon S3 can decrypt the object for - /// copying.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    +///

    Specifies the algorithm to use when decrypting the source object (for example, +/// AES256).

    +///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the +/// necessary encryption information in your request so that Amazon S3 can decrypt the object for +/// copying.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    pub copy_source_sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source - /// object. The encryption key provided in this header must be the same one that was used when - /// the source object was created.

    - ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the - /// necessary encryption information in your request so that Amazon S3 can decrypt the object for - /// copying.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    +///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source +/// object. The encryption key provided in this header must be the same one that was used when +/// the source object was created.

    +///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the +/// necessary encryption information in your request so that Amazon S3 can decrypt the object for +/// copying.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    pub copy_source_sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the - /// necessary encryption information in your request so that Amazon S3 can decrypt the object for - /// copying.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the +/// necessary encryption information in your request so that Amazon S3 can decrypt the object for +/// copying.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    pub copy_source_sse_customer_key_md5: Option, - ///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_source_bucket_owner: Option, - ///

    The date and time at which the object is no longer cacheable.

    +///

    The date and time at which the object is no longer cacheable.

    pub expires: Option, - ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    +///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    pub grant_full_control: Option, - ///

    Allows grantee to read the object data and its metadata.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    +///

    Allows grantee to read the object data and its metadata.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    pub grant_read: Option, - ///

    Allows grantee to read the object ACL.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read_acp: Option, - ///

    Allows grantee to write the ACL for the applicable object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_write_acp: Option, - ///

    The key of the destination object.

    - pub key: ObjectKey, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    Specifies whether the metadata is copied from the source object or replaced with - /// metadata that's provided in the request. When copying an object, you can preserve all - /// metadata (the default) or specify new metadata. If this header isn’t specified, - /// COPY is the default behavior.

    - ///

    - /// General purpose bucket - For general purpose buckets, when you - /// grant permissions, you can use the s3:x-amz-metadata-directive condition key - /// to enforce certain metadata behavior when objects are uploaded. For more information, see - /// Amazon S3 - /// condition key examples in the Amazon S3 User Guide.

    - /// - ///

    - /// x-amz-website-redirect-location is unique to each object and is not - /// copied when using the x-amz-metadata-directive header. To copy the value, - /// you must specify x-amz-website-redirect-location in the request - /// header.

    - ///
    - pub metadata_directive: Option, - ///

    Specifies whether you want to apply a legal hold to the object copy.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_legal_hold_status: Option, - ///

    The Object Lock mode that you want to apply to the object copy.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Allows grantee to read the object ACL.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_read_acp: Option, +///

    Allows grantee to write the ACL for the applicable object.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_write_acp: Option, +///

    The key of the destination object.

    + pub key: ObjectKey, +///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, +///

    Specifies whether the metadata is copied from the source object or replaced with +/// metadata that's provided in the request. When copying an object, you can preserve all +/// metadata (the default) or specify new metadata. If this header isn’t specified, +/// COPY is the default behavior.

    +///

    +/// General purpose bucket - For general purpose buckets, when you +/// grant permissions, you can use the s3:x-amz-metadata-directive condition key +/// to enforce certain metadata behavior when objects are uploaded. For more information, see +/// Amazon S3 +/// condition key examples in the Amazon S3 User Guide.

    +/// +///

    +/// x-amz-website-redirect-location is unique to each object and is not +/// copied when using the x-amz-metadata-directive header. To copy the value, +/// you must specify x-amz-website-redirect-location in the request +/// header.

    +///
    + pub metadata_directive: Option, +///

    Specifies whether you want to apply a legal hold to the object copy.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_legal_hold_status: Option, +///

    The Object Lock mode that you want to apply to the object copy.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub object_lock_mode: Option, - ///

    The date and time when you want the Object Lock of the object copy to expire.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The date and time when you want the Object Lock of the object copy to expire.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub object_lock_retain_until_date: Option, pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, - /// AES256).

    - ///

    When you perform a CopyObject operation, if you want to use a different - /// type of encryption setting for the target object, you can specify appropriate - /// encryption-related headers to encrypt the target object with an Amazon S3 managed key, a - /// KMS key, or a customer-provided key. If the encryption setting in your request is - /// different from the default encryption configuration of the destination bucket, the - /// encryption setting in your request takes precedence.

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    +///

    Specifies the algorithm to use when encrypting the object (for example, +/// AES256).

    +///

    When you perform a CopyObject operation, if you want to use a different +/// type of encryption setting for the target object, you can specify appropriate +/// encryption-related headers to encrypt the target object with an Amazon S3 managed key, a +/// KMS key, or a customer-provided key. If the encryption setting in your request is +/// different from the default encryption configuration of the destination bucket, the +/// encryption setting in your request takes precedence.

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded. Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded. Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    pub sse_customer_key_md5: Option, - ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use - /// for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

    - ///

    - /// General purpose buckets - This value must be explicitly - /// added to specify encryption context for CopyObject requests if you want an - /// additional encryption context for your destination object. The additional encryption - /// context of the source object won't be copied to the destination object. For more - /// information, see Encryption - /// context in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    +///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use +/// for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

    +///

    +/// General purpose buckets - This value must be explicitly +/// added to specify encryption context for CopyObject requests if you want an +/// additional encryption context for your destination object. The additional encryption +/// context of the source object won't be copied to the destination object. For more +/// information, see Encryption +/// context in the Amazon S3 User Guide.

    +///

    +/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, - ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. - /// All GET and PUT requests for an object protected by KMS will fail if they're not made via - /// SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services - /// SDKs and Amazon Web Services CLI, see Specifying the - /// Signature Version in Request Authentication in the - /// Amazon S3 User Guide.

    - ///

    - /// Directory buckets - - /// To encrypt data using SSE-KMS, it's recommended to specify the - /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses - /// the bucket's default KMS customer managed key ID. If you want to explicitly set the - /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - /// - /// Incorrect key specification results in an HTTP 400 Bad Request error.

    +///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. +/// All GET and PUT requests for an object protected by KMS will fail if they're not made via +/// SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services +/// SDKs and Amazon Web Services CLI, see Specifying the +/// Signature Version in Request Authentication in the +/// Amazon S3 User Guide.

    +///

    +/// Directory buckets - +/// To encrypt data using SSE-KMS, it's recommended to specify the +/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses +/// the bucket's default KMS customer managed key ID. If you want to explicitly set the +/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +/// +/// Incorrect key specification results in an HTTP 400 Bad Request error.

    pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized - /// or unsupported values won’t write a destination object and will receive a 400 Bad - /// Request response.

    - ///

    Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When - /// copying an object, if you don't specify encryption information in your copy request, the - /// encryption setting of the target object is set to the default encryption configuration of - /// the destination bucket. By default, all buckets have a base level of encryption - /// configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the - /// destination bucket has a different default encryption configuration, Amazon S3 uses the - /// corresponding encryption key to encrypt the target object copy.

    - ///

    With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in - /// its data centers and decrypts the data when you access it. For more information about - /// server-side encryption, see Using Server-Side Encryption - /// in the Amazon S3 User Guide.

    - ///

    - /// General purpose buckets - ///

    - ///
      - ///
    • - ///

      For general purpose buckets, there are the following supported options for server-side - /// encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer - /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption - /// with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding - /// KMS key, or a customer-provided key to encrypt the target object copy.

      - ///
    • - ///
    • - ///

      When you perform a CopyObject operation, if you want to use a - /// different type of encryption setting for the target object, you can specify - /// appropriate encryption-related headers to encrypt the target object with an Amazon S3 - /// managed key, a KMS key, or a customer-provided key. If the encryption setting in - /// your request is different from the default encryption configuration of the - /// destination bucket, the encryption setting in your request takes precedence.

      - ///
    • - ///
    - ///

    - /// Directory buckets - ///

    - ///
      - ///
    • - ///

      For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      - ///
    • - ///
    • - ///

      To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you - /// specify SSE-KMS as the directory bucket's default encryption configuration with - /// a KMS key (specifically, a customer managed key). - /// The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS - /// configuration can only support 1 customer managed key per - /// directory bucket for the lifetime of the bucket. After you specify a customer managed key for - /// SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS - /// configuration. Then, when you perform a CopyObject operation and want to - /// specify server-side encryption settings for new object copies with SSE-KMS in the - /// encryption-related request headers, you must ensure the encryption key is the same - /// customer managed key that you specified for the directory bucket's default encryption - /// configuration. - ///

      - ///
    • - ///
    +///

    The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized +/// or unsupported values won’t write a destination object and will receive a 400 Bad +/// Request response.

    +///

    Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When +/// copying an object, if you don't specify encryption information in your copy request, the +/// encryption setting of the target object is set to the default encryption configuration of +/// the destination bucket. By default, all buckets have a base level of encryption +/// configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the +/// destination bucket has a different default encryption configuration, Amazon S3 uses the +/// corresponding encryption key to encrypt the target object copy.

    +///

    With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in +/// its data centers and decrypts the data when you access it. For more information about +/// server-side encryption, see Using Server-Side Encryption +/// in the Amazon S3 User Guide.

    +///

    +/// General purpose buckets +///

    +///
      +///
    • +///

      For general purpose buckets, there are the following supported options for server-side +/// encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer +/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption +/// with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding +/// KMS key, or a customer-provided key to encrypt the target object copy.

      +///
    • +///
    • +///

      When you perform a CopyObject operation, if you want to use a +/// different type of encryption setting for the target object, you can specify +/// appropriate encryption-related headers to encrypt the target object with an Amazon S3 +/// managed key, a KMS key, or a customer-provided key. If the encryption setting in +/// your request is different from the default encryption configuration of the +/// destination bucket, the encryption setting in your request takes precedence.

      +///
    • +///
    +///

    +/// Directory buckets +///

    +///
      +///
    • +///

      For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      +///
    • +///
    • +///

      To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you +/// specify SSE-KMS as the directory bucket's default encryption configuration with +/// a KMS key (specifically, a customer managed key). +/// The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS +/// configuration can only support 1 customer managed key per +/// directory bucket for the lifetime of the bucket. After you specify a customer managed key for +/// SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS +/// configuration. Then, when you perform a CopyObject operation and want to +/// specify server-side encryption settings for new object copies with SSE-KMS in the +/// encryption-related request headers, you must ensure the encryption key is the same +/// customer managed key that you specified for the directory bucket's default encryption +/// configuration. +///

      +///
    • +///
    pub server_side_encryption: Option, - ///

    If the x-amz-storage-class header is not used, the copied object will be - /// stored in the STANDARD Storage Class by default. The STANDARD - /// storage class provides high durability and high availability. Depending on performance - /// needs, you can specify a different Storage Class.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. - /// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

      - ///
    • - ///
    • - ///

      - /// Amazon S3 on Outposts - S3 on Outposts only - /// uses the OUTPOSTS Storage Class.

      - ///
    • - ///
    - ///
    - ///

    You can use the CopyObject action to change the storage class of an object - /// that is already stored in Amazon S3 by using the x-amz-storage-class header. For - /// more information, see Storage Classes in the - /// Amazon S3 User Guide.

    - ///

    Before using an object as a source object for the copy operation, you must restore a - /// copy of it if it meets any of the following conditions:

    - ///
      - ///
    • - ///

      The storage class of the source object is GLACIER or - /// DEEP_ARCHIVE.

      - ///
    • - ///
    • - ///

      The storage class of the source object is INTELLIGENT_TIERING and - /// it's S3 Intelligent-Tiering access tier is Archive Access or - /// Deep Archive Access.

      - ///
    • - ///
    - ///

    For more information, see RestoreObject and Copying - /// Objects in the Amazon S3 User Guide.

    +///

    If the x-amz-storage-class header is not used, the copied object will be +/// stored in the STANDARD Storage Class by default. The STANDARD +/// storage class provides high durability and high availability. Depending on performance +/// needs, you can specify a different Storage Class.

    +/// +///
      +///
    • +///

      +/// Directory buckets - +/// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. +/// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

      +///
    • +///
    • +///

      +/// Amazon S3 on Outposts - S3 on Outposts only +/// uses the OUTPOSTS Storage Class.

      +///
    • +///
    +///
    +///

    You can use the CopyObject action to change the storage class of an object +/// that is already stored in Amazon S3 by using the x-amz-storage-class header. For +/// more information, see Storage Classes in the +/// Amazon S3 User Guide.

    +///

    Before using an object as a source object for the copy operation, you must restore a +/// copy of it if it meets any of the following conditions:

    +///
      +///
    • +///

      The storage class of the source object is GLACIER or +/// DEEP_ARCHIVE.

      +///
    • +///
    • +///

      The storage class of the source object is INTELLIGENT_TIERING and +/// it's S3 Intelligent-Tiering access tier is Archive Access or +/// Deep Archive Access.

      +///
    • +///
    +///

    For more information, see RestoreObject and Copying +/// Objects in the Amazon S3 User Guide.

    pub storage_class: Option, - ///

    The tag-set for the object copy in the destination bucket. This value must be used in - /// conjunction with the x-amz-tagging-directive if you choose - /// REPLACE for the x-amz-tagging-directive. If you choose - /// COPY for the x-amz-tagging-directive, you don't need to set - /// the x-amz-tagging header, because the tag-set will be copied from the source - /// object directly. The tag-set must be encoded as URL Query parameters.

    - ///

    The default value is the empty value.

    - /// - ///

    - /// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. - /// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    - ///
      - ///
    • - ///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      - ///
    • - ///
    • - ///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      - ///
    • - ///
    • - ///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      - ///
    • - ///
    - ///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    - ///
      - ///
    • - ///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      - ///
    • - ///
    • - ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      - ///
    • - ///
    • - ///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      - ///
    • - ///
    • - ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      - ///
    • - ///
    - ///
    +///

    The tag-set for the object copy in the destination bucket. This value must be used in +/// conjunction with the x-amz-tagging-directive if you choose +/// REPLACE for the x-amz-tagging-directive. If you choose +/// COPY for the x-amz-tagging-directive, you don't need to set +/// the x-amz-tagging header, because the tag-set will be copied from the source +/// object directly. The tag-set must be encoded as URL Query parameters.

    +///

    The default value is the empty value.

    +/// +///

    +/// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. +/// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    +///
      +///
    • +///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      +///
    • +///
    • +///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      +///
    • +///
    • +///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      +///
    • +///
    +///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    +///
      +///
    • +///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      +///
    • +///
    • +///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      +///
    • +///
    • +///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      +///
    • +///
    • +///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      +///
    • +///
    +///
    pub tagging: Option, - ///

    Specifies whether the object tag-set is copied from the source object or replaced with - /// the tag-set that's provided in the request.

    - ///

    The default value is COPY.

    - /// - ///

    - /// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. - /// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    - ///
      - ///
    • - ///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      - ///
    • - ///
    • - ///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      - ///
    • - ///
    • - ///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      - ///
    • - ///
    - ///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    - ///
      - ///
    • - ///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      - ///
    • - ///
    • - ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      - ///
    • - ///
    • - ///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      - ///
    • - ///
    • - ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      - ///
    • - ///
    - ///
    +///

    Specifies whether the object tag-set is copied from the source object or replaced with +/// the tag-set that's provided in the request.

    +///

    The default value is COPY.

    +/// +///

    +/// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. +/// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    +///
      +///
    • +///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      +///
    • +///
    • +///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      +///
    • +///
    • +///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      +///
    • +///
    +///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    +///
      +///
    • +///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      +///
    • +///
    • +///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      +///
    • +///
    • +///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      +///
    • +///
    • +///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      +///
    • +///
    +///
    pub tagging_directive: Option, - ///

    If the destination bucket is configured as a website, redirects requests for this object - /// copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of - /// this header in the object metadata. This value is unique to each object and is not copied - /// when using the x-amz-metadata-directive header. Instead, you may opt to - /// provide this header in combination with the x-amz-metadata-directive - /// header.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    If the destination bucket is configured as a website, redirects requests for this object +/// copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of +/// this header in the object metadata. This value is unique to each object and is not copied +/// when using the x-amz-metadata-directive header. Instead, you may opt to +/// provide this header in combination with the x-amz-metadata-directive +/// header.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub website_redirect_location: Option, } impl fmt::Debug for CopyObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CopyObjectInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - d.field("copy_source", &self.copy_source); - if let Some(ref val) = self.copy_source_if_match { - d.field("copy_source_if_match", val); - } - if let Some(ref val) = self.copy_source_if_modified_since { - d.field("copy_source_if_modified_since", val); - } - if let Some(ref val) = self.copy_source_if_none_match { - d.field("copy_source_if_none_match", val); - } - if let Some(ref val) = self.copy_source_if_unmodified_since { - d.field("copy_source_if_unmodified_since", val); - } - if let Some(ref val) = self.copy_source_sse_customer_algorithm { - d.field("copy_source_sse_customer_algorithm", val); - } - if let Some(ref val) = self.copy_source_sse_customer_key { - d.field("copy_source_sse_customer_key", val); - } - if let Some(ref val) = self.copy_source_sse_customer_key_md5 { - d.field("copy_source_sse_customer_key_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expected_source_bucket_owner { - d.field("expected_source_bucket_owner", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.metadata_directive { - d.field("metadata_directive", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.tagging_directive { - d.field("tagging_directive", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CopyObjectInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +d.field("copy_source", &self.copy_source); +if let Some(ref val) = self.copy_source_if_match { +d.field("copy_source_if_match", val); +} +if let Some(ref val) = self.copy_source_if_modified_since { +d.field("copy_source_if_modified_since", val); +} +if let Some(ref val) = self.copy_source_if_none_match { +d.field("copy_source_if_none_match", val); +} +if let Some(ref val) = self.copy_source_if_unmodified_since { +d.field("copy_source_if_unmodified_since", val); +} +if let Some(ref val) = self.copy_source_sse_customer_algorithm { +d.field("copy_source_sse_customer_algorithm", val); +} +if let Some(ref val) = self.copy_source_sse_customer_key { +d.field("copy_source_sse_customer_key", val); +} +if let Some(ref val) = self.copy_source_sse_customer_key_md5 { +d.field("copy_source_sse_customer_key_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.expected_source_bucket_owner { +d.field("expected_source_bucket_owner", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.metadata_directive { +d.field("metadata_directive", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tagging { +d.field("tagging", val); +} +if let Some(ref val) = self.tagging_directive { +d.field("tagging_directive", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +d.finish_non_exhaustive() +} } impl CopyObjectInput { - #[must_use] - pub fn builder() -> builders::CopyObjectInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CopyObjectInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct CopyObjectOutput { - ///

    Indicates whether the copied object uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    +///

    Indicates whether the copied object uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    pub bucket_key_enabled: Option, - ///

    Container for all response elements.

    +///

    Container for all response elements.

    pub copy_object_result: Option, - ///

    Version ID of the source object that was copied.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    +///

    Version ID of the source object that was copied.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    pub copy_source_version_id: Option, - ///

    If the object expiration is configured, the response includes this header.

    - /// - ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    - ///
    +///

    If the object expiration is configured, the response includes this header.

    +/// +///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    +///
    pub expiration: Option, pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_key_md5: Option, - ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The - /// value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption - /// context key-value pairs.

    +///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The +/// value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption +/// context key-value pairs.

    pub ssekms_encryption_context: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms, aws:kms:dsse).

    +///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms, aws:kms:dsse).

    pub server_side_encryption: Option, - ///

    Version ID of the newly created copy.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Version ID of the newly created copy.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub version_id: Option, } impl fmt::Debug for CopyObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CopyObjectOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.copy_object_result { - d.field("copy_object_result", val); - } - if let Some(ref val) = self.copy_source_version_id { - d.field("copy_source_version_id", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CopyObjectOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.copy_object_result { +d.field("copy_object_result", val); +} +if let Some(ref val) = self.copy_source_version_id { +d.field("copy_source_version_id", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); } +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + ///

    Container for all response elements.

    #[derive(Clone, Default, PartialEq)] pub struct CopyObjectResult { - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present - /// if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a - /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present +/// if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a +/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, - ///

    The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, - ///

    Returns the ETag of the new object. The ETag reflects only changes to the contents of an - /// object, not its metadata.

    +///

    Returns the ETag of the new object. The ETag reflects only changes to the contents of an +/// object, not its metadata.

    pub e_tag: Option, - ///

    Creation date of the object.

    +///

    Creation date of the object.

    pub last_modified: Option, } impl fmt::Debug for CopyObjectResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CopyObjectResult"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CopyObjectResult"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +d.finish_non_exhaustive() +} } + ///

    Container for all response elements.

    #[derive(Clone, Default, PartialEq)] pub struct CopyPartResult { - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the part. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the part. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the part. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the part. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 checksum of the part. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 checksum of the part. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 checksum of the part. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 checksum of the part. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    pub checksum_sha256: Option, - ///

    Entity tag of the object.

    +///

    Entity tag of the object.

    pub e_tag: Option, - ///

    Date and time at which the object was uploaded.

    +///

    Date and time at which the object was uploaded.

    pub last_modified: Option, } impl fmt::Debug for CopyPartResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CopyPartResult"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CopyPartResult"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); } +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +d.finish_non_exhaustive() +} +} + + pub type CopySourceIfMatch = ETagCondition; @@ -2792,1109 +2841,1117 @@ pub type CopySourceVersionId = String; ///

    The configuration information for the bucket.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CreateBucketConfiguration { - ///

    Specifies the information about the bucket that will be created.

    - /// - ///

    This functionality is only supported by directory buckets.

    - ///
    +///

    Specifies the information about the bucket that will be created.

    +/// +///

    This functionality is only supported by directory buckets.

    +///
    pub bucket: Option, - ///

    Specifies the location where the bucket will be created.

    - ///

    - /// Directory buckets - The location type is Availability Zone or Local Zone. - /// To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the - /// error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide. - ///

    - /// - ///

    This functionality is only supported by directory buckets.

    - ///
    +///

    Specifies the location where the bucket will be created.

    +///

    +/// Directory buckets - The location type is Availability Zone or Local Zone. +/// To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the +/// error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide. +///

    +/// +///

    This functionality is only supported by directory buckets.

    +///
    pub location: Option, - ///

    Specifies the Region where the bucket will be created. You might choose a Region to - /// optimize latency, minimize costs, or address regulatory requirements. For example, if you - /// reside in Europe, you will probably find it advantageous to create buckets in the Europe - /// (Ireland) Region.

    - ///

    If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region - /// (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

    - ///

    For a list of the valid values for all of the Amazon Web Services Regions, see Regions and - /// Endpoints.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Specifies the Region where the bucket will be created. You might choose a Region to +/// optimize latency, minimize costs, or address regulatory requirements. For example, if you +/// reside in Europe, you will probably find it advantageous to create buckets in the Europe +/// (Ireland) Region.

    +///

    If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region +/// (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

    +///

    For a list of the valid values for all of the Amazon Web Services Regions, see Regions and +/// Endpoints.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub location_constraint: Option, } impl fmt::Debug for CreateBucketConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketConfiguration"); - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.location { - d.field("location", val); - } - if let Some(ref val) = self.location_constraint { - d.field("location_constraint", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketConfiguration"); +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.location { +d.field("location", val); +} +if let Some(ref val) = self.location_constraint { +d.field("location_constraint", val); +} +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct CreateBucketInput { - ///

    The canned ACL to apply to the bucket.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The canned ACL to apply to the bucket.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub acl: Option, - ///

    The name of the bucket to create.

    - ///

    - /// General purpose buckets - For information about bucket naming - /// restrictions, see Bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    +///

    The name of the bucket to create.

    +///

    +/// General purpose buckets - For information about bucket naming +/// restrictions, see Bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

    pub bucket: BucketName, - ///

    The configuration information for the bucket.

    +///

    The configuration information for the bucket.

    pub create_bucket_configuration: Option, - ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the - /// bucket.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Allows grantee the read, write, read ACP, and write ACP permissions on the +/// bucket.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub grant_full_control: Option, - ///

    Allows grantee to list the objects in the bucket.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Allows grantee to list the objects in the bucket.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub grant_read: Option, - ///

    Allows grantee to read the bucket ACL.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Allows grantee to read the bucket ACL.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub grant_read_acp: Option, - ///

    Allows grantee to create new objects in the bucket.

    - ///

    For the bucket and object owners of existing objects, also allows deletions and - /// overwrites of those objects.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Allows grantee to create new objects in the bucket.

    +///

    For the bucket and object owners of existing objects, also allows deletions and +/// overwrites of those objects.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub grant_write: Option, - ///

    Allows grantee to write the ACL for the applicable bucket.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Allows grantee to write the ACL for the applicable bucket.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub grant_write_acp: Option, - ///

    Specifies whether you want S3 Object Lock to be enabled for the new bucket.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Specifies whether you want S3 Object Lock to be enabled for the new bucket.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub object_lock_enabled_for_bucket: Option, pub object_ownership: Option, } impl fmt::Debug for CreateBucketInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.create_bucket_configuration { - d.field("create_bucket_configuration", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write { - d.field("grant_write", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - if let Some(ref val) = self.object_lock_enabled_for_bucket { - d.field("object_lock_enabled_for_bucket", val); - } - if let Some(ref val) = self.object_ownership { - d.field("object_ownership", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.create_bucket_configuration { +d.field("create_bucket_configuration", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write { +d.field("grant_write", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +if let Some(ref val) = self.object_lock_enabled_for_bucket { +d.field("object_lock_enabled_for_bucket", val); +} +if let Some(ref val) = self.object_ownership { +d.field("object_ownership", val); +} +d.finish_non_exhaustive() +} } impl CreateBucketInput { - #[must_use] - pub fn builder() -> builders::CreateBucketInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CreateBucketInputBuilder { +default() +} } #[derive(Clone, PartialEq)] pub struct CreateBucketMetadataTableConfigurationInput { - ///

    - /// The general purpose bucket that you want to create the metadata table configuration in. - ///

    +///

    +/// The general purpose bucket that you want to create the metadata table configuration in. +///

    pub bucket: BucketName, - ///

    - /// The checksum algorithm to use with your metadata table configuration. - ///

    +///

    +/// The checksum algorithm to use with your metadata table configuration. +///

    pub checksum_algorithm: Option, - ///

    - /// The Content-MD5 header for the metadata table configuration. - ///

    +///

    +/// The Content-MD5 header for the metadata table configuration. +///

    pub content_md5: Option, - ///

    - /// The expected owner of the general purpose bucket that contains your metadata table configuration. - ///

    +///

    +/// The expected owner of the general purpose bucket that contains your metadata table configuration. +///

    pub expected_bucket_owner: Option, - ///

    - /// The contents of your metadata table configuration. - ///

    +///

    +/// The contents of your metadata table configuration. +///

    pub metadata_table_configuration: MetadataTableConfiguration, } impl fmt::Debug for CreateBucketMetadataTableConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("metadata_table_configuration", &self.metadata_table_configuration); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("metadata_table_configuration", &self.metadata_table_configuration); +d.finish_non_exhaustive() +} } impl CreateBucketMetadataTableConfigurationInput { - #[must_use] - pub fn builder() -> builders::CreateBucketMetadataTableConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CreateBucketMetadataTableConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct CreateBucketMetadataTableConfigurationOutput {} +pub struct CreateBucketMetadataTableConfigurationOutput { +} impl fmt::Debug for CreateBucketMetadataTableConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct CreateBucketOutput { - ///

    A forward slash followed by the name of the bucket.

    +///

    A forward slash followed by the name of the bucket.

    pub location: Option, } impl fmt::Debug for CreateBucketOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateBucketOutput"); - if let Some(ref val) = self.location { - d.field("location", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateBucketOutput"); +if let Some(ref val) = self.location { +d.field("location", val); +} +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct CreateMultipartUploadInput { - ///

    The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as - /// canned ACLs. Each canned ACL has a predefined set of grantees and - /// permissions. For more information, see Canned ACL in the - /// Amazon S3 User Guide.

    - ///

    By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to - /// predefined groups defined by Amazon S3. These permissions are then added to the access control - /// list (ACL) on the new object. For more information, see Using ACLs. One way to grant - /// the permissions using the request headers is to specify a canned ACL with the - /// x-amz-acl request header.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    +///

    The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as +/// canned ACLs. Each canned ACL has a predefined set of grantees and +/// permissions. For more information, see Canned ACL in the +/// Amazon S3 User Guide.

    +///

    By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to +/// predefined groups defined by Amazon S3. These permissions are then added to the access control +/// list (ACL) on the new object. For more information, see Using ACLs. One way to grant +/// the permissions using the request headers is to specify a canned ACL with the +/// x-amz-acl request header.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    pub acl: Option, - ///

    The name of the bucket where the multipart upload is initiated and where the object is - /// uploaded.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +///

    The name of the bucket where the multipart upload is initiated and where the object is +/// uploaded.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    - ///

    - /// General purpose buckets - Setting this header to - /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with - /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 - /// Bucket Key.

    - ///

    - /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    +///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    +///

    +/// General purpose buckets - Setting this header to +/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with +/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 +/// Bucket Key.

    +///

    +/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    pub bucket_key_enabled: Option, - ///

    Specifies caching behavior along the request/reply chain.

    +///

    Specifies caching behavior along the request/reply chain.

    pub cache_control: Option, - ///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see - /// Checking object integrity in - /// the Amazon S3 User Guide.

    +///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see +/// Checking object integrity in +/// the Amazon S3 User Guide.

    pub checksum_algorithm: Option, - ///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s - /// checksum value. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

    +///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s +/// checksum value. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

    pub checksum_type: Option, - ///

    Specifies presentational information for the object.

    +///

    Specifies presentational information for the object.

    pub content_disposition: Option, - ///

    Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

    - /// - ///

    For directory buckets, only the aws-chunked value is supported in this header field.

    - ///
    +///

    Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

    +/// +///

    For directory buckets, only the aws-chunked value is supported in this header field.

    +///
    pub content_encoding: Option, - ///

    The language that the content is in.

    +///

    The language that the content is in.

    pub content_language: Option, - ///

    A standard MIME type describing the format of the object data.

    +///

    A standard MIME type describing the format of the object data.

    pub content_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The date and time at which the object is no longer cacheable.

    +///

    The date and time at which the object is no longer cacheable.

    pub expires: Option, - ///

    Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP - /// permissions on the object.

    - ///

    By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can use this header to explicitly grant access permissions to - /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 - /// supports in an ACL. For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

    - ///

    You specify each grantee as a type=value pair, where the type is one of the - /// following:

    - ///
      - ///
    • - ///

      - /// id – if the value specified is the canonical user ID of an - /// Amazon Web Services account

      - ///
    • - ///
    • - ///

      - /// uri – if you are granting permissions to a predefined group

      - ///
    • - ///
    • - ///

      - /// emailAddress – if the value specified is the email address of an - /// Amazon Web Services account

      - /// - ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      - ///
        - ///
      • - ///

        US East (N. Virginia)

        - ///
      • - ///
      • - ///

        US West (N. California)

        - ///
      • - ///
      • - ///

        US West (Oregon)

        - ///
      • - ///
      • - ///

        Asia Pacific (Singapore)

        - ///
      • - ///
      • - ///

        Asia Pacific (Sydney)

        - ///
      • - ///
      • - ///

        Asia Pacific (Tokyo)

        - ///
      • - ///
      • - ///

        Europe (Ireland)

        - ///
      • - ///
      • - ///

        South America (São Paulo)

        - ///
      • - ///
      - ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      - ///
      - ///
    • - ///
    - ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    - ///

    - /// x-amz-grant-read: id="11112222333", id="444455556666" - ///

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    +///

    Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP +/// permissions on the object.

    +///

    By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can use this header to explicitly grant access permissions to +/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 +/// supports in an ACL. For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

    +///

    You specify each grantee as a type=value pair, where the type is one of the +/// following:

    +///
      +///
    • +///

      +/// id – if the value specified is the canonical user ID of an +/// Amazon Web Services account

      +///
    • +///
    • +///

      +/// uri – if you are granting permissions to a predefined group

      +///
    • +///
    • +///

      +/// emailAddress – if the value specified is the email address of an +/// Amazon Web Services account

      +/// +///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      +///
        +///
      • +///

        US East (N. Virginia)

        +///
      • +///
      • +///

        US West (N. California)

        +///
      • +///
      • +///

        US West (Oregon)

        +///
      • +///
      • +///

        Asia Pacific (Singapore)

        +///
      • +///
      • +///

        Asia Pacific (Sydney)

        +///
      • +///
      • +///

        Asia Pacific (Tokyo)

        +///
      • +///
      • +///

        Europe (Ireland)

        +///
      • +///
      • +///

        South America (São Paulo)

        +///
      • +///
      +///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      +///
      +///
    • +///
    +///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    +///

    +/// x-amz-grant-read: id="11112222333", id="444455556666" +///

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    pub grant_full_control: Option, - ///

    Specify access permissions explicitly to allow grantee to read the object data and its - /// metadata.

    - ///

    By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can use this header to explicitly grant access permissions to - /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 - /// supports in an ACL. For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

    - ///

    You specify each grantee as a type=value pair, where the type is one of the - /// following:

    - ///
      - ///
    • - ///

      - /// id – if the value specified is the canonical user ID of an - /// Amazon Web Services account

      - ///
    • - ///
    • - ///

      - /// uri – if you are granting permissions to a predefined group

      - ///
    • - ///
    • - ///

      - /// emailAddress – if the value specified is the email address of an - /// Amazon Web Services account

      - /// - ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      - ///
        - ///
      • - ///

        US East (N. Virginia)

        - ///
      • - ///
      • - ///

        US West (N. California)

        - ///
      • - ///
      • - ///

        US West (Oregon)

        - ///
      • - ///
      • - ///

        Asia Pacific (Singapore)

        - ///
      • - ///
      • - ///

        Asia Pacific (Sydney)

        - ///
      • - ///
      • - ///

        Asia Pacific (Tokyo)

        - ///
      • - ///
      • - ///

        Europe (Ireland)

        - ///
      • - ///
      • - ///

        South America (São Paulo)

        - ///
      • - ///
      - ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      - ///
      - ///
    • - ///
    - ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    - ///

    - /// x-amz-grant-read: id="11112222333", id="444455556666" - ///

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    +///

    Specify access permissions explicitly to allow grantee to read the object data and its +/// metadata.

    +///

    By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can use this header to explicitly grant access permissions to +/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 +/// supports in an ACL. For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

    +///

    You specify each grantee as a type=value pair, where the type is one of the +/// following:

    +///
      +///
    • +///

      +/// id – if the value specified is the canonical user ID of an +/// Amazon Web Services account

      +///
    • +///
    • +///

      +/// uri – if you are granting permissions to a predefined group

      +///
    • +///
    • +///

      +/// emailAddress – if the value specified is the email address of an +/// Amazon Web Services account

      +/// +///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      +///
        +///
      • +///

        US East (N. Virginia)

        +///
      • +///
      • +///

        US West (N. California)

        +///
      • +///
      • +///

        US West (Oregon)

        +///
      • +///
      • +///

        Asia Pacific (Singapore)

        +///
      • +///
      • +///

        Asia Pacific (Sydney)

        +///
      • +///
      • +///

        Asia Pacific (Tokyo)

        +///
      • +///
      • +///

        Europe (Ireland)

        +///
      • +///
      • +///

        South America (São Paulo)

        +///
      • +///
      +///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      +///
      +///
    • +///
    +///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    +///

    +/// x-amz-grant-read: id="11112222333", id="444455556666" +///

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    pub grant_read: Option, - ///

    Specify access permissions explicitly to allows grantee to read the object ACL.

    - ///

    By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can use this header to explicitly grant access permissions to - /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 - /// supports in an ACL. For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

    - ///

    You specify each grantee as a type=value pair, where the type is one of the - /// following:

    - ///
      - ///
    • - ///

      - /// id – if the value specified is the canonical user ID of an - /// Amazon Web Services account

      - ///
    • - ///
    • - ///

      - /// uri – if you are granting permissions to a predefined group

      - ///
    • - ///
    • - ///

      - /// emailAddress – if the value specified is the email address of an - /// Amazon Web Services account

      - /// - ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      - ///
        - ///
      • - ///

        US East (N. Virginia)

        - ///
      • - ///
      • - ///

        US West (N. California)

        - ///
      • - ///
      • - ///

        US West (Oregon)

        - ///
      • - ///
      • - ///

        Asia Pacific (Singapore)

        - ///
      • - ///
      • - ///

        Asia Pacific (Sydney)

        - ///
      • - ///
      • - ///

        Asia Pacific (Tokyo)

        - ///
      • - ///
      • - ///

        Europe (Ireland)

        - ///
      • - ///
      • - ///

        South America (São Paulo)

        - ///
      • - ///
      - ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      - ///
      - ///
    • - ///
    - ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    - ///

    - /// x-amz-grant-read: id="11112222333", id="444455556666" - ///

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    +///

    Specify access permissions explicitly to allows grantee to read the object ACL.

    +///

    By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can use this header to explicitly grant access permissions to +/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 +/// supports in an ACL. For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

    +///

    You specify each grantee as a type=value pair, where the type is one of the +/// following:

    +///
      +///
    • +///

      +/// id – if the value specified is the canonical user ID of an +/// Amazon Web Services account

      +///
    • +///
    • +///

      +/// uri – if you are granting permissions to a predefined group

      +///
    • +///
    • +///

      +/// emailAddress – if the value specified is the email address of an +/// Amazon Web Services account

      +/// +///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      +///
        +///
      • +///

        US East (N. Virginia)

        +///
      • +///
      • +///

        US West (N. California)

        +///
      • +///
      • +///

        US West (Oregon)

        +///
      • +///
      • +///

        Asia Pacific (Singapore)

        +///
      • +///
      • +///

        Asia Pacific (Sydney)

        +///
      • +///
      • +///

        Asia Pacific (Tokyo)

        +///
      • +///
      • +///

        Europe (Ireland)

        +///
      • +///
      • +///

        South America (São Paulo)

        +///
      • +///
      +///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      +///
      +///
    • +///
    +///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    +///

    +/// x-amz-grant-read: id="11112222333", id="444455556666" +///

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    pub grant_read_acp: Option, - ///

    Specify access permissions explicitly to allows grantee to allow grantee to write the - /// ACL for the applicable object.

    - ///

    By default, all objects are private. Only the owner has full access control. When - /// uploading an object, you can use this header to explicitly grant access permissions to - /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 - /// supports in an ACL. For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

    - ///

    You specify each grantee as a type=value pair, where the type is one of the - /// following:

    - ///
      - ///
    • - ///

      - /// id – if the value specified is the canonical user ID of an - /// Amazon Web Services account

      - ///
    • - ///
    • - ///

      - /// uri – if you are granting permissions to a predefined group

      - ///
    • - ///
    • - ///

      - /// emailAddress – if the value specified is the email address of an - /// Amazon Web Services account

      - /// - ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      - ///
        - ///
      • - ///

        US East (N. Virginia)

        - ///
      • - ///
      • - ///

        US West (N. California)

        - ///
      • - ///
      • - ///

        US West (Oregon)

        - ///
      • - ///
      • - ///

        Asia Pacific (Singapore)

        - ///
      • - ///
      • - ///

        Asia Pacific (Sydney)

        - ///
      • - ///
      • - ///

        Asia Pacific (Tokyo)

        - ///
      • - ///
      • - ///

        Europe (Ireland)

        - ///
      • - ///
      • - ///

        South America (São Paulo)

        - ///
      • - ///
      - ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      - ///
      - ///
    • - ///
    - ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    - ///

    - /// x-amz-grant-read: id="11112222333", id="444455556666" - ///

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    +///

    Specify access permissions explicitly to allows grantee to allow grantee to write the +/// ACL for the applicable object.

    +///

    By default, all objects are private. Only the owner has full access control. When +/// uploading an object, you can use this header to explicitly grant access permissions to +/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 +/// supports in an ACL. For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

    +///

    You specify each grantee as a type=value pair, where the type is one of the +/// following:

    +///
      +///
    • +///

      +/// id – if the value specified is the canonical user ID of an +/// Amazon Web Services account

      +///
    • +///
    • +///

      +/// uri – if you are granting permissions to a predefined group

      +///
    • +///
    • +///

      +/// emailAddress – if the value specified is the email address of an +/// Amazon Web Services account

      +/// +///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      +///
        +///
      • +///

        US East (N. Virginia)

        +///
      • +///
      • +///

        US West (N. California)

        +///
      • +///
      • +///

        US West (Oregon)

        +///
      • +///
      • +///

        Asia Pacific (Singapore)

        +///
      • +///
      • +///

        Asia Pacific (Sydney)

        +///
      • +///
      • +///

        Asia Pacific (Tokyo)

        +///
      • +///
      • +///

        Europe (Ireland)

        +///
      • +///
      • +///

        South America (São Paulo)

        +///
      • +///
      +///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      +///
      +///
    • +///
    +///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    +///

    +/// x-amz-grant-read: id="11112222333", id="444455556666" +///

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    pub grant_write_acp: Option, - ///

    Object key for which the multipart upload is to be initiated.

    +///

    Object key for which the multipart upload is to be initiated.

    pub key: ObjectKey, - ///

    A map of metadata to store with the object in S3.

    +///

    A map of metadata to store with the object in S3.

    pub metadata: Option, - ///

    Specifies whether you want to apply a legal hold to the uploaded object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Specifies whether you want to apply a legal hold to the uploaded object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub object_lock_legal_hold_status: Option, - ///

    Specifies the Object Lock mode that you want to apply to the uploaded object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Specifies the Object Lock mode that you want to apply to the uploaded object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub object_lock_mode: Option, - ///

    Specifies the date and time when you want the Object Lock to expire.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Specifies the date and time when you want the Object Lock to expire.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub object_lock_retain_until_date: Option, pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to - /// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption - /// key was transmitted without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to +/// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption +/// key was transmitted without error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_key_md5: Option, - ///

    Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    - ///

    - /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    +///

    Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    +///

    +/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, - ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same - /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    - ///

    - /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS - /// key to use. If you specify - /// x-amz-server-side-encryption:aws:kms or - /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key - /// (aws/s3) to protect the data.

    - ///

    - /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the - /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses - /// the bucket's default KMS customer managed key ID. If you want to explicitly set the - /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - /// - /// Incorrect key specification results in an HTTP 400 Bad Request error.

    +///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same +/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    +///

    +/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS +/// key to use. If you specify +/// x-amz-server-side-encryption:aws:kms or +/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key +/// (aws/s3) to protect the data.

    +///

    +/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the +/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses +/// the bucket's default KMS customer managed key ID. If you want to explicitly set the +/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +/// +/// Incorrect key specification results in an HTTP 400 Bad Request error.

    pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms).

    - ///
      - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      - ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. - /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. - /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and - /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. - ///

      - /// - ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the - /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. - /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), - /// the encryption request headers must match the default encryption configuration of the directory bucket. - /// - ///

      - ///
      - ///
    • - ///
    +///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms).

    +///
      +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      +///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. +/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. +/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and +/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. +///

      +/// +///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the +/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. +/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), +/// the encryption request headers must match the default encryption configuration of the directory bucket. +/// +///

      +///
      +///
    • +///
    pub server_side_encryption: Option, - ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The - /// STANDARD storage class provides high durability and high availability. Depending on - /// performance needs, you can specify a different Storage Class. For more information, see - /// Storage - /// Classes in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store - /// newly created objects.

      - ///
    • - ///
    • - ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      - ///
    • - ///
    - ///
    +///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The +/// STANDARD storage class provides high durability and high availability. Depending on +/// performance needs, you can specify a different Storage Class. For more information, see +/// Storage +/// Classes in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      For directory buckets, only the S3 Express One Zone storage class is supported to store +/// newly created objects.

      +///
    • +///
    • +///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      +///
    • +///
    +///
    pub storage_class: Option, - ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub tagging: Option, - ///

    If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub website_redirect_location: Option, } impl fmt::Debug for CreateMultipartUploadInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateMultipartUploadInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateMultipartUploadInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tagging { +d.field("tagging", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +d.finish_non_exhaustive() +} } impl CreateMultipartUploadInput { - #[must_use] - pub fn builder() -> builders::CreateMultipartUploadInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CreateMultipartUploadInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct CreateMultipartUploadOutput { - ///

    If the bucket has a lifecycle rule configured with an action to abort incomplete - /// multipart uploads and the prefix in the lifecycle rule matches the object name in the - /// request, the response includes this header. The header indicates when the initiated - /// multipart upload becomes eligible for an abort operation. For more information, see - /// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in - /// the Amazon S3 User Guide.

    - ///

    The response also includes the x-amz-abort-rule-id header that provides the - /// ID of the lifecycle configuration rule that defines the abort action.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    If the bucket has a lifecycle rule configured with an action to abort incomplete +/// multipart uploads and the prefix in the lifecycle rule matches the object name in the +/// request, the response includes this header. The header indicates when the initiated +/// multipart upload becomes eligible for an abort operation. For more information, see +/// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in +/// the Amazon S3 User Guide.

    +///

    The response also includes the x-amz-abort-rule-id header that provides the +/// ID of the lifecycle configuration rule that defines the abort action.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub abort_date: Option, - ///

    This header is returned along with the x-amz-abort-date header. It - /// identifies the applicable lifecycle configuration rule that defines the action to abort - /// incomplete multipart uploads.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    This header is returned along with the x-amz-abort-date header. It +/// identifies the applicable lifecycle configuration rule that defines the action to abort +/// incomplete multipart uploads.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub abort_rule_id: Option, - ///

    The name of the bucket to which the multipart upload was initiated. Does not return the - /// access point ARN or access point alias if used.

    - /// - ///

    Access points are not supported by directory buckets.

    - ///
    +///

    The name of the bucket to which the multipart upload was initiated. Does not return the +/// access point ARN or access point alias if used.

    +/// +///

    Access points are not supported by directory buckets.

    +///
    pub bucket: Option, - ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    +///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    pub bucket_key_enabled: Option, - ///

    The algorithm that was used to create a checksum of the object.

    +///

    The algorithm that was used to create a checksum of the object.

    pub checksum_algorithm: Option, - ///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s - /// checksum value. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

    +///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s +/// checksum value. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

    pub checksum_type: Option, - ///

    Object key for which the multipart upload was initiated.

    +///

    Object key for which the multipart upload was initiated.

    pub key: Option, pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub sse_customer_key_md5: Option, - ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    +///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    pub ssekms_encryption_context: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms).

    +///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms).

    pub server_side_encryption: Option, - ///

    ID for the initiated multipart upload.

    +///

    ID for the initiated multipart upload.

    pub upload_id: Option, } impl fmt::Debug for CreateMultipartUploadOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateMultipartUploadOutput"); - if let Some(ref val) = self.abort_date { - d.field("abort_date", val); - } - if let Some(ref val) = self.abort_rule_id { - d.field("abort_rule_id", val); - } - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.upload_id { - d.field("upload_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateMultipartUploadOutput"); +if let Some(ref val) = self.abort_date { +d.field("abort_date", val); +} +if let Some(ref val) = self.abort_rule_id { +d.field("abort_rule_id", val); +} +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.upload_id { +d.field("upload_id", val); +} +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct CreateSessionInput { - ///

    The name of the bucket that you create a session for.

    +///

    The name of the bucket that you create a session for.

    pub bucket: BucketName, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using KMS keys (SSE-KMS).

    - ///

    S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    +///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using KMS keys (SSE-KMS).

    +///

    S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    pub bucket_key_enabled: Option, - ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets passed on - /// to Amazon Web Services KMS for future GetObject operations on - /// this object.

    - ///

    - /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    +///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets passed on +/// to Amazon Web Services KMS for future GetObject operations on +/// this object.

    +///

    +/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    +///

    +/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, - ///

    If you specify x-amz-server-side-encryption with aws:kms, you must specify the - /// x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS - /// symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same - /// account that't issuing the command, you must use the full Key ARN not the Key ID.

    - ///

    Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - ///

    +///

    If you specify x-amz-server-side-encryption with aws:kms, you must specify the +/// x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS +/// symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same +/// account that't issuing the command, you must use the full Key ARN not the Key ID.

    +///

    Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +///

    pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm to use when you store objects in the directory bucket.

    - ///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. - /// For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    +///

    The server-side encryption algorithm to use when you store objects in the directory bucket.

    +///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. +/// For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    pub server_side_encryption: Option, - ///

    Specifies the mode of the session that will be created, either ReadWrite or - /// ReadOnly. By default, a ReadWrite session is created. A - /// ReadWrite session is capable of executing all the Zonal endpoint API operations on a - /// directory bucket. A ReadOnly session is constrained to execute the following - /// Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2, - /// GetObjectAttributes, ListParts, and - /// ListMultipartUploads.

    +///

    Specifies the mode of the session that will be created, either ReadWrite or +/// ReadOnly. By default, a ReadWrite session is created. A +/// ReadWrite session is capable of executing all the Zonal endpoint API operations on a +/// directory bucket. A ReadOnly session is constrained to execute the following +/// Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2, +/// GetObjectAttributes, ListParts, and +/// ListMultipartUploads.

    pub session_mode: Option, } impl fmt::Debug for CreateSessionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateSessionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.session_mode { - d.field("session_mode", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateSessionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.session_mode { +d.field("session_mode", val); +} +d.finish_non_exhaustive() +} } impl CreateSessionInput { - #[must_use] - pub fn builder() -> builders::CreateSessionInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::CreateSessionInputBuilder { +default() +} } #[derive(Clone, PartialEq)] pub struct CreateSessionOutput { - ///

    Indicates whether to use an S3 Bucket Key for server-side encryption - /// with KMS keys (SSE-KMS).

    +///

    Indicates whether to use an S3 Bucket Key for server-side encryption +/// with KMS keys (SSE-KMS).

    pub bucket_key_enabled: Option, - ///

    The established temporary security credentials for the created session.

    +///

    The established temporary security credentials for the created session.

    pub credentials: SessionCredentials, - ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets - /// passed on to Amazon Web Services KMS for future GetObject - /// operations on this object.

    +///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets +/// passed on to Amazon Web Services KMS for future GetObject +/// operations on this object.

    pub ssekms_encryption_context: Option, - ///

    If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS - /// symmetric encryption customer managed key that was used for object encryption.

    +///

    If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS +/// symmetric encryption customer managed key that was used for object encryption.

    pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store objects in the directory bucket.

    +///

    The server-side encryption algorithm used when you store objects in the directory bucket.

    pub server_side_encryption: Option, } impl fmt::Debug for CreateSessionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("CreateSessionOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - d.field("credentials", &self.credentials); - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("CreateSessionOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +d.field("credentials", &self.credentials); +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +d.finish_non_exhaustive() +} } impl Default for CreateSessionOutput { - fn default() -> Self { - Self { - bucket_key_enabled: None, - credentials: default(), - ssekms_encryption_context: None, - ssekms_key_id: None, - server_side_encryption: None, - } - } +fn default() -> Self { +Self { +bucket_key_enabled: None, +credentials: default(), +ssekms_encryption_context: None, +ssekms_key_id: None, +server_side_encryption: None, +} +} } + pub type CreationDate = Timestamp; ///

    Amazon Web Services credentials for API authentication.

    #[derive(Clone, PartialEq)] pub struct Credentials { - ///

    The access key ID that identifies the temporary security credentials.

    +///

    The access key ID that identifies the temporary security credentials.

    pub access_key_id: AccessKeyIdType, - ///

    The date on which the current credentials expire.

    +///

    The date on which the current credentials expire.

    pub expiration: DateType, - ///

    The secret access key that can be used to sign requests.

    +///

    The secret access key that can be used to sign requests.

    pub secret_access_key: AccessKeySecretType, - ///

    The token that users must pass to the service API to use the temporary - /// credentials.

    +///

    The token that users must pass to the service API to use the temporary +/// credentials.

    pub session_token: TokenType, } impl fmt::Debug for Credentials { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Credentials"); - d.field("access_key_id", &self.access_key_id); - d.field("expiration", &self.expiration); - d.field("secret_access_key", &self.secret_access_key); - d.field("session_token", &self.session_token); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Credentials"); +d.field("access_key_id", &self.access_key_id); +d.field("expiration", &self.expiration); +d.field("secret_access_key", &self.secret_access_key); +d.field("session_token", &self.session_token); +d.finish_non_exhaustive() } +} + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DataRedundancy(Cow<'static, str>); impl DataRedundancy { - pub const SINGLE_AVAILABILITY_ZONE: &'static str = "SingleAvailabilityZone"; +pub const SINGLE_AVAILABILITY_ZONE: &'static str = "SingleAvailabilityZone"; - pub const SINGLE_LOCAL_ZONE: &'static str = "SingleLocalZone"; +pub const SINGLE_LOCAL_ZONE: &'static str = "SingleLocalZone"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for DataRedundancy { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: DataRedundancy) -> Self { - s.0 - } +fn from(s: DataRedundancy) -> Self { +s.0 +} } impl FromStr for DataRedundancy { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type Date = Timestamp; @@ -3922,653 +3979,684 @@ pub type DaysAfterInitiation = i32; /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DefaultRetention { - ///

    The number of days that you want to specify for the default retention period. Must be - /// used with Mode.

    +///

    The number of days that you want to specify for the default retention period. Must be +/// used with Mode.

    pub days: Option, - ///

    The default Object Lock retention mode you want to apply to new objects placed in the - /// specified bucket. Must be used with either Days or Years.

    +///

    The default Object Lock retention mode you want to apply to new objects placed in the +/// specified bucket. Must be used with either Days or Years.

    pub mode: Option, - ///

    The number of years that you want to specify for the default retention period. Must be - /// used with Mode.

    +///

    The number of years that you want to specify for the default retention period. Must be +/// used with Mode.

    pub years: Option, } impl fmt::Debug for DefaultRetention { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DefaultRetention"); - if let Some(ref val) = self.days { - d.field("days", val); - } - if let Some(ref val) = self.mode { - d.field("mode", val); - } - if let Some(ref val) = self.years { - d.field("years", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DefaultRetention"); +if let Some(ref val) = self.days { +d.field("days", val); +} +if let Some(ref val) = self.mode { +d.field("mode", val); +} +if let Some(ref val) = self.years { +d.field("years", val); +} +d.finish_non_exhaustive() +} } + ///

    Container for the objects to delete.

    #[derive(Clone, Default, PartialEq)] pub struct Delete { - ///

    The object to delete.

    - /// - ///

    - /// Directory buckets - For directory buckets, - /// an object that's composed entirely of whitespace characters is not supported by the - /// DeleteObjects API operation. The request will receive a 400 Bad - /// Request error and none of the objects in the request will be deleted.

    - ///
    +///

    The object to delete.

    +/// +///

    +/// Directory buckets - For directory buckets, +/// an object that's composed entirely of whitespace characters is not supported by the +/// DeleteObjects API operation. The request will receive a 400 Bad +/// Request error and none of the objects in the request will be deleted.

    +///
    pub objects: ObjectIdentifierList, - ///

    Element to enable quiet mode for the request. When you add this element, you must set - /// its value to true.

    +///

    Element to enable quiet mode for the request. When you add this element, you must set +/// its value to true.

    pub quiet: Option, } impl fmt::Debug for Delete { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Delete"); - d.field("objects", &self.objects); - if let Some(ref val) = self.quiet { - d.field("quiet", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Delete"); +d.field("objects", &self.objects); +if let Some(ref val) = self.quiet { +d.field("quiet", val); +} +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketAnalyticsConfigurationInput { - ///

    The name of the bucket from which an analytics configuration is deleted.

    +///

    The name of the bucket from which an analytics configuration is deleted.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The ID that identifies the analytics configuration.

    +///

    The ID that identifies the analytics configuration.

    pub id: AnalyticsId, } impl fmt::Debug for DeleteBucketAnalyticsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} } impl DeleteBucketAnalyticsConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketAnalyticsConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketAnalyticsConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketAnalyticsConfigurationOutput {} +pub struct DeleteBucketAnalyticsConfigurationOutput { +} impl fmt::Debug for DeleteBucketAnalyticsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketCorsInput { - ///

    Specifies the bucket whose cors configuration is being deleted.

    +///

    Specifies the bucket whose cors configuration is being deleted.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketCorsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketCorsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketCorsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketCorsInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketCorsInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketCorsInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketCorsOutput {} +pub struct DeleteBucketCorsOutput { +} impl fmt::Debug for DeleteBucketCorsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketCorsOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketCorsOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketEncryptionInput { - ///

    The name of the bucket containing the server-side encryption configuration to - /// delete.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    +///

    The name of the bucket containing the server-side encryption configuration to +/// delete.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

    +///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketEncryptionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketEncryptionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketEncryptionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketEncryptionInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketEncryptionInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketEncryptionInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketEncryptionOutput {} +pub struct DeleteBucketEncryptionOutput { +} impl fmt::Debug for DeleteBucketEncryptionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketEncryptionOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketEncryptionOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketInput { - ///

    Specifies the bucket being deleted.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    +///

    Specifies the bucket being deleted.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

    +///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketIntelligentTieringConfigurationInput { - ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    +///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    pub bucket: BucketName, - ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    +///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    pub id: IntelligentTieringId, } impl fmt::Debug for DeleteBucketIntelligentTieringConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationInput"); - d.field("bucket", &self.bucket); - d.field("id", &self.id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationInput"); +d.field("bucket", &self.bucket); +d.field("id", &self.id); +d.finish_non_exhaustive() +} } impl DeleteBucketIntelligentTieringConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketIntelligentTieringConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketIntelligentTieringConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketIntelligentTieringConfigurationOutput {} +pub struct DeleteBucketIntelligentTieringConfigurationOutput { +} impl fmt::Debug for DeleteBucketIntelligentTieringConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketInventoryConfigurationInput { - ///

    The name of the bucket containing the inventory configuration to delete.

    +///

    The name of the bucket containing the inventory configuration to delete.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The ID used to identify the inventory configuration.

    +///

    The ID used to identify the inventory configuration.

    pub id: InventoryId, } impl fmt::Debug for DeleteBucketInventoryConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketInventoryConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketInventoryConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} } impl DeleteBucketInventoryConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketInventoryConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketInventoryConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketInventoryConfigurationOutput {} +pub struct DeleteBucketInventoryConfigurationOutput { +} impl fmt::Debug for DeleteBucketInventoryConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketInventoryConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketInventoryConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketLifecycleInput { - ///

    The bucket name of the lifecycle to delete.

    +///

    The bucket name of the lifecycle to delete.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketLifecycleInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketLifecycleInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketLifecycleInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketLifecycleInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketLifecycleInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketLifecycleInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketLifecycleOutput {} +pub struct DeleteBucketLifecycleOutput { +} impl fmt::Debug for DeleteBucketLifecycleOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketLifecycleOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketLifecycleOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketMetadataTableConfigurationInput { - ///

    - /// The general purpose bucket that you want to remove the metadata table configuration from. - ///

    +///

    +/// The general purpose bucket that you want to remove the metadata table configuration from. +///

    pub bucket: BucketName, - ///

    - /// The expected bucket owner of the general purpose bucket that you want to remove the - /// metadata table configuration from. - ///

    +///

    +/// The expected bucket owner of the general purpose bucket that you want to remove the +/// metadata table configuration from. +///

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketMetadataTableConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketMetadataTableConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketMetadataTableConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketMetadataTableConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketMetadataTableConfigurationOutput {} +pub struct DeleteBucketMetadataTableConfigurationOutput { +} impl fmt::Debug for DeleteBucketMetadataTableConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketMetricsConfigurationInput { - ///

    The name of the bucket containing the metrics configuration to delete.

    +///

    The name of the bucket containing the metrics configuration to delete.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and - /// can only contain letters, numbers, periods, dashes, and underscores.

    +///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and +/// can only contain letters, numbers, periods, dashes, and underscores.

    pub id: MetricsId, } impl fmt::Debug for DeleteBucketMetricsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketMetricsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketMetricsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} } impl DeleteBucketMetricsConfigurationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketMetricsConfigurationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketMetricsConfigurationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketMetricsConfigurationOutput {} +pub struct DeleteBucketMetricsConfigurationOutput { +} impl fmt::Debug for DeleteBucketMetricsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketMetricsConfigurationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketMetricsConfigurationOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketOutput {} +pub struct DeleteBucketOutput { +} impl fmt::Debug for DeleteBucketOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketOwnershipControlsInput { - ///

    The Amazon S3 bucket whose OwnershipControls you want to delete.

    +///

    The Amazon S3 bucket whose OwnershipControls you want to delete.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketOwnershipControlsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketOwnershipControlsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketOwnershipControlsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketOwnershipControlsInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketOwnershipControlsInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketOwnershipControlsInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketOwnershipControlsOutput {} +pub struct DeleteBucketOwnershipControlsOutput { +} impl fmt::Debug for DeleteBucketOwnershipControlsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketOwnershipControlsOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketOwnershipControlsOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketPolicyInput { - ///

    The bucket name.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    +///

    The bucket name.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    - pub expected_bucket_owner: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

    +///
    + pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketPolicyInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketPolicyInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketPolicyInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketPolicyInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketPolicyInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketPolicyInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketPolicyOutput {} +pub struct DeleteBucketPolicyOutput { +} impl fmt::Debug for DeleteBucketPolicyOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketPolicyOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketPolicyOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketReplicationInput { - ///

    The bucket name.

    +///

    The bucket name.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketReplicationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketReplicationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketReplicationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketReplicationInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketReplicationInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketReplicationInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketReplicationOutput {} +pub struct DeleteBucketReplicationOutput { +} impl fmt::Debug for DeleteBucketReplicationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketReplicationOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketReplicationOutput"); +d.finish_non_exhaustive() +} } + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketTaggingInput { - ///

    The bucket that has the tag set to be removed.

    +///

    The bucket that has the tag set to be removed.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketTaggingInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketTaggingInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketTaggingInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketTaggingOutput {} +pub struct DeleteBucketTaggingOutput { +} impl fmt::Debug for DeleteBucketTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketTaggingOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketTaggingOutput"); +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketWebsiteInput { - ///

    The bucket name for which you want to remove the website configuration.

    +///

    The bucket name for which you want to remove the website configuration.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketWebsiteInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketWebsiteInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketWebsiteInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeleteBucketWebsiteInput { - #[must_use] - pub fn builder() -> builders::DeleteBucketWebsiteInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteBucketWebsiteInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketWebsiteOutput {} +pub struct DeleteBucketWebsiteOutput { +} impl fmt::Debug for DeleteBucketWebsiteOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteBucketWebsiteOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteBucketWebsiteOutput"); +d.finish_non_exhaustive() +} } + pub type DeleteMarker = bool; ///

    Information about the delete marker.

    #[derive(Clone, Default, PartialEq)] pub struct DeleteMarkerEntry { - ///

    Specifies whether the object is (true) or is not (false) the latest version of an - /// object.

    +///

    Specifies whether the object is (true) or is not (false) the latest version of an +/// object.

    pub is_latest: Option, - ///

    The object key.

    +///

    The object key.

    pub key: Option, - ///

    Date and time when the object was last modified.

    +///

    Date and time when the object was last modified.

    pub last_modified: Option, - ///

    The account that created the delete marker.

    +///

    The account that created the delete marker.

    pub owner: Option, - ///

    Version ID of an object.

    +///

    Version ID of an object.

    pub version_id: Option, } impl fmt::Debug for DeleteMarkerEntry { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteMarkerEntry"); - if let Some(ref val) = self.is_latest { - d.field("is_latest", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteMarkerEntry"); +if let Some(ref val) = self.is_latest { +d.field("is_latest", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } + ///

    Specifies whether Amazon S3 replicates delete markers. If you specify a Filter /// in your replication configuration, you must also include a /// DeleteMarkerReplication element. If your Filter includes a @@ -4583,59 +4671,61 @@ impl fmt::Debug for DeleteMarkerEntry { /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DeleteMarkerReplication { - ///

    Indicates whether to replicate delete markers.

    - /// - ///

    Indicates whether to replicate delete markers.

    - ///
    +///

    Indicates whether to replicate delete markers.

    +/// +///

    Indicates whether to replicate delete markers.

    +///
    pub status: Option, } impl fmt::Debug for DeleteMarkerReplication { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteMarkerReplication"); - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteMarkerReplication"); +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} } + #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeleteMarkerReplicationStatus(Cow<'static, str>); impl DeleteMarkerReplicationStatus { - pub const DISABLED: &'static str = "Disabled"; +pub const DISABLED: &'static str = "Disabled"; - pub const ENABLED: &'static str = "Enabled"; +pub const ENABLED: &'static str = "Enabled"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for DeleteMarkerReplicationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: DeleteMarkerReplicationStatus) -> Self { - s.0 - } +fn from(s: DeleteMarkerReplicationStatus) -> Self { +s.0 +} } impl FromStr for DeleteMarkerReplicationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } pub type DeleteMarkerVersionId = String; @@ -4644,441 +4734,447 @@ pub type DeleteMarkers = List; #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectInput { - ///

    The bucket name of the bucket containing the object.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +///

    The bucket name of the bucket containing the object.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process - /// this operation. To use this header, you must have the - /// s3:BypassGovernanceRetention permission.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process +/// this operation. To use this header, you must have the +/// s3:BypassGovernanceRetention permission.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub bypass_governance_retention: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns - /// a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No - /// Content) response.

    - ///

    For more information about conditional requests, see RFC 7232.

    - /// - ///

    This functionality is only supported for directory buckets.

    - ///
    +///

    The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns +/// a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No +/// Content) response.

    +///

    For more information about conditional requests, see RFC 7232.

    +/// +///

    This functionality is only supported for directory buckets.

    +///
    pub if_match: Option, - ///

    If present, the object is deleted only if its modification times matches the provided - /// Timestamp. If the Timestamp values do not match, the operation - /// returns a 412 Precondition Failed error. If the Timestamp matches - /// or if the object doesn’t exist, the operation returns a 204 Success (No - /// Content) response.

    - /// - ///

    This functionality is only supported for directory buckets.

    - ///
    +///

    If present, the object is deleted only if its modification times matches the provided +/// Timestamp. If the Timestamp values do not match, the operation +/// returns a 412 Precondition Failed error. If the Timestamp matches +/// or if the object doesn’t exist, the operation returns a 204 Success (No +/// Content) response.

    +/// +///

    This functionality is only supported for directory buckets.

    +///
    pub if_match_last_modified_time: Option, - ///

    If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn’t exist, - /// the operation returns a 204 Success (No Content) response.

    - /// - ///

    This functionality is only supported for directory buckets.

    - ///
    - /// - ///

    You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size - /// conditional headers in conjunction with each-other or individually.

    - ///
    +///

    If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn’t exist, +/// the operation returns a 204 Success (No Content) response.

    +/// +///

    This functionality is only supported for directory buckets.

    +///
    +/// +///

    You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size +/// conditional headers in conjunction with each-other or individually.

    +///
    pub if_match_size: Option, - ///

    Key name of the object to delete.

    +///

    Key name of the object to delete.

    pub key: ObjectKey, - ///

    The concatenation of the authentication device's serial number, a space, and the value - /// that is displayed on your authentication device. Required to permanently delete a versioned - /// object if versioning is configured with MFA delete enabled.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The concatenation of the authentication device's serial number, a space, and the value +/// that is displayed on your authentication device. Required to permanently delete a versioned +/// object if versioning is configured with MFA delete enabled.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub mfa: Option, pub request_payer: Option, - ///

    Version ID used to reference a specific version of the object.

    - /// - ///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    - ///
    +///

    Version ID used to reference a specific version of the object.

    +/// +///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    +///
    pub version_id: Option, } impl fmt::Debug for DeleteObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bypass_governance_retention { - d.field("bypass_governance_retention", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_match_last_modified_time { - d.field("if_match_last_modified_time", val); - } - if let Some(ref val) = self.if_match_size { - d.field("if_match_size", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.mfa { - d.field("mfa", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bypass_governance_retention { +d.field("bypass_governance_retention", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_match_last_modified_time { +d.field("if_match_last_modified_time", val); +} +if let Some(ref val) = self.if_match_size { +d.field("if_match_size", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.mfa { +d.field("mfa", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } impl DeleteObjectInput { - #[must_use] - pub fn builder() -> builders::DeleteObjectInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteObjectInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectOutput { - ///

    Indicates whether the specified object version that was permanently deleted was (true) - /// or was not (false) a delete marker before deletion. In a simple DELETE, this header - /// indicates whether (true) or not (false) the current version of the object is a delete - /// marker. To learn more about delete markers, see Working with delete markers.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Indicates whether the specified object version that was permanently deleted was (true) +/// or was not (false) a delete marker before deletion. In a simple DELETE, this header +/// indicates whether (true) or not (false) the current version of the object is a delete +/// marker. To learn more about delete markers, see Working with delete markers.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub delete_marker: Option, pub request_charged: Option, - ///

    Returns the version ID of the delete marker created as a result of the DELETE - /// operation.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Returns the version ID of the delete marker created as a result of the DELETE +/// operation.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub version_id: Option, } impl fmt::Debug for DeleteObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectOutput"); - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectOutput"); +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() } +} + #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectTaggingInput { - ///

    The bucket name containing the objects from which to remove the tags.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +///

    The bucket name containing the objects from which to remove the tags.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The key that identifies the object in the bucket from which to remove all tags.

    +///

    The key that identifies the object in the bucket from which to remove all tags.

    pub key: ObjectKey, - ///

    The versionId of the object that the tag-set will be removed from.

    +///

    The versionId of the object that the tag-set will be removed from.

    pub version_id: Option, } impl fmt::Debug for DeleteObjectTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} } impl DeleteObjectTaggingInput { - #[must_use] - pub fn builder() -> builders::DeleteObjectTaggingInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteObjectTaggingInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectTaggingOutput { - ///

    The versionId of the object the tag-set was removed from.

    +///

    The versionId of the object the tag-set was removed from.

    pub version_id: Option, } impl fmt::Debug for DeleteObjectTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectTaggingOutput"); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectTaggingOutput"); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() } +} + #[derive(Clone, PartialEq)] pub struct DeleteObjectsInput { - ///

    The bucket name containing the objects to delete.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +///

    The bucket name containing the objects to delete.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, - ///

    Specifies whether you want to delete this object even if it has a Governance-type Object - /// Lock in place. To use this header, you must have the - /// s3:BypassGovernanceRetention permission.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Specifies whether you want to delete this object even if it has a Governance-type Object +/// Lock in place. To use this header, you must have the +/// s3:BypassGovernanceRetention permission.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub bypass_governance_retention: Option, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    - ///

    For the x-amz-checksum-algorithm - /// header, replace - /// algorithm - /// with the supported algorithm from the following list:

    - ///
      - ///
    • - ///

      - /// CRC32 - ///

      - ///
    • - ///
    • - ///

      - /// CRC32C - ///

      - ///
    • - ///
    • - ///

      - /// CRC64NVME - ///

      - ///
    • - ///
    • - ///

      - /// SHA1 - ///

      - ///
    • - ///
    • - ///

      - /// SHA256 - ///

      - ///
    • - ///
    - ///

    For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm +/// or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    +///

    For the x-amz-checksum-algorithm +/// header, replace +/// algorithm +/// with the supported algorithm from the following list:

    +///
      +///
    • +///

      +/// CRC32 +///

      +///
    • +///
    • +///

      +/// CRC32C +///

      +///
    • +///
    • +///

      +/// CRC64NVME +///

      +///
    • +///
    • +///

      +/// SHA1 +///

      +///
    • +///
    • +///

      +/// SHA256 +///

      +///
    • +///
    +///

    For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If the individual checksum value you provide through x-amz-checksum-algorithm +/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    pub checksum_algorithm: Option, - ///

    Container for the request.

    +///

    Container for the request.

    pub delete: Delete, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - ///

    The concatenation of the authentication device's serial number, a space, and the value - /// that is displayed on your authentication device. Required to permanently delete a versioned - /// object if versioning is configured with MFA delete enabled.

    - ///

    When performing the DeleteObjects operation on an MFA delete enabled - /// bucket, which attempts to delete the specified versioned objects, you must include an MFA - /// token. If you don't provide an MFA token, the entire request will fail, even if there are - /// non-versioned objects that you are trying to delete. If you provide an invalid token, - /// whether there are versioned object keys in the request or not, the entire Multi-Object - /// Delete request will fail. For information about MFA Delete, see MFA - /// Delete in the Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The concatenation of the authentication device's serial number, a space, and the value +/// that is displayed on your authentication device. Required to permanently delete a versioned +/// object if versioning is configured with MFA delete enabled.

    +///

    When performing the DeleteObjects operation on an MFA delete enabled +/// bucket, which attempts to delete the specified versioned objects, you must include an MFA +/// token. If you don't provide an MFA token, the entire request will fail, even if there are +/// non-versioned objects that you are trying to delete. If you provide an invalid token, +/// whether there are versioned object keys in the request or not, the entire Multi-Object +/// Delete request will fail. For information about MFA Delete, see MFA +/// Delete in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub mfa: Option, pub request_payer: Option, } impl fmt::Debug for DeleteObjectsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bypass_governance_retention { - d.field("bypass_governance_retention", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - d.field("delete", &self.delete); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.mfa { - d.field("mfa", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bypass_governance_retention { +d.field("bypass_governance_retention", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +d.field("delete", &self.delete); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.mfa { +d.field("mfa", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.finish_non_exhaustive() +} } impl DeleteObjectsInput { - #[must_use] - pub fn builder() -> builders::DeleteObjectsInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeleteObjectsInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectsOutput { - ///

    Container element for a successful delete. It identifies the object that was - /// successfully deleted.

    +///

    Container element for a successful delete. It identifies the object that was +/// successfully deleted.

    pub deleted: Option, - ///

    Container for a failed delete action that describes the object that Amazon S3 attempted to - /// delete and the error it encountered.

    +///

    Container for a failed delete action that describes the object that Amazon S3 attempted to +/// delete and the error it encountered.

    pub errors: Option, pub request_charged: Option, } impl fmt::Debug for DeleteObjectsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeleteObjectsOutput"); - if let Some(ref val) = self.deleted { - d.field("deleted", val); - } - if let Some(ref val) = self.errors { - d.field("errors", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeleteObjectsOutput"); +if let Some(ref val) = self.deleted { +d.field("deleted", val); +} +if let Some(ref val) = self.errors { +d.field("errors", val); } +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + #[derive(Clone, Default, PartialEq)] pub struct DeletePublicAccessBlockInput { - ///

    The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. - ///

    +///

    The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. +///

    pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeletePublicAccessBlockInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeletePublicAccessBlockInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeletePublicAccessBlockInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} } impl DeletePublicAccessBlockInput { - #[must_use] - pub fn builder() -> builders::DeletePublicAccessBlockInputBuilder { - default() - } +#[must_use] +pub fn builder() -> builders::DeletePublicAccessBlockInputBuilder { +default() +} } #[derive(Clone, Default, PartialEq)] -pub struct DeletePublicAccessBlockOutput {} +pub struct DeletePublicAccessBlockOutput { +} impl fmt::Debug for DeletePublicAccessBlockOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeletePublicAccessBlockOutput"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeletePublicAccessBlockOutput"); +d.finish_non_exhaustive() } +} + ///

    Information about the deleted object.

    #[derive(Clone, Default, PartialEq)] pub struct DeletedObject { - ///

    Indicates whether the specified object version that was permanently deleted was (true) - /// or was not (false) a delete marker before deletion. In a simple DELETE, this header - /// indicates whether (true) or not (false) the current version of the object is a delete - /// marker. To learn more about delete markers, see Working with delete markers.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    Indicates whether the specified object version that was permanently deleted was (true) +/// or was not (false) a delete marker before deletion. In a simple DELETE, this header +/// indicates whether (true) or not (false) the current version of the object is a delete +/// marker. To learn more about delete markers, see Working with delete markers.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub delete_marker: Option, - ///

    The version ID of the delete marker created as a result of the DELETE operation. If you - /// delete a specific object version, the value returned by this header is the version ID of - /// the object version deleted.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The version ID of the delete marker created as a result of the DELETE operation. If you +/// delete a specific object version, the value returned by this header is the version ID of +/// the object version deleted.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub delete_marker_version_id: Option, - ///

    The name of the deleted object.

    +///

    The name of the deleted object.

    pub key: Option, - ///

    The version ID of the deleted object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    +///

    The version ID of the deleted object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    pub version_id: Option, } impl fmt::Debug for DeletedObject { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("DeletedObject"); - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.delete_marker_version_id { - d.field("delete_marker_version_id", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("DeletedObject"); +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); } +if let Some(ref val) = self.delete_marker_version_id { +d.field("delete_marker_version_id", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + pub type DeletedObjects = List; @@ -5090,70 +5186,72 @@ pub type Description = String; /// Amazon S3 bucket and S3 Replication Time Control (S3 RTC).

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct Destination { - ///

    Specify this only in a cross-account scenario (where source and destination bucket - /// owners are not the same), and you want to change replica ownership to the Amazon Web Services account - /// that owns the destination bucket. If this is not specified in the replication - /// configuration, the replicas are owned by same Amazon Web Services account that owns the source - /// object.

    +///

    Specify this only in a cross-account scenario (where source and destination bucket +/// owners are not the same), and you want to change replica ownership to the Amazon Web Services account +/// that owns the destination bucket. If this is not specified in the replication +/// configuration, the replicas are owned by same Amazon Web Services account that owns the source +/// object.

    pub access_control_translation: Option, - ///

    Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to - /// change replica ownership to the Amazon Web Services account that owns the destination bucket by - /// specifying the AccessControlTranslation property, this is the account ID of - /// the destination bucket owner. For more information, see Replication Additional - /// Configuration: Changing the Replica Owner in the - /// Amazon S3 User Guide.

    +///

    Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to +/// change replica ownership to the Amazon Web Services account that owns the destination bucket by +/// specifying the AccessControlTranslation property, this is the account ID of +/// the destination bucket owner. For more information, see Replication Additional +/// Configuration: Changing the Replica Owner in the +/// Amazon S3 User Guide.

    pub account: Option, - ///

    The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the - /// results.

    +///

    The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the +/// results.

    pub bucket: BucketName, - ///

    A container that provides information about encryption. If - /// SourceSelectionCriteria is specified, you must specify this element.

    +///

    A container that provides information about encryption. If +/// SourceSelectionCriteria is specified, you must specify this element.

    pub encryption_configuration: Option, - ///

    A container specifying replication metrics-related settings enabling replication - /// metrics and events.

    +///

    A container specifying replication metrics-related settings enabling replication +/// metrics and events.

    pub metrics: Option, - ///

    A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time - /// when all objects and operations on objects must be replicated. Must be specified together - /// with a Metrics block.

    +///

    A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time +/// when all objects and operations on objects must be replicated. Must be specified together +/// with a Metrics block.

    pub replication_time: Option, - ///

    The storage class to use when replicating objects, such as S3 Standard or reduced - /// redundancy. By default, Amazon S3 uses the storage class of the source object to create the - /// object replica.

    - ///

    For valid values, see the StorageClass element of the PUT Bucket - /// replication action in the Amazon S3 API Reference.

    +///

    The storage class to use when replicating objects, such as S3 Standard or reduced +/// redundancy. By default, Amazon S3 uses the storage class of the source object to create the +/// object replica.

    +///

    For valid values, see the StorageClass element of the PUT Bucket +/// replication action in the Amazon S3 API Reference.

    pub storage_class: Option, } impl fmt::Debug for Destination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Destination"); - if let Some(ref val) = self.access_control_translation { - d.field("access_control_translation", val); - } - if let Some(ref val) = self.account { - d.field("account", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.encryption_configuration { - d.field("encryption_configuration", val); - } - if let Some(ref val) = self.metrics { - d.field("metrics", val); - } - if let Some(ref val) = self.replication_time { - d.field("replication_time", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Destination"); +if let Some(ref val) = self.access_control_translation { +d.field("access_control_translation", val); +} +if let Some(ref val) = self.account { +d.field("account", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.encryption_configuration { +d.field("encryption_configuration", val); +} +if let Some(ref val) = self.metrics { +d.field("metrics", val); +} +if let Some(ref val) = self.replication_time { +d.field("replication_time", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() +} } + pub type DirectoryBucketToken = String; pub type DisplayName = String; + pub type EmailAddress = String; pub type EnableRequestProgress = bool; @@ -5175,67 +5273,69 @@ pub type EnableRequestProgress = bool; pub struct EncodingType(Cow<'static, str>); impl EncodingType { - pub const URL: &'static str = "url"; +pub const URL: &'static str = "url"; - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } impl From for EncodingType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +fn from(s: String) -> Self { +Self(Cow::from(s)) +} } impl From for Cow<'static, str> { - fn from(s: EncodingType) -> Self { - s.0 - } +fn from(s: EncodingType) -> Self { +s.0 +} } impl FromStr for EncodingType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} } ///

    Contains the type of server-side encryption used.

    #[derive(Clone, PartialEq)] pub struct Encryption { - ///

    The server-side encryption algorithm used when storing job results in Amazon S3 (for example, - /// AES256, aws:kms).

    +///

    The server-side encryption algorithm used when storing job results in Amazon S3 (for example, +/// AES256, aws:kms).

    pub encryption_type: ServerSideEncryption, - ///

    If the encryption type is aws:kms, this optional value can be used to - /// specify the encryption context for the restore results.

    +///

    If the encryption type is aws:kms, this optional value can be used to +/// specify the encryption context for the restore results.

    pub kms_context: Option, - ///

    If the encryption type is aws:kms, this optional value specifies the ID of - /// the symmetric encryption customer managed key to use for encryption of job results. Amazon S3 only - /// supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service - /// Developer Guide.

    +///

    If the encryption type is aws:kms, this optional value specifies the ID of +/// the symmetric encryption customer managed key to use for encryption of job results. Amazon S3 only +/// supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service +/// Developer Guide.

    pub kms_key_id: Option, } impl fmt::Debug for Encryption { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Encryption"); - d.field("encryption_type", &self.encryption_type); - if let Some(ref val) = self.kms_context { - d.field("kms_context", val); - } - if let Some(ref val) = self.kms_key_id { - d.field("kms_key_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Encryption"); +d.field("encryption_type", &self.encryption_type); +if let Some(ref val) = self.kms_context { +d.field("kms_context", val); } +if let Some(ref val) = self.kms_key_id { +d.field("kms_key_id", val); +} +d.finish_non_exhaustive() +} +} + ///

    Specifies encryption-related information for an Amazon S3 bucket that is a destination for /// replicated objects.

    @@ -5247,39 +5347,42 @@ impl fmt::Debug for Encryption { /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct EncryptionConfiguration { - ///

    Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in - /// Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to - /// encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more - /// information, see Asymmetric keys in Amazon Web Services - /// KMS in the Amazon Web Services Key Management Service Developer - /// Guide.

    +///

    Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in +/// Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to +/// encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more +/// information, see Asymmetric keys in Amazon Web Services +/// KMS in the Amazon Web Services Key Management Service Developer +/// Guide.

    pub replica_kms_key_id: Option, } impl fmt::Debug for EncryptionConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("EncryptionConfiguration"); - if let Some(ref val) = self.replica_kms_key_id { - d.field("replica_kms_key_id", val); - } - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("EncryptionConfiguration"); +if let Some(ref val) = self.replica_kms_key_id { +d.field("replica_kms_key_id", val); +} +d.finish_non_exhaustive() } +} + ///

    -/// The existing object was created with a different encryption type. -/// Subsequent write requests must include the appropriate encryption +/// The existing object was created with a different encryption type. +/// Subsequent write requests must include the appropriate encryption /// parameters in the request or while creating the session. ///

    #[derive(Clone, Default, PartialEq)] -pub struct EncryptionTypeMismatch {} +pub struct EncryptionTypeMismatch { +} impl fmt::Debug for EncryptionTypeMismatch { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("EncryptionTypeMismatch"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("EncryptionTypeMismatch"); +d.finish_non_exhaustive() } +} + pub type End = i64; @@ -5287,32616 +5390,33005 @@ pub type End = i64; /// should not assume that the request is complete until the client receives an /// EndEvent.

    #[derive(Clone, Default, PartialEq)] -pub struct EndEvent {} +pub struct EndEvent { +} impl fmt::Debug for EndEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("EndEvent"); - d.finish_non_exhaustive() - } +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("EndEvent"); +d.finish_non_exhaustive() } +} + ///

    Container for all error elements.

    #[derive(Clone, Default, PartialEq)] pub struct Error { - ///

    The error code is a string that uniquely identifies an error condition. It is meant to - /// be read and understood by programs that detect and handle errors by type. The following is - /// a list of Amazon S3 error codes. For more information, see Error responses.

    - ///
      - ///
    • - ///
        - ///
      • - ///

        - /// Code: AccessDenied

        - ///
      • - ///
      • - ///

        - /// Description: Access Denied

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: AccountProblem

        - ///
      • - ///
      • - ///

        - /// Description: There is a problem with your Amazon Web Services account - /// that prevents the action from completing successfully. Contact Amazon Web Services Support - /// for further assistance.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: AllAccessDisabled

        - ///
      • - ///
      • - ///

        - /// Description: All access to this Amazon S3 resource has been - /// disabled. Contact Amazon Web Services Support for further assistance.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: AmbiguousGrantByEmailAddress

        - ///
      • - ///
      • - ///

        - /// Description: The email address you provided is - /// associated with more than one account.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: AuthorizationHeaderMalformed

        - ///
      • - ///
      • - ///

        - /// Description: The authorization header you provided is - /// invalid.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: BadDigest

        - ///
      • - ///
      • - ///

        - /// Description: The Content-MD5 you specified did not - /// match what we received.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: BucketAlreadyExists

        - ///
      • - ///
      • - ///

        - /// Description: The requested bucket name is not - /// available. The bucket namespace is shared by all users of the system. Please - /// select a different name and try again.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 409 Conflict

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: BucketAlreadyOwnedByYou

        - ///
      • - ///
      • - ///

        - /// Description: The bucket you tried to create already - /// exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in - /// the North Virginia Region. For legacy compatibility, if you re-create an - /// existing bucket that you already own in the North Virginia Region, Amazon S3 returns - /// 200 OK and resets the bucket access control lists (ACLs).

        - ///
      • - ///
      • - ///

        - /// Code: 409 Conflict (in all Regions except the North - /// Virginia Region)

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: BucketNotEmpty

        - ///
      • - ///
      • - ///

        - /// Description: The bucket you tried to delete is not - /// empty.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 409 Conflict

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: CredentialsNotSupported

        - ///
      • - ///
      • - ///

        - /// Description: This request does not support - /// credentials.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: CrossLocationLoggingProhibited

        - ///
      • - ///
      • - ///

        - /// Description: Cross-location logging not allowed. - /// Buckets in one geographic location cannot log information to a bucket in - /// another location.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: EntityTooSmall

        - ///
      • - ///
      • - ///

        - /// Description: Your proposed upload is smaller than the - /// minimum allowed object size.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: EntityTooLarge

        - ///
      • - ///
      • - ///

        - /// Description: Your proposed upload exceeds the maximum - /// allowed object size.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: ExpiredToken

        - ///
      • - ///
      • - ///

        - /// Description: The provided token has expired.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: IllegalVersioningConfigurationException

        - ///
      • - ///
      • - ///

        - /// Description: Indicates that the versioning - /// configuration specified in the request is invalid.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: IncompleteBody

        - ///
      • - ///
      • - ///

        - /// Description: You did not provide the number of bytes - /// specified by the Content-Length HTTP header

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: IncorrectNumberOfFilesInPostRequest

        - ///
      • - ///
      • - ///

        - /// Description: POST requires exactly one file upload per - /// request.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InlineDataTooLarge

        - ///
      • - ///
      • - ///

        - /// Description: Inline data exceeds the maximum allowed - /// size.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InternalError

        - ///
      • - ///
      • - ///

        - /// Description: We encountered an internal error. Please - /// try again.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 500 Internal Server Error

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Server

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidAccessKeyId

        - ///
      • - ///
      • - ///

        - /// Description: The Amazon Web Services access key ID you provided does - /// not exist in our records.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidAddressingHeader

        - ///
      • - ///
      • - ///

        - /// Description: You must specify the Anonymous - /// role.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: N/A

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidArgument

        - ///
      • - ///
      • - ///

        - /// Description: Invalid Argument

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidBucketName

        - ///
      • - ///
      • - ///

        - /// Description: The specified bucket is not valid.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidBucketState

        - ///
      • - ///
      • - ///

        - /// Description: The request is not valid with the current - /// state of the bucket.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 409 Conflict

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidDigest

        - ///
      • - ///
      • - ///

        - /// Description: The Content-MD5 you specified is not - /// valid.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidEncryptionAlgorithmError

        - ///
      • - ///
      • - ///

        - /// Description: The encryption request you specified is - /// not valid. The valid value is AES256.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidLocationConstraint

        - ///
      • - ///
      • - ///

        - /// Description: The specified location constraint is not - /// valid. For more information about Regions, see How to Select - /// a Region for Your Buckets.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidObjectState

        - ///
      • - ///
      • - ///

        - /// Description: The action is not valid for the current - /// state of the object.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidPart

        - ///
      • - ///
      • - ///

        - /// Description: One or more of the specified parts could - /// not be found. The part might not have been uploaded, or the specified entity - /// tag might not have matched the part's entity tag.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidPartOrder

        - ///
      • - ///
      • - ///

        - /// Description: The list of parts was not in ascending - /// order. Parts list must be specified in order by part number.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidPayer

        - ///
      • - ///
      • - ///

        - /// Description: All access to this object has been - /// disabled. Please contact Amazon Web Services Support for further assistance.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidPolicyDocument

        - ///
      • - ///
      • - ///

        - /// Description: The content of the form does not meet the - /// conditions specified in the policy document.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRange

        - ///
      • - ///
      • - ///

        - /// Description: The requested range cannot be - /// satisfied.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 416 Requested Range Not - /// Satisfiable

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: Please use - /// AWS4-HMAC-SHA256.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: SOAP requests must be made over an HTTPS - /// connection.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: Amazon S3 Transfer Acceleration is not - /// supported for buckets with non-DNS compliant names.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: Amazon S3 Transfer Acceleration is not - /// supported for buckets with periods (.) in their names.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: Amazon S3 Transfer Accelerate endpoint only - /// supports virtual style requests.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: Amazon S3 Transfer Accelerate is not configured - /// on this bucket.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: Amazon S3 Transfer Accelerate is disabled on - /// this bucket.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: Amazon S3 Transfer Acceleration is not - /// supported on this bucket. Contact Amazon Web Services Support for more information.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidRequest

        - ///
      • - ///
      • - ///

        - /// Description: Amazon S3 Transfer Acceleration cannot be - /// enabled on this bucket. Contact Amazon Web Services Support for more information.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// Code: N/A

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidSecurity

        - ///
      • - ///
      • - ///

        - /// Description: The provided security credentials are not - /// valid.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidSOAPRequest

        - ///
      • - ///
      • - ///

        - /// Description: The SOAP request body is invalid.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidStorageClass

        - ///
      • - ///
      • - ///

        - /// Description: The storage class you specified is not - /// valid.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidTargetBucketForLogging

        - ///
      • - ///
      • - ///

        - /// Description: The target bucket for logging does not - /// exist, is not owned by you, or does not have the appropriate grants for the - /// log-delivery group.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidToken

        - ///
      • - ///
      • - ///

        - /// Description: The provided token is malformed or - /// otherwise invalid.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: InvalidURI

        - ///
      • - ///
      • - ///

        - /// Description: Couldn't parse the specified URI.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: KeyTooLongError

        - ///
      • - ///
      • - ///

        - /// Description: Your key is too long.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MalformedACLError

        - ///
      • - ///
      • - ///

        - /// Description: The XML you provided was not well-formed - /// or did not validate against our published schema.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MalformedPOSTRequest

        - ///
      • - ///
      • - ///

        - /// Description: The body of your POST request is not - /// well-formed multipart/form-data.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MalformedXML

        - ///
      • - ///
      • - ///

        - /// Description: This happens when the user sends malformed - /// XML (XML that doesn't conform to the published XSD) for the configuration. The - /// error message is, "The XML you provided was not well-formed or did not validate - /// against our published schema."

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MaxMessageLengthExceeded

        - ///
      • - ///
      • - ///

        - /// Description: Your request was too big.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MaxPostPreDataLengthExceededError

        - ///
      • - ///
      • - ///

        - /// Description: Your POST request fields preceding the - /// upload file were too large.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MetadataTooLarge

        - ///
      • - ///
      • - ///

        - /// Description: Your metadata headers exceed the maximum - /// allowed metadata size.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MethodNotAllowed

        - ///
      • - ///
      • - ///

        - /// Description: The specified method is not allowed - /// against this resource.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 405 Method Not Allowed

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MissingAttachment

        - ///
      • - ///
      • - ///

        - /// Description: A SOAP attachment was expected, but none - /// were found.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: N/A

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MissingContentLength

        - ///
      • - ///
      • - ///

        - /// Description: You must provide the Content-Length HTTP - /// header.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 411 Length Required

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MissingRequestBodyError

        - ///
      • - ///
      • - ///

        - /// Description: This happens when the user sends an empty - /// XML document as a request. The error message is, "Request body is empty." - ///

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MissingSecurityElement

        - ///
      • - ///
      • - ///

        - /// Description: The SOAP 1.1 request is missing a security - /// element.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: MissingSecurityHeader

        - ///
      • - ///
      • - ///

        - /// Description: Your request is missing a required - /// header.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NoLoggingStatusForKey

        - ///
      • - ///
      • - ///

        - /// Description: There is no such thing as a logging status - /// subresource for a key.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NoSuchBucket

        - ///
      • - ///
      • - ///

        - /// Description: The specified bucket does not - /// exist.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 404 Not Found

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NoSuchBucketPolicy

        - ///
      • - ///
      • - ///

        - /// Description: The specified bucket does not have a - /// bucket policy.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 404 Not Found

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NoSuchKey

        - ///
      • - ///
      • - ///

        - /// Description: The specified key does not exist.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 404 Not Found

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NoSuchLifecycleConfiguration

        - ///
      • - ///
      • - ///

        - /// Description: The lifecycle configuration does not - /// exist.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 404 Not Found

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NoSuchUpload

        - ///
      • - ///
      • - ///

        - /// Description: The specified multipart upload does not - /// exist. The upload ID might be invalid, or the multipart upload might have been - /// aborted or completed.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 404 Not Found

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NoSuchVersion

        - ///
      • - ///
      • - ///

        - /// Description: Indicates that the version ID specified in - /// the request does not match an existing version.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 404 Not Found

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NotImplemented

        - ///
      • - ///
      • - ///

        - /// Description: A header you provided implies - /// functionality that is not implemented.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 501 Not Implemented

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Server

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: NotSignedUp

        - ///
      • - ///
      • - ///

        - /// Description: Your account is not signed up for the Amazon S3 - /// service. You must sign up before you can use Amazon S3. You can sign up at the - /// following URL: Amazon S3 - ///

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: OperationAborted

        - ///
      • - ///
      • - ///

        - /// Description: A conflicting conditional action is - /// currently in progress against this resource. Try again.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 409 Conflict

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: PermanentRedirect

        - ///
      • - ///
      • - ///

        - /// Description: The bucket you are attempting to access - /// must be addressed using the specified endpoint. Send all future requests to - /// this endpoint.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 301 Moved Permanently

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: PreconditionFailed

        - ///
      • - ///
      • - ///

        - /// Description: At least one of the preconditions you - /// specified did not hold.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 412 Precondition Failed

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: Redirect

        - ///
      • - ///
      • - ///

        - /// Description: Temporary redirect.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 307 Moved Temporarily

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: RestoreAlreadyInProgress

        - ///
      • - ///
      • - ///

        - /// Description: Object restore is already in - /// progress.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 409 Conflict

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: RequestIsNotMultiPartContent

        - ///
      • - ///
      • - ///

        - /// Description: Bucket POST must be of the enclosure-type - /// multipart/form-data.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: RequestTimeout

        - ///
      • - ///
      • - ///

        - /// Description: Your socket connection to the server was - /// not read from or written to within the timeout period.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: RequestTimeTooSkewed

        - ///
      • - ///
      • - ///

        - /// Description: The difference between the request time - /// and the server's time is too large.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: RequestTorrentOfBucketError

        - ///
      • - ///
      • - ///

        - /// Description: Requesting the torrent file of a bucket is - /// not permitted.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: SignatureDoesNotMatch

        - ///
      • - ///
      • - ///

        - /// Description: The request signature we calculated does - /// not match the signature you provided. Check your Amazon Web Services secret access key and - /// signing method. For more information, see REST - /// Authentication and SOAP - /// Authentication for details.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 403 Forbidden

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: ServiceUnavailable

        - ///
      • - ///
      • - ///

        - /// Description: Service is unable to handle - /// request.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 503 Service Unavailable

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Server

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: SlowDown

        - ///
      • - ///
      • - ///

        - /// Description: Reduce your request rate.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 503 Slow Down

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Server

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: TemporaryRedirect

        - ///
      • - ///
      • - ///

        - /// Description: You are being redirected to the bucket - /// while DNS updates.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 307 Moved Temporarily

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: TokenRefreshRequired

        - ///
      • - ///
      • - ///

        - /// Description: The provided token must be - /// refreshed.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: TooManyBuckets

        - ///
      • - ///
      • - ///

        - /// Description: You have attempted to create more buckets - /// than allowed.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: UnexpectedContent

        - ///
      • - ///
      • - ///

        - /// Description: This request does not support - /// content.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: UnresolvableGrantByEmailAddress

        - ///
      • - ///
      • - ///

        - /// Description: The email address you provided does not - /// match any account on record.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: UserKeyMustBeSpecified

        - ///
      • - ///
      • - ///

        - /// Description: The bucket POST must contain the specified - /// field name. If it is specified, check the order of the fields.

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    - ///

    - pub code: Option, - ///

    The error key.

    - pub key: Option, - ///

    The error message contains a generic description of the error condition in English. It - /// is intended for a human audience. Simple programs display the message directly to the end - /// user if they encounter an error condition they don't know how or don't care to handle. - /// Sophisticated programs with more exhaustive error handling and proper internationalization - /// are more likely to ignore the error message.

    - pub message: Option, - ///

    The version ID of the error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, -} - -impl fmt::Debug for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Error"); - if let Some(ref val) = self.code { - d.field("code", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.message { - d.field("message", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } -} - -pub type ErrorCode = String; - +///

    The error code is a string that uniquely identifies an error condition. It is meant to +/// be read and understood by programs that detect and handle errors by type. The following is +/// a list of Amazon S3 error codes. For more information, see Error responses.

    +///
      +///
    • +///
        +///
      • ///

        -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// Code: AccessDenied

        +///
      • +///
      • +///

        +/// Description: Access Denied

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: AccountProblem

        +///
      • +///
      • +///

        +/// Description: There is a problem with your Amazon Web Services account +/// that prevents the action from completing successfully. Contact Amazon Web Services Support +/// for further assistance.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: AllAccessDisabled

        +///
      • +///
      • +///

        +/// Description: All access to this Amazon S3 resource has been +/// disabled. Contact Amazon Web Services Support for further assistance.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: AmbiguousGrantByEmailAddress

        +///
      • +///
      • +///

        +/// Description: The email address you provided is +/// associated with more than one account.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: AuthorizationHeaderMalformed

        +///
      • +///
      • +///

        +/// Description: The authorization header you provided is +/// invalid.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// HTTP Status Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: BadDigest

        +///
      • +///
      • +///

        +/// Description: The Content-MD5 you specified did not +/// match what we received.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: BucketAlreadyExists

        +///
      • +///
      • +///

        +/// Description: The requested bucket name is not +/// available. The bucket namespace is shared by all users of the system. Please +/// select a different name and try again.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 409 Conflict

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: BucketAlreadyOwnedByYou

        +///
      • +///
      • +///

        +/// Description: The bucket you tried to create already +/// exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in +/// the North Virginia Region. For legacy compatibility, if you re-create an +/// existing bucket that you already own in the North Virginia Region, Amazon S3 returns +/// 200 OK and resets the bucket access control lists (ACLs).

        +///
      • +///
      • +///

        +/// Code: 409 Conflict (in all Regions except the North +/// Virginia Region)

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: BucketNotEmpty

        +///
      • +///
      • +///

        +/// Description: The bucket you tried to delete is not +/// empty.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 409 Conflict

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: CredentialsNotSupported

        +///
      • +///
      • +///

        +/// Description: This request does not support +/// credentials.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: CrossLocationLoggingProhibited

        +///
      • +///
      • +///

        +/// Description: Cross-location logging not allowed. +/// Buckets in one geographic location cannot log information to a bucket in +/// another location.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: EntityTooSmall

        +///
      • +///
      • +///

        +/// Description: Your proposed upload is smaller than the +/// minimum allowed object size.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: EntityTooLarge

        +///
      • +///
      • +///

        +/// Description: Your proposed upload exceeds the maximum +/// allowed object size.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: ExpiredToken

        +///
      • +///
      • +///

        +/// Description: The provided token has expired.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: IllegalVersioningConfigurationException

        +///
      • +///
      • +///

        +/// Description: Indicates that the versioning +/// configuration specified in the request is invalid.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: IncompleteBody

        +///
      • +///
      • +///

        +/// Description: You did not provide the number of bytes +/// specified by the Content-Length HTTP header

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: IncorrectNumberOfFilesInPostRequest

        +///
      • +///
      • +///

        +/// Description: POST requires exactly one file upload per +/// request.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InlineDataTooLarge

        +///
      • +///
      • +///

        +/// Description: Inline data exceeds the maximum allowed +/// size.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InternalError

        +///
      • +///
      • +///

        +/// Description: We encountered an internal error. Please +/// try again.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 500 Internal Server Error

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Server

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidAccessKeyId

        +///
      • +///
      • +///

        +/// Description: The Amazon Web Services access key ID you provided does +/// not exist in our records.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidAddressingHeader

        +///
      • +///
      • +///

        +/// Description: You must specify the Anonymous +/// role.

        +///
      • +///
      • +///

        +/// HTTP Status Code: N/A

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidArgument

        +///
      • +///
      • +///

        +/// Description: Invalid Argument

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidBucketName

        +///
      • +///
      • +///

        +/// Description: The specified bucket is not valid.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidBucketState

        +///
      • +///
      • +///

        +/// Description: The request is not valid with the current +/// state of the bucket.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 409 Conflict

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidDigest

        +///
      • +///
      • +///

        +/// Description: The Content-MD5 you specified is not +/// valid.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidEncryptionAlgorithmError

        +///
      • +///
      • +///

        +/// Description: The encryption request you specified is +/// not valid. The valid value is AES256.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidLocationConstraint

        +///
      • +///
      • +///

        +/// Description: The specified location constraint is not +/// valid. For more information about Regions, see How to Select +/// a Region for Your Buckets.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidObjectState

        +///
      • +///
      • +///

        +/// Description: The action is not valid for the current +/// state of the object.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidPart

        +///
      • +///
      • +///

        +/// Description: One or more of the specified parts could +/// not be found. The part might not have been uploaded, or the specified entity +/// tag might not have matched the part's entity tag.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidPartOrder

        +///
      • +///
      • +///

        +/// Description: The list of parts was not in ascending +/// order. Parts list must be specified in order by part number.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidPayer

        +///
      • +///
      • +///

        +/// Description: All access to this object has been +/// disabled. Please contact Amazon Web Services Support for further assistance.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidPolicyDocument

        +///
      • +///
      • +///

        +/// Description: The content of the form does not meet the +/// conditions specified in the policy document.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRange

        +///
      • +///
      • +///

        +/// Description: The requested range cannot be +/// satisfied.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 416 Requested Range Not +/// Satisfiable

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: Please use +/// AWS4-HMAC-SHA256.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: SOAP requests must be made over an HTTPS +/// connection.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: Amazon S3 Transfer Acceleration is not +/// supported for buckets with non-DNS compliant names.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: Amazon S3 Transfer Acceleration is not +/// supported for buckets with periods (.) in their names.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: Amazon S3 Transfer Accelerate endpoint only +/// supports virtual style requests.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: Amazon S3 Transfer Accelerate is not configured +/// on this bucket.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: Amazon S3 Transfer Accelerate is disabled on +/// this bucket.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: Amazon S3 Transfer Acceleration is not +/// supported on this bucket. Contact Amazon Web Services Support for more information.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidRequest

        +///
      • +///
      • +///

        +/// Description: Amazon S3 Transfer Acceleration cannot be +/// enabled on this bucket. Contact Amazon Web Services Support for more information.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// Code: N/A

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidSecurity

        +///
      • +///
      • +///

        +/// Description: The provided security credentials are not +/// valid.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidSOAPRequest

        +///
      • +///
      • +///

        +/// Description: The SOAP request body is invalid.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidStorageClass

        +///
      • +///
      • +///

        +/// Description: The storage class you specified is not +/// valid.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidTargetBucketForLogging

        +///
      • +///
      • +///

        +/// Description: The target bucket for logging does not +/// exist, is not owned by you, or does not have the appropriate grants for the +/// log-delivery group.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidToken

        +///
      • +///
      • +///

        +/// Description: The provided token is malformed or +/// otherwise invalid.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: InvalidURI

        +///
      • +///
      • +///

        +/// Description: Couldn't parse the specified URI.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: KeyTooLongError

        +///
      • +///
      • +///

        +/// Description: Your key is too long.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MalformedACLError

        +///
      • +///
      • +///

        +/// Description: The XML you provided was not well-formed +/// or did not validate against our published schema.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MalformedPOSTRequest

        +///
      • +///
      • +///

        +/// Description: The body of your POST request is not +/// well-formed multipart/form-data.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MalformedXML

        +///
      • +///
      • +///

        +/// Description: This happens when the user sends malformed +/// XML (XML that doesn't conform to the published XSD) for the configuration. The +/// error message is, "The XML you provided was not well-formed or did not validate +/// against our published schema."

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MaxMessageLengthExceeded

        +///
      • +///
      • +///

        +/// Description: Your request was too big.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MaxPostPreDataLengthExceededError

        +///
      • +///
      • +///

        +/// Description: Your POST request fields preceding the +/// upload file were too large.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MetadataTooLarge

        +///
      • +///
      • +///

        +/// Description: Your metadata headers exceed the maximum +/// allowed metadata size.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MethodNotAllowed

        +///
      • +///
      • +///

        +/// Description: The specified method is not allowed +/// against this resource.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 405 Method Not Allowed

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MissingAttachment

        +///
      • +///
      • +///

        +/// Description: A SOAP attachment was expected, but none +/// were found.

        +///
      • +///
      • +///

        +/// HTTP Status Code: N/A

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MissingContentLength

        +///
      • +///
      • +///

        +/// Description: You must provide the Content-Length HTTP +/// header.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 411 Length Required

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MissingRequestBodyError

        +///
      • +///
      • +///

        +/// Description: This happens when the user sends an empty +/// XML document as a request. The error message is, "Request body is empty." +///

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MissingSecurityElement

        +///
      • +///
      • +///

        +/// Description: The SOAP 1.1 request is missing a security +/// element.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: MissingSecurityHeader

        +///
      • +///
      • +///

        +/// Description: Your request is missing a required +/// header.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NoLoggingStatusForKey

        +///
      • +///
      • +///

        +/// Description: There is no such thing as a logging status +/// subresource for a key.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NoSuchBucket

        +///
      • +///
      • +///

        +/// Description: The specified bucket does not +/// exist.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 404 Not Found

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NoSuchBucketPolicy

        +///
      • +///
      • +///

        +/// Description: The specified bucket does not have a +/// bucket policy.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 404 Not Found

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NoSuchKey

        +///
      • +///
      • +///

        +/// Description: The specified key does not exist.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 404 Not Found

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NoSuchLifecycleConfiguration

        +///
      • +///
      • +///

        +/// Description: The lifecycle configuration does not +/// exist.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 404 Not Found

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NoSuchUpload

        +///
      • +///
      • +///

        +/// Description: The specified multipart upload does not +/// exist. The upload ID might be invalid, or the multipart upload might have been +/// aborted or completed.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 404 Not Found

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NoSuchVersion

        +///
      • +///
      • +///

        +/// Description: Indicates that the version ID specified in +/// the request does not match an existing version.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 404 Not Found

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NotImplemented

        +///
      • +///
      • +///

        +/// Description: A header you provided implies +/// functionality that is not implemented.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 501 Not Implemented

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Server

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: NotSignedUp

        +///
      • +///
      • +///

        +/// Description: Your account is not signed up for the Amazon S3 +/// service. You must sign up before you can use Amazon S3. You can sign up at the +/// following URL: Amazon S3 +///

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: OperationAborted

        +///
      • +///
      • +///

        +/// Description: A conflicting conditional action is +/// currently in progress against this resource. Try again.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 409 Conflict

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: PermanentRedirect

        +///
      • +///
      • +///

        +/// Description: The bucket you are attempting to access +/// must be addressed using the specified endpoint. Send all future requests to +/// this endpoint.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 301 Moved Permanently

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: PreconditionFailed

        +///
      • +///
      • +///

        +/// Description: At least one of the preconditions you +/// specified did not hold.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 412 Precondition Failed

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: Redirect

        +///
      • +///
      • +///

        +/// Description: Temporary redirect.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 307 Moved Temporarily

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: RestoreAlreadyInProgress

        +///
      • +///
      • +///

        +/// Description: Object restore is already in +/// progress.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 409 Conflict

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: RequestIsNotMultiPartContent

        +///
      • +///
      • +///

        +/// Description: Bucket POST must be of the enclosure-type +/// multipart/form-data.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: RequestTimeout

        +///
      • +///
      • +///

        +/// Description: Your socket connection to the server was +/// not read from or written to within the timeout period.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: RequestTimeTooSkewed

        +///
      • +///
      • +///

        +/// Description: The difference between the request time +/// and the server's time is too large.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: RequestTorrentOfBucketError

        +///
      • +///
      • +///

        +/// Description: Requesting the torrent file of a bucket is +/// not permitted.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: SignatureDoesNotMatch

        +///
      • +///
      • +///

        +/// Description: The request signature we calculated does +/// not match the signature you provided. Check your Amazon Web Services secret access key and +/// signing method. For more information, see REST +/// Authentication and SOAP +/// Authentication for details.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 403 Forbidden

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: ServiceUnavailable

        +///
      • +///
      • +///

        +/// Description: Service is unable to handle +/// request.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 503 Service Unavailable

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Server

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: SlowDown

        +///
      • +///
      • +///

        +/// Description: Reduce your request rate.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 503 Slow Down

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Server

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: TemporaryRedirect

        +///
      • +///
      • +///

        +/// Description: You are being redirected to the bucket +/// while DNS updates.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 307 Moved Temporarily

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: TokenRefreshRequired

        +///
      • +///
      • +///

        +/// Description: The provided token must be +/// refreshed.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: TooManyBuckets

        +///
      • +///
      • +///

        +/// Description: You have attempted to create more buckets +/// than allowed.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: UnexpectedContent

        +///
      • +///
      • +///

        +/// Description: This request does not support +/// content.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: UnresolvableGrantByEmailAddress

        +///
      • +///
      • +///

        +/// Description: The email address you provided does not +/// match any account on record.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: UserKeyMustBeSpecified

        +///
      • +///
      • +///

        +/// Description: The bucket POST must contain the specified +/// field name. If it is specified, check the order of the fields.

        +///
      • +///
      • +///

        +/// HTTP Status Code: 400 Bad Request

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    +///

    + pub code: Option, +///

    The error key.

    + pub key: Option, +///

    The error message contains a generic description of the error condition in English. It +/// is intended for a human audience. Simple programs display the message directly to the end +/// user if they encounter an error condition they don't know how or don't care to handle. +/// Sophisticated programs with more exhaustive error handling and proper internationalization +/// are more likely to ignore the error message.

    + pub message: Option, +///

    The version ID of the error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for Error { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Error"); +if let Some(ref val) = self.code { +d.field("code", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.message { +d.field("message", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ErrorCode = String; + +///

    +/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was /// unable to create the table, this structure contains the error code and error message. ///

    #[derive(Clone, Default, PartialEq)] -pub struct ErrorDetails { - ///

    - /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was - /// unable to create the table, this structure contains the error code. The possible error codes and - /// error messages are as follows: - ///

    - ///
      - ///
    • - ///

      - /// AccessDeniedCreatingResources - You don't have sufficient permissions to - /// create the required resources. Make sure that you have s3tables:CreateNamespace, - /// s3tables:CreateTable, s3tables:GetTable and - /// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata - /// table, you must delete the metadata configuration for this bucket, and then create a new - /// metadata configuration. - ///

      - ///
    • - ///
    • - ///

      - /// AccessDeniedWritingToTable - Unable to write to the metadata table because of - /// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new - /// metadata table. To create a new metadata table, you must delete the metadata configuration for - /// this bucket, and then create a new metadata configuration.

      - ///
    • - ///
    • - ///

      - /// DestinationTableNotFound - The destination table doesn't exist. To create a - /// new metadata table, you must delete the metadata configuration for this bucket, and then - /// create a new metadata configuration.

      - ///
    • - ///
    • - ///

      - /// ServerInternalError - An internal error has occurred. To create a new metadata - /// table, you must delete the metadata configuration for this bucket, and then create a new - /// metadata configuration.

      - ///
    • - ///
    • - ///

      - /// TableAlreadyExists - The table that you specified already exists in the table - /// bucket's namespace. Specify a different table name. To create a new metadata table, you must - /// delete the metadata configuration for this bucket, and then create a new metadata - /// configuration.

      - ///
    • - ///
    • - ///

      - /// TableBucketNotFound - The table bucket that you specified doesn't exist in - /// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new - /// metadata table, you must delete the metadata configuration for this bucket, and then create - /// a new metadata configuration.

      - ///
    • - ///
    +pub struct ErrorDetails { +///

    +/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error code. The possible error codes and +/// error messages are as follows: +///

    +///
      +///
    • +///

      +/// AccessDeniedCreatingResources - You don't have sufficient permissions to +/// create the required resources. Make sure that you have s3tables:CreateNamespace, +/// s3tables:CreateTable, s3tables:GetTable and +/// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata +/// table, you must delete the metadata configuration for this bucket, and then create a new +/// metadata configuration. +///

      +///
    • +///
    • +///

      +/// AccessDeniedWritingToTable - Unable to write to the metadata table because of +/// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new +/// metadata table. To create a new metadata table, you must delete the metadata configuration for +/// this bucket, and then create a new metadata configuration.

      +///
    • +///
    • +///

      +/// DestinationTableNotFound - The destination table doesn't exist. To create a +/// new metadata table, you must delete the metadata configuration for this bucket, and then +/// create a new metadata configuration.

      +///
    • +///
    • +///

      +/// ServerInternalError - An internal error has occurred. To create a new metadata +/// table, you must delete the metadata configuration for this bucket, and then create a new +/// metadata configuration.

      +///
    • +///
    • +///

      +/// TableAlreadyExists - The table that you specified already exists in the table +/// bucket's namespace. Specify a different table name. To create a new metadata table, you must +/// delete the metadata configuration for this bucket, and then create a new metadata +/// configuration.

      +///
    • +///
    • +///

      +/// TableBucketNotFound - The table bucket that you specified doesn't exist in +/// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new +/// metadata table, you must delete the metadata configuration for this bucket, and then create +/// a new metadata configuration.

      +///
    • +///
    + pub error_code: Option, +///

    +/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error message. The possible error codes and +/// error messages are as follows: +///

    +///
      +///
    • +///

      +/// AccessDeniedCreatingResources - You don't have sufficient permissions to +/// create the required resources. Make sure that you have s3tables:CreateNamespace, +/// s3tables:CreateTable, s3tables:GetTable and +/// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata +/// table, you must delete the metadata configuration for this bucket, and then create a new +/// metadata configuration. +///

      +///
    • +///
    • +///

      +/// AccessDeniedWritingToTable - Unable to write to the metadata table because of +/// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new +/// metadata table. To create a new metadata table, you must delete the metadata configuration for +/// this bucket, and then create a new metadata configuration.

      +///
    • +///
    • +///

      +/// DestinationTableNotFound - The destination table doesn't exist. To create a +/// new metadata table, you must delete the metadata configuration for this bucket, and then +/// create a new metadata configuration.

      +///
    • +///
    • +///

      +/// ServerInternalError - An internal error has occurred. To create a new metadata +/// table, you must delete the metadata configuration for this bucket, and then create a new +/// metadata configuration.

      +///
    • +///
    • +///

      +/// TableAlreadyExists - The table that you specified already exists in the table +/// bucket's namespace. Specify a different table name. To create a new metadata table, you must +/// delete the metadata configuration for this bucket, and then create a new metadata +/// configuration.

      +///
    • +///
    • +///

      +/// TableBucketNotFound - The table bucket that you specified doesn't exist in +/// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new +/// metadata table, you must delete the metadata configuration for this bucket, and then create +/// a new metadata configuration.

      +///
    • +///
    + pub error_message: Option, +} + +impl fmt::Debug for ErrorDetails { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ErrorDetails"); +if let Some(ref val) = self.error_code { +d.field("error_code", val); +} +if let Some(ref val) = self.error_message { +d.field("error_message", val); +} +d.finish_non_exhaustive() +} +} + + +///

    The error information.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ErrorDocument { +///

    The object key name to use when a 4XX class error occurs.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub key: ObjectKey, +} + +impl fmt::Debug for ErrorDocument { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ErrorDocument"); +d.field("key", &self.key); +d.finish_non_exhaustive() +} +} + + +pub type ErrorMessage = String; + +pub type Errors = List; + + +///

    A container for specifying the configuration for Amazon EventBridge.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct EventBridgeConfiguration { +} + +impl fmt::Debug for EventBridgeConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("EventBridgeConfiguration"); +d.finish_non_exhaustive() +} +} + + +pub type EventList = List; + +///

    Optional configuration to replicate existing source bucket objects.

    +/// +///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the +/// Amazon S3 User Guide.

    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ExistingObjectReplication { +///

    Specifies whether Amazon S3 replicates existing source bucket objects.

    + pub status: ExistingObjectReplicationStatus, +} + +impl fmt::Debug for ExistingObjectReplication { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ExistingObjectReplication"); +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ExistingObjectReplicationStatus(Cow<'static, str>); + +impl ExistingObjectReplicationStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ExistingObjectReplicationStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ExistingObjectReplicationStatus) -> Self { +s.0 +} +} + +impl FromStr for ExistingObjectReplicationStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Expiration = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ExpirationStatus(Cow<'static, str>); + +impl ExpirationStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ExpirationStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ExpirationStatus) -> Self { +s.0 +} +} + +impl FromStr for ExpirationStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ExpiredObjectDeleteMarker = bool; + +pub type Expires = Timestamp; + +pub type ExposeHeader = String; + +pub type ExposeHeaders = List; + +pub type Expression = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ExpressionType(Cow<'static, str>); + +impl ExpressionType { +pub const SQL: &'static str = "SQL"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ExpressionType { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ExpressionType) -> Self { +s.0 +} +} + +impl FromStr for ExpressionType { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type FetchOwner = bool; + +pub type FieldDelimiter = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct FileHeaderInfo(Cow<'static, str>); + +impl FileHeaderInfo { +pub const IGNORE: &'static str = "IGNORE"; + +pub const NONE: &'static str = "NONE"; + +pub const USE: &'static str = "USE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for FileHeaderInfo { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: FileHeaderInfo) -> Self { +s.0 +} +} + +impl FromStr for FileHeaderInfo { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned +/// to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of +/// the object key name. A prefix is a specific string of characters at the beginning of an +/// object key name, which you can use to organize objects. For example, you can start the key +/// names of related objects with a prefix, such as 2023- or +/// engineering/. Then, you can use FilterRule to find objects in +/// a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it +/// is at the end of the object key name instead of at the beginning.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct FilterRule { +///

    The object key name prefix or suffix identifying one or more objects to which the +/// filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and +/// suffixes are not supported. For more information, see Configuring Event Notifications +/// in the Amazon S3 User Guide.

    + pub name: Option, +///

    The value that the filter searches for in object key names.

    + pub value: Option, +} + +impl fmt::Debug for FilterRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("FilterRule"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.value { +d.field("value", val); +} +d.finish_non_exhaustive() +} +} + + +///

    A list of containers for the key-value pair that defines the criteria for the filter +/// rule.

    +pub type FilterRuleList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct FilterRuleName(Cow<'static, str>); + +impl FilterRuleName { +pub const PREFIX: &'static str = "prefix"; + +pub const SUFFIX: &'static str = "suffix"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for FilterRuleName { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: FilterRuleName) -> Self { +s.0 +} +} + +impl FromStr for FilterRuleName { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type FilterRuleValue = String; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAccelerateConfigurationInput { +///

    The name of the bucket for which the accelerate configuration is retrieved.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub request_payer: Option, +} + +impl fmt::Debug for GetBucketAccelerateConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAccelerateConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketAccelerateConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketAccelerateConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAccelerateConfigurationOutput { + pub request_charged: Option, +///

    The accelerate configuration of the bucket.

    + pub status: Option, +} + +impl fmt::Debug for GetBucketAccelerateConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAccelerateConfigurationOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAclInput { +///

    Specifies the S3 bucket whose ACL is being requested.

    +///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketAclInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAclInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketAclInput { +#[must_use] +pub fn builder() -> builders::GetBucketAclInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAclOutput { +///

    A list of grants.

    + pub grants: Option, +///

    Container for the bucket owner's display name and ID.

    + pub owner: Option, +} + +impl fmt::Debug for GetBucketAclOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAclOutput"); +if let Some(ref val) = self.grants { +d.field("grants", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAnalyticsConfigurationInput { +///

    The name of the bucket from which an analytics configuration is retrieved.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The ID that identifies the analytics configuration.

    + pub id: AnalyticsId, +} + +impl fmt::Debug for GetBucketAnalyticsConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAnalyticsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl GetBucketAnalyticsConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketAnalyticsConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAnalyticsConfigurationOutput { +///

    The configuration and any analyses for the analytics filter.

    + pub analytics_configuration: Option, +} + +impl fmt::Debug for GetBucketAnalyticsConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketAnalyticsConfigurationOutput"); +if let Some(ref val) = self.analytics_configuration { +d.field("analytics_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketCorsInput { +///

    The bucket name for which to get the cors configuration.

    +///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketCorsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketCorsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketCorsInput { +#[must_use] +pub fn builder() -> builders::GetBucketCorsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketCorsOutput { +///

    A set of origins and methods (cross-origin access that you want to allow). You can add +/// up to 100 rules to the configuration.

    + pub cors_rules: Option, +} + +impl fmt::Debug for GetBucketCorsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketCorsOutput"); +if let Some(ref val) = self.cors_rules { +d.field("cors_rules", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketEncryptionInput { +///

    The name of the bucket from which the server-side encryption configuration is +/// retrieved.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

    +///
    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketEncryptionInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketEncryptionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketEncryptionInput { +#[must_use] +pub fn builder() -> builders::GetBucketEncryptionInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketEncryptionOutput { + pub server_side_encryption_configuration: Option, +} + +impl fmt::Debug for GetBucketEncryptionOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketEncryptionOutput"); +if let Some(ref val) = self.server_side_encryption_configuration { +d.field("server_side_encryption_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketIntelligentTieringConfigurationInput { +///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, +///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, +} + +impl fmt::Debug for GetBucketIntelligentTieringConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationInput"); +d.field("bucket", &self.bucket); +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl GetBucketIntelligentTieringConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketIntelligentTieringConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketIntelligentTieringConfigurationOutput { +///

    Container for S3 Intelligent-Tiering configuration.

    + pub intelligent_tiering_configuration: Option, +} + +impl fmt::Debug for GetBucketIntelligentTieringConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationOutput"); +if let Some(ref val) = self.intelligent_tiering_configuration { +d.field("intelligent_tiering_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketInventoryConfigurationInput { +///

    The name of the bucket containing the inventory configuration to retrieve.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, +} + +impl fmt::Debug for GetBucketInventoryConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketInventoryConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl GetBucketInventoryConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketInventoryConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketInventoryConfigurationOutput { +///

    Specifies the inventory configuration.

    + pub inventory_configuration: Option, +} + +impl fmt::Debug for GetBucketInventoryConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketInventoryConfigurationOutput"); +if let Some(ref val) = self.inventory_configuration { +d.field("inventory_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLifecycleConfigurationInput { +///

    The name of the bucket for which to get the lifecycle information.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketLifecycleConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLifecycleConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketLifecycleConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketLifecycleConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLifecycleConfigurationOutput { +///

    Container for a lifecycle rule.

    + pub rules: Option, +///

    Indicates which default minimum object size behavior is applied to the lifecycle +/// configuration.

    +/// +///

    This parameter applies to general purpose buckets only. It isn't supported for +/// directory bucket lifecycle configurations.

    +///
    +///
      +///
    • +///

      +/// all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

      +///
    • +///
    • +///

      +/// varies_by_storage_class - Objects smaller than 128 KB will +/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By +/// default, all other storage classes will prevent transitions smaller than 128 KB. +///

      +///
    • +///
    +///

    To customize the minimum object size for any transition you can add a filter that +/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in +/// the body of your transition rule. Custom filters always take precedence over the default +/// transition behavior.

    + pub transition_default_minimum_object_size: Option, +} + +impl fmt::Debug for GetBucketLifecycleConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLifecycleConfigurationOutput"); +if let Some(ref val) = self.rules { +d.field("rules", val); +} +if let Some(ref val) = self.transition_default_minimum_object_size { +d.field("transition_default_minimum_object_size", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLocationInput { +///

    The name of the bucket for which to get the location.

    +///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketLocationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLocationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketLocationInput { +#[must_use] +pub fn builder() -> builders::GetBucketLocationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLocationOutput { +///

    Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported +/// location constraints by Region, see Regions and Endpoints.

    +///

    Buckets in Region us-east-1 have a LocationConstraint of +/// null. Buckets with a LocationConstraint of EU reside in eu-west-1.

    + pub location_constraint: Option, +} + +impl fmt::Debug for GetBucketLocationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLocationOutput"); +if let Some(ref val) = self.location_constraint { +d.field("location_constraint", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLoggingInput { +///

    The bucket name for which to get the logging information.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketLoggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLoggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketLoggingInput { +#[must_use] +pub fn builder() -> builders::GetBucketLoggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLoggingOutput { + pub logging_enabled: Option, +} + +impl fmt::Debug for GetBucketLoggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketLoggingOutput"); +if let Some(ref val) = self.logging_enabled { +d.field("logging_enabled", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetadataTableConfigurationInput { +///

    +/// The general purpose bucket that contains the metadata table configuration that you want to retrieve. +///

    + pub bucket: BucketName, +///

    +/// The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. +///

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketMetadataTableConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetadataTableConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketMetadataTableConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketMetadataTableConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetadataTableConfigurationOutput { +///

    +/// The metadata table configuration for the general purpose bucket. +///

    + pub get_bucket_metadata_table_configuration_result: Option, +} + +impl fmt::Debug for GetBucketMetadataTableConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetadataTableConfigurationOutput"); +if let Some(ref val) = self.get_bucket_metadata_table_configuration_result { +d.field("get_bucket_metadata_table_configuration_result", val); +} +d.finish_non_exhaustive() +} +} + + +///

    +/// The metadata table configuration for a general purpose bucket. +///

    +#[derive(Clone, PartialEq)] +pub struct GetBucketMetadataTableConfigurationResult { +///

    +/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error code and error message. +///

    + pub error: Option, +///

    +/// The metadata table configuration for a general purpose bucket. +///

    + pub metadata_table_configuration_result: MetadataTableConfigurationResult, +///

    +/// The status of the metadata table. The status values are: +///

    +///
      +///
    • +///

      +/// CREATING - The metadata table is in the process of being created in the +/// specified table bucket.

      +///
    • +///
    • +///

      +/// ACTIVE - The metadata table has been created successfully and records +/// are being delivered to the table. +///

      +///
    • +///
    • +///

      +/// FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver +/// records. See ErrorDetails for details.

      +///
    • +///
    + pub status: MetadataTableStatus, +} + +impl fmt::Debug for GetBucketMetadataTableConfigurationResult { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetadataTableConfigurationResult"); +if let Some(ref val) = self.error { +d.field("error", val); +} +d.field("metadata_table_configuration_result", &self.metadata_table_configuration_result); +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetricsConfigurationInput { +///

    The name of the bucket containing the metrics configuration to retrieve.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and +/// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, +} + +impl fmt::Debug for GetBucketMetricsConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetricsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl GetBucketMetricsConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketMetricsConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetricsConfigurationOutput { +///

    Specifies the metrics configuration.

    + pub metrics_configuration: Option, +} + +impl fmt::Debug for GetBucketMetricsConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketMetricsConfigurationOutput"); +if let Some(ref val) = self.metrics_configuration { +d.field("metrics_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketNotificationConfigurationInput { +///

    The name of the bucket for which to get the notification configuration.

    +///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketNotificationConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketNotificationConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketNotificationConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetBucketNotificationConfigurationInputBuilder { +default() +} +} + +///

    A container for specifying the notification configuration of the bucket. If this element +/// is empty, notifications are turned off for the bucket.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketNotificationConfigurationOutput { +///

    Enables delivery of events to Amazon EventBridge.

    + pub event_bridge_configuration: Option, +///

    Describes the Lambda functions to invoke and the events for which to invoke +/// them.

    + pub lambda_function_configurations: Option, +///

    The Amazon Simple Queue Service queues to publish messages to and the events for which +/// to publish messages.

    + pub queue_configurations: Option, +///

    The topic to which notifications are sent and the events for which notifications are +/// generated.

    + pub topic_configurations: Option, +} + +impl fmt::Debug for GetBucketNotificationConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketNotificationConfigurationOutput"); +if let Some(ref val) = self.event_bridge_configuration { +d.field("event_bridge_configuration", val); +} +if let Some(ref val) = self.lambda_function_configurations { +d.field("lambda_function_configurations", val); +} +if let Some(ref val) = self.queue_configurations { +d.field("queue_configurations", val); +} +if let Some(ref val) = self.topic_configurations { +d.field("topic_configurations", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketOwnershipControlsInput { +///

    The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. +///

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketOwnershipControlsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketOwnershipControlsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketOwnershipControlsInput { +#[must_use] +pub fn builder() -> builders::GetBucketOwnershipControlsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketOwnershipControlsOutput { +///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or +/// ObjectWriter) currently in effect for this Amazon S3 bucket.

    + pub ownership_controls: Option, +} + +impl fmt::Debug for GetBucketOwnershipControlsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketOwnershipControlsOutput"); +if let Some(ref val) = self.ownership_controls { +d.field("ownership_controls", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyInput { +///

    The bucket name to get the bucket policy for.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

    +///

    +/// Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    +/// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

    +///
    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketPolicyInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketPolicyInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketPolicyInput { +#[must_use] +pub fn builder() -> builders::GetBucketPolicyInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyOutput { +///

    The bucket policy as a JSON document.

    + pub policy: Option, +} + +impl fmt::Debug for GetBucketPolicyOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketPolicyOutput"); +if let Some(ref val) = self.policy { +d.field("policy", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyStatusInput { +///

    The name of the Amazon S3 bucket whose policy status you want to retrieve.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketPolicyStatusInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketPolicyStatusInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketPolicyStatusInput { +#[must_use] +pub fn builder() -> builders::GetBucketPolicyStatusInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyStatusOutput { +///

    The policy status for the specified bucket.

    + pub policy_status: Option, +} + +impl fmt::Debug for GetBucketPolicyStatusOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketPolicyStatusOutput"); +if let Some(ref val) = self.policy_status { +d.field("policy_status", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketReplicationInput { +///

    The bucket name for which to get the replication information.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketReplicationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketReplicationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketReplicationInput { +#[must_use] +pub fn builder() -> builders::GetBucketReplicationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketReplicationOutput { + pub replication_configuration: Option, +} + +impl fmt::Debug for GetBucketReplicationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketReplicationOutput"); +if let Some(ref val) = self.replication_configuration { +d.field("replication_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketRequestPaymentInput { +///

    The name of the bucket for which to get the payment request configuration

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketRequestPaymentInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketRequestPaymentInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketRequestPaymentInput { +#[must_use] +pub fn builder() -> builders::GetBucketRequestPaymentInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketRequestPaymentOutput { +///

    Specifies who pays for the download and request fees.

    + pub payer: Option, +} + +impl fmt::Debug for GetBucketRequestPaymentOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketRequestPaymentOutput"); +if let Some(ref val) = self.payer { +d.field("payer", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketTaggingInput { +///

    The name of the bucket for which to get the tagging information.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketTaggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketTaggingInput { +#[must_use] +pub fn builder() -> builders::GetBucketTaggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketTaggingOutput { +///

    Contains the tag set.

    + pub tag_set: TagSet, +} + +impl fmt::Debug for GetBucketTaggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketTaggingOutput"); +d.field("tag_set", &self.tag_set); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketVersioningInput { +///

    The name of the bucket for which to get the versioning information.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketVersioningInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketVersioningInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketVersioningInput { +#[must_use] +pub fn builder() -> builders::GetBucketVersioningInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketVersioningOutput { +///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This +/// element is only returned if the bucket has been configured with MFA delete. If the bucket +/// has never been so configured, this element is not returned.

    + pub mfa_delete: Option, +///

    The versioning state of the bucket.

    + pub status: Option, +} + +impl fmt::Debug for GetBucketVersioningOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketVersioningOutput"); +if let Some(ref val) = self.mfa_delete { +d.field("mfa_delete", val); +} +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketWebsiteInput { +///

    The bucket name for which to get the website configuration.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetBucketWebsiteInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketWebsiteInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetBucketWebsiteInput { +#[must_use] +pub fn builder() -> builders::GetBucketWebsiteInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketWebsiteOutput { +///

    The object key name of the website error document to use for 4XX class errors.

    + pub error_document: Option, +///

    The name of the index document for the website (for example +/// index.html).

    + pub index_document: Option, +///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 +/// bucket.

    + pub redirect_all_requests_to: Option, +///

    Rules that define when a redirect is applied and the redirect behavior.

    + pub routing_rules: Option, +} + +impl fmt::Debug for GetBucketWebsiteOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetBucketWebsiteOutput"); +if let Some(ref val) = self.error_document { +d.field("error_document", val); +} +if let Some(ref val) = self.index_document { +d.field("index_document", val); +} +if let Some(ref val) = self.redirect_all_requests_to { +d.field("redirect_all_requests_to", val); +} +if let Some(ref val) = self.routing_rules { +d.field("routing_rules", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAclInput { +///

    The bucket name that contains the object for which to get the ACL information.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The key of the object for which to get the ACL information.

    + pub key: ObjectKey, + pub request_payer: Option, +///

    Version ID used to reference a specific version of the object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for GetObjectAclInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAclInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectAclInput { +#[must_use] +pub fn builder() -> builders::GetObjectAclInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAclOutput { +///

    A list of grants.

    + pub grants: Option, +///

    Container for the bucket owner's display name and ID.

    + pub owner: Option, + pub request_charged: Option, +} + +impl fmt::Debug for GetObjectAclOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAclOutput"); +if let Some(ref val) = self.grants { +d.field("grants", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesInput { +///

    The name of the bucket that contains the object.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The object key.

    + pub key: ObjectKey, +///

    Sets the maximum number of parts to return.

    + pub max_parts: Option, +///

    Specifies the fields at the root level that you want returned in the response. Fields +/// that you do not specify are not returned.

    + pub object_attributes: ObjectAttributesList, +///

    Specifies the part after which listing should begin. Only parts with higher part numbers +/// will be listed.

    + pub part_number_marker: Option, + pub request_payer: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    The version ID used to reference a specific version of the object.

    +/// +///

    S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the +/// versionId query parameter in the request.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for GetObjectAttributesInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAttributesInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.max_parts { +d.field("max_parts", val); +} +d.field("object_attributes", &self.object_attributes); +if let Some(ref val) = self.part_number_marker { +d.field("part_number_marker", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectAttributesInput { +#[must_use] +pub fn builder() -> builders::GetObjectAttributesInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesOutput { +///

    The checksum or digest of the object.

    + pub checksum: Option, +///

    Specifies whether the object retrieved was (true) or was not +/// (false) a delete marker. If false, this response header does +/// not appear in the response. To learn more about delete markers, see Working with delete markers.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub delete_marker: Option, +///

    An ETag is an opaque identifier assigned by a web server to a specific version of a +/// resource found at a URL.

    + pub e_tag: Option, +///

    Date and time when the object was last modified.

    + pub last_modified: Option, +///

    A collection of parts associated with a multipart upload.

    + pub object_parts: Option, +///

    The size of the object in bytes.

    + pub object_size: Option, + pub request_charged: Option, +///

    Provides the storage class information of the object. Amazon S3 returns this header for all +/// objects except for S3 Standard storage class objects.

    +///

    For more information, see Storage Classes.

    +/// +///

    +/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub storage_class: Option, +///

    The version ID of the object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for GetObjectAttributesOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAttributesOutput"); +if let Some(ref val) = self.checksum { +d.field("checksum", val); +} +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.object_parts { +d.field("object_parts", val); +} +if let Some(ref val) = self.object_size { +d.field("object_size", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +///

    A collection of parts associated with a multipart upload.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesParts { +///

    Indicates whether the returned list of parts is truncated. A value of true +/// indicates that the list was truncated. A list can be truncated if the number of parts +/// exceeds the limit returned in the MaxParts element.

    + pub is_truncated: Option, +///

    The maximum number of parts allowed in the response.

    + pub max_parts: Option, +///

    When a list is truncated, this element specifies the last part in the list, as well as +/// the value to use for the PartNumberMarker request parameter in a subsequent +/// request.

    + pub next_part_number_marker: Option, +///

    The marker for the current part.

    + pub part_number_marker: Option, +///

    A container for elements related to a particular part. A response can contain zero or +/// more Parts elements.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - For +/// GetObjectAttributes, if a additional checksum (including +/// x-amz-checksum-crc32, x-amz-checksum-crc32c, +/// x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't +/// applied to the object specified in the request, the response doesn't return +/// Part.

      +///
    • +///
    • +///

      +/// Directory buckets - For +/// GetObjectAttributes, no matter whether a additional checksum is +/// applied to the object specified in the request, the response returns +/// Part.

      +///
    • +///
    +///
    + pub parts: Option, +///

    The total number of parts.

    + pub total_parts_count: Option, +} + +impl fmt::Debug for GetObjectAttributesParts { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectAttributesParts"); +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.max_parts { +d.field("max_parts", val); +} +if let Some(ref val) = self.next_part_number_marker { +d.field("next_part_number_marker", val); +} +if let Some(ref val) = self.part_number_marker { +d.field("part_number_marker", val); +} +if let Some(ref val) = self.parts { +d.field("parts", val); +} +if let Some(ref val) = self.total_parts_count { +d.field("total_parts_count", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectInput { +///

    The bucket name containing the object.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    To retrieve the checksum, this mode must be enabled.

    + pub checksum_mode: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Return the object only if its entity tag (ETag) is the same as the one specified in this +/// header; otherwise, return a 412 Precondition Failed error.

    +///

    If both of the If-Match and If-Unmodified-Since headers are +/// present in the request as follows: If-Match condition evaluates to +/// true, and; If-Unmodified-Since condition evaluates to +/// false; then, S3 returns 200 OK and the data requested.

    +///

    For more information about conditional requests, see RFC 7232.

    + pub if_match: Option, +///

    Return the object only if it has been modified since the specified time; otherwise, +/// return a 304 Not Modified error.

    +///

    If both of the If-None-Match and If-Modified-Since headers are +/// present in the request as follows: If-None-Match condition evaluates to +/// false, and; If-Modified-Since condition evaluates to +/// true; then, S3 returns 304 Not Modified status code.

    +///

    For more information about conditional requests, see RFC 7232.

    + pub if_modified_since: Option, +///

    Return the object only if its entity tag (ETag) is different from the one specified in +/// this header; otherwise, return a 304 Not Modified error.

    +///

    If both of the If-None-Match and If-Modified-Since headers are +/// present in the request as follows: If-None-Match condition evaluates to +/// false, and; If-Modified-Since condition evaluates to +/// true; then, S3 returns 304 Not Modified HTTP status +/// code.

    +///

    For more information about conditional requests, see RFC 7232.

    + pub if_none_match: Option, +///

    Return the object only if it has not been modified since the specified time; otherwise, +/// return a 412 Precondition Failed error.

    +///

    If both of the If-Match and If-Unmodified-Since headers are +/// present in the request as follows: If-Match condition evaluates to +/// true, and; If-Unmodified-Since condition evaluates to +/// false; then, S3 returns 200 OK and the data requested.

    +///

    For more information about conditional requests, see RFC 7232.

    + pub if_unmodified_since: Option, +///

    Key of the object to get.

    + pub key: ObjectKey, +///

    Part number of the object being read. This is a positive integer between 1 and 10,000. +/// Effectively performs a 'ranged' GET request for the part specified. Useful for downloading +/// just a part of an object.

    + pub part_number: Option, +///

    Downloads the specified byte range of an object. For more information about the HTTP +/// Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

    +/// +///

    Amazon S3 doesn't support retrieving multiple ranges of data per GET +/// request.

    +///
    + pub range: Option, + pub request_payer: Option, +///

    Sets the Cache-Control header of the response.

    + pub response_cache_control: Option, +///

    Sets the Content-Disposition header of the response.

    + pub response_content_disposition: Option, +///

    Sets the Content-Encoding header of the response.

    + pub response_content_encoding: Option, +///

    Sets the Content-Language header of the response.

    + pub response_content_language: Option, +///

    Sets the Content-Type header of the response.

    + pub response_content_type: Option, +///

    Sets the Expires header of the response.

    + pub response_expires: Option, +///

    Specifies the algorithm to use when decrypting the object (for example, +/// AES256).

    +///

    If you encrypt an object by using server-side encryption with customer-provided +/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, +/// you must use the following headers:

    +///
      +///
    • +///

      +/// x-amz-server-side-encryption-customer-algorithm +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key-MD5 +///

      +///
    • +///
    +///

    For more information about SSE-C, see Server-Side Encryption +/// (Using Customer-Provided Encryption Keys) in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key that you originally provided for Amazon S3 to +/// encrypt the data before storing it. This value is used to decrypt the object when +/// recovering it and must match the one used when storing the data. The key must be +/// appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

    +///

    If you encrypt an object by using server-side encryption with customer-provided +/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, +/// you must use the following headers:

    +///
      +///
    • +///

      +/// x-amz-server-side-encryption-customer-algorithm +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key-MD5 +///

      +///
    • +///
    +///

    For more information about SSE-C, see Server-Side Encryption +/// (Using Customer-Provided Encryption Keys) in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to +/// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption +/// key was transmitted without error.

    +///

    If you encrypt an object by using server-side encryption with customer-provided +/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, +/// you must use the following headers:

    +///
      +///
    • +///

      +/// x-amz-server-side-encryption-customer-algorithm +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key-MD5 +///

      +///
    • +///
    +///

    For more information about SSE-C, see Server-Side Encryption +/// (Using Customer-Provided Encryption Keys) in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    Version ID used to reference a specific version of the object.

    +///

    By default, the GetObject operation returns the current version of an +/// object. To return a different version, use the versionId subresource.

    +/// +///
      +///
    • +///

      If you include a versionId in your request header, you must have +/// the s3:GetObjectVersion permission to access a specific version of an +/// object. The s3:GetObject permission is not required in this +/// scenario.

      +///
    • +///
    • +///

      If you request the current version of an object without a specific +/// versionId in the request header, only the +/// s3:GetObject permission is required. The +/// s3:GetObjectVersion permission is not required in this +/// scenario.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the +/// versionId query parameter in the request.

      +///
    • +///
    +///
    +///

    For more information about versioning, see PutBucketVersioning.

    + pub version_id: Option, +} + +impl fmt::Debug for GetObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_mode { +d.field("checksum_mode", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_modified_since { +d.field("if_modified_since", val); +} +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); +} +if let Some(ref val) = self.if_unmodified_since { +d.field("if_unmodified_since", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +if let Some(ref val) = self.range { +d.field("range", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.response_cache_control { +d.field("response_cache_control", val); +} +if let Some(ref val) = self.response_content_disposition { +d.field("response_content_disposition", val); +} +if let Some(ref val) = self.response_content_encoding { +d.field("response_content_encoding", val); +} +if let Some(ref val) = self.response_content_language { +d.field("response_content_language", val); +} +if let Some(ref val) = self.response_content_type { +d.field("response_content_type", val); +} +if let Some(ref val) = self.response_expires { +d.field("response_expires", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectInput { +#[must_use] +pub fn builder() -> builders::GetObjectInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLegalHoldInput { +///

    The bucket name containing the object whose legal hold status you want to retrieve.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The key name for the object whose legal hold status you want to retrieve.

    + pub key: ObjectKey, + pub request_payer: Option, +///

    The version ID of the object whose legal hold status you want to retrieve.

    + pub version_id: Option, +} + +impl fmt::Debug for GetObjectLegalHoldInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectLegalHoldInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectLegalHoldInput { +#[must_use] +pub fn builder() -> builders::GetObjectLegalHoldInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLegalHoldOutput { +///

    The current legal hold status for the specified object.

    + pub legal_hold: Option, +} + +impl fmt::Debug for GetObjectLegalHoldOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectLegalHoldOutput"); +if let Some(ref val) = self.legal_hold { +d.field("legal_hold", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLockConfigurationInput { +///

    The bucket whose Object Lock configuration you want to retrieve.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetObjectLockConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectLockConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectLockConfigurationInput { +#[must_use] +pub fn builder() -> builders::GetObjectLockConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLockConfigurationOutput { +///

    The specified bucket's Object Lock configuration.

    + pub object_lock_configuration: Option, +} + +impl fmt::Debug for GetObjectLockConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectLockConfigurationOutput"); +if let Some(ref val) = self.object_lock_configuration { +d.field("object_lock_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Default)] +pub struct GetObjectOutput { +///

    Indicates that a range of bytes was specified in the request.

    + pub accept_ranges: Option, +///

    Object data.

    + pub body: Option, +///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with +/// Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more +/// information, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. For more information, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    The checksum type, which determines how part-level checksums are combined to create an +/// object-level checksum for multipart objects. You can use this header response to verify +/// that the checksum type that is received is the same checksum type that was specified in the +/// CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    Specifies presentational information for the object.

    + pub content_disposition: Option, +///

    Indicates what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

    + pub content_encoding: Option, +///

    The language the content is in.

    + pub content_language: Option, +///

    Size of the body in bytes.

    + pub content_length: Option, +///

    The portion of the object returned in the response.

    + pub content_range: Option, +///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, +///

    Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If +/// false, this response header does not appear in the response.

    +/// +///
      +///
    • +///

      If the current version of the object is a delete marker, Amazon S3 behaves as if the +/// object was deleted and includes x-amz-delete-marker: true in the +/// response.

      +///
    • +///
    • +///

      If the specified version in the request is a delete marker, the response +/// returns a 405 Method Not Allowed error and the Last-Modified: +/// timestamp response header.

      +///
    • +///
    +///
    + pub delete_marker: Option, +///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific +/// version of a resource found at a URL.

    + pub e_tag: Option, +///

    If the object expiration is configured (see +/// PutBucketLifecycleConfiguration +/// ), the response includes this +/// header. It includes the expiry-date and rule-id key-value pairs +/// providing object expiration information. The value of the rule-id is +/// URL-encoded.

    +/// +///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    +///
    + pub expiration: Option, +///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, +///

    Date and time when the object was last modified.

    +///

    +/// General purpose buckets - When you specify a +/// versionId of the object in your request, if the specified version in the +/// request is a delete marker, the response returns a 405 Method Not Allowed +/// error and the Last-Modified: timestamp response header.

    + pub last_modified: Option, +///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, +///

    This is set to the number of metadata entries not returned in the headers that are +/// prefixed with x-amz-meta-. This can happen if you create metadata using an API +/// like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, +/// you can create metadata whose values are not legal HTTP headers.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub missing_meta: Option, +///

    Indicates whether this object has an active legal hold. This field is only returned if +/// you have permission to view an object's legal hold status.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_legal_hold_status: Option, +///

    The Object Lock mode that's currently in place for this object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_mode: Option, +///

    The date and time when this object's Object Lock will expire.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_retain_until_date: Option, +///

    The count of parts this object has. This value is only returned if you specify +/// partNumber in your request and the object was uploaded as a multipart +/// upload.

    + pub parts_count: Option, +///

    Amazon S3 can return this if your request involves a bucket that is either a source or +/// destination in a replication rule.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub replication_status: Option, + pub request_charged: Option, +///

    Provides information about object restoration action and expiration time of the restored +/// object copy.

    +/// +///

    This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub restore: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, +///

    Provides storage class information of the object. Amazon S3 returns this header for all +/// objects except for S3 Standard storage class objects.

    +/// +///

    +/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub storage_class: Option, +///

    The number of tags, if any, on the object, when you have the relevant permission to read +/// object tags.

    +///

    You can use GetObjectTagging to retrieve +/// the tag set associated with an object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub tag_count: Option, +///

    Version ID of the object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +///

    If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub website_redirect_location: Option, +} + +impl fmt::Debug for GetObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectOutput"); +if let Some(ref val) = self.accept_ranges { +d.field("accept_ranges", val); +} +if let Some(ref val) = self.body { +d.field("body", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_length { +d.field("content_length", val); +} +if let Some(ref val) = self.content_range { +d.field("content_range", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.missing_meta { +d.field("missing_meta", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.parts_count { +d.field("parts_count", val); +} +if let Some(ref val) = self.replication_status { +d.field("replication_status", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.restore { +d.field("restore", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tag_count { +d.field("tag_count", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +d.finish_non_exhaustive() +} +} + + +pub type GetObjectResponseStatusCode = i32; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectRetentionInput { +///

    The bucket name containing the object whose retention settings you want to retrieve.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The key name for the object whose retention settings you want to retrieve.

    + pub key: ObjectKey, + pub request_payer: Option, +///

    The version ID for the object whose retention settings you want to retrieve.

    + pub version_id: Option, +} + +impl fmt::Debug for GetObjectRetentionInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectRetentionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectRetentionInput { +#[must_use] +pub fn builder() -> builders::GetObjectRetentionInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectRetentionOutput { +///

    The container element for an object's retention settings.

    + pub retention: Option, +} + +impl fmt::Debug for GetObjectRetentionOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectRetentionOutput"); +if let Some(ref val) = self.retention { +d.field("retention", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTaggingInput { +///

    The bucket name containing the object for which to get the tagging information.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Object key for which to get the tagging information.

    + pub key: ObjectKey, + pub request_payer: Option, +///

    The versionId of the object for which to get the tagging information.

    + pub version_id: Option, +} + +impl fmt::Debug for GetObjectTaggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectTaggingInput { +#[must_use] +pub fn builder() -> builders::GetObjectTaggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTaggingOutput { +///

    Contains the tag set.

    + pub tag_set: TagSet, +///

    The versionId of the object for which you got the tagging information.

    + pub version_id: Option, +} + +impl fmt::Debug for GetObjectTaggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectTaggingOutput"); +d.field("tag_set", &self.tag_set); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTorrentInput { +///

    The name of the bucket containing the object for which to get the torrent files.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The object key for which to get the information.

    + pub key: ObjectKey, + pub request_payer: Option, +} + +impl fmt::Debug for GetObjectTorrentInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectTorrentInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.finish_non_exhaustive() +} +} + +impl GetObjectTorrentInput { +#[must_use] +pub fn builder() -> builders::GetObjectTorrentInputBuilder { +default() +} +} + +#[derive(Default)] +pub struct GetObjectTorrentOutput { +///

    A Bencoded dictionary as defined by the BitTorrent specification

    + pub body: Option, + pub request_charged: Option, +} + +impl fmt::Debug for GetObjectTorrentOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetObjectTorrentOutput"); +if let Some(ref val) = self.body { +d.field("body", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct GetPublicAccessBlockInput { +///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want +/// to retrieve.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for GetPublicAccessBlockInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetPublicAccessBlockInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl GetPublicAccessBlockInput { +#[must_use] +pub fn builder() -> builders::GetPublicAccessBlockInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct GetPublicAccessBlockOutput { +///

    The PublicAccessBlock configuration currently in effect for this Amazon S3 +/// bucket.

    + pub public_access_block_configuration: Option, +} + +impl fmt::Debug for GetPublicAccessBlockOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GetPublicAccessBlockOutput"); +if let Some(ref val) = self.public_access_block_configuration { +d.field("public_access_block_configuration", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Container for S3 Glacier job parameters.

    +#[derive(Clone, PartialEq)] +pub struct GlacierJobParameters { +///

    Retrieval tier at which the restore will be processed.

    + pub tier: Tier, +} + +impl fmt::Debug for GlacierJobParameters { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("GlacierJobParameters"); +d.field("tier", &self.tier); +d.finish_non_exhaustive() +} +} + + +///

    Container for grant information.

    +#[derive(Clone, Default, PartialEq)] +pub struct Grant { +///

    The person being granted permissions.

    + pub grantee: Option, +///

    Specifies the permission given to the grantee.

    + pub permission: Option, +} + +impl fmt::Debug for Grant { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Grant"); +if let Some(ref val) = self.grantee { +d.field("grantee", val); +} +if let Some(ref val) = self.permission { +d.field("permission", val); +} +d.finish_non_exhaustive() +} +} + + +pub type GrantFullControl = String; + +pub type GrantRead = String; + +pub type GrantReadACP = String; + +pub type GrantWrite = String; + +pub type GrantWriteACP = String; + +///

    Container for the person being granted permissions.

    +#[derive(Clone, PartialEq)] +pub struct Grantee { +///

    Screen name of the grantee.

    + pub display_name: Option, +///

    Email address of the grantee.

    +/// +///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    +///
      +///
    • +///

      US East (N. Virginia)

      +///
    • +///
    • +///

      US West (N. California)

      +///
    • +///
    • +///

      US West (Oregon)

      +///
    • +///
    • +///

      Asia Pacific (Singapore)

      +///
    • +///
    • +///

      Asia Pacific (Sydney)

      +///
    • +///
    • +///

      Asia Pacific (Tokyo)

      +///
    • +///
    • +///

      Europe (Ireland)

      +///
    • +///
    • +///

      South America (São Paulo)

      +///
    • +///
    +///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    +///
    + pub email_address: Option, +///

    The canonical user ID of the grantee.

    + pub id: Option, +///

    Type of grantee

    + pub type_: Type, +///

    URI of the grantee group.

    + pub uri: Option, +} + +impl fmt::Debug for Grantee { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Grantee"); +if let Some(ref val) = self.display_name { +d.field("display_name", val); +} +if let Some(ref val) = self.email_address { +d.field("email_address", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.field("type_", &self.type_); +if let Some(ref val) = self.uri { +d.field("uri", val); +} +d.finish_non_exhaustive() +} +} + + +pub type Grants = List; + +#[derive(Clone, Default, PartialEq)] +pub struct HeadBucketInput { +///

    The bucket name.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for HeadBucketInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("HeadBucketInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl HeadBucketInput { +#[must_use] +pub fn builder() -> builders::HeadBucketInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct HeadBucketOutput { +///

    Indicates whether the bucket name used in the request is an access point alias.

    +/// +///

    For directory buckets, the value of this field is false.

    +///
    + pub access_point_alias: Option, +///

    The name of the location where the bucket will be created.

    +///

    For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

    +/// +///

    This functionality is only supported by directory buckets.

    +///
    + pub bucket_location_name: Option, +///

    The type of location where the bucket is created.

    +/// +///

    This functionality is only supported by directory buckets.

    +///
    + pub bucket_location_type: Option, +///

    The Region that the bucket is located.

    + pub bucket_region: Option, +} + +impl fmt::Debug for HeadBucketOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("HeadBucketOutput"); +if let Some(ref val) = self.access_point_alias { +d.field("access_point_alias", val); +} +if let Some(ref val) = self.bucket_location_name { +d.field("bucket_location_name", val); +} +if let Some(ref val) = self.bucket_location_type { +d.field("bucket_location_type", val); +} +if let Some(ref val) = self.bucket_region { +d.field("bucket_region", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct HeadObjectInput { +///

    The name of the bucket that contains the object.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    To retrieve the checksum, this parameter must be enabled.

    +///

    +/// General purpose buckets - +/// If you enable checksum mode and the object is uploaded with a +/// checksum +/// and encrypted with an Key Management Service (KMS) key, you must have permission to use the +/// kms:Decrypt action to retrieve the checksum.

    +///

    +/// Directory buckets - If you enable +/// ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service +/// (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and +/// kms:Decrypt permissions in IAM identity-based policies and KMS key +/// policies for the KMS key to retrieve the checksum of the object.

    + pub checksum_mode: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Return the object only if its entity tag (ETag) is the same as the one specified; +/// otherwise, return a 412 (precondition failed) error.

    +///

    If both of the If-Match and If-Unmodified-Since headers are +/// present in the request as follows:

    +///
      +///
    • +///

      +/// If-Match condition evaluates to true, and;

      +///
    • +///
    • +///

      +/// If-Unmodified-Since condition evaluates to false;

      +///
    • +///
    +///

    Then Amazon S3 returns 200 OK and the data requested.

    +///

    For more information about conditional requests, see RFC 7232.

    + pub if_match: Option, +///

    Return the object only if it has been modified since the specified time; otherwise, +/// return a 304 (not modified) error.

    +///

    If both of the If-None-Match and If-Modified-Since headers are +/// present in the request as follows:

    +///
      +///
    • +///

      +/// If-None-Match condition evaluates to false, and;

      +///
    • +///
    • +///

      +/// If-Modified-Since condition evaluates to true;

      +///
    • +///
    +///

    Then Amazon S3 returns the 304 Not Modified response code.

    +///

    For more information about conditional requests, see RFC 7232.

    + pub if_modified_since: Option, +///

    Return the object only if its entity tag (ETag) is different from the one specified; +/// otherwise, return a 304 (not modified) error.

    +///

    If both of the If-None-Match and If-Modified-Since headers are +/// present in the request as follows:

    +///
      +///
    • +///

      +/// If-None-Match condition evaluates to false, and;

      +///
    • +///
    • +///

      +/// If-Modified-Since condition evaluates to true;

      +///
    • +///
    +///

    Then Amazon S3 returns the 304 Not Modified response code.

    +///

    For more information about conditional requests, see RFC 7232.

    + pub if_none_match: Option, +///

    Return the object only if it has not been modified since the specified time; otherwise, +/// return a 412 (precondition failed) error.

    +///

    If both of the If-Match and If-Unmodified-Since headers are +/// present in the request as follows:

    +///
      +///
    • +///

      +/// If-Match condition evaluates to true, and;

      +///
    • +///
    • +///

      +/// If-Unmodified-Since condition evaluates to false;

      +///
    • +///
    +///

    Then Amazon S3 returns 200 OK and the data requested.

    +///

    For more information about conditional requests, see RFC 7232.

    + pub if_unmodified_since: Option, +///

    The object key.

    + pub key: ObjectKey, +///

    Part number of the object being read. This is a positive integer between 1 and 10,000. +/// Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about +/// the size of the part and the number of parts in this object.

    + pub part_number: Option, +///

    HeadObject returns only the metadata for an object. If the Range is satisfiable, only +/// the ContentLength is affected in the response. If the Range is not +/// satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

    + pub range: Option, + pub request_payer: Option, +///

    Sets the Cache-Control header of the response.

    + pub response_cache_control: Option, +///

    Sets the Content-Disposition header of the response.

    + pub response_content_disposition: Option, +///

    Sets the Content-Encoding header of the response.

    + pub response_content_encoding: Option, +///

    Sets the Content-Language header of the response.

    + pub response_content_language: Option, +///

    Sets the Content-Type header of the response.

    + pub response_content_type: Option, +///

    Sets the Expires header of the response.

    + pub response_expires: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    Version ID used to reference a specific version of the object.

    +/// +///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for HeadObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("HeadObjectInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_mode { +d.field("checksum_mode", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_modified_since { +d.field("if_modified_since", val); +} +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); +} +if let Some(ref val) = self.if_unmodified_since { +d.field("if_unmodified_since", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +if let Some(ref val) = self.range { +d.field("range", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.response_cache_control { +d.field("response_cache_control", val); +} +if let Some(ref val) = self.response_content_disposition { +d.field("response_content_disposition", val); +} +if let Some(ref val) = self.response_content_encoding { +d.field("response_content_encoding", val); +} +if let Some(ref val) = self.response_content_language { +d.field("response_content_language", val); +} +if let Some(ref val) = self.response_content_type { +d.field("response_content_type", val); +} +if let Some(ref val) = self.response_expires { +d.field("response_expires", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl HeadObjectInput { +#[must_use] +pub fn builder() -> builders::HeadObjectInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct HeadObjectOutput { +///

    Indicates that a range of bytes was specified.

    + pub accept_ranges: Option, +///

    The archive state of the head object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub archive_status: Option, +///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with +/// Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more +/// information, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    The checksum type, which determines how part-level checksums are combined to create an +/// object-level checksum for multipart objects. You can use this header response to verify +/// that the checksum type that is received is the same checksum type that was specified in +/// CreateMultipartUpload request. For more +/// information, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    Specifies presentational information for the object.

    + pub content_disposition: Option, +///

    Indicates what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

    + pub content_encoding: Option, +///

    The language the content is in.

    + pub content_language: Option, +///

    Size of the body in bytes.

    + pub content_length: Option, +///

    The portion of the object returned in the response for a GET request.

    + pub content_range: Option, +///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, +///

    Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If +/// false, this response header does not appear in the response.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub delete_marker: Option, +///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific +/// version of a resource found at a URL.

    + pub e_tag: Option, +///

    If the object expiration is configured (see +/// PutBucketLifecycleConfiguration +/// ), the response includes this +/// header. It includes the expiry-date and rule-id key-value pairs +/// providing object expiration information. The value of the rule-id is +/// URL-encoded.

    +/// +///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    +///
    + pub expiration: Option, +///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, +///

    Date and time when the object was last modified.

    + pub last_modified: Option, +///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, +///

    This is set to the number of metadata entries not returned in x-amz-meta +/// headers. This can happen if you create metadata using an API like SOAP that supports more +/// flexible metadata than the REST API. For example, using SOAP, you can create metadata whose +/// values are not legal HTTP headers.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub missing_meta: Option, +///

    Specifies whether a legal hold is in effect for this object. This header is only +/// returned if the requester has the s3:GetObjectLegalHold permission. This +/// header is not returned if the specified version of this object has never had a legal hold +/// applied. For more information about S3 Object Lock, see Object Lock.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_legal_hold_status: Option, +///

    The Object Lock mode, if any, that's in effect for this object. This header is only +/// returned if the requester has the s3:GetObjectRetention permission. For more +/// information about S3 Object Lock, see Object Lock.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_mode: Option, +///

    The date and time when the Object Lock retention period expires. This header is only +/// returned if the requester has the s3:GetObjectRetention permission.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_retain_until_date: Option, +///

    The count of parts this object has. This value is only returned if you specify +/// partNumber in your request and the object was uploaded as a multipart +/// upload.

    + pub parts_count: Option, +///

    Amazon S3 can return this header if your request involves a bucket that is either a source or +/// a destination in a replication rule.

    +///

    In replication, you have a source bucket on which you configure replication and +/// destination bucket or buckets where Amazon S3 stores object replicas. When you request an object +/// (GetObject) or object metadata (HeadObject) from these +/// buckets, Amazon S3 will return the x-amz-replication-status header in the response +/// as follows:

    +///
      +///
    • +///

      +/// If requesting an object from the source bucket, +/// Amazon S3 will return the x-amz-replication-status header if the object in +/// your request is eligible for replication.

      +///

      For example, suppose that in your replication configuration, you specify object +/// prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix +/// TaxDocs. Any objects you upload with this key name prefix, for +/// example TaxDocs/document1.pdf, are eligible for replication. For any +/// object request with this key name prefix, Amazon S3 will return the +/// x-amz-replication-status header with value PENDING, COMPLETED or +/// FAILED indicating object replication status.

      +///
    • +///
    • +///

      +/// If requesting an object from a destination +/// bucket, Amazon S3 will return the x-amz-replication-status header +/// with value REPLICA if the object in your request is a replica that Amazon S3 created and +/// there is no replica modification replication in progress.

      +///
    • +///
    • +///

      +/// When replicating objects to multiple destination +/// buckets, the x-amz-replication-status header acts +/// differently. The header of the source object will only return a value of COMPLETED +/// when replication is successful to all destinations. The header will remain at value +/// PENDING until replication has completed for all destinations. If one or more +/// destinations fails replication the header will return FAILED.

      +///
    • +///
    +///

    For more information, see Replication.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub replication_status: Option, + pub request_charged: Option, +///

    If the object is an archived object (an object whose storage class is GLACIER), the +/// response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

    +///

    If an archive copy is already restored, the header value indicates when Amazon S3 is +/// scheduled to delete the object copy. For example:

    +///

    +/// x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 +/// GMT" +///

    +///

    If the object restoration is in progress, the header returns the value +/// ongoing-request="true".

    +///

    For more information about archiving objects, see Transitioning Objects: General Considerations.

    +/// +///

    This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub restore: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms, aws:kms:dsse).

    + pub server_side_encryption: Option, +///

    Provides storage class information of the object. Amazon S3 returns this header for all +/// objects except for S3 Standard storage class objects.

    +///

    For more information, see Storage Classes.

    +/// +///

    +/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub storage_class: Option, +///

    Version ID of the object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +///

    If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub website_redirect_location: Option, +} + +impl fmt::Debug for HeadObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("HeadObjectOutput"); +if let Some(ref val) = self.accept_ranges { +d.field("accept_ranges", val); +} +if let Some(ref val) = self.archive_status { +d.field("archive_status", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_length { +d.field("content_length", val); +} +if let Some(ref val) = self.content_range { +d.field("content_range", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.missing_meta { +d.field("missing_meta", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.parts_count { +d.field("parts_count", val); +} +if let Some(ref val) = self.replication_status { +d.field("replication_status", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.restore { +d.field("restore", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +d.finish_non_exhaustive() +} +} + + +pub type HostName = String; + +pub type HttpErrorCodeReturnedEquals = String; + +pub type HttpRedirectCode = String; + +pub type ID = String; + +pub type IfMatch = ETagCondition; + +pub type IfMatchInitiatedTime = Timestamp; + +pub type IfMatchLastModifiedTime = Timestamp; + +pub type IfMatchSize = i64; + +pub type IfModifiedSince = Timestamp; + +pub type IfNoneMatch = ETagCondition; + +pub type IfUnmodifiedSince = Timestamp; + +///

    Container for the Suffix element.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IndexDocument { +///

    A suffix that is appended to a request that is for a directory on the website endpoint. +/// (For example, if the suffix is index.html and you make a request to +/// samplebucket/images/, the data that is returned will be for the object with +/// the key name images/index.html.) The suffix must not be empty and must not +/// include a slash character.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub suffix: Suffix, +} + +impl fmt::Debug for IndexDocument { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("IndexDocument"); +d.field("suffix", &self.suffix); +d.finish_non_exhaustive() +} +} + + +pub type Initiated = Timestamp; + +///

    Container element that identifies who initiated the multipart upload.

    +#[derive(Clone, Default, PartialEq)] +pub struct Initiator { +///

    Name of the Principal.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub display_name: Option, +///

    If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the +/// principal is an IAM User, it provides a user ARN value.

    +/// +///

    +/// Directory buckets - If the principal is an +/// Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it +/// provides a user ARN value.

    +///
    + pub id: Option, +} + +impl fmt::Debug for Initiator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Initiator"); +if let Some(ref val) = self.display_name { +d.field("display_name", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Describes the serialization format of the object.

    +#[derive(Clone, Default, PartialEq)] +pub struct InputSerialization { +///

    Describes the serialization of a CSV-encoded object.

    + pub csv: Option, +///

    Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: +/// NONE.

    + pub compression_type: Option, +///

    Specifies JSON as object's input serialization format.

    + pub json: Option, +///

    Specifies Parquet as object's input serialization format.

    + pub parquet: Option, +} + +impl fmt::Debug for InputSerialization { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InputSerialization"); +if let Some(ref val) = self.csv { +d.field("csv", val); +} +if let Some(ref val) = self.compression_type { +d.field("compression_type", val); +} +if let Some(ref val) = self.json { +d.field("json", val); +} +if let Some(ref val) = self.parquet { +d.field("parquet", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct IntelligentTieringAccessTier(Cow<'static, str>); + +impl IntelligentTieringAccessTier { +pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; + +pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for IntelligentTieringAccessTier { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: IntelligentTieringAccessTier) -> Self { +s.0 +} +} + +impl FromStr for IntelligentTieringAccessTier { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    A container for specifying S3 Intelligent-Tiering filters. The filters determine the +/// subset of objects to which the rule applies.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringAndOperator { +///

    An object key name prefix that identifies the subset of objects to which the +/// configuration applies.

    + pub prefix: Option, +///

    All of these tags must exist in the object's tag set in order for the configuration to +/// apply.

    + pub tags: Option, +} + +impl fmt::Debug for IntelligentTieringAndOperator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("IntelligentTieringAndOperator"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

    +///

    For information about the S3 Intelligent-Tiering storage class, see Storage class +/// for automatically optimizing frequently and infrequently accessed +/// objects.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringConfiguration { +///

    Specifies a bucket filter. The configuration only includes objects that meet the +/// filter's criteria.

    + pub filter: Option, +///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, +///

    Specifies the status of the configuration.

    + pub status: IntelligentTieringStatus, +///

    Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

    + pub tierings: TieringList, +} + +impl fmt::Debug for IntelligentTieringConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("IntelligentTieringConfiguration"); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +d.field("id", &self.id); +d.field("status", &self.status); +d.field("tierings", &self.tierings); +d.finish_non_exhaustive() +} +} + +impl Default for IntelligentTieringConfiguration { +fn default() -> Self { +Self { +filter: None, +id: default(), +status: String::new().into(), +tierings: default(), +} +} +} + + +pub type IntelligentTieringConfigurationList = List; + +pub type IntelligentTieringDays = i32; + +///

    The Filter is used to identify objects that the S3 Intelligent-Tiering +/// configuration applies to.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringFilter { +///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. +/// The operator must have at least two predicates, and an object must match all of the +/// predicates in order for the filter to apply.

    + pub and: Option, +///

    An object key name prefix that identifies the subset of objects to which the rule +/// applies.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub prefix: Option, + pub tag: Option, +} + +impl fmt::Debug for IntelligentTieringFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("IntelligentTieringFilter"); +if let Some(ref val) = self.and { +d.field("and", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tag { +d.field("tag", val); +} +d.finish_non_exhaustive() +} +} + + +pub type IntelligentTieringId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct IntelligentTieringStatus(Cow<'static, str>); + +impl IntelligentTieringStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for IntelligentTieringStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: IntelligentTieringStatus) -> Self { +s.0 +} +} + +impl FromStr for IntelligentTieringStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Object is archived and inaccessible until restored.

    +///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage +/// class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access +/// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you +/// must first restore a copy using RestoreObject. Otherwise, this +/// operation returns an InvalidObjectState error. For information about restoring +/// archived objects, see Restoring Archived Objects in +/// the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq)] +pub struct InvalidObjectState { + pub access_tier: Option, + pub storage_class: Option, +} + +impl fmt::Debug for InvalidObjectState { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InvalidObjectState"); +if let Some(ref val) = self.access_tier { +d.field("access_tier", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() +} +} + + +///

    You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

    +///
      +///
    • +///

      Cannot specify both a write offset value and user-defined object metadata for existing objects.

      +///
    • +///
    • +///

      Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

      +///
    • +///
    • +///

      Request body cannot be empty when 'write offset' is specified.

      +///
    • +///
    +#[derive(Clone, Default, PartialEq)] +pub struct InvalidRequest { +} + +impl fmt::Debug for InvalidRequest { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InvalidRequest"); +d.finish_non_exhaustive() +} +} + + +///

    +/// The write offset value that you specified does not match the current object size. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct InvalidWriteOffset { +} + +impl fmt::Debug for InvalidWriteOffset { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InvalidWriteOffset"); +d.finish_non_exhaustive() +} +} + + +///

    Specifies the inventory configuration for an Amazon S3 bucket. For more information, see +/// GET Bucket inventory in the Amazon S3 API Reference.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryConfiguration { +///

    Contains information about where to publish the inventory results.

    + pub destination: InventoryDestination, +///

    Specifies an inventory filter. The inventory only includes objects that meet the +/// filter's criteria.

    + pub filter: Option, +///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, +///

    Object versions to include in the inventory list. If set to All, the list +/// includes all the object versions, which adds the version-related fields +/// VersionId, IsLatest, and DeleteMarker to the +/// list. If set to Current, the list does not contain these version-related +/// fields.

    + pub included_object_versions: InventoryIncludedObjectVersions, +///

    Specifies whether the inventory is enabled or disabled. If set to True, an +/// inventory list is generated. If set to False, no inventory list is +/// generated.

    + pub is_enabled: IsEnabled, +///

    Contains the optional fields that are included in the inventory results.

    + pub optional_fields: Option, +///

    Specifies the schedule for generating inventory results.

    + pub schedule: InventorySchedule, +} + +impl fmt::Debug for InventoryConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryConfiguration"); +d.field("destination", &self.destination); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +d.field("id", &self.id); +d.field("included_object_versions", &self.included_object_versions); +d.field("is_enabled", &self.is_enabled); +if let Some(ref val) = self.optional_fields { +d.field("optional_fields", val); +} +d.field("schedule", &self.schedule); +d.finish_non_exhaustive() +} +} + +impl Default for InventoryConfiguration { +fn default() -> Self { +Self { +destination: default(), +filter: None, +id: default(), +included_object_versions: String::new().into(), +is_enabled: default(), +optional_fields: None, +schedule: default(), +} +} +} + + +pub type InventoryConfigurationList = List; + +///

    Specifies the inventory configuration for an Amazon S3 bucket.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryDestination { +///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) +/// where inventory results are published.

    + pub s3_bucket_destination: InventoryS3BucketDestination, +} + +impl fmt::Debug for InventoryDestination { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryDestination"); +d.field("s3_bucket_destination", &self.s3_bucket_destination); +d.finish_non_exhaustive() +} +} + +impl Default for InventoryDestination { +fn default() -> Self { +Self { +s3_bucket_destination: default(), +} +} +} + + +///

    Contains the type of server-side encryption used to encrypt the inventory +/// results.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct InventoryEncryption { +///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    + pub ssekms: Option, +///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    + pub sses3: Option, +} + +impl fmt::Debug for InventoryEncryption { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryEncryption"); +if let Some(ref val) = self.ssekms { +d.field("ssekms", val); +} +if let Some(ref val) = self.sses3 { +d.field("sses3", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Specifies an inventory filter. The inventory only includes objects that meet the +/// filter's criteria.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct InventoryFilter { +///

    The prefix that an object must have to be included in the inventory results.

    + pub prefix: Prefix, +} + +impl fmt::Debug for InventoryFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryFilter"); +d.field("prefix", &self.prefix); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryFormat(Cow<'static, str>); + +impl InventoryFormat { +pub const CSV: &'static str = "CSV"; + +pub const ORC: &'static str = "ORC"; + +pub const PARQUET: &'static str = "Parquet"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for InventoryFormat { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: InventoryFormat) -> Self { +s.0 +} +} + +impl FromStr for InventoryFormat { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryFrequency(Cow<'static, str>); + +impl InventoryFrequency { +pub const DAILY: &'static str = "Daily"; + +pub const WEEKLY: &'static str = "Weekly"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for InventoryFrequency { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: InventoryFrequency) -> Self { +s.0 +} +} + +impl FromStr for InventoryFrequency { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type InventoryId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryIncludedObjectVersions(Cow<'static, str>); + +impl InventoryIncludedObjectVersions { +pub const ALL: &'static str = "All"; + +pub const CURRENT: &'static str = "Current"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for InventoryIncludedObjectVersions { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: InventoryIncludedObjectVersions) -> Self { +s.0 +} +} + +impl FromStr for InventoryIncludedObjectVersions { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryOptionalField(Cow<'static, str>); + +impl InventoryOptionalField { +pub const BUCKET_KEY_STATUS: &'static str = "BucketKeyStatus"; + +pub const CHECKSUM_ALGORITHM: &'static str = "ChecksumAlgorithm"; + +pub const E_TAG: &'static str = "ETag"; + +pub const ENCRYPTION_STATUS: &'static str = "EncryptionStatus"; + +pub const INTELLIGENT_TIERING_ACCESS_TIER: &'static str = "IntelligentTieringAccessTier"; + +pub const IS_MULTIPART_UPLOADED: &'static str = "IsMultipartUploaded"; + +pub const LAST_MODIFIED_DATE: &'static str = "LastModifiedDate"; + +pub const OBJECT_ACCESS_CONTROL_LIST: &'static str = "ObjectAccessControlList"; + +pub const OBJECT_LOCK_LEGAL_HOLD_STATUS: &'static str = "ObjectLockLegalHoldStatus"; + +pub const OBJECT_LOCK_MODE: &'static str = "ObjectLockMode"; + +pub const OBJECT_LOCK_RETAIN_UNTIL_DATE: &'static str = "ObjectLockRetainUntilDate"; + +pub const OBJECT_OWNER: &'static str = "ObjectOwner"; + +pub const REPLICATION_STATUS: &'static str = "ReplicationStatus"; + +pub const SIZE: &'static str = "Size"; + +pub const STORAGE_CLASS: &'static str = "StorageClass"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for InventoryOptionalField { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: InventoryOptionalField) -> Self { +s.0 +} +} + +impl FromStr for InventoryOptionalField { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type InventoryOptionalFields = List; + +///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) +/// where inventory results are published.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryS3BucketDestination { +///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the +/// owner is not validated before exporting data.

    +/// +///

    Although this value is optional, we strongly recommend that you set it to help +/// prevent problems if the destination bucket ownership changes.

    +///
    + pub account_id: Option, +///

    The Amazon Resource Name (ARN) of the bucket where inventory results will be +/// published.

    + pub bucket: BucketName, +///

    Contains the type of server-side encryption used to encrypt the inventory +/// results.

    + pub encryption: Option, +///

    Specifies the output format of the inventory results.

    + pub format: InventoryFormat, +///

    The prefix that is prepended to all inventory results.

    + pub prefix: Option, +} + +impl fmt::Debug for InventoryS3BucketDestination { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventoryS3BucketDestination"); +if let Some(ref val) = self.account_id { +d.field("account_id", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.encryption { +d.field("encryption", val); +} +d.field("format", &self.format); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} +} + +impl Default for InventoryS3BucketDestination { +fn default() -> Self { +Self { +account_id: None, +bucket: default(), +encryption: None, +format: String::new().into(), +prefix: None, +} +} +} + + +///

    Specifies the schedule for generating inventory results.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventorySchedule { +///

    Specifies how frequently inventory results are produced.

    + pub frequency: InventoryFrequency, +} + +impl fmt::Debug for InventorySchedule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("InventorySchedule"); +d.field("frequency", &self.frequency); +d.finish_non_exhaustive() +} +} + +impl Default for InventorySchedule { +fn default() -> Self { +Self { +frequency: String::new().into(), +} +} +} + + +pub type IsEnabled = bool; + +pub type IsLatest = bool; + +pub type IsPublic = bool; + +pub type IsRestoreInProgress = bool; + +pub type IsTruncated = bool; + +///

    Specifies JSON as object's input serialization format.

    +#[derive(Clone, Default, PartialEq)] +pub struct JSONInput { +///

    The type of JSON. Valid values: Document, Lines.

    + pub type_: Option, +} + +impl fmt::Debug for JSONInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("JSONInput"); +if let Some(ref val) = self.type_ { +d.field("type_", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Specifies JSON as request's output serialization format.

    +#[derive(Clone, Default, PartialEq)] +pub struct JSONOutput { +///

    The value used to separate individual records in the output. If no value is specified, +/// Amazon S3 uses a newline character ('\n').

    + pub record_delimiter: Option, +} + +impl fmt::Debug for JSONOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("JSONOutput"); +if let Some(ref val) = self.record_delimiter { +d.field("record_delimiter", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct JSONType(Cow<'static, str>); + +impl JSONType { +pub const DOCUMENT: &'static str = "DOCUMENT"; + +pub const LINES: &'static str = "LINES"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for JSONType { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: JSONType) -> Self { +s.0 +} +} + +impl FromStr for JSONType { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type KMSContext = String; + +pub type KeyCount = i32; + +pub type KeyMarker = String; + +pub type KeyPrefixEquals = String; + +pub type LambdaFunctionArn = String; + +///

    A container for specifying the configuration for Lambda notifications.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LambdaFunctionConfiguration { +///

    The Amazon S3 bucket event for which to invoke the Lambda function. For more information, +/// see Supported +/// Event Types in the Amazon S3 User Guide.

    + pub events: EventList, + pub filter: Option, + pub id: Option, +///

    The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the +/// specified event type occurs.

    + pub lambda_function_arn: LambdaFunctionArn, +} + +impl fmt::Debug for LambdaFunctionConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LambdaFunctionConfiguration"); +d.field("events", &self.events); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.field("lambda_function_arn", &self.lambda_function_arn); +d.finish_non_exhaustive() +} +} + + +pub type LambdaFunctionConfigurationList = List; + +pub type LastModified = Timestamp; + +pub type LastModifiedTime = Timestamp; + +///

    Container for the expiration for the lifecycle of the object.

    +///

    For more information see, Managing your storage +/// lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleExpiration { +///

    Indicates at what date the object is to be moved or deleted. The date value must conform +/// to the ISO 8601 format. The time is always midnight UTC.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub date: Option, +///

    Indicates the lifetime, in days, of the objects that are subject to the rule. The value +/// must be a non-zero positive integer.

    + pub days: Option, +///

    Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set +/// to true, the delete marker will be expired; if set to false the policy takes no action. +/// This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub expired_object_delete_marker: Option, +} + +impl fmt::Debug for LifecycleExpiration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LifecycleExpiration"); +if let Some(ref val) = self.date { +d.field("date", val); +} +if let Some(ref val) = self.days { +d.field("days", val); +} +if let Some(ref val) = self.expired_object_delete_marker { +d.field("expired_object_delete_marker", val); +} +d.finish_non_exhaustive() +} +} + + +///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    +///

    For more information see, Managing your storage +/// lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRule { + pub abort_incomplete_multipart_upload: Option, +///

    Specifies the expiration for the lifecycle of the object in the form of date, days and, +/// whether the object has a delete marker.

    + pub expiration: Option, +///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A +/// Filter must have exactly one of Prefix, Tag, or +/// And specified. Filter is required if the +/// LifecycleRule does not contain a Prefix element.

    +/// +///

    +/// Tag filters are not supported for directory buckets.

    +///
    + pub filter: Option, +///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    + pub id: Option, + pub noncurrent_version_expiration: Option, +///

    Specifies the transition rule for the lifecycle rule that describes when noncurrent +/// objects transition to a specific storage class. If your bucket is versioning-enabled (or +/// versioning is suspended), you can set this action to request that Amazon S3 transition +/// noncurrent object versions to a specific storage class at a set period in the object's +/// lifetime.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub noncurrent_version_transitions: Option, +///

    Prefix identifying one or more objects to which the rule applies. This is +/// no longer used; use Filter instead.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub prefix: Option, +///

    If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not +/// currently being applied.

    + pub status: ExpirationStatus, +///

    Specifies when an Amazon S3 object transitions to a specified storage class.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub transitions: Option, +} + +impl fmt::Debug for LifecycleRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LifecycleRule"); +if let Some(ref val) = self.abort_incomplete_multipart_upload { +d.field("abort_incomplete_multipart_upload", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +if let Some(ref val) = self.noncurrent_version_expiration { +d.field("noncurrent_version_expiration", val); +} +if let Some(ref val) = self.noncurrent_version_transitions { +d.field("noncurrent_version_transitions", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.field("status", &self.status); +if let Some(ref val) = self.transitions { +d.field("transitions", val); +} +d.finish_non_exhaustive() +} +} + + +///

    This is used in a Lifecycle Rule Filter to apply a logical AND to two or more +/// predicates. The Lifecycle Rule will apply to any object matching all of the predicates +/// configured inside the And operator.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRuleAndOperator { +///

    Minimum object size to which the rule applies.

    + pub object_size_greater_than: Option, +///

    Maximum object size to which the rule applies.

    + pub object_size_less_than: Option, +///

    Prefix identifying one or more objects to which the rule applies.

    + pub prefix: Option, +///

    All of these tags must exist in the object's tag set in order for the rule to +/// apply.

    + pub tags: Option, +} + +impl fmt::Debug for LifecycleRuleAndOperator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LifecycleRuleAndOperator"); +if let Some(ref val) = self.object_size_greater_than { +d.field("object_size_greater_than", val); +} +if let Some(ref val) = self.object_size_less_than { +d.field("object_size_less_than", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} +} + + +///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A +/// Filter can have exactly one of Prefix, Tag, +/// ObjectSizeGreaterThan, ObjectSizeLessThan, or And +/// specified. If the Filter element is left empty, the Lifecycle Rule applies to +/// all objects in the bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRuleFilter { + pub and: Option, +///

    Minimum object size to which the rule applies.

    + pub object_size_greater_than: Option, +///

    Maximum object size to which the rule applies.

    + pub object_size_less_than: Option, +///

    Prefix identifying one or more objects to which the rule applies.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub prefix: Option, +///

    This tag must exist in the object's tag set in order for the rule to apply.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub tag: Option, +} + +impl fmt::Debug for LifecycleRuleFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LifecycleRuleFilter"); +if let Some(ref val) = self.and { +d.field("and", val); +} +if let Some(ref val) = self.object_size_greater_than { +d.field("object_size_greater_than", val); +} +if let Some(ref val) = self.object_size_less_than { +d.field("object_size_less_than", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tag { +d.field("tag", val); +} +d.finish_non_exhaustive() +} +} + + +pub type LifecycleRules = List; + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketAnalyticsConfigurationsInput { +///

    The name of the bucket from which analytics configurations are retrieved.

    + pub bucket: BucketName, +///

    The ContinuationToken that represents a placeholder from where this request +/// should begin.

    + pub continuation_token: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for ListBucketAnalyticsConfigurationsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketAnalyticsConfigurationsInput { +#[must_use] +pub fn builder() -> builders::ListBucketAnalyticsConfigurationsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketAnalyticsConfigurationsOutput { +///

    The list of analytics configurations for a bucket.

    + pub analytics_configuration_list: Option, +///

    The marker that is used as a starting point for this analytics configuration list +/// response. This value is present if it was sent in the request.

    + pub continuation_token: Option, +///

    Indicates whether the returned list of analytics configurations is complete. A value of +/// true indicates that the list is not complete and the NextContinuationToken will be provided +/// for a subsequent request.

    + pub is_truncated: Option, +///

    +/// NextContinuationToken is sent when isTruncated is true, which +/// indicates that there are more analytics configurations to list. The next request must +/// include this NextContinuationToken. The token is obfuscated and is not a +/// usable value.

    + pub next_continuation_token: Option, +} + +impl fmt::Debug for ListBucketAnalyticsConfigurationsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsOutput"); +if let Some(ref val) = self.analytics_configuration_list { +d.field("analytics_configuration_list", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketIntelligentTieringConfigurationsInput { +///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, +///

    The ContinuationToken that represents a placeholder from where this request +/// should begin.

    + pub continuation_token: Option, +} + +impl fmt::Debug for ListBucketIntelligentTieringConfigurationsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketIntelligentTieringConfigurationsInput { +#[must_use] +pub fn builder() -> builders::ListBucketIntelligentTieringConfigurationsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketIntelligentTieringConfigurationsOutput { +///

    The ContinuationToken that represents a placeholder from where this request +/// should begin.

    + pub continuation_token: Option, +///

    The list of S3 Intelligent-Tiering configurations for a bucket.

    + pub intelligent_tiering_configuration_list: Option, +///

    Indicates whether the returned list of analytics configurations is complete. A value of +/// true indicates that the list is not complete and the +/// NextContinuationToken will be provided for a subsequent request.

    + pub is_truncated: Option, +///

    The marker used to continue this inventory configuration listing. Use the +/// NextContinuationToken from this response to continue the listing in a +/// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    + pub next_continuation_token: Option, +} + +impl fmt::Debug for ListBucketIntelligentTieringConfigurationsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsOutput"); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.intelligent_tiering_configuration_list { +d.field("intelligent_tiering_configuration_list", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketInventoryConfigurationsInput { +///

    The name of the bucket containing the inventory configurations to retrieve.

    + pub bucket: BucketName, +///

    The marker used to continue an inventory configuration listing that has been truncated. +/// Use the NextContinuationToken from a previously truncated list response to +/// continue the listing. The continuation token is an opaque value that Amazon S3 +/// understands.

    + pub continuation_token: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for ListBucketInventoryConfigurationsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketInventoryConfigurationsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketInventoryConfigurationsInput { +#[must_use] +pub fn builder() -> builders::ListBucketInventoryConfigurationsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketInventoryConfigurationsOutput { +///

    If sent in the request, the marker that is used as a starting point for this inventory +/// configuration list response.

    + pub continuation_token: Option, +///

    The list of inventory configurations for a bucket.

    + pub inventory_configuration_list: Option, +///

    Tells whether the returned list of inventory configurations is complete. A value of true +/// indicates that the list is not complete and the NextContinuationToken is provided for a +/// subsequent request.

    + pub is_truncated: Option, +///

    The marker used to continue this inventory configuration listing. Use the +/// NextContinuationToken from this response to continue the listing in a +/// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    + pub next_continuation_token: Option, +} + +impl fmt::Debug for ListBucketInventoryConfigurationsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketInventoryConfigurationsOutput"); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.inventory_configuration_list { +d.field("inventory_configuration_list", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketMetricsConfigurationsInput { +///

    The name of the bucket containing the metrics configurations to retrieve.

    + pub bucket: BucketName, +///

    The marker that is used to continue a metrics configuration listing that has been +/// truncated. Use the NextContinuationToken from a previously truncated list +/// response to continue the listing. The continuation token is an opaque value that Amazon S3 +/// understands.

    + pub continuation_token: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for ListBucketMetricsConfigurationsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketMetricsConfigurationsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketMetricsConfigurationsInput { +#[must_use] +pub fn builder() -> builders::ListBucketMetricsConfigurationsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketMetricsConfigurationsOutput { +///

    The marker that is used as a starting point for this metrics configuration list +/// response. This value is present if it was sent in the request.

    + pub continuation_token: Option, +///

    Indicates whether the returned list of metrics configurations is complete. A value of +/// true indicates that the list is not complete and the NextContinuationToken will be provided +/// for a subsequent request.

    + pub is_truncated: Option, +///

    The list of metrics configurations for a bucket.

    + pub metrics_configuration_list: Option, +///

    The marker used to continue a metrics configuration listing that has been truncated. Use +/// the NextContinuationToken from a previously truncated list response to +/// continue the listing. The continuation token is an opaque value that Amazon S3 +/// understands.

    + pub next_continuation_token: Option, +} + +impl fmt::Debug for ListBucketMetricsConfigurationsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketMetricsConfigurationsOutput"); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.metrics_configuration_list { +d.field("metrics_configuration_list", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketsInput { +///

    Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services +/// Region must be expressed according to the Amazon Web Services Region code, such as us-west-2 +/// for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services +/// Regions, see Regions and Endpoints.

    +/// +///

    Requests made to a Regional endpoint that is different from the +/// bucket-region parameter are not supported. For example, if you want to +/// limit the response to your buckets in Region us-west-2, the request must be +/// made to an endpoint in Region us-west-2.

    +///
    + pub bucket_region: Option, +///

    +/// ContinuationToken indicates to Amazon S3 that the list is being continued on +/// this bucket with a token. ContinuationToken is obfuscated and is not a real +/// key. You can use this ContinuationToken for pagination of the list results.

    +///

    Length Constraints: Minimum length of 0. Maximum length of 1024.

    +///

    Required: No.

    +/// +///

    If you specify the bucket-region, prefix, or continuation-token +/// query parameters without using max-buckets to set the maximum number of buckets returned in the response, +/// Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

    +///
    + pub continuation_token: Option, +///

    Maximum number of buckets to be returned in response. When the number is more than the +/// count of buckets that are owned by an Amazon Web Services account, return all the buckets in +/// response.

    + pub max_buckets: Option, +///

    Limits the response to bucket names that begin with the specified bucket name +/// prefix.

    + pub prefix: Option, +} + +impl fmt::Debug for ListBucketsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketsInput"); +if let Some(ref val) = self.bucket_region { +d.field("bucket_region", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.max_buckets { +d.field("max_buckets", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} +} + +impl ListBucketsInput { +#[must_use] +pub fn builder() -> builders::ListBucketsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketsOutput { +///

    The list of buckets owned by the requester.

    + pub buckets: Option, +///

    +/// ContinuationToken is included in the response when there are more buckets +/// that can be listed with pagination. The next ListBuckets request to Amazon S3 can +/// be continued with this ContinuationToken. ContinuationToken is +/// obfuscated and is not a real bucket.

    + pub continuation_token: Option, +///

    The owner of the buckets listed.

    + pub owner: Option, +///

    If Prefix was sent with the request, it is included in the response.

    +///

    All bucket names in the response begin with the specified bucket name prefix.

    + pub prefix: Option, +} + +impl fmt::Debug for ListBucketsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListBucketsOutput"); +if let Some(ref val) = self.buckets { +d.field("buckets", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListDirectoryBucketsInput { +///

    +/// ContinuationToken indicates to Amazon S3 that the list is being continued on +/// buckets in this account with a token. ContinuationToken is obfuscated and is +/// not a real bucket name. You can use this ContinuationToken for the pagination +/// of the list results.

    + pub continuation_token: Option, +///

    Maximum number of buckets to be returned in response. When the number is more than the +/// count of buckets that are owned by an Amazon Web Services account, return all the buckets in +/// response.

    + pub max_directory_buckets: Option, +} + +impl fmt::Debug for ListDirectoryBucketsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListDirectoryBucketsInput"); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.max_directory_buckets { +d.field("max_directory_buckets", val); +} +d.finish_non_exhaustive() +} +} + +impl ListDirectoryBucketsInput { +#[must_use] +pub fn builder() -> builders::ListDirectoryBucketsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListDirectoryBucketsOutput { +///

    The list of buckets owned by the requester.

    + pub buckets: Option, +///

    If ContinuationToken was sent with the request, it is included in the +/// response. You can use the returned ContinuationToken for pagination of the +/// list response.

    + pub continuation_token: Option, +} + +impl fmt::Debug for ListDirectoryBucketsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListDirectoryBucketsOutput"); +if let Some(ref val) = self.buckets { +d.field("buckets", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListMultipartUploadsInput { +///

    The name of the bucket to which the multipart upload was initiated.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Character you use to group keys.

    +///

    All keys that contain the same string between the prefix, if specified, and the first +/// occurrence of the delimiter after the prefix are grouped under a single result element, +/// CommonPrefixes. If you don't specify the prefix parameter, then the +/// substring starts at the beginning of the key. The keys that are grouped under +/// CommonPrefixes result element are not returned elsewhere in the +/// response.

    +/// +///

    +/// Directory buckets - For directory buckets, / is the only supported delimiter.

    +///
    + pub delimiter: Option, + pub encoding_type: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Specifies the multipart upload after which listing should begin.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - For +/// general purpose buckets, key-marker is an object key. Together with +/// upload-id-marker, this parameter specifies the multipart upload +/// after which listing should begin.

      +///

      If upload-id-marker is not specified, only the keys +/// lexicographically greater than the specified key-marker will be +/// included in the list.

      +///

      If upload-id-marker is specified, any multipart uploads for a key +/// equal to the key-marker might also be included, provided those +/// multipart uploads have upload IDs lexicographically greater than the specified +/// upload-id-marker.

      +///
    • +///
    • +///

      +/// Directory buckets - For +/// directory buckets, key-marker is obfuscated and isn't a real object +/// key. The upload-id-marker parameter isn't supported by +/// directory buckets. To list the additional multipart uploads, you only need to set +/// the value of key-marker to the NextKeyMarker value from +/// the previous response.

      +///

      In the ListMultipartUploads response, the multipart uploads aren't +/// sorted lexicographically based on the object keys. +/// +///

      +///
    • +///
    +///
    + pub key_marker: Option, +///

    Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response +/// body. 1,000 is the maximum number of uploads that can be returned in a response.

    + pub max_uploads: Option, +///

    Lists in-progress uploads only for those keys that begin with the specified prefix. You +/// can use prefixes to separate a bucket into different grouping of keys. (You can think of +/// using prefix to make groups in the same way that you'd use a folder in a file +/// system.)

    +/// +///

    +/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    +///
    + pub prefix: Option, + pub request_payer: Option, +///

    Together with key-marker, specifies the multipart upload after which listing should +/// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. +/// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the +/// list only if they have an upload ID lexicographically greater than the specified +/// upload-id-marker.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub upload_id_marker: Option, +} + +impl fmt::Debug for ListMultipartUploadsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListMultipartUploadsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.key_marker { +d.field("key_marker", val); +} +if let Some(ref val) = self.max_uploads { +d.field("max_uploads", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.upload_id_marker { +d.field("upload_id_marker", val); +} +d.finish_non_exhaustive() +} +} + +impl ListMultipartUploadsInput { +#[must_use] +pub fn builder() -> builders::ListMultipartUploadsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListMultipartUploadsOutput { +///

    The name of the bucket to which the multipart upload was initiated. Does not return the +/// access point ARN or access point alias if used.

    + pub bucket: Option, +///

    If you specify a delimiter in the request, then the result returns each distinct key +/// prefix containing the delimiter in a CommonPrefixes element. The distinct key +/// prefixes are returned in the Prefix child element.

    +/// +///

    +/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    +///
    + pub common_prefixes: Option, +///

    Contains the delimiter you specified in the request. If you don't specify a delimiter in +/// your request, this element is absent from the response.

    +/// +///

    +/// Directory buckets - For directory buckets, / is the only supported delimiter.

    +///
    + pub delimiter: Option, +///

    Encoding type used by Amazon S3 to encode object keys in the response.

    +///

    If you specify the encoding-type request parameter, Amazon S3 includes this +/// element in the response, and returns encoded key name values in the following response +/// elements:

    +///

    +/// Delimiter, KeyMarker, Prefix, +/// NextKeyMarker, Key.

    + pub encoding_type: Option, +///

    Indicates whether the returned list of multipart uploads is truncated. A value of true +/// indicates that the list was truncated. The list can be truncated if the number of multipart +/// uploads exceeds the limit allowed or specified by max uploads.

    + pub is_truncated: Option, +///

    The key at or after which the listing began.

    + pub key_marker: Option, +///

    Maximum number of multipart uploads that could have been included in the +/// response.

    + pub max_uploads: Option, +///

    When a list is truncated, this element specifies the value that should be used for the +/// key-marker request parameter in a subsequent request.

    + pub next_key_marker: Option, +///

    When a list is truncated, this element specifies the value that should be used for the +/// upload-id-marker request parameter in a subsequent request.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub next_upload_id_marker: Option, +///

    When a prefix is provided in the request, this field contains the specified prefix. The +/// result contains only keys starting with the specified prefix.

    +/// +///

    +/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    +///
    + pub prefix: Option, + pub request_charged: Option, +///

    Together with key-marker, specifies the multipart upload after which listing should +/// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. +/// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the +/// list only if they have an upload ID lexicographically greater than the specified +/// upload-id-marker.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub upload_id_marker: Option, +///

    Container for elements related to a particular multipart upload. A response can contain +/// zero or more Upload elements.

    + pub uploads: Option, +} + +impl fmt::Debug for ListMultipartUploadsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListMultipartUploadsOutput"); +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.common_prefixes { +d.field("common_prefixes", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.key_marker { +d.field("key_marker", val); +} +if let Some(ref val) = self.max_uploads { +d.field("max_uploads", val); +} +if let Some(ref val) = self.next_key_marker { +d.field("next_key_marker", val); +} +if let Some(ref val) = self.next_upload_id_marker { +d.field("next_upload_id_marker", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.upload_id_marker { +d.field("upload_id_marker", val); +} +if let Some(ref val) = self.uploads { +d.field("uploads", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectVersionsInput { +///

    The bucket name that contains the objects.

    + pub bucket: BucketName, +///

    A delimiter is a character that you specify to group keys. All keys that contain the +/// same string between the prefix and the first occurrence of the delimiter are +/// grouped under a single result element in CommonPrefixes. These groups are +/// counted as one result against the max-keys limitation. These keys are not +/// returned elsewhere in the response.

    + pub delimiter: Option, + pub encoding_type: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Specifies the key to start with when listing objects in a bucket.

    + pub key_marker: Option, +///

    Sets the maximum number of keys returned in the response. By default, the action returns +/// up to 1,000 key names. The response might contain fewer keys but will never contain more. +/// If additional keys satisfy the search criteria, but were not returned because +/// max-keys was exceeded, the response contains +/// true. To return the additional keys, +/// see key-marker and version-id-marker.

    + pub max_keys: Option, +///

    Specifies the optional fields that you want returned in the response. Fields that you do +/// not specify are not returned.

    + pub optional_object_attributes: Option, +///

    Use this parameter to select only those keys that begin with the specified prefix. You +/// can use prefixes to separate a bucket into different groupings of keys. (You can think of +/// using prefix to make groups in the same way that you'd use a folder in a file +/// system.) You can use prefix with delimiter to roll up numerous +/// objects into a single result under CommonPrefixes.

    + pub prefix: Option, + pub request_payer: Option, +///

    Specifies the object version you want to start listing from.

    + pub version_id_marker: Option, +} + +impl fmt::Debug for ListObjectVersionsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectVersionsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.key_marker { +d.field("key_marker", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.optional_object_attributes { +d.field("optional_object_attributes", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id_marker { +d.field("version_id_marker", val); +} +d.finish_non_exhaustive() +} +} + +impl ListObjectVersionsInput { +#[must_use] +pub fn builder() -> builders::ListObjectVersionsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectVersionsOutput { +///

    All of the keys rolled up into a common prefix count as a single return when calculating +/// the number of returns.

    + pub common_prefixes: Option, +///

    Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

    + pub delete_markers: Option, +///

    The delimiter grouping the included keys. A delimiter is a character that you specify to +/// group keys. All keys that contain the same string between the prefix and the first +/// occurrence of the delimiter are grouped under a single result element in +/// CommonPrefixes. These groups are counted as one result against the +/// max-keys limitation. These keys are not returned elsewhere in the +/// response.

    + pub delimiter: Option, +///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    +///

    If you specify the encoding-type request parameter, Amazon S3 includes this +/// element in the response, and returns encoded key name values in the following response +/// elements:

    +///

    +/// KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

    + pub encoding_type: Option, +///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search +/// criteria. If your results were truncated, you can make a follow-up paginated request by +/// using the NextKeyMarker and NextVersionIdMarker response +/// parameters as a starting place in another request to return the rest of the results.

    + pub is_truncated: Option, +///

    Marks the last key returned in a truncated response.

    + pub key_marker: Option, +///

    Specifies the maximum number of objects to return.

    + pub max_keys: Option, +///

    The bucket name.

    + pub name: Option, +///

    When the number of responses exceeds the value of MaxKeys, +/// NextKeyMarker specifies the first key not returned that satisfies the +/// search criteria. Use this value for the key-marker request parameter in a subsequent +/// request.

    + pub next_key_marker: Option, +///

    When the number of responses exceeds the value of MaxKeys, +/// NextVersionIdMarker specifies the first object version not returned that +/// satisfies the search criteria. Use this value for the version-id-marker +/// request parameter in a subsequent request.

    + pub next_version_id_marker: Option, +///

    Selects objects that start with the value supplied by this parameter.

    + pub prefix: Option, + pub request_charged: Option, +///

    Marks the last version of the key returned in a truncated response.

    + pub version_id_marker: Option, +///

    Container for version information.

    + pub versions: Option, +} + +impl fmt::Debug for ListObjectVersionsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectVersionsOutput"); +if let Some(ref val) = self.common_prefixes { +d.field("common_prefixes", val); +} +if let Some(ref val) = self.delete_markers { +d.field("delete_markers", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.key_marker { +d.field("key_marker", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.next_key_marker { +d.field("next_key_marker", val); +} +if let Some(ref val) = self.next_version_id_marker { +d.field("next_version_id_marker", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.version_id_marker { +d.field("version_id_marker", val); +} +if let Some(ref val) = self.versions { +d.field("versions", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsInput { +///

    The name of the bucket containing the objects.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    A delimiter is a character that you use to group keys.

    + pub delimiter: Option, + pub encoding_type: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this +/// specified key. Marker can be any key in the bucket.

    + pub marker: Option, +///

    Sets the maximum number of keys returned in the response. By default, the action returns +/// up to 1,000 key names. The response might contain fewer keys but will never contain more. +///

    + pub max_keys: Option, +///

    Specifies the optional fields that you want returned in the response. Fields that you do +/// not specify are not returned.

    + pub optional_object_attributes: Option, +///

    Limits the response to keys that begin with the specified prefix.

    + pub prefix: Option, +///

    Confirms that the requester knows that she or he will be charged for the list objects +/// request. Bucket owners need not specify this parameter in their requests.

    + pub request_payer: Option, +} + +impl fmt::Debug for ListObjectsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.marker { +d.field("marker", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.optional_object_attributes { +d.field("optional_object_attributes", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.finish_non_exhaustive() +} +} + +impl ListObjectsInput { +#[must_use] +pub fn builder() -> builders::ListObjectsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsOutput { +///

    The bucket name.

    + pub name: Option, +///

    Keys that begin with the indicated prefix.

    + pub prefix: Option, +///

    Indicates where in the bucket listing begins. Marker is included in the response if it +/// was sent with the request.

    + pub marker: Option, +///

    The maximum number of keys returned in the response body.

    + pub max_keys: Option, +///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search +/// criteria.

    + pub is_truncated: Option, +///

    Metadata about each object returned.

    + pub contents: Option, +///

    All of the keys (up to 1,000) rolled up in a common prefix count as a single return when +/// calculating the number of returns.

    +///

    A response can contain CommonPrefixes only if you specify a +/// delimiter.

    +///

    +/// CommonPrefixes contains all (if there are any) keys between +/// Prefix and the next occurrence of the string specified by the +/// delimiter.

    +///

    +/// CommonPrefixes lists keys that act like subdirectories in the directory +/// specified by Prefix.

    +///

    For example, if the prefix is notes/ and the delimiter is a slash +/// (/), as in notes/summer/july, the common prefix is +/// notes/summer/. All of the keys that roll up into a common prefix count as a +/// single return when calculating the number of returns.

    + pub common_prefixes: Option, +///

    Causes keys that contain the same string between the prefix and the first occurrence of +/// the delimiter to be rolled up into a single result element in the +/// CommonPrefixes collection. These rolled-up keys are not returned elsewhere +/// in the response. Each rolled-up result counts as only one return against the +/// MaxKeys value.

    + pub delimiter: Option, +///

    When the response is truncated (the IsTruncated element value in the +/// response is true), you can use the key name in this field as the +/// marker parameter in the subsequent request to get the next set of objects. +/// Amazon S3 lists objects in alphabetical order.

    +/// +///

    This element is returned only if you have the delimiter request +/// parameter specified. If the response does not include the NextMarker +/// element and it is truncated, you can use the value of the last Key element +/// in the response as the marker parameter in the subsequent request to get +/// the next set of object keys.

    +///
    + pub next_marker: Option, +///

    Encoding type used by Amazon S3 to encode the object keys in the response. +/// Responses are encoded only in UTF-8. An object key can contain any Unicode character. +/// However, the XML 1.0 parser can't parse certain characters, such as characters with an +/// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this +/// parameter to request that Amazon S3 encode the keys in the response. For more information about +/// characters to avoid in object key names, see Object key naming +/// guidelines.

    +/// +///

    When using the URL encoding type, non-ASCII characters that are used in an object's +/// key name will be percent-encoded according to UTF-8 code values. For example, the object +/// test_file(3).png will appear as +/// test_file%283%29.png.

    +///
    + pub encoding_type: Option, + pub request_charged: Option, +} + +impl fmt::Debug for ListObjectsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectsOutput"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.marker { +d.field("marker", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.contents { +d.field("contents", val); +} +if let Some(ref val) = self.common_prefixes { +d.field("common_prefixes", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.next_marker { +d.field("next_marker", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsV2Input { +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    +/// ContinuationToken indicates to Amazon S3 that the list is being continued on +/// this bucket with a token. ContinuationToken is obfuscated and is not a real +/// key. You can use this ContinuationToken for pagination of the list results. +///

    + pub continuation_token: Option, +///

    A delimiter is a character that you use to group keys.

    +/// +///
      +///
    • +///

      +/// Directory buckets - For directory buckets, / is the only supported delimiter.

      +///
    • +///
    • +///

      +/// Directory buckets - When you query +/// ListObjectsV2 with a delimiter during in-progress multipart +/// uploads, the CommonPrefixes response parameter contains the prefixes +/// that are associated with the in-progress multipart uploads. For more information +/// about multipart uploads, see Multipart Upload Overview in +/// the Amazon S3 User Guide.

      +///
    • +///
    +///
    + pub delimiter: Option, +///

    Encoding type used by Amazon S3 to encode the object keys in the response. +/// Responses are encoded only in UTF-8. An object key can contain any Unicode character. +/// However, the XML 1.0 parser can't parse certain characters, such as characters with an +/// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this +/// parameter to request that Amazon S3 encode the keys in the response. For more information about +/// characters to avoid in object key names, see Object key naming +/// guidelines.

    +/// +///

    When using the URL encoding type, non-ASCII characters that are used in an object's +/// key name will be percent-encoded according to UTF-8 code values. For example, the object +/// test_file(3).png will appear as +/// test_file%283%29.png.

    +///
    + pub encoding_type: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The owner field is not present in ListObjectsV2 by default. If you want to +/// return the owner field with each key in the result, then set the FetchOwner +/// field to true.

    +/// +///

    +/// Directory buckets - For directory buckets, +/// the bucket owner is returned as the object owner for all objects.

    +///
    + pub fetch_owner: Option, +///

    Sets the maximum number of keys returned in the response. By default, the action returns +/// up to 1,000 key names. The response might contain fewer keys but will never contain +/// more.

    + pub max_keys: Option, +///

    Specifies the optional fields that you want returned in the response. Fields that you do +/// not specify are not returned.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub optional_object_attributes: Option, +///

    Limits the response to keys that begin with the specified prefix.

    +/// +///

    +/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    +///
    + pub prefix: Option, +///

    Confirms that the requester knows that she or he will be charged for the list objects +/// request in V2 style. Bucket owners need not specify this parameter in their +/// requests.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub request_payer: Option, +///

    StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this +/// specified key. StartAfter can be any key in the bucket.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub start_after: Option, +} + +impl fmt::Debug for ListObjectsV2Input { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectsV2Input"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.fetch_owner { +d.field("fetch_owner", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.optional_object_attributes { +d.field("optional_object_attributes", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.start_after { +d.field("start_after", val); +} +d.finish_non_exhaustive() +} +} + +impl ListObjectsV2Input { +#[must_use] +pub fn builder() -> builders::ListObjectsV2InputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsV2Output { +///

    The bucket name.

    + pub name: Option, +///

    Keys that begin with the indicated prefix.

    +/// +///

    +/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    +///
    + pub prefix: Option, +///

    Sets the maximum number of keys returned in the response. By default, the action returns +/// up to 1,000 key names. The response might contain fewer keys but will never contain +/// more.

    + pub max_keys: Option, +///

    +/// KeyCount is the number of keys returned with this request. +/// KeyCount will always be less than or equal to the MaxKeys +/// field. For example, if you ask for 50 keys, your result will include 50 keys or +/// fewer.

    + pub key_count: Option, +///

    If ContinuationToken was sent with the request, it is included in the +/// response. You can use the returned ContinuationToken for pagination of the +/// list response. You can use this ContinuationToken for pagination of the list +/// results.

    + pub continuation_token: Option, +///

    Set to false if all of the results were returned. Set to true +/// if more keys are available to return. If the number of results exceeds that specified by +/// MaxKeys, all of the results might not be returned.

    + pub is_truncated: Option, +///

    +/// NextContinuationToken is sent when isTruncated is true, which +/// means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 +/// can be continued with this NextContinuationToken. +/// NextContinuationToken is obfuscated and is not a real key

    + pub next_continuation_token: Option, +///

    Metadata about each object returned.

    + pub contents: Option, +///

    All of the keys (up to 1,000) that share the same prefix are grouped together. When +/// counting the total numbers of returns by this API operation, this group of keys is +/// considered as one item.

    +///

    A response can contain CommonPrefixes only if you specify a +/// delimiter.

    +///

    +/// CommonPrefixes contains all (if there are any) keys between +/// Prefix and the next occurrence of the string specified by a +/// delimiter.

    +///

    +/// CommonPrefixes lists keys that act like subdirectories in the directory +/// specified by Prefix.

    +///

    For example, if the prefix is notes/ and the delimiter is a slash +/// (/) as in notes/summer/july, the common prefix is +/// notes/summer/. All of the keys that roll up into a common prefix count as a +/// single return when calculating the number of returns.

    +/// +///
      +///
    • +///

      +/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

      +///
    • +///
    • +///

      +/// Directory buckets - When you query +/// ListObjectsV2 with a delimiter during in-progress multipart +/// uploads, the CommonPrefixes response parameter contains the prefixes +/// that are associated with the in-progress multipart uploads. For more information +/// about multipart uploads, see Multipart Upload Overview in +/// the Amazon S3 User Guide.

      +///
    • +///
    +///
    + pub common_prefixes: Option, +///

    Causes keys that contain the same string between the prefix and the first +/// occurrence of the delimiter to be rolled up into a single result element in the +/// CommonPrefixes collection. These rolled-up keys are not returned elsewhere +/// in the response. Each rolled-up result counts as only one return against the +/// MaxKeys value.

    +/// +///

    +/// Directory buckets - For directory buckets, / is the only supported delimiter.

    +///
    + pub delimiter: Option, +///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    +///

    If you specify the encoding-type request parameter, Amazon S3 includes this +/// element in the response, and returns encoded key name values in the following response +/// elements:

    +///

    +/// Delimiter, Prefix, Key, and StartAfter.

    + pub encoding_type: Option, +///

    If StartAfter was sent with the request, it is included in the response.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub start_after: Option, + pub request_charged: Option, +} + +impl fmt::Debug for ListObjectsV2Output { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListObjectsV2Output"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.max_keys { +d.field("max_keys", val); +} +if let Some(ref val) = self.key_count { +d.field("key_count", val); +} +if let Some(ref val) = self.continuation_token { +d.field("continuation_token", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.next_continuation_token { +d.field("next_continuation_token", val); +} +if let Some(ref val) = self.contents { +d.field("contents", val); +} +if let Some(ref val) = self.common_prefixes { +d.field("common_prefixes", val); +} +if let Some(ref val) = self.delimiter { +d.field("delimiter", val); +} +if let Some(ref val) = self.encoding_type { +d.field("encoding_type", val); +} +if let Some(ref val) = self.start_after { +d.field("start_after", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct ListPartsInput { +///

    The name of the bucket to which the parts are being uploaded.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, +///

    Sets the maximum number of parts to return.

    + pub max_parts: Option, +///

    Specifies the part after which listing should begin. Only parts with higher part numbers +/// will be listed.

    + pub part_number_marker: Option, + pub request_payer: Option, +///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created +/// using a checksum algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. +/// For more information, see +/// Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum +/// algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    Upload ID identifying the multipart upload whose parts are being listed.

    + pub upload_id: MultipartUploadId, +} + +impl fmt::Debug for ListPartsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListPartsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.max_parts { +d.field("max_parts", val); +} +if let Some(ref val) = self.part_number_marker { +d.field("part_number_marker", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() +} +} + +impl ListPartsInput { +#[must_use] +pub fn builder() -> builders::ListPartsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListPartsOutput { +///

    If the bucket has a lifecycle rule configured with an action to abort incomplete +/// multipart uploads and the prefix in the lifecycle rule matches the object name in the +/// request, then the response includes this header indicating when the initiated multipart +/// upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle +/// Configuration.

    +///

    The response will also include the x-amz-abort-rule-id header that will +/// provide the ID of the lifecycle configuration rule that defines this action.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub abort_date: Option, +///

    This header is returned along with the x-amz-abort-date header. It +/// identifies applicable lifecycle configuration rule that defines the action to abort +/// incomplete multipart uploads.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub abort_rule_id: Option, +///

    The name of the bucket to which the multipart upload was initiated. Does not return the +/// access point ARN or access point alias if used.

    + pub bucket: Option, +///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, +///

    The checksum type, which determines how part-level checksums are combined to create an +/// object-level checksum for multipart objects. You can use this header response to verify +/// that the checksum type that is received is the same checksum type that was specified in +/// CreateMultipartUpload request. For more +/// information, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    Container element that identifies who initiated the multipart upload. If the initiator +/// is an Amazon Web Services account, this element provides the same information as the Owner +/// element. If the initiator is an IAM User, this element provides the user ARN and display +/// name.

    + pub initiator: Option, +///

    Indicates whether the returned list of parts is truncated. A true value indicates that +/// the list was truncated. A list can be truncated if the number of parts exceeds the limit +/// returned in the MaxParts element.

    + pub is_truncated: Option, +///

    Object key for which the multipart upload was initiated.

    + pub key: Option, +///

    Maximum number of parts that were allowed in the response.

    + pub max_parts: Option, +///

    When a list is truncated, this element specifies the last part in the list, as well as +/// the value to use for the part-number-marker request parameter in a subsequent +/// request.

    + pub next_part_number_marker: Option, +///

    Container element that identifies the object owner, after the object is created. If +/// multipart upload is initiated by an IAM user, this element provides the parent account ID +/// and display name.

    +/// +///

    +/// Directory buckets - The bucket owner is +/// returned as the object owner for all the parts.

    +///
    + pub owner: Option, +///

    Specifies the part after which listing should begin. Only parts with higher part numbers +/// will be listed.

    + pub part_number_marker: Option, +///

    Container for elements related to a particular part. A response can contain zero or more +/// Part elements.

    + pub parts: Option, + pub request_charged: Option, +///

    The class of storage used to store the uploaded object.

    +/// +///

    +/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub storage_class: Option, +///

    Upload ID identifying the multipart upload whose parts are being listed.

    + pub upload_id: Option, +} + +impl fmt::Debug for ListPartsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ListPartsOutput"); +if let Some(ref val) = self.abort_date { +d.field("abort_date", val); +} +if let Some(ref val) = self.abort_rule_id { +d.field("abort_rule_id", val); +} +if let Some(ref val) = self.bucket { +d.field("bucket", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.initiator { +d.field("initiator", val); +} +if let Some(ref val) = self.is_truncated { +d.field("is_truncated", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.max_parts { +d.field("max_parts", val); +} +if let Some(ref val) = self.next_part_number_marker { +d.field("next_part_number_marker", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.part_number_marker { +d.field("part_number_marker", val); +} +if let Some(ref val) = self.parts { +d.field("parts", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.upload_id { +d.field("upload_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type Location = String; + +///

    Specifies the location where the bucket will be created.

    +///

    For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see +/// Working with directory buckets in the Amazon S3 User Guide.

    +/// +///

    This functionality is only supported by directory buckets.

    +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LocationInfo { +///

    The name of the location where the bucket will be created.

    +///

    For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

    + pub name: Option, +///

    The type of location where the bucket will be created.

    + pub type_: Option, +} + +impl fmt::Debug for LocationInfo { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LocationInfo"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.type_ { +d.field("type_", val); +} +d.finish_non_exhaustive() +} +} + + +pub type LocationNameAsString = String; + +pub type LocationPrefix = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct LocationType(Cow<'static, str>); + +impl LocationType { +pub const AVAILABILITY_ZONE: &'static str = "AvailabilityZone"; + +pub const LOCAL_ZONE: &'static str = "LocalZone"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for LocationType { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: LocationType) -> Self { +s.0 +} +} + +impl FromStr for LocationType { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys +/// for a bucket. For more information, see PUT Bucket logging in the +/// Amazon S3 API Reference.

    +#[derive(Clone, Default, PartialEq)] +pub struct LoggingEnabled { +///

    Specifies the bucket where you want Amazon S3 to store server access logs. You can have your +/// logs delivered to any bucket that you own, including the same bucket that is being logged. +/// You can also configure multiple buckets to deliver their logs to the same target bucket. In +/// this case, you should choose a different TargetPrefix for each source bucket +/// so that the delivered log files can be distinguished by key.

    + pub target_bucket: TargetBucket, +///

    Container for granting information.

    +///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support +/// target grants. For more information, see Permissions for server access log delivery in the +/// Amazon S3 User Guide.

    + pub target_grants: Option, +///

    Amazon S3 key format for log objects.

    + pub target_object_key_format: Option, +///

    A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a +/// single bucket, you can use a prefix to distinguish which log files came from which +/// bucket.

    + pub target_prefix: TargetPrefix, +} + +impl fmt::Debug for LoggingEnabled { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("LoggingEnabled"); +d.field("target_bucket", &self.target_bucket); +if let Some(ref val) = self.target_grants { +d.field("target_grants", val); +} +if let Some(ref val) = self.target_object_key_format { +d.field("target_object_key_format", val); +} +d.field("target_prefix", &self.target_prefix); +d.finish_non_exhaustive() +} +} + + +pub type MFA = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct MFADelete(Cow<'static, str>); + +impl MFADelete { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for MFADelete { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: MFADelete) -> Self { +s.0 +} +} + +impl FromStr for MFADelete { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MFADeleteStatus(Cow<'static, str>); + +impl MFADeleteStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for MFADeleteStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: MFADeleteStatus) -> Self { +s.0 +} +} + +impl FromStr for MFADeleteStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Marker = String; + +pub type MaxAgeSeconds = i32; + +pub type MaxBuckets = i32; + +pub type MaxDirectoryBuckets = i32; + +pub type MaxKeys = i32; + +pub type MaxParts = i32; + +pub type MaxUploads = i32; + +pub type Message = String; + +pub type Metadata = Map; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MetadataDirective(Cow<'static, str>); + +impl MetadataDirective { +pub const COPY: &'static str = "COPY"; + +pub const REPLACE: &'static str = "REPLACE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for MetadataDirective { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: MetadataDirective) -> Self { +s.0 +} +} + +impl FromStr for MetadataDirective { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    A metadata key-value pair to store with an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct MetadataEntry { +///

    Name of the object.

    + pub name: Option, +///

    Value of the object.

    + pub value: Option, +} + +impl fmt::Debug for MetadataEntry { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetadataEntry"); +if let Some(ref val) = self.name { +d.field("name", val); +} +if let Some(ref val) = self.value { +d.field("value", val); +} +d.finish_non_exhaustive() +} +} + + +pub type MetadataKey = String; + +///

    +/// The metadata table configuration for a general purpose bucket. +///

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct MetadataTableConfiguration { +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    + pub s3_tables_destination: S3TablesDestination, +} + +impl fmt::Debug for MetadataTableConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetadataTableConfiguration"); +d.field("s3_tables_destination", &self.s3_tables_destination); +d.finish_non_exhaustive() +} +} + +impl Default for MetadataTableConfiguration { +fn default() -> Self { +Self { +s3_tables_destination: default(), +} +} +} + + +///

    +/// The metadata table configuration for a general purpose bucket. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, PartialEq)] +pub struct MetadataTableConfigurationResult { +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    + pub s3_tables_destination_result: S3TablesDestinationResult, +} + +impl fmt::Debug for MetadataTableConfigurationResult { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetadataTableConfigurationResult"); +d.field("s3_tables_destination_result", &self.s3_tables_destination_result); +d.finish_non_exhaustive() +} +} + + +pub type MetadataTableStatus = String; + +pub type MetadataValue = String; + +///

    A container specifying replication metrics-related settings enabling replication +/// metrics and events.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct Metrics { +///

    A container specifying the time threshold for emitting the +/// s3:Replication:OperationMissedThreshold event.

    + pub event_threshold: Option, +///

    Specifies whether the replication metrics are enabled.

    + pub status: MetricsStatus, +} + +impl fmt::Debug for Metrics { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Metrics"); +if let Some(ref val) = self.event_threshold { +d.field("event_threshold", val); +} +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. +/// The operator must have at least two predicates, and an object must match all of the +/// predicates in order for the filter to apply.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct MetricsAndOperator { +///

    The access point ARN used when evaluating an AND predicate.

    + pub access_point_arn: Option, +///

    The prefix used when evaluating an AND predicate.

    + pub prefix: Option, +///

    The list of tags used when evaluating an AND predicate.

    + pub tags: Option, +} + +impl fmt::Debug for MetricsAndOperator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetricsAndOperator"); +if let Some(ref val) = self.access_point_arn { +d.field("access_point_arn", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Specifies a metrics configuration for the CloudWatch request metrics (specified by the +/// metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics +/// configuration, note that this is a full replacement of the existing metrics configuration. +/// If you don't include the elements you want to keep, they are erased. For more information, +/// see PutBucketMetricsConfiguration.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct MetricsConfiguration { +///

    Specifies a metrics configuration filter. The metrics configuration will only include +/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an +/// access point ARN, or a conjunction (MetricsAndOperator).

    + pub filter: Option, +///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and +/// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, +} + +impl fmt::Debug for MetricsConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MetricsConfiguration"); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + + +pub type MetricsConfigurationList = List; + +///

    Specifies a metrics configuration filter. The metrics configuration only includes +/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an +/// access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

    +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[non_exhaustive] +#[serde(rename_all = "PascalCase")] +pub enum MetricsFilter { +///

    The access point ARN used when evaluating a metrics filter.

    + AccessPointArn(AccessPointArn), +///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. +/// The operator must have at least two predicates, and an object must match all of the +/// predicates in order for the filter to apply.

    + And(MetricsAndOperator), +///

    The prefix used when evaluating a metrics filter.

    + Prefix(Prefix), +///

    The tag used when evaluating a metrics filter.

    + Tag(Tag), +} + +pub type MetricsId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct MetricsStatus(Cow<'static, str>); + +impl MetricsStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for MetricsStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: MetricsStatus) -> Self { +s.0 +} +} + +impl FromStr for MetricsStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Minutes = i32; + +pub type MissingMeta = i32; + +pub type MpuObjectSize = i64; + +///

    Container for the MultipartUpload for the Amazon S3 object.

    +#[derive(Clone, Default, PartialEq)] +pub struct MultipartUpload { +///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, +///

    The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    Date and time at which the multipart upload was initiated.

    + pub initiated: Option, +///

    Identifies who initiated the multipart upload.

    + pub initiator: Option, +///

    Key of the object for which the multipart upload was initiated.

    + pub key: Option, +///

    Specifies the owner of the object that is part of the multipart upload.

    +/// +///

    +/// Directory buckets - The bucket owner is +/// returned as the object owner for all the objects.

    +///
    + pub owner: Option, +///

    The class of storage used to store the object.

    +/// +///

    +/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub storage_class: Option, +///

    Upload ID that identifies the multipart upload.

    + pub upload_id: Option, +} + +impl fmt::Debug for MultipartUpload { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("MultipartUpload"); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.initiated { +d.field("initiated", val); +} +if let Some(ref val) = self.initiator { +d.field("initiator", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.upload_id { +d.field("upload_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type MultipartUploadId = String; + +pub type MultipartUploadList = List; + +pub type NextKeyMarker = String; + +pub type NextMarker = String; + +pub type NextPartNumberMarker = i32; + +pub type NextToken = String; + +pub type NextUploadIdMarker = String; + +pub type NextVersionIdMarker = String; + +///

    The specified bucket does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchBucket { +} + +impl fmt::Debug for NoSuchBucket { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoSuchBucket"); +d.finish_non_exhaustive() +} +} + + +///

    The specified key does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchKey { +} + +impl fmt::Debug for NoSuchKey { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoSuchKey"); +d.finish_non_exhaustive() +} +} + + +///

    The specified multipart upload does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchUpload { +} + +impl fmt::Debug for NoSuchUpload { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoSuchUpload"); +d.finish_non_exhaustive() +} +} + + +pub type NonNegativeIntegerType = i32; + +///

    Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently +/// deletes the noncurrent object versions. You set this lifecycle configuration action on a +/// bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent +/// object versions at a specific period in the object's lifetime.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NoncurrentVersionExpiration { +///

    Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100 +/// noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent +/// versions beyond the specified number to retain. For more information about noncurrent +/// versions, see Lifecycle configuration +/// elements in the Amazon S3 User Guide.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub newer_noncurrent_versions: Option, +///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the +/// associated action. The value must be a non-zero positive integer. For information about the +/// noncurrent days calculations, see How +/// Amazon S3 Calculates When an Object Became Noncurrent in the +/// Amazon S3 User Guide.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub noncurrent_days: Option, +} + +impl fmt::Debug for NoncurrentVersionExpiration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoncurrentVersionExpiration"); +if let Some(ref val) = self.newer_noncurrent_versions { +d.field("newer_noncurrent_versions", val); +} +if let Some(ref val) = self.noncurrent_days { +d.field("noncurrent_days", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Container for the transition rule that describes when noncurrent objects transition to +/// the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage +/// class. If your bucket is versioning-enabled (or versioning is suspended), you can set this +/// action to request that Amazon S3 transition noncurrent object versions to the +/// STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage +/// class at a specific period in the object's lifetime.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NoncurrentVersionTransition { +///

    Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before +/// transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will +/// transition any additional noncurrent versions beyond the specified number to retain. For +/// more information about noncurrent versions, see Lifecycle configuration +/// elements in the Amazon S3 User Guide.

    + pub newer_noncurrent_versions: Option, +///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the +/// associated action. For information about the noncurrent days calculations, see How +/// Amazon S3 Calculates How Long an Object Has Been Noncurrent in the +/// Amazon S3 User Guide.

    + pub noncurrent_days: Option, +///

    The class of storage used to store the object.

    + pub storage_class: Option, +} + +impl fmt::Debug for NoncurrentVersionTransition { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NoncurrentVersionTransition"); +if let Some(ref val) = self.newer_noncurrent_versions { +d.field("newer_noncurrent_versions", val); +} +if let Some(ref val) = self.noncurrent_days { +d.field("noncurrent_days", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() +} +} + + +pub type NoncurrentVersionTransitionList = List; + +///

    The specified content does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NotFound { +} + +impl fmt::Debug for NotFound { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NotFound"); +d.finish_non_exhaustive() +} +} + + +///

    A container for specifying the notification configuration of the bucket. If this element +/// is empty, notifications are turned off for the bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NotificationConfiguration { +///

    Enables delivery of events to Amazon EventBridge.

    + pub event_bridge_configuration: Option, +///

    Describes the Lambda functions to invoke and the events for which to invoke +/// them.

    + pub lambda_function_configurations: Option, +///

    The Amazon Simple Queue Service queues to publish messages to and the events for which +/// to publish messages.

    + pub queue_configurations: Option, +///

    The topic to which notifications are sent and the events for which notifications are +/// generated.

    + pub topic_configurations: Option, +} + +impl fmt::Debug for NotificationConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NotificationConfiguration"); +if let Some(ref val) = self.event_bridge_configuration { +d.field("event_bridge_configuration", val); +} +if let Some(ref val) = self.lambda_function_configurations { +d.field("lambda_function_configurations", val); +} +if let Some(ref val) = self.queue_configurations { +d.field("queue_configurations", val); +} +if let Some(ref val) = self.topic_configurations { +d.field("topic_configurations", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Specifies object key name filtering rules. For information about key name filtering, see +/// Configuring event +/// notifications using object key name filtering in the +/// Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NotificationConfigurationFilter { + pub key: Option, +} + +impl fmt::Debug for NotificationConfigurationFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("NotificationConfigurationFilter"); +if let Some(ref val) = self.key { +d.field("key", val); +} +d.finish_non_exhaustive() +} +} + + +///

    An optional unique identifier for configurations in a notification configuration. If you +/// don't provide one, Amazon S3 will assign an ID.

    +pub type NotificationId = String; + +///

    An object consists of data and its descriptive metadata.

    +#[derive(Clone, Default, PartialEq)] +pub struct Object { +///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, +///

    The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    The entity tag is a hash of the object. The ETag reflects changes only to the contents +/// of an object, not its metadata. The ETag may or may not be an MD5 digest of the object +/// data. Whether or not it is depends on how the object was created and how it is encrypted as +/// described below:

    +///
      +///
    • +///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the +/// Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that +/// are an MD5 digest of their object data.

      +///
    • +///
    • +///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the +/// Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are +/// not an MD5 digest of their object data.

      +///
    • +///
    • +///

      If an object is created by either the Multipart Upload or Part Copy operation, the +/// ETag is not an MD5 digest, regardless of the method of encryption. If an object is +/// larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a +/// Multipart Upload, and therefore the ETag will not be an MD5 digest.

      +///
    • +///
    +/// +///

    +/// Directory buckets - MD5 is not supported by directory buckets.

    +///
    + pub e_tag: Option, +///

    The name that you assign to an object. You use the object key to retrieve the +/// object.

    + pub key: Option, +///

    Creation date of the object.

    + pub last_modified: Option, +///

    The owner of the object

    +/// +///

    +/// Directory buckets - The bucket owner is +/// returned as the object owner.

    +///
    + pub owner: Option, +///

    Specifies the restoration status of an object. Objects in certain storage classes must +/// be restored before they can be retrieved. For more information about these storage classes +/// and how to work with archived objects, see Working with archived +/// objects in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub restore_status: Option, +///

    Size in bytes of the object

    + pub size: Option, +///

    The class of storage used to store the object.

    +/// +///

    +/// Directory buckets - +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    + pub storage_class: Option, +} + +impl fmt::Debug for Object { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Object"); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.restore_status { +d.field("restore_status", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() +} +} + + +///

    This action is not allowed against this storage tier.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectAlreadyInActiveTierError { +} + +impl fmt::Debug for ObjectAlreadyInActiveTierError { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectAlreadyInActiveTierError"); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectAttributes(Cow<'static, str>); + +impl ObjectAttributes { +pub const CHECKSUM: &'static str = "Checksum"; + +pub const ETAG: &'static str = "ETag"; + +pub const OBJECT_PARTS: &'static str = "ObjectParts"; + +pub const OBJECT_SIZE: &'static str = "ObjectSize"; + +pub const STORAGE_CLASS: &'static str = "StorageClass"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectAttributes { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectAttributes) -> Self { +s.0 +} +} + +impl FromStr for ObjectAttributes { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ObjectAttributesList = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectCannedACL(Cow<'static, str>); + +impl ObjectCannedACL { +pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; + +pub const AWS_EXEC_READ: &'static str = "aws-exec-read"; + +pub const BUCKET_OWNER_FULL_CONTROL: &'static str = "bucket-owner-full-control"; + +pub const BUCKET_OWNER_READ: &'static str = "bucket-owner-read"; + +pub const PRIVATE: &'static str = "private"; + +pub const PUBLIC_READ: &'static str = "public-read"; + +pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectCannedACL { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectCannedACL) -> Self { +s.0 +} +} + +impl FromStr for ObjectCannedACL { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Object Identifier is unique value to identify objects.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectIdentifier { +///

    An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. +/// This header field makes the request method conditional on ETags.

    +/// +///

    Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

    +///
    + pub e_tag: Option, +///

    Key name of the object.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub key: ObjectKey, +///

    If present, the objects are deleted only if its modification times matches the provided Timestamp. +///

    +/// +///

    This functionality is only supported for directory buckets.

    +///
    + pub last_modified_time: Option, +///

    If present, the objects are deleted only if its size matches the provided size in bytes.

    +/// +///

    This functionality is only supported for directory buckets.

    +///
    + pub size: Option, +///

    Version ID for the specific version of the object to delete.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for ObjectIdentifier { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectIdentifier"); +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.last_modified_time { +d.field("last_modified_time", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ObjectIdentifierList = List; + +pub type ObjectKey = String; + +pub type ObjectList = List; + +///

    The container element for Object Lock configuration parameters.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ObjectLockConfiguration { +///

    Indicates whether this bucket has an Object Lock configuration enabled. Enable +/// ObjectLockEnabled when you apply ObjectLockConfiguration to a +/// bucket.

    + pub object_lock_enabled: Option, +///

    Specifies the Object Lock rule for the specified object. Enable the this rule when you +/// apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode +/// and a period. The period can be either Days or Years but you must +/// select one. You cannot specify Days and Years at the same +/// time.

    + pub rule: Option, +} + +impl fmt::Debug for ObjectLockConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectLockConfiguration"); +if let Some(ref val) = self.object_lock_enabled { +d.field("object_lock_enabled", val); +} +if let Some(ref val) = self.rule { +d.field("rule", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ObjectLockEnabled(Cow<'static, str>); + +impl ObjectLockEnabled { +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectLockEnabled { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectLockEnabled) -> Self { +s.0 +} +} + +impl FromStr for ObjectLockEnabled { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ObjectLockEnabledForBucket = bool; + +///

    A legal hold configuration for an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectLockLegalHold { +///

    Indicates whether the specified object has a legal hold in place.

    + pub status: Option, +} + +impl fmt::Debug for ObjectLockLegalHold { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectLockLegalHold"); +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectLockLegalHoldStatus(Cow<'static, str>); + +impl ObjectLockLegalHoldStatus { +pub const OFF: &'static str = "OFF"; + +pub const ON: &'static str = "ON"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectLockLegalHoldStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectLockLegalHoldStatus) -> Self { +s.0 +} +} + +impl FromStr for ObjectLockLegalHoldStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectLockMode(Cow<'static, str>); + +impl ObjectLockMode { +pub const COMPLIANCE: &'static str = "COMPLIANCE"; + +pub const GOVERNANCE: &'static str = "GOVERNANCE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectLockMode { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectLockMode) -> Self { +s.0 +} +} + +impl FromStr for ObjectLockMode { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ObjectLockRetainUntilDate = Timestamp; + +///

    A Retention configuration for an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectLockRetention { +///

    Indicates the Retention mode for the specified object.

    + pub mode: Option, +///

    The date on which this Object Lock Retention will expire.

    + pub retain_until_date: Option, +} + +impl fmt::Debug for ObjectLockRetention { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectLockRetention"); +if let Some(ref val) = self.mode { +d.field("mode", val); +} +if let Some(ref val) = self.retain_until_date { +d.field("retain_until_date", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ObjectLockRetentionMode(Cow<'static, str>); + +impl ObjectLockRetentionMode { +pub const COMPLIANCE: &'static str = "COMPLIANCE"; + +pub const GOVERNANCE: &'static str = "GOVERNANCE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectLockRetentionMode { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectLockRetentionMode) -> Self { +s.0 +} +} + +impl FromStr for ObjectLockRetentionMode { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    The container element for an Object Lock rule.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ObjectLockRule { +///

    The default Object Lock retention mode and period that you want to apply to new objects +/// placed in the specified bucket. Bucket settings require both a mode and a period. The +/// period can be either Days or Years but you must select one. You +/// cannot specify Days and Years at the same time.

    + pub default_retention: Option, +} + +impl fmt::Debug for ObjectLockRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectLockRule"); +if let Some(ref val) = self.default_retention { +d.field("default_retention", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ObjectLockToken = String; + +///

    The source object of the COPY action is not in the active tier and is only stored in +/// Amazon S3 Glacier.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectNotInActiveTierError { +} + +impl fmt::Debug for ObjectNotInActiveTierError { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectNotInActiveTierError"); +d.finish_non_exhaustive() +} +} + + +///

    The container element for object ownership for a bucket's ownership controls.

    +///

    +/// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to +/// the bucket owner if the objects are uploaded with the +/// bucket-owner-full-control canned ACL.

    +///

    +/// ObjectWriter - The uploading account will own the object if the object is +/// uploaded with the bucket-owner-full-control canned ACL.

    +///

    +/// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no +/// longer affect permissions. The bucket owner automatically owns and has full control over +/// every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL +/// or specify bucket owner full control ACLs (such as the predefined +/// bucket-owner-full-control canned ACL or a custom ACL in XML format that +/// grants the same permissions).

    +///

    By default, ObjectOwnership is set to BucketOwnerEnforced and +/// ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where +/// you must control access for each object individually. For more information about S3 Object +/// Ownership, see Controlling ownership of +/// objects and disabling ACLs for your bucket in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectOwnership(Cow<'static, str>); + +impl ObjectOwnership { +pub const BUCKET_OWNER_ENFORCED: &'static str = "BucketOwnerEnforced"; + +pub const BUCKET_OWNER_PREFERRED: &'static str = "BucketOwnerPreferred"; + +pub const OBJECT_WRITER: &'static str = "ObjectWriter"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectOwnership { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectOwnership) -> Self { +s.0 +} +} + +impl FromStr for ObjectOwnership { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    A container for elements related to an individual part.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectPart { +///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a +/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present +/// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present +/// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    The part number identifying the part. This value is a positive integer between 1 and +/// 10,000.

    + pub part_number: Option, +///

    The size of the uploaded part in bytes.

    + pub size: Option, +} + +impl fmt::Debug for ObjectPart { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectPart"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ObjectSize = i64; + +pub type ObjectSizeGreaterThanBytes = i64; + +pub type ObjectSizeLessThanBytes = i64; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectStorageClass(Cow<'static, str>); + +impl ObjectStorageClass { +pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + +pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; + +pub const GLACIER: &'static str = "GLACIER"; + +pub const GLACIER_IR: &'static str = "GLACIER_IR"; + +pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + +pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + +pub const OUTPOSTS: &'static str = "OUTPOSTS"; + +pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; + +pub const SNOW: &'static str = "SNOW"; + +pub const STANDARD: &'static str = "STANDARD"; + +pub const STANDARD_IA: &'static str = "STANDARD_IA"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectStorageClass { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectStorageClass) -> Self { +s.0 +} +} + +impl FromStr for ObjectStorageClass { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    The version of an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectVersion { +///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, +///

    The checksum type that is used to calculate the object’s +/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    The entity tag is an MD5 hash of that version of the object.

    + pub e_tag: Option, +///

    Specifies whether the object is (true) or is not (false) the latest version of an +/// object.

    + pub is_latest: Option, +///

    The object key.

    + pub key: Option, +///

    Date and time when the object was last modified.

    + pub last_modified: Option, +///

    Specifies the owner of the object.

    + pub owner: Option, +///

    Specifies the restoration status of an object. Objects in certain storage classes must +/// be restored before they can be retrieved. For more information about these storage classes +/// and how to work with archived objects, see Working with archived +/// objects in the Amazon S3 User Guide.

    + pub restore_status: Option, +///

    Size in bytes of the object.

    + pub size: Option, +///

    The class of storage used to store the object.

    + pub storage_class: Option, +///

    Version ID of an object.

    + pub version_id: Option, +} + +impl fmt::Debug for ObjectVersion { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ObjectVersion"); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.is_latest { +d.field("is_latest", val); +} +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.owner { +d.field("owner", val); +} +if let Some(ref val) = self.restore_status { +d.field("restore_status", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ObjectVersionId = String; + +pub type ObjectVersionList = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectVersionStorageClass(Cow<'static, str>); + +impl ObjectVersionStorageClass { +pub const STANDARD: &'static str = "STANDARD"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ObjectVersionStorageClass { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ObjectVersionStorageClass) -> Self { +s.0 +} +} + +impl FromStr for ObjectVersionStorageClass { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct OptionalObjectAttributes(Cow<'static, str>); + +impl OptionalObjectAttributes { +pub const RESTORE_STATUS: &'static str = "RestoreStatus"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for OptionalObjectAttributes { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: OptionalObjectAttributes) -> Self { +s.0 +} +} + +impl FromStr for OptionalObjectAttributes { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type OptionalObjectAttributesList = List; + +///

    Describes the location where the restore job's output is stored.

    +#[derive(Clone, Default, PartialEq)] +pub struct OutputLocation { +///

    Describes an S3 location that will receive the results of the restore request.

    + pub s3: Option, +} + +impl fmt::Debug for OutputLocation { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("OutputLocation"); +if let Some(ref val) = self.s3 { +d.field("s3", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Describes how results of the Select job are serialized.

    +#[derive(Clone, Default, PartialEq)] +pub struct OutputSerialization { +///

    Describes the serialization of CSV-encoded Select results.

    + pub csv: Option, +///

    Specifies JSON as request's output serialization format.

    + pub json: Option, +} + +impl fmt::Debug for OutputSerialization { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("OutputSerialization"); +if let Some(ref val) = self.csv { +d.field("csv", val); +} +if let Some(ref val) = self.json { +d.field("json", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Container for the owner's display name and ID.

    +#[derive(Clone, Default, PartialEq)] +pub struct Owner { +///

    Container for the display name of the owner. This value is only supported in the +/// following Amazon Web Services Regions:

    +///
      +///
    • +///

      US East (N. Virginia)

      +///
    • +///
    • +///

      US West (N. California)

      +///
    • +///
    • +///

      US West (Oregon)

      +///
    • +///
    • +///

      Asia Pacific (Singapore)

      +///
    • +///
    • +///

      Asia Pacific (Sydney)

      +///
    • +///
    • +///

      Asia Pacific (Tokyo)

      +///
    • +///
    • +///

      Europe (Ireland)

      +///
    • +///
    • +///

      South America (São Paulo)

      +///
    • +///
    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub display_name: Option, +///

    Container for the ID of the owner.

    + pub id: Option, +} + +impl fmt::Debug for Owner { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Owner"); +if let Some(ref val) = self.display_name { +d.field("display_name", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct OwnerOverride(Cow<'static, str>); + +impl OwnerOverride { +pub const DESTINATION: &'static str = "Destination"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for OwnerOverride { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: OwnerOverride) -> Self { +s.0 +} +} + +impl FromStr for OwnerOverride { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    The container element for a bucket's ownership controls.

    +#[derive(Clone, Default, PartialEq)] +pub struct OwnershipControls { +///

    The container element for an ownership control rule.

    + pub rules: OwnershipControlsRules, +} + +impl fmt::Debug for OwnershipControls { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("OwnershipControls"); +d.field("rules", &self.rules); +d.finish_non_exhaustive() +} +} + + +///

    The container element for an ownership control rule.

    +#[derive(Clone, PartialEq)] +pub struct OwnershipControlsRule { + pub object_ownership: ObjectOwnership, +} + +impl fmt::Debug for OwnershipControlsRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("OwnershipControlsRule"); +d.field("object_ownership", &self.object_ownership); +d.finish_non_exhaustive() +} +} + + +pub type OwnershipControlsRules = List; + +///

    Container for Parquet.

    +#[derive(Clone, Default, PartialEq)] +pub struct ParquetInput { +} + +impl fmt::Debug for ParquetInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ParquetInput"); +d.finish_non_exhaustive() +} +} + + +///

    Container for elements related to a part.

    +#[derive(Clone, Default, PartialEq)] +pub struct Part { +///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present +/// if the object was uploaded with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present +/// if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present +/// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a +/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present +/// if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present +/// if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    Entity tag returned when the part was uploaded.

    + pub e_tag: Option, +///

    Date and time at which the part was uploaded.

    + pub last_modified: Option, +///

    Part number identifying the part. This is a positive integer between 1 and +/// 10,000.

    + pub part_number: Option, +///

    Size in bytes of the uploaded part data.

    + pub size: Option, +} + +impl fmt::Debug for Part { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Part"); +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.part_number { +d.field("part_number", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +d.finish_non_exhaustive() +} +} + + +pub type PartNumber = i32; + +pub type PartNumberMarker = i32; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct PartitionDateSource(Cow<'static, str>); + +impl PartitionDateSource { +pub const DELIVERY_TIME: &'static str = "DeliveryTime"; + +pub const EVENT_TIME: &'static str = "EventTime"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for PartitionDateSource { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: PartitionDateSource) -> Self { +s.0 +} +} + +impl FromStr for PartitionDateSource { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Amazon S3 keys for log objects are partitioned in the following format:

    +///

    +/// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +///

    +///

    PartitionedPrefix defaults to EventTime delivery when server access logs are +/// delivered.

    +#[derive(Clone, Default, PartialEq)] +pub struct PartitionedPrefix { +///

    Specifies the partition date source for the partitioned prefix. +/// PartitionDateSource can be EventTime or +/// DeliveryTime.

    +///

    For DeliveryTime, the time in the log file names corresponds to the +/// delivery time for the log files.

    +///

    For EventTime, The logs delivered are for a specific day only. The year, +/// month, and day correspond to the day on which the event occurred, and the hour, minutes and +/// seconds are set to 00 in the key.

    + pub partition_date_source: Option, +} + +impl fmt::Debug for PartitionedPrefix { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PartitionedPrefix"); +if let Some(ref val) = self.partition_date_source { +d.field("partition_date_source", val); +} +d.finish_non_exhaustive() +} +} + + +pub type Parts = List; + +pub type PartsCount = i32; + +pub type PartsList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Payer(Cow<'static, str>); + +impl Payer { +pub const BUCKET_OWNER: &'static str = "BucketOwner"; + +pub const REQUESTER: &'static str = "Requester"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for Payer { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: Payer) -> Self { +s.0 +} +} + +impl FromStr for Payer { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Permission(Cow<'static, str>); + +impl Permission { +pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; + +pub const READ: &'static str = "READ"; + +pub const READ_ACP: &'static str = "READ_ACP"; + +pub const WRITE: &'static str = "WRITE"; + +pub const WRITE_ACP: &'static str = "WRITE_ACP"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for Permission { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: Permission) -> Self { +s.0 +} +} + +impl FromStr for Permission { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Policy = String; + +///

    The container element for a bucket's policy status.

    +#[derive(Clone, Default, PartialEq)] +pub struct PolicyStatus { +///

    The policy status for this bucket. TRUE indicates that this bucket is +/// public. FALSE indicates that the bucket is not public.

    + pub is_public: Option, +} + +impl fmt::Debug for PolicyStatus { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PolicyStatus"); +if let Some(ref val) = self.is_public { +d.field("is_public", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Default)] +pub struct PostObjectInput { +///

    The canned ACL to apply to the object. For more information, see Canned +/// ACL in the Amazon S3 User Guide.

    +///

    When adding a new object, you can use headers to grant ACL-based permissions to +/// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are +/// then added to the ACL on the object. By default, all objects are private. Only the owner +/// has full access control. For more information, see Access Control List (ACL) Overview +/// and Managing +/// ACLs Using the REST API in the Amazon S3 User Guide.

    +///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting +/// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that +/// use this setting only accept PUT requests that don't specify an ACL or PUT requests that +/// specify bucket owner full control ACLs, such as the bucket-owner-full-control +/// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that +/// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a +/// 400 error with the error code AccessControlListNotSupported. +/// For more information, see Controlling ownership of +/// objects and disabling ACLs in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub acl: Option, +///

    Object data.

    + pub body: Option, +///

    The bucket name to which the PUT action was initiated.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    +///

    +/// General purpose buckets - Setting this header to +/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with +/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 +/// Bucket Key.

    +///

    +/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + pub bucket_key_enabled: Option, +///

    Can be used to specify caching behavior along the request/reply chain. For more +/// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    + pub cache_control: Option, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm +/// or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    +///

    For the x-amz-checksum-algorithm +/// header, replace +/// algorithm +/// with the supported algorithm from the following list:

    +///
      +///
    • +///

      +/// CRC32 +///

      +///
    • +///
    • +///

      +/// CRC32C +///

      +///
    • +///
    • +///

      +/// CRC64NVME +///

      +///
    • +///
    • +///

      +/// SHA1 +///

      +///
    • +///
    • +///

      +/// SHA256 +///

      +///
    • +///
    +///

    For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If the individual checksum value you provide through x-amz-checksum-algorithm +/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    +/// +///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is +/// required for any request to upload an object with a retention period configured using +/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the +/// Amazon S3 User Guide.

    +///
    +///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + pub checksum_algorithm: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the object. The CRC64NVME checksum is +/// always a full object checksum. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    + pub content_disposition: Option, +///

    Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    + pub content_encoding: Option, +///

    The language the content is in.

    + pub content_language: Option, +///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be +/// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    + pub content_length: Option, +///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to +/// RFC 1864. This header can be used as a message integrity check to verify that the data is +/// the same data that was originally sent. Although it is optional, we recommend using the +/// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST +/// request authentication, see REST Authentication.

    +/// +///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is +/// required for any request to upload an object with a retention period configured using +/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the +/// Amazon S3 User Guide.

    +///
    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub content_md5: Option, +///

    A standard MIME type describing the format of the contents. For more information, see +/// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    + pub content_type: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The date and time at which the object is no longer cacheable. For more information, see +/// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    + pub expires: Option, +///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_full_control: Option, +///

    Allows grantee to read the object data and its metadata.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_read: Option, +///

    Allows grantee to read the object ACL.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_read_acp: Option, +///

    Allows grantee to write the ACL for the applicable object.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_write_acp: Option, +///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE +/// operation matches the ETag of the object in S3. If the ETag values do not match, the +/// operation returns a 412 Precondition Failed error.

    +///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    +///

    Expects the ETag value as a string.

    +///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_match: Option, +///

    Uploads the object only if the object key name does not already exist in the bucket +/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    +///

    If a conflicting operation occurs during the upload S3 returns a 409 +/// ConditionalRequestConflict response. On a 409 failure you should retry the +/// upload.

    +///

    Expects the '*' (asterisk) character.

    +///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_none_match: Option, +///

    Object key for which the PUT action was initiated.

    + pub key: ObjectKey, +///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, +///

    Specifies whether a legal hold will be applied to this object. For more information +/// about S3 Object Lock, see Object Lock in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_legal_hold_status: Option, +///

    The Object Lock mode that you want to apply to this object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_mode: Option, +///

    The date and time when you want this object's Object Lock to expire. Must be formatted +/// as a timestamp parameter.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_retain_until_date: Option, + pub request_payer: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, +/// AES256).

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets passed on +/// to Amazon Web Services KMS for future GetObject operations on +/// this object.

    +///

    +/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    +///

    +/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + pub ssekms_encryption_context: Option, +///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same +/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    +///

    +/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS +/// key to use. If you specify +/// x-amz-server-side-encryption:aws:kms or +/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key +/// (aws/s3) to protect the data.

    +///

    +/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the +/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses +/// the bucket's default KMS customer managed key ID. If you want to explicitly set the +/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +/// +/// Incorrect key specification results in an HTTP 400 Bad Request error.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 +/// (for example, AES256, aws:kms, aws:kms:dsse).

    +///
      +///
    • +///

      +/// General purpose buckets - You have four mutually +/// exclusive options to protect data using server-side encryption in Amazon S3, depending on +/// how you choose to manage the encryption keys. Specifically, the encryption key +/// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and +/// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by +/// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt +/// data at rest by using server-side encryption with other key options. For more +/// information, see Using Server-Side +/// Encryption in the Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      +///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. +/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. +/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and +/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. +///

      +/// +///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the +/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. +/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), +/// the encryption request headers must match the default encryption configuration of the directory bucket. +/// +///

      +///
      +///
    • +///
    + pub server_side_encryption: Option, +///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The +/// STANDARD storage class provides high durability and high availability. Depending on +/// performance needs, you can specify a different Storage Class. For more information, see +/// Storage +/// Classes in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      For directory buckets, only the S3 Express One Zone storage class is supported to store +/// newly created objects.

      +///
    • +///
    • +///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      +///
    • +///
    +///
    + pub storage_class: Option, +///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For +/// example, "Key1=Value1")

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub tagging: Option, +///

    If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata. For information about object metadata, see Object Key and Metadata in the +/// Amazon S3 User Guide.

    +///

    In the following example, the request header sets the redirect to an object +/// (anotherPage.html) in the same bucket:

    +///

    +/// x-amz-website-redirect-location: /anotherPage.html +///

    +///

    In the following example, the request header sets the object redirect to another +/// website:

    +///

    +/// x-amz-website-redirect-location: http://www.example.com/ +///

    +///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and +/// How to +/// Configure Website Page Redirects in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub website_redirect_location: Option, +///

    +/// Specifies the offset for appending data to existing objects in bytes. +/// The offset must be equal to the size of the existing object being appended to. +/// If no object exists, setting this header to 0 will create a new object. +///

    +/// +///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    +///
    + pub write_offset_bytes: Option, +/// The URL to which the client is redirected upon successful upload. + pub success_action_redirect: Option, +/// The status code returned to the client upon successful upload. Valid values are 200, 201, and 204. + pub success_action_status: Option, +/// The POST policy document that was included in the request. + pub policy: Option, +} + +impl fmt::Debug for PostObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PostObjectInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +if let Some(ref val) = self.body { +d.field("body", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_length { +d.field("content_length", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tagging { +d.field("tagging", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +if let Some(ref val) = self.write_offset_bytes { +d.field("write_offset_bytes", val); +} +if let Some(ref val) = self.success_action_redirect { +d.field("success_action_redirect", val); +} +if let Some(ref val) = self.success_action_status { +d.field("success_action_status", val); +} +if let Some(ref val) = self.policy { +d.field("policy", val); +} +d.finish_non_exhaustive() +} +} + +impl PostObjectInput { +#[must_use] +pub fn builder() -> builders::PostObjectInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PostObjectOutput { +///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header +/// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it +/// was uploaded without a checksum (and Amazon S3 added the default checksum, +/// CRC64NVME, to the uploaded object). For more information about how +/// checksums are calculated with multipart uploads, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    This header specifies the checksum type of the object, which determines how part-level +/// checksums are combined to create an object-level checksum for multipart objects. For +/// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a +/// data integrity check to verify that the checksum type that is received is the same checksum +/// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    Entity tag for the uploaded object.

    +///

    +/// General purpose buckets - To ensure that data is not +/// corrupted traversing the network, for objects where the ETag is the MD5 digest of the +/// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned +/// ETag to the calculated MD5 value.

    +///

    +/// Directory buckets - The ETag for the object in +/// a directory bucket isn't the MD5 digest of the object.

    + pub e_tag: Option, +///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, +/// the response includes this header. It includes the expiry-date and +/// rule-id key-value pairs that provide information about object expiration. +/// The value of the rule-id is URL-encoded.

    +/// +///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    +///
    + pub expiration: Option, + pub request_charged: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets +/// passed on to Amazon Web Services KMS for future GetObject +/// operations on this object.

    + pub ssekms_encryption_context: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, +///

    +/// The size of the object in bytes. This value is only be present if you append to an object. +///

    +/// +///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    +///
    + pub size: Option, +///

    Version ID of the object.

    +///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID +/// for the object being stored. Amazon S3 returns this ID in the response. When you enable +/// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object +/// simultaneously, it stores all of the objects. For more information about versioning, see +/// Adding Objects to +/// Versioning-Enabled Buckets in the Amazon S3 User Guide. For +/// information about returning the versioning state of a bucket, see GetBucketVersioning.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for PostObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PostObjectOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +pub type Prefix = String; + +pub type Priority = i32; + +///

    This data type contains information about progress of an operation.

    +#[derive(Clone, Default, PartialEq)] +pub struct Progress { +///

    The current number of uncompressed object bytes processed.

    + pub bytes_processed: Option, +///

    The current number of bytes of records payload data returned.

    + pub bytes_returned: Option, +///

    The current number of object bytes scanned.

    + pub bytes_scanned: Option, +} + +impl fmt::Debug for Progress { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Progress"); +if let Some(ref val) = self.bytes_processed { +d.field("bytes_processed", val); +} +if let Some(ref val) = self.bytes_returned { +d.field("bytes_returned", val); +} +if let Some(ref val) = self.bytes_scanned { +d.field("bytes_scanned", val); +} +d.finish_non_exhaustive() +} +} + + +///

    This data type contains information about the progress event of an operation.

    +#[derive(Clone, Default, PartialEq)] +pub struct ProgressEvent { +///

    The Progress event details.

    + pub details: Option, +} + +impl fmt::Debug for ProgressEvent { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ProgressEvent"); +if let Some(ref val) = self.details { +d.field("details", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Protocol(Cow<'static, str>); + +impl Protocol { +pub const HTTP: &'static str = "http"; + +pub const HTTPS: &'static str = "https"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for Protocol { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: Protocol) -> Self { +s.0 +} +} + +impl FromStr for Protocol { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can +/// enable the configuration options in any combination. For more information about when Amazon S3 +/// considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct PublicAccessBlockConfiguration { +///

    Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket +/// and objects in this bucket. Setting this element to TRUE causes the following +/// behavior:

    +///
      +///
    • +///

      PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is +/// public.

      +///
    • +///
    • +///

      PUT Object calls fail if the request includes a public ACL.

      +///
    • +///
    • +///

      PUT Bucket calls fail if the request includes a public ACL.

      +///
    • +///
    +///

    Enabling this setting doesn't affect existing policies or ACLs.

    + pub block_public_acls: Option, +///

    Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this +/// element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the +/// specified bucket policy allows public access.

    +///

    Enabling this setting doesn't affect existing bucket policies.

    + pub block_public_policy: Option, +///

    Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this +/// bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on +/// this bucket and objects in this bucket.

    +///

    Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't +/// prevent new public ACLs from being set.

    + pub ignore_public_acls: Option, +///

    Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting +/// this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has +/// a public policy.

    +///

    Enabling this setting doesn't affect previously stored bucket policies, except that +/// public and cross-account access within any public bucket policy, including non-public +/// delegation to specific accounts, is blocked.

    + pub restrict_public_buckets: Option, +} + +impl fmt::Debug for PublicAccessBlockConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PublicAccessBlockConfiguration"); +if let Some(ref val) = self.block_public_acls { +d.field("block_public_acls", val); +} +if let Some(ref val) = self.block_public_policy { +d.field("block_public_policy", val); +} +if let Some(ref val) = self.ignore_public_acls { +d.field("ignore_public_acls", val); +} +if let Some(ref val) = self.restrict_public_buckets { +d.field("restrict_public_buckets", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketAccelerateConfigurationInput { +///

    Container for setting the transfer acceleration state.

    + pub accelerate_configuration: AccelerateConfiguration, +///

    The name of the bucket for which the accelerate configuration is set.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for PutBucketAccelerateConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAccelerateConfigurationInput"); +d.field("accelerate_configuration", &self.accelerate_configuration); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl PutBucketAccelerateConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketAccelerateConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAccelerateConfigurationOutput { +} + +impl fmt::Debug for PutBucketAccelerateConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAccelerateConfigurationOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAclInput { +///

    The canned ACL to apply to the bucket.

    + pub acl: Option, +///

    Contains the elements that set the ACL permissions for an object per grantee.

    + pub access_control_policy: Option, +///

    The bucket to which to apply the ACL.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, go to RFC +/// 1864. +///

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Allows grantee the read, write, read ACP, and write ACP permissions on the +/// bucket.

    + pub grant_full_control: Option, +///

    Allows grantee to list the objects in the bucket.

    + pub grant_read: Option, +///

    Allows grantee to read the bucket ACL.

    + pub grant_read_acp: Option, +///

    Allows grantee to create new objects in the bucket.

    +///

    For the bucket and object owners of existing objects, also allows deletions and +/// overwrites of those objects.

    + pub grant_write: Option, +///

    Allows grantee to write the ACL for the applicable bucket.

    + pub grant_write_acp: Option, +} + +impl fmt::Debug for PutBucketAclInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAclInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +if let Some(ref val) = self.access_control_policy { +d.field("access_control_policy", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write { +d.field("grant_write", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +d.finish_non_exhaustive() +} +} + +impl PutBucketAclInput { +#[must_use] +pub fn builder() -> builders::PutBucketAclInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAclOutput { +} + +impl fmt::Debug for PutBucketAclOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAclOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketAnalyticsConfigurationInput { +///

    The configuration and any analyses for the analytics filter.

    + pub analytics_configuration: AnalyticsConfiguration, +///

    The name of the bucket to which an analytics configuration is stored.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The ID that identifies the analytics configuration.

    + pub id: AnalyticsId, +} + +impl fmt::Debug for PutBucketAnalyticsConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAnalyticsConfigurationInput"); +d.field("analytics_configuration", &self.analytics_configuration); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.finish_non_exhaustive() +} +} + +impl PutBucketAnalyticsConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketAnalyticsConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAnalyticsConfigurationOutput { +} + +impl fmt::Debug for PutBucketAnalyticsConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketAnalyticsConfigurationOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketCorsInput { +///

    Specifies the bucket impacted by the corsconfiguration.

    + pub bucket: BucketName, +///

    Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more +/// information, see Enabling +/// Cross-Origin Resource Sharing in the +/// Amazon S3 User Guide.

    + pub cors_configuration: CORSConfiguration, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, go to RFC +/// 1864. +///

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for PutBucketCorsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketCorsInput"); +d.field("bucket", &self.bucket); +d.field("cors_configuration", &self.cors_configuration); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl PutBucketCorsInput { +#[must_use] +pub fn builder() -> builders::PutBucketCorsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketCorsOutput { +} + +impl fmt::Debug for PutBucketCorsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketCorsOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketEncryptionInput { +///

    Specifies default encryption for a bucket using server-side encryption with different +/// key options.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    +/// +///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    +///
    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the server-side encryption +/// configuration.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

    +///
    + pub expected_bucket_owner: Option, + pub server_side_encryption_configuration: ServerSideEncryptionConfiguration, +} + +impl fmt::Debug for PutBucketEncryptionInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketEncryptionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("server_side_encryption_configuration", &self.server_side_encryption_configuration); +d.finish_non_exhaustive() +} +} + +impl PutBucketEncryptionInput { +#[must_use] +pub fn builder() -> builders::PutBucketEncryptionInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketEncryptionOutput { +} + +impl fmt::Debug for PutBucketEncryptionOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketEncryptionOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketIntelligentTieringConfigurationInput { +///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, +///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, +///

    Container for S3 Intelligent-Tiering configuration.

    + pub intelligent_tiering_configuration: IntelligentTieringConfiguration, +} + +impl fmt::Debug for PutBucketIntelligentTieringConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationInput"); +d.field("bucket", &self.bucket); +d.field("id", &self.id); +d.field("intelligent_tiering_configuration", &self.intelligent_tiering_configuration); +d.finish_non_exhaustive() +} +} + +impl PutBucketIntelligentTieringConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketIntelligentTieringConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketIntelligentTieringConfigurationOutput { +} + +impl fmt::Debug for PutBucketIntelligentTieringConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketInventoryConfigurationInput { +///

    The name of the bucket where the inventory configuration will be stored.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, +///

    Specifies the inventory configuration.

    + pub inventory_configuration: InventoryConfiguration, +} + +impl fmt::Debug for PutBucketInventoryConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketInventoryConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.field("inventory_configuration", &self.inventory_configuration); +d.finish_non_exhaustive() +} +} + +impl PutBucketInventoryConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketInventoryConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketInventoryConfigurationOutput { +} + +impl fmt::Debug for PutBucketInventoryConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketInventoryConfigurationOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLifecycleConfigurationInput { +///

    The name of the bucket for which to set the configuration.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    + pub expected_bucket_owner: Option, +///

    Container for lifecycle rules. You can add as many as 1,000 rules.

    + pub lifecycle_configuration: Option, +///

    Indicates which default minimum object size behavior is applied to the lifecycle +/// configuration.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    +///
      +///
    • +///

      +/// all_storage_classes_128K - Objects smaller than 128 KB will not +/// transition to any storage class by default.

      +///
    • +///
    • +///

      +/// varies_by_storage_class - Objects smaller than 128 KB will +/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By +/// default, all other storage classes will prevent transitions smaller than 128 KB. +///

      +///
    • +///
    +///

    To customize the minimum object size for any transition you can add a filter that +/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in +/// the body of your transition rule. Custom filters always take precedence over the default +/// transition behavior.

    + pub transition_default_minimum_object_size: Option, +} + +impl fmt::Debug for PutBucketLifecycleConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketLifecycleConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.lifecycle_configuration { +d.field("lifecycle_configuration", val); +} +if let Some(ref val) = self.transition_default_minimum_object_size { +d.field("transition_default_minimum_object_size", val); +} +d.finish_non_exhaustive() +} +} + +impl PutBucketLifecycleConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketLifecycleConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLifecycleConfigurationOutput { +///

    Indicates which default minimum object size behavior is applied to the lifecycle +/// configuration.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    +///
      +///
    • +///

      +/// all_storage_classes_128K - Objects smaller than 128 KB will not +/// transition to any storage class by default.

      +///
    • +///
    • +///

      +/// varies_by_storage_class - Objects smaller than 128 KB will +/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By +/// default, all other storage classes will prevent transitions smaller than 128 KB. +///

      +///
    • +///
    +///

    To customize the minimum object size for any transition you can add a filter that +/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in +/// the body of your transition rule. Custom filters always take precedence over the default +/// transition behavior.

    + pub transition_default_minimum_object_size: Option, +} + +impl fmt::Debug for PutBucketLifecycleConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketLifecycleConfigurationOutput"); +if let Some(ref val) = self.transition_default_minimum_object_size { +d.field("transition_default_minimum_object_size", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketLoggingInput { +///

    The name of the bucket for which to set the logging parameters.

    + pub bucket: BucketName, +///

    Container for logging status information.

    + pub bucket_logging_status: BucketLoggingStatus, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash of the PutBucketLogging request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} + +impl fmt::Debug for PutBucketLoggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketLoggingInput"); +d.field("bucket", &self.bucket); +d.field("bucket_logging_status", &self.bucket_logging_status); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.finish_non_exhaustive() +} +} + +impl PutBucketLoggingInput { +#[must_use] +pub fn builder() -> builders::PutBucketLoggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLoggingOutput { +} + +impl fmt::Debug for PutBucketLoggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketLoggingOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketMetricsConfigurationInput { +///

    The name of the bucket for which the metrics configuration is set.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and +/// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, +///

    Specifies the metrics configuration.

    + pub metrics_configuration: MetricsConfiguration, +} + +impl fmt::Debug for PutBucketMetricsConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketMetricsConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("id", &self.id); +d.field("metrics_configuration", &self.metrics_configuration); +d.finish_non_exhaustive() +} +} + +impl PutBucketMetricsConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketMetricsConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketMetricsConfigurationOutput { +} + +impl fmt::Debug for PutBucketMetricsConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketMetricsConfigurationOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketNotificationConfigurationInput { +///

    The name of the bucket.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub notification_configuration: NotificationConfiguration, +///

    Skips validation of Amazon SQS, Amazon SNS, and Lambda +/// destinations. True or false value.

    + pub skip_destination_validation: Option, +} + +impl fmt::Debug for PutBucketNotificationConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketNotificationConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("notification_configuration", &self.notification_configuration); +if let Some(ref val) = self.skip_destination_validation { +d.field("skip_destination_validation", val); +} +d.finish_non_exhaustive() +} +} + +impl PutBucketNotificationConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutBucketNotificationConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketNotificationConfigurationOutput { +} + +impl fmt::Debug for PutBucketNotificationConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketNotificationConfigurationOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketOwnershipControlsInput { +///

    The name of the Amazon S3 bucket whose OwnershipControls you want to set.

    + pub bucket: BucketName, +///

    The MD5 hash of the OwnershipControls request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or +/// ObjectWriter) that you want to apply to this Amazon S3 bucket.

    + pub ownership_controls: OwnershipControls, +} + +impl fmt::Debug for PutBucketOwnershipControlsInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketOwnershipControlsInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("ownership_controls", &self.ownership_controls); +d.finish_non_exhaustive() +} +} + +impl PutBucketOwnershipControlsInput { +#[must_use] +pub fn builder() -> builders::PutBucketOwnershipControlsInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketOwnershipControlsOutput { +} + +impl fmt::Debug for PutBucketOwnershipControlsOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketOwnershipControlsOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketPolicyInput { +///

    The name of the bucket.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide +///

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm +/// or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    +///

    For the x-amz-checksum-algorithm +/// header, replace +/// algorithm +/// with the supported algorithm from the following list:

    +///
      +///
    • +///

      +/// CRC32 +///

      +///
    • +///
    • +///

      +/// CRC32C +///

      +///
    • +///
    • +///

      +/// CRC64NVME +///

      +///
    • +///
    • +///

      +/// SHA1 +///

      +///
    • +///
    • +///

      +/// SHA256 +///

      +///
    • +///
    +///

    For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If the individual checksum value you provide through x-amz-checksum-algorithm +/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    +/// +///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    +///
    + pub checksum_algorithm: Option, +///

    Set this parameter to true to confirm that you want to remove your permissions to change +/// this bucket policy in the future.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub confirm_remove_self_bucket_access: Option, +///

    The MD5 hash of the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    +/// +///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code +/// 501 Not Implemented.

    +///
    + pub expected_bucket_owner: Option, +///

    The bucket policy as a JSON document.

    +///

    For directory buckets, the only IAM action supported in the bucket policy is +/// s3express:CreateSession.

    + pub policy: Policy, +} + +impl fmt::Debug for PutBucketPolicyInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketPolicyInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.confirm_remove_self_bucket_access { +d.field("confirm_remove_self_bucket_access", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("policy", &self.policy); +d.finish_non_exhaustive() +} +} + +impl PutBucketPolicyInput { +#[must_use] +pub fn builder() -> builders::PutBucketPolicyInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketPolicyOutput { +} + +impl fmt::Debug for PutBucketPolicyOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketPolicyOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketReplicationInput { +///

    The name of the bucket

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, see RFC 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub replication_configuration: ReplicationConfiguration, +///

    A token to allow Object Lock to be enabled for an existing bucket.

    + pub token: Option, +} + +impl fmt::Debug for PutBucketReplicationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketReplicationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("replication_configuration", &self.replication_configuration); +if let Some(ref val) = self.token { +d.field("token", val); +} +d.finish_non_exhaustive() +} +} + +impl PutBucketReplicationInput { +#[must_use] +pub fn builder() -> builders::PutBucketReplicationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketReplicationOutput { +} + +impl fmt::Debug for PutBucketReplicationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketReplicationOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketRequestPaymentInput { +///

    The bucket name.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, see RFC 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Container for Payer.

    + pub request_payment_configuration: RequestPaymentConfiguration, +} + +impl fmt::Debug for PutBucketRequestPaymentInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketRequestPaymentInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("request_payment_configuration", &self.request_payment_configuration); +d.finish_non_exhaustive() +} +} + +impl PutBucketRequestPaymentInput { +#[must_use] +pub fn builder() -> builders::PutBucketRequestPaymentInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketRequestPaymentOutput { +} + +impl fmt::Debug for PutBucketRequestPaymentOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketRequestPaymentOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketTaggingInput { +///

    The bucket name.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, see RFC 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Container for the TagSet and Tag elements.

    + pub tagging: Tagging, +} + +impl fmt::Debug for PutBucketTaggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("tagging", &self.tagging); +d.finish_non_exhaustive() +} +} + +impl PutBucketTaggingInput { +#[must_use] +pub fn builder() -> builders::PutBucketTaggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketTaggingOutput { +} + +impl fmt::Debug for PutBucketTaggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketTaggingOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketVersioningInput { +///

    The bucket name.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a +/// message integrity check to verify that the request body was not corrupted in transit. For +/// more information, see RFC +/// 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The concatenation of the authentication device's serial number, a space, and the value +/// that is displayed on your authentication device.

    + pub mfa: Option, +///

    Container for setting the versioning state.

    + pub versioning_configuration: VersioningConfiguration, +} + +impl fmt::Debug for PutBucketVersioningInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketVersioningInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.mfa { +d.field("mfa", val); +} +d.field("versioning_configuration", &self.versioning_configuration); +d.finish_non_exhaustive() +} +} + +impl PutBucketVersioningInput { +#[must_use] +pub fn builder() -> builders::PutBucketVersioningInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketVersioningOutput { +} + +impl fmt::Debug for PutBucketVersioningOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketVersioningOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutBucketWebsiteInput { +///

    The bucket name.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, see RFC 1864.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Container for the request.

    + pub website_configuration: WebsiteConfiguration, +} + +impl fmt::Debug for PutBucketWebsiteInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketWebsiteInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("website_configuration", &self.website_configuration); +d.finish_non_exhaustive() +} +} + +impl PutBucketWebsiteInput { +#[must_use] +pub fn builder() -> builders::PutBucketWebsiteInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketWebsiteOutput { +} + +impl fmt::Debug for PutBucketWebsiteOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutBucketWebsiteOutput"); +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectAclInput { +///

    The canned ACL to apply to the object. For more information, see Canned +/// ACL.

    + pub acl: Option, +///

    Contains the elements that set the ACL permissions for an object per grantee.

    + pub access_control_policy: Option, +///

    The bucket name that contains the object to which you want to attach the ACL.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message +/// integrity check to verify that the request body was not corrupted in transit. For more +/// information, go to RFC +/// 1864.> +///

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Allows grantee the read, write, read ACP, and write ACP permissions on the +/// bucket.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_full_control: Option, +///

    Allows grantee to list the objects in the bucket.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_read: Option, +///

    Allows grantee to read the bucket ACL.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_read_acp: Option, +///

    Allows grantee to create new objects in the bucket.

    +///

    For the bucket and object owners of existing objects, also allows deletions and +/// overwrites of those objects.

    + pub grant_write: Option, +///

    Allows grantee to write the ACL for the applicable bucket.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_write_acp: Option, +///

    Key for which the PUT action was initiated.

    + pub key: ObjectKey, + pub request_payer: Option, +///

    Version ID used to reference a specific version of the object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for PutObjectAclInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectAclInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +if let Some(ref val) = self.access_control_policy { +d.field("access_control_policy", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write { +d.field("grant_write", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl PutObjectAclInput { +#[must_use] +pub fn builder() -> builders::PutObjectAclInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectAclOutput { + pub request_charged: Option, +} + +impl fmt::Debug for PutObjectAclOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectAclOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Default)] +pub struct PutObjectInput { +///

    The canned ACL to apply to the object. For more information, see Canned +/// ACL in the Amazon S3 User Guide.

    +///

    When adding a new object, you can use headers to grant ACL-based permissions to +/// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are +/// then added to the ACL on the object. By default, all objects are private. Only the owner +/// has full access control. For more information, see Access Control List (ACL) Overview +/// and Managing +/// ACLs Using the REST API in the Amazon S3 User Guide.

    +///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting +/// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that +/// use this setting only accept PUT requests that don't specify an ACL or PUT requests that +/// specify bucket owner full control ACLs, such as the bucket-owner-full-control +/// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that +/// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a +/// 400 error with the error code AccessControlListNotSupported. +/// For more information, see Controlling ownership of +/// objects and disabling ACLs in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub acl: Option, +///

    Object data.

    + pub body: Option, +///

    The bucket name to which the PUT action was initiated.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with +/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    +///

    +/// General purpose buckets - Setting this header to +/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with +/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 +/// Bucket Key.

    +///

    +/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + pub bucket_key_enabled: Option, +///

    Can be used to specify caching behavior along the request/reply chain. For more +/// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    + pub cache_control: Option, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm +/// or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    +///

    For the x-amz-checksum-algorithm +/// header, replace +/// algorithm +/// with the supported algorithm from the following list:

    +///
      +///
    • +///

      +/// CRC32 +///

      +///
    • +///
    • +///

      +/// CRC32C +///

      +///
    • +///
    • +///

      +/// CRC64NVME +///

      +///
    • +///
    • +///

      +/// SHA1 +///

      +///
    • +///
    • +///

      +/// SHA256 +///

      +///
    • +///
    +///

    For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If the individual checksum value you provide through x-amz-checksum-algorithm +/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    +/// +///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is +/// required for any request to upload an object with a retention period configured using +/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the +/// Amazon S3 User Guide.

    +///
    +///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + pub checksum_algorithm: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the object. The CRC64NVME checksum is +/// always a full object checksum. For more information, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    + pub content_disposition: Option, +///

    Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    + pub content_encoding: Option, +///

    The language the content is in.

    + pub content_language: Option, +///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be +/// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    + pub content_length: Option, +///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to +/// RFC 1864. This header can be used as a message integrity check to verify that the data is +/// the same data that was originally sent. Although it is optional, we recommend using the +/// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST +/// request authentication, see REST Authentication.

    +/// +///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is +/// required for any request to upload an object with a retention period configured using +/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the +/// Amazon S3 User Guide.

    +///
    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub content_md5: Option, +///

    A standard MIME type describing the format of the contents. For more information, see +/// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    + pub content_type: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The date and time at which the object is no longer cacheable. For more information, see +/// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    + pub expires: Option, +///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_full_control: Option, +///

    Allows grantee to read the object data and its metadata.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_read: Option, +///

    Allows grantee to read the object ACL.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_read_acp: Option, +///

    Allows grantee to write the ACL for the applicable object.

    +/// +///
      +///
    • +///

      This functionality is not supported for directory buckets.

      +///
    • +///
    • +///

      This functionality is not supported for Amazon S3 on Outposts.

      +///
    • +///
    +///
    + pub grant_write_acp: Option, +///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE +/// operation matches the ETag of the object in S3. If the ETag values do not match, the +/// operation returns a 412 Precondition Failed error.

    +///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    +///

    Expects the ETag value as a string.

    +///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_match: Option, +///

    Uploads the object only if the object key name does not already exist in the bucket +/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    +///

    If a conflicting operation occurs during the upload S3 returns a 409 +/// ConditionalRequestConflict response. On a 409 failure you should retry the +/// upload.

    +///

    Expects the '*' (asterisk) character.

    +///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_none_match: Option, +///

    Object key for which the PUT action was initiated.

    + pub key: ObjectKey, +///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, +///

    Specifies whether a legal hold will be applied to this object. For more information +/// about S3 Object Lock, see Object Lock in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_legal_hold_status: Option, +///

    The Object Lock mode that you want to apply to this object.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_mode: Option, +///

    The date and time when you want this object's Object Lock to expire. Must be formatted +/// as a timestamp parameter.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub object_lock_retain_until_date: Option, + pub request_payer: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, +/// AES256).

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets passed on +/// to Amazon Web Services KMS for future GetObject operations on +/// this object.

    +///

    +/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    +///

    +/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + pub ssekms_encryption_context: Option, +///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same +/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    +///

    +/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS +/// key to use. If you specify +/// x-amz-server-side-encryption:aws:kms or +/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key +/// (aws/s3) to protect the data.

    +///

    +/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the +/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses +/// the bucket's default KMS customer managed key ID. If you want to explicitly set the +/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +/// +/// Incorrect key specification results in an HTTP 400 Bad Request error.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 +/// (for example, AES256, aws:kms, aws:kms:dsse).

    +///
      +///
    • +///

      +/// General purpose buckets - You have four mutually +/// exclusive options to protect data using server-side encryption in Amazon S3, depending on +/// how you choose to manage the encryption keys. Specifically, the encryption key +/// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and +/// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by +/// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt +/// data at rest by using server-side encryption with other key options. For more +/// information, see Using Server-Side +/// Encryption in the Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      +///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. +/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. +/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and +/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. +///

      +/// +///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the +/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. +/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), +/// the encryption request headers must match the default encryption configuration of the directory bucket. +/// +///

      +///
      +///
    • +///
    + pub server_side_encryption: Option, +///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The +/// STANDARD storage class provides high durability and high availability. Depending on +/// performance needs, you can specify a different Storage Class. For more information, see +/// Storage +/// Classes in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      For directory buckets, only the S3 Express One Zone storage class is supported to store +/// newly created objects.

      +///
    • +///
    • +///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      +///
    • +///
    +///
    + pub storage_class: Option, +///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For +/// example, "Key1=Value1")

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub tagging: Option, +///

    If the bucket is configured as a website, redirects requests for this object to another +/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in +/// the object metadata. For information about object metadata, see Object Key and Metadata in the +/// Amazon S3 User Guide.

    +///

    In the following example, the request header sets the redirect to an object +/// (anotherPage.html) in the same bucket:

    +///

    +/// x-amz-website-redirect-location: /anotherPage.html +///

    +///

    In the following example, the request header sets the object redirect to another +/// website:

    +///

    +/// x-amz-website-redirect-location: http://www.example.com/ +///

    +///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and +/// How to +/// Configure Website Page Redirects in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub website_redirect_location: Option, +///

    +/// Specifies the offset for appending data to existing objects in bytes. +/// The offset must be equal to the size of the existing object being appended to. +/// If no object exists, setting this header to 0 will create a new object. +///

    +/// +///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    +///
    + pub write_offset_bytes: Option, +} + +impl fmt::Debug for PutObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectInput"); +if let Some(ref val) = self.acl { +d.field("acl", val); +} +if let Some(ref val) = self.body { +d.field("body", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_length { +d.field("content_length", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.grant_full_control { +d.field("grant_full_control", val); +} +if let Some(ref val) = self.grant_read { +d.field("grant_read", val); +} +if let Some(ref val) = self.grant_read_acp { +d.field("grant_read_acp", val); +} +if let Some(ref val) = self.grant_write_acp { +d.field("grant_write_acp", val); +} +if let Some(ref val) = self.if_match { +d.field("if_match", val); +} +if let Some(ref val) = self.if_none_match { +d.field("if_none_match", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tagging { +d.field("tagging", val); +} +if let Some(ref val) = self.website_redirect_location { +d.field("website_redirect_location", val); +} +if let Some(ref val) = self.write_offset_bytes { +d.field("write_offset_bytes", val); +} +d.finish_non_exhaustive() +} +} + +impl PutObjectInput { +#[must_use] +pub fn builder() -> builders::PutObjectInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLegalHoldInput { +///

    The bucket name containing the object that you want to place a legal hold on.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash for the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The key name for the object that you want to place a legal hold on.

    + pub key: ObjectKey, +///

    Container element for the legal hold configuration you want to apply to the specified +/// object.

    + pub legal_hold: Option, + pub request_payer: Option, +///

    The version ID of the object that you want to place a legal hold on.

    + pub version_id: Option, +} + +impl fmt::Debug for PutObjectLegalHoldInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectLegalHoldInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.legal_hold { +d.field("legal_hold", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl PutObjectLegalHoldInput { +#[must_use] +pub fn builder() -> builders::PutObjectLegalHoldInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLegalHoldOutput { + pub request_charged: Option, +} + +impl fmt::Debug for PutObjectLegalHoldOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectLegalHoldOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLockConfigurationInput { +///

    The bucket whose Object Lock configuration you want to create or replace.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash for the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The Object Lock configuration that you want to apply to the specified bucket.

    + pub object_lock_configuration: Option, + pub request_payer: Option, +///

    A token to allow Object Lock to be enabled for an existing bucket.

    + pub token: Option, +} + +impl fmt::Debug for PutObjectLockConfigurationInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectLockConfigurationInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.object_lock_configuration { +d.field("object_lock_configuration", val); +} +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.token { +d.field("token", val); +} +d.finish_non_exhaustive() +} +} + +impl PutObjectLockConfigurationInput { +#[must_use] +pub fn builder() -> builders::PutObjectLockConfigurationInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLockConfigurationOutput { + pub request_charged: Option, +} + +impl fmt::Debug for PutObjectLockConfigurationOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectLockConfigurationOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectOutput { +///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header +/// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it +/// was uploaded without a checksum (and Amazon S3 added the default checksum, +/// CRC64NVME, to the uploaded object). For more information about how +/// checksums are calculated with multipart uploads, see Checking object integrity +/// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    This header specifies the checksum type of the object, which determines how part-level +/// checksums are combined to create an object-level checksum for multipart objects. For +/// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a +/// data integrity check to verify that the checksum type that is received is the same checksum +/// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, +///

    Entity tag for the uploaded object.

    +///

    +/// General purpose buckets - To ensure that data is not +/// corrupted traversing the network, for objects where the ETag is the MD5 digest of the +/// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned +/// ETag to the calculated MD5 value.

    +///

    +/// Directory buckets - The ETag for the object in +/// a directory bucket isn't the MD5 digest of the object.

    + pub e_tag: Option, +///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, +/// the response includes this header. It includes the expiry-date and +/// rule-id key-value pairs that provide information about object expiration. +/// The value of the rule-id is URL-encoded.

    +/// +///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    +///
    + pub expiration: Option, + pub request_charged: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of +/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. +/// This value is stored as object metadata and automatically gets +/// passed on to Amazon Web Services KMS for future GetObject +/// operations on this object.

    + pub ssekms_encryption_context: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, +///

    +/// The size of the object in bytes. This value is only be present if you append to an object. +///

    +/// +///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    +///
    + pub size: Option, +///

    Version ID of the object.

    +///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID +/// for the object being stored. Amazon S3 returns this ID in the response. When you enable +/// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object +/// simultaneously, it stores all of the objects. For more information about versioning, see +/// Adding Objects to +/// Versioning-Enabled Buckets in the Amazon S3 User Guide. For +/// information about returning the versioning state of a bucket, see GetBucketVersioning.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub version_id: Option, +} + +impl fmt::Debug for PutObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.checksum_type { +d.field("checksum_type", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_encryption_context { +d.field("ssekms_encryption_context", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.size { +d.field("size", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectRetentionInput { +///

    The bucket name that contains the object you want to apply this Object Retention +/// configuration to.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates whether this action should bypass Governance-mode restrictions.

    + pub bypass_governance_retention: Option, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash for the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The key name for the object that you want to apply this Object Retention configuration +/// to.

    + pub key: ObjectKey, + pub request_payer: Option, +///

    The container element for the Object Retention configuration.

    + pub retention: Option, +///

    The version ID for the object that you want to apply this Object Retention configuration +/// to.

    + pub version_id: Option, +} + +impl fmt::Debug for PutObjectRetentionInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectRetentionInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.bypass_governance_retention { +d.field("bypass_governance_retention", val); +} +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.retention { +d.field("retention", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl PutObjectRetentionInput { +#[must_use] +pub fn builder() -> builders::PutObjectRetentionInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectRetentionOutput { + pub request_charged: Option, +} + +impl fmt::Debug for PutObjectRetentionOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectRetentionOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutObjectTaggingInput { +///

    The bucket name containing the object.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash for the request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Name of the object key.

    + pub key: ObjectKey, + pub request_payer: Option, +///

    Container for the TagSet and Tag elements

    + pub tagging: Tagging, +///

    The versionId of the object that the tag-set will be added to.

    + pub version_id: Option, +} + +impl fmt::Debug for PutObjectTaggingInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectTaggingInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +d.field("tagging", &self.tagging); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl PutObjectTaggingInput { +#[must_use] +pub fn builder() -> builders::PutObjectTaggingInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectTaggingOutput { +///

    The versionId of the object the tag-set was added to.

    + pub version_id: Option, +} + +impl fmt::Debug for PutObjectTaggingOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutObjectTaggingOutput"); +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Clone, PartialEq)] +pub struct PutPublicAccessBlockInput { +///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want +/// to set.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The MD5 hash of the PutPublicAccessBlock request body.

    +///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 +/// bucket. You can enable the configuration options in any combination. For more information +/// about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    + pub public_access_block_configuration: PublicAccessBlockConfiguration, +} + +impl fmt::Debug for PutPublicAccessBlockInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutPublicAccessBlockInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("public_access_block_configuration", &self.public_access_block_configuration); +d.finish_non_exhaustive() +} +} + +impl PutPublicAccessBlockInput { +#[must_use] +pub fn builder() -> builders::PutPublicAccessBlockInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct PutPublicAccessBlockOutput { +} + +impl fmt::Debug for PutPublicAccessBlockOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("PutPublicAccessBlockOutput"); +d.finish_non_exhaustive() +} +} + + +pub type QueueArn = String; + +///

    Specifies the configuration for publishing messages to an Amazon Simple Queue Service +/// (Amazon SQS) queue when Amazon S3 detects specified events.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct QueueConfiguration { +///

    A collection of bucket events for which to send notifications

    + pub events: EventList, + pub filter: Option, + pub id: Option, +///

    The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message +/// when it detects events of the specified type.

    + pub queue_arn: QueueArn, +} + +impl fmt::Debug for QueueConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("QueueConfiguration"); +d.field("events", &self.events); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.field("queue_arn", &self.queue_arn); +d.finish_non_exhaustive() +} +} + + +pub type QueueConfigurationList = List; + +pub type Quiet = bool; + +pub type QuoteCharacter = String; + +pub type QuoteEscapeCharacter = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct QuoteFields(Cow<'static, str>); + +impl QuoteFields { +pub const ALWAYS: &'static str = "ALWAYS"; + +pub const ASNEEDED: &'static str = "ASNEEDED"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for QuoteFields { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: QuoteFields) -> Self { +s.0 +} +} + +impl FromStr for QuoteFields { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + + +pub type RecordDelimiter = String; + +///

    The container for the records event.

    +#[derive(Clone, Default, PartialEq)] +pub struct RecordsEvent { +///

    The byte array of partial, one or more result records. S3 Select doesn't guarantee that +/// a record will be self-contained in one record frame. To ensure continuous streaming of +/// data, S3 Select might split the same record across multiple record frames instead of +/// aggregating the results in memory. Some S3 clients (for example, the SDK for Java) handle this behavior by creating a ByteStream out of the response by +/// default. Other clients might not handle this behavior by default. In those cases, you must +/// aggregate the results on the client side and parse the response.

    + pub payload: Option, +} + +impl fmt::Debug for RecordsEvent { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RecordsEvent"); +if let Some(ref val) = self.payload { +d.field("payload", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Specifies how requests are redirected. In the event of an error, you can specify a +/// different error code to return.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Redirect { +///

    The host name to use in the redirect request.

    + pub host_name: Option, +///

    The HTTP redirect code to use on the response. Not required if one of the siblings is +/// present.

    + pub http_redirect_code: Option, +///

    Protocol to use when redirecting requests. The default is the protocol that is used in +/// the original request.

    + pub protocol: Option, +///

    The object key prefix to use in the redirect request. For example, to redirect requests +/// for all pages with prefix docs/ (objects in the docs/ folder) to +/// documents/, you can set a condition block with KeyPrefixEquals +/// set to docs/ and in the Redirect set ReplaceKeyPrefixWith to +/// /documents. Not required if one of the siblings is present. Can be present +/// only if ReplaceKeyWith is not provided.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub replace_key_prefix_with: Option, +///

    The specific object key to use in the redirect request. For example, redirect request to +/// error.html. Not required if one of the siblings is present. Can be present +/// only if ReplaceKeyPrefixWith is not provided.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub replace_key_with: Option, +} + +impl fmt::Debug for Redirect { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Redirect"); +if let Some(ref val) = self.host_name { +d.field("host_name", val); +} +if let Some(ref val) = self.http_redirect_code { +d.field("http_redirect_code", val); +} +if let Some(ref val) = self.protocol { +d.field("protocol", val); +} +if let Some(ref val) = self.replace_key_prefix_with { +d.field("replace_key_prefix_with", val); +} +if let Some(ref val) = self.replace_key_with { +d.field("replace_key_with", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 +/// bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct RedirectAllRequestsTo { +///

    Name of the host where requests are redirected.

    + pub host_name: HostName, +///

    Protocol to use when redirecting requests. The default is the protocol that is used in +/// the original request.

    + pub protocol: Option, +} + +impl fmt::Debug for RedirectAllRequestsTo { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RedirectAllRequestsTo"); +d.field("host_name", &self.host_name); +if let Some(ref val) = self.protocol { +d.field("protocol", val); +} +d.finish_non_exhaustive() +} +} + + +pub type Region = String; + +pub type ReplaceKeyPrefixWith = String; + +pub type ReplaceKeyWith = String; + +pub type ReplicaKmsKeyID = String; + +///

    A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't +/// replicate replica modifications by default. In the latest version of replication +/// configuration (when Filter is specified), you can specify this element and set +/// the status to Enabled to replicate modifications on replicas.

    +/// +///

    If you don't specify the Filter element, Amazon S3 assumes that the +/// replication configuration is the earlier version, V1. In the earlier version, this +/// element is not allowed.

    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicaModifications { +///

    Specifies whether Amazon S3 replicates modifications on replicas.

    + pub status: ReplicaModificationsStatus, +} + +impl fmt::Debug for ReplicaModifications { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicaModifications"); +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicaModificationsStatus(Cow<'static, str>); + +impl ReplicaModificationsStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ReplicaModificationsStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ReplicaModificationsStatus) -> Self { +s.0 +} +} + +impl FromStr for ReplicaModificationsStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    A container for replication rules. You can add up to 1,000 rules. The maximum size of a +/// replication configuration is 2 MB.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationConfiguration { +///

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when +/// replicating objects. For more information, see How to Set Up Replication +/// in the Amazon S3 User Guide.

    + pub role: Role, +///

    A container for one or more replication rules. A replication configuration must have at +/// least one rule and can contain a maximum of 1,000 rules.

    + pub rules: ReplicationRules, +} + +impl fmt::Debug for ReplicationConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationConfiguration"); +d.field("role", &self.role); +d.field("rules", &self.rules); +d.finish_non_exhaustive() +} +} + + +///

    Specifies which Amazon S3 objects to replicate and where to store the replicas.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicationRule { + pub delete_marker_replication: Option, +///

    A container for information about the replication destination and its configurations +/// including enabling the S3 Replication Time Control (S3 RTC).

    + pub destination: Destination, +///

    Optional configuration to replicate existing source bucket objects.

    +/// +///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the +/// Amazon S3 User Guide.

    +///
    + pub existing_object_replication: Option, + pub filter: Option, +///

    A unique identifier for the rule. The maximum value is 255 characters.

    + pub id: Option, +///

    An object key name prefix that identifies the object or objects to which the rule +/// applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, +/// specify an empty string.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub prefix: Option, +///

    The priority indicates which rule has precedence whenever two or more replication rules +/// conflict. Amazon S3 will attempt to replicate objects according to all replication rules. +/// However, if there are two or more rules with the same destination bucket, then objects will +/// be replicated according to the rule with the highest priority. The higher the number, the +/// higher the priority.

    +///

    For more information, see Replication in the +/// Amazon S3 User Guide.

    + pub priority: Option, +///

    A container that describes additional filters for identifying the source objects that +/// you want to replicate. You can choose to enable or disable the replication of these +/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created +/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service +/// (SSE-KMS).

    + pub source_selection_criteria: Option, +///

    Specifies whether the rule is enabled.

    + pub status: ReplicationRuleStatus, +} + +impl fmt::Debug for ReplicationRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationRule"); +if let Some(ref val) = self.delete_marker_replication { +d.field("delete_marker_replication", val); +} +d.field("destination", &self.destination); +if let Some(ref val) = self.existing_object_replication { +d.field("existing_object_replication", val); +} +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.priority { +d.field("priority", val); +} +if let Some(ref val) = self.source_selection_criteria { +d.field("source_selection_criteria", val); +} +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +///

    A container for specifying rule filters. The filters determine the subset of objects to +/// which the rule applies. This element is required only if you specify more than one filter.

    +///

    For example:

    +///
      +///
    • +///

      If you specify both a Prefix and a Tag filter, wrap +/// these filters in an And tag.

      +///
    • +///
    • +///

      If you specify a filter based on multiple tags, wrap the Tag elements +/// in an And tag.

      +///
    • +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationRuleAndOperator { +///

    An object key name prefix that identifies the subset of objects to which the rule +/// applies.

    + pub prefix: Option, +///

    An array of tags containing key and value pairs.

    + pub tags: Option, +} + +impl fmt::Debug for ReplicationRuleAndOperator { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationRuleAndOperator"); +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tags { +d.field("tags", val); +} +d.finish_non_exhaustive() +} +} + + +///

    A filter that identifies the subset of objects to which the replication rule applies. A +/// Filter must specify exactly one Prefix, Tag, or +/// an And child element.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationRuleFilter { +///

    A container for specifying rule filters. The filters determine the subset of objects to +/// which the rule applies. This element is required only if you specify more than one filter. +/// For example:

    +///
      +///
    • +///

      If you specify both a Prefix and a Tag filter, wrap +/// these filters in an And tag.

      +///
    • +///
    • +///

      If you specify a filter based on multiple tags, wrap the Tag elements +/// in an And tag.

      +///
    • +///
    + pub and: Option, +///

    An object key name prefix that identifies the subset of objects to which the rule +/// applies.

    +/// +///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using +/// XML requests. For more information, see +/// XML related object key constraints.

    +///
    + pub prefix: Option, +///

    A container for specifying a tag key and value.

    +///

    The rule applies only to objects that have the tag in their tag set.

    + pub tag: Option, +} + +impl fmt::Debug for ReplicationRuleFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationRuleFilter"); +if let Some(ref val) = self.and { +d.field("and", val); +} +if let Some(ref val) = self.prefix { +d.field("prefix", val); +} +if let Some(ref val) = self.tag { +d.field("tag", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicationRuleStatus(Cow<'static, str>); + +impl ReplicationRuleStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ReplicationRuleStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ReplicationRuleStatus) -> Self { +s.0 +} +} + +impl FromStr for ReplicationRuleStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type ReplicationRules = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ReplicationStatus(Cow<'static, str>); + +impl ReplicationStatus { +pub const COMPLETE: &'static str = "COMPLETE"; + +pub const COMPLETED: &'static str = "COMPLETED"; + +pub const FAILED: &'static str = "FAILED"; + +pub const PENDING: &'static str = "PENDING"; + +pub const REPLICA: &'static str = "REPLICA"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ReplicationStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ReplicationStatus) -> Self { +s.0 +} +} + +impl FromStr for ReplicationStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is +/// enabled and the time when all objects and operations on objects must be replicated. Must be +/// specified together with a Metrics block.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicationTime { +///

    Specifies whether the replication time is enabled.

    + pub status: ReplicationTimeStatus, +///

    A container specifying the time by which replication should be complete for all objects +/// and operations on objects.

    + pub time: ReplicationTimeValue, +} + +impl fmt::Debug for ReplicationTime { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationTime"); +d.field("status", &self.status); +d.field("time", &self.time); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicationTimeStatus(Cow<'static, str>); + +impl ReplicationTimeStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ReplicationTimeStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ReplicationTimeStatus) -> Self { +s.0 +} +} + +impl FromStr for ReplicationTimeStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics +/// EventThreshold.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationTimeValue { +///

    Contains an integer specifying time in minutes.

    +///

    Valid value: 15

    + pub minutes: Option, +} + +impl fmt::Debug for ReplicationTimeValue { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ReplicationTimeValue"); +if let Some(ref val) = self.minutes { +d.field("minutes", val); +} +d.finish_non_exhaustive() +} +} + + +///

    If present, indicates that the requester was successfully charged for the +/// request.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RequestCharged(Cow<'static, str>); + +impl RequestCharged { +pub const REQUESTER: &'static str = "requester"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for RequestCharged { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: RequestCharged) -> Self { +s.0 +} +} + +impl FromStr for RequestCharged { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Confirms that the requester knows that they will be charged for the request. Bucket +/// owners need not specify this parameter in their requests. If either the source or +/// destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding +/// charges to copy the object. For information about downloading objects from Requester Pays +/// buckets, see Downloading Objects in +/// Requester Pays Buckets in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RequestPayer(Cow<'static, str>); + +impl RequestPayer { +pub const REQUESTER: &'static str = "requester"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for RequestPayer { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: RequestPayer) -> Self { +s.0 +} +} + +impl FromStr for RequestPayer { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Container for Payer.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct RequestPaymentConfiguration { +///

    Specifies who pays for the download and request fees.

    + pub payer: Payer, +} + +impl fmt::Debug for RequestPaymentConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RequestPaymentConfiguration"); +d.field("payer", &self.payer); +d.finish_non_exhaustive() +} +} + +impl Default for RequestPaymentConfiguration { +fn default() -> Self { +Self { +payer: String::new().into(), +} +} +} + + +///

    Container for specifying if periodic QueryProgress messages should be +/// sent.

    +#[derive(Clone, Default, PartialEq)] +pub struct RequestProgress { +///

    Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, +/// FALSE. Default value: FALSE.

    + pub enabled: Option, +} + +impl fmt::Debug for RequestProgress { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RequestProgress"); +if let Some(ref val) = self.enabled { +d.field("enabled", val); +} +d.finish_non_exhaustive() +} +} + + +pub type RequestRoute = String; + +pub type RequestToken = String; + +pub type ResponseCacheControl = String; + +pub type ResponseContentDisposition = String; + +pub type ResponseContentEncoding = String; + +pub type ResponseContentLanguage = String; + +pub type ResponseContentType = String; + +pub type ResponseExpires = Timestamp; + +pub type Restore = String; + +pub type RestoreExpiryDate = Timestamp; + +#[derive(Clone, Default, PartialEq)] +pub struct RestoreObjectInput { +///

    The bucket name containing the object to restore.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Object key for which the action was initiated.

    + pub key: ObjectKey, + pub request_payer: Option, + pub restore_request: Option, +///

    VersionId used to reference a specific version of the object.

    + pub version_id: Option, +} + +impl fmt::Debug for RestoreObjectInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RestoreObjectInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.restore_request { +d.field("restore_request", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl RestoreObjectInput { +#[must_use] +pub fn builder() -> builders::RestoreObjectInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct RestoreObjectOutput { + pub request_charged: Option, +///

    Indicates the path in the provided S3 output location where Select results will be +/// restored to.

    + pub restore_output_path: Option, +} + +impl fmt::Debug for RestoreObjectOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RestoreObjectOutput"); +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.restore_output_path { +d.field("restore_output_path", val); +} +d.finish_non_exhaustive() +} +} + + +pub type RestoreOutputPath = String; + +///

    Container for restore job parameters.

    +#[derive(Clone, Default, PartialEq)] +pub struct RestoreRequest { +///

    Lifetime of the active copy in days. Do not use with restores that specify +/// OutputLocation.

    +///

    The Days element is required for regular restores, and must not be provided for select +/// requests.

    + pub days: Option, +///

    The optional description for the job.

    + pub description: Option, +///

    S3 Glacier related parameters pertaining to this job. Do not use with restores that +/// specify OutputLocation.

    + pub glacier_job_parameters: Option, +///

    Describes the location where the restore job's output is stored.

    + pub output_location: Option, +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Describes the parameters for Select job types.

    + pub select_parameters: Option, +///

    Retrieval tier at which the restore will be processed.

    + pub tier: Option, +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Type of restore request.

    + pub type_: Option, +} + +impl fmt::Debug for RestoreRequest { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RestoreRequest"); +if let Some(ref val) = self.days { +d.field("days", val); +} +if let Some(ref val) = self.description { +d.field("description", val); +} +if let Some(ref val) = self.glacier_job_parameters { +d.field("glacier_job_parameters", val); +} +if let Some(ref val) = self.output_location { +d.field("output_location", val); +} +if let Some(ref val) = self.select_parameters { +d.field("select_parameters", val); +} +if let Some(ref val) = self.tier { +d.field("tier", val); +} +if let Some(ref val) = self.type_ { +d.field("type_", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RestoreRequestType(Cow<'static, str>); + +impl RestoreRequestType { +pub const SELECT: &'static str = "SELECT"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for RestoreRequestType { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: RestoreRequestType) -> Self { +s.0 +} +} + +impl FromStr for RestoreRequestType { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Specifies the restoration status of an object. Objects in certain storage classes must +/// be restored before they can be retrieved. For more information about these storage classes +/// and how to work with archived objects, see Working with archived +/// objects in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    +#[derive(Clone, Default, PartialEq)] +pub struct RestoreStatus { +///

    Specifies whether the object is currently being restored. If the object restoration is +/// in progress, the header returns the value TRUE. For example:

    +///

    +/// x-amz-optional-object-attributes: IsRestoreInProgress="true" +///

    +///

    If the object restoration has completed, the header returns the value +/// FALSE. For example:

    +///

    +/// x-amz-optional-object-attributes: IsRestoreInProgress="false", +/// RestoreExpiryDate="2012-12-21T00:00:00.000Z" +///

    +///

    If the object hasn't been restored, there is no header response.

    + pub is_restore_in_progress: Option, +///

    Indicates when the restored copy will expire. This value is populated only if the object +/// has already been restored. For example:

    +///

    +/// x-amz-optional-object-attributes: IsRestoreInProgress="false", +/// RestoreExpiryDate="2012-12-21T00:00:00.000Z" +///

    + pub restore_expiry_date: Option, +} + +impl fmt::Debug for RestoreStatus { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RestoreStatus"); +if let Some(ref val) = self.is_restore_in_progress { +d.field("is_restore_in_progress", val); +} +if let Some(ref val) = self.restore_expiry_date { +d.field("restore_expiry_date", val); +} +d.finish_non_exhaustive() +} +} + + +pub type Role = String; + +///

    Specifies the redirect behavior and when a redirect is applied. For more information +/// about routing rules, see Configuring advanced conditional redirects in the +/// Amazon S3 User Guide.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct RoutingRule { +///

    A container for describing a condition that must be met for the specified redirect to +/// apply. For example, 1. If request is for pages in the /docs folder, redirect +/// to the /documents folder. 2. If request results in HTTP error 4xx, redirect +/// request to another host where you might process the error.

    + pub condition: Option, +///

    Container for redirect information. You can redirect requests to another host, to +/// another page, or with another protocol. In the event of an error, you can specify a +/// different error code to return.

    + pub redirect: Redirect, +} + +impl fmt::Debug for RoutingRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("RoutingRule"); +if let Some(ref val) = self.condition { +d.field("condition", val); +} +d.field("redirect", &self.redirect); +d.finish_non_exhaustive() +} +} + + +pub type RoutingRules = List; + +///

    A container for object key name prefix and suffix filtering rules.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct S3KeyFilter { + pub filter_rules: Option, +} + +impl fmt::Debug for S3KeyFilter { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("S3KeyFilter"); +if let Some(ref val) = self.filter_rules { +d.field("filter_rules", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Describes an Amazon S3 location that will receive the results of the restore request.

    +#[derive(Clone, Default, PartialEq)] +pub struct S3Location { +///

    A list of grants that control access to the staged results.

    + pub access_control_list: Option, +///

    The name of the bucket where the restore results will be placed.

    + pub bucket_name: BucketName, +///

    The canned ACL to apply to the restore results.

    + pub canned_acl: Option, + pub encryption: Option, +///

    The prefix that is prepended to the restore results for this request.

    + pub prefix: LocationPrefix, +///

    The class of storage used to store the restore results.

    + pub storage_class: Option, +///

    The tag-set that is applied to the restore results.

    + pub tagging: Option, +///

    A list of metadata to store with the restore results in S3.

    + pub user_metadata: Option, +} + +impl fmt::Debug for S3Location { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("S3Location"); +if let Some(ref val) = self.access_control_list { +d.field("access_control_list", val); +} +d.field("bucket_name", &self.bucket_name); +if let Some(ref val) = self.canned_acl { +d.field("canned_acl", val); +} +if let Some(ref val) = self.encryption { +d.field("encryption", val); +} +d.field("prefix", &self.prefix); +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tagging { +d.field("tagging", val); +} +if let Some(ref val) = self.user_metadata { +d.field("user_metadata", val); +} +d.finish_non_exhaustive() +} +} + + +pub type S3TablesArn = String; + +pub type S3TablesBucketArn = String; + +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct S3TablesDestination { +///

    +/// The Amazon Resource Name (ARN) for the table bucket that's specified as the +/// destination in the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. +///

    + pub table_bucket_arn: S3TablesBucketArn, +///

    +/// The name for the metadata table in your metadata table configuration. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    + pub table_name: S3TablesName, +} + +impl fmt::Debug for S3TablesDestination { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("S3TablesDestination"); +d.field("table_bucket_arn", &self.table_bucket_arn); +d.field("table_name", &self.table_name); +d.finish_non_exhaustive() +} +} + + +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct S3TablesDestinationResult { +///

    +/// The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The +/// specified metadata table name must be unique within the aws_s3_metadata namespace +/// in the destination table bucket. +///

    + pub table_arn: S3TablesArn, +///

    +/// The Amazon Resource Name (ARN) for the table bucket that's specified as the +/// destination in the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. +///

    + pub table_bucket_arn: S3TablesBucketArn, +///

    +/// The name for the metadata table in your metadata table configuration. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    + pub table_name: S3TablesName, +///

    +/// The table bucket namespace for the metadata table in your metadata table configuration. This value +/// is always aws_s3_metadata. +///

    + pub table_namespace: S3TablesNamespace, +} + +impl fmt::Debug for S3TablesDestinationResult { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("S3TablesDestinationResult"); +d.field("table_arn", &self.table_arn); +d.field("table_bucket_arn", &self.table_bucket_arn); +d.field("table_name", &self.table_name); +d.field("table_namespace", &self.table_namespace); +d.finish_non_exhaustive() +} +} + + +pub type S3TablesName = String; + +pub type S3TablesNamespace = String; + +pub type SSECustomerAlgorithm = String; + +pub type SSECustomerKey = String; + +pub type SSECustomerKeyMD5 = String; + +///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SSEKMS { +///

    Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for +/// encrypting inventory reports.

    + pub key_id: SSEKMSKeyId, +} + +impl fmt::Debug for SSEKMS { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SSEKMS"); +d.field("key_id", &self.key_id); +d.finish_non_exhaustive() +} +} + + +pub type SSEKMSEncryptionContext = String; + +pub type SSEKMSKeyId = String; + +///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SSES3 { +} + +impl fmt::Debug for SSES3 { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SSES3"); +d.finish_non_exhaustive() +} +} + + +///

    Specifies the byte range of the object to get the records from. A record is processed +/// when its first byte is contained by the range. This parameter is optional, but when +/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the +/// start and end of the range.

    +#[derive(Clone, Default, PartialEq)] +pub struct ScanRange { +///

    Specifies the end of the byte range. This parameter is optional. Valid values: +/// non-negative integers. The default value is one less than the size of the object being +/// queried. If only the End parameter is supplied, it is interpreted to mean scan the last N +/// bytes of the file. For example, +/// 50 means scan the +/// last 50 bytes.

    + pub end: Option, +///

    Specifies the start of the byte range. This parameter is optional. Valid values: +/// non-negative integers. The default value is 0. If only start is supplied, it +/// means scan from that point to the end of the file. For example, +/// 50 means scan +/// from byte 50 until the end of the file.

    + pub start: Option, +} + +impl fmt::Debug for ScanRange { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ScanRange"); +if let Some(ref val) = self.end { +d.field("end", val); +} +if let Some(ref val) = self.start { +d.field("start", val); +} +d.finish_non_exhaustive() +} +} + + +///

    The container for selecting objects from a content event stream.

    +#[derive(Debug, Clone, PartialEq)] +#[non_exhaustive] +pub enum SelectObjectContentEvent { +///

    The Continuation Event.

    + Cont(ContinuationEvent), +///

    The End Event.

    + End(EndEvent), +///

    The Progress Event.

    + Progress(ProgressEvent), +///

    The Records Event.

    + Records(RecordsEvent), +///

    The Stats Event.

    + Stats(StatsEvent), +} + +/// +///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query +/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a +/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data +/// into records. It returns only records that match the specified SQL expression. You must +/// also specify the data serialization format for the response. For more information, see +/// S3Select API Documentation.

    +#[derive(Clone, PartialEq)] +pub struct SelectObjectContentInput { +///

    The S3 bucket.

    + pub bucket: BucketName, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The object key.

    + pub key: ObjectKey, +///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created +/// using a checksum algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    + pub sse_customer_algorithm: Option, +///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. +/// For more information, see +/// Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    + pub sse_customer_key: Option, +///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum +/// algorithm. For more information, +/// see Protecting data using SSE-C keys in the +/// Amazon S3 User Guide.

    + pub sse_customer_key_md5: Option, + pub request: SelectObjectContentRequest, +} + +impl fmt::Debug for SelectObjectContentInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SelectObjectContentInput"); +d.field("bucket", &self.bucket); +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +d.field("request", &self.request); +d.finish_non_exhaustive() +} +} + +impl SelectObjectContentInput { +#[must_use] +pub fn builder() -> builders::SelectObjectContentInputBuilder { +default() +} +} + +#[derive(Default)] +pub struct SelectObjectContentOutput { +///

    The array of results.

    + pub payload: Option, +} + +impl fmt::Debug for SelectObjectContentOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SelectObjectContentOutput"); +if let Some(ref val) = self.payload { +d.field("payload", val); +} +d.finish_non_exhaustive() +} +} + + +/// +///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query +/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a +/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data +/// into records. It returns only records that match the specified SQL expression. You must +/// also specify the data serialization format for the response. For more information, see +/// S3Select API Documentation.

    +#[derive(Clone, PartialEq)] +pub struct SelectObjectContentRequest { +///

    The expression that is used to query the object.

    + pub expression: Expression, +///

    The type of the provided expression (for example, SQL).

    + pub expression_type: ExpressionType, +///

    Describes the format of the data in the object that is being queried.

    + pub input_serialization: InputSerialization, +///

    Describes the format of the data that you want Amazon S3 to return in response.

    + pub output_serialization: OutputSerialization, +///

    Specifies if periodic request progress information should be enabled.

    + pub request_progress: Option, +///

    Specifies the byte range of the object to get the records from. A record is processed +/// when its first byte is contained by the range. This parameter is optional, but when +/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the +/// start and end of the range.

    +///

    +/// ScanRangemay be used in the following ways:

    +///
      +///
    • +///

      +/// 50100 +/// - process only the records starting between the bytes 50 and 100 (inclusive, counting +/// from zero)

      +///
    • +///
    • +///

      +/// 50 - +/// process only the records starting after the byte 50

      +///
    • +///
    • +///

      +/// 50 - +/// process only the records within the last 50 bytes of the file.

      +///
    • +///
    + pub scan_range: Option, +} + +impl fmt::Debug for SelectObjectContentRequest { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SelectObjectContentRequest"); +d.field("expression", &self.expression); +d.field("expression_type", &self.expression_type); +d.field("input_serialization", &self.input_serialization); +d.field("output_serialization", &self.output_serialization); +if let Some(ref val) = self.request_progress { +d.field("request_progress", val); +} +if let Some(ref val) = self.scan_range { +d.field("scan_range", val); +} +d.finish_non_exhaustive() +} +} + + +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Describes the parameters for Select job types.

    +///

    Learn How to optimize querying your data in Amazon S3 using +/// Amazon Athena, S3 Object Lambda, or client-side filtering.

    +#[derive(Clone, PartialEq)] +pub struct SelectParameters { +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    The expression that is used to query the object.

    + pub expression: Expression, +///

    The type of the provided expression (for example, SQL).

    + pub expression_type: ExpressionType, +///

    Describes the serialization format of the object.

    + pub input_serialization: InputSerialization, +///

    Describes how the results of the Select job are serialized.

    + pub output_serialization: OutputSerialization, +} + +impl fmt::Debug for SelectParameters { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SelectParameters"); +d.field("expression", &self.expression); +d.field("expression_type", &self.expression_type); +d.field("input_serialization", &self.input_serialization); +d.field("output_serialization", &self.output_serialization); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ServerSideEncryption(Cow<'static, str>); + +impl ServerSideEncryption { +pub const AES256: &'static str = "AES256"; + +pub const AWS_KMS: &'static str = "aws:kms"; + +pub const AWS_KMS_DSSE: &'static str = "aws:kms:dsse"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for ServerSideEncryption { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: ServerSideEncryption) -> Self { +s.0 +} +} + +impl FromStr for ServerSideEncryption { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Describes the default server-side encryption to apply to new objects in the bucket. If a +/// PUT Object request doesn't specify any server-side encryption, this default encryption will +/// be applied. For more information, see PutBucketEncryption.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you don't specify +/// a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key +/// (aws/s3) in your Amazon Web Services account the first time that you add an +/// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key +/// for SSE-KMS.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +///

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

      +///
    • +///
    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionByDefault { +///

    Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default +/// encryption.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - This parameter is +/// allowed if and only if SSEAlgorithm is set to aws:kms or +/// aws:kms:dsse.

      +///
    • +///
    • +///

      +/// Directory buckets - This parameter is +/// allowed if and only if SSEAlgorithm is set to +/// aws:kms.

      +///
    • +///
    +///
    +///

    You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS +/// key.

    +///
      +///
    • +///

      Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab +///

      +///
    • +///
    • +///

      Key ARN: +/// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab +///

      +///
    • +///
    • +///

      Key Alias: alias/alias-name +///

      +///
    • +///
    +///

    If you are using encryption with cross-account or Amazon Web Services service operations, you must use +/// a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you're specifying +/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. +/// If you use a KMS key alias instead, then KMS resolves the key within the +/// requester’s account. This behavior can result in data that's encrypted with a +/// KMS key that belongs to the requester, and not the bucket owner. Also, if you +/// use a key ID, you can run into a LogDestination undeliverable error when creating +/// a VPC flow log.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      +///
    • +///
    +///
    +/// +///

    Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service +/// Developer Guide.

    +///
    + pub kms_master_key_id: Option, +///

    Server-side encryption algorithm to use for the default encryption.

    +/// +///

    For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

    +///
    + pub sse_algorithm: ServerSideEncryption, +} + +impl fmt::Debug for ServerSideEncryptionByDefault { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ServerSideEncryptionByDefault"); +if let Some(ref val) = self.kms_master_key_id { +d.field("kms_master_key_id", val); +} +d.field("sse_algorithm", &self.sse_algorithm); +d.finish_non_exhaustive() +} +} + + +///

    Specifies the default server-side-encryption configuration.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionConfiguration { +///

    Container for information about a particular server-side encryption configuration +/// rule.

    + pub rules: ServerSideEncryptionRules, +} + +impl fmt::Debug for ServerSideEncryptionConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ServerSideEncryptionConfiguration"); +d.field("rules", &self.rules); +d.finish_non_exhaustive() +} +} + + +///

    Specifies the default server-side encryption configuration.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you're specifying +/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. +/// If you use a KMS key alias instead, then KMS resolves the key within the +/// requester’s account. This behavior can result in data that's encrypted with a +/// KMS key that belongs to the requester, and not the bucket owner.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      +///
    • +///
    +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionRule { +///

    Specifies the default server-side encryption to apply to new objects in the bucket. If a +/// PUT Object request doesn't specify any server-side encryption, this default encryption will +/// be applied.

    + pub apply_server_side_encryption_by_default: Option, +///

    Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS +/// (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the +/// BucketKeyEnabled element to true causes Amazon S3 to use an S3 +/// Bucket Key.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - By default, S3 +/// Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      +///
    • +///
    +///
    + pub bucket_key_enabled: Option, +} + +impl fmt::Debug for ServerSideEncryptionRule { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("ServerSideEncryptionRule"); +if let Some(ref val) = self.apply_server_side_encryption_by_default { +d.field("apply_server_side_encryption_by_default", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +d.finish_non_exhaustive() +} +} + + +pub type ServerSideEncryptionRules = List; + +pub type SessionCredentialValue = String; + +///

    The established temporary security credentials of the session.

    +/// +///

    +/// Directory buckets - These session +/// credentials are only supported for the authentication and authorization of Zonal endpoint API operations +/// on directory buckets.

    +///
    +#[derive(Clone, PartialEq)] +pub struct SessionCredentials { +///

    A unique identifier that's associated with a secret access key. The access key ID and +/// the secret access key are used together to sign programmatic Amazon Web Services requests +/// cryptographically.

    + pub access_key_id: AccessKeyIdValue, +///

    Temporary security credentials expire after a specified interval. After temporary +/// credentials expire, any calls that you make with those credentials will fail. So you must +/// generate a new set of temporary credentials. Temporary credentials cannot be extended or +/// refreshed beyond the original specified interval.

    + pub expiration: SessionExpiration, +///

    A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services +/// requests. Signing a request identifies the sender and prevents the request from being +/// altered.

    + pub secret_access_key: SessionCredentialValue, +///

    A part of the temporary security credentials. The session token is used to validate the +/// temporary security credentials. +/// +///

    + pub session_token: SessionCredentialValue, +} + +impl fmt::Debug for SessionCredentials { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SessionCredentials"); +d.field("access_key_id", &self.access_key_id); +d.field("expiration", &self.expiration); +d.field("secret_access_key", &self.secret_access_key); +d.field("session_token", &self.session_token); +d.finish_non_exhaustive() +} +} + +impl Default for SessionCredentials { +fn default() -> Self { +Self { +access_key_id: default(), +expiration: default(), +secret_access_key: default(), +session_token: default(), +} +} +} + + +pub type SessionExpiration = Timestamp; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct SessionMode(Cow<'static, str>); + +impl SessionMode { +pub const READ_ONLY: &'static str = "ReadOnly"; + +pub const READ_WRITE: &'static str = "ReadWrite"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for SessionMode { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: SessionMode) -> Self { +s.0 +} +} + +impl FromStr for SessionMode { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Setting = bool; + +///

    To use simple format for S3 keys for log objects, set SimplePrefix to an empty +/// object.

    +///

    +/// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +///

    +#[derive(Clone, Default, PartialEq)] +pub struct SimplePrefix { +} + +impl fmt::Debug for SimplePrefix { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SimplePrefix"); +d.finish_non_exhaustive() +} +} + + +pub type Size = i64; + +pub type SkipValidation = bool; + +pub type SourceIdentityType = String; + +///

    A container that describes additional filters for identifying the source objects that +/// you want to replicate. You can choose to enable or disable the replication of these +/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created +/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service +/// (SSE-KMS).

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SourceSelectionCriteria { +///

    A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't +/// replicate replica modifications by default. In the latest version of replication +/// configuration (when Filter is specified), you can specify this element and set +/// the status to Enabled to replicate modifications on replicas.

    +/// +///

    If you don't specify the Filter element, Amazon S3 assumes that the +/// replication configuration is the earlier version, V1. In the earlier version, this +/// element is not allowed

    +///
    + pub replica_modifications: Option, +///

    A container for filter information for the selection of Amazon S3 objects encrypted with +/// Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication +/// configuration, this element is required.

    + pub sse_kms_encrypted_objects: Option, +} + +impl fmt::Debug for SourceSelectionCriteria { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SourceSelectionCriteria"); +if let Some(ref val) = self.replica_modifications { +d.field("replica_modifications", val); +} +if let Some(ref val) = self.sse_kms_encrypted_objects { +d.field("sse_kms_encrypted_objects", val); +} +d.finish_non_exhaustive() +} +} + + +///

    A container for filter information for the selection of S3 objects encrypted with Amazon Web Services +/// KMS.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct SseKmsEncryptedObjects { +///

    Specifies whether Amazon S3 replicates objects created with server-side encryption using an +/// Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

    + pub status: SseKmsEncryptedObjectsStatus, +} + +impl fmt::Debug for SseKmsEncryptedObjects { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("SseKmsEncryptedObjects"); +d.field("status", &self.status); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct SseKmsEncryptedObjectsStatus(Cow<'static, str>); + +impl SseKmsEncryptedObjectsStatus { +pub const DISABLED: &'static str = "Disabled"; + +pub const ENABLED: &'static str = "Enabled"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for SseKmsEncryptedObjectsStatus { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: SseKmsEncryptedObjectsStatus) -> Self { +s.0 +} +} + +impl FromStr for SseKmsEncryptedObjectsStatus { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type Start = i64; + +pub type StartAfter = String; + +///

    Container for the stats details.

    +#[derive(Clone, Default, PartialEq)] +pub struct Stats { +///

    The total number of uncompressed object bytes processed.

    + pub bytes_processed: Option, +///

    The total number of bytes of records payload data returned.

    + pub bytes_returned: Option, +///

    The total number of object bytes scanned.

    + pub bytes_scanned: Option, +} + +impl fmt::Debug for Stats { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Stats"); +if let Some(ref val) = self.bytes_processed { +d.field("bytes_processed", val); +} +if let Some(ref val) = self.bytes_returned { +d.field("bytes_returned", val); +} +if let Some(ref val) = self.bytes_scanned { +d.field("bytes_scanned", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Container for the Stats Event.

    +#[derive(Clone, Default, PartialEq)] +pub struct StatsEvent { +///

    The Stats event details.

    + pub details: Option, +} + +impl fmt::Debug for StatsEvent { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("StatsEvent"); +if let Some(ref val) = self.details { +d.field("details", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct StorageClass(Cow<'static, str>); + +impl StorageClass { +pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + +pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; + +pub const GLACIER: &'static str = "GLACIER"; + +pub const GLACIER_IR: &'static str = "GLACIER_IR"; + +pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + +pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + +pub const OUTPOSTS: &'static str = "OUTPOSTS"; + +pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; + +pub const SNOW: &'static str = "SNOW"; + +pub const STANDARD: &'static str = "STANDARD"; + +pub const STANDARD_IA: &'static str = "STANDARD_IA"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for StorageClass { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: StorageClass) -> Self { +s.0 +} +} + +impl FromStr for StorageClass { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    Specifies data related to access patterns to be collected and made available to analyze +/// the tradeoffs between different storage classes for an Amazon S3 bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct StorageClassAnalysis { +///

    Specifies how data related to the storage class analysis for an Amazon S3 bucket should be +/// exported.

    + pub data_export: Option, +} + +impl fmt::Debug for StorageClassAnalysis { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("StorageClassAnalysis"); +if let Some(ref val) = self.data_export { +d.field("data_export", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Container for data related to the storage class analysis for an Amazon S3 bucket for +/// export.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct StorageClassAnalysisDataExport { +///

    The place to store the data for an analysis.

    + pub destination: AnalyticsExportDestination, +///

    The version of the output schema to use when exporting data. Must be +/// V_1.

    + pub output_schema_version: StorageClassAnalysisSchemaVersion, +} + +impl fmt::Debug for StorageClassAnalysisDataExport { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("StorageClassAnalysisDataExport"); +d.field("destination", &self.destination); +d.field("output_schema_version", &self.output_schema_version); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct StorageClassAnalysisSchemaVersion(Cow<'static, str>); + +impl StorageClassAnalysisSchemaVersion { +pub const V_1: &'static str = "V_1"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for StorageClassAnalysisSchemaVersion { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: StorageClassAnalysisSchemaVersion) -> Self { +s.0 +} +} + +impl FromStr for StorageClassAnalysisSchemaVersion { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + + +pub type Suffix = String; + +///

    A container of a key value name pair.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Tag { +///

    Name of the object key.

    + pub key: Option, +///

    Value of the tag.

    + pub value: Option, +} + +impl fmt::Debug for Tag { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Tag"); +if let Some(ref val) = self.key { +d.field("key", val); +} +if let Some(ref val) = self.value { +d.field("value", val); +} +d.finish_non_exhaustive() +} +} + + +pub type TagCount = i32; + +pub type TagSet = List; + +///

    Container for TagSet elements.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Tagging { +///

    A collection for a set of tags

    + pub tag_set: TagSet, +} + +impl fmt::Debug for Tagging { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Tagging"); +d.field("tag_set", &self.tag_set); +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TaggingDirective(Cow<'static, str>); + +impl TaggingDirective { +pub const COPY: &'static str = "COPY"; + +pub const REPLACE: &'static str = "REPLACE"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for TaggingDirective { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: TaggingDirective) -> Self { +s.0 +} +} + +impl FromStr for TaggingDirective { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type TaggingHeader = String; + +pub type TargetBucket = String; + +///

    Container for granting information.

    +///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support +/// target grants. For more information, see Permissions server access log delivery in the +/// Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq)] +pub struct TargetGrant { +///

    Container for the person being granted permissions.

    + pub grantee: Option, +///

    Logging permissions assigned to the grantee for the bucket.

    + pub permission: Option, +} + +impl fmt::Debug for TargetGrant { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("TargetGrant"); +if let Some(ref val) = self.grantee { +d.field("grantee", val); +} +if let Some(ref val) = self.permission { +d.field("permission", val); +} +d.finish_non_exhaustive() +} +} + + +pub type TargetGrants = List; + +///

    Amazon S3 key format for log objects. Only one format, PartitionedPrefix or +/// SimplePrefix, is allowed.

    +#[derive(Clone, Default, PartialEq)] +pub struct TargetObjectKeyFormat { +///

    Partitioned S3 key for log objects.

    + pub partitioned_prefix: Option, +///

    To use the simple format for S3 keys for log objects. To specify SimplePrefix format, +/// set SimplePrefix to {}.

    + pub simple_prefix: Option, +} + +impl fmt::Debug for TargetObjectKeyFormat { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("TargetObjectKeyFormat"); +if let Some(ref val) = self.partitioned_prefix { +d.field("partitioned_prefix", val); +} +if let Some(ref val) = self.simple_prefix { +d.field("simple_prefix", val); +} +d.finish_non_exhaustive() +} +} + + +pub type TargetPrefix = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Tier(Cow<'static, str>); + +impl Tier { +pub const BULK: &'static str = "Bulk"; + +pub const EXPEDITED: &'static str = "Expedited"; + +pub const STANDARD: &'static str = "Standard"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for Tier { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: Tier) -> Self { +s.0 +} +} + +impl FromStr for Tier { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by +/// automatically moving data to the most cost-effective storage access tier, without +/// additional operational overhead.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct Tiering { +///

    S3 Intelligent-Tiering access tier. See Storage class +/// for automatically optimizing frequently and infrequently accessed objects for a +/// list of access tiers in the S3 Intelligent-Tiering storage class.

    + pub access_tier: IntelligentTieringAccessTier, +///

    The number of consecutive days of no access after which an object will be eligible to be +/// transitioned to the corresponding tier. The minimum number of days specified for +/// Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least +/// 180 days. The maximum can be up to 2 years (730 days).

    + pub days: IntelligentTieringDays, +} + +impl fmt::Debug for Tiering { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Tiering"); +d.field("access_tier", &self.access_tier); +d.field("days", &self.days); +d.finish_non_exhaustive() +} +} + + +pub type TieringList = List; + +pub type Token = String; + +pub type TokenType = String; + +///

    +/// You have attempted to add more parts than the maximum of 10000 +/// that are allowed for this object. You can use the CopyObject operation +/// to copy this object to another and then add more data to the newly copied object. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct TooManyParts { +} + +impl fmt::Debug for TooManyParts { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("TooManyParts"); +d.finish_non_exhaustive() +} +} + + +pub type TopicArn = String; + +///

    A container for specifying the configuration for publication of messages to an Amazon +/// Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct TopicConfiguration { +///

    The Amazon S3 bucket event about which to send notifications. For more information, see +/// Supported +/// Event Types in the Amazon S3 User Guide.

    + pub events: EventList, + pub filter: Option, + pub id: Option, +///

    The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message +/// when it detects events of the specified type.

    + pub topic_arn: TopicArn, +} + +impl fmt::Debug for TopicConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("TopicConfiguration"); +d.field("events", &self.events); +if let Some(ref val) = self.filter { +d.field("filter", val); +} +if let Some(ref val) = self.id { +d.field("id", val); +} +d.field("topic_arn", &self.topic_arn); +d.finish_non_exhaustive() +} +} + + +pub type TopicConfigurationList = List; + +///

    Specifies when an object transitions to a specified storage class. For more information +/// about Amazon S3 lifecycle configuration rules, see Transitioning +/// Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Transition { +///

    Indicates when objects are transitioned to the specified storage class. The date value +/// must be in ISO 8601 format. The time is always midnight UTC.

    + pub date: Option, +///

    Indicates the number of days after creation when objects are transitioned to the +/// specified storage class. If the specified storage class is INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are +/// 0 or positive integers. If the specified storage class is STANDARD_IA +/// or ONEZONE_IA, valid values are positive integers greater than 30. Be +/// aware that some storage classes have a minimum storage duration and that you're charged for +/// transitioning objects before their minimum storage duration. For more information, see +/// +/// Constraints and considerations for transitions in the +/// Amazon S3 User Guide.

    + pub days: Option, +///

    The storage class to which you want the object to transition.

    + pub storage_class: Option, +} + +impl fmt::Debug for Transition { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("Transition"); +if let Some(ref val) = self.date { +d.field("date", val); +} +if let Some(ref val) = self.days { +d.field("days", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TransitionDefaultMinimumObjectSize(Cow<'static, str>); + +impl TransitionDefaultMinimumObjectSize { +pub const ALL_STORAGE_CLASSES_128K: &'static str = "all_storage_classes_128K"; + +pub const VARIES_BY_STORAGE_CLASS: &'static str = "varies_by_storage_class"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for TransitionDefaultMinimumObjectSize { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: TransitionDefaultMinimumObjectSize) -> Self { +s.0 +} +} + +impl FromStr for TransitionDefaultMinimumObjectSize { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type TransitionList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct TransitionStorageClass(Cow<'static, str>); + +impl TransitionStorageClass { +pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + +pub const GLACIER: &'static str = "GLACIER"; + +pub const GLACIER_IR: &'static str = "GLACIER_IR"; + +pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + +pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + +pub const STANDARD_IA: &'static str = "STANDARD_IA"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for TransitionStorageClass { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: TransitionStorageClass) -> Self { +s.0 +} +} + +impl FromStr for TransitionStorageClass { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Type(Cow<'static, str>); + +impl Type { +pub const AMAZON_CUSTOMER_BY_EMAIL: &'static str = "AmazonCustomerByEmail"; + +pub const CANONICAL_USER: &'static str = "CanonicalUser"; + +pub const GROUP: &'static str = "Group"; + +#[must_use] +pub fn as_str(&self) -> &str { +&self.0 +} + +#[must_use] +pub fn from_static(s: &'static str) -> Self { +Self(Cow::from(s)) +} + +} + +impl From for Type { +fn from(s: String) -> Self { +Self(Cow::from(s)) +} +} + +impl From for Cow<'static, str> { +fn from(s: Type) -> Self { +s.0 +} +} + +impl FromStr for Type { +type Err = Infallible; +fn from_str(s: &str) -> Result { +Ok(Self::from(s.to_owned())) +} +} + +pub type URI = String; + +pub type UploadIdMarker = String; + +#[derive(Clone, PartialEq)] +pub struct UploadPartCopyInput { +///

    The bucket name.

    +///

    +/// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +/// +///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, +/// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    +///
    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Specifies the source object for the copy operation. You specify the value in one of two +/// formats, depending on whether you want to access the source object through an access point:

    +///
      +///
    • +///

      For objects not accessed through an access point, specify the name of the source bucket +/// and key of the source object, separated by a slash (/). For example, to copy the +/// object reports/january.pdf from the bucket +/// awsexamplebucket, use awsexamplebucket/reports/january.pdf. +/// The value must be URL-encoded.

      +///
    • +///
    • +///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      +/// +///
        +///
      • +///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        +///
      • +///
      • +///

        Access points are not supported by directory buckets.

        +///
      • +///
      +///
      +///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      +///
    • +///
    +///

    If your bucket has versioning enabled, you could have multiple versions of the same +/// object. By default, x-amz-copy-source identifies the current version of the +/// source object to copy. To copy a specific version of the source object to copy, append +/// ?versionId=<version-id> to the x-amz-copy-source request +/// header (for example, x-amz-copy-source: +/// /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

    +///

    If the current version is a delete marker and you don't specify a versionId in the +/// x-amz-copy-source request header, Amazon S3 returns a 404 Not Found +/// error, because the object does not exist. If you specify versionId in the +/// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an +/// HTTP 400 Bad Request error, because you are not allowed to specify a delete +/// marker as a version for the x-amz-copy-source.

    +/// +///

    +/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets.

    +///
    + pub copy_source: CopySource, +///

    Copies the object if its entity tag (ETag) matches the specified tag.

    +///

    If both of the x-amz-copy-source-if-match and +/// x-amz-copy-source-if-unmodified-since headers are present in the request as +/// follows:

    +///

    +/// x-amz-copy-source-if-match condition evaluates to true, +/// and;

    +///

    +/// x-amz-copy-source-if-unmodified-since condition evaluates to +/// false;

    +///

    Amazon S3 returns 200 OK and copies the data. +///

    + pub copy_source_if_match: Option, +///

    Copies the object if it has been modified since the specified time.

    +///

    If both of the x-amz-copy-source-if-none-match and +/// x-amz-copy-source-if-modified-since headers are present in the request as +/// follows:

    +///

    +/// x-amz-copy-source-if-none-match condition evaluates to false, +/// and;

    +///

    +/// x-amz-copy-source-if-modified-since condition evaluates to +/// true;

    +///

    Amazon S3 returns 412 Precondition Failed response code. +///

    + pub copy_source_if_modified_since: Option, +///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    +///

    If both of the x-amz-copy-source-if-none-match and +/// x-amz-copy-source-if-modified-since headers are present in the request as +/// follows:

    +///

    +/// x-amz-copy-source-if-none-match condition evaluates to false, +/// and;

    +///

    +/// x-amz-copy-source-if-modified-since condition evaluates to +/// true;

    +///

    Amazon S3 returns 412 Precondition Failed response code. +///

    + pub copy_source_if_none_match: Option, +///

    Copies the object if it hasn't been modified since the specified time.

    +///

    If both of the x-amz-copy-source-if-match and +/// x-amz-copy-source-if-unmodified-since headers are present in the request as +/// follows:

    +///

    +/// x-amz-copy-source-if-match condition evaluates to true, +/// and;

    +///

    +/// x-amz-copy-source-if-unmodified-since condition evaluates to +/// false;

    +///

    Amazon S3 returns 200 OK and copies the data. +///

    + pub copy_source_if_unmodified_since: Option, +///

    The range of bytes to copy from the source object. The range value must use the form +/// bytes=first-last, where the first and last are the zero-based byte offsets to copy. For +/// example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You +/// can copy a range only if the source object is greater than 5 MB.

    + pub copy_source_range: Option, +///

    Specifies the algorithm to use when decrypting the source object (for example, +/// AES256).

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    + pub copy_source_sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source +/// object. The encryption key provided in this header must be one that was used when the +/// source object was created.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    + pub copy_source_sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    + pub copy_source_sse_customer_key_md5: Option, +///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_source_bucket_owner: Option, +///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, +///

    Part number of part being copied. This is a positive integer between 1 and +/// 10,000.

    + pub part_number: PartNumber, + pub request_payer: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header. This must be the +/// same encryption key specified in the initiate multipart upload request.

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported when the destination bucket is a directory bucket.

    +///
    + pub sse_customer_key_md5: Option, +///

    Upload ID identifying the multipart upload whose part is being copied.

    + pub upload_id: MultipartUploadId, +} + +impl fmt::Debug for UploadPartCopyInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("UploadPartCopyInput"); +d.field("bucket", &self.bucket); +d.field("copy_source", &self.copy_source); +if let Some(ref val) = self.copy_source_if_match { +d.field("copy_source_if_match", val); +} +if let Some(ref val) = self.copy_source_if_modified_since { +d.field("copy_source_if_modified_since", val); +} +if let Some(ref val) = self.copy_source_if_none_match { +d.field("copy_source_if_none_match", val); +} +if let Some(ref val) = self.copy_source_if_unmodified_since { +d.field("copy_source_if_unmodified_since", val); +} +if let Some(ref val) = self.copy_source_range { +d.field("copy_source_range", val); +} +if let Some(ref val) = self.copy_source_sse_customer_algorithm { +d.field("copy_source_sse_customer_algorithm", val); +} +if let Some(ref val) = self.copy_source_sse_customer_key { +d.field("copy_source_sse_customer_key", val); +} +if let Some(ref val) = self.copy_source_sse_customer_key_md5 { +d.field("copy_source_sse_customer_key_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +if let Some(ref val) = self.expected_source_bucket_owner { +d.field("expected_source_bucket_owner", val); +} +d.field("key", &self.key); +d.field("part_number", &self.part_number); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() +} +} + +impl UploadPartCopyInput { +#[must_use] +pub fn builder() -> builders::UploadPartCopyInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct UploadPartCopyOutput { +///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    Container for all response elements.

    + pub copy_part_result: Option, +///

    The version of the source object that was copied, if you have enabled versioning on the +/// source bucket.

    +/// +///

    This functionality is not supported when the source object is in a directory bucket.

    +///
    + pub copy_source_version_id: Option, + pub request_charged: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms).

    + pub server_side_encryption: Option, +} + +impl fmt::Debug for UploadPartCopyOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("UploadPartCopyOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.copy_part_result { +d.field("copy_part_result", val); +} +if let Some(ref val) = self.copy_source_version_id { +d.field("copy_source_version_id", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +d.finish_non_exhaustive() +} +} + + +#[derive(Default)] +pub struct UploadPartInput { +///

    Object data.

    + pub body: Option, +///

    The name of the bucket to which the multipart upload was initiated.

    +///

    +/// Directory buckets - +/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format +/// bucket-base-name--zone-id--x-s3 (for example, +/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming +/// restrictions, see Directory bucket naming +/// rules in the Amazon S3 User Guide.

    +///

    +/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +/// +///

    Access points and Object Lambda access points are not supported by directory buckets.

    +///
    +///

    +/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, +///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any +/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or +/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more +/// information, see Checking object integrity in +/// the Amazon S3 User Guide.

    +///

    If you provide an individual checksum, Amazon S3 ignores any provided +/// ChecksumAlgorithm parameter.

    +///

    This checksum algorithm must be the same for all parts and it match the checksum value +/// supplied in the CreateMultipartUpload request.

    + pub checksum_algorithm: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. +/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see +/// Checking object integrity in the +/// Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be +/// determined automatically.

    + pub content_length: Option, +///

    The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated +/// when using the command from the CLI. This parameter is required if object lock parameters +/// are specified.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub content_md5: Option, +///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, +///

    Part number of part being uploaded. This is a positive integer between 1 and +/// 10,000.

    + pub part_number: PartNumber, + pub request_payer: Option, +///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This +/// value is used to store the object and then it is discarded; Amazon S3 does not store the +/// encryption key. The key must be appropriate for use with the algorithm specified in the +/// x-amz-server-side-encryption-customer-algorithm header. This must be the +/// same encryption key specified in the initiate multipart upload request.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key: Option, +///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses +/// this header for a message integrity check to ensure that the encryption key was transmitted +/// without error.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    Upload ID identifying the multipart upload whose part is being uploaded.

    + pub upload_id: MultipartUploadId, +} + +impl fmt::Debug for UploadPartInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("UploadPartInput"); +if let Some(ref val) = self.body { +d.field("body", val); +} +d.field("bucket", &self.bucket); +if let Some(ref val) = self.checksum_algorithm { +d.field("checksum_algorithm", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.content_length { +d.field("content_length", val); +} +if let Some(ref val) = self.content_md5 { +d.field("content_md5", val); +} +if let Some(ref val) = self.expected_bucket_owner { +d.field("expected_bucket_owner", val); +} +d.field("key", &self.key); +d.field("part_number", &self.part_number); +if let Some(ref val) = self.request_payer { +d.field("request_payer", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key { +d.field("sse_customer_key", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +d.field("upload_id", &self.upload_id); +d.finish_non_exhaustive() +} +} + +impl UploadPartInput { +#[must_use] +pub fn builder() -> builders::UploadPartInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct UploadPartOutput { +///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption +/// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, +///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, +///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded +/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated +/// with multipart uploads, see +/// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, +///

    Entity tag for the uploaded object.

    + pub e_tag: Option, + pub request_charged: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to confirm the encryption algorithm that's used.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_algorithm: Option, +///

    If server-side encryption with a customer-provided encryption key was requested, the +/// response will include this header to provide the round-trip message integrity verification +/// of the customer-provided encryption key.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    + pub sse_customer_key_md5: Option, +///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for +/// example, AES256, aws:kms).

    + pub server_side_encryption: Option, +} + +impl fmt::Debug for UploadPartOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("UploadPartOutput"); +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +d.finish_non_exhaustive() +} +} + + +pub type UserMetadata = List; + +pub type Value = String; + +pub type VersionCount = i32; + +pub type VersionIdMarker = String; + +///

    Describes the versioning state of an Amazon S3 bucket. For more information, see PUT +/// Bucket versioning in the Amazon S3 API Reference.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct VersioningConfiguration { +///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This +/// element is only returned if the bucket has been configured with MFA delete. If the bucket +/// has never been so configured, this element is not returned.

    + pub mfa_delete: Option, +///

    The versioning state of the bucket.

    + pub status: Option, +} + +impl fmt::Debug for VersioningConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("VersioningConfiguration"); +if let Some(ref val) = self.mfa_delete { +d.field("mfa_delete", val); +} +if let Some(ref val) = self.status { +d.field("status", val); +} +d.finish_non_exhaustive() +} +} + + +///

    Specifies website configuration parameters for an Amazon S3 bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct WebsiteConfiguration { +///

    The name of the error document for the website.

    + pub error_document: Option, +///

    The name of the index document for the website.

    + pub index_document: Option, +///

    The redirect behavior for every request to this bucket's website endpoint.

    +/// +///

    If you specify this property, you can't specify any other property.

    +///
    + pub redirect_all_requests_to: Option, +///

    Rules that define when a redirect is applied and the redirect behavior.

    + pub routing_rules: Option, +} + +impl fmt::Debug for WebsiteConfiguration { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("WebsiteConfiguration"); +if let Some(ref val) = self.error_document { +d.field("error_document", val); +} +if let Some(ref val) = self.index_document { +d.field("index_document", val); +} +if let Some(ref val) = self.redirect_all_requests_to { +d.field("redirect_all_requests_to", val); +} +if let Some(ref val) = self.routing_rules { +d.field("routing_rules", val); +} +d.finish_non_exhaustive() +} +} + + +pub type WebsiteRedirectLocation = String; + +#[derive(Default)] +pub struct WriteGetObjectResponseInput { +///

    Indicates that a range of bytes was specified.

    + pub accept_ranges: Option, +///

    The object data.

    + pub body: Option, +///

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side +/// encryption with Amazon Web Services KMS (SSE-KMS).

    + pub bucket_key_enabled: Option, +///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 +/// checksum of the object returned by the Object Lambda function. This may not match the +/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values +/// only when the original GetObject request required checksum validation. For +/// more information about checksums, see Checking object +/// integrity in the Amazon S3 User Guide.

    +///

    Only one checksum header can be specified at a time. If you supply multiple checksum +/// headers, this request will fail.

    +///

    + pub checksum_crc32: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C +/// checksum of the object returned by the Object Lambda function. This may not match the +/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values +/// only when the original GetObject request required checksum validation. For +/// more information about checksums, see Checking object +/// integrity in the Amazon S3 User Guide.

    +///

    Only one checksum header can be specified at a time. If you supply multiple checksum +/// headers, this request will fail.

    + pub checksum_crc32c: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit +/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 +/// digest of the object returned by the Object Lambda function. This may not match the +/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values +/// only when the original GetObject request required checksum validation. For +/// more information about checksums, see Checking object +/// integrity in the Amazon S3 User Guide.

    +///

    Only one checksum header can be specified at a time. If you supply multiple checksum +/// headers, this request will fail.

    + pub checksum_sha1: Option, +///

    This header can be used as a data integrity check to verify that the data received is +/// the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 +/// digest of the object returned by the Object Lambda function. This may not match the +/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values +/// only when the original GetObject request required checksum validation. For +/// more information about checksums, see Checking object +/// integrity in the Amazon S3 User Guide.

    +///

    Only one checksum header can be specified at a time. If you supply multiple checksum +/// headers, this request will fail.

    + pub checksum_sha256: Option, +///

    Specifies presentational information for the object.

    + pub content_disposition: Option, +///

    Specifies what content encodings have been applied to the object and thus what decoding +/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header +/// field.

    + pub content_encoding: Option, +///

    The language the content is in.

    + pub content_language: Option, +///

    The size of the content body in bytes.

    + pub content_length: Option, +///

    The portion of the object returned in the response.

    + pub content_range: Option, +///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, +///

    Specifies whether an object stored in Amazon S3 is (true) or is not +/// (false) a delete marker. To learn more about delete markers, see Working with delete markers.

    + pub delete_marker: Option, +///

    An opaque identifier assigned by a web server to a specific version of a resource found +/// at a URL.

    + pub e_tag: Option, +///

    A string that uniquely identifies an error condition. Returned in the <Code> tag +/// of the error XML response for a corresponding GetObject call. Cannot be used +/// with a successful StatusCode header or when the transformed object is provided +/// in the body. All error codes from S3 are sentence-cased. The regular expression (regex) +/// value is "^[A-Z][a-zA-Z]+$".

    pub error_code: Option, - ///

    - /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was - /// unable to create the table, this structure contains the error message. The possible error codes and - /// error messages are as follows: - ///

    - ///
      - ///
    • - ///

      - /// AccessDeniedCreatingResources - You don't have sufficient permissions to - /// create the required resources. Make sure that you have s3tables:CreateNamespace, - /// s3tables:CreateTable, s3tables:GetTable and - /// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata - /// table, you must delete the metadata configuration for this bucket, and then create a new - /// metadata configuration. - ///

      - ///
    • - ///
    • - ///

      - /// AccessDeniedWritingToTable - Unable to write to the metadata table because of - /// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new - /// metadata table. To create a new metadata table, you must delete the metadata configuration for - /// this bucket, and then create a new metadata configuration.

      - ///
    • - ///
    • - ///

      - /// DestinationTableNotFound - The destination table doesn't exist. To create a - /// new metadata table, you must delete the metadata configuration for this bucket, and then - /// create a new metadata configuration.

      - ///
    • - ///
    • - ///

      - /// ServerInternalError - An internal error has occurred. To create a new metadata - /// table, you must delete the metadata configuration for this bucket, and then create a new - /// metadata configuration.

      - ///
    • - ///
    • - ///

      - /// TableAlreadyExists - The table that you specified already exists in the table - /// bucket's namespace. Specify a different table name. To create a new metadata table, you must - /// delete the metadata configuration for this bucket, and then create a new metadata - /// configuration.

      - ///
    • - ///
    • - ///

      - /// TableBucketNotFound - The table bucket that you specified doesn't exist in - /// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new - /// metadata table, you must delete the metadata configuration for this bucket, and then create - /// a new metadata configuration.

      - ///
    • - ///
    +///

    Contains a generic description of the error condition. Returned in the <Message> +/// tag of the error XML response for a corresponding GetObject call. Cannot be +/// used with a successful StatusCode header or when the transformed object is +/// provided in body.

    pub error_message: Option, +///

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes +/// this header. It includes the expiry-date and rule-id key-value +/// pairs that provide the object expiration information. The value of the rule-id +/// is URL-encoded.

    + pub expiration: Option, +///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, +///

    The date and time that the object was last modified.

    + pub last_modified: Option, +///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, +///

    Set to the number of metadata entries not returned in x-amz-meta headers. +/// This can happen if you create metadata using an API like SOAP that supports more flexible +/// metadata than the REST API. For example, using SOAP, you can create metadata whose values +/// are not legal HTTP headers.

    + pub missing_meta: Option, +///

    Indicates whether an object stored in Amazon S3 has an active legal hold.

    + pub object_lock_legal_hold_status: Option, +///

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information +/// about S3 Object Lock, see Object Lock.

    + pub object_lock_mode: Option, +///

    The date and time when Object Lock is configured to expire.

    + pub object_lock_retain_until_date: Option, +///

    The count of parts this object has.

    + pub parts_count: Option, +///

    Indicates if request involves bucket that is either a source or destination in a +/// Replication rule. For more information about S3 Replication, see Replication.

    + pub replication_status: Option, + pub request_charged: Option, +///

    Route prefix to the HTTP URL generated.

    + pub request_route: RequestRoute, +///

    A single use encrypted token that maps WriteGetObjectResponse to the end +/// user GetObject request.

    + pub request_token: RequestToken, +///

    Provides information about object restoration operation and expiration time of the +/// restored object copy.

    + pub restore: Option, +///

    Encryption algorithm used if server-side encryption with a customer-provided encryption +/// key was specified for object stored in Amazon S3.

    + pub sse_customer_algorithm: Option, +///

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data +/// stored in S3. For more information, see Protecting data +/// using server-side encryption with customer-provided encryption keys +/// (SSE-C).

    + pub sse_customer_key_md5: Option, +///

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key +/// Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in +/// Amazon S3 object.

    + pub ssekms_key_id: Option, +///

    The server-side encryption algorithm used when storing requested object in Amazon S3 (for +/// example, AES256, aws:kms).

    + pub server_side_encryption: Option, +///

    The integer status code for an HTTP response of a corresponding GetObject +/// request. The following is a list of status codes.

    +///
      +///
    • +///

      +/// 200 - OK +///

      +///
    • +///
    • +///

      +/// 206 - Partial Content +///

      +///
    • +///
    • +///

      +/// 304 - Not Modified +///

      +///
    • +///
    • +///

      +/// 400 - Bad Request +///

      +///
    • +///
    • +///

      +/// 401 - Unauthorized +///

      +///
    • +///
    • +///

      +/// 403 - Forbidden +///

      +///
    • +///
    • +///

      +/// 404 - Not Found +///

      +///
    • +///
    • +///

      +/// 405 - Method Not Allowed +///

      +///
    • +///
    • +///

      +/// 409 - Conflict +///

      +///
    • +///
    • +///

      +/// 411 - Length Required +///

      +///
    • +///
    • +///

      +/// 412 - Precondition Failed +///

      +///
    • +///
    • +///

      +/// 416 - Range Not Satisfiable +///

      +///
    • +///
    • +///

      +/// 500 - Internal Server Error +///

      +///
    • +///
    • +///

      +/// 503 - Service Unavailable +///

      +///
    • +///
    + pub status_code: Option, +///

    Provides storage class information of the object. Amazon S3 returns this header for all +/// objects except for S3 Standard storage class objects.

    +///

    For more information, see Storage Classes.

    + pub storage_class: Option, +///

    The number of tags, if any, on the object.

    + pub tag_count: Option, +///

    An ID used to reference a specific version of the object.

    + pub version_id: Option, +} + +impl fmt::Debug for WriteGetObjectResponseInput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("WriteGetObjectResponseInput"); +if let Some(ref val) = self.accept_ranges { +d.field("accept_ranges", val); +} +if let Some(ref val) = self.body { +d.field("body", val); +} +if let Some(ref val) = self.bucket_key_enabled { +d.field("bucket_key_enabled", val); +} +if let Some(ref val) = self.cache_control { +d.field("cache_control", val); +} +if let Some(ref val) = self.checksum_crc32 { +d.field("checksum_crc32", val); +} +if let Some(ref val) = self.checksum_crc32c { +d.field("checksum_crc32c", val); +} +if let Some(ref val) = self.checksum_crc64nvme { +d.field("checksum_crc64nvme", val); +} +if let Some(ref val) = self.checksum_sha1 { +d.field("checksum_sha1", val); +} +if let Some(ref val) = self.checksum_sha256 { +d.field("checksum_sha256", val); +} +if let Some(ref val) = self.content_disposition { +d.field("content_disposition", val); +} +if let Some(ref val) = self.content_encoding { +d.field("content_encoding", val); +} +if let Some(ref val) = self.content_language { +d.field("content_language", val); +} +if let Some(ref val) = self.content_length { +d.field("content_length", val); +} +if let Some(ref val) = self.content_range { +d.field("content_range", val); +} +if let Some(ref val) = self.content_type { +d.field("content_type", val); +} +if let Some(ref val) = self.delete_marker { +d.field("delete_marker", val); +} +if let Some(ref val) = self.e_tag { +d.field("e_tag", val); +} +if let Some(ref val) = self.error_code { +d.field("error_code", val); +} +if let Some(ref val) = self.error_message { +d.field("error_message", val); +} +if let Some(ref val) = self.expiration { +d.field("expiration", val); +} +if let Some(ref val) = self.expires { +d.field("expires", val); +} +if let Some(ref val) = self.last_modified { +d.field("last_modified", val); +} +if let Some(ref val) = self.metadata { +d.field("metadata", val); +} +if let Some(ref val) = self.missing_meta { +d.field("missing_meta", val); +} +if let Some(ref val) = self.object_lock_legal_hold_status { +d.field("object_lock_legal_hold_status", val); +} +if let Some(ref val) = self.object_lock_mode { +d.field("object_lock_mode", val); +} +if let Some(ref val) = self.object_lock_retain_until_date { +d.field("object_lock_retain_until_date", val); +} +if let Some(ref val) = self.parts_count { +d.field("parts_count", val); +} +if let Some(ref val) = self.replication_status { +d.field("replication_status", val); +} +if let Some(ref val) = self.request_charged { +d.field("request_charged", val); +} +d.field("request_route", &self.request_route); +d.field("request_token", &self.request_token); +if let Some(ref val) = self.restore { +d.field("restore", val); +} +if let Some(ref val) = self.sse_customer_algorithm { +d.field("sse_customer_algorithm", val); +} +if let Some(ref val) = self.sse_customer_key_md5 { +d.field("sse_customer_key_md5", val); +} +if let Some(ref val) = self.ssekms_key_id { +d.field("ssekms_key_id", val); +} +if let Some(ref val) = self.server_side_encryption { +d.field("server_side_encryption", val); +} +if let Some(ref val) = self.status_code { +d.field("status_code", val); +} +if let Some(ref val) = self.storage_class { +d.field("storage_class", val); +} +if let Some(ref val) = self.tag_count { +d.field("tag_count", val); +} +if let Some(ref val) = self.version_id { +d.field("version_id", val); +} +d.finish_non_exhaustive() +} +} + +impl WriteGetObjectResponseInput { +#[must_use] +pub fn builder() -> builders::WriteGetObjectResponseInputBuilder { +default() +} +} + +#[derive(Clone, Default, PartialEq)] +pub struct WriteGetObjectResponseOutput { +} + +impl fmt::Debug for WriteGetObjectResponseOutput { +fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +let mut d = f.debug_struct("WriteGetObjectResponseOutput"); +d.finish_non_exhaustive() +} +} + + +pub type WriteOffsetBytes = i64; + +pub type Years = i32; + +#[cfg(test)] +mod tests { +use super::*; + +fn require_default() {} +fn require_clone() {} + +#[test] +fn test_default() { +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +require_default::(); +} +#[test] +fn test_clone() { +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +require_clone::(); +} +} +pub mod builders { +#![allow(clippy::missing_errors_doc)] + +use super::*; +pub use super::build_error::BuildError; + +/// A builder for [`AbortMultipartUploadInput`] +#[derive(Default)] +pub struct AbortMultipartUploadInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + +if_match_initiated_time: Option, + +key: Option, + +request_payer: Option, + +upload_id: Option, + +} + +impl AbortMultipartUploadInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} + +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} + +pub fn set_if_match_initiated_time(&mut self, field: Option) -> &mut Self { + self.if_match_initiated_time = field; +self +} + +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} + +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} + +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self +} + +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} + +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} + +#[must_use] +pub fn if_match_initiated_time(mut self, field: Option) -> Self { + self.if_match_initiated_time = field; +self +} + +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} + +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} + +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self +} + +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match_initiated_time = self.if_match_initiated_time; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(AbortMultipartUploadInput { +bucket, +expected_bucket_owner, +if_match_initiated_time, +key, +request_payer, +upload_id, +}) +} + +} + + +/// A builder for [`CompleteMultipartUploadInput`] +#[derive(Default)] +pub struct CompleteMultipartUploadInputBuilder { +bucket: Option, + +checksum_crc32: Option, + +checksum_crc32c: Option, + +checksum_crc64nvme: Option, + +checksum_sha1: Option, + +checksum_sha256: Option, + +checksum_type: Option, + +expected_bucket_owner: Option, + +if_match: Option, + +if_none_match: Option, + +key: Option, + +mpu_object_size: Option, + +multipart_upload: Option, + +request_payer: Option, + +sse_customer_algorithm: Option, + +sse_customer_key: Option, + +sse_customer_key_md5: Option, + +upload_id: Option, + +} + +impl CompleteMultipartUploadInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} + +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self +} + +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} + +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} + +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} + +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} + +pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { + self.checksum_type = field; +self +} + +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} + +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} + +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self +} + +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} + +pub fn set_mpu_object_size(&mut self, field: Option) -> &mut Self { + self.mpu_object_size = field; +self +} + +pub fn set_multipart_upload(&mut self, field: Option) -> &mut Self { + self.multipart_upload = field; +self +} + +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} + +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} + +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} + +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} + +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self +} + +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} + +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} + +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self } -impl fmt::Debug for ErrorDetails { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ErrorDetails"); - if let Some(ref val) = self.error_code { - d.field("error_code", val); - } - if let Some(ref val) = self.error_message { - d.field("error_message", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self } -///

    The error information.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ErrorDocument { - ///

    The object key name to use when a 4XX class error occurs.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub key: ObjectKey, +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self } -impl fmt::Debug for ErrorDocument { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ErrorDocument"); - d.field("key", &self.key); - d.finish_non_exhaustive() - } +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self } -pub type ErrorMessage = String; +#[must_use] +pub fn checksum_type(mut self, field: Option) -> Self { + self.checksum_type = field; +self +} -pub type Errors = List; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -///

    A container for specifying the configuration for Amazon EventBridge.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct EventBridgeConfiguration {} +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self +} -impl fmt::Debug for EventBridgeConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("EventBridgeConfiguration"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self } -pub type EventList = List; +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} -///

    Optional configuration to replicate existing source bucket objects.

    -/// -///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the -/// Amazon S3 User Guide.

    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ExistingObjectReplication { - ///

    Specifies whether Amazon S3 replicates existing source bucket objects.

    - pub status: ExistingObjectReplicationStatus, +#[must_use] +pub fn mpu_object_size(mut self, field: Option) -> Self { + self.mpu_object_size = field; +self } -impl fmt::Debug for ExistingObjectReplication { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ExistingObjectReplication"); - d.field("status", &self.status); - d.finish_non_exhaustive() - } +#[must_use] +pub fn multipart_upload(mut self, field: Option) -> Self { + self.multipart_upload = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ExistingObjectReplicationStatus(Cow<'static, str>); +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} -impl ExistingObjectReplicationStatus { - pub const DISABLED: &'static str = "Disabled"; +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - pub const ENABLED: &'static str = "Enabled"; +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self +} + +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let checksum_type = self.checksum_type; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match = self.if_match; +let if_none_match = self.if_none_match; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let mpu_object_size = self.mpu_object_size; +let multipart_upload = self.multipart_upload; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(CompleteMultipartUploadInput { +bucket, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +checksum_type, +expected_bucket_owner, +if_match, +if_none_match, +key, +mpu_object_size, +multipart_upload, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) } -impl From for ExistingObjectReplicationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } } -impl From for Cow<'static, str> { - fn from(s: ExistingObjectReplicationStatus) -> Self { - s.0 - } + +/// A builder for [`CopyObjectInput`] +#[derive(Default)] +pub struct CopyObjectInputBuilder { +acl: Option, + +bucket: Option, + +bucket_key_enabled: Option, + +cache_control: Option, + +checksum_algorithm: Option, + +content_disposition: Option, + +content_encoding: Option, + +content_language: Option, + +content_type: Option, + +copy_source: Option, + +copy_source_if_match: Option, + +copy_source_if_modified_since: Option, + +copy_source_if_none_match: Option, + +copy_source_if_unmodified_since: Option, + +copy_source_sse_customer_algorithm: Option, + +copy_source_sse_customer_key: Option, + +copy_source_sse_customer_key_md5: Option, + +expected_bucket_owner: Option, + +expected_source_bucket_owner: Option, + +expires: Option, + +grant_full_control: Option, + +grant_read: Option, + +grant_read_acp: Option, + +grant_write_acp: Option, + +key: Option, + +metadata: Option, + +metadata_directive: Option, + +object_lock_legal_hold_status: Option, + +object_lock_mode: Option, + +object_lock_retain_until_date: Option, + +request_payer: Option, + +sse_customer_algorithm: Option, + +sse_customer_key: Option, + +sse_customer_key_md5: Option, + +ssekms_encryption_context: Option, + +ssekms_key_id: Option, + +server_side_encryption: Option, + +storage_class: Option, + +tagging: Option, + +tagging_directive: Option, + +website_redirect_location: Option, + } -impl FromStr for ExistingObjectReplicationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl CopyObjectInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self } -pub type Expiration = String; +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ExpirationStatus(Cow<'static, str>); +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} -impl ExpirationStatus { - pub const DISABLED: &'static str = "Disabled"; +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self +} - pub const ENABLED: &'static str = "Enabled"; +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self } -impl From for ExpirationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self } -impl From for Cow<'static, str> { - fn from(s: ExpirationStatus) -> Self { - s.0 - } +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self } -impl FromStr for ExpirationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { + self.copy_source = Some(field); +self } -pub type ExpiredObjectDeleteMarker = bool; +pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_match = field; +self +} -pub type Expires = Timestamp; +pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_modified_since = field; +self +} -pub type ExposeHeader = String; +pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_none_match = field; +self +} -pub type ExposeHeaders = List; +pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_unmodified_since = field; +self +} -pub type Expression = String; +pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_algorithm = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ExpressionType(Cow<'static, str>); +pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key = field; +self +} -impl ExpressionType { - pub const SQL: &'static str = "SQL"; +pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_source_bucket_owner = field; +self } -impl From for ExpressionType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self } -impl From for Cow<'static, str> { - fn from(s: ExpressionType) -> Self { - s.0 - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self } -impl FromStr for ExpressionType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self } -pub type FetchOwner = bool; +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} -pub type FieldDelimiter = String; +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct FileHeaderInfo(Cow<'static, str>); +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} -impl FileHeaderInfo { - pub const IGNORE: &'static str = "IGNORE"; +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self +} - pub const NONE: &'static str = "NONE"; +pub fn set_metadata_directive(&mut self, field: Option) -> &mut Self { + self.metadata_directive = field; +self +} - pub const USE: &'static str = "USE"; +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self } -impl From for FileHeaderInfo { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl From for Cow<'static, str> { - fn from(s: FileHeaderInfo) -> Self { - s.0 - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self } -impl FromStr for FileHeaderInfo { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self } -///

    Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned -/// to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of -/// the object key name. A prefix is a specific string of characters at the beginning of an -/// object key name, which you can use to organize objects. For example, you can start the key -/// names of related objects with a prefix, such as 2023- or -/// engineering/. Then, you can use FilterRule to find objects in -/// a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it -/// is at the end of the object key name instead of at the beginning.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct FilterRule { - ///

    The object key name prefix or suffix identifying one or more objects to which the - /// filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and - /// suffixes are not supported. For more information, see Configuring Event Notifications - /// in the Amazon S3 User Guide.

    - pub name: Option, - ///

    The value that the filter searches for in object key names.

    - pub value: Option, +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self } -impl fmt::Debug for FilterRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("FilterRule"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.value { - d.field("value", val); - } - d.finish_non_exhaustive() - } +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self } -///

    A list of containers for the key-value pair that defines the criteria for the filter -/// rule.

    -pub type FilterRuleList = List; +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct FilterRuleName(Cow<'static, str>); +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} -impl FilterRuleName { - pub const PREFIX: &'static str = "prefix"; +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self +} - pub const SUFFIX: &'static str = "suffix"; +pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_tagging_directive(&mut self, field: Option) -> &mut Self { + self.tagging_directive = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; +self } -impl From for FilterRuleName { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self } -impl From for Cow<'static, str> { - fn from(s: FilterRuleName) -> Self { - s.0 - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl FromStr for FilterRuleName { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self } -pub type FilterRuleValue = String; +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self +} -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAccelerateConfigurationInput { - ///

    The name of the bucket for which the accelerate configuration is retrieved.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub request_payer: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self } -impl fmt::Debug for GetBucketAccelerateConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAccelerateConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self } -impl GetBucketAccelerateConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketAccelerateConfigurationInputBuilder { - default() - } +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self +} + +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} + +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self +} + +#[must_use] +pub fn copy_source(mut self, field: CopySource) -> Self { + self.copy_source = Some(field); +self +} + +#[must_use] +pub fn copy_source_if_match(mut self, field: Option) -> Self { + self.copy_source_if_match = field; +self +} + +#[must_use] +pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { + self.copy_source_if_modified_since = field; +self +} + +#[must_use] +pub fn copy_source_if_none_match(mut self, field: Option) -> Self { + self.copy_source_if_none_match = field; +self +} + +#[must_use] +pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { + self.copy_source_if_unmodified_since = field; +self +} + +#[must_use] +pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { + self.copy_source_sse_customer_algorithm = field; +self +} + +#[must_use] +pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key = field; +self +} + +#[must_use] +pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key_md5 = field; +self +} + +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} + +#[must_use] +pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { + self.expected_source_bucket_owner = field; +self +} + +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} + +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} + +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self +} + +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} + +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self +} + +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} + +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self +} + +#[must_use] +pub fn metadata_directive(mut self, field: Option) -> Self { + self.metadata_directive = field; +self +} + +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self +} + +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self +} + +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} + +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} + +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} + +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} + +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} + +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} + +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} + +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; +self +} + +#[must_use] +pub fn tagging_directive(mut self, field: Option) -> Self { + self.tagging_directive = field; +self +} + +#[must_use] +pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; +self +} + +pub fn build(self) -> Result { +let acl = self.acl; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_algorithm = self.checksum_algorithm; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_type = self.content_type; +let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; +let copy_source_if_match = self.copy_source_if_match; +let copy_source_if_modified_since = self.copy_source_if_modified_since; +let copy_source_if_none_match = self.copy_source_if_none_match; +let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; +let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; +let copy_source_sse_customer_key = self.copy_source_sse_customer_key; +let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let expected_source_bucket_owner = self.expected_source_bucket_owner; +let expires = self.expires; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write_acp = self.grant_write_acp; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let metadata = self.metadata; +let metadata_directive = self.metadata_directive; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let storage_class = self.storage_class; +let tagging = self.tagging; +let tagging_directive = self.tagging_directive; +let website_redirect_location = self.website_redirect_location; +Ok(CopyObjectInput { +acl, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +content_disposition, +content_encoding, +content_language, +content_type, +copy_source, +copy_source_if_match, +copy_source_if_modified_since, +copy_source_if_none_match, +copy_source_if_unmodified_since, +copy_source_sse_customer_algorithm, +copy_source_sse_customer_key, +copy_source_sse_customer_key_md5, +expected_bucket_owner, +expected_source_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +key, +metadata, +metadata_directive, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +tagging_directive, +website_redirect_location, +}) +} + +} + + +/// A builder for [`CreateBucketInput`] +#[derive(Default)] +pub struct CreateBucketInputBuilder { +acl: Option, + +bucket: Option, + +create_bucket_configuration: Option, + +grant_full_control: Option, + +grant_read: Option, + +grant_read_acp: Option, + +grant_write: Option, + +grant_write_acp: Option, + +object_lock_enabled_for_bucket: Option, + +object_ownership: Option, + } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAccelerateConfigurationOutput { - pub request_charged: Option, - ///

    The accelerate configuration of the bucket.

    - pub status: Option, +impl CreateBucketInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self } -impl fmt::Debug for GetBucketAccelerateConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAccelerateConfigurationOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAclInput { - ///

    Specifies the S3 bucket whose ACL is being requested.

    - ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_create_bucket_configuration(&mut self, field: Option) -> &mut Self { + self.create_bucket_configuration = field; +self } -impl fmt::Debug for GetBucketAclInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAclInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self } -impl GetBucketAclInput { - #[must_use] - pub fn builder() -> builders::GetBucketAclInputBuilder { - default() - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAclOutput { - ///

    A list of grants.

    - pub grants: Option, - ///

    Container for the bucket owner's display name and ID.

    - pub owner: Option, +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self } -impl fmt::Debug for GetBucketAclOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAclOutput"); - if let Some(ref val) = self.grants { - d.field("grants", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAnalyticsConfigurationInput { - ///

    The name of the bucket from which an analytics configuration is retrieved.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID that identifies the analytics configuration.

    - pub id: AnalyticsId, +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self } -impl fmt::Debug for GetBucketAnalyticsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAnalyticsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +pub fn set_object_lock_enabled_for_bucket(&mut self, field: Option) -> &mut Self { + self.object_lock_enabled_for_bucket = field; +self } -impl GetBucketAnalyticsConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketAnalyticsConfigurationInputBuilder { - default() - } +pub fn set_object_ownership(&mut self, field: Option) -> &mut Self { + self.object_ownership = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAnalyticsConfigurationOutput { - ///

    The configuration and any analyses for the analytics filter.

    - pub analytics_configuration: Option, +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self } -impl fmt::Debug for GetBucketAnalyticsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketAnalyticsConfigurationOutput"); - if let Some(ref val) = self.analytics_configuration { - d.field("analytics_configuration", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketCorsInput { - ///

    The bucket name for which to get the cors configuration.

    - ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn create_bucket_configuration(mut self, field: Option) -> Self { + self.create_bucket_configuration = field; +self } -impl fmt::Debug for GetBucketCorsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketCorsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self } -impl GetBucketCorsInput { - #[must_use] - pub fn builder() -> builders::GetBucketCorsInputBuilder { - default() - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketCorsOutput { - ///

    A set of origins and methods (cross-origin access that you want to allow). You can add - /// up to 100 rules to the configuration.

    - pub cors_rules: Option, +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self } -impl fmt::Debug for GetBucketCorsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketCorsOutput"); - if let Some(ref val) = self.cors_rules { - d.field("cors_rules", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketEncryptionInput { - ///

    The name of the bucket from which the server-side encryption configuration is - /// retrieved.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    - pub expected_bucket_owner: Option, +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self } -impl fmt::Debug for GetBucketEncryptionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketEncryptionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn object_lock_enabled_for_bucket(mut self, field: Option) -> Self { + self.object_lock_enabled_for_bucket = field; +self } -impl GetBucketEncryptionInput { - #[must_use] - pub fn builder() -> builders::GetBucketEncryptionInputBuilder { - default() - } +#[must_use] +pub fn object_ownership(mut self, field: Option) -> Self { + self.object_ownership = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketEncryptionOutput { - pub server_side_encryption_configuration: Option, +pub fn build(self) -> Result { +let acl = self.acl; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let create_bucket_configuration = self.create_bucket_configuration; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write = self.grant_write; +let grant_write_acp = self.grant_write_acp; +let object_lock_enabled_for_bucket = self.object_lock_enabled_for_bucket; +let object_ownership = self.object_ownership; +Ok(CreateBucketInput { +acl, +bucket, +create_bucket_configuration, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +object_lock_enabled_for_bucket, +object_ownership, +}) } -impl fmt::Debug for GetBucketEncryptionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketEncryptionOutput"); - if let Some(ref val) = self.server_side_encryption_configuration { - d.field("server_side_encryption_configuration", val); - } - d.finish_non_exhaustive() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketIntelligentTieringConfigurationInput { - ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, - ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, + +/// A builder for [`CreateBucketMetadataTableConfigurationInput`] +#[derive(Default)] +pub struct CreateBucketMetadataTableConfigurationInputBuilder { +bucket: Option, + +checksum_algorithm: Option, + +content_md5: Option, + +expected_bucket_owner: Option, + +metadata_table_configuration: Option, + } -impl fmt::Debug for GetBucketIntelligentTieringConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationInput"); - d.field("bucket", &self.bucket); - d.field("id", &self.id); - d.finish_non_exhaustive() - } +impl CreateBucketMetadataTableConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl GetBucketIntelligentTieringConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketIntelligentTieringConfigurationInputBuilder { - default() - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketIntelligentTieringConfigurationOutput { - ///

    Container for S3 Intelligent-Tiering configuration.

    - pub intelligent_tiering_configuration: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self } -impl fmt::Debug for GetBucketIntelligentTieringConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationOutput"); - if let Some(ref val) = self.intelligent_tiering_configuration { - d.field("intelligent_tiering_configuration", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketInventoryConfigurationInput { - ///

    The name of the bucket containing the inventory configuration to retrieve.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, +pub fn set_metadata_table_configuration(&mut self, field: MetadataTableConfiguration) -> &mut Self { + self.metadata_table_configuration = Some(field); +self } -impl fmt::Debug for GetBucketInventoryConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketInventoryConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl GetBucketInventoryConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketInventoryConfigurationInputBuilder { - default() - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketInventoryConfigurationOutput { - ///

    Specifies the inventory configuration.

    - pub inventory_configuration: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self } -impl fmt::Debug for GetBucketInventoryConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketInventoryConfigurationOutput"); - if let Some(ref val) = self.inventory_configuration { - d.field("inventory_configuration", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLifecycleConfigurationInput { - ///

    The name of the bucket for which to get the lifecycle information.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub expected_bucket_owner: Option, +#[must_use] +pub fn metadata_table_configuration(mut self, field: MetadataTableConfiguration) -> Self { + self.metadata_table_configuration = Some(field); +self } -impl fmt::Debug for GetBucketLifecycleConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLifecycleConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let metadata_table_configuration = self.metadata_table_configuration.ok_or_else(|| BuildError::missing_field("metadata_table_configuration"))?; +Ok(CreateBucketMetadataTableConfigurationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +metadata_table_configuration, +}) } -impl GetBucketLifecycleConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketLifecycleConfigurationInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLifecycleConfigurationOutput { - ///

    Container for a lifecycle rule.

    - pub rules: Option, - ///

    Indicates which default minimum object size behavior is applied to the lifecycle - /// configuration.

    - /// - ///

    This parameter applies to general purpose buckets only. It isn't supported for - /// directory bucket lifecycle configurations.

    - ///
    - ///
      - ///
    • - ///

      - /// all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

      - ///
    • - ///
    • - ///

      - /// varies_by_storage_class - Objects smaller than 128 KB will - /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By - /// default, all other storage classes will prevent transitions smaller than 128 KB. - ///

      - ///
    • - ///
    - ///

    To customize the minimum object size for any transition you can add a filter that - /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in - /// the body of your transition rule. Custom filters always take precedence over the default - /// transition behavior.

    - pub transition_default_minimum_object_size: Option, + +/// A builder for [`CreateMultipartUploadInput`] +#[derive(Default)] +pub struct CreateMultipartUploadInputBuilder { +acl: Option, + +bucket: Option, + +bucket_key_enabled: Option, + +cache_control: Option, + +checksum_algorithm: Option, + +checksum_type: Option, + +content_disposition: Option, + +content_encoding: Option, + +content_language: Option, + +content_type: Option, + +expected_bucket_owner: Option, + +expires: Option, + +grant_full_control: Option, + +grant_read: Option, + +grant_read_acp: Option, + +grant_write_acp: Option, + +key: Option, + +metadata: Option, + +object_lock_legal_hold_status: Option, + +object_lock_mode: Option, + +object_lock_retain_until_date: Option, + +request_payer: Option, + +sse_customer_algorithm: Option, + +sse_customer_key: Option, + +sse_customer_key_md5: Option, + +ssekms_encryption_context: Option, + +ssekms_key_id: Option, + +server_side_encryption: Option, + +storage_class: Option, + +tagging: Option, + +website_redirect_location: Option, + } -impl fmt::Debug for GetBucketLifecycleConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLifecycleConfigurationOutput"); - if let Some(ref val) = self.rules { - d.field("rules", val); - } - if let Some(ref val) = self.transition_default_minimum_object_size { - d.field("transition_default_minimum_object_size", val); - } - d.finish_non_exhaustive() - } +impl CreateMultipartUploadInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLocationInput { - ///

    The name of the bucket for which to get the location.

    - ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for GetBucketLocationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLocationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self } -impl GetBucketLocationInput { - #[must_use] - pub fn builder() -> builders::GetBucketLocationInputBuilder { - default() - } +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLocationOutput { - ///

    Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported - /// location constraints by Region, see Regions and Endpoints.

    - ///

    Buckets in Region us-east-1 have a LocationConstraint of - /// null. Buckets with a LocationConstraint of EU reside in eu-west-1.

    - pub location_constraint: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self } -impl fmt::Debug for GetBucketLocationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLocationOutput"); - if let Some(ref val) = self.location_constraint { - d.field("location_constraint", val); - } - d.finish_non_exhaustive() - } +pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { + self.checksum_type = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLoggingInput { - ///

    The bucket name for which to get the logging information.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self } -impl fmt::Debug for GetBucketLoggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLoggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self } -impl GetBucketLoggingInput { - #[must_use] - pub fn builder() -> builders::GetBucketLoggingInputBuilder { - default() - } +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLoggingOutput { - pub logging_enabled: Option, +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self } -impl fmt::Debug for GetBucketLoggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketLoggingOutput"); - if let Some(ref val) = self.logging_enabled { - d.field("logging_enabled", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetadataTableConfigurationInput { - ///

    - /// The general purpose bucket that contains the metadata table configuration that you want to retrieve. - ///

    - pub bucket: BucketName, - ///

    - /// The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. - ///

    - pub expected_bucket_owner: Option, +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self } -impl fmt::Debug for GetBucketMetadataTableConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetadataTableConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self } -impl GetBucketMetadataTableConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketMetadataTableConfigurationInputBuilder { - default() - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetadataTableConfigurationOutput { - ///

    - /// The metadata table configuration for the general purpose bucket. - ///

    - pub get_bucket_metadata_table_configuration_result: Option, +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self } -impl fmt::Debug for GetBucketMetadataTableConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetadataTableConfigurationOutput"); - if let Some(ref val) = self.get_bucket_metadata_table_configuration_result { - d.field("get_bucket_metadata_table_configuration_result", val); - } - d.finish_non_exhaustive() - } +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self } -///

    -/// The metadata table configuration for a general purpose bucket. -///

    -#[derive(Clone, PartialEq)] -pub struct GetBucketMetadataTableConfigurationResult { - ///

    - /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was - /// unable to create the table, this structure contains the error code and error message. - ///

    - pub error: Option, - ///

    - /// The metadata table configuration for a general purpose bucket. - ///

    - pub metadata_table_configuration_result: MetadataTableConfigurationResult, - ///

    - /// The status of the metadata table. The status values are: - ///

    - ///
      - ///
    • - ///

      - /// CREATING - The metadata table is in the process of being created in the - /// specified table bucket.

      - ///
    • - ///
    • - ///

      - /// ACTIVE - The metadata table has been created successfully and records - /// are being delivered to the table. - ///

      - ///
    • - ///
    • - ///

      - /// FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver - /// records. See ErrorDetails for details.

      - ///
    • - ///
    - pub status: MetadataTableStatus, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -impl fmt::Debug for GetBucketMetadataTableConfigurationResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetadataTableConfigurationResult"); - if let Some(ref val) = self.error { - d.field("error", val); - } - d.field("metadata_table_configuration_result", &self.metadata_table_configuration_result); - d.field("status", &self.status); - d.finish_non_exhaustive() - } +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetricsConfigurationInput { - ///

    The name of the bucket containing the metrics configuration to retrieve.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and - /// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self } -impl fmt::Debug for GetBucketMetricsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetricsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self } -impl GetBucketMetricsConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketMetricsConfigurationInputBuilder { - default() - } +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetricsConfigurationOutput { - ///

    Specifies the metrics configuration.

    - pub metrics_configuration: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl fmt::Debug for GetBucketMetricsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketMetricsConfigurationOutput"); - if let Some(ref val) = self.metrics_configuration { - d.field("metrics_configuration", val); - } - d.finish_non_exhaustive() - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketNotificationConfigurationInput { - ///

    The name of the bucket for which to get the notification configuration.

    - ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self } -impl fmt::Debug for GetBucketNotificationConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketNotificationConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self } -impl GetBucketNotificationConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetBucketNotificationConfigurationInputBuilder { - default() - } +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self } -///

    A container for specifying the notification configuration of the bucket. If this element -/// is empty, notifications are turned off for the bucket.

    -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketNotificationConfigurationOutput { - ///

    Enables delivery of events to Amazon EventBridge.

    - pub event_bridge_configuration: Option, - ///

    Describes the Lambda functions to invoke and the events for which to invoke - /// them.

    - pub lambda_function_configurations: Option, - ///

    The Amazon Simple Queue Service queues to publish messages to and the events for which - /// to publish messages.

    - pub queue_configurations: Option, - ///

    The topic to which notifications are sent and the events for which notifications are - /// generated.

    - pub topic_configurations: Option, +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self } -impl fmt::Debug for GetBucketNotificationConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketNotificationConfigurationOutput"); - if let Some(ref val) = self.event_bridge_configuration { - d.field("event_bridge_configuration", val); - } - if let Some(ref val) = self.lambda_function_configurations { - d.field("lambda_function_configurations", val); - } - if let Some(ref val) = self.queue_configurations { - d.field("queue_configurations", val); - } - if let Some(ref val) = self.topic_configurations { - d.field("topic_configurations", val); - } - d.finish_non_exhaustive() - } +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketOwnershipControlsInput { - ///

    The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. - ///

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self } -impl fmt::Debug for GetBucketOwnershipControlsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketOwnershipControlsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; +self } -impl GetBucketOwnershipControlsInput { - #[must_use] - pub fn builder() -> builders::GetBucketOwnershipControlsInputBuilder { - default() - } +pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketOwnershipControlsOutput { - ///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or - /// ObjectWriter) currently in effect for this Amazon S3 bucket.

    - pub ownership_controls: Option, +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self } -impl fmt::Debug for GetBucketOwnershipControlsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketOwnershipControlsOutput"); - if let Some(ref val) = self.ownership_controls { - d.field("ownership_controls", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyInput { - ///

    The bucket name to get the bucket policy for.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    - ///

    - /// Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    - /// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    - pub expected_bucket_owner: Option, +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self } -impl fmt::Debug for GetBucketPolicyInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketPolicyInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self } -impl GetBucketPolicyInput { - #[must_use] - pub fn builder() -> builders::GetBucketPolicyInputBuilder { - default() - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyOutput { - ///

    The bucket policy as a JSON document.

    - pub policy: Option, +#[must_use] +pub fn checksum_type(mut self, field: Option) -> Self { + self.checksum_type = field; +self } -impl fmt::Debug for GetBucketPolicyOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketPolicyOutput"); - if let Some(ref val) = self.policy { - d.field("policy", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyStatusInput { - ///

    The name of the Amazon S3 bucket whose policy status you want to retrieve.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self } -impl fmt::Debug for GetBucketPolicyStatusInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketPolicyStatusInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} + +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self } -impl GetBucketPolicyStatusInput { - #[must_use] - pub fn builder() -> builders::GetBucketPolicyStatusInputBuilder { - default() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyStatusOutput { - ///

    The policy status for the specified bucket.

    - pub policy_status: Option, +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self } -impl fmt::Debug for GetBucketPolicyStatusOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketPolicyStatusOutput"); - if let Some(ref val) = self.policy_status { - d.field("policy_status", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketReplicationInput { - ///

    The bucket name for which to get the replication information.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self } -impl fmt::Debug for GetBucketReplicationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketReplicationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self } -impl GetBucketReplicationInput { - #[must_use] - pub fn builder() -> builders::GetBucketReplicationInputBuilder { - default() - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketReplicationOutput { - pub replication_configuration: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -impl fmt::Debug for GetBucketReplicationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketReplicationOutput"); - if let Some(ref val) = self.replication_configuration { - d.field("replication_configuration", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketRequestPaymentInput { - ///

    The name of the bucket for which to get the payment request configuration

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self } -impl fmt::Debug for GetBucketRequestPaymentInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketRequestPaymentInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self } -impl GetBucketRequestPaymentInput { - #[must_use] - pub fn builder() -> builders::GetBucketRequestPaymentInputBuilder { - default() - } +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketRequestPaymentOutput { - ///

    Specifies who pays for the download and request fees.

    - pub payer: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for GetBucketRequestPaymentOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketRequestPaymentOutput"); - if let Some(ref val) = self.payer { - d.field("payer", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketTaggingInput { - ///

    The name of the bucket for which to get the tagging information.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} + +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} + +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} + +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} + +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; +self +} + +#[must_use] +pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; +self +} + +pub fn build(self) -> Result { +let acl = self.acl; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_algorithm = self.checksum_algorithm; +let checksum_type = self.checksum_type; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_type = self.content_type; +let expected_bucket_owner = self.expected_bucket_owner; +let expires = self.expires; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write_acp = self.grant_write_acp; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let metadata = self.metadata; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let storage_class = self.storage_class; +let tagging = self.tagging; +let website_redirect_location = self.website_redirect_location; +Ok(CreateMultipartUploadInput { +acl, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_type, +content_disposition, +content_encoding, +content_language, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +website_redirect_location, +}) +} + +} + + +/// A builder for [`CreateSessionInput`] +#[derive(Default)] +pub struct CreateSessionInputBuilder { +bucket: Option, + +bucket_key_enabled: Option, + +ssekms_encryption_context: Option, + +ssekms_key_id: Option, + +server_side_encryption: Option, + +session_mode: Option, + } -impl fmt::Debug for GetBucketTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl CreateSessionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl GetBucketTaggingInput { - #[must_use] - pub fn builder() -> builders::GetBucketTaggingInputBuilder { - default() - } +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketTaggingOutput { - ///

    Contains the tag set.

    - pub tag_set: TagSet, +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self } -impl fmt::Debug for GetBucketTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketTaggingOutput"); - d.field("tag_set", &self.tag_set); - d.finish_non_exhaustive() - } +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketVersioningInput { - ///

    The name of the bucket for which to get the versioning information.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self } -impl fmt::Debug for GetBucketVersioningInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketVersioningInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_session_mode(&mut self, field: Option) -> &mut Self { + self.session_mode = field; +self } -impl GetBucketVersioningInput { - #[must_use] - pub fn builder() -> builders::GetBucketVersioningInputBuilder { - default() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketVersioningOutput { - ///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This - /// element is only returned if the bucket has been configured with MFA delete. If the bucket - /// has never been so configured, this element is not returned.

    - pub mfa_delete: Option, - ///

    The versioning state of the bucket.

    - pub status: Option, +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self } -impl fmt::Debug for GetBucketVersioningOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketVersioningOutput"); - if let Some(ref val) = self.mfa_delete { - d.field("mfa_delete", val); - } - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketWebsiteInput { - ///

    The bucket name for which to get the website configuration.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self } -impl fmt::Debug for GetBucketWebsiteInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketWebsiteInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self } -impl GetBucketWebsiteInput { - #[must_use] - pub fn builder() -> builders::GetBucketWebsiteInputBuilder { - default() - } +#[must_use] +pub fn session_mode(mut self, field: Option) -> Self { + self.session_mode = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketWebsiteOutput { - ///

    The object key name of the website error document to use for 4XX class errors.

    - pub error_document: Option, - ///

    The name of the index document for the website (for example - /// index.html).

    - pub index_document: Option, - ///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 - /// bucket.

    - pub redirect_all_requests_to: Option, - ///

    Rules that define when a redirect is applied and the redirect behavior.

    - pub routing_rules: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let session_mode = self.session_mode; +Ok(CreateSessionInput { +bucket, +bucket_key_enabled, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +session_mode, +}) } -impl fmt::Debug for GetBucketWebsiteOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetBucketWebsiteOutput"); - if let Some(ref val) = self.error_document { - d.field("error_document", val); - } - if let Some(ref val) = self.index_document { - d.field("index_document", val); - } - if let Some(ref val) = self.redirect_all_requests_to { - d.field("redirect_all_requests_to", val); - } - if let Some(ref val) = self.routing_rules { - d.field("routing_rules", val); - } - d.finish_non_exhaustive() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAclInput { - ///

    The bucket name that contains the object for which to get the ACL information.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The key of the object for which to get the ACL information.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    Version ID used to reference a specific version of the object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, + +/// A builder for [`DeleteBucketInput`] +#[derive(Default)] +pub struct DeleteBucketInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl fmt::Debug for GetObjectAclInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAclInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +impl DeleteBucketInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl GetObjectAclInput { - #[must_use] - pub fn builder() -> builders::GetObjectAclInputBuilder { - default() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAclOutput { - ///

    A list of grants.

    - pub grants: Option, - ///

    Container for the bucket owner's display name and ID.

    - pub owner: Option, - pub request_charged: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for GetObjectAclOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAclOutput"); - if let Some(ref val) = self.grants { - d.field("grants", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesInput { - ///

    The name of the bucket that contains the object.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The object key.

    - pub key: ObjectKey, - ///

    Sets the maximum number of parts to return.

    - pub max_parts: Option, - ///

    Specifies the fields at the root level that you want returned in the response. Fields - /// that you do not specify are not returned.

    - pub object_attributes: ObjectAttributesList, - ///

    Specifies the part after which listing should begin. Only parts with higher part numbers - /// will be listed.

    - pub part_number_marker: Option, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    The version ID used to reference a specific version of the object.

    - /// - ///

    S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the - /// versionId query parameter in the request.

    - ///
    - pub version_id: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketInput { +bucket, +expected_bucket_owner, +}) } -impl fmt::Debug for GetObjectAttributesInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAttributesInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.max_parts { - d.field("max_parts", val); - } - d.field("object_attributes", &self.object_attributes); - if let Some(ref val) = self.part_number_marker { - d.field("part_number_marker", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } } -impl GetObjectAttributesInput { - #[must_use] - pub fn builder() -> builders::GetObjectAttributesInputBuilder { - default() - } + +/// A builder for [`DeleteBucketAnalyticsConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketAnalyticsConfigurationInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + +id: Option, + } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesOutput { - ///

    The checksum or digest of the object.

    - pub checksum: Option, - ///

    Specifies whether the object retrieved was (true) or was not - /// (false) a delete marker. If false, this response header does - /// not appear in the response. To learn more about delete markers, see Working with delete markers.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub delete_marker: Option, - ///

    An ETag is an opaque identifier assigned by a web server to a specific version of a - /// resource found at a URL.

    - pub e_tag: Option, - ///

    Date and time when the object was last modified.

    - pub last_modified: Option, - ///

    A collection of parts associated with a multipart upload.

    - pub object_parts: Option, - ///

    The size of the object in bytes.

    - pub object_size: Option, - pub request_charged: Option, - ///

    Provides the storage class information of the object. Amazon S3 returns this header for all - /// objects except for S3 Standard storage class objects.

    - ///

    For more information, see Storage Classes.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, - ///

    The version ID of the object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, +impl DeleteBucketAnalyticsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for GetObjectAttributesOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAttributesOutput"); - if let Some(ref val) = self.checksum { - d.field("checksum", val); - } - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.object_parts { - d.field("object_parts", val); - } - if let Some(ref val) = self.object_size { - d.field("object_size", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -///

    A collection of parts associated with a multipart upload.

    -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesParts { - ///

    Indicates whether the returned list of parts is truncated. A value of true - /// indicates that the list was truncated. A list can be truncated if the number of parts - /// exceeds the limit returned in the MaxParts element.

    - pub is_truncated: Option, - ///

    The maximum number of parts allowed in the response.

    - pub max_parts: Option, - ///

    When a list is truncated, this element specifies the last part in the list, as well as - /// the value to use for the PartNumberMarker request parameter in a subsequent - /// request.

    - pub next_part_number_marker: Option, - ///

    The marker for the current part.

    - pub part_number_marker: Option, - ///

    A container for elements related to a particular part. A response can contain zero or - /// more Parts elements.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - For - /// GetObjectAttributes, if a additional checksum (including - /// x-amz-checksum-crc32, x-amz-checksum-crc32c, - /// x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't - /// applied to the object specified in the request, the response doesn't return - /// Part.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - For - /// GetObjectAttributes, no matter whether a additional checksum is - /// applied to the object specified in the request, the response returns - /// Part.

      - ///
    • - ///
    - ///
    - pub parts: Option, - ///

    The total number of parts.

    - pub total_parts_count: Option, +pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); +self } -impl fmt::Debug for GetObjectAttributesParts { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectAttributesParts"); - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.max_parts { - d.field("max_parts", val); - } - if let Some(ref val) = self.next_part_number_marker { - d.field("next_part_number_marker", val); - } - if let Some(ref val) = self.part_number_marker { - d.field("part_number_marker", val); - } - if let Some(ref val) = self.parts { - d.field("parts", val); - } - if let Some(ref val) = self.total_parts_count { - d.field("total_parts_count", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectInput { - ///

    The bucket name containing the object.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    To retrieve the checksum, this mode must be enabled.

    - pub checksum_mode: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Return the object only if its entity tag (ETag) is the same as the one specified in this - /// header; otherwise, return a 412 Precondition Failed error.

    - ///

    If both of the If-Match and If-Unmodified-Since headers are - /// present in the request as follows: If-Match condition evaluates to - /// true, and; If-Unmodified-Since condition evaluates to - /// false; then, S3 returns 200 OK and the data requested.

    - ///

    For more information about conditional requests, see RFC 7232.

    - pub if_match: Option, - ///

    Return the object only if it has been modified since the specified time; otherwise, - /// return a 304 Not Modified error.

    - ///

    If both of the If-None-Match and If-Modified-Since headers are - /// present in the request as follows: If-None-Match condition evaluates to - /// false, and; If-Modified-Since condition evaluates to - /// true; then, S3 returns 304 Not Modified status code.

    - ///

    For more information about conditional requests, see RFC 7232.

    - pub if_modified_since: Option, - ///

    Return the object only if its entity tag (ETag) is different from the one specified in - /// this header; otherwise, return a 304 Not Modified error.

    - ///

    If both of the If-None-Match and If-Modified-Since headers are - /// present in the request as follows: If-None-Match condition evaluates to - /// false, and; If-Modified-Since condition evaluates to - /// true; then, S3 returns 304 Not Modified HTTP status - /// code.

    - ///

    For more information about conditional requests, see RFC 7232.

    - pub if_none_match: Option, - ///

    Return the object only if it has not been modified since the specified time; otherwise, - /// return a 412 Precondition Failed error.

    - ///

    If both of the If-Match and If-Unmodified-Since headers are - /// present in the request as follows: If-Match condition evaluates to - /// true, and; If-Unmodified-Since condition evaluates to - /// false; then, S3 returns 200 OK and the data requested.

    - ///

    For more information about conditional requests, see RFC 7232.

    - pub if_unmodified_since: Option, - ///

    Key of the object to get.

    - pub key: ObjectKey, - ///

    Part number of the object being read. This is a positive integer between 1 and 10,000. - /// Effectively performs a 'ranged' GET request for the part specified. Useful for downloading - /// just a part of an object.

    - pub part_number: Option, - ///

    Downloads the specified byte range of an object. For more information about the HTTP - /// Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

    - /// - ///

    Amazon S3 doesn't support retrieving multiple ranges of data per GET - /// request.

    - ///
    - pub range: Option, - pub request_payer: Option, - ///

    Sets the Cache-Control header of the response.

    - pub response_cache_control: Option, - ///

    Sets the Content-Disposition header of the response.

    - pub response_content_disposition: Option, - ///

    Sets the Content-Encoding header of the response.

    - pub response_content_encoding: Option, - ///

    Sets the Content-Language header of the response.

    - pub response_content_language: Option, - ///

    Sets the Content-Type header of the response.

    - pub response_content_type: Option, - ///

    Sets the Expires header of the response.

    - pub response_expires: Option, - ///

    Specifies the algorithm to use when decrypting the object (for example, - /// AES256).

    - ///

    If you encrypt an object by using server-side encryption with customer-provided - /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, - /// you must use the following headers:

    - ///
      - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-algorithm - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key-MD5 - ///

      - ///
    • - ///
    - ///

    For more information about SSE-C, see Server-Side Encryption - /// (Using Customer-Provided Encryption Keys) in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key that you originally provided for Amazon S3 to - /// encrypt the data before storing it. This value is used to decrypt the object when - /// recovering it and must match the one used when storing the data. The key must be - /// appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - ///

    If you encrypt an object by using server-side encryption with customer-provided - /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, - /// you must use the following headers:

    - ///
      - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-algorithm - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key-MD5 - ///

      - ///
    • - ///
    - ///

    For more information about SSE-C, see Server-Side Encryption - /// (Using Customer-Provided Encryption Keys) in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to - /// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption - /// key was transmitted without error.

    - ///

    If you encrypt an object by using server-side encryption with customer-provided - /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, - /// you must use the following headers:

    - ///
      - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-algorithm - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key-MD5 - ///

      - ///
    • - ///
    - ///

    For more information about SSE-C, see Server-Side Encryption - /// (Using Customer-Provided Encryption Keys) in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Version ID used to reference a specific version of the object.

    - ///

    By default, the GetObject operation returns the current version of an - /// object. To return a different version, use the versionId subresource.

    - /// - ///
      - ///
    • - ///

      If you include a versionId in your request header, you must have - /// the s3:GetObjectVersion permission to access a specific version of an - /// object. The s3:GetObject permission is not required in this - /// scenario.

      - ///
    • - ///
    • - ///

      If you request the current version of an object without a specific - /// versionId in the request header, only the - /// s3:GetObject permission is required. The - /// s3:GetObjectVersion permission is not required in this - /// scenario.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the - /// versionId query parameter in the request.

      - ///
    • - ///
    - ///
    - ///

    For more information about versioning, see PutBucketVersioning.

    - pub version_id: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for GetObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_mode { - d.field("checksum_mode", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_modified_since { - d.field("if_modified_since", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - if let Some(ref val) = self.if_unmodified_since { - d.field("if_unmodified_since", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - if let Some(ref val) = self.range { - d.field("range", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.response_cache_control { - d.field("response_cache_control", val); - } - if let Some(ref val) = self.response_content_disposition { - d.field("response_content_disposition", val); - } - if let Some(ref val) = self.response_content_encoding { - d.field("response_content_encoding", val); - } - if let Some(ref val) = self.response_content_language { - d.field("response_content_language", val); - } - if let Some(ref val) = self.response_content_type { - d.field("response_content_type", val); - } - if let Some(ref val) = self.response_expires { - d.field("response_expires", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); +self } -impl GetObjectInput { - #[must_use] - pub fn builder() -> builders::GetObjectInputBuilder { - default() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(DeleteBucketAnalyticsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLegalHoldInput { - ///

    The bucket name containing the object whose legal hold status you want to retrieve.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The key name for the object whose legal hold status you want to retrieve.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    The version ID of the object whose legal hold status you want to retrieve.

    - pub version_id: Option, } -impl fmt::Debug for GetObjectLegalHoldInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectLegalHoldInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } + +/// A builder for [`DeleteBucketCorsInput`] +#[derive(Default)] +pub struct DeleteBucketCorsInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl GetObjectLegalHoldInput { - #[must_use] - pub fn builder() -> builders::GetObjectLegalHoldInputBuilder { - default() - } +impl DeleteBucketCorsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLegalHoldOutput { - ///

    The current legal hold status for the specified object.

    - pub legal_hold: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for GetObjectLegalHoldOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectLegalHoldOutput"); - if let Some(ref val) = self.legal_hold { - d.field("legal_hold", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLockConfigurationInput { - ///

    The bucket whose Object Lock configuration you want to retrieve.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for GetObjectLockConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectLockConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketCorsInput { +bucket, +expected_bucket_owner, +}) } -impl GetObjectLockConfigurationInput { - #[must_use] - pub fn builder() -> builders::GetObjectLockConfigurationInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLockConfigurationOutput { - ///

    The specified bucket's Object Lock configuration.

    - pub object_lock_configuration: Option, + +/// A builder for [`DeleteBucketEncryptionInput`] +#[derive(Default)] +pub struct DeleteBucketEncryptionInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl fmt::Debug for GetObjectLockConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectLockConfigurationOutput"); - if let Some(ref val) = self.object_lock_configuration { - d.field("object_lock_configuration", val); - } - d.finish_non_exhaustive() - } +impl DeleteBucketEncryptionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Default)] -pub struct GetObjectOutput { - ///

    Indicates that a range of bytes was specified in the request.

    - pub accept_ranges: Option, - ///

    Object data.

    - pub body: Option, - ///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with - /// Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more - /// information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. For more information, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    The checksum type, which determines how part-level checksums are combined to create an - /// object-level checksum for multipart objects. You can use this header response to verify - /// that the checksum type that is received is the same checksum type that was specified in the - /// CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Specifies presentational information for the object.

    - pub content_disposition: Option, - ///

    Indicates what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

    - pub content_encoding: Option, - ///

    The language the content is in.

    - pub content_language: Option, - ///

    Size of the body in bytes.

    - pub content_length: Option, - ///

    The portion of the object returned in the response.

    - pub content_range: Option, - ///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, - ///

    Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If - /// false, this response header does not appear in the response.

    - /// - ///
      - ///
    • - ///

      If the current version of the object is a delete marker, Amazon S3 behaves as if the - /// object was deleted and includes x-amz-delete-marker: true in the - /// response.

      - ///
    • - ///
    • - ///

      If the specified version in the request is a delete marker, the response - /// returns a 405 Method Not Allowed error and the Last-Modified: - /// timestamp response header.

      - ///
    • - ///
    - ///
    - pub delete_marker: Option, - ///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific - /// version of a resource found at a URL.

    - pub e_tag: Option, - ///

    If the object expiration is configured (see - /// PutBucketLifecycleConfiguration - /// ), the response includes this - /// header. It includes the expiry-date and rule-id key-value pairs - /// providing object expiration information. The value of the rule-id is - /// URL-encoded.

    - /// - ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    - ///
    - pub expiration: Option, - ///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, - ///

    Date and time when the object was last modified.

    - ///

    - /// General purpose buckets - When you specify a - /// versionId of the object in your request, if the specified version in the - /// request is a delete marker, the response returns a 405 Method Not Allowed - /// error and the Last-Modified: timestamp response header.

    - pub last_modified: Option, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    This is set to the number of metadata entries not returned in the headers that are - /// prefixed with x-amz-meta-. This can happen if you create metadata using an API - /// like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, - /// you can create metadata whose values are not legal HTTP headers.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub missing_meta: Option, - ///

    Indicates whether this object has an active legal hold. This field is only returned if - /// you have permission to view an object's legal hold status.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_legal_hold_status: Option, - ///

    The Object Lock mode that's currently in place for this object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_mode: Option, - ///

    The date and time when this object's Object Lock will expire.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_retain_until_date: Option, - ///

    The count of parts this object has. This value is only returned if you specify - /// partNumber in your request and the object was uploaded as a multipart - /// upload.

    - pub parts_count: Option, - ///

    Amazon S3 can return this if your request involves a bucket that is either a source or - /// destination in a replication rule.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub replication_status: Option, - pub request_charged: Option, - ///

    Provides information about object restoration action and expiration time of the restored - /// object copy.

    - /// - ///

    This functionality is not supported for directory buckets. - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub restore: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, - ///

    Provides storage class information of the object. Amazon S3 returns this header for all - /// objects except for S3 Standard storage class objects.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, - ///

    The number of tags, if any, on the object, when you have the relevant permission to read - /// object tags.

    - ///

    You can use GetObjectTagging to retrieve - /// the tag set associated with an object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub tag_count: Option, - ///

    Version ID of the object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, - ///

    If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub website_redirect_location: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for GetObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectOutput"); - if let Some(ref val) = self.accept_ranges { - d.field("accept_ranges", val); - } - if let Some(ref val) = self.body { - d.field("body", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_range { - d.field("content_range", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.missing_meta { - d.field("missing_meta", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.parts_count { - d.field("parts_count", val); - } - if let Some(ref val) = self.replication_status { - d.field("replication_status", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.restore { - d.field("restore", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tag_count { - d.field("tag_count", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -pub type GetObjectResponseStatusCode = i32; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectRetentionInput { - ///

    The bucket name containing the object whose retention settings you want to retrieve.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The key name for the object whose retention settings you want to retrieve.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    The version ID for the object whose retention settings you want to retrieve.

    - pub version_id: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketEncryptionInput { +bucket, +expected_bucket_owner, +}) } -impl fmt::Debug for GetObjectRetentionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectRetentionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } } -impl GetObjectRetentionInput { - #[must_use] - pub fn builder() -> builders::GetObjectRetentionInputBuilder { - default() - } + +/// A builder for [`DeleteBucketIntelligentTieringConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketIntelligentTieringConfigurationInputBuilder { +bucket: Option, + +id: Option, + } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectRetentionOutput { - ///

    The container element for an object's retention settings.

    - pub retention: Option, +impl DeleteBucketIntelligentTieringConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for GetObjectRetentionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectRetentionOutput"); - if let Some(ref val) = self.retention { - d.field("retention", val); - } - d.finish_non_exhaustive() - } +pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTaggingInput { - ///

    The bucket name containing the object for which to get the tagging information.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Object key for which to get the tagging information.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    The versionId of the object for which to get the tagging information.

    - pub version_id: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for GetObjectTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); +self } -impl GetObjectTaggingInput { - #[must_use] - pub fn builder() -> builders::GetObjectTaggingInputBuilder { - default() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(DeleteBucketIntelligentTieringConfigurationInput { +bucket, +id, +}) } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTaggingOutput { - ///

    Contains the tag set.

    - pub tag_set: TagSet, - ///

    The versionId of the object for which you got the tagging information.

    - pub version_id: Option, } -impl fmt::Debug for GetObjectTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectTaggingOutput"); - d.field("tag_set", &self.tag_set); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } + +/// A builder for [`DeleteBucketInventoryConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketInventoryConfigurationInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + +id: Option, + } -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTorrentInput { - ///

    The name of the bucket containing the object for which to get the torrent files.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The object key for which to get the information.

    - pub key: ObjectKey, - pub request_payer: Option, +impl DeleteBucketInventoryConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for GetObjectTorrentInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectTorrentInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl GetObjectTorrentInput { - #[must_use] - pub fn builder() -> builders::GetObjectTorrentInputBuilder { - default() - } +pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); +self } -#[derive(Default)] -pub struct GetObjectTorrentOutput { - ///

    A Bencoded dictionary as defined by the BitTorrent specification

    - pub body: Option, - pub request_charged: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for GetObjectTorrentOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetObjectTorrentOutput"); - if let Some(ref val) = self.body { - d.field("body", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct GetPublicAccessBlockInput { - ///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want - /// to retrieve.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); +self } -impl fmt::Debug for GetPublicAccessBlockInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetPublicAccessBlockInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(DeleteBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) } -impl GetPublicAccessBlockInput { - #[must_use] - pub fn builder() -> builders::GetPublicAccessBlockInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct GetPublicAccessBlockOutput { - ///

    The PublicAccessBlock configuration currently in effect for this Amazon S3 - /// bucket.

    - pub public_access_block_configuration: Option, + +/// A builder for [`DeleteBucketLifecycleInput`] +#[derive(Default)] +pub struct DeleteBucketLifecycleInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl fmt::Debug for GetPublicAccessBlockOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GetPublicAccessBlockOutput"); - if let Some(ref val) = self.public_access_block_configuration { - d.field("public_access_block_configuration", val); - } - d.finish_non_exhaustive() - } +impl DeleteBucketLifecycleInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -///

    Container for S3 Glacier job parameters.

    -#[derive(Clone, PartialEq)] -pub struct GlacierJobParameters { - ///

    Retrieval tier at which the restore will be processed.

    - pub tier: Tier, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for GlacierJobParameters { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("GlacierJobParameters"); - d.field("tier", &self.tier); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -///

    Container for grant information.

    -#[derive(Clone, Default, PartialEq)] -pub struct Grant { - ///

    The person being granted permissions.

    - pub grantee: Option, - ///

    Specifies the permission given to the grantee.

    - pub permission: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for Grant { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Grant"); - if let Some(ref val) = self.grantee { - d.field("grantee", val); - } - if let Some(ref val) = self.permission { - d.field("permission", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketLifecycleInput { +bucket, +expected_bucket_owner, +}) } -pub type GrantFullControl = String; +} -pub type GrantRead = String; -pub type GrantReadACP = String; +/// A builder for [`DeleteBucketMetadataTableConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketMetadataTableConfigurationInputBuilder { +bucket: Option, -pub type GrantWrite = String; +expected_bucket_owner: Option, -pub type GrantWriteACP = String; +} -///

    Container for the person being granted permissions.

    -#[derive(Clone, PartialEq)] -pub struct Grantee { - ///

    Screen name of the grantee.

    - pub display_name: Option, - ///

    Email address of the grantee.

    - /// - ///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    - ///
      - ///
    • - ///

      US East (N. Virginia)

      - ///
    • - ///
    • - ///

      US West (N. California)

      - ///
    • - ///
    • - ///

      US West (Oregon)

      - ///
    • - ///
    • - ///

      Asia Pacific (Singapore)

      - ///
    • - ///
    • - ///

      Asia Pacific (Sydney)

      - ///
    • - ///
    • - ///

      Asia Pacific (Tokyo)

      - ///
    • - ///
    • - ///

      Europe (Ireland)

      - ///
    • - ///
    • - ///

      South America (São Paulo)

      - ///
    • - ///
    - ///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    - ///
    - pub email_address: Option, - ///

    The canonical user ID of the grantee.

    - pub id: Option, - ///

    Type of grantee

    - pub type_: Type, - ///

    URI of the grantee group.

    - pub uri: Option, +impl DeleteBucketMetadataTableConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for Grantee { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Grantee"); - if let Some(ref val) = self.display_name { - d.field("display_name", val); - } - if let Some(ref val) = self.email_address { - d.field("email_address", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.field("type_", &self.type_); - if let Some(ref val) = self.uri { - d.field("uri", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -pub type Grants = List; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -#[derive(Clone, Default, PartialEq)] -pub struct HeadBucketInput { - ///

    The bucket name.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for HeadBucketInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("HeadBucketInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketMetadataTableConfigurationInput { +bucket, +expected_bucket_owner, +}) } -impl HeadBucketInput { - #[must_use] - pub fn builder() -> builders::HeadBucketInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct HeadBucketOutput { - ///

    Indicates whether the bucket name used in the request is an access point alias.

    - /// - ///

    For directory buckets, the value of this field is false.

    - ///
    - pub access_point_alias: Option, - ///

    The name of the location where the bucket will be created.

    - ///

    For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

    - /// - ///

    This functionality is only supported by directory buckets.

    - ///
    - pub bucket_location_name: Option, - ///

    The type of location where the bucket is created.

    - /// - ///

    This functionality is only supported by directory buckets.

    - ///
    - pub bucket_location_type: Option, - ///

    The Region that the bucket is located.

    - pub bucket_region: Option, + +/// A builder for [`DeleteBucketMetricsConfigurationInput`] +#[derive(Default)] +pub struct DeleteBucketMetricsConfigurationInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + +id: Option, + } -impl fmt::Debug for HeadBucketOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("HeadBucketOutput"); - if let Some(ref val) = self.access_point_alias { - d.field("access_point_alias", val); - } - if let Some(ref val) = self.bucket_location_name { - d.field("bucket_location_name", val); - } - if let Some(ref val) = self.bucket_location_type { - d.field("bucket_location_type", val); - } - if let Some(ref val) = self.bucket_region { - d.field("bucket_region", val); - } - d.finish_non_exhaustive() - } +impl DeleteBucketMetricsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct HeadObjectInput { - ///

    The name of the bucket that contains the object.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    To retrieve the checksum, this parameter must be enabled.

    - ///

    - /// General purpose buckets - - /// If you enable checksum mode and the object is uploaded with a - /// checksum - /// and encrypted with an Key Management Service (KMS) key, you must have permission to use the - /// kms:Decrypt action to retrieve the checksum.

    - ///

    - /// Directory buckets - If you enable - /// ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service - /// (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and - /// kms:Decrypt permissions in IAM identity-based policies and KMS key - /// policies for the KMS key to retrieve the checksum of the object.

    - pub checksum_mode: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Return the object only if its entity tag (ETag) is the same as the one specified; - /// otherwise, return a 412 (precondition failed) error.

    - ///

    If both of the If-Match and If-Unmodified-Since headers are - /// present in the request as follows:

    - ///
      - ///
    • - ///

      - /// If-Match condition evaluates to true, and;

      - ///
    • - ///
    • - ///

      - /// If-Unmodified-Since condition evaluates to false;

      - ///
    • - ///
    - ///

    Then Amazon S3 returns 200 OK and the data requested.

    - ///

    For more information about conditional requests, see RFC 7232.

    - pub if_match: Option, - ///

    Return the object only if it has been modified since the specified time; otherwise, - /// return a 304 (not modified) error.

    - ///

    If both of the If-None-Match and If-Modified-Since headers are - /// present in the request as follows:

    - ///
      - ///
    • - ///

      - /// If-None-Match condition evaluates to false, and;

      - ///
    • - ///
    • - ///

      - /// If-Modified-Since condition evaluates to true;

      - ///
    • - ///
    - ///

    Then Amazon S3 returns the 304 Not Modified response code.

    - ///

    For more information about conditional requests, see RFC 7232.

    - pub if_modified_since: Option, - ///

    Return the object only if its entity tag (ETag) is different from the one specified; - /// otherwise, return a 304 (not modified) error.

    - ///

    If both of the If-None-Match and If-Modified-Since headers are - /// present in the request as follows:

    - ///
      - ///
    • - ///

      - /// If-None-Match condition evaluates to false, and;

      - ///
    • - ///
    • - ///

      - /// If-Modified-Since condition evaluates to true;

      - ///
    • - ///
    - ///

    Then Amazon S3 returns the 304 Not Modified response code.

    - ///

    For more information about conditional requests, see RFC 7232.

    - pub if_none_match: Option, - ///

    Return the object only if it has not been modified since the specified time; otherwise, - /// return a 412 (precondition failed) error.

    - ///

    If both of the If-Match and If-Unmodified-Since headers are - /// present in the request as follows:

    - ///
      - ///
    • - ///

      - /// If-Match condition evaluates to true, and;

      - ///
    • - ///
    • - ///

      - /// If-Unmodified-Since condition evaluates to false;

      - ///
    • - ///
    - ///

    Then Amazon S3 returns 200 OK and the data requested.

    - ///

    For more information about conditional requests, see RFC 7232.

    - pub if_unmodified_since: Option, - ///

    The object key.

    - pub key: ObjectKey, - ///

    Part number of the object being read. This is a positive integer between 1 and 10,000. - /// Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about - /// the size of the part and the number of parts in this object.

    - pub part_number: Option, - ///

    HeadObject returns only the metadata for an object. If the Range is satisfiable, only - /// the ContentLength is affected in the response. If the Range is not - /// satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

    - pub range: Option, - pub request_payer: Option, - ///

    Sets the Cache-Control header of the response.

    - pub response_cache_control: Option, - ///

    Sets the Content-Disposition header of the response.

    - pub response_content_disposition: Option, - ///

    Sets the Content-Encoding header of the response.

    - pub response_content_encoding: Option, - ///

    Sets the Content-Language header of the response.

    - pub response_content_language: Option, - ///

    Sets the Content-Type header of the response.

    - pub response_content_type: Option, - ///

    Sets the Expires header of the response.

    - pub response_expires: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Version ID used to reference a specific version of the object.

    - /// - ///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    - ///
    - pub version_id: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for HeadObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("HeadObjectInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_mode { - d.field("checksum_mode", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_modified_since { - d.field("if_modified_since", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - if let Some(ref val) = self.if_unmodified_since { - d.field("if_unmodified_since", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - if let Some(ref val) = self.range { - d.field("range", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.response_cache_control { - d.field("response_cache_control", val); - } - if let Some(ref val) = self.response_content_disposition { - d.field("response_content_disposition", val); - } - if let Some(ref val) = self.response_content_encoding { - d.field("response_content_encoding", val); - } - if let Some(ref val) = self.response_content_language { - d.field("response_content_language", val); - } - if let Some(ref val) = self.response_content_type { - d.field("response_content_type", val); - } - if let Some(ref val) = self.response_expires { - d.field("response_expires", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); +self } -impl HeadObjectInput { - #[must_use] - pub fn builder() -> builders::HeadObjectInputBuilder { - default() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct HeadObjectOutput { - ///

    Indicates that a range of bytes was specified.

    - pub accept_ranges: Option, - ///

    The archive state of the head object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub archive_status: Option, - ///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with - /// Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more - /// information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    The checksum type, which determines how part-level checksums are combined to create an - /// object-level checksum for multipart objects. You can use this header response to verify - /// that the checksum type that is received is the same checksum type that was specified in - /// CreateMultipartUpload request. For more - /// information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Specifies presentational information for the object.

    - pub content_disposition: Option, - ///

    Indicates what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

    - pub content_encoding: Option, - ///

    The language the content is in.

    - pub content_language: Option, - ///

    Size of the body in bytes.

    - pub content_length: Option, - ///

    The portion of the object returned in the response for a GET request.

    - pub content_range: Option, - ///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, - ///

    Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If - /// false, this response header does not appear in the response.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub delete_marker: Option, - ///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific - /// version of a resource found at a URL.

    - pub e_tag: Option, - ///

    If the object expiration is configured (see - /// PutBucketLifecycleConfiguration - /// ), the response includes this - /// header. It includes the expiry-date and rule-id key-value pairs - /// providing object expiration information. The value of the rule-id is - /// URL-encoded.

    - /// - ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    - ///
    - pub expiration: Option, - ///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, - ///

    Date and time when the object was last modified.

    - pub last_modified: Option, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    This is set to the number of metadata entries not returned in x-amz-meta - /// headers. This can happen if you create metadata using an API like SOAP that supports more - /// flexible metadata than the REST API. For example, using SOAP, you can create metadata whose - /// values are not legal HTTP headers.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub missing_meta: Option, - ///

    Specifies whether a legal hold is in effect for this object. This header is only - /// returned if the requester has the s3:GetObjectLegalHold permission. This - /// header is not returned if the specified version of this object has never had a legal hold - /// applied. For more information about S3 Object Lock, see Object Lock.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_legal_hold_status: Option, - ///

    The Object Lock mode, if any, that's in effect for this object. This header is only - /// returned if the requester has the s3:GetObjectRetention permission. For more - /// information about S3 Object Lock, see Object Lock.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_mode: Option, - ///

    The date and time when the Object Lock retention period expires. This header is only - /// returned if the requester has the s3:GetObjectRetention permission.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_retain_until_date: Option, - ///

    The count of parts this object has. This value is only returned if you specify - /// partNumber in your request and the object was uploaded as a multipart - /// upload.

    - pub parts_count: Option, - ///

    Amazon S3 can return this header if your request involves a bucket that is either a source or - /// a destination in a replication rule.

    - ///

    In replication, you have a source bucket on which you configure replication and - /// destination bucket or buckets where Amazon S3 stores object replicas. When you request an object - /// (GetObject) or object metadata (HeadObject) from these - /// buckets, Amazon S3 will return the x-amz-replication-status header in the response - /// as follows:

    - ///
      - ///
    • - ///

      - /// If requesting an object from the source bucket, - /// Amazon S3 will return the x-amz-replication-status header if the object in - /// your request is eligible for replication.

      - ///

      For example, suppose that in your replication configuration, you specify object - /// prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix - /// TaxDocs. Any objects you upload with this key name prefix, for - /// example TaxDocs/document1.pdf, are eligible for replication. For any - /// object request with this key name prefix, Amazon S3 will return the - /// x-amz-replication-status header with value PENDING, COMPLETED or - /// FAILED indicating object replication status.

      - ///
    • - ///
    • - ///

      - /// If requesting an object from a destination - /// bucket, Amazon S3 will return the x-amz-replication-status header - /// with value REPLICA if the object in your request is a replica that Amazon S3 created and - /// there is no replica modification replication in progress.

      - ///
    • - ///
    • - ///

      - /// When replicating objects to multiple destination - /// buckets, the x-amz-replication-status header acts - /// differently. The header of the source object will only return a value of COMPLETED - /// when replication is successful to all destinations. The header will remain at value - /// PENDING until replication has completed for all destinations. If one or more - /// destinations fails replication the header will return FAILED.

      - ///
    • - ///
    - ///

    For more information, see Replication.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub replication_status: Option, - pub request_charged: Option, - ///

    If the object is an archived object (an object whose storage class is GLACIER), the - /// response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

    - ///

    If an archive copy is already restored, the header value indicates when Amazon S3 is - /// scheduled to delete the object copy. For example:

    - ///

    - /// x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 - /// GMT" - ///

    - ///

    If the object restoration is in progress, the header returns the value - /// ongoing-request="true".

    - ///

    For more information about archiving objects, see Transitioning Objects: General Considerations.

    - /// - ///

    This functionality is not supported for directory buckets. - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub restore: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms, aws:kms:dsse).

    - pub server_side_encryption: Option, - ///

    Provides storage class information of the object. Amazon S3 returns this header for all - /// objects except for S3 Standard storage class objects.

    - ///

    For more information, see Storage Classes.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, - ///

    Version ID of the object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, - ///

    If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub website_redirect_location: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for HeadObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("HeadObjectOutput"); - if let Some(ref val) = self.accept_ranges { - d.field("accept_ranges", val); - } - if let Some(ref val) = self.archive_status { - d.field("archive_status", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_range { - d.field("content_range", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.missing_meta { - d.field("missing_meta", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.parts_count { - d.field("parts_count", val); - } - if let Some(ref val) = self.replication_status { - d.field("replication_status", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.restore { - d.field("restore", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); +self } -pub type HostName = String; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(DeleteBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} -pub type HttpErrorCodeReturnedEquals = String; +} -pub type HttpRedirectCode = String; -pub type ID = String; +/// A builder for [`DeleteBucketOwnershipControlsInput`] +#[derive(Default)] +pub struct DeleteBucketOwnershipControlsInputBuilder { +bucket: Option, -pub type IfMatch = ETagCondition; +expected_bucket_owner: Option, -pub type IfMatchInitiatedTime = Timestamp; +} -pub type IfMatchLastModifiedTime = Timestamp; +impl DeleteBucketOwnershipControlsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} -pub type IfMatchSize = i64; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} -pub type IfModifiedSince = Timestamp; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -pub type IfNoneMatch = ETagCondition; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -pub type IfUnmodifiedSince = Timestamp; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketOwnershipControlsInput { +bucket, +expected_bucket_owner, +}) +} -///

    Container for the Suffix element.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IndexDocument { - ///

    A suffix that is appended to a request that is for a directory on the website endpoint. - /// (For example, if the suffix is index.html and you make a request to - /// samplebucket/images/, the data that is returned will be for the object with - /// the key name images/index.html.) The suffix must not be empty and must not - /// include a slash character.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub suffix: Suffix, } -impl fmt::Debug for IndexDocument { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("IndexDocument"); - d.field("suffix", &self.suffix); - d.finish_non_exhaustive() - } + +/// A builder for [`DeleteBucketPolicyInput`] +#[derive(Default)] +pub struct DeleteBucketPolicyInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -pub type Initiated = Timestamp; +impl DeleteBucketPolicyInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} -///

    Container element that identifies who initiated the multipart upload.

    -#[derive(Clone, Default, PartialEq)] -pub struct Initiator { - ///

    Name of the Principal.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub display_name: Option, - ///

    If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the - /// principal is an IAM User, it provides a user ARN value.

    - /// - ///

    - /// Directory buckets - If the principal is an - /// Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it - /// provides a user ARN value.

    - ///
    - pub id: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for Initiator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Initiator"); - if let Some(ref val) = self.display_name { - d.field("display_name", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -///

    Describes the serialization format of the object.

    -#[derive(Clone, Default, PartialEq)] -pub struct InputSerialization { - ///

    Describes the serialization of a CSV-encoded object.

    - pub csv: Option, - ///

    Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: - /// NONE.

    - pub compression_type: Option, - ///

    Specifies JSON as object's input serialization format.

    - pub json: Option, - ///

    Specifies Parquet as object's input serialization format.

    - pub parquet: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for InputSerialization { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InputSerialization"); - if let Some(ref val) = self.csv { - d.field("csv", val); - } - if let Some(ref val) = self.compression_type { - d.field("compression_type", val); - } - if let Some(ref val) = self.json { - d.field("json", val); - } - if let Some(ref val) = self.parquet { - d.field("parquet", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketPolicyInput { +bucket, +expected_bucket_owner, +}) } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct IntelligentTieringAccessTier(Cow<'static, str>); +} -impl IntelligentTieringAccessTier { - pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; - pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; +/// A builder for [`DeleteBucketReplicationInput`] +#[derive(Default)] +pub struct DeleteBucketReplicationInputBuilder { +bucket: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +expected_bucket_owner: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for IntelligentTieringAccessTier { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl DeleteBucketReplicationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: IntelligentTieringAccessTier) -> Self { - s.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl FromStr for IntelligentTieringAccessTier { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -///

    A container for specifying S3 Intelligent-Tiering filters. The filters determine the -/// subset of objects to which the rule applies.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringAndOperator { - ///

    An object key name prefix that identifies the subset of objects to which the - /// configuration applies.

    - pub prefix: Option, - ///

    All of these tags must exist in the object's tag set in order for the configuration to - /// apply.

    - pub tags: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for IntelligentTieringAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("IntelligentTieringAndOperator"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketReplicationInput { +bucket, +expected_bucket_owner, +}) } -///

    Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

    -///

    For information about the S3 Intelligent-Tiering storage class, see Storage class -/// for automatically optimizing frequently and infrequently accessed -/// objects.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringConfiguration { - ///

    Specifies a bucket filter. The configuration only includes objects that meet the - /// filter's criteria.

    - pub filter: Option, - ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, - ///

    Specifies the status of the configuration.

    - pub status: IntelligentTieringStatus, - ///

    Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

    - pub tierings: TieringList, } -impl fmt::Debug for IntelligentTieringConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("IntelligentTieringConfiguration"); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - d.field("id", &self.id); - d.field("status", &self.status); - d.field("tierings", &self.tierings); - d.finish_non_exhaustive() - } + +/// A builder for [`DeleteBucketTaggingInput`] +#[derive(Default)] +pub struct DeleteBucketTaggingInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl Default for IntelligentTieringConfiguration { - fn default() -> Self { - Self { - filter: None, - id: default(), - status: String::new().into(), - tierings: default(), - } - } +impl DeleteBucketTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -pub type IntelligentTieringConfigurationList = List; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} -pub type IntelligentTieringDays = i32; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -///

    The Filter is used to identify objects that the S3 Intelligent-Tiering -/// configuration applies to.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringFilter { - ///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. - /// The operator must have at least two predicates, and an object must match all of the - /// predicates in order for the filter to apply.

    - pub and: Option, - ///

    An object key name prefix that identifies the subset of objects to which the rule - /// applies.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - pub tag: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for IntelligentTieringFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("IntelligentTieringFilter"); - if let Some(ref val) = self.and { - d.field("and", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tag { - d.field("tag", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketTaggingInput { +bucket, +expected_bucket_owner, +}) } -pub type IntelligentTieringId = String; +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct IntelligentTieringStatus(Cow<'static, str>); -impl IntelligentTieringStatus { - pub const DISABLED: &'static str = "Disabled"; +/// A builder for [`DeleteBucketWebsiteInput`] +#[derive(Default)] +pub struct DeleteBucketWebsiteInputBuilder { +bucket: Option, - pub const ENABLED: &'static str = "Enabled"; +expected_bucket_owner: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +impl DeleteBucketWebsiteInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for IntelligentTieringStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl From for Cow<'static, str> { - fn from(s: IntelligentTieringStatus) -> Self { - s.0 - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl FromStr for IntelligentTieringStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -///

    Object is archived and inaccessible until restored.

    -///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage -/// class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access -/// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you -/// must first restore a copy using RestoreObject. Otherwise, this -/// operation returns an InvalidObjectState error. For information about restoring -/// archived objects, see Restoring Archived Objects in -/// the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidObjectState { - pub access_tier: Option, - pub storage_class: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeleteBucketWebsiteInput { +bucket, +expected_bucket_owner, +}) } -impl fmt::Debug for InvalidObjectState { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InvalidObjectState"); - if let Some(ref val) = self.access_tier { - d.field("access_tier", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } } -///

    You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

    -///
      -///
    • -///

      Cannot specify both a write offset value and user-defined object metadata for existing objects.

      -///
    • -///
    • -///

      Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

      -///
    • -///
    • -///

      Request body cannot be empty when 'write offset' is specified.

      -///
    • -///
    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidRequest {} -impl fmt::Debug for InvalidRequest { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InvalidRequest"); - d.finish_non_exhaustive() - } -} +/// A builder for [`DeleteObjectInput`] +#[derive(Default)] +pub struct DeleteObjectInputBuilder { +bucket: Option, -///

    -/// The write offset value that you specified does not match the current object size. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidWriteOffset {} +bypass_governance_retention: Option, -impl fmt::Debug for InvalidWriteOffset { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InvalidWriteOffset"); - d.finish_non_exhaustive() - } -} +expected_bucket_owner: Option, -///

    Specifies the inventory configuration for an Amazon S3 bucket. For more information, see -/// GET Bucket inventory in the Amazon S3 API Reference.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryConfiguration { - ///

    Contains information about where to publish the inventory results.

    - pub destination: InventoryDestination, - ///

    Specifies an inventory filter. The inventory only includes objects that meet the - /// filter's criteria.

    - pub filter: Option, - ///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, - ///

    Object versions to include in the inventory list. If set to All, the list - /// includes all the object versions, which adds the version-related fields - /// VersionId, IsLatest, and DeleteMarker to the - /// list. If set to Current, the list does not contain these version-related - /// fields.

    - pub included_object_versions: InventoryIncludedObjectVersions, - ///

    Specifies whether the inventory is enabled or disabled. If set to True, an - /// inventory list is generated. If set to False, no inventory list is - /// generated.

    - pub is_enabled: IsEnabled, - ///

    Contains the optional fields that are included in the inventory results.

    - pub optional_fields: Option, - ///

    Specifies the schedule for generating inventory results.

    - pub schedule: InventorySchedule, -} +if_match: Option, -impl fmt::Debug for InventoryConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryConfiguration"); - d.field("destination", &self.destination); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - d.field("id", &self.id); - d.field("included_object_versions", &self.included_object_versions); - d.field("is_enabled", &self.is_enabled); - if let Some(ref val) = self.optional_fields { - d.field("optional_fields", val); - } - d.field("schedule", &self.schedule); - d.finish_non_exhaustive() - } -} +if_match_last_modified_time: Option, -impl Default for InventoryConfiguration { - fn default() -> Self { - Self { - destination: default(), - filter: None, - id: default(), - included_object_versions: String::new().into(), - is_enabled: default(), - optional_fields: None, - schedule: default(), - } - } -} +if_match_size: Option, -pub type InventoryConfigurationList = List; +key: Option, -///

    Specifies the inventory configuration for an Amazon S3 bucket.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryDestination { - ///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) - /// where inventory results are published.

    - pub s3_bucket_destination: InventoryS3BucketDestination, -} +mfa: Option, + +request_payer: Option, + +version_id: Option, -impl fmt::Debug for InventoryDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryDestination"); - d.field("s3_bucket_destination", &self.s3_bucket_destination); - d.finish_non_exhaustive() - } } -impl Default for InventoryDestination { - fn default() -> Self { - Self { - s3_bucket_destination: default(), - } - } +impl DeleteObjectInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -///

    Contains the type of server-side encryption used to encrypt the inventory -/// results.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct InventoryEncryption { - ///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    - pub ssekms: Option, - ///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    - pub sses3: Option, +pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; +self } -impl fmt::Debug for InventoryEncryption { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryEncryption"); - if let Some(ref val) = self.ssekms { - d.field("ssekms", val); - } - if let Some(ref val) = self.sses3 { - d.field("sses3", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -///

    Specifies an inventory filter. The inventory only includes objects that meet the -/// filter's criteria.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct InventoryFilter { - ///

    The prefix that an object must have to be included in the inventory results.

    - pub prefix: Prefix, +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self } -impl fmt::Debug for InventoryFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryFilter"); - d.field("prefix", &self.prefix); - d.finish_non_exhaustive() - } +pub fn set_if_match_last_modified_time(&mut self, field: Option) -> &mut Self { + self.if_match_last_modified_time = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryFormat(Cow<'static, str>); +pub fn set_if_match_size(&mut self, field: Option) -> &mut Self { + self.if_match_size = field; +self +} -impl InventoryFormat { - pub const CSV: &'static str = "CSV"; +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub const ORC: &'static str = "ORC"; +pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; +self +} - pub const PARQUET: &'static str = "Parquet"; +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for InventoryFormat { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; +self } -impl From for Cow<'static, str> { - fn from(s: InventoryFormat) -> Self { - s.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl FromStr for InventoryFormat { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryFrequency(Cow<'static, str>); +#[must_use] +pub fn if_match_last_modified_time(mut self, field: Option) -> Self { + self.if_match_last_modified_time = field; +self +} -impl InventoryFrequency { - pub const DAILY: &'static str = "Daily"; +#[must_use] +pub fn if_match_size(mut self, field: Option) -> Self { + self.if_match_size = field; +self +} - pub const WEEKLY: &'static str = "Weekly"; +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl From for InventoryFrequency { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self } -impl From for Cow<'static, str> { - fn from(s: InventoryFrequency) -> Self { - s.0 - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bypass_governance_retention = self.bypass_governance_retention; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match = self.if_match; +let if_match_last_modified_time = self.if_match_last_modified_time; +let if_match_size = self.if_match_size; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let mfa = self.mfa; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(DeleteObjectInput { +bucket, +bypass_governance_retention, +expected_bucket_owner, +if_match, +if_match_last_modified_time, +if_match_size, +key, +mfa, +request_payer, +version_id, +}) } -impl FromStr for InventoryFrequency { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -pub type InventoryId = String; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryIncludedObjectVersions(Cow<'static, str>); +/// A builder for [`DeleteObjectTaggingInput`] +#[derive(Default)] +pub struct DeleteObjectTaggingInputBuilder { +bucket: Option, -impl InventoryIncludedObjectVersions { - pub const ALL: &'static str = "All"; +expected_bucket_owner: Option, - pub const CURRENT: &'static str = "Current"; +key: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +version_id: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for InventoryIncludedObjectVersions { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl DeleteObjectTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: InventoryIncludedObjectVersions) -> Self { - s.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl FromStr for InventoryIncludedObjectVersions { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryOptionalField(Cow<'static, str>); - -impl InventoryOptionalField { - pub const BUCKET_KEY_STATUS: &'static str = "BucketKeyStatus"; - - pub const CHECKSUM_ALGORITHM: &'static str = "ChecksumAlgorithm"; +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub const E_TAG: &'static str = "ETag"; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub const ENCRYPTION_STATUS: &'static str = "EncryptionStatus"; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub const INTELLIGENT_TIERING_ACCESS_TIER: &'static str = "IntelligentTieringAccessTier"; +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - pub const IS_MULTIPART_UPLOADED: &'static str = "IsMultipartUploaded"; +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - pub const LAST_MODIFIED_DATE: &'static str = "LastModifiedDate"; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let version_id = self.version_id; +Ok(DeleteObjectTaggingInput { +bucket, +expected_bucket_owner, +key, +version_id, +}) +} - pub const OBJECT_ACCESS_CONTROL_LIST: &'static str = "ObjectAccessControlList"; +} - pub const OBJECT_LOCK_LEGAL_HOLD_STATUS: &'static str = "ObjectLockLegalHoldStatus"; - pub const OBJECT_LOCK_MODE: &'static str = "ObjectLockMode"; +/// A builder for [`DeleteObjectsInput`] +#[derive(Default)] +pub struct DeleteObjectsInputBuilder { +bucket: Option, - pub const OBJECT_LOCK_RETAIN_UNTIL_DATE: &'static str = "ObjectLockRetainUntilDate"; +bypass_governance_retention: Option, - pub const OBJECT_OWNER: &'static str = "ObjectOwner"; +checksum_algorithm: Option, - pub const REPLICATION_STATUS: &'static str = "ReplicationStatus"; +delete: Option, - pub const SIZE: &'static str = "Size"; +expected_bucket_owner: Option, - pub const STORAGE_CLASS: &'static str = "StorageClass"; +mfa: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +request_payer: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for InventoryOptionalField { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl DeleteObjectsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: InventoryOptionalField) -> Self { - s.0 - } +pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; +self } -impl FromStr for InventoryOptionalField { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self } -pub type InventoryOptionalFields = List; - -///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) -/// where inventory results are published.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryS3BucketDestination { - ///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the - /// owner is not validated before exporting data.

    - /// - ///

    Although this value is optional, we strongly recommend that you set it to help - /// prevent problems if the destination bucket ownership changes.

    - ///
    - pub account_id: Option, - ///

    The Amazon Resource Name (ARN) of the bucket where inventory results will be - /// published.

    - pub bucket: BucketName, - ///

    Contains the type of server-side encryption used to encrypt the inventory - /// results.

    - pub encryption: Option, - ///

    Specifies the output format of the inventory results.

    - pub format: InventoryFormat, - ///

    The prefix that is prepended to all inventory results.

    - pub prefix: Option, +pub fn set_delete(&mut self, field: Delete) -> &mut Self { + self.delete = Some(field); +self } -impl fmt::Debug for InventoryS3BucketDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventoryS3BucketDestination"); - if let Some(ref val) = self.account_id { - d.field("account_id", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.encryption { - d.field("encryption", val); - } - d.field("format", &self.format); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl Default for InventoryS3BucketDestination { - fn default() -> Self { - Self { - account_id: None, - bucket: default(), - encryption: None, - format: String::new().into(), - prefix: None, - } - } +pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; +self } -///

    Specifies the schedule for generating inventory results.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventorySchedule { - ///

    Specifies how frequently inventory results are produced.

    - pub frequency: InventoryFrequency, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl fmt::Debug for InventorySchedule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("InventorySchedule"); - d.field("frequency", &self.frequency); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl Default for InventorySchedule { - fn default() -> Self { - Self { - frequency: String::new().into(), - } - } +#[must_use] +pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; +self } -pub type IsEnabled = bool; - -pub type IsLatest = bool; - -pub type IsPublic = bool; +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} -pub type IsRestoreInProgress = bool; +#[must_use] +pub fn delete(mut self, field: Delete) -> Self { + self.delete = Some(field); +self +} -pub type IsTruncated = bool; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -///

    Specifies JSON as object's input serialization format.

    -#[derive(Clone, Default, PartialEq)] -pub struct JSONInput { - ///

    The type of JSON. Valid values: Document, Lines.

    - pub type_: Option, +#[must_use] +pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; +self } -impl fmt::Debug for JSONInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("JSONInput"); - if let Some(ref val) = self.type_ { - d.field("type_", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -///

    Specifies JSON as request's output serialization format.

    -#[derive(Clone, Default, PartialEq)] -pub struct JSONOutput { - ///

    The value used to separate individual records in the output. If no value is specified, - /// Amazon S3 uses a newline character ('\n').

    - pub record_delimiter: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bypass_governance_retention = self.bypass_governance_retention; +let checksum_algorithm = self.checksum_algorithm; +let delete = self.delete.ok_or_else(|| BuildError::missing_field("delete"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let mfa = self.mfa; +let request_payer = self.request_payer; +Ok(DeleteObjectsInput { +bucket, +bypass_governance_retention, +checksum_algorithm, +delete, +expected_bucket_owner, +mfa, +request_payer, +}) } -impl fmt::Debug for JSONOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("JSONOutput"); - if let Some(ref val) = self.record_delimiter { - d.field("record_delimiter", val); - } - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct JSONType(Cow<'static, str>); -impl JSONType { - pub const DOCUMENT: &'static str = "DOCUMENT"; +/// A builder for [`DeletePublicAccessBlockInput`] +#[derive(Default)] +pub struct DeletePublicAccessBlockInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, - pub const LINES: &'static str = "LINES"; +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +impl DeletePublicAccessBlockInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl From for JSONType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: JSONType) -> Self { - s.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl FromStr for JSONType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(DeletePublicAccessBlockInput { +bucket, +expected_bucket_owner, +}) } -pub type KMSContext = String; +} -pub type KeyCount = i32; -pub type KeyMarker = String; +/// A builder for [`GetBucketAccelerateConfigurationInput`] +#[derive(Default)] +pub struct GetBucketAccelerateConfigurationInputBuilder { +bucket: Option, -pub type KeyPrefixEquals = String; +expected_bucket_owner: Option, -pub type LambdaFunctionArn = String; +request_payer: Option, -///

    A container for specifying the configuration for Lambda notifications.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LambdaFunctionConfiguration { - ///

    The Amazon S3 bucket event for which to invoke the Lambda function. For more information, - /// see Supported - /// Event Types in the Amazon S3 User Guide.

    - pub events: EventList, - pub filter: Option, - pub id: Option, - ///

    The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the - /// specified event type occurs.

    - pub lambda_function_arn: LambdaFunctionArn, } -impl fmt::Debug for LambdaFunctionConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LambdaFunctionConfiguration"); - d.field("events", &self.events); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.field("lambda_function_arn", &self.lambda_function_arn); - d.finish_non_exhaustive() - } +impl GetBucketAccelerateConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -pub type LambdaFunctionConfigurationList = List; - -pub type LastModified = Timestamp; - -pub type LastModifiedTime = Timestamp; - -///

    Container for the expiration for the lifecycle of the object.

    -///

    For more information see, Managing your storage -/// lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleExpiration { - ///

    Indicates at what date the object is to be moved or deleted. The date value must conform - /// to the ISO 8601 format. The time is always midnight UTC.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub date: Option, - ///

    Indicates the lifetime, in days, of the objects that are subject to the rule. The value - /// must be a non-zero positive integer.

    - pub days: Option, - ///

    Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set - /// to true, the delete marker will be expired; if set to false the policy takes no action. - /// This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub expired_object_delete_marker: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for LifecycleExpiration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LifecycleExpiration"); - if let Some(ref val) = self.date { - d.field("date", val); - } - if let Some(ref val) = self.days { - d.field("days", val); - } - if let Some(ref val) = self.expired_object_delete_marker { - d.field("expired_object_delete_marker", val); - } - d.finish_non_exhaustive() - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    -///

    For more information see, Managing your storage -/// lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRule { - pub abort_incomplete_multipart_upload: Option, - ///

    Specifies the expiration for the lifecycle of the object in the form of date, days and, - /// whether the object has a delete marker.

    - pub expiration: Option, - ///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A - /// Filter must have exactly one of Prefix, Tag, or - /// And specified. Filter is required if the - /// LifecycleRule does not contain a Prefix element.

    - /// - ///

    - /// Tag filters are not supported for directory buckets.

    - ///
    - pub filter: Option, - ///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    - pub id: Option, - pub noncurrent_version_expiration: Option, - ///

    Specifies the transition rule for the lifecycle rule that describes when noncurrent - /// objects transition to a specific storage class. If your bucket is versioning-enabled (or - /// versioning is suspended), you can set this action to request that Amazon S3 transition - /// noncurrent object versions to a specific storage class at a set period in the object's - /// lifetime.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub noncurrent_version_transitions: Option, - ///

    Prefix identifying one or more objects to which the rule applies. This is - /// no longer used; use Filter instead.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - ///

    If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not - /// currently being applied.

    - pub status: ExpirationStatus, - ///

    Specifies when an Amazon S3 object transitions to a specified storage class.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub transitions: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for LifecycleRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LifecycleRule"); - if let Some(ref val) = self.abort_incomplete_multipart_upload { - d.field("abort_incomplete_multipart_upload", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - if let Some(ref val) = self.noncurrent_version_expiration { - d.field("noncurrent_version_expiration", val); - } - if let Some(ref val) = self.noncurrent_version_transitions { - d.field("noncurrent_version_transitions", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.field("status", &self.status); - if let Some(ref val) = self.transitions { - d.field("transitions", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -///

    This is used in a Lifecycle Rule Filter to apply a logical AND to two or more -/// predicates. The Lifecycle Rule will apply to any object matching all of the predicates -/// configured inside the And operator.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRuleAndOperator { - ///

    Minimum object size to which the rule applies.

    - pub object_size_greater_than: Option, - ///

    Maximum object size to which the rule applies.

    - pub object_size_less_than: Option, - ///

    Prefix identifying one or more objects to which the rule applies.

    - pub prefix: Option, - ///

    All of these tags must exist in the object's tag set in order for the rule to - /// apply.

    - pub tags: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for LifecycleRuleAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LifecycleRuleAndOperator"); - if let Some(ref val) = self.object_size_greater_than { - d.field("object_size_greater_than", val); - } - if let Some(ref val) = self.object_size_less_than { - d.field("object_size_less_than", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let request_payer = self.request_payer; +Ok(GetBucketAccelerateConfigurationInput { +bucket, +expected_bucket_owner, +request_payer, +}) } -///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A -/// Filter can have exactly one of Prefix, Tag, -/// ObjectSizeGreaterThan, ObjectSizeLessThan, or And -/// specified. If the Filter element is left empty, the Lifecycle Rule applies to -/// all objects in the bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRuleFilter { - pub and: Option, - ///

    Minimum object size to which the rule applies.

    - pub object_size_greater_than: Option, - ///

    Maximum object size to which the rule applies.

    - pub object_size_less_than: Option, - ///

    Prefix identifying one or more objects to which the rule applies.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - ///

    This tag must exist in the object's tag set in order for the rule to apply.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub tag: Option, } -impl fmt::Debug for LifecycleRuleFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LifecycleRuleFilter"); - if let Some(ref val) = self.and { - d.field("and", val); - } - if let Some(ref val) = self.object_size_greater_than { - d.field("object_size_greater_than", val); - } - if let Some(ref val) = self.object_size_less_than { - d.field("object_size_less_than", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tag { - d.field("tag", val); - } - d.finish_non_exhaustive() - } -} -pub type LifecycleRules = List; +/// A builder for [`GetBucketAclInput`] +#[derive(Default)] +pub struct GetBucketAclInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketAnalyticsConfigurationsInput { - ///

    The name of the bucket from which analytics configurations are retrieved.

    - pub bucket: BucketName, - ///

    The ContinuationToken that represents a placeholder from where this request - /// should begin.

    - pub continuation_token: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, } -impl fmt::Debug for ListBucketAnalyticsConfigurationsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +impl GetBucketAclInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl ListBucketAnalyticsConfigurationsInput { - #[must_use] - pub fn builder() -> builders::ListBucketAnalyticsConfigurationsInputBuilder { - default() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketAnalyticsConfigurationsOutput { - ///

    The list of analytics configurations for a bucket.

    - pub analytics_configuration_list: Option, - ///

    The marker that is used as a starting point for this analytics configuration list - /// response. This value is present if it was sent in the request.

    - pub continuation_token: Option, - ///

    Indicates whether the returned list of analytics configurations is complete. A value of - /// true indicates that the list is not complete and the NextContinuationToken will be provided - /// for a subsequent request.

    - pub is_truncated: Option, - ///

    - /// NextContinuationToken is sent when isTruncated is true, which - /// indicates that there are more analytics configurations to list. The next request must - /// include this NextContinuationToken. The token is obfuscated and is not a - /// usable value.

    - pub next_continuation_token: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for ListBucketAnalyticsConfigurationsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsOutput"); - if let Some(ref val) = self.analytics_configuration_list { - d.field("analytics_configuration_list", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketIntelligentTieringConfigurationsInput { - ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, - ///

    The ContinuationToken that represents a placeholder from where this request - /// should begin.

    - pub continuation_token: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketAclInput { +bucket, +expected_bucket_owner, +}) } -impl fmt::Debug for ListBucketIntelligentTieringConfigurationsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - d.finish_non_exhaustive() - } } -impl ListBucketIntelligentTieringConfigurationsInput { - #[must_use] - pub fn builder() -> builders::ListBucketIntelligentTieringConfigurationsInputBuilder { - default() - } + +/// A builder for [`GetBucketAnalyticsConfigurationInput`] +#[derive(Default)] +pub struct GetBucketAnalyticsConfigurationInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + +id: Option, + } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketIntelligentTieringConfigurationsOutput { - ///

    The ContinuationToken that represents a placeholder from where this request - /// should begin.

    - pub continuation_token: Option, - ///

    The list of S3 Intelligent-Tiering configurations for a bucket.

    - pub intelligent_tiering_configuration_list: Option, - ///

    Indicates whether the returned list of analytics configurations is complete. A value of - /// true indicates that the list is not complete and the - /// NextContinuationToken will be provided for a subsequent request.

    - pub is_truncated: Option, - ///

    The marker used to continue this inventory configuration listing. Use the - /// NextContinuationToken from this response to continue the listing in a - /// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    - pub next_continuation_token: Option, +impl GetBucketAnalyticsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for ListBucketIntelligentTieringConfigurationsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsOutput"); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.intelligent_tiering_configuration_list { - d.field("intelligent_tiering_configuration_list", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketInventoryConfigurationsInput { - ///

    The name of the bucket containing the inventory configurations to retrieve.

    - pub bucket: BucketName, - ///

    The marker used to continue an inventory configuration listing that has been truncated. - /// Use the NextContinuationToken from a previously truncated list response to - /// continue the listing. The continuation token is an opaque value that Amazon S3 - /// understands.

    - pub continuation_token: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); +self } -impl fmt::Debug for ListBucketInventoryConfigurationsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketInventoryConfigurationsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl ListBucketInventoryConfigurationsInput { - #[must_use] - pub fn builder() -> builders::ListBucketInventoryConfigurationsInputBuilder { - default() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketInventoryConfigurationsOutput { - ///

    If sent in the request, the marker that is used as a starting point for this inventory - /// configuration list response.

    - pub continuation_token: Option, - ///

    The list of inventory configurations for a bucket.

    - pub inventory_configuration_list: Option, - ///

    Tells whether the returned list of inventory configurations is complete. A value of true - /// indicates that the list is not complete and the NextContinuationToken is provided for a - /// subsequent request.

    - pub is_truncated: Option, - ///

    The marker used to continue this inventory configuration listing. Use the - /// NextContinuationToken from this response to continue the listing in a - /// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    - pub next_continuation_token: Option, +#[must_use] +pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); +self } -impl fmt::Debug for ListBucketInventoryConfigurationsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketInventoryConfigurationsOutput"); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.inventory_configuration_list { - d.field("inventory_configuration_list", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(GetBucketAnalyticsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketMetricsConfigurationsInput { - ///

    The name of the bucket containing the metrics configurations to retrieve.

    - pub bucket: BucketName, - ///

    The marker that is used to continue a metrics configuration listing that has been - /// truncated. Use the NextContinuationToken from a previously truncated list - /// response to continue the listing. The continuation token is an opaque value that Amazon S3 - /// understands.

    - pub continuation_token: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, } -impl fmt::Debug for ListBucketMetricsConfigurationsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketMetricsConfigurationsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } + +/// A builder for [`GetBucketCorsInput`] +#[derive(Default)] +pub struct GetBucketCorsInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl ListBucketMetricsConfigurationsInput { - #[must_use] - pub fn builder() -> builders::ListBucketMetricsConfigurationsInputBuilder { - default() - } +impl GetBucketCorsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketMetricsConfigurationsOutput { - ///

    The marker that is used as a starting point for this metrics configuration list - /// response. This value is present if it was sent in the request.

    - pub continuation_token: Option, - ///

    Indicates whether the returned list of metrics configurations is complete. A value of - /// true indicates that the list is not complete and the NextContinuationToken will be provided - /// for a subsequent request.

    - pub is_truncated: Option, - ///

    The list of metrics configurations for a bucket.

    - pub metrics_configuration_list: Option, - ///

    The marker used to continue a metrics configuration listing that has been truncated. Use - /// the NextContinuationToken from a previously truncated list response to - /// continue the listing. The continuation token is an opaque value that Amazon S3 - /// understands.

    - pub next_continuation_token: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for ListBucketMetricsConfigurationsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketMetricsConfigurationsOutput"); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.metrics_configuration_list { - d.field("metrics_configuration_list", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketsInput { - ///

    Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services - /// Region must be expressed according to the Amazon Web Services Region code, such as us-west-2 - /// for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services - /// Regions, see Regions and Endpoints.

    - /// - ///

    Requests made to a Regional endpoint that is different from the - /// bucket-region parameter are not supported. For example, if you want to - /// limit the response to your buckets in Region us-west-2, the request must be - /// made to an endpoint in Region us-west-2.

    - ///
    - pub bucket_region: Option, - ///

    - /// ContinuationToken indicates to Amazon S3 that the list is being continued on - /// this bucket with a token. ContinuationToken is obfuscated and is not a real - /// key. You can use this ContinuationToken for pagination of the list results.

    - ///

    Length Constraints: Minimum length of 0. Maximum length of 1024.

    - ///

    Required: No.

    - /// - ///

    If you specify the bucket-region, prefix, or continuation-token - /// query parameters without using max-buckets to set the maximum number of buckets returned in the response, - /// Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

    - ///
    - pub continuation_token: Option, - ///

    Maximum number of buckets to be returned in response. When the number is more than the - /// count of buckets that are owned by an Amazon Web Services account, return all the buckets in - /// response.

    - pub max_buckets: Option, - ///

    Limits the response to bucket names that begin with the specified bucket name - /// prefix.

    - pub prefix: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for ListBucketsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketsInput"); - if let Some(ref val) = self.bucket_region { - d.field("bucket_region", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.max_buckets { - d.field("max_buckets", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketCorsInput { +bucket, +expected_bucket_owner, +}) } -impl ListBucketsInput { - #[must_use] - pub fn builder() -> builders::ListBucketsInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketsOutput { - ///

    The list of buckets owned by the requester.

    - pub buckets: Option, - ///

    - /// ContinuationToken is included in the response when there are more buckets - /// that can be listed with pagination. The next ListBuckets request to Amazon S3 can - /// be continued with this ContinuationToken. ContinuationToken is - /// obfuscated and is not a real bucket.

    - pub continuation_token: Option, - ///

    The owner of the buckets listed.

    - pub owner: Option, - ///

    If Prefix was sent with the request, it is included in the response.

    - ///

    All bucket names in the response begin with the specified bucket name prefix.

    - pub prefix: Option, + +/// A builder for [`GetBucketEncryptionInput`] +#[derive(Default)] +pub struct GetBucketEncryptionInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl fmt::Debug for ListBucketsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListBucketsOutput"); - if let Some(ref val) = self.buckets { - d.field("buckets", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - d.finish_non_exhaustive() - } +impl GetBucketEncryptionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListDirectoryBucketsInput { - ///

    - /// ContinuationToken indicates to Amazon S3 that the list is being continued on - /// buckets in this account with a token. ContinuationToken is obfuscated and is - /// not a real bucket name. You can use this ContinuationToken for the pagination - /// of the list results.

    - pub continuation_token: Option, - ///

    Maximum number of buckets to be returned in response. When the number is more than the - /// count of buckets that are owned by an Amazon Web Services account, return all the buckets in - /// response.

    - pub max_directory_buckets: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for ListDirectoryBucketsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListDirectoryBucketsInput"); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.max_directory_buckets { - d.field("max_directory_buckets", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl ListDirectoryBucketsInput { - #[must_use] - pub fn builder() -> builders::ListDirectoryBucketsInputBuilder { - default() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListDirectoryBucketsOutput { - ///

    The list of buckets owned by the requester.

    - pub buckets: Option, - ///

    If ContinuationToken was sent with the request, it is included in the - /// response. You can use the returned ContinuationToken for pagination of the - /// list response.

    - pub continuation_token: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketEncryptionInput { +bucket, +expected_bucket_owner, +}) } -impl fmt::Debug for ListDirectoryBucketsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListDirectoryBucketsOutput"); - if let Some(ref val) = self.buckets { - d.field("buckets", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - d.finish_non_exhaustive() - } } -#[derive(Clone, Default, PartialEq)] -pub struct ListMultipartUploadsInput { - ///

    The name of the bucket to which the multipart upload was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Character you use to group keys.

    - ///

    All keys that contain the same string between the prefix, if specified, and the first - /// occurrence of the delimiter after the prefix are grouped under a single result element, - /// CommonPrefixes. If you don't specify the prefix parameter, then the - /// substring starts at the beginning of the key. The keys that are grouped under - /// CommonPrefixes result element are not returned elsewhere in the - /// response.

    - /// - ///

    - /// Directory buckets - For directory buckets, / is the only supported delimiter.

    - ///
    - pub delimiter: Option, - pub encoding_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Specifies the multipart upload after which listing should begin.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - For - /// general purpose buckets, key-marker is an object key. Together with - /// upload-id-marker, this parameter specifies the multipart upload - /// after which listing should begin.

      - ///

      If upload-id-marker is not specified, only the keys - /// lexicographically greater than the specified key-marker will be - /// included in the list.

      - ///

      If upload-id-marker is specified, any multipart uploads for a key - /// equal to the key-marker might also be included, provided those - /// multipart uploads have upload IDs lexicographically greater than the specified - /// upload-id-marker.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - For - /// directory buckets, key-marker is obfuscated and isn't a real object - /// key. The upload-id-marker parameter isn't supported by - /// directory buckets. To list the additional multipart uploads, you only need to set - /// the value of key-marker to the NextKeyMarker value from - /// the previous response.

      - ///

      In the ListMultipartUploads response, the multipart uploads aren't - /// sorted lexicographically based on the object keys. - /// - ///

      - ///
    • - ///
    - ///
    - pub key_marker: Option, - ///

    Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response - /// body. 1,000 is the maximum number of uploads that can be returned in a response.

    - pub max_uploads: Option, - ///

    Lists in-progress uploads only for those keys that begin with the specified prefix. You - /// can use prefixes to separate a bucket into different grouping of keys. (You can think of - /// using prefix to make groups in the same way that you'd use a folder in a file - /// system.)

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub prefix: Option, - pub request_payer: Option, - ///

    Together with key-marker, specifies the multipart upload after which listing should - /// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. - /// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the - /// list only if they have an upload ID lexicographically greater than the specified - /// upload-id-marker.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub upload_id_marker: Option, + +/// A builder for [`GetBucketIntelligentTieringConfigurationInput`] +#[derive(Default)] +pub struct GetBucketIntelligentTieringConfigurationInputBuilder { +bucket: Option, + +id: Option, + } -impl fmt::Debug for ListMultipartUploadsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListMultipartUploadsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.key_marker { - d.field("key_marker", val); - } - if let Some(ref val) = self.max_uploads { - d.field("max_uploads", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.upload_id_marker { - d.field("upload_id_marker", val); - } - d.finish_non_exhaustive() - } +impl GetBucketIntelligentTieringConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl ListMultipartUploadsInput { - #[must_use] - pub fn builder() -> builders::ListMultipartUploadsInputBuilder { - default() - } +pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListMultipartUploadsOutput { - ///

    The name of the bucket to which the multipart upload was initiated. Does not return the - /// access point ARN or access point alias if used.

    - pub bucket: Option, - ///

    If you specify a delimiter in the request, then the result returns each distinct key - /// prefix containing the delimiter in a CommonPrefixes element. The distinct key - /// prefixes are returned in the Prefix child element.

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub common_prefixes: Option, - ///

    Contains the delimiter you specified in the request. If you don't specify a delimiter in - /// your request, this element is absent from the response.

    - /// - ///

    - /// Directory buckets - For directory buckets, / is the only supported delimiter.

    - ///
    - pub delimiter: Option, - ///

    Encoding type used by Amazon S3 to encode object keys in the response.

    - ///

    If you specify the encoding-type request parameter, Amazon S3 includes this - /// element in the response, and returns encoded key name values in the following response - /// elements:

    - ///

    - /// Delimiter, KeyMarker, Prefix, - /// NextKeyMarker, Key.

    - pub encoding_type: Option, - ///

    Indicates whether the returned list of multipart uploads is truncated. A value of true - /// indicates that the list was truncated. The list can be truncated if the number of multipart - /// uploads exceeds the limit allowed or specified by max uploads.

    - pub is_truncated: Option, - ///

    The key at or after which the listing began.

    - pub key_marker: Option, - ///

    Maximum number of multipart uploads that could have been included in the - /// response.

    - pub max_uploads: Option, - ///

    When a list is truncated, this element specifies the value that should be used for the - /// key-marker request parameter in a subsequent request.

    - pub next_key_marker: Option, - ///

    When a list is truncated, this element specifies the value that should be used for the - /// upload-id-marker request parameter in a subsequent request.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub next_upload_id_marker: Option, - ///

    When a prefix is provided in the request, this field contains the specified prefix. The - /// result contains only keys starting with the specified prefix.

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub prefix: Option, - pub request_charged: Option, - ///

    Together with key-marker, specifies the multipart upload after which listing should - /// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. - /// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the - /// list only if they have an upload ID lexicographically greater than the specified - /// upload-id-marker.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub upload_id_marker: Option, - ///

    Container for elements related to a particular multipart upload. A response can contain - /// zero or more Upload elements.

    - pub uploads: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for ListMultipartUploadsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListMultipartUploadsOutput"); - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.common_prefixes { - d.field("common_prefixes", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.key_marker { - d.field("key_marker", val); - } - if let Some(ref val) = self.max_uploads { - d.field("max_uploads", val); - } - if let Some(ref val) = self.next_key_marker { - d.field("next_key_marker", val); - } - if let Some(ref val) = self.next_upload_id_marker { - d.field("next_upload_id_marker", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.upload_id_marker { - d.field("upload_id_marker", val); - } - if let Some(ref val) = self.uploads { - d.field("uploads", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); +self +} + +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(GetBucketIntelligentTieringConfigurationInput { +bucket, +id, +}) } -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectVersionsInput { - ///

    The bucket name that contains the objects.

    - pub bucket: BucketName, - ///

    A delimiter is a character that you specify to group keys. All keys that contain the - /// same string between the prefix and the first occurrence of the delimiter are - /// grouped under a single result element in CommonPrefixes. These groups are - /// counted as one result against the max-keys limitation. These keys are not - /// returned elsewhere in the response.

    - pub delimiter: Option, - pub encoding_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Specifies the key to start with when listing objects in a bucket.

    - pub key_marker: Option, - ///

    Sets the maximum number of keys returned in the response. By default, the action returns - /// up to 1,000 key names. The response might contain fewer keys but will never contain more. - /// If additional keys satisfy the search criteria, but were not returned because - /// max-keys was exceeded, the response contains - /// true. To return the additional keys, - /// see key-marker and version-id-marker.

    - pub max_keys: Option, - ///

    Specifies the optional fields that you want returned in the response. Fields that you do - /// not specify are not returned.

    - pub optional_object_attributes: Option, - ///

    Use this parameter to select only those keys that begin with the specified prefix. You - /// can use prefixes to separate a bucket into different groupings of keys. (You can think of - /// using prefix to make groups in the same way that you'd use a folder in a file - /// system.) You can use prefix with delimiter to roll up numerous - /// objects into a single result under CommonPrefixes.

    - pub prefix: Option, - pub request_payer: Option, - ///

    Specifies the object version you want to start listing from.

    - pub version_id_marker: Option, } -impl fmt::Debug for ListObjectVersionsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectVersionsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.key_marker { - d.field("key_marker", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.optional_object_attributes { - d.field("optional_object_attributes", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id_marker { - d.field("version_id_marker", val); - } - d.finish_non_exhaustive() - } + +/// A builder for [`GetBucketInventoryConfigurationInput`] +#[derive(Default)] +pub struct GetBucketInventoryConfigurationInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + +id: Option, + } -impl ListObjectVersionsInput { - #[must_use] - pub fn builder() -> builders::ListObjectVersionsInputBuilder { - default() - } +impl GetBucketInventoryConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectVersionsOutput { - ///

    All of the keys rolled up into a common prefix count as a single return when calculating - /// the number of returns.

    - pub common_prefixes: Option, - ///

    Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

    - pub delete_markers: Option, - ///

    The delimiter grouping the included keys. A delimiter is a character that you specify to - /// group keys. All keys that contain the same string between the prefix and the first - /// occurrence of the delimiter are grouped under a single result element in - /// CommonPrefixes. These groups are counted as one result against the - /// max-keys limitation. These keys are not returned elsewhere in the - /// response.

    - pub delimiter: Option, - ///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    - ///

    If you specify the encoding-type request parameter, Amazon S3 includes this - /// element in the response, and returns encoded key name values in the following response - /// elements:

    - ///

    - /// KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

    - pub encoding_type: Option, - ///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search - /// criteria. If your results were truncated, you can make a follow-up paginated request by - /// using the NextKeyMarker and NextVersionIdMarker response - /// parameters as a starting place in another request to return the rest of the results.

    - pub is_truncated: Option, - ///

    Marks the last key returned in a truncated response.

    - pub key_marker: Option, - ///

    Specifies the maximum number of objects to return.

    - pub max_keys: Option, - ///

    The bucket name.

    - pub name: Option, - ///

    When the number of responses exceeds the value of MaxKeys, - /// NextKeyMarker specifies the first key not returned that satisfies the - /// search criteria. Use this value for the key-marker request parameter in a subsequent - /// request.

    - pub next_key_marker: Option, - ///

    When the number of responses exceeds the value of MaxKeys, - /// NextVersionIdMarker specifies the first object version not returned that - /// satisfies the search criteria. Use this value for the version-id-marker - /// request parameter in a subsequent request.

    - pub next_version_id_marker: Option, - ///

    Selects objects that start with the value supplied by this parameter.

    - pub prefix: Option, - pub request_charged: Option, - ///

    Marks the last version of the key returned in a truncated response.

    - pub version_id_marker: Option, - ///

    Container for version information.

    - pub versions: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for ListObjectVersionsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectVersionsOutput"); - if let Some(ref val) = self.common_prefixes { - d.field("common_prefixes", val); - } - if let Some(ref val) = self.delete_markers { - d.field("delete_markers", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.key_marker { - d.field("key_marker", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.next_key_marker { - d.field("next_key_marker", val); - } - if let Some(ref val) = self.next_version_id_marker { - d.field("next_version_id_marker", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.version_id_marker { - d.field("version_id_marker", val); - } - if let Some(ref val) = self.versions { - d.field("versions", val); - } - d.finish_non_exhaustive() - } +pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsInput { - ///

    The name of the bucket containing the objects.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    A delimiter is a character that you use to group keys.

    - pub delimiter: Option, - pub encoding_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this - /// specified key. Marker can be any key in the bucket.

    - pub marker: Option, - ///

    Sets the maximum number of keys returned in the response. By default, the action returns - /// up to 1,000 key names. The response might contain fewer keys but will never contain more. - ///

    - pub max_keys: Option, - ///

    Specifies the optional fields that you want returned in the response. Fields that you do - /// not specify are not returned.

    - pub optional_object_attributes: Option, - ///

    Limits the response to keys that begin with the specified prefix.

    - pub prefix: Option, - ///

    Confirms that the requester knows that she or he will be charged for the list objects - /// request. Bucket owners need not specify this parameter in their requests.

    - pub request_payer: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for ListObjectsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.marker { - d.field("marker", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.optional_object_attributes { - d.field("optional_object_attributes", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl ListObjectsInput { - #[must_use] - pub fn builder() -> builders::ListObjectsInputBuilder { - default() - } +#[must_use] +pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsOutput { - ///

    The bucket name.

    - pub name: Option, - ///

    Keys that begin with the indicated prefix.

    - pub prefix: Option, - ///

    Indicates where in the bucket listing begins. Marker is included in the response if it - /// was sent with the request.

    - pub marker: Option, - ///

    The maximum number of keys returned in the response body.

    - pub max_keys: Option, - ///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search - /// criteria.

    - pub is_truncated: Option, - ///

    Metadata about each object returned.

    - pub contents: Option, - ///

    All of the keys (up to 1,000) rolled up in a common prefix count as a single return when - /// calculating the number of returns.

    - ///

    A response can contain CommonPrefixes only if you specify a - /// delimiter.

    - ///

    - /// CommonPrefixes contains all (if there are any) keys between - /// Prefix and the next occurrence of the string specified by the - /// delimiter.

    - ///

    - /// CommonPrefixes lists keys that act like subdirectories in the directory - /// specified by Prefix.

    - ///

    For example, if the prefix is notes/ and the delimiter is a slash - /// (/), as in notes/summer/july, the common prefix is - /// notes/summer/. All of the keys that roll up into a common prefix count as a - /// single return when calculating the number of returns.

    - pub common_prefixes: Option, - ///

    Causes keys that contain the same string between the prefix and the first occurrence of - /// the delimiter to be rolled up into a single result element in the - /// CommonPrefixes collection. These rolled-up keys are not returned elsewhere - /// in the response. Each rolled-up result counts as only one return against the - /// MaxKeys value.

    - pub delimiter: Option, - ///

    When the response is truncated (the IsTruncated element value in the - /// response is true), you can use the key name in this field as the - /// marker parameter in the subsequent request to get the next set of objects. - /// Amazon S3 lists objects in alphabetical order.

    - /// - ///

    This element is returned only if you have the delimiter request - /// parameter specified. If the response does not include the NextMarker - /// element and it is truncated, you can use the value of the last Key element - /// in the response as the marker parameter in the subsequent request to get - /// the next set of object keys.

    - ///
    - pub next_marker: Option, - ///

    Encoding type used by Amazon S3 to encode the object keys in the response. - /// Responses are encoded only in UTF-8. An object key can contain any Unicode character. - /// However, the XML 1.0 parser can't parse certain characters, such as characters with an - /// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this - /// parameter to request that Amazon S3 encode the keys in the response. For more information about - /// characters to avoid in object key names, see Object key naming - /// guidelines.

    - /// - ///

    When using the URL encoding type, non-ASCII characters that are used in an object's - /// key name will be percent-encoded according to UTF-8 code values. For example, the object - /// test_file(3).png will appear as - /// test_file%283%29.png.

    - ///
    - pub encoding_type: Option, - pub request_charged: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(GetBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) } -impl fmt::Debug for ListObjectsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectsOutput"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.marker { - d.field("marker", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.contents { - d.field("contents", val); - } - if let Some(ref val) = self.common_prefixes { - d.field("common_prefixes", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.next_marker { - d.field("next_marker", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } } -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsV2Input { - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    - /// ContinuationToken indicates to Amazon S3 that the list is being continued on - /// this bucket with a token. ContinuationToken is obfuscated and is not a real - /// key. You can use this ContinuationToken for pagination of the list results. - ///

    - pub continuation_token: Option, - ///

    A delimiter is a character that you use to group keys.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - For directory buckets, / is the only supported delimiter.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - When you query - /// ListObjectsV2 with a delimiter during in-progress multipart - /// uploads, the CommonPrefixes response parameter contains the prefixes - /// that are associated with the in-progress multipart uploads. For more information - /// about multipart uploads, see Multipart Upload Overview in - /// the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - pub delimiter: Option, - ///

    Encoding type used by Amazon S3 to encode the object keys in the response. - /// Responses are encoded only in UTF-8. An object key can contain any Unicode character. - /// However, the XML 1.0 parser can't parse certain characters, such as characters with an - /// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this - /// parameter to request that Amazon S3 encode the keys in the response. For more information about - /// characters to avoid in object key names, see Object key naming - /// guidelines.

    - /// - ///

    When using the URL encoding type, non-ASCII characters that are used in an object's - /// key name will be percent-encoded according to UTF-8 code values. For example, the object - /// test_file(3).png will appear as - /// test_file%283%29.png.

    - ///
    - pub encoding_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The owner field is not present in ListObjectsV2 by default. If you want to - /// return the owner field with each key in the result, then set the FetchOwner - /// field to true.

    - /// - ///

    - /// Directory buckets - For directory buckets, - /// the bucket owner is returned as the object owner for all objects.

    - ///
    - pub fetch_owner: Option, - ///

    Sets the maximum number of keys returned in the response. By default, the action returns - /// up to 1,000 key names. The response might contain fewer keys but will never contain - /// more.

    - pub max_keys: Option, - ///

    Specifies the optional fields that you want returned in the response. Fields that you do - /// not specify are not returned.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub optional_object_attributes: Option, - ///

    Limits the response to keys that begin with the specified prefix.

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub prefix: Option, - ///

    Confirms that the requester knows that she or he will be charged for the list objects - /// request in V2 style. Bucket owners need not specify this parameter in their - /// requests.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub request_payer: Option, - ///

    StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this - /// specified key. StartAfter can be any key in the bucket.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub start_after: Option, -} -impl fmt::Debug for ListObjectsV2Input { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectsV2Input"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.fetch_owner { - d.field("fetch_owner", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.optional_object_attributes { - d.field("optional_object_attributes", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.start_after { - d.field("start_after", val); - } - d.finish_non_exhaustive() - } +/// A builder for [`GetBucketLifecycleConfigurationInput`] +#[derive(Default)] +pub struct GetBucketLifecycleConfigurationInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl ListObjectsV2Input { - #[must_use] - pub fn builder() -> builders::ListObjectsV2InputBuilder { - default() - } +impl GetBucketLifecycleConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsV2Output { - ///

    The bucket name.

    - pub name: Option, - ///

    Keys that begin with the indicated prefix.

    - /// - ///

    - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    - ///
    - pub prefix: Option, - ///

    Sets the maximum number of keys returned in the response. By default, the action returns - /// up to 1,000 key names. The response might contain fewer keys but will never contain - /// more.

    - pub max_keys: Option, - ///

    - /// KeyCount is the number of keys returned with this request. - /// KeyCount will always be less than or equal to the MaxKeys - /// field. For example, if you ask for 50 keys, your result will include 50 keys or - /// fewer.

    - pub key_count: Option, - ///

    If ContinuationToken was sent with the request, it is included in the - /// response. You can use the returned ContinuationToken for pagination of the - /// list response. You can use this ContinuationToken for pagination of the list - /// results.

    - pub continuation_token: Option, - ///

    Set to false if all of the results were returned. Set to true - /// if more keys are available to return. If the number of results exceeds that specified by - /// MaxKeys, all of the results might not be returned.

    - pub is_truncated: Option, - ///

    - /// NextContinuationToken is sent when isTruncated is true, which - /// means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 - /// can be continued with this NextContinuationToken. - /// NextContinuationToken is obfuscated and is not a real key

    - pub next_continuation_token: Option, - ///

    Metadata about each object returned.

    - pub contents: Option, - ///

    All of the keys (up to 1,000) that share the same prefix are grouped together. When - /// counting the total numbers of returns by this API operation, this group of keys is - /// considered as one item.

    - ///

    A response can contain CommonPrefixes only if you specify a - /// delimiter.

    - ///

    - /// CommonPrefixes contains all (if there are any) keys between - /// Prefix and the next occurrence of the string specified by a - /// delimiter.

    - ///

    - /// CommonPrefixes lists keys that act like subdirectories in the directory - /// specified by Prefix.

    - ///

    For example, if the prefix is notes/ and the delimiter is a slash - /// (/) as in notes/summer/july, the common prefix is - /// notes/summer/. All of the keys that roll up into a common prefix count as a - /// single return when calculating the number of returns.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - When you query - /// ListObjectsV2 with a delimiter during in-progress multipart - /// uploads, the CommonPrefixes response parameter contains the prefixes - /// that are associated with the in-progress multipart uploads. For more information - /// about multipart uploads, see Multipart Upload Overview in - /// the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - pub common_prefixes: Option, - ///

    Causes keys that contain the same string between the prefix and the first - /// occurrence of the delimiter to be rolled up into a single result element in the - /// CommonPrefixes collection. These rolled-up keys are not returned elsewhere - /// in the response. Each rolled-up result counts as only one return against the - /// MaxKeys value.

    - /// - ///

    - /// Directory buckets - For directory buckets, / is the only supported delimiter.

    - ///
    - pub delimiter: Option, - ///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    - ///

    If you specify the encoding-type request parameter, Amazon S3 includes this - /// element in the response, and returns encoded key name values in the following response - /// elements:

    - ///

    - /// Delimiter, Prefix, Key, and StartAfter.

    - pub encoding_type: Option, - ///

    If StartAfter was sent with the request, it is included in the response.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub start_after: Option, - pub request_charged: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for ListObjectsV2Output { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListObjectsV2Output"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.max_keys { - d.field("max_keys", val); - } - if let Some(ref val) = self.key_count { - d.field("key_count", val); - } - if let Some(ref val) = self.continuation_token { - d.field("continuation_token", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.next_continuation_token { - d.field("next_continuation_token", val); - } - if let Some(ref val) = self.contents { - d.field("contents", val); - } - if let Some(ref val) = self.common_prefixes { - d.field("common_prefixes", val); - } - if let Some(ref val) = self.delimiter { - d.field("delimiter", val); - } - if let Some(ref val) = self.encoding_type { - d.field("encoding_type", val); - } - if let Some(ref val) = self.start_after { - d.field("start_after", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct ListPartsInput { - ///

    The name of the bucket to which the parts are being uploaded.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, - ///

    Sets the maximum number of parts to return.

    - pub max_parts: Option, - ///

    Specifies the part after which listing should begin. Only parts with higher part numbers - /// will be listed.

    - pub part_number_marker: Option, - pub request_payer: Option, - ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created - /// using a checksum algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. - /// For more information, see - /// Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum - /// algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Upload ID identifying the multipart upload whose parts are being listed.

    - pub upload_id: MultipartUploadId, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for ListPartsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListPartsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.max_parts { - d.field("max_parts", val); - } - if let Some(ref val) = self.part_number_marker { - d.field("part_number_marker", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketLifecycleConfigurationInput { +bucket, +expected_bucket_owner, +}) } -impl ListPartsInput { - #[must_use] - pub fn builder() -> builders::ListPartsInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct ListPartsOutput { - ///

    If the bucket has a lifecycle rule configured with an action to abort incomplete - /// multipart uploads and the prefix in the lifecycle rule matches the object name in the - /// request, then the response includes this header indicating when the initiated multipart - /// upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle - /// Configuration.

    - ///

    The response will also include the x-amz-abort-rule-id header that will - /// provide the ID of the lifecycle configuration rule that defines this action.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub abort_date: Option, - ///

    This header is returned along with the x-amz-abort-date header. It - /// identifies applicable lifecycle configuration rule that defines the action to abort - /// incomplete multipart uploads.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub abort_rule_id: Option, - ///

    The name of the bucket to which the multipart upload was initiated. Does not return the - /// access point ARN or access point alias if used.

    - pub bucket: Option, - ///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, - ///

    The checksum type, which determines how part-level checksums are combined to create an - /// object-level checksum for multipart objects. You can use this header response to verify - /// that the checksum type that is received is the same checksum type that was specified in - /// CreateMultipartUpload request. For more - /// information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Container element that identifies who initiated the multipart upload. If the initiator - /// is an Amazon Web Services account, this element provides the same information as the Owner - /// element. If the initiator is an IAM User, this element provides the user ARN and display - /// name.

    - pub initiator: Option, - ///

    Indicates whether the returned list of parts is truncated. A true value indicates that - /// the list was truncated. A list can be truncated if the number of parts exceeds the limit - /// returned in the MaxParts element.

    - pub is_truncated: Option, - ///

    Object key for which the multipart upload was initiated.

    - pub key: Option, - ///

    Maximum number of parts that were allowed in the response.

    - pub max_parts: Option, - ///

    When a list is truncated, this element specifies the last part in the list, as well as - /// the value to use for the part-number-marker request parameter in a subsequent - /// request.

    - pub next_part_number_marker: Option, - ///

    Container element that identifies the object owner, after the object is created. If - /// multipart upload is initiated by an IAM user, this element provides the parent account ID - /// and display name.

    - /// - ///

    - /// Directory buckets - The bucket owner is - /// returned as the object owner for all the parts.

    - ///
    - pub owner: Option, - ///

    Specifies the part after which listing should begin. Only parts with higher part numbers - /// will be listed.

    - pub part_number_marker: Option, - ///

    Container for elements related to a particular part. A response can contain zero or more - /// Part elements.

    - pub parts: Option, - pub request_charged: Option, - ///

    The class of storage used to store the uploaded object.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, - ///

    Upload ID identifying the multipart upload whose parts are being listed.

    - pub upload_id: Option, + +/// A builder for [`GetBucketLocationInput`] +#[derive(Default)] +pub struct GetBucketLocationInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl fmt::Debug for ListPartsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ListPartsOutput"); - if let Some(ref val) = self.abort_date { - d.field("abort_date", val); - } - if let Some(ref val) = self.abort_rule_id { - d.field("abort_rule_id", val); - } - if let Some(ref val) = self.bucket { - d.field("bucket", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.initiator { - d.field("initiator", val); - } - if let Some(ref val) = self.is_truncated { - d.field("is_truncated", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.max_parts { - d.field("max_parts", val); - } - if let Some(ref val) = self.next_part_number_marker { - d.field("next_part_number_marker", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.part_number_marker { - d.field("part_number_marker", val); - } - if let Some(ref val) = self.parts { - d.field("parts", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.upload_id { - d.field("upload_id", val); - } - d.finish_non_exhaustive() - } +impl GetBucketLocationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -pub type Location = String; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} -///

    Specifies the location where the bucket will be created.

    -///

    For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see -/// Working with directory buckets in the Amazon S3 User Guide.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LocationInfo { - ///

    The name of the location where the bucket will be created.

    - ///

    For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

    - pub name: Option, - ///

    The type of location where the bucket will be created.

    - pub type_: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for LocationInfo { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LocationInfo"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.type_ { - d.field("type_", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -pub type LocationNameAsString = String; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketLocationInput { +bucket, +expected_bucket_owner, +}) +} -pub type LocationPrefix = String; +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct LocationType(Cow<'static, str>); -impl LocationType { - pub const AVAILABILITY_ZONE: &'static str = "AvailabilityZone"; +/// A builder for [`GetBucketLoggingInput`] +#[derive(Default)] +pub struct GetBucketLoggingInputBuilder { +bucket: Option, - pub const LOCAL_ZONE: &'static str = "LocalZone"; +expected_bucket_owner: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +impl GetBucketLoggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for LocationType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl From for Cow<'static, str> { - fn from(s: LocationType) -> Self { - s.0 - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl FromStr for LocationType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -///

    Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys -/// for a bucket. For more information, see PUT Bucket logging in the -/// Amazon S3 API Reference.

    -#[derive(Clone, Default, PartialEq)] -pub struct LoggingEnabled { - ///

    Specifies the bucket where you want Amazon S3 to store server access logs. You can have your - /// logs delivered to any bucket that you own, including the same bucket that is being logged. - /// You can also configure multiple buckets to deliver their logs to the same target bucket. In - /// this case, you should choose a different TargetPrefix for each source bucket - /// so that the delivered log files can be distinguished by key.

    - pub target_bucket: TargetBucket, - ///

    Container for granting information.

    - ///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support - /// target grants. For more information, see Permissions for server access log delivery in the - /// Amazon S3 User Guide.

    - pub target_grants: Option, - ///

    Amazon S3 key format for log objects.

    - pub target_object_key_format: Option, - ///

    A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a - /// single bucket, you can use a prefix to distinguish which log files came from which - /// bucket.

    - pub target_prefix: TargetPrefix, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketLoggingInput { +bucket, +expected_bucket_owner, +}) } -impl fmt::Debug for LoggingEnabled { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("LoggingEnabled"); - d.field("target_bucket", &self.target_bucket); - if let Some(ref val) = self.target_grants { - d.field("target_grants", val); - } - if let Some(ref val) = self.target_object_key_format { - d.field("target_object_key_format", val); - } - d.field("target_prefix", &self.target_prefix); - d.finish_non_exhaustive() - } } -pub type MFA = String; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct MFADelete(Cow<'static, str>); +/// A builder for [`GetBucketMetadataTableConfigurationInput`] +#[derive(Default)] +pub struct GetBucketMetadataTableConfigurationInputBuilder { +bucket: Option, -impl MFADelete { - pub const DISABLED: &'static str = "Disabled"; +expected_bucket_owner: Option, - pub const ENABLED: &'static str = "Enabled"; +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +impl GetBucketMetadataTableConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl From for MFADelete { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: MFADelete) -> Self { - s.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl FromStr for MFADelete { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketMetadataTableConfigurationInput { +bucket, +expected_bucket_owner, +}) } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct MFADeleteStatus(Cow<'static, str>); +} -impl MFADeleteStatus { - pub const DISABLED: &'static str = "Disabled"; - pub const ENABLED: &'static str = "Enabled"; +/// A builder for [`GetBucketMetricsConfigurationInput`] +#[derive(Default)] +pub struct GetBucketMetricsConfigurationInputBuilder { +bucket: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +expected_bucket_owner: Option, + +id: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for MFADeleteStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl GetBucketMetricsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: MFADeleteStatus) -> Self { - s.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl FromStr for MFADeleteStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); +self } -pub type Marker = String; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -pub type MaxAgeSeconds = i32; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -pub type MaxBuckets = i32; +#[must_use] +pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); +self +} -pub type MaxDirectoryBuckets = i32; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(GetBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} -pub type MaxKeys = i32; +} -pub type MaxParts = i32; -pub type MaxUploads = i32; +/// A builder for [`GetBucketNotificationConfigurationInput`] +#[derive(Default)] +pub struct GetBucketNotificationConfigurationInputBuilder { +bucket: Option, -pub type Message = String; +expected_bucket_owner: Option, -pub type Metadata = Map; +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct MetadataDirective(Cow<'static, str>); +impl GetBucketNotificationConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} -impl MetadataDirective { - pub const COPY: &'static str = "COPY"; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub const REPLACE: &'static str = "REPLACE"; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketNotificationConfigurationInput { +bucket, +expected_bucket_owner, +}) } -impl From for MetadataDirective { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } } -impl From for Cow<'static, str> { - fn from(s: MetadataDirective) -> Self { - s.0 - } + +/// A builder for [`GetBucketOwnershipControlsInput`] +#[derive(Default)] +pub struct GetBucketOwnershipControlsInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl FromStr for MetadataDirective { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl GetBucketOwnershipControlsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -///

    A metadata key-value pair to store with an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct MetadataEntry { - ///

    Name of the object.

    - pub name: Option, - ///

    Value of the object.

    - pub value: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for MetadataEntry { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetadataEntry"); - if let Some(ref val) = self.name { - d.field("name", val); - } - if let Some(ref val) = self.value { - d.field("value", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -pub type MetadataKey = String; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} + +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketOwnershipControlsInput { +bucket, +expected_bucket_owner, +}) +} -///

    -/// The metadata table configuration for a general purpose bucket. -///

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct MetadataTableConfiguration { - ///

    - /// The destination information for the metadata table configuration. The destination table bucket - /// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata - /// table name must be unique within the aws_s3_metadata namespace in the destination - /// table bucket. - ///

    - pub s3_tables_destination: S3TablesDestination, } -impl fmt::Debug for MetadataTableConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetadataTableConfiguration"); - d.field("s3_tables_destination", &self.s3_tables_destination); - d.finish_non_exhaustive() - } + +/// A builder for [`GetBucketPolicyInput`] +#[derive(Default)] +pub struct GetBucketPolicyInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl Default for MetadataTableConfiguration { - fn default() -> Self { - Self { - s3_tables_destination: default(), - } - } +impl GetBucketPolicyInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -///

    -/// The metadata table configuration for a general purpose bucket. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, PartialEq)] -pub struct MetadataTableConfigurationResult { - ///

    - /// The destination information for the metadata table configuration. The destination table bucket - /// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata - /// table name must be unique within the aws_s3_metadata namespace in the destination - /// table bucket. - ///

    - pub s3_tables_destination_result: S3TablesDestinationResult, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for MetadataTableConfigurationResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetadataTableConfigurationResult"); - d.field("s3_tables_destination_result", &self.s3_tables_destination_result); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -pub type MetadataTableStatus = String; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -pub type MetadataValue = String; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketPolicyInput { +bucket, +expected_bucket_owner, +}) +} -///

    A container specifying replication metrics-related settings enabling replication -/// metrics and events.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct Metrics { - ///

    A container specifying the time threshold for emitting the - /// s3:Replication:OperationMissedThreshold event.

    - pub event_threshold: Option, - ///

    Specifies whether the replication metrics are enabled.

    - pub status: MetricsStatus, } -impl fmt::Debug for Metrics { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Metrics"); - if let Some(ref val) = self.event_threshold { - d.field("event_threshold", val); - } - d.field("status", &self.status); - d.finish_non_exhaustive() - } + +/// A builder for [`GetBucketPolicyStatusInput`] +#[derive(Default)] +pub struct GetBucketPolicyStatusInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. -/// The operator must have at least two predicates, and an object must match all of the -/// predicates in order for the filter to apply.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct MetricsAndOperator { - ///

    The access point ARN used when evaluating an AND predicate.

    - pub access_point_arn: Option, - ///

    The prefix used when evaluating an AND predicate.

    - pub prefix: Option, - ///

    The list of tags used when evaluating an AND predicate.

    - pub tags: Option, +impl GetBucketPolicyStatusInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for MetricsAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetricsAndOperator"); - if let Some(ref val) = self.access_point_arn { - d.field("access_point_arn", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -///

    Specifies a metrics configuration for the CloudWatch request metrics (specified by the -/// metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics -/// configuration, note that this is a full replacement of the existing metrics configuration. -/// If you don't include the elements you want to keep, they are erased. For more information, -/// see PutBucketMetricsConfiguration.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct MetricsConfiguration { - ///

    Specifies a metrics configuration filter. The metrics configuration will only include - /// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an - /// access point ARN, or a conjunction (MetricsAndOperator).

    - pub filter: Option, - ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and - /// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for MetricsConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MetricsConfiguration"); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -pub type MetricsConfigurationList = List; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketPolicyStatusInput { +bucket, +expected_bucket_owner, +}) +} -///

    Specifies a metrics configuration filter. The metrics configuration only includes -/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an -/// access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

    -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -#[non_exhaustive] -#[serde(rename_all = "PascalCase")] -pub enum MetricsFilter { - ///

    The access point ARN used when evaluating a metrics filter.

    - AccessPointArn(AccessPointArn), - ///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. - /// The operator must have at least two predicates, and an object must match all of the - /// predicates in order for the filter to apply.

    - And(MetricsAndOperator), - ///

    The prefix used when evaluating a metrics filter.

    - Prefix(Prefix), - ///

    The tag used when evaluating a metrics filter.

    - Tag(Tag), } -pub type MetricsId = String; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct MetricsStatus(Cow<'static, str>); +/// A builder for [`GetBucketReplicationInput`] +#[derive(Default)] +pub struct GetBucketReplicationInputBuilder { +bucket: Option, -impl MetricsStatus { - pub const DISABLED: &'static str = "Disabled"; +expected_bucket_owner: Option, - pub const ENABLED: &'static str = "Enabled"; +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +impl GetBucketReplicationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl From for MetricsStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: MetricsStatus) -> Self { - s.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl FromStr for MetricsStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketReplicationInput { +bucket, +expected_bucket_owner, +}) } -pub type Minutes = i32; +} -pub type MissingMeta = i32; -pub type MpuObjectSize = i64; +/// A builder for [`GetBucketRequestPaymentInput`] +#[derive(Default)] +pub struct GetBucketRequestPaymentInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, -///

    Container for the MultipartUpload for the Amazon S3 object.

    -#[derive(Clone, Default, PartialEq)] -pub struct MultipartUpload { - ///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, - ///

    The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Date and time at which the multipart upload was initiated.

    - pub initiated: Option, - ///

    Identifies who initiated the multipart upload.

    - pub initiator: Option, - ///

    Key of the object for which the multipart upload was initiated.

    - pub key: Option, - ///

    Specifies the owner of the object that is part of the multipart upload.

    - /// - ///

    - /// Directory buckets - The bucket owner is - /// returned as the object owner for all the objects.

    - ///
    - pub owner: Option, - ///

    The class of storage used to store the object.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, - ///

    Upload ID that identifies the multipart upload.

    - pub upload_id: Option, } -impl fmt::Debug for MultipartUpload { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("MultipartUpload"); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.initiated { - d.field("initiated", val); - } - if let Some(ref val) = self.initiator { - d.field("initiator", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.upload_id { - d.field("upload_id", val); - } - d.finish_non_exhaustive() - } +impl GetBucketRequestPaymentInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -pub type MultipartUploadId = String; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} -pub type MultipartUploadList = List; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -pub type NextKeyMarker = String; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -pub type NextMarker = String; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketRequestPaymentInput { +bucket, +expected_bucket_owner, +}) +} -pub type NextPartNumberMarker = i32; +} -pub type NextToken = String; -pub type NextUploadIdMarker = String; +/// A builder for [`GetBucketTaggingInput`] +#[derive(Default)] +pub struct GetBucketTaggingInputBuilder { +bucket: Option, -pub type NextVersionIdMarker = String; +expected_bucket_owner: Option, -///

    The specified bucket does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchBucket {} +} -impl fmt::Debug for NoSuchBucket { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoSuchBucket"); - d.finish_non_exhaustive() - } +impl GetBucketTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -///

    The specified key does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchKey {} +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} -impl fmt::Debug for NoSuchKey { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoSuchKey"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -///

    The specified multipart upload does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchUpload {} +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -impl fmt::Debug for NoSuchUpload { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoSuchUpload"); - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketTaggingInput { +bucket, +expected_bucket_owner, +}) } -pub type NonNegativeIntegerType = i32; +} + + +/// A builder for [`GetBucketVersioningInput`] +#[derive(Default)] +pub struct GetBucketVersioningInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, -///

    Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently -/// deletes the noncurrent object versions. You set this lifecycle configuration action on a -/// bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent -/// object versions at a specific period in the object's lifetime.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NoncurrentVersionExpiration { - ///

    Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100 - /// noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent - /// versions beyond the specified number to retain. For more information about noncurrent - /// versions, see Lifecycle configuration - /// elements in the Amazon S3 User Guide.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub newer_noncurrent_versions: Option, - ///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the - /// associated action. The value must be a non-zero positive integer. For information about the - /// noncurrent days calculations, see How - /// Amazon S3 Calculates When an Object Became Noncurrent in the - /// Amazon S3 User Guide.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub noncurrent_days: Option, } -impl fmt::Debug for NoncurrentVersionExpiration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoncurrentVersionExpiration"); - if let Some(ref val) = self.newer_noncurrent_versions { - d.field("newer_noncurrent_versions", val); - } - if let Some(ref val) = self.noncurrent_days { - d.field("noncurrent_days", val); - } - d.finish_non_exhaustive() - } +impl GetBucketVersioningInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -///

    Container for the transition rule that describes when noncurrent objects transition to -/// the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage -/// class. If your bucket is versioning-enabled (or versioning is suspended), you can set this -/// action to request that Amazon S3 transition noncurrent object versions to the -/// STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage -/// class at a specific period in the object's lifetime.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NoncurrentVersionTransition { - ///

    Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before - /// transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will - /// transition any additional noncurrent versions beyond the specified number to retain. For - /// more information about noncurrent versions, see Lifecycle configuration - /// elements in the Amazon S3 User Guide.

    - pub newer_noncurrent_versions: Option, - ///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the - /// associated action. For information about the noncurrent days calculations, see How - /// Amazon S3 Calculates How Long an Object Has Been Noncurrent in the - /// Amazon S3 User Guide.

    - pub noncurrent_days: Option, - ///

    The class of storage used to store the object.

    - pub storage_class: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for NoncurrentVersionTransition { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NoncurrentVersionTransition"); - if let Some(ref val) = self.newer_noncurrent_versions { - d.field("newer_noncurrent_versions", val); - } - if let Some(ref val) = self.noncurrent_days { - d.field("noncurrent_days", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -pub type NoncurrentVersionTransitionList = List; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -///

    The specified content does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NotFound {} +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketVersioningInput { +bucket, +expected_bucket_owner, +}) +} -impl fmt::Debug for NotFound { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NotFound"); - d.finish_non_exhaustive() - } } -///

    A container for specifying the notification configuration of the bucket. If this element -/// is empty, notifications are turned off for the bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NotificationConfiguration { - ///

    Enables delivery of events to Amazon EventBridge.

    - pub event_bridge_configuration: Option, - ///

    Describes the Lambda functions to invoke and the events for which to invoke - /// them.

    - pub lambda_function_configurations: Option, - ///

    The Amazon Simple Queue Service queues to publish messages to and the events for which - /// to publish messages.

    - pub queue_configurations: Option, - ///

    The topic to which notifications are sent and the events for which notifications are - /// generated.

    - pub topic_configurations: Option, + +/// A builder for [`GetBucketWebsiteInput`] +#[derive(Default)] +pub struct GetBucketWebsiteInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + } -impl fmt::Debug for NotificationConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NotificationConfiguration"); - if let Some(ref val) = self.event_bridge_configuration { - d.field("event_bridge_configuration", val); - } - if let Some(ref val) = self.lambda_function_configurations { - d.field("lambda_function_configurations", val); - } - if let Some(ref val) = self.queue_configurations { - d.field("queue_configurations", val); - } - if let Some(ref val) = self.topic_configurations { - d.field("topic_configurations", val); - } - d.finish_non_exhaustive() - } +impl GetBucketWebsiteInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -///

    Specifies object key name filtering rules. For information about key name filtering, see -/// Configuring event -/// notifications using object key name filtering in the -/// Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NotificationConfigurationFilter { - pub key: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for NotificationConfigurationFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("NotificationConfigurationFilter"); - if let Some(ref val) = self.key { - d.field("key", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -///

    An optional unique identifier for configurations in a notification configuration. If you -/// don't provide one, Amazon S3 will assign an ID.

    -pub type NotificationId = String; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -///

    An object consists of data and its descriptive metadata.

    -#[derive(Clone, Default, PartialEq)] -pub struct Object { - ///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, - ///

    The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    The entity tag is a hash of the object. The ETag reflects changes only to the contents - /// of an object, not its metadata. The ETag may or may not be an MD5 digest of the object - /// data. Whether or not it is depends on how the object was created and how it is encrypted as - /// described below:

    - ///
      - ///
    • - ///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the - /// Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that - /// are an MD5 digest of their object data.

      - ///
    • - ///
    • - ///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the - /// Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are - /// not an MD5 digest of their object data.

      - ///
    • - ///
    • - ///

      If an object is created by either the Multipart Upload or Part Copy operation, the - /// ETag is not an MD5 digest, regardless of the method of encryption. If an object is - /// larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a - /// Multipart Upload, and therefore the ETag will not be an MD5 digest.

      - ///
    • - ///
    - /// - ///

    - /// Directory buckets - MD5 is not supported by directory buckets.

    - ///
    - pub e_tag: Option, - ///

    The name that you assign to an object. You use the object key to retrieve the - /// object.

    - pub key: Option, - ///

    Creation date of the object.

    - pub last_modified: Option, - ///

    The owner of the object

    - /// - ///

    - /// Directory buckets - The bucket owner is - /// returned as the object owner.

    - ///
    - pub owner: Option, - ///

    Specifies the restoration status of an object. Objects in certain storage classes must - /// be restored before they can be retrieved. For more information about these storage classes - /// and how to work with archived objects, see Working with archived - /// objects in the Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets. - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub restore_status: Option, - ///

    Size in bytes of the object

    - pub size: Option, - ///

    The class of storage used to store the object.

    - /// - ///

    - /// Directory buckets - - /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    - ///
    - pub storage_class: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetBucketWebsiteInput { +bucket, +expected_bucket_owner, +}) } -impl fmt::Debug for Object { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Object"); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.restore_status { - d.field("restore_status", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } } -///

    This action is not allowed against this storage tier.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectAlreadyInActiveTierError {} -impl fmt::Debug for ObjectAlreadyInActiveTierError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectAlreadyInActiveTierError"); - d.finish_non_exhaustive() - } +/// A builder for [`GetObjectInput`] +#[derive(Default)] +pub struct GetObjectInputBuilder { +bucket: Option, + +checksum_mode: Option, + +expected_bucket_owner: Option, + +if_match: Option, + +if_modified_since: Option, + +if_none_match: Option, + +if_unmodified_since: Option, + +key: Option, + +part_number: Option, + +range: Option, + +request_payer: Option, + +response_cache_control: Option, + +response_content_disposition: Option, + +response_content_encoding: Option, + +response_content_language: Option, + +response_content_type: Option, + +response_expires: Option, + +sse_customer_algorithm: Option, + +sse_customer_key: Option, + +sse_customer_key_md5: Option, + +version_id: Option, + } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectAttributes(Cow<'static, str>); +impl GetObjectInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} -impl ObjectAttributes { - pub const CHECKSUM: &'static str = "Checksum"; +pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { + self.checksum_mode = field; +self +} - pub const ETAG: &'static str = "ETag"; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub const OBJECT_PARTS: &'static str = "ObjectParts"; +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} - pub const OBJECT_SIZE: &'static str = "ObjectSize"; +pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { + self.if_modified_since = field; +self +} - pub const STORAGE_CLASS: &'static str = "StorageClass"; +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.if_unmodified_since = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -impl From for ObjectAttributes { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_part_number(&mut self, field: Option) -> &mut Self { + self.part_number = field; +self } -impl From for Cow<'static, str> { - fn from(s: ObjectAttributes) -> Self { - s.0 - } +pub fn set_range(&mut self, field: Option) -> &mut Self { + self.range = field; +self } -impl FromStr for ObjectAttributes { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -pub type ObjectAttributesList = List; +pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { + self.response_cache_control = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectCannedACL(Cow<'static, str>); +pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { + self.response_content_disposition = field; +self +} -impl ObjectCannedACL { - pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; +pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { + self.response_content_encoding = field; +self +} - pub const AWS_EXEC_READ: &'static str = "aws-exec-read"; +pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { + self.response_content_language = field; +self +} - pub const BUCKET_OWNER_FULL_CONTROL: &'static str = "bucket-owner-full-control"; +pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { + self.response_content_type = field; +self +} - pub const BUCKET_OWNER_READ: &'static str = "bucket-owner-read"; +pub fn set_response_expires(&mut self, field: Option) -> &mut Self { + self.response_expires = field; +self +} - pub const PRIVATE: &'static str = "private"; +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - pub const PUBLIC_READ: &'static str = "public-read"; +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for ObjectCannedACL { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn checksum_mode(mut self, field: Option) -> Self { + self.checksum_mode = field; +self } -impl From for Cow<'static, str> { - fn from(s: ObjectCannedACL) -> Self { - s.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl FromStr for ObjectCannedACL { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self } -///

    Object Identifier is unique value to identify objects.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectIdentifier { - ///

    An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. - /// This header field makes the request method conditional on ETags.

    - /// - ///

    Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

    - ///
    - pub e_tag: Option, - ///

    Key name of the object.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub key: ObjectKey, - ///

    If present, the objects are deleted only if its modification times matches the provided Timestamp. - ///

    - /// - ///

    This functionality is only supported for directory buckets.

    - ///
    - pub last_modified_time: Option, - ///

    If present, the objects are deleted only if its size matches the provided size in bytes.

    - /// - ///

    This functionality is only supported for directory buckets.

    - ///
    - pub size: Option, - ///

    Version ID for the specific version of the object to delete.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, +#[must_use] +pub fn if_modified_since(mut self, field: Option) -> Self { + self.if_modified_since = field; +self } -impl fmt::Debug for ObjectIdentifier { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectIdentifier"); - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.last_modified_time { - d.field("last_modified_time", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self } -pub type ObjectIdentifierList = List; +#[must_use] +pub fn if_unmodified_since(mut self, field: Option) -> Self { + self.if_unmodified_since = field; +self +} -pub type ObjectKey = String; +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} -pub type ObjectList = List; +#[must_use] +pub fn part_number(mut self, field: Option) -> Self { + self.part_number = field; +self +} -///

    The container element for Object Lock configuration parameters.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ObjectLockConfiguration { - ///

    Indicates whether this bucket has an Object Lock configuration enabled. Enable - /// ObjectLockEnabled when you apply ObjectLockConfiguration to a - /// bucket.

    - pub object_lock_enabled: Option, - ///

    Specifies the Object Lock rule for the specified object. Enable the this rule when you - /// apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode - /// and a period. The period can be either Days or Years but you must - /// select one. You cannot specify Days and Years at the same - /// time.

    - pub rule: Option, +#[must_use] +pub fn range(mut self, field: Option) -> Self { + self.range = field; +self } -impl fmt::Debug for ObjectLockConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectLockConfiguration"); - if let Some(ref val) = self.object_lock_enabled { - d.field("object_lock_enabled", val); - } - if let Some(ref val) = self.rule { - d.field("rule", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ObjectLockEnabled(Cow<'static, str>); +#[must_use] +pub fn response_cache_control(mut self, field: Option) -> Self { + self.response_cache_control = field; +self +} -impl ObjectLockEnabled { - pub const ENABLED: &'static str = "Enabled"; +#[must_use] +pub fn response_content_disposition(mut self, field: Option) -> Self { + self.response_content_disposition = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn response_content_encoding(mut self, field: Option) -> Self { + self.response_content_encoding = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn response_content_language(mut self, field: Option) -> Self { + self.response_content_language = field; +self } -impl From for ObjectLockEnabled { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn response_content_type(mut self, field: Option) -> Self { + self.response_content_type = field; +self } -impl From for Cow<'static, str> { - fn from(s: ObjectLockEnabled) -> Self { - s.0 - } +#[must_use] +pub fn response_expires(mut self, field: Option) -> Self { + self.response_expires = field; +self } -impl FromStr for ObjectLockEnabled { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self } -pub type ObjectLockEnabledForBucket = bool; +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} -///

    A legal hold configuration for an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectLockLegalHold { - ///

    Indicates whether the specified object has a legal hold in place.

    - pub status: Option, +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self } -impl fmt::Debug for ObjectLockLegalHold { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectLockLegalHold"); - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectLockLegalHoldStatus(Cow<'static, str>); +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_mode = self.checksum_mode; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match = self.if_match; +let if_modified_since = self.if_modified_since; +let if_none_match = self.if_none_match; +let if_unmodified_since = self.if_unmodified_since; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let part_number = self.part_number; +let range = self.range; +let request_payer = self.request_payer; +let response_cache_control = self.response_cache_control; +let response_content_disposition = self.response_content_disposition; +let response_content_encoding = self.response_content_encoding; +let response_content_language = self.response_content_language; +let response_content_type = self.response_content_type; +let response_expires = self.response_expires; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let version_id = self.version_id; +Ok(GetObjectInput { +bucket, +checksum_mode, +expected_bucket_owner, +if_match, +if_modified_since, +if_none_match, +if_unmodified_since, +key, +part_number, +range, +request_payer, +response_cache_control, +response_content_disposition, +response_content_encoding, +response_content_language, +response_content_type, +response_expires, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} + +} + + +/// A builder for [`GetObjectAclInput`] +#[derive(Default)] +pub struct GetObjectAclInputBuilder { +bucket: Option, -impl ObjectLockLegalHoldStatus { - pub const OFF: &'static str = "OFF"; +expected_bucket_owner: Option, - pub const ON: &'static str = "ON"; +key: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +request_payer: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +version_id: Option, -impl From for ObjectLockLegalHoldStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } } -impl From for Cow<'static, str> { - fn from(s: ObjectLockLegalHoldStatus) -> Self { - s.0 - } +impl GetObjectAclInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl FromStr for ObjectLockLegalHoldStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectLockMode(Cow<'static, str>); - -impl ObjectLockMode { - pub const COMPLIANCE: &'static str = "COMPLIANCE"; +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - pub const GOVERNANCE: &'static str = "GOVERNANCE"; +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for ObjectLockMode { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl From for Cow<'static, str> { - fn from(s: ObjectLockMode) -> Self { - s.0 - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -impl FromStr for ObjectLockMode { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -pub type ObjectLockRetainUntilDate = Timestamp; +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} -///

    A Retention configuration for an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectLockRetention { - ///

    Indicates the Retention mode for the specified object.

    - pub mode: Option, - ///

    The date on which this Object Lock Retention will expire.

    - pub retain_until_date: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(GetObjectAclInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) } -impl fmt::Debug for ObjectLockRetention { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectLockRetention"); - if let Some(ref val) = self.mode { - d.field("mode", val); - } - if let Some(ref val) = self.retain_until_date { - d.field("retain_until_date", val); - } - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ObjectLockRetentionMode(Cow<'static, str>); -impl ObjectLockRetentionMode { - pub const COMPLIANCE: &'static str = "COMPLIANCE"; +/// A builder for [`GetObjectAttributesInput`] +#[derive(Default)] +pub struct GetObjectAttributesInputBuilder { +bucket: Option, - pub const GOVERNANCE: &'static str = "GOVERNANCE"; +expected_bucket_owner: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +key: Option, + +max_parts: Option, + +object_attributes: ObjectAttributesList, + +part_number_marker: Option, + +request_payer: Option, + +sse_customer_algorithm: Option, + +sse_customer_key: Option, + +sse_customer_key_md5: Option, + +version_id: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for ObjectLockRetentionMode { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl GetObjectAttributesInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: ObjectLockRetentionMode) -> Self { - s.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl FromStr for ObjectLockRetentionMode { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -///

    The container element for an Object Lock rule.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ObjectLockRule { - ///

    The default Object Lock retention mode and period that you want to apply to new objects - /// placed in the specified bucket. Bucket settings require both a mode and a period. The - /// period can be either Days or Years but you must select one. You - /// cannot specify Days and Years at the same time.

    - pub default_retention: Option, +pub fn set_max_parts(&mut self, field: Option) -> &mut Self { + self.max_parts = field; +self } -impl fmt::Debug for ObjectLockRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectLockRule"); - if let Some(ref val) = self.default_retention { - d.field("default_retention", val); - } - d.finish_non_exhaustive() - } +pub fn set_object_attributes(&mut self, field: ObjectAttributesList) -> &mut Self { + self.object_attributes = field; +self } -pub type ObjectLockToken = String; +pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { + self.part_number_marker = field; +self +} -///

    The source object of the COPY action is not in the active tier and is only stored in -/// Amazon S3 Glacier.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectNotInActiveTierError {} +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} -impl fmt::Debug for ObjectNotInActiveTierError { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectNotInActiveTierError"); - d.finish_non_exhaustive() - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self } -///

    The container element for object ownership for a bucket's ownership controls.

    -///

    -/// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to -/// the bucket owner if the objects are uploaded with the -/// bucket-owner-full-control canned ACL.

    -///

    -/// ObjectWriter - The uploading account will own the object if the object is -/// uploaded with the bucket-owner-full-control canned ACL.

    -///

    -/// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no -/// longer affect permissions. The bucket owner automatically owns and has full control over -/// every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL -/// or specify bucket owner full control ACLs (such as the predefined -/// bucket-owner-full-control canned ACL or a custom ACL in XML format that -/// grants the same permissions).

    -///

    By default, ObjectOwnership is set to BucketOwnerEnforced and -/// ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where -/// you must control access for each object individually. For more information about S3 Object -/// Ownership, see Controlling ownership of -/// objects and disabling ACLs for your bucket in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectOwnership(Cow<'static, str>); +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} -impl ObjectOwnership { - pub const BUCKET_OWNER_ENFORCED: &'static str = "BucketOwnerEnforced"; +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - pub const BUCKET_OWNER_PREFERRED: &'static str = "BucketOwnerPreferred"; +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - pub const OBJECT_WRITER: &'static str = "ObjectWriter"; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -impl From for ObjectOwnership { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn max_parts(mut self, field: Option) -> Self { + self.max_parts = field; +self } -impl From for Cow<'static, str> { - fn from(s: ObjectOwnership) -> Self { - s.0 - } +#[must_use] +pub fn object_attributes(mut self, field: ObjectAttributesList) -> Self { + self.object_attributes = field; +self } -impl FromStr for ObjectOwnership { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn part_number_marker(mut self, field: Option) -> Self { + self.part_number_marker = field; +self } -///

    A container for elements related to an individual part.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectPart { - ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a - /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present - /// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present - /// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    The part number identifying the part. This value is a positive integer between 1 and - /// 10,000.

    - pub part_number: Option, - ///

    The size of the uploaded part in bytes.

    - pub size: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for ObjectPart { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectPart"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self } -pub type ObjectSize = i64; +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} -pub type ObjectSizeGreaterThanBytes = i64; +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} -pub type ObjectSizeLessThanBytes = i64; +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectStorageClass(Cow<'static, str>); +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let max_parts = self.max_parts; +let object_attributes = self.object_attributes; +let part_number_marker = self.part_number_marker; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let version_id = self.version_id; +Ok(GetObjectAttributesInput { +bucket, +expected_bucket_owner, +key, +max_parts, +object_attributes, +part_number_marker, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} -impl ObjectStorageClass { - pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; +} - pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; - pub const GLACIER: &'static str = "GLACIER"; +/// A builder for [`GetObjectLegalHoldInput`] +#[derive(Default)] +pub struct GetObjectLegalHoldInputBuilder { +bucket: Option, - pub const GLACIER_IR: &'static str = "GLACIER_IR"; +expected_bucket_owner: Option, - pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; +key: Option, - pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; +request_payer: Option, - pub const OUTPOSTS: &'static str = "OUTPOSTS"; +version_id: Option, - pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; +} - pub const SNOW: &'static str = "SNOW"; +impl GetObjectLegalHoldInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - pub const STANDARD: &'static str = "STANDARD"; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - pub const STANDARD_IA: &'static str = "STANDARD_IA"; +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self } -impl From for ObjectStorageClass { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: ObjectStorageClass) -> Self { - s.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl FromStr for ObjectStorageClass { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -///

    The version of an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectVersion { - ///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, - ///

    The checksum type that is used to calculate the object’s - /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    The entity tag is an MD5 hash of that version of the object.

    - pub e_tag: Option, - ///

    Specifies whether the object is (true) or is not (false) the latest version of an - /// object.

    - pub is_latest: Option, - ///

    The object key.

    - pub key: Option, - ///

    Date and time when the object was last modified.

    - pub last_modified: Option, - ///

    Specifies the owner of the object.

    - pub owner: Option, - ///

    Specifies the restoration status of an object. Objects in certain storage classes must - /// be restored before they can be retrieved. For more information about these storage classes - /// and how to work with archived objects, see Working with archived - /// objects in the Amazon S3 User Guide.

    - pub restore_status: Option, - ///

    Size in bytes of the object.

    - pub size: Option, - ///

    The class of storage used to store the object.

    - pub storage_class: Option, - ///

    Version ID of an object.

    - pub version_id: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for ObjectVersion { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ObjectVersion"); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.is_latest { - d.field("is_latest", val); - } - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.owner { - d.field("owner", val); - } - if let Some(ref val) = self.restore_status { - d.field("restore_status", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self } -pub type ObjectVersionId = String; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(GetObjectLegalHoldInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} -pub type ObjectVersionList = List; +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectVersionStorageClass(Cow<'static, str>); -impl ObjectVersionStorageClass { - pub const STANDARD: &'static str = "STANDARD"; +/// A builder for [`GetObjectLockConfigurationInput`] +#[derive(Default)] +pub struct GetObjectLockConfigurationInputBuilder { +bucket: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +expected_bucket_owner: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for ObjectVersionStorageClass { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl GetObjectLockConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} + +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} + +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} + +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} + +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetObjectLockConfigurationInput { +bucket, +expected_bucket_owner, +}) } -impl From for Cow<'static, str> { - fn from(s: ObjectVersionStorageClass) -> Self { - s.0 - } } -impl FromStr for ObjectVersionStorageClass { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct OptionalObjectAttributes(Cow<'static, str>); +/// A builder for [`GetObjectRetentionInput`] +#[derive(Default)] +pub struct GetObjectRetentionInputBuilder { +bucket: Option, + +expected_bucket_owner: Option, + +key: Option, + +request_payer: Option, + +version_id: Option, -impl OptionalObjectAttributes { - pub const RESTORE_STATUS: &'static str = "RestoreStatus"; +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +impl GetObjectRetentionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl From for OptionalObjectAttributes { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: OptionalObjectAttributes) -> Self { - s.0 - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl FromStr for OptionalObjectAttributes { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self } -pub type OptionalObjectAttributesList = List; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -///

    Describes the location where the restore job's output is stored.

    -#[derive(Clone, Default, PartialEq)] -pub struct OutputLocation { - ///

    Describes an S3 location that will receive the results of the restore request.

    - pub s3: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for OutputLocation { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("OutputLocation"); - if let Some(ref val) = self.s3 { - d.field("s3", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -///

    Describes how results of the Select job are serialized.

    -#[derive(Clone, Default, PartialEq)] -pub struct OutputSerialization { - ///

    Describes the serialization of CSV-encoded Select results.

    - pub csv: Option, - ///

    Specifies JSON as request's output serialization format.

    - pub json: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for OutputSerialization { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("OutputSerialization"); - if let Some(ref val) = self.csv { - d.field("csv", val); - } - if let Some(ref val) = self.json { - d.field("json", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self } -///

    Container for the owner's display name and ID.

    -#[derive(Clone, Default, PartialEq)] -pub struct Owner { - ///

    Container for the display name of the owner. This value is only supported in the - /// following Amazon Web Services Regions:

    - ///
      - ///
    • - ///

      US East (N. Virginia)

      - ///
    • - ///
    • - ///

      US West (N. California)

      - ///
    • - ///
    • - ///

      US West (Oregon)

      - ///
    • - ///
    • - ///

      Asia Pacific (Singapore)

      - ///
    • - ///
    • - ///

      Asia Pacific (Sydney)

      - ///
    • - ///
    • - ///

      Asia Pacific (Tokyo)

      - ///
    • - ///
    • - ///

      Europe (Ireland)

      - ///
    • - ///
    • - ///

      South America (São Paulo)

      - ///
    • - ///
    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub display_name: Option, - ///

    Container for the ID of the owner.

    - pub id: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(GetObjectRetentionInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) } -impl fmt::Debug for Owner { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Owner"); - if let Some(ref val) = self.display_name { - d.field("display_name", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct OwnerOverride(Cow<'static, str>); -impl OwnerOverride { - pub const DESTINATION: &'static str = "Destination"; +/// A builder for [`GetObjectTaggingInput`] +#[derive(Default)] +pub struct GetObjectTaggingInputBuilder { +bucket: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +expected_bucket_owner: Option, + +key: Option, + +request_payer: Option, + +version_id: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for OwnerOverride { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl GetObjectTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: OwnerOverride) -> Self { - s.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl FromStr for OwnerOverride { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -///

    The container element for a bucket's ownership controls.

    -#[derive(Clone, Default, PartialEq)] -pub struct OwnershipControls { - ///

    The container element for an ownership control rule.

    - pub rules: OwnershipControlsRules, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl fmt::Debug for OwnershipControls { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("OwnershipControls"); - d.field("rules", &self.rules); - d.finish_non_exhaustive() - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self } -///

    The container element for an ownership control rule.

    -#[derive(Clone, PartialEq)] -pub struct OwnershipControlsRule { - pub object_ownership: ObjectOwnership, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for OwnershipControlsRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("OwnershipControlsRule"); - d.field("object_ownership", &self.object_ownership); - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -pub type OwnershipControlsRules = List; +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} -///

    Container for Parquet.

    -#[derive(Clone, Default, PartialEq)] -pub struct ParquetInput {} +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} -impl fmt::Debug for ParquetInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ParquetInput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self } -///

    Container for elements related to a part.

    -#[derive(Clone, Default, PartialEq)] -pub struct Part { - ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present - /// if the object was uploaded with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present - /// if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present - /// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a - /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present - /// if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present - /// if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Entity tag returned when the part was uploaded.

    - pub e_tag: Option, - ///

    Date and time at which the part was uploaded.

    - pub last_modified: Option, - ///

    Part number identifying the part. This is a positive integer between 1 and - /// 10,000.

    - pub part_number: Option, - ///

    Size in bytes of the uploaded part data.

    - pub size: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(GetObjectTaggingInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) } -impl fmt::Debug for Part { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Part"); - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.part_number { - d.field("part_number", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - d.finish_non_exhaustive() - } } -pub type PartNumber = i32; -pub type PartNumberMarker = i32; +/// A builder for [`GetObjectTorrentInput`] +#[derive(Default)] +pub struct GetObjectTorrentInputBuilder { +bucket: Option, -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct PartitionDateSource(Cow<'static, str>); +expected_bucket_owner: Option, -impl PartitionDateSource { - pub const DELIVERY_TIME: &'static str = "DeliveryTime"; +key: Option, - pub const EVENT_TIME: &'static str = "EventTime"; +request_payer: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +impl GetObjectTorrentInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for PartitionDateSource { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl From for Cow<'static, str> { - fn from(s: PartitionDateSource) -> Self { - s.0 - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -impl FromStr for PartitionDateSource { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -///

    Amazon S3 keys for log objects are partitioned in the following format:

    -///

    -/// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -///

    -///

    PartitionedPrefix defaults to EventTime delivery when server access logs are -/// delivered.

    -#[derive(Clone, Default, PartialEq)] -pub struct PartitionedPrefix { - ///

    Specifies the partition date source for the partitioned prefix. - /// PartitionDateSource can be EventTime or - /// DeliveryTime.

    - ///

    For DeliveryTime, the time in the log file names corresponds to the - /// delivery time for the log files.

    - ///

    For EventTime, The logs delivered are for a specific day only. The year, - /// month, and day correspond to the day on which the event occurred, and the hour, minutes and - /// seconds are set to 00 in the key.

    - pub partition_date_source: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for PartitionedPrefix { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PartitionedPrefix"); - if let Some(ref val) = self.partition_date_source { - d.field("partition_date_source", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -pub type Parts = List; +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} -pub type PartsCount = i32; +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} -pub type PartsList = List; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +Ok(GetObjectTorrentInput { +bucket, +expected_bucket_owner, +key, +request_payer, +}) +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Payer(Cow<'static, str>); +} -impl Payer { - pub const BUCKET_OWNER: &'static str = "BucketOwner"; - pub const REQUESTER: &'static str = "Requester"; +/// A builder for [`GetPublicAccessBlockInput`] +#[derive(Default)] +pub struct GetPublicAccessBlockInputBuilder { +bucket: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +expected_bucket_owner: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for Payer { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl GetPublicAccessBlockInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: Payer) -> Self { - s.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl FromStr for Payer { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Permission(Cow<'static, str>); - -impl Permission { - pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub const READ: &'static str = "READ"; +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(GetPublicAccessBlockInput { +bucket, +expected_bucket_owner, +}) +} - pub const READ_ACP: &'static str = "READ_ACP"; +} - pub const WRITE: &'static str = "WRITE"; - pub const WRITE_ACP: &'static str = "WRITE_ACP"; +/// A builder for [`HeadBucketInput`] +#[derive(Default)] +pub struct HeadBucketInputBuilder { +bucket: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +expected_bucket_owner: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for Permission { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl HeadBucketInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: Permission) -> Self { - s.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl FromStr for Permission { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -pub type Policy = String; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -///

    The container element for a bucket's policy status.

    -#[derive(Clone, Default, PartialEq)] -pub struct PolicyStatus { - ///

    The policy status for this bucket. TRUE indicates that this bucket is - /// public. FALSE indicates that the bucket is not public.

    - pub is_public: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(HeadBucketInput { +bucket, +expected_bucket_owner, +}) } -impl fmt::Debug for PolicyStatus { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PolicyStatus"); - if let Some(ref val) = self.is_public { - d.field("is_public", val); - } - d.finish_non_exhaustive() - } } + +/// A builder for [`HeadObjectInput`] #[derive(Default)] -pub struct PostObjectInput { - ///

    The canned ACL to apply to the object. For more information, see Canned - /// ACL in the Amazon S3 User Guide.

    - ///

    When adding a new object, you can use headers to grant ACL-based permissions to - /// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are - /// then added to the ACL on the object. By default, all objects are private. Only the owner - /// has full access control. For more information, see Access Control List (ACL) Overview - /// and Managing - /// ACLs Using the REST API in the Amazon S3 User Guide.

    - ///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting - /// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that - /// use this setting only accept PUT requests that don't specify an ACL or PUT requests that - /// specify bucket owner full control ACLs, such as the bucket-owner-full-control - /// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that - /// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a - /// 400 error with the error code AccessControlListNotSupported. - /// For more information, see Controlling ownership of - /// objects and disabling ACLs in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub acl: Option, - ///

    Object data.

    - pub body: Option, - ///

    The bucket name to which the PUT action was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    - ///

    - /// General purpose buckets - Setting this header to - /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with - /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 - /// Bucket Key.

    - ///

    - /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - pub bucket_key_enabled: Option, - ///

    Can be used to specify caching behavior along the request/reply chain. For more - /// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    - pub cache_control: Option, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    - ///

    For the x-amz-checksum-algorithm - /// header, replace - /// algorithm - /// with the supported algorithm from the following list:

    - ///
      - ///
    • - ///

      - /// CRC32 - ///

      - ///
    • - ///
    • - ///

      - /// CRC32C - ///

      - ///
    • - ///
    • - ///

      - /// CRC64NVME - ///

      - ///
    • - ///
    • - ///

      - /// SHA1 - ///

      - ///
    • - ///
    • - ///

      - /// SHA256 - ///

      - ///
    • - ///
    - ///

    For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    - /// - ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is - /// required for any request to upload an object with a retention period configured using - /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the - /// Amazon S3 User Guide.

    - ///
    - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - pub checksum_algorithm: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the object. The CRC64NVME checksum is - /// always a full object checksum. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    - pub content_disposition: Option, - ///

    Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    - pub content_encoding: Option, - ///

    The language the content is in.

    - pub content_language: Option, - ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be - /// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    - pub content_length: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to - /// RFC 1864. This header can be used as a message integrity check to verify that the data is - /// the same data that was originally sent. Although it is optional, we recommend using the - /// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST - /// request authentication, see REST Authentication.

    - /// - ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is - /// required for any request to upload an object with a retention period configured using - /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the - /// Amazon S3 User Guide.

    - ///
    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    A standard MIME type describing the format of the contents. For more information, see - /// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    - pub content_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The date and time at which the object is no longer cacheable. For more information, see - /// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    - pub expires: Option, - ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_full_control: Option, - ///

    Allows grantee to read the object data and its metadata.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read: Option, - ///

    Allows grantee to read the object ACL.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read_acp: Option, - ///

    Allows grantee to write the ACL for the applicable object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_write_acp: Option, - ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE - /// operation matches the ETag of the object in S3. If the ETag values do not match, the - /// operation returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    - ///

    Expects the ETag value as a string.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_match: Option, - ///

    Uploads the object only if the object key name does not already exist in the bucket - /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 - /// ConditionalRequestConflict response. On a 409 failure you should retry the - /// upload.

    - ///

    Expects the '*' (asterisk) character.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_none_match: Option, - ///

    Object key for which the PUT action was initiated.

    - pub key: ObjectKey, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    Specifies whether a legal hold will be applied to this object. For more information - /// about S3 Object Lock, see Object Lock in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_legal_hold_status: Option, - ///

    The Object Lock mode that you want to apply to this object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_mode: Option, - ///

    The date and time when you want this object's Object Lock to expire. Must be formatted - /// as a timestamp parameter.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_retain_until_date: Option, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, - /// AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets passed on - /// to Amazon Web Services KMS for future GetObject operations on - /// this object.

    - ///

    - /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    - pub ssekms_encryption_context: Option, - ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same - /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    - ///

    - /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS - /// key to use. If you specify - /// x-amz-server-side-encryption:aws:kms or - /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key - /// (aws/s3) to protect the data.

    - ///

    - /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the - /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses - /// the bucket's default KMS customer managed key ID. If you want to explicitly set the - /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - /// - /// Incorrect key specification results in an HTTP 400 Bad Request error.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 - /// (for example, AES256, aws:kms, aws:kms:dsse).

    - ///
      - ///
    • - ///

      - /// General purpose buckets - You have four mutually - /// exclusive options to protect data using server-side encryption in Amazon S3, depending on - /// how you choose to manage the encryption keys. Specifically, the encryption key - /// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and - /// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by - /// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt - /// data at rest by using server-side encryption with other key options. For more - /// information, see Using Server-Side - /// Encryption in the Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      - ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. - /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. - /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and - /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. - ///

      - /// - ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the - /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. - /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), - /// the encryption request headers must match the default encryption configuration of the directory bucket. - /// - ///

      - ///
      - ///
    • - ///
    - pub server_side_encryption: Option, - ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The - /// STANDARD storage class provides high durability and high availability. Depending on - /// performance needs, you can specify a different Storage Class. For more information, see - /// Storage - /// Classes in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store - /// newly created objects.

      - ///
    • - ///
    • - ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      - ///
    • - ///
    - ///
    - pub storage_class: Option, - ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For - /// example, "Key1=Value1")

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub tagging: Option, - ///

    If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata. For information about object metadata, see Object Key and Metadata in the - /// Amazon S3 User Guide.

    - ///

    In the following example, the request header sets the redirect to an object - /// (anotherPage.html) in the same bucket:

    - ///

    - /// x-amz-website-redirect-location: /anotherPage.html - ///

    - ///

    In the following example, the request header sets the object redirect to another - /// website:

    - ///

    - /// x-amz-website-redirect-location: http://www.example.com/ - ///

    - ///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and - /// How to - /// Configure Website Page Redirects in the Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub website_redirect_location: Option, - ///

    - /// Specifies the offset for appending data to existing objects in bytes. - /// The offset must be equal to the size of the existing object being appended to. - /// If no object exists, setting this header to 0 will create a new object. - ///

    - /// - ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    - ///
    - pub write_offset_bytes: Option, - /// The URL to which the client is redirected upon successful upload. - pub success_action_redirect: Option, - /// The status code returned to the client upon successful upload. Valid values are 200, 201, and 204. - pub success_action_status: Option, - /// The POST policy document that was included in the request. - pub policy: Option, -} +pub struct HeadObjectInputBuilder { +bucket: Option, -impl fmt::Debug for PostObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PostObjectInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - if let Some(ref val) = self.body { - d.field("body", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - if let Some(ref val) = self.write_offset_bytes { - d.field("write_offset_bytes", val); - } - if let Some(ref val) = self.success_action_redirect { - d.field("success_action_redirect", val); - } - if let Some(ref val) = self.success_action_status { - d.field("success_action_status", val); - } - if let Some(ref val) = self.policy { - d.field("policy", val); - } - d.finish_non_exhaustive() - } -} +checksum_mode: Option, -impl PostObjectInput { - #[must_use] - pub fn builder() -> builders::PostObjectInputBuilder { - default() - } -} +expected_bucket_owner: Option, -#[derive(Clone, Default, PartialEq)] -pub struct PostObjectOutput { - ///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header - /// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it - /// was uploaded without a checksum (and Amazon S3 added the default checksum, - /// CRC64NVME, to the uploaded object). For more information about how - /// checksums are calculated with multipart uploads, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    This header specifies the checksum type of the object, which determines how part-level - /// checksums are combined to create an object-level checksum for multipart objects. For - /// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a - /// data integrity check to verify that the checksum type that is received is the same checksum - /// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Entity tag for the uploaded object.

    - ///

    - /// General purpose buckets - To ensure that data is not - /// corrupted traversing the network, for objects where the ETag is the MD5 digest of the - /// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned - /// ETag to the calculated MD5 value.

    - ///

    - /// Directory buckets - The ETag for the object in - /// a directory bucket isn't the MD5 digest of the object.

    - pub e_tag: Option, - ///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, - /// the response includes this header. It includes the expiry-date and - /// rule-id key-value pairs that provide information about object expiration. - /// The value of the rule-id is URL-encoded.

    - /// - ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    - ///
    - pub expiration: Option, - pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets - /// passed on to Amazon Web Services KMS for future GetObject - /// operations on this object.

    - pub ssekms_encryption_context: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, - ///

    - /// The size of the object in bytes. This value is only be present if you append to an object. - ///

    - /// - ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    - ///
    - pub size: Option, - ///

    Version ID of the object.

    - ///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID - /// for the object being stored. Amazon S3 returns this ID in the response. When you enable - /// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object - /// simultaneously, it stores all of the objects. For more information about versioning, see - /// Adding Objects to - /// Versioning-Enabled Buckets in the Amazon S3 User Guide. For - /// information about returning the versioning state of a bucket, see GetBucketVersioning.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, -} +if_match: Option, -impl fmt::Debug for PostObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PostObjectOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } -} +if_modified_since: Option, -pub type Prefix = String; +if_none_match: Option, -pub type Priority = i32; +if_unmodified_since: Option, -///

    This data type contains information about progress of an operation.

    -#[derive(Clone, Default, PartialEq)] -pub struct Progress { - ///

    The current number of uncompressed object bytes processed.

    - pub bytes_processed: Option, - ///

    The current number of bytes of records payload data returned.

    - pub bytes_returned: Option, - ///

    The current number of object bytes scanned.

    - pub bytes_scanned: Option, -} +key: Option, -impl fmt::Debug for Progress { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Progress"); - if let Some(ref val) = self.bytes_processed { - d.field("bytes_processed", val); - } - if let Some(ref val) = self.bytes_returned { - d.field("bytes_returned", val); - } - if let Some(ref val) = self.bytes_scanned { - d.field("bytes_scanned", val); - } - d.finish_non_exhaustive() - } -} +part_number: Option, -///

    This data type contains information about the progress event of an operation.

    -#[derive(Clone, Default, PartialEq)] -pub struct ProgressEvent { - ///

    The Progress event details.

    - pub details: Option, -} +range: Option, -impl fmt::Debug for ProgressEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ProgressEvent"); - if let Some(ref val) = self.details { - d.field("details", val); - } - d.finish_non_exhaustive() - } -} +request_payer: Option, + +response_cache_control: Option, + +response_content_disposition: Option, + +response_content_encoding: Option, + +response_content_language: Option, + +response_content_type: Option, -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Protocol(Cow<'static, str>); +response_expires: Option, -impl Protocol { - pub const HTTP: &'static str = "http"; +sse_customer_algorithm: Option, - pub const HTTPS: &'static str = "https"; +sse_customer_key: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +sse_customer_key_md5: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +version_id: Option, -impl From for Protocol { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } } -impl From for Cow<'static, str> { - fn from(s: Protocol) -> Self { - s.0 - } +impl HeadObjectInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl FromStr for Protocol { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { + self.checksum_mode = field; +self } -///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can -/// enable the configuration options in any combination. For more information about when Amazon S3 -/// considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct PublicAccessBlockConfiguration { - ///

    Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket - /// and objects in this bucket. Setting this element to TRUE causes the following - /// behavior:

    - ///
      - ///
    • - ///

      PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is - /// public.

      - ///
    • - ///
    • - ///

      PUT Object calls fail if the request includes a public ACL.

      - ///
    • - ///
    • - ///

      PUT Bucket calls fail if the request includes a public ACL.

      - ///
    • - ///
    - ///

    Enabling this setting doesn't affect existing policies or ACLs.

    - pub block_public_acls: Option, - ///

    Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this - /// element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the - /// specified bucket policy allows public access.

    - ///

    Enabling this setting doesn't affect existing bucket policies.

    - pub block_public_policy: Option, - ///

    Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this - /// bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on - /// this bucket and objects in this bucket.

    - ///

    Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't - /// prevent new public ACLs from being set.

    - pub ignore_public_acls: Option, - ///

    Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting - /// this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has - /// a public policy.

    - ///

    Enabling this setting doesn't affect previously stored bucket policies, except that - /// public and cross-account access within any public bucket policy, including non-public - /// delegation to specific accounts, is blocked.

    - pub restrict_public_buckets: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for PublicAccessBlockConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PublicAccessBlockConfiguration"); - if let Some(ref val) = self.block_public_acls { - d.field("block_public_acls", val); - } - if let Some(ref val) = self.block_public_policy { - d.field("block_public_policy", val); - } - if let Some(ref val) = self.ignore_public_acls { - d.field("ignore_public_acls", val); - } - if let Some(ref val) = self.restrict_public_buckets { - d.field("restrict_public_buckets", val); - } - d.finish_non_exhaustive() - } +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketAccelerateConfigurationInput { - ///

    Container for setting the transfer acceleration state.

    - pub accelerate_configuration: AccelerateConfiguration, - ///

    The name of the bucket for which the accelerate configuration is set.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { + self.if_modified_since = field; +self } -impl fmt::Debug for PutBucketAccelerateConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAccelerateConfigurationInput"); - d.field("accelerate_configuration", &self.accelerate_configuration); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self } -impl PutBucketAccelerateConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketAccelerateConfigurationInputBuilder { - default() - } +pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.if_unmodified_since = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAccelerateConfigurationOutput {} - -impl fmt::Debug for PutBucketAccelerateConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAccelerateConfigurationOutput"); - d.finish_non_exhaustive() - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAclInput { - ///

    The canned ACL to apply to the bucket.

    - pub acl: Option, - ///

    Contains the elements that set the ACL permissions for an object per grantee.

    - pub access_control_policy: Option, - ///

    The bucket to which to apply the ACL.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, go to RFC - /// 1864. - ///

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the - /// bucket.

    - pub grant_full_control: Option, - ///

    Allows grantee to list the objects in the bucket.

    - pub grant_read: Option, - ///

    Allows grantee to read the bucket ACL.

    - pub grant_read_acp: Option, - ///

    Allows grantee to create new objects in the bucket.

    - ///

    For the bucket and object owners of existing objects, also allows deletions and - /// overwrites of those objects.

    - pub grant_write: Option, - ///

    Allows grantee to write the ACL for the applicable bucket.

    - pub grant_write_acp: Option, +pub fn set_part_number(&mut self, field: Option) -> &mut Self { + self.part_number = field; +self } -impl fmt::Debug for PutBucketAclInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAclInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - if let Some(ref val) = self.access_control_policy { - d.field("access_control_policy", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write { - d.field("grant_write", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - d.finish_non_exhaustive() - } +pub fn set_range(&mut self, field: Option) -> &mut Self { + self.range = field; +self } -impl PutBucketAclInput { - #[must_use] - pub fn builder() -> builders::PutBucketAclInputBuilder { - default() - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAclOutput {} - -impl fmt::Debug for PutBucketAclOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAclOutput"); - d.finish_non_exhaustive() - } +pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { + self.response_cache_control = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketAnalyticsConfigurationInput { - ///

    The configuration and any analyses for the analytics filter.

    - pub analytics_configuration: AnalyticsConfiguration, - ///

    The name of the bucket to which an analytics configuration is stored.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID that identifies the analytics configuration.

    - pub id: AnalyticsId, +pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { + self.response_content_disposition = field; +self } -impl fmt::Debug for PutBucketAnalyticsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAnalyticsConfigurationInput"); - d.field("analytics_configuration", &self.analytics_configuration); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.finish_non_exhaustive() - } +pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { + self.response_content_encoding = field; +self } -impl PutBucketAnalyticsConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketAnalyticsConfigurationInputBuilder { - default() - } +pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { + self.response_content_language = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAnalyticsConfigurationOutput {} - -impl fmt::Debug for PutBucketAnalyticsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketAnalyticsConfigurationOutput"); - d.finish_non_exhaustive() - } +pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { + self.response_content_type = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketCorsInput { - ///

    Specifies the bucket impacted by the corsconfiguration.

    - pub bucket: BucketName, - ///

    Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more - /// information, see Enabling - /// Cross-Origin Resource Sharing in the - /// Amazon S3 User Guide.

    - pub cors_configuration: CORSConfiguration, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, go to RFC - /// 1864. - ///

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +pub fn set_response_expires(&mut self, field: Option) -> &mut Self { + self.response_expires = field; +self } -impl fmt::Debug for PutBucketCorsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketCorsInput"); - d.field("bucket", &self.bucket); - d.field("cors_configuration", &self.cors_configuration); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self } -impl PutBucketCorsInput { - #[must_use] - pub fn builder() -> builders::PutBucketCorsInputBuilder { - default() - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketCorsOutput {} - -impl fmt::Debug for PutBucketCorsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketCorsOutput"); - d.finish_non_exhaustive() - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketEncryptionInput { - ///

    Specifies default encryption for a bucket using server-side encryption with different - /// key options.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - /// - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - ///
    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the server-side encryption - /// configuration.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    - pub expected_bucket_owner: Option, - pub server_side_encryption_configuration: ServerSideEncryptionConfiguration, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self } -impl fmt::Debug for PutBucketEncryptionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketEncryptionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("server_side_encryption_configuration", &self.server_side_encryption_configuration); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl PutBucketEncryptionInput { - #[must_use] - pub fn builder() -> builders::PutBucketEncryptionInputBuilder { - default() - } +#[must_use] +pub fn checksum_mode(mut self, field: Option) -> Self { + self.checksum_mode = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketEncryptionOutput {} - -impl fmt::Debug for PutBucketEncryptionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketEncryptionOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketIntelligentTieringConfigurationInput { - ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, - ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, - ///

    Container for S3 Intelligent-Tiering configuration.

    - pub intelligent_tiering_configuration: IntelligentTieringConfiguration, +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self } -impl fmt::Debug for PutBucketIntelligentTieringConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationInput"); - d.field("bucket", &self.bucket); - d.field("id", &self.id); - d.field("intelligent_tiering_configuration", &self.intelligent_tiering_configuration); - d.finish_non_exhaustive() - } +#[must_use] +pub fn if_modified_since(mut self, field: Option) -> Self { + self.if_modified_since = field; +self } -impl PutBucketIntelligentTieringConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketIntelligentTieringConfigurationInputBuilder { - default() - } +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketIntelligentTieringConfigurationOutput {} +#[must_use] +pub fn if_unmodified_since(mut self, field: Option) -> Self { + self.if_unmodified_since = field; +self +} -impl fmt::Debug for PutBucketIntelligentTieringConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketInventoryConfigurationInput { - ///

    The name of the bucket where the inventory configuration will be stored.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, - ///

    Specifies the inventory configuration.

    - pub inventory_configuration: InventoryConfiguration, +#[must_use] +pub fn part_number(mut self, field: Option) -> Self { + self.part_number = field; +self } -impl fmt::Debug for PutBucketInventoryConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketInventoryConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.field("inventory_configuration", &self.inventory_configuration); - d.finish_non_exhaustive() - } +#[must_use] +pub fn range(mut self, field: Option) -> Self { + self.range = field; +self } -impl PutBucketInventoryConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketInventoryConfigurationInputBuilder { - default() - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketInventoryConfigurationOutput {} +#[must_use] +pub fn response_cache_control(mut self, field: Option) -> Self { + self.response_cache_control = field; +self +} -impl fmt::Debug for PutBucketInventoryConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketInventoryConfigurationOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn response_content_disposition(mut self, field: Option) -> Self { + self.response_content_disposition = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLifecycleConfigurationInput { - ///

    The name of the bucket for which to set the configuration.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - pub expected_bucket_owner: Option, - ///

    Container for lifecycle rules. You can add as many as 1,000 rules.

    - pub lifecycle_configuration: Option, - ///

    Indicates which default minimum object size behavior is applied to the lifecycle - /// configuration.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - ///
      - ///
    • - ///

      - /// all_storage_classes_128K - Objects smaller than 128 KB will not - /// transition to any storage class by default.

      - ///
    • - ///
    • - ///

      - /// varies_by_storage_class - Objects smaller than 128 KB will - /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By - /// default, all other storage classes will prevent transitions smaller than 128 KB. - ///

      - ///
    • - ///
    - ///

    To customize the minimum object size for any transition you can add a filter that - /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in - /// the body of your transition rule. Custom filters always take precedence over the default - /// transition behavior.

    - pub transition_default_minimum_object_size: Option, +#[must_use] +pub fn response_content_encoding(mut self, field: Option) -> Self { + self.response_content_encoding = field; +self } -impl fmt::Debug for PutBucketLifecycleConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketLifecycleConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.lifecycle_configuration { - d.field("lifecycle_configuration", val); - } - if let Some(ref val) = self.transition_default_minimum_object_size { - d.field("transition_default_minimum_object_size", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn response_content_language(mut self, field: Option) -> Self { + self.response_content_language = field; +self } -impl PutBucketLifecycleConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketLifecycleConfigurationInputBuilder { - default() - } +#[must_use] +pub fn response_content_type(mut self, field: Option) -> Self { + self.response_content_type = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLifecycleConfigurationOutput { - ///

    Indicates which default minimum object size behavior is applied to the lifecycle - /// configuration.

    - /// - ///

    This parameter applies to general purpose buckets only. It is not supported for - /// directory bucket lifecycle configurations.

    - ///
    - ///
      - ///
    • - ///

      - /// all_storage_classes_128K - Objects smaller than 128 KB will not - /// transition to any storage class by default.

      - ///
    • - ///
    • - ///

      - /// varies_by_storage_class - Objects smaller than 128 KB will - /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By - /// default, all other storage classes will prevent transitions smaller than 128 KB. - ///

      - ///
    • - ///
    - ///

    To customize the minimum object size for any transition you can add a filter that - /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in - /// the body of your transition rule. Custom filters always take precedence over the default - /// transition behavior.

    - pub transition_default_minimum_object_size: Option, +#[must_use] +pub fn response_expires(mut self, field: Option) -> Self { + self.response_expires = field; +self } -impl fmt::Debug for PutBucketLifecycleConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketLifecycleConfigurationOutput"); - if let Some(ref val) = self.transition_default_minimum_object_size { - d.field("transition_default_minimum_object_size", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketLoggingInput { - ///

    The name of the bucket for which to set the logging parameters.

    - pub bucket: BucketName, - ///

    Container for logging status information.

    - pub bucket_logging_status: BucketLoggingStatus, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash of the PutBucketLogging request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self } -impl fmt::Debug for PutBucketLoggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketLoggingInput"); - d.field("bucket", &self.bucket); - d.field("bucket_logging_status", &self.bucket_logging_status); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self } -impl PutBucketLoggingInput { - #[must_use] - pub fn builder() -> builders::PutBucketLoggingInputBuilder { - default() - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLoggingOutput {} +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_mode = self.checksum_mode; +let expected_bucket_owner = self.expected_bucket_owner; +let if_match = self.if_match; +let if_modified_since = self.if_modified_since; +let if_none_match = self.if_none_match; +let if_unmodified_since = self.if_unmodified_since; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let part_number = self.part_number; +let range = self.range; +let request_payer = self.request_payer; +let response_cache_control = self.response_cache_control; +let response_content_disposition = self.response_content_disposition; +let response_content_encoding = self.response_content_encoding; +let response_content_language = self.response_content_language; +let response_content_type = self.response_content_type; +let response_expires = self.response_expires; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let version_id = self.version_id; +Ok(HeadObjectInput { +bucket, +checksum_mode, +expected_bucket_owner, +if_match, +if_modified_since, +if_none_match, +if_unmodified_since, +key, +part_number, +range, +request_payer, +response_cache_control, +response_content_disposition, +response_content_encoding, +response_content_language, +response_content_type, +response_expires, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} + +} + + +/// A builder for [`ListBucketAnalyticsConfigurationsInput`] +#[derive(Default)] +pub struct ListBucketAnalyticsConfigurationsInputBuilder { +bucket: Option, + +continuation_token: Option, + +expected_bucket_owner: Option, -impl fmt::Debug for PutBucketLoggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketLoggingOutput"); - d.finish_non_exhaustive() - } } -#[derive(Clone, PartialEq)] -pub struct PutBucketMetricsConfigurationInput { - ///

    The name of the bucket for which the metrics configuration is set.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and - /// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, - ///

    Specifies the metrics configuration.

    - pub metrics_configuration: MetricsConfiguration, +impl ListBucketAnalyticsConfigurationsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for PutBucketMetricsConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketMetricsConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("id", &self.id); - d.field("metrics_configuration", &self.metrics_configuration); - d.finish_non_exhaustive() - } +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self } -impl PutBucketMetricsConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketMetricsConfigurationInputBuilder { - default() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketMetricsConfigurationOutput {} +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -impl fmt::Debug for PutBucketMetricsConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketMetricsConfigurationOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketNotificationConfigurationInput { - ///

    The name of the bucket.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub notification_configuration: NotificationConfiguration, - ///

    Skips validation of Amazon SQS, Amazon SNS, and Lambda - /// destinations. True or false value.

    - pub skip_destination_validation: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for PutBucketNotificationConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketNotificationConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("notification_configuration", &self.notification_configuration); - if let Some(ref val) = self.skip_destination_validation { - d.field("skip_destination_validation", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(ListBucketAnalyticsConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) } -impl PutBucketNotificationConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutBucketNotificationConfigurationInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketNotificationConfigurationOutput {} -impl fmt::Debug for PutBucketNotificationConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketNotificationConfigurationOutput"); - d.finish_non_exhaustive() - } -} +/// A builder for [`ListBucketIntelligentTieringConfigurationsInput`] +#[derive(Default)] +pub struct ListBucketIntelligentTieringConfigurationsInputBuilder { +bucket: Option, -#[derive(Clone, PartialEq)] -pub struct PutBucketOwnershipControlsInput { - ///

    The name of the Amazon S3 bucket whose OwnershipControls you want to set.

    - pub bucket: BucketName, - ///

    The MD5 hash of the OwnershipControls request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or - /// ObjectWriter) that you want to apply to this Amazon S3 bucket.

    - pub ownership_controls: OwnershipControls, -} +continuation_token: Option, -impl fmt::Debug for PutBucketOwnershipControlsInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketOwnershipControlsInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("ownership_controls", &self.ownership_controls); - d.finish_non_exhaustive() - } } -impl PutBucketOwnershipControlsInput { - #[must_use] - pub fn builder() -> builders::PutBucketOwnershipControlsInputBuilder { - default() - } +impl ListBucketIntelligentTieringConfigurationsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketOwnershipControlsOutput {} +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self +} -impl fmt::Debug for PutBucketOwnershipControlsOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketOwnershipControlsOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketPolicyInput { - ///

    The name of the bucket.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide - ///

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    - ///

    For the x-amz-checksum-algorithm - /// header, replace - /// algorithm - /// with the supported algorithm from the following list:

    - ///
      - ///
    • - ///

      - /// CRC32 - ///

      - ///
    • - ///
    • - ///

      - /// CRC32C - ///

      - ///
    • - ///
    • - ///

      - /// CRC64NVME - ///

      - ///
    • - ///
    • - ///

      - /// SHA1 - ///

      - ///
    • - ///
    • - ///

      - /// SHA256 - ///

      - ///
    • - ///
    - ///

    For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    - /// - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - ///
    - pub checksum_algorithm: Option, - ///

    Set this parameter to true to confirm that you want to remove your permissions to change - /// this bucket policy in the future.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub confirm_remove_self_bucket_access: Option, - ///

    The MD5 hash of the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - /// - ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code - /// 501 Not Implemented.

    - ///
    - pub expected_bucket_owner: Option, - ///

    The bucket policy as a JSON document.

    - ///

    For directory buckets, the only IAM action supported in the bucket policy is - /// s3express:CreateSession.

    - pub policy: Policy, +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self } -impl fmt::Debug for PutBucketPolicyInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketPolicyInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.confirm_remove_self_bucket_access { - d.field("confirm_remove_self_bucket_access", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("policy", &self.policy); - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +Ok(ListBucketIntelligentTieringConfigurationsInput { +bucket, +continuation_token, +}) } -impl PutBucketPolicyInput { - #[must_use] - pub fn builder() -> builders::PutBucketPolicyInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketPolicyOutput {} -impl fmt::Debug for PutBucketPolicyOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketPolicyOutput"); - d.finish_non_exhaustive() - } +/// A builder for [`ListBucketInventoryConfigurationsInput`] +#[derive(Default)] +pub struct ListBucketInventoryConfigurationsInputBuilder { +bucket: Option, + +continuation_token: Option, + +expected_bucket_owner: Option, + } -#[derive(Clone, PartialEq)] -pub struct PutBucketReplicationInput { - ///

    The name of the bucket

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, see RFC 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub replication_configuration: ReplicationConfiguration, - ///

    A token to allow Object Lock to be enabled for an existing bucket.

    - pub token: Option, +impl ListBucketInventoryConfigurationsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for PutBucketReplicationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketReplicationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("replication_configuration", &self.replication_configuration); - if let Some(ref val) = self.token { - d.field("token", val); - } - d.finish_non_exhaustive() - } +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self } -impl PutBucketReplicationInput { - #[must_use] - pub fn builder() -> builders::PutBucketReplicationInputBuilder { - default() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketReplicationOutput {} +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -impl fmt::Debug for PutBucketReplicationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketReplicationOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketRequestPaymentInput { - ///

    The bucket name.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, see RFC 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Container for Payer.

    - pub request_payment_configuration: RequestPaymentConfiguration, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for PutBucketRequestPaymentInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketRequestPaymentInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("request_payment_configuration", &self.request_payment_configuration); - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(ListBucketInventoryConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) } -impl PutBucketRequestPaymentInput { - #[must_use] - pub fn builder() -> builders::PutBucketRequestPaymentInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketRequestPaymentOutput {} -impl fmt::Debug for PutBucketRequestPaymentOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketRequestPaymentOutput"); - d.finish_non_exhaustive() - } +/// A builder for [`ListBucketMetricsConfigurationsInput`] +#[derive(Default)] +pub struct ListBucketMetricsConfigurationsInputBuilder { +bucket: Option, + +continuation_token: Option, + +expected_bucket_owner: Option, + } -#[derive(Clone, PartialEq)] -pub struct PutBucketTaggingInput { - ///

    The bucket name.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, see RFC 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Container for the TagSet and Tag elements.

    - pub tagging: Tagging, +impl ListBucketMetricsConfigurationsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for PutBucketTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("tagging", &self.tagging); - d.finish_non_exhaustive() - } +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self } -impl PutBucketTaggingInput { - #[must_use] - pub fn builder() -> builders::PutBucketTaggingInputBuilder { - default() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketTaggingOutput {} +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -impl fmt::Debug for PutBucketTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketTaggingOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutBucketVersioningInput { - ///

    The bucket name.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a - /// message integrity check to verify that the request body was not corrupted in transit. For - /// more information, see RFC - /// 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The concatenation of the authentication device's serial number, a space, and the value - /// that is displayed on your authentication device.

    - pub mfa: Option, - ///

    Container for setting the versioning state.

    - pub versioning_configuration: VersioningConfiguration, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for PutBucketVersioningInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketVersioningInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.mfa { - d.field("mfa", val); - } - d.field("versioning_configuration", &self.versioning_configuration); - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(ListBucketMetricsConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) } -impl PutBucketVersioningInput { - #[must_use] - pub fn builder() -> builders::PutBucketVersioningInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketVersioningOutput {} -impl fmt::Debug for PutBucketVersioningOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketVersioningOutput"); - d.finish_non_exhaustive() - } +/// A builder for [`ListBucketsInput`] +#[derive(Default)] +pub struct ListBucketsInputBuilder { +bucket_region: Option, + +continuation_token: Option, + +max_buckets: Option, + +prefix: Option, + } -#[derive(Clone, PartialEq)] -pub struct PutBucketWebsiteInput { - ///

    The bucket name.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, see RFC 1864.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Container for the request.

    - pub website_configuration: WebsiteConfiguration, +impl ListBucketsInputBuilder { +pub fn set_bucket_region(&mut self, field: Option) -> &mut Self { + self.bucket_region = field; +self } -impl fmt::Debug for PutBucketWebsiteInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketWebsiteInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("website_configuration", &self.website_configuration); - d.finish_non_exhaustive() - } +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self } -impl PutBucketWebsiteInput { - #[must_use] - pub fn builder() -> builders::PutBucketWebsiteInputBuilder { - default() - } +pub fn set_max_buckets(&mut self, field: Option) -> &mut Self { + self.max_buckets = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketWebsiteOutput {} +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self +} -impl fmt::Debug for PutBucketWebsiteOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutBucketWebsiteOutput"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket_region(mut self, field: Option) -> Self { + self.bucket_region = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectAclInput { - ///

    The canned ACL to apply to the object. For more information, see Canned - /// ACL.

    - pub acl: Option, - ///

    Contains the elements that set the ACL permissions for an object per grantee.

    - pub access_control_policy: Option, - ///

    The bucket name that contains the object to which you want to attach the ACL.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message - /// integrity check to verify that the request body was not corrupted in transit. For more - /// information, go to RFC - /// 1864.> - ///

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the - /// bucket.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_full_control: Option, - ///

    Allows grantee to list the objects in the bucket.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_read: Option, - ///

    Allows grantee to read the bucket ACL.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_read_acp: Option, - ///

    Allows grantee to create new objects in the bucket.

    - ///

    For the bucket and object owners of existing objects, also allows deletions and - /// overwrites of those objects.

    - pub grant_write: Option, - ///

    Allows grantee to write the ACL for the applicable bucket.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_write_acp: Option, - ///

    Key for which the PUT action was initiated.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    Version ID used to reference a specific version of the object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self } -impl fmt::Debug for PutObjectAclInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectAclInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - if let Some(ref val) = self.access_control_policy { - d.field("access_control_policy", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write { - d.field("grant_write", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn max_buckets(mut self, field: Option) -> Self { + self.max_buckets = field; +self } -impl PutObjectAclInput { - #[must_use] - pub fn builder() -> builders::PutObjectAclInputBuilder { - default() - } +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectAclOutput { - pub request_charged: Option, +pub fn build(self) -> Result { +let bucket_region = self.bucket_region; +let continuation_token = self.continuation_token; +let max_buckets = self.max_buckets; +let prefix = self.prefix; +Ok(ListBucketsInput { +bucket_region, +continuation_token, +max_buckets, +prefix, +}) } -impl fmt::Debug for PutObjectAclOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectAclOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } } + +/// A builder for [`ListDirectoryBucketsInput`] #[derive(Default)] -pub struct PutObjectInput { - ///

    The canned ACL to apply to the object. For more information, see Canned - /// ACL in the Amazon S3 User Guide.

    - ///

    When adding a new object, you can use headers to grant ACL-based permissions to - /// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are - /// then added to the ACL on the object. By default, all objects are private. Only the owner - /// has full access control. For more information, see Access Control List (ACL) Overview - /// and Managing - /// ACLs Using the REST API in the Amazon S3 User Guide.

    - ///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting - /// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that - /// use this setting only accept PUT requests that don't specify an ACL or PUT requests that - /// specify bucket owner full control ACLs, such as the bucket-owner-full-control - /// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that - /// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a - /// 400 error with the error code AccessControlListNotSupported. - /// For more information, see Controlling ownership of - /// objects and disabling ACLs in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub acl: Option, - ///

    Object data.

    - pub body: Option, - ///

    The bucket name to which the PUT action was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with - /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    - ///

    - /// General purpose buckets - Setting this header to - /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with - /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 - /// Bucket Key.

    - ///

    - /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - pub bucket_key_enabled: Option, - ///

    Can be used to specify caching behavior along the request/reply chain. For more - /// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    - pub cache_control: Option, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm - /// or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    - ///

    For the x-amz-checksum-algorithm - /// header, replace - /// algorithm - /// with the supported algorithm from the following list:

    - ///
      - ///
    • - ///

      - /// CRC32 - ///

      - ///
    • - ///
    • - ///

      - /// CRC32C - ///

      - ///
    • - ///
    • - ///

      - /// CRC64NVME - ///

      - ///
    • - ///
    • - ///

      - /// SHA1 - ///

      - ///
    • - ///
    • - ///

      - /// SHA256 - ///

      - ///
    • - ///
    - ///

    For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If the individual checksum value you provide through x-amz-checksum-algorithm - /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    - /// - ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is - /// required for any request to upload an object with a retention period configured using - /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the - /// Amazon S3 User Guide.

    - ///
    - ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - pub checksum_algorithm: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the object. The CRC64NVME checksum is - /// always a full object checksum. For more information, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    - pub content_disposition: Option, - ///

    Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    - pub content_encoding: Option, - ///

    The language the content is in.

    - pub content_language: Option, - ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be - /// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    - pub content_length: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to - /// RFC 1864. This header can be used as a message integrity check to verify that the data is - /// the same data that was originally sent. Although it is optional, we recommend using the - /// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST - /// request authentication, see REST Authentication.

    - /// - ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is - /// required for any request to upload an object with a retention period configured using - /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the - /// Amazon S3 User Guide.

    - ///
    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    A standard MIME type describing the format of the contents. For more information, see - /// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    - pub content_type: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The date and time at which the object is no longer cacheable. For more information, see - /// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    - pub expires: Option, - ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_full_control: Option, - ///

    Allows grantee to read the object data and its metadata.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read: Option, - ///

    Allows grantee to read the object ACL.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_read_acp: Option, - ///

    Allows grantee to write the ACL for the applicable object.

    - /// - ///
      - ///
    • - ///

      This functionality is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      This functionality is not supported for Amazon S3 on Outposts.

      - ///
    • - ///
    - ///
    - pub grant_write_acp: Option, - ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE - /// operation matches the ETag of the object in S3. If the ETag values do not match, the - /// operation returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    - ///

    Expects the ETag value as a string.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_match: Option, - ///

    Uploads the object only if the object key name does not already exist in the bucket - /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    - ///

    If a conflicting operation occurs during the upload S3 returns a 409 - /// ConditionalRequestConflict response. On a 409 failure you should retry the - /// upload.

    - ///

    Expects the '*' (asterisk) character.

    - ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_none_match: Option, - ///

    Object key for which the PUT action was initiated.

    - pub key: ObjectKey, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    Specifies whether a legal hold will be applied to this object. For more information - /// about S3 Object Lock, see Object Lock in the - /// Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_legal_hold_status: Option, - ///

    The Object Lock mode that you want to apply to this object.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_mode: Option, - ///

    The date and time when you want this object's Object Lock to expire. Must be formatted - /// as a timestamp parameter.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub object_lock_retain_until_date: Option, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, - /// AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets passed on - /// to Amazon Web Services KMS for future GetObject operations on - /// this object.

    - ///

    - /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    - pub ssekms_encryption_context: Option, - ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same - /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    - ///

    - /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS - /// key to use. If you specify - /// x-amz-server-side-encryption:aws:kms or - /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key - /// (aws/s3) to protect the data.

    - ///

    - /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the - /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses - /// the bucket's default KMS customer managed key ID. If you want to explicitly set the - /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - /// - /// Incorrect key specification results in an HTTP 400 Bad Request error.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 - /// (for example, AES256, aws:kms, aws:kms:dsse).

    - ///
      - ///
    • - ///

      - /// General purpose buckets - You have four mutually - /// exclusive options to protect data using server-side encryption in Amazon S3, depending on - /// how you choose to manage the encryption keys. Specifically, the encryption key - /// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and - /// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by - /// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt - /// data at rest by using server-side encryption with other key options. For more - /// information, see Using Server-Side - /// Encryption in the Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      - ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. - /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. - /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and - /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. - ///

      - /// - ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the - /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. - /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), - /// the encryption request headers must match the default encryption configuration of the directory bucket. - /// - ///

      - ///
      - ///
    • - ///
    - pub server_side_encryption: Option, - ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The - /// STANDARD storage class provides high durability and high availability. Depending on - /// performance needs, you can specify a different Storage Class. For more information, see - /// Storage - /// Classes in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store - /// newly created objects.

      - ///
    • - ///
    • - ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      - ///
    • - ///
    - ///
    - pub storage_class: Option, - ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For - /// example, "Key1=Value1")

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub tagging: Option, - ///

    If the bucket is configured as a website, redirects requests for this object to another - /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in - /// the object metadata. For information about object metadata, see Object Key and Metadata in the - /// Amazon S3 User Guide.

    - ///

    In the following example, the request header sets the redirect to an object - /// (anotherPage.html) in the same bucket:

    - ///

    - /// x-amz-website-redirect-location: /anotherPage.html - ///

    - ///

    In the following example, the request header sets the object redirect to another - /// website:

    - ///

    - /// x-amz-website-redirect-location: http://www.example.com/ - ///

    - ///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and - /// How to - /// Configure Website Page Redirects in the Amazon S3 User Guide.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub website_redirect_location: Option, - ///

    - /// Specifies the offset for appending data to existing objects in bytes. - /// The offset must be equal to the size of the existing object being appended to. - /// If no object exists, setting this header to 0 will create a new object. - ///

    - /// - ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    - ///
    - pub write_offset_bytes: Option, +pub struct ListDirectoryBucketsInputBuilder { +continuation_token: Option, + +max_directory_buckets: Option, + } -impl fmt::Debug for PutObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectInput"); - if let Some(ref val) = self.acl { - d.field("acl", val); - } - if let Some(ref val) = self.body { - d.field("body", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.grant_full_control { - d.field("grant_full_control", val); - } - if let Some(ref val) = self.grant_read { - d.field("grant_read", val); - } - if let Some(ref val) = self.grant_read_acp { - d.field("grant_read_acp", val); - } - if let Some(ref val) = self.grant_write_acp { - d.field("grant_write_acp", val); - } - if let Some(ref val) = self.if_match { - d.field("if_match", val); - } - if let Some(ref val) = self.if_none_match { - d.field("if_none_match", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.website_redirect_location { - d.field("website_redirect_location", val); - } - if let Some(ref val) = self.write_offset_bytes { - d.field("write_offset_bytes", val); - } - d.finish_non_exhaustive() - } +impl ListDirectoryBucketsInputBuilder { +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self } -impl PutObjectInput { - #[must_use] - pub fn builder() -> builders::PutObjectInputBuilder { - default() - } +pub fn set_max_directory_buckets(&mut self, field: Option) -> &mut Self { + self.max_directory_buckets = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLegalHoldInput { - ///

    The bucket name containing the object that you want to place a legal hold on.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash for the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The key name for the object that you want to place a legal hold on.

    - pub key: ObjectKey, - ///

    Container element for the legal hold configuration you want to apply to the specified - /// object.

    - pub legal_hold: Option, - pub request_payer: Option, - ///

    The version ID of the object that you want to place a legal hold on.

    - pub version_id: Option, +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self } -impl fmt::Debug for PutObjectLegalHoldInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectLegalHoldInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.legal_hold { - d.field("legal_hold", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn max_directory_buckets(mut self, field: Option) -> Self { + self.max_directory_buckets = field; +self } -impl PutObjectLegalHoldInput { - #[must_use] - pub fn builder() -> builders::PutObjectLegalHoldInputBuilder { - default() - } +pub fn build(self) -> Result { +let continuation_token = self.continuation_token; +let max_directory_buckets = self.max_directory_buckets; +Ok(ListDirectoryBucketsInput { +continuation_token, +max_directory_buckets, +}) } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLegalHoldOutput { - pub request_charged: Option, } -impl fmt::Debug for PutObjectLegalHoldOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectLegalHoldOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } + +/// A builder for [`ListMultipartUploadsInput`] +#[derive(Default)] +pub struct ListMultipartUploadsInputBuilder { +bucket: Option, + +delimiter: Option, + +encoding_type: Option, + +expected_bucket_owner: Option, + +key_marker: Option, + +max_uploads: Option, + +prefix: Option, + +request_payer: Option, + +upload_id_marker: Option, + } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLockConfigurationInput { - ///

    The bucket whose Object Lock configuration you want to create or replace.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash for the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The Object Lock configuration that you want to apply to the specified bucket.

    - pub object_lock_configuration: Option, - pub request_payer: Option, - ///

    A token to allow Object Lock to be enabled for an existing bucket.

    - pub token: Option, +impl ListMultipartUploadsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for PutObjectLockConfigurationInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectLockConfigurationInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.object_lock_configuration { - d.field("object_lock_configuration", val); - } - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.token { - d.field("token", val); - } - d.finish_non_exhaustive() - } +pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; +self } -impl PutObjectLockConfigurationInput { - #[must_use] - pub fn builder() -> builders::PutObjectLockConfigurationInputBuilder { - default() - } +pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLockConfigurationOutput { - pub request_charged: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for PutObjectLockConfigurationOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectLockConfigurationOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +pub fn set_key_marker(&mut self, field: Option) -> &mut Self { + self.key_marker = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectOutput { - ///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header - /// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it - /// was uploaded without a checksum (and Amazon S3 added the default checksum, - /// CRC64NVME, to the uploaded object). For more information about how - /// checksums are calculated with multipart uploads, see Checking object integrity - /// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    This header specifies the checksum type of the object, which determines how part-level - /// checksums are combined to create an object-level checksum for multipart objects. For - /// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a - /// data integrity check to verify that the checksum type that is received is the same checksum - /// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, - ///

    Entity tag for the uploaded object.

    - ///

    - /// General purpose buckets - To ensure that data is not - /// corrupted traversing the network, for objects where the ETag is the MD5 digest of the - /// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned - /// ETag to the calculated MD5 value.

    - ///

    - /// Directory buckets - The ETag for the object in - /// a directory bucket isn't the MD5 digest of the object.

    - pub e_tag: Option, - ///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, - /// the response includes this header. It includes the expiry-date and - /// rule-id key-value pairs that provide information about object expiration. - /// The value of the rule-id is URL-encoded.

    - /// - ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    - ///
    - pub expiration: Option, - pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of - /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. - /// This value is stored as object metadata and automatically gets - /// passed on to Amazon Web Services KMS for future GetObject - /// operations on this object.

    - pub ssekms_encryption_context: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, - ///

    - /// The size of the object in bytes. This value is only be present if you append to an object. - ///

    - /// - ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    - ///
    - pub size: Option, - ///

    Version ID of the object.

    - ///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID - /// for the object being stored. Amazon S3 returns this ID in the response. When you enable - /// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object - /// simultaneously, it stores all of the objects. For more information about versioning, see - /// Adding Objects to - /// Versioning-Enabled Buckets in the Amazon S3 User Guide. For - /// information about returning the versioning state of a bucket, see GetBucketVersioning.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub version_id: Option, +pub fn set_max_uploads(&mut self, field: Option) -> &mut Self { + self.max_uploads = field; +self } -impl fmt::Debug for PutObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.checksum_type { - d.field("checksum_type", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_encryption_context { - d.field("ssekms_encryption_context", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.size { - d.field("size", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectRetentionInput { - ///

    The bucket name that contains the object you want to apply this Object Retention - /// configuration to.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates whether this action should bypass Governance-mode restrictions.

    - pub bypass_governance_retention: Option, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash for the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The key name for the object that you want to apply this Object Retention configuration - /// to.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    The container element for the Object Retention configuration.

    - pub retention: Option, - ///

    The version ID for the object that you want to apply this Object Retention configuration - /// to.

    - pub version_id: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl fmt::Debug for PutObjectRetentionInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectRetentionInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.bypass_governance_retention { - d.field("bypass_governance_retention", val); - } - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.retention { - d.field("retention", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +pub fn set_upload_id_marker(&mut self, field: Option) -> &mut Self { + self.upload_id_marker = field; +self } -impl PutObjectRetentionInput { - #[must_use] - pub fn builder() -> builders::PutObjectRetentionInputBuilder { - default() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectRetentionOutput { - pub request_charged: Option, +#[must_use] +pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; +self } -impl fmt::Debug for PutObjectRetentionOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectRetentionOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutObjectTaggingInput { - ///

    The bucket name containing the object.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash for the request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Name of the object key.

    - pub key: ObjectKey, - pub request_payer: Option, - ///

    Container for the TagSet and Tag elements

    - pub tagging: Tagging, - ///

    The versionId of the object that the tag-set will be added to.

    - pub version_id: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for PutObjectTaggingInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectTaggingInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - d.field("tagging", &self.tagging); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn key_marker(mut self, field: Option) -> Self { + self.key_marker = field; +self } -impl PutObjectTaggingInput { - #[must_use] - pub fn builder() -> builders::PutObjectTaggingInputBuilder { - default() - } +#[must_use] +pub fn max_uploads(mut self, field: Option) -> Self { + self.max_uploads = field; +self } -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectTaggingOutput { - ///

    The versionId of the object the tag-set was added to.

    - pub version_id: Option, +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self } -impl fmt::Debug for PutObjectTaggingOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutObjectTaggingOutput"); - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -#[derive(Clone, PartialEq)] -pub struct PutPublicAccessBlockInput { - ///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want - /// to set.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The MD5 hash of the PutPublicAccessBlock request body.

    - ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 - /// bucket. You can enable the configuration options in any combination. For more information - /// about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    - pub public_access_block_configuration: PublicAccessBlockConfiguration, +#[must_use] +pub fn upload_id_marker(mut self, field: Option) -> Self { + self.upload_id_marker = field; +self } -impl fmt::Debug for PutPublicAccessBlockInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutPublicAccessBlockInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("public_access_block_configuration", &self.public_access_block_configuration); - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let delimiter = self.delimiter; +let encoding_type = self.encoding_type; +let expected_bucket_owner = self.expected_bucket_owner; +let key_marker = self.key_marker; +let max_uploads = self.max_uploads; +let prefix = self.prefix; +let request_payer = self.request_payer; +let upload_id_marker = self.upload_id_marker; +Ok(ListMultipartUploadsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +key_marker, +max_uploads, +prefix, +request_payer, +upload_id_marker, +}) } -impl PutPublicAccessBlockInput { - #[must_use] - pub fn builder() -> builders::PutPublicAccessBlockInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct PutPublicAccessBlockOutput {} -impl fmt::Debug for PutPublicAccessBlockOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("PutPublicAccessBlockOutput"); - d.finish_non_exhaustive() - } +/// A builder for [`ListObjectVersionsInput`] +#[derive(Default)] +pub struct ListObjectVersionsInputBuilder { +bucket: Option, + +delimiter: Option, + +encoding_type: Option, + +expected_bucket_owner: Option, + +key_marker: Option, + +max_keys: Option, + +optional_object_attributes: Option, + +prefix: Option, + +request_payer: Option, + +version_id_marker: Option, + } -pub type QueueArn = String; +impl ListObjectVersionsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} -///

    Specifies the configuration for publishing messages to an Amazon Simple Queue Service -/// (Amazon SQS) queue when Amazon S3 detects specified events.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct QueueConfiguration { - ///

    A collection of bucket events for which to send notifications

    - pub events: EventList, - pub filter: Option, - pub id: Option, - ///

    The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message - /// when it detects events of the specified type.

    - pub queue_arn: QueueArn, +pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; +self } -impl fmt::Debug for QueueConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("QueueConfiguration"); - d.field("events", &self.events); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.field("queue_arn", &self.queue_arn); - d.finish_non_exhaustive() - } +pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; +self } -pub type QueueConfigurationList = List; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} -pub type Quiet = bool; +pub fn set_key_marker(&mut self, field: Option) -> &mut Self { + self.key_marker = field; +self +} -pub type QuoteCharacter = String; +pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; +self +} -pub type QuoteEscapeCharacter = String; +pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct QuoteFields(Cow<'static, str>); +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self +} -impl QuoteFields { - pub const ALWAYS: &'static str = "ALWAYS"; +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - pub const ASNEEDED: &'static str = "ASNEEDED"; +pub fn set_version_id_marker(&mut self, field: Option) -> &mut Self { + self.version_id_marker = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; +self } -impl From for QuoteFields { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; +self } -impl From for Cow<'static, str> { - fn from(s: QuoteFields) -> Self { - s.0 - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl FromStr for QuoteFields { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn key_marker(mut self, field: Option) -> Self { + self.key_marker = field; +self } -pub type RecordDelimiter = String; +#[must_use] +pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; +self +} -///

    The container for the records event.

    -#[derive(Clone, Default, PartialEq)] -pub struct RecordsEvent { - ///

    The byte array of partial, one or more result records. S3 Select doesn't guarantee that - /// a record will be self-contained in one record frame. To ensure continuous streaming of - /// data, S3 Select might split the same record across multiple record frames instead of - /// aggregating the results in memory. Some S3 clients (for example, the SDK for Java) handle this behavior by creating a ByteStream out of the response by - /// default. Other clients might not handle this behavior by default. In those cases, you must - /// aggregate the results on the client side and parse the response.

    - pub payload: Option, +#[must_use] +pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; +self } -impl fmt::Debug for RecordsEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RecordsEvent"); - if let Some(ref val) = self.payload { - d.field("payload", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self } -///

    Specifies how requests are redirected. In the event of an error, you can specify a -/// different error code to return.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Redirect { - ///

    The host name to use in the redirect request.

    - pub host_name: Option, - ///

    The HTTP redirect code to use on the response. Not required if one of the siblings is - /// present.

    - pub http_redirect_code: Option, - ///

    Protocol to use when redirecting requests. The default is the protocol that is used in - /// the original request.

    - pub protocol: Option, - ///

    The object key prefix to use in the redirect request. For example, to redirect requests - /// for all pages with prefix docs/ (objects in the docs/ folder) to - /// documents/, you can set a condition block with KeyPrefixEquals - /// set to docs/ and in the Redirect set ReplaceKeyPrefixWith to - /// /documents. Not required if one of the siblings is present. Can be present - /// only if ReplaceKeyWith is not provided.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub replace_key_prefix_with: Option, - ///

    The specific object key to use in the redirect request. For example, redirect request to - /// error.html. Not required if one of the siblings is present. Can be present - /// only if ReplaceKeyPrefixWith is not provided.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub replace_key_with: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for Redirect { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Redirect"); - if let Some(ref val) = self.host_name { - d.field("host_name", val); - } - if let Some(ref val) = self.http_redirect_code { - d.field("http_redirect_code", val); - } - if let Some(ref val) = self.protocol { - d.field("protocol", val); - } - if let Some(ref val) = self.replace_key_prefix_with { - d.field("replace_key_prefix_with", val); - } - if let Some(ref val) = self.replace_key_with { - d.field("replace_key_with", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn version_id_marker(mut self, field: Option) -> Self { + self.version_id_marker = field; +self } -///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 -/// bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct RedirectAllRequestsTo { - ///

    Name of the host where requests are redirected.

    - pub host_name: HostName, - ///

    Protocol to use when redirecting requests. The default is the protocol that is used in - /// the original request.

    - pub protocol: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let delimiter = self.delimiter; +let encoding_type = self.encoding_type; +let expected_bucket_owner = self.expected_bucket_owner; +let key_marker = self.key_marker; +let max_keys = self.max_keys; +let optional_object_attributes = self.optional_object_attributes; +let prefix = self.prefix; +let request_payer = self.request_payer; +let version_id_marker = self.version_id_marker; +Ok(ListObjectVersionsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +key_marker, +max_keys, +optional_object_attributes, +prefix, +request_payer, +version_id_marker, +}) } -impl fmt::Debug for RedirectAllRequestsTo { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RedirectAllRequestsTo"); - d.field("host_name", &self.host_name); - if let Some(ref val) = self.protocol { - d.field("protocol", val); - } - d.finish_non_exhaustive() - } } -pub type Region = String; -pub type ReplaceKeyPrefixWith = String; +/// A builder for [`ListObjectsInput`] +#[derive(Default)] +pub struct ListObjectsInputBuilder { +bucket: Option, -pub type ReplaceKeyWith = String; +delimiter: Option, -pub type ReplicaKmsKeyID = String; +encoding_type: Option, -///

    A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't -/// replicate replica modifications by default. In the latest version of replication -/// configuration (when Filter is specified), you can specify this element and set -/// the status to Enabled to replicate modifications on replicas.

    -/// -///

    If you don't specify the Filter element, Amazon S3 assumes that the -/// replication configuration is the earlier version, V1. In the earlier version, this -/// element is not allowed.

    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicaModifications { - ///

    Specifies whether Amazon S3 replicates modifications on replicas.

    - pub status: ReplicaModificationsStatus, -} +expected_bucket_owner: Option, -impl fmt::Debug for ReplicaModifications { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicaModifications"); - d.field("status", &self.status); - d.finish_non_exhaustive() - } -} +marker: Option, -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicaModificationsStatus(Cow<'static, str>); +max_keys: Option, -impl ReplicaModificationsStatus { - pub const DISABLED: &'static str = "Disabled"; +optional_object_attributes: Option, - pub const ENABLED: &'static str = "Enabled"; +prefix: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +request_payer: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for ReplicaModificationsStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl ListObjectsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: ReplicaModificationsStatus) -> Self { - s.0 - } +pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; +self } -impl FromStr for ReplicaModificationsStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; +self } -///

    A container for replication rules. You can add up to 1,000 rules. The maximum size of a -/// replication configuration is 2 MB.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationConfiguration { - ///

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when - /// replicating objects. For more information, see How to Set Up Replication - /// in the Amazon S3 User Guide.

    - pub role: Role, - ///

    A container for one or more replication rules. A replication configuration must have at - /// least one rule and can contain a maximum of 1,000 rules.

    - pub rules: ReplicationRules, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for ReplicationConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationConfiguration"); - d.field("role", &self.role); - d.field("rules", &self.rules); - d.finish_non_exhaustive() - } +pub fn set_marker(&mut self, field: Option) -> &mut Self { + self.marker = field; +self } -///

    Specifies which Amazon S3 objects to replicate and where to store the replicas.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRule { - pub delete_marker_replication: Option, - ///

    A container for information about the replication destination and its configurations - /// including enabling the S3 Replication Time Control (S3 RTC).

    - pub destination: Destination, - ///

    Optional configuration to replicate existing source bucket objects.

    - /// - ///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the - /// Amazon S3 User Guide.

    - ///
    - pub existing_object_replication: Option, - pub filter: Option, - ///

    A unique identifier for the rule. The maximum value is 255 characters.

    - pub id: Option, - ///

    An object key name prefix that identifies the object or objects to which the rule - /// applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, - /// specify an empty string.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - ///

    The priority indicates which rule has precedence whenever two or more replication rules - /// conflict. Amazon S3 will attempt to replicate objects according to all replication rules. - /// However, if there are two or more rules with the same destination bucket, then objects will - /// be replicated according to the rule with the highest priority. The higher the number, the - /// higher the priority.

    - ///

    For more information, see Replication in the - /// Amazon S3 User Guide.

    - pub priority: Option, - ///

    A container that describes additional filters for identifying the source objects that - /// you want to replicate. You can choose to enable or disable the replication of these - /// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created - /// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service - /// (SSE-KMS).

    - pub source_selection_criteria: Option, - ///

    Specifies whether the rule is enabled.

    - pub status: ReplicationRuleStatus, +pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; +self } -impl fmt::Debug for ReplicationRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationRule"); - if let Some(ref val) = self.delete_marker_replication { - d.field("delete_marker_replication", val); - } - d.field("destination", &self.destination); - if let Some(ref val) = self.existing_object_replication { - d.field("existing_object_replication", val); - } - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.priority { - d.field("priority", val); - } - if let Some(ref val) = self.source_selection_criteria { - d.field("source_selection_criteria", val); - } - d.field("status", &self.status); - d.finish_non_exhaustive() - } +pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; +self } -///

    A container for specifying rule filters. The filters determine the subset of objects to -/// which the rule applies. This element is required only if you specify more than one filter.

    -///

    For example:

    -///
      -///
    • -///

      If you specify both a Prefix and a Tag filter, wrap -/// these filters in an And tag.

      -///
    • -///
    • -///

      If you specify a filter based on multiple tags, wrap the Tag elements -/// in an And tag.

      -///
    • -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRuleAndOperator { - ///

    An object key name prefix that identifies the subset of objects to which the rule - /// applies.

    - pub prefix: Option, - ///

    An array of tags containing key and value pairs.

    - pub tags: Option, +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self } -impl fmt::Debug for ReplicationRuleAndOperator { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationRuleAndOperator"); - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tags { - d.field("tags", val); - } - d.finish_non_exhaustive() - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -///

    A filter that identifies the subset of objects to which the replication rule applies. A -/// Filter must specify exactly one Prefix, Tag, or -/// an And child element.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRuleFilter { - ///

    A container for specifying rule filters. The filters determine the subset of objects to - /// which the rule applies. This element is required only if you specify more than one filter. - /// For example:

    - ///
      - ///
    • - ///

      If you specify both a Prefix and a Tag filter, wrap - /// these filters in an And tag.

      - ///
    • - ///
    • - ///

      If you specify a filter based on multiple tags, wrap the Tag elements - /// in an And tag.

      - ///
    • - ///
    - pub and: Option, - ///

    An object key name prefix that identifies the subset of objects to which the rule - /// applies.

    - /// - ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using - /// XML requests. For more information, see - /// XML related object key constraints.

    - ///
    - pub prefix: Option, - ///

    A container for specifying a tag key and value.

    - ///

    The rule applies only to objects that have the tag in their tag set.

    - pub tag: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for ReplicationRuleFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationRuleFilter"); - if let Some(ref val) = self.and { - d.field("and", val); - } - if let Some(ref val) = self.prefix { - d.field("prefix", val); - } - if let Some(ref val) = self.tag { - d.field("tag", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicationRuleStatus(Cow<'static, str>); +#[must_use] +pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; +self +} -impl ReplicationRuleStatus { - pub const DISABLED: &'static str = "Disabled"; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - pub const ENABLED: &'static str = "Enabled"; +#[must_use] +pub fn marker(mut self, field: Option) -> Self { + self.marker = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; +self } -impl From for ReplicationRuleStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self } -impl From for Cow<'static, str> { - fn from(s: ReplicationRuleStatus) -> Self { - s.0 - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl FromStr for ReplicationRuleStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let delimiter = self.delimiter; +let encoding_type = self.encoding_type; +let expected_bucket_owner = self.expected_bucket_owner; +let marker = self.marker; +let max_keys = self.max_keys; +let optional_object_attributes = self.optional_object_attributes; +let prefix = self.prefix; +let request_payer = self.request_payer; +Ok(ListObjectsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +marker, +max_keys, +optional_object_attributes, +prefix, +request_payer, +}) } -pub type ReplicationRules = List; +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ReplicationStatus(Cow<'static, str>); -impl ReplicationStatus { - pub const COMPLETE: &'static str = "COMPLETE"; +/// A builder for [`ListObjectsV2Input`] +#[derive(Default)] +pub struct ListObjectsV2InputBuilder { +bucket: Option, - pub const COMPLETED: &'static str = "COMPLETED"; +continuation_token: Option, - pub const FAILED: &'static str = "FAILED"; +delimiter: Option, - pub const PENDING: &'static str = "PENDING"; +encoding_type: Option, - pub const REPLICA: &'static str = "REPLICA"; +expected_bucket_owner: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +fetch_owner: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +max_keys: Option, -impl From for ReplicationStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} +optional_object_attributes: Option, -impl From for Cow<'static, str> { - fn from(s: ReplicationStatus) -> Self { - s.0 - } -} +prefix: Option, -impl FromStr for ReplicationStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } -} +request_payer: Option, -///

    A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is -/// enabled and the time when all objects and operations on objects must be replicated. Must be -/// specified together with a Metrics block.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicationTime { - ///

    Specifies whether the replication time is enabled.

    - pub status: ReplicationTimeStatus, - ///

    A container specifying the time by which replication should be complete for all objects - /// and operations on objects.

    - pub time: ReplicationTimeValue, -} +start_after: Option, -impl fmt::Debug for ReplicationTime { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationTime"); - d.field("status", &self.status); - d.field("time", &self.time); - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicationTimeStatus(Cow<'static, str>); - -impl ReplicationTimeStatus { - pub const DISABLED: &'static str = "Disabled"; - - pub const ENABLED: &'static str = "Enabled"; - - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } - - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +impl ListObjectsV2InputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for ReplicationTimeStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; +self } -impl From for Cow<'static, str> { - fn from(s: ReplicationTimeStatus) -> Self { - s.0 - } +pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; +self } -impl FromStr for ReplicationTimeStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; +self } -///

    A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics -/// EventThreshold.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationTimeValue { - ///

    Contains an integer specifying time in minutes.

    - ///

    Valid value: 15

    - pub minutes: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for ReplicationTimeValue { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ReplicationTimeValue"); - if let Some(ref val) = self.minutes { - d.field("minutes", val); - } - d.finish_non_exhaustive() - } +pub fn set_fetch_owner(&mut self, field: Option) -> &mut Self { + self.fetch_owner = field; +self } -///

    If present, indicates that the requester was successfully charged for the -/// request.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RequestCharged(Cow<'static, str>); - -impl RequestCharged { - pub const REQUESTER: &'static str = "requester"; +pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; +self } -impl From for RequestCharged { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -impl From for Cow<'static, str> { - fn from(s: RequestCharged) -> Self { - s.0 - } +pub fn set_start_after(&mut self, field: Option) -> &mut Self { + self.start_after = field; +self } -impl FromStr for RequestCharged { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -///

    Confirms that the requester knows that they will be charged for the request. Bucket -/// owners need not specify this parameter in their requests. If either the source or -/// destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding -/// charges to copy the object. For information about downloading objects from Requester Pays -/// buckets, see Downloading Objects in -/// Requester Pays Buckets in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RequestPayer(Cow<'static, str>); +#[must_use] +pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; +self +} -impl RequestPayer { - pub const REQUESTER: &'static str = "requester"; +#[must_use] +pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl From for RequestPayer { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn fetch_owner(mut self, field: Option) -> Self { + self.fetch_owner = field; +self } -impl From for Cow<'static, str> { - fn from(s: RequestPayer) -> Self { - s.0 - } +#[must_use] +pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; +self } -impl FromStr for RequestPayer { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; +self } -///

    Container for Payer.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct RequestPaymentConfiguration { - ///

    Specifies who pays for the download and request fees.

    - pub payer: Payer, +#[must_use] +pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; +self } -impl fmt::Debug for RequestPaymentConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RequestPaymentConfiguration"); - d.field("payer", &self.payer); - d.finish_non_exhaustive() - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl Default for RequestPaymentConfiguration { - fn default() -> Self { - Self { - payer: String::new().into(), - } - } +#[must_use] +pub fn start_after(mut self, field: Option) -> Self { + self.start_after = field; +self } -///

    Container for specifying if periodic QueryProgress messages should be -/// sent.

    -#[derive(Clone, Default, PartialEq)] -pub struct RequestProgress { - ///

    Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, - /// FALSE. Default value: FALSE.

    - pub enabled: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let continuation_token = self.continuation_token; +let delimiter = self.delimiter; +let encoding_type = self.encoding_type; +let expected_bucket_owner = self.expected_bucket_owner; +let fetch_owner = self.fetch_owner; +let max_keys = self.max_keys; +let optional_object_attributes = self.optional_object_attributes; +let prefix = self.prefix; +let request_payer = self.request_payer; +let start_after = self.start_after; +Ok(ListObjectsV2Input { +bucket, +continuation_token, +delimiter, +encoding_type, +expected_bucket_owner, +fetch_owner, +max_keys, +optional_object_attributes, +prefix, +request_payer, +start_after, +}) } -impl fmt::Debug for RequestProgress { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RequestProgress"); - if let Some(ref val) = self.enabled { - d.field("enabled", val); - } - d.finish_non_exhaustive() - } } -pub type RequestRoute = String; -pub type RequestToken = String; +/// A builder for [`ListPartsInput`] +#[derive(Default)] +pub struct ListPartsInputBuilder { +bucket: Option, -pub type ResponseCacheControl = String; +expected_bucket_owner: Option, -pub type ResponseContentDisposition = String; +key: Option, -pub type ResponseContentEncoding = String; +max_parts: Option, -pub type ResponseContentLanguage = String; +part_number_marker: Option, -pub type ResponseContentType = String; +request_payer: Option, -pub type ResponseExpires = Timestamp; +sse_customer_algorithm: Option, -pub type Restore = String; +sse_customer_key: Option, -pub type RestoreExpiryDate = Timestamp; +sse_customer_key_md5: Option, -#[derive(Clone, Default, PartialEq)] -pub struct RestoreObjectInput { - ///

    The bucket name containing the object to restore.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Object key for which the action was initiated.

    - pub key: ObjectKey, - pub request_payer: Option, - pub restore_request: Option, - ///

    VersionId used to reference a specific version of the object.

    - pub version_id: Option, -} +upload_id: Option, -impl fmt::Debug for RestoreObjectInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RestoreObjectInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.restore_request { - d.field("restore_request", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } } -impl RestoreObjectInput { - #[must_use] - pub fn builder() -> builders::RestoreObjectInputBuilder { - default() - } +impl ListPartsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct RestoreObjectOutput { - pub request_charged: Option, - ///

    Indicates the path in the provided S3 output location where Select results will be - /// restored to.

    - pub restore_output_path: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for RestoreObjectOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RestoreObjectOutput"); - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.restore_output_path { - d.field("restore_output_path", val); - } - d.finish_non_exhaustive() - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -pub type RestoreOutputPath = String; - -///

    Container for restore job parameters.

    -#[derive(Clone, Default, PartialEq)] -pub struct RestoreRequest { - ///

    Lifetime of the active copy in days. Do not use with restores that specify - /// OutputLocation.

    - ///

    The Days element is required for regular restores, and must not be provided for select - /// requests.

    - pub days: Option, - ///

    The optional description for the job.

    - pub description: Option, - ///

    S3 Glacier related parameters pertaining to this job. Do not use with restores that - /// specify OutputLocation.

    - pub glacier_job_parameters: Option, - ///

    Describes the location where the restore job's output is stored.

    - pub output_location: Option, - /// - ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more - ///

    - ///
    - ///

    Describes the parameters for Select job types.

    - pub select_parameters: Option, - ///

    Retrieval tier at which the restore will be processed.

    - pub tier: Option, - /// - ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more - ///

    - ///
    - ///

    Type of restore request.

    - pub type_: Option, +pub fn set_max_parts(&mut self, field: Option) -> &mut Self { + self.max_parts = field; +self } -impl fmt::Debug for RestoreRequest { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RestoreRequest"); - if let Some(ref val) = self.days { - d.field("days", val); - } - if let Some(ref val) = self.description { - d.field("description", val); - } - if let Some(ref val) = self.glacier_job_parameters { - d.field("glacier_job_parameters", val); - } - if let Some(ref val) = self.output_location { - d.field("output_location", val); - } - if let Some(ref val) = self.select_parameters { - d.field("select_parameters", val); - } - if let Some(ref val) = self.tier { - d.field("tier", val); - } - if let Some(ref val) = self.type_ { - d.field("type_", val); - } - d.finish_non_exhaustive() - } +pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { + self.part_number_marker = field; +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RestoreRequestType(Cow<'static, str>); +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} -impl RestoreRequestType { - pub const SELECT: &'static str = "SELECT"; +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self } -impl From for RestoreRequestType { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: RestoreRequestType) -> Self { - s.0 - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl FromStr for RestoreRequestType { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -///

    Specifies the restoration status of an object. Objects in certain storage classes must -/// be restored before they can be retrieved. For more information about these storage classes -/// and how to work with archived objects, see Working with archived -/// objects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    -#[derive(Clone, Default, PartialEq)] -pub struct RestoreStatus { - ///

    Specifies whether the object is currently being restored. If the object restoration is - /// in progress, the header returns the value TRUE. For example:

    - ///

    - /// x-amz-optional-object-attributes: IsRestoreInProgress="true" - ///

    - ///

    If the object restoration has completed, the header returns the value - /// FALSE. For example:

    - ///

    - /// x-amz-optional-object-attributes: IsRestoreInProgress="false", - /// RestoreExpiryDate="2012-12-21T00:00:00.000Z" - ///

    - ///

    If the object hasn't been restored, there is no header response.

    - pub is_restore_in_progress: Option, - ///

    Indicates when the restored copy will expire. This value is populated only if the object - /// has already been restored. For example:

    - ///

    - /// x-amz-optional-object-attributes: IsRestoreInProgress="false", - /// RestoreExpiryDate="2012-12-21T00:00:00.000Z" - ///

    - pub restore_expiry_date: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -impl fmt::Debug for RestoreStatus { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RestoreStatus"); - if let Some(ref val) = self.is_restore_in_progress { - d.field("is_restore_in_progress", val); - } - if let Some(ref val) = self.restore_expiry_date { - d.field("restore_expiry_date", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn max_parts(mut self, field: Option) -> Self { + self.max_parts = field; +self } -pub type Role = String; +#[must_use] +pub fn part_number_marker(mut self, field: Option) -> Self { + self.part_number_marker = field; +self +} -///

    Specifies the redirect behavior and when a redirect is applied. For more information -/// about routing rules, see Configuring advanced conditional redirects in the -/// Amazon S3 User Guide.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct RoutingRule { - ///

    A container for describing a condition that must be met for the specified redirect to - /// apply. For example, 1. If request is for pages in the /docs folder, redirect - /// to the /documents folder. 2. If request results in HTTP error 4xx, redirect - /// request to another host where you might process the error.

    - pub condition: Option, - ///

    Container for redirect information. You can redirect requests to another host, to - /// another page, or with another protocol. In the event of an error, you can specify a - /// different error code to return.

    - pub redirect: Redirect, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self } -impl fmt::Debug for RoutingRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("RoutingRule"); - if let Some(ref val) = self.condition { - d.field("condition", val); - } - d.field("redirect", &self.redirect); - d.finish_non_exhaustive() - } +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self } -pub type RoutingRules = List; +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} -///

    A container for object key name prefix and suffix filtering rules.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct S3KeyFilter { - pub filter_rules: Option, +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self } -impl fmt::Debug for S3KeyFilter { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("S3KeyFilter"); - if let Some(ref val) = self.filter_rules { - d.field("filter_rules", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self } -///

    Describes an Amazon S3 location that will receive the results of the restore request.

    -#[derive(Clone, Default, PartialEq)] -pub struct S3Location { - ///

    A list of grants that control access to the staged results.

    - pub access_control_list: Option, - ///

    The name of the bucket where the restore results will be placed.

    - pub bucket_name: BucketName, - ///

    The canned ACL to apply to the restore results.

    - pub canned_acl: Option, - pub encryption: Option, - ///

    The prefix that is prepended to the restore results for this request.

    - pub prefix: LocationPrefix, - ///

    The class of storage used to store the restore results.

    - pub storage_class: Option, - ///

    The tag-set that is applied to the restore results.

    - pub tagging: Option, - ///

    A list of metadata to store with the restore results in S3.

    - pub user_metadata: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let max_parts = self.max_parts; +let part_number_marker = self.part_number_marker; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(ListPartsInput { +bucket, +expected_bucket_owner, +key, +max_parts, +part_number_marker, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) } -impl fmt::Debug for S3Location { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("S3Location"); - if let Some(ref val) = self.access_control_list { - d.field("access_control_list", val); - } - d.field("bucket_name", &self.bucket_name); - if let Some(ref val) = self.canned_acl { - d.field("canned_acl", val); - } - if let Some(ref val) = self.encryption { - d.field("encryption", val); - } - d.field("prefix", &self.prefix); - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tagging { - d.field("tagging", val); - } - if let Some(ref val) = self.user_metadata { - d.field("user_metadata", val); - } - d.finish_non_exhaustive() - } } -pub type S3TablesArn = String; -pub type S3TablesBucketArn = String; +/// A builder for [`PostObjectInput`] +#[derive(Default)] +pub struct PostObjectInputBuilder { +acl: Option, -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct S3TablesDestination { - ///

    - /// The Amazon Resource Name (ARN) for the table bucket that's specified as the - /// destination in the metadata table configuration. The destination table bucket - /// must be in the same Region and Amazon Web Services account as the general purpose bucket. - ///

    - pub table_bucket_arn: S3TablesBucketArn, - ///

    - /// The name for the metadata table in your metadata table configuration. The specified metadata - /// table name must be unique within the aws_s3_metadata namespace in the destination - /// table bucket. - ///

    - pub table_name: S3TablesName, -} +body: Option, -impl fmt::Debug for S3TablesDestination { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("S3TablesDestination"); - d.field("table_bucket_arn", &self.table_bucket_arn); - d.field("table_name", &self.table_name); - d.finish_non_exhaustive() - } -} +bucket: Option, -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct S3TablesDestinationResult { - ///

    - /// The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The - /// specified metadata table name must be unique within the aws_s3_metadata namespace - /// in the destination table bucket. - ///

    - pub table_arn: S3TablesArn, - ///

    - /// The Amazon Resource Name (ARN) for the table bucket that's specified as the - /// destination in the metadata table configuration. The destination table bucket - /// must be in the same Region and Amazon Web Services account as the general purpose bucket. - ///

    - pub table_bucket_arn: S3TablesBucketArn, - ///

    - /// The name for the metadata table in your metadata table configuration. The specified metadata - /// table name must be unique within the aws_s3_metadata namespace in the destination - /// table bucket. - ///

    - pub table_name: S3TablesName, - ///

    - /// The table bucket namespace for the metadata table in your metadata table configuration. This value - /// is always aws_s3_metadata. - ///

    - pub table_namespace: S3TablesNamespace, -} +bucket_key_enabled: Option, -impl fmt::Debug for S3TablesDestinationResult { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("S3TablesDestinationResult"); - d.field("table_arn", &self.table_arn); - d.field("table_bucket_arn", &self.table_bucket_arn); - d.field("table_name", &self.table_name); - d.field("table_namespace", &self.table_namespace); - d.finish_non_exhaustive() - } -} +cache_control: Option, -pub type S3TablesName = String; +checksum_algorithm: Option, -pub type S3TablesNamespace = String; +checksum_crc32: Option, -pub type SSECustomerAlgorithm = String; +checksum_crc32c: Option, -pub type SSECustomerKey = String; +checksum_crc64nvme: Option, -pub type SSECustomerKeyMD5 = String; +checksum_sha1: Option, + +checksum_sha256: Option, + +content_disposition: Option, + +content_encoding: Option, + +content_language: Option, + +content_length: Option, + +content_md5: Option, + +content_type: Option, + +expected_bucket_owner: Option, + +expires: Option, + +grant_full_control: Option, + +grant_read: Option, + +grant_read_acp: Option, + +grant_write_acp: Option, + +if_match: Option, + +if_none_match: Option, + +key: Option, + +metadata: Option, + +object_lock_legal_hold_status: Option, + +object_lock_mode: Option, + +object_lock_retain_until_date: Option, + +request_payer: Option, + +sse_customer_algorithm: Option, + +sse_customer_key: Option, + +sse_customer_key_md5: Option, + +ssekms_encryption_context: Option, + +ssekms_key_id: Option, + +server_side_encryption: Option, + +storage_class: Option, + +tagging: Option, + +website_redirect_location: Option, + +write_offset_bytes: Option, + +success_action_redirect: Option, + +success_action_status: Option, + +policy: Option, -///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SSEKMS { - ///

    Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for - /// encrypting inventory reports.

    - pub key_id: SSEKMSKeyId, } -impl fmt::Debug for SSEKMS { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SSEKMS"); - d.field("key_id", &self.key_id); - d.finish_non_exhaustive() - } +impl PostObjectInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self } -pub type SSEKMSEncryptionContext = String; +pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; +self +} -pub type SSEKMSKeyId = String; +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} -///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SSES3 {} +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} -impl fmt::Debug for SSES3 { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SSES3"); - d.finish_non_exhaustive() - } +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self } -///

    Specifies the byte range of the object to get the records from. A record is processed -/// when its first byte is contained by the range. This parameter is optional, but when -/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the -/// start and end of the range.

    -#[derive(Clone, Default, PartialEq)] -pub struct ScanRange { - ///

    Specifies the end of the byte range. This parameter is optional. Valid values: - /// non-negative integers. The default value is one less than the size of the object being - /// queried. If only the End parameter is supplied, it is interpreted to mean scan the last N - /// bytes of the file. For example, - /// 50 means scan the - /// last 50 bytes.

    - pub end: Option, - ///

    Specifies the start of the byte range. This parameter is optional. Valid values: - /// non-negative integers. The default value is 0. If only start is supplied, it - /// means scan from that point to the end of the file. For example, - /// 50 means scan - /// from byte 50 until the end of the file.

    - pub start: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self } -impl fmt::Debug for ScanRange { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ScanRange"); - if let Some(ref val) = self.end { - d.field("end", val); - } - if let Some(ref val) = self.start { - d.field("start", val); - } - d.finish_non_exhaustive() - } +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self } -///

    The container for selecting objects from a content event stream.

    -#[derive(Debug, Clone, PartialEq)] -#[non_exhaustive] -pub enum SelectObjectContentEvent { - ///

    The Continuation Event.

    - Cont(ContinuationEvent), - ///

    The End Event.

    - End(EndEvent), - ///

    The Progress Event.

    - Progress(ProgressEvent), - ///

    The Records Event.

    - Records(RecordsEvent), - ///

    The Stats Event.

    - Stats(StatsEvent), +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self } -/// -///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query -/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a -/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data -/// into records. It returns only records that match the specified SQL expression. You must -/// also specify the data serialization format for the response. For more information, see -/// S3Select API Documentation.

    -#[derive(Clone, PartialEq)] -pub struct SelectObjectContentInput { - ///

    The S3 bucket.

    - pub bucket: BucketName, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The object key.

    - pub key: ObjectKey, - ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created - /// using a checksum algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - pub sse_customer_algorithm: Option, - ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. - /// For more information, see - /// Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - pub sse_customer_key: Option, - ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum - /// algorithm. For more information, - /// see Protecting data using SSE-C keys in the - /// Amazon S3 User Guide.

    - pub sse_customer_key_md5: Option, - pub request: SelectObjectContentRequest, +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self } -impl fmt::Debug for SelectObjectContentInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SelectObjectContentInput"); - d.field("bucket", &self.bucket); - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("request", &self.request); - d.finish_non_exhaustive() - } +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self } -impl SelectObjectContentInput { - #[must_use] - pub fn builder() -> builders::SelectObjectContentInputBuilder { - default() - } +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self } -#[derive(Default)] -pub struct SelectObjectContentOutput { - ///

    The array of results.

    - pub payload: Option, +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self +} + +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self +} + +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self +} + +pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; +self } -impl fmt::Debug for SelectObjectContentOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SelectObjectContentOutput"); - if let Some(ref val) = self.payload { - d.field("payload", val); - } - d.finish_non_exhaustive() - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self } -/// -///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query -/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a -/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data -/// into records. It returns only records that match the specified SQL expression. You must -/// also specify the data serialization format for the response. For more information, see -/// S3Select API Documentation.

    -#[derive(Clone, PartialEq)] -pub struct SelectObjectContentRequest { - ///

    The expression that is used to query the object.

    - pub expression: Expression, - ///

    The type of the provided expression (for example, SQL).

    - pub expression_type: ExpressionType, - ///

    Describes the format of the data in the object that is being queried.

    - pub input_serialization: InputSerialization, - ///

    Describes the format of the data that you want Amazon S3 to return in response.

    - pub output_serialization: OutputSerialization, - ///

    Specifies if periodic request progress information should be enabled.

    - pub request_progress: Option, - ///

    Specifies the byte range of the object to get the records from. A record is processed - /// when its first byte is contained by the range. This parameter is optional, but when - /// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the - /// start and end of the range.

    - ///

    - /// ScanRangemay be used in the following ways:

    - ///
      - ///
    • - ///

      - /// 50100 - /// - process only the records starting between the bytes 50 and 100 (inclusive, counting - /// from zero)

      - ///
    • - ///
    • - ///

      - /// 50 - - /// process only the records starting after the byte 50

      - ///
    • - ///
    • - ///

      - /// 50 - - /// process only the records within the last 50 bytes of the file.

      - ///
    • - ///
    - pub scan_range: Option, +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self } -impl fmt::Debug for SelectObjectContentRequest { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SelectObjectContentRequest"); - d.field("expression", &self.expression); - d.field("expression_type", &self.expression_type); - d.field("input_serialization", &self.input_serialization); - d.field("output_serialization", &self.output_serialization); - if let Some(ref val) = self.request_progress { - d.field("request_progress", val); - } - if let Some(ref val) = self.scan_range { - d.field("scan_range", val); - } - d.finish_non_exhaustive() - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Describes the parameters for Select job types.

    -///

    Learn How to optimize querying your data in Amazon S3 using -/// Amazon Athena, S3 Object Lambda, or client-side filtering.

    -#[derive(Clone, PartialEq)] -pub struct SelectParameters { - /// - ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more - ///

    - ///
    - ///

    The expression that is used to query the object.

    - pub expression: Expression, - ///

    The type of the provided expression (for example, SQL).

    - pub expression_type: ExpressionType, - ///

    Describes the serialization format of the object.

    - pub input_serialization: InputSerialization, - ///

    Describes how the results of the Select job are serialized.

    - pub output_serialization: OutputSerialization, +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self } -impl fmt::Debug for SelectParameters { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SelectParameters"); - d.field("expression", &self.expression); - d.field("expression_type", &self.expression_type); - d.field("input_serialization", &self.input_serialization); - d.field("output_serialization", &self.output_serialization); - d.finish_non_exhaustive() - } +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ServerSideEncryption(Cow<'static, str>); +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self +} -impl ServerSideEncryption { - pub const AES256: &'static str = "AES256"; +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} - pub const AWS_KMS: &'static str = "aws:kms"; +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - pub const AWS_KMS_DSSE: &'static str = "aws:kms:dsse"; +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self } -impl From for ServerSideEncryption { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self } -impl From for Cow<'static, str> { - fn from(s: ServerSideEncryption) -> Self { - s.0 - } +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self } -impl FromStr for ServerSideEncryption { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self } -///

    Describes the default server-side encryption to apply to new objects in the bucket. If a -/// PUT Object request doesn't specify any server-side encryption, this default encryption will -/// be applied. For more information, see PutBucketEncryption.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you don't specify -/// a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key -/// (aws/s3) in your Amazon Web Services account the first time that you add an -/// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key -/// for SSE-KMS.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -///

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

      -///
    • -///
    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionByDefault { - ///

    Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default - /// encryption.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - This parameter is - /// allowed if and only if SSEAlgorithm is set to aws:kms or - /// aws:kms:dsse.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - This parameter is - /// allowed if and only if SSEAlgorithm is set to - /// aws:kms.

      - ///
    • - ///
    - ///
    - ///

    You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS - /// key.

    - ///
      - ///
    • - ///

      Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab - ///

      - ///
    • - ///
    • - ///

      Key ARN: - /// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab - ///

      - ///
    • - ///
    • - ///

      Key Alias: alias/alias-name - ///

      - ///
    • - ///
    - ///

    If you are using encryption with cross-account or Amazon Web Services service operations, you must use - /// a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - If you're specifying - /// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. - /// If you use a KMS key alias instead, then KMS resolves the key within the - /// requester’s account. This behavior can result in data that's encrypted with a - /// KMS key that belongs to the requester, and not the bucket owner. Also, if you - /// use a key ID, you can run into a LogDestination undeliverable error when creating - /// a VPC flow log.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      - ///
    • - ///
    - ///
    - /// - ///

    Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service - /// Developer Guide.

    - ///
    - pub kms_master_key_id: Option, - ///

    Server-side encryption algorithm to use for the default encryption.

    - /// - ///

    For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

    - ///
    - pub sse_algorithm: ServerSideEncryption, +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self } -impl fmt::Debug for ServerSideEncryptionByDefault { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ServerSideEncryptionByDefault"); - if let Some(ref val) = self.kms_master_key_id { - d.field("kms_master_key_id", val); - } - d.field("sse_algorithm", &self.sse_algorithm); - d.finish_non_exhaustive() - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self } -///

    Specifies the default server-side-encryption configuration.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionConfiguration { - ///

    Container for information about a particular server-side encryption configuration - /// rule.

    - pub rules: ServerSideEncryptionRules, +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self } -impl fmt::Debug for ServerSideEncryptionConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ServerSideEncryptionConfiguration"); - d.field("rules", &self.rules); - d.finish_non_exhaustive() - } +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self } -///

    Specifies the default server-side encryption configuration.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you're specifying -/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. -/// If you use a KMS key alias instead, then KMS resolves the key within the -/// requester’s account. This behavior can result in data that's encrypted with a -/// KMS key that belongs to the requester, and not the bucket owner.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      -///
    • -///
    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionRule { - ///

    Specifies the default server-side encryption to apply to new objects in the bucket. If a - /// PUT Object request doesn't specify any server-side encryption, this default encryption will - /// be applied.

    - pub apply_server_side_encryption_by_default: Option, - ///

    Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS - /// (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the - /// BucketKeyEnabled element to true causes Amazon S3 to use an S3 - /// Bucket Key.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - By default, S3 - /// Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      - ///
    • - ///
    - ///
    - pub bucket_key_enabled: Option, +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self } -impl fmt::Debug for ServerSideEncryptionRule { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("ServerSideEncryptionRule"); - if let Some(ref val) = self.apply_server_side_encryption_by_default { - d.field("apply_server_side_encryption_by_default", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - d.finish_non_exhaustive() - } +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self } -pub type ServerSideEncryptionRules = List; +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} -pub type SessionCredentialValue = String; +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} -///

    The established temporary security credentials of the session.

    -/// -///

    -/// Directory buckets - These session -/// credentials are only supported for the authentication and authorization of Zonal endpoint API operations -/// on directory buckets.

    -///
    -#[derive(Clone, PartialEq)] -pub struct SessionCredentials { - ///

    A unique identifier that's associated with a secret access key. The access key ID and - /// the secret access key are used together to sign programmatic Amazon Web Services requests - /// cryptographically.

    - pub access_key_id: AccessKeyIdValue, - ///

    Temporary security credentials expire after a specified interval. After temporary - /// credentials expire, any calls that you make with those credentials will fail. So you must - /// generate a new set of temporary credentials. Temporary credentials cannot be extended or - /// refreshed beyond the original specified interval.

    - pub expiration: SessionExpiration, - ///

    A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services - /// requests. Signing a request identifies the sender and prevents the request from being - /// altered.

    - pub secret_access_key: SessionCredentialValue, - ///

    A part of the temporary security credentials. The session token is used to validate the - /// temporary security credentials. - /// - ///

    - pub session_token: SessionCredentialValue, +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self } -impl fmt::Debug for SessionCredentials { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SessionCredentials"); - d.field("access_key_id", &self.access_key_id); - d.field("expiration", &self.expiration); - d.field("secret_access_key", &self.secret_access_key); - d.field("session_token", &self.session_token); - d.finish_non_exhaustive() - } +pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; +self } -impl Default for SessionCredentials { - fn default() -> Self { - Self { - access_key_id: default(), - expiration: default(), - secret_access_key: default(), - session_token: default(), - } - } +pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; +self } -pub type SessionExpiration = Timestamp; +pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { + self.write_offset_bytes = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct SessionMode(Cow<'static, str>); +pub fn set_success_action_redirect(&mut self, field: Option) -> &mut Self { + self.success_action_redirect = field; +self +} -impl SessionMode { - pub const READ_ONLY: &'static str = "ReadOnly"; +pub fn set_success_action_status(&mut self, field: Option) -> &mut Self { + self.success_action_status = field; +self +} - pub const READ_WRITE: &'static str = "ReadWrite"; +pub fn set_policy(&mut self, field: Option) -> &mut Self { + self.policy = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn body(mut self, field: Option) -> Self { + self.body = field; +self } -impl From for SessionMode { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: SessionMode) -> Self { - s.0 - } +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self } -impl FromStr for SessionMode { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self } -pub type Setting = bool; +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} -///

    To use simple format for S3 keys for log objects, set SimplePrefix to an empty -/// object.

    -///

    -/// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -///

    -#[derive(Clone, Default, PartialEq)] -pub struct SimplePrefix {} +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} -impl fmt::Debug for SimplePrefix { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SimplePrefix"); - d.finish_non_exhaustive() - } +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self } -pub type Size = i64; +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} -pub type SkipValidation = bool; +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} -pub type SourceIdentityType = String; +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} -///

    A container that describes additional filters for identifying the source objects that -/// you want to replicate. You can choose to enable or disable the replication of these -/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created -/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service -/// (SSE-KMS).

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SourceSelectionCriteria { - ///

    A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't - /// replicate replica modifications by default. In the latest version of replication - /// configuration (when Filter is specified), you can specify this element and set - /// the status to Enabled to replicate modifications on replicas.

    - /// - ///

    If you don't specify the Filter element, Amazon S3 assumes that the - /// replication configuration is the earlier version, V1. In the earlier version, this - /// element is not allowed

    - ///
    - pub replica_modifications: Option, - ///

    A container for filter information for the selection of Amazon S3 objects encrypted with - /// Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication - /// configuration, this element is required.

    - pub sse_kms_encrypted_objects: Option, +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self } -impl fmt::Debug for SourceSelectionCriteria { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SourceSelectionCriteria"); - if let Some(ref val) = self.replica_modifications { - d.field("replica_modifications", val); - } - if let Some(ref val) = self.sse_kms_encrypted_objects { - d.field("sse_kms_encrypted_objects", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self } -///

    A container for filter information for the selection of S3 objects encrypted with Amazon Web Services -/// KMS.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct SseKmsEncryptedObjects { - ///

    Specifies whether Amazon S3 replicates objects created with server-side encryption using an - /// Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

    - pub status: SseKmsEncryptedObjectsStatus, +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self } -impl fmt::Debug for SseKmsEncryptedObjects { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("SseKmsEncryptedObjects"); - d.field("status", &self.status); - d.finish_non_exhaustive() - } +#[must_use] +pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct SseKmsEncryptedObjectsStatus(Cow<'static, str>); +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} -impl SseKmsEncryptedObjectsStatus { - pub const DISABLED: &'static str = "Disabled"; +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self +} - pub const ENABLED: &'static str = "Enabled"; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self } -impl From for SseKmsEncryptedObjectsStatus { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self } -impl From for Cow<'static, str> { - fn from(s: SseKmsEncryptedObjectsStatus) -> Self { - s.0 - } +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self } -impl FromStr for SseKmsEncryptedObjectsStatus { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self } -pub type Start = i64; +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self +} -pub type StartAfter = String; +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self +} -///

    Container for the stats details.

    -#[derive(Clone, Default, PartialEq)] -pub struct Stats { - ///

    The total number of uncompressed object bytes processed.

    - pub bytes_processed: Option, - ///

    The total number of bytes of records payload data returned.

    - pub bytes_returned: Option, - ///

    The total number of object bytes scanned.

    - pub bytes_scanned: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self } -impl fmt::Debug for Stats { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Stats"); - if let Some(ref val) = self.bytes_processed { - d.field("bytes_processed", val); - } - if let Some(ref val) = self.bytes_returned { - d.field("bytes_returned", val); - } - if let Some(ref val) = self.bytes_scanned { - d.field("bytes_scanned", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self } -///

    Container for the Stats Event.

    -#[derive(Clone, Default, PartialEq)] -pub struct StatsEvent { - ///

    The Stats event details.

    - pub details: Option, +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self } -impl fmt::Debug for StatsEvent { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("StatsEvent"); - if let Some(ref val) = self.details { - d.field("details", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StorageClass(Cow<'static, str>); +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} -impl StorageClass { - pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - pub const GLACIER: &'static str = "GLACIER"; +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - pub const GLACIER_IR: &'static str = "GLACIER_IR"; +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} - pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} - pub const OUTPOSTS: &'static str = "OUTPOSTS"; +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; +self +} + +#[must_use] +pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; +self +} + +#[must_use] +pub fn write_offset_bytes(mut self, field: Option) -> Self { + self.write_offset_bytes = field; +self +} + +#[must_use] +pub fn success_action_redirect(mut self, field: Option) -> Self { + self.success_action_redirect = field; +self +} + +#[must_use] +pub fn success_action_status(mut self, field: Option) -> Self { + self.success_action_status = field; +self +} + +#[must_use] +pub fn policy(mut self, field: Option) -> Self { + self.policy = field; +self +} + +pub fn build(self) -> Result { +let acl = self.acl; +let body = self.body; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_algorithm = self.checksum_algorithm; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_length = self.content_length; +let content_md5 = self.content_md5; +let content_type = self.content_type; +let expected_bucket_owner = self.expected_bucket_owner; +let expires = self.expires; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write_acp = self.grant_write_acp; +let if_match = self.if_match; +let if_none_match = self.if_none_match; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let metadata = self.metadata; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let storage_class = self.storage_class; +let tagging = self.tagging; +let website_redirect_location = self.website_redirect_location; +let write_offset_bytes = self.write_offset_bytes; +let success_action_redirect = self.success_action_redirect; +let success_action_status = self.success_action_status; +let policy = self.policy; +Ok(PostObjectInput { +acl, +body, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_md5, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +if_match, +if_none_match, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +website_redirect_location, +write_offset_bytes, +success_action_redirect, +success_action_status, +policy, +}) +} + +} + + +/// A builder for [`PutBucketAccelerateConfigurationInput`] +#[derive(Default)] +pub struct PutBucketAccelerateConfigurationInputBuilder { +accelerate_configuration: Option, - pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; +bucket: Option, - pub const SNOW: &'static str = "SNOW"; +checksum_algorithm: Option, - pub const STANDARD: &'static str = "STANDARD"; +expected_bucket_owner: Option, - pub const STANDARD_IA: &'static str = "STANDARD_IA"; +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +impl PutBucketAccelerateConfigurationInputBuilder { +pub fn set_accelerate_configuration(&mut self, field: AccelerateConfiguration) -> &mut Self { + self.accelerate_configuration = Some(field); +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for StorageClass { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self } -impl From for Cow<'static, str> { - fn from(s: StorageClass) -> Self { - s.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl FromStr for StorageClass { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn accelerate_configuration(mut self, field: AccelerateConfiguration) -> Self { + self.accelerate_configuration = Some(field); +self } -///

    Specifies data related to access patterns to be collected and made available to analyze -/// the tradeoffs between different storage classes for an Amazon S3 bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct StorageClassAnalysis { - ///

    Specifies how data related to the storage class analysis for an Amazon S3 bucket should be - /// exported.

    - pub data_export: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for StorageClassAnalysis { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("StorageClassAnalysis"); - if let Some(ref val) = self.data_export { - d.field("data_export", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self } -///

    Container for data related to the storage class analysis for an Amazon S3 bucket for -/// export.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct StorageClassAnalysisDataExport { - ///

    The place to store the data for an analysis.

    - pub destination: AnalyticsExportDestination, - ///

    The version of the output schema to use when exporting data. Must be - /// V_1.

    - pub output_schema_version: StorageClassAnalysisSchemaVersion, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} + +pub fn build(self) -> Result { +let accelerate_configuration = self.accelerate_configuration.ok_or_else(|| BuildError::missing_field("accelerate_configuration"))?; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(PutBucketAccelerateConfigurationInput { +accelerate_configuration, +bucket, +checksum_algorithm, +expected_bucket_owner, +}) } -impl fmt::Debug for StorageClassAnalysisDataExport { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("StorageClassAnalysisDataExport"); - d.field("destination", &self.destination); - d.field("output_schema_version", &self.output_schema_version); - d.finish_non_exhaustive() - } } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StorageClassAnalysisSchemaVersion(Cow<'static, str>); -impl StorageClassAnalysisSchemaVersion { - pub const V_1: &'static str = "V_1"; +/// A builder for [`PutBucketAclInput`] +#[derive(Default)] +pub struct PutBucketAclInputBuilder { +acl: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +access_control_policy: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } -} +bucket: Option, -impl From for StorageClassAnalysisSchemaVersion { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } -} +checksum_algorithm: Option, + +content_md5: Option, + +expected_bucket_owner: Option, + +grant_full_control: Option, + +grant_read: Option, + +grant_read_acp: Option, + +grant_write: Option, + +grant_write_acp: Option, -impl From for Cow<'static, str> { - fn from(s: StorageClassAnalysisSchemaVersion) -> Self { - s.0 - } } -impl FromStr for StorageClassAnalysisSchemaVersion { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +impl PutBucketAclInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self } -pub type Suffix = String; +pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { + self.access_control_policy = field; +self +} -///

    A container of a key value name pair.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Tag { - ///

    Name of the object key.

    - pub key: Option, - ///

    Value of the tag.

    - pub value: Option, +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for Tag { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Tag"); - if let Some(ref val) = self.key { - d.field("key", val); - } - if let Some(ref val) = self.value { - d.field("value", val); - } - d.finish_non_exhaustive() - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self } -pub type TagCount = i32; +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} -pub type TagSet = List; +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} -///

    Container for TagSet elements.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Tagging { - ///

    A collection for a set of tags

    - pub tag_set: TagSet, +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self } -impl fmt::Debug for Tagging { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Tagging"); - d.field("tag_set", &self.tag_set); - d.finish_non_exhaustive() - } +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct TaggingDirective(Cow<'static, str>); +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} -impl TaggingDirective { - pub const COPY: &'static str = "COPY"; +pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; +self +} - pub const REPLACE: &'static str = "REPLACE"; +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn access_control_policy(mut self, field: Option) -> Self { + self.access_control_policy = field; +self } -impl From for TaggingDirective { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: TaggingDirective) -> Self { - s.0 - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self } -impl FromStr for TaggingDirective { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self } -pub type TaggingHeader = String; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -pub type TargetBucket = String; +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} -///

    Container for granting information.

    -///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support -/// target grants. For more information, see Permissions server access log delivery in the -/// Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq)] -pub struct TargetGrant { - ///

    Container for the person being granted permissions.

    - pub grantee: Option, - ///

    Logging permissions assigned to the grantee for the bucket.

    - pub permission: Option, +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self } -impl fmt::Debug for TargetGrant { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("TargetGrant"); - if let Some(ref val) = self.grantee { - d.field("grantee", val); - } - if let Some(ref val) = self.permission { - d.field("permission", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self } -pub type TargetGrants = List; +#[must_use] +pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; +self +} -///

    Amazon S3 key format for log objects. Only one format, PartitionedPrefix or -/// SimplePrefix, is allowed.

    -#[derive(Clone, Default, PartialEq)] -pub struct TargetObjectKeyFormat { - ///

    Partitioned S3 key for log objects.

    - pub partitioned_prefix: Option, - ///

    To use the simple format for S3 keys for log objects. To specify SimplePrefix format, - /// set SimplePrefix to {}.

    - pub simple_prefix: Option, +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self } -impl fmt::Debug for TargetObjectKeyFormat { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("TargetObjectKeyFormat"); - if let Some(ref val) = self.partitioned_prefix { - d.field("partitioned_prefix", val); - } - if let Some(ref val) = self.simple_prefix { - d.field("simple_prefix", val); - } - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let acl = self.acl; +let access_control_policy = self.access_control_policy; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write = self.grant_write; +let grant_write_acp = self.grant_write_acp; +Ok(PutBucketAclInput { +acl, +access_control_policy, +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +}) } -pub type TargetPrefix = String; +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Tier(Cow<'static, str>); -impl Tier { - pub const BULK: &'static str = "Bulk"; +/// A builder for [`PutBucketAnalyticsConfigurationInput`] +#[derive(Default)] +pub struct PutBucketAnalyticsConfigurationInputBuilder { +analytics_configuration: Option, - pub const EXPEDITED: &'static str = "Expedited"; +bucket: Option, - pub const STANDARD: &'static str = "Standard"; +expected_bucket_owner: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +id: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for Tier { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl PutBucketAnalyticsConfigurationInputBuilder { +pub fn set_analytics_configuration(&mut self, field: AnalyticsConfiguration) -> &mut Self { + self.analytics_configuration = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: Tier) -> Self { - s.0 - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl FromStr for Tier { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by -/// automatically moving data to the most cost-effective storage access tier, without -/// additional operational overhead.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct Tiering { - ///

    S3 Intelligent-Tiering access tier. See Storage class - /// for automatically optimizing frequently and infrequently accessed objects for a - /// list of access tiers in the S3 Intelligent-Tiering storage class.

    - pub access_tier: IntelligentTieringAccessTier, - ///

    The number of consecutive days of no access after which an object will be eligible to be - /// transitioned to the corresponding tier. The minimum number of days specified for - /// Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least - /// 180 days. The maximum can be up to 2 years (730 days).

    - pub days: IntelligentTieringDays, +pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); +self } -impl fmt::Debug for Tiering { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Tiering"); - d.field("access_tier", &self.access_tier); - d.field("days", &self.days); - d.finish_non_exhaustive() - } +#[must_use] +pub fn analytics_configuration(mut self, field: AnalyticsConfiguration) -> Self { + self.analytics_configuration = Some(field); +self } -pub type TieringList = List; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} -pub type Token = String; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -pub type TokenType = String; +#[must_use] +pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); +self +} -///

    -/// You have attempted to add more parts than the maximum of 10000 -/// that are allowed for this object. You can use the CopyObject operation -/// to copy this object to another and then add more data to the newly copied object. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct TooManyParts {} +pub fn build(self) -> Result { +let analytics_configuration = self.analytics_configuration.ok_or_else(|| BuildError::missing_field("analytics_configuration"))?; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +Ok(PutBucketAnalyticsConfigurationInput { +analytics_configuration, +bucket, +expected_bucket_owner, +id, +}) +} -impl fmt::Debug for TooManyParts { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("TooManyParts"); - d.finish_non_exhaustive() - } } -pub type TopicArn = String; -///

    A container for specifying the configuration for publication of messages to an Amazon -/// Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct TopicConfiguration { - ///

    The Amazon S3 bucket event about which to send notifications. For more information, see - /// Supported - /// Event Types in the Amazon S3 User Guide.

    - pub events: EventList, - pub filter: Option, - pub id: Option, - ///

    The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message - /// when it detects events of the specified type.

    - pub topic_arn: TopicArn, -} +/// A builder for [`PutBucketCorsInput`] +#[derive(Default)] +pub struct PutBucketCorsInputBuilder { +bucket: Option, -impl fmt::Debug for TopicConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("TopicConfiguration"); - d.field("events", &self.events); - if let Some(ref val) = self.filter { - d.field("filter", val); - } - if let Some(ref val) = self.id { - d.field("id", val); - } - d.field("topic_arn", &self.topic_arn); - d.finish_non_exhaustive() - } -} +cors_configuration: Option, -pub type TopicConfigurationList = List; +checksum_algorithm: Option, + +content_md5: Option, + +expected_bucket_owner: Option, -///

    Specifies when an object transitions to a specified storage class. For more information -/// about Amazon S3 lifecycle configuration rules, see Transitioning -/// Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Transition { - ///

    Indicates when objects are transitioned to the specified storage class. The date value - /// must be in ISO 8601 format. The time is always midnight UTC.

    - pub date: Option, - ///

    Indicates the number of days after creation when objects are transitioned to the - /// specified storage class. If the specified storage class is INTELLIGENT_TIERING, - /// GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are - /// 0 or positive integers. If the specified storage class is STANDARD_IA - /// or ONEZONE_IA, valid values are positive integers greater than 30. Be - /// aware that some storage classes have a minimum storage duration and that you're charged for - /// transitioning objects before their minimum storage duration. For more information, see - /// - /// Constraints and considerations for transitions in the - /// Amazon S3 User Guide.

    - pub days: Option, - ///

    The storage class to which you want the object to transition.

    - pub storage_class: Option, } -impl fmt::Debug for Transition { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("Transition"); - if let Some(ref val) = self.date { - d.field("date", val); - } - if let Some(ref val) = self.days { - d.field("days", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - d.finish_non_exhaustive() - } +impl PutBucketCorsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct TransitionDefaultMinimumObjectSize(Cow<'static, str>); +pub fn set_cors_configuration(&mut self, field: CORSConfiguration) -> &mut Self { + self.cors_configuration = Some(field); +self +} -impl TransitionDefaultMinimumObjectSize { - pub const ALL_STORAGE_CLASSES_128K: &'static str = "all_storage_classes_128K"; +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - pub const VARIES_BY_STORAGE_CLASS: &'static str = "varies_by_storage_class"; +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl From for TransitionDefaultMinimumObjectSize { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn cors_configuration(mut self, field: CORSConfiguration) -> Self { + self.cors_configuration = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: TransitionDefaultMinimumObjectSize) -> Self { - s.0 - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self } -impl FromStr for TransitionDefaultMinimumObjectSize { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self } -pub type TransitionList = List; +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct TransitionStorageClass(Cow<'static, str>); +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let cors_configuration = self.cors_configuration.ok_or_else(|| BuildError::missing_field("cors_configuration"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(PutBucketCorsInput { +bucket, +cors_configuration, +checksum_algorithm, +content_md5, +expected_bucket_owner, +}) +} -impl TransitionStorageClass { - pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; +} - pub const GLACIER: &'static str = "GLACIER"; - pub const GLACIER_IR: &'static str = "GLACIER_IR"; +/// A builder for [`PutBucketEncryptionInput`] +#[derive(Default)] +pub struct PutBucketEncryptionInputBuilder { +bucket: Option, - pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; +checksum_algorithm: Option, - pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; +content_md5: Option, - pub const STANDARD_IA: &'static str = "STANDARD_IA"; +expected_bucket_owner: Option, - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +server_side_encryption_configuration: Option, - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } } -impl From for TransitionStorageClass { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +impl PutBucketEncryptionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: TransitionStorageClass) -> Self { - s.0 - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self } -impl FromStr for TransitionStorageClass { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Type(Cow<'static, str>); +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} -impl Type { - pub const AMAZON_CUSTOMER_BY_EMAIL: &'static str = "AmazonCustomerByEmail"; +pub fn set_server_side_encryption_configuration(&mut self, field: ServerSideEncryptionConfiguration) -> &mut Self { + self.server_side_encryption_configuration = Some(field); +self +} - pub const CANONICAL_USER: &'static str = "CanonicalUser"; +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - pub const GROUP: &'static str = "Group"; +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - #[must_use] - pub fn as_str(&self) -> &str { - &self.0 - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - #[must_use] - pub fn from_static(s: &'static str) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl From for Type { - fn from(s: String) -> Self { - Self(Cow::from(s)) - } +#[must_use] +pub fn server_side_encryption_configuration(mut self, field: ServerSideEncryptionConfiguration) -> Self { + self.server_side_encryption_configuration = Some(field); +self } -impl From for Cow<'static, str> { - fn from(s: Type) -> Self { - s.0 - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let server_side_encryption_configuration = self.server_side_encryption_configuration.ok_or_else(|| BuildError::missing_field("server_side_encryption_configuration"))?; +Ok(PutBucketEncryptionInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +server_side_encryption_configuration, +}) } -impl FromStr for Type { - type Err = Infallible; - fn from_str(s: &str) -> Result { - Ok(Self::from(s.to_owned())) - } } -pub type URI = String; -pub type UploadIdMarker = String; +/// A builder for [`PutBucketIntelligentTieringConfigurationInput`] +#[derive(Default)] +pub struct PutBucketIntelligentTieringConfigurationInputBuilder { +bucket: Option, -#[derive(Clone, PartialEq)] -pub struct UploadPartCopyInput { - ///

    The bucket name.

    - ///

    - /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - /// - ///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, - /// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    - ///
    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Specifies the source object for the copy operation. You specify the value in one of two - /// formats, depending on whether you want to access the source object through an access point:

    - ///
      - ///
    • - ///

      For objects not accessed through an access point, specify the name of the source bucket - /// and key of the source object, separated by a slash (/). For example, to copy the - /// object reports/january.pdf from the bucket - /// awsexamplebucket, use awsexamplebucket/reports/january.pdf. - /// The value must be URL-encoded.

      - ///
    • - ///
    • - ///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      - /// - ///
        - ///
      • - ///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        - ///
      • - ///
      • - ///

        Access points are not supported by directory buckets.

        - ///
      • - ///
      - ///
      - ///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      - ///
    • - ///
    - ///

    If your bucket has versioning enabled, you could have multiple versions of the same - /// object. By default, x-amz-copy-source identifies the current version of the - /// source object to copy. To copy a specific version of the source object to copy, append - /// ?versionId=<version-id> to the x-amz-copy-source request - /// header (for example, x-amz-copy-source: - /// /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

    - ///

    If the current version is a delete marker and you don't specify a versionId in the - /// x-amz-copy-source request header, Amazon S3 returns a 404 Not Found - /// error, because the object does not exist. If you specify versionId in the - /// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an - /// HTTP 400 Bad Request error, because you are not allowed to specify a delete - /// marker as a version for the x-amz-copy-source.

    - /// - ///

    - /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets.

    - ///
    - pub copy_source: CopySource, - ///

    Copies the object if its entity tag (ETag) matches the specified tag.

    - ///

    If both of the x-amz-copy-source-if-match and - /// x-amz-copy-source-if-unmodified-since headers are present in the request as - /// follows:

    - ///

    - /// x-amz-copy-source-if-match condition evaluates to true, - /// and;

    - ///

    - /// x-amz-copy-source-if-unmodified-since condition evaluates to - /// false;

    - ///

    Amazon S3 returns 200 OK and copies the data. - ///

    - pub copy_source_if_match: Option, - ///

    Copies the object if it has been modified since the specified time.

    - ///

    If both of the x-amz-copy-source-if-none-match and - /// x-amz-copy-source-if-modified-since headers are present in the request as - /// follows:

    - ///

    - /// x-amz-copy-source-if-none-match condition evaluates to false, - /// and;

    - ///

    - /// x-amz-copy-source-if-modified-since condition evaluates to - /// true;

    - ///

    Amazon S3 returns 412 Precondition Failed response code. - ///

    - pub copy_source_if_modified_since: Option, - ///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    - ///

    If both of the x-amz-copy-source-if-none-match and - /// x-amz-copy-source-if-modified-since headers are present in the request as - /// follows:

    - ///

    - /// x-amz-copy-source-if-none-match condition evaluates to false, - /// and;

    - ///

    - /// x-amz-copy-source-if-modified-since condition evaluates to - /// true;

    - ///

    Amazon S3 returns 412 Precondition Failed response code. - ///

    - pub copy_source_if_none_match: Option, - ///

    Copies the object if it hasn't been modified since the specified time.

    - ///

    If both of the x-amz-copy-source-if-match and - /// x-amz-copy-source-if-unmodified-since headers are present in the request as - /// follows:

    - ///

    - /// x-amz-copy-source-if-match condition evaluates to true, - /// and;

    - ///

    - /// x-amz-copy-source-if-unmodified-since condition evaluates to - /// false;

    - ///

    Amazon S3 returns 200 OK and copies the data. - ///

    - pub copy_source_if_unmodified_since: Option, - ///

    The range of bytes to copy from the source object. The range value must use the form - /// bytes=first-last, where the first and last are the zero-based byte offsets to copy. For - /// example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You - /// can copy a range only if the source object is greater than 5 MB.

    - pub copy_source_range: Option, - ///

    Specifies the algorithm to use when decrypting the source object (for example, - /// AES256).

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    - pub copy_source_sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source - /// object. The encryption key provided in this header must be one that was used when the - /// source object was created.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    - pub copy_source_sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    - pub copy_source_sse_customer_key_md5: Option, - ///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_source_bucket_owner: Option, - ///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, - ///

    Part number of part being copied. This is a positive integer between 1 and - /// 10,000.

    - pub part_number: PartNumber, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header. This must be the - /// same encryption key specified in the initiate multipart upload request.

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported when the destination bucket is a directory bucket.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Upload ID identifying the multipart upload whose part is being copied.

    - pub upload_id: MultipartUploadId, -} +id: Option, -impl fmt::Debug for UploadPartCopyInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("UploadPartCopyInput"); - d.field("bucket", &self.bucket); - d.field("copy_source", &self.copy_source); - if let Some(ref val) = self.copy_source_if_match { - d.field("copy_source_if_match", val); - } - if let Some(ref val) = self.copy_source_if_modified_since { - d.field("copy_source_if_modified_since", val); - } - if let Some(ref val) = self.copy_source_if_none_match { - d.field("copy_source_if_none_match", val); - } - if let Some(ref val) = self.copy_source_if_unmodified_since { - d.field("copy_source_if_unmodified_since", val); - } - if let Some(ref val) = self.copy_source_range { - d.field("copy_source_range", val); - } - if let Some(ref val) = self.copy_source_sse_customer_algorithm { - d.field("copy_source_sse_customer_algorithm", val); - } - if let Some(ref val) = self.copy_source_sse_customer_key { - d.field("copy_source_sse_customer_key", val); - } - if let Some(ref val) = self.copy_source_sse_customer_key_md5 { - d.field("copy_source_sse_customer_key_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - if let Some(ref val) = self.expected_source_bucket_owner { - d.field("expected_source_bucket_owner", val); - } - d.field("key", &self.key); - d.field("part_number", &self.part_number); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } -} +intelligent_tiering_configuration: Option, -impl UploadPartCopyInput { - #[must_use] - pub fn builder() -> builders::UploadPartCopyInputBuilder { - default() - } } -#[derive(Clone, Default, PartialEq)] -pub struct UploadPartCopyOutput { - ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    Container for all response elements.

    - pub copy_part_result: Option, - ///

    The version of the source object that was copied, if you have enabled versioning on the - /// source bucket.

    - /// - ///

    This functionality is not supported when the source object is in a directory bucket.

    - ///
    - pub copy_source_version_id: Option, - pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms).

    - pub server_side_encryption: Option, +impl PutBucketIntelligentTieringConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -impl fmt::Debug for UploadPartCopyOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("UploadPartCopyOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.copy_part_result { - d.field("copy_part_result", val); - } - if let Some(ref val) = self.copy_source_version_id { - d.field("copy_source_version_id", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - d.finish_non_exhaustive() - } +pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); +self } -#[derive(Default)] -pub struct UploadPartInput { - ///

    Object data.

    - pub body: Option, - ///

    The name of the bucket to which the multipart upload was initiated.

    - ///

    - /// Directory buckets - - /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format - /// bucket-base-name--zone-id--x-s3 (for example, - /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming - /// restrictions, see Directory bucket naming - /// rules in the Amazon S3 User Guide.

    - ///

    - /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - /// - ///

    Access points and Object Lambda access points are not supported by directory buckets.

    - ///
    - ///

    - /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, - ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any - /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or - /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more - /// information, see Checking object integrity in - /// the Amazon S3 User Guide.

    - ///

    If you provide an individual checksum, Amazon S3 ignores any provided - /// ChecksumAlgorithm parameter.

    - ///

    This checksum algorithm must be the same for all parts and it match the checksum value - /// supplied in the CreateMultipartUpload request.

    - pub checksum_algorithm: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. - /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see - /// Checking object integrity in the - /// Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be - /// determined automatically.

    - pub content_length: Option, - ///

    The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated - /// when using the command from the CLI. This parameter is required if object lock parameters - /// are specified.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub content_md5: Option, - ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - ///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, - ///

    Part number of part being uploaded. This is a positive integer between 1 and - /// 10,000.

    - pub part_number: PartNumber, - pub request_payer: Option, - ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This - /// value is used to store the object and then it is discarded; Amazon S3 does not store the - /// encryption key. The key must be appropriate for use with the algorithm specified in the - /// x-amz-server-side-encryption-customer-algorithm header. This must be the - /// same encryption key specified in the initiate multipart upload request.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key: Option, - ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses - /// this header for a message integrity check to ensure that the encryption key was transmitted - /// without error.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    Upload ID identifying the multipart upload whose part is being uploaded.

    - pub upload_id: MultipartUploadId, +pub fn set_intelligent_tiering_configuration(&mut self, field: IntelligentTieringConfiguration) -> &mut Self { + self.intelligent_tiering_configuration = Some(field); +self } -impl fmt::Debug for UploadPartInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("UploadPartInput"); - if let Some(ref val) = self.body { - d.field("body", val); - } - d.field("bucket", &self.bucket); - if let Some(ref val) = self.checksum_algorithm { - d.field("checksum_algorithm", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_md5 { - d.field("content_md5", val); - } - if let Some(ref val) = self.expected_bucket_owner { - d.field("expected_bucket_owner", val); - } - d.field("key", &self.key); - d.field("part_number", &self.part_number); - if let Some(ref val) = self.request_payer { - d.field("request_payer", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key { - d.field("sse_customer_key", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - d.field("upload_id", &self.upload_id); - d.finish_non_exhaustive() - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} + +#[must_use] +pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); +self } -impl UploadPartInput { - #[must_use] - pub fn builder() -> builders::UploadPartInputBuilder { - default() - } +#[must_use] +pub fn intelligent_tiering_configuration(mut self, field: IntelligentTieringConfiguration) -> Self { + self.intelligent_tiering_configuration = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct UploadPartOutput { - ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption - /// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, - ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, - ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded - /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated - /// with multipart uploads, see - /// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, - ///

    Entity tag for the uploaded object.

    - pub e_tag: Option, - pub request_charged: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to confirm the encryption algorithm that's used.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_algorithm: Option, - ///

    If server-side encryption with a customer-provided encryption key was requested, the - /// response will include this header to provide the round-trip message integrity verification - /// of the customer-provided encryption key.

    - /// - ///

    This functionality is not supported for directory buckets.

    - ///
    - pub sse_customer_key_md5: Option, - ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for - /// example, AES256, aws:kms).

    - pub server_side_encryption: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +let intelligent_tiering_configuration = self.intelligent_tiering_configuration.ok_or_else(|| BuildError::missing_field("intelligent_tiering_configuration"))?; +Ok(PutBucketIntelligentTieringConfigurationInput { +bucket, +id, +intelligent_tiering_configuration, +}) } -impl fmt::Debug for UploadPartOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("UploadPartOutput"); - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - d.finish_non_exhaustive() - } } -pub type UserMetadata = List; -pub type Value = String; +/// A builder for [`PutBucketInventoryConfigurationInput`] +#[derive(Default)] +pub struct PutBucketInventoryConfigurationInputBuilder { +bucket: Option, -pub type VersionCount = i32; +expected_bucket_owner: Option, -pub type VersionIdMarker = String; +id: Option, + +inventory_configuration: Option, -///

    Describes the versioning state of an Amazon S3 bucket. For more information, see PUT -/// Bucket versioning in the Amazon S3 API Reference.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct VersioningConfiguration { - ///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This - /// element is only returned if the bucket has been configured with MFA delete. If the bucket - /// has never been so configured, this element is not returned.

    - pub mfa_delete: Option, - ///

    The versioning state of the bucket.

    - pub status: Option, } -impl fmt::Debug for VersioningConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("VersioningConfiguration"); - if let Some(ref val) = self.mfa_delete { - d.field("mfa_delete", val); - } - if let Some(ref val) = self.status { - d.field("status", val); - } - d.finish_non_exhaustive() - } +impl PutBucketInventoryConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self } -///

    Specifies website configuration parameters for an Amazon S3 bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct WebsiteConfiguration { - ///

    The name of the error document for the website.

    - pub error_document: Option, - ///

    The name of the index document for the website.

    - pub index_document: Option, - ///

    The redirect behavior for every request to this bucket's website endpoint.

    - /// - ///

    If you specify this property, you can't specify any other property.

    - ///
    - pub redirect_all_requests_to: Option, - ///

    Rules that define when a redirect is applied and the redirect behavior.

    - pub routing_rules: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self } -impl fmt::Debug for WebsiteConfiguration { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("WebsiteConfiguration"); - if let Some(ref val) = self.error_document { - d.field("error_document", val); - } - if let Some(ref val) = self.index_document { - d.field("index_document", val); - } - if let Some(ref val) = self.redirect_all_requests_to { - d.field("redirect_all_requests_to", val); - } - if let Some(ref val) = self.routing_rules { - d.field("routing_rules", val); - } - d.finish_non_exhaustive() - } +pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); +self } -pub type WebsiteRedirectLocation = String; +pub fn set_inventory_configuration(&mut self, field: InventoryConfiguration) -> &mut Self { + self.inventory_configuration = Some(field); +self +} -#[derive(Default)] -pub struct WriteGetObjectResponseInput { - ///

    Indicates that a range of bytes was specified.

    - pub accept_ranges: Option, - ///

    The object data.

    - pub body: Option, - ///

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side - /// encryption with Amazon Web Services KMS (SSE-KMS).

    - pub bucket_key_enabled: Option, - ///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 - /// checksum of the object returned by the Object Lambda function. This may not match the - /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values - /// only when the original GetObject request required checksum validation. For - /// more information about checksums, see Checking object - /// integrity in the Amazon S3 User Guide.

    - ///

    Only one checksum header can be specified at a time. If you supply multiple checksum - /// headers, this request will fail.

    - ///

    - pub checksum_crc32: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C - /// checksum of the object returned by the Object Lambda function. This may not match the - /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values - /// only when the original GetObject request required checksum validation. For - /// more information about checksums, see Checking object - /// integrity in the Amazon S3 User Guide.

    - ///

    Only one checksum header can be specified at a time. If you supply multiple checksum - /// headers, this request will fail.

    - pub checksum_crc32c: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit - /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 - /// digest of the object returned by the Object Lambda function. This may not match the - /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values - /// only when the original GetObject request required checksum validation. For - /// more information about checksums, see Checking object - /// integrity in the Amazon S3 User Guide.

    - ///

    Only one checksum header can be specified at a time. If you supply multiple checksum - /// headers, this request will fail.

    - pub checksum_sha1: Option, - ///

    This header can be used as a data integrity check to verify that the data received is - /// the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 - /// digest of the object returned by the Object Lambda function. This may not match the - /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values - /// only when the original GetObject request required checksum validation. For - /// more information about checksums, see Checking object - /// integrity in the Amazon S3 User Guide.

    - ///

    Only one checksum header can be specified at a time. If you supply multiple checksum - /// headers, this request will fail.

    - pub checksum_sha256: Option, - ///

    Specifies presentational information for the object.

    - pub content_disposition: Option, - ///

    Specifies what content encodings have been applied to the object and thus what decoding - /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header - /// field.

    - pub content_encoding: Option, - ///

    The language the content is in.

    - pub content_language: Option, - ///

    The size of the content body in bytes.

    - pub content_length: Option, - ///

    The portion of the object returned in the response.

    - pub content_range: Option, - ///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, - ///

    Specifies whether an object stored in Amazon S3 is (true) or is not - /// (false) a delete marker. To learn more about delete markers, see Working with delete markers.

    - pub delete_marker: Option, - ///

    An opaque identifier assigned by a web server to a specific version of a resource found - /// at a URL.

    - pub e_tag: Option, - ///

    A string that uniquely identifies an error condition. Returned in the <Code> tag - /// of the error XML response for a corresponding GetObject call. Cannot be used - /// with a successful StatusCode header or when the transformed object is provided - /// in the body. All error codes from S3 are sentence-cased. The regular expression (regex) - /// value is "^[A-Z][a-zA-Z]+$".

    - pub error_code: Option, - ///

    Contains a generic description of the error condition. Returned in the <Message> - /// tag of the error XML response for a corresponding GetObject call. Cannot be - /// used with a successful StatusCode header or when the transformed object is - /// provided in body.

    - pub error_message: Option, - ///

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes - /// this header. It includes the expiry-date and rule-id key-value - /// pairs that provide the object expiration information. The value of the rule-id - /// is URL-encoded.

    - pub expiration: Option, - ///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, - ///

    The date and time that the object was last modified.

    - pub last_modified: Option, - ///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, - ///

    Set to the number of metadata entries not returned in x-amz-meta headers. - /// This can happen if you create metadata using an API like SOAP that supports more flexible - /// metadata than the REST API. For example, using SOAP, you can create metadata whose values - /// are not legal HTTP headers.

    - pub missing_meta: Option, - ///

    Indicates whether an object stored in Amazon S3 has an active legal hold.

    - pub object_lock_legal_hold_status: Option, - ///

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information - /// about S3 Object Lock, see Object Lock.

    - pub object_lock_mode: Option, - ///

    The date and time when Object Lock is configured to expire.

    - pub object_lock_retain_until_date: Option, - ///

    The count of parts this object has.

    - pub parts_count: Option, - ///

    Indicates if request involves bucket that is either a source or destination in a - /// Replication rule. For more information about S3 Replication, see Replication.

    - pub replication_status: Option, - pub request_charged: Option, - ///

    Route prefix to the HTTP URL generated.

    - pub request_route: RequestRoute, - ///

    A single use encrypted token that maps WriteGetObjectResponse to the end - /// user GetObject request.

    - pub request_token: RequestToken, - ///

    Provides information about object restoration operation and expiration time of the - /// restored object copy.

    - pub restore: Option, - ///

    Encryption algorithm used if server-side encryption with a customer-provided encryption - /// key was specified for object stored in Amazon S3.

    - pub sse_customer_algorithm: Option, - ///

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data - /// stored in S3. For more information, see Protecting data - /// using server-side encryption with customer-provided encryption keys - /// (SSE-C).

    - pub sse_customer_key_md5: Option, - ///

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key - /// Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in - /// Amazon S3 object.

    - pub ssekms_key_id: Option, - ///

    The server-side encryption algorithm used when storing requested object in Amazon S3 (for - /// example, AES256, aws:kms).

    - pub server_side_encryption: Option, - ///

    The integer status code for an HTTP response of a corresponding GetObject - /// request. The following is a list of status codes.

    - ///
      - ///
    • - ///

      - /// 200 - OK - ///

      - ///
    • - ///
    • - ///

      - /// 206 - Partial Content - ///

      - ///
    • - ///
    • - ///

      - /// 304 - Not Modified - ///

      - ///
    • - ///
    • - ///

      - /// 400 - Bad Request - ///

      - ///
    • - ///
    • - ///

      - /// 401 - Unauthorized - ///

      - ///
    • - ///
    • - ///

      - /// 403 - Forbidden - ///

      - ///
    • - ///
    • - ///

      - /// 404 - Not Found - ///

      - ///
    • - ///
    • - ///

      - /// 405 - Method Not Allowed - ///

      - ///
    • - ///
    • - ///

      - /// 409 - Conflict - ///

      - ///
    • - ///
    • - ///

      - /// 411 - Length Required - ///

      - ///
    • - ///
    • - ///

      - /// 412 - Precondition Failed - ///

      - ///
    • - ///
    • - ///

      - /// 416 - Range Not Satisfiable - ///

      - ///
    • - ///
    • - ///

      - /// 500 - Internal Server Error - ///

      - ///
    • - ///
    • - ///

      - /// 503 - Service Unavailable - ///

      - ///
    • - ///
    - pub status_code: Option, - ///

    Provides storage class information of the object. Amazon S3 returns this header for all - /// objects except for S3 Standard storage class objects.

    - ///

    For more information, see Storage Classes.

    - pub storage_class: Option, - ///

    The number of tags, if any, on the object.

    - pub tag_count: Option, - ///

    An ID used to reference a specific version of the object.

    - pub version_id: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self } -impl fmt::Debug for WriteGetObjectResponseInput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("WriteGetObjectResponseInput"); - if let Some(ref val) = self.accept_ranges { - d.field("accept_ranges", val); - } - if let Some(ref val) = self.body { - d.field("body", val); - } - if let Some(ref val) = self.bucket_key_enabled { - d.field("bucket_key_enabled", val); - } - if let Some(ref val) = self.cache_control { - d.field("cache_control", val); - } - if let Some(ref val) = self.checksum_crc32 { - d.field("checksum_crc32", val); - } - if let Some(ref val) = self.checksum_crc32c { - d.field("checksum_crc32c", val); - } - if let Some(ref val) = self.checksum_crc64nvme { - d.field("checksum_crc64nvme", val); - } - if let Some(ref val) = self.checksum_sha1 { - d.field("checksum_sha1", val); - } - if let Some(ref val) = self.checksum_sha256 { - d.field("checksum_sha256", val); - } - if let Some(ref val) = self.content_disposition { - d.field("content_disposition", val); - } - if let Some(ref val) = self.content_encoding { - d.field("content_encoding", val); - } - if let Some(ref val) = self.content_language { - d.field("content_language", val); - } - if let Some(ref val) = self.content_length { - d.field("content_length", val); - } - if let Some(ref val) = self.content_range { - d.field("content_range", val); - } - if let Some(ref val) = self.content_type { - d.field("content_type", val); - } - if let Some(ref val) = self.delete_marker { - d.field("delete_marker", val); - } - if let Some(ref val) = self.e_tag { - d.field("e_tag", val); - } - if let Some(ref val) = self.error_code { - d.field("error_code", val); - } - if let Some(ref val) = self.error_message { - d.field("error_message", val); - } - if let Some(ref val) = self.expiration { - d.field("expiration", val); - } - if let Some(ref val) = self.expires { - d.field("expires", val); - } - if let Some(ref val) = self.last_modified { - d.field("last_modified", val); - } - if let Some(ref val) = self.metadata { - d.field("metadata", val); - } - if let Some(ref val) = self.missing_meta { - d.field("missing_meta", val); - } - if let Some(ref val) = self.object_lock_legal_hold_status { - d.field("object_lock_legal_hold_status", val); - } - if let Some(ref val) = self.object_lock_mode { - d.field("object_lock_mode", val); - } - if let Some(ref val) = self.object_lock_retain_until_date { - d.field("object_lock_retain_until_date", val); - } - if let Some(ref val) = self.parts_count { - d.field("parts_count", val); - } - if let Some(ref val) = self.replication_status { - d.field("replication_status", val); - } - if let Some(ref val) = self.request_charged { - d.field("request_charged", val); - } - d.field("request_route", &self.request_route); - d.field("request_token", &self.request_token); - if let Some(ref val) = self.restore { - d.field("restore", val); - } - if let Some(ref val) = self.sse_customer_algorithm { - d.field("sse_customer_algorithm", val); - } - if let Some(ref val) = self.sse_customer_key_md5 { - d.field("sse_customer_key_md5", val); - } - if let Some(ref val) = self.ssekms_key_id { - d.field("ssekms_key_id", val); - } - if let Some(ref val) = self.server_side_encryption { - d.field("server_side_encryption", val); - } - if let Some(ref val) = self.status_code { - d.field("status_code", val); - } - if let Some(ref val) = self.storage_class { - d.field("storage_class", val); - } - if let Some(ref val) = self.tag_count { - d.field("tag_count", val); - } - if let Some(ref val) = self.version_id { - d.field("version_id", val); - } - d.finish_non_exhaustive() - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self } -impl WriteGetObjectResponseInput { - #[must_use] - pub fn builder() -> builders::WriteGetObjectResponseInputBuilder { - default() - } +#[must_use] +pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); +self } -#[derive(Clone, Default, PartialEq)] -pub struct WriteGetObjectResponseOutput {} +#[must_use] +pub fn inventory_configuration(mut self, field: InventoryConfiguration) -> Self { + self.inventory_configuration = Some(field); +self +} -impl fmt::Debug for WriteGetObjectResponseOutput { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let mut d = f.debug_struct("WriteGetObjectResponseOutput"); - d.finish_non_exhaustive() - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +let inventory_configuration = self.inventory_configuration.ok_or_else(|| BuildError::missing_field("inventory_configuration"))?; +Ok(PutBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +inventory_configuration, +}) } -pub type WriteOffsetBytes = i64; +} -pub type Years = i32; -#[cfg(test)] -mod tests { - use super::*; - - fn require_default() {} - fn require_clone() {} - - #[test] - fn test_default() { - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - require_default::(); - } - #[test] - fn test_clone() { - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - require_clone::(); - } -} -pub mod builders { - #![allow(clippy::missing_errors_doc)] +/// A builder for [`PutBucketLifecycleConfigurationInput`] +#[derive(Default)] +pub struct PutBucketLifecycleConfigurationInputBuilder { +bucket: Option, - pub use super::build_error::BuildError; - use super::*; +checksum_algorithm: Option, - /// A builder for [`AbortMultipartUploadInput`] - #[derive(Default)] - pub struct AbortMultipartUploadInputBuilder { - bucket: Option, +expected_bucket_owner: Option, - expected_bucket_owner: Option, +lifecycle_configuration: Option, - if_match_initiated_time: Option, +transition_default_minimum_object_size: Option, - key: Option, +} - request_payer: Option, +impl PutBucketLifecycleConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - upload_id: Option, - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - impl AbortMultipartUploadInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_if_match_initiated_time(&mut self, field: Option) -> &mut Self { - self.if_match_initiated_time = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn if_match_initiated_time(mut self, field: Option) -> Self { - self.if_match_initiated_time = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match_initiated_time = self.if_match_initiated_time; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(AbortMultipartUploadInput { - bucket, - expected_bucket_owner, - if_match_initiated_time, - key, - request_payer, - upload_id, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} + +pub fn set_lifecycle_configuration(&mut self, field: Option) -> &mut Self { + self.lifecycle_configuration = field; +self +} - /// A builder for [`CompleteMultipartUploadInput`] - #[derive(Default)] - pub struct CompleteMultipartUploadInputBuilder { - bucket: Option, +pub fn set_transition_default_minimum_object_size(&mut self, field: Option) -> &mut Self { + self.transition_default_minimum_object_size = field; +self +} - checksum_crc32: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - checksum_crc32c: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - checksum_crc64nvme: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - checksum_sha1: Option, +#[must_use] +pub fn lifecycle_configuration(mut self, field: Option) -> Self { + self.lifecycle_configuration = field; +self +} - checksum_sha256: Option, +#[must_use] +pub fn transition_default_minimum_object_size(mut self, field: Option) -> Self { + self.transition_default_minimum_object_size = field; +self +} - checksum_type: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let expected_bucket_owner = self.expected_bucket_owner; +let lifecycle_configuration = self.lifecycle_configuration; +let transition_default_minimum_object_size = self.transition_default_minimum_object_size; +Ok(PutBucketLifecycleConfigurationInput { +bucket, +checksum_algorithm, +expected_bucket_owner, +lifecycle_configuration, +transition_default_minimum_object_size, +}) +} - expected_bucket_owner: Option, +} - if_match: Option, - if_none_match: Option, +/// A builder for [`PutBucketLoggingInput`] +#[derive(Default)] +pub struct PutBucketLoggingInputBuilder { +bucket: Option, - key: Option, +bucket_logging_status: Option, - mpu_object_size: Option, +checksum_algorithm: Option, - multipart_upload: Option, +content_md5: Option, - request_payer: Option, +expected_bucket_owner: Option, - sse_customer_algorithm: Option, +} - sse_customer_key: Option, +impl PutBucketLoggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - sse_customer_key_md5: Option, +pub fn set_bucket_logging_status(&mut self, field: BucketLoggingStatus) -> &mut Self { + self.bucket_logging_status = Some(field); +self +} - upload_id: Option, - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - impl CompleteMultipartUploadInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } - - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } - - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } - - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } - - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } - - pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { - self.checksum_type = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } - - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_mpu_object_size(&mut self, field: Option) -> &mut Self { - self.mpu_object_size = field; - self - } - - pub fn set_multipart_upload(&mut self, field: Option) -> &mut Self { - self.multipart_upload = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } - - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } - - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } - - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } - - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } - - #[must_use] - pub fn checksum_type(mut self, field: Option) -> Self { - self.checksum_type = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } - - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn mpu_object_size(mut self, field: Option) -> Self { - self.mpu_object_size = field; - self - } - - #[must_use] - pub fn multipart_upload(mut self, field: Option) -> Self { - self.multipart_upload = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let checksum_type = self.checksum_type; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match = self.if_match; - let if_none_match = self.if_none_match; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let mpu_object_size = self.mpu_object_size; - let multipart_upload = self.multipart_upload; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(CompleteMultipartUploadInput { - bucket, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - checksum_type, - expected_bucket_owner, - if_match, - if_none_match, - key, - mpu_object_size, - multipart_upload, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} + +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`CopyObjectInput`] - #[derive(Default)] - pub struct CopyObjectInputBuilder { - acl: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - bucket: Option, +#[must_use] +pub fn bucket_logging_status(mut self, field: BucketLoggingStatus) -> Self { + self.bucket_logging_status = Some(field); +self +} - bucket_key_enabled: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - cache_control: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - content_disposition: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_logging_status = self.bucket_logging_status.ok_or_else(|| BuildError::missing_field("bucket_logging_status"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +Ok(PutBucketLoggingInput { +bucket, +bucket_logging_status, +checksum_algorithm, +content_md5, +expected_bucket_owner, +}) +} - content_encoding: Option, +} - content_language: Option, - content_type: Option, +/// A builder for [`PutBucketMetricsConfigurationInput`] +#[derive(Default)] +pub struct PutBucketMetricsConfigurationInputBuilder { +bucket: Option, - copy_source: Option, +expected_bucket_owner: Option, - copy_source_if_match: Option, +id: Option, - copy_source_if_modified_since: Option, +metrics_configuration: Option, - copy_source_if_none_match: Option, +} - copy_source_if_unmodified_since: Option, +impl PutBucketMetricsConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - copy_source_sse_customer_algorithm: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - copy_source_sse_customer_key: Option, +pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); +self +} - copy_source_sse_customer_key_md5: Option, +pub fn set_metrics_configuration(&mut self, field: MetricsConfiguration) -> &mut Self { + self.metrics_configuration = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - expected_source_bucket_owner: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expires: Option, +#[must_use] +pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); +self +} - grant_full_control: Option, +#[must_use] +pub fn metrics_configuration(mut self, field: MetricsConfiguration) -> Self { + self.metrics_configuration = Some(field); +self +} - grant_read: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; +let metrics_configuration = self.metrics_configuration.ok_or_else(|| BuildError::missing_field("metrics_configuration"))?; +Ok(PutBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +metrics_configuration, +}) +} - grant_read_acp: Option, +} - grant_write_acp: Option, - key: Option, +/// A builder for [`PutBucketNotificationConfigurationInput`] +#[derive(Default)] +pub struct PutBucketNotificationConfigurationInputBuilder { +bucket: Option, - metadata: Option, +expected_bucket_owner: Option, - metadata_directive: Option, +notification_configuration: Option, - object_lock_legal_hold_status: Option, +skip_destination_validation: Option, - object_lock_mode: Option, +} - object_lock_retain_until_date: Option, +impl PutBucketNotificationConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - request_payer: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - sse_customer_algorithm: Option, +pub fn set_notification_configuration(&mut self, field: NotificationConfiguration) -> &mut Self { + self.notification_configuration = Some(field); +self +} - sse_customer_key: Option, +pub fn set_skip_destination_validation(&mut self, field: Option) -> &mut Self { + self.skip_destination_validation = field; +self +} - sse_customer_key_md5: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - ssekms_encryption_context: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - ssekms_key_id: Option, +#[must_use] +pub fn notification_configuration(mut self, field: NotificationConfiguration) -> Self { + self.notification_configuration = Some(field); +self +} - server_side_encryption: Option, +#[must_use] +pub fn skip_destination_validation(mut self, field: Option) -> Self { + self.skip_destination_validation = field; +self +} - storage_class: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let notification_configuration = self.notification_configuration.ok_or_else(|| BuildError::missing_field("notification_configuration"))?; +let skip_destination_validation = self.skip_destination_validation; +Ok(PutBucketNotificationConfigurationInput { +bucket, +expected_bucket_owner, +notification_configuration, +skip_destination_validation, +}) +} - tagging: Option, +} - tagging_directive: Option, - website_redirect_location: Option, - } +/// A builder for [`PutBucketOwnershipControlsInput`] +#[derive(Default)] +pub struct PutBucketOwnershipControlsInputBuilder { +bucket: Option, - impl CopyObjectInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } - - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } - - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } - - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } - - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } - - pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { - self.copy_source = Some(field); - self - } - - pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_match = field; - self - } - - pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_modified_since = field; - self - } - - pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_none_match = field; - self - } - - pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_unmodified_since = field; - self - } - - pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_algorithm = field; - self - } - - pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key = field; - self - } - - pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_source_bucket_owner = field; - self - } - - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } - - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } - - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } - - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } - - pub fn set_metadata_directive(&mut self, field: Option) -> &mut Self { - self.metadata_directive = field; - self - } - - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } - - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } - - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } - - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } - - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } - - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } - - pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; - self - } - - pub fn set_tagging_directive(&mut self, field: Option) -> &mut Self { - self.tagging_directive = field; - self - } - - pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; - self - } - - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } - - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } - - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } - - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } - - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } - - #[must_use] - pub fn copy_source(mut self, field: CopySource) -> Self { - self.copy_source = Some(field); - self - } - - #[must_use] - pub fn copy_source_if_match(mut self, field: Option) -> Self { - self.copy_source_if_match = field; - self - } - - #[must_use] - pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { - self.copy_source_if_modified_since = field; - self - } - - #[must_use] - pub fn copy_source_if_none_match(mut self, field: Option) -> Self { - self.copy_source_if_none_match = field; - self - } - - #[must_use] - pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { - self.copy_source_if_unmodified_since = field; - self - } - - #[must_use] - pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { - self.copy_source_sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key = field; - self - } - - #[must_use] - pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { - self.expected_source_bucket_owner = field; - self - } - - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } - - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } - - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } - - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } - - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } - - #[must_use] - pub fn metadata_directive(mut self, field: Option) -> Self { - self.metadata_directive = field; - self - } - - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } - - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } - - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } - - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } - - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } - - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } - - #[must_use] - pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; - self - } - - #[must_use] - pub fn tagging_directive(mut self, field: Option) -> Self { - self.tagging_directive = field; - self - } - - #[must_use] - pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; - self - } - - pub fn build(self) -> Result { - let acl = self.acl; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_algorithm = self.checksum_algorithm; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_type = self.content_type; - let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; - let copy_source_if_match = self.copy_source_if_match; - let copy_source_if_modified_since = self.copy_source_if_modified_since; - let copy_source_if_none_match = self.copy_source_if_none_match; - let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; - let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; - let copy_source_sse_customer_key = self.copy_source_sse_customer_key; - let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let expected_source_bucket_owner = self.expected_source_bucket_owner; - let expires = self.expires; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write_acp = self.grant_write_acp; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let metadata = self.metadata; - let metadata_directive = self.metadata_directive; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let storage_class = self.storage_class; - let tagging = self.tagging; - let tagging_directive = self.tagging_directive; - let website_redirect_location = self.website_redirect_location; - Ok(CopyObjectInput { - acl, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - content_disposition, - content_encoding, - content_language, - content_type, - copy_source, - copy_source_if_match, - copy_source_if_modified_since, - copy_source_if_none_match, - copy_source_if_unmodified_since, - copy_source_sse_customer_algorithm, - copy_source_sse_customer_key, - copy_source_sse_customer_key_md5, - expected_bucket_owner, - expected_source_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - key, - metadata, - metadata_directive, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - tagging_directive, - website_redirect_location, - }) - } - } +content_md5: Option, - /// A builder for [`CreateBucketInput`] - #[derive(Default)] - pub struct CreateBucketInputBuilder { - acl: Option, +expected_bucket_owner: Option, - bucket: Option, +ownership_controls: Option, - create_bucket_configuration: Option, +} - grant_full_control: Option, +impl PutBucketOwnershipControlsInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - grant_read: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - grant_read_acp: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - grant_write: Option, +pub fn set_ownership_controls(&mut self, field: OwnershipControls) -> &mut Self { + self.ownership_controls = Some(field); +self +} - grant_write_acp: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - object_lock_enabled_for_bucket: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - object_ownership: Option, - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - impl CreateBucketInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_create_bucket_configuration(&mut self, field: Option) -> &mut Self { - self.create_bucket_configuration = field; - self - } - - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } - - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } - - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - - pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; - self - } - - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } - - pub fn set_object_lock_enabled_for_bucket(&mut self, field: Option) -> &mut Self { - self.object_lock_enabled_for_bucket = field; - self - } - - pub fn set_object_ownership(&mut self, field: Option) -> &mut Self { - self.object_ownership = field; - self - } - - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn create_bucket_configuration(mut self, field: Option) -> Self { - self.create_bucket_configuration = field; - self - } - - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } - - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } - - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } - - #[must_use] - pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; - self - } - - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - - #[must_use] - pub fn object_lock_enabled_for_bucket(mut self, field: Option) -> Self { - self.object_lock_enabled_for_bucket = field; - self - } - - #[must_use] - pub fn object_ownership(mut self, field: Option) -> Self { - self.object_ownership = field; - self - } - - pub fn build(self) -> Result { - let acl = self.acl; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let create_bucket_configuration = self.create_bucket_configuration; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write = self.grant_write; - let grant_write_acp = self.grant_write_acp; - let object_lock_enabled_for_bucket = self.object_lock_enabled_for_bucket; - let object_ownership = self.object_ownership; - Ok(CreateBucketInput { - acl, - bucket, - create_bucket_configuration, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - object_lock_enabled_for_bucket, - object_ownership, - }) - } - } +#[must_use] +pub fn ownership_controls(mut self, field: OwnershipControls) -> Self { + self.ownership_controls = Some(field); +self +} - /// A builder for [`CreateBucketMetadataTableConfigurationInput`] - #[derive(Default)] - pub struct CreateBucketMetadataTableConfigurationInputBuilder { - bucket: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let ownership_controls = self.ownership_controls.ok_or_else(|| BuildError::missing_field("ownership_controls"))?; +Ok(PutBucketOwnershipControlsInput { +bucket, +content_md5, +expected_bucket_owner, +ownership_controls, +}) +} - checksum_algorithm: Option, +} - content_md5: Option, - expected_bucket_owner: Option, +/// A builder for [`PutBucketPolicyInput`] +#[derive(Default)] +pub struct PutBucketPolicyInputBuilder { +bucket: Option, - metadata_table_configuration: Option, - } +checksum_algorithm: Option, - impl CreateBucketMetadataTableConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_metadata_table_configuration(&mut self, field: MetadataTableConfiguration) -> &mut Self { - self.metadata_table_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn metadata_table_configuration(mut self, field: MetadataTableConfiguration) -> Self { - self.metadata_table_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let metadata_table_configuration = self - .metadata_table_configuration - .ok_or_else(|| BuildError::missing_field("metadata_table_configuration"))?; - Ok(CreateBucketMetadataTableConfigurationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - metadata_table_configuration, - }) - } - } +confirm_remove_self_bucket_access: Option, - /// A builder for [`CreateMultipartUploadInput`] - #[derive(Default)] - pub struct CreateMultipartUploadInputBuilder { - acl: Option, +content_md5: Option, - bucket: Option, +expected_bucket_owner: Option, - bucket_key_enabled: Option, +policy: Option, - cache_control: Option, +} - checksum_algorithm: Option, +impl PutBucketPolicyInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - checksum_type: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - content_disposition: Option, +pub fn set_confirm_remove_self_bucket_access(&mut self, field: Option) -> &mut Self { + self.confirm_remove_self_bucket_access = field; +self +} - content_encoding: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - content_language: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - content_type: Option, +pub fn set_policy(&mut self, field: Policy) -> &mut Self { + self.policy = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - expires: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - grant_full_control: Option, +#[must_use] +pub fn confirm_remove_self_bucket_access(mut self, field: Option) -> Self { + self.confirm_remove_self_bucket_access = field; +self +} - grant_read: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - grant_read_acp: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - grant_write_acp: Option, +#[must_use] +pub fn policy(mut self, field: Policy) -> Self { + self.policy = Some(field); +self +} - key: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let confirm_remove_self_bucket_access = self.confirm_remove_self_bucket_access; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let policy = self.policy.ok_or_else(|| BuildError::missing_field("policy"))?; +Ok(PutBucketPolicyInput { +bucket, +checksum_algorithm, +confirm_remove_self_bucket_access, +content_md5, +expected_bucket_owner, +policy, +}) +} - metadata: Option, +} - object_lock_legal_hold_status: Option, - object_lock_mode: Option, +/// A builder for [`PutBucketReplicationInput`] +#[derive(Default)] +pub struct PutBucketReplicationInputBuilder { +bucket: Option, - object_lock_retain_until_date: Option, +checksum_algorithm: Option, - request_payer: Option, +content_md5: Option, - sse_customer_algorithm: Option, +expected_bucket_owner: Option, - sse_customer_key: Option, +replication_configuration: Option, - sse_customer_key_md5: Option, +token: Option, - ssekms_encryption_context: Option, +} - ssekms_key_id: Option, +impl PutBucketReplicationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - server_side_encryption: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - storage_class: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - tagging: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - website_redirect_location: Option, - } +pub fn set_replication_configuration(&mut self, field: ReplicationConfiguration) -> &mut Self { + self.replication_configuration = Some(field); +self +} - impl CreateMultipartUploadInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } - - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { - self.checksum_type = field; - self - } - - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } - - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } - - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } - - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } - - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } - - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } - - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } - - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } - - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } - - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } - - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } - - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } - - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } - - pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; - self - } - - pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; - self - } - - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } - - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn checksum_type(mut self, field: Option) -> Self { - self.checksum_type = field; - self - } - - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } - - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } - - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } - - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } - - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } - - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } - - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } - - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } - - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } - - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } - - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } - - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } - - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } - - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } - - #[must_use] - pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; - self - } - - #[must_use] - pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; - self - } - - pub fn build(self) -> Result { - let acl = self.acl; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_algorithm = self.checksum_algorithm; - let checksum_type = self.checksum_type; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_type = self.content_type; - let expected_bucket_owner = self.expected_bucket_owner; - let expires = self.expires; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write_acp = self.grant_write_acp; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let metadata = self.metadata; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let storage_class = self.storage_class; - let tagging = self.tagging; - let website_redirect_location = self.website_redirect_location; - Ok(CreateMultipartUploadInput { - acl, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_type, - content_disposition, - content_encoding, - content_language, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - website_redirect_location, - }) - } - } +pub fn set_token(&mut self, field: Option) -> &mut Self { + self.token = field; +self +} - /// A builder for [`CreateSessionInput`] - #[derive(Default)] - pub struct CreateSessionInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - bucket_key_enabled: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - ssekms_encryption_context: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - ssekms_key_id: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - server_side_encryption: Option, +#[must_use] +pub fn replication_configuration(mut self, field: ReplicationConfiguration) -> Self { + self.replication_configuration = Some(field); +self +} - session_mode: Option, - } +#[must_use] +pub fn token(mut self, field: Option) -> Self { + self.token = field; +self +} - impl CreateSessionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } - - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } - - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } - - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } - - pub fn set_session_mode(&mut self, field: Option) -> &mut Self { - self.session_mode = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } - - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } - - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } - - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } - - #[must_use] - pub fn session_mode(mut self, field: Option) -> Self { - self.session_mode = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let session_mode = self.session_mode; - Ok(CreateSessionInput { - bucket, - bucket_key_enabled, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - session_mode, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let replication_configuration = self.replication_configuration.ok_or_else(|| BuildError::missing_field("replication_configuration"))?; +let token = self.token; +Ok(PutBucketReplicationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +replication_configuration, +token, +}) +} - /// A builder for [`DeleteBucketInput`] - #[derive(Default)] - pub struct DeleteBucketInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - } - impl DeleteBucketInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketInput { - bucket, - expected_bucket_owner, - }) - } - } +/// A builder for [`PutBucketRequestPaymentInput`] +#[derive(Default)] +pub struct PutBucketRequestPaymentInputBuilder { +bucket: Option, - /// A builder for [`DeleteBucketAnalyticsConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketAnalyticsConfigurationInputBuilder { - bucket: Option, +checksum_algorithm: Option, - expected_bucket_owner: Option, +content_md5: Option, - id: Option, - } +expected_bucket_owner: Option, - impl DeleteBucketAnalyticsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(DeleteBucketAnalyticsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +request_payment_configuration: Option, - /// A builder for [`DeleteBucketCorsInput`] - #[derive(Default)] - pub struct DeleteBucketCorsInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - } +impl PutBucketRequestPaymentInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - impl DeleteBucketCorsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketCorsInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - /// A builder for [`DeleteBucketEncryptionInput`] - #[derive(Default)] - pub struct DeleteBucketEncryptionInputBuilder { - bucket: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - impl DeleteBucketEncryptionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketEncryptionInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_request_payment_configuration(&mut self, field: RequestPaymentConfiguration) -> &mut Self { + self.request_payment_configuration = Some(field); +self +} - /// A builder for [`DeleteBucketIntelligentTieringConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketIntelligentTieringConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - id: Option, - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - impl DeleteBucketIntelligentTieringConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(DeleteBucketIntelligentTieringConfigurationInput { bucket, id }) - } - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - /// A builder for [`DeleteBucketInventoryConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketInventoryConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn request_payment_configuration(mut self, field: RequestPaymentConfiguration) -> Self { + self.request_payment_configuration = Some(field); +self +} - id: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let request_payment_configuration = self.request_payment_configuration.ok_or_else(|| BuildError::missing_field("request_payment_configuration"))?; +Ok(PutBucketRequestPaymentInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +request_payment_configuration, +}) +} - impl DeleteBucketInventoryConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(DeleteBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +} - /// A builder for [`DeleteBucketLifecycleInput`] - #[derive(Default)] - pub struct DeleteBucketLifecycleInputBuilder { - bucket: Option, - expected_bucket_owner: Option, - } +/// A builder for [`PutBucketTaggingInput`] +#[derive(Default)] +pub struct PutBucketTaggingInputBuilder { +bucket: Option, - impl DeleteBucketLifecycleInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketLifecycleInput { - bucket, - expected_bucket_owner, - }) - } - } +checksum_algorithm: Option, - /// A builder for [`DeleteBucketMetadataTableConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketMetadataTableConfigurationInputBuilder { - bucket: Option, +content_md5: Option, - expected_bucket_owner: Option, - } +expected_bucket_owner: Option, - impl DeleteBucketMetadataTableConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketMetadataTableConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +tagging: Option, - /// A builder for [`DeleteBucketMetricsConfigurationInput`] - #[derive(Default)] - pub struct DeleteBucketMetricsConfigurationInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, +impl PutBucketTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - id: Option, - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - impl DeleteBucketMetricsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(DeleteBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - /// A builder for [`DeleteBucketOwnershipControlsInput`] - #[derive(Default)] - pub struct DeleteBucketOwnershipControlsInputBuilder { - bucket: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { + self.tagging = Some(field); +self +} - impl DeleteBucketOwnershipControlsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketOwnershipControlsInput { - bucket, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`DeleteBucketPolicyInput`] - #[derive(Default)] - pub struct DeleteBucketPolicyInputBuilder { - bucket: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - impl DeleteBucketPolicyInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketPolicyInput { - bucket, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`DeleteBucketReplicationInput`] - #[derive(Default)] - pub struct DeleteBucketReplicationInputBuilder { - bucket: Option, +#[must_use] +pub fn tagging(mut self, field: Tagging) -> Self { + self.tagging = Some(field); +self +} - expected_bucket_owner: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; +Ok(PutBucketTaggingInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +tagging, +}) +} - impl DeleteBucketReplicationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketReplicationInput { - bucket, - expected_bucket_owner, - }) - } - } +} - /// A builder for [`DeleteBucketTaggingInput`] - #[derive(Default)] - pub struct DeleteBucketTaggingInputBuilder { - bucket: Option, - expected_bucket_owner: Option, - } +/// A builder for [`PutBucketVersioningInput`] +#[derive(Default)] +pub struct PutBucketVersioningInputBuilder { +bucket: Option, - impl DeleteBucketTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketTaggingInput { - bucket, - expected_bucket_owner, - }) - } - } +checksum_algorithm: Option, - /// A builder for [`DeleteBucketWebsiteInput`] - #[derive(Default)] - pub struct DeleteBucketWebsiteInputBuilder { - bucket: Option, +content_md5: Option, - expected_bucket_owner: Option, - } +expected_bucket_owner: Option, - impl DeleteBucketWebsiteInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeleteBucketWebsiteInput { - bucket, - expected_bucket_owner, - }) - } - } +mfa: Option, - /// A builder for [`DeleteObjectInput`] - #[derive(Default)] - pub struct DeleteObjectInputBuilder { - bucket: Option, +versioning_configuration: Option, - bypass_governance_retention: Option, +} - expected_bucket_owner: Option, +impl PutBucketVersioningInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - if_match: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - if_match_last_modified_time: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - if_match_size: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - key: Option, +pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; +self +} - mfa: Option, +pub fn set_versioning_configuration(&mut self, field: VersioningConfiguration) -> &mut Self { + self.versioning_configuration = Some(field); +self +} - request_payer: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - version_id: Option, - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - impl DeleteObjectInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } - - pub fn set_if_match_last_modified_time(&mut self, field: Option) -> &mut Self { - self.if_match_last_modified_time = field; - self - } - - pub fn set_if_match_size(&mut self, field: Option) -> &mut Self { - self.if_match_size = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } - - #[must_use] - pub fn if_match_last_modified_time(mut self, field: Option) -> Self { - self.if_match_last_modified_time = field; - self - } - - #[must_use] - pub fn if_match_size(mut self, field: Option) -> Self { - self.if_match_size = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bypass_governance_retention = self.bypass_governance_retention; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match = self.if_match; - let if_match_last_modified_time = self.if_match_last_modified_time; - let if_match_size = self.if_match_size; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let mfa = self.mfa; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(DeleteObjectInput { - bucket, - bypass_governance_retention, - expected_bucket_owner, - if_match, - if_match_last_modified_time, - if_match_size, - key, - mfa, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - /// A builder for [`DeleteObjectTaggingInput`] - #[derive(Default)] - pub struct DeleteObjectTaggingInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; +self +} - key: Option, +#[must_use] +pub fn versioning_configuration(mut self, field: VersioningConfiguration) -> Self { + self.versioning_configuration = Some(field); +self +} - version_id: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let mfa = self.mfa; +let versioning_configuration = self.versioning_configuration.ok_or_else(|| BuildError::missing_field("versioning_configuration"))?; +Ok(PutBucketVersioningInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +mfa, +versioning_configuration, +}) +} - impl DeleteObjectTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let version_id = self.version_id; - Ok(DeleteObjectTaggingInput { - bucket, - expected_bucket_owner, - key, - version_id, - }) - } - } +} - /// A builder for [`DeleteObjectsInput`] - #[derive(Default)] - pub struct DeleteObjectsInputBuilder { - bucket: Option, - bypass_governance_retention: Option, +/// A builder for [`PutBucketWebsiteInput`] +#[derive(Default)] +pub struct PutBucketWebsiteInputBuilder { +bucket: Option, - checksum_algorithm: Option, +checksum_algorithm: Option, - delete: Option, +content_md5: Option, - expected_bucket_owner: Option, +expected_bucket_owner: Option, - mfa: Option, +website_configuration: Option, - request_payer: Option, - } +} - impl DeleteObjectsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_delete(&mut self, field: Delete) -> &mut Self { - self.delete = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn delete(mut self, field: Delete) -> Self { - self.delete = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bypass_governance_retention = self.bypass_governance_retention; - let checksum_algorithm = self.checksum_algorithm; - let delete = self.delete.ok_or_else(|| BuildError::missing_field("delete"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let mfa = self.mfa; - let request_payer = self.request_payer; - Ok(DeleteObjectsInput { - bucket, - bypass_governance_retention, - checksum_algorithm, - delete, - expected_bucket_owner, - mfa, - request_payer, - }) - } - } +impl PutBucketWebsiteInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - /// A builder for [`DeletePublicAccessBlockInput`] - #[derive(Default)] - pub struct DeletePublicAccessBlockInputBuilder { - bucket: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - impl DeletePublicAccessBlockInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(DeletePublicAccessBlockInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`GetBucketAccelerateConfigurationInput`] - #[derive(Default)] - pub struct GetBucketAccelerateConfigurationInputBuilder { - bucket: Option, +pub fn set_website_configuration(&mut self, field: WebsiteConfiguration) -> &mut Self { + self.website_configuration = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - request_payer: Option, - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - impl GetBucketAccelerateConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let request_payer = self.request_payer; - Ok(GetBucketAccelerateConfigurationInput { - bucket, - expected_bucket_owner, - request_payer, - }) - } - } +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - /// A builder for [`GetBucketAclInput`] - #[derive(Default)] - pub struct GetBucketAclInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn website_configuration(mut self, field: WebsiteConfiguration) -> Self { + self.website_configuration = Some(field); +self +} - impl GetBucketAclInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketAclInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let website_configuration = self.website_configuration.ok_or_else(|| BuildError::missing_field("website_configuration"))?; +Ok(PutBucketWebsiteInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +website_configuration, +}) +} - /// A builder for [`GetBucketAnalyticsConfigurationInput`] - #[derive(Default)] - pub struct GetBucketAnalyticsConfigurationInputBuilder { - bucket: Option, +} - expected_bucket_owner: Option, - id: Option, - } +/// A builder for [`PutObjectInput`] +#[derive(Default)] +pub struct PutObjectInputBuilder { +acl: Option, - impl GetBucketAnalyticsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(GetBucketAnalyticsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +body: Option, - /// A builder for [`GetBucketCorsInput`] - #[derive(Default)] - pub struct GetBucketCorsInputBuilder { - bucket: Option, +bucket: Option, - expected_bucket_owner: Option, - } +bucket_key_enabled: Option, - impl GetBucketCorsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketCorsInput { - bucket, - expected_bucket_owner, - }) - } - } +cache_control: Option, - /// A builder for [`GetBucketEncryptionInput`] - #[derive(Default)] - pub struct GetBucketEncryptionInputBuilder { - bucket: Option, +checksum_algorithm: Option, - expected_bucket_owner: Option, - } +checksum_crc32: Option, - impl GetBucketEncryptionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketEncryptionInput { - bucket, - expected_bucket_owner, - }) - } - } +checksum_crc32c: Option, - /// A builder for [`GetBucketIntelligentTieringConfigurationInput`] - #[derive(Default)] - pub struct GetBucketIntelligentTieringConfigurationInputBuilder { - bucket: Option, +checksum_crc64nvme: Option, - id: Option, - } +checksum_sha1: Option, - impl GetBucketIntelligentTieringConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(GetBucketIntelligentTieringConfigurationInput { bucket, id }) - } - } +checksum_sha256: Option, - /// A builder for [`GetBucketInventoryConfigurationInput`] - #[derive(Default)] - pub struct GetBucketInventoryConfigurationInputBuilder { - bucket: Option, +content_disposition: Option, - expected_bucket_owner: Option, +content_encoding: Option, - id: Option, - } +content_language: Option, - impl GetBucketInventoryConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(GetBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +content_length: Option, - /// A builder for [`GetBucketLifecycleConfigurationInput`] - #[derive(Default)] - pub struct GetBucketLifecycleConfigurationInputBuilder { - bucket: Option, +content_md5: Option, - expected_bucket_owner: Option, - } +content_type: Option, - impl GetBucketLifecycleConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketLifecycleConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`GetBucketLocationInput`] - #[derive(Default)] - pub struct GetBucketLocationInputBuilder { - bucket: Option, +expires: Option, - expected_bucket_owner: Option, - } +grant_full_control: Option, - impl GetBucketLocationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketLocationInput { - bucket, - expected_bucket_owner, - }) - } - } +grant_read: Option, - /// A builder for [`GetBucketLoggingInput`] - #[derive(Default)] - pub struct GetBucketLoggingInputBuilder { - bucket: Option, +grant_read_acp: Option, - expected_bucket_owner: Option, - } +grant_write_acp: Option, - impl GetBucketLoggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketLoggingInput { - bucket, - expected_bucket_owner, - }) - } - } +if_match: Option, - /// A builder for [`GetBucketMetadataTableConfigurationInput`] - #[derive(Default)] - pub struct GetBucketMetadataTableConfigurationInputBuilder { - bucket: Option, +if_none_match: Option, - expected_bucket_owner: Option, - } +key: Option, - impl GetBucketMetadataTableConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketMetadataTableConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +metadata: Option, - /// A builder for [`GetBucketMetricsConfigurationInput`] - #[derive(Default)] - pub struct GetBucketMetricsConfigurationInputBuilder { - bucket: Option, +object_lock_legal_hold_status: Option, - expected_bucket_owner: Option, +object_lock_mode: Option, - id: Option, - } +object_lock_retain_until_date: Option, - impl GetBucketMetricsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(GetBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } - } +request_payer: Option, - /// A builder for [`GetBucketNotificationConfigurationInput`] - #[derive(Default)] - pub struct GetBucketNotificationConfigurationInputBuilder { - bucket: Option, +sse_customer_algorithm: Option, - expected_bucket_owner: Option, - } +sse_customer_key: Option, - impl GetBucketNotificationConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketNotificationConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +sse_customer_key_md5: Option, - /// A builder for [`GetBucketOwnershipControlsInput`] - #[derive(Default)] - pub struct GetBucketOwnershipControlsInputBuilder { - bucket: Option, +ssekms_encryption_context: Option, - expected_bucket_owner: Option, - } +ssekms_key_id: Option, - impl GetBucketOwnershipControlsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketOwnershipControlsInput { - bucket, - expected_bucket_owner, - }) - } - } +server_side_encryption: Option, - /// A builder for [`GetBucketPolicyInput`] - #[derive(Default)] - pub struct GetBucketPolicyInputBuilder { - bucket: Option, +storage_class: Option, - expected_bucket_owner: Option, - } +tagging: Option, - impl GetBucketPolicyInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketPolicyInput { - bucket, - expected_bucket_owner, - }) - } - } +website_redirect_location: Option, - /// A builder for [`GetBucketPolicyStatusInput`] - #[derive(Default)] - pub struct GetBucketPolicyStatusInputBuilder { - bucket: Option, +write_offset_bytes: Option, - expected_bucket_owner: Option, - } +} - impl GetBucketPolicyStatusInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketPolicyStatusInput { - bucket, - expected_bucket_owner, - }) - } - } +impl PutObjectInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self +} - /// A builder for [`GetBucketReplicationInput`] - #[derive(Default)] - pub struct GetBucketReplicationInputBuilder { - bucket: Option, +pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - impl GetBucketReplicationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketReplicationInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} - /// A builder for [`GetBucketRequestPaymentInput`] - #[derive(Default)] - pub struct GetBucketRequestPaymentInputBuilder { - bucket: Option, +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - impl GetBucketRequestPaymentInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketRequestPaymentInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self +} - /// A builder for [`GetBucketTaggingInput`] - #[derive(Default)] - pub struct GetBucketTaggingInputBuilder { - bucket: Option, +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} - impl GetBucketTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketTaggingInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} - /// A builder for [`GetBucketVersioningInput`] - #[derive(Default)] - pub struct GetBucketVersioningInputBuilder { - bucket: Option, +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self +} - impl GetBucketVersioningInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketVersioningInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self +} - /// A builder for [`GetBucketWebsiteInput`] - #[derive(Default)] - pub struct GetBucketWebsiteInputBuilder { - bucket: Option, +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self +} - expected_bucket_owner: Option, - } +pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; +self +} - impl GetBucketWebsiteInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetBucketWebsiteInput { - bucket, - expected_bucket_owner, - }) - } - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - /// A builder for [`GetObjectInput`] - #[derive(Default)] - pub struct GetObjectInputBuilder { - bucket: Option, +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self +} - checksum_mode: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self +} - if_match: Option, +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self +} - if_modified_since: Option, +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self +} - if_none_match: Option, +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} - if_unmodified_since: Option, +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - key: Option, +pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; +self +} - part_number: Option, +pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; +self +} - range: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - request_payer: Option, +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self +} - response_cache_control: Option, +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self +} - response_content_disposition: Option, +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self +} - response_content_encoding: Option, +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self +} - response_content_language: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - response_content_type: Option, +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - response_expires: Option, +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - sse_customer_algorithm: Option, +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - sse_customer_key: Option, +pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; +self +} - sse_customer_key_md5: Option, +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} - version_id: Option, - } +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} - impl GetObjectInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { - self.checksum_mode = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } - - pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { - self.if_modified_since = field; - self - } - - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } - - pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.if_unmodified_since = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_part_number(&mut self, field: Option) -> &mut Self { - self.part_number = field; - self - } - - pub fn set_range(&mut self, field: Option) -> &mut Self { - self.range = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { - self.response_cache_control = field; - self - } - - pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { - self.response_content_disposition = field; - self - } - - pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { - self.response_content_encoding = field; - self - } - - pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { - self.response_content_language = field; - self - } - - pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { - self.response_content_type = field; - self - } - - pub fn set_response_expires(&mut self, field: Option) -> &mut Self { - self.response_expires = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_mode(mut self, field: Option) -> Self { - self.checksum_mode = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } - - #[must_use] - pub fn if_modified_since(mut self, field: Option) -> Self { - self.if_modified_since = field; - self - } - - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } - - #[must_use] - pub fn if_unmodified_since(mut self, field: Option) -> Self { - self.if_unmodified_since = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn part_number(mut self, field: Option) -> Self { - self.part_number = field; - self - } - - #[must_use] - pub fn range(mut self, field: Option) -> Self { - self.range = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn response_cache_control(mut self, field: Option) -> Self { - self.response_cache_control = field; - self - } - - #[must_use] - pub fn response_content_disposition(mut self, field: Option) -> Self { - self.response_content_disposition = field; - self - } - - #[must_use] - pub fn response_content_encoding(mut self, field: Option) -> Self { - self.response_content_encoding = field; - self - } - - #[must_use] - pub fn response_content_language(mut self, field: Option) -> Self { - self.response_content_language = field; - self - } - - #[must_use] - pub fn response_content_type(mut self, field: Option) -> Self { - self.response_content_type = field; - self - } - - #[must_use] - pub fn response_expires(mut self, field: Option) -> Self { - self.response_expires = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_mode = self.checksum_mode; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match = self.if_match; - let if_modified_since = self.if_modified_since; - let if_none_match = self.if_none_match; - let if_unmodified_since = self.if_unmodified_since; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let part_number = self.part_number; - let range = self.range; - let request_payer = self.request_payer; - let response_cache_control = self.response_cache_control; - let response_content_disposition = self.response_content_disposition; - let response_content_encoding = self.response_content_encoding; - let response_content_language = self.response_content_language; - let response_content_type = self.response_content_type; - let response_expires = self.response_expires; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let version_id = self.version_id; - Ok(GetObjectInput { - bucket, - checksum_mode, - expected_bucket_owner, - if_match, - if_modified_since, - if_none_match, - if_unmodified_since, - key, - part_number, - range, - request_payer, - response_cache_control, - response_content_disposition, - response_content_encoding, - response_content_language, - response_content_type, - response_expires, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } - } +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self +} - /// A builder for [`GetObjectAclInput`] - #[derive(Default)] - pub struct GetObjectAclInputBuilder { - bucket: Option, +pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; +self +} - expected_bucket_owner: Option, +pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; +self +} - key: Option, +pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { + self.write_offset_bytes = field; +self +} - request_payer: Option, +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - version_id: Option, - } +#[must_use] +pub fn body(mut self, field: Option) -> Self { + self.body = field; +self +} - impl GetObjectAclInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(GetObjectAclInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`GetObjectAttributesInput`] - #[derive(Default)] - pub struct GetObjectAttributesInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self +} - key: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - max_parts: Option, +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} - object_attributes: ObjectAttributesList, +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self +} - part_number_marker: Option, +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} - request_payer: Option, +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} - sse_customer_algorithm: Option, +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} - sse_customer_key: Option, +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self +} - sse_customer_key_md5: Option, +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self +} - version_id: Option, - } +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} - impl GetObjectAttributesInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_max_parts(&mut self, field: Option) -> &mut Self { - self.max_parts = field; - self - } - - pub fn set_object_attributes(&mut self, field: ObjectAttributesList) -> &mut Self { - self.object_attributes = field; - self - } - - pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { - self.part_number_marker = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn max_parts(mut self, field: Option) -> Self { - self.max_parts = field; - self - } - - #[must_use] - pub fn object_attributes(mut self, field: ObjectAttributesList) -> Self { - self.object_attributes = field; - self - } - - #[must_use] - pub fn part_number_marker(mut self, field: Option) -> Self { - self.part_number_marker = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let max_parts = self.max_parts; - let object_attributes = self.object_attributes; - let part_number_marker = self.part_number_marker; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let version_id = self.version_id; - Ok(GetObjectAttributesInput { - bucket, - expected_bucket_owner, - key, - max_parts, - object_attributes, - part_number_marker, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } - } +#[must_use] +pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; +self +} - /// A builder for [`GetObjectLegalHoldInput`] - #[derive(Default)] - pub struct GetObjectLegalHoldInputBuilder { - bucket: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self +} - key: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - request_payer: Option, +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} - version_id: Option, - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} - impl GetObjectLegalHoldInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(GetObjectLegalHoldInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self +} - /// A builder for [`GetObjectLockConfigurationInput`] - #[derive(Default)] - pub struct GetObjectLockConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self +} - impl GetObjectLockConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetObjectLockConfigurationInput { - bucket, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; +self +} - /// A builder for [`GetObjectRetentionInput`] - #[derive(Default)] - pub struct GetObjectRetentionInputBuilder { - bucket: Option, +#[must_use] +pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - key: Option, +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self +} - request_payer: Option, +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self +} - version_id: Option, - } +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self +} - impl GetObjectRetentionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(GetObjectRetentionInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} - /// A builder for [`GetObjectTaggingInput`] - #[derive(Default)] - pub struct GetObjectTaggingInputBuilder { - bucket: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - key: Option, +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - request_payer: Option, +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} + +#[must_use] +pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; +self +} + +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} + +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; +self +} + +#[must_use] +pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; +self +} + +#[must_use] +pub fn write_offset_bytes(mut self, field: Option) -> Self { + self.write_offset_bytes = field; +self +} + +pub fn build(self) -> Result { +let acl = self.acl; +let body = self.body; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_algorithm = self.checksum_algorithm; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_length = self.content_length; +let content_md5 = self.content_md5; +let content_type = self.content_type; +let expected_bucket_owner = self.expected_bucket_owner; +let expires = self.expires; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write_acp = self.grant_write_acp; +let if_match = self.if_match; +let if_none_match = self.if_none_match; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let metadata = self.metadata; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_encryption_context = self.ssekms_encryption_context; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let storage_class = self.storage_class; +let tagging = self.tagging; +let website_redirect_location = self.website_redirect_location; +let write_offset_bytes = self.write_offset_bytes; +Ok(PutObjectInput { +acl, +body, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_md5, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +if_match, +if_none_match, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +website_redirect_location, +write_offset_bytes, +}) +} + +} + + +/// A builder for [`PutObjectAclInput`] +#[derive(Default)] +pub struct PutObjectAclInputBuilder { +acl: Option, - version_id: Option, - } +access_control_policy: Option, - impl GetObjectTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(GetObjectTaggingInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } - } +bucket: Option, - /// A builder for [`GetObjectTorrentInput`] - #[derive(Default)] - pub struct GetObjectTorrentInputBuilder { - bucket: Option, +checksum_algorithm: Option, - expected_bucket_owner: Option, +content_md5: Option, - key: Option, +expected_bucket_owner: Option, - request_payer: Option, - } +grant_full_control: Option, - impl GetObjectTorrentInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - Ok(GetObjectTorrentInput { - bucket, - expected_bucket_owner, - key, - request_payer, - }) - } - } +grant_read: Option, - /// A builder for [`GetPublicAccessBlockInput`] - #[derive(Default)] - pub struct GetPublicAccessBlockInputBuilder { - bucket: Option, +grant_read_acp: Option, - expected_bucket_owner: Option, - } +grant_write: Option, - impl GetPublicAccessBlockInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(GetPublicAccessBlockInput { - bucket, - expected_bucket_owner, - }) - } - } +grant_write_acp: Option, - /// A builder for [`HeadBucketInput`] - #[derive(Default)] - pub struct HeadBucketInputBuilder { - bucket: Option, +key: Option, - expected_bucket_owner: Option, - } +request_payer: Option, - impl HeadBucketInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(HeadBucketInput { - bucket, - expected_bucket_owner, - }) - } - } +version_id: Option, - /// A builder for [`HeadObjectInput`] - #[derive(Default)] - pub struct HeadObjectInputBuilder { - bucket: Option, +} - checksum_mode: Option, +impl PutObjectAclInputBuilder { +pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; +self +} - expected_bucket_owner: Option, +pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { + self.access_control_policy = field; +self +} - if_match: Option, +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - if_modified_since: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - if_none_match: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - if_unmodified_since: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - key: Option, +pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; +self +} - part_number: Option, +pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; +self +} - range: Option, +pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; +self +} - request_payer: Option, +pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; +self +} - response_cache_control: Option, +pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; +self +} - response_content_disposition: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - response_content_encoding: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - response_content_language: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - response_content_type: Option, +#[must_use] +pub fn acl(mut self, field: Option) -> Self { + self.acl = field; +self +} - response_expires: Option, +#[must_use] +pub fn access_control_policy(mut self, field: Option) -> Self { + self.access_control_policy = field; +self +} - sse_customer_algorithm: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - sse_customer_key: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - sse_customer_key_md5: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - version_id: Option, - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - impl HeadObjectInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { - self.checksum_mode = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } - - pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { - self.if_modified_since = field; - self - } - - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } - - pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.if_unmodified_since = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_part_number(&mut self, field: Option) -> &mut Self { - self.part_number = field; - self - } - - pub fn set_range(&mut self, field: Option) -> &mut Self { - self.range = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { - self.response_cache_control = field; - self - } - - pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { - self.response_content_disposition = field; - self - } - - pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { - self.response_content_encoding = field; - self - } - - pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { - self.response_content_language = field; - self - } - - pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { - self.response_content_type = field; - self - } - - pub fn set_response_expires(&mut self, field: Option) -> &mut Self { - self.response_expires = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_mode(mut self, field: Option) -> Self { - self.checksum_mode = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } - - #[must_use] - pub fn if_modified_since(mut self, field: Option) -> Self { - self.if_modified_since = field; - self - } - - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } - - #[must_use] - pub fn if_unmodified_since(mut self, field: Option) -> Self { - self.if_unmodified_since = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn part_number(mut self, field: Option) -> Self { - self.part_number = field; - self - } - - #[must_use] - pub fn range(mut self, field: Option) -> Self { - self.range = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn response_cache_control(mut self, field: Option) -> Self { - self.response_cache_control = field; - self - } - - #[must_use] - pub fn response_content_disposition(mut self, field: Option) -> Self { - self.response_content_disposition = field; - self - } - - #[must_use] - pub fn response_content_encoding(mut self, field: Option) -> Self { - self.response_content_encoding = field; - self - } - - #[must_use] - pub fn response_content_language(mut self, field: Option) -> Self { - self.response_content_language = field; - self - } - - #[must_use] - pub fn response_content_type(mut self, field: Option) -> Self { - self.response_content_type = field; - self - } - - #[must_use] - pub fn response_expires(mut self, field: Option) -> Self { - self.response_expires = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_mode = self.checksum_mode; - let expected_bucket_owner = self.expected_bucket_owner; - let if_match = self.if_match; - let if_modified_since = self.if_modified_since; - let if_none_match = self.if_none_match; - let if_unmodified_since = self.if_unmodified_since; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let part_number = self.part_number; - let range = self.range; - let request_payer = self.request_payer; - let response_cache_control = self.response_cache_control; - let response_content_disposition = self.response_content_disposition; - let response_content_encoding = self.response_content_encoding; - let response_content_language = self.response_content_language; - let response_content_type = self.response_content_type; - let response_expires = self.response_expires; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let version_id = self.version_id; - Ok(HeadObjectInput { - bucket, - checksum_mode, - expected_bucket_owner, - if_match, - if_modified_since, - if_none_match, - if_unmodified_since, - key, - part_number, - range, - request_payer, - response_cache_control, - response_content_disposition, - response_content_encoding, - response_content_language, - response_content_type, - response_expires, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } - } +#[must_use] +pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; +self +} - /// A builder for [`ListBucketAnalyticsConfigurationsInput`] - #[derive(Default)] - pub struct ListBucketAnalyticsConfigurationsInputBuilder { - bucket: Option, +#[must_use] +pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; +self +} - continuation_token: Option, +#[must_use] +pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; +self +} - expected_bucket_owner: Option, - } +#[must_use] +pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; +self +} - impl ListBucketAnalyticsConfigurationsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(ListBucketAnalyticsConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } - } +#[must_use] +pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; +self +} - /// A builder for [`ListBucketIntelligentTieringConfigurationsInput`] - #[derive(Default)] - pub struct ListBucketIntelligentTieringConfigurationsInputBuilder { - bucket: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - continuation_token: Option, - } +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - impl ListBucketIntelligentTieringConfigurationsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - Ok(ListBucketIntelligentTieringConfigurationsInput { - bucket, - continuation_token, - }) - } - } +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - /// A builder for [`ListBucketInventoryConfigurationsInput`] - #[derive(Default)] - pub struct ListBucketInventoryConfigurationsInputBuilder { - bucket: Option, +pub fn build(self) -> Result { +let acl = self.acl; +let access_control_policy = self.access_control_policy; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let grant_full_control = self.grant_full_control; +let grant_read = self.grant_read; +let grant_read_acp = self.grant_read_acp; +let grant_write = self.grant_write; +let grant_write_acp = self.grant_write_acp; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(PutObjectAclInput { +acl, +access_control_policy, +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +key, +request_payer, +version_id, +}) +} - continuation_token: Option, +} - expected_bucket_owner: Option, - } - impl ListBucketInventoryConfigurationsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(ListBucketInventoryConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } - } +/// A builder for [`PutObjectLegalHoldInput`] +#[derive(Default)] +pub struct PutObjectLegalHoldInputBuilder { +bucket: Option, - /// A builder for [`ListBucketMetricsConfigurationsInput`] - #[derive(Default)] - pub struct ListBucketMetricsConfigurationsInputBuilder { - bucket: Option, +checksum_algorithm: Option, - continuation_token: Option, +content_md5: Option, - expected_bucket_owner: Option, - } +expected_bucket_owner: Option, - impl ListBucketMetricsConfigurationsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(ListBucketMetricsConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } - } +key: Option, - /// A builder for [`ListBucketsInput`] - #[derive(Default)] - pub struct ListBucketsInputBuilder { - bucket_region: Option, +legal_hold: Option, - continuation_token: Option, +request_payer: Option, - max_buckets: Option, +version_id: Option, - prefix: Option, - } +} - impl ListBucketsInputBuilder { - pub fn set_bucket_region(&mut self, field: Option) -> &mut Self { - self.bucket_region = field; - self - } - - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } - - pub fn set_max_buckets(&mut self, field: Option) -> &mut Self { - self.max_buckets = field; - self - } - - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } - - #[must_use] - pub fn bucket_region(mut self, field: Option) -> Self { - self.bucket_region = field; - self - } - - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } - - #[must_use] - pub fn max_buckets(mut self, field: Option) -> Self { - self.max_buckets = field; - self - } - - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } - - pub fn build(self) -> Result { - let bucket_region = self.bucket_region; - let continuation_token = self.continuation_token; - let max_buckets = self.max_buckets; - let prefix = self.prefix; - Ok(ListBucketsInput { - bucket_region, - continuation_token, - max_buckets, - prefix, - }) - } - } +impl PutObjectLegalHoldInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - /// A builder for [`ListDirectoryBucketsInput`] - #[derive(Default)] - pub struct ListDirectoryBucketsInputBuilder { - continuation_token: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - max_directory_buckets: Option, - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - impl ListDirectoryBucketsInputBuilder { - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } - - pub fn set_max_directory_buckets(&mut self, field: Option) -> &mut Self { - self.max_directory_buckets = field; - self - } - - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } - - #[must_use] - pub fn max_directory_buckets(mut self, field: Option) -> Self { - self.max_directory_buckets = field; - self - } - - pub fn build(self) -> Result { - let continuation_token = self.continuation_token; - let max_directory_buckets = self.max_directory_buckets; - Ok(ListDirectoryBucketsInput { - continuation_token, - max_directory_buckets, - }) - } - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - /// A builder for [`ListMultipartUploadsInput`] - #[derive(Default)] - pub struct ListMultipartUploadsInputBuilder { - bucket: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - delimiter: Option, +pub fn set_legal_hold(&mut self, field: Option) -> &mut Self { + self.legal_hold = field; +self +} - encoding_type: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - expected_bucket_owner: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - key_marker: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - max_uploads: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - prefix: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - request_payer: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - upload_id_marker: Option, - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - impl ListMultipartUploadsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; - self - } - - pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key_marker(&mut self, field: Option) -> &mut Self { - self.key_marker = field; - self - } - - pub fn set_max_uploads(&mut self, field: Option) -> &mut Self { - self.max_uploads = field; - self - } - - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_upload_id_marker(&mut self, field: Option) -> &mut Self { - self.upload_id_marker = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; - self - } - - #[must_use] - pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key_marker(mut self, field: Option) -> Self { - self.key_marker = field; - self - } - - #[must_use] - pub fn max_uploads(mut self, field: Option) -> Self { - self.max_uploads = field; - self - } - - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn upload_id_marker(mut self, field: Option) -> Self { - self.upload_id_marker = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let delimiter = self.delimiter; - let encoding_type = self.encoding_type; - let expected_bucket_owner = self.expected_bucket_owner; - let key_marker = self.key_marker; - let max_uploads = self.max_uploads; - let prefix = self.prefix; - let request_payer = self.request_payer; - let upload_id_marker = self.upload_id_marker; - Ok(ListMultipartUploadsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - key_marker, - max_uploads, - prefix, - request_payer, - upload_id_marker, - }) - } - } +#[must_use] +pub fn legal_hold(mut self, field: Option) -> Self { + self.legal_hold = field; +self +} - /// A builder for [`ListObjectVersionsInput`] - #[derive(Default)] - pub struct ListObjectVersionsInputBuilder { - bucket: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - delimiter: Option, +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - encoding_type: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let legal_hold = self.legal_hold; +let request_payer = self.request_payer; +let version_id = self.version_id; +Ok(PutObjectLegalHoldInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +legal_hold, +request_payer, +version_id, +}) +} - expected_bucket_owner: Option, +} - key_marker: Option, - max_keys: Option, +/// A builder for [`PutObjectLockConfigurationInput`] +#[derive(Default)] +pub struct PutObjectLockConfigurationInputBuilder { +bucket: Option, - optional_object_attributes: Option, +checksum_algorithm: Option, - prefix: Option, +content_md5: Option, - request_payer: Option, +expected_bucket_owner: Option, - version_id_marker: Option, - } +object_lock_configuration: Option, - impl ListObjectVersionsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; - self - } - - pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key_marker(&mut self, field: Option) -> &mut Self { - self.key_marker = field; - self - } - - pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; - self - } - - pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; - self - } - - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_version_id_marker(&mut self, field: Option) -> &mut Self { - self.version_id_marker = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; - self - } - - #[must_use] - pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key_marker(mut self, field: Option) -> Self { - self.key_marker = field; - self - } - - #[must_use] - pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; - self - } - - #[must_use] - pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; - self - } - - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn version_id_marker(mut self, field: Option) -> Self { - self.version_id_marker = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let delimiter = self.delimiter; - let encoding_type = self.encoding_type; - let expected_bucket_owner = self.expected_bucket_owner; - let key_marker = self.key_marker; - let max_keys = self.max_keys; - let optional_object_attributes = self.optional_object_attributes; - let prefix = self.prefix; - let request_payer = self.request_payer; - let version_id_marker = self.version_id_marker; - Ok(ListObjectVersionsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - key_marker, - max_keys, - optional_object_attributes, - prefix, - request_payer, - version_id_marker, - }) - } - } +request_payer: Option, - /// A builder for [`ListObjectsInput`] - #[derive(Default)] - pub struct ListObjectsInputBuilder { - bucket: Option, +token: Option, - delimiter: Option, +} - encoding_type: Option, +impl PutObjectLockConfigurationInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - marker: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - max_keys: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - optional_object_attributes: Option, +pub fn set_object_lock_configuration(&mut self, field: Option) -> &mut Self { + self.object_lock_configuration = field; +self +} - prefix: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - request_payer: Option, - } +pub fn set_token(&mut self, field: Option) -> &mut Self { + self.token = field; +self +} - impl ListObjectsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; - self - } - - pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_marker(&mut self, field: Option) -> &mut Self { - self.marker = field; - self - } - - pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; - self - } - - pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; - self - } - - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; - self - } - - #[must_use] - pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn marker(mut self, field: Option) -> Self { - self.marker = field; - self - } - - #[must_use] - pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; - self - } - - #[must_use] - pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; - self - } - - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let delimiter = self.delimiter; - let encoding_type = self.encoding_type; - let expected_bucket_owner = self.expected_bucket_owner; - let marker = self.marker; - let max_keys = self.max_keys; - let optional_object_attributes = self.optional_object_attributes; - let prefix = self.prefix; - let request_payer = self.request_payer; - Ok(ListObjectsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - marker, - max_keys, - optional_object_attributes, - prefix, - request_payer, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`ListObjectsV2Input`] - #[derive(Default)] - pub struct ListObjectsV2InputBuilder { - bucket: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - continuation_token: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - delimiter: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - encoding_type: Option, +#[must_use] +pub fn object_lock_configuration(mut self, field: Option) -> Self { + self.object_lock_configuration = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - fetch_owner: Option, +#[must_use] +pub fn token(mut self, field: Option) -> Self { + self.token = field; +self +} - max_keys: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let object_lock_configuration = self.object_lock_configuration; +let request_payer = self.request_payer; +let token = self.token; +Ok(PutObjectLockConfigurationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +object_lock_configuration, +request_payer, +token, +}) +} - optional_object_attributes: Option, +} - prefix: Option, - request_payer: Option, +/// A builder for [`PutObjectRetentionInput`] +#[derive(Default)] +pub struct PutObjectRetentionInputBuilder { +bucket: Option, - start_after: Option, - } +bypass_governance_retention: Option, - impl ListObjectsV2InputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; - self - } - - pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; - self - } - - pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_fetch_owner(&mut self, field: Option) -> &mut Self { - self.fetch_owner = field; - self - } - - pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; - self - } - - pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; - self - } - - pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_start_after(&mut self, field: Option) -> &mut Self { - self.start_after = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; - self - } - - #[must_use] - pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; - self - } - - #[must_use] - pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn fetch_owner(mut self, field: Option) -> Self { - self.fetch_owner = field; - self - } - - #[must_use] - pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; - self - } - - #[must_use] - pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; - self - } - - #[must_use] - pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn start_after(mut self, field: Option) -> Self { - self.start_after = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let continuation_token = self.continuation_token; - let delimiter = self.delimiter; - let encoding_type = self.encoding_type; - let expected_bucket_owner = self.expected_bucket_owner; - let fetch_owner = self.fetch_owner; - let max_keys = self.max_keys; - let optional_object_attributes = self.optional_object_attributes; - let prefix = self.prefix; - let request_payer = self.request_payer; - let start_after = self.start_after; - Ok(ListObjectsV2Input { - bucket, - continuation_token, - delimiter, - encoding_type, - expected_bucket_owner, - fetch_owner, - max_keys, - optional_object_attributes, - prefix, - request_payer, - start_after, - }) - } - } +checksum_algorithm: Option, - /// A builder for [`ListPartsInput`] - #[derive(Default)] - pub struct ListPartsInputBuilder { - bucket: Option, +content_md5: Option, - expected_bucket_owner: Option, +expected_bucket_owner: Option, - key: Option, +key: Option, - max_parts: Option, +request_payer: Option, - part_number_marker: Option, +retention: Option, - request_payer: Option, +version_id: Option, - sse_customer_algorithm: Option, +} - sse_customer_key: Option, +impl PutObjectRetentionInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - sse_customer_key_md5: Option, +pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; +self +} - upload_id: Option, - } +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - impl ListPartsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_max_parts(&mut self, field: Option) -> &mut Self { - self.max_parts = field; - self - } - - pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { - self.part_number_marker = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn max_parts(mut self, field: Option) -> Self { - self.max_parts = field; - self - } - - #[must_use] - pub fn part_number_marker(mut self, field: Option) -> Self { - self.part_number_marker = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let max_parts = self.max_parts; - let part_number_marker = self.part_number_marker; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(ListPartsInput { - bucket, - expected_bucket_owner, - key, - max_parts, - part_number_marker, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } - } +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - /// A builder for [`PostObjectInput`] - #[derive(Default)] - pub struct PostObjectInputBuilder { - acl: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - body: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - bucket: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - bucket_key_enabled: Option, +pub fn set_retention(&mut self, field: Option) -> &mut Self { + self.retention = field; +self +} - cache_control: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - checksum_crc32: Option, +#[must_use] +pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; +self +} - checksum_crc32c: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - checksum_crc64nvme: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - checksum_sha1: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - checksum_sha256: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - content_disposition: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - content_encoding: Option, +#[must_use] +pub fn retention(mut self, field: Option) -> Self { + self.retention = field; +self +} - content_language: Option, +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - content_length: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let bypass_governance_retention = self.bypass_governance_retention; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let retention = self.retention; +let version_id = self.version_id; +Ok(PutObjectRetentionInput { +bucket, +bypass_governance_retention, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +request_payer, +retention, +version_id, +}) +} - content_md5: Option, +} - content_type: Option, - expected_bucket_owner: Option, +/// A builder for [`PutObjectTaggingInput`] +#[derive(Default)] +pub struct PutObjectTaggingInputBuilder { +bucket: Option, - expires: Option, +checksum_algorithm: Option, - grant_full_control: Option, +content_md5: Option, - grant_read: Option, +expected_bucket_owner: Option, - grant_read_acp: Option, +key: Option, - grant_write_acp: Option, +request_payer: Option, - if_match: Option, +tagging: Option, - if_none_match: Option, +version_id: Option, - key: Option, +} - metadata: Option, +impl PutObjectTaggingInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - object_lock_legal_hold_status: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - object_lock_mode: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - object_lock_retain_until_date: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - request_payer: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - sse_customer_algorithm: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - sse_customer_key: Option, +pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { + self.tagging = Some(field); +self +} - sse_customer_key_md5: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - ssekms_encryption_context: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - ssekms_key_id: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - server_side_encryption: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - storage_class: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - tagging: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - website_redirect_location: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - write_offset_bytes: Option, +#[must_use] +pub fn tagging(mut self, field: Tagging) -> Self { + self.tagging = Some(field); +self +} - success_action_redirect: Option, +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - success_action_status: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; +let version_id = self.version_id; +Ok(PutObjectTaggingInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +request_payer, +tagging, +version_id, +}) +} - policy: Option, - } +} - impl PostObjectInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } - - pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } - - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } - - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } - - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } - - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } - - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } - - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } - - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } - - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } - - pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } - - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } - - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } - - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } - - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } - - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } - - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } - - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } - - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } - - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } - - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } - - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } - - pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; - self - } - - pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; - self - } - - pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { - self.write_offset_bytes = field; - self - } - - pub fn set_success_action_redirect(&mut self, field: Option) -> &mut Self { - self.success_action_redirect = field; - self - } - - pub fn set_success_action_status(&mut self, field: Option) -> &mut Self { - self.success_action_status = field; - self - } - - pub fn set_policy(&mut self, field: Option) -> &mut Self { - self.policy = field; - self - } - - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } - - #[must_use] - pub fn body(mut self, field: Option) -> Self { - self.body = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } - - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } - - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } - - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } - - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } - - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } - - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } - - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } - - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } - - #[must_use] - pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } - - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } - - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } - - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } - - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } - - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } - - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } - - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } - - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } - - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } - - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } - - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } - - #[must_use] - pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; - self - } - - #[must_use] - pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; - self - } - - #[must_use] - pub fn write_offset_bytes(mut self, field: Option) -> Self { - self.write_offset_bytes = field; - self - } - - #[must_use] - pub fn success_action_redirect(mut self, field: Option) -> Self { - self.success_action_redirect = field; - self - } - - #[must_use] - pub fn success_action_status(mut self, field: Option) -> Self { - self.success_action_status = field; - self - } - - #[must_use] - pub fn policy(mut self, field: Option) -> Self { - self.policy = field; - self - } - - pub fn build(self) -> Result { - let acl = self.acl; - let body = self.body; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_algorithm = self.checksum_algorithm; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_length = self.content_length; - let content_md5 = self.content_md5; - let content_type = self.content_type; - let expected_bucket_owner = self.expected_bucket_owner; - let expires = self.expires; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write_acp = self.grant_write_acp; - let if_match = self.if_match; - let if_none_match = self.if_none_match; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let metadata = self.metadata; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let storage_class = self.storage_class; - let tagging = self.tagging; - let website_redirect_location = self.website_redirect_location; - let write_offset_bytes = self.write_offset_bytes; - let success_action_redirect = self.success_action_redirect; - let success_action_status = self.success_action_status; - let policy = self.policy; - Ok(PostObjectInput { - acl, - body, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_md5, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - if_match, - if_none_match, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - website_redirect_location, - write_offset_bytes, - success_action_redirect, - success_action_status, - policy, - }) - } - } - /// A builder for [`PutBucketAccelerateConfigurationInput`] - #[derive(Default)] - pub struct PutBucketAccelerateConfigurationInputBuilder { - accelerate_configuration: Option, +/// A builder for [`PutPublicAccessBlockInput`] +#[derive(Default)] +pub struct PutPublicAccessBlockInputBuilder { +bucket: Option, - bucket: Option, +checksum_algorithm: Option, - checksum_algorithm: Option, +content_md5: Option, - expected_bucket_owner: Option, - } +expected_bucket_owner: Option, - impl PutBucketAccelerateConfigurationInputBuilder { - pub fn set_accelerate_configuration(&mut self, field: AccelerateConfiguration) -> &mut Self { - self.accelerate_configuration = Some(field); - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn accelerate_configuration(mut self, field: AccelerateConfiguration) -> Self { - self.accelerate_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let accelerate_configuration = self - .accelerate_configuration - .ok_or_else(|| BuildError::missing_field("accelerate_configuration"))?; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(PutBucketAccelerateConfigurationInput { - accelerate_configuration, - bucket, - checksum_algorithm, - expected_bucket_owner, - }) - } - } +public_access_block_configuration: Option, - /// A builder for [`PutBucketAclInput`] - #[derive(Default)] - pub struct PutBucketAclInputBuilder { - acl: Option, +} - access_control_policy: Option, +impl PutPublicAccessBlockInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - bucket: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - checksum_algorithm: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - content_md5: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +pub fn set_public_access_block_configuration(&mut self, field: PublicAccessBlockConfiguration) -> &mut Self { + self.public_access_block_configuration = Some(field); +self +} - grant_full_control: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - grant_read: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - grant_read_acp: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - grant_write: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - grant_write_acp: Option, - } +#[must_use] +pub fn public_access_block_configuration(mut self, field: PublicAccessBlockConfiguration) -> Self { + self.public_access_block_configuration = Some(field); +self +} - impl PutBucketAclInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } - - pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { - self.access_control_policy = field; - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } - - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } - - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - - pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; - self - } - - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } - - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } - - #[must_use] - pub fn access_control_policy(mut self, field: Option) -> Self { - self.access_control_policy = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } - - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } - - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } - - #[must_use] - pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; - self - } - - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - - pub fn build(self) -> Result { - let acl = self.acl; - let access_control_policy = self.access_control_policy; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write = self.grant_write; - let grant_write_acp = self.grant_write_acp; - Ok(PutBucketAclInput { - acl, - access_control_policy, - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - }) - } - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let public_access_block_configuration = self.public_access_block_configuration.ok_or_else(|| BuildError::missing_field("public_access_block_configuration"))?; +Ok(PutPublicAccessBlockInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +public_access_block_configuration, +}) +} - /// A builder for [`PutBucketAnalyticsConfigurationInput`] - #[derive(Default)] - pub struct PutBucketAnalyticsConfigurationInputBuilder { - analytics_configuration: Option, +} - bucket: Option, - expected_bucket_owner: Option, +/// A builder for [`RestoreObjectInput`] +#[derive(Default)] +pub struct RestoreObjectInputBuilder { +bucket: Option, - id: Option, - } +checksum_algorithm: Option, - impl PutBucketAnalyticsConfigurationInputBuilder { - pub fn set_analytics_configuration(&mut self, field: AnalyticsConfiguration) -> &mut Self { - self.analytics_configuration = Some(field); - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn analytics_configuration(mut self, field: AnalyticsConfiguration) -> Self { - self.analytics_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); - self - } - - pub fn build(self) -> Result { - let analytics_configuration = self - .analytics_configuration - .ok_or_else(|| BuildError::missing_field("analytics_configuration"))?; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - Ok(PutBucketAnalyticsConfigurationInput { - analytics_configuration, - bucket, - expected_bucket_owner, - id, - }) - } - } +expected_bucket_owner: Option, - /// A builder for [`PutBucketCorsInput`] - #[derive(Default)] - pub struct PutBucketCorsInputBuilder { - bucket: Option, +key: Option, - cors_configuration: Option, +request_payer: Option, - checksum_algorithm: Option, +restore_request: Option, - content_md5: Option, +version_id: Option, - expected_bucket_owner: Option, - } +} - impl PutBucketCorsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_cors_configuration(&mut self, field: CORSConfiguration) -> &mut Self { - self.cors_configuration = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn cors_configuration(mut self, field: CORSConfiguration) -> Self { - self.cors_configuration = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let cors_configuration = self - .cors_configuration - .ok_or_else(|| BuildError::missing_field("cors_configuration"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(PutBucketCorsInput { - bucket, - cors_configuration, - checksum_algorithm, - content_md5, - expected_bucket_owner, - }) - } - } +impl RestoreObjectInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - /// A builder for [`PutBucketEncryptionInput`] - #[derive(Default)] - pub struct PutBucketEncryptionInputBuilder { - bucket: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - checksum_algorithm: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - content_md5: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - expected_bucket_owner: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - server_side_encryption_configuration: Option, - } +pub fn set_restore_request(&mut self, field: Option) -> &mut Self { + self.restore_request = field; +self +} - impl PutBucketEncryptionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_server_side_encryption_configuration(&mut self, field: ServerSideEncryptionConfiguration) -> &mut Self { - self.server_side_encryption_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn server_side_encryption_configuration(mut self, field: ServerSideEncryptionConfiguration) -> Self { - self.server_side_encryption_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let server_side_encryption_configuration = self - .server_side_encryption_configuration - .ok_or_else(|| BuildError::missing_field("server_side_encryption_configuration"))?; - Ok(PutBucketEncryptionInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - server_side_encryption_configuration, - }) - } - } +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - /// A builder for [`PutBucketIntelligentTieringConfigurationInput`] - #[derive(Default)] - pub struct PutBucketIntelligentTieringConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - id: Option, +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - intelligent_tiering_configuration: Option, - } +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - impl PutBucketIntelligentTieringConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); - self - } - - pub fn set_intelligent_tiering_configuration(&mut self, field: IntelligentTieringConfiguration) -> &mut Self { - self.intelligent_tiering_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn intelligent_tiering_configuration(mut self, field: IntelligentTieringConfiguration) -> Self { - self.intelligent_tiering_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - let intelligent_tiering_configuration = self - .intelligent_tiering_configuration - .ok_or_else(|| BuildError::missing_field("intelligent_tiering_configuration"))?; - Ok(PutBucketIntelligentTieringConfigurationInput { - bucket, - id, - intelligent_tiering_configuration, - }) - } - } +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - /// A builder for [`PutBucketInventoryConfigurationInput`] - #[derive(Default)] - pub struct PutBucketInventoryConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn restore_request(mut self, field: Option) -> Self { + self.restore_request = field; +self +} - id: Option, +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} - inventory_configuration: Option, - } +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let request_payer = self.request_payer; +let restore_request = self.restore_request; +let version_id = self.version_id; +Ok(RestoreObjectInput { +bucket, +checksum_algorithm, +expected_bucket_owner, +key, +request_payer, +restore_request, +version_id, +}) +} - impl PutBucketInventoryConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); - self - } - - pub fn set_inventory_configuration(&mut self, field: InventoryConfiguration) -> &mut Self { - self.inventory_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn inventory_configuration(mut self, field: InventoryConfiguration) -> Self { - self.inventory_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - let inventory_configuration = self - .inventory_configuration - .ok_or_else(|| BuildError::missing_field("inventory_configuration"))?; - Ok(PutBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - inventory_configuration, - }) - } - } +} - /// A builder for [`PutBucketLifecycleConfigurationInput`] - #[derive(Default)] - pub struct PutBucketLifecycleConfigurationInputBuilder { - bucket: Option, - checksum_algorithm: Option, +/// A builder for [`SelectObjectContentInput`] +#[derive(Default)] +pub struct SelectObjectContentInputBuilder { +bucket: Option, - expected_bucket_owner: Option, +expected_bucket_owner: Option, - lifecycle_configuration: Option, +key: Option, - transition_default_minimum_object_size: Option, - } +sse_customer_algorithm: Option, - impl PutBucketLifecycleConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_lifecycle_configuration(&mut self, field: Option) -> &mut Self { - self.lifecycle_configuration = field; - self - } - - pub fn set_transition_default_minimum_object_size( - &mut self, - field: Option, - ) -> &mut Self { - self.transition_default_minimum_object_size = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn lifecycle_configuration(mut self, field: Option) -> Self { - self.lifecycle_configuration = field; - self - } - - #[must_use] - pub fn transition_default_minimum_object_size(mut self, field: Option) -> Self { - self.transition_default_minimum_object_size = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let expected_bucket_owner = self.expected_bucket_owner; - let lifecycle_configuration = self.lifecycle_configuration; - let transition_default_minimum_object_size = self.transition_default_minimum_object_size; - Ok(PutBucketLifecycleConfigurationInput { - bucket, - checksum_algorithm, - expected_bucket_owner, - lifecycle_configuration, - transition_default_minimum_object_size, - }) - } - } +sse_customer_key: Option, - /// A builder for [`PutBucketLoggingInput`] - #[derive(Default)] - pub struct PutBucketLoggingInputBuilder { - bucket: Option, +sse_customer_key_md5: Option, - bucket_logging_status: Option, +request: Option, - checksum_algorithm: Option, +} - content_md5: Option, +impl SelectObjectContentInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - expected_bucket_owner: Option, - } +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - impl PutBucketLoggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bucket_logging_status(&mut self, field: BucketLoggingStatus) -> &mut Self { - self.bucket_logging_status = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bucket_logging_status(mut self, field: BucketLoggingStatus) -> Self { - self.bucket_logging_status = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_logging_status = self - .bucket_logging_status - .ok_or_else(|| BuildError::missing_field("bucket_logging_status"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - Ok(PutBucketLoggingInput { - bucket, - bucket_logging_status, - checksum_algorithm, - content_md5, - expected_bucket_owner, - }) - } - } +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - /// A builder for [`PutBucketMetricsConfigurationInput`] - #[derive(Default)] - pub struct PutBucketMetricsConfigurationInputBuilder { - bucket: Option, +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - expected_bucket_owner: Option, +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - id: Option, +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - metrics_configuration: Option, - } +pub fn set_request(&mut self, field: SelectObjectContentRequest) -> &mut Self { + self.request = Some(field); +self +} - impl PutBucketMetricsConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); - self - } - - pub fn set_metrics_configuration(&mut self, field: MetricsConfiguration) -> &mut Self { - self.metrics_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); - self - } - - #[must_use] - pub fn metrics_configuration(mut self, field: MetricsConfiguration) -> Self { - self.metrics_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; - let metrics_configuration = self - .metrics_configuration - .ok_or_else(|| BuildError::missing_field("metrics_configuration"))?; - Ok(PutBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - metrics_configuration, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`PutBucketNotificationConfigurationInput`] - #[derive(Default)] - pub struct PutBucketNotificationConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - notification_configuration: Option, +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - skip_destination_validation: Option, - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - impl PutBucketNotificationConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_notification_configuration(&mut self, field: NotificationConfiguration) -> &mut Self { - self.notification_configuration = Some(field); - self - } - - pub fn set_skip_destination_validation(&mut self, field: Option) -> &mut Self { - self.skip_destination_validation = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn notification_configuration(mut self, field: NotificationConfiguration) -> Self { - self.notification_configuration = Some(field); - self - } - - #[must_use] - pub fn skip_destination_validation(mut self, field: Option) -> Self { - self.skip_destination_validation = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let notification_configuration = self - .notification_configuration - .ok_or_else(|| BuildError::missing_field("notification_configuration"))?; - let skip_destination_validation = self.skip_destination_validation; - Ok(PutBucketNotificationConfigurationInput { - bucket, - expected_bucket_owner, - notification_configuration, - skip_destination_validation, - }) - } - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - /// A builder for [`PutBucketOwnershipControlsInput`] - #[derive(Default)] - pub struct PutBucketOwnershipControlsInputBuilder { - bucket: Option, +#[must_use] +pub fn request(mut self, field: SelectObjectContentRequest) -> Self { + self.request = Some(field); +self +} - content_md5: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let request = self.request.ok_or_else(|| BuildError::missing_field("request"))?; +Ok(SelectObjectContentInput { +bucket, +expected_bucket_owner, +key, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +request, +}) +} - expected_bucket_owner: Option, +} - ownership_controls: Option, - } - impl PutBucketOwnershipControlsInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_ownership_controls(&mut self, field: OwnershipControls) -> &mut Self { - self.ownership_controls = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn ownership_controls(mut self, field: OwnershipControls) -> Self { - self.ownership_controls = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let ownership_controls = self - .ownership_controls - .ok_or_else(|| BuildError::missing_field("ownership_controls"))?; - Ok(PutBucketOwnershipControlsInput { - bucket, - content_md5, - expected_bucket_owner, - ownership_controls, - }) - } - } +/// A builder for [`UploadPartInput`] +#[derive(Default)] +pub struct UploadPartInputBuilder { +body: Option, - /// A builder for [`PutBucketPolicyInput`] - #[derive(Default)] - pub struct PutBucketPolicyInputBuilder { - bucket: Option, +bucket: Option, - checksum_algorithm: Option, +checksum_algorithm: Option, - confirm_remove_self_bucket_access: Option, +checksum_crc32: Option, - content_md5: Option, +checksum_crc32c: Option, - expected_bucket_owner: Option, +checksum_crc64nvme: Option, - policy: Option, - } +checksum_sha1: Option, - impl PutBucketPolicyInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_confirm_remove_self_bucket_access(&mut self, field: Option) -> &mut Self { - self.confirm_remove_self_bucket_access = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_policy(&mut self, field: Policy) -> &mut Self { - self.policy = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn confirm_remove_self_bucket_access(mut self, field: Option) -> Self { - self.confirm_remove_self_bucket_access = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn policy(mut self, field: Policy) -> Self { - self.policy = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let confirm_remove_self_bucket_access = self.confirm_remove_self_bucket_access; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let policy = self.policy.ok_or_else(|| BuildError::missing_field("policy"))?; - Ok(PutBucketPolicyInput { - bucket, - checksum_algorithm, - confirm_remove_self_bucket_access, - content_md5, - expected_bucket_owner, - policy, - }) - } - } +checksum_sha256: Option, - /// A builder for [`PutBucketReplicationInput`] - #[derive(Default)] - pub struct PutBucketReplicationInputBuilder { - bucket: Option, +content_length: Option, - checksum_algorithm: Option, +content_md5: Option, - content_md5: Option, +expected_bucket_owner: Option, - expected_bucket_owner: Option, +key: Option, - replication_configuration: Option, +part_number: Option, - token: Option, - } +request_payer: Option, - impl PutBucketReplicationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_replication_configuration(&mut self, field: ReplicationConfiguration) -> &mut Self { - self.replication_configuration = Some(field); - self - } - - pub fn set_token(&mut self, field: Option) -> &mut Self { - self.token = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn replication_configuration(mut self, field: ReplicationConfiguration) -> Self { - self.replication_configuration = Some(field); - self - } - - #[must_use] - pub fn token(mut self, field: Option) -> Self { - self.token = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let replication_configuration = self - .replication_configuration - .ok_or_else(|| BuildError::missing_field("replication_configuration"))?; - let token = self.token; - Ok(PutBucketReplicationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - replication_configuration, - token, - }) - } - } +sse_customer_algorithm: Option, - /// A builder for [`PutBucketRequestPaymentInput`] - #[derive(Default)] - pub struct PutBucketRequestPaymentInputBuilder { - bucket: Option, +sse_customer_key: Option, - checksum_algorithm: Option, +sse_customer_key_md5: Option, - content_md5: Option, +upload_id: Option, - expected_bucket_owner: Option, +} - request_payment_configuration: Option, - } +impl UploadPartInputBuilder { +pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; +self +} - impl PutBucketRequestPaymentInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_request_payment_configuration(&mut self, field: RequestPaymentConfiguration) -> &mut Self { - self.request_payment_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn request_payment_configuration(mut self, field: RequestPaymentConfiguration) -> Self { - self.request_payment_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let request_payment_configuration = self - .request_payment_configuration - .ok_or_else(|| BuildError::missing_field("request_payment_configuration"))?; - Ok(PutBucketRequestPaymentInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - request_payment_configuration, - }) - } - } +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - /// A builder for [`PutBucketTaggingInput`] - #[derive(Default)] - pub struct PutBucketTaggingInputBuilder { - bucket: Option, +pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; +self +} - checksum_algorithm: Option, +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self +} - content_md5: Option, +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} - expected_bucket_owner: Option, +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} - tagging: Option, - } +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} - impl PutBucketTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { - self.tagging = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn tagging(mut self, field: Tagging) -> Self { - self.tagging = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; - Ok(PutBucketTaggingInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - tagging, - }) - } - } +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} - /// A builder for [`PutBucketVersioningInput`] - #[derive(Default)] - pub struct PutBucketVersioningInputBuilder { - bucket: Option, +pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; +self +} - checksum_algorithm: Option, +pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; +self +} - content_md5: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - expected_bucket_owner: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - mfa: Option, +pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { + self.part_number = Some(field); +self +} - versioning_configuration: Option, - } +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - impl PutBucketVersioningInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; - self - } - - pub fn set_versioning_configuration(&mut self, field: VersioningConfiguration) -> &mut Self { - self.versioning_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; - self - } - - #[must_use] - pub fn versioning_configuration(mut self, field: VersioningConfiguration) -> Self { - self.versioning_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let mfa = self.mfa; - let versioning_configuration = self - .versioning_configuration - .ok_or_else(|| BuildError::missing_field("versioning_configuration"))?; - Ok(PutBucketVersioningInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - mfa, - versioning_configuration, - }) - } - } +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - /// A builder for [`PutBucketWebsiteInput`] - #[derive(Default)] - pub struct PutBucketWebsiteInputBuilder { - bucket: Option, +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - checksum_algorithm: Option, +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - content_md5: Option, +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn body(mut self, field: Option) -> Self { + self.body = field; +self +} - website_configuration: Option, - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - impl PutBucketWebsiteInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_website_configuration(&mut self, field: WebsiteConfiguration) -> &mut Self { - self.website_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn website_configuration(mut self, field: WebsiteConfiguration) -> Self { - self.website_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let website_configuration = self - .website_configuration - .ok_or_else(|| BuildError::missing_field("website_configuration"))?; - Ok(PutBucketWebsiteInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - website_configuration, - }) - } - } +#[must_use] +pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; +self +} - /// A builder for [`PutObjectInput`] - #[derive(Default)] - pub struct PutObjectInputBuilder { - acl: Option, +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} - body: Option, +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self +} - bucket: Option, +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} - bucket_key_enabled: Option, +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} - cache_control: Option, +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; +self +} - checksum_crc32: Option, +#[must_use] +pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; +self +} - checksum_crc32c: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - checksum_crc64nvme: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - checksum_sha1: Option, +#[must_use] +pub fn part_number(mut self, field: PartNumber) -> Self { + self.part_number = Some(field); +self +} - checksum_sha256: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - content_disposition: Option, +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - content_encoding: Option, +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - content_language: Option, +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - content_length: Option, +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self +} - content_md5: Option, +pub fn build(self) -> Result { +let body = self.body; +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let checksum_algorithm = self.checksum_algorithm; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let content_length = self.content_length; +let content_md5 = self.content_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(UploadPartInput { +body, +bucket, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_length, +content_md5, +expected_bucket_owner, +key, +part_number, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + +} - content_type: Option, - expected_bucket_owner: Option, +/// A builder for [`UploadPartCopyInput`] +#[derive(Default)] +pub struct UploadPartCopyInputBuilder { +bucket: Option, - expires: Option, +copy_source: Option, - grant_full_control: Option, +copy_source_if_match: Option, - grant_read: Option, +copy_source_if_modified_since: Option, - grant_read_acp: Option, +copy_source_if_none_match: Option, - grant_write_acp: Option, +copy_source_if_unmodified_since: Option, - if_match: Option, +copy_source_range: Option, - if_none_match: Option, +copy_source_sse_customer_algorithm: Option, - key: Option, +copy_source_sse_customer_key: Option, - metadata: Option, +copy_source_sse_customer_key_md5: Option, - object_lock_legal_hold_status: Option, +expected_bucket_owner: Option, - object_lock_mode: Option, +expected_source_bucket_owner: Option, - object_lock_retain_until_date: Option, +key: Option, - request_payer: Option, +part_number: Option, - sse_customer_algorithm: Option, +request_payer: Option, - sse_customer_key: Option, +sse_customer_algorithm: Option, - sse_customer_key_md5: Option, +sse_customer_key: Option, - ssekms_encryption_context: Option, +sse_customer_key_md5: Option, - ssekms_key_id: Option, +upload_id: Option, - server_side_encryption: Option, +} - storage_class: Option, +impl UploadPartCopyInputBuilder { +pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); +self +} - tagging: Option, +pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { + self.copy_source = Some(field); +self +} - website_redirect_location: Option, +pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_match = field; +self +} - write_offset_bytes: Option, - } +pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_modified_since = field; +self +} - impl PutObjectInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } - - pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } - - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } - - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } - - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } - - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } - - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } - - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } - - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } - - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } - - pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } - - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } - - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } - - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } - - pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; - self - } - - pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } - - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } - - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } - - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; - self - } - - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } - - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } - - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } - - pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; - self - } - - pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; - self - } - - pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { - self.write_offset_bytes = field; - self - } - - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } - - #[must_use] - pub fn body(mut self, field: Option) -> Self { - self.body = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } - - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } - - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } - - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } - - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } - - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } - - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } - - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } - - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } - - #[must_use] - pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } - - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } - - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } - - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } - - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - - #[must_use] - pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; - self - } - - #[must_use] - pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } - - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } - - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } - - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; - self - } - - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } - - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } - - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } - - #[must_use] - pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; - self - } - - #[must_use] - pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; - self - } - - #[must_use] - pub fn write_offset_bytes(mut self, field: Option) -> Self { - self.write_offset_bytes = field; - self - } - - pub fn build(self) -> Result { - let acl = self.acl; - let body = self.body; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_algorithm = self.checksum_algorithm; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_length = self.content_length; - let content_md5 = self.content_md5; - let content_type = self.content_type; - let expected_bucket_owner = self.expected_bucket_owner; - let expires = self.expires; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write_acp = self.grant_write_acp; - let if_match = self.if_match; - let if_none_match = self.if_none_match; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let metadata = self.metadata; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_encryption_context = self.ssekms_encryption_context; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let storage_class = self.storage_class; - let tagging = self.tagging; - let website_redirect_location = self.website_redirect_location; - let write_offset_bytes = self.write_offset_bytes; - Ok(PutObjectInput { - acl, - body, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_md5, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - if_match, - if_none_match, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - website_redirect_location, - write_offset_bytes, - }) - } - } +pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_none_match = field; +self +} - /// A builder for [`PutObjectAclInput`] - #[derive(Default)] - pub struct PutObjectAclInputBuilder { - acl: Option, +pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_unmodified_since = field; +self +} - access_control_policy: Option, +pub fn set_copy_source_range(&mut self, field: Option) -> &mut Self { + self.copy_source_range = field; +self +} - bucket: Option, +pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_algorithm = field; +self +} - checksum_algorithm: Option, +pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key = field; +self +} - content_md5: Option, +pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key_md5 = field; +self +} - expected_bucket_owner: Option, +pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; +self +} - grant_full_control: Option, +pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_source_bucket_owner = field; +self +} - grant_read: Option, +pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); +self +} - grant_read_acp: Option, +pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { + self.part_number = Some(field); +self +} - grant_write: Option, +pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; +self +} - grant_write_acp: Option, +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - key: Option, +pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; +self +} - request_payer: Option, +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - version_id: Option, - } +pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); +self +} - impl PutObjectAclInputBuilder { - pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; - self - } - - pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { - self.access_control_policy = field; - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; - self - } - - pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; - self - } - - pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; - self - } - - pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; - self - } - - pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn acl(mut self, field: Option) -> Self { - self.acl = field; - self - } - - #[must_use] - pub fn access_control_policy(mut self, field: Option) -> Self { - self.access_control_policy = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; - self - } - - #[must_use] - pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; - self - } - - #[must_use] - pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; - self - } - - #[must_use] - pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; - self - } - - #[must_use] - pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let acl = self.acl; - let access_control_policy = self.access_control_policy; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let grant_full_control = self.grant_full_control; - let grant_read = self.grant_read; - let grant_read_acp = self.grant_read_acp; - let grant_write = self.grant_write; - let grant_write_acp = self.grant_write_acp; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(PutObjectAclInput { - acl, - access_control_policy, - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - key, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); +self +} - /// A builder for [`PutObjectLegalHoldInput`] - #[derive(Default)] - pub struct PutObjectLegalHoldInputBuilder { - bucket: Option, +#[must_use] +pub fn copy_source(mut self, field: CopySource) -> Self { + self.copy_source = Some(field); +self +} - checksum_algorithm: Option, +#[must_use] +pub fn copy_source_if_match(mut self, field: Option) -> Self { + self.copy_source_if_match = field; +self +} - content_md5: Option, +#[must_use] +pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { + self.copy_source_if_modified_since = field; +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn copy_source_if_none_match(mut self, field: Option) -> Self { + self.copy_source_if_none_match = field; +self +} - key: Option, +#[must_use] +pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { + self.copy_source_if_unmodified_since = field; +self +} - legal_hold: Option, +#[must_use] +pub fn copy_source_range(mut self, field: Option) -> Self { + self.copy_source_range = field; +self +} - request_payer: Option, +#[must_use] +pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { + self.copy_source_sse_customer_algorithm = field; +self +} - version_id: Option, - } +#[must_use] +pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key = field; +self +} - impl PutObjectLegalHoldInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_legal_hold(&mut self, field: Option) -> &mut Self { - self.legal_hold = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn legal_hold(mut self, field: Option) -> Self { - self.legal_hold = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let legal_hold = self.legal_hold; - let request_payer = self.request_payer; - let version_id = self.version_id; - Ok(PutObjectLegalHoldInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - legal_hold, - request_payer, - version_id, - }) - } - } +#[must_use] +pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key_md5 = field; +self +} - /// A builder for [`PutObjectLockConfigurationInput`] - #[derive(Default)] - pub struct PutObjectLockConfigurationInputBuilder { - bucket: Option, +#[must_use] +pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; +self +} - checksum_algorithm: Option, +#[must_use] +pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { + self.expected_source_bucket_owner = field; +self +} - content_md5: Option, +#[must_use] +pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); +self +} - expected_bucket_owner: Option, +#[must_use] +pub fn part_number(mut self, field: PartNumber) -> Self { + self.part_number = Some(field); +self +} - object_lock_configuration: Option, +#[must_use] +pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; +self +} - request_payer: Option, +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} - token: Option, - } +#[must_use] +pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; +self +} - impl PutObjectLockConfigurationInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_object_lock_configuration(&mut self, field: Option) -> &mut Self { - self.object_lock_configuration = field; - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_token(&mut self, field: Option) -> &mut Self { - self.token = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn object_lock_configuration(mut self, field: Option) -> Self { - self.object_lock_configuration = field; - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn token(mut self, field: Option) -> Self { - self.token = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let object_lock_configuration = self.object_lock_configuration; - let request_payer = self.request_payer; - let token = self.token; - Ok(PutObjectLockConfigurationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - object_lock_configuration, - request_payer, - token, - }) - } - } +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} - /// A builder for [`PutObjectRetentionInput`] - #[derive(Default)] - pub struct PutObjectRetentionInputBuilder { - bucket: Option, +#[must_use] +pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); +self +} - bypass_governance_retention: Option, +pub fn build(self) -> Result { +let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; +let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; +let copy_source_if_match = self.copy_source_if_match; +let copy_source_if_modified_since = self.copy_source_if_modified_since; +let copy_source_if_none_match = self.copy_source_if_none_match; +let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; +let copy_source_range = self.copy_source_range; +let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; +let copy_source_sse_customer_key = self.copy_source_sse_customer_key; +let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; +let expected_bucket_owner = self.expected_bucket_owner; +let expected_source_bucket_owner = self.expected_source_bucket_owner; +let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; +let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; +let request_payer = self.request_payer; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key = self.sse_customer_key; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; +Ok(UploadPartCopyInput { +bucket, +copy_source, +copy_source_if_match, +copy_source_if_modified_since, +copy_source_if_none_match, +copy_source_if_unmodified_since, +copy_source_range, +copy_source_sse_customer_algorithm, +copy_source_sse_customer_key, +copy_source_sse_customer_key_md5, +expected_bucket_owner, +expected_source_bucket_owner, +key, +part_number, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + +} - checksum_algorithm: Option, - content_md5: Option, +/// A builder for [`WriteGetObjectResponseInput`] +#[derive(Default)] +pub struct WriteGetObjectResponseInputBuilder { +accept_ranges: Option, + +body: Option, - expected_bucket_owner: Option, +bucket_key_enabled: Option, - key: Option, +cache_control: Option, - request_payer: Option, +checksum_crc32: Option, - retention: Option, +checksum_crc32c: Option, - version_id: Option, - } +checksum_crc64nvme: Option, - impl PutObjectRetentionInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_retention(&mut self, field: Option) -> &mut Self { - self.retention = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn retention(mut self, field: Option) -> Self { - self.retention = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let bypass_governance_retention = self.bypass_governance_retention; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let retention = self.retention; - let version_id = self.version_id; - Ok(PutObjectRetentionInput { - bucket, - bypass_governance_retention, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - request_payer, - retention, - version_id, - }) - } - } +checksum_sha1: Option, - /// A builder for [`PutObjectTaggingInput`] - #[derive(Default)] - pub struct PutObjectTaggingInputBuilder { - bucket: Option, +checksum_sha256: Option, - checksum_algorithm: Option, +content_disposition: Option, - content_md5: Option, +content_encoding: Option, - expected_bucket_owner: Option, +content_language: Option, - key: Option, +content_length: Option, - request_payer: Option, +content_range: Option, - tagging: Option, +content_type: Option, - version_id: Option, - } +delete_marker: Option, - impl PutObjectTaggingInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { - self.tagging = Some(field); - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn tagging(mut self, field: Tagging) -> Self { - self.tagging = Some(field); - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; - let version_id = self.version_id; - Ok(PutObjectTaggingInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - request_payer, - tagging, - version_id, - }) - } - } +e_tag: Option, - /// A builder for [`PutPublicAccessBlockInput`] - #[derive(Default)] - pub struct PutPublicAccessBlockInputBuilder { - bucket: Option, +error_code: Option, - checksum_algorithm: Option, +error_message: Option, - content_md5: Option, +expiration: Option, - expected_bucket_owner: Option, +expires: Option, - public_access_block_configuration: Option, - } +last_modified: Option, - impl PutPublicAccessBlockInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_public_access_block_configuration(&mut self, field: PublicAccessBlockConfiguration) -> &mut Self { - self.public_access_block_configuration = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn public_access_block_configuration(mut self, field: PublicAccessBlockConfiguration) -> Self { - self.public_access_block_configuration = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let public_access_block_configuration = self - .public_access_block_configuration - .ok_or_else(|| BuildError::missing_field("public_access_block_configuration"))?; - Ok(PutPublicAccessBlockInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - public_access_block_configuration, - }) - } - } +metadata: Option, - /// A builder for [`RestoreObjectInput`] - #[derive(Default)] - pub struct RestoreObjectInputBuilder { - bucket: Option, +missing_meta: Option, - checksum_algorithm: Option, +object_lock_legal_hold_status: Option, - expected_bucket_owner: Option, +object_lock_mode: Option, - key: Option, +object_lock_retain_until_date: Option, - request_payer: Option, +parts_count: Option, - restore_request: Option, +replication_status: Option, - version_id: Option, - } +request_charged: Option, - impl RestoreObjectInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_restore_request(&mut self, field: Option) -> &mut Self { - self.restore_request = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn restore_request(mut self, field: Option) -> Self { - self.restore_request = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let request_payer = self.request_payer; - let restore_request = self.restore_request; - let version_id = self.version_id; - Ok(RestoreObjectInput { - bucket, - checksum_algorithm, - expected_bucket_owner, - key, - request_payer, - restore_request, - version_id, - }) - } - } +request_route: Option, - /// A builder for [`SelectObjectContentInput`] - #[derive(Default)] - pub struct SelectObjectContentInputBuilder { - bucket: Option, +request_token: Option, - expected_bucket_owner: Option, +restore: Option, - key: Option, +sse_customer_algorithm: Option, - sse_customer_algorithm: Option, +sse_customer_key_md5: Option, - sse_customer_key: Option, +ssekms_key_id: Option, - sse_customer_key_md5: Option, +server_side_encryption: Option, - request: Option, - } +status_code: Option, - impl SelectObjectContentInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_request(&mut self, field: SelectObjectContentRequest) -> &mut Self { - self.request = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn request(mut self, field: SelectObjectContentRequest) -> Self { - self.request = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let request = self.request.ok_or_else(|| BuildError::missing_field("request"))?; - Ok(SelectObjectContentInput { - bucket, - expected_bucket_owner, - key, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - request, - }) - } - } +storage_class: Option, - /// A builder for [`UploadPartInput`] - #[derive(Default)] - pub struct UploadPartInputBuilder { - body: Option, +tag_count: Option, - bucket: Option, +version_id: Option, - checksum_algorithm: Option, +} - checksum_crc32: Option, +impl WriteGetObjectResponseInputBuilder { +pub fn set_accept_ranges(&mut self, field: Option) -> &mut Self { + self.accept_ranges = field; +self +} - checksum_crc32c: Option, +pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; +self +} - checksum_crc64nvme: Option, +pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; +self +} - checksum_sha1: Option, +pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; +self +} - checksum_sha256: Option, +pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; +self +} - content_length: Option, +pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; +self +} - content_md5: Option, +pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; +self +} - expected_bucket_owner: Option, +pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; +self +} - key: Option, +pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; +self +} - part_number: Option, +pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; +self +} - request_payer: Option, +pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; +self +} - sse_customer_algorithm: Option, +pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; +self +} - sse_customer_key: Option, +pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; +self +} - sse_customer_key_md5: Option, +pub fn set_content_range(&mut self, field: Option) -> &mut Self { + self.content_range = field; +self +} - upload_id: Option, - } +pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; +self +} - impl UploadPartInputBuilder { - pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; - self - } - - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; - self - } - - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } - - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } - - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } - - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } - - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } - - pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; - self - } - - pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { - self.part_number = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } - - #[must_use] - pub fn body(mut self, field: Option) -> Self { - self.body = field; - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; - self - } - - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } - - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } - - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } - - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } - - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } - - #[must_use] - pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; - self - } - - #[must_use] - pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn part_number(mut self, field: PartNumber) -> Self { - self.part_number = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } - - pub fn build(self) -> Result { - let body = self.body; - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let checksum_algorithm = self.checksum_algorithm; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let content_length = self.content_length; - let content_md5 = self.content_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(UploadPartInput { - body, - bucket, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_length, - content_md5, - expected_bucket_owner, - key, - part_number, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } - } +pub fn set_delete_marker(&mut self, field: Option) -> &mut Self { + self.delete_marker = field; +self +} - /// A builder for [`UploadPartCopyInput`] - #[derive(Default)] - pub struct UploadPartCopyInputBuilder { - bucket: Option, +pub fn set_e_tag(&mut self, field: Option) -> &mut Self { + self.e_tag = field; +self +} - copy_source: Option, +pub fn set_error_code(&mut self, field: Option) -> &mut Self { + self.error_code = field; +self +} - copy_source_if_match: Option, +pub fn set_error_message(&mut self, field: Option) -> &mut Self { + self.error_message = field; +self +} - copy_source_if_modified_since: Option, +pub fn set_expiration(&mut self, field: Option) -> &mut Self { + self.expiration = field; +self +} - copy_source_if_none_match: Option, +pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; +self +} - copy_source_if_unmodified_since: Option, +pub fn set_last_modified(&mut self, field: Option) -> &mut Self { + self.last_modified = field; +self +} - copy_source_range: Option, +pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; +self +} - copy_source_sse_customer_algorithm: Option, +pub fn set_missing_meta(&mut self, field: Option) -> &mut Self { + self.missing_meta = field; +self +} - copy_source_sse_customer_key: Option, +pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; +self +} - copy_source_sse_customer_key_md5: Option, +pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; +self +} - expected_bucket_owner: Option, +pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; +self +} - expected_source_bucket_owner: Option, +pub fn set_parts_count(&mut self, field: Option) -> &mut Self { + self.parts_count = field; +self +} - key: Option, +pub fn set_replication_status(&mut self, field: Option) -> &mut Self { + self.replication_status = field; +self +} - part_number: Option, +pub fn set_request_charged(&mut self, field: Option) -> &mut Self { + self.request_charged = field; +self +} - request_payer: Option, +pub fn set_request_route(&mut self, field: RequestRoute) -> &mut Self { + self.request_route = Some(field); +self +} - sse_customer_algorithm: Option, +pub fn set_request_token(&mut self, field: RequestToken) -> &mut Self { + self.request_token = Some(field); +self +} - sse_customer_key: Option, +pub fn set_restore(&mut self, field: Option) -> &mut Self { + self.restore = field; +self +} - sse_customer_key_md5: Option, +pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; +self +} - upload_id: Option, - } +pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; +self +} - impl UploadPartCopyInputBuilder { - pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); - self - } - - pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { - self.copy_source = Some(field); - self - } - - pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_match = field; - self - } - - pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_modified_since = field; - self - } - - pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_none_match = field; - self - } - - pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_unmodified_since = field; - self - } - - pub fn set_copy_source_range(&mut self, field: Option) -> &mut Self { - self.copy_source_range = field; - self - } - - pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_algorithm = field; - self - } - - pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key = field; - self - } - - pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key_md5 = field; - self - } - - pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; - self - } - - pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_source_bucket_owner = field; - self - } - - pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); - self - } - - pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { - self.part_number = Some(field); - self - } - - pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); - self - } - - #[must_use] - pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); - self - } - - #[must_use] - pub fn copy_source(mut self, field: CopySource) -> Self { - self.copy_source = Some(field); - self - } - - #[must_use] - pub fn copy_source_if_match(mut self, field: Option) -> Self { - self.copy_source_if_match = field; - self - } - - #[must_use] - pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { - self.copy_source_if_modified_since = field; - self - } - - #[must_use] - pub fn copy_source_if_none_match(mut self, field: Option) -> Self { - self.copy_source_if_none_match = field; - self - } - - #[must_use] - pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { - self.copy_source_if_unmodified_since = field; - self - } - - #[must_use] - pub fn copy_source_range(mut self, field: Option) -> Self { - self.copy_source_range = field; - self - } - - #[must_use] - pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { - self.copy_source_sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key = field; - self - } - - #[must_use] - pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; - self - } - - #[must_use] - pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { - self.expected_source_bucket_owner = field; - self - } - - #[must_use] - pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); - self - } - - #[must_use] - pub fn part_number(mut self, field: PartNumber) -> Self { - self.part_number = Some(field); - self - } - - #[must_use] - pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); - self - } - - pub fn build(self) -> Result { - let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; - let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; - let copy_source_if_match = self.copy_source_if_match; - let copy_source_if_modified_since = self.copy_source_if_modified_since; - let copy_source_if_none_match = self.copy_source_if_none_match; - let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; - let copy_source_range = self.copy_source_range; - let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; - let copy_source_sse_customer_key = self.copy_source_sse_customer_key; - let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; - let expected_bucket_owner = self.expected_bucket_owner; - let expected_source_bucket_owner = self.expected_source_bucket_owner; - let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; - let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; - let request_payer = self.request_payer; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key = self.sse_customer_key; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; - Ok(UploadPartCopyInput { - bucket, - copy_source, - copy_source_if_match, - copy_source_if_modified_since, - copy_source_if_none_match, - copy_source_if_unmodified_since, - copy_source_range, - copy_source_sse_customer_algorithm, - copy_source_sse_customer_key, - copy_source_sse_customer_key_md5, - expected_bucket_owner, - expected_source_bucket_owner, - key, - part_number, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } - } +pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; +self +} - /// A builder for [`WriteGetObjectResponseInput`] - #[derive(Default)] - pub struct WriteGetObjectResponseInputBuilder { - accept_ranges: Option, +pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; +self +} - body: Option, +pub fn set_status_code(&mut self, field: Option) -> &mut Self { + self.status_code = field; +self +} - bucket_key_enabled: Option, +pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; +self +} - cache_control: Option, +pub fn set_tag_count(&mut self, field: Option) -> &mut Self { + self.tag_count = field; +self +} - checksum_crc32: Option, +pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; +self +} - checksum_crc32c: Option, +#[must_use] +pub fn accept_ranges(mut self, field: Option) -> Self { + self.accept_ranges = field; +self +} - checksum_crc64nvme: Option, +#[must_use] +pub fn body(mut self, field: Option) -> Self { + self.body = field; +self +} - checksum_sha1: Option, +#[must_use] +pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; +self +} - checksum_sha256: Option, +#[must_use] +pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; +self +} - content_disposition: Option, +#[must_use] +pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; +self +} - content_encoding: Option, +#[must_use] +pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; +self +} - content_language: Option, +#[must_use] +pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; +self +} - content_length: Option, +#[must_use] +pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; +self +} - content_range: Option, +#[must_use] +pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; +self +} - content_type: Option, +#[must_use] +pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; +self +} - delete_marker: Option, +#[must_use] +pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; +self +} - e_tag: Option, +#[must_use] +pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; +self +} - error_code: Option, +#[must_use] +pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; +self +} - error_message: Option, +#[must_use] +pub fn content_range(mut self, field: Option) -> Self { + self.content_range = field; +self +} - expiration: Option, +#[must_use] +pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; +self +} - expires: Option, +#[must_use] +pub fn delete_marker(mut self, field: Option) -> Self { + self.delete_marker = field; +self +} - last_modified: Option, +#[must_use] +pub fn e_tag(mut self, field: Option) -> Self { + self.e_tag = field; +self +} - metadata: Option, +#[must_use] +pub fn error_code(mut self, field: Option) -> Self { + self.error_code = field; +self +} - missing_meta: Option, +#[must_use] +pub fn error_message(mut self, field: Option) -> Self { + self.error_message = field; +self +} - object_lock_legal_hold_status: Option, +#[must_use] +pub fn expiration(mut self, field: Option) -> Self { + self.expiration = field; +self +} - object_lock_mode: Option, +#[must_use] +pub fn expires(mut self, field: Option) -> Self { + self.expires = field; +self +} - object_lock_retain_until_date: Option, +#[must_use] +pub fn last_modified(mut self, field: Option) -> Self { + self.last_modified = field; +self +} - parts_count: Option, +#[must_use] +pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; +self +} - replication_status: Option, +#[must_use] +pub fn missing_meta(mut self, field: Option) -> Self { + self.missing_meta = field; +self +} - request_charged: Option, +#[must_use] +pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; +self +} - request_route: Option, +#[must_use] +pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; +self +} - request_token: Option, +#[must_use] +pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; +self +} - restore: Option, +#[must_use] +pub fn parts_count(mut self, field: Option) -> Self { + self.parts_count = field; +self +} - sse_customer_algorithm: Option, +#[must_use] +pub fn replication_status(mut self, field: Option) -> Self { + self.replication_status = field; +self +} - sse_customer_key_md5: Option, +#[must_use] +pub fn request_charged(mut self, field: Option) -> Self { + self.request_charged = field; +self +} - ssekms_key_id: Option, +#[must_use] +pub fn request_route(mut self, field: RequestRoute) -> Self { + self.request_route = Some(field); +self +} - server_side_encryption: Option, +#[must_use] +pub fn request_token(mut self, field: RequestToken) -> Self { + self.request_token = Some(field); +self +} - status_code: Option, +#[must_use] +pub fn restore(mut self, field: Option) -> Self { + self.restore = field; +self +} - storage_class: Option, +#[must_use] +pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; +self +} + +#[must_use] +pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; +self +} + +#[must_use] +pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; +self +} + +#[must_use] +pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; +self +} + +#[must_use] +pub fn status_code(mut self, field: Option) -> Self { + self.status_code = field; +self +} + +#[must_use] +pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; +self +} + +#[must_use] +pub fn tag_count(mut self, field: Option) -> Self { + self.tag_count = field; +self +} + +#[must_use] +pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; +self +} + +pub fn build(self) -> Result { +let accept_ranges = self.accept_ranges; +let body = self.body; +let bucket_key_enabled = self.bucket_key_enabled; +let cache_control = self.cache_control; +let checksum_crc32 = self.checksum_crc32; +let checksum_crc32c = self.checksum_crc32c; +let checksum_crc64nvme = self.checksum_crc64nvme; +let checksum_sha1 = self.checksum_sha1; +let checksum_sha256 = self.checksum_sha256; +let content_disposition = self.content_disposition; +let content_encoding = self.content_encoding; +let content_language = self.content_language; +let content_length = self.content_length; +let content_range = self.content_range; +let content_type = self.content_type; +let delete_marker = self.delete_marker; +let e_tag = self.e_tag; +let error_code = self.error_code; +let error_message = self.error_message; +let expiration = self.expiration; +let expires = self.expires; +let last_modified = self.last_modified; +let metadata = self.metadata; +let missing_meta = self.missing_meta; +let object_lock_legal_hold_status = self.object_lock_legal_hold_status; +let object_lock_mode = self.object_lock_mode; +let object_lock_retain_until_date = self.object_lock_retain_until_date; +let parts_count = self.parts_count; +let replication_status = self.replication_status; +let request_charged = self.request_charged; +let request_route = self.request_route.ok_or_else(|| BuildError::missing_field("request_route"))?; +let request_token = self.request_token.ok_or_else(|| BuildError::missing_field("request_token"))?; +let restore = self.restore; +let sse_customer_algorithm = self.sse_customer_algorithm; +let sse_customer_key_md5 = self.sse_customer_key_md5; +let ssekms_key_id = self.ssekms_key_id; +let server_side_encryption = self.server_side_encryption; +let status_code = self.status_code; +let storage_class = self.storage_class; +let tag_count = self.tag_count; +let version_id = self.version_id; +Ok(WriteGetObjectResponseInput { +accept_ranges, +body, +bucket_key_enabled, +cache_control, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_range, +content_type, +delete_marker, +e_tag, +error_code, +error_message, +expiration, +expires, +last_modified, +metadata, +missing_meta, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +parts_count, +replication_status, +request_charged, +request_route, +request_token, +restore, +sse_customer_algorithm, +sse_customer_key_md5, +ssekms_key_id, +server_side_encryption, +status_code, +storage_class, +tag_count, +version_id, +}) +} - tag_count: Option, +} - version_id: Option, - } - impl WriteGetObjectResponseInputBuilder { - pub fn set_accept_ranges(&mut self, field: Option) -> &mut Self { - self.accept_ranges = field; - self - } - - pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; - self - } - - pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; - self - } - - pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; - self - } - - pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; - self - } - - pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; - self - } - - pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; - self - } - - pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; - self - } - - pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; - self - } - - pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; - self - } - - pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; - self - } - - pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; - self - } - - pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; - self - } - - pub fn set_content_range(&mut self, field: Option) -> &mut Self { - self.content_range = field; - self - } - - pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; - self - } - - pub fn set_delete_marker(&mut self, field: Option) -> &mut Self { - self.delete_marker = field; - self - } - - pub fn set_e_tag(&mut self, field: Option) -> &mut Self { - self.e_tag = field; - self - } - - pub fn set_error_code(&mut self, field: Option) -> &mut Self { - self.error_code = field; - self - } - - pub fn set_error_message(&mut self, field: Option) -> &mut Self { - self.error_message = field; - self - } - - pub fn set_expiration(&mut self, field: Option) -> &mut Self { - self.expiration = field; - self - } - - pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; - self - } - - pub fn set_last_modified(&mut self, field: Option) -> &mut Self { - self.last_modified = field; - self - } - - pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; - self - } - - pub fn set_missing_meta(&mut self, field: Option) -> &mut Self { - self.missing_meta = field; - self - } - - pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; - self - } - - pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; - self - } - - pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; - self - } - - pub fn set_parts_count(&mut self, field: Option) -> &mut Self { - self.parts_count = field; - self - } - - pub fn set_replication_status(&mut self, field: Option) -> &mut Self { - self.replication_status = field; - self - } - - pub fn set_request_charged(&mut self, field: Option) -> &mut Self { - self.request_charged = field; - self - } - - pub fn set_request_route(&mut self, field: RequestRoute) -> &mut Self { - self.request_route = Some(field); - self - } - - pub fn set_request_token(&mut self, field: RequestToken) -> &mut Self { - self.request_token = Some(field); - self - } - - pub fn set_restore(&mut self, field: Option) -> &mut Self { - self.restore = field; - self - } - - pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; - self - } - - pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; - self - } - - pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; - self - } - - pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; - self - } - - pub fn set_status_code(&mut self, field: Option) -> &mut Self { - self.status_code = field; - self - } - - pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; - self - } - - pub fn set_tag_count(&mut self, field: Option) -> &mut Self { - self.tag_count = field; - self - } - - pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; - self - } - - #[must_use] - pub fn accept_ranges(mut self, field: Option) -> Self { - self.accept_ranges = field; - self - } - - #[must_use] - pub fn body(mut self, field: Option) -> Self { - self.body = field; - self - } - - #[must_use] - pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; - self - } - - #[must_use] - pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; - self - } - - #[must_use] - pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; - self - } - - #[must_use] - pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; - self - } - - #[must_use] - pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; - self - } - - #[must_use] - pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; - self - } - - #[must_use] - pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; - self - } - - #[must_use] - pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; - self - } - - #[must_use] - pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; - self - } - - #[must_use] - pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; - self - } - - #[must_use] - pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; - self - } - - #[must_use] - pub fn content_range(mut self, field: Option) -> Self { - self.content_range = field; - self - } - - #[must_use] - pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; - self - } - - #[must_use] - pub fn delete_marker(mut self, field: Option) -> Self { - self.delete_marker = field; - self - } - - #[must_use] - pub fn e_tag(mut self, field: Option) -> Self { - self.e_tag = field; - self - } - - #[must_use] - pub fn error_code(mut self, field: Option) -> Self { - self.error_code = field; - self - } - - #[must_use] - pub fn error_message(mut self, field: Option) -> Self { - self.error_message = field; - self - } - - #[must_use] - pub fn expiration(mut self, field: Option) -> Self { - self.expiration = field; - self - } - - #[must_use] - pub fn expires(mut self, field: Option) -> Self { - self.expires = field; - self - } - - #[must_use] - pub fn last_modified(mut self, field: Option) -> Self { - self.last_modified = field; - self - } - - #[must_use] - pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; - self - } - - #[must_use] - pub fn missing_meta(mut self, field: Option) -> Self { - self.missing_meta = field; - self - } - - #[must_use] - pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; - self - } - - #[must_use] - pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; - self - } - - #[must_use] - pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; - self - } - - #[must_use] - pub fn parts_count(mut self, field: Option) -> Self { - self.parts_count = field; - self - } - - #[must_use] - pub fn replication_status(mut self, field: Option) -> Self { - self.replication_status = field; - self - } - - #[must_use] - pub fn request_charged(mut self, field: Option) -> Self { - self.request_charged = field; - self - } - - #[must_use] - pub fn request_route(mut self, field: RequestRoute) -> Self { - self.request_route = Some(field); - self - } - - #[must_use] - pub fn request_token(mut self, field: RequestToken) -> Self { - self.request_token = Some(field); - self - } - - #[must_use] - pub fn restore(mut self, field: Option) -> Self { - self.restore = field; - self - } - - #[must_use] - pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; - self - } - - #[must_use] - pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; - self - } - - #[must_use] - pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; - self - } - - #[must_use] - pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; - self - } - - #[must_use] - pub fn status_code(mut self, field: Option) -> Self { - self.status_code = field; - self - } - - #[must_use] - pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; - self - } - - #[must_use] - pub fn tag_count(mut self, field: Option) -> Self { - self.tag_count = field; - self - } - - #[must_use] - pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; - self - } - - pub fn build(self) -> Result { - let accept_ranges = self.accept_ranges; - let body = self.body; - let bucket_key_enabled = self.bucket_key_enabled; - let cache_control = self.cache_control; - let checksum_crc32 = self.checksum_crc32; - let checksum_crc32c = self.checksum_crc32c; - let checksum_crc64nvme = self.checksum_crc64nvme; - let checksum_sha1 = self.checksum_sha1; - let checksum_sha256 = self.checksum_sha256; - let content_disposition = self.content_disposition; - let content_encoding = self.content_encoding; - let content_language = self.content_language; - let content_length = self.content_length; - let content_range = self.content_range; - let content_type = self.content_type; - let delete_marker = self.delete_marker; - let e_tag = self.e_tag; - let error_code = self.error_code; - let error_message = self.error_message; - let expiration = self.expiration; - let expires = self.expires; - let last_modified = self.last_modified; - let metadata = self.metadata; - let missing_meta = self.missing_meta; - let object_lock_legal_hold_status = self.object_lock_legal_hold_status; - let object_lock_mode = self.object_lock_mode; - let object_lock_retain_until_date = self.object_lock_retain_until_date; - let parts_count = self.parts_count; - let replication_status = self.replication_status; - let request_charged = self.request_charged; - let request_route = self.request_route.ok_or_else(|| BuildError::missing_field("request_route"))?; - let request_token = self.request_token.ok_or_else(|| BuildError::missing_field("request_token"))?; - let restore = self.restore; - let sse_customer_algorithm = self.sse_customer_algorithm; - let sse_customer_key_md5 = self.sse_customer_key_md5; - let ssekms_key_id = self.ssekms_key_id; - let server_side_encryption = self.server_side_encryption; - let status_code = self.status_code; - let storage_class = self.storage_class; - let tag_count = self.tag_count; - let version_id = self.version_id; - Ok(WriteGetObjectResponseInput { - accept_ranges, - body, - bucket_key_enabled, - cache_control, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_range, - content_type, - delete_marker, - e_tag, - error_code, - error_message, - expiration, - expires, - last_modified, - metadata, - missing_meta, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - parts_count, - replication_status, - request_charged, - request_route, - request_token, - restore, - sse_customer_algorithm, - sse_customer_key_md5, - ssekms_key_id, - server_side_encryption, - status_code, - storage_class, - tag_count, - version_id, - }) - } - } } -pub trait DtoExt { - /// Modifies all empty string fields from `Some("")` to `None` - fn ignore_empty_strings(&mut self); +pub trait DtoExt { + /// Modifies all empty string fields from `Some("")` to `None` + fn ignore_empty_strings(&mut self); +} +impl DtoExt for AbortIncompleteMultipartUpload { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for AbortMultipartUploadInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} +} +impl DtoExt for AbortMultipartUploadOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} +} +impl DtoExt for AccelerateConfiguration { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} +} +impl DtoExt for AccessControlPolicy { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for AccessControlTranslation { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for AnalyticsAndOperator { + fn ignore_empty_strings(&mut self) { +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for AnalyticsConfiguration { + fn ignore_empty_strings(&mut self) { +self.storage_class_analysis.ignore_empty_strings(); +} +} +impl DtoExt for AnalyticsExportDestination { + fn ignore_empty_strings(&mut self) { +self.s3_bucket_destination.ignore_empty_strings(); +} +} +impl DtoExt for AnalyticsS3BucketDestination { + fn ignore_empty_strings(&mut self) { +if self.bucket_account_id.as_deref() == Some("") { + self.bucket_account_id = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for AssumeRoleOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.assumed_role_user { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.credentials { +val.ignore_empty_strings(); +} +if self.source_identity.as_deref() == Some("") { + self.source_identity = None; +} +} +} +impl DtoExt for AssumedRoleUser { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for Bucket { + fn ignore_empty_strings(&mut self) { +if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; +} +if self.name.as_deref() == Some("") { + self.name = None; +} +} +} +impl DtoExt for BucketInfo { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.data_redundancy + && val.as_str() == "" { + self.data_redundancy = None; +} +if let Some(ref val) = self.type_ + && val.as_str() == "" { + self.type_ = None; +} +} +} +impl DtoExt for BucketLifecycleConfiguration { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for BucketLoggingStatus { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.logging_enabled { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for CORSConfiguration { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for CORSRule { + fn ignore_empty_strings(&mut self) { +if self.id.as_deref() == Some("") { + self.id = None; +} +} +} +impl DtoExt for CSVInput { + fn ignore_empty_strings(&mut self) { +if self.comments.as_deref() == Some("") { + self.comments = None; +} +if self.field_delimiter.as_deref() == Some("") { + self.field_delimiter = None; +} +if let Some(ref val) = self.file_header_info + && val.as_str() == "" { + self.file_header_info = None; +} +if self.quote_character.as_deref() == Some("") { + self.quote_character = None; +} +if self.quote_escape_character.as_deref() == Some("") { + self.quote_escape_character = None; +} +if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; +} +} +} +impl DtoExt for CSVOutput { + fn ignore_empty_strings(&mut self) { +if self.field_delimiter.as_deref() == Some("") { + self.field_delimiter = None; +} +if self.quote_character.as_deref() == Some("") { + self.quote_character = None; +} +if self.quote_escape_character.as_deref() == Some("") { + self.quote_escape_character = None; +} +if let Some(ref val) = self.quote_fields + && val.as_str() == "" { + self.quote_fields = None; +} +if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; +} +} +} +impl DtoExt for Checksum { + fn ignore_empty_strings(&mut self) { +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +} +} +impl DtoExt for CommonPrefix { + fn ignore_empty_strings(&mut self) { +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for CompleteMultipartUploadInput { + fn ignore_empty_strings(&mut self) { +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref mut val) = self.multipart_upload { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +} +} +impl DtoExt for CompleteMultipartUploadOutput { + fn ignore_empty_strings(&mut self) { +if self.bucket.as_deref() == Some("") { + self.bucket = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if self.location.as_deref() == Some("") { + self.location = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for CompletedMultipartUpload { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for CompletedPart { + fn ignore_empty_strings(&mut self) { +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +} +} +impl DtoExt for Condition { + fn ignore_empty_strings(&mut self) { +if self.http_error_code_returned_equals.as_deref() == Some("") { + self.http_error_code_returned_equals = None; +} +if self.key_prefix_equals.as_deref() == Some("") { + self.key_prefix_equals = None; +} +} +} +impl DtoExt for CopyObjectInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { + self.copy_source_sse_customer_algorithm = None; +} +if self.copy_source_sse_customer_key.as_deref() == Some("") { + self.copy_source_sse_customer_key = None; +} +if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { + self.copy_source_sse_customer_key_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.expected_source_bucket_owner.as_deref() == Some("") { + self.expected_source_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.metadata_directive + && val.as_str() == "" { + self.metadata_directive = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.tagging.as_deref() == Some("") { + self.tagging = None; +} +if let Some(ref val) = self.tagging_directive + && val.as_str() == "" { + self.tagging_directive = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} +} +impl DtoExt for CopyObjectOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.copy_object_result { +val.ignore_empty_strings(); +} +if self.copy_source_version_id.as_deref() == Some("") { + self.copy_source_version_id = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for CopyObjectResult { + fn ignore_empty_strings(&mut self) { +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +} +} +impl DtoExt for CopyPartResult { + fn ignore_empty_strings(&mut self) { +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +} +} +impl DtoExt for CreateBucketConfiguration { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.bucket { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.location { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.location_constraint + && val.as_str() == "" { + self.location_constraint = None; +} +} +} +impl DtoExt for CreateBucketInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if let Some(ref mut val) = self.create_bucket_configuration { +val.ignore_empty_strings(); +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write.as_deref() == Some("") { + self.grant_write = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.object_ownership + && val.as_str() == "" { + self.object_ownership = None; +} +} +} +impl DtoExt for CreateBucketMetadataTableConfigurationInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.metadata_table_configuration.ignore_empty_strings(); +} +} +impl DtoExt for CreateBucketOutput { + fn ignore_empty_strings(&mut self) { +if self.location.as_deref() == Some("") { + self.location = None; +} +} +} +impl DtoExt for CreateMultipartUploadInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.tagging.as_deref() == Some("") { + self.tagging = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} +} +impl DtoExt for CreateMultipartUploadOutput { + fn ignore_empty_strings(&mut self) { +if self.abort_rule_id.as_deref() == Some("") { + self.abort_rule_id = None; +} +if self.bucket.as_deref() == Some("") { + self.bucket = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.upload_id.as_deref() == Some("") { + self.upload_id = None; +} +} +} +impl DtoExt for CreateSessionInput { + fn ignore_empty_strings(&mut self) { +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.session_mode + && val.as_str() == "" { + self.session_mode = None; +} +} +} +impl DtoExt for CreateSessionOutput { + fn ignore_empty_strings(&mut self) { +self.credentials.ignore_empty_strings(); +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +} +} +impl DtoExt for Credentials { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for DefaultRetention { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.mode + && val.as_str() == "" { + self.mode = None; +} +} +} +impl DtoExt for Delete { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for DeleteBucketAnalyticsConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketCorsInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketEncryptionInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketIntelligentTieringConfigurationInput { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for DeleteBucketInventoryConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketLifecycleInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketMetadataTableConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketMetricsConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketOwnershipControlsInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketPolicyInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketReplicationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketTaggingInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteBucketWebsiteInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeleteMarkerEntry { + fn ignore_empty_strings(&mut self) { +if self.key.as_deref() == Some("") { + self.key = None; +} +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for DeleteMarkerReplication { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} +} +impl DtoExt for DeleteObjectInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.mfa.as_deref() == Some("") { + self.mfa = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for DeleteObjectOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for DeleteObjectTaggingInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for DeleteObjectTaggingOutput { + fn ignore_empty_strings(&mut self) { +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for DeleteObjectsInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +self.delete.ignore_empty_strings(); +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.mfa.as_deref() == Some("") { + self.mfa = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} +} +impl DtoExt for DeleteObjectsOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} +} +impl DtoExt for DeletePublicAccessBlockInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for DeletedObject { + fn ignore_empty_strings(&mut self) { +if self.delete_marker_version_id.as_deref() == Some("") { + self.delete_marker_version_id = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for Destination { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.access_control_translation { +val.ignore_empty_strings(); +} +if self.account.as_deref() == Some("") { + self.account = None; +} +if let Some(ref mut val) = self.encryption_configuration { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.metrics { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.replication_time { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +} +} +impl DtoExt for Encryption { + fn ignore_empty_strings(&mut self) { +if self.kms_context.as_deref() == Some("") { + self.kms_context = None; +} +if self.kms_key_id.as_deref() == Some("") { + self.kms_key_id = None; +} +} +} +impl DtoExt for EncryptionConfiguration { + fn ignore_empty_strings(&mut self) { +if self.replica_kms_key_id.as_deref() == Some("") { + self.replica_kms_key_id = None; +} +} +} +impl DtoExt for Error { + fn ignore_empty_strings(&mut self) { +if self.code.as_deref() == Some("") { + self.code = None; +} +if self.key.as_deref() == Some("") { + self.key = None; +} +if self.message.as_deref() == Some("") { + self.message = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for ErrorDetails { + fn ignore_empty_strings(&mut self) { +if self.error_code.as_deref() == Some("") { + self.error_code = None; +} +if self.error_message.as_deref() == Some("") { + self.error_message = None; +} +} +} +impl DtoExt for ErrorDocument { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for ExistingObjectReplication { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for FilterRule { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.name + && val.as_str() == "" { + self.name = None; +} +if self.value.as_deref() == Some("") { + self.value = None; +} +} +} +impl DtoExt for GetBucketAccelerateConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} +} +impl DtoExt for GetBucketAccelerateConfigurationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} +} +impl DtoExt for GetBucketAclInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketAclOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketAnalyticsConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketAnalyticsConfigurationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.analytics_configuration { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketCorsInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketCorsOutput { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for GetBucketEncryptionInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketEncryptionOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.server_side_encryption_configuration { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketIntelligentTieringConfigurationInput { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for GetBucketIntelligentTieringConfigurationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.intelligent_tiering_configuration { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketInventoryConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketInventoryConfigurationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.inventory_configuration { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketLifecycleConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketLifecycleConfigurationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" { + self.transition_default_minimum_object_size = None; +} +} +} +impl DtoExt for GetBucketLocationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketLocationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.location_constraint + && val.as_str() == "" { + self.location_constraint = None; +} +} +} +impl DtoExt for GetBucketLoggingInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketLoggingOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.logging_enabled { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketMetadataTableConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketMetadataTableConfigurationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.get_bucket_metadata_table_configuration_result { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketMetadataTableConfigurationResult { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.error { +val.ignore_empty_strings(); +} +self.metadata_table_configuration_result.ignore_empty_strings(); +} +} +impl DtoExt for GetBucketMetricsConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketMetricsConfigurationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.metrics_configuration { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketNotificationConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketNotificationConfigurationOutput { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for GetBucketOwnershipControlsInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketOwnershipControlsOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.ownership_controls { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketPolicyInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketPolicyOutput { + fn ignore_empty_strings(&mut self) { +if self.policy.as_deref() == Some("") { + self.policy = None; +} +} +} +impl DtoExt for GetBucketPolicyStatusInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketPolicyStatusOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.policy_status { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketReplicationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketReplicationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.replication_configuration { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetBucketRequestPaymentInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketRequestPaymentOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.payer + && val.as_str() == "" { + self.payer = None; +} +} +} +impl DtoExt for GetBucketTaggingInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketTaggingOutput { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for GetBucketVersioningInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketVersioningOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.mfa_delete + && val.as_str() == "" { + self.mfa_delete = None; +} +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} +} +impl DtoExt for GetBucketWebsiteInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetBucketWebsiteOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.error_document { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.index_document { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.redirect_all_requests_to { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetObjectAclInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for GetObjectAclOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} +} +impl DtoExt for GetObjectAttributesInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for GetObjectAttributesOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.checksum { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.object_parts { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for GetObjectAttributesParts { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for GetObjectInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.checksum_mode + && val.as_str() == "" { + self.checksum_mode = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.response_cache_control.as_deref() == Some("") { + self.response_cache_control = None; +} +if self.response_content_disposition.as_deref() == Some("") { + self.response_content_disposition = None; +} +if self.response_content_encoding.as_deref() == Some("") { + self.response_content_encoding = None; +} +if self.response_content_language.as_deref() == Some("") { + self.response_content_language = None; +} +if self.response_content_type.as_deref() == Some("") { + self.response_content_type = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for GetObjectLegalHoldInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for GetObjectLegalHoldOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.legal_hold { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetObjectLockConfigurationInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetObjectLockConfigurationOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.object_lock_configuration { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetObjectOutput { + fn ignore_empty_strings(&mut self) { +if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_range.as_deref() == Some("") { + self.content_range = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.replication_status + && val.as_str() == "" { + self.replication_status = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.restore.as_deref() == Some("") { + self.restore = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} +} +impl DtoExt for GetObjectRetentionInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for GetObjectRetentionOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.retention { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GetObjectTaggingInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for GetObjectTaggingOutput { + fn ignore_empty_strings(&mut self) { +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for GetObjectTorrentInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +} +} +impl DtoExt for GetObjectTorrentOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} +} +impl DtoExt for GetPublicAccessBlockInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for GetPublicAccessBlockOutput { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.public_access_block_configuration { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for GlacierJobParameters { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for Grant { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.grantee { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.permission + && val.as_str() == "" { + self.permission = None; +} +} +} +impl DtoExt for Grantee { + fn ignore_empty_strings(&mut self) { +if self.display_name.as_deref() == Some("") { + self.display_name = None; +} +if self.email_address.as_deref() == Some("") { + self.email_address = None; +} +if self.id.as_deref() == Some("") { + self.id = None; +} +if self.uri.as_deref() == Some("") { + self.uri = None; +} +} +} +impl DtoExt for HeadBucketInput { + fn ignore_empty_strings(&mut self) { +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for HeadBucketOutput { + fn ignore_empty_strings(&mut self) { +if self.bucket_location_name.as_deref() == Some("") { + self.bucket_location_name = None; +} +if let Some(ref val) = self.bucket_location_type + && val.as_str() == "" { + self.bucket_location_type = None; +} +if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; +} +} +} +impl DtoExt for HeadObjectInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.checksum_mode + && val.as_str() == "" { + self.checksum_mode = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.response_cache_control.as_deref() == Some("") { + self.response_cache_control = None; +} +if self.response_content_disposition.as_deref() == Some("") { + self.response_content_disposition = None; +} +if self.response_content_encoding.as_deref() == Some("") { + self.response_content_encoding = None; +} +if self.response_content_language.as_deref() == Some("") { + self.response_content_language = None; +} +if self.response_content_type.as_deref() == Some("") { + self.response_content_type = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} +} +impl DtoExt for HeadObjectOutput { + fn ignore_empty_strings(&mut self) { +if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; } -impl DtoExt for AbortIncompleteMultipartUpload { - fn ignore_empty_strings(&mut self) {} +if let Some(ref val) = self.archive_status + && val.as_str() == "" { + self.archive_status = None; } -impl DtoExt for AbortMultipartUploadInput { +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_range.as_deref() == Some("") { + self.content_range = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.replication_status + && val.as_str() == "" { + self.replication_status = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.restore.as_deref() == Some("") { + self.restore = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} +} +impl DtoExt for IndexDocument { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } } -impl DtoExt for AbortMultipartUploadOutput { +} +impl DtoExt for Initiator { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if self.display_name.as_deref() == Some("") { + self.display_name = None; } -impl DtoExt for AccelerateConfiguration { +if self.id.as_deref() == Some("") { + self.id = None; +} +} +} +impl DtoExt for InputSerialization { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if let Some(ref mut val) = self.csv { +val.ignore_empty_strings(); } -impl DtoExt for AccessControlPolicy { +if let Some(ref val) = self.compression_type + && val.as_str() == "" { + self.compression_type = None; +} +if let Some(ref mut val) = self.json { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for IntelligentTieringAndOperator { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - } +if self.prefix.as_deref() == Some("") { + self.prefix = None; } -impl DtoExt for AccessControlTranslation { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for AnalyticsAndOperator { - fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } } -impl DtoExt for AnalyticsConfiguration { - fn ignore_empty_strings(&mut self) { - self.storage_class_analysis.ignore_empty_strings(); - } +impl DtoExt for IntelligentTieringConfiguration { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for IntelligentTieringFilter { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.and { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref mut val) = self.tag { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for InvalidObjectState { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.access_tier + && val.as_str() == "" { + self.access_tier = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +} +} +impl DtoExt for InventoryConfiguration { + fn ignore_empty_strings(&mut self) { +self.destination.ignore_empty_strings(); +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +self.schedule.ignore_empty_strings(); +} +} +impl DtoExt for InventoryDestination { + fn ignore_empty_strings(&mut self) { +self.s3_bucket_destination.ignore_empty_strings(); +} +} +impl DtoExt for InventoryEncryption { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.ssekms { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for InventoryFilter { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for InventoryS3BucketDestination { + fn ignore_empty_strings(&mut self) { +if self.account_id.as_deref() == Some("") { + self.account_id = None; +} +if let Some(ref mut val) = self.encryption { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for InventorySchedule { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for JSONInput { + fn ignore_empty_strings(&mut self) { +if let Some(ref val) = self.type_ + && val.as_str() == "" { + self.type_ = None; +} +} +} +impl DtoExt for JSONOutput { + fn ignore_empty_strings(&mut self) { +if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; +} +} +} +impl DtoExt for LambdaFunctionConfiguration { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +} +} +impl DtoExt for LifecycleExpiration { + fn ignore_empty_strings(&mut self) { +} +} +impl DtoExt for LifecycleRule { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.abort_incomplete_multipart_upload { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.expiration { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +if let Some(ref mut val) = self.noncurrent_version_expiration { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for LifecycleRuleAndOperator { + fn ignore_empty_strings(&mut self) { +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for LifecycleRuleFilter { + fn ignore_empty_strings(&mut self) { +if let Some(ref mut val) = self.and { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref mut val) = self.tag { +val.ignore_empty_strings(); +} +} +} +impl DtoExt for ListBucketAnalyticsConfigurationsInput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for ListBucketAnalyticsConfigurationsOutput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +} +} +impl DtoExt for ListBucketIntelligentTieringConfigurationsInput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +} +} +impl DtoExt for ListBucketIntelligentTieringConfigurationsOutput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +} +} +impl DtoExt for ListBucketInventoryConfigurationsInput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for ListBucketInventoryConfigurationsOutput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +} +} +impl DtoExt for ListBucketMetricsConfigurationsInput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} +} +impl DtoExt for ListBucketMetricsConfigurationsOutput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; +} +} +} +impl DtoExt for ListBucketsInput { + fn ignore_empty_strings(&mut self) { +if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; +} +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for ListBucketsOutput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} +} +impl DtoExt for ListDirectoryBucketsInput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +} +} +impl DtoExt for ListDirectoryBucketsOutput { + fn ignore_empty_strings(&mut self) { +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; +} +} +} +impl DtoExt for ListMultipartUploadsInput { + fn ignore_empty_strings(&mut self) { +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.key_marker.as_deref() == Some("") { + self.key_marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.upload_id_marker.as_deref() == Some("") { + self.upload_id_marker = None; +} +} +} +impl DtoExt for ListMultipartUploadsOutput { + fn ignore_empty_strings(&mut self) { +if self.bucket.as_deref() == Some("") { + self.bucket = None; +} +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.key_marker.as_deref() == Some("") { + self.key_marker = None; +} +if self.next_key_marker.as_deref() == Some("") { + self.next_key_marker = None; +} +if self.next_upload_id_marker.as_deref() == Some("") { + self.next_upload_id_marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.upload_id_marker.as_deref() == Some("") { + self.upload_id_marker = None; +} +} +} +impl DtoExt for ListObjectVersionsInput { + fn ignore_empty_strings(&mut self) { +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.key_marker.as_deref() == Some("") { + self.key_marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id_marker.as_deref() == Some("") { + self.version_id_marker = None; +} +} +} +impl DtoExt for ListObjectVersionsOutput { + fn ignore_empty_strings(&mut self) { +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; +} +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; +} +if self.key_marker.as_deref() == Some("") { + self.key_marker = None; +} +if self.name.as_deref() == Some("") { + self.name = None; +} +if self.next_key_marker.as_deref() == Some("") { + self.next_key_marker = None; +} +if self.next_version_id_marker.as_deref() == Some("") { + self.next_version_id_marker = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; } -impl DtoExt for AnalyticsExportDestination { - fn ignore_empty_strings(&mut self) { - self.s3_bucket_destination.ignore_empty_strings(); - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; } -impl DtoExt for AnalyticsS3BucketDestination { - fn ignore_empty_strings(&mut self) { - if self.bucket_account_id.as_deref() == Some("") { - self.bucket_account_id = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.version_id_marker.as_deref() == Some("") { + self.version_id_marker = None; } -impl DtoExt for AssumeRoleOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.assumed_role_user { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.credentials { - val.ignore_empty_strings(); - } - if self.source_identity.as_deref() == Some("") { - self.source_identity = None; - } - } } -impl DtoExt for AssumedRoleUser { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for Bucket { +impl DtoExt for ListObjectsInput { fn ignore_empty_strings(&mut self) { - if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; - } - if self.name.as_deref() == Some("") { - self.name = None; - } - } +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; } -impl DtoExt for BucketInfo { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.data_redundancy - && val.as_str() == "" - { - self.data_redundancy = None; - } - if let Some(ref val) = self.type_ - && val.as_str() == "" - { - self.type_ = None; - } - } +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; } -impl DtoExt for BucketLifecycleConfiguration { - fn ignore_empty_strings(&mut self) {} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; } -impl DtoExt for BucketLoggingStatus { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.logging_enabled { - val.ignore_empty_strings(); - } - } +if self.marker.as_deref() == Some("") { + self.marker = None; } -impl DtoExt for CORSConfiguration { - fn ignore_empty_strings(&mut self) {} +if self.prefix.as_deref() == Some("") { + self.prefix = None; } -impl DtoExt for CORSRule { - fn ignore_empty_strings(&mut self) { - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; } -impl DtoExt for CSVInput { - fn ignore_empty_strings(&mut self) { - if self.comments.as_deref() == Some("") { - self.comments = None; - } - if self.field_delimiter.as_deref() == Some("") { - self.field_delimiter = None; - } - if let Some(ref val) = self.file_header_info - && val.as_str() == "" - { - self.file_header_info = None; - } - if self.quote_character.as_deref() == Some("") { - self.quote_character = None; - } - if self.quote_escape_character.as_deref() == Some("") { - self.quote_escape_character = None; - } - if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; - } - } } -impl DtoExt for CSVOutput { - fn ignore_empty_strings(&mut self) { - if self.field_delimiter.as_deref() == Some("") { - self.field_delimiter = None; - } - if self.quote_character.as_deref() == Some("") { - self.quote_character = None; - } - if self.quote_escape_character.as_deref() == Some("") { - self.quote_escape_character = None; - } - if let Some(ref val) = self.quote_fields - && val.as_str() == "" - { - self.quote_fields = None; - } - if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; - } - } } -impl DtoExt for Checksum { +impl DtoExt for ListObjectsOutput { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - } +if self.name.as_deref() == Some("") { + self.name = None; } -impl DtoExt for CommonPrefix { - fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.prefix.as_deref() == Some("") { + self.prefix = None; } -impl DtoExt for CompleteMultipartUploadInput { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref mut val) = self.multipart_upload { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - } +if self.marker.as_deref() == Some("") { + self.marker = None; } -impl DtoExt for CompleteMultipartUploadOutput { - fn ignore_empty_strings(&mut self) { - if self.bucket.as_deref() == Some("") { - self.bucket = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if self.location.as_deref() == Some("") { - self.location = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; } -impl DtoExt for CompletedMultipartUpload { - fn ignore_empty_strings(&mut self) {} +if self.next_marker.as_deref() == Some("") { + self.next_marker = None; } -impl DtoExt for CompletedPart { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - } +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; } -impl DtoExt for Condition { - fn ignore_empty_strings(&mut self) { - if self.http_error_code_returned_equals.as_deref() == Some("") { - self.http_error_code_returned_equals = None; - } - if self.key_prefix_equals.as_deref() == Some("") { - self.key_prefix_equals = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; } -impl DtoExt for CopyObjectInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { - self.copy_source_sse_customer_algorithm = None; - } - if self.copy_source_sse_customer_key.as_deref() == Some("") { - self.copy_source_sse_customer_key = None; - } - if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { - self.copy_source_sse_customer_key_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.expected_source_bucket_owner.as_deref() == Some("") { - self.expected_source_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.metadata_directive - && val.as_str() == "" - { - self.metadata_directive = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.tagging.as_deref() == Some("") { - self.tagging = None; - } - if let Some(ref val) = self.tagging_directive - && val.as_str() == "" - { - self.tagging_directive = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } } -impl DtoExt for CopyObjectOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.copy_object_result { - val.ignore_empty_strings(); - } - if self.copy_source_version_id.as_deref() == Some("") { - self.copy_source_version_id = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } } -impl DtoExt for CopyObjectResult { +impl DtoExt for ListObjectsV2Input { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; } -impl DtoExt for CopyPartResult { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - } +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; } -impl DtoExt for CreateBucketConfiguration { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.bucket { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.location { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.location_constraint - && val.as_str() == "" - { - self.location_constraint = None; - } - } +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; } -impl DtoExt for CreateBucketInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if let Some(ref mut val) = self.create_bucket_configuration { - val.ignore_empty_strings(); - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write.as_deref() == Some("") { - self.grant_write = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.object_ownership - && val.as_str() == "" - { - self.object_ownership = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; } -impl DtoExt for CreateBucketMetadataTableConfigurationInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.metadata_table_configuration.ignore_empty_strings(); - } +if self.prefix.as_deref() == Some("") { + self.prefix = None; } -impl DtoExt for CreateBucketOutput { - fn ignore_empty_strings(&mut self) { - if self.location.as_deref() == Some("") { - self.location = None; - } - } +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; } -impl DtoExt for CreateMultipartUploadInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.tagging.as_deref() == Some("") { - self.tagging = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } +if self.start_after.as_deref() == Some("") { + self.start_after = None; } -impl DtoExt for CreateMultipartUploadOutput { - fn ignore_empty_strings(&mut self) { - if self.abort_rule_id.as_deref() == Some("") { - self.abort_rule_id = None; - } - if self.bucket.as_deref() == Some("") { - self.bucket = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.upload_id.as_deref() == Some("") { - self.upload_id = None; - } - } } -impl DtoExt for CreateSessionInput { - fn ignore_empty_strings(&mut self) { - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.session_mode - && val.as_str() == "" - { - self.session_mode = None; - } - } } -impl DtoExt for CreateSessionOutput { +impl DtoExt for ListObjectsV2Output { fn ignore_empty_strings(&mut self) { - self.credentials.ignore_empty_strings(); - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - } +if self.name.as_deref() == Some("") { + self.name = None; } -impl DtoExt for Credentials { - fn ignore_empty_strings(&mut self) {} +if self.prefix.as_deref() == Some("") { + self.prefix = None; } -impl DtoExt for DefaultRetention { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.mode - && val.as_str() == "" - { - self.mode = None; - } - } +if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; } -impl DtoExt for Delete { - fn ignore_empty_strings(&mut self) {} +if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; } -impl DtoExt for DeleteBucketAnalyticsConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.delimiter.as_deref() == Some("") { + self.delimiter = None; } -impl DtoExt for DeleteBucketCorsInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.encoding_type + && val.as_str() == "" { + self.encoding_type = None; } -impl DtoExt for DeleteBucketEncryptionInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.start_after.as_deref() == Some("") { + self.start_after = None; } -impl DtoExt for DeleteBucketInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; } -impl DtoExt for DeleteBucketIntelligentTieringConfigurationInput { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for DeleteBucketInventoryConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for DeleteBucketLifecycleInput { +impl DtoExt for ListPartsInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; } -impl DtoExt for DeleteBucketMetadataTableConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; } -impl DtoExt for DeleteBucketMetricsConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; } -impl DtoExt for DeleteBucketOwnershipControlsInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; } -impl DtoExt for DeleteBucketPolicyInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; } -impl DtoExt for DeleteBucketReplicationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for DeleteBucketTaggingInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for DeleteBucketWebsiteInput { +impl DtoExt for ListPartsOutput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.abort_rule_id.as_deref() == Some("") { + self.abort_rule_id = None; } -impl DtoExt for DeleteMarkerEntry { - fn ignore_empty_strings(&mut self) { - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.bucket.as_deref() == Some("") { + self.bucket = None; } -impl DtoExt for DeleteMarkerReplication { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; } -impl DtoExt for DeleteObjectInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.mfa.as_deref() == Some("") { - self.mfa = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; } -impl DtoExt for DeleteObjectOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref mut val) = self.initiator { +val.ignore_empty_strings(); } -impl DtoExt for DeleteObjectTaggingInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.key.as_deref() == Some("") { + self.key = None; } -impl DtoExt for DeleteObjectTaggingOutput { - fn ignore_empty_strings(&mut self) { - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); } -impl DtoExt for DeleteObjectsInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - self.delete.ignore_empty_strings(); - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.mfa.as_deref() == Some("") { - self.mfa = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; } -impl DtoExt for DeleteObjectsOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; } -impl DtoExt for DeletePublicAccessBlockInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.upload_id.as_deref() == Some("") { + self.upload_id = None; } -impl DtoExt for DeletedObject { - fn ignore_empty_strings(&mut self) { - if self.delete_marker_version_id.as_deref() == Some("") { - self.delete_marker_version_id = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } } -impl DtoExt for Destination { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.access_control_translation { - val.ignore_empty_strings(); - } - if self.account.as_deref() == Some("") { - self.account = None; - } - if let Some(ref mut val) = self.encryption_configuration { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.metrics { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.replication_time { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } } -impl DtoExt for Encryption { +impl DtoExt for LocationInfo { fn ignore_empty_strings(&mut self) { - if self.kms_context.as_deref() == Some("") { - self.kms_context = None; - } - if self.kms_key_id.as_deref() == Some("") { - self.kms_key_id = None; - } - } +if self.name.as_deref() == Some("") { + self.name = None; } -impl DtoExt for EncryptionConfiguration { - fn ignore_empty_strings(&mut self) { - if self.replica_kms_key_id.as_deref() == Some("") { - self.replica_kms_key_id = None; - } - } +if let Some(ref val) = self.type_ + && val.as_str() == "" { + self.type_ = None; } -impl DtoExt for Error { - fn ignore_empty_strings(&mut self) { - if self.code.as_deref() == Some("") { - self.code = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if self.message.as_deref() == Some("") { - self.message = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } } -impl DtoExt for ErrorDetails { +} +impl DtoExt for LoggingEnabled { fn ignore_empty_strings(&mut self) { - if self.error_code.as_deref() == Some("") { - self.error_code = None; - } - if self.error_message.as_deref() == Some("") { - self.error_message = None; - } - } +if let Some(ref mut val) = self.target_object_key_format { +val.ignore_empty_strings(); } -impl DtoExt for ErrorDocument { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for ExistingObjectReplication { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for FilterRule { +impl DtoExt for MetadataEntry { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.name - && val.as_str() == "" - { - self.name = None; - } - if self.value.as_deref() == Some("") { - self.value = None; - } - } +if self.name.as_deref() == Some("") { + self.name = None; } -impl DtoExt for GetBucketAccelerateConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } +if self.value.as_deref() == Some("") { + self.value = None; } -impl DtoExt for GetBucketAccelerateConfigurationOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } } -impl DtoExt for GetBucketAclInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketAclOutput { +impl DtoExt for MetadataTableConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - } +self.s3_tables_destination.ignore_empty_strings(); } -impl DtoExt for GetBucketAnalyticsConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketAnalyticsConfigurationOutput { +impl DtoExt for MetadataTableConfigurationResult { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.analytics_configuration { - val.ignore_empty_strings(); - } - } +self.s3_tables_destination_result.ignore_empty_strings(); } -impl DtoExt for GetBucketCorsInput { +} +impl DtoExt for Metrics { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref mut val) = self.event_threshold { +val.ignore_empty_strings(); } -impl DtoExt for GetBucketCorsOutput { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for GetBucketEncryptionInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketEncryptionOutput { +impl DtoExt for MetricsAndOperator { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.server_side_encryption_configuration { - val.ignore_empty_strings(); - } - } +if self.access_point_arn.as_deref() == Some("") { + self.access_point_arn = None; } -impl DtoExt for GetBucketIntelligentTieringConfigurationInput { - fn ignore_empty_strings(&mut self) {} +if self.prefix.as_deref() == Some("") { + self.prefix = None; } -impl DtoExt for GetBucketIntelligentTieringConfigurationOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.intelligent_tiering_configuration { - val.ignore_empty_strings(); - } - } } -impl DtoExt for GetBucketInventoryConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketInventoryConfigurationOutput { +impl DtoExt for MetricsConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.inventory_configuration { - val.ignore_empty_strings(); - } - } } -impl DtoExt for GetBucketLifecycleConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketLifecycleConfigurationOutput { +impl DtoExt for MultipartUpload { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" - { - self.transition_default_minimum_object_size = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; } -impl DtoExt for GetBucketLocationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; } -impl DtoExt for GetBucketLocationOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.location_constraint - && val.as_str() == "" - { - self.location_constraint = None; - } - } +if let Some(ref mut val) = self.initiator { +val.ignore_empty_strings(); } -impl DtoExt for GetBucketLoggingInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.key.as_deref() == Some("") { + self.key = None; } -impl DtoExt for GetBucketLoggingOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.logging_enabled { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); } -impl DtoExt for GetBucketMetadataTableConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; } -impl DtoExt for GetBucketMetadataTableConfigurationOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.get_bucket_metadata_table_configuration_result { - val.ignore_empty_strings(); - } - } +if self.upload_id.as_deref() == Some("") { + self.upload_id = None; } -impl DtoExt for GetBucketMetadataTableConfigurationResult { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.error { - val.ignore_empty_strings(); - } - self.metadata_table_configuration_result.ignore_empty_strings(); - } } -impl DtoExt for GetBucketMetricsConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketMetricsConfigurationOutput { +impl DtoExt for NoncurrentVersionExpiration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.metrics_configuration { - val.ignore_empty_strings(); - } - } } -impl DtoExt for GetBucketNotificationConfigurationInput { +} +impl DtoExt for NoncurrentVersionTransition { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; } -impl DtoExt for GetBucketNotificationConfigurationOutput { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for GetBucketOwnershipControlsInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketOwnershipControlsOutput { +impl DtoExt for NotificationConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.ownership_controls { - val.ignore_empty_strings(); - } - } } -impl DtoExt for GetBucketPolicyInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketPolicyOutput { +impl DtoExt for NotificationConfigurationFilter { fn ignore_empty_strings(&mut self) { - if self.policy.as_deref() == Some("") { - self.policy = None; - } - } +if let Some(ref mut val) = self.key { +val.ignore_empty_strings(); } -impl DtoExt for GetBucketPolicyStatusInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketPolicyStatusOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.policy_status { - val.ignore_empty_strings(); - } - } } -impl DtoExt for GetBucketReplicationInput { +impl DtoExt for Object { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; } -impl DtoExt for GetBucketReplicationOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.replication_configuration { - val.ignore_empty_strings(); - } - } +if self.key.as_deref() == Some("") { + self.key = None; } -impl DtoExt for GetBucketRequestPaymentInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); } -impl DtoExt for GetBucketRequestPaymentOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.payer - && val.as_str() == "" - { - self.payer = None; - } - } +if let Some(ref mut val) = self.restore_status { +val.ignore_empty_strings(); } -impl DtoExt for GetBucketTaggingInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; } -impl DtoExt for GetBucketTaggingOutput { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for GetBucketVersioningInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketVersioningOutput { +impl DtoExt for ObjectIdentifier { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.mfa_delete - && val.as_str() == "" - { - self.mfa_delete = None; - } - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if self.version_id.as_deref() == Some("") { + self.version_id = None; } -impl DtoExt for GetBucketWebsiteInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetBucketWebsiteOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.error_document { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.index_document { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.redirect_all_requests_to { - val.ignore_empty_strings(); - } - } } -impl DtoExt for GetObjectAclInput { +impl DtoExt for ObjectLockConfiguration { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.object_lock_enabled + && val.as_str() == "" { + self.object_lock_enabled = None; } -impl DtoExt for GetObjectAclOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref mut val) = self.rule { +val.ignore_empty_strings(); } -impl DtoExt for GetObjectAttributesInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } } -impl DtoExt for GetObjectAttributesOutput { +} +impl DtoExt for ObjectLockLegalHold { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.checksum { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.object_parts { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; } -impl DtoExt for GetObjectAttributesParts { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for GetObjectInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_mode - && val.as_str() == "" - { - self.checksum_mode = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.response_cache_control.as_deref() == Some("") { - self.response_cache_control = None; - } - if self.response_content_disposition.as_deref() == Some("") { - self.response_content_disposition = None; - } - if self.response_content_encoding.as_deref() == Some("") { - self.response_content_encoding = None; - } - if self.response_content_language.as_deref() == Some("") { - self.response_content_language = None; - } - if self.response_content_type.as_deref() == Some("") { - self.response_content_type = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } } -impl DtoExt for GetObjectLegalHoldInput { +impl DtoExt for ObjectLockRetention { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.mode + && val.as_str() == "" { + self.mode = None; } -impl DtoExt for GetObjectLegalHoldOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.legal_hold { - val.ignore_empty_strings(); - } - } } -impl DtoExt for GetObjectLockConfigurationInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetObjectLockConfigurationOutput { +impl DtoExt for ObjectLockRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.object_lock_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.default_retention { +val.ignore_empty_strings(); } -impl DtoExt for GetObjectOutput { - fn ignore_empty_strings(&mut self) { - if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_range.as_deref() == Some("") { - self.content_range = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.replication_status - && val.as_str() == "" - { - self.replication_status = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.restore.as_deref() == Some("") { - self.restore = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } } -impl DtoExt for GetObjectRetentionInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } } -impl DtoExt for GetObjectRetentionOutput { +impl DtoExt for ObjectPart { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.retention { - val.ignore_empty_strings(); - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; } -impl DtoExt for GetObjectTaggingInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; } -impl DtoExt for GetObjectTaggingOutput { - fn ignore_empty_strings(&mut self) { - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; } -impl DtoExt for GetObjectTorrentInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; } -impl DtoExt for GetObjectTorrentOutput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; } -impl DtoExt for GetPublicAccessBlockInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for GetPublicAccessBlockOutput { +} +impl DtoExt for ObjectVersion { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.public_access_block_configuration { - val.ignore_empty_strings(); - } - } +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; } -impl DtoExt for GlacierJobParameters { - fn ignore_empty_strings(&mut self) {} +if self.key.as_deref() == Some("") { + self.key = None; } -impl DtoExt for Grant { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.grantee { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.permission - && val.as_str() == "" - { - self.permission = None; - } - } +if let Some(ref mut val) = self.owner { +val.ignore_empty_strings(); } -impl DtoExt for Grantee { - fn ignore_empty_strings(&mut self) { - if self.display_name.as_deref() == Some("") { - self.display_name = None; - } - if self.email_address.as_deref() == Some("") { - self.email_address = None; - } - if self.id.as_deref() == Some("") { - self.id = None; - } - if self.uri.as_deref() == Some("") { - self.uri = None; - } - } +if let Some(ref mut val) = self.restore_status { +val.ignore_empty_strings(); } -impl DtoExt for HeadBucketInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; } -impl DtoExt for HeadBucketOutput { - fn ignore_empty_strings(&mut self) { - if self.bucket_location_name.as_deref() == Some("") { - self.bucket_location_name = None; - } - if let Some(ref val) = self.bucket_location_type - && val.as_str() == "" - { - self.bucket_location_type = None; - } - if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; - } - } +if self.version_id.as_deref() == Some("") { + self.version_id = None; } -impl DtoExt for HeadObjectInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_mode - && val.as_str() == "" - { - self.checksum_mode = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.response_cache_control.as_deref() == Some("") { - self.response_cache_control = None; - } - if self.response_content_disposition.as_deref() == Some("") { - self.response_content_disposition = None; - } - if self.response_content_encoding.as_deref() == Some("") { - self.response_content_encoding = None; - } - if self.response_content_language.as_deref() == Some("") { - self.response_content_language = None; - } - if self.response_content_type.as_deref() == Some("") { - self.response_content_type = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } } -impl DtoExt for HeadObjectOutput { +} +impl DtoExt for OutputLocation { fn ignore_empty_strings(&mut self) { - if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; - } - if let Some(ref val) = self.archive_status - && val.as_str() == "" - { - self.archive_status = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_range.as_deref() == Some("") { - self.content_range = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.replication_status - && val.as_str() == "" - { - self.replication_status = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.restore.as_deref() == Some("") { - self.restore = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } +if let Some(ref mut val) = self.s3 { +val.ignore_empty_strings(); } -impl DtoExt for IndexDocument { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for Initiator { - fn ignore_empty_strings(&mut self) { - if self.display_name.as_deref() == Some("") { - self.display_name = None; - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } } -impl DtoExt for InputSerialization { +impl DtoExt for OutputSerialization { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.csv { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.compression_type - && val.as_str() == "" - { - self.compression_type = None; - } - if let Some(ref mut val) = self.json { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.csv { +val.ignore_empty_strings(); } -impl DtoExt for IntelligentTieringAndOperator { - fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if let Some(ref mut val) = self.json { +val.ignore_empty_strings(); } -impl DtoExt for IntelligentTieringConfiguration { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - } } -impl DtoExt for IntelligentTieringFilter { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.and { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref mut val) = self.tag { - val.ignore_empty_strings(); - } - } } -impl DtoExt for InvalidObjectState { +impl DtoExt for Owner { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.access_tier - && val.as_str() == "" - { - self.access_tier = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } +if self.display_name.as_deref() == Some("") { + self.display_name = None; } -impl DtoExt for InventoryConfiguration { - fn ignore_empty_strings(&mut self) { - self.destination.ignore_empty_strings(); - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - self.schedule.ignore_empty_strings(); - } +if self.id.as_deref() == Some("") { + self.id = None; } -impl DtoExt for InventoryDestination { - fn ignore_empty_strings(&mut self) { - self.s3_bucket_destination.ignore_empty_strings(); - } } -impl DtoExt for InventoryEncryption { +} +impl DtoExt for OwnershipControls { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.ssekms { - val.ignore_empty_strings(); - } - } } -impl DtoExt for InventoryFilter { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for InventoryS3BucketDestination { +impl DtoExt for OwnershipControlsRule { fn ignore_empty_strings(&mut self) { - if self.account_id.as_deref() == Some("") { - self.account_id = None; - } - if let Some(ref mut val) = self.encryption { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } } -impl DtoExt for InventorySchedule { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for JSONInput { +impl DtoExt for Part { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.type_ - && val.as_str() == "" - { - self.type_ = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; } -impl DtoExt for JSONOutput { - fn ignore_empty_strings(&mut self) { - if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; - } - } +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; } -impl DtoExt for LambdaFunctionConfiguration { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; } -impl DtoExt for LifecycleExpiration { - fn ignore_empty_strings(&mut self) {} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; } -impl DtoExt for LifecycleRule { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.abort_incomplete_multipart_upload { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.expiration { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - if let Some(ref mut val) = self.noncurrent_version_expiration { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; } -impl DtoExt for LifecycleRuleAndOperator { - fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } } -impl DtoExt for LifecycleRuleFilter { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.and { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref mut val) = self.tag { - val.ignore_empty_strings(); - } - } } -impl DtoExt for ListBucketAnalyticsConfigurationsInput { +impl DtoExt for PartitionedPrefix { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.partition_date_source + && val.as_str() == "" { + self.partition_date_source = None; } -impl DtoExt for ListBucketAnalyticsConfigurationsOutput { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - } } -impl DtoExt for ListBucketIntelligentTieringConfigurationsInput { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - } } -impl DtoExt for ListBucketIntelligentTieringConfigurationsOutput { +impl DtoExt for PolicyStatus { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - } } -impl DtoExt for ListBucketInventoryConfigurationsInput { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } } -impl DtoExt for ListBucketInventoryConfigurationsOutput { +impl DtoExt for PostObjectInput { fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; } -impl DtoExt for ListBucketMetricsConfigurationsInput { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; } -impl DtoExt for ListBucketMetricsConfigurationsOutput { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; } -impl DtoExt for ListBucketsInput { - fn ignore_empty_strings(&mut self) { - if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; - } - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; } -impl DtoExt for ListBucketsOutput { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; } -impl DtoExt for ListDirectoryBucketsInput { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - } +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; } -impl DtoExt for ListDirectoryBucketsOutput { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - } +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; } -impl DtoExt for ListMultipartUploadsInput { - fn ignore_empty_strings(&mut self) { - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.key_marker.as_deref() == Some("") { - self.key_marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.upload_id_marker.as_deref() == Some("") { - self.upload_id_marker = None; - } - } +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; } -impl DtoExt for ListMultipartUploadsOutput { - fn ignore_empty_strings(&mut self) { - if self.bucket.as_deref() == Some("") { - self.bucket = None; - } - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.key_marker.as_deref() == Some("") { - self.key_marker = None; - } - if self.next_key_marker.as_deref() == Some("") { - self.next_key_marker = None; - } - if self.next_upload_id_marker.as_deref() == Some("") { - self.next_upload_id_marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.upload_id_marker.as_deref() == Some("") { - self.upload_id_marker = None; - } - } +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; } -impl DtoExt for ListObjectVersionsInput { - fn ignore_empty_strings(&mut self) { - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.key_marker.as_deref() == Some("") { - self.key_marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id_marker.as_deref() == Some("") { - self.version_id_marker = None; - } - } +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; } -impl DtoExt for ListObjectVersionsOutput { - fn ignore_empty_strings(&mut self) { - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.key_marker.as_deref() == Some("") { - self.key_marker = None; - } - if self.name.as_deref() == Some("") { - self.name = None; - } - if self.next_key_marker.as_deref() == Some("") { - self.next_key_marker = None; - } - if self.next_version_id_marker.as_deref() == Some("") { - self.next_version_id_marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.version_id_marker.as_deref() == Some("") { - self.version_id_marker = None; - } - } +if self.content_language.as_deref() == Some("") { + self.content_language = None; } -impl DtoExt for ListObjectsInput { - fn ignore_empty_strings(&mut self) { - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.marker.as_deref() == Some("") { - self.marker = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - } +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; } -impl DtoExt for ListObjectsOutput { - fn ignore_empty_strings(&mut self) { - if self.name.as_deref() == Some("") { - self.name = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if self.marker.as_deref() == Some("") { - self.marker = None; - } - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if self.next_marker.as_deref() == Some("") { - self.next_marker = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; } -impl DtoExt for ListObjectsV2Input { - fn ignore_empty_strings(&mut self) { - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.start_after.as_deref() == Some("") { - self.start_after = None; - } - } +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; } -impl DtoExt for ListObjectsV2Output { - fn ignore_empty_strings(&mut self) { - if self.name.as_deref() == Some("") { - self.name = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; - } - if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; - } - if self.delimiter.as_deref() == Some("") { - self.delimiter = None; - } - if let Some(ref val) = self.encoding_type - && val.as_str() == "" - { - self.encoding_type = None; - } - if self.start_after.as_deref() == Some("") { - self.start_after = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; } -impl DtoExt for ListPartsInput { - fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - } +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; } -impl DtoExt for ListPartsOutput { - fn ignore_empty_strings(&mut self) { - if self.abort_rule_id.as_deref() == Some("") { - self.abort_rule_id = None; - } - if self.bucket.as_deref() == Some("") { - self.bucket = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if let Some(ref mut val) = self.initiator { - val.ignore_empty_strings(); - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.upload_id.as_deref() == Some("") { - self.upload_id = None; - } - } +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; } -impl DtoExt for LocationInfo { - fn ignore_empty_strings(&mut self) { - if self.name.as_deref() == Some("") { - self.name = None; - } - if let Some(ref val) = self.type_ - && val.as_str() == "" - { - self.type_ = None; - } - } +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; } -impl DtoExt for LoggingEnabled { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.target_object_key_format { - val.ignore_empty_strings(); - } - } +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; } -impl DtoExt for MetadataEntry { - fn ignore_empty_strings(&mut self) { - if self.name.as_deref() == Some("") { - self.name = None; - } - if self.value.as_deref() == Some("") { - self.value = None; - } - } +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; } -impl DtoExt for MetadataTableConfiguration { - fn ignore_empty_strings(&mut self) { - self.s3_tables_destination.ignore_empty_strings(); - } +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; } -impl DtoExt for MetadataTableConfigurationResult { - fn ignore_empty_strings(&mut self) { - self.s3_tables_destination_result.ignore_empty_strings(); - } +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; } -impl DtoExt for Metrics { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.event_threshold { - val.ignore_empty_strings(); - } - } +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; } -impl DtoExt for MetricsAndOperator { - fn ignore_empty_strings(&mut self) { - if self.access_point_arn.as_deref() == Some("") { - self.access_point_arn = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; } -impl DtoExt for MetricsConfiguration { - fn ignore_empty_strings(&mut self) {} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; } -impl DtoExt for MultipartUpload { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if let Some(ref mut val) = self.initiator { - val.ignore_empty_strings(); - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.upload_id.as_deref() == Some("") { - self.upload_id = None; - } - } +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; } -impl DtoExt for NoncurrentVersionExpiration { - fn ignore_empty_strings(&mut self) {} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; } -impl DtoExt for NoncurrentVersionTransition { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } +if self.tagging.as_deref() == Some("") { + self.tagging = None; } -impl DtoExt for NotificationConfiguration { - fn ignore_empty_strings(&mut self) {} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; } -impl DtoExt for NotificationConfigurationFilter { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.key { - val.ignore_empty_strings(); - } - } } -impl DtoExt for Object { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.restore_status { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } } -impl DtoExt for ObjectIdentifier { +impl DtoExt for PostObjectOutput { fn ignore_empty_strings(&mut self) { - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; } -impl DtoExt for ObjectLockConfiguration { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.object_lock_enabled - && val.as_str() == "" - { - self.object_lock_enabled = None; - } - if let Some(ref mut val) = self.rule { - val.ignore_empty_strings(); - } - } +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; } -impl DtoExt for ObjectLockLegalHold { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; } -impl DtoExt for ObjectLockRetention { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.mode - && val.as_str() == "" - { - self.mode = None; - } - } +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; } -impl DtoExt for ObjectLockRule { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.default_retention { - val.ignore_empty_strings(); - } - } +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; } -impl DtoExt for ObjectPart { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - } +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; } -impl DtoExt for ObjectVersion { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.key.as_deref() == Some("") { - self.key = None; - } - if let Some(ref mut val) = self.owner { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.restore_status { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.expiration.as_deref() == Some("") { + self.expiration = None; } -impl DtoExt for OutputLocation { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.s3 { - val.ignore_empty_strings(); - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; } -impl DtoExt for OutputSerialization { - fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.csv { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.json { - val.ignore_empty_strings(); - } - } +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; } -impl DtoExt for Owner { - fn ignore_empty_strings(&mut self) { - if self.display_name.as_deref() == Some("") { - self.display_name = None; - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; } -impl DtoExt for OwnershipControls { - fn ignore_empty_strings(&mut self) {} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; } -impl DtoExt for OwnershipControlsRule { - fn ignore_empty_strings(&mut self) {} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; } -impl DtoExt for Part { - fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - } +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; } -impl DtoExt for PartitionedPrefix { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.partition_date_source - && val.as_str() == "" - { - self.partition_date_source = None; - } - } +if self.version_id.as_deref() == Some("") { + self.version_id = None; } -impl DtoExt for PolicyStatus { - fn ignore_empty_strings(&mut self) {} } -impl DtoExt for PostObjectInput { - fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.tagging.as_deref() == Some("") { - self.tagging = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } } -impl DtoExt for PostObjectOutput { +impl DtoExt for Progress { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } } -impl DtoExt for Progress { - fn ignore_empty_strings(&mut self) {} } impl DtoExt for ProgressEvent { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.details { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.details { +val.ignore_empty_strings(); +} +} } impl DtoExt for PublicAccessBlockConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for PutBucketAccelerateConfigurationInput { fn ignore_empty_strings(&mut self) { - self.accelerate_configuration.ignore_empty_strings(); - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +self.accelerate_configuration.ignore_empty_strings(); +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketAclInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if let Some(ref mut val) = self.access_control_policy { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write.as_deref() == Some("") { - self.grant_write = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if let Some(ref mut val) = self.access_control_policy { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write.as_deref() == Some("") { + self.grant_write = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +} } impl DtoExt for PutBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { - self.analytics_configuration.ignore_empty_strings(); - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +self.analytics_configuration.ignore_empty_strings(); +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketCorsInput { fn ignore_empty_strings(&mut self) { - self.cors_configuration.ignore_empty_strings(); - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +self.cors_configuration.ignore_empty_strings(); +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketEncryptionInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.server_side_encryption_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.server_side_encryption_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketIntelligentTieringConfigurationInput { fn ignore_empty_strings(&mut self) { - self.intelligent_tiering_configuration.ignore_empty_strings(); - } +self.intelligent_tiering_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketInventoryConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.inventory_configuration.ignore_empty_strings(); - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.inventory_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketLifecycleConfigurationInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref mut val) = self.lifecycle_configuration { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" - { - self.transition_default_minimum_object_size = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref mut val) = self.lifecycle_configuration { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" { + self.transition_default_minimum_object_size = None; +} +} } impl DtoExt for PutBucketLifecycleConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" - { - self.transition_default_minimum_object_size = None; - } - } +if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" { + self.transition_default_minimum_object_size = None; +} +} } impl DtoExt for PutBucketLoggingInput { fn ignore_empty_strings(&mut self) { - self.bucket_logging_status.ignore_empty_strings(); - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +self.bucket_logging_status.ignore_empty_strings(); +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.metrics_configuration.ignore_empty_strings(); - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.metrics_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketNotificationConfigurationInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.notification_configuration.ignore_empty_strings(); - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.notification_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketOwnershipControlsInput { fn ignore_empty_strings(&mut self) { - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.ownership_controls.ignore_empty_strings(); - } +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.ownership_controls.ignore_empty_strings(); +} } impl DtoExt for PutBucketPolicyInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +} } impl DtoExt for PutBucketReplicationInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.replication_configuration.ignore_empty_strings(); - if self.token.as_deref() == Some("") { - self.token = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.replication_configuration.ignore_empty_strings(); +if self.token.as_deref() == Some("") { + self.token = None; +} +} } impl DtoExt for PutBucketRequestPaymentInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.request_payment_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.request_payment_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketTaggingInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.tagging.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.tagging.ignore_empty_strings(); +} } impl DtoExt for PutBucketVersioningInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.mfa.as_deref() == Some("") { - self.mfa = None; - } - self.versioning_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.mfa.as_deref() == Some("") { + self.mfa = None; +} +self.versioning_configuration.ignore_empty_strings(); +} } impl DtoExt for PutBucketWebsiteInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.website_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.website_configuration.ignore_empty_strings(); +} } impl DtoExt for PutObjectAclInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if let Some(ref mut val) = self.access_control_policy { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write.as_deref() == Some("") { - self.grant_write = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if let Some(ref mut val) = self.access_control_policy { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write.as_deref() == Some("") { + self.grant_write = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectAclOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for PutObjectInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.acl - && val.as_str() == "" - { - self.acl = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; - } - if self.grant_read.as_deref() == Some("") { - self.grant_read = None; - } - if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; - } - if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.tagging.as_deref() == Some("") { - self.tagging = None; - } - if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; - } - } +if let Some(ref val) = self.acl + && val.as_str() == "" { + self.acl = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; +} +if self.grant_read.as_deref() == Some("") { + self.grant_read = None; +} +if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; +} +if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.tagging.as_deref() == Some("") { + self.tagging = None; +} +if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; +} +} } impl DtoExt for PutObjectLegalHoldInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref mut val) = self.legal_hold { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref mut val) = self.legal_hold { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectLegalHoldOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for PutObjectLockConfigurationInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref mut val) = self.object_lock_configuration { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.token.as_deref() == Some("") { - self.token = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref mut val) = self.object_lock_configuration { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.token.as_deref() == Some("") { + self.token = None; +} +} } impl DtoExt for PutObjectLockConfigurationOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for PutObjectOutput { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.checksum_type - && val.as_str() == "" - { - self.checksum_type = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.checksum_type + && val.as_str() == "" { + self.checksum_type = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectRetentionInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if let Some(ref mut val) = self.retention { - val.ignore_empty_strings(); - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if let Some(ref mut val) = self.retention { +val.ignore_empty_strings(); +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectRetentionOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +} } impl DtoExt for PutObjectTaggingInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - self.tagging.ignore_empty_strings(); - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +self.tagging.ignore_empty_strings(); +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutObjectTaggingOutput { fn ignore_empty_strings(&mut self) { - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for PutPublicAccessBlockInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - self.public_access_block_configuration.ignore_empty_strings(); - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +self.public_access_block_configuration.ignore_empty_strings(); +} } impl DtoExt for QueueConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +} } impl DtoExt for RecordsEvent { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for Redirect { fn ignore_empty_strings(&mut self) { - if self.host_name.as_deref() == Some("") { - self.host_name = None; - } - if self.http_redirect_code.as_deref() == Some("") { - self.http_redirect_code = None; - } - if let Some(ref val) = self.protocol - && val.as_str() == "" - { - self.protocol = None; - } - if self.replace_key_prefix_with.as_deref() == Some("") { - self.replace_key_prefix_with = None; - } - if self.replace_key_with.as_deref() == Some("") { - self.replace_key_with = None; - } - } +if self.host_name.as_deref() == Some("") { + self.host_name = None; +} +if self.http_redirect_code.as_deref() == Some("") { + self.http_redirect_code = None; +} +if let Some(ref val) = self.protocol + && val.as_str() == "" { + self.protocol = None; +} +if self.replace_key_prefix_with.as_deref() == Some("") { + self.replace_key_prefix_with = None; +} +if self.replace_key_with.as_deref() == Some("") { + self.replace_key_with = None; +} +} } impl DtoExt for RedirectAllRequestsTo { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.protocol - && val.as_str() == "" - { - self.protocol = None; - } - } +if let Some(ref val) = self.protocol + && val.as_str() == "" { + self.protocol = None; +} +} } impl DtoExt for ReplicaModifications { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ReplicationConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ReplicationRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.delete_marker_replication { - val.ignore_empty_strings(); - } - self.destination.ignore_empty_strings(); - if let Some(ref mut val) = self.existing_object_replication { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref mut val) = self.source_selection_criteria { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.delete_marker_replication { +val.ignore_empty_strings(); +} +self.destination.ignore_empty_strings(); +if let Some(ref mut val) = self.existing_object_replication { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref mut val) = self.source_selection_criteria { +val.ignore_empty_strings(); +} +} } impl DtoExt for ReplicationRuleAndOperator { fn ignore_empty_strings(&mut self) { - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - } +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +} } impl DtoExt for ReplicationRuleFilter { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.and { - val.ignore_empty_strings(); - } - if self.prefix.as_deref() == Some("") { - self.prefix = None; - } - if let Some(ref mut val) = self.tag { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.and { +val.ignore_empty_strings(); +} +if self.prefix.as_deref() == Some("") { + self.prefix = None; +} +if let Some(ref mut val) = self.tag { +val.ignore_empty_strings(); +} +} } impl DtoExt for ReplicationTime { fn ignore_empty_strings(&mut self) { - self.time.ignore_empty_strings(); - } +self.time.ignore_empty_strings(); +} } impl DtoExt for ReplicationTimeValue { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for RequestPaymentConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for RequestProgress { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for RestoreObjectInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if let Some(ref mut val) = self.restore_request { - val.ignore_empty_strings(); - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if let Some(ref mut val) = self.restore_request { +val.ignore_empty_strings(); +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } impl DtoExt for RestoreObjectOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.restore_output_path.as_deref() == Some("") { - self.restore_output_path = None; - } - } +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.restore_output_path.as_deref() == Some("") { + self.restore_output_path = None; +} +} } impl DtoExt for RestoreRequest { fn ignore_empty_strings(&mut self) { - if self.description.as_deref() == Some("") { - self.description = None; - } - if let Some(ref mut val) = self.glacier_job_parameters { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.output_location { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.select_parameters { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.tier - && val.as_str() == "" - { - self.tier = None; - } - if let Some(ref val) = self.type_ - && val.as_str() == "" - { - self.type_ = None; - } - } +if self.description.as_deref() == Some("") { + self.description = None; +} +if let Some(ref mut val) = self.glacier_job_parameters { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.output_location { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.select_parameters { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.tier + && val.as_str() == "" { + self.tier = None; +} +if let Some(ref val) = self.type_ + && val.as_str() == "" { + self.type_ = None; +} +} } impl DtoExt for RestoreStatus { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for RoutingRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.condition { - val.ignore_empty_strings(); - } - self.redirect.ignore_empty_strings(); - } +if let Some(ref mut val) = self.condition { +val.ignore_empty_strings(); +} +self.redirect.ignore_empty_strings(); +} } impl DtoExt for S3KeyFilter { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for S3Location { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.canned_acl - && val.as_str() == "" - { - self.canned_acl = None; - } - if let Some(ref mut val) = self.encryption { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if let Some(ref mut val) = self.tagging { - val.ignore_empty_strings(); - } - } +if let Some(ref val) = self.canned_acl + && val.as_str() == "" { + self.canned_acl = None; +} +if let Some(ref mut val) = self.encryption { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if let Some(ref mut val) = self.tagging { +val.ignore_empty_strings(); +} +} } impl DtoExt for S3TablesDestination { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for S3TablesDestinationResult { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for SSEKMS { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ScanRange { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for SelectObjectContentInput { fn ignore_empty_strings(&mut self) { - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - self.request.ignore_empty_strings(); - } +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +self.request.ignore_empty_strings(); +} } impl DtoExt for SelectObjectContentOutput { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for SelectObjectContentRequest { fn ignore_empty_strings(&mut self) { - self.input_serialization.ignore_empty_strings(); - self.output_serialization.ignore_empty_strings(); - if let Some(ref mut val) = self.request_progress { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.scan_range { - val.ignore_empty_strings(); - } - } +self.input_serialization.ignore_empty_strings(); +self.output_serialization.ignore_empty_strings(); +if let Some(ref mut val) = self.request_progress { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.scan_range { +val.ignore_empty_strings(); +} +} } impl DtoExt for SelectParameters { fn ignore_empty_strings(&mut self) { - self.input_serialization.ignore_empty_strings(); - self.output_serialization.ignore_empty_strings(); - } +self.input_serialization.ignore_empty_strings(); +self.output_serialization.ignore_empty_strings(); +} } impl DtoExt for ServerSideEncryptionByDefault { fn ignore_empty_strings(&mut self) { - if self.kms_master_key_id.as_deref() == Some("") { - self.kms_master_key_id = None; - } - } +if self.kms_master_key_id.as_deref() == Some("") { + self.kms_master_key_id = None; +} +} } impl DtoExt for ServerSideEncryptionConfiguration { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for ServerSideEncryptionRule { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.apply_server_side_encryption_by_default { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.apply_server_side_encryption_by_default { +val.ignore_empty_strings(); +} +} } impl DtoExt for SessionCredentials { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for SourceSelectionCriteria { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.replica_modifications { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.sse_kms_encrypted_objects { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.replica_modifications { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.sse_kms_encrypted_objects { +val.ignore_empty_strings(); +} +} } impl DtoExt for SseKmsEncryptedObjects { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for Stats { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for StatsEvent { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.details { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.details { +val.ignore_empty_strings(); +} +} } impl DtoExt for StorageClassAnalysis { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.data_export { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.data_export { +val.ignore_empty_strings(); +} +} } impl DtoExt for StorageClassAnalysisDataExport { fn ignore_empty_strings(&mut self) { - self.destination.ignore_empty_strings(); - } +self.destination.ignore_empty_strings(); +} } impl DtoExt for Tag { fn ignore_empty_strings(&mut self) { - if self.key.as_deref() == Some("") { - self.key = None; - } - if self.value.as_deref() == Some("") { - self.value = None; - } - } +if self.key.as_deref() == Some("") { + self.key = None; +} +if self.value.as_deref() == Some("") { + self.value = None; +} +} } impl DtoExt for Tagging { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for TargetGrant { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.grantee { - val.ignore_empty_strings(); - } - if let Some(ref val) = self.permission - && val.as_str() == "" - { - self.permission = None; - } - } +if let Some(ref mut val) = self.grantee { +val.ignore_empty_strings(); +} +if let Some(ref val) = self.permission + && val.as_str() == "" { + self.permission = None; +} +} } impl DtoExt for TargetObjectKeyFormat { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.partitioned_prefix { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.partitioned_prefix { +val.ignore_empty_strings(); +} +} } impl DtoExt for Tiering { - fn ignore_empty_strings(&mut self) {} + fn ignore_empty_strings(&mut self) { +} } impl DtoExt for TopicConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.filter { - val.ignore_empty_strings(); - } - if self.id.as_deref() == Some("") { - self.id = None; - } - } +if let Some(ref mut val) = self.filter { +val.ignore_empty_strings(); +} +if self.id.as_deref() == Some("") { + self.id = None; +} +} } impl DtoExt for Transition { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - } +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +} } impl DtoExt for UploadPartCopyInput { fn ignore_empty_strings(&mut self) { - if self.copy_source_range.as_deref() == Some("") { - self.copy_source_range = None; - } - if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { - self.copy_source_sse_customer_algorithm = None; - } - if self.copy_source_sse_customer_key.as_deref() == Some("") { - self.copy_source_sse_customer_key = None; - } - if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { - self.copy_source_sse_customer_key_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if self.expected_source_bucket_owner.as_deref() == Some("") { - self.expected_source_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - } +if self.copy_source_range.as_deref() == Some("") { + self.copy_source_range = None; +} +if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { + self.copy_source_sse_customer_algorithm = None; +} +if self.copy_source_sse_customer_key.as_deref() == Some("") { + self.copy_source_sse_customer_key = None; +} +if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { + self.copy_source_sse_customer_key_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if self.expected_source_bucket_owner.as_deref() == Some("") { + self.expected_source_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +} } impl DtoExt for UploadPartCopyOutput { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.copy_part_result { - val.ignore_empty_strings(); - } - if self.copy_source_version_id.as_deref() == Some("") { - self.copy_source_version_id = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - } +if let Some(ref mut val) = self.copy_part_result { +val.ignore_empty_strings(); +} +if self.copy_source_version_id.as_deref() == Some("") { + self.copy_source_version_id = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +} } impl DtoExt for UploadPartInput { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" - { - self.checksum_algorithm = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; - } - if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; - } - if let Some(ref val) = self.request_payer - && val.as_str() == "" - { - self.request_payer = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - } +if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" { + self.checksum_algorithm = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; +} +if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; +} +if let Some(ref val) = self.request_payer + && val.as_str() == "" { + self.request_payer = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +} } impl DtoExt for UploadPartOutput { fn ignore_empty_strings(&mut self) { - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - } +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +} } impl DtoExt for VersioningConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref val) = self.mfa_delete - && val.as_str() == "" - { - self.mfa_delete = None; - } - if let Some(ref val) = self.status - && val.as_str() == "" - { - self.status = None; - } - } +if let Some(ref val) = self.mfa_delete + && val.as_str() == "" { + self.mfa_delete = None; +} +if let Some(ref val) = self.status + && val.as_str() == "" { + self.status = None; +} +} } impl DtoExt for WebsiteConfiguration { fn ignore_empty_strings(&mut self) { - if let Some(ref mut val) = self.error_document { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.index_document { - val.ignore_empty_strings(); - } - if let Some(ref mut val) = self.redirect_all_requests_to { - val.ignore_empty_strings(); - } - } +if let Some(ref mut val) = self.error_document { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.index_document { +val.ignore_empty_strings(); +} +if let Some(ref mut val) = self.redirect_all_requests_to { +val.ignore_empty_strings(); +} +} } impl DtoExt for WriteGetObjectResponseInput { fn ignore_empty_strings(&mut self) { - if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; - } - if self.cache_control.as_deref() == Some("") { - self.cache_control = None; - } - if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; - } - if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; - } - if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; - } - if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; - } - if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; - } - if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; - } - if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; - } - if self.content_language.as_deref() == Some("") { - self.content_language = None; - } - if self.content_range.as_deref() == Some("") { - self.content_range = None; - } - if self.error_code.as_deref() == Some("") { - self.error_code = None; - } - if self.error_message.as_deref() == Some("") { - self.error_message = None; - } - if self.expiration.as_deref() == Some("") { - self.expiration = None; - } - if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" - { - self.object_lock_legal_hold_status = None; - } - if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" - { - self.object_lock_mode = None; - } - if let Some(ref val) = self.replication_status - && val.as_str() == "" - { - self.replication_status = None; - } - if let Some(ref val) = self.request_charged - && val.as_str() == "" - { - self.request_charged = None; - } - if self.restore.as_deref() == Some("") { - self.restore = None; - } - if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; - } - if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; - } - if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; - } - if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" - { - self.server_side_encryption = None; - } - if let Some(ref val) = self.storage_class - && val.as_str() == "" - { - self.storage_class = None; - } - if self.version_id.as_deref() == Some("") { - self.version_id = None; - } - } +if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; +} +if self.cache_control.as_deref() == Some("") { + self.cache_control = None; +} +if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; +} +if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; +} +if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; +} +if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; +} +if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; +} +if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; +} +if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; +} +if self.content_language.as_deref() == Some("") { + self.content_language = None; +} +if self.content_range.as_deref() == Some("") { + self.content_range = None; +} +if self.error_code.as_deref() == Some("") { + self.error_code = None; +} +if self.error_message.as_deref() == Some("") { + self.error_message = None; +} +if self.expiration.as_deref() == Some("") { + self.expiration = None; +} +if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" { + self.object_lock_legal_hold_status = None; +} +if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" { + self.object_lock_mode = None; +} +if let Some(ref val) = self.replication_status + && val.as_str() == "" { + self.replication_status = None; +} +if let Some(ref val) = self.request_charged + && val.as_str() == "" { + self.request_charged = None; +} +if self.restore.as_deref() == Some("") { + self.restore = None; +} +if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; +} +if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; +} +if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; +} +if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" { + self.server_side_encryption = None; +} +if let Some(ref val) = self.storage_class + && val.as_str() == "" { + self.storage_class = None; +} +if self.version_id.as_deref() == Some("") { + self.version_id = None; +} +} } // NOTE: PostObject is a synthetic API in s3s. diff --git a/crates/s3s/src/error/generated.rs b/crates/s3s/src/error/generated.rs index 8dad05e7..1408804d 100644 --- a/crates/s3s/src/error/generated.rs +++ b/crates/s3s/src/error/generated.rs @@ -249,2438 +249,2435 @@ use hyper::StatusCode; #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] pub enum S3ErrorCode { - /// The bucket does not allow ACLs. - /// - /// HTTP Status Code: 400 Bad Request - /// - AccessControlListNotSupported, - - /// Access Denied - /// - /// HTTP Status Code: 403 Forbidden - /// - AccessDenied, - - /// An access point with an identical name already exists in your account. - /// - /// HTTP Status Code: 409 Conflict - /// - AccessPointAlreadyOwnedByYou, - - /// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance. - /// - /// HTTP Status Code: 403 Forbidden - /// - AccountProblem, - - /// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance. - /// - /// HTTP Status Code: 403 Forbidden - /// - AllAccessDisabled, - - /// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - AmbiguousFieldName, - - /// The email address you provided is associated with more than one account. - /// - /// HTTP Status Code: 400 Bad Request - /// - AmbiguousGrantByEmailAddress, - - /// The authorization header you provided is invalid. - /// - /// HTTP Status Code: 400 Bad Request - /// - AuthorizationHeaderMalformed, - - /// The authorization query parameters that you provided are not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - AuthorizationQueryParametersError, - - /// The Content-MD5 you specified did not match what we received. - /// - /// HTTP Status Code: 400 Bad Request - /// - BadDigest, - - /// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. - /// - /// HTTP Status Code: 409 Conflict - /// - BucketAlreadyExists, - - /// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). - /// - /// HTTP Status Code: 409 Conflict - /// - BucketAlreadyOwnedByYou, - - /// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket. - /// - /// HTTP Status Code: 400 Bad Request - /// - BucketHasAccessPointsAttached, - - /// The bucket you tried to delete is not empty. - /// - /// HTTP Status Code: 409 Conflict - /// - BucketNotEmpty, - - /// The service is unavailable. Try again later. - /// - /// HTTP Status Code: 503 Service Unavailable - /// - Busy, - - /// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. - /// - /// HTTP Status Code: 400 Bad Request - /// - CSVEscapingRecordDelimiter, - - /// An error occurred while parsing the CSV file. Check the file and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - CSVParsingError, - - /// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. - /// - /// HTTP Status Code: 400 Bad Request - /// - CSVUnescapedQuote, - - /// An attempt to convert from one data type to another using CAST failed in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - CastFailed, - - /// Your Multi-Region Access Point idempotency token was already used for a different request. - /// - /// HTTP Status Code: 409 Conflict - /// - ClientTokenConflict, - - /// The length of a column in the result is greater than maxCharsPerColumn of 1 MB. - /// - /// HTTP Status Code: 400 Bad Request - /// - ColumnTooLong, - - /// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part. - /// - /// HTTP Status Code: 409 Conflict - /// - ConditionalRequestConflict, - - /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. - /// - /// HTTP Status Code: 400 Bad Request - /// - ConnectionClosedByRequester, - - /// This request does not support credentials. - /// - /// HTTP Status Code: 400 Bad Request - /// - CredentialsNotSupported, - - /// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. - /// - /// HTTP Status Code: 403 Forbidden - /// - CrossLocationLoggingProhibited, - - /// The device is not currently active. - /// - /// HTTP Status Code: 400 Bad Request - /// - DeviceNotActiveError, - - /// The request body cannot be empty. - /// - /// HTTP Status Code: 400 Bad Request - /// - EmptyRequestBody, - - /// Direct requests to the correct endpoint. - /// - /// HTTP Status Code: 400 Bad Request - /// - EndpointNotFound, - - /// Your proposed upload exceeds the maximum allowed object size. - /// - /// HTTP Status Code: 400 Bad Request - /// - EntityTooLarge, - - /// Your proposed upload is smaller than the minimum allowed object size. - /// - /// HTTP Status Code: 400 Bad Request - /// - EntityTooSmall, - - /// A column name or a path provided does not exist in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorBindingDoesNotExist, - - /// There is an incorrect number of arguments in the function call in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidArguments, - - /// The timestamp format string in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidTimestampFormatPattern, - - /// The timestamp format pattern contains a symbol in the SQL expression that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidTimestampFormatPatternSymbol, - - /// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidTimestampFormatPatternSymbolForParsing, - - /// The timestamp format pattern contains a token in the SQL expression that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidTimestampFormatPatternToken, - - /// An argument given to the LIKE expression was not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorLikePatternInvalidEscapeSequence, - - /// LIMIT must not be negative. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorNegativeLimit, - - /// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorTimestampFormatPatternDuplicateFields, - - /// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorTimestampFormatPatternHourClockAmPmMismatch, - - /// The timestamp format pattern contains an unterminated token in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorUnterminatedTimestampFormatPatternToken, - - /// The provided token has expired. - /// - /// HTTP Status Code: 400 Bad Request - /// - ExpiredToken, - - /// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB. - /// - /// HTTP Status Code: 400 Bad Request - /// - ExpressionTooLong, - - /// The query cannot be evaluated. Check the file and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - ExternalEvalException, - - /// This error might occur for the following reasons: - /// - /// - /// You are trying to access a bucket from a different Region than where the bucket exists. - /// - /// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to. - /// - /// HTTP Status Code: 400 Bad Request - /// - IllegalLocationConstraintException, - - /// An illegal argument was used in the SQL function. - /// - /// HTTP Status Code: 400 Bad Request - /// - IllegalSqlFunctionArgument, - - /// Indicates that the versioning configuration specified in the request is invalid. - /// - /// HTTP Status Code: 400 Bad Request - /// - IllegalVersioningConfigurationException, - - /// You did not provide the number of bytes specified by the Content-Length HTTP header - /// - /// HTTP Status Code: 400 Bad Request - /// - IncompleteBody, - - /// The specified bucket exists in another Region. Direct requests to the correct endpoint. - /// - /// HTTP Status Code: 400 Bad Request - /// - IncorrectEndpoint, - - /// POST requires exactly one file upload per request. - /// - /// HTTP Status Code: 400 Bad Request - /// - IncorrectNumberOfFilesInPostRequest, - - /// An incorrect argument type was specified in a function call in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - IncorrectSqlFunctionArgumentType, - - /// Inline data exceeds the maximum allowed size. - /// - /// HTTP Status Code: 400 Bad Request - /// - InlineDataTooLarge, - - /// An integer overflow or underflow occurred in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - IntegerOverflow, - - /// We encountered an internal error. Please try again. - /// - /// HTTP Status Code: 500 Internal Server Error - /// - InternalError, - - /// The Amazon Web Services access key ID you provided does not exist in our records. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidAccessKeyId, - - /// The specified access point name or account is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidAccessPoint, - - /// The specified access point alias name is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidAccessPointAliasError, - - /// You must specify the Anonymous role. - /// - InvalidAddressingHeader, - - /// Invalid Argument - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidArgument, - - /// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidBucketAclWithObjectOwnership, - - /// The specified bucket is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidBucketName, - - /// The value of the expected bucket owner parameter must be an AWS account ID. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidBucketOwnerAWSAccountID, - - /// The request is not valid with the current state of the bucket. - /// - /// HTTP Status Code: 409 Conflict - /// - InvalidBucketState, - - /// An attempt to convert from one data type to another using CAST failed in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidCast, - - /// The column index in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidColumnIndex, - - /// The file is not in a supported compression format. Only GZIP and BZIP2 are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidCompressionFormat, - - /// The data source type is not valid. Only CSV, JSON, and Parquet are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidDataSource, - - /// The SQL expression contains a data type that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidDataType, - - /// The Content-MD5 you specified is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidDigest, - - /// The encryption request you specified is not valid. The valid value is AES256. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidEncryptionAlgorithmError, - - /// The ExpressionType value is not valid. Only SQL expressions are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidExpressionType, - - /// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidFileHeaderInfo, - - /// The host headers provided in the request used the incorrect style addressing. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidHostHeader, - - /// The request is made using an unexpected HTTP method. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidHttpMethod, - - /// The JsonType value is not valid. Only DOCUMENT and LINES are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidJsonType, - - /// The key path in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidKeyPath, - - /// The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidLocationConstraint, - - /// The action is not valid for the current state of the object. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidObjectState, - - /// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidPart, - - /// The list of parts was not in ascending order. Parts list must be specified in order by part number. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidPartOrder, - - /// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidPayer, - - /// The content of the form does not meet the conditions specified in the policy document. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidPolicyDocument, - - /// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidQuoteFields, - - /// The requested range cannot be satisfied. - /// - /// HTTP Status Code: 416 Requested Range NotSatisfiable - /// - InvalidRange, - - /// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidRegion, - - /// + Please use AWS4-HMAC-SHA256. - /// + SOAP requests must be made over an HTTPS connection. - /// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names. - /// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names. - /// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests. - /// + Amazon S3 Transfer Accelerate is not configured on this bucket. - /// + Amazon S3 Transfer Accelerate is disabled on this bucket. - /// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information. - /// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information. - /// - /// HTTP Status Code: 400 Bad Request - InvalidRequest, - - /// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidRequestParameter, - - /// The SOAP request body is invalid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidSOAPRequest, - - /// The provided scan range is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidScanRange, - - /// The provided security credentials are not valid. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidSecurity, - - /// Returned if the session doesn't exist anymore because it timed out or expired. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidSessionException, - - /// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidSignature, - - /// The storage class you specified is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidStorageClass, - - /// The SQL expression contains a table alias that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidTableAlias, - - /// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidTag, - - /// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidTargetBucketForLogging, - - /// The encoding type is not valid. Only UTF-8 encoding is supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidTextEncoding, - - /// The provided token is malformed or otherwise invalid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidToken, - - /// Couldn't parse the specified URI. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidURI, - - /// An error occurred while parsing the JSON file. Check the file and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - JSONParsingError, - - /// Your key is too long. - /// - /// HTTP Status Code: 400 Bad Request - /// - KeyTooLongError, - - /// The SQL expression contains a character that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LexerInvalidChar, - - /// The SQL expression contains an operator that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LexerInvalidIONLiteral, - - /// The SQL expression contains an operator that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LexerInvalidLiteral, - - /// The SQL expression contains a literal that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LexerInvalidOperator, - - /// The argument given to the LIKE clause in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LikeInvalidInputs, - - /// The XML you provided was not well-formed or did not validate against our published schema. - /// - /// HTTP Status Code: 400 Bad Request - /// - MalformedACLError, - - /// The body of your POST request is not well-formed multipart/form-data. - /// - /// HTTP Status Code: 400 Bad Request - /// - MalformedPOSTRequest, - - /// Your policy contains a principal that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - MalformedPolicy, - - /// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." - /// - /// HTTP Status Code: 400 Bad Request - /// - MalformedXML, - - /// Your request was too big. - /// - /// HTTP Status Code: 400 Bad Request - /// - MaxMessageLengthExceeded, - - /// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used. - /// - /// HTTP Status Code: 400 Bad Request - /// - MaxOperatorsExceeded, - - /// Your POST request fields preceding the upload file were too large. - /// - /// HTTP Status Code: 400 Bad Request - /// - MaxPostPreDataLengthExceededError, - - /// Your metadata headers exceed the maximum allowed metadata size. - /// - /// HTTP Status Code: 400 Bad Request - /// - MetadataTooLarge, - - /// The specified method is not allowed against this resource. - /// - /// HTTP Status Code: 405 Method Not Allowed - /// - MethodNotAllowed, - - /// A SOAP attachment was expected, but none were found. - /// - MissingAttachment, - - /// The request was not signed. - /// - /// HTTP Status Code: 403 Forbidden - /// - MissingAuthenticationToken, - - /// You must provide the Content-Length HTTP header. - /// - /// HTTP Status Code: 411 Length Required - /// - MissingContentLength, - - /// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty." - /// - /// HTTP Status Code: 400 Bad Request - /// - MissingRequestBodyError, - - /// The SelectRequest entity is missing a required parameter. Check the service documentation and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - MissingRequiredParameter, - - /// The SOAP 1.1 request is missing a security element. - /// - /// HTTP Status Code: 400 Bad Request - /// - MissingSecurityElement, - - /// Your request is missing a required header. - /// - /// HTTP Status Code: 400 Bad Request - /// - MissingSecurityHeader, - - /// Multiple data sources are not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - MultipleDataSourcesUnsupported, - - /// There is no such thing as a logging status subresource for a key. - /// - /// HTTP Status Code: 400 Bad Request - /// - NoLoggingStatusForKey, - - /// The specified access point does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchAccessPoint, - - /// The specified request was not found. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchAsyncRequest, - - /// The specified bucket does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchBucket, - - /// The specified bucket does not have a bucket policy. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchBucketPolicy, - - /// The specified bucket does not have a CORS configuration. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchCORSConfiguration, - - /// The specified key does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchKey, - - /// The lifecycle configuration does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchLifecycleConfiguration, - - /// The specified Multi-Region Access Point does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchMultiRegionAccessPoint, - - /// The specified object does not have an ObjectLock configuration. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchObjectLockConfiguration, - - /// The specified resource doesn't exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchResource, - - /// The specified tag does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchTagSet, - - /// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchUpload, - - /// Indicates that the version ID specified in the request does not match an existing version. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchVersion, - - /// The specified bucket does not have a website configuration. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchWebsiteConfiguration, - - /// No transformation found for this Object Lambda Access Point. - /// - /// HTTP Status Code: 404 Not Found - /// - NoTransformationDefined, - - /// The device that generated the token is not owned by the authenticated user. - /// - /// HTTP Status Code: 400 Bad Request - /// - NotDeviceOwnerError, - - /// A header you provided implies functionality that is not implemented. - /// - /// HTTP Status Code: 501 Not Implemented - /// - NotImplemented, - - /// The resource was not changed. - /// - /// HTTP Status Code: 304 Not Modified - /// - NotModified, - - /// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 - /// - /// HTTP Status Code: 403 Forbidden - /// - NotSignedUp, - - /// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers. - /// - /// HTTP Status Code: 400 Bad Request - /// - NumberFormatError, - - /// The Object Lock configuration does not exist for this bucket. - /// - /// HTTP Status Code: 404 Not Found - /// - ObjectLockConfigurationNotFoundError, - - /// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each. - /// - /// HTTP Status Code: 400 Bad Request - /// - ObjectSerializationConflict, - - /// A conflicting conditional action is currently in progress against this resource. Try again. - /// - /// HTTP Status Code: 409 Conflict - /// - OperationAborted, - - /// The number of columns in the result is greater than the maximum allowable number of columns. - /// - /// HTTP Status Code: 400 Bad Request - /// - OverMaxColumn, - - /// The Parquet file is above the max row group size. - /// - /// HTTP Status Code: 400 Bad Request - /// - OverMaxParquetBlockSize, - - /// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB. - /// - /// HTTP Status Code: 400 Bad Request - /// - OverMaxRecordSize, - - /// The bucket ownership controls were not found. - /// - /// HTTP Status Code: 404 Not Found - /// - OwnershipControlsNotFoundError, - - /// An error occurred while parsing the Parquet file. Check the file and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParquetParsingError, - - /// The specified Parquet compression codec is not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParquetUnsupportedCompressionCodec, - - /// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseAsteriskIsNotAloneInSelectList, - - /// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseCannotMixSqbAndWildcardInSelectList, - - /// The SQL expression CAST has incorrect arity. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseCastArity, - - /// The SQL expression contains an empty SELECT clause. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseEmptySelect, - - /// The expected token in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpected2TokenTypes, - - /// The expected argument delimiter in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedArgumentDelimiter, - - /// The expected date part in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedDatePart, - - /// The expected SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedExpression, - - /// The expected identifier for the alias in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedIdentForAlias, - - /// The expected identifier for AT name in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedIdentForAt, - - /// GROUP is not supported in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedIdentForGroupName, - - /// The expected keyword in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedKeyword, - - /// The expected left parenthesis after CAST in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedLeftParenAfterCast, - - /// The expected left parenthesis in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedLeftParenBuiltinFunctionCall, - - /// The expected left parenthesis in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedLeftParenValueConstructor, - - /// The SQL expression contains an unsupported use of MEMBER. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedMember, - - /// The expected number in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedNumber, - - /// The expected right parenthesis character in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedRightParenBuiltinFunctionCall, - - /// The expected token in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedTokenType, - - /// The expected type name in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedTypeName, - - /// The expected WHEN clause in the SQL expression was not found. CASE is not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedWhenClause, - - /// The use of * in the SELECT list in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseInvalidContextForWildcardInSelectList, - - /// The SQL expression contains a path component that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseInvalidPathComponent, - - /// The SQL expression contains a parameter value that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseInvalidTypeParam, - - /// JOIN is not supported in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseMalformedJoin, - - /// The expected identifier after the @ symbol in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseMissingIdentAfterAt, - - /// Only one argument is supported for aggregate functions in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseNonUnaryAgregateFunctionCall, - - /// The SQL expression contains a missing FROM after the SELECT list. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseSelectMissingFrom, - - /// The SQL expression contains an unexpected keyword. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnExpectedKeyword, - - /// The SQL expression contains an unexpected operator. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnexpectedOperator, - - /// The SQL expression contains an unexpected term. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnexpectedTerm, - - /// The SQL expression contains an unexpected token. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnexpectedToken, - - /// The SQL expression contains an operator that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnknownOperator, - - /// The SQL expression contains an unsupported use of ALIAS. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedAlias, - - /// Only COUNT with (*) as a parameter is supported in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedCallWithStar, - - /// The SQL expression contains an unsupported use of CASE. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedCase, - - /// The SQL expression contains an unsupported use of CASE. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedCaseClause, - - /// The SQL expression contains an unsupported use of GROUP BY. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedLiteralsGroupBy, - - /// The SQL expression contains an unsupported use of SELECT. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedSelect, - - /// The SQL expression contains unsupported syntax. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedSyntax, - - /// The SQL expression contains an unsupported token. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedToken, - - /// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. - /// - /// HTTP Status Code: 301 Moved Permanently - /// - PermanentRedirect, - - /// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. - /// - /// HTTP Status Code: 301 Moved Permanently - /// - PermanentRedirectControlError, - - /// At least one of the preconditions you specified did not hold. - /// - /// HTTP Status Code: 412 Precondition Failed - /// - PreconditionFailed, - - /// Temporary redirect. - /// - /// HTTP Status Code: 307 Moved Temporarily - /// - Redirect, - - /// There is no replication configuration for this bucket. - /// - /// HTTP Status Code: 404 Not Found - /// - ReplicationConfigurationNotFoundError, - - /// The request header and query parameters used to make the request exceed the maximum allowed size. - /// - /// HTTP Status Code: 400 Bad Request - /// - RequestHeaderSectionTooLarge, - - /// Bucket POST must be of the enclosure-type multipart/form-data. - /// - /// HTTP Status Code: 400 Bad Request - /// - RequestIsNotMultiPartContent, - - /// The difference between the request time and the server's time is too large. - /// - /// HTTP Status Code: 403 Forbidden - /// - RequestTimeTooSkewed, - - /// Your socket connection to the server was not read from or written to within the timeout period. - /// - /// HTTP Status Code: 400 Bad Request - /// - RequestTimeout, - - /// Requesting the torrent file of a bucket is not permitted. - /// - /// HTTP Status Code: 400 Bad Request - /// - RequestTorrentOfBucketError, - - /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. - /// - /// HTTP Status Code: 400 Bad Request - /// - ResponseInterrupted, - - /// Object restore is already in progress. - /// - /// HTTP Status Code: 409 Conflict - /// - RestoreAlreadyInProgress, - - /// The server-side encryption configuration was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ServerSideEncryptionConfigurationNotFoundError, - - /// Service is unable to handle request. - /// - /// HTTP Status Code: 503 Service Unavailable - /// - ServiceUnavailable, - - /// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details. - /// - /// HTTP Status Code: 403 Forbidden - /// - SignatureDoesNotMatch, - - /// Reduce your request rate. - /// - /// HTTP Status Code: 503 Slow Down - /// - SlowDown, - - /// The tag policy does not allow the specified value for the following tag key. - /// - /// HTTP Status Code: 400 Bad Request - /// - TagPolicyException, - - /// You are being redirected to the bucket while DNS updates. - /// - /// HTTP Status Code: 307 Moved Temporarily - /// - TemporaryRedirect, - - /// The serial number and/or token code you provided is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - TokenCodeInvalidError, - - /// The provided token must be refreshed. - /// - /// HTTP Status Code: 400 Bad Request - /// - TokenRefreshRequired, - - /// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyAccessPoints, - - /// You have attempted to create more buckets than allowed. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyBuckets, - - /// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyMultiRegionAccessPointregionsError, - - /// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyMultiRegionAccessPoints, - - /// The number of tags exceeds the limit of 50 tags. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyTags, - - /// Object decompression failed. Check that the object is properly compressed using the format specified in the request. - /// - /// HTTP Status Code: 400 Bad Request - /// - TruncatedInput, - - /// You are not authorized to perform this operation. - /// - /// HTTP Status Code: 401 Unauthorized - /// - UnauthorizedAccess, - - /// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal. - /// - /// HTTP Status Code: 403 Forbidden - /// - UnauthorizedAccessError, - - /// This request does not support content. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnexpectedContent, - - /// Applicable in China Regions only. This request was rejected because the IP was unexpected. - /// - /// HTTP Status Code: 403 Forbidden - /// - UnexpectedIPError, - - /// We encountered a record type that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnrecognizedFormatException, - - /// The email address you provided does not match any account on record. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnresolvableGrantByEmailAddress, - - /// The request contained an unsupported argument. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedArgument, - - /// We encountered an unsupported SQL function. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedFunction, - - /// The specified Parquet type is not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedParquetType, - - /// A range header is not supported for this operation. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedRangeHeader, - - /// Scan range queries are not supported on this type of object. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedScanRangeInput, - - /// The provided request is signed with an unsupported STS Token version or the signature version is not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedSignature, - - /// We encountered an unsupported SQL operation. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedSqlOperation, - - /// We encountered an unsupported SQL structure. Check the SQL Reference. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedSqlStructure, - - /// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedStorageClass, - - /// We encountered syntax that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedSyntax, - - /// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0). - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedTypeForQuerying, - - /// The bucket POST must contain the specified field name. If it is specified, check the order of the fields. - /// - /// HTTP Status Code: 400 Bad Request - /// - UserKeyMustBeSpecified, - - /// A timestamp parse failure occurred in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ValueParseFailure, - - Custom(ByteString), +/// The bucket does not allow ACLs. +/// +/// HTTP Status Code: 400 Bad Request +/// +AccessControlListNotSupported, + +/// Access Denied +/// +/// HTTP Status Code: 403 Forbidden +/// +AccessDenied, + +/// An access point with an identical name already exists in your account. +/// +/// HTTP Status Code: 409 Conflict +/// +AccessPointAlreadyOwnedByYou, + +/// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance. +/// +/// HTTP Status Code: 403 Forbidden +/// +AccountProblem, + +/// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance. +/// +/// HTTP Status Code: 403 Forbidden +/// +AllAccessDisabled, + +/// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +AmbiguousFieldName, + +/// The email address you provided is associated with more than one account. +/// +/// HTTP Status Code: 400 Bad Request +/// +AmbiguousGrantByEmailAddress, + +/// The authorization header you provided is invalid. +/// +/// HTTP Status Code: 400 Bad Request +/// +AuthorizationHeaderMalformed, + +/// The authorization query parameters that you provided are not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +AuthorizationQueryParametersError, + +/// The Content-MD5 you specified did not match what we received. +/// +/// HTTP Status Code: 400 Bad Request +/// +BadDigest, + +/// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. +/// +/// HTTP Status Code: 409 Conflict +/// +BucketAlreadyExists, + +/// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). +/// +/// HTTP Status Code: 409 Conflict +/// +BucketAlreadyOwnedByYou, + +/// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket. +/// +/// HTTP Status Code: 400 Bad Request +/// +BucketHasAccessPointsAttached, + +/// The bucket you tried to delete is not empty. +/// +/// HTTP Status Code: 409 Conflict +/// +BucketNotEmpty, + +/// The service is unavailable. Try again later. +/// +/// HTTP Status Code: 503 Service Unavailable +/// +Busy, + +/// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. +/// +/// HTTP Status Code: 400 Bad Request +/// +CSVEscapingRecordDelimiter, + +/// An error occurred while parsing the CSV file. Check the file and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +CSVParsingError, + +/// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. +/// +/// HTTP Status Code: 400 Bad Request +/// +CSVUnescapedQuote, + +/// An attempt to convert from one data type to another using CAST failed in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +CastFailed, + +/// Your Multi-Region Access Point idempotency token was already used for a different request. +/// +/// HTTP Status Code: 409 Conflict +/// +ClientTokenConflict, + +/// The length of a column in the result is greater than maxCharsPerColumn of 1 MB. +/// +/// HTTP Status Code: 400 Bad Request +/// +ColumnTooLong, + +/// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part. +/// +/// HTTP Status Code: 409 Conflict +/// +ConditionalRequestConflict, + +/// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. +/// +/// HTTP Status Code: 400 Bad Request +/// +ConnectionClosedByRequester, + +/// This request does not support credentials. +/// +/// HTTP Status Code: 400 Bad Request +/// +CredentialsNotSupported, + +/// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. +/// +/// HTTP Status Code: 403 Forbidden +/// +CrossLocationLoggingProhibited, + +/// The device is not currently active. +/// +/// HTTP Status Code: 400 Bad Request +/// +DeviceNotActiveError, + +/// The request body cannot be empty. +/// +/// HTTP Status Code: 400 Bad Request +/// +EmptyRequestBody, + +/// Direct requests to the correct endpoint. +/// +/// HTTP Status Code: 400 Bad Request +/// +EndpointNotFound, + +/// Your proposed upload exceeds the maximum allowed object size. +/// +/// HTTP Status Code: 400 Bad Request +/// +EntityTooLarge, + +/// Your proposed upload is smaller than the minimum allowed object size. +/// +/// HTTP Status Code: 400 Bad Request +/// +EntityTooSmall, + +/// A column name or a path provided does not exist in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorBindingDoesNotExist, + +/// There is an incorrect number of arguments in the function call in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidArguments, + +/// The timestamp format string in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidTimestampFormatPattern, + +/// The timestamp format pattern contains a symbol in the SQL expression that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidTimestampFormatPatternSymbol, + +/// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidTimestampFormatPatternSymbolForParsing, + +/// The timestamp format pattern contains a token in the SQL expression that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidTimestampFormatPatternToken, + +/// An argument given to the LIKE expression was not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorLikePatternInvalidEscapeSequence, + +/// LIMIT must not be negative. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorNegativeLimit, + +/// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorTimestampFormatPatternDuplicateFields, + +/// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorTimestampFormatPatternHourClockAmPmMismatch, + +/// The timestamp format pattern contains an unterminated token in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorUnterminatedTimestampFormatPatternToken, + +/// The provided token has expired. +/// +/// HTTP Status Code: 400 Bad Request +/// +ExpiredToken, + +/// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB. +/// +/// HTTP Status Code: 400 Bad Request +/// +ExpressionTooLong, + +/// The query cannot be evaluated. Check the file and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +ExternalEvalException, + +/// This error might occur for the following reasons: +/// +/// +/// You are trying to access a bucket from a different Region than where the bucket exists. +/// +/// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to. +/// +/// HTTP Status Code: 400 Bad Request +/// +IllegalLocationConstraintException, + +/// An illegal argument was used in the SQL function. +/// +/// HTTP Status Code: 400 Bad Request +/// +IllegalSqlFunctionArgument, + +/// Indicates that the versioning configuration specified in the request is invalid. +/// +/// HTTP Status Code: 400 Bad Request +/// +IllegalVersioningConfigurationException, + +/// You did not provide the number of bytes specified by the Content-Length HTTP header +/// +/// HTTP Status Code: 400 Bad Request +/// +IncompleteBody, + +/// The specified bucket exists in another Region. Direct requests to the correct endpoint. +/// +/// HTTP Status Code: 400 Bad Request +/// +IncorrectEndpoint, + +/// POST requires exactly one file upload per request. +/// +/// HTTP Status Code: 400 Bad Request +/// +IncorrectNumberOfFilesInPostRequest, + +/// An incorrect argument type was specified in a function call in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +IncorrectSqlFunctionArgumentType, + +/// Inline data exceeds the maximum allowed size. +/// +/// HTTP Status Code: 400 Bad Request +/// +InlineDataTooLarge, + +/// An integer overflow or underflow occurred in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +IntegerOverflow, + +/// We encountered an internal error. Please try again. +/// +/// HTTP Status Code: 500 Internal Server Error +/// +InternalError, + +/// The Amazon Web Services access key ID you provided does not exist in our records. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidAccessKeyId, + +/// The specified access point name or account is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidAccessPoint, + +/// The specified access point alias name is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidAccessPointAliasError, + +/// You must specify the Anonymous role. +/// +InvalidAddressingHeader, + +/// Invalid Argument +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidArgument, + +/// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidBucketAclWithObjectOwnership, + +/// The specified bucket is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidBucketName, + +/// The value of the expected bucket owner parameter must be an AWS account ID. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidBucketOwnerAWSAccountID, + +/// The request is not valid with the current state of the bucket. +/// +/// HTTP Status Code: 409 Conflict +/// +InvalidBucketState, + +/// An attempt to convert from one data type to another using CAST failed in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidCast, + +/// The column index in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidColumnIndex, + +/// The file is not in a supported compression format. Only GZIP and BZIP2 are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidCompressionFormat, + +/// The data source type is not valid. Only CSV, JSON, and Parquet are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidDataSource, + +/// The SQL expression contains a data type that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidDataType, + +/// The Content-MD5 you specified is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidDigest, + +/// The encryption request you specified is not valid. The valid value is AES256. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidEncryptionAlgorithmError, + +/// The ExpressionType value is not valid. Only SQL expressions are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidExpressionType, + +/// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidFileHeaderInfo, + +/// The host headers provided in the request used the incorrect style addressing. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidHostHeader, + +/// The request is made using an unexpected HTTP method. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidHttpMethod, + +/// The JsonType value is not valid. Only DOCUMENT and LINES are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidJsonType, + +/// The key path in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidKeyPath, + +/// The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidLocationConstraint, + +/// The action is not valid for the current state of the object. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidObjectState, + +/// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidPart, + +/// The list of parts was not in ascending order. Parts list must be specified in order by part number. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidPartOrder, + +/// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidPayer, + +/// The content of the form does not meet the conditions specified in the policy document. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidPolicyDocument, + +/// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidQuoteFields, + +/// The requested range cannot be satisfied. +/// +/// HTTP Status Code: 416 Requested Range NotSatisfiable +/// +InvalidRange, + +/// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidRegion, + +/// + Please use AWS4-HMAC-SHA256. +/// + SOAP requests must be made over an HTTPS connection. +/// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names. +/// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names. +/// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests. +/// + Amazon S3 Transfer Accelerate is not configured on this bucket. +/// + Amazon S3 Transfer Accelerate is disabled on this bucket. +/// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information. +/// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information. +/// +/// HTTP Status Code: 400 Bad Request +InvalidRequest, + +/// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidRequestParameter, + +/// The SOAP request body is invalid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidSOAPRequest, + +/// The provided scan range is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidScanRange, + +/// The provided security credentials are not valid. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidSecurity, + +/// Returned if the session doesn't exist anymore because it timed out or expired. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidSessionException, + +/// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidSignature, + +/// The storage class you specified is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidStorageClass, + +/// The SQL expression contains a table alias that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidTableAlias, + +/// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidTag, + +/// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidTargetBucketForLogging, + +/// The encoding type is not valid. Only UTF-8 encoding is supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidTextEncoding, + +/// The provided token is malformed or otherwise invalid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidToken, + +/// Couldn't parse the specified URI. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidURI, + +/// An error occurred while parsing the JSON file. Check the file and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +JSONParsingError, + +/// Your key is too long. +/// +/// HTTP Status Code: 400 Bad Request +/// +KeyTooLongError, + +/// The SQL expression contains a character that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LexerInvalidChar, + +/// The SQL expression contains an operator that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LexerInvalidIONLiteral, + +/// The SQL expression contains an operator that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LexerInvalidLiteral, + +/// The SQL expression contains a literal that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LexerInvalidOperator, + +/// The argument given to the LIKE clause in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LikeInvalidInputs, + +/// The XML you provided was not well-formed or did not validate against our published schema. +/// +/// HTTP Status Code: 400 Bad Request +/// +MalformedACLError, + +/// The body of your POST request is not well-formed multipart/form-data. +/// +/// HTTP Status Code: 400 Bad Request +/// +MalformedPOSTRequest, + +/// Your policy contains a principal that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +MalformedPolicy, + +/// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." +/// +/// HTTP Status Code: 400 Bad Request +/// +MalformedXML, + +/// Your request was too big. +/// +/// HTTP Status Code: 400 Bad Request +/// +MaxMessageLengthExceeded, + +/// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used. +/// +/// HTTP Status Code: 400 Bad Request +/// +MaxOperatorsExceeded, + +/// Your POST request fields preceding the upload file were too large. +/// +/// HTTP Status Code: 400 Bad Request +/// +MaxPostPreDataLengthExceededError, + +/// Your metadata headers exceed the maximum allowed metadata size. +/// +/// HTTP Status Code: 400 Bad Request +/// +MetadataTooLarge, + +/// The specified method is not allowed against this resource. +/// +/// HTTP Status Code: 405 Method Not Allowed +/// +MethodNotAllowed, + +/// A SOAP attachment was expected, but none were found. +/// +MissingAttachment, + +/// The request was not signed. +/// +/// HTTP Status Code: 403 Forbidden +/// +MissingAuthenticationToken, + +/// You must provide the Content-Length HTTP header. +/// +/// HTTP Status Code: 411 Length Required +/// +MissingContentLength, + +/// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty." +/// +/// HTTP Status Code: 400 Bad Request +/// +MissingRequestBodyError, + +/// The SelectRequest entity is missing a required parameter. Check the service documentation and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +MissingRequiredParameter, + +/// The SOAP 1.1 request is missing a security element. +/// +/// HTTP Status Code: 400 Bad Request +/// +MissingSecurityElement, + +/// Your request is missing a required header. +/// +/// HTTP Status Code: 400 Bad Request +/// +MissingSecurityHeader, + +/// Multiple data sources are not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +MultipleDataSourcesUnsupported, + +/// There is no such thing as a logging status subresource for a key. +/// +/// HTTP Status Code: 400 Bad Request +/// +NoLoggingStatusForKey, + +/// The specified access point does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchAccessPoint, + +/// The specified request was not found. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchAsyncRequest, + +/// The specified bucket does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchBucket, + +/// The specified bucket does not have a bucket policy. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchBucketPolicy, + +/// The specified bucket does not have a CORS configuration. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchCORSConfiguration, + +/// The specified key does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchKey, + +/// The lifecycle configuration does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchLifecycleConfiguration, + +/// The specified Multi-Region Access Point does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchMultiRegionAccessPoint, + +/// The specified object does not have an ObjectLock configuration. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchObjectLockConfiguration, + +/// The specified resource doesn't exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchResource, + +/// The specified tag does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchTagSet, + +/// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchUpload, + +/// Indicates that the version ID specified in the request does not match an existing version. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchVersion, + +/// The specified bucket does not have a website configuration. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchWebsiteConfiguration, + +/// No transformation found for this Object Lambda Access Point. +/// +/// HTTP Status Code: 404 Not Found +/// +NoTransformationDefined, + +/// The device that generated the token is not owned by the authenticated user. +/// +/// HTTP Status Code: 400 Bad Request +/// +NotDeviceOwnerError, + +/// A header you provided implies functionality that is not implemented. +/// +/// HTTP Status Code: 501 Not Implemented +/// +NotImplemented, + +/// The resource was not changed. +/// +/// HTTP Status Code: 304 Not Modified +/// +NotModified, + +/// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 +/// +/// HTTP Status Code: 403 Forbidden +/// +NotSignedUp, + +/// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers. +/// +/// HTTP Status Code: 400 Bad Request +/// +NumberFormatError, + +/// The Object Lock configuration does not exist for this bucket. +/// +/// HTTP Status Code: 404 Not Found +/// +ObjectLockConfigurationNotFoundError, + +/// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each. +/// +/// HTTP Status Code: 400 Bad Request +/// +ObjectSerializationConflict, + +/// A conflicting conditional action is currently in progress against this resource. Try again. +/// +/// HTTP Status Code: 409 Conflict +/// +OperationAborted, + +/// The number of columns in the result is greater than the maximum allowable number of columns. +/// +/// HTTP Status Code: 400 Bad Request +/// +OverMaxColumn, + +/// The Parquet file is above the max row group size. +/// +/// HTTP Status Code: 400 Bad Request +/// +OverMaxParquetBlockSize, + +/// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB. +/// +/// HTTP Status Code: 400 Bad Request +/// +OverMaxRecordSize, + +/// The bucket ownership controls were not found. +/// +/// HTTP Status Code: 404 Not Found +/// +OwnershipControlsNotFoundError, + +/// An error occurred while parsing the Parquet file. Check the file and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParquetParsingError, + +/// The specified Parquet compression codec is not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParquetUnsupportedCompressionCodec, + +/// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseAsteriskIsNotAloneInSelectList, + +/// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseCannotMixSqbAndWildcardInSelectList, + +/// The SQL expression CAST has incorrect arity. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseCastArity, + +/// The SQL expression contains an empty SELECT clause. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseEmptySelect, + +/// The expected token in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpected2TokenTypes, + +/// The expected argument delimiter in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedArgumentDelimiter, + +/// The expected date part in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedDatePart, + +/// The expected SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedExpression, + +/// The expected identifier for the alias in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedIdentForAlias, + +/// The expected identifier for AT name in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedIdentForAt, + +/// GROUP is not supported in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedIdentForGroupName, + +/// The expected keyword in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedKeyword, + +/// The expected left parenthesis after CAST in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedLeftParenAfterCast, + +/// The expected left parenthesis in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedLeftParenBuiltinFunctionCall, + +/// The expected left parenthesis in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedLeftParenValueConstructor, + +/// The SQL expression contains an unsupported use of MEMBER. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedMember, + +/// The expected number in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedNumber, + +/// The expected right parenthesis character in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedRightParenBuiltinFunctionCall, + +/// The expected token in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedTokenType, + +/// The expected type name in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedTypeName, + +/// The expected WHEN clause in the SQL expression was not found. CASE is not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedWhenClause, + +/// The use of * in the SELECT list in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseInvalidContextForWildcardInSelectList, + +/// The SQL expression contains a path component that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseInvalidPathComponent, + +/// The SQL expression contains a parameter value that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseInvalidTypeParam, + +/// JOIN is not supported in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseMalformedJoin, + +/// The expected identifier after the @ symbol in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseMissingIdentAfterAt, + +/// Only one argument is supported for aggregate functions in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseNonUnaryAgregateFunctionCall, + +/// The SQL expression contains a missing FROM after the SELECT list. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseSelectMissingFrom, + +/// The SQL expression contains an unexpected keyword. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnExpectedKeyword, + +/// The SQL expression contains an unexpected operator. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnexpectedOperator, + +/// The SQL expression contains an unexpected term. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnexpectedTerm, + +/// The SQL expression contains an unexpected token. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnexpectedToken, + +/// The SQL expression contains an operator that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnknownOperator, + +/// The SQL expression contains an unsupported use of ALIAS. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedAlias, + +/// Only COUNT with (*) as a parameter is supported in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedCallWithStar, + +/// The SQL expression contains an unsupported use of CASE. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedCase, + +/// The SQL expression contains an unsupported use of CASE. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedCaseClause, + +/// The SQL expression contains an unsupported use of GROUP BY. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedLiteralsGroupBy, + +/// The SQL expression contains an unsupported use of SELECT. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedSelect, + +/// The SQL expression contains unsupported syntax. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedSyntax, + +/// The SQL expression contains an unsupported token. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedToken, + +/// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. +/// +/// HTTP Status Code: 301 Moved Permanently +/// +PermanentRedirect, + +/// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. +/// +/// HTTP Status Code: 301 Moved Permanently +/// +PermanentRedirectControlError, + +/// At least one of the preconditions you specified did not hold. +/// +/// HTTP Status Code: 412 Precondition Failed +/// +PreconditionFailed, + +/// Temporary redirect. +/// +/// HTTP Status Code: 307 Moved Temporarily +/// +Redirect, + +/// There is no replication configuration for this bucket. +/// +/// HTTP Status Code: 404 Not Found +/// +ReplicationConfigurationNotFoundError, + +/// The request header and query parameters used to make the request exceed the maximum allowed size. +/// +/// HTTP Status Code: 400 Bad Request +/// +RequestHeaderSectionTooLarge, + +/// Bucket POST must be of the enclosure-type multipart/form-data. +/// +/// HTTP Status Code: 400 Bad Request +/// +RequestIsNotMultiPartContent, + +/// The difference between the request time and the server's time is too large. +/// +/// HTTP Status Code: 403 Forbidden +/// +RequestTimeTooSkewed, + +/// Your socket connection to the server was not read from or written to within the timeout period. +/// +/// HTTP Status Code: 400 Bad Request +/// +RequestTimeout, + +/// Requesting the torrent file of a bucket is not permitted. +/// +/// HTTP Status Code: 400 Bad Request +/// +RequestTorrentOfBucketError, + +/// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. +/// +/// HTTP Status Code: 400 Bad Request +/// +ResponseInterrupted, + +/// Object restore is already in progress. +/// +/// HTTP Status Code: 409 Conflict +/// +RestoreAlreadyInProgress, + +/// The server-side encryption configuration was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ServerSideEncryptionConfigurationNotFoundError, + +/// Service is unable to handle request. +/// +/// HTTP Status Code: 503 Service Unavailable +/// +ServiceUnavailable, + +/// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details. +/// +/// HTTP Status Code: 403 Forbidden +/// +SignatureDoesNotMatch, + +/// Reduce your request rate. +/// +/// HTTP Status Code: 503 Slow Down +/// +SlowDown, + +/// The tag policy does not allow the specified value for the following tag key. +/// +/// HTTP Status Code: 400 Bad Request +/// +TagPolicyException, + +/// You are being redirected to the bucket while DNS updates. +/// +/// HTTP Status Code: 307 Moved Temporarily +/// +TemporaryRedirect, + +/// The serial number and/or token code you provided is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +TokenCodeInvalidError, + +/// The provided token must be refreshed. +/// +/// HTTP Status Code: 400 Bad Request +/// +TokenRefreshRequired, + +/// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyAccessPoints, + +/// You have attempted to create more buckets than allowed. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyBuckets, + +/// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyMultiRegionAccessPointregionsError, + +/// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyMultiRegionAccessPoints, + +/// The number of tags exceeds the limit of 50 tags. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyTags, + +/// Object decompression failed. Check that the object is properly compressed using the format specified in the request. +/// +/// HTTP Status Code: 400 Bad Request +/// +TruncatedInput, + +/// You are not authorized to perform this operation. +/// +/// HTTP Status Code: 401 Unauthorized +/// +UnauthorizedAccess, + +/// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal. +/// +/// HTTP Status Code: 403 Forbidden +/// +UnauthorizedAccessError, + +/// This request does not support content. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnexpectedContent, + +/// Applicable in China Regions only. This request was rejected because the IP was unexpected. +/// +/// HTTP Status Code: 403 Forbidden +/// +UnexpectedIPError, + +/// We encountered a record type that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnrecognizedFormatException, + +/// The email address you provided does not match any account on record. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnresolvableGrantByEmailAddress, + +/// The request contained an unsupported argument. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedArgument, + +/// We encountered an unsupported SQL function. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedFunction, + +/// The specified Parquet type is not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedParquetType, + +/// A range header is not supported for this operation. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedRangeHeader, + +/// Scan range queries are not supported on this type of object. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedScanRangeInput, + +/// The provided request is signed with an unsupported STS Token version or the signature version is not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedSignature, + +/// We encountered an unsupported SQL operation. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedSqlOperation, + +/// We encountered an unsupported SQL structure. Check the SQL Reference. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedSqlStructure, + +/// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedStorageClass, + +/// We encountered syntax that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedSyntax, + +/// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0). +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedTypeForQuerying, + +/// The bucket POST must contain the specified field name. If it is specified, check the order of the fields. +/// +/// HTTP Status Code: 400 Bad Request +/// +UserKeyMustBeSpecified, + +/// A timestamp parse failure occurred in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ValueParseFailure, + +Custom(ByteString), } impl S3ErrorCode { - const STATIC_CODE_LIST: &'static [&'static str] = &[ - "AccessControlListNotSupported", - "AccessDenied", - "AccessPointAlreadyOwnedByYou", - "AccountProblem", - "AllAccessDisabled", - "AmbiguousFieldName", - "AmbiguousGrantByEmailAddress", - "AuthorizationHeaderMalformed", - "AuthorizationQueryParametersError", - "BadDigest", - "BucketAlreadyExists", - "BucketAlreadyOwnedByYou", - "BucketHasAccessPointsAttached", - "BucketNotEmpty", - "Busy", - "CSVEscapingRecordDelimiter", - "CSVParsingError", - "CSVUnescapedQuote", - "CastFailed", - "ClientTokenConflict", - "ColumnTooLong", - "ConditionalRequestConflict", - "ConnectionClosedByRequester", - "CredentialsNotSupported", - "CrossLocationLoggingProhibited", - "DeviceNotActiveError", - "EmptyRequestBody", - "EndpointNotFound", - "EntityTooLarge", - "EntityTooSmall", - "EvaluatorBindingDoesNotExist", - "EvaluatorInvalidArguments", - "EvaluatorInvalidTimestampFormatPattern", - "EvaluatorInvalidTimestampFormatPatternSymbol", - "EvaluatorInvalidTimestampFormatPatternSymbolForParsing", - "EvaluatorInvalidTimestampFormatPatternToken", - "EvaluatorLikePatternInvalidEscapeSequence", - "EvaluatorNegativeLimit", - "EvaluatorTimestampFormatPatternDuplicateFields", - "EvaluatorTimestampFormatPatternHourClockAmPmMismatch", - "EvaluatorUnterminatedTimestampFormatPatternToken", - "ExpiredToken", - "ExpressionTooLong", - "ExternalEvalException", - "IllegalLocationConstraintException", - "IllegalSqlFunctionArgument", - "IllegalVersioningConfigurationException", - "IncompleteBody", - "IncorrectEndpoint", - "IncorrectNumberOfFilesInPostRequest", - "IncorrectSqlFunctionArgumentType", - "InlineDataTooLarge", - "IntegerOverflow", - "InternalError", - "InvalidAccessKeyId", - "InvalidAccessPoint", - "InvalidAccessPointAliasError", - "InvalidAddressingHeader", - "InvalidArgument", - "InvalidBucketAclWithObjectOwnership", - "InvalidBucketName", - "InvalidBucketOwnerAWSAccountID", - "InvalidBucketState", - "InvalidCast", - "InvalidColumnIndex", - "InvalidCompressionFormat", - "InvalidDataSource", - "InvalidDataType", - "InvalidDigest", - "InvalidEncryptionAlgorithmError", - "InvalidExpressionType", - "InvalidFileHeaderInfo", - "InvalidHostHeader", - "InvalidHttpMethod", - "InvalidJsonType", - "InvalidKeyPath", - "InvalidLocationConstraint", - "InvalidObjectState", - "InvalidPart", - "InvalidPartOrder", - "InvalidPayer", - "InvalidPolicyDocument", - "InvalidQuoteFields", - "InvalidRange", - "InvalidRegion", - "InvalidRequest", - "InvalidRequestParameter", - "InvalidSOAPRequest", - "InvalidScanRange", - "InvalidSecurity", - "InvalidSessionException", - "InvalidSignature", - "InvalidStorageClass", - "InvalidTableAlias", - "InvalidTag", - "InvalidTargetBucketForLogging", - "InvalidTextEncoding", - "InvalidToken", - "InvalidURI", - "JSONParsingError", - "KeyTooLongError", - "LexerInvalidChar", - "LexerInvalidIONLiteral", - "LexerInvalidLiteral", - "LexerInvalidOperator", - "LikeInvalidInputs", - "MalformedACLError", - "MalformedPOSTRequest", - "MalformedPolicy", - "MalformedXML", - "MaxMessageLengthExceeded", - "MaxOperatorsExceeded", - "MaxPostPreDataLengthExceededError", - "MetadataTooLarge", - "MethodNotAllowed", - "MissingAttachment", - "MissingAuthenticationToken", - "MissingContentLength", - "MissingRequestBodyError", - "MissingRequiredParameter", - "MissingSecurityElement", - "MissingSecurityHeader", - "MultipleDataSourcesUnsupported", - "NoLoggingStatusForKey", - "NoSuchAccessPoint", - "NoSuchAsyncRequest", - "NoSuchBucket", - "NoSuchBucketPolicy", - "NoSuchCORSConfiguration", - "NoSuchKey", - "NoSuchLifecycleConfiguration", - "NoSuchMultiRegionAccessPoint", - "NoSuchObjectLockConfiguration", - "NoSuchResource", - "NoSuchTagSet", - "NoSuchUpload", - "NoSuchVersion", - "NoSuchWebsiteConfiguration", - "NoTransformationDefined", - "NotDeviceOwnerError", - "NotImplemented", - "NotModified", - "NotSignedUp", - "NumberFormatError", - "ObjectLockConfigurationNotFoundError", - "ObjectSerializationConflict", - "OperationAborted", - "OverMaxColumn", - "OverMaxParquetBlockSize", - "OverMaxRecordSize", - "OwnershipControlsNotFoundError", - "ParquetParsingError", - "ParquetUnsupportedCompressionCodec", - "ParseAsteriskIsNotAloneInSelectList", - "ParseCannotMixSqbAndWildcardInSelectList", - "ParseCastArity", - "ParseEmptySelect", - "ParseExpected2TokenTypes", - "ParseExpectedArgumentDelimiter", - "ParseExpectedDatePart", - "ParseExpectedExpression", - "ParseExpectedIdentForAlias", - "ParseExpectedIdentForAt", - "ParseExpectedIdentForGroupName", - "ParseExpectedKeyword", - "ParseExpectedLeftParenAfterCast", - "ParseExpectedLeftParenBuiltinFunctionCall", - "ParseExpectedLeftParenValueConstructor", - "ParseExpectedMember", - "ParseExpectedNumber", - "ParseExpectedRightParenBuiltinFunctionCall", - "ParseExpectedTokenType", - "ParseExpectedTypeName", - "ParseExpectedWhenClause", - "ParseInvalidContextForWildcardInSelectList", - "ParseInvalidPathComponent", - "ParseInvalidTypeParam", - "ParseMalformedJoin", - "ParseMissingIdentAfterAt", - "ParseNonUnaryAgregateFunctionCall", - "ParseSelectMissingFrom", - "ParseUnExpectedKeyword", - "ParseUnexpectedOperator", - "ParseUnexpectedTerm", - "ParseUnexpectedToken", - "ParseUnknownOperator", - "ParseUnsupportedAlias", - "ParseUnsupportedCallWithStar", - "ParseUnsupportedCase", - "ParseUnsupportedCaseClause", - "ParseUnsupportedLiteralsGroupBy", - "ParseUnsupportedSelect", - "ParseUnsupportedSyntax", - "ParseUnsupportedToken", - "PermanentRedirect", - "PermanentRedirectControlError", - "PreconditionFailed", - "Redirect", - "ReplicationConfigurationNotFoundError", - "RequestHeaderSectionTooLarge", - "RequestIsNotMultiPartContent", - "RequestTimeTooSkewed", - "RequestTimeout", - "RequestTorrentOfBucketError", - "ResponseInterrupted", - "RestoreAlreadyInProgress", - "ServerSideEncryptionConfigurationNotFoundError", - "ServiceUnavailable", - "SignatureDoesNotMatch", - "SlowDown", - "TagPolicyException", - "TemporaryRedirect", - "TokenCodeInvalidError", - "TokenRefreshRequired", - "TooManyAccessPoints", - "TooManyBuckets", - "TooManyMultiRegionAccessPointregionsError", - "TooManyMultiRegionAccessPoints", - "TooManyTags", - "TruncatedInput", - "UnauthorizedAccess", - "UnauthorizedAccessError", - "UnexpectedContent", - "UnexpectedIPError", - "UnrecognizedFormatException", - "UnresolvableGrantByEmailAddress", - "UnsupportedArgument", - "UnsupportedFunction", - "UnsupportedParquetType", - "UnsupportedRangeHeader", - "UnsupportedScanRangeInput", - "UnsupportedSignature", - "UnsupportedSqlOperation", - "UnsupportedSqlStructure", - "UnsupportedStorageClass", - "UnsupportedSyntax", - "UnsupportedTypeForQuerying", - "UserKeyMustBeSpecified", - "ValueParseFailure", - ]; - - #[must_use] - fn as_enum_tag(&self) -> usize { - match self { - Self::AccessControlListNotSupported => 0, - Self::AccessDenied => 1, - Self::AccessPointAlreadyOwnedByYou => 2, - Self::AccountProblem => 3, - Self::AllAccessDisabled => 4, - Self::AmbiguousFieldName => 5, - Self::AmbiguousGrantByEmailAddress => 6, - Self::AuthorizationHeaderMalformed => 7, - Self::AuthorizationQueryParametersError => 8, - Self::BadDigest => 9, - Self::BucketAlreadyExists => 10, - Self::BucketAlreadyOwnedByYou => 11, - Self::BucketHasAccessPointsAttached => 12, - Self::BucketNotEmpty => 13, - Self::Busy => 14, - Self::CSVEscapingRecordDelimiter => 15, - Self::CSVParsingError => 16, - Self::CSVUnescapedQuote => 17, - Self::CastFailed => 18, - Self::ClientTokenConflict => 19, - Self::ColumnTooLong => 20, - Self::ConditionalRequestConflict => 21, - Self::ConnectionClosedByRequester => 22, - Self::CredentialsNotSupported => 23, - Self::CrossLocationLoggingProhibited => 24, - Self::DeviceNotActiveError => 25, - Self::EmptyRequestBody => 26, - Self::EndpointNotFound => 27, - Self::EntityTooLarge => 28, - Self::EntityTooSmall => 29, - Self::EvaluatorBindingDoesNotExist => 30, - Self::EvaluatorInvalidArguments => 31, - Self::EvaluatorInvalidTimestampFormatPattern => 32, - Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33, - Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34, - Self::EvaluatorInvalidTimestampFormatPatternToken => 35, - Self::EvaluatorLikePatternInvalidEscapeSequence => 36, - Self::EvaluatorNegativeLimit => 37, - Self::EvaluatorTimestampFormatPatternDuplicateFields => 38, - Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39, - Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40, - Self::ExpiredToken => 41, - Self::ExpressionTooLong => 42, - Self::ExternalEvalException => 43, - Self::IllegalLocationConstraintException => 44, - Self::IllegalSqlFunctionArgument => 45, - Self::IllegalVersioningConfigurationException => 46, - Self::IncompleteBody => 47, - Self::IncorrectEndpoint => 48, - Self::IncorrectNumberOfFilesInPostRequest => 49, - Self::IncorrectSqlFunctionArgumentType => 50, - Self::InlineDataTooLarge => 51, - Self::IntegerOverflow => 52, - Self::InternalError => 53, - Self::InvalidAccessKeyId => 54, - Self::InvalidAccessPoint => 55, - Self::InvalidAccessPointAliasError => 56, - Self::InvalidAddressingHeader => 57, - Self::InvalidArgument => 58, - Self::InvalidBucketAclWithObjectOwnership => 59, - Self::InvalidBucketName => 60, - Self::InvalidBucketOwnerAWSAccountID => 61, - Self::InvalidBucketState => 62, - Self::InvalidCast => 63, - Self::InvalidColumnIndex => 64, - Self::InvalidCompressionFormat => 65, - Self::InvalidDataSource => 66, - Self::InvalidDataType => 67, - Self::InvalidDigest => 68, - Self::InvalidEncryptionAlgorithmError => 69, - Self::InvalidExpressionType => 70, - Self::InvalidFileHeaderInfo => 71, - Self::InvalidHostHeader => 72, - Self::InvalidHttpMethod => 73, - Self::InvalidJsonType => 74, - Self::InvalidKeyPath => 75, - Self::InvalidLocationConstraint => 76, - Self::InvalidObjectState => 77, - Self::InvalidPart => 78, - Self::InvalidPartOrder => 79, - Self::InvalidPayer => 80, - Self::InvalidPolicyDocument => 81, - Self::InvalidQuoteFields => 82, - Self::InvalidRange => 83, - Self::InvalidRegion => 84, - Self::InvalidRequest => 85, - Self::InvalidRequestParameter => 86, - Self::InvalidSOAPRequest => 87, - Self::InvalidScanRange => 88, - Self::InvalidSecurity => 89, - Self::InvalidSessionException => 90, - Self::InvalidSignature => 91, - Self::InvalidStorageClass => 92, - Self::InvalidTableAlias => 93, - Self::InvalidTag => 94, - Self::InvalidTargetBucketForLogging => 95, - Self::InvalidTextEncoding => 96, - Self::InvalidToken => 97, - Self::InvalidURI => 98, - Self::JSONParsingError => 99, - Self::KeyTooLongError => 100, - Self::LexerInvalidChar => 101, - Self::LexerInvalidIONLiteral => 102, - Self::LexerInvalidLiteral => 103, - Self::LexerInvalidOperator => 104, - Self::LikeInvalidInputs => 105, - Self::MalformedACLError => 106, - Self::MalformedPOSTRequest => 107, - Self::MalformedPolicy => 108, - Self::MalformedXML => 109, - Self::MaxMessageLengthExceeded => 110, - Self::MaxOperatorsExceeded => 111, - Self::MaxPostPreDataLengthExceededError => 112, - Self::MetadataTooLarge => 113, - Self::MethodNotAllowed => 114, - Self::MissingAttachment => 115, - Self::MissingAuthenticationToken => 116, - Self::MissingContentLength => 117, - Self::MissingRequestBodyError => 118, - Self::MissingRequiredParameter => 119, - Self::MissingSecurityElement => 120, - Self::MissingSecurityHeader => 121, - Self::MultipleDataSourcesUnsupported => 122, - Self::NoLoggingStatusForKey => 123, - Self::NoSuchAccessPoint => 124, - Self::NoSuchAsyncRequest => 125, - Self::NoSuchBucket => 126, - Self::NoSuchBucketPolicy => 127, - Self::NoSuchCORSConfiguration => 128, - Self::NoSuchKey => 129, - Self::NoSuchLifecycleConfiguration => 130, - Self::NoSuchMultiRegionAccessPoint => 131, - Self::NoSuchObjectLockConfiguration => 132, - Self::NoSuchResource => 133, - Self::NoSuchTagSet => 134, - Self::NoSuchUpload => 135, - Self::NoSuchVersion => 136, - Self::NoSuchWebsiteConfiguration => 137, - Self::NoTransformationDefined => 138, - Self::NotDeviceOwnerError => 139, - Self::NotImplemented => 140, - Self::NotModified => 141, - Self::NotSignedUp => 142, - Self::NumberFormatError => 143, - Self::ObjectLockConfigurationNotFoundError => 144, - Self::ObjectSerializationConflict => 145, - Self::OperationAborted => 146, - Self::OverMaxColumn => 147, - Self::OverMaxParquetBlockSize => 148, - Self::OverMaxRecordSize => 149, - Self::OwnershipControlsNotFoundError => 150, - Self::ParquetParsingError => 151, - Self::ParquetUnsupportedCompressionCodec => 152, - Self::ParseAsteriskIsNotAloneInSelectList => 153, - Self::ParseCannotMixSqbAndWildcardInSelectList => 154, - Self::ParseCastArity => 155, - Self::ParseEmptySelect => 156, - Self::ParseExpected2TokenTypes => 157, - Self::ParseExpectedArgumentDelimiter => 158, - Self::ParseExpectedDatePart => 159, - Self::ParseExpectedExpression => 160, - Self::ParseExpectedIdentForAlias => 161, - Self::ParseExpectedIdentForAt => 162, - Self::ParseExpectedIdentForGroupName => 163, - Self::ParseExpectedKeyword => 164, - Self::ParseExpectedLeftParenAfterCast => 165, - Self::ParseExpectedLeftParenBuiltinFunctionCall => 166, - Self::ParseExpectedLeftParenValueConstructor => 167, - Self::ParseExpectedMember => 168, - Self::ParseExpectedNumber => 169, - Self::ParseExpectedRightParenBuiltinFunctionCall => 170, - Self::ParseExpectedTokenType => 171, - Self::ParseExpectedTypeName => 172, - Self::ParseExpectedWhenClause => 173, - Self::ParseInvalidContextForWildcardInSelectList => 174, - Self::ParseInvalidPathComponent => 175, - Self::ParseInvalidTypeParam => 176, - Self::ParseMalformedJoin => 177, - Self::ParseMissingIdentAfterAt => 178, - Self::ParseNonUnaryAgregateFunctionCall => 179, - Self::ParseSelectMissingFrom => 180, - Self::ParseUnExpectedKeyword => 181, - Self::ParseUnexpectedOperator => 182, - Self::ParseUnexpectedTerm => 183, - Self::ParseUnexpectedToken => 184, - Self::ParseUnknownOperator => 185, - Self::ParseUnsupportedAlias => 186, - Self::ParseUnsupportedCallWithStar => 187, - Self::ParseUnsupportedCase => 188, - Self::ParseUnsupportedCaseClause => 189, - Self::ParseUnsupportedLiteralsGroupBy => 190, - Self::ParseUnsupportedSelect => 191, - Self::ParseUnsupportedSyntax => 192, - Self::ParseUnsupportedToken => 193, - Self::PermanentRedirect => 194, - Self::PermanentRedirectControlError => 195, - Self::PreconditionFailed => 196, - Self::Redirect => 197, - Self::ReplicationConfigurationNotFoundError => 198, - Self::RequestHeaderSectionTooLarge => 199, - Self::RequestIsNotMultiPartContent => 200, - Self::RequestTimeTooSkewed => 201, - Self::RequestTimeout => 202, - Self::RequestTorrentOfBucketError => 203, - Self::ResponseInterrupted => 204, - Self::RestoreAlreadyInProgress => 205, - Self::ServerSideEncryptionConfigurationNotFoundError => 206, - Self::ServiceUnavailable => 207, - Self::SignatureDoesNotMatch => 208, - Self::SlowDown => 209, - Self::TagPolicyException => 210, - Self::TemporaryRedirect => 211, - Self::TokenCodeInvalidError => 212, - Self::TokenRefreshRequired => 213, - Self::TooManyAccessPoints => 214, - Self::TooManyBuckets => 215, - Self::TooManyMultiRegionAccessPointregionsError => 216, - Self::TooManyMultiRegionAccessPoints => 217, - Self::TooManyTags => 218, - Self::TruncatedInput => 219, - Self::UnauthorizedAccess => 220, - Self::UnauthorizedAccessError => 221, - Self::UnexpectedContent => 222, - Self::UnexpectedIPError => 223, - Self::UnrecognizedFormatException => 224, - Self::UnresolvableGrantByEmailAddress => 225, - Self::UnsupportedArgument => 226, - Self::UnsupportedFunction => 227, - Self::UnsupportedParquetType => 228, - Self::UnsupportedRangeHeader => 229, - Self::UnsupportedScanRangeInput => 230, - Self::UnsupportedSignature => 231, - Self::UnsupportedSqlOperation => 232, - Self::UnsupportedSqlStructure => 233, - Self::UnsupportedStorageClass => 234, - Self::UnsupportedSyntax => 235, - Self::UnsupportedTypeForQuerying => 236, - Self::UserKeyMustBeSpecified => 237, - Self::ValueParseFailure => 238, - Self::Custom(_) => usize::MAX, - } - } - - pub(crate) fn as_static_str(&self) -> Option<&'static str> { - Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied() - } - - #[must_use] - pub fn from_bytes(s: &[u8]) -> Option { - match s { - b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported), - b"AccessDenied" => Some(Self::AccessDenied), - b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou), - b"AccountProblem" => Some(Self::AccountProblem), - b"AllAccessDisabled" => Some(Self::AllAccessDisabled), - b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName), - b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress), - b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed), - b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError), - b"BadDigest" => Some(Self::BadDigest), - b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists), - b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou), - b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached), - b"BucketNotEmpty" => Some(Self::BucketNotEmpty), - b"Busy" => Some(Self::Busy), - b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter), - b"CSVParsingError" => Some(Self::CSVParsingError), - b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote), - b"CastFailed" => Some(Self::CastFailed), - b"ClientTokenConflict" => Some(Self::ClientTokenConflict), - b"ColumnTooLong" => Some(Self::ColumnTooLong), - b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict), - b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester), - b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported), - b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited), - b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError), - b"EmptyRequestBody" => Some(Self::EmptyRequestBody), - b"EndpointNotFound" => Some(Self::EndpointNotFound), - b"EntityTooLarge" => Some(Self::EntityTooLarge), - b"EntityTooSmall" => Some(Self::EntityTooSmall), - b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist), - b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments), - b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern), - b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol), - b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => { - Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing) - } - b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken), - b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence), - b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit), - b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields), - b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => { - Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch) - } - b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken), - b"ExpiredToken" => Some(Self::ExpiredToken), - b"ExpressionTooLong" => Some(Self::ExpressionTooLong), - b"ExternalEvalException" => Some(Self::ExternalEvalException), - b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException), - b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument), - b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException), - b"IncompleteBody" => Some(Self::IncompleteBody), - b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint), - b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest), - b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType), - b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge), - b"IntegerOverflow" => Some(Self::IntegerOverflow), - b"InternalError" => Some(Self::InternalError), - b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId), - b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint), - b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError), - b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader), - b"InvalidArgument" => Some(Self::InvalidArgument), - b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership), - b"InvalidBucketName" => Some(Self::InvalidBucketName), - b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID), - b"InvalidBucketState" => Some(Self::InvalidBucketState), - b"InvalidCast" => Some(Self::InvalidCast), - b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex), - b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat), - b"InvalidDataSource" => Some(Self::InvalidDataSource), - b"InvalidDataType" => Some(Self::InvalidDataType), - b"InvalidDigest" => Some(Self::InvalidDigest), - b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError), - b"InvalidExpressionType" => Some(Self::InvalidExpressionType), - b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo), - b"InvalidHostHeader" => Some(Self::InvalidHostHeader), - b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod), - b"InvalidJsonType" => Some(Self::InvalidJsonType), - b"InvalidKeyPath" => Some(Self::InvalidKeyPath), - b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint), - b"InvalidObjectState" => Some(Self::InvalidObjectState), - b"InvalidPart" => Some(Self::InvalidPart), - b"InvalidPartOrder" => Some(Self::InvalidPartOrder), - b"InvalidPayer" => Some(Self::InvalidPayer), - b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument), - b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields), - b"InvalidRange" => Some(Self::InvalidRange), - b"InvalidRegion" => Some(Self::InvalidRegion), - b"InvalidRequest" => Some(Self::InvalidRequest), - b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter), - b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest), - b"InvalidScanRange" => Some(Self::InvalidScanRange), - b"InvalidSecurity" => Some(Self::InvalidSecurity), - b"InvalidSessionException" => Some(Self::InvalidSessionException), - b"InvalidSignature" => Some(Self::InvalidSignature), - b"InvalidStorageClass" => Some(Self::InvalidStorageClass), - b"InvalidTableAlias" => Some(Self::InvalidTableAlias), - b"InvalidTag" => Some(Self::InvalidTag), - b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging), - b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding), - b"InvalidToken" => Some(Self::InvalidToken), - b"InvalidURI" => Some(Self::InvalidURI), - b"JSONParsingError" => Some(Self::JSONParsingError), - b"KeyTooLongError" => Some(Self::KeyTooLongError), - b"LexerInvalidChar" => Some(Self::LexerInvalidChar), - b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral), - b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral), - b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator), - b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs), - b"MalformedACLError" => Some(Self::MalformedACLError), - b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest), - b"MalformedPolicy" => Some(Self::MalformedPolicy), - b"MalformedXML" => Some(Self::MalformedXML), - b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded), - b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded), - b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError), - b"MetadataTooLarge" => Some(Self::MetadataTooLarge), - b"MethodNotAllowed" => Some(Self::MethodNotAllowed), - b"MissingAttachment" => Some(Self::MissingAttachment), - b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken), - b"MissingContentLength" => Some(Self::MissingContentLength), - b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError), - b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter), - b"MissingSecurityElement" => Some(Self::MissingSecurityElement), - b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader), - b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported), - b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey), - b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint), - b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest), - b"NoSuchBucket" => Some(Self::NoSuchBucket), - b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy), - b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration), - b"NoSuchKey" => Some(Self::NoSuchKey), - b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration), - b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint), - b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration), - b"NoSuchResource" => Some(Self::NoSuchResource), - b"NoSuchTagSet" => Some(Self::NoSuchTagSet), - b"NoSuchUpload" => Some(Self::NoSuchUpload), - b"NoSuchVersion" => Some(Self::NoSuchVersion), - b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration), - b"NoTransformationDefined" => Some(Self::NoTransformationDefined), - b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError), - b"NotImplemented" => Some(Self::NotImplemented), - b"NotModified" => Some(Self::NotModified), - b"NotSignedUp" => Some(Self::NotSignedUp), - b"NumberFormatError" => Some(Self::NumberFormatError), - b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError), - b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict), - b"OperationAborted" => Some(Self::OperationAborted), - b"OverMaxColumn" => Some(Self::OverMaxColumn), - b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize), - b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize), - b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError), - b"ParquetParsingError" => Some(Self::ParquetParsingError), - b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec), - b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList), - b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList), - b"ParseCastArity" => Some(Self::ParseCastArity), - b"ParseEmptySelect" => Some(Self::ParseEmptySelect), - b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes), - b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter), - b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart), - b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression), - b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias), - b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt), - b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName), - b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword), - b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast), - b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall), - b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor), - b"ParseExpectedMember" => Some(Self::ParseExpectedMember), - b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber), - b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall), - b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType), - b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName), - b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause), - b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList), - b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent), - b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam), - b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin), - b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt), - b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall), - b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom), - b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword), - b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator), - b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm), - b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken), - b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator), - b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias), - b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar), - b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase), - b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause), - b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy), - b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect), - b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax), - b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken), - b"PermanentRedirect" => Some(Self::PermanentRedirect), - b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError), - b"PreconditionFailed" => Some(Self::PreconditionFailed), - b"Redirect" => Some(Self::Redirect), - b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError), - b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge), - b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent), - b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed), - b"RequestTimeout" => Some(Self::RequestTimeout), - b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError), - b"ResponseInterrupted" => Some(Self::ResponseInterrupted), - b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress), - b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError), - b"ServiceUnavailable" => Some(Self::ServiceUnavailable), - b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch), - b"SlowDown" => Some(Self::SlowDown), - b"TagPolicyException" => Some(Self::TagPolicyException), - b"TemporaryRedirect" => Some(Self::TemporaryRedirect), - b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError), - b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired), - b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints), - b"TooManyBuckets" => Some(Self::TooManyBuckets), - b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError), - b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints), - b"TooManyTags" => Some(Self::TooManyTags), - b"TruncatedInput" => Some(Self::TruncatedInput), - b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess), - b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError), - b"UnexpectedContent" => Some(Self::UnexpectedContent), - b"UnexpectedIPError" => Some(Self::UnexpectedIPError), - b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException), - b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress), - b"UnsupportedArgument" => Some(Self::UnsupportedArgument), - b"UnsupportedFunction" => Some(Self::UnsupportedFunction), - b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType), - b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader), - b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput), - b"UnsupportedSignature" => Some(Self::UnsupportedSignature), - b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation), - b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure), - b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass), - b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax), - b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying), - b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified), - b"ValueParseFailure" => Some(Self::ValueParseFailure), - _ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())), - } - } - - #[allow(clippy::match_same_arms)] - #[must_use] - pub fn status_code(&self) -> Option { - match self { - Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST), - Self::AccessDenied => Some(StatusCode::FORBIDDEN), - Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT), - Self::AccountProblem => Some(StatusCode::FORBIDDEN), - Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN), - Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST), - Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), - Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST), - Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST), - Self::BadDigest => Some(StatusCode::BAD_REQUEST), - Self::BucketAlreadyExists => Some(StatusCode::CONFLICT), - Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT), - Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST), - Self::BucketNotEmpty => Some(StatusCode::CONFLICT), - Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE), - Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST), - Self::CSVParsingError => Some(StatusCode::BAD_REQUEST), - Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST), - Self::CastFailed => Some(StatusCode::BAD_REQUEST), - Self::ClientTokenConflict => Some(StatusCode::CONFLICT), - Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST), - Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT), - Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST), - Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST), - Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN), - Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST), - Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST), - Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST), - Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST), - Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), - Self::ExpiredToken => Some(StatusCode::BAD_REQUEST), - Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST), - Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST), - Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST), - Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST), - Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST), - Self::IncompleteBody => Some(StatusCode::BAD_REQUEST), - Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST), - Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST), - Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST), - Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST), - Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST), - Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR), - Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN), - Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST), - Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST), - Self::InvalidAddressingHeader => None, - Self::InvalidArgument => Some(StatusCode::BAD_REQUEST), - Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST), - Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST), - Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST), - Self::InvalidBucketState => Some(StatusCode::CONFLICT), - Self::InvalidCast => Some(StatusCode::BAD_REQUEST), - Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST), - Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST), - Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST), - Self::InvalidDataType => Some(StatusCode::BAD_REQUEST), - Self::InvalidDigest => Some(StatusCode::BAD_REQUEST), - Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST), - Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST), - Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST), - Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST), - Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST), - Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST), - Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST), - Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST), - Self::InvalidObjectState => Some(StatusCode::FORBIDDEN), - Self::InvalidPart => Some(StatusCode::BAD_REQUEST), - Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST), - Self::InvalidPayer => Some(StatusCode::FORBIDDEN), - Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST), - Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST), - Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE), - Self::InvalidRegion => Some(StatusCode::FORBIDDEN), - Self::InvalidRequest => Some(StatusCode::BAD_REQUEST), - Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST), - Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST), - Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST), - Self::InvalidSecurity => Some(StatusCode::FORBIDDEN), - Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST), - Self::InvalidSignature => Some(StatusCode::BAD_REQUEST), - Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST), - Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST), - Self::InvalidTag => Some(StatusCode::BAD_REQUEST), - Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST), - Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST), - Self::InvalidToken => Some(StatusCode::BAD_REQUEST), - Self::InvalidURI => Some(StatusCode::BAD_REQUEST), - Self::JSONParsingError => Some(StatusCode::BAD_REQUEST), - Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST), - Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST), - Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST), - Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST), - Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST), - Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST), - Self::MalformedACLError => Some(StatusCode::BAD_REQUEST), - Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST), - Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST), - Self::MalformedXML => Some(StatusCode::BAD_REQUEST), - Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST), - Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST), - Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST), - Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST), - Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED), - Self::MissingAttachment => None, - Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN), - Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED), - Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST), - Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST), - Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST), - Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST), - Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST), - Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST), - Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND), - Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND), - Self::NoSuchBucket => Some(StatusCode::NOT_FOUND), - Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND), - Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND), - Self::NoSuchKey => Some(StatusCode::NOT_FOUND), - Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND), - Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND), - Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND), - Self::NoSuchResource => Some(StatusCode::NOT_FOUND), - Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND), - Self::NoSuchUpload => Some(StatusCode::NOT_FOUND), - Self::NoSuchVersion => Some(StatusCode::NOT_FOUND), - Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND), - Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND), - Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST), - Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED), - Self::NotModified => Some(StatusCode::NOT_MODIFIED), - Self::NotSignedUp => Some(StatusCode::FORBIDDEN), - Self::NumberFormatError => Some(StatusCode::BAD_REQUEST), - Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), - Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST), - Self::OperationAborted => Some(StatusCode::CONFLICT), - Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST), - Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST), - Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST), - Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND), - Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST), - Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST), - Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST), - Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST), - Self::ParseCastArity => Some(StatusCode::BAD_REQUEST), - Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST), - Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST), - Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST), - Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST), - Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST), - Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST), - Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST), - Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST), - Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST), - Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST), - Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST), - Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST), - Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST), - Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST), - Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY), - Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY), - Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED), - Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT), - Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), - Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST), - Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST), - Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN), - Self::RequestTimeout => Some(StatusCode::BAD_REQUEST), - Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST), - Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST), - Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT), - Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST), - Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE), - Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN), - Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE), - Self::TagPolicyException => Some(StatusCode::BAD_REQUEST), - Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT), - Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST), - Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST), - Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST), - Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST), - Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST), - Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST), - Self::TooManyTags => Some(StatusCode::BAD_REQUEST), - Self::TruncatedInput => Some(StatusCode::BAD_REQUEST), - Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED), - Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN), - Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST), - Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN), - Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST), - Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST), - Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST), - Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST), - Self::Custom(_) => None, - } - } +const STATIC_CODE_LIST: &'static [&'static str] = &[ +"AccessControlListNotSupported", +"AccessDenied", +"AccessPointAlreadyOwnedByYou", +"AccountProblem", +"AllAccessDisabled", +"AmbiguousFieldName", +"AmbiguousGrantByEmailAddress", +"AuthorizationHeaderMalformed", +"AuthorizationQueryParametersError", +"BadDigest", +"BucketAlreadyExists", +"BucketAlreadyOwnedByYou", +"BucketHasAccessPointsAttached", +"BucketNotEmpty", +"Busy", +"CSVEscapingRecordDelimiter", +"CSVParsingError", +"CSVUnescapedQuote", +"CastFailed", +"ClientTokenConflict", +"ColumnTooLong", +"ConditionalRequestConflict", +"ConnectionClosedByRequester", +"CredentialsNotSupported", +"CrossLocationLoggingProhibited", +"DeviceNotActiveError", +"EmptyRequestBody", +"EndpointNotFound", +"EntityTooLarge", +"EntityTooSmall", +"EvaluatorBindingDoesNotExist", +"EvaluatorInvalidArguments", +"EvaluatorInvalidTimestampFormatPattern", +"EvaluatorInvalidTimestampFormatPatternSymbol", +"EvaluatorInvalidTimestampFormatPatternSymbolForParsing", +"EvaluatorInvalidTimestampFormatPatternToken", +"EvaluatorLikePatternInvalidEscapeSequence", +"EvaluatorNegativeLimit", +"EvaluatorTimestampFormatPatternDuplicateFields", +"EvaluatorTimestampFormatPatternHourClockAmPmMismatch", +"EvaluatorUnterminatedTimestampFormatPatternToken", +"ExpiredToken", +"ExpressionTooLong", +"ExternalEvalException", +"IllegalLocationConstraintException", +"IllegalSqlFunctionArgument", +"IllegalVersioningConfigurationException", +"IncompleteBody", +"IncorrectEndpoint", +"IncorrectNumberOfFilesInPostRequest", +"IncorrectSqlFunctionArgumentType", +"InlineDataTooLarge", +"IntegerOverflow", +"InternalError", +"InvalidAccessKeyId", +"InvalidAccessPoint", +"InvalidAccessPointAliasError", +"InvalidAddressingHeader", +"InvalidArgument", +"InvalidBucketAclWithObjectOwnership", +"InvalidBucketName", +"InvalidBucketOwnerAWSAccountID", +"InvalidBucketState", +"InvalidCast", +"InvalidColumnIndex", +"InvalidCompressionFormat", +"InvalidDataSource", +"InvalidDataType", +"InvalidDigest", +"InvalidEncryptionAlgorithmError", +"InvalidExpressionType", +"InvalidFileHeaderInfo", +"InvalidHostHeader", +"InvalidHttpMethod", +"InvalidJsonType", +"InvalidKeyPath", +"InvalidLocationConstraint", +"InvalidObjectState", +"InvalidPart", +"InvalidPartOrder", +"InvalidPayer", +"InvalidPolicyDocument", +"InvalidQuoteFields", +"InvalidRange", +"InvalidRegion", +"InvalidRequest", +"InvalidRequestParameter", +"InvalidSOAPRequest", +"InvalidScanRange", +"InvalidSecurity", +"InvalidSessionException", +"InvalidSignature", +"InvalidStorageClass", +"InvalidTableAlias", +"InvalidTag", +"InvalidTargetBucketForLogging", +"InvalidTextEncoding", +"InvalidToken", +"InvalidURI", +"JSONParsingError", +"KeyTooLongError", +"LexerInvalidChar", +"LexerInvalidIONLiteral", +"LexerInvalidLiteral", +"LexerInvalidOperator", +"LikeInvalidInputs", +"MalformedACLError", +"MalformedPOSTRequest", +"MalformedPolicy", +"MalformedXML", +"MaxMessageLengthExceeded", +"MaxOperatorsExceeded", +"MaxPostPreDataLengthExceededError", +"MetadataTooLarge", +"MethodNotAllowed", +"MissingAttachment", +"MissingAuthenticationToken", +"MissingContentLength", +"MissingRequestBodyError", +"MissingRequiredParameter", +"MissingSecurityElement", +"MissingSecurityHeader", +"MultipleDataSourcesUnsupported", +"NoLoggingStatusForKey", +"NoSuchAccessPoint", +"NoSuchAsyncRequest", +"NoSuchBucket", +"NoSuchBucketPolicy", +"NoSuchCORSConfiguration", +"NoSuchKey", +"NoSuchLifecycleConfiguration", +"NoSuchMultiRegionAccessPoint", +"NoSuchObjectLockConfiguration", +"NoSuchResource", +"NoSuchTagSet", +"NoSuchUpload", +"NoSuchVersion", +"NoSuchWebsiteConfiguration", +"NoTransformationDefined", +"NotDeviceOwnerError", +"NotImplemented", +"NotModified", +"NotSignedUp", +"NumberFormatError", +"ObjectLockConfigurationNotFoundError", +"ObjectSerializationConflict", +"OperationAborted", +"OverMaxColumn", +"OverMaxParquetBlockSize", +"OverMaxRecordSize", +"OwnershipControlsNotFoundError", +"ParquetParsingError", +"ParquetUnsupportedCompressionCodec", +"ParseAsteriskIsNotAloneInSelectList", +"ParseCannotMixSqbAndWildcardInSelectList", +"ParseCastArity", +"ParseEmptySelect", +"ParseExpected2TokenTypes", +"ParseExpectedArgumentDelimiter", +"ParseExpectedDatePart", +"ParseExpectedExpression", +"ParseExpectedIdentForAlias", +"ParseExpectedIdentForAt", +"ParseExpectedIdentForGroupName", +"ParseExpectedKeyword", +"ParseExpectedLeftParenAfterCast", +"ParseExpectedLeftParenBuiltinFunctionCall", +"ParseExpectedLeftParenValueConstructor", +"ParseExpectedMember", +"ParseExpectedNumber", +"ParseExpectedRightParenBuiltinFunctionCall", +"ParseExpectedTokenType", +"ParseExpectedTypeName", +"ParseExpectedWhenClause", +"ParseInvalidContextForWildcardInSelectList", +"ParseInvalidPathComponent", +"ParseInvalidTypeParam", +"ParseMalformedJoin", +"ParseMissingIdentAfterAt", +"ParseNonUnaryAgregateFunctionCall", +"ParseSelectMissingFrom", +"ParseUnExpectedKeyword", +"ParseUnexpectedOperator", +"ParseUnexpectedTerm", +"ParseUnexpectedToken", +"ParseUnknownOperator", +"ParseUnsupportedAlias", +"ParseUnsupportedCallWithStar", +"ParseUnsupportedCase", +"ParseUnsupportedCaseClause", +"ParseUnsupportedLiteralsGroupBy", +"ParseUnsupportedSelect", +"ParseUnsupportedSyntax", +"ParseUnsupportedToken", +"PermanentRedirect", +"PermanentRedirectControlError", +"PreconditionFailed", +"Redirect", +"ReplicationConfigurationNotFoundError", +"RequestHeaderSectionTooLarge", +"RequestIsNotMultiPartContent", +"RequestTimeTooSkewed", +"RequestTimeout", +"RequestTorrentOfBucketError", +"ResponseInterrupted", +"RestoreAlreadyInProgress", +"ServerSideEncryptionConfigurationNotFoundError", +"ServiceUnavailable", +"SignatureDoesNotMatch", +"SlowDown", +"TagPolicyException", +"TemporaryRedirect", +"TokenCodeInvalidError", +"TokenRefreshRequired", +"TooManyAccessPoints", +"TooManyBuckets", +"TooManyMultiRegionAccessPointregionsError", +"TooManyMultiRegionAccessPoints", +"TooManyTags", +"TruncatedInput", +"UnauthorizedAccess", +"UnauthorizedAccessError", +"UnexpectedContent", +"UnexpectedIPError", +"UnrecognizedFormatException", +"UnresolvableGrantByEmailAddress", +"UnsupportedArgument", +"UnsupportedFunction", +"UnsupportedParquetType", +"UnsupportedRangeHeader", +"UnsupportedScanRangeInput", +"UnsupportedSignature", +"UnsupportedSqlOperation", +"UnsupportedSqlStructure", +"UnsupportedStorageClass", +"UnsupportedSyntax", +"UnsupportedTypeForQuerying", +"UserKeyMustBeSpecified", +"ValueParseFailure", +]; + +#[must_use] +fn as_enum_tag(&self) -> usize { +match self { +Self::AccessControlListNotSupported => 0, +Self::AccessDenied => 1, +Self::AccessPointAlreadyOwnedByYou => 2, +Self::AccountProblem => 3, +Self::AllAccessDisabled => 4, +Self::AmbiguousFieldName => 5, +Self::AmbiguousGrantByEmailAddress => 6, +Self::AuthorizationHeaderMalformed => 7, +Self::AuthorizationQueryParametersError => 8, +Self::BadDigest => 9, +Self::BucketAlreadyExists => 10, +Self::BucketAlreadyOwnedByYou => 11, +Self::BucketHasAccessPointsAttached => 12, +Self::BucketNotEmpty => 13, +Self::Busy => 14, +Self::CSVEscapingRecordDelimiter => 15, +Self::CSVParsingError => 16, +Self::CSVUnescapedQuote => 17, +Self::CastFailed => 18, +Self::ClientTokenConflict => 19, +Self::ColumnTooLong => 20, +Self::ConditionalRequestConflict => 21, +Self::ConnectionClosedByRequester => 22, +Self::CredentialsNotSupported => 23, +Self::CrossLocationLoggingProhibited => 24, +Self::DeviceNotActiveError => 25, +Self::EmptyRequestBody => 26, +Self::EndpointNotFound => 27, +Self::EntityTooLarge => 28, +Self::EntityTooSmall => 29, +Self::EvaluatorBindingDoesNotExist => 30, +Self::EvaluatorInvalidArguments => 31, +Self::EvaluatorInvalidTimestampFormatPattern => 32, +Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33, +Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34, +Self::EvaluatorInvalidTimestampFormatPatternToken => 35, +Self::EvaluatorLikePatternInvalidEscapeSequence => 36, +Self::EvaluatorNegativeLimit => 37, +Self::EvaluatorTimestampFormatPatternDuplicateFields => 38, +Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39, +Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40, +Self::ExpiredToken => 41, +Self::ExpressionTooLong => 42, +Self::ExternalEvalException => 43, +Self::IllegalLocationConstraintException => 44, +Self::IllegalSqlFunctionArgument => 45, +Self::IllegalVersioningConfigurationException => 46, +Self::IncompleteBody => 47, +Self::IncorrectEndpoint => 48, +Self::IncorrectNumberOfFilesInPostRequest => 49, +Self::IncorrectSqlFunctionArgumentType => 50, +Self::InlineDataTooLarge => 51, +Self::IntegerOverflow => 52, +Self::InternalError => 53, +Self::InvalidAccessKeyId => 54, +Self::InvalidAccessPoint => 55, +Self::InvalidAccessPointAliasError => 56, +Self::InvalidAddressingHeader => 57, +Self::InvalidArgument => 58, +Self::InvalidBucketAclWithObjectOwnership => 59, +Self::InvalidBucketName => 60, +Self::InvalidBucketOwnerAWSAccountID => 61, +Self::InvalidBucketState => 62, +Self::InvalidCast => 63, +Self::InvalidColumnIndex => 64, +Self::InvalidCompressionFormat => 65, +Self::InvalidDataSource => 66, +Self::InvalidDataType => 67, +Self::InvalidDigest => 68, +Self::InvalidEncryptionAlgorithmError => 69, +Self::InvalidExpressionType => 70, +Self::InvalidFileHeaderInfo => 71, +Self::InvalidHostHeader => 72, +Self::InvalidHttpMethod => 73, +Self::InvalidJsonType => 74, +Self::InvalidKeyPath => 75, +Self::InvalidLocationConstraint => 76, +Self::InvalidObjectState => 77, +Self::InvalidPart => 78, +Self::InvalidPartOrder => 79, +Self::InvalidPayer => 80, +Self::InvalidPolicyDocument => 81, +Self::InvalidQuoteFields => 82, +Self::InvalidRange => 83, +Self::InvalidRegion => 84, +Self::InvalidRequest => 85, +Self::InvalidRequestParameter => 86, +Self::InvalidSOAPRequest => 87, +Self::InvalidScanRange => 88, +Self::InvalidSecurity => 89, +Self::InvalidSessionException => 90, +Self::InvalidSignature => 91, +Self::InvalidStorageClass => 92, +Self::InvalidTableAlias => 93, +Self::InvalidTag => 94, +Self::InvalidTargetBucketForLogging => 95, +Self::InvalidTextEncoding => 96, +Self::InvalidToken => 97, +Self::InvalidURI => 98, +Self::JSONParsingError => 99, +Self::KeyTooLongError => 100, +Self::LexerInvalidChar => 101, +Self::LexerInvalidIONLiteral => 102, +Self::LexerInvalidLiteral => 103, +Self::LexerInvalidOperator => 104, +Self::LikeInvalidInputs => 105, +Self::MalformedACLError => 106, +Self::MalformedPOSTRequest => 107, +Self::MalformedPolicy => 108, +Self::MalformedXML => 109, +Self::MaxMessageLengthExceeded => 110, +Self::MaxOperatorsExceeded => 111, +Self::MaxPostPreDataLengthExceededError => 112, +Self::MetadataTooLarge => 113, +Self::MethodNotAllowed => 114, +Self::MissingAttachment => 115, +Self::MissingAuthenticationToken => 116, +Self::MissingContentLength => 117, +Self::MissingRequestBodyError => 118, +Self::MissingRequiredParameter => 119, +Self::MissingSecurityElement => 120, +Self::MissingSecurityHeader => 121, +Self::MultipleDataSourcesUnsupported => 122, +Self::NoLoggingStatusForKey => 123, +Self::NoSuchAccessPoint => 124, +Self::NoSuchAsyncRequest => 125, +Self::NoSuchBucket => 126, +Self::NoSuchBucketPolicy => 127, +Self::NoSuchCORSConfiguration => 128, +Self::NoSuchKey => 129, +Self::NoSuchLifecycleConfiguration => 130, +Self::NoSuchMultiRegionAccessPoint => 131, +Self::NoSuchObjectLockConfiguration => 132, +Self::NoSuchResource => 133, +Self::NoSuchTagSet => 134, +Self::NoSuchUpload => 135, +Self::NoSuchVersion => 136, +Self::NoSuchWebsiteConfiguration => 137, +Self::NoTransformationDefined => 138, +Self::NotDeviceOwnerError => 139, +Self::NotImplemented => 140, +Self::NotModified => 141, +Self::NotSignedUp => 142, +Self::NumberFormatError => 143, +Self::ObjectLockConfigurationNotFoundError => 144, +Self::ObjectSerializationConflict => 145, +Self::OperationAborted => 146, +Self::OverMaxColumn => 147, +Self::OverMaxParquetBlockSize => 148, +Self::OverMaxRecordSize => 149, +Self::OwnershipControlsNotFoundError => 150, +Self::ParquetParsingError => 151, +Self::ParquetUnsupportedCompressionCodec => 152, +Self::ParseAsteriskIsNotAloneInSelectList => 153, +Self::ParseCannotMixSqbAndWildcardInSelectList => 154, +Self::ParseCastArity => 155, +Self::ParseEmptySelect => 156, +Self::ParseExpected2TokenTypes => 157, +Self::ParseExpectedArgumentDelimiter => 158, +Self::ParseExpectedDatePart => 159, +Self::ParseExpectedExpression => 160, +Self::ParseExpectedIdentForAlias => 161, +Self::ParseExpectedIdentForAt => 162, +Self::ParseExpectedIdentForGroupName => 163, +Self::ParseExpectedKeyword => 164, +Self::ParseExpectedLeftParenAfterCast => 165, +Self::ParseExpectedLeftParenBuiltinFunctionCall => 166, +Self::ParseExpectedLeftParenValueConstructor => 167, +Self::ParseExpectedMember => 168, +Self::ParseExpectedNumber => 169, +Self::ParseExpectedRightParenBuiltinFunctionCall => 170, +Self::ParseExpectedTokenType => 171, +Self::ParseExpectedTypeName => 172, +Self::ParseExpectedWhenClause => 173, +Self::ParseInvalidContextForWildcardInSelectList => 174, +Self::ParseInvalidPathComponent => 175, +Self::ParseInvalidTypeParam => 176, +Self::ParseMalformedJoin => 177, +Self::ParseMissingIdentAfterAt => 178, +Self::ParseNonUnaryAgregateFunctionCall => 179, +Self::ParseSelectMissingFrom => 180, +Self::ParseUnExpectedKeyword => 181, +Self::ParseUnexpectedOperator => 182, +Self::ParseUnexpectedTerm => 183, +Self::ParseUnexpectedToken => 184, +Self::ParseUnknownOperator => 185, +Self::ParseUnsupportedAlias => 186, +Self::ParseUnsupportedCallWithStar => 187, +Self::ParseUnsupportedCase => 188, +Self::ParseUnsupportedCaseClause => 189, +Self::ParseUnsupportedLiteralsGroupBy => 190, +Self::ParseUnsupportedSelect => 191, +Self::ParseUnsupportedSyntax => 192, +Self::ParseUnsupportedToken => 193, +Self::PermanentRedirect => 194, +Self::PermanentRedirectControlError => 195, +Self::PreconditionFailed => 196, +Self::Redirect => 197, +Self::ReplicationConfigurationNotFoundError => 198, +Self::RequestHeaderSectionTooLarge => 199, +Self::RequestIsNotMultiPartContent => 200, +Self::RequestTimeTooSkewed => 201, +Self::RequestTimeout => 202, +Self::RequestTorrentOfBucketError => 203, +Self::ResponseInterrupted => 204, +Self::RestoreAlreadyInProgress => 205, +Self::ServerSideEncryptionConfigurationNotFoundError => 206, +Self::ServiceUnavailable => 207, +Self::SignatureDoesNotMatch => 208, +Self::SlowDown => 209, +Self::TagPolicyException => 210, +Self::TemporaryRedirect => 211, +Self::TokenCodeInvalidError => 212, +Self::TokenRefreshRequired => 213, +Self::TooManyAccessPoints => 214, +Self::TooManyBuckets => 215, +Self::TooManyMultiRegionAccessPointregionsError => 216, +Self::TooManyMultiRegionAccessPoints => 217, +Self::TooManyTags => 218, +Self::TruncatedInput => 219, +Self::UnauthorizedAccess => 220, +Self::UnauthorizedAccessError => 221, +Self::UnexpectedContent => 222, +Self::UnexpectedIPError => 223, +Self::UnrecognizedFormatException => 224, +Self::UnresolvableGrantByEmailAddress => 225, +Self::UnsupportedArgument => 226, +Self::UnsupportedFunction => 227, +Self::UnsupportedParquetType => 228, +Self::UnsupportedRangeHeader => 229, +Self::UnsupportedScanRangeInput => 230, +Self::UnsupportedSignature => 231, +Self::UnsupportedSqlOperation => 232, +Self::UnsupportedSqlStructure => 233, +Self::UnsupportedStorageClass => 234, +Self::UnsupportedSyntax => 235, +Self::UnsupportedTypeForQuerying => 236, +Self::UserKeyMustBeSpecified => 237, +Self::ValueParseFailure => 238, +Self::Custom(_) => usize::MAX, +} +} + +pub(crate) fn as_static_str(&self) -> Option<&'static str> { + Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied() +} + +#[must_use] +pub fn from_bytes(s: &[u8]) -> Option { +match s { +b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported), +b"AccessDenied" => Some(Self::AccessDenied), +b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou), +b"AccountProblem" => Some(Self::AccountProblem), +b"AllAccessDisabled" => Some(Self::AllAccessDisabled), +b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName), +b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress), +b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed), +b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError), +b"BadDigest" => Some(Self::BadDigest), +b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists), +b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou), +b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached), +b"BucketNotEmpty" => Some(Self::BucketNotEmpty), +b"Busy" => Some(Self::Busy), +b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter), +b"CSVParsingError" => Some(Self::CSVParsingError), +b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote), +b"CastFailed" => Some(Self::CastFailed), +b"ClientTokenConflict" => Some(Self::ClientTokenConflict), +b"ColumnTooLong" => Some(Self::ColumnTooLong), +b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict), +b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester), +b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported), +b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited), +b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError), +b"EmptyRequestBody" => Some(Self::EmptyRequestBody), +b"EndpointNotFound" => Some(Self::EndpointNotFound), +b"EntityTooLarge" => Some(Self::EntityTooLarge), +b"EntityTooSmall" => Some(Self::EntityTooSmall), +b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist), +b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments), +b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern), +b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol), +b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing), +b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken), +b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence), +b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit), +b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields), +b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch), +b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken), +b"ExpiredToken" => Some(Self::ExpiredToken), +b"ExpressionTooLong" => Some(Self::ExpressionTooLong), +b"ExternalEvalException" => Some(Self::ExternalEvalException), +b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException), +b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument), +b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException), +b"IncompleteBody" => Some(Self::IncompleteBody), +b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint), +b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest), +b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType), +b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge), +b"IntegerOverflow" => Some(Self::IntegerOverflow), +b"InternalError" => Some(Self::InternalError), +b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId), +b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint), +b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError), +b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader), +b"InvalidArgument" => Some(Self::InvalidArgument), +b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership), +b"InvalidBucketName" => Some(Self::InvalidBucketName), +b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID), +b"InvalidBucketState" => Some(Self::InvalidBucketState), +b"InvalidCast" => Some(Self::InvalidCast), +b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex), +b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat), +b"InvalidDataSource" => Some(Self::InvalidDataSource), +b"InvalidDataType" => Some(Self::InvalidDataType), +b"InvalidDigest" => Some(Self::InvalidDigest), +b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError), +b"InvalidExpressionType" => Some(Self::InvalidExpressionType), +b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo), +b"InvalidHostHeader" => Some(Self::InvalidHostHeader), +b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod), +b"InvalidJsonType" => Some(Self::InvalidJsonType), +b"InvalidKeyPath" => Some(Self::InvalidKeyPath), +b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint), +b"InvalidObjectState" => Some(Self::InvalidObjectState), +b"InvalidPart" => Some(Self::InvalidPart), +b"InvalidPartOrder" => Some(Self::InvalidPartOrder), +b"InvalidPayer" => Some(Self::InvalidPayer), +b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument), +b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields), +b"InvalidRange" => Some(Self::InvalidRange), +b"InvalidRegion" => Some(Self::InvalidRegion), +b"InvalidRequest" => Some(Self::InvalidRequest), +b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter), +b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest), +b"InvalidScanRange" => Some(Self::InvalidScanRange), +b"InvalidSecurity" => Some(Self::InvalidSecurity), +b"InvalidSessionException" => Some(Self::InvalidSessionException), +b"InvalidSignature" => Some(Self::InvalidSignature), +b"InvalidStorageClass" => Some(Self::InvalidStorageClass), +b"InvalidTableAlias" => Some(Self::InvalidTableAlias), +b"InvalidTag" => Some(Self::InvalidTag), +b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging), +b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding), +b"InvalidToken" => Some(Self::InvalidToken), +b"InvalidURI" => Some(Self::InvalidURI), +b"JSONParsingError" => Some(Self::JSONParsingError), +b"KeyTooLongError" => Some(Self::KeyTooLongError), +b"LexerInvalidChar" => Some(Self::LexerInvalidChar), +b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral), +b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral), +b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator), +b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs), +b"MalformedACLError" => Some(Self::MalformedACLError), +b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest), +b"MalformedPolicy" => Some(Self::MalformedPolicy), +b"MalformedXML" => Some(Self::MalformedXML), +b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded), +b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded), +b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError), +b"MetadataTooLarge" => Some(Self::MetadataTooLarge), +b"MethodNotAllowed" => Some(Self::MethodNotAllowed), +b"MissingAttachment" => Some(Self::MissingAttachment), +b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken), +b"MissingContentLength" => Some(Self::MissingContentLength), +b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError), +b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter), +b"MissingSecurityElement" => Some(Self::MissingSecurityElement), +b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader), +b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported), +b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey), +b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint), +b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest), +b"NoSuchBucket" => Some(Self::NoSuchBucket), +b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy), +b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration), +b"NoSuchKey" => Some(Self::NoSuchKey), +b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration), +b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint), +b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration), +b"NoSuchResource" => Some(Self::NoSuchResource), +b"NoSuchTagSet" => Some(Self::NoSuchTagSet), +b"NoSuchUpload" => Some(Self::NoSuchUpload), +b"NoSuchVersion" => Some(Self::NoSuchVersion), +b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration), +b"NoTransformationDefined" => Some(Self::NoTransformationDefined), +b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError), +b"NotImplemented" => Some(Self::NotImplemented), +b"NotModified" => Some(Self::NotModified), +b"NotSignedUp" => Some(Self::NotSignedUp), +b"NumberFormatError" => Some(Self::NumberFormatError), +b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError), +b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict), +b"OperationAborted" => Some(Self::OperationAborted), +b"OverMaxColumn" => Some(Self::OverMaxColumn), +b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize), +b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize), +b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError), +b"ParquetParsingError" => Some(Self::ParquetParsingError), +b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec), +b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList), +b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList), +b"ParseCastArity" => Some(Self::ParseCastArity), +b"ParseEmptySelect" => Some(Self::ParseEmptySelect), +b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes), +b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter), +b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart), +b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression), +b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias), +b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt), +b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName), +b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword), +b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast), +b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall), +b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor), +b"ParseExpectedMember" => Some(Self::ParseExpectedMember), +b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber), +b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall), +b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType), +b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName), +b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause), +b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList), +b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent), +b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam), +b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin), +b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt), +b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall), +b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom), +b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword), +b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator), +b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm), +b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken), +b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator), +b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias), +b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar), +b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase), +b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause), +b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy), +b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect), +b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax), +b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken), +b"PermanentRedirect" => Some(Self::PermanentRedirect), +b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError), +b"PreconditionFailed" => Some(Self::PreconditionFailed), +b"Redirect" => Some(Self::Redirect), +b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError), +b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge), +b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent), +b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed), +b"RequestTimeout" => Some(Self::RequestTimeout), +b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError), +b"ResponseInterrupted" => Some(Self::ResponseInterrupted), +b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress), +b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError), +b"ServiceUnavailable" => Some(Self::ServiceUnavailable), +b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch), +b"SlowDown" => Some(Self::SlowDown), +b"TagPolicyException" => Some(Self::TagPolicyException), +b"TemporaryRedirect" => Some(Self::TemporaryRedirect), +b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError), +b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired), +b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints), +b"TooManyBuckets" => Some(Self::TooManyBuckets), +b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError), +b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints), +b"TooManyTags" => Some(Self::TooManyTags), +b"TruncatedInput" => Some(Self::TruncatedInput), +b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess), +b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError), +b"UnexpectedContent" => Some(Self::UnexpectedContent), +b"UnexpectedIPError" => Some(Self::UnexpectedIPError), +b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException), +b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress), +b"UnsupportedArgument" => Some(Self::UnsupportedArgument), +b"UnsupportedFunction" => Some(Self::UnsupportedFunction), +b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType), +b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader), +b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput), +b"UnsupportedSignature" => Some(Self::UnsupportedSignature), +b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation), +b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure), +b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass), +b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax), +b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying), +b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified), +b"ValueParseFailure" => Some(Self::ValueParseFailure), +_ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())) +} +} + +#[allow(clippy::match_same_arms)] +#[must_use] +pub fn status_code(&self) -> Option { +match self { +Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST), +Self::AccessDenied => Some(StatusCode::FORBIDDEN), +Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT), +Self::AccountProblem => Some(StatusCode::FORBIDDEN), +Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN), +Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST), +Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), +Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST), +Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST), +Self::BadDigest => Some(StatusCode::BAD_REQUEST), +Self::BucketAlreadyExists => Some(StatusCode::CONFLICT), +Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT), +Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST), +Self::BucketNotEmpty => Some(StatusCode::CONFLICT), +Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE), +Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST), +Self::CSVParsingError => Some(StatusCode::BAD_REQUEST), +Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST), +Self::CastFailed => Some(StatusCode::BAD_REQUEST), +Self::ClientTokenConflict => Some(StatusCode::CONFLICT), +Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST), +Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT), +Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST), +Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST), +Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN), +Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST), +Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST), +Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST), +Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST), +Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), +Self::ExpiredToken => Some(StatusCode::BAD_REQUEST), +Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST), +Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST), +Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST), +Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST), +Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST), +Self::IncompleteBody => Some(StatusCode::BAD_REQUEST), +Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST), +Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST), +Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST), +Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST), +Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST), +Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR), +Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN), +Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST), +Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST), +Self::InvalidAddressingHeader => None, +Self::InvalidArgument => Some(StatusCode::BAD_REQUEST), +Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST), +Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST), +Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST), +Self::InvalidBucketState => Some(StatusCode::CONFLICT), +Self::InvalidCast => Some(StatusCode::BAD_REQUEST), +Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST), +Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST), +Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST), +Self::InvalidDataType => Some(StatusCode::BAD_REQUEST), +Self::InvalidDigest => Some(StatusCode::BAD_REQUEST), +Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST), +Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST), +Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST), +Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST), +Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST), +Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST), +Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST), +Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST), +Self::InvalidObjectState => Some(StatusCode::FORBIDDEN), +Self::InvalidPart => Some(StatusCode::BAD_REQUEST), +Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST), +Self::InvalidPayer => Some(StatusCode::FORBIDDEN), +Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST), +Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST), +Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE), +Self::InvalidRegion => Some(StatusCode::FORBIDDEN), +Self::InvalidRequest => Some(StatusCode::BAD_REQUEST), +Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST), +Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST), +Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST), +Self::InvalidSecurity => Some(StatusCode::FORBIDDEN), +Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST), +Self::InvalidSignature => Some(StatusCode::BAD_REQUEST), +Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST), +Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST), +Self::InvalidTag => Some(StatusCode::BAD_REQUEST), +Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST), +Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST), +Self::InvalidToken => Some(StatusCode::BAD_REQUEST), +Self::InvalidURI => Some(StatusCode::BAD_REQUEST), +Self::JSONParsingError => Some(StatusCode::BAD_REQUEST), +Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST), +Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST), +Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST), +Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST), +Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST), +Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST), +Self::MalformedACLError => Some(StatusCode::BAD_REQUEST), +Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST), +Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST), +Self::MalformedXML => Some(StatusCode::BAD_REQUEST), +Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST), +Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST), +Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST), +Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST), +Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED), +Self::MissingAttachment => None, +Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN), +Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED), +Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST), +Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST), +Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST), +Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST), +Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST), +Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST), +Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND), +Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND), +Self::NoSuchBucket => Some(StatusCode::NOT_FOUND), +Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND), +Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND), +Self::NoSuchKey => Some(StatusCode::NOT_FOUND), +Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND), +Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND), +Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND), +Self::NoSuchResource => Some(StatusCode::NOT_FOUND), +Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND), +Self::NoSuchUpload => Some(StatusCode::NOT_FOUND), +Self::NoSuchVersion => Some(StatusCode::NOT_FOUND), +Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND), +Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND), +Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST), +Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED), +Self::NotModified => Some(StatusCode::NOT_MODIFIED), +Self::NotSignedUp => Some(StatusCode::FORBIDDEN), +Self::NumberFormatError => Some(StatusCode::BAD_REQUEST), +Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), +Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST), +Self::OperationAborted => Some(StatusCode::CONFLICT), +Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST), +Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST), +Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST), +Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND), +Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST), +Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST), +Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST), +Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST), +Self::ParseCastArity => Some(StatusCode::BAD_REQUEST), +Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST), +Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST), +Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST), +Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST), +Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST), +Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST), +Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST), +Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST), +Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST), +Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST), +Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST), +Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST), +Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST), +Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST), +Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY), +Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY), +Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED), +Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT), +Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), +Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST), +Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST), +Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN), +Self::RequestTimeout => Some(StatusCode::BAD_REQUEST), +Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST), +Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST), +Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT), +Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST), +Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE), +Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN), +Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE), +Self::TagPolicyException => Some(StatusCode::BAD_REQUEST), +Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT), +Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST), +Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST), +Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST), +Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST), +Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST), +Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST), +Self::TooManyTags => Some(StatusCode::BAD_REQUEST), +Self::TruncatedInput => Some(StatusCode::BAD_REQUEST), +Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED), +Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN), +Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST), +Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN), +Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST), +Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST), +Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST), +Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST), +Self::Custom(_) => None, +} +} + } diff --git a/crates/s3s/src/error/generated_minio.rs b/crates/s3s/src/error/generated_minio.rs index 8dad05e7..1408804d 100644 --- a/crates/s3s/src/error/generated_minio.rs +++ b/crates/s3s/src/error/generated_minio.rs @@ -249,2438 +249,2435 @@ use hyper::StatusCode; #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] pub enum S3ErrorCode { - /// The bucket does not allow ACLs. - /// - /// HTTP Status Code: 400 Bad Request - /// - AccessControlListNotSupported, - - /// Access Denied - /// - /// HTTP Status Code: 403 Forbidden - /// - AccessDenied, - - /// An access point with an identical name already exists in your account. - /// - /// HTTP Status Code: 409 Conflict - /// - AccessPointAlreadyOwnedByYou, - - /// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance. - /// - /// HTTP Status Code: 403 Forbidden - /// - AccountProblem, - - /// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance. - /// - /// HTTP Status Code: 403 Forbidden - /// - AllAccessDisabled, - - /// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - AmbiguousFieldName, - - /// The email address you provided is associated with more than one account. - /// - /// HTTP Status Code: 400 Bad Request - /// - AmbiguousGrantByEmailAddress, - - /// The authorization header you provided is invalid. - /// - /// HTTP Status Code: 400 Bad Request - /// - AuthorizationHeaderMalformed, - - /// The authorization query parameters that you provided are not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - AuthorizationQueryParametersError, - - /// The Content-MD5 you specified did not match what we received. - /// - /// HTTP Status Code: 400 Bad Request - /// - BadDigest, - - /// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. - /// - /// HTTP Status Code: 409 Conflict - /// - BucketAlreadyExists, - - /// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). - /// - /// HTTP Status Code: 409 Conflict - /// - BucketAlreadyOwnedByYou, - - /// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket. - /// - /// HTTP Status Code: 400 Bad Request - /// - BucketHasAccessPointsAttached, - - /// The bucket you tried to delete is not empty. - /// - /// HTTP Status Code: 409 Conflict - /// - BucketNotEmpty, - - /// The service is unavailable. Try again later. - /// - /// HTTP Status Code: 503 Service Unavailable - /// - Busy, - - /// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. - /// - /// HTTP Status Code: 400 Bad Request - /// - CSVEscapingRecordDelimiter, - - /// An error occurred while parsing the CSV file. Check the file and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - CSVParsingError, - - /// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. - /// - /// HTTP Status Code: 400 Bad Request - /// - CSVUnescapedQuote, - - /// An attempt to convert from one data type to another using CAST failed in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - CastFailed, - - /// Your Multi-Region Access Point idempotency token was already used for a different request. - /// - /// HTTP Status Code: 409 Conflict - /// - ClientTokenConflict, - - /// The length of a column in the result is greater than maxCharsPerColumn of 1 MB. - /// - /// HTTP Status Code: 400 Bad Request - /// - ColumnTooLong, - - /// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part. - /// - /// HTTP Status Code: 409 Conflict - /// - ConditionalRequestConflict, - - /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. - /// - /// HTTP Status Code: 400 Bad Request - /// - ConnectionClosedByRequester, - - /// This request does not support credentials. - /// - /// HTTP Status Code: 400 Bad Request - /// - CredentialsNotSupported, - - /// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. - /// - /// HTTP Status Code: 403 Forbidden - /// - CrossLocationLoggingProhibited, - - /// The device is not currently active. - /// - /// HTTP Status Code: 400 Bad Request - /// - DeviceNotActiveError, - - /// The request body cannot be empty. - /// - /// HTTP Status Code: 400 Bad Request - /// - EmptyRequestBody, - - /// Direct requests to the correct endpoint. - /// - /// HTTP Status Code: 400 Bad Request - /// - EndpointNotFound, - - /// Your proposed upload exceeds the maximum allowed object size. - /// - /// HTTP Status Code: 400 Bad Request - /// - EntityTooLarge, - - /// Your proposed upload is smaller than the minimum allowed object size. - /// - /// HTTP Status Code: 400 Bad Request - /// - EntityTooSmall, - - /// A column name or a path provided does not exist in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorBindingDoesNotExist, - - /// There is an incorrect number of arguments in the function call in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidArguments, - - /// The timestamp format string in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidTimestampFormatPattern, - - /// The timestamp format pattern contains a symbol in the SQL expression that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidTimestampFormatPatternSymbol, - - /// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidTimestampFormatPatternSymbolForParsing, - - /// The timestamp format pattern contains a token in the SQL expression that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorInvalidTimestampFormatPatternToken, - - /// An argument given to the LIKE expression was not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorLikePatternInvalidEscapeSequence, - - /// LIMIT must not be negative. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorNegativeLimit, - - /// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorTimestampFormatPatternDuplicateFields, - - /// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorTimestampFormatPatternHourClockAmPmMismatch, - - /// The timestamp format pattern contains an unterminated token in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - EvaluatorUnterminatedTimestampFormatPatternToken, - - /// The provided token has expired. - /// - /// HTTP Status Code: 400 Bad Request - /// - ExpiredToken, - - /// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB. - /// - /// HTTP Status Code: 400 Bad Request - /// - ExpressionTooLong, - - /// The query cannot be evaluated. Check the file and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - ExternalEvalException, - - /// This error might occur for the following reasons: - /// - /// - /// You are trying to access a bucket from a different Region than where the bucket exists. - /// - /// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to. - /// - /// HTTP Status Code: 400 Bad Request - /// - IllegalLocationConstraintException, - - /// An illegal argument was used in the SQL function. - /// - /// HTTP Status Code: 400 Bad Request - /// - IllegalSqlFunctionArgument, - - /// Indicates that the versioning configuration specified in the request is invalid. - /// - /// HTTP Status Code: 400 Bad Request - /// - IllegalVersioningConfigurationException, - - /// You did not provide the number of bytes specified by the Content-Length HTTP header - /// - /// HTTP Status Code: 400 Bad Request - /// - IncompleteBody, - - /// The specified bucket exists in another Region. Direct requests to the correct endpoint. - /// - /// HTTP Status Code: 400 Bad Request - /// - IncorrectEndpoint, - - /// POST requires exactly one file upload per request. - /// - /// HTTP Status Code: 400 Bad Request - /// - IncorrectNumberOfFilesInPostRequest, - - /// An incorrect argument type was specified in a function call in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - IncorrectSqlFunctionArgumentType, - - /// Inline data exceeds the maximum allowed size. - /// - /// HTTP Status Code: 400 Bad Request - /// - InlineDataTooLarge, - - /// An integer overflow or underflow occurred in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - IntegerOverflow, - - /// We encountered an internal error. Please try again. - /// - /// HTTP Status Code: 500 Internal Server Error - /// - InternalError, - - /// The Amazon Web Services access key ID you provided does not exist in our records. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidAccessKeyId, - - /// The specified access point name or account is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidAccessPoint, - - /// The specified access point alias name is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidAccessPointAliasError, - - /// You must specify the Anonymous role. - /// - InvalidAddressingHeader, - - /// Invalid Argument - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidArgument, - - /// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidBucketAclWithObjectOwnership, - - /// The specified bucket is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidBucketName, - - /// The value of the expected bucket owner parameter must be an AWS account ID. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidBucketOwnerAWSAccountID, - - /// The request is not valid with the current state of the bucket. - /// - /// HTTP Status Code: 409 Conflict - /// - InvalidBucketState, - - /// An attempt to convert from one data type to another using CAST failed in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidCast, - - /// The column index in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidColumnIndex, - - /// The file is not in a supported compression format. Only GZIP and BZIP2 are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidCompressionFormat, - - /// The data source type is not valid. Only CSV, JSON, and Parquet are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidDataSource, - - /// The SQL expression contains a data type that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidDataType, - - /// The Content-MD5 you specified is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidDigest, - - /// The encryption request you specified is not valid. The valid value is AES256. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidEncryptionAlgorithmError, - - /// The ExpressionType value is not valid. Only SQL expressions are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidExpressionType, - - /// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidFileHeaderInfo, - - /// The host headers provided in the request used the incorrect style addressing. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidHostHeader, - - /// The request is made using an unexpected HTTP method. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidHttpMethod, - - /// The JsonType value is not valid. Only DOCUMENT and LINES are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidJsonType, - - /// The key path in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidKeyPath, - - /// The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidLocationConstraint, - - /// The action is not valid for the current state of the object. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidObjectState, - - /// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidPart, - - /// The list of parts was not in ascending order. Parts list must be specified in order by part number. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidPartOrder, - - /// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidPayer, - - /// The content of the form does not meet the conditions specified in the policy document. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidPolicyDocument, - - /// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidQuoteFields, - - /// The requested range cannot be satisfied. - /// - /// HTTP Status Code: 416 Requested Range NotSatisfiable - /// - InvalidRange, - - /// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidRegion, - - /// + Please use AWS4-HMAC-SHA256. - /// + SOAP requests must be made over an HTTPS connection. - /// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names. - /// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names. - /// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests. - /// + Amazon S3 Transfer Accelerate is not configured on this bucket. - /// + Amazon S3 Transfer Accelerate is disabled on this bucket. - /// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information. - /// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information. - /// - /// HTTP Status Code: 400 Bad Request - InvalidRequest, - - /// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidRequestParameter, - - /// The SOAP request body is invalid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidSOAPRequest, - - /// The provided scan range is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidScanRange, - - /// The provided security credentials are not valid. - /// - /// HTTP Status Code: 403 Forbidden - /// - InvalidSecurity, - - /// Returned if the session doesn't exist anymore because it timed out or expired. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidSessionException, - - /// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidSignature, - - /// The storage class you specified is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidStorageClass, - - /// The SQL expression contains a table alias that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidTableAlias, - - /// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidTag, - - /// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidTargetBucketForLogging, - - /// The encoding type is not valid. Only UTF-8 encoding is supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidTextEncoding, - - /// The provided token is malformed or otherwise invalid. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidToken, - - /// Couldn't parse the specified URI. - /// - /// HTTP Status Code: 400 Bad Request - /// - InvalidURI, - - /// An error occurred while parsing the JSON file. Check the file and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - JSONParsingError, - - /// Your key is too long. - /// - /// HTTP Status Code: 400 Bad Request - /// - KeyTooLongError, - - /// The SQL expression contains a character that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LexerInvalidChar, - - /// The SQL expression contains an operator that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LexerInvalidIONLiteral, - - /// The SQL expression contains an operator that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LexerInvalidLiteral, - - /// The SQL expression contains a literal that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LexerInvalidOperator, - - /// The argument given to the LIKE clause in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - LikeInvalidInputs, - - /// The XML you provided was not well-formed or did not validate against our published schema. - /// - /// HTTP Status Code: 400 Bad Request - /// - MalformedACLError, - - /// The body of your POST request is not well-formed multipart/form-data. - /// - /// HTTP Status Code: 400 Bad Request - /// - MalformedPOSTRequest, - - /// Your policy contains a principal that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - MalformedPolicy, - - /// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." - /// - /// HTTP Status Code: 400 Bad Request - /// - MalformedXML, - - /// Your request was too big. - /// - /// HTTP Status Code: 400 Bad Request - /// - MaxMessageLengthExceeded, - - /// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used. - /// - /// HTTP Status Code: 400 Bad Request - /// - MaxOperatorsExceeded, - - /// Your POST request fields preceding the upload file were too large. - /// - /// HTTP Status Code: 400 Bad Request - /// - MaxPostPreDataLengthExceededError, - - /// Your metadata headers exceed the maximum allowed metadata size. - /// - /// HTTP Status Code: 400 Bad Request - /// - MetadataTooLarge, - - /// The specified method is not allowed against this resource. - /// - /// HTTP Status Code: 405 Method Not Allowed - /// - MethodNotAllowed, - - /// A SOAP attachment was expected, but none were found. - /// - MissingAttachment, - - /// The request was not signed. - /// - /// HTTP Status Code: 403 Forbidden - /// - MissingAuthenticationToken, - - /// You must provide the Content-Length HTTP header. - /// - /// HTTP Status Code: 411 Length Required - /// - MissingContentLength, - - /// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty." - /// - /// HTTP Status Code: 400 Bad Request - /// - MissingRequestBodyError, - - /// The SelectRequest entity is missing a required parameter. Check the service documentation and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - MissingRequiredParameter, - - /// The SOAP 1.1 request is missing a security element. - /// - /// HTTP Status Code: 400 Bad Request - /// - MissingSecurityElement, - - /// Your request is missing a required header. - /// - /// HTTP Status Code: 400 Bad Request - /// - MissingSecurityHeader, - - /// Multiple data sources are not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - MultipleDataSourcesUnsupported, - - /// There is no such thing as a logging status subresource for a key. - /// - /// HTTP Status Code: 400 Bad Request - /// - NoLoggingStatusForKey, - - /// The specified access point does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchAccessPoint, - - /// The specified request was not found. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchAsyncRequest, - - /// The specified bucket does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchBucket, - - /// The specified bucket does not have a bucket policy. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchBucketPolicy, - - /// The specified bucket does not have a CORS configuration. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchCORSConfiguration, - - /// The specified key does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchKey, - - /// The lifecycle configuration does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchLifecycleConfiguration, - - /// The specified Multi-Region Access Point does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchMultiRegionAccessPoint, - - /// The specified object does not have an ObjectLock configuration. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchObjectLockConfiguration, - - /// The specified resource doesn't exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchResource, - - /// The specified tag does not exist. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchTagSet, - - /// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchUpload, - - /// Indicates that the version ID specified in the request does not match an existing version. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchVersion, - - /// The specified bucket does not have a website configuration. - /// - /// HTTP Status Code: 404 Not Found - /// - NoSuchWebsiteConfiguration, - - /// No transformation found for this Object Lambda Access Point. - /// - /// HTTP Status Code: 404 Not Found - /// - NoTransformationDefined, - - /// The device that generated the token is not owned by the authenticated user. - /// - /// HTTP Status Code: 400 Bad Request - /// - NotDeviceOwnerError, - - /// A header you provided implies functionality that is not implemented. - /// - /// HTTP Status Code: 501 Not Implemented - /// - NotImplemented, - - /// The resource was not changed. - /// - /// HTTP Status Code: 304 Not Modified - /// - NotModified, - - /// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 - /// - /// HTTP Status Code: 403 Forbidden - /// - NotSignedUp, - - /// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers. - /// - /// HTTP Status Code: 400 Bad Request - /// - NumberFormatError, - - /// The Object Lock configuration does not exist for this bucket. - /// - /// HTTP Status Code: 404 Not Found - /// - ObjectLockConfigurationNotFoundError, - - /// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each. - /// - /// HTTP Status Code: 400 Bad Request - /// - ObjectSerializationConflict, - - /// A conflicting conditional action is currently in progress against this resource. Try again. - /// - /// HTTP Status Code: 409 Conflict - /// - OperationAborted, - - /// The number of columns in the result is greater than the maximum allowable number of columns. - /// - /// HTTP Status Code: 400 Bad Request - /// - OverMaxColumn, - - /// The Parquet file is above the max row group size. - /// - /// HTTP Status Code: 400 Bad Request - /// - OverMaxParquetBlockSize, - - /// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB. - /// - /// HTTP Status Code: 400 Bad Request - /// - OverMaxRecordSize, - - /// The bucket ownership controls were not found. - /// - /// HTTP Status Code: 404 Not Found - /// - OwnershipControlsNotFoundError, - - /// An error occurred while parsing the Parquet file. Check the file and try again. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParquetParsingError, - - /// The specified Parquet compression codec is not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParquetUnsupportedCompressionCodec, - - /// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseAsteriskIsNotAloneInSelectList, - - /// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseCannotMixSqbAndWildcardInSelectList, - - /// The SQL expression CAST has incorrect arity. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseCastArity, - - /// The SQL expression contains an empty SELECT clause. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseEmptySelect, - - /// The expected token in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpected2TokenTypes, - - /// The expected argument delimiter in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedArgumentDelimiter, - - /// The expected date part in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedDatePart, - - /// The expected SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedExpression, - - /// The expected identifier for the alias in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedIdentForAlias, - - /// The expected identifier for AT name in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedIdentForAt, - - /// GROUP is not supported in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedIdentForGroupName, - - /// The expected keyword in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedKeyword, - - /// The expected left parenthesis after CAST in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedLeftParenAfterCast, - - /// The expected left parenthesis in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedLeftParenBuiltinFunctionCall, - - /// The expected left parenthesis in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedLeftParenValueConstructor, - - /// The SQL expression contains an unsupported use of MEMBER. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedMember, - - /// The expected number in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedNumber, - - /// The expected right parenthesis character in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedRightParenBuiltinFunctionCall, - - /// The expected token in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedTokenType, - - /// The expected type name in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedTypeName, - - /// The expected WHEN clause in the SQL expression was not found. CASE is not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseExpectedWhenClause, - - /// The use of * in the SELECT list in the SQL expression is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseInvalidContextForWildcardInSelectList, - - /// The SQL expression contains a path component that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseInvalidPathComponent, - - /// The SQL expression contains a parameter value that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseInvalidTypeParam, - - /// JOIN is not supported in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseMalformedJoin, - - /// The expected identifier after the @ symbol in the SQL expression was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseMissingIdentAfterAt, - - /// Only one argument is supported for aggregate functions in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseNonUnaryAgregateFunctionCall, - - /// The SQL expression contains a missing FROM after the SELECT list. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseSelectMissingFrom, - - /// The SQL expression contains an unexpected keyword. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnExpectedKeyword, - - /// The SQL expression contains an unexpected operator. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnexpectedOperator, - - /// The SQL expression contains an unexpected term. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnexpectedTerm, - - /// The SQL expression contains an unexpected token. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnexpectedToken, - - /// The SQL expression contains an operator that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnknownOperator, - - /// The SQL expression contains an unsupported use of ALIAS. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedAlias, - - /// Only COUNT with (*) as a parameter is supported in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedCallWithStar, - - /// The SQL expression contains an unsupported use of CASE. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedCase, - - /// The SQL expression contains an unsupported use of CASE. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedCaseClause, - - /// The SQL expression contains an unsupported use of GROUP BY. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedLiteralsGroupBy, - - /// The SQL expression contains an unsupported use of SELECT. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedSelect, - - /// The SQL expression contains unsupported syntax. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedSyntax, - - /// The SQL expression contains an unsupported token. - /// - /// HTTP Status Code: 400 Bad Request - /// - ParseUnsupportedToken, - - /// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. - /// - /// HTTP Status Code: 301 Moved Permanently - /// - PermanentRedirect, - - /// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. - /// - /// HTTP Status Code: 301 Moved Permanently - /// - PermanentRedirectControlError, - - /// At least one of the preconditions you specified did not hold. - /// - /// HTTP Status Code: 412 Precondition Failed - /// - PreconditionFailed, - - /// Temporary redirect. - /// - /// HTTP Status Code: 307 Moved Temporarily - /// - Redirect, - - /// There is no replication configuration for this bucket. - /// - /// HTTP Status Code: 404 Not Found - /// - ReplicationConfigurationNotFoundError, - - /// The request header and query parameters used to make the request exceed the maximum allowed size. - /// - /// HTTP Status Code: 400 Bad Request - /// - RequestHeaderSectionTooLarge, - - /// Bucket POST must be of the enclosure-type multipart/form-data. - /// - /// HTTP Status Code: 400 Bad Request - /// - RequestIsNotMultiPartContent, - - /// The difference between the request time and the server's time is too large. - /// - /// HTTP Status Code: 403 Forbidden - /// - RequestTimeTooSkewed, - - /// Your socket connection to the server was not read from or written to within the timeout period. - /// - /// HTTP Status Code: 400 Bad Request - /// - RequestTimeout, - - /// Requesting the torrent file of a bucket is not permitted. - /// - /// HTTP Status Code: 400 Bad Request - /// - RequestTorrentOfBucketError, - - /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. - /// - /// HTTP Status Code: 400 Bad Request - /// - ResponseInterrupted, - - /// Object restore is already in progress. - /// - /// HTTP Status Code: 409 Conflict - /// - RestoreAlreadyInProgress, - - /// The server-side encryption configuration was not found. - /// - /// HTTP Status Code: 400 Bad Request - /// - ServerSideEncryptionConfigurationNotFoundError, - - /// Service is unable to handle request. - /// - /// HTTP Status Code: 503 Service Unavailable - /// - ServiceUnavailable, - - /// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details. - /// - /// HTTP Status Code: 403 Forbidden - /// - SignatureDoesNotMatch, - - /// Reduce your request rate. - /// - /// HTTP Status Code: 503 Slow Down - /// - SlowDown, - - /// The tag policy does not allow the specified value for the following tag key. - /// - /// HTTP Status Code: 400 Bad Request - /// - TagPolicyException, - - /// You are being redirected to the bucket while DNS updates. - /// - /// HTTP Status Code: 307 Moved Temporarily - /// - TemporaryRedirect, - - /// The serial number and/or token code you provided is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - TokenCodeInvalidError, - - /// The provided token must be refreshed. - /// - /// HTTP Status Code: 400 Bad Request - /// - TokenRefreshRequired, - - /// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyAccessPoints, - - /// You have attempted to create more buckets than allowed. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyBuckets, - - /// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyMultiRegionAccessPointregionsError, - - /// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyMultiRegionAccessPoints, - - /// The number of tags exceeds the limit of 50 tags. - /// - /// HTTP Status Code: 400 Bad Request - /// - TooManyTags, - - /// Object decompression failed. Check that the object is properly compressed using the format specified in the request. - /// - /// HTTP Status Code: 400 Bad Request - /// - TruncatedInput, - - /// You are not authorized to perform this operation. - /// - /// HTTP Status Code: 401 Unauthorized - /// - UnauthorizedAccess, - - /// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal. - /// - /// HTTP Status Code: 403 Forbidden - /// - UnauthorizedAccessError, - - /// This request does not support content. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnexpectedContent, - - /// Applicable in China Regions only. This request was rejected because the IP was unexpected. - /// - /// HTTP Status Code: 403 Forbidden - /// - UnexpectedIPError, - - /// We encountered a record type that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnrecognizedFormatException, - - /// The email address you provided does not match any account on record. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnresolvableGrantByEmailAddress, - - /// The request contained an unsupported argument. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedArgument, - - /// We encountered an unsupported SQL function. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedFunction, - - /// The specified Parquet type is not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedParquetType, - - /// A range header is not supported for this operation. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedRangeHeader, - - /// Scan range queries are not supported on this type of object. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedScanRangeInput, - - /// The provided request is signed with an unsupported STS Token version or the signature version is not supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedSignature, - - /// We encountered an unsupported SQL operation. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedSqlOperation, - - /// We encountered an unsupported SQL structure. Check the SQL Reference. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedSqlStructure, - - /// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedStorageClass, - - /// We encountered syntax that is not valid. - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedSyntax, - - /// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0). - /// - /// HTTP Status Code: 400 Bad Request - /// - UnsupportedTypeForQuerying, - - /// The bucket POST must contain the specified field name. If it is specified, check the order of the fields. - /// - /// HTTP Status Code: 400 Bad Request - /// - UserKeyMustBeSpecified, - - /// A timestamp parse failure occurred in the SQL expression. - /// - /// HTTP Status Code: 400 Bad Request - /// - ValueParseFailure, - - Custom(ByteString), +/// The bucket does not allow ACLs. +/// +/// HTTP Status Code: 400 Bad Request +/// +AccessControlListNotSupported, + +/// Access Denied +/// +/// HTTP Status Code: 403 Forbidden +/// +AccessDenied, + +/// An access point with an identical name already exists in your account. +/// +/// HTTP Status Code: 409 Conflict +/// +AccessPointAlreadyOwnedByYou, + +/// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance. +/// +/// HTTP Status Code: 403 Forbidden +/// +AccountProblem, + +/// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance. +/// +/// HTTP Status Code: 403 Forbidden +/// +AllAccessDisabled, + +/// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +AmbiguousFieldName, + +/// The email address you provided is associated with more than one account. +/// +/// HTTP Status Code: 400 Bad Request +/// +AmbiguousGrantByEmailAddress, + +/// The authorization header you provided is invalid. +/// +/// HTTP Status Code: 400 Bad Request +/// +AuthorizationHeaderMalformed, + +/// The authorization query parameters that you provided are not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +AuthorizationQueryParametersError, + +/// The Content-MD5 you specified did not match what we received. +/// +/// HTTP Status Code: 400 Bad Request +/// +BadDigest, + +/// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. +/// +/// HTTP Status Code: 409 Conflict +/// +BucketAlreadyExists, + +/// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). +/// +/// HTTP Status Code: 409 Conflict +/// +BucketAlreadyOwnedByYou, + +/// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket. +/// +/// HTTP Status Code: 400 Bad Request +/// +BucketHasAccessPointsAttached, + +/// The bucket you tried to delete is not empty. +/// +/// HTTP Status Code: 409 Conflict +/// +BucketNotEmpty, + +/// The service is unavailable. Try again later. +/// +/// HTTP Status Code: 503 Service Unavailable +/// +Busy, + +/// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. +/// +/// HTTP Status Code: 400 Bad Request +/// +CSVEscapingRecordDelimiter, + +/// An error occurred while parsing the CSV file. Check the file and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +CSVParsingError, + +/// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. +/// +/// HTTP Status Code: 400 Bad Request +/// +CSVUnescapedQuote, + +/// An attempt to convert from one data type to another using CAST failed in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +CastFailed, + +/// Your Multi-Region Access Point idempotency token was already used for a different request. +/// +/// HTTP Status Code: 409 Conflict +/// +ClientTokenConflict, + +/// The length of a column in the result is greater than maxCharsPerColumn of 1 MB. +/// +/// HTTP Status Code: 400 Bad Request +/// +ColumnTooLong, + +/// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part. +/// +/// HTTP Status Code: 409 Conflict +/// +ConditionalRequestConflict, + +/// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. +/// +/// HTTP Status Code: 400 Bad Request +/// +ConnectionClosedByRequester, + +/// This request does not support credentials. +/// +/// HTTP Status Code: 400 Bad Request +/// +CredentialsNotSupported, + +/// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. +/// +/// HTTP Status Code: 403 Forbidden +/// +CrossLocationLoggingProhibited, + +/// The device is not currently active. +/// +/// HTTP Status Code: 400 Bad Request +/// +DeviceNotActiveError, + +/// The request body cannot be empty. +/// +/// HTTP Status Code: 400 Bad Request +/// +EmptyRequestBody, + +/// Direct requests to the correct endpoint. +/// +/// HTTP Status Code: 400 Bad Request +/// +EndpointNotFound, + +/// Your proposed upload exceeds the maximum allowed object size. +/// +/// HTTP Status Code: 400 Bad Request +/// +EntityTooLarge, + +/// Your proposed upload is smaller than the minimum allowed object size. +/// +/// HTTP Status Code: 400 Bad Request +/// +EntityTooSmall, + +/// A column name or a path provided does not exist in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorBindingDoesNotExist, + +/// There is an incorrect number of arguments in the function call in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidArguments, + +/// The timestamp format string in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidTimestampFormatPattern, + +/// The timestamp format pattern contains a symbol in the SQL expression that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidTimestampFormatPatternSymbol, + +/// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidTimestampFormatPatternSymbolForParsing, + +/// The timestamp format pattern contains a token in the SQL expression that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorInvalidTimestampFormatPatternToken, + +/// An argument given to the LIKE expression was not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorLikePatternInvalidEscapeSequence, + +/// LIMIT must not be negative. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorNegativeLimit, + +/// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorTimestampFormatPatternDuplicateFields, + +/// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorTimestampFormatPatternHourClockAmPmMismatch, + +/// The timestamp format pattern contains an unterminated token in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +EvaluatorUnterminatedTimestampFormatPatternToken, + +/// The provided token has expired. +/// +/// HTTP Status Code: 400 Bad Request +/// +ExpiredToken, + +/// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB. +/// +/// HTTP Status Code: 400 Bad Request +/// +ExpressionTooLong, + +/// The query cannot be evaluated. Check the file and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +ExternalEvalException, + +/// This error might occur for the following reasons: +/// +/// +/// You are trying to access a bucket from a different Region than where the bucket exists. +/// +/// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to. +/// +/// HTTP Status Code: 400 Bad Request +/// +IllegalLocationConstraintException, + +/// An illegal argument was used in the SQL function. +/// +/// HTTP Status Code: 400 Bad Request +/// +IllegalSqlFunctionArgument, + +/// Indicates that the versioning configuration specified in the request is invalid. +/// +/// HTTP Status Code: 400 Bad Request +/// +IllegalVersioningConfigurationException, + +/// You did not provide the number of bytes specified by the Content-Length HTTP header +/// +/// HTTP Status Code: 400 Bad Request +/// +IncompleteBody, + +/// The specified bucket exists in another Region. Direct requests to the correct endpoint. +/// +/// HTTP Status Code: 400 Bad Request +/// +IncorrectEndpoint, + +/// POST requires exactly one file upload per request. +/// +/// HTTP Status Code: 400 Bad Request +/// +IncorrectNumberOfFilesInPostRequest, + +/// An incorrect argument type was specified in a function call in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +IncorrectSqlFunctionArgumentType, + +/// Inline data exceeds the maximum allowed size. +/// +/// HTTP Status Code: 400 Bad Request +/// +InlineDataTooLarge, + +/// An integer overflow or underflow occurred in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +IntegerOverflow, + +/// We encountered an internal error. Please try again. +/// +/// HTTP Status Code: 500 Internal Server Error +/// +InternalError, + +/// The Amazon Web Services access key ID you provided does not exist in our records. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidAccessKeyId, + +/// The specified access point name or account is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidAccessPoint, + +/// The specified access point alias name is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidAccessPointAliasError, + +/// You must specify the Anonymous role. +/// +InvalidAddressingHeader, + +/// Invalid Argument +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidArgument, + +/// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidBucketAclWithObjectOwnership, + +/// The specified bucket is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidBucketName, + +/// The value of the expected bucket owner parameter must be an AWS account ID. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidBucketOwnerAWSAccountID, + +/// The request is not valid with the current state of the bucket. +/// +/// HTTP Status Code: 409 Conflict +/// +InvalidBucketState, + +/// An attempt to convert from one data type to another using CAST failed in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidCast, + +/// The column index in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidColumnIndex, + +/// The file is not in a supported compression format. Only GZIP and BZIP2 are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidCompressionFormat, + +/// The data source type is not valid. Only CSV, JSON, and Parquet are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidDataSource, + +/// The SQL expression contains a data type that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidDataType, + +/// The Content-MD5 you specified is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidDigest, + +/// The encryption request you specified is not valid. The valid value is AES256. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidEncryptionAlgorithmError, + +/// The ExpressionType value is not valid. Only SQL expressions are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidExpressionType, + +/// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidFileHeaderInfo, + +/// The host headers provided in the request used the incorrect style addressing. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidHostHeader, + +/// The request is made using an unexpected HTTP method. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidHttpMethod, + +/// The JsonType value is not valid. Only DOCUMENT and LINES are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidJsonType, + +/// The key path in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidKeyPath, + +/// The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidLocationConstraint, + +/// The action is not valid for the current state of the object. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidObjectState, + +/// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidPart, + +/// The list of parts was not in ascending order. Parts list must be specified in order by part number. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidPartOrder, + +/// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidPayer, + +/// The content of the form does not meet the conditions specified in the policy document. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidPolicyDocument, + +/// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidQuoteFields, + +/// The requested range cannot be satisfied. +/// +/// HTTP Status Code: 416 Requested Range NotSatisfiable +/// +InvalidRange, + +/// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidRegion, + +/// + Please use AWS4-HMAC-SHA256. +/// + SOAP requests must be made over an HTTPS connection. +/// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names. +/// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names. +/// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests. +/// + Amazon S3 Transfer Accelerate is not configured on this bucket. +/// + Amazon S3 Transfer Accelerate is disabled on this bucket. +/// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information. +/// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information. +/// +/// HTTP Status Code: 400 Bad Request +InvalidRequest, + +/// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidRequestParameter, + +/// The SOAP request body is invalid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidSOAPRequest, + +/// The provided scan range is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidScanRange, + +/// The provided security credentials are not valid. +/// +/// HTTP Status Code: 403 Forbidden +/// +InvalidSecurity, + +/// Returned if the session doesn't exist anymore because it timed out or expired. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidSessionException, + +/// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidSignature, + +/// The storage class you specified is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidStorageClass, + +/// The SQL expression contains a table alias that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidTableAlias, + +/// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidTag, + +/// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidTargetBucketForLogging, + +/// The encoding type is not valid. Only UTF-8 encoding is supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidTextEncoding, + +/// The provided token is malformed or otherwise invalid. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidToken, + +/// Couldn't parse the specified URI. +/// +/// HTTP Status Code: 400 Bad Request +/// +InvalidURI, + +/// An error occurred while parsing the JSON file. Check the file and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +JSONParsingError, + +/// Your key is too long. +/// +/// HTTP Status Code: 400 Bad Request +/// +KeyTooLongError, + +/// The SQL expression contains a character that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LexerInvalidChar, + +/// The SQL expression contains an operator that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LexerInvalidIONLiteral, + +/// The SQL expression contains an operator that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LexerInvalidLiteral, + +/// The SQL expression contains a literal that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LexerInvalidOperator, + +/// The argument given to the LIKE clause in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +LikeInvalidInputs, + +/// The XML you provided was not well-formed or did not validate against our published schema. +/// +/// HTTP Status Code: 400 Bad Request +/// +MalformedACLError, + +/// The body of your POST request is not well-formed multipart/form-data. +/// +/// HTTP Status Code: 400 Bad Request +/// +MalformedPOSTRequest, + +/// Your policy contains a principal that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +MalformedPolicy, + +/// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." +/// +/// HTTP Status Code: 400 Bad Request +/// +MalformedXML, + +/// Your request was too big. +/// +/// HTTP Status Code: 400 Bad Request +/// +MaxMessageLengthExceeded, + +/// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used. +/// +/// HTTP Status Code: 400 Bad Request +/// +MaxOperatorsExceeded, + +/// Your POST request fields preceding the upload file were too large. +/// +/// HTTP Status Code: 400 Bad Request +/// +MaxPostPreDataLengthExceededError, + +/// Your metadata headers exceed the maximum allowed metadata size. +/// +/// HTTP Status Code: 400 Bad Request +/// +MetadataTooLarge, + +/// The specified method is not allowed against this resource. +/// +/// HTTP Status Code: 405 Method Not Allowed +/// +MethodNotAllowed, + +/// A SOAP attachment was expected, but none were found. +/// +MissingAttachment, + +/// The request was not signed. +/// +/// HTTP Status Code: 403 Forbidden +/// +MissingAuthenticationToken, + +/// You must provide the Content-Length HTTP header. +/// +/// HTTP Status Code: 411 Length Required +/// +MissingContentLength, + +/// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty." +/// +/// HTTP Status Code: 400 Bad Request +/// +MissingRequestBodyError, + +/// The SelectRequest entity is missing a required parameter. Check the service documentation and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +MissingRequiredParameter, + +/// The SOAP 1.1 request is missing a security element. +/// +/// HTTP Status Code: 400 Bad Request +/// +MissingSecurityElement, + +/// Your request is missing a required header. +/// +/// HTTP Status Code: 400 Bad Request +/// +MissingSecurityHeader, + +/// Multiple data sources are not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +MultipleDataSourcesUnsupported, + +/// There is no such thing as a logging status subresource for a key. +/// +/// HTTP Status Code: 400 Bad Request +/// +NoLoggingStatusForKey, + +/// The specified access point does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchAccessPoint, + +/// The specified request was not found. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchAsyncRequest, + +/// The specified bucket does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchBucket, + +/// The specified bucket does not have a bucket policy. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchBucketPolicy, + +/// The specified bucket does not have a CORS configuration. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchCORSConfiguration, + +/// The specified key does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchKey, + +/// The lifecycle configuration does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchLifecycleConfiguration, + +/// The specified Multi-Region Access Point does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchMultiRegionAccessPoint, + +/// The specified object does not have an ObjectLock configuration. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchObjectLockConfiguration, + +/// The specified resource doesn't exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchResource, + +/// The specified tag does not exist. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchTagSet, + +/// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchUpload, + +/// Indicates that the version ID specified in the request does not match an existing version. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchVersion, + +/// The specified bucket does not have a website configuration. +/// +/// HTTP Status Code: 404 Not Found +/// +NoSuchWebsiteConfiguration, + +/// No transformation found for this Object Lambda Access Point. +/// +/// HTTP Status Code: 404 Not Found +/// +NoTransformationDefined, + +/// The device that generated the token is not owned by the authenticated user. +/// +/// HTTP Status Code: 400 Bad Request +/// +NotDeviceOwnerError, + +/// A header you provided implies functionality that is not implemented. +/// +/// HTTP Status Code: 501 Not Implemented +/// +NotImplemented, + +/// The resource was not changed. +/// +/// HTTP Status Code: 304 Not Modified +/// +NotModified, + +/// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 +/// +/// HTTP Status Code: 403 Forbidden +/// +NotSignedUp, + +/// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers. +/// +/// HTTP Status Code: 400 Bad Request +/// +NumberFormatError, + +/// The Object Lock configuration does not exist for this bucket. +/// +/// HTTP Status Code: 404 Not Found +/// +ObjectLockConfigurationNotFoundError, + +/// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each. +/// +/// HTTP Status Code: 400 Bad Request +/// +ObjectSerializationConflict, + +/// A conflicting conditional action is currently in progress against this resource. Try again. +/// +/// HTTP Status Code: 409 Conflict +/// +OperationAborted, + +/// The number of columns in the result is greater than the maximum allowable number of columns. +/// +/// HTTP Status Code: 400 Bad Request +/// +OverMaxColumn, + +/// The Parquet file is above the max row group size. +/// +/// HTTP Status Code: 400 Bad Request +/// +OverMaxParquetBlockSize, + +/// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB. +/// +/// HTTP Status Code: 400 Bad Request +/// +OverMaxRecordSize, + +/// The bucket ownership controls were not found. +/// +/// HTTP Status Code: 404 Not Found +/// +OwnershipControlsNotFoundError, + +/// An error occurred while parsing the Parquet file. Check the file and try again. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParquetParsingError, + +/// The specified Parquet compression codec is not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParquetUnsupportedCompressionCodec, + +/// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseAsteriskIsNotAloneInSelectList, + +/// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseCannotMixSqbAndWildcardInSelectList, + +/// The SQL expression CAST has incorrect arity. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseCastArity, + +/// The SQL expression contains an empty SELECT clause. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseEmptySelect, + +/// The expected token in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpected2TokenTypes, + +/// The expected argument delimiter in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedArgumentDelimiter, + +/// The expected date part in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedDatePart, + +/// The expected SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedExpression, + +/// The expected identifier for the alias in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedIdentForAlias, + +/// The expected identifier for AT name in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedIdentForAt, + +/// GROUP is not supported in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedIdentForGroupName, + +/// The expected keyword in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedKeyword, + +/// The expected left parenthesis after CAST in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedLeftParenAfterCast, + +/// The expected left parenthesis in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedLeftParenBuiltinFunctionCall, + +/// The expected left parenthesis in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedLeftParenValueConstructor, + +/// The SQL expression contains an unsupported use of MEMBER. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedMember, + +/// The expected number in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedNumber, + +/// The expected right parenthesis character in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedRightParenBuiltinFunctionCall, + +/// The expected token in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedTokenType, + +/// The expected type name in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedTypeName, + +/// The expected WHEN clause in the SQL expression was not found. CASE is not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseExpectedWhenClause, + +/// The use of * in the SELECT list in the SQL expression is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseInvalidContextForWildcardInSelectList, + +/// The SQL expression contains a path component that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseInvalidPathComponent, + +/// The SQL expression contains a parameter value that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseInvalidTypeParam, + +/// JOIN is not supported in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseMalformedJoin, + +/// The expected identifier after the @ symbol in the SQL expression was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseMissingIdentAfterAt, + +/// Only one argument is supported for aggregate functions in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseNonUnaryAgregateFunctionCall, + +/// The SQL expression contains a missing FROM after the SELECT list. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseSelectMissingFrom, + +/// The SQL expression contains an unexpected keyword. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnExpectedKeyword, + +/// The SQL expression contains an unexpected operator. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnexpectedOperator, + +/// The SQL expression contains an unexpected term. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnexpectedTerm, + +/// The SQL expression contains an unexpected token. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnexpectedToken, + +/// The SQL expression contains an operator that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnknownOperator, + +/// The SQL expression contains an unsupported use of ALIAS. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedAlias, + +/// Only COUNT with (*) as a parameter is supported in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedCallWithStar, + +/// The SQL expression contains an unsupported use of CASE. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedCase, + +/// The SQL expression contains an unsupported use of CASE. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedCaseClause, + +/// The SQL expression contains an unsupported use of GROUP BY. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedLiteralsGroupBy, + +/// The SQL expression contains an unsupported use of SELECT. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedSelect, + +/// The SQL expression contains unsupported syntax. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedSyntax, + +/// The SQL expression contains an unsupported token. +/// +/// HTTP Status Code: 400 Bad Request +/// +ParseUnsupportedToken, + +/// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. +/// +/// HTTP Status Code: 301 Moved Permanently +/// +PermanentRedirect, + +/// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. +/// +/// HTTP Status Code: 301 Moved Permanently +/// +PermanentRedirectControlError, + +/// At least one of the preconditions you specified did not hold. +/// +/// HTTP Status Code: 412 Precondition Failed +/// +PreconditionFailed, + +/// Temporary redirect. +/// +/// HTTP Status Code: 307 Moved Temporarily +/// +Redirect, + +/// There is no replication configuration for this bucket. +/// +/// HTTP Status Code: 404 Not Found +/// +ReplicationConfigurationNotFoundError, + +/// The request header and query parameters used to make the request exceed the maximum allowed size. +/// +/// HTTP Status Code: 400 Bad Request +/// +RequestHeaderSectionTooLarge, + +/// Bucket POST must be of the enclosure-type multipart/form-data. +/// +/// HTTP Status Code: 400 Bad Request +/// +RequestIsNotMultiPartContent, + +/// The difference between the request time and the server's time is too large. +/// +/// HTTP Status Code: 403 Forbidden +/// +RequestTimeTooSkewed, + +/// Your socket connection to the server was not read from or written to within the timeout period. +/// +/// HTTP Status Code: 400 Bad Request +/// +RequestTimeout, + +/// Requesting the torrent file of a bucket is not permitted. +/// +/// HTTP Status Code: 400 Bad Request +/// +RequestTorrentOfBucketError, + +/// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. +/// +/// HTTP Status Code: 400 Bad Request +/// +ResponseInterrupted, + +/// Object restore is already in progress. +/// +/// HTTP Status Code: 409 Conflict +/// +RestoreAlreadyInProgress, + +/// The server-side encryption configuration was not found. +/// +/// HTTP Status Code: 400 Bad Request +/// +ServerSideEncryptionConfigurationNotFoundError, + +/// Service is unable to handle request. +/// +/// HTTP Status Code: 503 Service Unavailable +/// +ServiceUnavailable, + +/// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details. +/// +/// HTTP Status Code: 403 Forbidden +/// +SignatureDoesNotMatch, + +/// Reduce your request rate. +/// +/// HTTP Status Code: 503 Slow Down +/// +SlowDown, + +/// The tag policy does not allow the specified value for the following tag key. +/// +/// HTTP Status Code: 400 Bad Request +/// +TagPolicyException, + +/// You are being redirected to the bucket while DNS updates. +/// +/// HTTP Status Code: 307 Moved Temporarily +/// +TemporaryRedirect, + +/// The serial number and/or token code you provided is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +TokenCodeInvalidError, + +/// The provided token must be refreshed. +/// +/// HTTP Status Code: 400 Bad Request +/// +TokenRefreshRequired, + +/// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyAccessPoints, + +/// You have attempted to create more buckets than allowed. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyBuckets, + +/// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyMultiRegionAccessPointregionsError, + +/// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyMultiRegionAccessPoints, + +/// The number of tags exceeds the limit of 50 tags. +/// +/// HTTP Status Code: 400 Bad Request +/// +TooManyTags, + +/// Object decompression failed. Check that the object is properly compressed using the format specified in the request. +/// +/// HTTP Status Code: 400 Bad Request +/// +TruncatedInput, + +/// You are not authorized to perform this operation. +/// +/// HTTP Status Code: 401 Unauthorized +/// +UnauthorizedAccess, + +/// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal. +/// +/// HTTP Status Code: 403 Forbidden +/// +UnauthorizedAccessError, + +/// This request does not support content. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnexpectedContent, + +/// Applicable in China Regions only. This request was rejected because the IP was unexpected. +/// +/// HTTP Status Code: 403 Forbidden +/// +UnexpectedIPError, + +/// We encountered a record type that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnrecognizedFormatException, + +/// The email address you provided does not match any account on record. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnresolvableGrantByEmailAddress, + +/// The request contained an unsupported argument. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedArgument, + +/// We encountered an unsupported SQL function. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedFunction, + +/// The specified Parquet type is not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedParquetType, + +/// A range header is not supported for this operation. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedRangeHeader, + +/// Scan range queries are not supported on this type of object. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedScanRangeInput, + +/// The provided request is signed with an unsupported STS Token version or the signature version is not supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedSignature, + +/// We encountered an unsupported SQL operation. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedSqlOperation, + +/// We encountered an unsupported SQL structure. Check the SQL Reference. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedSqlStructure, + +/// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedStorageClass, + +/// We encountered syntax that is not valid. +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedSyntax, + +/// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0). +/// +/// HTTP Status Code: 400 Bad Request +/// +UnsupportedTypeForQuerying, + +/// The bucket POST must contain the specified field name. If it is specified, check the order of the fields. +/// +/// HTTP Status Code: 400 Bad Request +/// +UserKeyMustBeSpecified, + +/// A timestamp parse failure occurred in the SQL expression. +/// +/// HTTP Status Code: 400 Bad Request +/// +ValueParseFailure, + +Custom(ByteString), } impl S3ErrorCode { - const STATIC_CODE_LIST: &'static [&'static str] = &[ - "AccessControlListNotSupported", - "AccessDenied", - "AccessPointAlreadyOwnedByYou", - "AccountProblem", - "AllAccessDisabled", - "AmbiguousFieldName", - "AmbiguousGrantByEmailAddress", - "AuthorizationHeaderMalformed", - "AuthorizationQueryParametersError", - "BadDigest", - "BucketAlreadyExists", - "BucketAlreadyOwnedByYou", - "BucketHasAccessPointsAttached", - "BucketNotEmpty", - "Busy", - "CSVEscapingRecordDelimiter", - "CSVParsingError", - "CSVUnescapedQuote", - "CastFailed", - "ClientTokenConflict", - "ColumnTooLong", - "ConditionalRequestConflict", - "ConnectionClosedByRequester", - "CredentialsNotSupported", - "CrossLocationLoggingProhibited", - "DeviceNotActiveError", - "EmptyRequestBody", - "EndpointNotFound", - "EntityTooLarge", - "EntityTooSmall", - "EvaluatorBindingDoesNotExist", - "EvaluatorInvalidArguments", - "EvaluatorInvalidTimestampFormatPattern", - "EvaluatorInvalidTimestampFormatPatternSymbol", - "EvaluatorInvalidTimestampFormatPatternSymbolForParsing", - "EvaluatorInvalidTimestampFormatPatternToken", - "EvaluatorLikePatternInvalidEscapeSequence", - "EvaluatorNegativeLimit", - "EvaluatorTimestampFormatPatternDuplicateFields", - "EvaluatorTimestampFormatPatternHourClockAmPmMismatch", - "EvaluatorUnterminatedTimestampFormatPatternToken", - "ExpiredToken", - "ExpressionTooLong", - "ExternalEvalException", - "IllegalLocationConstraintException", - "IllegalSqlFunctionArgument", - "IllegalVersioningConfigurationException", - "IncompleteBody", - "IncorrectEndpoint", - "IncorrectNumberOfFilesInPostRequest", - "IncorrectSqlFunctionArgumentType", - "InlineDataTooLarge", - "IntegerOverflow", - "InternalError", - "InvalidAccessKeyId", - "InvalidAccessPoint", - "InvalidAccessPointAliasError", - "InvalidAddressingHeader", - "InvalidArgument", - "InvalidBucketAclWithObjectOwnership", - "InvalidBucketName", - "InvalidBucketOwnerAWSAccountID", - "InvalidBucketState", - "InvalidCast", - "InvalidColumnIndex", - "InvalidCompressionFormat", - "InvalidDataSource", - "InvalidDataType", - "InvalidDigest", - "InvalidEncryptionAlgorithmError", - "InvalidExpressionType", - "InvalidFileHeaderInfo", - "InvalidHostHeader", - "InvalidHttpMethod", - "InvalidJsonType", - "InvalidKeyPath", - "InvalidLocationConstraint", - "InvalidObjectState", - "InvalidPart", - "InvalidPartOrder", - "InvalidPayer", - "InvalidPolicyDocument", - "InvalidQuoteFields", - "InvalidRange", - "InvalidRegion", - "InvalidRequest", - "InvalidRequestParameter", - "InvalidSOAPRequest", - "InvalidScanRange", - "InvalidSecurity", - "InvalidSessionException", - "InvalidSignature", - "InvalidStorageClass", - "InvalidTableAlias", - "InvalidTag", - "InvalidTargetBucketForLogging", - "InvalidTextEncoding", - "InvalidToken", - "InvalidURI", - "JSONParsingError", - "KeyTooLongError", - "LexerInvalidChar", - "LexerInvalidIONLiteral", - "LexerInvalidLiteral", - "LexerInvalidOperator", - "LikeInvalidInputs", - "MalformedACLError", - "MalformedPOSTRequest", - "MalformedPolicy", - "MalformedXML", - "MaxMessageLengthExceeded", - "MaxOperatorsExceeded", - "MaxPostPreDataLengthExceededError", - "MetadataTooLarge", - "MethodNotAllowed", - "MissingAttachment", - "MissingAuthenticationToken", - "MissingContentLength", - "MissingRequestBodyError", - "MissingRequiredParameter", - "MissingSecurityElement", - "MissingSecurityHeader", - "MultipleDataSourcesUnsupported", - "NoLoggingStatusForKey", - "NoSuchAccessPoint", - "NoSuchAsyncRequest", - "NoSuchBucket", - "NoSuchBucketPolicy", - "NoSuchCORSConfiguration", - "NoSuchKey", - "NoSuchLifecycleConfiguration", - "NoSuchMultiRegionAccessPoint", - "NoSuchObjectLockConfiguration", - "NoSuchResource", - "NoSuchTagSet", - "NoSuchUpload", - "NoSuchVersion", - "NoSuchWebsiteConfiguration", - "NoTransformationDefined", - "NotDeviceOwnerError", - "NotImplemented", - "NotModified", - "NotSignedUp", - "NumberFormatError", - "ObjectLockConfigurationNotFoundError", - "ObjectSerializationConflict", - "OperationAborted", - "OverMaxColumn", - "OverMaxParquetBlockSize", - "OverMaxRecordSize", - "OwnershipControlsNotFoundError", - "ParquetParsingError", - "ParquetUnsupportedCompressionCodec", - "ParseAsteriskIsNotAloneInSelectList", - "ParseCannotMixSqbAndWildcardInSelectList", - "ParseCastArity", - "ParseEmptySelect", - "ParseExpected2TokenTypes", - "ParseExpectedArgumentDelimiter", - "ParseExpectedDatePart", - "ParseExpectedExpression", - "ParseExpectedIdentForAlias", - "ParseExpectedIdentForAt", - "ParseExpectedIdentForGroupName", - "ParseExpectedKeyword", - "ParseExpectedLeftParenAfterCast", - "ParseExpectedLeftParenBuiltinFunctionCall", - "ParseExpectedLeftParenValueConstructor", - "ParseExpectedMember", - "ParseExpectedNumber", - "ParseExpectedRightParenBuiltinFunctionCall", - "ParseExpectedTokenType", - "ParseExpectedTypeName", - "ParseExpectedWhenClause", - "ParseInvalidContextForWildcardInSelectList", - "ParseInvalidPathComponent", - "ParseInvalidTypeParam", - "ParseMalformedJoin", - "ParseMissingIdentAfterAt", - "ParseNonUnaryAgregateFunctionCall", - "ParseSelectMissingFrom", - "ParseUnExpectedKeyword", - "ParseUnexpectedOperator", - "ParseUnexpectedTerm", - "ParseUnexpectedToken", - "ParseUnknownOperator", - "ParseUnsupportedAlias", - "ParseUnsupportedCallWithStar", - "ParseUnsupportedCase", - "ParseUnsupportedCaseClause", - "ParseUnsupportedLiteralsGroupBy", - "ParseUnsupportedSelect", - "ParseUnsupportedSyntax", - "ParseUnsupportedToken", - "PermanentRedirect", - "PermanentRedirectControlError", - "PreconditionFailed", - "Redirect", - "ReplicationConfigurationNotFoundError", - "RequestHeaderSectionTooLarge", - "RequestIsNotMultiPartContent", - "RequestTimeTooSkewed", - "RequestTimeout", - "RequestTorrentOfBucketError", - "ResponseInterrupted", - "RestoreAlreadyInProgress", - "ServerSideEncryptionConfigurationNotFoundError", - "ServiceUnavailable", - "SignatureDoesNotMatch", - "SlowDown", - "TagPolicyException", - "TemporaryRedirect", - "TokenCodeInvalidError", - "TokenRefreshRequired", - "TooManyAccessPoints", - "TooManyBuckets", - "TooManyMultiRegionAccessPointregionsError", - "TooManyMultiRegionAccessPoints", - "TooManyTags", - "TruncatedInput", - "UnauthorizedAccess", - "UnauthorizedAccessError", - "UnexpectedContent", - "UnexpectedIPError", - "UnrecognizedFormatException", - "UnresolvableGrantByEmailAddress", - "UnsupportedArgument", - "UnsupportedFunction", - "UnsupportedParquetType", - "UnsupportedRangeHeader", - "UnsupportedScanRangeInput", - "UnsupportedSignature", - "UnsupportedSqlOperation", - "UnsupportedSqlStructure", - "UnsupportedStorageClass", - "UnsupportedSyntax", - "UnsupportedTypeForQuerying", - "UserKeyMustBeSpecified", - "ValueParseFailure", - ]; - - #[must_use] - fn as_enum_tag(&self) -> usize { - match self { - Self::AccessControlListNotSupported => 0, - Self::AccessDenied => 1, - Self::AccessPointAlreadyOwnedByYou => 2, - Self::AccountProblem => 3, - Self::AllAccessDisabled => 4, - Self::AmbiguousFieldName => 5, - Self::AmbiguousGrantByEmailAddress => 6, - Self::AuthorizationHeaderMalformed => 7, - Self::AuthorizationQueryParametersError => 8, - Self::BadDigest => 9, - Self::BucketAlreadyExists => 10, - Self::BucketAlreadyOwnedByYou => 11, - Self::BucketHasAccessPointsAttached => 12, - Self::BucketNotEmpty => 13, - Self::Busy => 14, - Self::CSVEscapingRecordDelimiter => 15, - Self::CSVParsingError => 16, - Self::CSVUnescapedQuote => 17, - Self::CastFailed => 18, - Self::ClientTokenConflict => 19, - Self::ColumnTooLong => 20, - Self::ConditionalRequestConflict => 21, - Self::ConnectionClosedByRequester => 22, - Self::CredentialsNotSupported => 23, - Self::CrossLocationLoggingProhibited => 24, - Self::DeviceNotActiveError => 25, - Self::EmptyRequestBody => 26, - Self::EndpointNotFound => 27, - Self::EntityTooLarge => 28, - Self::EntityTooSmall => 29, - Self::EvaluatorBindingDoesNotExist => 30, - Self::EvaluatorInvalidArguments => 31, - Self::EvaluatorInvalidTimestampFormatPattern => 32, - Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33, - Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34, - Self::EvaluatorInvalidTimestampFormatPatternToken => 35, - Self::EvaluatorLikePatternInvalidEscapeSequence => 36, - Self::EvaluatorNegativeLimit => 37, - Self::EvaluatorTimestampFormatPatternDuplicateFields => 38, - Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39, - Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40, - Self::ExpiredToken => 41, - Self::ExpressionTooLong => 42, - Self::ExternalEvalException => 43, - Self::IllegalLocationConstraintException => 44, - Self::IllegalSqlFunctionArgument => 45, - Self::IllegalVersioningConfigurationException => 46, - Self::IncompleteBody => 47, - Self::IncorrectEndpoint => 48, - Self::IncorrectNumberOfFilesInPostRequest => 49, - Self::IncorrectSqlFunctionArgumentType => 50, - Self::InlineDataTooLarge => 51, - Self::IntegerOverflow => 52, - Self::InternalError => 53, - Self::InvalidAccessKeyId => 54, - Self::InvalidAccessPoint => 55, - Self::InvalidAccessPointAliasError => 56, - Self::InvalidAddressingHeader => 57, - Self::InvalidArgument => 58, - Self::InvalidBucketAclWithObjectOwnership => 59, - Self::InvalidBucketName => 60, - Self::InvalidBucketOwnerAWSAccountID => 61, - Self::InvalidBucketState => 62, - Self::InvalidCast => 63, - Self::InvalidColumnIndex => 64, - Self::InvalidCompressionFormat => 65, - Self::InvalidDataSource => 66, - Self::InvalidDataType => 67, - Self::InvalidDigest => 68, - Self::InvalidEncryptionAlgorithmError => 69, - Self::InvalidExpressionType => 70, - Self::InvalidFileHeaderInfo => 71, - Self::InvalidHostHeader => 72, - Self::InvalidHttpMethod => 73, - Self::InvalidJsonType => 74, - Self::InvalidKeyPath => 75, - Self::InvalidLocationConstraint => 76, - Self::InvalidObjectState => 77, - Self::InvalidPart => 78, - Self::InvalidPartOrder => 79, - Self::InvalidPayer => 80, - Self::InvalidPolicyDocument => 81, - Self::InvalidQuoteFields => 82, - Self::InvalidRange => 83, - Self::InvalidRegion => 84, - Self::InvalidRequest => 85, - Self::InvalidRequestParameter => 86, - Self::InvalidSOAPRequest => 87, - Self::InvalidScanRange => 88, - Self::InvalidSecurity => 89, - Self::InvalidSessionException => 90, - Self::InvalidSignature => 91, - Self::InvalidStorageClass => 92, - Self::InvalidTableAlias => 93, - Self::InvalidTag => 94, - Self::InvalidTargetBucketForLogging => 95, - Self::InvalidTextEncoding => 96, - Self::InvalidToken => 97, - Self::InvalidURI => 98, - Self::JSONParsingError => 99, - Self::KeyTooLongError => 100, - Self::LexerInvalidChar => 101, - Self::LexerInvalidIONLiteral => 102, - Self::LexerInvalidLiteral => 103, - Self::LexerInvalidOperator => 104, - Self::LikeInvalidInputs => 105, - Self::MalformedACLError => 106, - Self::MalformedPOSTRequest => 107, - Self::MalformedPolicy => 108, - Self::MalformedXML => 109, - Self::MaxMessageLengthExceeded => 110, - Self::MaxOperatorsExceeded => 111, - Self::MaxPostPreDataLengthExceededError => 112, - Self::MetadataTooLarge => 113, - Self::MethodNotAllowed => 114, - Self::MissingAttachment => 115, - Self::MissingAuthenticationToken => 116, - Self::MissingContentLength => 117, - Self::MissingRequestBodyError => 118, - Self::MissingRequiredParameter => 119, - Self::MissingSecurityElement => 120, - Self::MissingSecurityHeader => 121, - Self::MultipleDataSourcesUnsupported => 122, - Self::NoLoggingStatusForKey => 123, - Self::NoSuchAccessPoint => 124, - Self::NoSuchAsyncRequest => 125, - Self::NoSuchBucket => 126, - Self::NoSuchBucketPolicy => 127, - Self::NoSuchCORSConfiguration => 128, - Self::NoSuchKey => 129, - Self::NoSuchLifecycleConfiguration => 130, - Self::NoSuchMultiRegionAccessPoint => 131, - Self::NoSuchObjectLockConfiguration => 132, - Self::NoSuchResource => 133, - Self::NoSuchTagSet => 134, - Self::NoSuchUpload => 135, - Self::NoSuchVersion => 136, - Self::NoSuchWebsiteConfiguration => 137, - Self::NoTransformationDefined => 138, - Self::NotDeviceOwnerError => 139, - Self::NotImplemented => 140, - Self::NotModified => 141, - Self::NotSignedUp => 142, - Self::NumberFormatError => 143, - Self::ObjectLockConfigurationNotFoundError => 144, - Self::ObjectSerializationConflict => 145, - Self::OperationAborted => 146, - Self::OverMaxColumn => 147, - Self::OverMaxParquetBlockSize => 148, - Self::OverMaxRecordSize => 149, - Self::OwnershipControlsNotFoundError => 150, - Self::ParquetParsingError => 151, - Self::ParquetUnsupportedCompressionCodec => 152, - Self::ParseAsteriskIsNotAloneInSelectList => 153, - Self::ParseCannotMixSqbAndWildcardInSelectList => 154, - Self::ParseCastArity => 155, - Self::ParseEmptySelect => 156, - Self::ParseExpected2TokenTypes => 157, - Self::ParseExpectedArgumentDelimiter => 158, - Self::ParseExpectedDatePart => 159, - Self::ParseExpectedExpression => 160, - Self::ParseExpectedIdentForAlias => 161, - Self::ParseExpectedIdentForAt => 162, - Self::ParseExpectedIdentForGroupName => 163, - Self::ParseExpectedKeyword => 164, - Self::ParseExpectedLeftParenAfterCast => 165, - Self::ParseExpectedLeftParenBuiltinFunctionCall => 166, - Self::ParseExpectedLeftParenValueConstructor => 167, - Self::ParseExpectedMember => 168, - Self::ParseExpectedNumber => 169, - Self::ParseExpectedRightParenBuiltinFunctionCall => 170, - Self::ParseExpectedTokenType => 171, - Self::ParseExpectedTypeName => 172, - Self::ParseExpectedWhenClause => 173, - Self::ParseInvalidContextForWildcardInSelectList => 174, - Self::ParseInvalidPathComponent => 175, - Self::ParseInvalidTypeParam => 176, - Self::ParseMalformedJoin => 177, - Self::ParseMissingIdentAfterAt => 178, - Self::ParseNonUnaryAgregateFunctionCall => 179, - Self::ParseSelectMissingFrom => 180, - Self::ParseUnExpectedKeyword => 181, - Self::ParseUnexpectedOperator => 182, - Self::ParseUnexpectedTerm => 183, - Self::ParseUnexpectedToken => 184, - Self::ParseUnknownOperator => 185, - Self::ParseUnsupportedAlias => 186, - Self::ParseUnsupportedCallWithStar => 187, - Self::ParseUnsupportedCase => 188, - Self::ParseUnsupportedCaseClause => 189, - Self::ParseUnsupportedLiteralsGroupBy => 190, - Self::ParseUnsupportedSelect => 191, - Self::ParseUnsupportedSyntax => 192, - Self::ParseUnsupportedToken => 193, - Self::PermanentRedirect => 194, - Self::PermanentRedirectControlError => 195, - Self::PreconditionFailed => 196, - Self::Redirect => 197, - Self::ReplicationConfigurationNotFoundError => 198, - Self::RequestHeaderSectionTooLarge => 199, - Self::RequestIsNotMultiPartContent => 200, - Self::RequestTimeTooSkewed => 201, - Self::RequestTimeout => 202, - Self::RequestTorrentOfBucketError => 203, - Self::ResponseInterrupted => 204, - Self::RestoreAlreadyInProgress => 205, - Self::ServerSideEncryptionConfigurationNotFoundError => 206, - Self::ServiceUnavailable => 207, - Self::SignatureDoesNotMatch => 208, - Self::SlowDown => 209, - Self::TagPolicyException => 210, - Self::TemporaryRedirect => 211, - Self::TokenCodeInvalidError => 212, - Self::TokenRefreshRequired => 213, - Self::TooManyAccessPoints => 214, - Self::TooManyBuckets => 215, - Self::TooManyMultiRegionAccessPointregionsError => 216, - Self::TooManyMultiRegionAccessPoints => 217, - Self::TooManyTags => 218, - Self::TruncatedInput => 219, - Self::UnauthorizedAccess => 220, - Self::UnauthorizedAccessError => 221, - Self::UnexpectedContent => 222, - Self::UnexpectedIPError => 223, - Self::UnrecognizedFormatException => 224, - Self::UnresolvableGrantByEmailAddress => 225, - Self::UnsupportedArgument => 226, - Self::UnsupportedFunction => 227, - Self::UnsupportedParquetType => 228, - Self::UnsupportedRangeHeader => 229, - Self::UnsupportedScanRangeInput => 230, - Self::UnsupportedSignature => 231, - Self::UnsupportedSqlOperation => 232, - Self::UnsupportedSqlStructure => 233, - Self::UnsupportedStorageClass => 234, - Self::UnsupportedSyntax => 235, - Self::UnsupportedTypeForQuerying => 236, - Self::UserKeyMustBeSpecified => 237, - Self::ValueParseFailure => 238, - Self::Custom(_) => usize::MAX, - } - } - - pub(crate) fn as_static_str(&self) -> Option<&'static str> { - Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied() - } - - #[must_use] - pub fn from_bytes(s: &[u8]) -> Option { - match s { - b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported), - b"AccessDenied" => Some(Self::AccessDenied), - b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou), - b"AccountProblem" => Some(Self::AccountProblem), - b"AllAccessDisabled" => Some(Self::AllAccessDisabled), - b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName), - b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress), - b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed), - b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError), - b"BadDigest" => Some(Self::BadDigest), - b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists), - b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou), - b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached), - b"BucketNotEmpty" => Some(Self::BucketNotEmpty), - b"Busy" => Some(Self::Busy), - b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter), - b"CSVParsingError" => Some(Self::CSVParsingError), - b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote), - b"CastFailed" => Some(Self::CastFailed), - b"ClientTokenConflict" => Some(Self::ClientTokenConflict), - b"ColumnTooLong" => Some(Self::ColumnTooLong), - b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict), - b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester), - b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported), - b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited), - b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError), - b"EmptyRequestBody" => Some(Self::EmptyRequestBody), - b"EndpointNotFound" => Some(Self::EndpointNotFound), - b"EntityTooLarge" => Some(Self::EntityTooLarge), - b"EntityTooSmall" => Some(Self::EntityTooSmall), - b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist), - b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments), - b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern), - b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol), - b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => { - Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing) - } - b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken), - b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence), - b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit), - b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields), - b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => { - Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch) - } - b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken), - b"ExpiredToken" => Some(Self::ExpiredToken), - b"ExpressionTooLong" => Some(Self::ExpressionTooLong), - b"ExternalEvalException" => Some(Self::ExternalEvalException), - b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException), - b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument), - b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException), - b"IncompleteBody" => Some(Self::IncompleteBody), - b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint), - b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest), - b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType), - b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge), - b"IntegerOverflow" => Some(Self::IntegerOverflow), - b"InternalError" => Some(Self::InternalError), - b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId), - b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint), - b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError), - b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader), - b"InvalidArgument" => Some(Self::InvalidArgument), - b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership), - b"InvalidBucketName" => Some(Self::InvalidBucketName), - b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID), - b"InvalidBucketState" => Some(Self::InvalidBucketState), - b"InvalidCast" => Some(Self::InvalidCast), - b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex), - b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat), - b"InvalidDataSource" => Some(Self::InvalidDataSource), - b"InvalidDataType" => Some(Self::InvalidDataType), - b"InvalidDigest" => Some(Self::InvalidDigest), - b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError), - b"InvalidExpressionType" => Some(Self::InvalidExpressionType), - b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo), - b"InvalidHostHeader" => Some(Self::InvalidHostHeader), - b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod), - b"InvalidJsonType" => Some(Self::InvalidJsonType), - b"InvalidKeyPath" => Some(Self::InvalidKeyPath), - b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint), - b"InvalidObjectState" => Some(Self::InvalidObjectState), - b"InvalidPart" => Some(Self::InvalidPart), - b"InvalidPartOrder" => Some(Self::InvalidPartOrder), - b"InvalidPayer" => Some(Self::InvalidPayer), - b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument), - b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields), - b"InvalidRange" => Some(Self::InvalidRange), - b"InvalidRegion" => Some(Self::InvalidRegion), - b"InvalidRequest" => Some(Self::InvalidRequest), - b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter), - b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest), - b"InvalidScanRange" => Some(Self::InvalidScanRange), - b"InvalidSecurity" => Some(Self::InvalidSecurity), - b"InvalidSessionException" => Some(Self::InvalidSessionException), - b"InvalidSignature" => Some(Self::InvalidSignature), - b"InvalidStorageClass" => Some(Self::InvalidStorageClass), - b"InvalidTableAlias" => Some(Self::InvalidTableAlias), - b"InvalidTag" => Some(Self::InvalidTag), - b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging), - b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding), - b"InvalidToken" => Some(Self::InvalidToken), - b"InvalidURI" => Some(Self::InvalidURI), - b"JSONParsingError" => Some(Self::JSONParsingError), - b"KeyTooLongError" => Some(Self::KeyTooLongError), - b"LexerInvalidChar" => Some(Self::LexerInvalidChar), - b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral), - b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral), - b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator), - b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs), - b"MalformedACLError" => Some(Self::MalformedACLError), - b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest), - b"MalformedPolicy" => Some(Self::MalformedPolicy), - b"MalformedXML" => Some(Self::MalformedXML), - b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded), - b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded), - b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError), - b"MetadataTooLarge" => Some(Self::MetadataTooLarge), - b"MethodNotAllowed" => Some(Self::MethodNotAllowed), - b"MissingAttachment" => Some(Self::MissingAttachment), - b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken), - b"MissingContentLength" => Some(Self::MissingContentLength), - b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError), - b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter), - b"MissingSecurityElement" => Some(Self::MissingSecurityElement), - b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader), - b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported), - b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey), - b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint), - b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest), - b"NoSuchBucket" => Some(Self::NoSuchBucket), - b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy), - b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration), - b"NoSuchKey" => Some(Self::NoSuchKey), - b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration), - b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint), - b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration), - b"NoSuchResource" => Some(Self::NoSuchResource), - b"NoSuchTagSet" => Some(Self::NoSuchTagSet), - b"NoSuchUpload" => Some(Self::NoSuchUpload), - b"NoSuchVersion" => Some(Self::NoSuchVersion), - b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration), - b"NoTransformationDefined" => Some(Self::NoTransformationDefined), - b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError), - b"NotImplemented" => Some(Self::NotImplemented), - b"NotModified" => Some(Self::NotModified), - b"NotSignedUp" => Some(Self::NotSignedUp), - b"NumberFormatError" => Some(Self::NumberFormatError), - b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError), - b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict), - b"OperationAborted" => Some(Self::OperationAborted), - b"OverMaxColumn" => Some(Self::OverMaxColumn), - b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize), - b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize), - b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError), - b"ParquetParsingError" => Some(Self::ParquetParsingError), - b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec), - b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList), - b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList), - b"ParseCastArity" => Some(Self::ParseCastArity), - b"ParseEmptySelect" => Some(Self::ParseEmptySelect), - b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes), - b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter), - b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart), - b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression), - b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias), - b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt), - b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName), - b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword), - b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast), - b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall), - b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor), - b"ParseExpectedMember" => Some(Self::ParseExpectedMember), - b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber), - b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall), - b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType), - b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName), - b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause), - b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList), - b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent), - b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam), - b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin), - b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt), - b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall), - b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom), - b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword), - b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator), - b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm), - b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken), - b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator), - b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias), - b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar), - b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase), - b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause), - b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy), - b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect), - b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax), - b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken), - b"PermanentRedirect" => Some(Self::PermanentRedirect), - b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError), - b"PreconditionFailed" => Some(Self::PreconditionFailed), - b"Redirect" => Some(Self::Redirect), - b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError), - b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge), - b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent), - b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed), - b"RequestTimeout" => Some(Self::RequestTimeout), - b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError), - b"ResponseInterrupted" => Some(Self::ResponseInterrupted), - b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress), - b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError), - b"ServiceUnavailable" => Some(Self::ServiceUnavailable), - b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch), - b"SlowDown" => Some(Self::SlowDown), - b"TagPolicyException" => Some(Self::TagPolicyException), - b"TemporaryRedirect" => Some(Self::TemporaryRedirect), - b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError), - b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired), - b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints), - b"TooManyBuckets" => Some(Self::TooManyBuckets), - b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError), - b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints), - b"TooManyTags" => Some(Self::TooManyTags), - b"TruncatedInput" => Some(Self::TruncatedInput), - b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess), - b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError), - b"UnexpectedContent" => Some(Self::UnexpectedContent), - b"UnexpectedIPError" => Some(Self::UnexpectedIPError), - b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException), - b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress), - b"UnsupportedArgument" => Some(Self::UnsupportedArgument), - b"UnsupportedFunction" => Some(Self::UnsupportedFunction), - b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType), - b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader), - b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput), - b"UnsupportedSignature" => Some(Self::UnsupportedSignature), - b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation), - b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure), - b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass), - b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax), - b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying), - b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified), - b"ValueParseFailure" => Some(Self::ValueParseFailure), - _ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())), - } - } - - #[allow(clippy::match_same_arms)] - #[must_use] - pub fn status_code(&self) -> Option { - match self { - Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST), - Self::AccessDenied => Some(StatusCode::FORBIDDEN), - Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT), - Self::AccountProblem => Some(StatusCode::FORBIDDEN), - Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN), - Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST), - Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), - Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST), - Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST), - Self::BadDigest => Some(StatusCode::BAD_REQUEST), - Self::BucketAlreadyExists => Some(StatusCode::CONFLICT), - Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT), - Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST), - Self::BucketNotEmpty => Some(StatusCode::CONFLICT), - Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE), - Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST), - Self::CSVParsingError => Some(StatusCode::BAD_REQUEST), - Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST), - Self::CastFailed => Some(StatusCode::BAD_REQUEST), - Self::ClientTokenConflict => Some(StatusCode::CONFLICT), - Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST), - Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT), - Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST), - Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST), - Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN), - Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST), - Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST), - Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST), - Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST), - Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST), - Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), - Self::ExpiredToken => Some(StatusCode::BAD_REQUEST), - Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST), - Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST), - Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST), - Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST), - Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST), - Self::IncompleteBody => Some(StatusCode::BAD_REQUEST), - Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST), - Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST), - Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST), - Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST), - Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST), - Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR), - Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN), - Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST), - Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST), - Self::InvalidAddressingHeader => None, - Self::InvalidArgument => Some(StatusCode::BAD_REQUEST), - Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST), - Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST), - Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST), - Self::InvalidBucketState => Some(StatusCode::CONFLICT), - Self::InvalidCast => Some(StatusCode::BAD_REQUEST), - Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST), - Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST), - Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST), - Self::InvalidDataType => Some(StatusCode::BAD_REQUEST), - Self::InvalidDigest => Some(StatusCode::BAD_REQUEST), - Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST), - Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST), - Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST), - Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST), - Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST), - Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST), - Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST), - Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST), - Self::InvalidObjectState => Some(StatusCode::FORBIDDEN), - Self::InvalidPart => Some(StatusCode::BAD_REQUEST), - Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST), - Self::InvalidPayer => Some(StatusCode::FORBIDDEN), - Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST), - Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST), - Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE), - Self::InvalidRegion => Some(StatusCode::FORBIDDEN), - Self::InvalidRequest => Some(StatusCode::BAD_REQUEST), - Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST), - Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST), - Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST), - Self::InvalidSecurity => Some(StatusCode::FORBIDDEN), - Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST), - Self::InvalidSignature => Some(StatusCode::BAD_REQUEST), - Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST), - Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST), - Self::InvalidTag => Some(StatusCode::BAD_REQUEST), - Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST), - Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST), - Self::InvalidToken => Some(StatusCode::BAD_REQUEST), - Self::InvalidURI => Some(StatusCode::BAD_REQUEST), - Self::JSONParsingError => Some(StatusCode::BAD_REQUEST), - Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST), - Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST), - Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST), - Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST), - Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST), - Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST), - Self::MalformedACLError => Some(StatusCode::BAD_REQUEST), - Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST), - Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST), - Self::MalformedXML => Some(StatusCode::BAD_REQUEST), - Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST), - Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST), - Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST), - Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST), - Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED), - Self::MissingAttachment => None, - Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN), - Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED), - Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST), - Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST), - Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST), - Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST), - Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST), - Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST), - Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND), - Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND), - Self::NoSuchBucket => Some(StatusCode::NOT_FOUND), - Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND), - Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND), - Self::NoSuchKey => Some(StatusCode::NOT_FOUND), - Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND), - Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND), - Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND), - Self::NoSuchResource => Some(StatusCode::NOT_FOUND), - Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND), - Self::NoSuchUpload => Some(StatusCode::NOT_FOUND), - Self::NoSuchVersion => Some(StatusCode::NOT_FOUND), - Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND), - Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND), - Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST), - Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED), - Self::NotModified => Some(StatusCode::NOT_MODIFIED), - Self::NotSignedUp => Some(StatusCode::FORBIDDEN), - Self::NumberFormatError => Some(StatusCode::BAD_REQUEST), - Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), - Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST), - Self::OperationAborted => Some(StatusCode::CONFLICT), - Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST), - Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST), - Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST), - Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND), - Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST), - Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST), - Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST), - Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST), - Self::ParseCastArity => Some(StatusCode::BAD_REQUEST), - Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST), - Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST), - Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST), - Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST), - Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST), - Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST), - Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST), - Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST), - Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST), - Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST), - Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST), - Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST), - Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST), - Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST), - Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST), - Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST), - Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY), - Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY), - Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED), - Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT), - Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), - Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST), - Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST), - Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN), - Self::RequestTimeout => Some(StatusCode::BAD_REQUEST), - Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST), - Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST), - Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT), - Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST), - Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE), - Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN), - Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE), - Self::TagPolicyException => Some(StatusCode::BAD_REQUEST), - Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT), - Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST), - Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST), - Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST), - Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST), - Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST), - Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST), - Self::TooManyTags => Some(StatusCode::BAD_REQUEST), - Self::TruncatedInput => Some(StatusCode::BAD_REQUEST), - Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED), - Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN), - Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST), - Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN), - Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST), - Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST), - Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST), - Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST), - Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST), - Self::Custom(_) => None, - } - } +const STATIC_CODE_LIST: &'static [&'static str] = &[ +"AccessControlListNotSupported", +"AccessDenied", +"AccessPointAlreadyOwnedByYou", +"AccountProblem", +"AllAccessDisabled", +"AmbiguousFieldName", +"AmbiguousGrantByEmailAddress", +"AuthorizationHeaderMalformed", +"AuthorizationQueryParametersError", +"BadDigest", +"BucketAlreadyExists", +"BucketAlreadyOwnedByYou", +"BucketHasAccessPointsAttached", +"BucketNotEmpty", +"Busy", +"CSVEscapingRecordDelimiter", +"CSVParsingError", +"CSVUnescapedQuote", +"CastFailed", +"ClientTokenConflict", +"ColumnTooLong", +"ConditionalRequestConflict", +"ConnectionClosedByRequester", +"CredentialsNotSupported", +"CrossLocationLoggingProhibited", +"DeviceNotActiveError", +"EmptyRequestBody", +"EndpointNotFound", +"EntityTooLarge", +"EntityTooSmall", +"EvaluatorBindingDoesNotExist", +"EvaluatorInvalidArguments", +"EvaluatorInvalidTimestampFormatPattern", +"EvaluatorInvalidTimestampFormatPatternSymbol", +"EvaluatorInvalidTimestampFormatPatternSymbolForParsing", +"EvaluatorInvalidTimestampFormatPatternToken", +"EvaluatorLikePatternInvalidEscapeSequence", +"EvaluatorNegativeLimit", +"EvaluatorTimestampFormatPatternDuplicateFields", +"EvaluatorTimestampFormatPatternHourClockAmPmMismatch", +"EvaluatorUnterminatedTimestampFormatPatternToken", +"ExpiredToken", +"ExpressionTooLong", +"ExternalEvalException", +"IllegalLocationConstraintException", +"IllegalSqlFunctionArgument", +"IllegalVersioningConfigurationException", +"IncompleteBody", +"IncorrectEndpoint", +"IncorrectNumberOfFilesInPostRequest", +"IncorrectSqlFunctionArgumentType", +"InlineDataTooLarge", +"IntegerOverflow", +"InternalError", +"InvalidAccessKeyId", +"InvalidAccessPoint", +"InvalidAccessPointAliasError", +"InvalidAddressingHeader", +"InvalidArgument", +"InvalidBucketAclWithObjectOwnership", +"InvalidBucketName", +"InvalidBucketOwnerAWSAccountID", +"InvalidBucketState", +"InvalidCast", +"InvalidColumnIndex", +"InvalidCompressionFormat", +"InvalidDataSource", +"InvalidDataType", +"InvalidDigest", +"InvalidEncryptionAlgorithmError", +"InvalidExpressionType", +"InvalidFileHeaderInfo", +"InvalidHostHeader", +"InvalidHttpMethod", +"InvalidJsonType", +"InvalidKeyPath", +"InvalidLocationConstraint", +"InvalidObjectState", +"InvalidPart", +"InvalidPartOrder", +"InvalidPayer", +"InvalidPolicyDocument", +"InvalidQuoteFields", +"InvalidRange", +"InvalidRegion", +"InvalidRequest", +"InvalidRequestParameter", +"InvalidSOAPRequest", +"InvalidScanRange", +"InvalidSecurity", +"InvalidSessionException", +"InvalidSignature", +"InvalidStorageClass", +"InvalidTableAlias", +"InvalidTag", +"InvalidTargetBucketForLogging", +"InvalidTextEncoding", +"InvalidToken", +"InvalidURI", +"JSONParsingError", +"KeyTooLongError", +"LexerInvalidChar", +"LexerInvalidIONLiteral", +"LexerInvalidLiteral", +"LexerInvalidOperator", +"LikeInvalidInputs", +"MalformedACLError", +"MalformedPOSTRequest", +"MalformedPolicy", +"MalformedXML", +"MaxMessageLengthExceeded", +"MaxOperatorsExceeded", +"MaxPostPreDataLengthExceededError", +"MetadataTooLarge", +"MethodNotAllowed", +"MissingAttachment", +"MissingAuthenticationToken", +"MissingContentLength", +"MissingRequestBodyError", +"MissingRequiredParameter", +"MissingSecurityElement", +"MissingSecurityHeader", +"MultipleDataSourcesUnsupported", +"NoLoggingStatusForKey", +"NoSuchAccessPoint", +"NoSuchAsyncRequest", +"NoSuchBucket", +"NoSuchBucketPolicy", +"NoSuchCORSConfiguration", +"NoSuchKey", +"NoSuchLifecycleConfiguration", +"NoSuchMultiRegionAccessPoint", +"NoSuchObjectLockConfiguration", +"NoSuchResource", +"NoSuchTagSet", +"NoSuchUpload", +"NoSuchVersion", +"NoSuchWebsiteConfiguration", +"NoTransformationDefined", +"NotDeviceOwnerError", +"NotImplemented", +"NotModified", +"NotSignedUp", +"NumberFormatError", +"ObjectLockConfigurationNotFoundError", +"ObjectSerializationConflict", +"OperationAborted", +"OverMaxColumn", +"OverMaxParquetBlockSize", +"OverMaxRecordSize", +"OwnershipControlsNotFoundError", +"ParquetParsingError", +"ParquetUnsupportedCompressionCodec", +"ParseAsteriskIsNotAloneInSelectList", +"ParseCannotMixSqbAndWildcardInSelectList", +"ParseCastArity", +"ParseEmptySelect", +"ParseExpected2TokenTypes", +"ParseExpectedArgumentDelimiter", +"ParseExpectedDatePart", +"ParseExpectedExpression", +"ParseExpectedIdentForAlias", +"ParseExpectedIdentForAt", +"ParseExpectedIdentForGroupName", +"ParseExpectedKeyword", +"ParseExpectedLeftParenAfterCast", +"ParseExpectedLeftParenBuiltinFunctionCall", +"ParseExpectedLeftParenValueConstructor", +"ParseExpectedMember", +"ParseExpectedNumber", +"ParseExpectedRightParenBuiltinFunctionCall", +"ParseExpectedTokenType", +"ParseExpectedTypeName", +"ParseExpectedWhenClause", +"ParseInvalidContextForWildcardInSelectList", +"ParseInvalidPathComponent", +"ParseInvalidTypeParam", +"ParseMalformedJoin", +"ParseMissingIdentAfterAt", +"ParseNonUnaryAgregateFunctionCall", +"ParseSelectMissingFrom", +"ParseUnExpectedKeyword", +"ParseUnexpectedOperator", +"ParseUnexpectedTerm", +"ParseUnexpectedToken", +"ParseUnknownOperator", +"ParseUnsupportedAlias", +"ParseUnsupportedCallWithStar", +"ParseUnsupportedCase", +"ParseUnsupportedCaseClause", +"ParseUnsupportedLiteralsGroupBy", +"ParseUnsupportedSelect", +"ParseUnsupportedSyntax", +"ParseUnsupportedToken", +"PermanentRedirect", +"PermanentRedirectControlError", +"PreconditionFailed", +"Redirect", +"ReplicationConfigurationNotFoundError", +"RequestHeaderSectionTooLarge", +"RequestIsNotMultiPartContent", +"RequestTimeTooSkewed", +"RequestTimeout", +"RequestTorrentOfBucketError", +"ResponseInterrupted", +"RestoreAlreadyInProgress", +"ServerSideEncryptionConfigurationNotFoundError", +"ServiceUnavailable", +"SignatureDoesNotMatch", +"SlowDown", +"TagPolicyException", +"TemporaryRedirect", +"TokenCodeInvalidError", +"TokenRefreshRequired", +"TooManyAccessPoints", +"TooManyBuckets", +"TooManyMultiRegionAccessPointregionsError", +"TooManyMultiRegionAccessPoints", +"TooManyTags", +"TruncatedInput", +"UnauthorizedAccess", +"UnauthorizedAccessError", +"UnexpectedContent", +"UnexpectedIPError", +"UnrecognizedFormatException", +"UnresolvableGrantByEmailAddress", +"UnsupportedArgument", +"UnsupportedFunction", +"UnsupportedParquetType", +"UnsupportedRangeHeader", +"UnsupportedScanRangeInput", +"UnsupportedSignature", +"UnsupportedSqlOperation", +"UnsupportedSqlStructure", +"UnsupportedStorageClass", +"UnsupportedSyntax", +"UnsupportedTypeForQuerying", +"UserKeyMustBeSpecified", +"ValueParseFailure", +]; + +#[must_use] +fn as_enum_tag(&self) -> usize { +match self { +Self::AccessControlListNotSupported => 0, +Self::AccessDenied => 1, +Self::AccessPointAlreadyOwnedByYou => 2, +Self::AccountProblem => 3, +Self::AllAccessDisabled => 4, +Self::AmbiguousFieldName => 5, +Self::AmbiguousGrantByEmailAddress => 6, +Self::AuthorizationHeaderMalformed => 7, +Self::AuthorizationQueryParametersError => 8, +Self::BadDigest => 9, +Self::BucketAlreadyExists => 10, +Self::BucketAlreadyOwnedByYou => 11, +Self::BucketHasAccessPointsAttached => 12, +Self::BucketNotEmpty => 13, +Self::Busy => 14, +Self::CSVEscapingRecordDelimiter => 15, +Self::CSVParsingError => 16, +Self::CSVUnescapedQuote => 17, +Self::CastFailed => 18, +Self::ClientTokenConflict => 19, +Self::ColumnTooLong => 20, +Self::ConditionalRequestConflict => 21, +Self::ConnectionClosedByRequester => 22, +Self::CredentialsNotSupported => 23, +Self::CrossLocationLoggingProhibited => 24, +Self::DeviceNotActiveError => 25, +Self::EmptyRequestBody => 26, +Self::EndpointNotFound => 27, +Self::EntityTooLarge => 28, +Self::EntityTooSmall => 29, +Self::EvaluatorBindingDoesNotExist => 30, +Self::EvaluatorInvalidArguments => 31, +Self::EvaluatorInvalidTimestampFormatPattern => 32, +Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33, +Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34, +Self::EvaluatorInvalidTimestampFormatPatternToken => 35, +Self::EvaluatorLikePatternInvalidEscapeSequence => 36, +Self::EvaluatorNegativeLimit => 37, +Self::EvaluatorTimestampFormatPatternDuplicateFields => 38, +Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39, +Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40, +Self::ExpiredToken => 41, +Self::ExpressionTooLong => 42, +Self::ExternalEvalException => 43, +Self::IllegalLocationConstraintException => 44, +Self::IllegalSqlFunctionArgument => 45, +Self::IllegalVersioningConfigurationException => 46, +Self::IncompleteBody => 47, +Self::IncorrectEndpoint => 48, +Self::IncorrectNumberOfFilesInPostRequest => 49, +Self::IncorrectSqlFunctionArgumentType => 50, +Self::InlineDataTooLarge => 51, +Self::IntegerOverflow => 52, +Self::InternalError => 53, +Self::InvalidAccessKeyId => 54, +Self::InvalidAccessPoint => 55, +Self::InvalidAccessPointAliasError => 56, +Self::InvalidAddressingHeader => 57, +Self::InvalidArgument => 58, +Self::InvalidBucketAclWithObjectOwnership => 59, +Self::InvalidBucketName => 60, +Self::InvalidBucketOwnerAWSAccountID => 61, +Self::InvalidBucketState => 62, +Self::InvalidCast => 63, +Self::InvalidColumnIndex => 64, +Self::InvalidCompressionFormat => 65, +Self::InvalidDataSource => 66, +Self::InvalidDataType => 67, +Self::InvalidDigest => 68, +Self::InvalidEncryptionAlgorithmError => 69, +Self::InvalidExpressionType => 70, +Self::InvalidFileHeaderInfo => 71, +Self::InvalidHostHeader => 72, +Self::InvalidHttpMethod => 73, +Self::InvalidJsonType => 74, +Self::InvalidKeyPath => 75, +Self::InvalidLocationConstraint => 76, +Self::InvalidObjectState => 77, +Self::InvalidPart => 78, +Self::InvalidPartOrder => 79, +Self::InvalidPayer => 80, +Self::InvalidPolicyDocument => 81, +Self::InvalidQuoteFields => 82, +Self::InvalidRange => 83, +Self::InvalidRegion => 84, +Self::InvalidRequest => 85, +Self::InvalidRequestParameter => 86, +Self::InvalidSOAPRequest => 87, +Self::InvalidScanRange => 88, +Self::InvalidSecurity => 89, +Self::InvalidSessionException => 90, +Self::InvalidSignature => 91, +Self::InvalidStorageClass => 92, +Self::InvalidTableAlias => 93, +Self::InvalidTag => 94, +Self::InvalidTargetBucketForLogging => 95, +Self::InvalidTextEncoding => 96, +Self::InvalidToken => 97, +Self::InvalidURI => 98, +Self::JSONParsingError => 99, +Self::KeyTooLongError => 100, +Self::LexerInvalidChar => 101, +Self::LexerInvalidIONLiteral => 102, +Self::LexerInvalidLiteral => 103, +Self::LexerInvalidOperator => 104, +Self::LikeInvalidInputs => 105, +Self::MalformedACLError => 106, +Self::MalformedPOSTRequest => 107, +Self::MalformedPolicy => 108, +Self::MalformedXML => 109, +Self::MaxMessageLengthExceeded => 110, +Self::MaxOperatorsExceeded => 111, +Self::MaxPostPreDataLengthExceededError => 112, +Self::MetadataTooLarge => 113, +Self::MethodNotAllowed => 114, +Self::MissingAttachment => 115, +Self::MissingAuthenticationToken => 116, +Self::MissingContentLength => 117, +Self::MissingRequestBodyError => 118, +Self::MissingRequiredParameter => 119, +Self::MissingSecurityElement => 120, +Self::MissingSecurityHeader => 121, +Self::MultipleDataSourcesUnsupported => 122, +Self::NoLoggingStatusForKey => 123, +Self::NoSuchAccessPoint => 124, +Self::NoSuchAsyncRequest => 125, +Self::NoSuchBucket => 126, +Self::NoSuchBucketPolicy => 127, +Self::NoSuchCORSConfiguration => 128, +Self::NoSuchKey => 129, +Self::NoSuchLifecycleConfiguration => 130, +Self::NoSuchMultiRegionAccessPoint => 131, +Self::NoSuchObjectLockConfiguration => 132, +Self::NoSuchResource => 133, +Self::NoSuchTagSet => 134, +Self::NoSuchUpload => 135, +Self::NoSuchVersion => 136, +Self::NoSuchWebsiteConfiguration => 137, +Self::NoTransformationDefined => 138, +Self::NotDeviceOwnerError => 139, +Self::NotImplemented => 140, +Self::NotModified => 141, +Self::NotSignedUp => 142, +Self::NumberFormatError => 143, +Self::ObjectLockConfigurationNotFoundError => 144, +Self::ObjectSerializationConflict => 145, +Self::OperationAborted => 146, +Self::OverMaxColumn => 147, +Self::OverMaxParquetBlockSize => 148, +Self::OverMaxRecordSize => 149, +Self::OwnershipControlsNotFoundError => 150, +Self::ParquetParsingError => 151, +Self::ParquetUnsupportedCompressionCodec => 152, +Self::ParseAsteriskIsNotAloneInSelectList => 153, +Self::ParseCannotMixSqbAndWildcardInSelectList => 154, +Self::ParseCastArity => 155, +Self::ParseEmptySelect => 156, +Self::ParseExpected2TokenTypes => 157, +Self::ParseExpectedArgumentDelimiter => 158, +Self::ParseExpectedDatePart => 159, +Self::ParseExpectedExpression => 160, +Self::ParseExpectedIdentForAlias => 161, +Self::ParseExpectedIdentForAt => 162, +Self::ParseExpectedIdentForGroupName => 163, +Self::ParseExpectedKeyword => 164, +Self::ParseExpectedLeftParenAfterCast => 165, +Self::ParseExpectedLeftParenBuiltinFunctionCall => 166, +Self::ParseExpectedLeftParenValueConstructor => 167, +Self::ParseExpectedMember => 168, +Self::ParseExpectedNumber => 169, +Self::ParseExpectedRightParenBuiltinFunctionCall => 170, +Self::ParseExpectedTokenType => 171, +Self::ParseExpectedTypeName => 172, +Self::ParseExpectedWhenClause => 173, +Self::ParseInvalidContextForWildcardInSelectList => 174, +Self::ParseInvalidPathComponent => 175, +Self::ParseInvalidTypeParam => 176, +Self::ParseMalformedJoin => 177, +Self::ParseMissingIdentAfterAt => 178, +Self::ParseNonUnaryAgregateFunctionCall => 179, +Self::ParseSelectMissingFrom => 180, +Self::ParseUnExpectedKeyword => 181, +Self::ParseUnexpectedOperator => 182, +Self::ParseUnexpectedTerm => 183, +Self::ParseUnexpectedToken => 184, +Self::ParseUnknownOperator => 185, +Self::ParseUnsupportedAlias => 186, +Self::ParseUnsupportedCallWithStar => 187, +Self::ParseUnsupportedCase => 188, +Self::ParseUnsupportedCaseClause => 189, +Self::ParseUnsupportedLiteralsGroupBy => 190, +Self::ParseUnsupportedSelect => 191, +Self::ParseUnsupportedSyntax => 192, +Self::ParseUnsupportedToken => 193, +Self::PermanentRedirect => 194, +Self::PermanentRedirectControlError => 195, +Self::PreconditionFailed => 196, +Self::Redirect => 197, +Self::ReplicationConfigurationNotFoundError => 198, +Self::RequestHeaderSectionTooLarge => 199, +Self::RequestIsNotMultiPartContent => 200, +Self::RequestTimeTooSkewed => 201, +Self::RequestTimeout => 202, +Self::RequestTorrentOfBucketError => 203, +Self::ResponseInterrupted => 204, +Self::RestoreAlreadyInProgress => 205, +Self::ServerSideEncryptionConfigurationNotFoundError => 206, +Self::ServiceUnavailable => 207, +Self::SignatureDoesNotMatch => 208, +Self::SlowDown => 209, +Self::TagPolicyException => 210, +Self::TemporaryRedirect => 211, +Self::TokenCodeInvalidError => 212, +Self::TokenRefreshRequired => 213, +Self::TooManyAccessPoints => 214, +Self::TooManyBuckets => 215, +Self::TooManyMultiRegionAccessPointregionsError => 216, +Self::TooManyMultiRegionAccessPoints => 217, +Self::TooManyTags => 218, +Self::TruncatedInput => 219, +Self::UnauthorizedAccess => 220, +Self::UnauthorizedAccessError => 221, +Self::UnexpectedContent => 222, +Self::UnexpectedIPError => 223, +Self::UnrecognizedFormatException => 224, +Self::UnresolvableGrantByEmailAddress => 225, +Self::UnsupportedArgument => 226, +Self::UnsupportedFunction => 227, +Self::UnsupportedParquetType => 228, +Self::UnsupportedRangeHeader => 229, +Self::UnsupportedScanRangeInput => 230, +Self::UnsupportedSignature => 231, +Self::UnsupportedSqlOperation => 232, +Self::UnsupportedSqlStructure => 233, +Self::UnsupportedStorageClass => 234, +Self::UnsupportedSyntax => 235, +Self::UnsupportedTypeForQuerying => 236, +Self::UserKeyMustBeSpecified => 237, +Self::ValueParseFailure => 238, +Self::Custom(_) => usize::MAX, +} +} + +pub(crate) fn as_static_str(&self) -> Option<&'static str> { + Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied() +} + +#[must_use] +pub fn from_bytes(s: &[u8]) -> Option { +match s { +b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported), +b"AccessDenied" => Some(Self::AccessDenied), +b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou), +b"AccountProblem" => Some(Self::AccountProblem), +b"AllAccessDisabled" => Some(Self::AllAccessDisabled), +b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName), +b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress), +b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed), +b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError), +b"BadDigest" => Some(Self::BadDigest), +b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists), +b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou), +b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached), +b"BucketNotEmpty" => Some(Self::BucketNotEmpty), +b"Busy" => Some(Self::Busy), +b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter), +b"CSVParsingError" => Some(Self::CSVParsingError), +b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote), +b"CastFailed" => Some(Self::CastFailed), +b"ClientTokenConflict" => Some(Self::ClientTokenConflict), +b"ColumnTooLong" => Some(Self::ColumnTooLong), +b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict), +b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester), +b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported), +b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited), +b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError), +b"EmptyRequestBody" => Some(Self::EmptyRequestBody), +b"EndpointNotFound" => Some(Self::EndpointNotFound), +b"EntityTooLarge" => Some(Self::EntityTooLarge), +b"EntityTooSmall" => Some(Self::EntityTooSmall), +b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist), +b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments), +b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern), +b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol), +b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing), +b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken), +b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence), +b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit), +b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields), +b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch), +b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken), +b"ExpiredToken" => Some(Self::ExpiredToken), +b"ExpressionTooLong" => Some(Self::ExpressionTooLong), +b"ExternalEvalException" => Some(Self::ExternalEvalException), +b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException), +b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument), +b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException), +b"IncompleteBody" => Some(Self::IncompleteBody), +b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint), +b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest), +b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType), +b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge), +b"IntegerOverflow" => Some(Self::IntegerOverflow), +b"InternalError" => Some(Self::InternalError), +b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId), +b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint), +b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError), +b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader), +b"InvalidArgument" => Some(Self::InvalidArgument), +b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership), +b"InvalidBucketName" => Some(Self::InvalidBucketName), +b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID), +b"InvalidBucketState" => Some(Self::InvalidBucketState), +b"InvalidCast" => Some(Self::InvalidCast), +b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex), +b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat), +b"InvalidDataSource" => Some(Self::InvalidDataSource), +b"InvalidDataType" => Some(Self::InvalidDataType), +b"InvalidDigest" => Some(Self::InvalidDigest), +b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError), +b"InvalidExpressionType" => Some(Self::InvalidExpressionType), +b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo), +b"InvalidHostHeader" => Some(Self::InvalidHostHeader), +b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod), +b"InvalidJsonType" => Some(Self::InvalidJsonType), +b"InvalidKeyPath" => Some(Self::InvalidKeyPath), +b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint), +b"InvalidObjectState" => Some(Self::InvalidObjectState), +b"InvalidPart" => Some(Self::InvalidPart), +b"InvalidPartOrder" => Some(Self::InvalidPartOrder), +b"InvalidPayer" => Some(Self::InvalidPayer), +b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument), +b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields), +b"InvalidRange" => Some(Self::InvalidRange), +b"InvalidRegion" => Some(Self::InvalidRegion), +b"InvalidRequest" => Some(Self::InvalidRequest), +b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter), +b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest), +b"InvalidScanRange" => Some(Self::InvalidScanRange), +b"InvalidSecurity" => Some(Self::InvalidSecurity), +b"InvalidSessionException" => Some(Self::InvalidSessionException), +b"InvalidSignature" => Some(Self::InvalidSignature), +b"InvalidStorageClass" => Some(Self::InvalidStorageClass), +b"InvalidTableAlias" => Some(Self::InvalidTableAlias), +b"InvalidTag" => Some(Self::InvalidTag), +b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging), +b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding), +b"InvalidToken" => Some(Self::InvalidToken), +b"InvalidURI" => Some(Self::InvalidURI), +b"JSONParsingError" => Some(Self::JSONParsingError), +b"KeyTooLongError" => Some(Self::KeyTooLongError), +b"LexerInvalidChar" => Some(Self::LexerInvalidChar), +b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral), +b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral), +b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator), +b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs), +b"MalformedACLError" => Some(Self::MalformedACLError), +b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest), +b"MalformedPolicy" => Some(Self::MalformedPolicy), +b"MalformedXML" => Some(Self::MalformedXML), +b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded), +b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded), +b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError), +b"MetadataTooLarge" => Some(Self::MetadataTooLarge), +b"MethodNotAllowed" => Some(Self::MethodNotAllowed), +b"MissingAttachment" => Some(Self::MissingAttachment), +b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken), +b"MissingContentLength" => Some(Self::MissingContentLength), +b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError), +b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter), +b"MissingSecurityElement" => Some(Self::MissingSecurityElement), +b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader), +b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported), +b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey), +b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint), +b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest), +b"NoSuchBucket" => Some(Self::NoSuchBucket), +b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy), +b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration), +b"NoSuchKey" => Some(Self::NoSuchKey), +b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration), +b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint), +b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration), +b"NoSuchResource" => Some(Self::NoSuchResource), +b"NoSuchTagSet" => Some(Self::NoSuchTagSet), +b"NoSuchUpload" => Some(Self::NoSuchUpload), +b"NoSuchVersion" => Some(Self::NoSuchVersion), +b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration), +b"NoTransformationDefined" => Some(Self::NoTransformationDefined), +b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError), +b"NotImplemented" => Some(Self::NotImplemented), +b"NotModified" => Some(Self::NotModified), +b"NotSignedUp" => Some(Self::NotSignedUp), +b"NumberFormatError" => Some(Self::NumberFormatError), +b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError), +b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict), +b"OperationAborted" => Some(Self::OperationAborted), +b"OverMaxColumn" => Some(Self::OverMaxColumn), +b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize), +b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize), +b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError), +b"ParquetParsingError" => Some(Self::ParquetParsingError), +b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec), +b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList), +b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList), +b"ParseCastArity" => Some(Self::ParseCastArity), +b"ParseEmptySelect" => Some(Self::ParseEmptySelect), +b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes), +b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter), +b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart), +b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression), +b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias), +b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt), +b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName), +b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword), +b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast), +b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall), +b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor), +b"ParseExpectedMember" => Some(Self::ParseExpectedMember), +b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber), +b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall), +b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType), +b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName), +b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause), +b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList), +b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent), +b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam), +b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin), +b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt), +b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall), +b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom), +b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword), +b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator), +b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm), +b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken), +b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator), +b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias), +b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar), +b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase), +b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause), +b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy), +b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect), +b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax), +b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken), +b"PermanentRedirect" => Some(Self::PermanentRedirect), +b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError), +b"PreconditionFailed" => Some(Self::PreconditionFailed), +b"Redirect" => Some(Self::Redirect), +b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError), +b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge), +b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent), +b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed), +b"RequestTimeout" => Some(Self::RequestTimeout), +b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError), +b"ResponseInterrupted" => Some(Self::ResponseInterrupted), +b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress), +b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError), +b"ServiceUnavailable" => Some(Self::ServiceUnavailable), +b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch), +b"SlowDown" => Some(Self::SlowDown), +b"TagPolicyException" => Some(Self::TagPolicyException), +b"TemporaryRedirect" => Some(Self::TemporaryRedirect), +b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError), +b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired), +b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints), +b"TooManyBuckets" => Some(Self::TooManyBuckets), +b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError), +b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints), +b"TooManyTags" => Some(Self::TooManyTags), +b"TruncatedInput" => Some(Self::TruncatedInput), +b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess), +b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError), +b"UnexpectedContent" => Some(Self::UnexpectedContent), +b"UnexpectedIPError" => Some(Self::UnexpectedIPError), +b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException), +b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress), +b"UnsupportedArgument" => Some(Self::UnsupportedArgument), +b"UnsupportedFunction" => Some(Self::UnsupportedFunction), +b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType), +b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader), +b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput), +b"UnsupportedSignature" => Some(Self::UnsupportedSignature), +b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation), +b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure), +b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass), +b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax), +b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying), +b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified), +b"ValueParseFailure" => Some(Self::ValueParseFailure), +_ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())) +} +} + +#[allow(clippy::match_same_arms)] +#[must_use] +pub fn status_code(&self) -> Option { +match self { +Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST), +Self::AccessDenied => Some(StatusCode::FORBIDDEN), +Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT), +Self::AccountProblem => Some(StatusCode::FORBIDDEN), +Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN), +Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST), +Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), +Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST), +Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST), +Self::BadDigest => Some(StatusCode::BAD_REQUEST), +Self::BucketAlreadyExists => Some(StatusCode::CONFLICT), +Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT), +Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST), +Self::BucketNotEmpty => Some(StatusCode::CONFLICT), +Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE), +Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST), +Self::CSVParsingError => Some(StatusCode::BAD_REQUEST), +Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST), +Self::CastFailed => Some(StatusCode::BAD_REQUEST), +Self::ClientTokenConflict => Some(StatusCode::CONFLICT), +Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST), +Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT), +Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST), +Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST), +Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN), +Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST), +Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST), +Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST), +Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST), +Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST), +Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), +Self::ExpiredToken => Some(StatusCode::BAD_REQUEST), +Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST), +Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST), +Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST), +Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST), +Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST), +Self::IncompleteBody => Some(StatusCode::BAD_REQUEST), +Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST), +Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST), +Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST), +Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST), +Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST), +Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR), +Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN), +Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST), +Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST), +Self::InvalidAddressingHeader => None, +Self::InvalidArgument => Some(StatusCode::BAD_REQUEST), +Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST), +Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST), +Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST), +Self::InvalidBucketState => Some(StatusCode::CONFLICT), +Self::InvalidCast => Some(StatusCode::BAD_REQUEST), +Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST), +Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST), +Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST), +Self::InvalidDataType => Some(StatusCode::BAD_REQUEST), +Self::InvalidDigest => Some(StatusCode::BAD_REQUEST), +Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST), +Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST), +Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST), +Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST), +Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST), +Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST), +Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST), +Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST), +Self::InvalidObjectState => Some(StatusCode::FORBIDDEN), +Self::InvalidPart => Some(StatusCode::BAD_REQUEST), +Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST), +Self::InvalidPayer => Some(StatusCode::FORBIDDEN), +Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST), +Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST), +Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE), +Self::InvalidRegion => Some(StatusCode::FORBIDDEN), +Self::InvalidRequest => Some(StatusCode::BAD_REQUEST), +Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST), +Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST), +Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST), +Self::InvalidSecurity => Some(StatusCode::FORBIDDEN), +Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST), +Self::InvalidSignature => Some(StatusCode::BAD_REQUEST), +Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST), +Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST), +Self::InvalidTag => Some(StatusCode::BAD_REQUEST), +Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST), +Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST), +Self::InvalidToken => Some(StatusCode::BAD_REQUEST), +Self::InvalidURI => Some(StatusCode::BAD_REQUEST), +Self::JSONParsingError => Some(StatusCode::BAD_REQUEST), +Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST), +Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST), +Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST), +Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST), +Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST), +Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST), +Self::MalformedACLError => Some(StatusCode::BAD_REQUEST), +Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST), +Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST), +Self::MalformedXML => Some(StatusCode::BAD_REQUEST), +Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST), +Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST), +Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST), +Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST), +Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED), +Self::MissingAttachment => None, +Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN), +Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED), +Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST), +Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST), +Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST), +Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST), +Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST), +Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST), +Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND), +Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND), +Self::NoSuchBucket => Some(StatusCode::NOT_FOUND), +Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND), +Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND), +Self::NoSuchKey => Some(StatusCode::NOT_FOUND), +Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND), +Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND), +Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND), +Self::NoSuchResource => Some(StatusCode::NOT_FOUND), +Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND), +Self::NoSuchUpload => Some(StatusCode::NOT_FOUND), +Self::NoSuchVersion => Some(StatusCode::NOT_FOUND), +Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND), +Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND), +Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST), +Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED), +Self::NotModified => Some(StatusCode::NOT_MODIFIED), +Self::NotSignedUp => Some(StatusCode::FORBIDDEN), +Self::NumberFormatError => Some(StatusCode::BAD_REQUEST), +Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), +Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST), +Self::OperationAborted => Some(StatusCode::CONFLICT), +Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST), +Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST), +Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST), +Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND), +Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST), +Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST), +Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST), +Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST), +Self::ParseCastArity => Some(StatusCode::BAD_REQUEST), +Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST), +Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST), +Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST), +Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST), +Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST), +Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST), +Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST), +Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST), +Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST), +Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST), +Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST), +Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST), +Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST), +Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST), +Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST), +Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST), +Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY), +Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY), +Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED), +Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT), +Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), +Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST), +Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST), +Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN), +Self::RequestTimeout => Some(StatusCode::BAD_REQUEST), +Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST), +Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST), +Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT), +Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST), +Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE), +Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN), +Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE), +Self::TagPolicyException => Some(StatusCode::BAD_REQUEST), +Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT), +Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST), +Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST), +Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST), +Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST), +Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST), +Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST), +Self::TooManyTags => Some(StatusCode::BAD_REQUEST), +Self::TruncatedInput => Some(StatusCode::BAD_REQUEST), +Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED), +Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN), +Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST), +Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN), +Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST), +Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST), +Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST), +Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST), +Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST), +Self::Custom(_) => None, +} +} + } diff --git a/crates/s3s/src/header/generated.rs b/crates/s3s/src/header/generated.rs index bb971eeb..7521e294 100644 --- a/crates/s3s/src/header/generated.rs +++ b/crates/s3s/src/header/generated.rs @@ -82,8 +82,7 @@ pub const X_AMZ_CHECKSUM_SHA256: HeaderName = HeaderName::from_static("x-amz-che pub const X_AMZ_CHECKSUM_TYPE: HeaderName = HeaderName::from_static("x-amz-checksum-type"); -pub const X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS: HeaderName = - HeaderName::from_static("x-amz-confirm-remove-self-bucket-access"); +pub const X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS: HeaderName = HeaderName::from_static("x-amz-confirm-remove-self-bucket-access"); pub const X_AMZ_CONTENT_SHA256: HeaderName = HeaderName::from_static("x-amz-content-sha256"); @@ -99,14 +98,11 @@ pub const X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE: HeaderName = HeaderName::from_s pub const X_AMZ_COPY_SOURCE_RANGE: HeaderName = HeaderName::from_static("x-amz-copy-source-range"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = - HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-algorithm"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-algorithm"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = - HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = - HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key-md5"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key-md5"); pub const X_AMZ_COPY_SOURCE_VERSION_ID: HeaderName = HeaderName::from_static("x-amz-copy-source-version-id"); @@ -150,8 +146,7 @@ pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32: HeaderName = HeaderName::from_s pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc32c"); -pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc64nvme"); +pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc64nvme"); pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-sha1"); @@ -165,36 +160,27 @@ pub const X_AMZ_FWD_HEADER_X_AMZ_MISSING_META: HeaderName = HeaderName::from_sta pub const X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-mp-parts-count"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-legal-hold"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-legal-hold"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-mode"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-mode"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-retain-until-date"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-retain-until-date"); -pub const X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-replication-status"); +pub const X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-replication-status"); pub const X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-request-charged"); pub const X_AMZ_FWD_HEADER_X_AMZ_RESTORE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-restore"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"); pub const X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-storage-class"); @@ -270,22 +256,17 @@ pub const X_AMZ_SDK_CHECKSUM_ALGORITHM: HeaderName = HeaderName::from_static("x- pub const X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = HeaderName::from_static("x-amz-server-side-encryption"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-aws-kms-key-id"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-aws-kms-key-id"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-bucket-key-enabled"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-bucket-key-enabled"); pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-context"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-customer-key"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-key"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-customer-key-md5"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-key-md5"); pub const X_AMZ_SKIP_DESTINATION_VALIDATION: HeaderName = HeaderName::from_static("x-amz-skip-destination-validation"); @@ -299,11 +280,11 @@ pub const X_AMZ_TAGGING_COUNT: HeaderName = HeaderName::from_static("x-amz-taggi pub const X_AMZ_TAGGING_DIRECTIVE: HeaderName = HeaderName::from_static("x-amz-tagging-directive"); -pub const X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: HeaderName = - HeaderName::from_static("x-amz-transition-default-minimum-object-size"); +pub const X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: HeaderName = HeaderName::from_static("x-amz-transition-default-minimum-object-size"); pub const X_AMZ_VERSION_ID: HeaderName = HeaderName::from_static("x-amz-version-id"); pub const X_AMZ_WEBSITE_REDIRECT_LOCATION: HeaderName = HeaderName::from_static("x-amz-website-redirect-location"); pub const X_AMZ_WRITE_OFFSET_BYTES: HeaderName = HeaderName::from_static("x-amz-write-offset-bytes"); + diff --git a/crates/s3s/src/header/generated_minio.rs b/crates/s3s/src/header/generated_minio.rs index d626f30d..d932df97 100644 --- a/crates/s3s/src/header/generated_minio.rs +++ b/crates/s3s/src/header/generated_minio.rs @@ -82,8 +82,7 @@ pub const X_AMZ_CHECKSUM_SHA256: HeaderName = HeaderName::from_static("x-amz-che pub const X_AMZ_CHECKSUM_TYPE: HeaderName = HeaderName::from_static("x-amz-checksum-type"); -pub const X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS: HeaderName = - HeaderName::from_static("x-amz-confirm-remove-self-bucket-access"); +pub const X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS: HeaderName = HeaderName::from_static("x-amz-confirm-remove-self-bucket-access"); pub const X_AMZ_CONTENT_SHA256: HeaderName = HeaderName::from_static("x-amz-content-sha256"); @@ -99,14 +98,11 @@ pub const X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE: HeaderName = HeaderName::from_s pub const X_AMZ_COPY_SOURCE_RANGE: HeaderName = HeaderName::from_static("x-amz-copy-source-range"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = - HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-algorithm"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-algorithm"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = - HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = - HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key-md5"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key-md5"); pub const X_AMZ_COPY_SOURCE_VERSION_ID: HeaderName = HeaderName::from_static("x-amz-copy-source-version-id"); @@ -150,8 +146,7 @@ pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32: HeaderName = HeaderName::from_s pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc32c"); -pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc64nvme"); +pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc64nvme"); pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-sha1"); @@ -165,36 +160,27 @@ pub const X_AMZ_FWD_HEADER_X_AMZ_MISSING_META: HeaderName = HeaderName::from_sta pub const X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-mp-parts-count"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-legal-hold"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-legal-hold"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-mode"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-mode"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-retain-until-date"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-retain-until-date"); -pub const X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-replication-status"); +pub const X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-replication-status"); pub const X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-request-charged"); pub const X_AMZ_FWD_HEADER_X_AMZ_RESTORE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-restore"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = - HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"); pub const X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-storage-class"); @@ -270,22 +256,17 @@ pub const X_AMZ_SDK_CHECKSUM_ALGORITHM: HeaderName = HeaderName::from_static("x- pub const X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = HeaderName::from_static("x-amz-server-side-encryption"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-aws-kms-key-id"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-aws-kms-key-id"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-bucket-key-enabled"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-bucket-key-enabled"); pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-context"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-customer-key"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-key"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = - HeaderName::from_static("x-amz-server-side-encryption-customer-key-md5"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-key-md5"); pub const X_AMZ_SKIP_DESTINATION_VALIDATION: HeaderName = HeaderName::from_static("x-amz-skip-destination-validation"); @@ -299,8 +280,7 @@ pub const X_AMZ_TAGGING_COUNT: HeaderName = HeaderName::from_static("x-amz-taggi pub const X_AMZ_TAGGING_DIRECTIVE: HeaderName = HeaderName::from_static("x-amz-tagging-directive"); -pub const X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: HeaderName = - HeaderName::from_static("x-amz-transition-default-minimum-object-size"); +pub const X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: HeaderName = HeaderName::from_static("x-amz-transition-default-minimum-object-size"); pub const X_AMZ_VERSION_ID: HeaderName = HeaderName::from_static("x-amz-version-id"); @@ -309,3 +289,4 @@ pub const X_AMZ_WEBSITE_REDIRECT_LOCATION: HeaderName = HeaderName::from_static( pub const X_AMZ_WRITE_OFFSET_BYTES: HeaderName = HeaderName::from_static("x-amz-write-offset-bytes"); pub const X_MINIO_FORCE_DELETE: HeaderName = HeaderName::from_static("x-minio-force-delete"); + diff --git a/crates/s3s/src/ops/generated.rs b/crates/s3s/src/ops/generated.rs index 9880c654..92149787 100644 --- a/crates/s3s/src/ops/generated.rs +++ b/crates/s3s/src/ops/generated.rs @@ -108,6575 +108,6786 @@ #![allow(clippy::unnecessary_wraps)] use crate::dto::*; -use crate::error::*; use crate::header::*; use crate::http; -use crate::ops::CallContext; +use crate::error::*; use crate::path::S3Path; +use crate::ops::CallContext; use std::borrow::Cow; impl http::TryIntoHeaderValue for ArchiveStatus { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for BucketCannedACL { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ChecksumAlgorithm { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ChecksumMode { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ChecksumType { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for LocationType { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for MetadataDirective { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectAttributes { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectCannedACL { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectLockLegalHoldStatus { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectLockMode { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ObjectOwnership { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for OptionalObjectAttributes { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ReplicationStatus { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for RequestCharged { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for RequestPayer { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for ServerSideEncryption { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for SessionMode { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for StorageClass { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for TaggingDirective { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryIntoHeaderValue for TransitionDefaultMinimumObjectSize { - type Error = http::InvalidHeaderValue; - fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), - } +type Error = http::InvalidHeaderValue; +fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), } } +} impl http::TryFromHeaderValue for ArchiveStatus { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for BucketCannedACL { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ChecksumAlgorithm { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ChecksumMode { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ChecksumType { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for LocationType { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for MetadataDirective { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectAttributes { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectCannedACL { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectLockLegalHoldStatus { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectLockMode { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ObjectOwnership { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for OptionalObjectAttributes { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ReplicationStatus { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for RequestCharged { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for RequestPayer { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for ServerSideEncryption { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for SessionMode { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for StorageClass { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for TaggingDirective { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } impl http::TryFromHeaderValue for TransitionDefaultMinimumObjectSize { - type Error = http::ParseHeaderError; - fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) - } +type Error = http::ParseHeaderError; +fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) +} } pub struct AbortMultipartUpload; impl AbortMultipartUpload { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let if_match_initiated_time: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_INITIATED_TIME, TimestampFormat::HttpDate)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let if_match_initiated_time: Option = http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_INITIATED_TIME, TimestampFormat::HttpDate)?; - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - Ok(AbortMultipartUploadInput { - bucket, - expected_bucket_owner, - if_match_initiated_time, - key, - request_payer, - upload_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(AbortMultipartUploadInput { +bucket, +expected_bucket_owner, +if_match_initiated_time, +key, +request_payer, +upload_id, +}) +} + + +pub fn serialize_http(x: AbortMultipartUploadOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: AbortMultipartUploadOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for AbortMultipartUpload { - fn name(&self) -> &'static str { - "AbortMultipartUpload" - } +fn name(&self) -> &'static str { +"AbortMultipartUpload" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.abort_multipart_upload(&mut s3_req).await?; - } - let result = s3.abort_multipart_upload(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.abort_multipart_upload(&mut s3_req).await?; +} +let result = s3.abort_multipart_upload(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CompleteMultipartUpload; impl CompleteMultipartUpload { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; +let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; +let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; - let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; +let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; - let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; +let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; - let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; +let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - let mpu_object_size: Option = http::parse_opt_header(req, &X_AMZ_MP_OBJECT_SIZE)?; +let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - let multipart_upload: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); - } - Err(e) => return Err(e), - }; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - - Ok(CompleteMultipartUploadInput { - bucket, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - checksum_type, - expected_bucket_owner, - if_match, - if_none_match, - key, - mpu_object_size, - multipart_upload, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) +let mpu_object_size: Option = http::parse_opt_header(req, &X_AMZ_MP_OBJECT_SIZE)?; + +let multipart_upload: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); } + Err(e) => return Err(e), +}; + +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(CompleteMultipartUploadInput { +bucket, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +checksum_type, +expected_bucket_owner, +if_match, +if_none_match, +key, +mpu_object_size, +multipart_upload, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + + } #[async_trait::async_trait] impl super::Operation for CompleteMultipartUpload { - fn name(&self) -> &'static str { - "CompleteMultipartUpload" - } +fn name(&self) -> &'static str { +"CompleteMultipartUpload" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.complete_multipart_upload(&mut s3_req).await?; - } - let result = s3.complete_multipart_upload(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.complete_multipart_upload(&mut s3_req).await?; +} +let result = s3.complete_multipart_upload(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CopyObject; impl CopyObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; - let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; +let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; - let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; +let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; - let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; +let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; - let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; +let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; - let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; +let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; - let copy_source_if_modified_since: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; +let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; - let copy_source_if_none_match: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; +let copy_source_if_modified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - let copy_source_if_unmodified_since: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; +let copy_source_if_none_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; - let copy_source_sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let copy_source_if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; - let copy_source_sse_customer_key: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let copy_source_sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let copy_source_sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let copy_source_sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let copy_source_sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; +let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let metadata: Option = http::parse_opt_metadata(req)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let metadata_directive: Option = http::parse_opt_header(req, &X_AMZ_METADATA_DIRECTIVE)?; - let object_lock_legal_hold_status: Option = - http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; +let metadata: Option = http::parse_opt_metadata(req)?; - let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; +let metadata_directive: Option = http::parse_opt_header(req, &X_AMZ_METADATA_DIRECTIVE)?; - let object_lock_retain_until_date: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; +let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let ssekms_encryption_context: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; +let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; - let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; - let tagging_directive: Option = http::parse_opt_header(req, &X_AMZ_TAGGING_DIRECTIVE)?; +let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; - let website_redirect_location: Option = - http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; +let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; - Ok(CopyObjectInput { - acl, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - content_disposition, - content_encoding, - content_language, - content_type, - copy_source, - copy_source_if_match, - copy_source_if_modified_since, - copy_source_if_none_match, - copy_source_if_unmodified_since, - copy_source_sse_customer_algorithm, - copy_source_sse_customer_key, - copy_source_sse_customer_key_md5, - expected_bucket_owner, - expected_source_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - key, - metadata, - metadata_directive, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - tagging_directive, - website_redirect_location, - }) - } +let tagging_directive: Option = http::parse_opt_header(req, &X_AMZ_TAGGING_DIRECTIVE)?; + +let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; + +Ok(CopyObjectInput { +acl, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +content_disposition, +content_encoding, +content_language, +content_type, +copy_source, +copy_source_if_match, +copy_source_if_modified_since, +copy_source_if_none_match, +copy_source_if_unmodified_since, +copy_source_sse_customer_algorithm, +copy_source_sse_customer_key, +copy_source_sse_customer_key_md5, +expected_bucket_owner, +expected_source_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +key, +metadata, +metadata_directive, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +tagging_directive, +website_redirect_location, +}) +} + + +pub fn serialize_http(x: CopyObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.copy_object_result { + http::set_xml_body(&mut res, val)?; +} +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; +http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: CopyObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.copy_object_result { - http::set_xml_body(&mut res, val)?; - } - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; - http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for CopyObject { - fn name(&self) -> &'static str { - "CopyObject" - } +fn name(&self) -> &'static str { +"CopyObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.copy_object(&mut s3_req).await?; - } - let result = s3.copy_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.copy_object(&mut s3_req).await?; +} +let result = s3.copy_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CreateBucket; impl CreateBucket { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let create_bucket_configuration: Option = http::take_opt_xml_body(req)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let create_bucket_configuration: Option = http::take_opt_xml_body(req)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; - let object_lock_enabled_for_bucket: Option = - http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_ENABLED)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let object_ownership: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_OWNERSHIP)?; +let object_lock_enabled_for_bucket: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_ENABLED)?; - Ok(CreateBucketInput { - acl, - bucket, - create_bucket_configuration, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - object_lock_enabled_for_bucket, - object_ownership, - }) - } +let object_ownership: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_OWNERSHIP)?; + +Ok(CreateBucketInput { +acl, +bucket, +create_bucket_configuration, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +object_lock_enabled_for_bucket, +object_ownership, +}) +} + + +pub fn serialize_http(x: CreateBucketOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, LOCATION, x.location)?; +Ok(res) +} - pub fn serialize_http(x: CreateBucketOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, LOCATION, x.location)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for CreateBucket { - fn name(&self) -> &'static str { - "CreateBucket" - } +fn name(&self) -> &'static str { +"CreateBucket" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.create_bucket(&mut s3_req).await?; - } - let result = s3.create_bucket(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.create_bucket(&mut s3_req).await?; +} +let result = s3.create_bucket(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CreateBucketMetadataTableConfiguration; impl CreateBucketMetadataTableConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let metadata_table_configuration: MetadataTableConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(CreateBucketMetadataTableConfigurationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - metadata_table_configuration, - }) - } +let metadata_table_configuration: MetadataTableConfiguration = http::take_xml_body(req)?; + +Ok(CreateBucketMetadataTableConfigurationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +metadata_table_configuration, +}) +} + + +pub fn serialize_http(_: CreateBucketMetadataTableConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: CreateBucketMetadataTableConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for CreateBucketMetadataTableConfiguration { - fn name(&self) -> &'static str { - "CreateBucketMetadataTableConfiguration" - } +fn name(&self) -> &'static str { +"CreateBucketMetadataTableConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.create_bucket_metadata_table_configuration(&mut s3_req).await?; - } - let result = s3.create_bucket_metadata_table_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.create_bucket_metadata_table_configuration(&mut s3_req).await?; +} +let result = s3.create_bucket_metadata_table_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CreateMultipartUpload; impl CreateMultipartUpload { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; - let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; +let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; - let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; +let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; - let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; +let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; - let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; +let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; - let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let metadata: Option = http::parse_opt_metadata(req)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let object_lock_legal_hold_status: Option = - http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; +let metadata: Option = http::parse_opt_metadata(req)?; - let object_lock_retain_until_date: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; +let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let ssekms_encryption_context: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; +let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; - let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; - let website_redirect_location: Option = - http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; +let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; - Ok(CreateMultipartUploadInput { - acl, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_type, - content_disposition, - content_encoding, - content_language, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - website_redirect_location, - }) - } +let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; + +let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; + +Ok(CreateMultipartUploadInput { +acl, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_type, +content_disposition, +content_encoding, +content_language, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +website_redirect_location, +}) +} + + +pub fn serialize_http(x: CreateMultipartUploadOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; +http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_ALGORITHM, x.checksum_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +Ok(res) +} - pub fn serialize_http(x: CreateMultipartUploadOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; - http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_ALGORITHM, x.checksum_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for CreateMultipartUpload { - fn name(&self) -> &'static str { - "CreateMultipartUpload" - } +fn name(&self) -> &'static str { +"CreateMultipartUpload" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.create_multipart_upload(&mut s3_req).await?; - } - let result = s3.create_multipart_upload(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.create_multipart_upload(&mut s3_req).await?; +} +let result = s3.create_multipart_upload(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct CreateSession; impl CreateSession { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let ssekms_encryption_context: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; +let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; - let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - let session_mode: Option = http::parse_opt_header(req, &X_AMZ_CREATE_SESSION_MODE)?; +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; - Ok(CreateSessionInput { - bucket, - bucket_key_enabled, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - session_mode, - }) - } +let session_mode: Option = http::parse_opt_header(req, &X_AMZ_CREATE_SESSION_MODE)?; + +Ok(CreateSessionInput { +bucket, +bucket_key_enabled, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +session_mode, +}) +} + + +pub fn serialize_http(x: CreateSessionOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +Ok(res) +} - pub fn serialize_http(x: CreateSessionOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for CreateSession { - fn name(&self) -> &'static str { - "CreateSession" - } +fn name(&self) -> &'static str { +"CreateSession" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.create_session(&mut s3_req).await?; - } - let result = s3.create_session(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.create_session(&mut s3_req).await?; +} +let result = s3.create_session(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucket; impl DeleteBucket { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucket { - fn name(&self) -> &'static str { - "DeleteBucket" - } +fn name(&self) -> &'static str { +"DeleteBucket" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket(&mut s3_req).await?; - } - let result = s3.delete_bucket(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket(&mut s3_req).await?; +} +let result = s3.delete_bucket(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketAnalyticsConfiguration; impl DeleteBucketAnalyticsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: AnalyticsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketAnalyticsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: AnalyticsId = http::parse_query(req, "id")?; + +Ok(DeleteBucketAnalyticsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(_: DeleteBucketAnalyticsConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketAnalyticsConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketAnalyticsConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketAnalyticsConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketAnalyticsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_analytics_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_analytics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_analytics_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_analytics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketCors; impl DeleteBucketCors { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketCorsInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketCorsInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketCorsOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketCorsOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketCors { - fn name(&self) -> &'static str { - "DeleteBucketCors" - } +fn name(&self) -> &'static str { +"DeleteBucketCors" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_cors(&mut s3_req).await?; - } - let result = s3.delete_bucket_cors(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_cors(&mut s3_req).await?; +} +let result = s3.delete_bucket_cors(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketEncryption; impl DeleteBucketEncryption { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketEncryptionInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketEncryptionInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketEncryptionOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketEncryptionOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketEncryption { - fn name(&self) -> &'static str { - "DeleteBucketEncryption" - } +fn name(&self) -> &'static str { +"DeleteBucketEncryption" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_encryption(&mut s3_req).await?; - } - let result = s3.delete_bucket_encryption(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_encryption(&mut s3_req).await?; +} +let result = s3.delete_bucket_encryption(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketIntelligentTieringConfiguration; impl DeleteBucketIntelligentTieringConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let id: IntelligentTieringId = http::parse_query(req, "id")?; - Ok(DeleteBucketIntelligentTieringConfigurationInput { bucket, id }) - } +let id: IntelligentTieringId = http::parse_query(req, "id")?; + +Ok(DeleteBucketIntelligentTieringConfigurationInput { +bucket, +id, +}) +} + + +pub fn serialize_http(_: DeleteBucketIntelligentTieringConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketIntelligentTieringConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketIntelligentTieringConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketIntelligentTieringConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketIntelligentTieringConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_intelligent_tiering_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_intelligent_tiering_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_intelligent_tiering_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_intelligent_tiering_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketInventoryConfiguration; impl DeleteBucketInventoryConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: InventoryId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: InventoryId = http::parse_query(req, "id")?; + +Ok(DeleteBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(_: DeleteBucketInventoryConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketInventoryConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketInventoryConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketInventoryConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketInventoryConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_inventory_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_inventory_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_inventory_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_inventory_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketLifecycle; impl DeleteBucketLifecycle { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketLifecycleInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketLifecycleInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketLifecycleOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketLifecycleOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketLifecycle { - fn name(&self) -> &'static str { - "DeleteBucketLifecycle" - } +fn name(&self) -> &'static str { +"DeleteBucketLifecycle" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_lifecycle(&mut s3_req).await?; - } - let result = s3.delete_bucket_lifecycle(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_lifecycle(&mut s3_req).await?; +} +let result = s3.delete_bucket_lifecycle(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketMetadataTableConfiguration; impl DeleteBucketMetadataTableConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketMetadataTableConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketMetadataTableConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketMetadataTableConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketMetadataTableConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketMetadataTableConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketMetadataTableConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketMetadataTableConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_metadata_table_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_metadata_table_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_metadata_table_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_metadata_table_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketMetricsConfiguration; impl DeleteBucketMetricsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: MetricsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: MetricsId = http::parse_query(req, "id")?; + +Ok(DeleteBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(_: DeleteBucketMetricsConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketMetricsConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketMetricsConfiguration { - fn name(&self) -> &'static str { - "DeleteBucketMetricsConfiguration" - } +fn name(&self) -> &'static str { +"DeleteBucketMetricsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_metrics_configuration(&mut s3_req).await?; - } - let result = s3.delete_bucket_metrics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_metrics_configuration(&mut s3_req).await?; +} +let result = s3.delete_bucket_metrics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketOwnershipControls; impl DeleteBucketOwnershipControls { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketOwnershipControlsInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketOwnershipControlsInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketOwnershipControlsOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketOwnershipControlsOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketOwnershipControls { - fn name(&self) -> &'static str { - "DeleteBucketOwnershipControls" - } +fn name(&self) -> &'static str { +"DeleteBucketOwnershipControls" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_ownership_controls(&mut s3_req).await?; - } - let result = s3.delete_bucket_ownership_controls(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_ownership_controls(&mut s3_req).await?; +} +let result = s3.delete_bucket_ownership_controls(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketPolicy; impl DeleteBucketPolicy { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketPolicyInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - pub fn serialize_http(_: DeleteBucketPolicyOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } +Ok(DeleteBucketPolicyInput { +bucket, +expected_bucket_owner, +}) } -#[async_trait::async_trait] -impl super::Operation for DeleteBucketPolicy { - fn name(&self) -> &'static str { - "DeleteBucketPolicy" - } - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_policy(&mut s3_req).await?; - } - let result = s3.delete_bucket_policy(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +pub fn serialize_http(_: DeleteBucketPolicyOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} + +} + +#[async_trait::async_trait] +impl super::Operation for DeleteBucketPolicy { +fn name(&self) -> &'static str { +"DeleteBucketPolicy" +} + +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_policy(&mut s3_req).await?; +} +let result = s3.delete_bucket_policy(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketReplication; impl DeleteBucketReplication { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketReplicationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketReplicationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketReplicationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketReplicationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketReplication { - fn name(&self) -> &'static str { - "DeleteBucketReplication" - } +fn name(&self) -> &'static str { +"DeleteBucketReplication" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_replication(&mut s3_req).await?; - } - let result = s3.delete_bucket_replication(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_replication(&mut s3_req).await?; +} +let result = s3.delete_bucket_replication(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketTagging; impl DeleteBucketTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketTaggingInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketTaggingInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketTaggingOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketTaggingOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketTagging { - fn name(&self) -> &'static str { - "DeleteBucketTagging" - } +fn name(&self) -> &'static str { +"DeleteBucketTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_tagging(&mut s3_req).await?; - } - let result = s3.delete_bucket_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_tagging(&mut s3_req).await?; +} +let result = s3.delete_bucket_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteBucketWebsite; impl DeleteBucketWebsite { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteBucketWebsiteInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeleteBucketWebsiteInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeleteBucketWebsiteOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeleteBucketWebsiteOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeleteBucketWebsite { - fn name(&self) -> &'static str { - "DeleteBucketWebsite" - } +fn name(&self) -> &'static str { +"DeleteBucketWebsite" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_bucket_website(&mut s3_req).await?; - } - let result = s3.delete_bucket_website(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_bucket_website(&mut s3_req).await?; +} +let result = s3.delete_bucket_website(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteObject; impl DeleteObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let bypass_governance_retention: Option = - http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let if_match_last_modified_time: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_LAST_MODIFIED_TIME, TimestampFormat::HttpDate)?; +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - let if_match_size: Option = http::parse_opt_header(req, &X_AMZ_IF_MATCH_SIZE)?; +let if_match_last_modified_time: Option = http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_LAST_MODIFIED_TIME, TimestampFormat::HttpDate)?; - let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; +let if_match_size: Option = http::parse_opt_header(req, &X_AMZ_IF_MATCH_SIZE)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; - Ok(DeleteObjectInput { - bucket, - bypass_governance_retention, - expected_bucket_owner, - if_match, - if_match_last_modified_time, - if_match_size, - key, - mfa, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(DeleteObjectInput { +bucket, +bypass_governance_retention, +expected_bucket_owner, +if_match, +if_match_last_modified_time, +if_match_size, +key, +mfa, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: DeleteObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); +http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: DeleteObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); - http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for DeleteObject { - fn name(&self) -> &'static str { - "DeleteObject" - } +fn name(&self) -> &'static str { +"DeleteObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_object(&mut s3_req).await?; - } - let result = s3.delete_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_object(&mut s3_req).await?; +} +let result = s3.delete_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteObjectTagging; impl DeleteObjectTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeleteObjectTaggingInput { - bucket, - expected_bucket_owner, - key, - version_id, - }) - } - pub fn serialize_http(x: DeleteObjectTaggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(DeleteObjectTaggingInput { +bucket, +expected_bucket_owner, +key, +version_id, +}) +} + + +pub fn serialize_http(x: DeleteObjectTaggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} + } #[async_trait::async_trait] impl super::Operation for DeleteObjectTagging { - fn name(&self) -> &'static str { - "DeleteObjectTagging" - } +fn name(&self) -> &'static str { +"DeleteObjectTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_object_tagging(&mut s3_req).await?; - } - let result = s3.delete_object_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_object_tagging(&mut s3_req).await?; +} +let result = s3.delete_object_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeleteObjects; impl DeleteObjects { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let bypass_governance_retention: Option = - http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let delete: Delete = http::take_xml_body(req)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let delete: Delete = http::take_xml_body(req)?; - let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; - Ok(DeleteObjectsInput { - bucket, - bypass_governance_retention, - checksum_algorithm, - delete, - expected_bucket_owner, - mfa, - request_payer, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +Ok(DeleteObjectsInput { +bucket, +bypass_governance_retention, +checksum_algorithm, +delete, +expected_bucket_owner, +mfa, +request_payer, +}) +} + + +pub fn serialize_http(x: DeleteObjectsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: DeleteObjectsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for DeleteObjects { - fn name(&self) -> &'static str { - "DeleteObjects" - } +fn name(&self) -> &'static str { +"DeleteObjects" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_objects(&mut s3_req).await?; - } - let result = s3.delete_objects(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_objects(&mut s3_req).await?; +} +let result = s3.delete_objects(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct DeletePublicAccessBlock; impl DeletePublicAccessBlock { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(DeletePublicAccessBlockInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(DeletePublicAccessBlockInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: DeletePublicAccessBlockOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: DeletePublicAccessBlockOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for DeletePublicAccessBlock { - fn name(&self) -> &'static str { - "DeletePublicAccessBlock" - } +fn name(&self) -> &'static str { +"DeletePublicAccessBlock" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.delete_public_access_block(&mut s3_req).await?; - } - let result = s3.delete_public_access_block(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.delete_public_access_block(&mut s3_req).await?; +} +let result = s3.delete_public_access_block(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketAccelerateConfiguration; impl GetBucketAccelerateConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketAccelerateConfigurationInput { - bucket, - expected_bucket_owner, - request_payer, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +Ok(GetBucketAccelerateConfigurationInput { +bucket, +expected_bucket_owner, +request_payer, +}) +} + + +pub fn serialize_http(x: GetBucketAccelerateConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketAccelerateConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketAccelerateConfiguration { - fn name(&self) -> &'static str { - "GetBucketAccelerateConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketAccelerateConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_accelerate_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_accelerate_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_accelerate_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_accelerate_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketAcl; impl GetBucketAcl { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketAclInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketAclInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketAclOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketAclOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketAcl { - fn name(&self) -> &'static str { - "GetBucketAcl" - } +fn name(&self) -> &'static str { +"GetBucketAcl" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_acl(&mut s3_req).await?; - } - let result = s3.get_bucket_acl(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_acl(&mut s3_req).await?; +} +let result = s3.get_bucket_acl(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketAnalyticsConfiguration; impl GetBucketAnalyticsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: AnalyticsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketAnalyticsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: AnalyticsId = http::parse_query(req, "id")?; + +Ok(GetBucketAnalyticsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(x: GetBucketAnalyticsConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.analytics_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketAnalyticsConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.analytics_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketAnalyticsConfiguration { - fn name(&self) -> &'static str { - "GetBucketAnalyticsConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketAnalyticsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_analytics_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_analytics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_analytics_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_analytics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketCors; impl GetBucketCors { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketCorsInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketCorsInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketCorsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketCorsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketCors { - fn name(&self) -> &'static str { - "GetBucketCors" - } +fn name(&self) -> &'static str { +"GetBucketCors" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_cors(&mut s3_req).await?; - } - let result = s3.get_bucket_cors(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_cors(&mut s3_req).await?; +} +let result = s3.get_bucket_cors(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketEncryption; impl GetBucketEncryption { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketEncryptionInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketEncryptionInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketEncryptionOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.server_side_encryption_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketEncryptionOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.server_side_encryption_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketEncryption { - fn name(&self) -> &'static str { - "GetBucketEncryption" - } +fn name(&self) -> &'static str { +"GetBucketEncryption" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_encryption(&mut s3_req).await?; - } - let result = s3.get_bucket_encryption(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_encryption(&mut s3_req).await?; +} +let result = s3.get_bucket_encryption(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketIntelligentTieringConfiguration; impl GetBucketIntelligentTieringConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let id: IntelligentTieringId = http::parse_query(req, "id")?; - Ok(GetBucketIntelligentTieringConfigurationInput { bucket, id }) - } +let id: IntelligentTieringId = http::parse_query(req, "id")?; + +Ok(GetBucketIntelligentTieringConfigurationInput { +bucket, +id, +}) +} + + +pub fn serialize_http(x: GetBucketIntelligentTieringConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.intelligent_tiering_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketIntelligentTieringConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.intelligent_tiering_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketIntelligentTieringConfiguration { - fn name(&self) -> &'static str { - "GetBucketIntelligentTieringConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketIntelligentTieringConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_intelligent_tiering_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_intelligent_tiering_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_intelligent_tiering_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_intelligent_tiering_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketInventoryConfiguration; impl GetBucketInventoryConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: InventoryId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: InventoryId = http::parse_query(req, "id")?; + +Ok(GetBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(x: GetBucketInventoryConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.inventory_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketInventoryConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.inventory_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketInventoryConfiguration { - fn name(&self) -> &'static str { - "GetBucketInventoryConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketInventoryConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_inventory_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_inventory_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_inventory_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_inventory_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketLifecycleConfiguration; impl GetBucketLifecycleConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketLifecycleConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketLifecycleConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketLifecycleConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, x.transition_default_minimum_object_size)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketLifecycleConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header( - &mut res, - X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, - x.transition_default_minimum_object_size, - )?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketLifecycleConfiguration { - fn name(&self) -> &'static str { - "GetBucketLifecycleConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketLifecycleConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_lifecycle_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_lifecycle_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_lifecycle_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_lifecycle_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketLocation; impl GetBucketLocation { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketLocationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketLocationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketLocationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketLocationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketLocation { - fn name(&self) -> &'static str { - "GetBucketLocation" - } +fn name(&self) -> &'static str { +"GetBucketLocation" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_location(&mut s3_req).await?; - } - let result = s3.get_bucket_location(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_location(&mut s3_req).await?; +} +let result = s3.get_bucket_location(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketLogging; impl GetBucketLogging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketLoggingInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketLoggingInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketLoggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketLoggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketLogging { - fn name(&self) -> &'static str { - "GetBucketLogging" - } +fn name(&self) -> &'static str { +"GetBucketLogging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_logging(&mut s3_req).await?; - } - let result = s3.get_bucket_logging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_logging(&mut s3_req).await?; +} +let result = s3.get_bucket_logging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketMetadataTableConfiguration; impl GetBucketMetadataTableConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketMetadataTableConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketMetadataTableConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketMetadataTableConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.get_bucket_metadata_table_configuration_result { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketMetadataTableConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.get_bucket_metadata_table_configuration_result { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketMetadataTableConfiguration { - fn name(&self) -> &'static str { - "GetBucketMetadataTableConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketMetadataTableConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_metadata_table_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_metadata_table_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_metadata_table_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_metadata_table_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketMetricsConfiguration; impl GetBucketMetricsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: MetricsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - }) - } +let id: MetricsId = http::parse_query(req, "id")?; + +Ok(GetBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(x: GetBucketMetricsConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.metrics_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketMetricsConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.metrics_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketMetricsConfiguration { - fn name(&self) -> &'static str { - "GetBucketMetricsConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketMetricsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_metrics_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_metrics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_metrics_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_metrics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketNotificationConfiguration; impl GetBucketNotificationConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketNotificationConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketNotificationConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketNotificationConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketNotificationConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketNotificationConfiguration { - fn name(&self) -> &'static str { - "GetBucketNotificationConfiguration" - } +fn name(&self) -> &'static str { +"GetBucketNotificationConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_notification_configuration(&mut s3_req).await?; - } - let result = s3.get_bucket_notification_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_notification_configuration(&mut s3_req).await?; +} +let result = s3.get_bucket_notification_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketOwnershipControls; impl GetBucketOwnershipControls { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketOwnershipControlsInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketOwnershipControlsInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketOwnershipControlsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.ownership_controls { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketOwnershipControlsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.ownership_controls { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketOwnershipControls { - fn name(&self) -> &'static str { - "GetBucketOwnershipControls" - } +fn name(&self) -> &'static str { +"GetBucketOwnershipControls" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_ownership_controls(&mut s3_req).await?; - } - let result = s3.get_bucket_ownership_controls(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_ownership_controls(&mut s3_req).await?; +} +let result = s3.get_bucket_ownership_controls(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketPolicy; impl GetBucketPolicy { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketPolicyInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketPolicyInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketPolicyOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(val) = x.policy { +res.body = http::Body::from(val); +} +Ok(res) +} - pub fn serialize_http(x: GetBucketPolicyOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(val) = x.policy { - res.body = http::Body::from(val); - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketPolicy { - fn name(&self) -> &'static str { - "GetBucketPolicy" - } +fn name(&self) -> &'static str { +"GetBucketPolicy" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_policy(&mut s3_req).await?; - } - let result = s3.get_bucket_policy(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_policy(&mut s3_req).await?; +} +let result = s3.get_bucket_policy(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketPolicyStatus; impl GetBucketPolicyStatus { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketPolicyStatusInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketPolicyStatusInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketPolicyStatusOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.policy_status { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketPolicyStatusOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.policy_status { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketPolicyStatus { - fn name(&self) -> &'static str { - "GetBucketPolicyStatus" - } +fn name(&self) -> &'static str { +"GetBucketPolicyStatus" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_policy_status(&mut s3_req).await?; - } - let result = s3.get_bucket_policy_status(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_policy_status(&mut s3_req).await?; +} +let result = s3.get_bucket_policy_status(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketReplication; impl GetBucketReplication { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketReplicationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketReplicationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketReplicationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.replication_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetBucketReplicationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.replication_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketReplication { - fn name(&self) -> &'static str { - "GetBucketReplication" - } +fn name(&self) -> &'static str { +"GetBucketReplication" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_replication(&mut s3_req).await?; - } - let result = s3.get_bucket_replication(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_replication(&mut s3_req).await?; +} +let result = s3.get_bucket_replication(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketRequestPayment; impl GetBucketRequestPayment { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketRequestPaymentInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketRequestPaymentInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketRequestPaymentOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketRequestPaymentOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketRequestPayment { - fn name(&self) -> &'static str { - "GetBucketRequestPayment" - } +fn name(&self) -> &'static str { +"GetBucketRequestPayment" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_request_payment(&mut s3_req).await?; - } - let result = s3.get_bucket_request_payment(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_request_payment(&mut s3_req).await?; +} +let result = s3.get_bucket_request_payment(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketTagging; impl GetBucketTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketTaggingInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketTaggingInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketTaggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketTaggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketTagging { - fn name(&self) -> &'static str { - "GetBucketTagging" - } +fn name(&self) -> &'static str { +"GetBucketTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_tagging(&mut s3_req).await?; - } - let result = s3.get_bucket_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_tagging(&mut s3_req).await?; +} +let result = s3.get_bucket_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketVersioning; impl GetBucketVersioning { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); + + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketVersioningInput { +bucket, +expected_bucket_owner, +}) +} - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketVersioningInput { - bucket, - expected_bucket_owner, - }) - } +pub fn serialize_http(x: GetBucketVersioningOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketVersioningOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketVersioning { - fn name(&self) -> &'static str { - "GetBucketVersioning" - } +fn name(&self) -> &'static str { +"GetBucketVersioning" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_versioning(&mut s3_req).await?; - } - let result = s3.get_bucket_versioning(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_versioning(&mut s3_req).await?; +} +let result = s3.get_bucket_versioning(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetBucketWebsite; impl GetBucketWebsite { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetBucketWebsiteInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetBucketWebsiteInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetBucketWebsiteOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: GetBucketWebsiteOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetBucketWebsite { - fn name(&self) -> &'static str { - "GetBucketWebsite" - } +fn name(&self) -> &'static str { +"GetBucketWebsite" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_bucket_website(&mut s3_req).await?; - } - let result = s3.get_bucket_website(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_bucket_website(&mut s3_req).await?; +} +let result = s3.get_bucket_website(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObject; impl GetObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let if_modified_since: Option = - http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + +let if_modified_since: Option = http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + +let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + +let if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; - let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - let if_unmodified_since: Option = - http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; +let part_number: Option = http::parse_opt_query(req, "partNumber")?; - let part_number: Option = http::parse_opt_query(req, "partNumber")?; +let range: Option = http::parse_opt_header(req, &RANGE)?; - let range: Option = http::parse_opt_header(req, &RANGE)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; - let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; +let response_content_disposition: Option = http::parse_opt_query(req, "response-content-disposition")?; - let response_content_disposition: Option = - http::parse_opt_query(req, "response-content-disposition")?; +let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; - let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; +let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; - let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; +let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; - let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; +let response_expires: Option = http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; - let response_expires: Option = - http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let version_id: Option = http::parse_opt_query(req, "versionId")?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +Ok(GetObjectInput { +bucket, +checksum_mode, +expected_bucket_owner, +if_match, +if_modified_since, +if_none_match, +if_unmodified_since, +key, +part_number, +range, +request_payer, +response_cache_control, +response_content_disposition, +response_content_encoding, +response_content_language, +response_content_type, +response_expires, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} - Ok(GetObjectInput { - bucket, - checksum_mode, - expected_bucket_owner, - if_match, - if_modified_since, - if_none_match, - if_unmodified_since, - key, - part_number, - range, - request_payer, - response_cache_control, - response_content_disposition, - response_content_encoding, - response_content_language, - response_content_type, - response_expires, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } - pub fn serialize_http(x: GetObjectOutput) -> S3Result { - let mut res = http::Response::default(); - if x.content_range.is_some() { - res.status = http::StatusCode::PARTIAL_CONTENT; - } - if let Some(val) = x.body { - http::set_stream_body(&mut res, val); - } - http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; - http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; - http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; - http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; - http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; - http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; - http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; - http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; - http::add_opt_header(&mut res, ETAG, x.e_tag)?; - http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; - http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; - http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; - http::add_opt_metadata(&mut res, x.metadata)?; - http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; - http::add_opt_header_timestamp( - &mut res, - X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, - x.object_lock_retain_until_date, - TimestampFormat::DateTime, - )?; - http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; - http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; - http::add_opt_header(&mut res, X_AMZ_TAGGING_COUNT, x.tag_count)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; - Ok(res) - } +pub fn serialize_http(x: GetObjectOutput) -> S3Result { +let mut res = http::Response::default(); +if x.content_range.is_some() { + res.status = http::StatusCode::PARTIAL_CONTENT; +} +if let Some(val) = x.body { +http::set_stream_body(&mut res, val); +} +http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; +http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; +http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; +http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; +http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; +http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; +http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; +http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; +http::add_opt_header(&mut res, ETAG, x.e_tag)?; +http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; +http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; +http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; +http::add_opt_metadata(&mut res, x.metadata)?; +http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; +http::add_opt_header_timestamp(&mut res, X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, x.object_lock_retain_until_date, TimestampFormat::DateTime)?; +http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; +http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; +http::add_opt_header(&mut res, X_AMZ_TAGGING_COUNT, x.tag_count)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; +Ok(res) +} + } #[async_trait::async_trait] impl super::Operation for GetObject { - fn name(&self) -> &'static str { - "GetObject" - } +fn name(&self) -> &'static str { +"GetObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object(&mut s3_req).await?; - } - let overridden_headers = super::get_object::extract_overridden_response_headers(&s3_req)?; - let result = s3.get_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(overridden_headers); - super::get_object::merge_custom_headers(&mut resp, s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object(&mut s3_req).await?; +} +let overridden_headers = super::get_object::extract_overridden_response_headers(&s3_req)?; +let result = s3.get_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(overridden_headers); +super::get_object::merge_custom_headers(&mut resp, s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectAcl; impl GetObjectAcl { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(GetObjectAclInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectAclInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectAclOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: GetObjectAclOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectAcl { - fn name(&self) -> &'static str { - "GetObjectAcl" - } +fn name(&self) -> &'static str { +"GetObjectAcl" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_acl(&mut s3_req).await?; - } - let result = s3.get_object_acl(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_acl(&mut s3_req).await?; +} +let result = s3.get_object_acl(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectAttributes; impl GetObjectAttributes { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_parts: Option = http::parse_opt_header(req, &X_AMZ_MAX_PARTS)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let object_attributes: ObjectAttributesList = http::parse_list_header(req, &X_AMZ_OBJECT_ATTRIBUTES)?; - let part_number_marker: Option = http::parse_opt_header(req, &X_AMZ_PART_NUMBER_MARKER)?; +let max_parts: Option = http::parse_opt_header(req, &X_AMZ_MAX_PARTS)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let object_attributes: ObjectAttributesList = http::parse_list_header(req, &X_AMZ_OBJECT_ATTRIBUTES)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let part_number_marker: Option = http::parse_opt_header(req, &X_AMZ_PART_NUMBER_MARKER)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(GetObjectAttributesInput { - bucket, - expected_bucket_owner, - key, - max_parts, - object_attributes, - part_number_marker, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectAttributesInput { +bucket, +expected_bucket_owner, +key, +max_parts, +object_attributes, +part_number_marker, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectAttributesOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; +http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: GetObjectAttributesOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; - http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectAttributes { - fn name(&self) -> &'static str { - "GetObjectAttributes" - } +fn name(&self) -> &'static str { +"GetObjectAttributes" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_attributes(&mut s3_req).await?; - } - let result = s3.get_object_attributes(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_attributes(&mut s3_req).await?; +} +let result = s3.get_object_attributes(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectLegalHold; impl GetObjectLegalHold { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(GetObjectLegalHoldInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectLegalHoldInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectLegalHoldOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.legal_hold { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetObjectLegalHoldOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.legal_hold { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectLegalHold { - fn name(&self) -> &'static str { - "GetObjectLegalHold" - } +fn name(&self) -> &'static str { +"GetObjectLegalHold" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_legal_hold(&mut s3_req).await?; - } - let result = s3.get_object_legal_hold(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_legal_hold(&mut s3_req).await?; +} +let result = s3.get_object_legal_hold(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectLockConfiguration; impl GetObjectLockConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetObjectLockConfigurationInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetObjectLockConfigurationInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: GetObjectLockConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.object_lock_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetObjectLockConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.object_lock_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectLockConfiguration { - fn name(&self) -> &'static str { - "GetObjectLockConfiguration" - } +fn name(&self) -> &'static str { +"GetObjectLockConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_lock_configuration(&mut s3_req).await?; - } - let result = s3.get_object_lock_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_lock_configuration(&mut s3_req).await?; +} +let result = s3.get_object_lock_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectRetention; impl GetObjectRetention { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(GetObjectRetentionInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectRetentionInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectRetentionOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.retention { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetObjectRetentionOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.retention { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectRetention { - fn name(&self) -> &'static str { - "GetObjectRetention" - } +fn name(&self) -> &'static str { +"GetObjectRetention" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_retention(&mut s3_req).await?; - } - let result = s3.get_object_retention(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_retention(&mut s3_req).await?; +} +let result = s3.get_object_retention(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectTagging; impl GetObjectTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(GetObjectTaggingInput { - bucket, - expected_bucket_owner, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(GetObjectTaggingInput { +bucket, +expected_bucket_owner, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: GetObjectTaggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: GetObjectTaggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetObjectTagging { - fn name(&self) -> &'static str { - "GetObjectTagging" - } +fn name(&self) -> &'static str { +"GetObjectTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_tagging(&mut s3_req).await?; - } - let result = s3.get_object_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_tagging(&mut s3_req).await?; +} +let result = s3.get_object_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetObjectTorrent; impl GetObjectTorrent { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetObjectTorrentInput { - bucket, - expected_bucket_owner, - key, - request_payer, - }) - } - pub fn serialize_http(x: GetObjectTorrentOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(val) = x.body { - http::set_stream_body(&mut res, val); - } - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +Ok(GetObjectTorrentInput { +bucket, +expected_bucket_owner, +key, +request_payer, +}) +} + + +pub fn serialize_http(x: GetObjectTorrentOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(val) = x.body { +http::set_stream_body(&mut res, val); +} +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} + } #[async_trait::async_trait] impl super::Operation for GetObjectTorrent { - fn name(&self) -> &'static str { - "GetObjectTorrent" - } +fn name(&self) -> &'static str { +"GetObjectTorrent" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_object_torrent(&mut s3_req).await?; - } - let result = s3.get_object_torrent(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_object_torrent(&mut s3_req).await?; +} +let result = s3.get_object_torrent(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct GetPublicAccessBlock; -impl GetPublicAccessBlock { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +impl GetPublicAccessBlock { +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); + + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(GetPublicAccessBlockInput { +bucket, +expected_bucket_owner, +}) +} - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(GetPublicAccessBlockInput { - bucket, - expected_bucket_owner, - }) - } +pub fn serialize_http(x: GetPublicAccessBlockOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.public_access_block_configuration { + http::set_xml_body(&mut res, val)?; +} +Ok(res) +} - pub fn serialize_http(x: GetPublicAccessBlockOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.public_access_block_configuration { - http::set_xml_body(&mut res, val)?; - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for GetPublicAccessBlock { - fn name(&self) -> &'static str { - "GetPublicAccessBlock" - } +fn name(&self) -> &'static str { +"GetPublicAccessBlock" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.get_public_access_block(&mut s3_req).await?; - } - let result = s3.get_public_access_block(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.get_public_access_block(&mut s3_req).await?; +} +let result = s3.get_public_access_block(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct HeadBucket; impl HeadBucket { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(HeadBucketInput { - bucket, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(HeadBucketInput { +bucket, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: HeadBucketOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_ACCESS_POINT_ALIAS, x.access_point_alias)?; +http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_NAME, x.bucket_location_name)?; +http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_TYPE, x.bucket_location_type)?; +http::add_opt_header(&mut res, X_AMZ_BUCKET_REGION, x.bucket_region)?; +Ok(res) +} - pub fn serialize_http(x: HeadBucketOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_ACCESS_POINT_ALIAS, x.access_point_alias)?; - http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_NAME, x.bucket_location_name)?; - http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_TYPE, x.bucket_location_type)?; - http::add_opt_header(&mut res, X_AMZ_BUCKET_REGION, x.bucket_region)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for HeadBucket { - fn name(&self) -> &'static str { - "HeadBucket" - } +fn name(&self) -> &'static str { +"HeadBucket" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.head_bucket(&mut s3_req).await?; - } - let result = s3.head_bucket(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.head_bucket(&mut s3_req).await?; +} +let result = s3.head_bucket(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct HeadObject; impl HeadObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + +let if_modified_since: Option = http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + +let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +let if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; - let if_modified_since: Option = - http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; +let part_number: Option = http::parse_opt_query(req, "partNumber")?; - let if_unmodified_since: Option = - http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; +let range: Option = http::parse_opt_header(req, &RANGE)?; - let part_number: Option = http::parse_opt_query(req, "partNumber")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let range: Option = http::parse_opt_header(req, &RANGE)?; +let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let response_content_disposition: Option = http::parse_opt_query(req, "response-content-disposition")?; - let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; +let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; - let response_content_disposition: Option = - http::parse_opt_query(req, "response-content-disposition")?; +let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; - let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; +let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; - let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; +let response_expires: Option = http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; - let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let response_expires: Option = - http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let version_id: Option = http::parse_opt_query(req, "versionId")?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +Ok(HeadObjectInput { +bucket, +checksum_mode, +expected_bucket_owner, +if_match, +if_modified_since, +if_none_match, +if_unmodified_since, +key, +part_number, +range, +request_payer, +response_cache_control, +response_content_disposition, +response_content_encoding, +response_content_language, +response_content_type, +response_expires, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +version_id, +}) +} - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(HeadObjectInput { - bucket, - checksum_mode, - expected_bucket_owner, - if_match, - if_modified_since, - if_none_match, - if_unmodified_since, - key, - part_number, - range, - request_payer, - response_cache_control, - response_content_disposition, - response_content_encoding, - response_content_language, - response_content_type, - response_expires, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - version_id, - }) - } +pub fn serialize_http(x: HeadObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; +http::add_opt_header(&mut res, X_AMZ_ARCHIVE_STATUS, x.archive_status)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; +http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; +http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; +http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; +http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; +http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; +http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; +http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; +http::add_opt_header(&mut res, ETAG, x.e_tag)?; +http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; +http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; +http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; +http::add_opt_metadata(&mut res, x.metadata)?; +http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; +http::add_opt_header_timestamp(&mut res, X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, x.object_lock_retain_until_date, TimestampFormat::DateTime)?; +http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; +http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; +Ok(res) +} - pub fn serialize_http(x: HeadObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; - http::add_opt_header(&mut res, X_AMZ_ARCHIVE_STATUS, x.archive_status)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; - http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; - http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; - http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; - http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; - http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; - http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; - http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; - http::add_opt_header(&mut res, ETAG, x.e_tag)?; - http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; - http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; - http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; - http::add_opt_metadata(&mut res, x.metadata)?; - http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; - http::add_opt_header_timestamp( - &mut res, - X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, - x.object_lock_retain_until_date, - TimestampFormat::DateTime, - )?; - http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; - http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for HeadObject { - fn name(&self) -> &'static str { - "HeadObject" - } +fn name(&self) -> &'static str { +"HeadObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.head_object(&mut s3_req).await?; - } - let result = s3.head_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.head_object(&mut s3_req).await?; +} +let result = s3.head_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBucketAnalyticsConfigurations; impl ListBucketAnalyticsConfigurations { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - Ok(ListBucketAnalyticsConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(ListBucketAnalyticsConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: ListBucketAnalyticsConfigurationsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketAnalyticsConfigurationsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBucketAnalyticsConfigurations { - fn name(&self) -> &'static str { - "ListBucketAnalyticsConfigurations" - } +fn name(&self) -> &'static str { +"ListBucketAnalyticsConfigurations" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_bucket_analytics_configurations(&mut s3_req).await?; - } - let result = s3.list_bucket_analytics_configurations(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_bucket_analytics_configurations(&mut s3_req).await?; +} +let result = s3.list_bucket_analytics_configurations(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBucketIntelligentTieringConfigurations; impl ListBucketIntelligentTieringConfigurations { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - Ok(ListBucketIntelligentTieringConfigurationsInput { - bucket, - continuation_token, - }) - } +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + +Ok(ListBucketIntelligentTieringConfigurationsInput { +bucket, +continuation_token, +}) +} + + +pub fn serialize_http(x: ListBucketIntelligentTieringConfigurationsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketIntelligentTieringConfigurationsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBucketIntelligentTieringConfigurations { - fn name(&self) -> &'static str { - "ListBucketIntelligentTieringConfigurations" - } +fn name(&self) -> &'static str { +"ListBucketIntelligentTieringConfigurations" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_bucket_intelligent_tiering_configurations(&mut s3_req).await?; - } - let result = s3.list_bucket_intelligent_tiering_configurations(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_bucket_intelligent_tiering_configurations(&mut s3_req).await?; +} +let result = s3.list_bucket_intelligent_tiering_configurations(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBucketInventoryConfigurations; impl ListBucketInventoryConfigurations { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - Ok(ListBucketInventoryConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(ListBucketInventoryConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: ListBucketInventoryConfigurationsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketInventoryConfigurationsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBucketInventoryConfigurations { - fn name(&self) -> &'static str { - "ListBucketInventoryConfigurations" - } +fn name(&self) -> &'static str { +"ListBucketInventoryConfigurations" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_bucket_inventory_configurations(&mut s3_req).await?; - } - let result = s3.list_bucket_inventory_configurations(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_bucket_inventory_configurations(&mut s3_req).await?; +} +let result = s3.list_bucket_inventory_configurations(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBucketMetricsConfigurations; impl ListBucketMetricsConfigurations { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - Ok(ListBucketMetricsConfigurationsInput { - bucket, - continuation_token, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(ListBucketMetricsConfigurationsInput { +bucket, +continuation_token, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(x: ListBucketMetricsConfigurationsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketMetricsConfigurationsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBucketMetricsConfigurations { - fn name(&self) -> &'static str { - "ListBucketMetricsConfigurations" - } +fn name(&self) -> &'static str { +"ListBucketMetricsConfigurations" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_bucket_metrics_configurations(&mut s3_req).await?; - } - let result = s3.list_bucket_metrics_configurations(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_bucket_metrics_configurations(&mut s3_req).await?; +} +let result = s3.list_bucket_metrics_configurations(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListBuckets; impl ListBuckets { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket_region: Option = http::parse_opt_query(req, "bucket-region")?; +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket_region: Option = http::parse_opt_query(req, "bucket-region")?; - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let max_buckets: Option = http::parse_opt_query(req, "max-buckets")?; +let max_buckets: Option = http::parse_opt_query(req, "max-buckets")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - Ok(ListBucketsInput { - bucket_region, - continuation_token, - max_buckets, - prefix, - }) - } +Ok(ListBucketsInput { +bucket_region, +continuation_token, +max_buckets, +prefix, +}) +} + + +pub fn serialize_http(x: ListBucketsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListBucketsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListBuckets { - fn name(&self) -> &'static str { - "ListBuckets" - } +fn name(&self) -> &'static str { +"ListBuckets" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_buckets(&mut s3_req).await?; - } - let result = s3.list_buckets(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_buckets(&mut s3_req).await?; +} +let result = s3.list_buckets(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListDirectoryBuckets; impl ListDirectoryBuckets { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let max_directory_buckets: Option = http::parse_opt_query(req, "max-directory-buckets")?; +let max_directory_buckets: Option = http::parse_opt_query(req, "max-directory-buckets")?; - Ok(ListDirectoryBucketsInput { - continuation_token, - max_directory_buckets, - }) - } +Ok(ListDirectoryBucketsInput { +continuation_token, +max_directory_buckets, +}) +} + + +pub fn serialize_http(x: ListDirectoryBucketsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +Ok(res) +} - pub fn serialize_http(x: ListDirectoryBucketsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListDirectoryBuckets { - fn name(&self) -> &'static str { - "ListDirectoryBuckets" - } +fn name(&self) -> &'static str { +"ListDirectoryBuckets" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_directory_buckets(&mut s3_req).await?; - } - let result = s3.list_directory_buckets(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_directory_buckets(&mut s3_req).await?; +} +let result = s3.list_directory_buckets(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListMultipartUploads; impl ListMultipartUploads { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; +let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; - let key_marker: Option = http::parse_opt_query(req, "key-marker")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_uploads: Option = http::parse_opt_query(req, "max-uploads")?; +let key_marker: Option = http::parse_opt_query(req, "key-marker")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let max_uploads: Option = http::parse_opt_query(req, "max-uploads")?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - let upload_id_marker: Option = http::parse_opt_query(req, "upload-id-marker")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(ListMultipartUploadsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - key_marker, - max_uploads, - prefix, - request_payer, - upload_id_marker, - }) - } +let upload_id_marker: Option = http::parse_opt_query(req, "upload-id-marker")?; + +Ok(ListMultipartUploadsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +key_marker, +max_uploads, +prefix, +request_payer, +upload_id_marker, +}) +} + + +pub fn serialize_http(x: ListMultipartUploadsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: ListMultipartUploadsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListMultipartUploads { - fn name(&self) -> &'static str { - "ListMultipartUploads" - } +fn name(&self) -> &'static str { +"ListMultipartUploads" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_multipart_uploads(&mut s3_req).await?; - } - let result = s3.list_multipart_uploads(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_multipart_uploads(&mut s3_req).await?; +} +let result = s3.list_multipart_uploads(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListObjectVersions; impl ListObjectVersions { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; +let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; - let key_marker: Option = http::parse_opt_query(req, "key-marker")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_keys: Option = http::parse_opt_query(req, "max-keys")?; +let key_marker: Option = http::parse_opt_query(req, "key-marker")?; - let optional_object_attributes: Option = - http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; +let max_keys: Option = http::parse_opt_query(req, "max-keys")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - let version_id_marker: Option = http::parse_opt_query(req, "version-id-marker")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(ListObjectVersionsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - key_marker, - max_keys, - optional_object_attributes, - prefix, - request_payer, - version_id_marker, - }) - } +let version_id_marker: Option = http::parse_opt_query(req, "version-id-marker")?; - pub fn serialize_http(x: ListObjectVersionsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } +Ok(ListObjectVersionsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +key_marker, +max_keys, +optional_object_attributes, +prefix, +request_payer, +version_id_marker, +}) +} + + +pub fn serialize_http(x: ListObjectVersionsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} + +} + +#[async_trait::async_trait] +impl super::Operation for ListObjectVersions { +fn name(&self) -> &'static str { +"ListObjectVersions" +} + +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_object_versions(&mut s3_req).await?; +} +let result = s3.list_object_versions(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) } - -#[async_trait::async_trait] -impl super::Operation for ListObjectVersions { - fn name(&self) -> &'static str { - "ListObjectVersions" - } - - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_object_versions(&mut s3_req).await?; - } - let result = s3.list_object_versions(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } } pub struct ListObjects; impl ListObjects { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; +let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; - let marker: Option = http::parse_opt_query(req, "marker")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_keys: Option = http::parse_opt_query(req, "max-keys")?; +let marker: Option = http::parse_opt_query(req, "marker")?; - let optional_object_attributes: Option = - http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; +let max_keys: Option = http::parse_opt_query(req, "max-keys")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - Ok(ListObjectsInput { - bucket, - delimiter, - encoding_type, - expected_bucket_owner, - marker, - max_keys, - optional_object_attributes, - prefix, - request_payer, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +Ok(ListObjectsInput { +bucket, +delimiter, +encoding_type, +expected_bucket_owner, +marker, +max_keys, +optional_object_attributes, +prefix, +request_payer, +}) +} + + +pub fn serialize_http(x: ListObjectsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: ListObjectsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListObjects { - fn name(&self) -> &'static str { - "ListObjects" - } +fn name(&self) -> &'static str { +"ListObjects" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_objects(&mut s3_req).await?; - } - let result = s3.list_objects(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_objects(&mut s3_req).await?; +} +let result = s3.list_objects(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListObjectsV2; impl ListObjectsV2 { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let delimiter: Option = http::parse_opt_query(req, "delimiter")?; +let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; +let delimiter: Option = http::parse_opt_query(req, "delimiter")?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; - let fetch_owner: Option = http::parse_opt_query(req, "fetch-owner")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_keys: Option = http::parse_opt_query(req, "max-keys")?; +let fetch_owner: Option = http::parse_opt_query(req, "fetch-owner")?; - let optional_object_attributes: Option = - http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; +let max_keys: Option = http::parse_opt_query(req, "max-keys")?; - let prefix: Option = http::parse_opt_query(req, "prefix")?; +let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let prefix: Option = http::parse_opt_query(req, "prefix")?; - let start_after: Option = http::parse_opt_query(req, "start-after")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(ListObjectsV2Input { - bucket, - continuation_token, - delimiter, - encoding_type, - expected_bucket_owner, - fetch_owner, - max_keys, - optional_object_attributes, - prefix, - request_payer, - start_after, - }) - } +let start_after: Option = http::parse_opt_query(req, "start-after")?; + +Ok(ListObjectsV2Input { +bucket, +continuation_token, +delimiter, +encoding_type, +expected_bucket_owner, +fetch_owner, +max_keys, +optional_object_attributes, +prefix, +request_payer, +start_after, +}) +} + + +pub fn serialize_http(x: ListObjectsV2Output) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: ListObjectsV2Output) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListObjectsV2 { - fn name(&self) -> &'static str { - "ListObjectsV2" - } +fn name(&self) -> &'static str { +"ListObjectsV2" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_objects_v2(&mut s3_req).await?; - } - let result = s3.list_objects_v2(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_objects_v2(&mut s3_req).await?; +} +let result = s3.list_objects_v2(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct ListParts; impl ListParts { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let max_parts: Option = http::parse_opt_query(req, "max-parts")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let part_number_marker: Option = http::parse_opt_query(req, "part-number-marker")?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let max_parts: Option = http::parse_opt_query(req, "max-parts")?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let part_number_marker: Option = http::parse_opt_query(req, "part-number-marker")?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(ListPartsInput { - bucket, - expected_bucket_owner, - key, - max_parts, - part_number_marker, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(ListPartsInput { +bucket, +expected_bucket_owner, +key, +max_parts, +part_number_marker, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + + +pub fn serialize_http(x: ListPartsOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::set_xml_body(&mut res, &x)?; +http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; +http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: ListPartsOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::set_xml_body(&mut res, &x)?; - http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; - http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for ListParts { - fn name(&self) -> &'static str { - "ListParts" - } +fn name(&self) -> &'static str { +"ListParts" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.list_parts(&mut s3_req).await?; - } - let result = s3.list_parts(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.list_parts(&mut s3_req).await?; +} +let result = s3.list_parts(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketAccelerateConfiguration; impl PutBucketAccelerateConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let accelerate_configuration: AccelerateConfiguration = http::take_xml_body(req)?; +let accelerate_configuration: AccelerateConfiguration = http::take_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - Ok(PutBucketAccelerateConfigurationInput { - accelerate_configuration, - bucket, - checksum_algorithm, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(PutBucketAccelerateConfigurationInput { +accelerate_configuration, +bucket, +checksum_algorithm, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: PutBucketAccelerateConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketAccelerateConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketAccelerateConfiguration { - fn name(&self) -> &'static str { - "PutBucketAccelerateConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketAccelerateConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_accelerate_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_accelerate_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_accelerate_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_accelerate_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketAcl; impl PutBucketAcl { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let access_control_policy: Option = http::take_opt_xml_body(req)?; +let access_control_policy: Option = http::take_opt_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; - Ok(PutBucketAclInput { - acl, - access_control_policy, - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - }) - } +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + +Ok(PutBucketAclInput { +acl, +access_control_policy, +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +}) +} + + +pub fn serialize_http(_: PutBucketAclOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketAclOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketAcl { - fn name(&self) -> &'static str { - "PutBucketAcl" - } +fn name(&self) -> &'static str { +"PutBucketAcl" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_acl(&mut s3_req).await?; - } - let result = s3.put_bucket_acl(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_acl(&mut s3_req).await?; +} +let result = s3.put_bucket_acl(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketAnalyticsConfiguration; impl PutBucketAnalyticsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let analytics_configuration: AnalyticsConfiguration = http::take_xml_body(req)?; +let analytics_configuration: AnalyticsConfiguration = http::take_xml_body(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: AnalyticsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketAnalyticsConfigurationInput { - analytics_configuration, - bucket, - expected_bucket_owner, - id, - }) - } +let id: AnalyticsId = http::parse_query(req, "id")?; + +Ok(PutBucketAnalyticsConfigurationInput { +analytics_configuration, +bucket, +expected_bucket_owner, +id, +}) +} + + +pub fn serialize_http(_: PutBucketAnalyticsConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketAnalyticsConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketAnalyticsConfiguration { - fn name(&self) -> &'static str { - "PutBucketAnalyticsConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketAnalyticsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_analytics_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_analytics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_analytics_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_analytics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketCors; impl PutBucketCors { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let cors_configuration: CORSConfiguration = http::take_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let cors_configuration: CORSConfiguration = http::take_xml_body(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - Ok(PutBucketCorsInput { - bucket, - cors_configuration, - checksum_algorithm, - content_md5, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(PutBucketCorsInput { +bucket, +cors_configuration, +checksum_algorithm, +content_md5, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: PutBucketCorsOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketCorsOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketCors { - fn name(&self) -> &'static str { - "PutBucketCors" - } +fn name(&self) -> &'static str { +"PutBucketCors" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_cors(&mut s3_req).await?; - } - let result = s3.put_bucket_cors(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_cors(&mut s3_req).await?; +} +let result = s3.put_bucket_cors(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketEncryption; impl PutBucketEncryption { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let server_side_encryption_configuration: ServerSideEncryptionConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketEncryptionInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - server_side_encryption_configuration, - }) - } +let server_side_encryption_configuration: ServerSideEncryptionConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketEncryptionInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +server_side_encryption_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketEncryptionOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketEncryptionOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketEncryption { - fn name(&self) -> &'static str { - "PutBucketEncryption" - } +fn name(&self) -> &'static str { +"PutBucketEncryption" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_encryption(&mut s3_req).await?; - } - let result = s3.put_bucket_encryption(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_encryption(&mut s3_req).await?; +} +let result = s3.put_bucket_encryption(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketIntelligentTieringConfiguration; impl PutBucketIntelligentTieringConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let id: IntelligentTieringId = http::parse_query(req, "id")?; - let intelligent_tiering_configuration: IntelligentTieringConfiguration = http::take_xml_body(req)?; +let id: IntelligentTieringId = http::parse_query(req, "id")?; - Ok(PutBucketIntelligentTieringConfigurationInput { - bucket, - id, - intelligent_tiering_configuration, - }) - } +let intelligent_tiering_configuration: IntelligentTieringConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketIntelligentTieringConfigurationInput { +bucket, +id, +intelligent_tiering_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketIntelligentTieringConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketIntelligentTieringConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketIntelligentTieringConfiguration { - fn name(&self) -> &'static str { - "PutBucketIntelligentTieringConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketIntelligentTieringConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_intelligent_tiering_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_intelligent_tiering_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_intelligent_tiering_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_intelligent_tiering_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketInventoryConfiguration; impl PutBucketInventoryConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: InventoryId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let inventory_configuration: InventoryConfiguration = http::take_xml_body(req)?; +let id: InventoryId = http::parse_query(req, "id")?; - Ok(PutBucketInventoryConfigurationInput { - bucket, - expected_bucket_owner, - id, - inventory_configuration, - }) - } +let inventory_configuration: InventoryConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketInventoryConfigurationInput { +bucket, +expected_bucket_owner, +id, +inventory_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketInventoryConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketInventoryConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketInventoryConfiguration { - fn name(&self) -> &'static str { - "PutBucketInventoryConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketInventoryConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_inventory_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_inventory_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_inventory_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_inventory_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketLifecycleConfiguration; impl PutBucketLifecycleConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); + + +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let lifecycle_configuration: Option = http::take_opt_xml_body(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let transition_default_minimum_object_size: Option = http::parse_opt_header(req, &X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE)?; - let lifecycle_configuration: Option = http::take_opt_xml_body(req)?; +Ok(PutBucketLifecycleConfigurationInput { +bucket, +checksum_algorithm, +expected_bucket_owner, +lifecycle_configuration, +transition_default_minimum_object_size, +}) +} - let transition_default_minimum_object_size: Option = - http::parse_opt_header(req, &X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE)?; - Ok(PutBucketLifecycleConfigurationInput { - bucket, - checksum_algorithm, - expected_bucket_owner, - lifecycle_configuration, - transition_default_minimum_object_size, - }) - } +pub fn serialize_http(x: PutBucketLifecycleConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, x.transition_default_minimum_object_size)?; +Ok(res) +} - pub fn serialize_http(x: PutBucketLifecycleConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header( - &mut res, - X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, - x.transition_default_minimum_object_size, - )?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutBucketLifecycleConfiguration { - fn name(&self) -> &'static str { - "PutBucketLifecycleConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketLifecycleConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_lifecycle_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_lifecycle_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_lifecycle_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_lifecycle_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketLogging; impl PutBucketLogging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let bucket_logging_status: BucketLoggingStatus = http::take_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let bucket_logging_status: BucketLoggingStatus = http::take_xml_body(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - Ok(PutBucketLoggingInput { - bucket, - bucket_logging_status, - checksum_algorithm, - content_md5, - expected_bucket_owner, - }) - } +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +Ok(PutBucketLoggingInput { +bucket, +bucket_logging_status, +checksum_algorithm, +content_md5, +expected_bucket_owner, +}) +} + + +pub fn serialize_http(_: PutBucketLoggingOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketLoggingOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketLogging { - fn name(&self) -> &'static str { - "PutBucketLogging" - } +fn name(&self) -> &'static str { +"PutBucketLogging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_logging(&mut s3_req).await?; - } - let result = s3.put_bucket_logging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_logging(&mut s3_req).await?; +} +let result = s3.put_bucket_logging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketMetricsConfiguration; impl PutBucketMetricsConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let id: MetricsId = http::parse_query(req, "id")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let metrics_configuration: MetricsConfiguration = http::take_xml_body(req)?; +let id: MetricsId = http::parse_query(req, "id")?; - Ok(PutBucketMetricsConfigurationInput { - bucket, - expected_bucket_owner, - id, - metrics_configuration, - }) - } +let metrics_configuration: MetricsConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketMetricsConfigurationInput { +bucket, +expected_bucket_owner, +id, +metrics_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketMetricsConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketMetricsConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketMetricsConfiguration { - fn name(&self) -> &'static str { - "PutBucketMetricsConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketMetricsConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_metrics_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_metrics_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_metrics_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_metrics_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketNotificationConfiguration; impl PutBucketNotificationConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let notification_configuration: NotificationConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let skip_destination_validation: Option = - http::parse_opt_header(req, &X_AMZ_SKIP_DESTINATION_VALIDATION)?; +let notification_configuration: NotificationConfiguration = http::take_xml_body(req)?; - Ok(PutBucketNotificationConfigurationInput { - bucket, - expected_bucket_owner, - notification_configuration, - skip_destination_validation, - }) - } +let skip_destination_validation: Option = http::parse_opt_header(req, &X_AMZ_SKIP_DESTINATION_VALIDATION)?; + +Ok(PutBucketNotificationConfigurationInput { +bucket, +expected_bucket_owner, +notification_configuration, +skip_destination_validation, +}) +} + + +pub fn serialize_http(_: PutBucketNotificationConfigurationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketNotificationConfigurationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketNotificationConfiguration { - fn name(&self) -> &'static str { - "PutBucketNotificationConfiguration" - } +fn name(&self) -> &'static str { +"PutBucketNotificationConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_notification_configuration(&mut s3_req).await?; - } - let result = s3.put_bucket_notification_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_notification_configuration(&mut s3_req).await?; +} +let result = s3.put_bucket_notification_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketOwnershipControls; impl PutBucketOwnershipControls { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let ownership_controls: OwnershipControls = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketOwnershipControlsInput { - bucket, - content_md5, - expected_bucket_owner, - ownership_controls, - }) - } +let ownership_controls: OwnershipControls = http::take_xml_body(req)?; + +Ok(PutBucketOwnershipControlsInput { +bucket, +content_md5, +expected_bucket_owner, +ownership_controls, +}) +} + + +pub fn serialize_http(_: PutBucketOwnershipControlsOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketOwnershipControlsOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketOwnershipControls { - fn name(&self) -> &'static str { - "PutBucketOwnershipControls" - } +fn name(&self) -> &'static str { +"PutBucketOwnershipControls" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_ownership_controls(&mut s3_req).await?; - } - let result = s3.put_bucket_ownership_controls(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_ownership_controls(&mut s3_req).await?; +} +let result = s3.put_bucket_ownership_controls(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketPolicy; impl PutBucketPolicy { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let confirm_remove_self_bucket_access: Option = - http::parse_opt_header(req, &X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let confirm_remove_self_bucket_access: Option = http::parse_opt_header(req, &X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let policy: Policy = http::take_string_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketPolicyInput { - bucket, - checksum_algorithm, - confirm_remove_self_bucket_access, - content_md5, - expected_bucket_owner, - policy, - }) - } +let policy: Policy = http::take_string_body(req)?; + +Ok(PutBucketPolicyInput { +bucket, +checksum_algorithm, +confirm_remove_self_bucket_access, +content_md5, +expected_bucket_owner, +policy, +}) +} + + +pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) +} - pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketPolicy { - fn name(&self) -> &'static str { - "PutBucketPolicy" - } +fn name(&self) -> &'static str { +"PutBucketPolicy" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_policy(&mut s3_req).await?; - } - let result = s3.put_bucket_policy(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_policy(&mut s3_req).await?; +} +let result = s3.put_bucket_policy(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketReplication; impl PutBucketReplication { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let replication_configuration: ReplicationConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; +let replication_configuration: ReplicationConfiguration = http::take_xml_body(req)?; - Ok(PutBucketReplicationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - replication_configuration, - token, - }) - } +let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; + +Ok(PutBucketReplicationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +replication_configuration, +token, +}) +} + + +pub fn serialize_http(_: PutBucketReplicationOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketReplicationOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketReplication { - fn name(&self) -> &'static str { - "PutBucketReplication" - } +fn name(&self) -> &'static str { +"PutBucketReplication" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_replication(&mut s3_req).await?; - } - let result = s3.put_bucket_replication(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_replication(&mut s3_req).await?; +} +let result = s3.put_bucket_replication(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketRequestPayment; impl PutBucketRequestPayment { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let request_payment_configuration: RequestPaymentConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketRequestPaymentInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - request_payment_configuration, - }) - } +let request_payment_configuration: RequestPaymentConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketRequestPaymentInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +request_payment_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketRequestPaymentOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketRequestPaymentOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketRequestPayment { - fn name(&self) -> &'static str { - "PutBucketRequestPayment" - } +fn name(&self) -> &'static str { +"PutBucketRequestPayment" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_request_payment(&mut s3_req).await?; - } - let result = s3.put_bucket_request_payment(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_request_payment(&mut s3_req).await?; +} +let result = s3.put_bucket_request_payment(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutBucketTagging; impl PutBucketTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let tagging: Tagging = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutBucketTaggingInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - tagging, - }) - } +let tagging: Tagging = http::take_xml_body(req)?; + +Ok(PutBucketTaggingInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +tagging, +}) +} + + +pub fn serialize_http(_: PutBucketTaggingOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutBucketTaggingOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutBucketTagging { - fn name(&self) -> &'static str { - "PutBucketTagging" - } +fn name(&self) -> &'static str { +"PutBucketTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_tagging(&mut s3_req).await?; - } - let result = s3.put_bucket_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_tagging(&mut s3_req).await?; +} +let result = s3.put_bucket_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} +} + +pub struct PutBucketVersioning; + +impl PutBucketVersioning { +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); + + +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; + +let versioning_configuration: VersioningConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketVersioningInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +mfa, +versioning_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketVersioningOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} + +} + +#[async_trait::async_trait] +impl super::Operation for PutBucketVersioning { +fn name(&self) -> &'static str { +"PutBucketVersioning" +} + +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_versioning(&mut s3_req).await?; +} +let result = s3.put_bucket_versioning(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} +} + +pub struct PutBucketWebsite; + +impl PutBucketWebsite { +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); + + +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + +let website_configuration: WebsiteConfiguration = http::take_xml_body(req)?; + +Ok(PutBucketWebsiteInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +website_configuration, +}) +} + + +pub fn serialize_http(_: PutBucketWebsiteOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} + +} + +#[async_trait::async_trait] +impl super::Operation for PutBucketWebsite { +fn name(&self) -> &'static str { +"PutBucketWebsite" } -pub struct PutBucketVersioning; +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_bucket_website(&mut s3_req).await?; +} +let result = s3.put_bucket_website(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} +} -impl PutBucketVersioning { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub struct PutObject; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +impl PutObject { +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +if let Some(m) = req.s3ext.multipart.take() { + return Self::deserialize_http_multipart(req, m); +} - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; +let body: Option = Some(http::take_stream_body(req)); - let versioning_configuration: VersioningConfiguration = http::take_xml_body(req)?; - Ok(PutBucketVersioningInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - mfa, - versioning_configuration, - }) - } +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - pub fn serialize_http(_: PutBucketVersioningOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } -} +let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; -#[async_trait::async_trait] -impl super::Operation for PutBucketVersioning { - fn name(&self) -> &'static str { - "PutBucketVersioning" - } +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_versioning(&mut s3_req).await?; - } - let result = s3.put_bucket_versioning(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } -} +let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; -pub struct PutBucketWebsite; +let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; -impl PutBucketWebsite { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; - let website_configuration: WebsiteConfiguration = http::take_xml_body(req)?; +let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; - Ok(PutBucketWebsiteInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - website_configuration, - }) - } +let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; - pub fn serialize_http(_: PutBucketWebsiteOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } -} +let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; -#[async_trait::async_trait] -impl super::Operation for PutBucketWebsite { - fn name(&self) -> &'static str { - "PutBucketWebsite" - } +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_bucket_website(&mut s3_req).await?; - } - let result = s3.put_bucket_website(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } -} +let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; -pub struct PutObject; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -impl PutObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - if let Some(m) = req.s3ext.multipart.take() { - return Self::deserialize_http_multipart(req, m); - } +let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; - let (bucket, key) = http::unwrap_object(req); +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let body: Option = Some(http::take_stream_body(req)); +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; +let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; +let metadata: Option = http::parse_opt_metadata(req)?; - let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; +let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; +let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; - let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; +let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; - let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; - let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; +let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let write_offset_bytes: Option = http::parse_opt_header(req, &X_AMZ_WRITE_OFFSET_BYTES)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +Ok(PutObjectInput { +acl, +body, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_md5, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +if_match, +if_none_match, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +website_redirect_location, +write_offset_bytes, +}) +} - let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; +pub fn deserialize_http_multipart(req: &mut http::Request, m: http::Multipart) -> S3Result { +let bucket = http::unwrap_bucket(req); +let key = http::parse_field_value(&m, "key")?.ok_or_else(|| invalid_request!("missing key"))?; - let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; +let vec_stream = req.s3ext.vec_stream.take().expect("missing vec stream"); - let metadata: Option = http::parse_opt_metadata(req)?; +let content_length = i64::try_from(vec_stream.exact_remaining_length()) + .map_err(|e| s3_error!(e, InvalidArgument, "content-length overflow"))?; +let content_length = (content_length != 0).then_some(content_length); - let object_lock_legal_hold_status: Option = - http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; +let body: Option = Some(StreamingBlob::new(vec_stream)); - let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; +let acl: Option = http::parse_field_value(&m, "x-amz-acl")?; - let object_lock_retain_until_date: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let bucket_key_enabled: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-bucket-key-enabled")?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let cache_control: Option = http::parse_field_value(&m, "cache-control")?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let checksum_algorithm: Option = http::parse_field_value(&m, "x-amz-sdk-checksum-algorithm")?; - let ssekms_encryption_context: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; +let checksum_crc32: Option = http::parse_field_value(&m, "x-amz-checksum-crc32")?; - let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; +let checksum_crc32c: Option = http::parse_field_value(&m, "x-amz-checksum-crc32c")?; - let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; +let checksum_crc64nvme: Option = http::parse_field_value(&m, "x-amz-checksum-crc64nvme")?; - let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; +let checksum_sha1: Option = http::parse_field_value(&m, "x-amz-checksum-sha1")?; - let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; +let checksum_sha256: Option = http::parse_field_value(&m, "x-amz-checksum-sha256")?; - let website_redirect_location: Option = - http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; +let content_disposition: Option = http::parse_field_value(&m, "content-disposition")?; - let write_offset_bytes: Option = http::parse_opt_header(req, &X_AMZ_WRITE_OFFSET_BYTES)?; +let content_encoding: Option = http::parse_field_value(&m, "content-encoding")?; - Ok(PutObjectInput { - acl, - body, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_md5, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - if_match, - if_none_match, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - website_redirect_location, - write_offset_bytes, - }) - } +let content_language: Option = http::parse_field_value(&m, "content-language")?; - pub fn deserialize_http_multipart(req: &mut http::Request, m: http::Multipart) -> S3Result { - let bucket = http::unwrap_bucket(req); - let key = http::parse_field_value(&m, "key")?.ok_or_else(|| invalid_request!("missing key"))?; +let content_md5: Option = http::parse_field_value(&m, "content-md5")?; - let vec_stream = req.s3ext.vec_stream.take().expect("missing vec stream"); +let content_type: Option = http::parse_field_value(&m, "content-type")?; - let content_length = i64::try_from(vec_stream.exact_remaining_length()) - .map_err(|e| s3_error!(e, InvalidArgument, "content-length overflow"))?; - let content_length = (content_length != 0).then_some(content_length); +let expected_bucket_owner: Option = http::parse_field_value(&m, "x-amz-expected-bucket-owner")?; - let body: Option = Some(StreamingBlob::new(vec_stream)); +let expires: Option = http::parse_field_value_timestamp(&m, "expires", TimestampFormat::HttpDate)?; - let acl: Option = http::parse_field_value(&m, "x-amz-acl")?; +let grant_full_control: Option = http::parse_field_value(&m, "x-amz-grant-full-control")?; - let bucket_key_enabled: Option = - http::parse_field_value(&m, "x-amz-server-side-encryption-bucket-key-enabled")?; +let grant_read: Option = http::parse_field_value(&m, "x-amz-grant-read")?; - let cache_control: Option = http::parse_field_value(&m, "cache-control")?; +let grant_read_acp: Option = http::parse_field_value(&m, "x-amz-grant-read-acp")?; - let checksum_algorithm: Option = http::parse_field_value(&m, "x-amz-sdk-checksum-algorithm")?; +let grant_write_acp: Option = http::parse_field_value(&m, "x-amz-grant-write-acp")?; - let checksum_crc32: Option = http::parse_field_value(&m, "x-amz-checksum-crc32")?; +let if_match: Option = http::parse_field_value(&m, "if-match")?; - let checksum_crc32c: Option = http::parse_field_value(&m, "x-amz-checksum-crc32c")?; +let if_none_match: Option = http::parse_field_value(&m, "if-none-match")?; - let checksum_crc64nvme: Option = http::parse_field_value(&m, "x-amz-checksum-crc64nvme")?; - let checksum_sha1: Option = http::parse_field_value(&m, "x-amz-checksum-sha1")?; +let metadata: Option = { + let mut metadata = Metadata::default(); + for (name, value) in m.fields() { + if let Some(key) = name.strip_prefix("x-amz-meta-") { + if key.is_empty() { continue; } + metadata.insert(key.to_owned(), value.clone()); + } + } + if metadata.is_empty() { None } else { Some(metadata) } +}; - let checksum_sha256: Option = http::parse_field_value(&m, "x-amz-checksum-sha256")?; +let object_lock_legal_hold_status: Option = http::parse_field_value(&m, "x-amz-object-lock-legal-hold")?; - let content_disposition: Option = http::parse_field_value(&m, "content-disposition")?; +let object_lock_mode: Option = http::parse_field_value(&m, "x-amz-object-lock-mode")?; - let content_encoding: Option = http::parse_field_value(&m, "content-encoding")?; +let object_lock_retain_until_date: Option = http::parse_field_value_timestamp(&m, "x-amz-object-lock-retain-until-date", TimestampFormat::DateTime)?; - let content_language: Option = http::parse_field_value(&m, "content-language")?; +let request_payer: Option = http::parse_field_value(&m, "x-amz-request-payer")?; - let content_md5: Option = http::parse_field_value(&m, "content-md5")?; +let sse_customer_algorithm: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-algorithm")?; - let content_type: Option = http::parse_field_value(&m, "content-type")?; +let sse_customer_key: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key")?; - let expected_bucket_owner: Option = http::parse_field_value(&m, "x-amz-expected-bucket-owner")?; +let sse_customer_key_md5: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key-md5")?; - let expires: Option = http::parse_field_value_timestamp(&m, "expires", TimestampFormat::HttpDate)?; +let ssekms_encryption_context: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-context")?; - let grant_full_control: Option = http::parse_field_value(&m, "x-amz-grant-full-control")?; +let ssekms_key_id: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-aws-kms-key-id")?; - let grant_read: Option = http::parse_field_value(&m, "x-amz-grant-read")?; +let server_side_encryption: Option = http::parse_field_value(&m, "x-amz-server-side-encryption")?; - let grant_read_acp: Option = http::parse_field_value(&m, "x-amz-grant-read-acp")?; +let storage_class: Option = http::parse_field_value(&m, "x-amz-storage-class")?; - let grant_write_acp: Option = http::parse_field_value(&m, "x-amz-grant-write-acp")?; +let tagging: Option = http::parse_field_value(&m, "x-amz-tagging")?; - let if_match: Option = http::parse_field_value(&m, "if-match")?; +let website_redirect_location: Option = http::parse_field_value(&m, "x-amz-website-redirect-location")?; - let if_none_match: Option = http::parse_field_value(&m, "if-none-match")?; +let write_offset_bytes: Option = http::parse_field_value(&m, "x-amz-write-offset-bytes")?; - let metadata: Option = { - let mut metadata = Metadata::default(); - for (name, value) in m.fields() { - if let Some(key) = name.strip_prefix("x-amz-meta-") { - if key.is_empty() { - continue; - } - metadata.insert(key.to_owned(), value.clone()); - } - } - if metadata.is_empty() { None } else { Some(metadata) } - }; +Ok(PutObjectInput { +acl, +body, +bucket, +bucket_key_enabled, +cache_control, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_md5, +content_type, +expected_bucket_owner, +expires, +grant_full_control, +grant_read, +grant_read_acp, +grant_write_acp, +if_match, +if_none_match, +key, +metadata, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +ssekms_encryption_context, +ssekms_key_id, +server_side_encryption, +storage_class, +tagging, +website_redirect_location, +write_offset_bytes, +}) +} - let object_lock_legal_hold_status: Option = - http::parse_field_value(&m, "x-amz-object-lock-legal-hold")?; - - let object_lock_mode: Option = http::parse_field_value(&m, "x-amz-object-lock-mode")?; - - let object_lock_retain_until_date: Option = - http::parse_field_value_timestamp(&m, "x-amz-object-lock-retain-until-date", TimestampFormat::DateTime)?; - - let request_payer: Option = http::parse_field_value(&m, "x-amz-request-payer")?; - - let sse_customer_algorithm: Option = - http::parse_field_value(&m, "x-amz-server-side-encryption-customer-algorithm")?; - - let sse_customer_key: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key")?; - - let sse_customer_key_md5: Option = - http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key-md5")?; - - let ssekms_encryption_context: Option = - http::parse_field_value(&m, "x-amz-server-side-encryption-context")?; - - let ssekms_key_id: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-aws-kms-key-id")?; - - let server_side_encryption: Option = http::parse_field_value(&m, "x-amz-server-side-encryption")?; - - let storage_class: Option = http::parse_field_value(&m, "x-amz-storage-class")?; - - let tagging: Option = http::parse_field_value(&m, "x-amz-tagging")?; - - let website_redirect_location: Option = - http::parse_field_value(&m, "x-amz-website-redirect-location")?; - - let write_offset_bytes: Option = http::parse_field_value(&m, "x-amz-write-offset-bytes")?; - - Ok(PutObjectInput { - acl, - body, - bucket, - bucket_key_enabled, - cache_control, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_md5, - content_type, - expected_bucket_owner, - expires, - grant_full_control, - grant_read, - grant_read_acp, - grant_write_acp, - if_match, - if_none_match, - key, - metadata, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - ssekms_encryption_context, - ssekms_key_id, - server_side_encryption, - storage_class, - tagging, - website_redirect_location, - write_offset_bytes, - }) - } +pub fn serialize_http(x: PutObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; +http::add_opt_header(&mut res, ETAG, x.e_tag)?; +http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +http::add_opt_header(&mut res, X_AMZ_OBJECT_SIZE, x.size)?; +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; - http::add_opt_header(&mut res, ETAG, x.e_tag)?; - http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - http::add_opt_header(&mut res, X_AMZ_OBJECT_SIZE, x.size)?; - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObject { - fn name(&self) -> &'static str { - "PutObject" - } +fn name(&self) -> &'static str { +"PutObject" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object(&mut s3_req).await?; - } - let result = s3.put_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object(&mut s3_req).await?; +} +let result = s3.put_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectAcl; impl PutObjectAcl { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; +let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - let access_control_policy: Option = http::take_opt_xml_body(req)?; +let access_control_policy: Option = http::take_opt_xml_body(req)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; +let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; - let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; +let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; - let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; +let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; - let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; +let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - Ok(PutObjectAclInput { - acl, - access_control_policy, - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - grant_full_control, - grant_read, - grant_read_acp, - grant_write, - grant_write_acp, - key, - request_payer, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(PutObjectAclInput { +acl, +access_control_policy, +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +grant_full_control, +grant_read, +grant_read_acp, +grant_write, +grant_write_acp, +key, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: PutObjectAclOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectAclOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObjectAcl { - fn name(&self) -> &'static str { - "PutObjectAcl" - } +fn name(&self) -> &'static str { +"PutObjectAcl" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_acl(&mut s3_req).await?; - } - let result = s3.put_object_acl(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_acl(&mut s3_req).await?; +} +let result = s3.put_object_acl(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectLegalHold; impl PutObjectLegalHold { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let legal_hold: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); - } - Err(e) => return Err(e), - }; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - - Ok(PutObjectLegalHoldInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - legal_hold, - request_payer, - version_id, - }) +let legal_hold: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); } + Err(e) => return Err(e), +}; + +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(PutObjectLegalHoldInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +legal_hold, +request_payer, +version_id, +}) +} + + +pub fn serialize_http(x: PutObjectLegalHoldOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectLegalHoldOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObjectLegalHold { - fn name(&self) -> &'static str { - "PutObjectLegalHold" - } +fn name(&self) -> &'static str { +"PutObjectLegalHold" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_legal_hold(&mut s3_req).await?; - } - let result = s3.put_object_legal_hold(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_legal_hold(&mut s3_req).await?; +} +let result = s3.put_object_legal_hold(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectLockConfiguration; impl PutObjectLockConfiguration { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let object_lock_configuration: Option = http::take_opt_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let object_lock_configuration: Option = http::take_opt_xml_body(req)?; - let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(PutObjectLockConfigurationInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - object_lock_configuration, - request_payer, - token, - }) - } +let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; + +Ok(PutObjectLockConfigurationInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +object_lock_configuration, +request_payer, +token, +}) +} + + +pub fn serialize_http(x: PutObjectLockConfigurationOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectLockConfigurationOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObjectLockConfiguration { - fn name(&self) -> &'static str { - "PutObjectLockConfiguration" - } +fn name(&self) -> &'static str { +"PutObjectLockConfiguration" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_lock_configuration(&mut s3_req).await?; - } - let result = s3.put_object_lock_configuration(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_lock_configuration(&mut s3_req).await?; +} +let result = s3.put_object_lock_configuration(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectRetention; impl PutObjectRetention { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let bypass_governance_retention: Option = - http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let retention: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); - } - Err(e) => return Err(e), - }; - let version_id: Option = http::parse_opt_query(req, "versionId")?; - - Ok(PutObjectRetentionInput { - bucket, - bypass_governance_retention, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - request_payer, - retention, - version_id, - }) - } +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - pub fn serialize_http(x: PutObjectRetentionOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - Ok(res) +let retention: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); } + Err(e) => return Err(e), +}; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(PutObjectRetentionInput { +bucket, +bypass_governance_retention, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +request_payer, +retention, +version_id, +}) +} + + +pub fn serialize_http(x: PutObjectRetentionOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +Ok(res) +} + } #[async_trait::async_trait] impl super::Operation for PutObjectRetention { - fn name(&self) -> &'static str { - "PutObjectRetention" - } +fn name(&self) -> &'static str { +"PutObjectRetention" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_retention(&mut s3_req).await?; - } - let result = s3.put_object_retention(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_retention(&mut s3_req).await?; +} +let result = s3.put_object_retention(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutObjectTagging; impl PutObjectTagging { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let tagging: Tagging = http::take_xml_body(req)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(PutObjectTaggingInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - key, - request_payer, - tagging, - version_id, - }) - } +let tagging: Tagging = http::take_xml_body(req)?; + +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(PutObjectTaggingInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +key, +request_payer, +tagging, +version_id, +}) +} + + +pub fn serialize_http(x: PutObjectTaggingOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; +Ok(res) +} - pub fn serialize_http(x: PutObjectTaggingOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for PutObjectTagging { - fn name(&self) -> &'static str { - "PutObjectTagging" - } +fn name(&self) -> &'static str { +"PutObjectTagging" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_object_tagging(&mut s3_req).await?; - } - let result = s3.put_object_tagging(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_object_tagging(&mut s3_req).await?; +} +let result = s3.put_object_tagging(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PutPublicAccessBlock; impl PutPublicAccessBlock { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let bucket = http::unwrap_bucket(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let bucket = http::unwrap_bucket(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let public_access_block_configuration: PublicAccessBlockConfiguration = http::take_xml_body(req)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - Ok(PutPublicAccessBlockInput { - bucket, - checksum_algorithm, - content_md5, - expected_bucket_owner, - public_access_block_configuration, - }) - } +let public_access_block_configuration: PublicAccessBlockConfiguration = http::take_xml_body(req)?; + +Ok(PutPublicAccessBlockInput { +bucket, +checksum_algorithm, +content_md5, +expected_bucket_owner, +public_access_block_configuration, +}) +} + + +pub fn serialize_http(_: PutPublicAccessBlockOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: PutPublicAccessBlockOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for PutPublicAccessBlock { - fn name(&self) -> &'static str { - "PutPublicAccessBlock" - } +fn name(&self) -> &'static str { +"PutPublicAccessBlock" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.put_public_access_block(&mut s3_req).await?; - } - let result = s3.put_public_access_block(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.put_public_access_block(&mut s3_req).await?; +} +let result = s3.put_public_access_block(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct RestoreObject; impl RestoreObject { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let restore_request: Option = http::take_opt_xml_body(req)?; - let version_id: Option = http::parse_opt_query(req, "versionId")?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - Ok(RestoreObjectInput { - bucket, - checksum_algorithm, - expected_bucket_owner, - key, - request_payer, - restore_request, - version_id, - }) - } +let restore_request: Option = http::take_opt_xml_body(req)?; - pub fn serialize_http(x: RestoreObjectOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_RESTORE_OUTPUT_PATH, x.restore_output_path)?; - Ok(res) - } +let version_id: Option = http::parse_opt_query(req, "versionId")?; + +Ok(RestoreObjectInput { +bucket, +checksum_algorithm, +expected_bucket_owner, +key, +request_payer, +restore_request, +version_id, +}) } -#[async_trait::async_trait] -impl super::Operation for RestoreObject { - fn name(&self) -> &'static str { - "RestoreObject" - } - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.restore_object(&mut s3_req).await?; - } - let result = s3.restore_object(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +pub fn serialize_http(x: RestoreObjectOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_RESTORE_OUTPUT_PATH, x.restore_output_path)?; +Ok(res) +} + +} + +#[async_trait::async_trait] +impl super::Operation for RestoreObject { +fn name(&self) -> &'static str { +"RestoreObject" +} + +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.restore_object(&mut s3_req).await?; +} +let result = s3.restore_object(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct SelectObjectContent; impl SelectObjectContent { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let request: SelectObjectContentRequest = http::take_xml_body(req)?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(SelectObjectContentInput { - bucket, - expected_bucket_owner, - key, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - request, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let request: SelectObjectContentRequest = http::take_xml_body(req)?; + +Ok(SelectObjectContentInput { +bucket, +expected_bucket_owner, +key, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +request, +}) +} + + +pub fn serialize_http(x: SelectObjectContentOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(val) = x.payload { +http::set_event_stream_body(&mut res, val); +} +Ok(res) +} - pub fn serialize_http(x: SelectObjectContentOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(val) = x.payload { - http::set_event_stream_body(&mut res, val); - } - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for SelectObjectContent { - fn name(&self) -> &'static str { - "SelectObjectContent" - } +fn name(&self) -> &'static str { +"SelectObjectContent" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.select_object_content(&mut s3_req).await?; - } - let result = s3.select_object_content(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.select_object_content(&mut s3_req).await?; +} +let result = s3.select_object_content(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct UploadPart; impl UploadPart { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let body: Option = Some(http::take_stream_body(req)); +let body: Option = Some(http::take_stream_body(req)); - let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; +let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; +let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; +let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; - let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; +let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; - let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; +let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; - let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; +let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; - let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - let part_number: PartNumber = http::parse_query(req, "partNumber")?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let part_number: PartNumber = http::parse_query(req, "partNumber")?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(UploadPartInput { - body, - bucket, - checksum_algorithm, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_length, - content_md5, - expected_bucket_owner, - key, - part_number, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(UploadPartInput { +body, +bucket, +checksum_algorithm, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_length, +content_md5, +expected_bucket_owner, +key, +part_number, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + + +pub fn serialize_http(x: UploadPartOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; +http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; +http::add_opt_header(&mut res, ETAG, x.e_tag)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +Ok(res) +} - pub fn serialize_http(x: UploadPartOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; - http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; - http::add_opt_header(&mut res, ETAG, x.e_tag)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for UploadPart { - fn name(&self) -> &'static str { - "UploadPart" - } +fn name(&self) -> &'static str { +"UploadPart" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.upload_part(&mut s3_req).await?; - } - let result = s3.upload_part(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.upload_part(&mut s3_req).await?; +} +let result = s3.upload_part(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct UploadPartCopy; impl UploadPartCopy { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let (bucket, key) = http::unwrap_object(req); +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let (bucket, key) = http::unwrap_object(req); - let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; - let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; +let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; - let copy_source_if_modified_since: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; +let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; - let copy_source_if_none_match: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; +let copy_source_if_modified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - let copy_source_if_unmodified_since: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; +let copy_source_if_none_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; - let copy_source_range: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_RANGE)?; +let copy_source_if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; - let copy_source_sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let copy_source_range: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_RANGE)?; - let copy_source_sse_customer_key: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let copy_source_sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let copy_source_sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let copy_source_sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +let copy_source_sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; +let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - let part_number: PartNumber = http::parse_query(req, "partNumber")?; +let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; - let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; +let part_number: PartNumber = http::parse_query(req, "partNumber")?; - let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; +let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; +let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - Ok(UploadPartCopyInput { - bucket, - copy_source, - copy_source_if_match, - copy_source_if_modified_since, - copy_source_if_none_match, - copy_source_if_unmodified_since, - copy_source_range, - copy_source_sse_customer_algorithm, - copy_source_sse_customer_key, - copy_source_sse_customer_key_md5, - expected_bucket_owner, - expected_source_bucket_owner, - key, - part_number, - request_payer, - sse_customer_algorithm, - sse_customer_key, - sse_customer_key_md5, - upload_id, - }) - } +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + +Ok(UploadPartCopyInput { +bucket, +copy_source, +copy_source_if_match, +copy_source_if_modified_since, +copy_source_if_none_match, +copy_source_if_unmodified_since, +copy_source_range, +copy_source_sse_customer_algorithm, +copy_source_sse_customer_key, +copy_source_sse_customer_key_md5, +expected_bucket_owner, +expected_source_bucket_owner, +key, +part_number, +request_payer, +sse_customer_algorithm, +sse_customer_key, +sse_customer_key_md5, +upload_id, +}) +} + + +pub fn serialize_http(x: UploadPartCopyOutput) -> S3Result { +let mut res = http::Response::with_status(http::StatusCode::OK); +if let Some(ref val) = x.copy_part_result { + http::set_xml_body(&mut res, val)?; +} +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; +http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; +http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; +http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; +Ok(res) +} - pub fn serialize_http(x: UploadPartCopyOutput) -> S3Result { - let mut res = http::Response::with_status(http::StatusCode::OK); - if let Some(ref val) = x.copy_part_result { - http::set_xml_body(&mut res, val)?; - } - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; - http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; - http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; - http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; - Ok(res) - } } #[async_trait::async_trait] impl super::Operation for UploadPartCopy { - fn name(&self) -> &'static str { - "UploadPartCopy" - } +fn name(&self) -> &'static str { +"UploadPartCopy" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.upload_part_copy(&mut s3_req).await?; - } - let result = s3.upload_part_copy(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.upload_part_copy(&mut s3_req).await?; +} +let result = s3.upload_part_copy(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct WriteGetObjectResponse; impl WriteGetObjectResponse { - pub fn deserialize_http(req: &mut http::Request) -> S3Result { - let accept_ranges: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_ACCEPT_RANGES)?; +pub fn deserialize_http(req: &mut http::Request) -> S3Result { +let accept_ranges: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_ACCEPT_RANGES)?; - let body: Option = Some(http::take_stream_body(req)); +let body: Option = Some(http::take_stream_body(req)); - let bucket_key_enabled: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; +let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - let cache_control: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CACHE_CONTROL)?; +let cache_control: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CACHE_CONTROL)?; - let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32)?; +let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32)?; - let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C)?; +let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C)?; - let checksum_crc64nvme: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME)?; +let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME)?; - let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1)?; +let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1)?; - let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA256)?; +let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA256)?; - let content_disposition: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_DISPOSITION)?; +let content_disposition: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_DISPOSITION)?; - let content_encoding: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_ENCODING)?; +let content_encoding: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_ENCODING)?; - let content_language: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_LANGUAGE)?; +let content_language: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_LANGUAGE)?; - let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; +let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; - let content_range: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_RANGE)?; +let content_range: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_RANGE)?; - let content_type: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_TYPE)?; +let content_type: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_TYPE)?; - let delete_marker: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_DELETE_MARKER)?; +let delete_marker: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_DELETE_MARKER)?; - let e_tag: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_E_TAG)?; +let e_tag: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_E_TAG)?; - let error_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_CODE)?; +let error_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_CODE)?; - let error_message: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_MESSAGE)?; +let error_message: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_MESSAGE)?; - let expiration: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_EXPIRATION)?; +let expiration: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_EXPIRATION)?; - let expires: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_EXPIRES, TimestampFormat::HttpDate)?; +let expires: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_EXPIRES, TimestampFormat::HttpDate)?; - let last_modified: Option = - http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_LAST_MODIFIED, TimestampFormat::HttpDate)?; +let last_modified: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_LAST_MODIFIED, TimestampFormat::HttpDate)?; - let metadata: Option = http::parse_opt_metadata(req)?; +let metadata: Option = http::parse_opt_metadata(req)?; - let missing_meta: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MISSING_META)?; +let missing_meta: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MISSING_META)?; - let object_lock_legal_hold_status: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; +let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; - let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE)?; +let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE)?; - let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp( - req, - &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, - TimestampFormat::DateTime, - )?; +let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; - let parts_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT)?; - - let replication_status: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS)?; - - let request_charged: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED)?; - - let request_route: RequestRoute = http::parse_header(req, &X_AMZ_REQUEST_ROUTE)?; - - let request_token: RequestToken = http::parse_header(req, &X_AMZ_REQUEST_TOKEN)?; - - let restore: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_RESTORE)?; - - let sse_customer_algorithm: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - - let sse_customer_key_md5: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - - let ssekms_key_id: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - - let server_side_encryption: Option = - http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION)?; - - let status_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_STATUS)?; - - let storage_class: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS)?; - - let tag_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_TAGGING_COUNT)?; - - let version_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_VERSION_ID)?; - - Ok(WriteGetObjectResponseInput { - accept_ranges, - body, - bucket_key_enabled, - cache_control, - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - content_disposition, - content_encoding, - content_language, - content_length, - content_range, - content_type, - delete_marker, - e_tag, - error_code, - error_message, - expiration, - expires, - last_modified, - metadata, - missing_meta, - object_lock_legal_hold_status, - object_lock_mode, - object_lock_retain_until_date, - parts_count, - replication_status, - request_charged, - request_route, - request_token, - restore, - sse_customer_algorithm, - sse_customer_key_md5, - ssekms_key_id, - server_side_encryption, - status_code, - storage_class, - tag_count, - version_id, - }) - } +let parts_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT)?; + +let replication_status: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS)?; + +let request_charged: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED)?; + +let request_route: RequestRoute = http::parse_header(req, &X_AMZ_REQUEST_ROUTE)?; + +let request_token: RequestToken = http::parse_header(req, &X_AMZ_REQUEST_TOKEN)?; + +let restore: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_RESTORE)?; + +let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + +let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + +let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + +let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION)?; + +let status_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_STATUS)?; + +let storage_class: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS)?; + +let tag_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_TAGGING_COUNT)?; + +let version_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_VERSION_ID)?; + +Ok(WriteGetObjectResponseInput { +accept_ranges, +body, +bucket_key_enabled, +cache_control, +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +content_disposition, +content_encoding, +content_language, +content_length, +content_range, +content_type, +delete_marker, +e_tag, +error_code, +error_message, +expiration, +expires, +last_modified, +metadata, +missing_meta, +object_lock_legal_hold_status, +object_lock_mode, +object_lock_retain_until_date, +parts_count, +replication_status, +request_charged, +request_route, +request_token, +restore, +sse_customer_algorithm, +sse_customer_key_md5, +ssekms_key_id, +server_side_encryption, +status_code, +storage_class, +tag_count, +version_id, +}) +} + + +pub fn serialize_http(_: WriteGetObjectResponseOutput) -> S3Result { +Ok(http::Response::with_status(http::StatusCode::OK)) +} - pub fn serialize_http(_: WriteGetObjectResponseOutput) -> S3Result { - Ok(http::Response::with_status(http::StatusCode::OK)) - } } #[async_trait::async_trait] impl super::Operation for WriteGetObjectResponse { - fn name(&self) -> &'static str { - "WriteGetObjectResponse" - } +fn name(&self) -> &'static str { +"WriteGetObjectResponse" +} - async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { - let input = Self::deserialize_http(req)?; - let mut s3_req = super::build_s3_request(input, req); - let s3 = ccx.s3; - if let Some(access) = ccx.access { - access.write_get_object_response(&mut s3_req).await?; - } - let result = s3.write_get_object_response(s3_req).await; - let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), - }; - let mut resp = Self::serialize_http(s3_resp.output)?; - resp.headers.extend(s3_resp.headers); - resp.extensions.extend(s3_resp.extensions); - Ok(resp) - } +async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { +let input = Self::deserialize_http(req)?; +let mut s3_req = super::build_s3_request(input, req); +let s3 = ccx.s3; +if let Some(access) = ccx.access { + access.write_get_object_response(&mut s3_req).await?; +} +let result = s3.write_get_object_response(s3_req).await; +let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), +}; +let mut resp = Self::serialize_http(s3_resp.output)?; +resp.headers.extend(s3_resp.headers); +resp.extensions.extend(s3_resp.extensions); +Ok(resp) +} } pub struct PostObject; @@ -6731,8 +6942,10 @@ impl PostObject { .append_pair("etag", etag_str); let mut res = http::Response::with_status(http::StatusCode::SEE_OTHER); - res.headers - .insert(hyper::header::LOCATION, url.as_str().parse().map_err(|e| s3_error!(e, InternalError))?); + res.headers.insert( + hyper::header::LOCATION, + url.as_str().parse().map_err(|e| s3_error!(e, InternalError))? + ); return Ok(res); } @@ -6798,361 +7011,366 @@ impl super::Operation for PostObject { Err(err) => return super::serialize_error(err, false), }; // Serialize with POST-specific response behavior - let mut resp = - Self::serialize_http(&bucket, &key, success_action_redirect.as_deref(), success_action_status, &s3_resp.output)?; + let mut resp = Self::serialize_http( + &bucket, + &key, + success_action_redirect.as_deref(), + success_action_status, + &s3_resp.output, + )?; resp.headers.extend(s3_resp.headers); resp.extensions.extend(s3_resp.extensions); Ok(resp) } } -pub fn resolve_route( - req: &http::Request, - s3_path: &S3Path, - qs: Option<&http::OrderedQs>, -) -> S3Result<(&'static dyn super::Operation, bool)> { - match req.method { - hyper::Method::HEAD => match s3_path { - S3Path::Root => Err(super::unknown_operation()), - S3Path::Bucket { .. } => Ok((&HeadBucket as &'static dyn super::Operation, false)), - S3Path::Object { .. } => Ok((&HeadObject as &'static dyn super::Operation, false)), - }, - hyper::Method::GET => match s3_path { - S3Path::Root => { - if let Some(qs) = qs { - if super::check_query_pattern(qs, "x-id", "ListDirectoryBuckets") { - return Ok((&ListDirectoryBuckets as &'static dyn super::Operation, false)); - } - } - Ok((&ListBuckets as &'static dyn super::Operation, false)) - } - S3Path::Bucket { .. } => { - if let Some(qs) = qs { - if qs.has("analytics") && qs.has("id") { - return Ok((&GetBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("intelligent-tiering") && qs.has("id") { - return Ok((&GetBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("inventory") && qs.has("id") { - return Ok((&GetBucketInventoryConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("metrics") && qs.has("id") { - return Ok((&GetBucketMetricsConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("session") { - return Ok((&CreateSession as &'static dyn super::Operation, false)); - } - if qs.has("accelerate") { - return Ok((&GetBucketAccelerateConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("acl") { - return Ok((&GetBucketAcl as &'static dyn super::Operation, false)); - } - if qs.has("cors") { - return Ok((&GetBucketCors as &'static dyn super::Operation, false)); - } - if qs.has("encryption") { - return Ok((&GetBucketEncryption as &'static dyn super::Operation, false)); - } - if qs.has("lifecycle") { - return Ok((&GetBucketLifecycleConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("location") { - return Ok((&GetBucketLocation as &'static dyn super::Operation, false)); - } - if qs.has("logging") { - return Ok((&GetBucketLogging as &'static dyn super::Operation, false)); - } - if qs.has("metadataTable") { - return Ok((&GetBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("notification") { - return Ok((&GetBucketNotificationConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("ownershipControls") { - return Ok((&GetBucketOwnershipControls as &'static dyn super::Operation, false)); - } - if qs.has("policy") { - return Ok((&GetBucketPolicy as &'static dyn super::Operation, false)); - } - if qs.has("policyStatus") { - return Ok((&GetBucketPolicyStatus as &'static dyn super::Operation, false)); - } - if qs.has("replication") { - return Ok((&GetBucketReplication as &'static dyn super::Operation, false)); - } - if qs.has("requestPayment") { - return Ok((&GetBucketRequestPayment as &'static dyn super::Operation, false)); - } - if qs.has("tagging") { - return Ok((&GetBucketTagging as &'static dyn super::Operation, false)); - } - if qs.has("versioning") { - return Ok((&GetBucketVersioning as &'static dyn super::Operation, false)); - } - if qs.has("website") { - return Ok((&GetBucketWebsite as &'static dyn super::Operation, false)); - } - if qs.has("object-lock") { - return Ok((&GetObjectLockConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("publicAccessBlock") { - return Ok((&GetPublicAccessBlock as &'static dyn super::Operation, false)); - } - if qs.has("analytics") && !qs.has("id") { - return Ok((&ListBucketAnalyticsConfigurations as &'static dyn super::Operation, false)); - } - if qs.has("intelligent-tiering") && !qs.has("id") { - return Ok((&ListBucketIntelligentTieringConfigurations as &'static dyn super::Operation, false)); - } - if qs.has("inventory") && !qs.has("id") { - return Ok((&ListBucketInventoryConfigurations as &'static dyn super::Operation, false)); - } - if qs.has("metrics") && !qs.has("id") { - return Ok((&ListBucketMetricsConfigurations as &'static dyn super::Operation, false)); - } - if qs.has("uploads") { - return Ok((&ListMultipartUploads as &'static dyn super::Operation, false)); - } - if qs.has("versions") { - return Ok((&ListObjectVersions as &'static dyn super::Operation, false)); - } - if super::check_query_pattern(qs, "list-type", "2") { - return Ok((&ListObjectsV2 as &'static dyn super::Operation, false)); - } - } - Ok((&ListObjects as &'static dyn super::Operation, false)) - } - S3Path::Object { .. } => { - if let Some(qs) = qs { - if qs.has("attributes") { - return Ok((&GetObjectAttributes as &'static dyn super::Operation, false)); - } - if qs.has("acl") { - return Ok((&GetObjectAcl as &'static dyn super::Operation, false)); - } - if qs.has("legal-hold") { - return Ok((&GetObjectLegalHold as &'static dyn super::Operation, false)); - } - if qs.has("retention") { - return Ok((&GetObjectRetention as &'static dyn super::Operation, false)); - } - if qs.has("tagging") { - return Ok((&GetObjectTagging as &'static dyn super::Operation, false)); - } - if qs.has("torrent") { - return Ok((&GetObjectTorrent as &'static dyn super::Operation, false)); - } - } - if let Some(qs) = qs - && qs.has("uploadId") - { - return Ok((&ListParts as &'static dyn super::Operation, false)); - } - Ok((&GetObject as &'static dyn super::Operation, false)) - } - }, - hyper::Method::POST => match s3_path { - S3Path::Root => Err(super::unknown_operation()), - S3Path::Bucket { .. } => { - if let Some(qs) = qs { - if qs.has("metadataTable") { - return Ok((&CreateBucketMetadataTableConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("delete") { - return Ok((&DeleteObjects as &'static dyn super::Operation, true)); - } - } - if req.headers.contains_key("x-amz-request-route") && req.headers.contains_key("x-amz-request-token") { - return Ok((&WriteGetObjectResponse as &'static dyn super::Operation, false)); - } - Err(super::unknown_operation()) - } - S3Path::Object { .. } => { - if let Some(qs) = qs { - if qs.has("select") && super::check_query_pattern(qs, "select-type", "2") { - return Ok((&SelectObjectContent as &'static dyn super::Operation, true)); - } - if qs.has("uploads") { - return Ok((&CreateMultipartUpload as &'static dyn super::Operation, false)); - } - if qs.has("restore") { - return Ok((&RestoreObject as &'static dyn super::Operation, true)); - } - } - if let Some(qs) = qs - && qs.has("uploadId") - { - return Ok((&CompleteMultipartUpload as &'static dyn super::Operation, true)); - } - Err(super::unknown_operation()) - } - }, - hyper::Method::PUT => match s3_path { - S3Path::Root => Err(super::unknown_operation()), - S3Path::Bucket { .. } => { - if let Some(qs) = qs { - if qs.has("analytics") { - return Ok((&PutBucketAnalyticsConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("intelligent-tiering") { - return Ok((&PutBucketIntelligentTieringConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("inventory") { - return Ok((&PutBucketInventoryConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("metrics") { - return Ok((&PutBucketMetricsConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("accelerate") { - return Ok((&PutBucketAccelerateConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("acl") { - return Ok((&PutBucketAcl as &'static dyn super::Operation, true)); - } - if qs.has("cors") { - return Ok((&PutBucketCors as &'static dyn super::Operation, true)); - } - if qs.has("encryption") { - return Ok((&PutBucketEncryption as &'static dyn super::Operation, true)); - } - if qs.has("lifecycle") { - return Ok((&PutBucketLifecycleConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("logging") { - return Ok((&PutBucketLogging as &'static dyn super::Operation, true)); - } - if qs.has("notification") { - return Ok((&PutBucketNotificationConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("ownershipControls") { - return Ok((&PutBucketOwnershipControls as &'static dyn super::Operation, true)); - } - if qs.has("policy") { - return Ok((&PutBucketPolicy as &'static dyn super::Operation, true)); - } - if qs.has("replication") { - return Ok((&PutBucketReplication as &'static dyn super::Operation, true)); - } - if qs.has("requestPayment") { - return Ok((&PutBucketRequestPayment as &'static dyn super::Operation, true)); - } - if qs.has("tagging") { - return Ok((&PutBucketTagging as &'static dyn super::Operation, true)); - } - if qs.has("versioning") { - return Ok((&PutBucketVersioning as &'static dyn super::Operation, true)); - } - if qs.has("website") { - return Ok((&PutBucketWebsite as &'static dyn super::Operation, true)); - } - if qs.has("object-lock") { - return Ok((&PutObjectLockConfiguration as &'static dyn super::Operation, true)); - } - if qs.has("publicAccessBlock") { - return Ok((&PutPublicAccessBlock as &'static dyn super::Operation, true)); - } - } - Ok((&CreateBucket as &'static dyn super::Operation, true)) - } - S3Path::Object { .. } => { - if let Some(qs) = qs { - if qs.has("acl") { - return Ok((&PutObjectAcl as &'static dyn super::Operation, true)); - } - if qs.has("legal-hold") { - return Ok((&PutObjectLegalHold as &'static dyn super::Operation, true)); - } - if qs.has("retention") { - return Ok((&PutObjectRetention as &'static dyn super::Operation, true)); - } - if qs.has("tagging") { - return Ok((&PutObjectTagging as &'static dyn super::Operation, true)); - } - } - if let Some(qs) = qs - && qs.has("partNumber") - && qs.has("uploadId") - && req.headers.contains_key("x-amz-copy-source") - { - return Ok((&UploadPartCopy as &'static dyn super::Operation, false)); - } - if let Some(qs) = qs - && qs.has("partNumber") - && qs.has("uploadId") - { - return Ok((&UploadPart as &'static dyn super::Operation, false)); - } - if req.headers.contains_key("x-amz-copy-source") { - return Ok((&CopyObject as &'static dyn super::Operation, false)); - } - Ok((&PutObject as &'static dyn super::Operation, false)) - } - }, - hyper::Method::DELETE => match s3_path { - S3Path::Root => Err(super::unknown_operation()), - S3Path::Bucket { .. } => { - if let Some(qs) = qs { - if qs.has("analytics") { - return Ok((&DeleteBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("intelligent-tiering") { - return Ok((&DeleteBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("inventory") { - return Ok((&DeleteBucketInventoryConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("metrics") { - return Ok((&DeleteBucketMetricsConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("cors") { - return Ok((&DeleteBucketCors as &'static dyn super::Operation, false)); - } - if qs.has("encryption") { - return Ok((&DeleteBucketEncryption as &'static dyn super::Operation, false)); - } - if qs.has("lifecycle") { - return Ok((&DeleteBucketLifecycle as &'static dyn super::Operation, false)); - } - if qs.has("metadataTable") { - return Ok((&DeleteBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); - } - if qs.has("ownershipControls") { - return Ok((&DeleteBucketOwnershipControls as &'static dyn super::Operation, false)); - } - if qs.has("policy") { - return Ok((&DeleteBucketPolicy as &'static dyn super::Operation, false)); - } - if qs.has("replication") { - return Ok((&DeleteBucketReplication as &'static dyn super::Operation, false)); - } - if qs.has("tagging") { - return Ok((&DeleteBucketTagging as &'static dyn super::Operation, false)); - } - if qs.has("website") { - return Ok((&DeleteBucketWebsite as &'static dyn super::Operation, false)); - } - if qs.has("publicAccessBlock") { - return Ok((&DeletePublicAccessBlock as &'static dyn super::Operation, false)); - } - } - Ok((&DeleteBucket as &'static dyn super::Operation, false)) - } - S3Path::Object { .. } => { - if let Some(qs) = qs { - if qs.has("tagging") { - return Ok((&DeleteObjectTagging as &'static dyn super::Operation, false)); - } - } - if let Some(qs) = qs - && qs.has("uploadId") - { - return Ok((&AbortMultipartUpload as &'static dyn super::Operation, false)); - } - Ok((&DeleteObject as &'static dyn super::Operation, false)) - } - }, - _ => Err(super::unknown_operation()), - } +pub fn resolve_route(req: &http::Request, s3_path: &S3Path, qs: Option<&http::OrderedQs>)-> S3Result<(&'static dyn super::Operation, bool)> { +match req.method { +hyper::Method::HEAD => match s3_path { +S3Path::Root => { +Err(super::unknown_operation()) +} +S3Path::Bucket{ .. } => { +Ok((&HeadBucket as &'static dyn super::Operation, false)) +} +S3Path::Object{ .. } => { +Ok((&HeadObject as &'static dyn super::Operation, false)) +} +} +hyper::Method::GET => match s3_path { +S3Path::Root => { +if let Some(qs) = qs { +if super::check_query_pattern(qs, "x-id","ListDirectoryBuckets") { +return Ok((&ListDirectoryBuckets as &'static dyn super::Operation, false)); +} +} +Ok((&ListBuckets as &'static dyn super::Operation, false)) +} +S3Path::Bucket{ .. } => { +if let Some(qs) = qs { +if qs.has("analytics") && qs.has("id") { +return Ok((&GetBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("intelligent-tiering") && qs.has("id") { +return Ok((&GetBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("inventory") && qs.has("id") { +return Ok((&GetBucketInventoryConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("metrics") && qs.has("id") { +return Ok((&GetBucketMetricsConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("session") { +return Ok((&CreateSession as &'static dyn super::Operation, false)); +} +if qs.has("accelerate") { +return Ok((&GetBucketAccelerateConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("acl") { +return Ok((&GetBucketAcl as &'static dyn super::Operation, false)); +} +if qs.has("cors") { +return Ok((&GetBucketCors as &'static dyn super::Operation, false)); +} +if qs.has("encryption") { +return Ok((&GetBucketEncryption as &'static dyn super::Operation, false)); +} +if qs.has("lifecycle") { +return Ok((&GetBucketLifecycleConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("location") { +return Ok((&GetBucketLocation as &'static dyn super::Operation, false)); +} +if qs.has("logging") { +return Ok((&GetBucketLogging as &'static dyn super::Operation, false)); +} +if qs.has("metadataTable") { +return Ok((&GetBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("notification") { +return Ok((&GetBucketNotificationConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("ownershipControls") { +return Ok((&GetBucketOwnershipControls as &'static dyn super::Operation, false)); +} +if qs.has("policy") { +return Ok((&GetBucketPolicy as &'static dyn super::Operation, false)); +} +if qs.has("policyStatus") { +return Ok((&GetBucketPolicyStatus as &'static dyn super::Operation, false)); +} +if qs.has("replication") { +return Ok((&GetBucketReplication as &'static dyn super::Operation, false)); +} +if qs.has("requestPayment") { +return Ok((&GetBucketRequestPayment as &'static dyn super::Operation, false)); +} +if qs.has("tagging") { +return Ok((&GetBucketTagging as &'static dyn super::Operation, false)); +} +if qs.has("versioning") { +return Ok((&GetBucketVersioning as &'static dyn super::Operation, false)); +} +if qs.has("website") { +return Ok((&GetBucketWebsite as &'static dyn super::Operation, false)); +} +if qs.has("object-lock") { +return Ok((&GetObjectLockConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("publicAccessBlock") { +return Ok((&GetPublicAccessBlock as &'static dyn super::Operation, false)); +} +if qs.has("analytics") && !qs.has("id") { +return Ok((&ListBucketAnalyticsConfigurations as &'static dyn super::Operation, false)); +} +if qs.has("intelligent-tiering") && !qs.has("id") { +return Ok((&ListBucketIntelligentTieringConfigurations as &'static dyn super::Operation, false)); +} +if qs.has("inventory") && !qs.has("id") { +return Ok((&ListBucketInventoryConfigurations as &'static dyn super::Operation, false)); +} +if qs.has("metrics") && !qs.has("id") { +return Ok((&ListBucketMetricsConfigurations as &'static dyn super::Operation, false)); +} +if qs.has("uploads") { +return Ok((&ListMultipartUploads as &'static dyn super::Operation, false)); +} +if qs.has("versions") { +return Ok((&ListObjectVersions as &'static dyn super::Operation, false)); +} +if super::check_query_pattern(qs, "list-type","2") { +return Ok((&ListObjectsV2 as &'static dyn super::Operation, false)); +} +} +Ok((&ListObjects as &'static dyn super::Operation, false)) +} +S3Path::Object{ .. } => { +if let Some(qs) = qs { +if qs.has("attributes") { +return Ok((&GetObjectAttributes as &'static dyn super::Operation, false)); +} +if qs.has("acl") { +return Ok((&GetObjectAcl as &'static dyn super::Operation, false)); +} +if qs.has("legal-hold") { +return Ok((&GetObjectLegalHold as &'static dyn super::Operation, false)); +} +if qs.has("retention") { +return Ok((&GetObjectRetention as &'static dyn super::Operation, false)); +} +if qs.has("tagging") { +return Ok((&GetObjectTagging as &'static dyn super::Operation, false)); +} +if qs.has("torrent") { +return Ok((&GetObjectTorrent as &'static dyn super::Operation, false)); +} +} +if let Some(qs) = qs + && qs.has("uploadId") { +return Ok((&ListParts as &'static dyn super::Operation, false)); +} +Ok((&GetObject as &'static dyn super::Operation, false)) +} +} +hyper::Method::POST => match s3_path { +S3Path::Root => { +Err(super::unknown_operation()) +} +S3Path::Bucket{ .. } => { +if let Some(qs) = qs { +if qs.has("metadataTable") { +return Ok((&CreateBucketMetadataTableConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("delete") { +return Ok((&DeleteObjects as &'static dyn super::Operation, true)); +} +} +if req.headers.contains_key("x-amz-request-route") && req.headers.contains_key("x-amz-request-token") { +return Ok((&WriteGetObjectResponse as &'static dyn super::Operation, false)); +} +Err(super::unknown_operation()) +} +S3Path::Object{ .. } => { +if let Some(qs) = qs { +if qs.has("select") && super::check_query_pattern(qs, "select-type","2") { +return Ok((&SelectObjectContent as &'static dyn super::Operation, true)); +} +if qs.has("uploads") { +return Ok((&CreateMultipartUpload as &'static dyn super::Operation, false)); +} +if qs.has("restore") { +return Ok((&RestoreObject as &'static dyn super::Operation, true)); +} +} +if let Some(qs) = qs + && qs.has("uploadId") { +return Ok((&CompleteMultipartUpload as &'static dyn super::Operation, true)); +} +Err(super::unknown_operation()) +} +} +hyper::Method::PUT => match s3_path { +S3Path::Root => { +Err(super::unknown_operation()) +} +S3Path::Bucket{ .. } => { +if let Some(qs) = qs { +if qs.has("analytics") { +return Ok((&PutBucketAnalyticsConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("intelligent-tiering") { +return Ok((&PutBucketIntelligentTieringConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("inventory") { +return Ok((&PutBucketInventoryConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("metrics") { +return Ok((&PutBucketMetricsConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("accelerate") { +return Ok((&PutBucketAccelerateConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("acl") { +return Ok((&PutBucketAcl as &'static dyn super::Operation, true)); +} +if qs.has("cors") { +return Ok((&PutBucketCors as &'static dyn super::Operation, true)); +} +if qs.has("encryption") { +return Ok((&PutBucketEncryption as &'static dyn super::Operation, true)); +} +if qs.has("lifecycle") { +return Ok((&PutBucketLifecycleConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("logging") { +return Ok((&PutBucketLogging as &'static dyn super::Operation, true)); +} +if qs.has("notification") { +return Ok((&PutBucketNotificationConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("ownershipControls") { +return Ok((&PutBucketOwnershipControls as &'static dyn super::Operation, true)); +} +if qs.has("policy") { +return Ok((&PutBucketPolicy as &'static dyn super::Operation, true)); +} +if qs.has("replication") { +return Ok((&PutBucketReplication as &'static dyn super::Operation, true)); +} +if qs.has("requestPayment") { +return Ok((&PutBucketRequestPayment as &'static dyn super::Operation, true)); +} +if qs.has("tagging") { +return Ok((&PutBucketTagging as &'static dyn super::Operation, true)); +} +if qs.has("versioning") { +return Ok((&PutBucketVersioning as &'static dyn super::Operation, true)); +} +if qs.has("website") { +return Ok((&PutBucketWebsite as &'static dyn super::Operation, true)); +} +if qs.has("object-lock") { +return Ok((&PutObjectLockConfiguration as &'static dyn super::Operation, true)); +} +if qs.has("publicAccessBlock") { +return Ok((&PutPublicAccessBlock as &'static dyn super::Operation, true)); +} +} +Ok((&CreateBucket as &'static dyn super::Operation, true)) +} +S3Path::Object{ .. } => { +if let Some(qs) = qs { +if qs.has("acl") { +return Ok((&PutObjectAcl as &'static dyn super::Operation, true)); +} +if qs.has("legal-hold") { +return Ok((&PutObjectLegalHold as &'static dyn super::Operation, true)); +} +if qs.has("retention") { +return Ok((&PutObjectRetention as &'static dyn super::Operation, true)); +} +if qs.has("tagging") { +return Ok((&PutObjectTagging as &'static dyn super::Operation, true)); +} +} +if let Some(qs) = qs + && qs.has("partNumber") && qs.has("uploadId") && req.headers.contains_key("x-amz-copy-source") { +return Ok((&UploadPartCopy as &'static dyn super::Operation, false)); +} +if let Some(qs) = qs + && qs.has("partNumber") && qs.has("uploadId") { +return Ok((&UploadPart as &'static dyn super::Operation, false)); +} +if req.headers.contains_key("x-amz-copy-source") { +return Ok((&CopyObject as &'static dyn super::Operation, false)); +} +Ok((&PutObject as &'static dyn super::Operation, false)) +} +} +hyper::Method::DELETE => match s3_path { +S3Path::Root => { +Err(super::unknown_operation()) +} +S3Path::Bucket{ .. } => { +if let Some(qs) = qs { +if qs.has("analytics") { +return Ok((&DeleteBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("intelligent-tiering") { +return Ok((&DeleteBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("inventory") { +return Ok((&DeleteBucketInventoryConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("metrics") { +return Ok((&DeleteBucketMetricsConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("cors") { +return Ok((&DeleteBucketCors as &'static dyn super::Operation, false)); +} +if qs.has("encryption") { +return Ok((&DeleteBucketEncryption as &'static dyn super::Operation, false)); +} +if qs.has("lifecycle") { +return Ok((&DeleteBucketLifecycle as &'static dyn super::Operation, false)); +} +if qs.has("metadataTable") { +return Ok((&DeleteBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); +} +if qs.has("ownershipControls") { +return Ok((&DeleteBucketOwnershipControls as &'static dyn super::Operation, false)); +} +if qs.has("policy") { +return Ok((&DeleteBucketPolicy as &'static dyn super::Operation, false)); +} +if qs.has("replication") { +return Ok((&DeleteBucketReplication as &'static dyn super::Operation, false)); +} +if qs.has("tagging") { +return Ok((&DeleteBucketTagging as &'static dyn super::Operation, false)); +} +if qs.has("website") { +return Ok((&DeleteBucketWebsite as &'static dyn super::Operation, false)); +} +if qs.has("publicAccessBlock") { +return Ok((&DeletePublicAccessBlock as &'static dyn super::Operation, false)); +} +} +Ok((&DeleteBucket as &'static dyn super::Operation, false)) +} +S3Path::Object{ .. } => { +if let Some(qs) = qs { +if qs.has("tagging") { +return Ok((&DeleteObjectTagging as &'static dyn super::Operation, false)); +} +} +if let Some(qs) = qs + && qs.has("uploadId") { +return Ok((&AbortMultipartUpload as &'static dyn super::Operation, false)); +} +Ok((&DeleteObject as &'static dyn super::Operation, false)) +} +} +_ => Err(super::unknown_operation()) +} } diff --git a/crates/s3s/src/s3_trait.rs b/crates/s3s/src/s3_trait.rs index 44fb8d80..48503956 100644 --- a/crates/s3s/src/s3_trait.rs +++ b/crates/s3s/src/s3_trait.rs @@ -8,7274 +8,7074 @@ use crate::protocol::S3Response; /// An async trait which represents the S3 API #[async_trait::async_trait] pub trait S3: Send + Sync + 'static { - ///

    This operation aborts a multipart upload. After a multipart upload is aborted, no - /// additional parts can be uploaded using that upload ID. The storage consumed by any - /// previously uploaded parts will be freed. However, if any part uploads are currently in - /// progress, those part uploads might or might not succeed. As a result, it might be necessary - /// to abort a given multipart upload multiple times in order to completely free all storage - /// consumed by all parts.

    - ///

    To verify that all parts have been removed and prevent getting charged for the part - /// storage, you should call the ListParts API operation and ensure - /// that the parts list is empty.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - If multipart - /// uploads in a directory bucket are in progress, you can't delete the bucket until - /// all the in-progress multipart uploads are aborted or completed. To delete these - /// in-progress multipart uploads, use the ListMultipartUploads operation - /// to list the in-progress multipart uploads in the bucket and use the - /// AbortMultipartUpload operation to abort all the in-progress - /// multipart uploads.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - For - /// information about permissions required to use the multipart upload, see - /// Multipart Upload and - /// Permissions in the Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to AbortMultipartUpload:

    - /// - async fn abort_multipart_upload( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "AbortMultipartUpload is not implemented yet")) - } - ///

    Completes a multipart upload by assembling previously uploaded parts.

    - ///

    You first initiate the multipart upload and then upload all parts using the UploadPart - /// operation or the UploadPartCopy operation. - /// After successfully uploading all relevant parts of an upload, you call this - /// CompleteMultipartUpload operation to complete the upload. Upon receiving - /// this request, Amazon S3 concatenates all the parts in ascending order by part number to create a - /// new object. In the CompleteMultipartUpload request, you must provide the parts list and - /// ensure that the parts list is complete. The CompleteMultipartUpload API operation - /// concatenates the parts that you provide in the list. For each part in the list, you must - /// provide the PartNumber value and the ETag value that are returned - /// after that part was uploaded.

    - ///

    The processing of a CompleteMultipartUpload request could take several minutes to - /// finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that - /// specifies a 200 OK response. While processing is in progress, Amazon S3 - /// periodically sends white space characters to keep the connection from timing out. A request - /// could fail after the initial 200 OK response has been sent. This means that a - /// 200 OK response can contain either a success or an error. The error - /// response might be embedded in the 200 OK response. If you call this API - /// operation directly, make sure to design your application to parse the contents of the - /// response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. - /// The SDKs detect the embedded error and apply error handling per your configuration settings - /// (including automatically retrying the request as appropriate). If the condition persists, - /// the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an - /// error).

    - ///

    Note that if CompleteMultipartUpload fails, applications should be prepared - /// to retry any failed requests (including 500 error responses). For more information, see - /// Amazon S3 Error - /// Best Practices.

    - /// - ///

    You can't use Content-Type: application/x-www-form-urlencoded for the - /// CompleteMultipartUpload requests. Also, if you don't provide a Content-Type - /// header, CompleteMultipartUpload can still return a 200 OK - /// response.

    - ///
    - ///

    For more information about multipart uploads, see Uploading Objects Using Multipart - /// Upload in the Amazon S3 User Guide.

    - /// - ///

    - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - For - /// information about permissions required to use the multipart upload API, see - /// Multipart Upload and - /// Permissions in the Amazon S3 User Guide.

      - ///

      If you provide an additional checksum - /// value in your MultipartUpload requests and the - /// object is encrypted with Key Management Service, you must have permission to use the - /// kms:Decrypt action for the - /// CompleteMultipartUpload request to succeed.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///

      If the object is encrypted with SSE-KMS, you must also have the - /// kms:GenerateDataKey and kms:Decrypt permissions - /// in IAM identity-based policies and KMS key policies for the KMS - /// key.

      - ///
    • - ///
    - ///
    - ///
    Special errors
    - ///
    - ///
      - ///
    • - ///

      Error Code: EntityTooSmall - ///

      - ///
        - ///
      • - ///

        Description: Your proposed upload is smaller than the minimum - /// allowed object size. Each part must be at least 5 MB in size, except - /// the last part.

        - ///
      • - ///
      • - ///

        HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      Error Code: InvalidPart - ///

      - ///
        - ///
      • - ///

        Description: One or more of the specified parts could not be found. - /// The part might not have been uploaded, or the specified ETag might not - /// have matched the uploaded part's ETag.

        - ///
      • - ///
      • - ///

        HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      Error Code: InvalidPartOrder - ///

      - ///
        - ///
      • - ///

        Description: The list of parts was not in ascending order. The - /// parts list must be specified in order by part number.

        - ///
      • - ///
      • - ///

        HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      Error Code: NoSuchUpload - ///

      - ///
        - ///
      • - ///

        Description: The specified multipart upload does not exist. The - /// upload ID might be invalid, or the multipart upload might have been - /// aborted or completed.

        - ///
      • - ///
      • - ///

        HTTP Status Code: 404 Not Found

        - ///
      • - ///
      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to CompleteMultipartUpload:

    - /// - async fn complete_multipart_upload( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "CompleteMultipartUpload is not implemented yet")) - } +///

    This operation aborts a multipart upload. After a multipart upload is aborted, no +/// additional parts can be uploaded using that upload ID. The storage consumed by any +/// previously uploaded parts will be freed. However, if any part uploads are currently in +/// progress, those part uploads might or might not succeed. As a result, it might be necessary +/// to abort a given multipart upload multiple times in order to completely free all storage +/// consumed by all parts.

    +///

    To verify that all parts have been removed and prevent getting charged for the part +/// storage, you should call the ListParts API operation and ensure +/// that the parts list is empty.

    +/// +///
      +///
    • +///

      +/// Directory buckets - If multipart +/// uploads in a directory bucket are in progress, you can't delete the bucket until +/// all the in-progress multipart uploads are aborted or completed. To delete these +/// in-progress multipart uploads, use the ListMultipartUploads operation +/// to list the in-progress multipart uploads in the bucket and use the +/// AbortMultipartUpload operation to abort all the in-progress +/// multipart uploads.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - For +/// information about permissions required to use the multipart upload, see +/// Multipart Upload and +/// Permissions in the Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to AbortMultipartUpload:

    +/// +async fn abort_multipart_upload(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "AbortMultipartUpload is not implemented yet")) +} - ///

    Creates a copy of an object that is already stored in Amazon S3.

    - /// - ///

    You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your - /// object up to 5 GB in size in a single atomic action using this API. However, to copy an - /// object greater than 5 GB, you must use the multipart upload Upload Part - Copy - /// (UploadPartCopy) API. For more information, see Copy Object Using the - /// REST Multipart Upload API.

    - ///
    - ///

    You can copy individual objects between general purpose buckets, between directory buckets, - /// and between general purpose buckets and directory buckets.

    - /// - ///
      - ///
    • - ///

      Amazon S3 supports copy operations using Multi-Region Access Points only as a - /// destination when using the Multi-Region Access Point ARN.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      VPC endpoints don't support cross-Region requests (including copies). If you're - /// using VPC endpoints, your source and destination buckets should be in the same - /// Amazon Web Services Region as your VPC endpoint.

      - ///
    • - ///
    - ///
    - ///

    Both the Region that you want to copy the object from and the Region that you want to - /// copy the object to must be enabled for your account. For more information about how to - /// enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services - /// Account Management Guide.

    - /// - ///

    Amazon S3 transfer acceleration does not support cross-Region copies. If you request a - /// cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad - /// Request error. For more information, see Transfer - /// Acceleration.

    - ///
    - ///
    - ///
    Authentication and authorization
    - ///
    - ///

    All CopyObject requests must be authenticated and signed by using - /// IAM credentials (access key ID and secret access key for the IAM identities). - /// All headers with the x-amz- prefix, including - /// x-amz-copy-source, must be signed. For more information, see - /// REST Authentication.

    - ///

    - /// Directory buckets - You must use the - /// IAM credentials to authenticate and authorize your access to the - /// CopyObject API operation, instead of using the temporary security - /// credentials through the CreateSession API operation.

    - ///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your - /// behalf.

    - ///
    - ///
    Permissions
    - ///
    - ///

    You must have read access to the source object and - /// write access to the destination bucket.

    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - You - /// must have permissions in an IAM policy based on the source and destination - /// bucket types in a CopyObject operation.

      - ///
        - ///
      • - ///

        If the source object is in a general purpose bucket, you must have - /// - /// s3:GetObject - /// - /// permission to read the source object that is being copied.

        - ///
      • - ///
      • - ///

        If the destination bucket is a general purpose bucket, you must have - /// - /// s3:PutObject - /// - /// permission to write the object copy to the destination bucket.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// You must have permissions in a bucket policy or an IAM identity-based policy based on the - /// source and destination bucket types in a CopyObject - /// operation.

      - ///
        - ///
      • - ///

        If the source object that you want to copy is in a - /// directory bucket, you must have the - /// s3express:CreateSession - /// permission in - /// the Action element of a policy to read the object. By - /// default, the session is in the ReadWrite mode. If you - /// want to restrict the access, you can explicitly set the - /// s3express:SessionMode condition key to - /// ReadOnly on the copy source bucket.

        - ///
      • - ///
      • - ///

        If the copy destination is a directory bucket, you must have the - /// - /// s3express:CreateSession - /// permission in the - /// Action element of a policy to write the object to the - /// destination. The s3express:SessionMode condition key - /// can't be set to ReadOnly on the copy destination bucket. - ///

        - ///
      • - ///
      - ///

      If the object is encrypted with SSE-KMS, you must also have the - /// kms:GenerateDataKey and kms:Decrypt permissions - /// in IAM identity-based policies and KMS key policies for the KMS - /// key.

      - ///

      For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for - /// S3 Express One Zone in the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    Response and special errors
    - ///
    - ///

    When the request is an HTTP 1.1 request, the response is chunk encoded. When - /// the request is not an HTTP 1.1 request, the response would not contain the - /// Content-Length. You always need to read the entire response body - /// to check if the copy succeeds.

    - ///
      - ///
    • - ///

      If the copy is successful, you receive a response with information about - /// the copied object.

      - ///
    • - ///
    • - ///

      A copy request might return an error when Amazon S3 receives the copy request - /// or while Amazon S3 is copying the files. A 200 OK response can - /// contain either a success or an error.

      - ///
        - ///
      • - ///

        If the error occurs before the copy action starts, you receive a - /// standard Amazon S3 error.

        - ///
      • - ///
      • - ///

        If the error occurs during the copy operation, the error response - /// is embedded in the 200 OK response. For example, in a - /// cross-region copy, you may encounter throttling and receive a - /// 200 OK response. For more information, see Resolve the Error 200 response when copying objects to - /// Amazon S3. The 200 OK status code means the copy - /// was accepted, but it doesn't mean the copy is complete. Another - /// example is when you disconnect from Amazon S3 before the copy is complete, - /// Amazon S3 might cancel the copy and you may receive a 200 OK - /// response. You must stay connected to Amazon S3 until the entire response is - /// successfully received and processed.

        - ///

        If you call this API operation directly, make sure to design your - /// application to parse the content of the response and handle it - /// appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The - /// SDKs detect the embedded error and apply error handling per your - /// configuration settings (including automatically retrying the request - /// as appropriate). If the condition persists, the SDKs throw an - /// exception (or, for the SDKs that don't use exceptions, they return an - /// error).

        - ///
      • - ///
      - ///
    • - ///
    - ///
    - ///
    Charge
    - ///
    - ///

    The copy request charge is based on the storage class and Region that you - /// specify for the destination object. The request can also result in a data - /// retrieval charge for the source if the source storage class bills for data - /// retrieval. If the copy source is in a different region, the data transfer is - /// billed to the copy source account. For pricing information, see Amazon S3 pricing.

    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///
      - ///
    • - ///

      - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

      - ///
    • - ///
    • - ///

      - /// Amazon S3 on Outposts - When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the - /// form - /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.

      - ///
    • - ///
    - ///
    - ///
    - ///

    The following operations are related to CopyObject:

    - /// - async fn copy_object(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "CopyObject is not implemented yet")) - } +///

    Completes a multipart upload by assembling previously uploaded parts.

    +///

    You first initiate the multipart upload and then upload all parts using the UploadPart +/// operation or the UploadPartCopy operation. +/// After successfully uploading all relevant parts of an upload, you call this +/// CompleteMultipartUpload operation to complete the upload. Upon receiving +/// this request, Amazon S3 concatenates all the parts in ascending order by part number to create a +/// new object. In the CompleteMultipartUpload request, you must provide the parts list and +/// ensure that the parts list is complete. The CompleteMultipartUpload API operation +/// concatenates the parts that you provide in the list. For each part in the list, you must +/// provide the PartNumber value and the ETag value that are returned +/// after that part was uploaded.

    +///

    The processing of a CompleteMultipartUpload request could take several minutes to +/// finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that +/// specifies a 200 OK response. While processing is in progress, Amazon S3 +/// periodically sends white space characters to keep the connection from timing out. A request +/// could fail after the initial 200 OK response has been sent. This means that a +/// 200 OK response can contain either a success or an error. The error +/// response might be embedded in the 200 OK response. If you call this API +/// operation directly, make sure to design your application to parse the contents of the +/// response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. +/// The SDKs detect the embedded error and apply error handling per your configuration settings +/// (including automatically retrying the request as appropriate). If the condition persists, +/// the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an +/// error).

    +///

    Note that if CompleteMultipartUpload fails, applications should be prepared +/// to retry any failed requests (including 500 error responses). For more information, see +/// Amazon S3 Error +/// Best Practices.

    +/// +///

    You can't use Content-Type: application/x-www-form-urlencoded for the +/// CompleteMultipartUpload requests. Also, if you don't provide a Content-Type +/// header, CompleteMultipartUpload can still return a 200 OK +/// response.

    +///
    +///

    For more information about multipart uploads, see Uploading Objects Using Multipart +/// Upload in the Amazon S3 User Guide.

    +/// +///

    +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - For +/// information about permissions required to use the multipart upload API, see +/// Multipart Upload and +/// Permissions in the Amazon S3 User Guide.

      +///

      If you provide an additional checksum +/// value in your MultipartUpload requests and the +/// object is encrypted with Key Management Service, you must have permission to use the +/// kms:Decrypt action for the +/// CompleteMultipartUpload request to succeed.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///

      If the object is encrypted with SSE-KMS, you must also have the +/// kms:GenerateDataKey and kms:Decrypt permissions +/// in IAM identity-based policies and KMS key policies for the KMS +/// key.

      +///
    • +///
    +///
    +///
    Special errors
    +///
    +///
      +///
    • +///

      Error Code: EntityTooSmall +///

      +///
        +///
      • +///

        Description: Your proposed upload is smaller than the minimum +/// allowed object size. Each part must be at least 5 MB in size, except +/// the last part.

        +///
      • +///
      • +///

        HTTP Status Code: 400 Bad Request

        +///
      • +///
      +///
    • +///
    • +///

      Error Code: InvalidPart +///

      +///
        +///
      • +///

        Description: One or more of the specified parts could not be found. +/// The part might not have been uploaded, or the specified ETag might not +/// have matched the uploaded part's ETag.

        +///
      • +///
      • +///

        HTTP Status Code: 400 Bad Request

        +///
      • +///
      +///
    • +///
    • +///

      Error Code: InvalidPartOrder +///

      +///
        +///
      • +///

        Description: The list of parts was not in ascending order. The +/// parts list must be specified in order by part number.

        +///
      • +///
      • +///

        HTTP Status Code: 400 Bad Request

        +///
      • +///
      +///
    • +///
    • +///

      Error Code: NoSuchUpload +///

      +///
        +///
      • +///

        Description: The specified multipart upload does not exist. The +/// upload ID might be invalid, or the multipart upload might have been +/// aborted or completed.

        +///
      • +///
      • +///

        HTTP Status Code: 404 Not Found

        +///
      • +///
      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to CompleteMultipartUpload:

    +/// +async fn complete_multipart_upload(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "CompleteMultipartUpload is not implemented yet")) +} - /// - ///

    This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see - /// CreateBucket - /// .

    - ///
    - ///

    Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services - /// Access Key ID to authenticate requests. Anonymous requests are never allowed to create - /// buckets. By creating the bucket, you become the bucket owner.

    - ///

    There are two types of buckets: general purpose buckets and directory buckets. For more - /// information about these bucket types, see Creating, configuring, and - /// working with Amazon S3 buckets in the Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - If you send your - /// CreateBucket request to the s3.amazonaws.com global - /// endpoint, the request goes to the us-east-1 Region. So the signature - /// calculations in Signature Version 4 must use us-east-1 as the Region, - /// even if the location constraint in the request specifies another Region where the - /// bucket is to be created. If you create a bucket in a Region other than US East (N. - /// Virginia), your application must be able to handle 307 redirect. For more - /// information, see Virtual hosting of - /// buckets in the Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - In - /// addition to the s3:CreateBucket permission, the following - /// permissions are required in a policy when your CreateBucket - /// request includes specific headers:

      - ///
        - ///
      • - ///

        - /// Access control lists (ACLs) - /// - In your CreateBucket request, if you specify an - /// access control list (ACL) and set it to public-read, - /// public-read-write, authenticated-read, or - /// if you explicitly specify any other custom ACLs, both - /// s3:CreateBucket and s3:PutBucketAcl - /// permissions are required. In your CreateBucket request, - /// if you set the ACL to private, or if you don't specify - /// any ACLs, only the s3:CreateBucket permission is - /// required.

        - ///
      • - ///
      • - ///

        - /// Object Lock - In your - /// CreateBucket request, if you set - /// x-amz-bucket-object-lock-enabled to true, the - /// s3:PutBucketObjectLockConfiguration and - /// s3:PutBucketVersioning permissions are - /// required.

        - ///
      • - ///
      • - ///

        - /// S3 Object Ownership - If - /// your CreateBucket request includes the - /// x-amz-object-ownership header, then the - /// s3:PutBucketOwnershipControls permission is - /// required.

        - /// - ///

        To set an ACL on a bucket as part of a - /// CreateBucket request, you must explicitly set S3 - /// Object Ownership for the bucket to a different value than the - /// default, BucketOwnerEnforced. Additionally, if your - /// desired bucket ACL grants public access, you must first create the - /// bucket (without the bucket ACL) and then explicitly disable Block - /// Public Access on the bucket before using PutBucketAcl - /// to set the ACL. If you try to create a bucket with a public ACL, - /// the request will fail.

        - ///

        For the majority of modern use cases in S3, we recommend that - /// you keep all Block Public Access settings enabled and keep ACLs - /// disabled. If you would like to share data with users outside of - /// your account, you can use bucket policies as needed. For more - /// information, see Controlling ownership of objects and disabling ACLs for your - /// bucket and Blocking public access to your Amazon S3 storage in - /// the Amazon S3 User Guide.

        - ///
        - ///
      • - ///
      • - ///

        - /// S3 Block Public Access - If - /// your specific use case requires granting public access to your S3 - /// resources, you can disable Block Public Access. Specifically, you can - /// create a new bucket with Block Public Access enabled, then separately - /// call the - /// DeletePublicAccessBlock - /// API. To use this operation, you must have the - /// s3:PutBucketPublicAccessBlock permission. For more - /// information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage in the - /// Amazon S3 User Guide.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// You must have the s3express:CreateBucket permission in - /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      - /// - ///

      The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 - /// Block Public Access are not supported for directory buckets. For - /// directory buckets, all Block Public Access settings are enabled at the - /// bucket level and S3 Object Ownership is set to Bucket owner enforced - /// (ACLs disabled). These settings can't be modified.

      - ///

      For more information about permissions for creating and working with - /// directory buckets, see Directory buckets in the - /// Amazon S3 User Guide. For more information about - /// supported S3 features for directory buckets, see Features of S3 Express One Zone in the - /// Amazon S3 User Guide.

      - ///
      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to CreateBucket:

    - /// - async fn create_bucket(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "CreateBucket is not implemented yet")) - } +///

    Creates a copy of an object that is already stored in Amazon S3.

    +/// +///

    You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your +/// object up to 5 GB in size in a single atomic action using this API. However, to copy an +/// object greater than 5 GB, you must use the multipart upload Upload Part - Copy +/// (UploadPartCopy) API. For more information, see Copy Object Using the +/// REST Multipart Upload API.

    +///
    +///

    You can copy individual objects between general purpose buckets, between directory buckets, +/// and between general purpose buckets and directory buckets.

    +/// +///
      +///
    • +///

      Amazon S3 supports copy operations using Multi-Region Access Points only as a +/// destination when using the Multi-Region Access Point ARN.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      VPC endpoints don't support cross-Region requests (including copies). If you're +/// using VPC endpoints, your source and destination buckets should be in the same +/// Amazon Web Services Region as your VPC endpoint.

      +///
    • +///
    +///
    +///

    Both the Region that you want to copy the object from and the Region that you want to +/// copy the object to must be enabled for your account. For more information about how to +/// enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services +/// Account Management Guide.

    +/// +///

    Amazon S3 transfer acceleration does not support cross-Region copies. If you request a +/// cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad +/// Request error. For more information, see Transfer +/// Acceleration.

    +///
    +///
    +///
    Authentication and authorization
    +///
    +///

    All CopyObject requests must be authenticated and signed by using +/// IAM credentials (access key ID and secret access key for the IAM identities). +/// All headers with the x-amz- prefix, including +/// x-amz-copy-source, must be signed. For more information, see +/// REST Authentication.

    +///

    +/// Directory buckets - You must use the +/// IAM credentials to authenticate and authorize your access to the +/// CopyObject API operation, instead of using the temporary security +/// credentials through the CreateSession API operation.

    +///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your +/// behalf.

    +///
    +///
    Permissions
    +///
    +///

    You must have read access to the source object and +/// write access to the destination bucket.

    +///
      +///
    • +///

      +/// General purpose bucket permissions - You +/// must have permissions in an IAM policy based on the source and destination +/// bucket types in a CopyObject operation.

      +///
        +///
      • +///

        If the source object is in a general purpose bucket, you must have +/// +/// s3:GetObject +/// +/// permission to read the source object that is being copied.

        +///
      • +///
      • +///

        If the destination bucket is a general purpose bucket, you must have +/// +/// s3:PutObject +/// +/// permission to write the object copy to the destination bucket.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// You must have permissions in a bucket policy or an IAM identity-based policy based on the +/// source and destination bucket types in a CopyObject +/// operation.

      +///
        +///
      • +///

        If the source object that you want to copy is in a +/// directory bucket, you must have the +/// s3express:CreateSession +/// permission in +/// the Action element of a policy to read the object. By +/// default, the session is in the ReadWrite mode. If you +/// want to restrict the access, you can explicitly set the +/// s3express:SessionMode condition key to +/// ReadOnly on the copy source bucket.

        +///
      • +///
      • +///

        If the copy destination is a directory bucket, you must have the +/// +/// s3express:CreateSession +/// permission in the +/// Action element of a policy to write the object to the +/// destination. The s3express:SessionMode condition key +/// can't be set to ReadOnly on the copy destination bucket. +///

        +///
      • +///
      +///

      If the object is encrypted with SSE-KMS, you must also have the +/// kms:GenerateDataKey and kms:Decrypt permissions +/// in IAM identity-based policies and KMS key policies for the KMS +/// key.

      +///

      For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for +/// S3 Express One Zone in the Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    Response and special errors
    +///
    +///

    When the request is an HTTP 1.1 request, the response is chunk encoded. When +/// the request is not an HTTP 1.1 request, the response would not contain the +/// Content-Length. You always need to read the entire response body +/// to check if the copy succeeds.

    +///
      +///
    • +///

      If the copy is successful, you receive a response with information about +/// the copied object.

      +///
    • +///
    • +///

      A copy request might return an error when Amazon S3 receives the copy request +/// or while Amazon S3 is copying the files. A 200 OK response can +/// contain either a success or an error.

      +///
        +///
      • +///

        If the error occurs before the copy action starts, you receive a +/// standard Amazon S3 error.

        +///
      • +///
      • +///

        If the error occurs during the copy operation, the error response +/// is embedded in the 200 OK response. For example, in a +/// cross-region copy, you may encounter throttling and receive a +/// 200 OK response. For more information, see Resolve the Error 200 response when copying objects to +/// Amazon S3. The 200 OK status code means the copy +/// was accepted, but it doesn't mean the copy is complete. Another +/// example is when you disconnect from Amazon S3 before the copy is complete, +/// Amazon S3 might cancel the copy and you may receive a 200 OK +/// response. You must stay connected to Amazon S3 until the entire response is +/// successfully received and processed.

        +///

        If you call this API operation directly, make sure to design your +/// application to parse the content of the response and handle it +/// appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The +/// SDKs detect the embedded error and apply error handling per your +/// configuration settings (including automatically retrying the request +/// as appropriate). If the condition persists, the SDKs throw an +/// exception (or, for the SDKs that don't use exceptions, they return an +/// error).

        +///
      • +///
      +///
    • +///
    +///
    +///
    Charge
    +///
    +///

    The copy request charge is based on the storage class and Region that you +/// specify for the destination object. The request can also result in a data +/// retrieval charge for the source if the source storage class bills for data +/// retrieval. If the copy source is in a different region, the data transfer is +/// billed to the copy source account. For pricing information, see Amazon S3 pricing.

    +///
    +///
    HTTP Host header syntax
    +///
    +///
      +///
    • +///

      +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

      +///
    • +///
    • +///

      +/// Amazon S3 on Outposts - When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the +/// form +/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.

      +///
    • +///
    +///
    +///
    +///

    The following operations are related to CopyObject:

    +/// +async fn copy_object(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "CopyObject is not implemented yet")) +} - ///

    Creates a metadata table configuration for a general purpose bucket. For more - /// information, see Accelerating data - /// discovery with S3 Metadata in the Amazon S3 User Guide.

    - ///
    - ///
    Permissions
    - ///
    - ///

    To use this operation, you must have the following permissions. For more - /// information, see Setting up - /// permissions for configuring metadata tables in the - /// Amazon S3 User Guide.

    - ///

    If you also want to integrate your table bucket with Amazon Web Services analytics services so that you - /// can query your metadata table, you need additional permissions. For more information, see - /// - /// Integrating Amazon S3 Tables with Amazon Web Services analytics services in the - /// Amazon S3 User Guide.

    - ///
      - ///
    • - ///

      - /// s3:CreateBucketMetadataTableConfiguration - ///

      - ///
    • - ///
    • - ///

      - /// s3tables:CreateNamespace - ///

      - ///
    • - ///
    • - ///

      - /// s3tables:GetTable - ///

      - ///
    • - ///
    • - ///

      - /// s3tables:CreateTable - ///

      - ///
    • - ///
    • - ///

      - /// s3tables:PutTablePolicy - ///

      - ///
    • - ///
    - ///
    - ///
    - ///

    The following operations are related to CreateBucketMetadataTableConfiguration:

    - /// - async fn create_bucket_metadata_table_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "CreateBucketMetadataTableConfiguration is not implemented yet")) - } +/// +///

    This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see +/// CreateBucket +/// .

    +///
    +///

    Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services +/// Access Key ID to authenticate requests. Anonymous requests are never allowed to create +/// buckets. By creating the bucket, you become the bucket owner.

    +///

    There are two types of buckets: general purpose buckets and directory buckets. For more +/// information about these bucket types, see Creating, configuring, and +/// working with Amazon S3 buckets in the Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you send your +/// CreateBucket request to the s3.amazonaws.com global +/// endpoint, the request goes to the us-east-1 Region. So the signature +/// calculations in Signature Version 4 must use us-east-1 as the Region, +/// even if the location constraint in the request specifies another Region where the +/// bucket is to be created. If you create a bucket in a Region other than US East (N. +/// Virginia), your application must be able to handle 307 redirect. For more +/// information, see Virtual hosting of +/// buckets in the Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - In +/// addition to the s3:CreateBucket permission, the following +/// permissions are required in a policy when your CreateBucket +/// request includes specific headers:

      +///
        +///
      • +///

        +/// Access control lists (ACLs) +/// - In your CreateBucket request, if you specify an +/// access control list (ACL) and set it to public-read, +/// public-read-write, authenticated-read, or +/// if you explicitly specify any other custom ACLs, both +/// s3:CreateBucket and s3:PutBucketAcl +/// permissions are required. In your CreateBucket request, +/// if you set the ACL to private, or if you don't specify +/// any ACLs, only the s3:CreateBucket permission is +/// required.

        +///
      • +///
      • +///

        +/// Object Lock - In your +/// CreateBucket request, if you set +/// x-amz-bucket-object-lock-enabled to true, the +/// s3:PutBucketObjectLockConfiguration and +/// s3:PutBucketVersioning permissions are +/// required.

        +///
      • +///
      • +///

        +/// S3 Object Ownership - If +/// your CreateBucket request includes the +/// x-amz-object-ownership header, then the +/// s3:PutBucketOwnershipControls permission is +/// required.

        +/// +///

        To set an ACL on a bucket as part of a +/// CreateBucket request, you must explicitly set S3 +/// Object Ownership for the bucket to a different value than the +/// default, BucketOwnerEnforced. Additionally, if your +/// desired bucket ACL grants public access, you must first create the +/// bucket (without the bucket ACL) and then explicitly disable Block +/// Public Access on the bucket before using PutBucketAcl +/// to set the ACL. If you try to create a bucket with a public ACL, +/// the request will fail.

        +///

        For the majority of modern use cases in S3, we recommend that +/// you keep all Block Public Access settings enabled and keep ACLs +/// disabled. If you would like to share data with users outside of +/// your account, you can use bucket policies as needed. For more +/// information, see Controlling ownership of objects and disabling ACLs for your +/// bucket and Blocking public access to your Amazon S3 storage in +/// the Amazon S3 User Guide.

        +///
        +///
      • +///
      • +///

        +/// S3 Block Public Access - If +/// your specific use case requires granting public access to your S3 +/// resources, you can disable Block Public Access. Specifically, you can +/// create a new bucket with Block Public Access enabled, then separately +/// call the +/// DeletePublicAccessBlock +/// API. To use this operation, you must have the +/// s3:PutBucketPublicAccessBlock permission. For more +/// information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage in the +/// Amazon S3 User Guide.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// You must have the s3express:CreateBucket permission in +/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      +/// +///

      The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 +/// Block Public Access are not supported for directory buckets. For +/// directory buckets, all Block Public Access settings are enabled at the +/// bucket level and S3 Object Ownership is set to Bucket owner enforced +/// (ACLs disabled). These settings can't be modified.

      +///

      For more information about permissions for creating and working with +/// directory buckets, see Directory buckets in the +/// Amazon S3 User Guide. For more information about +/// supported S3 features for directory buckets, see Features of S3 Express One Zone in the +/// Amazon S3 User Guide.

      +///
      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to CreateBucket:

    +/// +async fn create_bucket(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "CreateBucket is not implemented yet")) +} - ///

    This action initiates a multipart upload and returns an upload ID. This upload ID is - /// used to associate all of the parts in the specific multipart upload. You specify this - /// upload ID in each of your subsequent upload part requests (see UploadPart). You also include this - /// upload ID in the final request to either complete or abort the multipart upload request. - /// For more information about multipart uploads, see Multipart Upload Overview in the - /// Amazon S3 User Guide.

    - /// - ///

    After you initiate a multipart upload and upload one or more parts, to stop being - /// charged for storing the uploaded parts, you must either complete or abort the multipart - /// upload. Amazon S3 frees up the space used to store the parts and stops charging you for - /// storing them only after you either complete or abort a multipart upload.

    - ///
    - ///

    If you have configured a lifecycle rule to abort incomplete multipart uploads, the - /// created multipart upload must be completed within the number of days specified in the - /// bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible - /// for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle - /// Configuration.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - - /// S3 Lifecycle is not supported by directory buckets.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    - ///
    Request signing
    - ///
    - ///

    For request signing, multipart upload is just a series of regular requests. You - /// initiate a multipart upload, send one or more requests to upload parts, and then - /// complete the multipart upload process. You sign each request individually. There - /// is nothing special about signing multipart upload requests. For more information - /// about signing, see Authenticating - /// Requests (Amazon Web Services Signature Version 4) in the - /// Amazon S3 User Guide.

    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - To - /// perform a multipart upload with encryption using an Key Management Service (KMS) - /// KMS key, the requester must have permission to the - /// kms:Decrypt and kms:GenerateDataKey actions on - /// the key. The requester must also have permissions for the - /// kms:GenerateDataKey action for the - /// CreateMultipartUpload API. Then, the requester needs - /// permissions for the kms:Decrypt action on the - /// UploadPart and UploadPartCopy APIs. These - /// permissions are required because Amazon S3 must decrypt and read data from the - /// encrypted file parts before it completes the multipart upload. For more - /// information, see Multipart upload API and permissions and Protecting data - /// using server-side encryption with Amazon Web Services KMS in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///
    • - ///
    - ///
    - ///
    Encryption
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose buckets - Server-side - /// encryption is for data encryption at rest. Amazon S3 encrypts your data as it - /// writes it to disks in its data centers and decrypts it when you access it. - /// Amazon S3 automatically encrypts all new objects that are uploaded to an S3 - /// bucket. When doing a multipart upload, if you don't specify encryption - /// information in your request, the encryption setting of the uploaded parts is - /// set to the default encryption configuration of the destination bucket. By - /// default, all buckets have a base level of encryption configuration that uses - /// server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination - /// bucket has a default encryption configuration that uses server-side - /// encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided - /// encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a - /// customer-provided key to encrypt the uploaded parts. When you perform a - /// CreateMultipartUpload operation, if you want to use a different type of - /// encryption setting for the uploaded parts, you can request that Amazon S3 - /// encrypts the object with a different encryption key (such as an Amazon S3 managed - /// key, a KMS key, or a customer-provided key). When the encryption setting - /// in your request is different from the default encryption configuration of - /// the destination bucket, the encryption setting in your request takes - /// precedence. If you choose to provide your own encryption key, the request - /// headers you provide in UploadPart and - /// UploadPartCopy - /// requests must match the headers you used in the - /// CreateMultipartUpload request.

      - ///
        - ///
      • - ///

        Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key - /// (aws/s3) and KMS customer managed keys stored in Key Management Service - /// (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, - /// specify the following headers in the request.

        - ///
          - ///
        • - ///

          - /// x-amz-server-side-encryption - ///

          - ///
        • - ///
        • - ///

          - /// x-amz-server-side-encryption-aws-kms-key-id - ///

          - ///
        • - ///
        • - ///

          - /// x-amz-server-side-encryption-context - ///

          - ///
        • - ///
        - /// - ///
          - ///
        • - ///

          If you specify - /// x-amz-server-side-encryption:aws:kms, but - /// don't provide - /// x-amz-server-side-encryption-aws-kms-key-id, - /// Amazon S3 uses the Amazon Web Services managed key (aws/s3 key) in - /// KMS to protect the data.

          - ///
        • - ///
        • - ///

          To perform a multipart upload with encryption by using an - /// Amazon Web Services KMS key, the requester must have permission to the - /// kms:Decrypt and - /// kms:GenerateDataKey* actions on the key. - /// These permissions are required because Amazon S3 must decrypt and - /// read data from the encrypted file parts before it completes - /// the multipart upload. For more information, see Multipart upload API and permissions and Protecting data using server-side encryption with Amazon Web Services - /// KMS in the - /// Amazon S3 User Guide.

          - ///
        • - ///
        • - ///

          If your Identity and Access Management (IAM) user or role is in the same - /// Amazon Web Services account as the KMS key, then you must have these - /// permissions on the key policy. If your IAM user or role is - /// in a different account from the key, then you must have the - /// permissions on both the key policy and your IAM user or - /// role.

          - ///
        • - ///
        • - ///

          All GET and PUT requests for an - /// object protected by KMS fail if you don't make them by - /// using Secure Sockets Layer (SSL), Transport Layer Security - /// (TLS), or Signature Version 4. For information about - /// configuring any of the officially supported Amazon Web Services SDKs and - /// Amazon Web Services CLI, see Specifying the Signature Version in - /// Request Authentication in the - /// Amazon S3 User Guide.

          - ///
        • - ///
        - ///
        - ///

        For more information about server-side encryption with KMS keys - /// (SSE-KMS), see Protecting - /// Data Using Server-Side Encryption with KMS keys in the - /// Amazon S3 User Guide.

        - ///
      • - ///
      • - ///

        Use customer-provided encryption keys (SSE-C) – If you want to - /// manage your own encryption keys, provide all the following headers in - /// the request.

        - ///
          - ///
        • - ///

          - /// x-amz-server-side-encryption-customer-algorithm - ///

          - ///
        • - ///
        • - ///

          - /// x-amz-server-side-encryption-customer-key - ///

          - ///
        • - ///
        • - ///

          - /// x-amz-server-side-encryption-customer-key-MD5 - ///

          - ///
        • - ///
        - ///

        For more information about server-side encryption with - /// customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with - /// customer-provided encryption keys (SSE-C) in the - /// Amazon S3 User Guide.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      - ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. - /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. - /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and - /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. - ///

      - /// - ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the - /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. - /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), - /// the encryption request headers must match the default encryption configuration of the directory bucket. - /// - ///

      - ///
      - /// - ///

      For directory buckets, when you perform a - /// CreateMultipartUpload operation and an - /// UploadPartCopy operation, the request headers you provide - /// in the CreateMultipartUpload request must match the default - /// encryption configuration of the destination bucket.

      - ///
      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to CreateMultipartUpload:

    - /// - async fn create_multipart_upload( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "CreateMultipartUpload is not implemented yet")) - } +///

    Creates a metadata table configuration for a general purpose bucket. For more +/// information, see Accelerating data +/// discovery with S3 Metadata in the Amazon S3 User Guide.

    +///
    +///
    Permissions
    +///
    +///

    To use this operation, you must have the following permissions. For more +/// information, see Setting up +/// permissions for configuring metadata tables in the +/// Amazon S3 User Guide.

    +///

    If you also want to integrate your table bucket with Amazon Web Services analytics services so that you +/// can query your metadata table, you need additional permissions. For more information, see +/// +/// Integrating Amazon S3 Tables with Amazon Web Services analytics services in the +/// Amazon S3 User Guide.

    +///
      +///
    • +///

      +/// s3:CreateBucketMetadataTableConfiguration +///

      +///
    • +///
    • +///

      +/// s3tables:CreateNamespace +///

      +///
    • +///
    • +///

      +/// s3tables:GetTable +///

      +///
    • +///
    • +///

      +/// s3tables:CreateTable +///

      +///
    • +///
    • +///

      +/// s3tables:PutTablePolicy +///

      +///
    • +///
    +///
    +///
    +///

    The following operations are related to CreateBucketMetadataTableConfiguration:

    +/// +async fn create_bucket_metadata_table_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "CreateBucketMetadataTableConfiguration is not implemented yet")) +} - ///

    Creates a session that establishes temporary security credentials to support fast - /// authentication and authorization for the Zonal endpoint API operations on directory buckets. For more - /// information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone - /// APIs in the Amazon S3 User Guide.

    - ///

    To make Zonal endpoint API requests on a directory bucket, use the CreateSession - /// API operation. Specifically, you grant s3express:CreateSession permission to a - /// bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the - /// CreateSession API request on the bucket, which returns temporary security - /// credentials that include the access key ID, secret access key, session token, and - /// expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After - /// the session is created, you don’t need to use other policies to grant permissions to each - /// Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by - /// applying the temporary security credentials of the session to the request headers and - /// following the SigV4 protocol for authentication. You also apply the session token to the - /// x-amz-s3session-token request header for authorization. Temporary security - /// credentials are scoped to the bucket and expire after 5 minutes. After the expiration time, - /// any calls that you make with those credentials will fail. You must use IAM credentials - /// again to make a CreateSession API request that generates a new set of - /// temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond - /// the original specified interval.

    - ///

    If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid - /// service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to - /// initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the - /// Amazon S3 User Guide.

    - /// - ///
      - ///
    • - ///

      You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// - /// CopyObject API operation - - /// Unlike other Zonal endpoint API operations, the CopyObject API operation doesn't use - /// the temporary security credentials returned from the CreateSession - /// API operation for authentication and authorization. For information about - /// authentication and authorization of the CopyObject API operation on - /// directory buckets, see CopyObject.

      - ///
    • - ///
    • - ///

      - /// - /// HeadBucket API operation - - /// Unlike other Zonal endpoint API operations, the HeadBucket API operation doesn't use - /// the temporary security credentials returned from the CreateSession - /// API operation for authentication and authorization. For information about - /// authentication and authorization of the HeadBucket API operation on - /// directory buckets, see HeadBucket.

      - ///
    • - ///
    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///

    To obtain temporary security credentials, you must create - /// a bucket policy or an IAM identity-based policy that grants s3express:CreateSession - /// permission to the bucket. In a policy, you can have the - /// s3express:SessionMode condition key to control who can create a - /// ReadWrite or ReadOnly session. For more information - /// about ReadWrite or ReadOnly sessions, see - /// x-amz-create-session-mode - /// . For example policies, see - /// Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for - /// S3 Express One Zone in the Amazon S3 User Guide.

    - ///

    To grant cross-account access to Zonal endpoint API operations, the bucket policy should also - /// grant both accounts the s3express:CreateSession permission.

    - ///

    If you want to encrypt objects with SSE-KMS, you must also have the - /// kms:GenerateDataKey and the kms:Decrypt permissions - /// in IAM identity-based policies and KMS key policies for the target KMS - /// key.

    - ///
    - ///
    Encryption
    - ///
    - ///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    - ///

    For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, - /// you authenticate and authorize requests through CreateSession for low latency. - /// To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

    - /// - ///

    - /// Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. - /// After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration. - ///

    - ///
    - ///

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, - /// you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. - /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and - /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. - ///

    - /// - ///

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the - /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. - /// Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), - /// it's not supported to override the values of the encryption settings from the CreateSession request. - /// - ///

    - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - async fn create_session(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "CreateSession is not implemented yet")) - } +///

    This action initiates a multipart upload and returns an upload ID. This upload ID is +/// used to associate all of the parts in the specific multipart upload. You specify this +/// upload ID in each of your subsequent upload part requests (see UploadPart). You also include this +/// upload ID in the final request to either complete or abort the multipart upload request. +/// For more information about multipart uploads, see Multipart Upload Overview in the +/// Amazon S3 User Guide.

    +/// +///

    After you initiate a multipart upload and upload one or more parts, to stop being +/// charged for storing the uploaded parts, you must either complete or abort the multipart +/// upload. Amazon S3 frees up the space used to store the parts and stops charging you for +/// storing them only after you either complete or abort a multipart upload.

    +///
    +///

    If you have configured a lifecycle rule to abort incomplete multipart uploads, the +/// created multipart upload must be completed within the number of days specified in the +/// bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible +/// for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle +/// Configuration.

    +/// +///
      +///
    • +///

      +/// Directory buckets - +/// S3 Lifecycle is not supported by directory buckets.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    +///
    Request signing
    +///
    +///

    For request signing, multipart upload is just a series of regular requests. You +/// initiate a multipart upload, send one or more requests to upload parts, and then +/// complete the multipart upload process. You sign each request individually. There +/// is nothing special about signing multipart upload requests. For more information +/// about signing, see Authenticating +/// Requests (Amazon Web Services Signature Version 4) in the +/// Amazon S3 User Guide.

    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - To +/// perform a multipart upload with encryption using an Key Management Service (KMS) +/// KMS key, the requester must have permission to the +/// kms:Decrypt and kms:GenerateDataKey actions on +/// the key. The requester must also have permissions for the +/// kms:GenerateDataKey action for the +/// CreateMultipartUpload API. Then, the requester needs +/// permissions for the kms:Decrypt action on the +/// UploadPart and UploadPartCopy APIs. These +/// permissions are required because Amazon S3 must decrypt and read data from the +/// encrypted file parts before it completes the multipart upload. For more +/// information, see Multipart upload API and permissions and Protecting data +/// using server-side encryption with Amazon Web Services KMS in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///
    • +///
    +///
    +///
    Encryption
    +///
    +///
      +///
    • +///

      +/// General purpose buckets - Server-side +/// encryption is for data encryption at rest. Amazon S3 encrypts your data as it +/// writes it to disks in its data centers and decrypts it when you access it. +/// Amazon S3 automatically encrypts all new objects that are uploaded to an S3 +/// bucket. When doing a multipart upload, if you don't specify encryption +/// information in your request, the encryption setting of the uploaded parts is +/// set to the default encryption configuration of the destination bucket. By +/// default, all buckets have a base level of encryption configuration that uses +/// server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination +/// bucket has a default encryption configuration that uses server-side +/// encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided +/// encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a +/// customer-provided key to encrypt the uploaded parts. When you perform a +/// CreateMultipartUpload operation, if you want to use a different type of +/// encryption setting for the uploaded parts, you can request that Amazon S3 +/// encrypts the object with a different encryption key (such as an Amazon S3 managed +/// key, a KMS key, or a customer-provided key). When the encryption setting +/// in your request is different from the default encryption configuration of +/// the destination bucket, the encryption setting in your request takes +/// precedence. If you choose to provide your own encryption key, the request +/// headers you provide in UploadPart and +/// UploadPartCopy +/// requests must match the headers you used in the +/// CreateMultipartUpload request.

      +///
        +///
      • +///

        Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key +/// (aws/s3) and KMS customer managed keys stored in Key Management Service +/// (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, +/// specify the following headers in the request.

        +///
          +///
        • +///

          +/// x-amz-server-side-encryption +///

          +///
        • +///
        • +///

          +/// x-amz-server-side-encryption-aws-kms-key-id +///

          +///
        • +///
        • +///

          +/// x-amz-server-side-encryption-context +///

          +///
        • +///
        +/// +///
          +///
        • +///

          If you specify +/// x-amz-server-side-encryption:aws:kms, but +/// don't provide +/// x-amz-server-side-encryption-aws-kms-key-id, +/// Amazon S3 uses the Amazon Web Services managed key (aws/s3 key) in +/// KMS to protect the data.

          +///
        • +///
        • +///

          To perform a multipart upload with encryption by using an +/// Amazon Web Services KMS key, the requester must have permission to the +/// kms:Decrypt and +/// kms:GenerateDataKey* actions on the key. +/// These permissions are required because Amazon S3 must decrypt and +/// read data from the encrypted file parts before it completes +/// the multipart upload. For more information, see Multipart upload API and permissions and Protecting data using server-side encryption with Amazon Web Services +/// KMS in the +/// Amazon S3 User Guide.

          +///
        • +///
        • +///

          If your Identity and Access Management (IAM) user or role is in the same +/// Amazon Web Services account as the KMS key, then you must have these +/// permissions on the key policy. If your IAM user or role is +/// in a different account from the key, then you must have the +/// permissions on both the key policy and your IAM user or +/// role.

          +///
        • +///
        • +///

          All GET and PUT requests for an +/// object protected by KMS fail if you don't make them by +/// using Secure Sockets Layer (SSL), Transport Layer Security +/// (TLS), or Signature Version 4. For information about +/// configuring any of the officially supported Amazon Web Services SDKs and +/// Amazon Web Services CLI, see Specifying the Signature Version in +/// Request Authentication in the +/// Amazon S3 User Guide.

          +///
        • +///
        +///
        +///

        For more information about server-side encryption with KMS keys +/// (SSE-KMS), see Protecting +/// Data Using Server-Side Encryption with KMS keys in the +/// Amazon S3 User Guide.

        +///
      • +///
      • +///

        Use customer-provided encryption keys (SSE-C) – If you want to +/// manage your own encryption keys, provide all the following headers in +/// the request.

        +///
          +///
        • +///

          +/// x-amz-server-side-encryption-customer-algorithm +///

          +///
        • +///
        • +///

          +/// x-amz-server-side-encryption-customer-key +///

          +///
        • +///
        • +///

          +/// x-amz-server-side-encryption-customer-key-MD5 +///

          +///
        • +///
        +///

        For more information about server-side encryption with +/// customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with +/// customer-provided encryption keys (SSE-C) in the +/// Amazon S3 User Guide.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      +///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. +/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. +/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and +/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. +///

      +/// +///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the +/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. +/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), +/// the encryption request headers must match the default encryption configuration of the directory bucket. +/// +///

      +///
      +/// +///

      For directory buckets, when you perform a +/// CreateMultipartUpload operation and an +/// UploadPartCopy operation, the request headers you provide +/// in the CreateMultipartUpload request must match the default +/// encryption configuration of the destination bucket.

      +///
      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to CreateMultipartUpload:

    +/// +async fn create_multipart_upload(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "CreateMultipartUpload is not implemented yet")) +} - ///

    Deletes the S3 bucket. All objects (including all object versions and delete markers) in - /// the bucket must be deleted before the bucket itself can be deleted.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - If multipart - /// uploads in a directory bucket are in progress, you can't delete the bucket until - /// all the in-progress multipart uploads are aborted or completed.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - You - /// must have the s3:DeleteBucket permission on the specified - /// bucket in a policy.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// You must have the s3express:DeleteBucket permission in - /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to DeleteBucket:

    - /// - async fn delete_bucket(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucket is not implemented yet")) - } +///

    Creates a session that establishes temporary security credentials to support fast +/// authentication and authorization for the Zonal endpoint API operations on directory buckets. For more +/// information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone +/// APIs in the Amazon S3 User Guide.

    +///

    To make Zonal endpoint API requests on a directory bucket, use the CreateSession +/// API operation. Specifically, you grant s3express:CreateSession permission to a +/// bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the +/// CreateSession API request on the bucket, which returns temporary security +/// credentials that include the access key ID, secret access key, session token, and +/// expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After +/// the session is created, you don’t need to use other policies to grant permissions to each +/// Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by +/// applying the temporary security credentials of the session to the request headers and +/// following the SigV4 protocol for authentication. You also apply the session token to the +/// x-amz-s3session-token request header for authorization. Temporary security +/// credentials are scoped to the bucket and expire after 5 minutes. After the expiration time, +/// any calls that you make with those credentials will fail. You must use IAM credentials +/// again to make a CreateSession API request that generates a new set of +/// temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond +/// the original specified interval.

    +///

    If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid +/// service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to +/// initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the +/// Amazon S3 User Guide.

    +/// +///
      +///
    • +///

      You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// +/// CopyObject API operation - +/// Unlike other Zonal endpoint API operations, the CopyObject API operation doesn't use +/// the temporary security credentials returned from the CreateSession +/// API operation for authentication and authorization. For information about +/// authentication and authorization of the CopyObject API operation on +/// directory buckets, see CopyObject.

      +///
    • +///
    • +///

      +/// +/// HeadBucket API operation - +/// Unlike other Zonal endpoint API operations, the HeadBucket API operation doesn't use +/// the temporary security credentials returned from the CreateSession +/// API operation for authentication and authorization. For information about +/// authentication and authorization of the HeadBucket API operation on +/// directory buckets, see HeadBucket.

      +///
    • +///
    +///
    +///
    +///
    Permissions
    +///
    +///

    To obtain temporary security credentials, you must create +/// a bucket policy or an IAM identity-based policy that grants s3express:CreateSession +/// permission to the bucket. In a policy, you can have the +/// s3express:SessionMode condition key to control who can create a +/// ReadWrite or ReadOnly session. For more information +/// about ReadWrite or ReadOnly sessions, see +/// x-amz-create-session-mode +/// . For example policies, see +/// Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for +/// S3 Express One Zone in the Amazon S3 User Guide.

    +///

    To grant cross-account access to Zonal endpoint API operations, the bucket policy should also +/// grant both accounts the s3express:CreateSession permission.

    +///

    If you want to encrypt objects with SSE-KMS, you must also have the +/// kms:GenerateDataKey and the kms:Decrypt permissions +/// in IAM identity-based policies and KMS key policies for the target KMS +/// key.

    +///
    +///
    Encryption
    +///
    +///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    +///

    For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, +/// you authenticate and authorize requests through CreateSession for low latency. +/// To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

    +/// +///

    +/// Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. +/// After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration. +///

    +///
    +///

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, +/// you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. +/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and +/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. +///

    +/// +///

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the +/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. +/// Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), +/// it's not supported to override the values of the encryption settings from the CreateSession request. +/// +///

    +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +async fn create_session(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "CreateSession is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Deletes an analytics configuration for the bucket (specified by the analytics - /// configuration ID).

    - ///

    To use this operation, you must have permissions to perform the - /// s3:PutAnalyticsConfiguration action. The bucket owner has this permission - /// by default. The bucket owner can grant this permission to others. For more information - /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For information about the Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class - /// Analysis.

    - ///

    The following operations are related to - /// DeleteBucketAnalyticsConfiguration:

    - /// - async fn delete_bucket_analytics_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketAnalyticsConfiguration is not implemented yet")) - } +///

    Deletes the S3 bucket. All objects (including all object versions and delete markers) in +/// the bucket must be deleted before the bucket itself can be deleted.

    +/// +///
      +///
    • +///

      +/// Directory buckets - If multipart +/// uploads in a directory bucket are in progress, you can't delete the bucket until +/// all the in-progress multipart uploads are aborted or completed.

      +///
    • +///
    • +///

      +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - You +/// must have the s3:DeleteBucket permission on the specified +/// bucket in a policy.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// You must have the s3express:DeleteBucket permission in +/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to DeleteBucket:

    +/// +async fn delete_bucket(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucket is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Deletes the cors configuration information set for the bucket.

    - ///

    To use this operation, you must have permission to perform the - /// s3:PutBucketCORS action. The bucket owner has this permission by default - /// and can grant this permission to others.

    - ///

    For information about cors, see Enabling Cross-Origin Resource Sharing in - /// the Amazon S3 User Guide.

    - ///

    - /// Related Resources - ///

    - /// - async fn delete_bucket_cors(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketCors is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Deletes an analytics configuration for the bucket (specified by the analytics +/// configuration ID).

    +///

    To use this operation, you must have permissions to perform the +/// s3:PutAnalyticsConfiguration action. The bucket owner has this permission +/// by default. The bucket owner can grant this permission to others. For more information +/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For information about the Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class +/// Analysis.

    +///

    The following operations are related to +/// DeleteBucketAnalyticsConfiguration:

    +/// +async fn delete_bucket_analytics_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketAnalyticsConfiguration is not implemented yet")) +} - ///

    This implementation of the DELETE action resets the default encryption for the bucket as - /// server-side encryption with Amazon S3 managed keys (SSE-S3).

    - /// - /// - /// - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The - /// s3:PutEncryptionConfiguration permission is required in a - /// policy. The bucket owner has this permission by default. The bucket owner - /// can grant this permission to others. For more information about permissions, - /// see Permissions Related to Bucket Operations and Managing Access - /// Permissions to Your Amazon S3 Resources.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// To grant access to this API operation, you must have the - /// s3express:PutEncryptionConfiguration permission in - /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to DeleteBucketEncryption:

    - /// - async fn delete_bucket_encryption( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketEncryption is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Deletes the cors configuration information set for the bucket.

    +///

    To use this operation, you must have permission to perform the +/// s3:PutBucketCORS action. The bucket owner has this permission by default +/// and can grant this permission to others.

    +///

    For information about cors, see Enabling Cross-Origin Resource Sharing in +/// the Amazon S3 User Guide.

    +///

    +/// Related Resources +///

    +/// +async fn delete_bucket_cors(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketCors is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Deletes the S3 Intelligent-Tiering configuration from the specified bucket.

    - ///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    - ///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    - ///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    - ///

    Operations related to DeleteBucketIntelligentTieringConfiguration include:

    - /// - async fn delete_bucket_intelligent_tiering_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!( - NotImplemented, - "DeleteBucketIntelligentTieringConfiguration is not implemented yet" - )) - } +///

    This implementation of the DELETE action resets the default encryption for the bucket as +/// server-side encryption with Amazon S3 managed keys (SSE-S3).

    +/// +/// +/// +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The +/// s3:PutEncryptionConfiguration permission is required in a +/// policy. The bucket owner has this permission by default. The bucket owner +/// can grant this permission to others. For more information about permissions, +/// see Permissions Related to Bucket Operations and Managing Access +/// Permissions to Your Amazon S3 Resources.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// To grant access to this API operation, you must have the +/// s3express:PutEncryptionConfiguration permission in +/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to DeleteBucketEncryption:

    +/// +async fn delete_bucket_encryption(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketEncryption is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Deletes an inventory configuration (identified by the inventory ID) from the - /// bucket.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:PutInventoryConfiguration action. The bucket owner has this permission - /// by default. The bucket owner can grant this permission to others. For more information - /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

    - ///

    Operations related to DeleteBucketInventoryConfiguration include:

    - /// - async fn delete_bucket_inventory_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketInventoryConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Deletes the S3 Intelligent-Tiering configuration from the specified bucket.

    +///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    +///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    +///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    +///

    Operations related to DeleteBucketIntelligentTieringConfiguration include:

    +/// +async fn delete_bucket_intelligent_tiering_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketIntelligentTieringConfiguration is not implemented yet")) +} - ///

    Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the - /// lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your - /// objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of - /// rules contained in the deleted lifecycle configuration.

    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - By - /// default, all Amazon S3 resources are private, including buckets, objects, and - /// related subresources (for example, lifecycle configuration and website - /// configuration). Only the resource owner (that is, the Amazon Web Services account that - /// created it) can access the resource. The resource owner can optionally grant - /// access permissions to others by writing an access policy. For this - /// operation, a user must have the s3:PutLifecycleConfiguration - /// permission.

      - ///

      For more information about permissions, see Managing Access - /// Permissions to Your Amazon S3 Resources.

      - ///
    • - ///
    - ///
      - ///
    • - ///

      - /// Directory bucket permissions - - /// You must have the s3express:PutLifecycleConfiguration - /// permission in an IAM identity-based policy to use this operation. - /// Cross-account access to this API operation isn't supported. The resource - /// owner can optionally grant access permissions to others by creating a role - /// or user for them as long as they are within the same account as the owner - /// and resource.

      - ///

      For more information about directory bucket policies and permissions, see - /// Authorizing Regional endpoint APIs with IAM in the - /// Amazon S3 User Guide.

      - /// - ///

      - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
      - ///
    • - ///
    - ///
    - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host - /// header syntax is - /// s3express-control.region.amazonaws.com.

    - ///
    - ///
    - ///

    For more information about the object expiration, see Elements to Describe Lifecycle Actions.

    - ///

    Related actions include:

    - /// - async fn delete_bucket_lifecycle( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketLifecycle is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Deletes an inventory configuration (identified by the inventory ID) from the +/// bucket.

    +///

    To use this operation, you must have permissions to perform the +/// s3:PutInventoryConfiguration action. The bucket owner has this permission +/// by default. The bucket owner can grant this permission to others. For more information +/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

    +///

    Operations related to DeleteBucketInventoryConfiguration include:

    +/// +async fn delete_bucket_inventory_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketInventoryConfiguration is not implemented yet")) +} - ///

    - /// Deletes a metadata table configuration from a general purpose bucket. For more - /// information, see Accelerating data - /// discovery with S3 Metadata in the Amazon S3 User Guide.

    - ///
    - ///
    Permissions
    - ///
    - ///

    To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more - /// information, see Setting up - /// permissions for configuring metadata tables in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///

    The following operations are related to DeleteBucketMetadataTableConfiguration:

    - /// - async fn delete_bucket_metadata_table_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketMetadataTableConfiguration is not implemented yet")) - } +///

    Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the +/// lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your +/// objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of +/// rules contained in the deleted lifecycle configuration.

    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - By +/// default, all Amazon S3 resources are private, including buckets, objects, and +/// related subresources (for example, lifecycle configuration and website +/// configuration). Only the resource owner (that is, the Amazon Web Services account that +/// created it) can access the resource. The resource owner can optionally grant +/// access permissions to others by writing an access policy. For this +/// operation, a user must have the s3:PutLifecycleConfiguration +/// permission.

      +///

      For more information about permissions, see Managing Access +/// Permissions to Your Amazon S3 Resources.

      +///
    • +///
    +///
      +///
    • +///

      +/// Directory bucket permissions - +/// You must have the s3express:PutLifecycleConfiguration +/// permission in an IAM identity-based policy to use this operation. +/// Cross-account access to this API operation isn't supported. The resource +/// owner can optionally grant access permissions to others by creating a role +/// or user for them as long as they are within the same account as the owner +/// and resource.

      +///

      For more information about directory bucket policies and permissions, see +/// Authorizing Regional endpoint APIs with IAM in the +/// Amazon S3 User Guide.

      +/// +///

      +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
      +///
    • +///
    +///
    +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host +/// header syntax is +/// s3express-control.region.amazonaws.com.

    +///
    +///
    +///

    For more information about the object expiration, see Elements to Describe Lifecycle Actions.

    +///

    Related actions include:

    +/// +async fn delete_bucket_lifecycle(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketLifecycle is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the - /// metrics configuration ID) from the bucket. Note that this doesn't include the daily storage - /// metrics.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:PutMetricsConfiguration action. The bucket owner has this permission by - /// default. The bucket owner can grant this permission to others. For more information about - /// permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with - /// Amazon CloudWatch.

    - ///

    The following operations are related to - /// DeleteBucketMetricsConfiguration:

    - /// - async fn delete_bucket_metrics_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketMetricsConfiguration is not implemented yet")) - } +///

    +/// Deletes a metadata table configuration from a general purpose bucket. For more +/// information, see Accelerating data +/// discovery with S3 Metadata in the Amazon S3 User Guide.

    +///
    +///
    Permissions
    +///
    +///

    To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more +/// information, see Setting up +/// permissions for configuring metadata tables in the +/// Amazon S3 User Guide.

    +///
    +///
    +///

    The following operations are related to DeleteBucketMetadataTableConfiguration:

    +/// +async fn delete_bucket_metadata_table_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketMetadataTableConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you - /// must have the s3:PutBucketOwnershipControls permission. For more information - /// about Amazon S3 permissions, see Specifying Permissions in a - /// Policy.

    - ///

    For information about Amazon S3 Object Ownership, see Using Object Ownership.

    - ///

    The following operations are related to - /// DeleteBucketOwnershipControls:

    - /// - async fn delete_bucket_ownership_controls( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketOwnershipControls is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the +/// metrics configuration ID) from the bucket. Note that this doesn't include the daily storage +/// metrics.

    +///

    To use this operation, you must have permissions to perform the +/// s3:PutMetricsConfiguration action. The bucket owner has this permission by +/// default. The bucket owner can grant this permission to others. For more information about +/// permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with +/// Amazon CloudWatch.

    +///

    The following operations are related to +/// DeleteBucketMetricsConfiguration:

    +/// +async fn delete_bucket_metrics_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketMetricsConfiguration is not implemented yet")) +} - ///

    Deletes the policy of a specified bucket.

    - /// - ///

    - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///

    If you are using an identity other than the root user of the Amazon Web Services account that - /// owns the bucket, the calling identity must both have the - /// DeleteBucketPolicy permissions on the specified bucket and belong - /// to the bucket owner's account in order to use this operation.

    - ///

    If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a - /// 403 Access Denied error. If you have the correct permissions, but - /// you're not using an identity that belongs to the bucket owner's account, Amazon S3 - /// returns a 405 Method Not Allowed error.

    - /// - ///

    To ensure that bucket owners don't inadvertently lock themselves out of - /// their own buckets, the root principal in a bucket owner's Amazon Web Services account can - /// perform the GetBucketPolicy, PutBucketPolicy, and - /// DeleteBucketPolicy API actions, even if their bucket policy - /// explicitly denies the root principal's access. Bucket owner root principals can - /// only be blocked from performing these API actions by VPC endpoint policies and - /// Amazon Web Services Organizations policies.

    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The - /// s3:DeleteBucketPolicy permission is required in a policy. - /// For more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// To grant access to this API operation, you must have the - /// s3express:DeleteBucketPolicy permission in - /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to DeleteBucketPolicy - ///

    - /// - async fn delete_bucket_policy( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketPolicy is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you +/// must have the s3:PutBucketOwnershipControls permission. For more information +/// about Amazon S3 permissions, see Specifying Permissions in a +/// Policy.

    +///

    For information about Amazon S3 Object Ownership, see Using Object Ownership.

    +///

    The following operations are related to +/// DeleteBucketOwnershipControls:

    +/// +async fn delete_bucket_ownership_controls(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketOwnershipControls is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Deletes the replication configuration from the bucket.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:PutReplicationConfiguration action. The bucket owner has these - /// permissions by default and can grant it to others. For more information about permissions, - /// see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - /// - ///

    It can take a while for the deletion of a replication configuration to fully - /// propagate.

    - ///
    - ///

    For information about replication configuration, see Replication in the - /// Amazon S3 User Guide.

    - ///

    The following operations are related to DeleteBucketReplication:

    - /// - async fn delete_bucket_replication( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketReplication is not implemented yet")) - } +///

    Deletes the policy of a specified bucket.

    +/// +///

    +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///

    If you are using an identity other than the root user of the Amazon Web Services account that +/// owns the bucket, the calling identity must both have the +/// DeleteBucketPolicy permissions on the specified bucket and belong +/// to the bucket owner's account in order to use this operation.

    +///

    If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a +/// 403 Access Denied error. If you have the correct permissions, but +/// you're not using an identity that belongs to the bucket owner's account, Amazon S3 +/// returns a 405 Method Not Allowed error.

    +/// +///

    To ensure that bucket owners don't inadvertently lock themselves out of +/// their own buckets, the root principal in a bucket owner's Amazon Web Services account can +/// perform the GetBucketPolicy, PutBucketPolicy, and +/// DeleteBucketPolicy API actions, even if their bucket policy +/// explicitly denies the root principal's access. Bucket owner root principals can +/// only be blocked from performing these API actions by VPC endpoint policies and +/// Amazon Web Services Organizations policies.

    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The +/// s3:DeleteBucketPolicy permission is required in a policy. +/// For more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// To grant access to this API operation, you must have the +/// s3express:DeleteBucketPolicy permission in +/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to DeleteBucketPolicy +///

    +/// +async fn delete_bucket_policy(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketPolicy is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Deletes the tags from the bucket.

    - ///

    To use this operation, you must have permission to perform the - /// s3:PutBucketTagging action. By default, the bucket owner has this - /// permission and can grant this permission to others.

    - ///

    The following operations are related to DeleteBucketTagging:

    - /// - async fn delete_bucket_tagging( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketTagging is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Deletes the replication configuration from the bucket.

    +///

    To use this operation, you must have permissions to perform the +/// s3:PutReplicationConfiguration action. The bucket owner has these +/// permissions by default and can grant it to others. For more information about permissions, +/// see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +/// +///

    It can take a while for the deletion of a replication configuration to fully +/// propagate.

    +///
    +///

    For information about replication configuration, see Replication in the +/// Amazon S3 User Guide.

    +///

    The following operations are related to DeleteBucketReplication:

    +/// +async fn delete_bucket_replication(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketReplication is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    This action removes the website configuration for a bucket. Amazon S3 returns a 200 - /// OK response upon successfully deleting a website configuration on the specified - /// bucket. You will get a 200 OK response if the website configuration you are - /// trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if - /// the bucket specified in the request does not exist.

    - ///

    This DELETE action requires the S3:DeleteBucketWebsite permission. By - /// default, only the bucket owner can delete the website configuration attached to a bucket. - /// However, bucket owners can grant other users permission to delete the website configuration - /// by writing a bucket policy granting them the S3:DeleteBucketWebsite - /// permission.

    - ///

    For more information about hosting websites, see Hosting Websites on Amazon S3.

    - ///

    The following operations are related to DeleteBucketWebsite:

    - /// - async fn delete_bucket_website( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteBucketWebsite is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Deletes the tags from the bucket.

    +///

    To use this operation, you must have permission to perform the +/// s3:PutBucketTagging action. By default, the bucket owner has this +/// permission and can grant this permission to others.

    +///

    The following operations are related to DeleteBucketTagging:

    +/// +async fn delete_bucket_tagging(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketTagging is not implemented yet")) +} - ///

    Removes an object from a bucket. The behavior depends on the bucket's versioning state:

    - ///
      - ///
    • - ///

      If bucket versioning is not enabled, the operation permanently deletes the object.

      - ///
    • - ///
    • - ///

      If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object’s versionId in the request. For more information about versioning-enabled buckets, see Deleting object versions from a versioning-enabled bucket.

      - ///
    • - ///
    • - ///

      If bucket versioning is suspended, the operation removes the object that has a null versionId, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null versionId, and all versions of the object have a versionId, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a versionId, you must include the object’s versionId in the request. For more information about versioning-suspended buckets, see Deleting objects from versioning-suspended buckets.

      - ///
    • - ///
    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null - /// to the versionId query parameter in the request.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///

    To remove a specific version, you must use the versionId query parameter. Using this - /// query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 - /// sets the response header x-amz-delete-marker to true.

    - ///

    If the object you want to delete is in a bucket where the bucket versioning - /// configuration is MFA Delete enabled, you must include the x-amz-mfa request - /// header in the DELETE versionId request. Requests that include - /// x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3 - /// User Guide. To see sample - /// requests that use versioning, see Sample - /// Request.

    - /// - ///

    - /// Directory buckets - MFA delete is not supported by directory buckets.

    - ///
    - ///

    You can delete objects by explicitly calling DELETE Object or calling - /// (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block - /// users or accounts from removing or deleting objects from your bucket, you must deny them - /// the s3:DeleteObject, s3:DeleteObjectVersion, and - /// s3:PutLifeCycleConfiguration actions.

    - /// - ///

    - /// Directory buckets - S3 Lifecycle is not supported by directory buckets.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The following permissions are required in your policies when your - /// DeleteObjects request includes specific headers.

      - ///
        - ///
      • - ///

        - /// - /// s3:DeleteObject - /// - To delete an object from a bucket, you must always have the s3:DeleteObject permission.

        - ///
      • - ///
      • - ///

        - /// - /// s3:DeleteObjectVersion - /// - To delete a specific version of an object from a versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following action is related to DeleteObject:

    - ///
      - ///
    • - ///

      - /// PutObject - ///

      - ///
    • - ///
    - async fn delete_object(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteObject is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    This action removes the website configuration for a bucket. Amazon S3 returns a 200 +/// OK response upon successfully deleting a website configuration on the specified +/// bucket. You will get a 200 OK response if the website configuration you are +/// trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if +/// the bucket specified in the request does not exist.

    +///

    This DELETE action requires the S3:DeleteBucketWebsite permission. By +/// default, only the bucket owner can delete the website configuration attached to a bucket. +/// However, bucket owners can grant other users permission to delete the website configuration +/// by writing a bucket policy granting them the S3:DeleteBucketWebsite +/// permission.

    +///

    For more information about hosting websites, see Hosting Websites on Amazon S3.

    +///

    The following operations are related to DeleteBucketWebsite:

    +/// +async fn delete_bucket_website(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteBucketWebsite is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Removes the entire tag set from the specified object. For more information about - /// managing object tags, see Object Tagging.

    - ///

    To use this operation, you must have permission to perform the - /// s3:DeleteObjectTagging action.

    - ///

    To delete tags of a specific object version, add the versionId query - /// parameter in the request. You will need permission for the - /// s3:DeleteObjectVersionTagging action.

    - ///

    The following operations are related to DeleteObjectTagging:

    - /// - async fn delete_object_tagging( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteObjectTagging is not implemented yet")) - } +///

    Removes an object from a bucket. The behavior depends on the bucket's versioning state:

    +///
      +///
    • +///

      If bucket versioning is not enabled, the operation permanently deletes the object.

      +///
    • +///
    • +///

      If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object’s versionId in the request. For more information about versioning-enabled buckets, see Deleting object versions from a versioning-enabled bucket.

      +///
    • +///
    • +///

      If bucket versioning is suspended, the operation removes the object that has a null versionId, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null versionId, and all versions of the object have a versionId, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a versionId, you must include the object’s versionId in the request. For more information about versioning-suspended buckets, see Deleting objects from versioning-suspended buckets.

      +///
    • +///
    +/// +///
      +///
    • +///

      +/// Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null +/// to the versionId query parameter in the request.

      +///
    • +///
    • +///

      +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///

    To remove a specific version, you must use the versionId query parameter. Using this +/// query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 +/// sets the response header x-amz-delete-marker to true.

    +///

    If the object you want to delete is in a bucket where the bucket versioning +/// configuration is MFA Delete enabled, you must include the x-amz-mfa request +/// header in the DELETE versionId request. Requests that include +/// x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3 +/// User Guide. To see sample +/// requests that use versioning, see Sample +/// Request.

    +/// +///

    +/// Directory buckets - MFA delete is not supported by directory buckets.

    +///
    +///

    You can delete objects by explicitly calling DELETE Object or calling +/// (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block +/// users or accounts from removing or deleting objects from your bucket, you must deny them +/// the s3:DeleteObject, s3:DeleteObjectVersion, and +/// s3:PutLifeCycleConfiguration actions.

    +/// +///

    +/// Directory buckets - S3 Lifecycle is not supported by directory buckets.

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The following permissions are required in your policies when your +/// DeleteObjects request includes specific headers.

      +///
        +///
      • +///

        +/// +/// s3:DeleteObject +/// - To delete an object from a bucket, you must always have the s3:DeleteObject permission.

        +///
      • +///
      • +///

        +/// +/// s3:DeleteObjectVersion +/// - To delete a specific version of an object from a versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following action is related to DeleteObject:

    +/// +async fn delete_object(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteObject is not implemented yet")) +} - ///

    This operation enables you to delete multiple objects from a bucket using a single HTTP - /// request. If you know the object keys that you want to delete, then this operation provides - /// a suitable alternative to sending individual delete requests, reducing per-request - /// overhead.

    - ///

    The request can contain a list of up to 1,000 keys that you want to delete. In the XML, you - /// provide the object key names, and optionally, version IDs if you want to delete a specific - /// version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a - /// delete operation and returns the result of that delete, success or failure, in the response. - /// If the object specified in the request isn't found, Amazon S3 confirms the deletion by returning the result as deleted.

    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///

    The operation supports two modes for the response: verbose and quiet. By default, the - /// operation uses verbose mode in which the response includes the result of deletion of each - /// key in your request. In quiet mode the response includes only keys where the delete - /// operation encountered an error. For a successful deletion in a quiet mode, the operation - /// does not return any information about the delete in the response body.

    - ///

    When performing this action on an MFA Delete enabled bucket, that attempts to delete any - /// versioned objects, you must include an MFA token. If you do not provide one, the entire - /// request will fail, even if there are non-versioned objects you are trying to delete. If you - /// provide an invalid token, whether there are versioned keys in the request or not, the - /// entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA - /// Delete in the Amazon S3 User Guide.

    - /// - ///

    - /// Directory buckets - - /// MFA delete is not supported by directory buckets.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The - /// following permissions are required in your policies when your - /// DeleteObjects request includes specific headers.

      - ///
        - ///
      • - ///

        - /// - /// s3:DeleteObject - /// - /// - To delete an object from a bucket, you must always specify - /// the s3:DeleteObject permission.

        - ///
      • - ///
      • - ///

        - /// - /// s3:DeleteObjectVersion - /// - To delete a specific version of an object from a - /// versioning-enabled bucket, you must specify the - /// s3:DeleteObjectVersion permission.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///
    • - ///
    - ///
    - ///
    Content-MD5 request header
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket - The Content-MD5 - /// request header is required for all Multi-Object Delete requests. Amazon S3 uses - /// the header value to ensure that your request body has not been altered in - /// transit.

      - ///
    • - ///
    • - ///

      - /// Directory bucket - The - /// Content-MD5 request header or a additional checksum request header - /// (including x-amz-checksum-crc32, - /// x-amz-checksum-crc32c, x-amz-checksum-sha1, or - /// x-amz-checksum-sha256) is required for all Multi-Object - /// Delete requests.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to DeleteObjects:

    - /// - async fn delete_objects(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "DeleteObjects is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Removes the entire tag set from the specified object. For more information about +/// managing object tags, see Object Tagging.

    +///

    To use this operation, you must have permission to perform the +/// s3:DeleteObjectTagging action.

    +///

    To delete tags of a specific object version, add the versionId query +/// parameter in the request. You will need permission for the +/// s3:DeleteObjectVersionTagging action.

    +///

    The following operations are related to DeleteObjectTagging:

    +/// +async fn delete_object_tagging(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteObjectTagging is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this - /// operation, you must have the s3:PutBucketPublicAccessBlock permission. For - /// more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    The following operations are related to DeletePublicAccessBlock:

    - /// - async fn delete_public_access_block( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "DeletePublicAccessBlock is not implemented yet")) - } +///

    This operation enables you to delete multiple objects from a bucket using a single HTTP +/// request. If you know the object keys that you want to delete, then this operation provides +/// a suitable alternative to sending individual delete requests, reducing per-request +/// overhead.

    +///

    The request can contain a list of up to 1,000 keys that you want to delete. In the XML, you +/// provide the object key names, and optionally, version IDs if you want to delete a specific +/// version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a +/// delete operation and returns the result of that delete, success or failure, in the response. +/// If the object specified in the request isn't found, Amazon S3 confirms the deletion by returning the result as deleted.

    +/// +///
      +///
    • +///

      +/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///

    The operation supports two modes for the response: verbose and quiet. By default, the +/// operation uses verbose mode in which the response includes the result of deletion of each +/// key in your request. In quiet mode the response includes only keys where the delete +/// operation encountered an error. For a successful deletion in a quiet mode, the operation +/// does not return any information about the delete in the response body.

    +///

    When performing this action on an MFA Delete enabled bucket, that attempts to delete any +/// versioned objects, you must include an MFA token. If you do not provide one, the entire +/// request will fail, even if there are non-versioned objects you are trying to delete. If you +/// provide an invalid token, whether there are versioned keys in the request or not, the +/// entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA +/// Delete in the Amazon S3 User Guide.

    +/// +///

    +/// Directory buckets - +/// MFA delete is not supported by directory buckets.

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The +/// following permissions are required in your policies when your +/// DeleteObjects request includes specific headers.

      +///
        +///
      • +///

        +/// +/// s3:DeleteObject +/// +/// - To delete an object from a bucket, you must always specify +/// the s3:DeleteObject permission.

        +///
      • +///
      • +///

        +/// +/// s3:DeleteObjectVersion +/// - To delete a specific version of an object from a +/// versioning-enabled bucket, you must specify the +/// s3:DeleteObjectVersion permission.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///
    • +///
    +///
    +///
    Content-MD5 request header
    +///
    +///
      +///
    • +///

      +/// General purpose bucket - The Content-MD5 +/// request header is required for all Multi-Object Delete requests. Amazon S3 uses +/// the header value to ensure that your request body has not been altered in +/// transit.

      +///
    • +///
    • +///

      +/// Directory bucket - The +/// Content-MD5 request header or a additional checksum request header +/// (including x-amz-checksum-crc32, +/// x-amz-checksum-crc32c, x-amz-checksum-sha1, or +/// x-amz-checksum-sha256) is required for all Multi-Object +/// Delete requests.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to DeleteObjects:

    +/// +async fn delete_objects(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeleteObjects is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    This implementation of the GET action uses the accelerate subresource to - /// return the Transfer Acceleration state of a bucket, which is either Enabled or - /// Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that - /// enables you to perform faster data transfers to and from Amazon S3.

    - ///

    To use this operation, you must have permission to perform the - /// s3:GetAccelerateConfiguration action. The bucket owner has this permission - /// by default. The bucket owner can grant this permission to others. For more information - /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to your Amazon S3 Resources in the - /// Amazon S3 User Guide.

    - ///

    You set the Transfer Acceleration state of an existing bucket to Enabled or - /// Suspended by using the PutBucketAccelerateConfiguration operation.

    - ///

    A GET accelerate request does not return a state value for a bucket that - /// has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state - /// has never been set on the bucket.

    - ///

    For more information about transfer acceleration, see Transfer Acceleration in - /// the Amazon S3 User Guide.

    - ///

    The following operations are related to - /// GetBucketAccelerateConfiguration:

    - /// - async fn get_bucket_accelerate_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketAccelerateConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this +/// operation, you must have the s3:PutBucketPublicAccessBlock permission. For +/// more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    The following operations are related to DeletePublicAccessBlock:

    +/// +async fn delete_public_access_block(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "DeletePublicAccessBlock is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    This implementation of the GET action uses the acl subresource - /// to return the access control list (ACL) of a bucket. To use GET to return the - /// ACL of the bucket, you must have the READ_ACP access to the bucket. If - /// READ_ACP permission is granted to the anonymous user, you can return the - /// ACL of the bucket without using an authorization header.

    - ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - /// - ///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, - /// requests to read ACLs are still supported and return the - /// bucket-owner-full-control ACL with the owner being the account that - /// created the bucket. For more information, see Controlling object - /// ownership and disabling ACLs in the - /// Amazon S3 User Guide.

    - ///
    - ///

    The following operations are related to GetBucketAcl:

    - /// - async fn get_bucket_acl(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketAcl is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    This implementation of the GET action uses the accelerate subresource to +/// return the Transfer Acceleration state of a bucket, which is either Enabled or +/// Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that +/// enables you to perform faster data transfers to and from Amazon S3.

    +///

    To use this operation, you must have permission to perform the +/// s3:GetAccelerateConfiguration action. The bucket owner has this permission +/// by default. The bucket owner can grant this permission to others. For more information +/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to your Amazon S3 Resources in the +/// Amazon S3 User Guide.

    +///

    You set the Transfer Acceleration state of an existing bucket to Enabled or +/// Suspended by using the PutBucketAccelerateConfiguration operation.

    +///

    A GET accelerate request does not return a state value for a bucket that +/// has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state +/// has never been set on the bucket.

    +///

    For more information about transfer acceleration, see Transfer Acceleration in +/// the Amazon S3 User Guide.

    +///

    The following operations are related to +/// GetBucketAccelerateConfiguration:

    +/// +async fn get_bucket_accelerate_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketAccelerateConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    This implementation of the GET action returns an analytics configuration (identified by - /// the analytics configuration ID) from the bucket.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:GetAnalyticsConfiguration action. The bucket owner has this permission - /// by default. The bucket owner can grant this permission to others. For more information - /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources in the - /// Amazon S3 User Guide.

    - ///

    For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class - /// Analysis in the Amazon S3 User Guide.

    - ///

    The following operations are related to - /// GetBucketAnalyticsConfiguration:

    - /// - async fn get_bucket_analytics_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketAnalyticsConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    This implementation of the GET action uses the acl subresource +/// to return the access control list (ACL) of a bucket. To use GET to return the +/// ACL of the bucket, you must have the READ_ACP access to the bucket. If +/// READ_ACP permission is granted to the anonymous user, you can return the +/// ACL of the bucket without using an authorization header.

    +///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    +/// +///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, +/// requests to read ACLs are still supported and return the +/// bucket-owner-full-control ACL with the owner being the account that +/// created the bucket. For more information, see Controlling object +/// ownership and disabling ACLs in the +/// Amazon S3 User Guide.

    +///
    +///

    The following operations are related to GetBucketAcl:

    +/// +async fn get_bucket_acl(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketAcl is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the - /// bucket.

    - ///

    To use this operation, you must have permission to perform the - /// s3:GetBucketCORS action. By default, the bucket owner has this permission - /// and can grant it to others.

    - ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - ///

    For more information about CORS, see Enabling Cross-Origin Resource - /// Sharing.

    - ///

    The following operations are related to GetBucketCors:

    - /// - async fn get_bucket_cors(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketCors is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    This implementation of the GET action returns an analytics configuration (identified by +/// the analytics configuration ID) from the bucket.

    +///

    To use this operation, you must have permissions to perform the +/// s3:GetAnalyticsConfiguration action. The bucket owner has this permission +/// by default. The bucket owner can grant this permission to others. For more information +/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources in the +/// Amazon S3 User Guide.

    +///

    For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class +/// Analysis in the Amazon S3 User Guide.

    +///

    The following operations are related to +/// GetBucketAnalyticsConfiguration:

    +/// +async fn get_bucket_analytics_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketAnalyticsConfiguration is not implemented yet")) +} - ///

    Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets - /// have a default encryption configuration that uses server-side encryption with Amazon S3 managed - /// keys (SSE-S3).

    - /// - /// - /// - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The - /// s3:GetEncryptionConfiguration permission is required in a - /// policy. The bucket owner has this permission by default. The bucket owner - /// can grant this permission to others. For more information about permissions, - /// see Permissions Related to Bucket Operations and Managing Access - /// Permissions to Your Amazon S3 Resources.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// To grant access to this API operation, you must have the - /// s3express:GetEncryptionConfiguration permission in - /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to GetBucketEncryption:

    - /// - async fn get_bucket_encryption( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketEncryption is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the +/// bucket.

    +///

    To use this operation, you must have permission to perform the +/// s3:GetBucketCORS action. By default, the bucket owner has this permission +/// and can grant it to others.

    +///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    +///

    For more information about CORS, see Enabling Cross-Origin Resource +/// Sharing.

    +///

    The following operations are related to GetBucketCors:

    +/// +async fn get_bucket_cors(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketCors is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Gets the S3 Intelligent-Tiering configuration from the specified bucket.

    - ///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    - ///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    - ///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    - ///

    Operations related to GetBucketIntelligentTieringConfiguration include:

    - /// - async fn get_bucket_intelligent_tiering_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!( - NotImplemented, - "GetBucketIntelligentTieringConfiguration is not implemented yet" - )) - } +///

    Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets +/// have a default encryption configuration that uses server-side encryption with Amazon S3 managed +/// keys (SSE-S3).

    +/// +/// +/// +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The +/// s3:GetEncryptionConfiguration permission is required in a +/// policy. The bucket owner has this permission by default. The bucket owner +/// can grant this permission to others. For more information about permissions, +/// see Permissions Related to Bucket Operations and Managing Access +/// Permissions to Your Amazon S3 Resources.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// To grant access to this API operation, you must have the +/// s3express:GetEncryptionConfiguration permission in +/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to GetBucketEncryption:

    +/// +async fn get_bucket_encryption(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketEncryption is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns an inventory configuration (identified by the inventory configuration ID) from - /// the bucket.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:GetInventoryConfiguration action. The bucket owner has this permission - /// by default and can grant this permission to others. For more information about permissions, - /// see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

    - ///

    The following operations are related to - /// GetBucketInventoryConfiguration:

    - /// - async fn get_bucket_inventory_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketInventoryConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Gets the S3 Intelligent-Tiering configuration from the specified bucket.

    +///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    +///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    +///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    +///

    Operations related to GetBucketIntelligentTieringConfiguration include:

    +/// +async fn get_bucket_intelligent_tiering_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketIntelligentTieringConfiguration is not implemented yet")) +} - ///

    Returns the lifecycle configuration information set on the bucket. For information about - /// lifecycle configuration, see Object Lifecycle - /// Management.

    - ///

    Bucket lifecycle configuration now supports specifying a lifecycle rule using an object - /// key name prefix, one or more object tags, object size, or any combination of these. - /// Accordingly, this section describes the latest API, which is compatible with the new - /// functionality. The previous version of the API supported filtering based only on an object - /// key name prefix, which is supported for general purpose buckets for backward compatibility. - /// For the related API description, see GetBucketLifecycle.

    - /// - ///

    Lifecyle configurations for directory buckets only support expiring objects and - /// cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters - /// are not supported.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - By - /// default, all Amazon S3 resources are private, including buckets, objects, and - /// related subresources (for example, lifecycle configuration and website - /// configuration). Only the resource owner (that is, the Amazon Web Services account that - /// created it) can access the resource. The resource owner can optionally grant - /// access permissions to others by writing an access policy. For this - /// operation, a user must have the s3:GetLifecycleConfiguration - /// permission.

      - ///

      For more information about permissions, see Managing Access - /// Permissions to Your Amazon S3 Resources.

      - ///
    • - ///
    - ///
      - ///
    • - ///

      - /// Directory bucket permissions - - /// You must have the s3express:GetLifecycleConfiguration - /// permission in an IAM identity-based policy to use this operation. - /// Cross-account access to this API operation isn't supported. The resource - /// owner can optionally grant access permissions to others by creating a role - /// or user for them as long as they are within the same account as the owner - /// and resource.

      - ///

      For more information about directory bucket policies and permissions, see - /// Authorizing Regional endpoint APIs with IAM in the - /// Amazon S3 User Guide.

      - /// - ///

      - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host - /// header syntax is - /// s3express-control.region.amazonaws.com.

    - ///
    - ///
    - ///

    - /// GetBucketLifecycleConfiguration has the following special error:

    - ///
      - ///
    • - ///

      Error code: NoSuchLifecycleConfiguration - ///

      - ///
        - ///
      • - ///

        Description: The lifecycle configuration does not exist.

        - ///
      • - ///
      • - ///

        HTTP Status Code: 404 Not Found

        - ///
      • - ///
      • - ///

        SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    - ///

    The following operations are related to - /// GetBucketLifecycleConfiguration:

    - /// - async fn get_bucket_lifecycle_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketLifecycleConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns an inventory configuration (identified by the inventory configuration ID) from +/// the bucket.

    +///

    To use this operation, you must have permissions to perform the +/// s3:GetInventoryConfiguration action. The bucket owner has this permission +/// by default and can grant this permission to others. For more information about permissions, +/// see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

    +///

    The following operations are related to +/// GetBucketInventoryConfiguration:

    +/// +async fn get_bucket_inventory_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketInventoryConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the Region the bucket resides in. You set the bucket's Region using the - /// LocationConstraint request parameter in a CreateBucket - /// request. For more information, see CreateBucket.

    - ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - /// - ///

    We recommend that you use HeadBucket to return the Region - /// that a bucket resides in. For backward compatibility, Amazon S3 continues to support - /// GetBucketLocation.

    - ///
    - ///

    The following operations are related to GetBucketLocation:

    - /// - async fn get_bucket_location( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketLocation is not implemented yet")) - } +///

    Returns the lifecycle configuration information set on the bucket. For information about +/// lifecycle configuration, see Object Lifecycle +/// Management.

    +///

    Bucket lifecycle configuration now supports specifying a lifecycle rule using an object +/// key name prefix, one or more object tags, object size, or any combination of these. +/// Accordingly, this section describes the latest API, which is compatible with the new +/// functionality. The previous version of the API supported filtering based only on an object +/// key name prefix, which is supported for general purpose buckets for backward compatibility. +/// For the related API description, see GetBucketLifecycle.

    +/// +///

    Lifecyle configurations for directory buckets only support expiring objects and +/// cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters +/// are not supported.

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - By +/// default, all Amazon S3 resources are private, including buckets, objects, and +/// related subresources (for example, lifecycle configuration and website +/// configuration). Only the resource owner (that is, the Amazon Web Services account that +/// created it) can access the resource. The resource owner can optionally grant +/// access permissions to others by writing an access policy. For this +/// operation, a user must have the s3:GetLifecycleConfiguration +/// permission.

      +///

      For more information about permissions, see Managing Access +/// Permissions to Your Amazon S3 Resources.

      +///
    • +///
    +///
      +///
    • +///

      +/// Directory bucket permissions - +/// You must have the s3express:GetLifecycleConfiguration +/// permission in an IAM identity-based policy to use this operation. +/// Cross-account access to this API operation isn't supported. The resource +/// owner can optionally grant access permissions to others by creating a role +/// or user for them as long as they are within the same account as the owner +/// and resource.

      +///

      For more information about directory bucket policies and permissions, see +/// Authorizing Regional endpoint APIs with IAM in the +/// Amazon S3 User Guide.

      +/// +///

      +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host +/// header syntax is +/// s3express-control.region.amazonaws.com.

    +///
    +///
    +///

    +/// GetBucketLifecycleConfiguration has the following special error:

    +///
      +///
    • +///

      Error code: NoSuchLifecycleConfiguration +///

      +///
        +///
      • +///

        Description: The lifecycle configuration does not exist.

        +///
      • +///
      • +///

        HTTP Status Code: 404 Not Found

        +///
      • +///
      • +///

        SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    +///

    The following operations are related to +/// GetBucketLifecycleConfiguration:

    +/// +async fn get_bucket_lifecycle_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketLifecycleConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the logging status of a bucket and the permissions users have to view and modify - /// that status.

    - ///

    The following operations are related to GetBucketLogging:

    - /// - async fn get_bucket_logging(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketLogging is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the Region the bucket resides in. You set the bucket's Region using the +/// LocationConstraint request parameter in a CreateBucket +/// request. For more information, see CreateBucket.

    +///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    +/// +///

    We recommend that you use HeadBucket to return the Region +/// that a bucket resides in. For backward compatibility, Amazon S3 continues to support +/// GetBucketLocation.

    +///
    +///

    The following operations are related to GetBucketLocation:

    +/// +async fn get_bucket_location(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketLocation is not implemented yet")) +} - ///

    - /// Retrieves the metadata table configuration for a general purpose bucket. For more - /// information, see Accelerating data - /// discovery with S3 Metadata in the Amazon S3 User Guide.

    - ///
    - ///
    Permissions
    - ///
    - ///

    To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more - /// information, see Setting up - /// permissions for configuring metadata tables in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///

    The following operations are related to GetBucketMetadataTableConfiguration:

    - /// - async fn get_bucket_metadata_table_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketMetadataTableConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the logging status of a bucket and the permissions users have to view and modify +/// that status.

    +///

    The following operations are related to GetBucketLogging:

    +/// +async fn get_bucket_logging(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketLogging is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Gets a metrics configuration (specified by the metrics configuration ID) from the - /// bucket. Note that this doesn't include the daily storage metrics.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:GetMetricsConfiguration action. The bucket owner has this permission by - /// default. The bucket owner can grant this permission to others. For more information about - /// permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring - /// Metrics with Amazon CloudWatch.

    - ///

    The following operations are related to - /// GetBucketMetricsConfiguration:

    - /// - async fn get_bucket_metrics_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketMetricsConfiguration is not implemented yet")) - } +///

    +/// Retrieves the metadata table configuration for a general purpose bucket. For more +/// information, see Accelerating data +/// discovery with S3 Metadata in the Amazon S3 User Guide.

    +///
    +///
    Permissions
    +///
    +///

    To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more +/// information, see Setting up +/// permissions for configuring metadata tables in the +/// Amazon S3 User Guide.

    +///
    +///
    +///

    The following operations are related to GetBucketMetadataTableConfiguration:

    +/// +async fn get_bucket_metadata_table_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketMetadataTableConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the notification configuration of a bucket.

    - ///

    If notifications are not enabled on the bucket, the action returns an empty - /// NotificationConfiguration element.

    - ///

    By default, you must be the bucket owner to read the notification configuration of a - /// bucket. However, the bucket owner can use a bucket policy to grant permission to other - /// users to read this configuration with the s3:GetBucketNotification - /// permission.

    - ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    - ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. - /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. - /// For more information about InvalidAccessPointAliasError, see List of - /// Error Codes.

    - ///

    For more information about setting and reading the notification configuration on a - /// bucket, see Setting Up Notification of Bucket Events. For more information about bucket - /// policies, see Using Bucket Policies.

    - ///

    The following action is related to GetBucketNotification:

    - /// - async fn get_bucket_notification_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketNotificationConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Gets a metrics configuration (specified by the metrics configuration ID) from the +/// bucket. Note that this doesn't include the daily storage metrics.

    +///

    To use this operation, you must have permissions to perform the +/// s3:GetMetricsConfiguration action. The bucket owner has this permission by +/// default. The bucket owner can grant this permission to others. For more information about +/// permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring +/// Metrics with Amazon CloudWatch.

    +///

    The following operations are related to +/// GetBucketMetricsConfiguration:

    +/// +async fn get_bucket_metrics_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketMetricsConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you - /// must have the s3:GetBucketOwnershipControls permission. For more information - /// about Amazon S3 permissions, see Specifying permissions in a - /// policy.

    - ///

    For information about Amazon S3 Object Ownership, see Using Object - /// Ownership.

    - ///

    The following operations are related to GetBucketOwnershipControls:

    - /// - async fn get_bucket_ownership_controls( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketOwnershipControls is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the notification configuration of a bucket.

    +///

    If notifications are not enabled on the bucket, the action returns an empty +/// NotificationConfiguration element.

    +///

    By default, you must be the bucket owner to read the notification configuration of a +/// bucket. However, the bucket owner can use a bucket policy to grant permission to other +/// users to read this configuration with the s3:GetBucketNotification +/// permission.

    +///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    +///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. +/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. +/// For more information about InvalidAccessPointAliasError, see List of +/// Error Codes.

    +///

    For more information about setting and reading the notification configuration on a +/// bucket, see Setting Up Notification of Bucket Events. For more information about bucket +/// policies, see Using Bucket Policies.

    +///

    The following action is related to GetBucketNotification:

    +/// +async fn get_bucket_notification_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketNotificationConfiguration is not implemented yet")) +} - ///

    Returns the policy of a specified bucket.

    - /// - ///

    - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///

    If you are using an identity other than the root user of the Amazon Web Services account that - /// owns the bucket, the calling identity must both have the - /// GetBucketPolicy permissions on the specified bucket and belong to - /// the bucket owner's account in order to use this operation.

    - ///

    If you don't have GetBucketPolicy permissions, Amazon S3 returns a - /// 403 Access Denied error. If you have the correct permissions, but - /// you're not using an identity that belongs to the bucket owner's account, Amazon S3 - /// returns a 405 Method Not Allowed error.

    - /// - ///

    To ensure that bucket owners don't inadvertently lock themselves out of - /// their own buckets, the root principal in a bucket owner's Amazon Web Services account can - /// perform the GetBucketPolicy, PutBucketPolicy, and - /// DeleteBucketPolicy API actions, even if their bucket policy - /// explicitly denies the root principal's access. Bucket owner root principals can - /// only be blocked from performing these API actions by VPC endpoint policies and - /// Amazon Web Services Organizations policies.

    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The - /// s3:GetBucketPolicy permission is required in a policy. For - /// more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// To grant access to this API operation, you must have the - /// s3express:GetBucketPolicy permission in - /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    Example bucket policies
    - ///
    - ///

    - /// General purpose buckets example bucket policies - /// - See Bucket policy - /// examples in the Amazon S3 User Guide.

    - ///

    - /// Directory bucket example bucket policies - /// - See Example bucket policies for S3 Express One Zone in the - /// Amazon S3 User Guide.

    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following action is related to GetBucketPolicy:

    - ///
      - ///
    • - ///

      - /// GetObject - ///

      - ///
    • - ///
    - async fn get_bucket_policy(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketPolicy is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you +/// must have the s3:GetBucketOwnershipControls permission. For more information +/// about Amazon S3 permissions, see Specifying permissions in a +/// policy.

    +///

    For information about Amazon S3 Object Ownership, see Using Object +/// Ownership.

    +///

    The following operations are related to GetBucketOwnershipControls:

    +/// +async fn get_bucket_ownership_controls(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketOwnershipControls is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public. - /// In order to use this operation, you must have the s3:GetBucketPolicyStatus - /// permission. For more information about Amazon S3 permissions, see Specifying Permissions in a - /// Policy.

    - ///

    For more information about when Amazon S3 considers a bucket public, see The Meaning of "Public".

    - ///

    The following operations are related to GetBucketPolicyStatus:

    - /// - async fn get_bucket_policy_status( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketPolicyStatus is not implemented yet")) - } +///

    Returns the policy of a specified bucket.

    +/// +///

    +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///

    If you are using an identity other than the root user of the Amazon Web Services account that +/// owns the bucket, the calling identity must both have the +/// GetBucketPolicy permissions on the specified bucket and belong to +/// the bucket owner's account in order to use this operation.

    +///

    If you don't have GetBucketPolicy permissions, Amazon S3 returns a +/// 403 Access Denied error. If you have the correct permissions, but +/// you're not using an identity that belongs to the bucket owner's account, Amazon S3 +/// returns a 405 Method Not Allowed error.

    +/// +///

    To ensure that bucket owners don't inadvertently lock themselves out of +/// their own buckets, the root principal in a bucket owner's Amazon Web Services account can +/// perform the GetBucketPolicy, PutBucketPolicy, and +/// DeleteBucketPolicy API actions, even if their bucket policy +/// explicitly denies the root principal's access. Bucket owner root principals can +/// only be blocked from performing these API actions by VPC endpoint policies and +/// Amazon Web Services Organizations policies.

    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The +/// s3:GetBucketPolicy permission is required in a policy. For +/// more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// To grant access to this API operation, you must have the +/// s3express:GetBucketPolicy permission in +/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    Example bucket policies
    +///
    +///

    +/// General purpose buckets example bucket policies +/// - See Bucket policy +/// examples in the Amazon S3 User Guide.

    +///

    +/// Directory bucket example bucket policies +/// - See Example bucket policies for S3 Express One Zone in the +/// Amazon S3 User Guide.

    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    +///
    +///
    +///

    The following action is related to GetBucketPolicy:

    +/// +async fn get_bucket_policy(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketPolicy is not implemented yet")) +} + +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public. +/// In order to use this operation, you must have the s3:GetBucketPolicyStatus +/// permission. For more information about Amazon S3 permissions, see Specifying Permissions in a +/// Policy.

    +///

    For more information about when Amazon S3 considers a bucket public, see The Meaning of "Public".

    +///

    The following operations are related to GetBucketPolicyStatus:

    +/// +async fn get_bucket_policy_status(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketPolicyStatus is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the replication configuration of a bucket.

    - /// - ///

    It can take a while to propagate the put or delete a replication configuration to - /// all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong - /// result.

    - ///
    - ///

    For information about replication configuration, see Replication in the - /// Amazon S3 User Guide.

    - ///

    This action requires permissions for the s3:GetReplicationConfiguration - /// action. For more information about permissions, see Using Bucket Policies and User - /// Policies.

    - ///

    If you include the Filter element in a replication configuration, you must - /// also include the DeleteMarkerReplication and Priority elements. - /// The response also returns those elements.

    - ///

    For information about GetBucketReplication errors, see List of - /// replication-related error codes - ///

    - ///

    The following operations are related to GetBucketReplication:

    - /// - async fn get_bucket_replication( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketReplication is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the replication configuration of a bucket.

    +/// +///

    It can take a while to propagate the put or delete a replication configuration to +/// all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong +/// result.

    +///
    +///

    For information about replication configuration, see Replication in the +/// Amazon S3 User Guide.

    +///

    This action requires permissions for the s3:GetReplicationConfiguration +/// action. For more information about permissions, see Using Bucket Policies and User +/// Policies.

    +///

    If you include the Filter element in a replication configuration, you must +/// also include the DeleteMarkerReplication and Priority elements. +/// The response also returns those elements.

    +///

    For information about GetBucketReplication errors, see List of +/// replication-related error codes +///

    +///

    The following operations are related to GetBucketReplication:

    +/// +async fn get_bucket_replication(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketReplication is not implemented yet")) +} + +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the request payment configuration of a bucket. To use this version of the +/// operation, you must be the bucket owner. For more information, see Requester Pays +/// Buckets.

    +///

    The following operations are related to GetBucketRequestPayment:

    +/// +async fn get_bucket_request_payment(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketRequestPayment is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the request payment configuration of a bucket. To use this version of the - /// operation, you must be the bucket owner. For more information, see Requester Pays - /// Buckets.

    - ///

    The following operations are related to GetBucketRequestPayment:

    - /// - async fn get_bucket_request_payment( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketRequestPayment is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the tag set associated with the bucket.

    +///

    To use this operation, you must have permission to perform the +/// s3:GetBucketTagging action. By default, the bucket owner has this +/// permission and can grant this permission to others.

    +///

    +/// GetBucketTagging has the following special error:

    +///
      +///
    • +///

      Error code: NoSuchTagSet +///

      +///
        +///
      • +///

        Description: There is no tag set associated with the bucket.

        +///
      • +///
      +///
    • +///
    +///

    The following operations are related to GetBucketTagging:

    +/// +async fn get_bucket_tagging(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketTagging is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the tag set associated with the bucket.

    - ///

    To use this operation, you must have permission to perform the - /// s3:GetBucketTagging action. By default, the bucket owner has this - /// permission and can grant this permission to others.

    - ///

    - /// GetBucketTagging has the following special error:

    - ///
      - ///
    • - ///

      Error code: NoSuchTagSet - ///

      - ///
        - ///
      • - ///

        Description: There is no tag set associated with the bucket.

        - ///
      • - ///
      - ///
    • - ///
    - ///

    The following operations are related to GetBucketTagging:

    - /// - async fn get_bucket_tagging(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketTagging is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the versioning state of a bucket.

    +///

    To retrieve the versioning state of a bucket, you must be the bucket owner.

    +///

    This implementation also returns the MFA Delete status of the versioning state. If the +/// MFA Delete status is enabled, the bucket owner must use an authentication +/// device to change the versioning state of the bucket.

    +///

    The following operations are related to GetBucketVersioning:

    +/// +async fn get_bucket_versioning(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketVersioning is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the versioning state of a bucket.

    - ///

    To retrieve the versioning state of a bucket, you must be the bucket owner.

    - ///

    This implementation also returns the MFA Delete status of the versioning state. If the - /// MFA Delete status is enabled, the bucket owner must use an authentication - /// device to change the versioning state of the bucket.

    - ///

    The following operations are related to GetBucketVersioning:

    - /// - async fn get_bucket_versioning( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketVersioning is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the website configuration for a bucket. To host website on Amazon S3, you can +/// configure a bucket as website by adding a website configuration. For more information about +/// hosting websites, see Hosting Websites on Amazon S3.

    +///

    This GET action requires the S3:GetBucketWebsite permission. By default, +/// only the bucket owner can read the bucket website configuration. However, bucket owners can +/// allow other users to read the website configuration by writing a bucket policy granting +/// them the S3:GetBucketWebsite permission.

    +///

    The following operations are related to GetBucketWebsite:

    +/// +async fn get_bucket_website(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetBucketWebsite is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the website configuration for a bucket. To host website on Amazon S3, you can - /// configure a bucket as website by adding a website configuration. For more information about - /// hosting websites, see Hosting Websites on Amazon S3.

    - ///

    This GET action requires the S3:GetBucketWebsite permission. By default, - /// only the bucket owner can read the bucket website configuration. However, bucket owners can - /// allow other users to read the website configuration by writing a bucket policy granting - /// them the S3:GetBucketWebsite permission.

    - ///

    The following operations are related to GetBucketWebsite:

    - /// - async fn get_bucket_website(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetBucketWebsite is not implemented yet")) - } +///

    Retrieves an object from Amazon S3.

    +///

    In the GetObject request, specify the full key name for the object.

    +///

    +/// General purpose buckets - Both the virtual-hosted-style +/// requests and the path-style requests are supported. For a virtual hosted-style request +/// example, if you have the object photos/2006/February/sample.jpg, specify the +/// object key name as /photos/2006/February/sample.jpg. For a path-style request +/// example, if you have the object photos/2006/February/sample.jpg in the bucket +/// named examplebucket, specify the object key name as +/// /examplebucket/photos/2006/February/sample.jpg. For more information about +/// request types, see HTTP Host +/// Header Bucket Specification in the Amazon S3 User Guide.

    +///

    +/// Directory buckets - +/// Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named amzn-s3-demo-bucket--usw2-az1--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - You +/// must have the required permissions in a policy. To use +/// GetObject, you must have the READ access to the +/// object (or version). If you grant READ access to the anonymous +/// user, the GetObject operation returns the object without using +/// an authorization header. For more information, see Specifying permissions in a policy in the +/// Amazon S3 User Guide.

      +///

      If you include a versionId in your request header, you must +/// have the s3:GetObjectVersion permission to access a specific +/// version of an object. The s3:GetObject permission is not +/// required in this scenario.

      +///

      If you request the current version of an object without a specific +/// versionId in the request header, only the +/// s3:GetObject permission is required. The +/// s3:GetObjectVersion permission is not required in this +/// scenario.

      +///

      If the object that you request doesn’t exist, the error that Amazon S3 returns +/// depends on whether you also have the s3:ListBucket +/// permission.

      +///
        +///
      • +///

        If you have the s3:ListBucket permission on the +/// bucket, Amazon S3 returns an HTTP status code 404 Not Found +/// error.

        +///
      • +///
      • +///

        If you don’t have the s3:ListBucket permission, Amazon S3 +/// returns an HTTP status code 403 Access Denied +/// error.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///

      If +/// the +/// object is encrypted using SSE-KMS, you must also have the +/// kms:GenerateDataKey and kms:Decrypt permissions +/// in IAM identity-based policies and KMS key policies for the KMS +/// key.

      +///
    • +///
    +///
    +///
    Storage classes
    +///
    +///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval +/// storage class, the S3 Glacier Deep Archive storage class, the +/// S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, +/// before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an +/// InvalidObjectState error. For information about restoring archived +/// objects, see Restoring Archived +/// Objects in the Amazon S3 User Guide.

    +///

    +/// Directory buckets - +/// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. +/// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    +///
    +///
    Encryption
    +///
    +///

    Encryption request headers, like x-amz-server-side-encryption, +/// should not be sent for the GetObject requests, if your object uses +/// server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side +/// encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side +/// encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your +/// GetObject requests for the object that uses these types of keys, +/// you’ll get an HTTP 400 Bad Request error.

    +///

    +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    +///
    +///
    Overriding response header values through the request
    +///
    +///

    There are times when you want to override certain response header values of a +/// GetObject response. For example, you might override the +/// Content-Disposition response header value through your +/// GetObject request.

    +///

    You can override values for a set of response headers. These modified response +/// header values are included only in a successful response, that is, when the HTTP +/// status code 200 OK is returned. The headers you can override using +/// the following query parameters in the request are a subset of the headers that +/// Amazon S3 accepts when you create an object.

    +///

    The response headers that you can override for the GetObject +/// response are Cache-Control, Content-Disposition, +/// Content-Encoding, Content-Language, +/// Content-Type, and Expires.

    +///

    To override values for a set of response headers in the GetObject +/// response, you can use the following query parameters in the request.

    +///
      +///
    • +///

      +/// response-cache-control +///

      +///
    • +///
    • +///

      +/// response-content-disposition +///

      +///
    • +///
    • +///

      +/// response-content-encoding +///

      +///
    • +///
    • +///

      +/// response-content-language +///

      +///
    • +///
    • +///

      +/// response-content-type +///

      +///
    • +///
    • +///

      +/// response-expires +///

      +///
    • +///
    +/// +///

    When you use these parameters, you must sign the request by using either an +/// Authorization header or a presigned URL. These parameters cannot be used with +/// an unsigned (anonymous) request.

    +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to GetObject:

    +/// +async fn get_object(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetObject is not implemented yet")) +} - ///

    Retrieves an object from Amazon S3.

    - ///

    In the GetObject request, specify the full key name for the object.

    - ///

    - /// General purpose buckets - Both the virtual-hosted-style - /// requests and the path-style requests are supported. For a virtual hosted-style request - /// example, if you have the object photos/2006/February/sample.jpg, specify the - /// object key name as /photos/2006/February/sample.jpg. For a path-style request - /// example, if you have the object photos/2006/February/sample.jpg in the bucket - /// named examplebucket, specify the object key name as - /// /examplebucket/photos/2006/February/sample.jpg. For more information about - /// request types, see HTTP Host - /// Header Bucket Specification in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - - /// Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named amzn-s3-demo-bucket--usw2-az1--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - You - /// must have the required permissions in a policy. To use - /// GetObject, you must have the READ access to the - /// object (or version). If you grant READ access to the anonymous - /// user, the GetObject operation returns the object without using - /// an authorization header. For more information, see Specifying permissions in a policy in the - /// Amazon S3 User Guide.

      - ///

      If you include a versionId in your request header, you must - /// have the s3:GetObjectVersion permission to access a specific - /// version of an object. The s3:GetObject permission is not - /// required in this scenario.

      - ///

      If you request the current version of an object without a specific - /// versionId in the request header, only the - /// s3:GetObject permission is required. The - /// s3:GetObjectVersion permission is not required in this - /// scenario.

      - ///

      If the object that you request doesn’t exist, the error that Amazon S3 returns - /// depends on whether you also have the s3:ListBucket - /// permission.

      - ///
        - ///
      • - ///

        If you have the s3:ListBucket permission on the - /// bucket, Amazon S3 returns an HTTP status code 404 Not Found - /// error.

        - ///
      • - ///
      • - ///

        If you don’t have the s3:ListBucket permission, Amazon S3 - /// returns an HTTP status code 403 Access Denied - /// error.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///

      If - /// the - /// object is encrypted using SSE-KMS, you must also have the - /// kms:GenerateDataKey and kms:Decrypt permissions - /// in IAM identity-based policies and KMS key policies for the KMS - /// key.

      - ///
    • - ///
    - ///
    - ///
    Storage classes
    - ///
    - ///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval - /// storage class, the S3 Glacier Deep Archive storage class, the - /// S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, - /// before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an - /// InvalidObjectState error. For information about restoring archived - /// objects, see Restoring Archived - /// Objects in the Amazon S3 User Guide.

    - ///

    - /// Directory buckets - - /// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. - /// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    - ///
    - ///
    Encryption
    - ///
    - ///

    Encryption request headers, like x-amz-server-side-encryption, - /// should not be sent for the GetObject requests, if your object uses - /// server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side - /// encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side - /// encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your - /// GetObject requests for the object that uses these types of keys, - /// you’ll get an HTTP 400 Bad Request error.

    - ///

    - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    - ///
    - ///
    Overriding response header values through the request
    - ///
    - ///

    There are times when you want to override certain response header values of a - /// GetObject response. For example, you might override the - /// Content-Disposition response header value through your - /// GetObject request.

    - ///

    You can override values for a set of response headers. These modified response - /// header values are included only in a successful response, that is, when the HTTP - /// status code 200 OK is returned. The headers you can override using - /// the following query parameters in the request are a subset of the headers that - /// Amazon S3 accepts when you create an object.

    - ///

    The response headers that you can override for the GetObject - /// response are Cache-Control, Content-Disposition, - /// Content-Encoding, Content-Language, - /// Content-Type, and Expires.

    - ///

    To override values for a set of response headers in the GetObject - /// response, you can use the following query parameters in the request.

    - ///
      - ///
    • - ///

      - /// response-cache-control - ///

      - ///
    • - ///
    • - ///

      - /// response-content-disposition - ///

      - ///
    • - ///
    • - ///

      - /// response-content-encoding - ///

      - ///
    • - ///
    • - ///

      - /// response-content-language - ///

      - ///
    • - ///
    • - ///

      - /// response-content-type - ///

      - ///
    • - ///
    • - ///

      - /// response-expires - ///

      - ///
    • - ///
    - /// - ///

    When you use these parameters, you must sign the request by using either an - /// Authorization header or a presigned URL. These parameters cannot be used with - /// an unsigned (anonymous) request.

    - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to GetObject:

    - /// - async fn get_object(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetObject is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the access control list (ACL) of an object. To use this operation, you must have +/// s3:GetObjectAcl permissions or READ_ACP access to the object. +/// For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3 +/// User Guide +///

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///

    By default, GET returns ACL information about the current version of an object. To +/// return ACL information about a different version, use the versionId subresource.

    +/// +///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, +/// requests to read ACLs are still supported and return the +/// bucket-owner-full-control ACL with the owner being the account that +/// created the bucket. For more information, see Controlling object +/// ownership and disabling ACLs in the +/// Amazon S3 User Guide.

    +///
    +///

    The following operations are related to GetObjectAcl:

    +/// +async fn get_object_acl(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetObjectAcl is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the access control list (ACL) of an object. To use this operation, you must have - /// s3:GetObjectAcl permissions or READ_ACP access to the object. - /// For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3 - /// User Guide - ///

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///

    By default, GET returns ACL information about the current version of an object. To - /// return ACL information about a different version, use the versionId subresource.

    - /// - ///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, - /// requests to read ACLs are still supported and return the - /// bucket-owner-full-control ACL with the owner being the account that - /// created the bucket. For more information, see Controlling object - /// ownership and disabling ACLs in the - /// Amazon S3 User Guide.

    - ///
    - ///

    The following operations are related to GetObjectAcl:

    - /// - async fn get_object_acl(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetObjectAcl is not implemented yet")) - } +///

    Retrieves all the metadata from an object without returning the object itself. This +/// operation is useful if you're interested only in an object's metadata.

    +///

    +/// GetObjectAttributes combines the functionality of HeadObject +/// and ListParts. All of the data returned with each of those individual calls +/// can be returned with a single call to GetObjectAttributes.

    +/// +///

    +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - To +/// use GetObjectAttributes, you must have READ access to the +/// object. The permissions that you need to use this operation depend on +/// whether the bucket is versioned. If the bucket is versioned, you need both +/// the s3:GetObjectVersion and +/// s3:GetObjectVersionAttributes permissions for this +/// operation. If the bucket is not versioned, you need the +/// s3:GetObject and s3:GetObjectAttributes +/// permissions. For more information, see Specifying +/// Permissions in a Policy in the +/// Amazon S3 User Guide. If the object that you request does +/// not exist, the error Amazon S3 returns depends on whether you also have the +/// s3:ListBucket permission.

      +///
        +///
      • +///

        If you have the s3:ListBucket permission on the +/// bucket, Amazon S3 returns an HTTP status code 404 Not Found +/// ("no such key") error.

        +///
      • +///
      • +///

        If you don't have the s3:ListBucket permission, Amazon S3 +/// returns an HTTP status code 403 Forbidden ("access +/// denied") error.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///

      If +/// the +/// object is encrypted with SSE-KMS, you must also have the +/// kms:GenerateDataKey and kms:Decrypt permissions +/// in IAM identity-based policies and KMS key policies for the KMS +/// key.

      +///
    • +///
    +///
    +///
    Encryption
    +///
    +/// +///

    Encryption request headers, like x-amz-server-side-encryption, +/// should not be sent for HEAD requests if your object uses +/// server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer +/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side +/// encryption with Amazon S3 managed encryption keys (SSE-S3). The +/// x-amz-server-side-encryption header is used when you +/// PUT an object to S3 and want to specify the encryption method. +/// If you include this header in a GET request for an object that +/// uses these types of keys, you’ll get an HTTP 400 Bad Request +/// error. It's because the encryption method can't be changed when you retrieve +/// the object.

    +///
    +///

    If you encrypt an object by using server-side encryption with customer-provided +/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve +/// the metadata from the object, you must use the following headers to provide the +/// encryption key for the server to be able to retrieve the object's metadata. The +/// headers are:

    +///
      +///
    • +///

      +/// x-amz-server-side-encryption-customer-algorithm +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key-MD5 +///

      +///
    • +///
    +///

    For more information about SSE-C, see Server-Side +/// Encryption (Using Customer-Provided Encryption Keys) in the +/// Amazon S3 User Guide.

    +/// +///

    +/// Directory bucket permissions - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your +/// CreateSession requests or PUT object requests. Then, new objects +/// are automatically encrypted with the desired encryption settings. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    +///
    +///
    +///
    Versioning
    +///
    +///

    +/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the +/// versionId query parameter in the request.

    +///
    +///
    Conditional request headers
    +///
    +///

    Consider the following when using request headers:

    +///
      +///
    • +///

      If both of the If-Match and If-Unmodified-Since +/// headers are present in the request as follows, then Amazon S3 returns the HTTP +/// status code 200 OK and the data requested:

      +///
        +///
      • +///

        +/// If-Match condition evaluates to +/// true.

        +///
      • +///
      • +///

        +/// If-Unmodified-Since condition evaluates to +/// false.

        +///
      • +///
      +///

      For more information about conditional requests, see RFC 7232.

      +///
    • +///
    • +///

      If both of the If-None-Match and +/// If-Modified-Since headers are present in the request as +/// follows, then Amazon S3 returns the HTTP status code 304 Not +/// Modified:

      +///
        +///
      • +///

        +/// If-None-Match condition evaluates to +/// false.

        +///
      • +///
      • +///

        +/// If-Modified-Since condition evaluates to +/// true.

        +///
      • +///
      +///

      For more information about conditional requests, see RFC 7232.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following actions are related to GetObjectAttributes:

    +/// +async fn get_object_attributes(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetObjectAttributes is not implemented yet")) +} - ///

    Retrieves all the metadata from an object without returning the object itself. This - /// operation is useful if you're interested only in an object's metadata.

    - ///

    - /// GetObjectAttributes combines the functionality of HeadObject - /// and ListParts. All of the data returned with each of those individual calls - /// can be returned with a single call to GetObjectAttributes.

    - /// - ///

    - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - To - /// use GetObjectAttributes, you must have READ access to the - /// object. The permissions that you need to use this operation depend on - /// whether the bucket is versioned. If the bucket is versioned, you need both - /// the s3:GetObjectVersion and - /// s3:GetObjectVersionAttributes permissions for this - /// operation. If the bucket is not versioned, you need the - /// s3:GetObject and s3:GetObjectAttributes - /// permissions. For more information, see Specifying - /// Permissions in a Policy in the - /// Amazon S3 User Guide. If the object that you request does - /// not exist, the error Amazon S3 returns depends on whether you also have the - /// s3:ListBucket permission.

      - ///
        - ///
      • - ///

        If you have the s3:ListBucket permission on the - /// bucket, Amazon S3 returns an HTTP status code 404 Not Found - /// ("no such key") error.

        - ///
      • - ///
      • - ///

        If you don't have the s3:ListBucket permission, Amazon S3 - /// returns an HTTP status code 403 Forbidden ("access - /// denied") error.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///

      If - /// the - /// object is encrypted with SSE-KMS, you must also have the - /// kms:GenerateDataKey and kms:Decrypt permissions - /// in IAM identity-based policies and KMS key policies for the KMS - /// key.

      - ///
    • - ///
    - ///
    - ///
    Encryption
    - ///
    - /// - ///

    Encryption request headers, like x-amz-server-side-encryption, - /// should not be sent for HEAD requests if your object uses - /// server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer - /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side - /// encryption with Amazon S3 managed encryption keys (SSE-S3). The - /// x-amz-server-side-encryption header is used when you - /// PUT an object to S3 and want to specify the encryption method. - /// If you include this header in a GET request for an object that - /// uses these types of keys, you’ll get an HTTP 400 Bad Request - /// error. It's because the encryption method can't be changed when you retrieve - /// the object.

    - ///
    - ///

    If you encrypt an object by using server-side encryption with customer-provided - /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve - /// the metadata from the object, you must use the following headers to provide the - /// encryption key for the server to be able to retrieve the object's metadata. The - /// headers are:

    - ///
      - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-algorithm - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key-MD5 - ///

      - ///
    • - ///
    - ///

    For more information about SSE-C, see Server-Side - /// Encryption (Using Customer-Provided Encryption Keys) in the - /// Amazon S3 User Guide.

    - /// - ///

    - /// Directory bucket permissions - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your - /// CreateSession requests or PUT object requests. Then, new objects - /// are automatically encrypted with the desired encryption settings. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    - ///
    - ///
    - ///
    Versioning
    - ///
    - ///

    - /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the - /// versionId query parameter in the request.

    - ///
    - ///
    Conditional request headers
    - ///
    - ///

    Consider the following when using request headers:

    - ///
      - ///
    • - ///

      If both of the If-Match and If-Unmodified-Since - /// headers are present in the request as follows, then Amazon S3 returns the HTTP - /// status code 200 OK and the data requested:

      - ///
        - ///
      • - ///

        - /// If-Match condition evaluates to - /// true.

        - ///
      • - ///
      • - ///

        - /// If-Unmodified-Since condition evaluates to - /// false.

        - ///
      • - ///
      - ///

      For more information about conditional requests, see RFC 7232.

      - ///
    • - ///
    • - ///

      If both of the If-None-Match and - /// If-Modified-Since headers are present in the request as - /// follows, then Amazon S3 returns the HTTP status code 304 Not - /// Modified:

      - ///
        - ///
      • - ///

        - /// If-None-Match condition evaluates to - /// false.

        - ///
      • - ///
      • - ///

        - /// If-Modified-Since condition evaluates to - /// true.

        - ///
      • - ///
      - ///

      For more information about conditional requests, see RFC 7232.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following actions are related to GetObjectAttributes:

    - /// - async fn get_object_attributes( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetObjectAttributes is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Gets an object's current legal hold status. For more information, see Locking +/// Objects.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///

    The following action is related to GetObjectLegalHold:

    +/// +async fn get_object_legal_hold(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetObjectLegalHold is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Gets an object's current legal hold status. For more information, see Locking - /// Objects.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///

    The following action is related to GetObjectLegalHold:

    - /// - async fn get_object_legal_hold( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetObjectLegalHold is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock +/// configuration will be applied by default to every new object placed in the specified +/// bucket. For more information, see Locking Objects.

    +///

    The following action is related to GetObjectLockConfiguration:

    +/// +async fn get_object_lock_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetObjectLockConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock - /// configuration will be applied by default to every new object placed in the specified - /// bucket. For more information, see Locking Objects.

    - ///

    The following action is related to GetObjectLockConfiguration:

    - /// - async fn get_object_lock_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetObjectLockConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Retrieves an object's retention settings. For more information, see Locking +/// Objects.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///

    The following action is related to GetObjectRetention:

    +/// +async fn get_object_retention(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetObjectRetention is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Retrieves an object's retention settings. For more information, see Locking - /// Objects.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///

    The following action is related to GetObjectRetention:

    - /// - async fn get_object_retention( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetObjectRetention is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns the tag-set of an object. You send the GET request against the tagging +/// subresource associated with the object.

    +///

    To use this operation, you must have permission to perform the +/// s3:GetObjectTagging action. By default, the GET action returns information +/// about current version of an object. For a versioned bucket, you can have multiple versions +/// of an object in your bucket. To retrieve tags of any other version, use the versionId query +/// parameter. You also need permission for the s3:GetObjectVersionTagging +/// action.

    +///

    By default, the bucket owner has this permission and can grant this permission to +/// others.

    +///

    For information about the Amazon S3 object tagging feature, see Object Tagging.

    +///

    The following actions are related to GetObjectTagging:

    +/// +async fn get_object_tagging(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetObjectTagging is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns the tag-set of an object. You send the GET request against the tagging - /// subresource associated with the object.

    - ///

    To use this operation, you must have permission to perform the - /// s3:GetObjectTagging action. By default, the GET action returns information - /// about current version of an object. For a versioned bucket, you can have multiple versions - /// of an object in your bucket. To retrieve tags of any other version, use the versionId query - /// parameter. You also need permission for the s3:GetObjectVersionTagging - /// action.

    - ///

    By default, the bucket owner has this permission and can grant this permission to - /// others.

    - ///

    For information about the Amazon S3 object tagging feature, see Object Tagging.

    - ///

    The following actions are related to GetObjectTagging:

    - /// - async fn get_object_tagging(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetObjectTagging is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're +/// distributing large files.

    +/// +///

    You can get torrent only for objects that are less than 5 GB in size, and that are +/// not encrypted using server-side encryption with a customer-provided encryption +/// key.

    +///
    +///

    To use GET, you must have READ access to the object.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///

    The following action is related to GetObjectTorrent:

    +/// +async fn get_object_torrent(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetObjectTorrent is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're - /// distributing large files.

    - /// - ///

    You can get torrent only for objects that are less than 5 GB in size, and that are - /// not encrypted using server-side encryption with a customer-provided encryption - /// key.

    - ///
    - ///

    To use GET, you must have READ access to the object.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///

    The following action is related to GetObjectTorrent:

    - ///
      - ///
    • - ///

      - /// GetObject - ///

      - ///
    • - ///
    - async fn get_object_torrent(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "GetObjectTorrent is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use +/// this operation, you must have the s3:GetBucketPublicAccessBlock permission. +/// For more information about Amazon S3 permissions, see Specifying Permissions in a +/// Policy.

    +/// +///

    When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or +/// an object, it checks the PublicAccessBlock configuration for both the +/// bucket (or the bucket that contains the object) and the bucket owner's account. If the +/// PublicAccessBlock settings are different between the bucket and the +/// account, Amazon S3 uses the most restrictive combination of the bucket-level and +/// account-level settings.

    +///
    +///

    For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".

    +///

    The following operations are related to GetPublicAccessBlock:

    +/// +async fn get_public_access_block(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "GetPublicAccessBlock is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use - /// this operation, you must have the s3:GetBucketPublicAccessBlock permission. - /// For more information about Amazon S3 permissions, see Specifying Permissions in a - /// Policy.

    - /// - ///

    When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or - /// an object, it checks the PublicAccessBlock configuration for both the - /// bucket (or the bucket that contains the object) and the bucket owner's account. If the - /// PublicAccessBlock settings are different between the bucket and the - /// account, Amazon S3 uses the most restrictive combination of the bucket-level and - /// account-level settings.

    - ///
    - ///

    For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".

    - ///

    The following operations are related to GetPublicAccessBlock:

    - /// - async fn get_public_access_block( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "GetPublicAccessBlock is not implemented yet")) - } +///

    You can use this operation to determine if a bucket exists and if you have permission to +/// access it. The action returns a 200 OK if the bucket exists and you have +/// permission to access it.

    +/// +///

    If the bucket does not exist or you do not have permission to access it, the +/// HEAD request returns a generic 400 Bad Request, 403 +/// Forbidden or 404 Not Found code. A message body is not included, +/// so you cannot determine the exception beyond these HTTP response codes.

    +///
    +///
    +///
    Authentication and authorization
    +///
    +///

    +/// General purpose buckets - Request to public +/// buckets that grant the s3:ListBucket permission publicly do not need to be signed. +/// All other HeadBucket requests must be authenticated and signed by +/// using IAM credentials (access key ID and secret access key for the IAM +/// identities). All headers with the x-amz- prefix, including +/// x-amz-copy-source, must be signed. For more information, see +/// REST Authentication.

    +///

    +/// Directory buckets - You must use IAM +/// credentials to authenticate and authorize your access to the +/// HeadBucket API operation, instead of using the temporary security +/// credentials through the CreateSession API operation.

    +///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your +/// behalf.

    +///
    +///
    Permissions
    +///
    +///

    +/// +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +/// +///

    You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    +async fn head_bucket(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "HeadBucket is not implemented yet")) +} - ///

    You can use this operation to determine if a bucket exists and if you have permission to - /// access it. The action returns a 200 OK if the bucket exists and you have - /// permission to access it.

    - /// - ///

    If the bucket does not exist or you do not have permission to access it, the - /// HEAD request returns a generic 400 Bad Request, 403 - /// Forbidden or 404 Not Found code. A message body is not included, - /// so you cannot determine the exception beyond these HTTP response codes.

    - ///
    - ///
    - ///
    Authentication and authorization
    - ///
    - ///

    - /// General purpose buckets - Request to public - /// buckets that grant the s3:ListBucket permission publicly do not need to be signed. - /// All other HeadBucket requests must be authenticated and signed by - /// using IAM credentials (access key ID and secret access key for the IAM - /// identities). All headers with the x-amz- prefix, including - /// x-amz-copy-source, must be signed. For more information, see - /// REST Authentication.

    - ///

    - /// Directory buckets - You must use IAM - /// credentials to authenticate and authorize your access to the - /// HeadBucket API operation, instead of using the temporary security - /// credentials through the CreateSession API operation.

    - ///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your - /// behalf.

    - ///
    - ///
    Permissions
    - ///
    - ///

    - /// - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - /// - ///

    You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    - async fn head_bucket(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "HeadBucket is not implemented yet")) - } +///

    The HEAD operation retrieves metadata from an object without returning the +/// object itself. This operation is useful if you're interested only in an object's +/// metadata.

    +/// +///

    A HEAD request has the same options as a GET operation on +/// an object. The response is identical to the GET response except that there +/// is no response body. Because of this, if the HEAD request generates an +/// error, it returns a generic code, such as 400 Bad Request, 403 +/// Forbidden, 404 Not Found, 405 Method Not Allowed, +/// 412 Precondition Failed, or 304 Not Modified. It's not +/// possible to retrieve the exact exception of these error codes.

    +///
    +///

    Request headers are limited to 8 KB in size. For more information, see Common +/// Request Headers.

    +///
    +///
    Permissions
    +///
    +///

    +///
      +///
    • +///

      +/// General purpose bucket permissions - To +/// use HEAD, you must have the s3:GetObject +/// permission. You need the relevant read object (or version) permission for +/// this operation. For more information, see Actions, resources, and +/// condition keys for Amazon S3 in the Amazon S3 User +/// Guide. For more information about the permissions to S3 API +/// operations by S3 resource types, see Required permissions for Amazon S3 API operations in the +/// Amazon S3 User Guide.

      +///

      If the object you request doesn't exist, the error that Amazon S3 returns +/// depends on whether you also have the s3:ListBucket +/// permission.

      +///
        +///
      • +///

        If you have the s3:ListBucket permission on the +/// bucket, Amazon S3 returns an HTTP status code 404 Not Found +/// error.

        +///
      • +///
      • +///

        If you don’t have the s3:ListBucket permission, Amazon S3 +/// returns an HTTP status code 403 Forbidden error.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///

      If you enable x-amz-checksum-mode in the request and the +/// object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must +/// also have the kms:GenerateDataKey and kms:Decrypt +/// permissions in IAM identity-based policies and KMS key policies for the +/// KMS key to retrieve the checksum of the object.

      +///
    • +///
    +///
    +///
    Encryption
    +///
    +/// +///

    Encryption request headers, like x-amz-server-side-encryption, +/// should not be sent for HEAD requests if your object uses +/// server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer +/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side +/// encryption with Amazon S3 managed encryption keys (SSE-S3). The +/// x-amz-server-side-encryption header is used when you +/// PUT an object to S3 and want to specify the encryption method. +/// If you include this header in a HEAD request for an object that +/// uses these types of keys, you’ll get an HTTP 400 Bad Request +/// error. It's because the encryption method can't be changed when you retrieve +/// the object.

    +///
    +///

    If you encrypt an object by using server-side encryption with customer-provided +/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve +/// the metadata from the object, you must use the following headers to provide the +/// encryption key for the server to be able to retrieve the object's metadata. The +/// headers are:

    +///
      +///
    • +///

      +/// x-amz-server-side-encryption-customer-algorithm +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key +///

      +///
    • +///
    • +///

      +/// x-amz-server-side-encryption-customer-key-MD5 +///

      +///
    • +///
    +///

    For more information about SSE-C, see Server-Side +/// Encryption (Using Customer-Provided Encryption Keys) in the +/// Amazon S3 User Guide.

    +/// +///

    +/// Directory bucket - +/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    +///
    +///
    +///
    Versioning
    +///
    +///
      +///
    • +///

      If the current version of the object is a delete marker, Amazon S3 behaves as +/// if the object was deleted and includes x-amz-delete-marker: +/// true in the response.

      +///
    • +///
    • +///

      If the specified version is a delete marker, the response returns a +/// 405 Method Not Allowed error and the Last-Modified: +/// timestamp response header.

      +///
    • +///
    +/// +///
      +///
    • +///

      +/// Directory buckets - +/// Delete marker is not supported for directory buckets.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null +/// to the versionId query parameter in the request.

      +///
    • +///
    +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +/// +///

    For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    +///

    The following actions are related to HeadObject:

    +/// +async fn head_object(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "HeadObject is not implemented yet")) +} - ///

    The HEAD operation retrieves metadata from an object without returning the - /// object itself. This operation is useful if you're interested only in an object's - /// metadata.

    - /// - ///

    A HEAD request has the same options as a GET operation on - /// an object. The response is identical to the GET response except that there - /// is no response body. Because of this, if the HEAD request generates an - /// error, it returns a generic code, such as 400 Bad Request, 403 - /// Forbidden, 404 Not Found, 405 Method Not Allowed, - /// 412 Precondition Failed, or 304 Not Modified. It's not - /// possible to retrieve the exact exception of these error codes.

    - ///
    - ///

    Request headers are limited to 8 KB in size. For more information, see Common - /// Request Headers.

    - ///
    - ///
    Permissions
    - ///
    - ///

    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - To - /// use HEAD, you must have the s3:GetObject - /// permission. You need the relevant read object (or version) permission for - /// this operation. For more information, see Actions, resources, and - /// condition keys for Amazon S3 in the Amazon S3 User - /// Guide. For more information about the permissions to S3 API - /// operations by S3 resource types, see Required permissions for Amazon S3 API operations in the - /// Amazon S3 User Guide.

      - ///

      If the object you request doesn't exist, the error that Amazon S3 returns - /// depends on whether you also have the s3:ListBucket - /// permission.

      - ///
        - ///
      • - ///

        If you have the s3:ListBucket permission on the - /// bucket, Amazon S3 returns an HTTP status code 404 Not Found - /// error.

        - ///
      • - ///
      • - ///

        If you don’t have the s3:ListBucket permission, Amazon S3 - /// returns an HTTP status code 403 Forbidden error.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///

      If you enable x-amz-checksum-mode in the request and the - /// object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must - /// also have the kms:GenerateDataKey and kms:Decrypt - /// permissions in IAM identity-based policies and KMS key policies for the - /// KMS key to retrieve the checksum of the object.

      - ///
    • - ///
    - ///
    - ///
    Encryption
    - ///
    - /// - ///

    Encryption request headers, like x-amz-server-side-encryption, - /// should not be sent for HEAD requests if your object uses - /// server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer - /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side - /// encryption with Amazon S3 managed encryption keys (SSE-S3). The - /// x-amz-server-side-encryption header is used when you - /// PUT an object to S3 and want to specify the encryption method. - /// If you include this header in a HEAD request for an object that - /// uses these types of keys, you’ll get an HTTP 400 Bad Request - /// error. It's because the encryption method can't be changed when you retrieve - /// the object.

    - ///
    - ///

    If you encrypt an object by using server-side encryption with customer-provided - /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve - /// the metadata from the object, you must use the following headers to provide the - /// encryption key for the server to be able to retrieve the object's metadata. The - /// headers are:

    - ///
      - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-algorithm - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key - ///

      - ///
    • - ///
    • - ///

      - /// x-amz-server-side-encryption-customer-key-MD5 - ///

      - ///
    • - ///
    - ///

    For more information about SSE-C, see Server-Side - /// Encryption (Using Customer-Provided Encryption Keys) in the - /// Amazon S3 User Guide.

    - /// - ///

    - /// Directory bucket - - /// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Versioning
    - ///
    - ///
      - ///
    • - ///

      If the current version of the object is a delete marker, Amazon S3 behaves as - /// if the object was deleted and includes x-amz-delete-marker: - /// true in the response.

      - ///
    • - ///
    • - ///

      If the specified version is a delete marker, the response returns a - /// 405 Method Not Allowed error and the Last-Modified: - /// timestamp response header.

      - ///
    • - ///
    - /// - ///
      - ///
    • - ///

      - /// Directory buckets - - /// Delete marker is not supported for directory buckets.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null - /// to the versionId query parameter in the request.

      - ///
    • - ///
    - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - /// - ///

    For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    - ///

    The following actions are related to HeadObject:

    - /// - async fn head_object(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "HeadObject is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Lists the analytics configurations for the bucket. You can have up to 1,000 analytics +/// configurations per bucket.

    +///

    This action supports list pagination and does not return more than 100 configurations at +/// a time. You should always check the IsTruncated element in the response. If +/// there are no more configurations to list, IsTruncated is set to false. If +/// there are more configurations to list, IsTruncated is set to true, and there +/// will be a value in NextContinuationToken. You use the +/// NextContinuationToken value to continue the pagination of the list by +/// passing the value in continuation-token in the request to GET the next +/// page.

    +///

    To use this operation, you must have permissions to perform the +/// s3:GetAnalyticsConfiguration action. The bucket owner has this permission +/// by default. The bucket owner can grant this permission to others. For more information +/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class +/// Analysis.

    +///

    The following operations are related to +/// ListBucketAnalyticsConfigurations:

    +/// +async fn list_bucket_analytics_configurations(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListBucketAnalyticsConfigurations is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Lists the analytics configurations for the bucket. You can have up to 1,000 analytics - /// configurations per bucket.

    - ///

    This action supports list pagination and does not return more than 100 configurations at - /// a time. You should always check the IsTruncated element in the response. If - /// there are no more configurations to list, IsTruncated is set to false. If - /// there are more configurations to list, IsTruncated is set to true, and there - /// will be a value in NextContinuationToken. You use the - /// NextContinuationToken value to continue the pagination of the list by - /// passing the value in continuation-token in the request to GET the next - /// page.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:GetAnalyticsConfiguration action. The bucket owner has this permission - /// by default. The bucket owner can grant this permission to others. For more information - /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class - /// Analysis.

    - ///

    The following operations are related to - /// ListBucketAnalyticsConfigurations:

    - /// - async fn list_bucket_analytics_configurations( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "ListBucketAnalyticsConfigurations is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Lists the S3 Intelligent-Tiering configuration from the specified bucket.

    +///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    +///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    +///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    +///

    Operations related to ListBucketIntelligentTieringConfigurations include:

    +/// +async fn list_bucket_intelligent_tiering_configurations(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListBucketIntelligentTieringConfigurations is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Lists the S3 Intelligent-Tiering configuration from the specified bucket.

    - ///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    - ///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    - ///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    - ///

    Operations related to ListBucketIntelligentTieringConfigurations include:

    - /// - async fn list_bucket_intelligent_tiering_configurations( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!( - NotImplemented, - "ListBucketIntelligentTieringConfigurations is not implemented yet" - )) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns a list of inventory configurations for the bucket. You can have up to 1,000 +/// analytics configurations per bucket.

    +///

    This action supports list pagination and does not return more than 100 configurations at +/// a time. Always check the IsTruncated element in the response. If there are no +/// more configurations to list, IsTruncated is set to false. If there are more +/// configurations to list, IsTruncated is set to true, and there is a value in +/// NextContinuationToken. You use the NextContinuationToken value +/// to continue the pagination of the list by passing the value in continuation-token in the +/// request to GET the next page.

    +///

    To use this operation, you must have permissions to perform the +/// s3:GetInventoryConfiguration action. The bucket owner has this permission +/// by default. The bucket owner can grant this permission to others. For more information +/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory +///

    +///

    The following operations are related to +/// ListBucketInventoryConfigurations:

    +/// +async fn list_bucket_inventory_configurations(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListBucketInventoryConfigurations is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns a list of inventory configurations for the bucket. You can have up to 1,000 - /// analytics configurations per bucket.

    - ///

    This action supports list pagination and does not return more than 100 configurations at - /// a time. Always check the IsTruncated element in the response. If there are no - /// more configurations to list, IsTruncated is set to false. If there are more - /// configurations to list, IsTruncated is set to true, and there is a value in - /// NextContinuationToken. You use the NextContinuationToken value - /// to continue the pagination of the list by passing the value in continuation-token in the - /// request to GET the next page.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:GetInventoryConfiguration action. The bucket owner has this permission - /// by default. The bucket owner can grant this permission to others. For more information - /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory - ///

    - ///

    The following operations are related to - /// ListBucketInventoryConfigurations:

    - /// - async fn list_bucket_inventory_configurations( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "ListBucketInventoryConfigurations is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Lists the metrics configurations for the bucket. The metrics configurations are only for +/// the request metrics of the bucket and do not provide information on daily storage metrics. +/// You can have up to 1,000 configurations per bucket.

    +///

    This action supports list pagination and does not return more than 100 configurations at +/// a time. Always check the IsTruncated element in the response. If there are no +/// more configurations to list, IsTruncated is set to false. If there are more +/// configurations to list, IsTruncated is set to true, and there is a value in +/// NextContinuationToken. You use the NextContinuationToken value +/// to continue the pagination of the list by passing the value in +/// continuation-token in the request to GET the next page.

    +///

    To use this operation, you must have permissions to perform the +/// s3:GetMetricsConfiguration action. The bucket owner has this permission by +/// default. The bucket owner can grant this permission to others. For more information about +/// permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For more information about metrics configurations and CloudWatch request metrics, see +/// Monitoring Metrics with Amazon CloudWatch.

    +///

    The following operations are related to +/// ListBucketMetricsConfigurations:

    +/// +async fn list_bucket_metrics_configurations(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListBucketMetricsConfigurations is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Lists the metrics configurations for the bucket. The metrics configurations are only for - /// the request metrics of the bucket and do not provide information on daily storage metrics. - /// You can have up to 1,000 configurations per bucket.

    - ///

    This action supports list pagination and does not return more than 100 configurations at - /// a time. Always check the IsTruncated element in the response. If there are no - /// more configurations to list, IsTruncated is set to false. If there are more - /// configurations to list, IsTruncated is set to true, and there is a value in - /// NextContinuationToken. You use the NextContinuationToken value - /// to continue the pagination of the list by passing the value in - /// continuation-token in the request to GET the next page.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:GetMetricsConfiguration action. The bucket owner has this permission by - /// default. The bucket owner can grant this permission to others. For more information about - /// permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For more information about metrics configurations and CloudWatch request metrics, see - /// Monitoring Metrics with Amazon CloudWatch.

    - ///

    The following operations are related to - /// ListBucketMetricsConfigurations:

    - /// - async fn list_bucket_metrics_configurations( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "ListBucketMetricsConfigurations is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns a list of all buckets owned by the authenticated sender of the request. To grant IAM permission to use +/// this operation, you must add the s3:ListAllMyBuckets policy action.

    +///

    For information about Amazon S3 buckets, see Creating, configuring, and +/// working with Amazon S3 buckets.

    +/// +///

    We strongly recommend using only paginated ListBuckets requests. Unpaginated ListBuckets requests are only supported for +/// Amazon Web Services accounts set to the default general purpose bucket quota of 10,000. If you have an approved +/// general purpose bucket quota above 10,000, you must send paginated ListBuckets requests to list your account’s buckets. +/// All unpaginated ListBuckets requests will be rejected for Amazon Web Services accounts with a general purpose bucket quota +/// greater than 10,000.

    +///
    +async fn list_buckets(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListBuckets is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns a list of all buckets owned by the authenticated sender of the request. To grant IAM permission to use - /// this operation, you must add the s3:ListAllMyBuckets policy action.

    - ///

    For information about Amazon S3 buckets, see Creating, configuring, and - /// working with Amazon S3 buckets.

    - /// - ///

    We strongly recommend using only paginated ListBuckets requests. Unpaginated ListBuckets requests are only supported for - /// Amazon Web Services accounts set to the default general purpose bucket quota of 10,000. If you have an approved - /// general purpose bucket quota above 10,000, you must send paginated ListBuckets requests to list your account’s buckets. - /// All unpaginated ListBuckets requests will be rejected for Amazon Web Services accounts with a general purpose bucket quota - /// greater than 10,000.

    - ///
    - async fn list_buckets(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "ListBuckets is not implemented yet")) - } +///

    Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the +/// request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

    +/// +///

    +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///

    You must have the s3express:ListAllMyDirectoryBuckets permission +/// in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host +/// header syntax is +/// s3express-control.region.amazonaws.com.

    +///
    +///
    +/// +///

    The BucketRegion response element is not part of the +/// ListDirectoryBuckets Response Syntax.

    +///
    +async fn list_directory_buckets(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListDirectoryBuckets is not implemented yet")) +} - ///

    Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the - /// request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

    - /// - ///

    - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///

    You must have the s3express:ListAllMyDirectoryBuckets permission - /// in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host - /// header syntax is - /// s3express-control.region.amazonaws.com.

    - ///
    - ///
    - /// - ///

    The BucketRegion response element is not part of the - /// ListDirectoryBuckets Response Syntax.

    - ///
    - async fn list_directory_buckets( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "ListDirectoryBuckets is not implemented yet")) - } +///

    This operation lists in-progress multipart uploads in a bucket. An in-progress multipart +/// upload is a multipart upload that has been initiated by the +/// CreateMultipartUpload request, but has not yet been completed or +/// aborted.

    +/// +///

    +/// Directory buckets - If multipart uploads in +/// a directory bucket are in progress, you can't delete the bucket until all the +/// in-progress multipart uploads are aborted or completed. To delete these in-progress +/// multipart uploads, use the ListMultipartUploads operation to list the +/// in-progress multipart uploads in the bucket and use the +/// AbortMultipartUpload operation to abort all the in-progress multipart +/// uploads.

    +///
    +///

    The ListMultipartUploads operation returns a maximum of 1,000 multipart +/// uploads in the response. The limit of 1,000 multipart uploads is also the default value. +/// You can further limit the number of uploads in a response by specifying the +/// max-uploads request parameter. If there are more than 1,000 multipart +/// uploads that satisfy your ListMultipartUploads request, the response returns +/// an IsTruncated element with the value of true, a +/// NextKeyMarker element, and a NextUploadIdMarker element. To +/// list the remaining multipart uploads, you need to make subsequent +/// ListMultipartUploads requests. In these requests, include two query +/// parameters: key-marker and upload-id-marker. Set the value of +/// key-marker to the NextKeyMarker value from the previous +/// response. Similarly, set the value of upload-id-marker to the +/// NextUploadIdMarker value from the previous response.

    +/// +///

    +/// Directory buckets - The +/// upload-id-marker element and the NextUploadIdMarker element +/// aren't supported by directory buckets. To list the additional multipart uploads, you +/// only need to set the value of key-marker to the NextKeyMarker +/// value from the previous response.

    +///
    +///

    For more information about multipart uploads, see Uploading Objects Using Multipart +/// Upload in the Amazon S3 User Guide.

    +/// +///

    +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - For +/// information about permissions required to use the multipart upload API, see +/// Multipart Upload and +/// Permissions in the Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///
    • +///
    +///
    +///
    Sorting of multipart uploads in response
    +///
    +///
      +///
    • +///

      +/// General purpose bucket - In the +/// ListMultipartUploads response, the multipart uploads are +/// sorted based on two criteria:

      +///
        +///
      • +///

        Key-based sorting - Multipart uploads are initially sorted +/// in ascending order based on their object keys.

        +///
      • +///
      • +///

        Time-based sorting - For uploads that share the same object +/// key, they are further sorted in ascending order based on the upload +/// initiation time. Among uploads with the same key, the one that was +/// initiated first will appear before the ones that were initiated +/// later.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket - In the +/// ListMultipartUploads response, the multipart uploads aren't +/// sorted lexicographically based on the object keys. +/// +///

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to ListMultipartUploads:

    +/// +async fn list_multipart_uploads(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListMultipartUploads is not implemented yet")) +} - ///

    This operation lists in-progress multipart uploads in a bucket. An in-progress multipart - /// upload is a multipart upload that has been initiated by the - /// CreateMultipartUpload request, but has not yet been completed or - /// aborted.

    - /// - ///

    - /// Directory buckets - If multipart uploads in - /// a directory bucket are in progress, you can't delete the bucket until all the - /// in-progress multipart uploads are aborted or completed. To delete these in-progress - /// multipart uploads, use the ListMultipartUploads operation to list the - /// in-progress multipart uploads in the bucket and use the - /// AbortMultipartUpload operation to abort all the in-progress multipart - /// uploads.

    - ///
    - ///

    The ListMultipartUploads operation returns a maximum of 1,000 multipart - /// uploads in the response. The limit of 1,000 multipart uploads is also the default value. - /// You can further limit the number of uploads in a response by specifying the - /// max-uploads request parameter. If there are more than 1,000 multipart - /// uploads that satisfy your ListMultipartUploads request, the response returns - /// an IsTruncated element with the value of true, a - /// NextKeyMarker element, and a NextUploadIdMarker element. To - /// list the remaining multipart uploads, you need to make subsequent - /// ListMultipartUploads requests. In these requests, include two query - /// parameters: key-marker and upload-id-marker. Set the value of - /// key-marker to the NextKeyMarker value from the previous - /// response. Similarly, set the value of upload-id-marker to the - /// NextUploadIdMarker value from the previous response.

    - /// - ///

    - /// Directory buckets - The - /// upload-id-marker element and the NextUploadIdMarker element - /// aren't supported by directory buckets. To list the additional multipart uploads, you - /// only need to set the value of key-marker to the NextKeyMarker - /// value from the previous response.

    - ///
    - ///

    For more information about multipart uploads, see Uploading Objects Using Multipart - /// Upload in the Amazon S3 User Guide.

    - /// - ///

    - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - For - /// information about permissions required to use the multipart upload API, see - /// Multipart Upload and - /// Permissions in the Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///
    • - ///
    - ///
    - ///
    Sorting of multipart uploads in response
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket - In the - /// ListMultipartUploads response, the multipart uploads are - /// sorted based on two criteria:

      - ///
        - ///
      • - ///

        Key-based sorting - Multipart uploads are initially sorted - /// in ascending order based on their object keys.

        - ///
      • - ///
      • - ///

        Time-based sorting - For uploads that share the same object - /// key, they are further sorted in ascending order based on the upload - /// initiation time. Among uploads with the same key, the one that was - /// initiated first will appear before the ones that were initiated - /// later.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket - In the - /// ListMultipartUploads response, the multipart uploads aren't - /// sorted lexicographically based on the object keys. - /// - ///

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to ListMultipartUploads:

    - /// - async fn list_multipart_uploads( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "ListMultipartUploads is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns metadata about all versions of the objects in a bucket. You can also use request +/// parameters as selection criteria to return metadata about a subset of all the object +/// versions.

    +/// +///

    To use this operation, you must have permission to perform the +/// s3:ListBucketVersions action. Be aware of the name difference.

    +///
    +/// +///

    A 200 OK response can contain valid or invalid XML. Make sure to design +/// your application to parse the contents of the response and handle it +/// appropriately.

    +///
    +///

    To use this operation, you must have READ access to the bucket.

    +///

    The following operations are related to ListObjectVersions:

    +/// +async fn list_object_versions(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListObjectVersions is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns metadata about all versions of the objects in a bucket. You can also use request - /// parameters as selection criteria to return metadata about a subset of all the object - /// versions.

    - /// - ///

    To use this operation, you must have permission to perform the - /// s3:ListBucketVersions action. Be aware of the name difference.

    - ///
    - /// - ///

    A 200 OK response can contain valid or invalid XML. Make sure to design - /// your application to parse the contents of the response and handle it - /// appropriately.

    - ///
    - ///

    To use this operation, you must have READ access to the bucket.

    - ///

    The following operations are related to ListObjectVersions:

    - /// - async fn list_object_versions( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "ListObjectVersions is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Returns some or all (up to 1,000) of the objects in a bucket. You can use the request +/// parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK +/// response can contain valid or invalid XML. Be sure to design your application to parse the +/// contents of the response and handle it appropriately.

    +/// +///

    This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility, +/// Amazon S3 continues to support ListObjects.

    +///
    +///

    The following operations are related to ListObjects:

    +/// +async fn list_objects(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListObjects is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Returns some or all (up to 1,000) of the objects in a bucket. You can use the request - /// parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK - /// response can contain valid or invalid XML. Be sure to design your application to parse the - /// contents of the response and handle it appropriately.

    - /// - ///

    This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility, - /// Amazon S3 continues to support ListObjects.

    - ///
    - ///

    The following operations are related to ListObjects:

    - /// - async fn list_objects(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "ListObjects is not implemented yet")) - } +///

    Returns some or all (up to 1,000) of the objects in a bucket with each request. You can +/// use the request parameters as selection criteria to return a subset of the objects in a +/// bucket. A 200 OK response can contain valid or invalid XML. Make sure to +/// design your application to parse the contents of the response and handle it appropriately. +/// For more information about listing objects, see Listing object keys +/// programmatically in the Amazon S3 User Guide. To get a list of +/// your buckets, see ListBuckets.

    +/// +///
      +///
    • +///

      +/// General purpose bucket - For general purpose buckets, +/// ListObjectsV2 doesn't return prefixes that are related only to +/// in-progress multipart uploads.

      +///
    • +///
    • +///

      +/// Directory buckets - For +/// directory buckets, ListObjectsV2 response includes the prefixes that +/// are related only to in-progress multipart uploads.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - To +/// use this operation, you must have READ access to the bucket. You must have +/// permission to perform the s3:ListBucket action. The bucket +/// owner has this permission by default and can grant this permission to +/// others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access +/// Permissions to Your Amazon S3 Resources in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///
    • +///
    +///
    +///
    Sorting order of returned objects
    +///
    +///
      +///
    • +///

      +/// General purpose bucket - For +/// general purpose buckets, ListObjectsV2 returns objects in +/// lexicographical order based on their key names.

      +///
    • +///
    • +///

      +/// Directory bucket - For +/// directory buckets, ListObjectsV2 does not return objects in +/// lexicographical order.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +/// +///

    This section describes the latest revision of this action. We recommend that you use +/// this revised API operation for application development. For backward compatibility, Amazon S3 +/// continues to support the prior version of this API operation, ListObjects.

    +///
    +///

    The following operations are related to ListObjectsV2:

    +/// +async fn list_objects_v2(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListObjectsV2 is not implemented yet")) +} - ///

    Returns some or all (up to 1,000) of the objects in a bucket with each request. You can - /// use the request parameters as selection criteria to return a subset of the objects in a - /// bucket. A 200 OK response can contain valid or invalid XML. Make sure to - /// design your application to parse the contents of the response and handle it appropriately. - /// For more information about listing objects, see Listing object keys - /// programmatically in the Amazon S3 User Guide. To get a list of - /// your buckets, see ListBuckets.

    - /// - ///
      - ///
    • - ///

      - /// General purpose bucket - For general purpose buckets, - /// ListObjectsV2 doesn't return prefixes that are related only to - /// in-progress multipart uploads.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - For - /// directory buckets, ListObjectsV2 response includes the prefixes that - /// are related only to in-progress multipart uploads.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - To - /// use this operation, you must have READ access to the bucket. You must have - /// permission to perform the s3:ListBucket action. The bucket - /// owner has this permission by default and can grant this permission to - /// others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access - /// Permissions to Your Amazon S3 Resources in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///
    • - ///
    - ///
    - ///
    Sorting order of returned objects
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket - For - /// general purpose buckets, ListObjectsV2 returns objects in - /// lexicographical order based on their key names.

      - ///
    • - ///
    • - ///

      - /// Directory bucket - For - /// directory buckets, ListObjectsV2 does not return objects in - /// lexicographical order.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - /// - ///

    This section describes the latest revision of this action. We recommend that you use - /// this revised API operation for application development. For backward compatibility, Amazon S3 - /// continues to support the prior version of this API operation, ListObjects.

    - ///
    - ///

    The following operations are related to ListObjectsV2:

    - /// - async fn list_objects_v2(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "ListObjectsV2 is not implemented yet")) - } +///

    Lists the parts that have been uploaded for a specific multipart upload.

    +///

    To use this operation, you must provide the upload ID in the request. You +/// obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

    +///

    The ListParts request returns a maximum of 1,000 uploaded parts. The limit +/// of 1,000 parts is also the default value. You can restrict the number of parts in a +/// response by specifying the max-parts request parameter. If your multipart +/// upload consists of more than 1,000 parts, the response returns an IsTruncated +/// field with the value of true, and a NextPartNumberMarker element. +/// To list remaining uploaded parts, in subsequent ListParts requests, include +/// the part-number-marker query string parameter and set its value to the +/// NextPartNumberMarker field value from the previous response.

    +///

    For more information on multipart uploads, see Uploading Objects Using Multipart +/// Upload in the Amazon S3 User Guide.

    +/// +///

    +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - For +/// information about permissions required to use the multipart upload API, see +/// Multipart Upload and +/// Permissions in the Amazon S3 User Guide.

      +///

      If the upload was created using server-side encryption with Key Management Service +/// (KMS) keys (SSE-KMS) or dual-layer server-side encryption with +/// Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the +/// kms:Decrypt action for the ListParts request to +/// succeed.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to ListParts:

    +/// +async fn list_parts(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "ListParts is not implemented yet")) +} - ///

    Lists the parts that have been uploaded for a specific multipart upload.

    - ///

    To use this operation, you must provide the upload ID in the request. You - /// obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

    - ///

    The ListParts request returns a maximum of 1,000 uploaded parts. The limit - /// of 1,000 parts is also the default value. You can restrict the number of parts in a - /// response by specifying the max-parts request parameter. If your multipart - /// upload consists of more than 1,000 parts, the response returns an IsTruncated - /// field with the value of true, and a NextPartNumberMarker element. - /// To list remaining uploaded parts, in subsequent ListParts requests, include - /// the part-number-marker query string parameter and set its value to the - /// NextPartNumberMarker field value from the previous response.

    - ///

    For more information on multipart uploads, see Uploading Objects Using Multipart - /// Upload in the Amazon S3 User Guide.

    - /// - ///

    - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - For - /// information about permissions required to use the multipart upload API, see - /// Multipart Upload and - /// Permissions in the Amazon S3 User Guide.

      - ///

      If the upload was created using server-side encryption with Key Management Service - /// (KMS) keys (SSE-KMS) or dual-layer server-side encryption with - /// Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the - /// kms:Decrypt action for the ListParts request to - /// succeed.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to ListParts:

    - /// - async fn list_parts(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "ListParts is not implemented yet")) - } +/// POST Object (multipart form upload) +/// +/// This is a synthetic method separated from `PutObject` so implementations can distinguish +/// POST vs PUT. By default it delegates to [`S3::put_object`] to keep behavior identical. +async fn post_object(&self, req: S3Request) -> S3Result> { +let resp = self.put_object(req.map_input(crate::dto::post_object_input_into_put_object_input)).await?; +Ok(resp.map_output(crate::dto::put_object_output_into_post_object_output)) +} - /// POST Object (multipart form upload) - /// - /// This is a synthetic method separated from `PutObject` so implementations can distinguish - /// POST vs PUT. By default it delegates to [`S3::put_object`] to keep behavior identical. - async fn post_object(&self, req: S3Request) -> S3Result> { - let resp = self - .put_object(req.map_input(crate::dto::post_object_input_into_put_object_input)) - .await?; - Ok(resp.map_output(crate::dto::put_object_output_into_post_object_output)) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a +/// bucket-level feature that enables you to perform faster data transfers to Amazon S3.

    +///

    To use this operation, you must have permission to perform the +/// s3:PutAccelerateConfiguration action. The bucket owner has this permission +/// by default. The bucket owner can grant this permission to others. For more information +/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    The Transfer Acceleration state of a bucket can be set to one of the following two +/// values:

    +///
      +///
    • +///

      Enabled – Enables accelerated data transfers to the bucket.

      +///
    • +///
    • +///

      Suspended – Disables accelerated data transfers to the bucket.

      +///
    • +///
    +///

    The GetBucketAccelerateConfiguration action returns the transfer acceleration state +/// of a bucket.

    +///

    After setting the Transfer Acceleration state of a bucket to Enabled, it might take up +/// to thirty minutes before the data transfer rates to the bucket increase.

    +///

    The name of the bucket used for Transfer Acceleration must be DNS-compliant and must +/// not contain periods (".").

    +///

    For more information about transfer acceleration, see Transfer +/// Acceleration.

    +///

    The following operations are related to +/// PutBucketAccelerateConfiguration:

    +/// +async fn put_bucket_accelerate_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketAccelerateConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a - /// bucket-level feature that enables you to perform faster data transfers to Amazon S3.

    - ///

    To use this operation, you must have permission to perform the - /// s3:PutAccelerateConfiguration action. The bucket owner has this permission - /// by default. The bucket owner can grant this permission to others. For more information - /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    The Transfer Acceleration state of a bucket can be set to one of the following two - /// values:

    - ///
      - ///
    • - ///

      Enabled – Enables accelerated data transfers to the bucket.

      - ///
    • - ///
    • - ///

      Suspended – Disables accelerated data transfers to the bucket.

      - ///
    • - ///
    - ///

    The GetBucketAccelerateConfiguration action returns the transfer acceleration state - /// of a bucket.

    - ///

    After setting the Transfer Acceleration state of a bucket to Enabled, it might take up - /// to thirty minutes before the data transfer rates to the bucket increase.

    - ///

    The name of the bucket used for Transfer Acceleration must be DNS-compliant and must - /// not contain periods (".").

    - ///

    For more information about transfer acceleration, see Transfer - /// Acceleration.

    - ///

    The following operations are related to - /// PutBucketAccelerateConfiguration:

    - /// - async fn put_bucket_accelerate_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketAccelerateConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets the permissions on an existing bucket using access control lists (ACL). For more +/// information, see Using ACLs. To set the ACL of a +/// bucket, you must have the WRITE_ACP permission.

    +///

    You can use one of the following two ways to set a bucket's permissions:

    +///
      +///
    • +///

      Specify the ACL in the request body

      +///
    • +///
    • +///

      Specify permissions using request headers

      +///
    • +///
    +/// +///

    You cannot specify access permission using both the body and the request +/// headers.

    +///
    +///

    Depending on your application needs, you may choose to set the ACL on a bucket using +/// either the request body or the headers. For example, if you have an existing application +/// that updates a bucket ACL using the request body, then you can continue to use that +/// approach.

    +/// +///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs +/// are disabled and no longer affect permissions. You must use policies to grant access to +/// your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return +/// the AccessControlListNotSupported error code. Requests to read ACLs are +/// still supported. For more information, see Controlling object +/// ownership in the Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///

    You can set access permissions by using one of the following methods:

    +///
      +///
    • +///

      Specify a canned ACL with the x-amz-acl request header. Amazon S3 +/// supports a set of predefined ACLs, known as canned +/// ACLs. Each canned ACL has a predefined set of grantees and +/// permissions. Specify the canned ACL name as the value of +/// x-amz-acl. If you use this header, you cannot use other +/// access control-specific headers in your request. For more information, see +/// Canned +/// ACL.

      +///
    • +///
    • +///

      Specify access permissions explicitly with the +/// x-amz-grant-read, x-amz-grant-read-acp, +/// x-amz-grant-write-acp, and +/// x-amz-grant-full-control headers. When using these headers, +/// you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 +/// groups) who will receive the permission. If you use these ACL-specific +/// headers, you cannot use the x-amz-acl header to set a canned +/// ACL. These parameters map to the set of permissions that Amazon S3 supports in an +/// ACL. For more information, see Access Control List (ACL) +/// Overview.

      +///

      You specify each grantee as a type=value pair, where the type is one of +/// the following:

      +///
        +///
      • +///

        +/// id – if the value specified is the canonical user ID +/// of an Amazon Web Services account

        +///
      • +///
      • +///

        +/// uri – if you are granting permissions to a predefined +/// group

        +///
      • +///
      • +///

        +/// emailAddress – if the value specified is the email +/// address of an Amazon Web Services account

        +/// +///

        Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

        +///
          +///
        • +///

          US East (N. Virginia)

          +///
        • +///
        • +///

          US West (N. California)

          +///
        • +///
        • +///

          US West (Oregon)

          +///
        • +///
        • +///

          Asia Pacific (Singapore)

          +///
        • +///
        • +///

          Asia Pacific (Sydney)

          +///
        • +///
        • +///

          Asia Pacific (Tokyo)

          +///
        • +///
        • +///

          Europe (Ireland)

          +///
        • +///
        • +///

          South America (São Paulo)

          +///
        • +///
        +///

        For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

        +///
        +///
      • +///
      +///

      For example, the following x-amz-grant-write header grants +/// create, overwrite, and delete objects permission to LogDelivery group +/// predefined by Amazon S3 and two Amazon Web Services accounts identified by their email +/// addresses.

      +///

      +/// x-amz-grant-write: +/// uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", +/// id="555566667777" +///

      +///
    • +///
    +///

    You can use either a canned ACL or specify access permissions explicitly. You +/// cannot do both.

    +///
    +///
    Grantee Values
    +///
    +///

    You can specify the person (grantee) to whom you're assigning access rights +/// (using request elements) in the following ways:

    +///
      +///
    • +///

      By the person's ID:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> +/// </Grantee> +///

      +///

      DisplayName is optional and ignored in the request

      +///
    • +///
    • +///

      By URI:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> +///

      +///
    • +///
    • +///

      By Email address:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<>&</Grantee> +///

      +///

      The grantee is resolved to the CanonicalUser and, in a response to a GET +/// Object acl request, appears as the CanonicalUser.

      +/// +///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      +///
        +///
      • +///

        US East (N. Virginia)

        +///
      • +///
      • +///

        US West (N. California)

        +///
      • +///
      • +///

        US West (Oregon)

        +///
      • +///
      • +///

        Asia Pacific (Singapore)

        +///
      • +///
      • +///

        Asia Pacific (Sydney)

        +///
      • +///
      • +///

        Asia Pacific (Tokyo)

        +///
      • +///
      • +///

        Europe (Ireland)

        +///
      • +///
      • +///

        South America (São Paulo)

        +///
      • +///
      +///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      +///
      +///
    • +///
    +///
    +///
    +///

    The following operations are related to PutBucketAcl:

    +/// +async fn put_bucket_acl(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketAcl is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets the permissions on an existing bucket using access control lists (ACL). For more - /// information, see Using ACLs. To set the ACL of a - /// bucket, you must have the WRITE_ACP permission.

    - ///

    You can use one of the following two ways to set a bucket's permissions:

    - ///
      - ///
    • - ///

      Specify the ACL in the request body

      - ///
    • - ///
    • - ///

      Specify permissions using request headers

      - ///
    • - ///
    - /// - ///

    You cannot specify access permission using both the body and the request - /// headers.

    - ///
    - ///

    Depending on your application needs, you may choose to set the ACL on a bucket using - /// either the request body or the headers. For example, if you have an existing application - /// that updates a bucket ACL using the request body, then you can continue to use that - /// approach.

    - /// - ///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs - /// are disabled and no longer affect permissions. You must use policies to grant access to - /// your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return - /// the AccessControlListNotSupported error code. Requests to read ACLs are - /// still supported. For more information, see Controlling object - /// ownership in the Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///

    You can set access permissions by using one of the following methods:

    - ///
      - ///
    • - ///

      Specify a canned ACL with the x-amz-acl request header. Amazon S3 - /// supports a set of predefined ACLs, known as canned - /// ACLs. Each canned ACL has a predefined set of grantees and - /// permissions. Specify the canned ACL name as the value of - /// x-amz-acl. If you use this header, you cannot use other - /// access control-specific headers in your request. For more information, see - /// Canned - /// ACL.

      - ///
    • - ///
    • - ///

      Specify access permissions explicitly with the - /// x-amz-grant-read, x-amz-grant-read-acp, - /// x-amz-grant-write-acp, and - /// x-amz-grant-full-control headers. When using these headers, - /// you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 - /// groups) who will receive the permission. If you use these ACL-specific - /// headers, you cannot use the x-amz-acl header to set a canned - /// ACL. These parameters map to the set of permissions that Amazon S3 supports in an - /// ACL. For more information, see Access Control List (ACL) - /// Overview.

      - ///

      You specify each grantee as a type=value pair, where the type is one of - /// the following:

      - ///
        - ///
      • - ///

        - /// id – if the value specified is the canonical user ID - /// of an Amazon Web Services account

        - ///
      • - ///
      • - ///

        - /// uri – if you are granting permissions to a predefined - /// group

        - ///
      • - ///
      • - ///

        - /// emailAddress – if the value specified is the email - /// address of an Amazon Web Services account

        - /// - ///

        Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

        - ///
          - ///
        • - ///

          US East (N. Virginia)

          - ///
        • - ///
        • - ///

          US West (N. California)

          - ///
        • - ///
        • - ///

          US West (Oregon)

          - ///
        • - ///
        • - ///

          Asia Pacific (Singapore)

          - ///
        • - ///
        • - ///

          Asia Pacific (Sydney)

          - ///
        • - ///
        • - ///

          Asia Pacific (Tokyo)

          - ///
        • - ///
        • - ///

          Europe (Ireland)

          - ///
        • - ///
        • - ///

          South America (São Paulo)

          - ///
        • - ///
        - ///

        For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

        - ///
        - ///
      • - ///
      - ///

      For example, the following x-amz-grant-write header grants - /// create, overwrite, and delete objects permission to LogDelivery group - /// predefined by Amazon S3 and two Amazon Web Services accounts identified by their email - /// addresses.

      - ///

      - /// x-amz-grant-write: - /// uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", - /// id="555566667777" - ///

      - ///
    • - ///
    - ///

    You can use either a canned ACL or specify access permissions explicitly. You - /// cannot do both.

    - ///
    - ///
    Grantee Values
    - ///
    - ///

    You can specify the person (grantee) to whom you're assigning access rights - /// (using request elements) in the following ways:

    - ///
      - ///
    • - ///

      By the person's ID:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> - /// </Grantee> - ///

      - ///

      DisplayName is optional and ignored in the request

      - ///
    • - ///
    • - ///

      By URI:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> - ///

      - ///
    • - ///
    • - ///

      By Email address:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<>&</Grantee> - ///

      - ///

      The grantee is resolved to the CanonicalUser and, in a response to a GET - /// Object acl request, appears as the CanonicalUser.

      - /// - ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      - ///
        - ///
      • - ///

        US East (N. Virginia)

        - ///
      • - ///
      • - ///

        US West (N. California)

        - ///
      • - ///
      • - ///

        US West (Oregon)

        - ///
      • - ///
      • - ///

        Asia Pacific (Singapore)

        - ///
      • - ///
      • - ///

        Asia Pacific (Sydney)

        - ///
      • - ///
      • - ///

        Asia Pacific (Tokyo)

        - ///
      • - ///
      • - ///

        Europe (Ireland)

        - ///
      • - ///
      • - ///

        South America (São Paulo)

        - ///
      • - ///
      - ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      - ///
      - ///
    • - ///
    - ///
    - ///
    - ///

    The following operations are related to PutBucketAcl:

    - /// - async fn put_bucket_acl(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketAcl is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets an analytics configuration for the bucket (specified by the analytics configuration +/// ID). You can have up to 1,000 analytics configurations per bucket.

    +///

    You can choose to have storage class analysis export analysis reports sent to a +/// comma-separated values (CSV) flat file. See the DataExport request element. +/// Reports are updated daily and are based on the object filters that you configure. When +/// selecting data export, you specify a destination bucket and an optional destination prefix +/// where the file is written. You can export the data to a destination bucket in a different +/// account. However, the destination bucket must be in the same Region as the bucket that you +/// are making the PUT analytics configuration to. For more information, see Amazon S3 +/// Analytics – Storage Class Analysis.

    +/// +///

    You must create a bucket policy on the destination bucket where the exported file is +/// written to grant permissions to Amazon S3 to write objects to the bucket. For an example +/// policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

    +///
    +///

    To use this operation, you must have permissions to perform the +/// s3:PutAnalyticsConfiguration action. The bucket owner has this permission +/// by default. The bucket owner can grant this permission to others. For more information +/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    +/// PutBucketAnalyticsConfiguration has the following special errors:

    +///
      +///
    • +///
        +///
      • +///

        +/// HTTP Error: HTTP 400 Bad Request +///

        +///
      • +///
      • +///

        +/// Code: InvalidArgument +///

        +///
      • +///
      • +///

        +/// Cause: Invalid argument. +///

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// HTTP Error: HTTP 400 Bad Request +///

        +///
      • +///
      • +///

        +/// Code: TooManyConfigurations +///

        +///
      • +///
      • +///

        +/// Cause: You are attempting to create a new configuration but have +/// already reached the 1,000-configuration limit. +///

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// HTTP Error: HTTP 403 Forbidden +///

        +///
      • +///
      • +///

        +/// Code: AccessDenied +///

        +///
      • +///
      • +///

        +/// Cause: You are not the owner of the specified bucket, or you do +/// not have the s3:PutAnalyticsConfiguration bucket permission to set the +/// configuration on the bucket. +///

        +///
      • +///
      +///
    • +///
    +///

    The following operations are related to +/// PutBucketAnalyticsConfiguration:

    +/// +async fn put_bucket_analytics_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketAnalyticsConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets an analytics configuration for the bucket (specified by the analytics configuration - /// ID). You can have up to 1,000 analytics configurations per bucket.

    - ///

    You can choose to have storage class analysis export analysis reports sent to a - /// comma-separated values (CSV) flat file. See the DataExport request element. - /// Reports are updated daily and are based on the object filters that you configure. When - /// selecting data export, you specify a destination bucket and an optional destination prefix - /// where the file is written. You can export the data to a destination bucket in a different - /// account. However, the destination bucket must be in the same Region as the bucket that you - /// are making the PUT analytics configuration to. For more information, see Amazon S3 - /// Analytics – Storage Class Analysis.

    - /// - ///

    You must create a bucket policy on the destination bucket where the exported file is - /// written to grant permissions to Amazon S3 to write objects to the bucket. For an example - /// policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

    - ///
    - ///

    To use this operation, you must have permissions to perform the - /// s3:PutAnalyticsConfiguration action. The bucket owner has this permission - /// by default. The bucket owner can grant this permission to others. For more information - /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    - /// PutBucketAnalyticsConfiguration has the following special errors:

    - ///
      - ///
    • - ///
        - ///
      • - ///

        - /// HTTP Error: HTTP 400 Bad Request - ///

        - ///
      • - ///
      • - ///

        - /// Code: InvalidArgument - ///

        - ///
      • - ///
      • - ///

        - /// Cause: Invalid argument. - ///

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// HTTP Error: HTTP 400 Bad Request - ///

        - ///
      • - ///
      • - ///

        - /// Code: TooManyConfigurations - ///

        - ///
      • - ///
      • - ///

        - /// Cause: You are attempting to create a new configuration but have - /// already reached the 1,000-configuration limit. - ///

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// HTTP Error: HTTP 403 Forbidden - ///

        - ///
      • - ///
      • - ///

        - /// Code: AccessDenied - ///

        - ///
      • - ///
      • - ///

        - /// Cause: You are not the owner of the specified bucket, or you do - /// not have the s3:PutAnalyticsConfiguration bucket permission to set the - /// configuration on the bucket. - ///

        - ///
      • - ///
      - ///
    • - ///
    - ///

    The following operations are related to - /// PutBucketAnalyticsConfiguration:

    - /// - async fn put_bucket_analytics_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketAnalyticsConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets the cors configuration for your bucket. If the configuration exists, +/// Amazon S3 replaces it.

    +///

    To use this operation, you must be allowed to perform the s3:PutBucketCORS +/// action. By default, the bucket owner has this permission and can grant it to others.

    +///

    You set this configuration on a bucket so that the bucket can service cross-origin +/// requests. For example, you might want to enable a request whose origin is +/// http://www.example.com to access your Amazon S3 bucket at +/// my.example.bucket.com by using the browser's XMLHttpRequest +/// capability.

    +///

    To enable cross-origin resource sharing (CORS) on a bucket, you add the +/// cors subresource to the bucket. The cors subresource is an XML +/// document in which you configure rules that identify origins and the HTTP methods that can +/// be executed on your bucket. The document is limited to 64 KB in size.

    +///

    When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a +/// bucket, it evaluates the cors configuration on the bucket and uses the first +/// CORSRule rule that matches the incoming browser request to enable a +/// cross-origin request. For a rule to match, the following conditions must be met:

    +///
      +///
    • +///

      The request's Origin header must match AllowedOrigin +/// elements.

      +///
    • +///
    • +///

      The request method (for example, GET, PUT, HEAD, and so on) or the +/// Access-Control-Request-Method header in case of a pre-flight +/// OPTIONS request must be one of the AllowedMethod +/// elements.

      +///
    • +///
    • +///

      Every header specified in the Access-Control-Request-Headers request +/// header of a pre-flight request must match an AllowedHeader element. +///

      +///
    • +///
    +///

    For more information about CORS, go to Enabling Cross-Origin Resource Sharing in +/// the Amazon S3 User Guide.

    +///

    The following operations are related to PutBucketCors:

    +/// +async fn put_bucket_cors(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketCors is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets the cors configuration for your bucket. If the configuration exists, - /// Amazon S3 replaces it.

    - ///

    To use this operation, you must be allowed to perform the s3:PutBucketCORS - /// action. By default, the bucket owner has this permission and can grant it to others.

    - ///

    You set this configuration on a bucket so that the bucket can service cross-origin - /// requests. For example, you might want to enable a request whose origin is - /// http://www.example.com to access your Amazon S3 bucket at - /// my.example.bucket.com by using the browser's XMLHttpRequest - /// capability.

    - ///

    To enable cross-origin resource sharing (CORS) on a bucket, you add the - /// cors subresource to the bucket. The cors subresource is an XML - /// document in which you configure rules that identify origins and the HTTP methods that can - /// be executed on your bucket. The document is limited to 64 KB in size.

    - ///

    When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a - /// bucket, it evaluates the cors configuration on the bucket and uses the first - /// CORSRule rule that matches the incoming browser request to enable a - /// cross-origin request. For a rule to match, the following conditions must be met:

    - ///
      - ///
    • - ///

      The request's Origin header must match AllowedOrigin - /// elements.

      - ///
    • - ///
    • - ///

      The request method (for example, GET, PUT, HEAD, and so on) or the - /// Access-Control-Request-Method header in case of a pre-flight - /// OPTIONS request must be one of the AllowedMethod - /// elements.

      - ///
    • - ///
    • - ///

      Every header specified in the Access-Control-Request-Headers request - /// header of a pre-flight request must match an AllowedHeader element. - ///

      - ///
    • - ///
    - ///

    For more information about CORS, go to Enabling Cross-Origin Resource Sharing in - /// the Amazon S3 User Guide.

    - ///

    The following operations are related to PutBucketCors:

    - /// - async fn put_bucket_cors(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketCors is not implemented yet")) - } +///

    This operation configures default encryption and Amazon S3 Bucket Keys for an existing +/// bucket.

    +/// +///

    +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///

    By default, all buckets have a default encryption configuration that uses server-side +/// encryption with Amazon S3 managed keys (SSE-S3).

    +/// +///
      +///
    • +///

      +/// General purpose buckets +///

      +///
        +///
      • +///

        You can optionally configure default encryption for a bucket by using +/// server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer +/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify +/// default encryption by using SSE-KMS, you can also configure Amazon S3 +/// Bucket Keys. For information about the bucket default encryption +/// feature, see Amazon S3 Bucket Default +/// Encryption in the Amazon S3 User Guide.

        +///
      • +///
      • +///

        If you use PutBucketEncryption to set your default bucket +/// encryption to SSE-KMS, you should verify that your KMS key ID +/// is correct. Amazon S3 doesn't validate the KMS key ID provided in +/// PutBucketEncryption requests.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory buckets - You can +/// optionally configure default encryption for a bucket by using server-side +/// encryption with Key Management Service (KMS) keys (SSE-KMS).

      +///
        +///
      • +///

        We recommend that the bucket's default encryption uses the desired +/// encryption configuration and you don't override the bucket default +/// encryption in your CreateSession requests or PUT +/// object requests. Then, new objects are automatically encrypted with the +/// desired encryption settings. +/// For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

        +///
      • +///
      • +///

        Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +///

        +///
      • +///
      • +///

        S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or +/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

        +///
      • +///
      • +///

        When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

        +///
      • +///
      • +///

        For directory buckets, if you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, Amazon S3 validates the +/// KMS key ID provided in PutBucketEncryption requests.

        +///
      • +///
      +///
    • +///
    +///
    +/// +///

    If you're specifying a customer managed KMS key, we recommend using a fully +/// qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the +/// key within the requester’s account. This behavior can result in data that's encrypted +/// with a KMS key that belongs to the requester, and not the bucket owner.

    +///

    Also, this action requires Amazon Web Services Signature Version 4. For more information, see +/// Authenticating +/// Requests (Amazon Web Services Signature Version 4).

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The +/// s3:PutEncryptionConfiguration permission is required in a +/// policy. The bucket owner has this permission by default. The bucket owner +/// can grant this permission to others. For more information about permissions, +/// see Permissions Related to Bucket Operations and Managing Access +/// Permissions to Your Amazon S3 Resources in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// To grant access to this API operation, you must have the +/// s3express:PutEncryptionConfiguration permission in +/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      +///

      To set a directory bucket default encryption with SSE-KMS, you must also +/// have the kms:GenerateDataKey and the kms:Decrypt +/// permissions in IAM identity-based policies and KMS key policies for the +/// target KMS key.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to PutBucketEncryption:

    +/// +async fn put_bucket_encryption(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketEncryption is not implemented yet")) +} - ///

    This operation configures default encryption and Amazon S3 Bucket Keys for an existing - /// bucket.

    - /// - ///

    - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///

    By default, all buckets have a default encryption configuration that uses server-side - /// encryption with Amazon S3 managed keys (SSE-S3).

    - /// - ///
      - ///
    • - ///

      - /// General purpose buckets - ///

      - ///
        - ///
      • - ///

        You can optionally configure default encryption for a bucket by using - /// server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer - /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify - /// default encryption by using SSE-KMS, you can also configure Amazon S3 - /// Bucket Keys. For information about the bucket default encryption - /// feature, see Amazon S3 Bucket Default - /// Encryption in the Amazon S3 User Guide.

        - ///
      • - ///
      • - ///

        If you use PutBucketEncryption to set your default bucket - /// encryption to SSE-KMS, you should verify that your KMS key ID - /// is correct. Amazon S3 doesn't validate the KMS key ID provided in - /// PutBucketEncryption requests.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory buckets - You can - /// optionally configure default encryption for a bucket by using server-side - /// encryption with Key Management Service (KMS) keys (SSE-KMS).

      - ///
        - ///
      • - ///

        We recommend that the bucket's default encryption uses the desired - /// encryption configuration and you don't override the bucket default - /// encryption in your CreateSession requests or PUT - /// object requests. Then, new objects are automatically encrypted with the - /// desired encryption settings. - /// For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

        - ///
      • - ///
      • - ///

        Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. - /// The Amazon Web Services managed key (aws/s3) isn't supported. - ///

        - ///
      • - ///
      • - ///

        S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or - /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

        - ///
      • - ///
      • - ///

        When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

        - ///
      • - ///
      • - ///

        For directory buckets, if you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, Amazon S3 validates the - /// KMS key ID provided in PutBucketEncryption requests.

        - ///
      • - ///
      - ///
    • - ///
    - ///
    - /// - ///

    If you're specifying a customer managed KMS key, we recommend using a fully - /// qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the - /// key within the requester’s account. This behavior can result in data that's encrypted - /// with a KMS key that belongs to the requester, and not the bucket owner.

    - ///

    Also, this action requires Amazon Web Services Signature Version 4. For more information, see - /// Authenticating - /// Requests (Amazon Web Services Signature Version 4).

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The - /// s3:PutEncryptionConfiguration permission is required in a - /// policy. The bucket owner has this permission by default. The bucket owner - /// can grant this permission to others. For more information about permissions, - /// see Permissions Related to Bucket Operations and Managing Access - /// Permissions to Your Amazon S3 Resources in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// To grant access to this API operation, you must have the - /// s3express:PutEncryptionConfiguration permission in - /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      - ///

      To set a directory bucket default encryption with SSE-KMS, you must also - /// have the kms:GenerateDataKey and the kms:Decrypt - /// permissions in IAM identity-based policies and KMS key policies for the - /// target KMS key.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to PutBucketEncryption:

    - /// - async fn put_bucket_encryption( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketEncryption is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to +/// 1,000 S3 Intelligent-Tiering configurations per bucket.

    +///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    +///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    +///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    +///

    Operations related to PutBucketIntelligentTieringConfiguration include:

    +/// +/// +///

    You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically +/// move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access +/// or Deep Archive Access tier.

    +///
    +///

    +/// PutBucketIntelligentTieringConfiguration has the following special +/// errors:

    +///
    +///
    HTTP 400 Bad Request Error
    +///
    +///

    +/// Code: InvalidArgument

    +///

    +/// Cause: Invalid Argument

    +///
    +///
    HTTP 400 Bad Request Error
    +///
    +///

    +/// Code: TooManyConfigurations

    +///

    +/// Cause: You are attempting to create a new configuration +/// but have already reached the 1,000-configuration limit.

    +///
    +///
    HTTP 403 Forbidden Error
    +///
    +///

    +/// Cause: You are not the owner of the specified bucket, or +/// you do not have the s3:PutIntelligentTieringConfiguration bucket +/// permission to set the configuration on the bucket.

    +///
    +///
    +async fn put_bucket_intelligent_tiering_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketIntelligentTieringConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to - /// 1,000 S3 Intelligent-Tiering configurations per bucket.

    - ///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    - ///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    - ///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    - ///

    Operations related to PutBucketIntelligentTieringConfiguration include:

    - /// - /// - ///

    You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically - /// move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access - /// or Deep Archive Access tier.

    - ///
    - ///

    - /// PutBucketIntelligentTieringConfiguration has the following special - /// errors:

    - ///
    - ///
    HTTP 400 Bad Request Error
    - ///
    - ///

    - /// Code: InvalidArgument

    - ///

    - /// Cause: Invalid Argument

    - ///
    - ///
    HTTP 400 Bad Request Error
    - ///
    - ///

    - /// Code: TooManyConfigurations

    - ///

    - /// Cause: You are attempting to create a new configuration - /// but have already reached the 1,000-configuration limit.

    - ///
    - ///
    HTTP 403 Forbidden Error
    - ///
    - ///

    - /// Cause: You are not the owner of the specified bucket, or - /// you do not have the s3:PutIntelligentTieringConfiguration bucket - /// permission to set the configuration on the bucket.

    - ///
    - ///
    - async fn put_bucket_intelligent_tiering_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!( - NotImplemented, - "PutBucketIntelligentTieringConfiguration is not implemented yet" - )) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    This implementation of the PUT action adds an inventory configuration +/// (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory +/// configurations per bucket.

    +///

    Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly +/// basis, and the results are published to a flat file. The bucket that is inventoried is +/// called the source bucket, and the bucket where the inventory flat file +/// is stored is called the destination bucket. The +/// destination bucket must be in the same Amazon Web Services Region as the +/// source bucket.

    +///

    When you configure an inventory for a source bucket, you specify +/// the destination bucket where you want the inventory to be stored, and +/// whether to generate the inventory daily or weekly. You can also configure what object +/// metadata to include and whether to inventory all object versions or only current versions. +/// For more information, see Amazon S3 Inventory in the +/// Amazon S3 User Guide.

    +/// +///

    You must create a bucket policy on the destination bucket to +/// grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an +/// example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

    +///
    +///
    +///
    Permissions
    +///
    +///

    To use this operation, you must have permission to perform the +/// s3:PutInventoryConfiguration action. The bucket owner has this +/// permission by default and can grant this permission to others.

    +///

    The s3:PutInventoryConfiguration permission allows a user to +/// create an S3 Inventory +/// report that includes all object metadata fields available and to specify the +/// destination bucket to store the inventory. A user with read access to objects in +/// the destination bucket can also access all object metadata fields that are +/// available in the inventory report.

    +///

    To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the +/// Amazon S3 User Guide. For more information about the metadata +/// fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For +/// more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the +/// Amazon S3 User Guide.

    +///
    +///
    +///

    +/// PutBucketInventoryConfiguration has the following special errors:

    +///
    +///
    HTTP 400 Bad Request Error
    +///
    +///

    +/// Code: InvalidArgument

    +///

    +/// Cause: Invalid Argument

    +///
    +///
    HTTP 400 Bad Request Error
    +///
    +///

    +/// Code: TooManyConfigurations

    +///

    +/// Cause: You are attempting to create a new configuration +/// but have already reached the 1,000-configuration limit.

    +///
    +///
    HTTP 403 Forbidden Error
    +///
    +///

    +/// Cause: You are not the owner of the specified bucket, or +/// you do not have the s3:PutInventoryConfiguration bucket permission to +/// set the configuration on the bucket.

    +///
    +///
    +///

    The following operations are related to +/// PutBucketInventoryConfiguration:

    +/// +async fn put_bucket_inventory_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketInventoryConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    This implementation of the PUT action adds an inventory configuration - /// (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory - /// configurations per bucket.

    - ///

    Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly - /// basis, and the results are published to a flat file. The bucket that is inventoried is - /// called the source bucket, and the bucket where the inventory flat file - /// is stored is called the destination bucket. The - /// destination bucket must be in the same Amazon Web Services Region as the - /// source bucket.

    - ///

    When you configure an inventory for a source bucket, you specify - /// the destination bucket where you want the inventory to be stored, and - /// whether to generate the inventory daily or weekly. You can also configure what object - /// metadata to include and whether to inventory all object versions or only current versions. - /// For more information, see Amazon S3 Inventory in the - /// Amazon S3 User Guide.

    - /// - ///

    You must create a bucket policy on the destination bucket to - /// grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an - /// example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///

    To use this operation, you must have permission to perform the - /// s3:PutInventoryConfiguration action. The bucket owner has this - /// permission by default and can grant this permission to others.

    - ///

    The s3:PutInventoryConfiguration permission allows a user to - /// create an S3 Inventory - /// report that includes all object metadata fields available and to specify the - /// destination bucket to store the inventory. A user with read access to objects in - /// the destination bucket can also access all object metadata fields that are - /// available in the inventory report.

    - ///

    To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the - /// Amazon S3 User Guide. For more information about the metadata - /// fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For - /// more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///

    - /// PutBucketInventoryConfiguration has the following special errors:

    - ///
    - ///
    HTTP 400 Bad Request Error
    - ///
    - ///

    - /// Code: InvalidArgument

    - ///

    - /// Cause: Invalid Argument

    - ///
    - ///
    HTTP 400 Bad Request Error
    - ///
    - ///

    - /// Code: TooManyConfigurations

    - ///

    - /// Cause: You are attempting to create a new configuration - /// but have already reached the 1,000-configuration limit.

    - ///
    - ///
    HTTP 403 Forbidden Error
    - ///
    - ///

    - /// Cause: You are not the owner of the specified bucket, or - /// you do not have the s3:PutInventoryConfiguration bucket permission to - /// set the configuration on the bucket.

    - ///
    - ///
    - ///

    The following operations are related to - /// PutBucketInventoryConfiguration:

    - /// - async fn put_bucket_inventory_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketInventoryConfiguration is not implemented yet")) - } +///

    Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle +/// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, +/// so if you want to retain any configuration details, they must be included in the new +/// lifecycle configuration. For information about lifecycle configuration, see Managing +/// your storage lifecycle.

    +/// +///

    Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. +/// For the related API description, see PutBucketLifecycle.

    +///
    +///
    +///
    Rules
    +///
    Permissions
    +///
    HTTP Host header syntax
    +///
    +///

    You specify the lifecycle configuration in your request body. The lifecycle +/// configuration is specified as XML consisting of one or more rules. An Amazon S3 +/// Lifecycle configuration can have up to 1,000 rules. This limit is not +/// adjustable.

    +///

    Bucket lifecycle configuration supports specifying a lifecycle rule using an +/// object key name prefix, one or more object tags, object size, or any combination +/// of these. Accordingly, this section describes the latest API. The previous version +/// of the API supported filtering based only on an object key name prefix, which is +/// supported for backward compatibility for general purpose buckets. For the related +/// API description, see PutBucketLifecycle.

    +/// +///

    Lifecyle configurations for directory buckets only support expiring objects and +/// cancelling multipart uploads. Expiring of versioned objects,transitions and tag +/// filters are not supported.

    +///
    +///

    A lifecycle rule consists of the following:

    +///
      +///
    • +///

      A filter identifying a subset of objects to which the rule applies. The +/// filter can be based on a key name prefix, object tags, object size, or any +/// combination of these.

      +///
    • +///
    • +///

      A status indicating whether the rule is in effect.

      +///
    • +///
    • +///

      One or more lifecycle transition and expiration actions that you want +/// Amazon S3 to perform on the objects identified by the filter. If the state of +/// your bucket is versioning-enabled or versioning-suspended, you can have many +/// versions of the same object (one current version and zero or more noncurrent +/// versions). Amazon S3 provides predefined actions that you can specify for current +/// and noncurrent object versions.

      +///
    • +///
    +///

    For more information, see Object Lifecycle +/// Management and Lifecycle Configuration +/// Elements.

    +///
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - By +/// default, all Amazon S3 resources are private, including buckets, objects, and +/// related subresources (for example, lifecycle configuration and website +/// configuration). Only the resource owner (that is, the Amazon Web Services account that +/// created it) can access the resource. The resource owner can optionally grant +/// access permissions to others by writing an access policy. For this +/// operation, a user must have the s3:PutLifecycleConfiguration +/// permission.

      +///

      You can also explicitly deny permissions. An explicit deny also +/// supersedes any other permissions. If you want to block users or accounts +/// from removing or deleting objects from your bucket, you must deny them +/// permissions for the following actions:

      +/// +///
    • +///
    +///
      +///
    • +///

      +/// Directory bucket permissions - +/// You must have the s3express:PutLifecycleConfiguration +/// permission in an IAM identity-based policy to use this operation. +/// Cross-account access to this API operation isn't supported. The resource +/// owner can optionally grant access permissions to others by creating a role +/// or user for them as long as they are within the same account as the owner +/// and resource.

      +///

      For more information about directory bucket policies and permissions, see +/// Authorizing Regional endpoint APIs with IAM in the +/// Amazon S3 User Guide.

      +/// +///

      +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
      +///
    • +///
    +///
    +///
    +///

    +/// Directory buckets - The HTTP Host +/// header syntax is +/// s3express-control.region.amazonaws.com.

    +///

    The following operations are related to +/// PutBucketLifecycleConfiguration:

    +/// +///
    +///
    +async fn put_bucket_lifecycle_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketLifecycleConfiguration is not implemented yet")) +} - ///

    Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle - /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, - /// so if you want to retain any configuration details, they must be included in the new - /// lifecycle configuration. For information about lifecycle configuration, see Managing - /// your storage lifecycle.

    - /// - ///

    Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. - /// For the related API description, see PutBucketLifecycle.

    - ///
    - ///
    - ///
    Rules
    - ///
    Permissions
    - ///
    HTTP Host header syntax
    - ///
    - ///

    You specify the lifecycle configuration in your request body. The lifecycle - /// configuration is specified as XML consisting of one or more rules. An Amazon S3 - /// Lifecycle configuration can have up to 1,000 rules. This limit is not - /// adjustable.

    - ///

    Bucket lifecycle configuration supports specifying a lifecycle rule using an - /// object key name prefix, one or more object tags, object size, or any combination - /// of these. Accordingly, this section describes the latest API. The previous version - /// of the API supported filtering based only on an object key name prefix, which is - /// supported for backward compatibility for general purpose buckets. For the related - /// API description, see PutBucketLifecycle.

    - /// - ///

    Lifecyle configurations for directory buckets only support expiring objects and - /// cancelling multipart uploads. Expiring of versioned objects,transitions and tag - /// filters are not supported.

    - ///
    - ///

    A lifecycle rule consists of the following:

    - ///
      - ///
    • - ///

      A filter identifying a subset of objects to which the rule applies. The - /// filter can be based on a key name prefix, object tags, object size, or any - /// combination of these.

      - ///
    • - ///
    • - ///

      A status indicating whether the rule is in effect.

      - ///
    • - ///
    • - ///

      One or more lifecycle transition and expiration actions that you want - /// Amazon S3 to perform on the objects identified by the filter. If the state of - /// your bucket is versioning-enabled or versioning-suspended, you can have many - /// versions of the same object (one current version and zero or more noncurrent - /// versions). Amazon S3 provides predefined actions that you can specify for current - /// and noncurrent object versions.

      - ///
    • - ///
    - ///

    For more information, see Object Lifecycle - /// Management and Lifecycle Configuration - /// Elements.

    - ///
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - By - /// default, all Amazon S3 resources are private, including buckets, objects, and - /// related subresources (for example, lifecycle configuration and website - /// configuration). Only the resource owner (that is, the Amazon Web Services account that - /// created it) can access the resource. The resource owner can optionally grant - /// access permissions to others by writing an access policy. For this - /// operation, a user must have the s3:PutLifecycleConfiguration - /// permission.

      - ///

      You can also explicitly deny permissions. An explicit deny also - /// supersedes any other permissions. If you want to block users or accounts - /// from removing or deleting objects from your bucket, you must deny them - /// permissions for the following actions:

      - /// - ///
    • - ///
    - ///
      - ///
    • - ///

      - /// Directory bucket permissions - - /// You must have the s3express:PutLifecycleConfiguration - /// permission in an IAM identity-based policy to use this operation. - /// Cross-account access to this API operation isn't supported. The resource - /// owner can optionally grant access permissions to others by creating a role - /// or user for them as long as they are within the same account as the owner - /// and resource.

      - ///

      For more information about directory bucket policies and permissions, see - /// Authorizing Regional endpoint APIs with IAM in the - /// Amazon S3 User Guide.

      - /// - ///

      - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
      - ///
    • - ///
    - ///
    - ///
    - ///

    - /// Directory buckets - The HTTP Host - /// header syntax is - /// s3express-control.region.amazonaws.com.

    - ///

    The following operations are related to - /// PutBucketLifecycleConfiguration:

    - /// - ///
    - ///
    - async fn put_bucket_lifecycle_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketLifecycleConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Set the logging parameters for a bucket and to specify permissions for who can view and +/// modify the logging parameters. All logs are saved to buckets in the same Amazon Web Services Region as +/// the source bucket. To set the logging status of a bucket, you must be the bucket +/// owner.

    +///

    The bucket owner is automatically granted FULL_CONTROL to all logs. You use the +/// Grantee request element to grant access to other people. The +/// Permissions request element specifies the kind of access the grantee has to +/// the logs.

    +/// +///

    If the target bucket for log delivery uses the bucket owner enforced setting for S3 +/// Object Ownership, you can't use the Grantee request element to grant access +/// to others. Permissions can only be granted using policies. For more information, see +/// Permissions for server access log delivery in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Grantee Values
    +///
    +///

    You can specify the person (grantee) to whom you're assigning access rights (by +/// using request elements) in the following ways:

    +///
      +///
    • +///

      By the person's ID:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> +/// </Grantee> +///

      +///

      +/// DisplayName is optional and ignored in the request.

      +///
    • +///
    • +///

      By Email address:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<></Grantee> +///

      +///

      The grantee is resolved to the CanonicalUser and, in a +/// response to a GETObjectAcl request, appears as the +/// CanonicalUser.

      +///
    • +///
    • +///

      By URI:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> +///

      +///
    • +///
    +///
    +///
    +///

    To enable logging, you use LoggingEnabled and its children request +/// elements. To disable logging, you use an empty BucketLoggingStatus request +/// element:

    +///

    +/// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" +/// /> +///

    +///

    For more information about server access logging, see Server Access Logging in the +/// Amazon S3 User Guide.

    +///

    For more information about creating a bucket, see CreateBucket. For more +/// information about returning the logging status of a bucket, see GetBucketLogging.

    +///

    The following operations are related to PutBucketLogging:

    +/// +async fn put_bucket_logging(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketLogging is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Set the logging parameters for a bucket and to specify permissions for who can view and - /// modify the logging parameters. All logs are saved to buckets in the same Amazon Web Services Region as - /// the source bucket. To set the logging status of a bucket, you must be the bucket - /// owner.

    - ///

    The bucket owner is automatically granted FULL_CONTROL to all logs. You use the - /// Grantee request element to grant access to other people. The - /// Permissions request element specifies the kind of access the grantee has to - /// the logs.

    - /// - ///

    If the target bucket for log delivery uses the bucket owner enforced setting for S3 - /// Object Ownership, you can't use the Grantee request element to grant access - /// to others. Permissions can only be granted using policies. For more information, see - /// Permissions for server access log delivery in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Grantee Values
    - ///
    - ///

    You can specify the person (grantee) to whom you're assigning access rights (by - /// using request elements) in the following ways:

    - ///
      - ///
    • - ///

      By the person's ID:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> - /// </Grantee> - ///

      - ///

      - /// DisplayName is optional and ignored in the request.

      - ///
    • - ///
    • - ///

      By Email address:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<></Grantee> - ///

      - ///

      The grantee is resolved to the CanonicalUser and, in a - /// response to a GETObjectAcl request, appears as the - /// CanonicalUser.

      - ///
    • - ///
    • - ///

      By URI:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> - ///

      - ///
    • - ///
    - ///
    - ///
    - ///

    To enable logging, you use LoggingEnabled and its children request - /// elements. To disable logging, you use an empty BucketLoggingStatus request - /// element:

    - ///

    - /// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" - /// /> - ///

    - ///

    For more information about server access logging, see Server Access Logging in the - /// Amazon S3 User Guide.

    - ///

    For more information about creating a bucket, see CreateBucket. For more - /// information about returning the logging status of a bucket, see GetBucketLogging.

    - ///

    The following operations are related to PutBucketLogging:

    - /// - async fn put_bucket_logging(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketLogging is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. +/// You can have up to 1,000 metrics configurations per bucket. If you're updating an existing +/// metrics configuration, note that this is a full replacement of the existing metrics +/// configuration. If you don't include the elements you want to keep, they are erased.

    +///

    To use this operation, you must have permissions to perform the +/// s3:PutMetricsConfiguration action. The bucket owner has this permission by +/// default. The bucket owner can grant this permission to others. For more information about +/// permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring +/// Metrics with Amazon CloudWatch.

    +///

    The following operations are related to +/// PutBucketMetricsConfiguration:

    +/// +///

    +/// PutBucketMetricsConfiguration has the following special error:

    +///
      +///
    • +///

      Error code: TooManyConfigurations +///

      +///
        +///
      • +///

        Description: You are attempting to create a new configuration but have +/// already reached the 1,000-configuration limit.

        +///
      • +///
      • +///

        HTTP Status Code: HTTP 400 Bad Request

        +///
      • +///
      +///
    • +///
    +async fn put_bucket_metrics_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketMetricsConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. - /// You can have up to 1,000 metrics configurations per bucket. If you're updating an existing - /// metrics configuration, note that this is a full replacement of the existing metrics - /// configuration. If you don't include the elements you want to keep, they are erased.

    - ///

    To use this operation, you must have permissions to perform the - /// s3:PutMetricsConfiguration action. The bucket owner has this permission by - /// default. The bucket owner can grant this permission to others. For more information about - /// permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring - /// Metrics with Amazon CloudWatch.

    - ///

    The following operations are related to - /// PutBucketMetricsConfiguration:

    - /// - ///

    - /// PutBucketMetricsConfiguration has the following special error:

    - ///
      - ///
    • - ///

      Error code: TooManyConfigurations - ///

      - ///
        - ///
      • - ///

        Description: You are attempting to create a new configuration but have - /// already reached the 1,000-configuration limit.

        - ///
      • - ///
      • - ///

        HTTP Status Code: HTTP 400 Bad Request

        - ///
      • - ///
      - ///
    • - ///
    - async fn put_bucket_metrics_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketMetricsConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Enables notifications of specified events for a bucket. For more information about event +/// notifications, see Configuring Event +/// Notifications.

    +///

    Using this API, you can replace an existing notification configuration. The +/// configuration is an XML file that defines the event types that you want Amazon S3 to publish and +/// the destination where you want Amazon S3 to publish an event notification when it detects an +/// event of the specified type.

    +///

    By default, your bucket has no event notifications configured. That is, the notification +/// configuration will be an empty NotificationConfiguration.

    +///

    +/// <NotificationConfiguration> +///

    +///

    +/// </NotificationConfiguration> +///

    +///

    This action replaces the existing notification configuration with the configuration you +/// include in the request body.

    +///

    After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification +/// Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and +/// that the bucket owner has permission to publish to it by sending a test notification. In +/// the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions +/// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information, +/// see Configuring Notifications for Amazon S3 Events.

    +///

    You can disable notifications by adding the empty NotificationConfiguration +/// element.

    +///

    For more information about the number of event notification configurations that you can +/// create per bucket, see Amazon S3 service quotas in Amazon Web Services +/// General Reference.

    +///

    By default, only the bucket owner can configure notifications on a bucket. However, +/// bucket owners can use a bucket policy to grant permission to other users to set this +/// configuration with the required s3:PutBucketNotification permission.

    +/// +///

    The PUT notification is an atomic operation. For example, suppose your notification +/// configuration includes SNS topic, SQS queue, and Lambda function configurations. When +/// you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS +/// topic. If the message fails, the entire PUT action will fail, and Amazon S3 will not add the +/// configuration to your bucket.

    +///
    +///

    If the configuration in the request body includes only one +/// TopicConfiguration specifying only the +/// s3:ReducedRedundancyLostObject event type, the response will also include +/// the x-amz-sns-test-message-id header containing the message ID of the test +/// notification sent to the topic.

    +///

    The following action is related to +/// PutBucketNotificationConfiguration:

    +/// +async fn put_bucket_notification_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketNotificationConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Enables notifications of specified events for a bucket. For more information about event - /// notifications, see Configuring Event - /// Notifications.

    - ///

    Using this API, you can replace an existing notification configuration. The - /// configuration is an XML file that defines the event types that you want Amazon S3 to publish and - /// the destination where you want Amazon S3 to publish an event notification when it detects an - /// event of the specified type.

    - ///

    By default, your bucket has no event notifications configured. That is, the notification - /// configuration will be an empty NotificationConfiguration.

    - ///

    - /// <NotificationConfiguration> - ///

    - ///

    - /// </NotificationConfiguration> - ///

    - ///

    This action replaces the existing notification configuration with the configuration you - /// include in the request body.

    - ///

    After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification - /// Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and - /// that the bucket owner has permission to publish to it by sending a test notification. In - /// the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions - /// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information, - /// see Configuring Notifications for Amazon S3 Events.

    - ///

    You can disable notifications by adding the empty NotificationConfiguration - /// element.

    - ///

    For more information about the number of event notification configurations that you can - /// create per bucket, see Amazon S3 service quotas in Amazon Web Services - /// General Reference.

    - ///

    By default, only the bucket owner can configure notifications on a bucket. However, - /// bucket owners can use a bucket policy to grant permission to other users to set this - /// configuration with the required s3:PutBucketNotification permission.

    - /// - ///

    The PUT notification is an atomic operation. For example, suppose your notification - /// configuration includes SNS topic, SQS queue, and Lambda function configurations. When - /// you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS - /// topic. If the message fails, the entire PUT action will fail, and Amazon S3 will not add the - /// configuration to your bucket.

    - ///
    - ///

    If the configuration in the request body includes only one - /// TopicConfiguration specifying only the - /// s3:ReducedRedundancyLostObject event type, the response will also include - /// the x-amz-sns-test-message-id header containing the message ID of the test - /// notification sent to the topic.

    - ///

    The following action is related to - /// PutBucketNotificationConfiguration:

    - /// - async fn put_bucket_notification_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketNotificationConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this +/// operation, you must have the s3:PutBucketOwnershipControls permission. For +/// more information about Amazon S3 permissions, see Specifying permissions in a +/// policy.

    +///

    For information about Amazon S3 Object Ownership, see Using object +/// ownership.

    +///

    The following operations are related to PutBucketOwnershipControls:

    +/// +async fn put_bucket_ownership_controls(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketOwnershipControls is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this - /// operation, you must have the s3:PutBucketOwnershipControls permission. For - /// more information about Amazon S3 permissions, see Specifying permissions in a - /// policy.

    - ///

    For information about Amazon S3 Object Ownership, see Using object - /// ownership.

    - ///

    The following operations are related to PutBucketOwnershipControls:

    - /// - async fn put_bucket_ownership_controls( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketOwnershipControls is not implemented yet")) - } +///

    Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

    +/// +///

    +/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name +/// . Virtual-hosted-style requests aren't supported. +/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///

    If you are using an identity other than the root user of the Amazon Web Services account that +/// owns the bucket, the calling identity must both have the +/// PutBucketPolicy permissions on the specified bucket and belong to +/// the bucket owner's account in order to use this operation.

    +///

    If you don't have PutBucketPolicy permissions, Amazon S3 returns a +/// 403 Access Denied error. If you have the correct permissions, but +/// you're not using an identity that belongs to the bucket owner's account, Amazon S3 +/// returns a 405 Method Not Allowed error.

    +/// +///

    To ensure that bucket owners don't inadvertently lock themselves out of +/// their own buckets, the root principal in a bucket owner's Amazon Web Services account can +/// perform the GetBucketPolicy, PutBucketPolicy, and +/// DeleteBucketPolicy API actions, even if their bucket policy +/// explicitly denies the root principal's access. Bucket owner root principals can +/// only be blocked from performing these API actions by VPC endpoint policies and +/// Amazon Web Services Organizations policies.

    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The +/// s3:PutBucketPolicy permission is required in a policy. For +/// more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// To grant access to this API operation, you must have the +/// s3express:PutBucketPolicy permission in +/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. +/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    Example bucket policies
    +///
    +///

    +/// General purpose buckets example bucket policies +/// - See Bucket policy +/// examples in the Amazon S3 User Guide.

    +///

    +/// Directory bucket example bucket policies +/// - See Example bucket policies for S3 Express One Zone in the +/// Amazon S3 User Guide.

    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to PutBucketPolicy:

    +/// +async fn put_bucket_policy(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketPolicy is not implemented yet")) +} - ///

    Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

    - /// - ///

    - /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name - /// . Virtual-hosted-style requests aren't supported. - /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///

    If you are using an identity other than the root user of the Amazon Web Services account that - /// owns the bucket, the calling identity must both have the - /// PutBucketPolicy permissions on the specified bucket and belong to - /// the bucket owner's account in order to use this operation.

    - ///

    If you don't have PutBucketPolicy permissions, Amazon S3 returns a - /// 403 Access Denied error. If you have the correct permissions, but - /// you're not using an identity that belongs to the bucket owner's account, Amazon S3 - /// returns a 405 Method Not Allowed error.

    - /// - ///

    To ensure that bucket owners don't inadvertently lock themselves out of - /// their own buckets, the root principal in a bucket owner's Amazon Web Services account can - /// perform the GetBucketPolicy, PutBucketPolicy, and - /// DeleteBucketPolicy API actions, even if their bucket policy - /// explicitly denies the root principal's access. Bucket owner root principals can - /// only be blocked from performing these API actions by VPC endpoint policies and - /// Amazon Web Services Organizations policies.

    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The - /// s3:PutBucketPolicy permission is required in a policy. For - /// more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// To grant access to this API operation, you must have the - /// s3express:PutBucketPolicy permission in - /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. - /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    Example bucket policies
    - ///
    - ///

    - /// General purpose buckets example bucket policies - /// - See Bucket policy - /// examples in the Amazon S3 User Guide.

    - ///

    - /// Directory bucket example bucket policies - /// - See Example bucket policies for S3 Express One Zone in the - /// Amazon S3 User Guide.

    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to PutBucketPolicy:

    - /// - async fn put_bucket_policy(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketPolicy is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Creates a replication configuration or replaces an existing one. For more information, +/// see Replication in the Amazon S3 User Guide.

    +///

    Specify the replication configuration in the request body. In the replication +/// configuration, you provide the name of the destination bucket or buckets where you want +/// Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your +/// behalf, and other relevant information. You can invoke this request for a specific Amazon Web Services +/// Region by using the +/// aws:RequestedRegion +/// condition key.

    +///

    A replication configuration must include at least one rule, and can contain a maximum of +/// 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in +/// the source bucket. To choose additional subsets of objects to replicate, add a rule for +/// each subset.

    +///

    To specify a subset of the objects in the source bucket to apply a replication rule to, +/// add the Filter element as a child of the Rule element. You can filter objects based on an +/// object key prefix, one or more object tags, or both. When you add the Filter element in the +/// configuration, you must also add the following elements: +/// DeleteMarkerReplication, Status, and +/// Priority.

    +/// +///

    If you are using an earlier version of the replication configuration, Amazon S3 handles +/// replication of delete markers differently. For more information, see Backward Compatibility.

    +///
    +///

    For information about enabling versioning on a bucket, see Using Versioning.

    +///
    +///
    Handling Replication of Encrypted Objects
    +///
    +///

    By default, Amazon S3 doesn't replicate objects that are stored at rest using +/// server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, +/// add the following: SourceSelectionCriteria, +/// SseKmsEncryptedObjects, Status, +/// EncryptionConfiguration, and ReplicaKmsKeyID. For +/// information about replication configuration, see Replicating +/// Objects Created with SSE Using KMS keys.

    +///

    For information on PutBucketReplication errors, see List of +/// replication-related error codes +///

    +///
    +///
    Permissions
    +///
    +///

    To create a PutBucketReplication request, you must have +/// s3:PutReplicationConfiguration permissions for the bucket. +/// +///

    +///

    By default, a resource owner, in this case the Amazon Web Services account that created the +/// bucket, can perform this operation. The resource owner can also grant others +/// permissions to perform the operation. For more information about permissions, see +/// Specifying Permissions in +/// a Policy and Managing Access +/// Permissions to Your Amazon S3 Resources.

    +/// +///

    To perform this operation, the user or role performing the action must have +/// the iam:PassRole +/// permission.

    +///
    +///
    +///
    +///

    The following operations are related to PutBucketReplication:

    +/// +async fn put_bucket_replication(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketReplication is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Creates a replication configuration or replaces an existing one. For more information, - /// see Replication in the Amazon S3 User Guide.

    - ///

    Specify the replication configuration in the request body. In the replication - /// configuration, you provide the name of the destination bucket or buckets where you want - /// Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your - /// behalf, and other relevant information. You can invoke this request for a specific Amazon Web Services - /// Region by using the - /// aws:RequestedRegion - /// condition key.

    - ///

    A replication configuration must include at least one rule, and can contain a maximum of - /// 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in - /// the source bucket. To choose additional subsets of objects to replicate, add a rule for - /// each subset.

    - ///

    To specify a subset of the objects in the source bucket to apply a replication rule to, - /// add the Filter element as a child of the Rule element. You can filter objects based on an - /// object key prefix, one or more object tags, or both. When you add the Filter element in the - /// configuration, you must also add the following elements: - /// DeleteMarkerReplication, Status, and - /// Priority.

    - /// - ///

    If you are using an earlier version of the replication configuration, Amazon S3 handles - /// replication of delete markers differently. For more information, see Backward Compatibility.

    - ///
    - ///

    For information about enabling versioning on a bucket, see Using Versioning.

    - ///
    - ///
    Handling Replication of Encrypted Objects
    - ///
    - ///

    By default, Amazon S3 doesn't replicate objects that are stored at rest using - /// server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, - /// add the following: SourceSelectionCriteria, - /// SseKmsEncryptedObjects, Status, - /// EncryptionConfiguration, and ReplicaKmsKeyID. For - /// information about replication configuration, see Replicating - /// Objects Created with SSE Using KMS keys.

    - ///

    For information on PutBucketReplication errors, see List of - /// replication-related error codes - ///

    - ///
    - ///
    Permissions
    - ///
    - ///

    To create a PutBucketReplication request, you must have - /// s3:PutReplicationConfiguration permissions for the bucket. - /// - ///

    - ///

    By default, a resource owner, in this case the Amazon Web Services account that created the - /// bucket, can perform this operation. The resource owner can also grant others - /// permissions to perform the operation. For more information about permissions, see - /// Specifying Permissions in - /// a Policy and Managing Access - /// Permissions to Your Amazon S3 Resources.

    - /// - ///

    To perform this operation, the user or role performing the action must have - /// the iam:PassRole - /// permission.

    - ///
    - ///
    - ///
    - ///

    The following operations are related to PutBucketReplication:

    - /// - async fn put_bucket_replication( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketReplication is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets the request payment configuration for a bucket. By default, the bucket owner pays +/// for downloads from the bucket. This configuration parameter enables the bucket owner (only) +/// to specify that the person requesting the download will be charged for the download. For +/// more information, see Requester Pays +/// Buckets.

    +///

    The following operations are related to PutBucketRequestPayment:

    +/// +async fn put_bucket_request_payment(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketRequestPayment is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets the request payment configuration for a bucket. By default, the bucket owner pays - /// for downloads from the bucket. This configuration parameter enables the bucket owner (only) - /// to specify that the person requesting the download will be charged for the download. For - /// more information, see Requester Pays - /// Buckets.

    - ///

    The following operations are related to PutBucketRequestPayment:

    - /// - async fn put_bucket_request_payment( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketRequestPayment is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets the tags for a bucket.

    +///

    Use tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this, +/// sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost +/// of combined resources, organize your billing information according to resources with the +/// same tag key values. For example, you can tag several resources with a specific application +/// name, and then organize your billing information to see the total cost of that application +/// across several services. For more information, see Cost Allocation and +/// Tagging and Using Cost Allocation in Amazon S3 +/// Bucket Tags.

    +/// +///

    When this operation sets the tags for a bucket, it will overwrite any current tags +/// the bucket already has. You cannot use this operation to add tags to an existing list of +/// tags.

    +///
    +///

    To use this operation, you must have permissions to perform the +/// s3:PutBucketTagging action. The bucket owner has this permission by default +/// and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing +/// Access Permissions to Your Amazon S3 Resources.

    +///

    +/// PutBucketTagging has the following special errors. For more Amazon S3 errors +/// see, Error +/// Responses.

    +///
      +///
    • +///

      +/// InvalidTag - The tag provided was not a valid tag. This error +/// can occur if the tag did not pass input validation. For more information, see Using +/// Cost Allocation in Amazon S3 Bucket Tags.

      +///
    • +///
    • +///

      +/// MalformedXML - The XML provided does not match the +/// schema.

      +///
    • +///
    • +///

      +/// OperationAborted - A conflicting conditional action is +/// currently in progress against this resource. Please try again.

      +///
    • +///
    • +///

      +/// InternalError - The service was unable to apply the provided +/// tag to the bucket.

      +///
    • +///
    +///

    The following operations are related to PutBucketTagging:

    +/// +async fn put_bucket_tagging(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketTagging is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets the tags for a bucket.

    - ///

    Use tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this, - /// sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost - /// of combined resources, organize your billing information according to resources with the - /// same tag key values. For example, you can tag several resources with a specific application - /// name, and then organize your billing information to see the total cost of that application - /// across several services. For more information, see Cost Allocation and - /// Tagging and Using Cost Allocation in Amazon S3 - /// Bucket Tags.

    - /// - ///

    When this operation sets the tags for a bucket, it will overwrite any current tags - /// the bucket already has. You cannot use this operation to add tags to an existing list of - /// tags.

    - ///
    - ///

    To use this operation, you must have permissions to perform the - /// s3:PutBucketTagging action. The bucket owner has this permission by default - /// and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing - /// Access Permissions to Your Amazon S3 Resources.

    - ///

    - /// PutBucketTagging has the following special errors. For more Amazon S3 errors - /// see, Error - /// Responses.

    - ///
      - ///
    • - ///

      - /// InvalidTag - The tag provided was not a valid tag. This error - /// can occur if the tag did not pass input validation. For more information, see Using - /// Cost Allocation in Amazon S3 Bucket Tags.

      - ///
    • - ///
    • - ///

      - /// MalformedXML - The XML provided does not match the - /// schema.

      - ///
    • - ///
    • - ///

      - /// OperationAborted - A conflicting conditional action is - /// currently in progress against this resource. Please try again.

      - ///
    • - ///
    • - ///

      - /// InternalError - The service was unable to apply the provided - /// tag to the bucket.

      - ///
    • - ///
    - ///

    The following operations are related to PutBucketTagging:

    - /// - async fn put_bucket_tagging(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketTagging is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +/// +///

    When you enable versioning on a bucket for the first time, it might take a short +/// amount of time for the change to be fully propagated. While this change is propagating, +/// you might encounter intermittent HTTP 404 NoSuchKey errors for requests to +/// objects created or updated after enabling versioning. We recommend that you wait for 15 +/// minutes after enabling versioning before issuing write operations (PUT or +/// DELETE) on objects in the bucket.

    +///
    +///

    Sets the versioning state of an existing bucket.

    +///

    You can set the versioning state with one of the following values:

    +///

    +/// Enabled—Enables versioning for the objects in the +/// bucket. All objects added to the bucket receive a unique version ID.

    +///

    +/// Suspended—Disables versioning for the objects in the +/// bucket. All objects added to the bucket receive the version ID null.

    +///

    If the versioning state has never been set on a bucket, it has no versioning state; a +/// GetBucketVersioning request does not return a versioning state value.

    +///

    In order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner +/// and want to enable MFA Delete in the bucket versioning configuration, you must include the +/// x-amz-mfa request header and the Status and the +/// MfaDelete request elements in a request to set the versioning state of the +/// bucket.

    +/// +///

    If you have an object expiration lifecycle configuration in your non-versioned bucket +/// and you want to maintain the same permanent delete behavior when you enable versioning, +/// you must add a noncurrent expiration policy. The noncurrent expiration lifecycle +/// configuration will manage the deletes of the noncurrent object versions in the +/// version-enabled bucket. (A version-enabled bucket maintains one current and zero or more +/// noncurrent object versions.) For more information, see Lifecycle and Versioning.

    +///
    +///

    The following operations are related to PutBucketVersioning:

    +/// +async fn put_bucket_versioning(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketVersioning is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - /// - ///

    When you enable versioning on a bucket for the first time, it might take a short - /// amount of time for the change to be fully propagated. While this change is propagating, - /// you might encounter intermittent HTTP 404 NoSuchKey errors for requests to - /// objects created or updated after enabling versioning. We recommend that you wait for 15 - /// minutes after enabling versioning before issuing write operations (PUT or - /// DELETE) on objects in the bucket.

    - ///
    - ///

    Sets the versioning state of an existing bucket.

    - ///

    You can set the versioning state with one of the following values:

    - ///

    - /// Enabled—Enables versioning for the objects in the - /// bucket. All objects added to the bucket receive a unique version ID.

    - ///

    - /// Suspended—Disables versioning for the objects in the - /// bucket. All objects added to the bucket receive the version ID null.

    - ///

    If the versioning state has never been set on a bucket, it has no versioning state; a - /// GetBucketVersioning request does not return a versioning state value.

    - ///

    In order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner - /// and want to enable MFA Delete in the bucket versioning configuration, you must include the - /// x-amz-mfa request header and the Status and the - /// MfaDelete request elements in a request to set the versioning state of the - /// bucket.

    - /// - ///

    If you have an object expiration lifecycle configuration in your non-versioned bucket - /// and you want to maintain the same permanent delete behavior when you enable versioning, - /// you must add a noncurrent expiration policy. The noncurrent expiration lifecycle - /// configuration will manage the deletes of the noncurrent object versions in the - /// version-enabled bucket. (A version-enabled bucket maintains one current and zero or more - /// noncurrent object versions.) For more information, see Lifecycle and Versioning.

    - ///
    - ///

    The following operations are related to PutBucketVersioning:

    - /// - async fn put_bucket_versioning( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketVersioning is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets the configuration of the website that is specified in the website +/// subresource. To configure a bucket as a website, you can add this subresource on the bucket +/// with website configuration information such as the file name of the index document and any +/// redirect rules. For more information, see Hosting Websites on Amazon S3.

    +///

    This PUT action requires the S3:PutBucketWebsite permission. By default, +/// only the bucket owner can configure the website attached to a bucket; however, bucket +/// owners can allow other users to set the website configuration by writing a bucket policy +/// that grants them the S3:PutBucketWebsite permission.

    +///

    To redirect all website requests sent to the bucket's website endpoint, you add a +/// website configuration with the following elements. Because all requests are sent to another +/// website, you don't need to provide index document name for the bucket.

    +///
      +///
    • +///

      +/// WebsiteConfiguration +///

      +///
    • +///
    • +///

      +/// RedirectAllRequestsTo +///

      +///
    • +///
    • +///

      +/// HostName +///

      +///
    • +///
    • +///

      +/// Protocol +///

      +///
    • +///
    +///

    If you want granular control over redirects, you can use the following elements to add +/// routing rules that describe conditions for redirecting requests and information about the +/// redirect destination. In this case, the website configuration must provide an index +/// document for the bucket, because some requests might not be redirected.

    +///
      +///
    • +///

      +/// WebsiteConfiguration +///

      +///
    • +///
    • +///

      +/// IndexDocument +///

      +///
    • +///
    • +///

      +/// Suffix +///

      +///
    • +///
    • +///

      +/// ErrorDocument +///

      +///
    • +///
    • +///

      +/// Key +///

      +///
    • +///
    • +///

      +/// RoutingRules +///

      +///
    • +///
    • +///

      +/// RoutingRule +///

      +///
    • +///
    • +///

      +/// Condition +///

      +///
    • +///
    • +///

      +/// HttpErrorCodeReturnedEquals +///

      +///
    • +///
    • +///

      +/// KeyPrefixEquals +///

      +///
    • +///
    • +///

      +/// Redirect +///

      +///
    • +///
    • +///

      +/// Protocol +///

      +///
    • +///
    • +///

      +/// HostName +///

      +///
    • +///
    • +///

      +/// ReplaceKeyPrefixWith +///

      +///
    • +///
    • +///

      +/// ReplaceKeyWith +///

      +///
    • +///
    • +///

      +/// HttpRedirectCode +///

      +///
    • +///
    +///

    Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more +/// than 50 routing rules, you can use object redirect. For more information, see Configuring an +/// Object Redirect in the Amazon S3 User Guide.

    +///

    The maximum request length is limited to 128 KB.

    +async fn put_bucket_website(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutBucketWebsite is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets the configuration of the website that is specified in the website - /// subresource. To configure a bucket as a website, you can add this subresource on the bucket - /// with website configuration information such as the file name of the index document and any - /// redirect rules. For more information, see Hosting Websites on Amazon S3.

    - ///

    This PUT action requires the S3:PutBucketWebsite permission. By default, - /// only the bucket owner can configure the website attached to a bucket; however, bucket - /// owners can allow other users to set the website configuration by writing a bucket policy - /// that grants them the S3:PutBucketWebsite permission.

    - ///

    To redirect all website requests sent to the bucket's website endpoint, you add a - /// website configuration with the following elements. Because all requests are sent to another - /// website, you don't need to provide index document name for the bucket.

    - ///
      - ///
    • - ///

      - /// WebsiteConfiguration - ///

      - ///
    • - ///
    • - ///

      - /// RedirectAllRequestsTo - ///

      - ///
    • - ///
    • - ///

      - /// HostName - ///

      - ///
    • - ///
    • - ///

      - /// Protocol - ///

      - ///
    • - ///
    - ///

    If you want granular control over redirects, you can use the following elements to add - /// routing rules that describe conditions for redirecting requests and information about the - /// redirect destination. In this case, the website configuration must provide an index - /// document for the bucket, because some requests might not be redirected.

    - ///
      - ///
    • - ///

      - /// WebsiteConfiguration - ///

      - ///
    • - ///
    • - ///

      - /// IndexDocument - ///

      - ///
    • - ///
    • - ///

      - /// Suffix - ///

      - ///
    • - ///
    • - ///

      - /// ErrorDocument - ///

      - ///
    • - ///
    • - ///

      - /// Key - ///

      - ///
    • - ///
    • - ///

      - /// RoutingRules - ///

      - ///
    • - ///
    • - ///

      - /// RoutingRule - ///

      - ///
    • - ///
    • - ///

      - /// Condition - ///

      - ///
    • - ///
    • - ///

      - /// HttpErrorCodeReturnedEquals - ///

      - ///
    • - ///
    • - ///

      - /// KeyPrefixEquals - ///

      - ///
    • - ///
    • - ///

      - /// Redirect - ///

      - ///
    • - ///
    • - ///

      - /// Protocol - ///

      - ///
    • - ///
    • - ///

      - /// HostName - ///

      - ///
    • - ///
    • - ///

      - /// ReplaceKeyPrefixWith - ///

      - ///
    • - ///
    • - ///

      - /// ReplaceKeyWith - ///

      - ///
    • - ///
    • - ///

      - /// HttpRedirectCode - ///

      - ///
    • - ///
    - ///

    Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more - /// than 50 routing rules, you can use object redirect. For more information, see Configuring an - /// Object Redirect in the Amazon S3 User Guide.

    - ///

    The maximum request length is limited to 128 KB.

    - async fn put_bucket_website(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutBucketWebsite is not implemented yet")) - } +///

    Adds an object to a bucket.

    +/// +///
      +///
    • +///

      Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added +/// the entire object to the bucket. You cannot use PutObject to only +/// update a single piece of metadata for an existing object. You must put the entire +/// object with updated metadata if you want to update some values.

      +///
    • +///
    • +///

      If your bucket uses the bucket owner enforced setting for Object Ownership, +/// ACLs are disabled and no longer affect permissions. All objects written to the +/// bucket by any account will be owned by the bucket owner.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///

    Amazon S3 is a distributed system. If it receives multiple write requests for the same object +/// simultaneously, it overwrites all but the last object written. However, Amazon S3 provides +/// features that can modify this behavior:

    +///
      +///
    • +///

      +/// S3 Object Lock - To prevent objects from +/// being deleted or overwritten, you can use Amazon S3 Object +/// Lock in the Amazon S3 User Guide.

      +/// +///

      This functionality is not supported for directory buckets.

      +///
      +///
    • +///
    • +///

      +/// If-None-Match - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a 412 Precondition Failed error. If a conflicting operation occurs during the upload, S3 returns a 409 ConditionalRequestConflict response. On a 409 failure, retry the upload.

      +///

      Expects the * character (asterisk).

      +///

      For more information, see Add preconditions to S3 operations with conditional requests in the Amazon S3 User Guide or RFC 7232. +///

      +/// +///

      This functionality is not supported for S3 on Outposts.

      +///
      +///
    • +///
    • +///

      +/// S3 Versioning - When you enable versioning +/// for a bucket, if Amazon S3 receives multiple write requests for the same object +/// simultaneously, it stores all versions of the objects. For each write request that is +/// made to the same object, Amazon S3 automatically generates a unique version ID of that +/// object being stored in Amazon S3. You can retrieve, replace, or delete any version of the +/// object. For more information about versioning, see Adding +/// Objects to Versioning-Enabled Buckets in the Amazon S3 User +/// Guide. For information about returning the versioning state of a +/// bucket, see GetBucketVersioning.

      +/// +///

      This functionality is not supported for directory buckets.

      +///
      +///
    • +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - The +/// following permissions are required in your policies when your +/// PutObject request includes specific headers.

      +///
        +///
      • +///

        +/// +/// s3:PutObject +/// - +/// To successfully complete the PutObject request, you must +/// always have the s3:PutObject permission on a bucket to +/// add an object to it.

        +///
      • +///
      • +///

        +/// +/// s3:PutObjectAcl +/// - To successfully change the objects ACL of your +/// PutObject request, you must have the +/// s3:PutObjectAcl.

        +///
      • +///
      • +///

        +/// +/// s3:PutObjectTagging +/// - To successfully set the tag-set with your +/// PutObject request, you must have the +/// s3:PutObjectTagging.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///

      If the object is encrypted with SSE-KMS, you must also have the +/// kms:GenerateDataKey and kms:Decrypt permissions +/// in IAM identity-based policies and KMS key policies for the KMS +/// key.

      +///
    • +///
    +///
    +///
    Data integrity with Content-MD5
    +///
    +///
      +///
    • +///

      +/// General purpose bucket - To ensure that +/// data is not corrupted traversing the network, use the +/// Content-MD5 header. When you use this header, Amazon S3 checks +/// the object against the provided MD5 value and, if they do not match, Amazon S3 +/// returns an error. Alternatively, when the object's ETag is its MD5 digest, +/// you can calculate the MD5 while putting the object to Amazon S3 and compare the +/// returned ETag to the calculated MD5 value.

      +///
    • +///
    • +///

      +/// Directory bucket - +/// This functionality is not supported for directory buckets.

      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    For more information about related Amazon S3 APIs, see the following:

    +/// +async fn put_object(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutObject is not implemented yet")) +} - ///

    Adds an object to a bucket.

    - /// - ///
      - ///
    • - ///

      Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added - /// the entire object to the bucket. You cannot use PutObject to only - /// update a single piece of metadata for an existing object. You must put the entire - /// object with updated metadata if you want to update some values.

      - ///
    • - ///
    • - ///

      If your bucket uses the bucket owner enforced setting for Object Ownership, - /// ACLs are disabled and no longer affect permissions. All objects written to the - /// bucket by any account will be owned by the bucket owner.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///

    Amazon S3 is a distributed system. If it receives multiple write requests for the same object - /// simultaneously, it overwrites all but the last object written. However, Amazon S3 provides - /// features that can modify this behavior:

    - ///
      - ///
    • - ///

      - /// S3 Object Lock - To prevent objects from - /// being deleted or overwritten, you can use Amazon S3 Object - /// Lock in the Amazon S3 User Guide.

      - /// - ///

      This functionality is not supported for directory buckets.

      - ///
      - ///
    • - ///
    • - ///

      - /// If-None-Match - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a 412 Precondition Failed error. If a conflicting operation occurs during the upload, S3 returns a 409 ConditionalRequestConflict response. On a 409 failure, retry the upload.

      - ///

      Expects the * character (asterisk).

      - ///

      For more information, see Add preconditions to S3 operations with conditional requests in the Amazon S3 User Guide or RFC 7232. - ///

      - /// - ///

      This functionality is not supported for S3 on Outposts.

      - ///
      - ///
    • - ///
    • - ///

      - /// S3 Versioning - When you enable versioning - /// for a bucket, if Amazon S3 receives multiple write requests for the same object - /// simultaneously, it stores all versions of the objects. For each write request that is - /// made to the same object, Amazon S3 automatically generates a unique version ID of that - /// object being stored in Amazon S3. You can retrieve, replace, or delete any version of the - /// object. For more information about versioning, see Adding - /// Objects to Versioning-Enabled Buckets in the Amazon S3 User - /// Guide. For information about returning the versioning state of a - /// bucket, see GetBucketVersioning.

      - /// - ///

      This functionality is not supported for directory buckets.

      - ///
      - ///
    • - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - The - /// following permissions are required in your policies when your - /// PutObject request includes specific headers.

      - ///
        - ///
      • - ///

        - /// - /// s3:PutObject - /// - - /// To successfully complete the PutObject request, you must - /// always have the s3:PutObject permission on a bucket to - /// add an object to it.

        - ///
      • - ///
      • - ///

        - /// - /// s3:PutObjectAcl - /// - To successfully change the objects ACL of your - /// PutObject request, you must have the - /// s3:PutObjectAcl.

        - ///
      • - ///
      • - ///

        - /// - /// s3:PutObjectTagging - /// - To successfully set the tag-set with your - /// PutObject request, you must have the - /// s3:PutObjectTagging.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///

      If the object is encrypted with SSE-KMS, you must also have the - /// kms:GenerateDataKey and kms:Decrypt permissions - /// in IAM identity-based policies and KMS key policies for the KMS - /// key.

      - ///
    • - ///
    - ///
    - ///
    Data integrity with Content-MD5
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket - To ensure that - /// data is not corrupted traversing the network, use the - /// Content-MD5 header. When you use this header, Amazon S3 checks - /// the object against the provided MD5 value and, if they do not match, Amazon S3 - /// returns an error. Alternatively, when the object's ETag is its MD5 digest, - /// you can calculate the MD5 while putting the object to Amazon S3 and compare the - /// returned ETag to the calculated MD5 value.

      - ///
    • - ///
    • - ///

      - /// Directory bucket - - /// This functionality is not supported for directory buckets.

      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    For more information about related Amazon S3 APIs, see the following:

    - /// - async fn put_object(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutObject is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Uses the acl subresource to set the access control list (ACL) permissions +/// for a new or existing object in an S3 bucket. You must have the WRITE_ACP +/// permission to set the ACL of an object. For more information, see What +/// permissions can I grant? in the Amazon S3 User Guide.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///

    Depending on your application needs, you can choose to set the ACL on an object using +/// either the request body or the headers. For example, if you have an existing application +/// that updates a bucket ACL using the request body, you can continue to use that approach. +/// For more information, see Access Control List (ACL) Overview +/// in the Amazon S3 User Guide.

    +/// +///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs +/// are disabled and no longer affect permissions. You must use policies to grant access to +/// your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return +/// the AccessControlListNotSupported error code. Requests to read ACLs are +/// still supported. For more information, see Controlling object +/// ownership in the Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///

    You can set access permissions using one of the following methods:

    +///
      +///
    • +///

      Specify a canned ACL with the x-amz-acl request header. Amazon S3 +/// supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has +/// a predefined set of grantees and permissions. Specify the canned ACL name as +/// the value of x-amz-acl. If you use this header, you cannot use +/// other access control-specific headers in your request. For more information, +/// see Canned +/// ACL.

      +///
    • +///
    • +///

      Specify access permissions explicitly with the +/// x-amz-grant-read, x-amz-grant-read-acp, +/// x-amz-grant-write-acp, and +/// x-amz-grant-full-control headers. When using these headers, +/// you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 +/// groups) who will receive the permission. If you use these ACL-specific +/// headers, you cannot use x-amz-acl header to set a canned ACL. +/// These parameters map to the set of permissions that Amazon S3 supports in an ACL. +/// For more information, see Access Control List (ACL) +/// Overview.

      +///

      You specify each grantee as a type=value pair, where the type is one of +/// the following:

      +///
        +///
      • +///

        +/// id – if the value specified is the canonical user ID +/// of an Amazon Web Services account

        +///
      • +///
      • +///

        +/// uri – if you are granting permissions to a predefined +/// group

        +///
      • +///
      • +///

        +/// emailAddress – if the value specified is the email +/// address of an Amazon Web Services account

        +/// +///

        Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

        +///
          +///
        • +///

          US East (N. Virginia)

          +///
        • +///
        • +///

          US West (N. California)

          +///
        • +///
        • +///

          US West (Oregon)

          +///
        • +///
        • +///

          Asia Pacific (Singapore)

          +///
        • +///
        • +///

          Asia Pacific (Sydney)

          +///
        • +///
        • +///

          Asia Pacific (Tokyo)

          +///
        • +///
        • +///

          Europe (Ireland)

          +///
        • +///
        • +///

          South America (São Paulo)

          +///
        • +///
        +///

        For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

        +///
        +///
      • +///
      +///

      For example, the following x-amz-grant-read header grants +/// list objects permission to the two Amazon Web Services accounts identified by their email +/// addresses.

      +///

      +/// x-amz-grant-read: emailAddress="xyz@amazon.com", +/// emailAddress="abc@amazon.com" +///

      +///
    • +///
    +///

    You can use either a canned ACL or specify access permissions explicitly. You +/// cannot do both.

    +///
    +///
    Grantee Values
    +///
    +///

    You can specify the person (grantee) to whom you're assigning access rights +/// (using request elements) in the following ways:

    +///
      +///
    • +///

      By the person's ID:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> +/// </Grantee> +///

      +///

      DisplayName is optional and ignored in the request.

      +///
    • +///
    • +///

      By URI:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> +///

      +///
    • +///
    • +///

      By Email address:

      +///

      +/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +/// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<>lt;/Grantee> +///

      +///

      The grantee is resolved to the CanonicalUser and, in a response to a GET +/// Object acl request, appears as the CanonicalUser.

      +/// +///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      +///
        +///
      • +///

        US East (N. Virginia)

        +///
      • +///
      • +///

        US West (N. California)

        +///
      • +///
      • +///

        US West (Oregon)

        +///
      • +///
      • +///

        Asia Pacific (Singapore)

        +///
      • +///
      • +///

        Asia Pacific (Sydney)

        +///
      • +///
      • +///

        Asia Pacific (Tokyo)

        +///
      • +///
      • +///

        Europe (Ireland)

        +///
      • +///
      • +///

        South America (São Paulo)

        +///
      • +///
      +///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      +///
      +///
    • +///
    +///
    +///
    Versioning
    +///
    +///

    The ACL of an object is set at the object version level. By default, PUT sets +/// the ACL of the current version of an object. To set the ACL of a different +/// version, use the versionId subresource.

    +///
    +///
    +///

    The following operations are related to PutObjectAcl:

    +/// +async fn put_object_acl(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutObjectAcl is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Uses the acl subresource to set the access control list (ACL) permissions - /// for a new or existing object in an S3 bucket. You must have the WRITE_ACP - /// permission to set the ACL of an object. For more information, see What - /// permissions can I grant? in the Amazon S3 User Guide.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///

    Depending on your application needs, you can choose to set the ACL on an object using - /// either the request body or the headers. For example, if you have an existing application - /// that updates a bucket ACL using the request body, you can continue to use that approach. - /// For more information, see Access Control List (ACL) Overview - /// in the Amazon S3 User Guide.

    - /// - ///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs - /// are disabled and no longer affect permissions. You must use policies to grant access to - /// your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return - /// the AccessControlListNotSupported error code. Requests to read ACLs are - /// still supported. For more information, see Controlling object - /// ownership in the Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///

    You can set access permissions using one of the following methods:

    - ///
      - ///
    • - ///

      Specify a canned ACL with the x-amz-acl request header. Amazon S3 - /// supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has - /// a predefined set of grantees and permissions. Specify the canned ACL name as - /// the value of x-amz-acl. If you use this header, you cannot use - /// other access control-specific headers in your request. For more information, - /// see Canned - /// ACL.

      - ///
    • - ///
    • - ///

      Specify access permissions explicitly with the - /// x-amz-grant-read, x-amz-grant-read-acp, - /// x-amz-grant-write-acp, and - /// x-amz-grant-full-control headers. When using these headers, - /// you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 - /// groups) who will receive the permission. If you use these ACL-specific - /// headers, you cannot use x-amz-acl header to set a canned ACL. - /// These parameters map to the set of permissions that Amazon S3 supports in an ACL. - /// For more information, see Access Control List (ACL) - /// Overview.

      - ///

      You specify each grantee as a type=value pair, where the type is one of - /// the following:

      - ///
        - ///
      • - ///

        - /// id – if the value specified is the canonical user ID - /// of an Amazon Web Services account

        - ///
      • - ///
      • - ///

        - /// uri – if you are granting permissions to a predefined - /// group

        - ///
      • - ///
      • - ///

        - /// emailAddress – if the value specified is the email - /// address of an Amazon Web Services account

        - /// - ///

        Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

        - ///
          - ///
        • - ///

          US East (N. Virginia)

          - ///
        • - ///
        • - ///

          US West (N. California)

          - ///
        • - ///
        • - ///

          US West (Oregon)

          - ///
        • - ///
        • - ///

          Asia Pacific (Singapore)

          - ///
        • - ///
        • - ///

          Asia Pacific (Sydney)

          - ///
        • - ///
        • - ///

          Asia Pacific (Tokyo)

          - ///
        • - ///
        • - ///

          Europe (Ireland)

          - ///
        • - ///
        • - ///

          South America (São Paulo)

          - ///
        • - ///
        - ///

        For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

        - ///
        - ///
      • - ///
      - ///

      For example, the following x-amz-grant-read header grants - /// list objects permission to the two Amazon Web Services accounts identified by their email - /// addresses.

      - ///

      - /// x-amz-grant-read: emailAddress="xyz@amazon.com", - /// emailAddress="abc@amazon.com" - ///

      - ///
    • - ///
    - ///

    You can use either a canned ACL or specify access permissions explicitly. You - /// cannot do both.

    - ///
    - ///
    Grantee Values
    - ///
    - ///

    You can specify the person (grantee) to whom you're assigning access rights - /// (using request elements) in the following ways:

    - ///
      - ///
    • - ///

      By the person's ID:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> - /// </Grantee> - ///

      - ///

      DisplayName is optional and ignored in the request.

      - ///
    • - ///
    • - ///

      By URI:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> - ///

      - ///
    • - ///
    • - ///

      By Email address:

      - ///

      - /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - /// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<>lt;/Grantee> - ///

      - ///

      The grantee is resolved to the CanonicalUser and, in a response to a GET - /// Object acl request, appears as the CanonicalUser.

      - /// - ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      - ///
        - ///
      • - ///

        US East (N. Virginia)

        - ///
      • - ///
      • - ///

        US West (N. California)

        - ///
      • - ///
      • - ///

        US West (Oregon)

        - ///
      • - ///
      • - ///

        Asia Pacific (Singapore)

        - ///
      • - ///
      • - ///

        Asia Pacific (Sydney)

        - ///
      • - ///
      • - ///

        Asia Pacific (Tokyo)

        - ///
      • - ///
      • - ///

        Europe (Ireland)

        - ///
      • - ///
      • - ///

        South America (São Paulo)

        - ///
      • - ///
      - ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      - ///
      - ///
    • - ///
    - ///
    - ///
    Versioning
    - ///
    - ///

    The ACL of an object is set at the object version level. By default, PUT sets - /// the ACL of the current version of an object. To set the ACL of a different - /// version, use the versionId subresource.

    - ///
    - ///
    - ///

    The following operations are related to PutObjectAcl:

    - /// - async fn put_object_acl(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutObjectAcl is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Applies a legal hold configuration to the specified object. For more information, see +/// Locking +/// Objects.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +async fn put_object_legal_hold(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutObjectLegalHold is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Applies a legal hold configuration to the specified object. For more information, see - /// Locking - /// Objects.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - async fn put_object_legal_hold( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutObjectLegalHold is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Places an Object Lock configuration on the specified bucket. The rule specified in the +/// Object Lock configuration will be applied by default to every new object placed in the +/// specified bucket. For more information, see Locking Objects.

    +/// +///
      +///
    • +///

      The DefaultRetention settings require both a mode and a +/// period.

      +///
    • +///
    • +///

      The DefaultRetention period can be either Days or +/// Years but you must select one. You cannot specify +/// Days and Years at the same time.

      +///
    • +///
    • +///

      You can enable Object Lock for new or existing buckets. For more information, +/// see Configuring Object +/// Lock.

      +///
    • +///
    +///
    +async fn put_object_lock_configuration(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutObjectLockConfiguration is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Places an Object Lock configuration on the specified bucket. The rule specified in the - /// Object Lock configuration will be applied by default to every new object placed in the - /// specified bucket. For more information, see Locking Objects.

    - /// - ///
      - ///
    • - ///

      The DefaultRetention settings require both a mode and a - /// period.

      - ///
    • - ///
    • - ///

      The DefaultRetention period can be either Days or - /// Years but you must select one. You cannot specify - /// Days and Years at the same time.

      - ///
    • - ///
    • - ///

      You can enable Object Lock for new or existing buckets. For more information, - /// see Configuring Object - /// Lock.

      - ///
    • - ///
    - ///
    - async fn put_object_lock_configuration( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutObjectLockConfiguration is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Places an Object Retention configuration on an object. For more information, see Locking Objects. +/// Users or accounts require the s3:PutObjectRetention permission in order to +/// place an Object Retention configuration on objects. Bypassing a Governance Retention +/// configuration requires the s3:BypassGovernanceRetention permission.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +async fn put_object_retention(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutObjectRetention is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Places an Object Retention configuration on an object. For more information, see Locking Objects. - /// Users or accounts require the s3:PutObjectRetention permission in order to - /// place an Object Retention configuration on objects. Bypassing a Governance Retention - /// configuration requires the s3:BypassGovernanceRetention permission.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - async fn put_object_retention( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutObjectRetention is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Sets the supplied tag-set to an object that already exists in a bucket. A tag is a +/// key-value pair. For more information, see Object Tagging.

    +///

    You can associate tags with an object by sending a PUT request against the tagging +/// subresource that is associated with the object. You can retrieve tags by sending a GET +/// request. For more information, see GetObjectTagging.

    +///

    For tagging-related restrictions related to characters and encodings, see Tag +/// Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per +/// object.

    +///

    To use this operation, you must have permission to perform the +/// s3:PutObjectTagging action. By default, the bucket owner has this +/// permission and can grant this permission to others.

    +///

    To put tags of any other version, use the versionId query parameter. You +/// also need permission for the s3:PutObjectVersionTagging action.

    +///

    +/// PutObjectTagging has the following special errors. For more Amazon S3 errors +/// see, Error +/// Responses.

    +///
      +///
    • +///

      +/// InvalidTag - The tag provided was not a valid tag. This error +/// can occur if the tag did not pass input validation. For more information, see Object +/// Tagging.

      +///
    • +///
    • +///

      +/// MalformedXML - The XML provided does not match the +/// schema.

      +///
    • +///
    • +///

      +/// OperationAborted - A conflicting conditional action is +/// currently in progress against this resource. Please try again.

      +///
    • +///
    • +///

      +/// InternalError - The service was unable to apply the provided +/// tag to the object.

      +///
    • +///
    +///

    The following operations are related to PutObjectTagging:

    +/// +async fn put_object_tagging(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutObjectTagging is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Sets the supplied tag-set to an object that already exists in a bucket. A tag is a - /// key-value pair. For more information, see Object Tagging.

    - ///

    You can associate tags with an object by sending a PUT request against the tagging - /// subresource that is associated with the object. You can retrieve tags by sending a GET - /// request. For more information, see GetObjectTagging.

    - ///

    For tagging-related restrictions related to characters and encodings, see Tag - /// Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per - /// object.

    - ///

    To use this operation, you must have permission to perform the - /// s3:PutObjectTagging action. By default, the bucket owner has this - /// permission and can grant this permission to others.

    - ///

    To put tags of any other version, use the versionId query parameter. You - /// also need permission for the s3:PutObjectVersionTagging action.

    - ///

    - /// PutObjectTagging has the following special errors. For more Amazon S3 errors - /// see, Error - /// Responses.

    - ///
      - ///
    • - ///

      - /// InvalidTag - The tag provided was not a valid tag. This error - /// can occur if the tag did not pass input validation. For more information, see Object - /// Tagging.

      - ///
    • - ///
    • - ///

      - /// MalformedXML - The XML provided does not match the - /// schema.

      - ///
    • - ///
    • - ///

      - /// OperationAborted - A conflicting conditional action is - /// currently in progress against this resource. Please try again.

      - ///
    • - ///
    • - ///

      - /// InternalError - The service was unable to apply the provided - /// tag to the object.

      - ///
    • - ///
    - ///

    The following operations are related to PutObjectTagging:

    - /// - async fn put_object_tagging(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "PutObjectTagging is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket. +/// To use this operation, you must have the s3:PutBucketPublicAccessBlock +/// permission. For more information about Amazon S3 permissions, see Specifying Permissions in a +/// Policy.

    +/// +///

    When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or +/// an object, it checks the PublicAccessBlock configuration for both the +/// bucket (or the bucket that contains the object) and the bucket owner's account. If the +/// PublicAccessBlock configurations are different between the bucket and +/// the account, Amazon S3 uses the most restrictive combination of the bucket-level and +/// account-level settings.

    +///
    +///

    For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".

    +///

    The following operations are related to PutPublicAccessBlock:

    +/// +async fn put_public_access_block(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "PutPublicAccessBlock is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket. - /// To use this operation, you must have the s3:PutBucketPublicAccessBlock - /// permission. For more information about Amazon S3 permissions, see Specifying Permissions in a - /// Policy.

    - /// - ///

    When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or - /// an object, it checks the PublicAccessBlock configuration for both the - /// bucket (or the bucket that contains the object) and the bucket owner's account. If the - /// PublicAccessBlock configurations are different between the bucket and - /// the account, Amazon S3 uses the most restrictive combination of the bucket-level and - /// account-level settings.

    - ///
    - ///

    For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".

    - ///

    The following operations are related to PutPublicAccessBlock:

    - /// - async fn put_public_access_block( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "PutPublicAccessBlock is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Restores an archived copy of an object back into Amazon S3

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///

    This action performs the following types of requests:

    +///
      +///
    • +///

      +/// restore an archive - Restore an archived object

      +///
    • +///
    +///

    For more information about the S3 structure in the request body, see the +/// following:

    +/// +///
    +///
    Permissions
    +///
    +///

    To use this operation, you must have permissions to perform the +/// s3:RestoreObject action. The bucket owner has this permission by +/// default and can grant this permission to others. For more information about +/// permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the +/// Amazon S3 User Guide.

    +///
    +///
    Restoring objects
    +///
    +///

    Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval +/// or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or +/// S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real time. For objects in the +/// S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive +/// storage classes, you must first initiate a restore request, and then wait until a +/// temporary copy of the object is available. If you want a permanent copy of the +/// object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket. +/// To access an archived object, you must restore the object for the duration (number +/// of days) that you specify. For objects in the Archive Access or Deep Archive +/// Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request, +/// and then wait until the object is moved into the Frequent Access tier.

    +///

    To restore a specific object version, you can provide a version ID. If you +/// don't provide a version ID, Amazon S3 restores the current version.

    +///

    When restoring an archived object, you can specify one of the following data +/// access tier options in the Tier element of the request body:

    +///
      +///
    • +///

      +/// Expedited - Expedited retrievals allow you to quickly access +/// your data stored in the S3 Glacier Flexible Retrieval Flexible Retrieval +/// storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests +/// for restoring archives are required. For all but the largest archived +/// objects (250 MB+), data accessed using Expedited retrievals is typically +/// made available within 1–5 minutes. Provisioned capacity ensures that +/// retrieval capacity for Expedited retrievals is available when you need it. +/// Expedited retrievals and provisioned capacity are not available for objects +/// stored in the S3 Glacier Deep Archive storage class or +/// S3 Intelligent-Tiering Deep Archive tier.

      +///
    • +///
    • +///

      +/// Standard - Standard retrievals allow you to access any of +/// your archived objects within several hours. This is the default option for +/// retrieval requests that do not specify the retrieval option. Standard +/// retrievals typically finish within 3–5 hours for objects stored in the +/// S3 Glacier Flexible Retrieval Flexible Retrieval storage class or +/// S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for +/// objects stored in the S3 Glacier Deep Archive storage class or +/// S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored +/// in S3 Intelligent-Tiering.

      +///
    • +///
    • +///

      +/// Bulk - Bulk retrievals free for objects stored in the +/// S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes, +/// enabling you to retrieve large amounts, even petabytes, of data at no cost. +/// Bulk retrievals typically finish within 5–12 hours for objects stored in the +/// S3 Glacier Flexible Retrieval Flexible Retrieval storage class or +/// S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost +/// retrieval option when restoring objects from +/// S3 Glacier Deep Archive. They typically finish within 48 hours for +/// objects stored in the S3 Glacier Deep Archive storage class or +/// S3 Intelligent-Tiering Deep Archive tier.

      +///
    • +///
    +///

    For more information about archive retrieval options and provisioned capacity +/// for Expedited data access, see Restoring Archived +/// Objects in the Amazon S3 User Guide.

    +///

    You can use Amazon S3 restore speed upgrade to change the restore speed to a faster +/// speed while it is in progress. For more information, see Upgrading the speed of an in-progress restore in the +/// Amazon S3 User Guide.

    +///

    To get the status of object restoration, you can send a HEAD +/// request. Operations return the x-amz-restore header, which provides +/// information about the restoration status, in the response. You can use Amazon S3 event +/// notifications to notify you when a restore is initiated or completed. For more +/// information, see Configuring Amazon S3 Event +/// Notifications in the Amazon S3 User Guide.

    +///

    After restoring an archived object, you can update the restoration period by +/// reissuing the request with a new period. Amazon S3 updates the restoration period +/// relative to the current time and charges only for the request-there are no +/// data transfer charges. You cannot update the restoration period when Amazon S3 is +/// actively processing your current restore request for the object.

    +///

    If your bucket has a lifecycle configuration with a rule that includes an +/// expiration action, the object expiration overrides the life span that you specify +/// in a restore request. For example, if you restore an object copy for 10 days, but +/// the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. +/// For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle +/// Management in Amazon S3 User Guide.

    +///
    +///
    Responses
    +///
    +///

    A successful action returns either the 200 OK or 202 +/// Accepted status code.

    +///
      +///
    • +///

      If the object is not previously restored, then Amazon S3 returns 202 +/// Accepted in the response.

      +///
    • +///
    • +///

      If the object is previously restored, Amazon S3 returns 200 OK in +/// the response.

      +///
    • +///
    +///
      +///
    • +///

      Special errors:

      +///
        +///
      • +///

        +/// Code: RestoreAlreadyInProgress +///

        +///
      • +///
      • +///

        +/// Cause: Object restore is already in progress. +///

        +///
      • +///
      • +///

        +/// HTTP Status Code: 409 Conflict +///

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: Client +///

        +///
      • +///
      +///
    • +///
    • +///
        +///
      • +///

        +/// Code: GlacierExpeditedRetrievalNotAvailable +///

        +///
      • +///
      • +///

        +/// Cause: expedited retrievals are currently not available. +/// Try again later. (Returned if there is insufficient capacity to +/// process the Expedited request. This error applies only to Expedited +/// retrievals and not to S3 Standard or Bulk retrievals.) +///

        +///
      • +///
      • +///

        +/// HTTP Status Code: 503 +///

        +///
      • +///
      • +///

        +/// SOAP Fault Code Prefix: N/A +///

        +///
      • +///
      +///
    • +///
    +///
    +///
    +///

    The following operations are related to RestoreObject:

    +/// +async fn restore_object(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "RestoreObject is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Restores an archived copy of an object back into Amazon S3

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///

    This action performs the following types of requests:

    - ///
      - ///
    • - ///

      - /// restore an archive - Restore an archived object

      - ///
    • - ///
    - ///

    For more information about the S3 structure in the request body, see the - /// following:

    - /// - ///
    - ///
    Permissions
    - ///
    - ///

    To use this operation, you must have permissions to perform the - /// s3:RestoreObject action. The bucket owner has this permission by - /// default and can grant this permission to others. For more information about - /// permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the - /// Amazon S3 User Guide.

    - ///
    - ///
    Restoring objects
    - ///
    - ///

    Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval - /// or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or - /// S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real time. For objects in the - /// S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive - /// storage classes, you must first initiate a restore request, and then wait until a - /// temporary copy of the object is available. If you want a permanent copy of the - /// object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket. - /// To access an archived object, you must restore the object for the duration (number - /// of days) that you specify. For objects in the Archive Access or Deep Archive - /// Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request, - /// and then wait until the object is moved into the Frequent Access tier.

    - ///

    To restore a specific object version, you can provide a version ID. If you - /// don't provide a version ID, Amazon S3 restores the current version.

    - ///

    When restoring an archived object, you can specify one of the following data - /// access tier options in the Tier element of the request body:

    - ///
      - ///
    • - ///

      - /// Expedited - Expedited retrievals allow you to quickly access - /// your data stored in the S3 Glacier Flexible Retrieval Flexible Retrieval - /// storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests - /// for restoring archives are required. For all but the largest archived - /// objects (250 MB+), data accessed using Expedited retrievals is typically - /// made available within 1–5 minutes. Provisioned capacity ensures that - /// retrieval capacity for Expedited retrievals is available when you need it. - /// Expedited retrievals and provisioned capacity are not available for objects - /// stored in the S3 Glacier Deep Archive storage class or - /// S3 Intelligent-Tiering Deep Archive tier.

      - ///
    • - ///
    • - ///

      - /// Standard - Standard retrievals allow you to access any of - /// your archived objects within several hours. This is the default option for - /// retrieval requests that do not specify the retrieval option. Standard - /// retrievals typically finish within 3–5 hours for objects stored in the - /// S3 Glacier Flexible Retrieval Flexible Retrieval storage class or - /// S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for - /// objects stored in the S3 Glacier Deep Archive storage class or - /// S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored - /// in S3 Intelligent-Tiering.

      - ///
    • - ///
    • - ///

      - /// Bulk - Bulk retrievals free for objects stored in the - /// S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes, - /// enabling you to retrieve large amounts, even petabytes, of data at no cost. - /// Bulk retrievals typically finish within 5–12 hours for objects stored in the - /// S3 Glacier Flexible Retrieval Flexible Retrieval storage class or - /// S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost - /// retrieval option when restoring objects from - /// S3 Glacier Deep Archive. They typically finish within 48 hours for - /// objects stored in the S3 Glacier Deep Archive storage class or - /// S3 Intelligent-Tiering Deep Archive tier.

      - ///
    • - ///
    - ///

    For more information about archive retrieval options and provisioned capacity - /// for Expedited data access, see Restoring Archived - /// Objects in the Amazon S3 User Guide.

    - ///

    You can use Amazon S3 restore speed upgrade to change the restore speed to a faster - /// speed while it is in progress. For more information, see Upgrading the speed of an in-progress restore in the - /// Amazon S3 User Guide.

    - ///

    To get the status of object restoration, you can send a HEAD - /// request. Operations return the x-amz-restore header, which provides - /// information about the restoration status, in the response. You can use Amazon S3 event - /// notifications to notify you when a restore is initiated or completed. For more - /// information, see Configuring Amazon S3 Event - /// Notifications in the Amazon S3 User Guide.

    - ///

    After restoring an archived object, you can update the restoration period by - /// reissuing the request with a new period. Amazon S3 updates the restoration period - /// relative to the current time and charges only for the request-there are no - /// data transfer charges. You cannot update the restoration period when Amazon S3 is - /// actively processing your current restore request for the object.

    - ///

    If your bucket has a lifecycle configuration with a rule that includes an - /// expiration action, the object expiration overrides the life span that you specify - /// in a restore request. For example, if you restore an object copy for 10 days, but - /// the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. - /// For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle - /// Management in Amazon S3 User Guide.

    - ///
    - ///
    Responses
    - ///
    - ///

    A successful action returns either the 200 OK or 202 - /// Accepted status code.

    - ///
      - ///
    • - ///

      If the object is not previously restored, then Amazon S3 returns 202 - /// Accepted in the response.

      - ///
    • - ///
    • - ///

      If the object is previously restored, Amazon S3 returns 200 OK in - /// the response.

      - ///
    • - ///
    - ///
      - ///
    • - ///

      Special errors:

      - ///
        - ///
      • - ///

        - /// Code: RestoreAlreadyInProgress - ///

        - ///
      • - ///
      • - ///

        - /// Cause: Object restore is already in progress. - ///

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 409 Conflict - ///

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: Client - ///

        - ///
      • - ///
      - ///
    • - ///
    • - ///
        - ///
      • - ///

        - /// Code: GlacierExpeditedRetrievalNotAvailable - ///

        - ///
      • - ///
      • - ///

        - /// Cause: expedited retrievals are currently not available. - /// Try again later. (Returned if there is insufficient capacity to - /// process the Expedited request. This error applies only to Expedited - /// retrievals and not to S3 Standard or Bulk retrievals.) - ///

        - ///
      • - ///
      • - ///

        - /// HTTP Status Code: 503 - ///

        - ///
      • - ///
      • - ///

        - /// SOAP Fault Code Prefix: N/A - ///

        - ///
      • - ///
      - ///
    • - ///
    - ///
    - ///
    - ///

    The following operations are related to RestoreObject:

    - /// - async fn restore_object(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "RestoreObject is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    This action filters the contents of an Amazon S3 object based on a simple structured query +/// language (SQL) statement. In the request, along with the SQL expression, you must also +/// specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses +/// this format to parse object data into records, and returns only records that match the +/// specified SQL expression. You must also specify the data serialization format for the +/// response.

    +///

    This functionality is not supported for Amazon S3 on Outposts.

    +///

    For more information about Amazon S3 Select, see Selecting Content from +/// Objects and SELECT +/// Command in the Amazon S3 User Guide.

    +///

    +///
    +///
    Permissions
    +///
    +///

    You must have the s3:GetObject permission for this operation. Amazon S3 +/// Select does not support anonymous access. For more information about permissions, +/// see Specifying Permissions in +/// a Policy in the Amazon S3 User Guide.

    +///
    +///
    Object Data Formats
    +///
    +///

    You can use Amazon S3 Select to query objects that have the following format +/// properties:

    +///
      +///
    • +///

      +/// CSV, JSON, and Parquet - Objects must be in CSV, +/// JSON, or Parquet format.

      +///
    • +///
    • +///

      +/// UTF-8 - UTF-8 is the only encoding type Amazon S3 Select +/// supports.

      +///
    • +///
    • +///

      +/// GZIP or BZIP2 - CSV and JSON files can be compressed +/// using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that +/// Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar +/// compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support +/// whole-object compression for Parquet objects.

      +///
    • +///
    • +///

      +/// Server-side encryption - Amazon S3 Select supports +/// querying objects that are protected with server-side encryption.

      +///

      For objects that are encrypted with customer-provided encryption keys +/// (SSE-C), you must use HTTPS, and you must use the headers that are +/// documented in the GetObject. For more +/// information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) +/// in the Amazon S3 User Guide.

      +///

      For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and +/// Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently, +/// so you don't need to specify anything. For more information about +/// server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    Working with the Response Body
    +///
    +///

    Given the response size is unknown, Amazon S3 Select streams the response as a +/// series of messages and includes a Transfer-Encoding header with +/// chunked as its value in the response. For more information, see +/// Appendix: +/// SelectObjectContent +/// Response.

    +///
    +///
    GetObject Support
    +///
    +///

    The SelectObjectContent action does not support the following +/// GetObject functionality. For more information, see GetObject.

    +///
      +///
    • +///

      +/// Range: Although you can specify a scan range for an Amazon S3 Select +/// request (see SelectObjectContentRequest - ScanRange in the request +/// parameters), you cannot specify the range of bytes of an object to return. +///

      +///
    • +///
    • +///

      The GLACIER, DEEP_ARCHIVE, and +/// REDUCED_REDUNDANCY storage classes, or the +/// ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access +/// tiers of the INTELLIGENT_TIERING storage class: You cannot +/// query objects in the GLACIER, DEEP_ARCHIVE, or +/// REDUCED_REDUNDANCY storage classes, nor objects in the +/// ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access +/// tiers of the INTELLIGENT_TIERING storage class. For more +/// information about storage classes, see Using Amazon S3 +/// storage classes in the +/// Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    Special Errors
    +///
    +///

    For a list of special errors for this operation, see List of SELECT Object Content Error Codes +///

    +///
    +///
    +///

    The following operations are related to SelectObjectContent:

    +/// +async fn select_object_content(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "SelectObjectContent is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    This action filters the contents of an Amazon S3 object based on a simple structured query - /// language (SQL) statement. In the request, along with the SQL expression, you must also - /// specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses - /// this format to parse object data into records, and returns only records that match the - /// specified SQL expression. You must also specify the data serialization format for the - /// response.

    - ///

    This functionality is not supported for Amazon S3 on Outposts.

    - ///

    For more information about Amazon S3 Select, see Selecting Content from - /// Objects and SELECT - /// Command in the Amazon S3 User Guide.

    - ///

    - ///
    - ///
    Permissions
    - ///
    - ///

    You must have the s3:GetObject permission for this operation. Amazon S3 - /// Select does not support anonymous access. For more information about permissions, - /// see Specifying Permissions in - /// a Policy in the Amazon S3 User Guide.

    - ///
    - ///
    Object Data Formats
    - ///
    - ///

    You can use Amazon S3 Select to query objects that have the following format - /// properties:

    - ///
      - ///
    • - ///

      - /// CSV, JSON, and Parquet - Objects must be in CSV, - /// JSON, or Parquet format.

      - ///
    • - ///
    • - ///

      - /// UTF-8 - UTF-8 is the only encoding type Amazon S3 Select - /// supports.

      - ///
    • - ///
    • - ///

      - /// GZIP or BZIP2 - CSV and JSON files can be compressed - /// using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that - /// Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar - /// compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support - /// whole-object compression for Parquet objects.

      - ///
    • - ///
    • - ///

      - /// Server-side encryption - Amazon S3 Select supports - /// querying objects that are protected with server-side encryption.

      - ///

      For objects that are encrypted with customer-provided encryption keys - /// (SSE-C), you must use HTTPS, and you must use the headers that are - /// documented in the GetObject. For more - /// information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) - /// in the Amazon S3 User Guide.

      - ///

      For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and - /// Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently, - /// so you don't need to specify anything. For more information about - /// server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    Working with the Response Body
    - ///
    - ///

    Given the response size is unknown, Amazon S3 Select streams the response as a - /// series of messages and includes a Transfer-Encoding header with - /// chunked as its value in the response. For more information, see - /// Appendix: - /// SelectObjectContent - /// Response.

    - ///
    - ///
    GetObject Support
    - ///
    - ///

    The SelectObjectContent action does not support the following - /// GetObject functionality. For more information, see GetObject.

    - ///
      - ///
    • - ///

      - /// Range: Although you can specify a scan range for an Amazon S3 Select - /// request (see SelectObjectContentRequest - ScanRange in the request - /// parameters), you cannot specify the range of bytes of an object to return. - ///

      - ///
    • - ///
    • - ///

      The GLACIER, DEEP_ARCHIVE, and - /// REDUCED_REDUNDANCY storage classes, or the - /// ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access - /// tiers of the INTELLIGENT_TIERING storage class: You cannot - /// query objects in the GLACIER, DEEP_ARCHIVE, or - /// REDUCED_REDUNDANCY storage classes, nor objects in the - /// ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access - /// tiers of the INTELLIGENT_TIERING storage class. For more - /// information about storage classes, see Using Amazon S3 - /// storage classes in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    Special Errors
    - ///
    - ///

    For a list of special errors for this operation, see List of SELECT Object Content Error Codes - ///

    - ///
    - ///
    - ///

    The following operations are related to SelectObjectContent:

    - /// - async fn select_object_content( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "SelectObjectContent is not implemented yet")) - } +///

    Uploads a part in a multipart upload.

    +/// +///

    In this operation, you provide new data as a part of an object in your request. +/// However, you have an option to specify your existing Amazon S3 object as a data source for +/// the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

    +///
    +///

    You must initiate a multipart upload (see CreateMultipartUpload) +/// before you can upload any part. In response to your initiate request, Amazon S3 returns an +/// upload ID, a unique identifier that you must include in your upload part request.

    +///

    Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely +/// identifies a part and also defines its position within the object being created. If you +/// upload a new part using the same part number that was used with a previous part, the +/// previously uploaded part is overwritten.

    +///

    For information about maximum and minimum part sizes and other multipart upload +/// specifications, see Multipart upload limits in the Amazon S3 User Guide.

    +/// +///

    After you initiate multipart upload and upload one or more parts, you must either +/// complete or abort multipart upload in order to stop getting charged for storage of the +/// uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up +/// the parts storage and stops charging you for the parts storage.

    +///
    +///

    For more information on multipart uploads, go to Multipart Upload Overview in the +/// Amazon S3 User Guide .

    +/// +///

    +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Permissions
    +///
    +///
      +///
    • +///

      +/// General purpose bucket permissions - To +/// perform a multipart upload with encryption using an Key Management Service key, the +/// requester must have permission to the kms:Decrypt and +/// kms:GenerateDataKey actions on the key. The requester must +/// also have permissions for the kms:GenerateDataKey action for +/// the CreateMultipartUpload API. Then, the requester needs +/// permissions for the kms:Decrypt action on the +/// UploadPart and UploadPartCopy APIs.

      +///

      These permissions are required because Amazon S3 must decrypt and read data +/// from the encrypted file parts before it completes the multipart upload. For +/// more information about KMS permissions, see Protecting data +/// using server-side encryption with KMS in the +/// Amazon S3 User Guide. For information about the +/// permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the +/// CreateSession +/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. +/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see +/// CreateSession +/// .

      +///

      If the object is encrypted with SSE-KMS, you must also have the +/// kms:GenerateDataKey and kms:Decrypt permissions +/// in IAM identity-based policies and KMS key policies for the KMS +/// key.

      +///
    • +///
    +///
    +///
    Data integrity
    +///
    +///

    +/// General purpose bucket - To ensure that data +/// is not corrupted traversing the network, specify the Content-MD5 +/// header in the upload part request. Amazon S3 checks the part data against the provided +/// MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is +/// signed with Signature Version 4, then Amazon Web Services S3 uses the +/// x-amz-content-sha256 header as a checksum instead of +/// Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature +/// Version 4).

    +/// +///

    +/// Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

    +///
    +///
    +///
    Encryption
    +///
    +///
      +///
    • +///

      +/// General purpose bucket - Server-side +/// encryption is for data encryption at rest. Amazon S3 encrypts your data as it +/// writes it to disks in its data centers and decrypts it when you access it. +/// You have mutually exclusive options to protect data using server-side +/// encryption in Amazon S3, depending on how you choose to manage the encryption +/// keys. Specifically, the encryption key options are Amazon S3 managed keys +/// (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C). +/// Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys +/// (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest +/// using server-side encryption with other key options. The option you use +/// depends on whether you want to use KMS keys (SSE-KMS) or provide your own +/// encryption key (SSE-C).

      +///

      Server-side encryption is supported by the S3 Multipart Upload +/// operations. Unless you are using a customer-provided encryption key (SSE-C), +/// you don't need to specify the encryption parameters in each UploadPart +/// request. Instead, you only need to specify the server-side encryption +/// parameters in the initial Initiate Multipart request. For more information, +/// see CreateMultipartUpload.

      +///

      If you request server-side encryption using a customer-provided +/// encryption key (SSE-C) in your initiate multipart upload request, you must +/// provide identical encryption information in each part upload using the +/// following request headers.

      +///
        +///
      • +///

        x-amz-server-side-encryption-customer-algorithm

        +///
      • +///
      • +///

        x-amz-server-side-encryption-customer-key

        +///
      • +///
      • +///

        x-amz-server-side-encryption-customer-key-MD5

        +///
      • +///
      +///

      For more information, see Using +/// Server-Side Encryption in the +/// Amazon S3 User Guide.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms).

      +///
    • +///
    +///
    +///
    Special errors
    +///
    +///
      +///
    • +///

      Error Code: NoSuchUpload +///

      +///
        +///
      • +///

        Description: The specified multipart upload does not exist. The +/// upload ID might be invalid, or the multipart upload might have been +/// aborted or completed.

        +///
      • +///
      • +///

        HTTP Status Code: 404 Not Found

        +///
      • +///
      • +///

        SOAP Fault Code Prefix: Client

        +///
      • +///
      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to UploadPart:

    +/// +async fn upload_part(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "UploadPart is not implemented yet")) +} - ///

    Uploads a part in a multipart upload.

    - /// - ///

    In this operation, you provide new data as a part of an object in your request. - /// However, you have an option to specify your existing Amazon S3 object as a data source for - /// the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

    - ///
    - ///

    You must initiate a multipart upload (see CreateMultipartUpload) - /// before you can upload any part. In response to your initiate request, Amazon S3 returns an - /// upload ID, a unique identifier that you must include in your upload part request.

    - ///

    Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely - /// identifies a part and also defines its position within the object being created. If you - /// upload a new part using the same part number that was used with a previous part, the - /// previously uploaded part is overwritten.

    - ///

    For information about maximum and minimum part sizes and other multipart upload - /// specifications, see Multipart upload limits in the Amazon S3 User Guide.

    - /// - ///

    After you initiate multipart upload and upload one or more parts, you must either - /// complete or abort multipart upload in order to stop getting charged for storage of the - /// uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up - /// the parts storage and stops charging you for the parts storage.

    - ///
    - ///

    For more information on multipart uploads, go to Multipart Upload Overview in the - /// Amazon S3 User Guide .

    - /// - ///

    - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Permissions
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - To - /// perform a multipart upload with encryption using an Key Management Service key, the - /// requester must have permission to the kms:Decrypt and - /// kms:GenerateDataKey actions on the key. The requester must - /// also have permissions for the kms:GenerateDataKey action for - /// the CreateMultipartUpload API. Then, the requester needs - /// permissions for the kms:Decrypt action on the - /// UploadPart and UploadPartCopy APIs.

      - ///

      These permissions are required because Amazon S3 must decrypt and read data - /// from the encrypted file parts before it completes the multipart upload. For - /// more information about KMS permissions, see Protecting data - /// using server-side encryption with KMS in the - /// Amazon S3 User Guide. For information about the - /// permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the - /// CreateSession - /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. - /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see - /// CreateSession - /// .

      - ///

      If the object is encrypted with SSE-KMS, you must also have the - /// kms:GenerateDataKey and kms:Decrypt permissions - /// in IAM identity-based policies and KMS key policies for the KMS - /// key.

      - ///
    • - ///
    - ///
    - ///
    Data integrity
    - ///
    - ///

    - /// General purpose bucket - To ensure that data - /// is not corrupted traversing the network, specify the Content-MD5 - /// header in the upload part request. Amazon S3 checks the part data against the provided - /// MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is - /// signed with Signature Version 4, then Amazon Web Services S3 uses the - /// x-amz-content-sha256 header as a checksum instead of - /// Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature - /// Version 4).

    - /// - ///

    - /// Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

    - ///
    - ///
    - ///
    Encryption
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose bucket - Server-side - /// encryption is for data encryption at rest. Amazon S3 encrypts your data as it - /// writes it to disks in its data centers and decrypts it when you access it. - /// You have mutually exclusive options to protect data using server-side - /// encryption in Amazon S3, depending on how you choose to manage the encryption - /// keys. Specifically, the encryption key options are Amazon S3 managed keys - /// (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C). - /// Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys - /// (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest - /// using server-side encryption with other key options. The option you use - /// depends on whether you want to use KMS keys (SSE-KMS) or provide your own - /// encryption key (SSE-C).

      - ///

      Server-side encryption is supported by the S3 Multipart Upload - /// operations. Unless you are using a customer-provided encryption key (SSE-C), - /// you don't need to specify the encryption parameters in each UploadPart - /// request. Instead, you only need to specify the server-side encryption - /// parameters in the initial Initiate Multipart request. For more information, - /// see CreateMultipartUpload.

      - ///

      If you request server-side encryption using a customer-provided - /// encryption key (SSE-C) in your initiate multipart upload request, you must - /// provide identical encryption information in each part upload using the - /// following request headers.

      - ///
        - ///
      • - ///

        x-amz-server-side-encryption-customer-algorithm

        - ///
      • - ///
      • - ///

        x-amz-server-side-encryption-customer-key

        - ///
      • - ///
      • - ///

        x-amz-server-side-encryption-customer-key-MD5

        - ///
      • - ///
      - ///

      For more information, see Using - /// Server-Side Encryption in the - /// Amazon S3 User Guide.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms).

      - ///
    • - ///
    - ///
    - ///
    Special errors
    - ///
    - ///
      - ///
    • - ///

      Error Code: NoSuchUpload - ///

      - ///
        - ///
      • - ///

        Description: The specified multipart upload does not exist. The - /// upload ID might be invalid, or the multipart upload might have been - /// aborted or completed.

        - ///
      • - ///
      • - ///

        HTTP Status Code: 404 Not Found

        - ///
      • - ///
      • - ///

        SOAP Fault Code Prefix: Client

        - ///
      • - ///
      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to UploadPart:

    - /// - async fn upload_part(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "UploadPart is not implemented yet")) - } +///

    Uploads a part by copying data from an existing object as data source. To specify the +/// data source, you add the request header x-amz-copy-source in your request. To +/// specify a byte range, you add the request header x-amz-copy-source-range in +/// your request.

    +///

    For information about maximum and minimum part sizes and other multipart upload +/// specifications, see Multipart upload limits in the Amazon S3 User Guide.

    +/// +///

    Instead of copying data from an existing object as part data, you might use the +/// UploadPart action to upload new data as a part of an object in your +/// request.

    +///
    +///

    You must initiate a multipart upload before you can upload any part. In response to your +/// initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in +/// your upload part request.

    +///

    For conceptual information about multipart uploads, see Uploading Objects Using Multipart +/// Upload in the Amazon S3 User Guide. For information about +/// copying objects using a single atomic action vs. a multipart upload, see Operations on +/// Objects in the Amazon S3 User Guide.

    +/// +///

    +/// Directory buckets - +/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name +/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the +/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the +/// Amazon S3 User Guide.

    +///
    +///
    +///
    Authentication and authorization
    +///
    +///

    All UploadPartCopy requests must be authenticated and signed by +/// using IAM credentials (access key ID and secret access key for the IAM +/// identities). All headers with the x-amz- prefix, including +/// x-amz-copy-source, must be signed. For more information, see +/// REST Authentication.

    +///

    +/// Directory buckets - You must use IAM +/// credentials to authenticate and authorize your access to the +/// UploadPartCopy API operation, instead of using the temporary +/// security credentials through the CreateSession API operation.

    +///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your +/// behalf.

    +///
    +///
    Permissions
    +///
    +///

    You must have READ access to the source object and +/// WRITE access to the destination bucket.

    +///
      +///
    • +///

      +/// General purpose bucket permissions - You +/// must have the permissions in a policy based on the bucket types of your +/// source bucket and destination bucket in an UploadPartCopy +/// operation.

      +///
        +///
      • +///

        If the source object is in a general purpose bucket, you must have the +/// +/// s3:GetObject +/// +/// permission to read the source object that is being copied.

        +///
      • +///
      • +///

        If the destination bucket is a general purpose bucket, you must have the +/// +/// s3:PutObject +/// +/// permission to write the object copy to the destination bucket.

        +///
      • +///
      • +///

        To perform a multipart upload with encryption using an Key Management Service +/// key, the requester must have permission to the +/// kms:Decrypt and kms:GenerateDataKey +/// actions on the key. The requester must also have permissions for the +/// kms:GenerateDataKey action for the +/// CreateMultipartUpload API. Then, the requester needs +/// permissions for the kms:Decrypt action on the +/// UploadPart and UploadPartCopy APIs. These +/// permissions are required because Amazon S3 must decrypt and read data from +/// the encrypted file parts before it completes the multipart upload. For +/// more information about KMS permissions, see Protecting +/// data using server-side encryption with KMS in the +/// Amazon S3 User Guide. For information about the +/// permissions required to use the multipart upload API, see Multipart upload +/// and permissions and Multipart upload API and permissions in the +/// Amazon S3 User Guide.

        +///
      • +///
      +///
    • +///
    • +///

      +/// Directory bucket permissions - +/// You must have permissions in a bucket policy or an IAM identity-based policy based on the +/// source and destination bucket types in an UploadPartCopy +/// operation.

      +///
        +///
      • +///

        If the source object that you want to copy is in a +/// directory bucket, you must have the +/// s3express:CreateSession +/// permission in +/// the Action element of a policy to read the object. By +/// default, the session is in the ReadWrite mode. If you +/// want to restrict the access, you can explicitly set the +/// s3express:SessionMode condition key to +/// ReadOnly on the copy source bucket.

        +///
      • +///
      • +///

        If the copy destination is a directory bucket, you must have the +/// +/// s3express:CreateSession +/// permission in the +/// Action element of a policy to write the object to the +/// destination. The s3express:SessionMode condition key +/// cannot be set to ReadOnly on the copy destination. +///

        +///
      • +///
      +///

      If the object is encrypted with SSE-KMS, you must also have the +/// kms:GenerateDataKey and kms:Decrypt permissions +/// in IAM identity-based policies and KMS key policies for the KMS +/// key.

      +///

      For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for +/// S3 Express One Zone in the Amazon S3 User Guide.

      +///
    • +///
    +///
    +///
    Encryption
    +///
    +///
      +///
    • +///

      +/// General purpose buckets - +/// For information about using +/// server-side encryption with customer-provided encryption keys with the +/// UploadPartCopy operation, see CopyObject and +/// UploadPart.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). For more +/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

      +/// +///

      For directory buckets, when you perform a +/// CreateMultipartUpload operation and an +/// UploadPartCopy operation, the request headers you provide +/// in the CreateMultipartUpload request must match the default +/// encryption configuration of the destination bucket.

      +///
      +///

      S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets +/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through UploadPartCopy. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      +///
    • +///
    +///
    +///
    Special errors
    +///
    +///
      +///
    • +///

      Error Code: NoSuchUpload +///

      +///
        +///
      • +///

        Description: The specified multipart upload does not exist. The +/// upload ID might be invalid, or the multipart upload might have been +/// aborted or completed.

        +///
      • +///
      • +///

        HTTP Status Code: 404 Not Found

        +///
      • +///
      +///
    • +///
    • +///

      Error Code: InvalidRequest +///

      +///
        +///
      • +///

        Description: The specified copy source is not supported as a +/// byte-range copy source.

        +///
      • +///
      • +///

        HTTP Status Code: 400 Bad Request

        +///
      • +///
      +///
    • +///
    +///
    +///
    HTTP Host header syntax
    +///
    +///

    +/// Directory buckets - The HTTP Host header syntax is +/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    +///
    +///
    +///

    The following operations are related to UploadPartCopy:

    +/// +async fn upload_part_copy(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "UploadPartCopy is not implemented yet")) +} - ///

    Uploads a part by copying data from an existing object as data source. To specify the - /// data source, you add the request header x-amz-copy-source in your request. To - /// specify a byte range, you add the request header x-amz-copy-source-range in - /// your request.

    - ///

    For information about maximum and minimum part sizes and other multipart upload - /// specifications, see Multipart upload limits in the Amazon S3 User Guide.

    - /// - ///

    Instead of copying data from an existing object as part data, you might use the - /// UploadPart action to upload new data as a part of an object in your - /// request.

    - ///
    - ///

    You must initiate a multipart upload before you can upload any part. In response to your - /// initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in - /// your upload part request.

    - ///

    For conceptual information about multipart uploads, see Uploading Objects Using Multipart - /// Upload in the Amazon S3 User Guide. For information about - /// copying objects using a single atomic action vs. a multipart upload, see Operations on - /// Objects in the Amazon S3 User Guide.

    - /// - ///

    - /// Directory buckets - - /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name - /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the - /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the - /// Amazon S3 User Guide.

    - ///
    - ///
    - ///
    Authentication and authorization
    - ///
    - ///

    All UploadPartCopy requests must be authenticated and signed by - /// using IAM credentials (access key ID and secret access key for the IAM - /// identities). All headers with the x-amz- prefix, including - /// x-amz-copy-source, must be signed. For more information, see - /// REST Authentication.

    - ///

    - /// Directory buckets - You must use IAM - /// credentials to authenticate and authorize your access to the - /// UploadPartCopy API operation, instead of using the temporary - /// security credentials through the CreateSession API operation.

    - ///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your - /// behalf.

    - ///
    - ///
    Permissions
    - ///
    - ///

    You must have READ access to the source object and - /// WRITE access to the destination bucket.

    - ///
      - ///
    • - ///

      - /// General purpose bucket permissions - You - /// must have the permissions in a policy based on the bucket types of your - /// source bucket and destination bucket in an UploadPartCopy - /// operation.

      - ///
        - ///
      • - ///

        If the source object is in a general purpose bucket, you must have the - /// - /// s3:GetObject - /// - /// permission to read the source object that is being copied.

        - ///
      • - ///
      • - ///

        If the destination bucket is a general purpose bucket, you must have the - /// - /// s3:PutObject - /// - /// permission to write the object copy to the destination bucket.

        - ///
      • - ///
      • - ///

        To perform a multipart upload with encryption using an Key Management Service - /// key, the requester must have permission to the - /// kms:Decrypt and kms:GenerateDataKey - /// actions on the key. The requester must also have permissions for the - /// kms:GenerateDataKey action for the - /// CreateMultipartUpload API. Then, the requester needs - /// permissions for the kms:Decrypt action on the - /// UploadPart and UploadPartCopy APIs. These - /// permissions are required because Amazon S3 must decrypt and read data from - /// the encrypted file parts before it completes the multipart upload. For - /// more information about KMS permissions, see Protecting - /// data using server-side encryption with KMS in the - /// Amazon S3 User Guide. For information about the - /// permissions required to use the multipart upload API, see Multipart upload - /// and permissions and Multipart upload API and permissions in the - /// Amazon S3 User Guide.

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      - /// Directory bucket permissions - - /// You must have permissions in a bucket policy or an IAM identity-based policy based on the - /// source and destination bucket types in an UploadPartCopy - /// operation.

      - ///
        - ///
      • - ///

        If the source object that you want to copy is in a - /// directory bucket, you must have the - /// s3express:CreateSession - /// permission in - /// the Action element of a policy to read the object. By - /// default, the session is in the ReadWrite mode. If you - /// want to restrict the access, you can explicitly set the - /// s3express:SessionMode condition key to - /// ReadOnly on the copy source bucket.

        - ///
      • - ///
      • - ///

        If the copy destination is a directory bucket, you must have the - /// - /// s3express:CreateSession - /// permission in the - /// Action element of a policy to write the object to the - /// destination. The s3express:SessionMode condition key - /// cannot be set to ReadOnly on the copy destination. - ///

        - ///
      • - ///
      - ///

      If the object is encrypted with SSE-KMS, you must also have the - /// kms:GenerateDataKey and kms:Decrypt permissions - /// in IAM identity-based policies and KMS key policies for the KMS - /// key.

      - ///

      For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for - /// S3 Express One Zone in the Amazon S3 User Guide.

      - ///
    • - ///
    - ///
    - ///
    Encryption
    - ///
    - ///
      - ///
    • - ///

      - /// General purpose buckets - - /// For information about using - /// server-side encryption with customer-provided encryption keys with the - /// UploadPartCopy operation, see CopyObject and - /// UploadPart.

      - ///
    • - ///
    • - ///

      - /// Directory buckets - - /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). For more - /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

      - /// - ///

      For directory buckets, when you perform a - /// CreateMultipartUpload operation and an - /// UploadPartCopy operation, the request headers you provide - /// in the CreateMultipartUpload request must match the default - /// encryption configuration of the destination bucket.

      - ///
      - ///

      S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets - /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through UploadPartCopy. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      - ///
    • - ///
    - ///
    - ///
    Special errors
    - ///
    - ///
      - ///
    • - ///

      Error Code: NoSuchUpload - ///

      - ///
        - ///
      • - ///

        Description: The specified multipart upload does not exist. The - /// upload ID might be invalid, or the multipart upload might have been - /// aborted or completed.

        - ///
      • - ///
      • - ///

        HTTP Status Code: 404 Not Found

        - ///
      • - ///
      - ///
    • - ///
    • - ///

      Error Code: InvalidRequest - ///

      - ///
        - ///
      • - ///

        Description: The specified copy source is not supported as a - /// byte-range copy source.

        - ///
      • - ///
      • - ///

        HTTP Status Code: 400 Bad Request

        - ///
      • - ///
      - ///
    • - ///
    - ///
    - ///
    HTTP Host header syntax
    - ///
    - ///

    - /// Directory buckets - The HTTP Host header syntax is - /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    - ///
    - ///
    - ///

    The following operations are related to UploadPartCopy:

    - /// - async fn upload_part_copy(&self, _req: S3Request) -> S3Result> { - Err(s3_error!(NotImplemented, "UploadPartCopy is not implemented yet")) - } +/// +///

    This operation is not supported for directory buckets.

    +///
    +///

    Passes transformed objects to a GetObject operation when using Object Lambda access points. For +/// information about Object Lambda access points, see Transforming objects with +/// Object Lambda access points in the Amazon S3 User Guide.

    +///

    This operation supports metadata that can be returned by GetObject, in addition to +/// RequestRoute, RequestToken, StatusCode, +/// ErrorCode, and ErrorMessage. The GetObject +/// response metadata is supported so that the WriteGetObjectResponse caller, +/// typically an Lambda function, can provide the same metadata when it internally invokes +/// GetObject. When WriteGetObjectResponse is called by a +/// customer-owned Lambda function, the metadata returned to the end user +/// GetObject call might differ from what Amazon S3 would normally return.

    +///

    You can include any number of metadata headers. When including a metadata header, it +/// should be prefaced with x-amz-meta. For example, +/// x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this +/// is to forward GetObject metadata.

    +///

    Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to +/// detect and redact personally identifiable information (PII) and decompress S3 objects. +/// These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and +/// can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

    +///

    Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a +/// natural language processing (NLP) service using machine learning to find insights and +/// relationships in text. It automatically detects personally identifiable information (PII) +/// such as names, addresses, dates, credit card numbers, and social security numbers from +/// documents in your Amazon S3 bucket.

    +///

    Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural +/// language processing (NLP) service using machine learning to find insights and relationships +/// in text. It automatically redacts personally identifiable information (PII) such as names, +/// addresses, dates, credit card numbers, and social security numbers from documents in your +/// Amazon S3 bucket.

    +///

    Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is +/// equipped to decompress objects stored in S3 in one of six compressed file formats including +/// bzip2, gzip, snappy, zlib, zstandard and ZIP.

    +///

    For information on how to view and use these functions, see Using Amazon Web Services built Lambda +/// functions in the Amazon S3 User Guide.

    +async fn write_get_object_response(&self, _req: S3Request) -> S3Result> { +Err(s3_error!(NotImplemented, "WriteGetObjectResponse is not implemented yet")) +} - /// - ///

    This operation is not supported for directory buckets.

    - ///
    - ///

    Passes transformed objects to a GetObject operation when using Object Lambda access points. For - /// information about Object Lambda access points, see Transforming objects with - /// Object Lambda access points in the Amazon S3 User Guide.

    - ///

    This operation supports metadata that can be returned by GetObject, in addition to - /// RequestRoute, RequestToken, StatusCode, - /// ErrorCode, and ErrorMessage. The GetObject - /// response metadata is supported so that the WriteGetObjectResponse caller, - /// typically an Lambda function, can provide the same metadata when it internally invokes - /// GetObject. When WriteGetObjectResponse is called by a - /// customer-owned Lambda function, the metadata returned to the end user - /// GetObject call might differ from what Amazon S3 would normally return.

    - ///

    You can include any number of metadata headers. When including a metadata header, it - /// should be prefaced with x-amz-meta. For example, - /// x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this - /// is to forward GetObject metadata.

    - ///

    Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to - /// detect and redact personally identifiable information (PII) and decompress S3 objects. - /// These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and - /// can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

    - ///

    Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a - /// natural language processing (NLP) service using machine learning to find insights and - /// relationships in text. It automatically detects personally identifiable information (PII) - /// such as names, addresses, dates, credit card numbers, and social security numbers from - /// documents in your Amazon S3 bucket.

    - ///

    Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural - /// language processing (NLP) service using machine learning to find insights and relationships - /// in text. It automatically redacts personally identifiable information (PII) such as names, - /// addresses, dates, credit card numbers, and social security numbers from documents in your - /// Amazon S3 bucket.

    - ///

    Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is - /// equipped to decompress objects stored in S3 in one of six compressed file formats including - /// bzip2, gzip, snappy, zlib, zstandard and ZIP.

    - ///

    For information on how to view and use these functions, see Using Amazon Web Services built Lambda - /// functions in the Amazon S3 User Guide.

    - async fn write_get_object_response( - &self, - _req: S3Request, - ) -> S3Result> { - Err(s3_error!(NotImplemented, "WriteGetObjectResponse is not implemented yet")) - } } + diff --git a/crates/s3s/src/xml/generated.rs b/crates/s3s/src/xml/generated.rs index 17495218..226cacc5 100644 --- a/crates/s3s/src/xml/generated.rs +++ b/crates/s3s/src/xml/generated.rs @@ -824,9385 +824,8679 @@ use std::io::Write; const XMLNS_S3: &str = "http://s3.amazonaws.com/doc/2006-03-01/"; impl Serialize for AccelerateConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("AccelerateConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("AccelerateConfiguration", self) +} } impl<'xml> Deserialize<'xml> for AccelerateConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("AccelerateConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("AccelerateConfiguration", Deserializer::content) +} } impl Serialize for AccessControlPolicy { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("AccessControlPolicy", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("AccessControlPolicy", self) +} } impl<'xml> Deserialize<'xml> for AccessControlPolicy { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("AccessControlPolicy", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("AccessControlPolicy", Deserializer::content) +} } impl Serialize for AnalyticsConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("AnalyticsConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("AnalyticsConfiguration", self) +} } impl<'xml> Deserialize<'xml> for AnalyticsConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("AnalyticsConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("AnalyticsConfiguration", Deserializer::content) +} } impl Serialize for BucketLifecycleConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("LifecycleConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("LifecycleConfiguration", self) +} } impl<'xml> Deserialize<'xml> for BucketLifecycleConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("LifecycleConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("LifecycleConfiguration", Deserializer::content) +} } impl Serialize for BucketLoggingStatus { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("BucketLoggingStatus", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("BucketLoggingStatus", self) +} } impl<'xml> Deserialize<'xml> for BucketLoggingStatus { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("BucketLoggingStatus", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("BucketLoggingStatus", Deserializer::content) +} } impl Serialize for CORSConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CORSConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CORSConfiguration", self) +} } impl<'xml> Deserialize<'xml> for CORSConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CORSConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CORSConfiguration", Deserializer::content) +} } impl Serialize for CompleteMultipartUploadOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("CompleteMultipartUploadResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("CompleteMultipartUploadResult", XMLNS_S3, self) +} } impl Serialize for CompletedMultipartUpload { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CompleteMultipartUpload", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CompleteMultipartUpload", self) +} } impl<'xml> Deserialize<'xml> for CompletedMultipartUpload { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CompleteMultipartUpload", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CompleteMultipartUpload", Deserializer::content) +} } impl Serialize for CopyObjectResult { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CopyObjectResult", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CopyObjectResult", self) +} } impl<'xml> Deserialize<'xml> for CopyObjectResult { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CopyObjectResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CopyObjectResult", Deserializer::content) +} } impl Serialize for CopyPartResult { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CopyPartResult", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CopyPartResult", self) +} } impl<'xml> Deserialize<'xml> for CopyPartResult { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CopyPartResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CopyPartResult", Deserializer::content) +} } impl Serialize for CreateBucketConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("CreateBucketConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("CreateBucketConfiguration", self) +} } impl<'xml> Deserialize<'xml> for CreateBucketConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CreateBucketConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CreateBucketConfiguration", Deserializer::content) +} } impl Serialize for CreateMultipartUploadOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("InitiateMultipartUploadResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("InitiateMultipartUploadResult", XMLNS_S3, self) +} } impl Serialize for CreateSessionOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("CreateSessionResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("CreateSessionResult", XMLNS_S3, self) +} } impl Serialize for Delete { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Delete", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Delete", self) +} } impl<'xml> Deserialize<'xml> for Delete { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Delete", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Delete", Deserializer::content) +} } impl Serialize for DeleteObjectsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("DeleteResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("DeleteResult", XMLNS_S3, self) +} } impl Serialize for GetBucketAccelerateConfigurationOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("AccelerateConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("AccelerateConfiguration", XMLNS_S3, self) +} } impl Serialize for GetBucketAclOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketAclOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("AccessControlPolicy", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("AccessControlPolicy", Deserializer::content) +} } impl Serialize for GetBucketCorsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("CORSConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("CORSConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketCorsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("CORSConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("CORSConfiguration", Deserializer::content) +} } impl Serialize for GetBucketLifecycleConfigurationOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("LifecycleConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("LifecycleConfiguration", XMLNS_S3, self) +} } impl Serialize for GetBucketLoggingOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("BucketLoggingStatus", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("BucketLoggingStatus", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketLoggingOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("BucketLoggingStatus", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("BucketLoggingStatus", Deserializer::content) +} } impl Serialize for GetBucketMetadataTableConfigurationResult { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("GetBucketMetadataTableConfigurationResult", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("GetBucketMetadataTableConfigurationResult", self) +} } impl<'xml> Deserialize<'xml> for GetBucketMetadataTableConfigurationResult { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("GetBucketMetadataTableConfigurationResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("GetBucketMetadataTableConfigurationResult", Deserializer::content) +} } impl Serialize for GetBucketNotificationConfigurationOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("NotificationConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("NotificationConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketNotificationConfigurationOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("NotificationConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("NotificationConfiguration", Deserializer::content) +} } impl Serialize for GetBucketRequestPaymentOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("RequestPaymentConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("RequestPaymentConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketRequestPaymentOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("RequestPaymentConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("RequestPaymentConfiguration", Deserializer::content) +} } impl Serialize for GetBucketTaggingOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("Tagging", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("Tagging", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketTaggingOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Tagging", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Tagging", Deserializer::content) +} } impl Serialize for GetBucketVersioningOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("VersioningConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("VersioningConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketVersioningOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("VersioningConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("VersioningConfiguration", Deserializer::content) +} } impl Serialize for GetBucketWebsiteOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("WebsiteConfiguration", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("WebsiteConfiguration", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for GetBucketWebsiteOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("WebsiteConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("WebsiteConfiguration", Deserializer::content) +} } impl Serialize for GetObjectAclOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) +} } impl Serialize for GetObjectAttributesOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("GetObjectAttributesResponse", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("GetObjectAttributesResponse", XMLNS_S3, self) +} } impl Serialize for GetObjectTaggingOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("Tagging", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("Tagging", XMLNS_S3, self) +} } impl Serialize for IntelligentTieringConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("IntelligentTieringConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("IntelligentTieringConfiguration", self) +} } impl<'xml> Deserialize<'xml> for IntelligentTieringConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("IntelligentTieringConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("IntelligentTieringConfiguration", Deserializer::content) +} } impl Serialize for InventoryConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("InventoryConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("InventoryConfiguration", self) +} } impl<'xml> Deserialize<'xml> for InventoryConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("InventoryConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("InventoryConfiguration", Deserializer::content) +} } impl Serialize for ListBucketAnalyticsConfigurationsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListBucketAnalyticsConfigurationResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListBucketAnalyticsConfigurationResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketAnalyticsConfigurationsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListBucketAnalyticsConfigurationResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListBucketAnalyticsConfigurationResult", Deserializer::content) +} } impl Serialize for ListBucketIntelligentTieringConfigurationsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListBucketIntelligentTieringConfigurationsOutput", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListBucketIntelligentTieringConfigurationsOutput", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketIntelligentTieringConfigurationsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListBucketIntelligentTieringConfigurationsOutput", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListBucketIntelligentTieringConfigurationsOutput", Deserializer::content) +} } impl Serialize for ListBucketInventoryConfigurationsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListInventoryConfigurationsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListInventoryConfigurationsResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketInventoryConfigurationsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListInventoryConfigurationsResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListInventoryConfigurationsResult", Deserializer::content) +} } impl Serialize for ListBucketMetricsConfigurationsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListMetricsConfigurationsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListMetricsConfigurationsResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketMetricsConfigurationsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListMetricsConfigurationsResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListMetricsConfigurationsResult", Deserializer::content) +} } impl Serialize for ListBucketsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListAllMyBucketsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListAllMyBucketsResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListBucketsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListAllMyBucketsResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListAllMyBucketsResult", Deserializer::content) +} } impl Serialize for ListDirectoryBucketsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListAllMyDirectoryBucketsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListAllMyDirectoryBucketsResult", XMLNS_S3, self) +} } impl<'xml> Deserialize<'xml> for ListDirectoryBucketsOutput { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ListAllMyDirectoryBucketsResult", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ListAllMyDirectoryBucketsResult", Deserializer::content) +} } impl Serialize for ListMultipartUploadsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListMultipartUploadsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListMultipartUploadsResult", XMLNS_S3, self) +} } impl Serialize for ListObjectVersionsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListVersionsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListVersionsResult", XMLNS_S3, self) +} } impl Serialize for ListObjectsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListBucketResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListBucketResult", XMLNS_S3, self) +} } impl Serialize for ListObjectsV2Output { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListBucketResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListBucketResult", XMLNS_S3, self) +} } impl Serialize for ListPartsOutput { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content_with_ns("ListPartsResult", XMLNS_S3, self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content_with_ns("ListPartsResult", XMLNS_S3, self) +} } impl Serialize for MetadataTableConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("MetadataTableConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("MetadataTableConfiguration", self) +} } impl<'xml> Deserialize<'xml> for MetadataTableConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("MetadataTableConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("MetadataTableConfiguration", Deserializer::content) +} } impl Serialize for MetricsConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("MetricsConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("MetricsConfiguration", self) +} } impl<'xml> Deserialize<'xml> for MetricsConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("MetricsConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("MetricsConfiguration", Deserializer::content) +} } impl Serialize for NotificationConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("NotificationConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("NotificationConfiguration", self) +} } impl<'xml> Deserialize<'xml> for NotificationConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("NotificationConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("NotificationConfiguration", Deserializer::content) +} } impl Serialize for ObjectLockConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("ObjectLockConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("ObjectLockConfiguration", self) +} } impl<'xml> Deserialize<'xml> for ObjectLockConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ObjectLockConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ObjectLockConfiguration", Deserializer::content) +} } impl Serialize for ObjectLockLegalHold { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("LegalHold", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("LegalHold", self) +} } impl<'xml> Deserialize<'xml> for ObjectLockLegalHold { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("LegalHold", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("LegalHold", Deserializer::content) +} } impl Serialize for ObjectLockRetention { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Retention", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Retention", self) +} } impl<'xml> Deserialize<'xml> for ObjectLockRetention { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Retention", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Retention", Deserializer::content) +} } impl Serialize for OwnershipControls { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("OwnershipControls", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("OwnershipControls", self) +} } impl<'xml> Deserialize<'xml> for OwnershipControls { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("OwnershipControls", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("OwnershipControls", Deserializer::content) +} } impl Serialize for PolicyStatus { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("PolicyStatus", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("PolicyStatus", self) +} } impl<'xml> Deserialize<'xml> for PolicyStatus { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("PolicyStatus", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("PolicyStatus", Deserializer::content) +} } impl Serialize for Progress { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Progress", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Progress", self) +} } impl<'xml> Deserialize<'xml> for Progress { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Progress", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Progress", Deserializer::content) +} } impl Serialize for PublicAccessBlockConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("PublicAccessBlockConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("PublicAccessBlockConfiguration", self) +} } impl<'xml> Deserialize<'xml> for PublicAccessBlockConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("PublicAccessBlockConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("PublicAccessBlockConfiguration", Deserializer::content) +} } impl Serialize for ReplicationConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("ReplicationConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("ReplicationConfiguration", self) +} } impl<'xml> Deserialize<'xml> for ReplicationConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ReplicationConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ReplicationConfiguration", Deserializer::content) +} } impl Serialize for RequestPaymentConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("RequestPaymentConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("RequestPaymentConfiguration", self) +} } impl<'xml> Deserialize<'xml> for RequestPaymentConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("RequestPaymentConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("RequestPaymentConfiguration", Deserializer::content) +} } impl Serialize for RestoreRequest { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("RestoreRequest", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("RestoreRequest", self) +} } impl<'xml> Deserialize<'xml> for RestoreRequest { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("RestoreRequest", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("RestoreRequest", Deserializer::content) +} } impl Serialize for SelectObjectContentRequest { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("SelectObjectContentRequest", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("SelectObjectContentRequest", self) +} } impl<'xml> Deserialize<'xml> for SelectObjectContentRequest { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("SelectObjectContentRequest", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("SelectObjectContentRequest", Deserializer::content) +} } impl Serialize for ServerSideEncryptionConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("ServerSideEncryptionConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("ServerSideEncryptionConfiguration", self) +} } impl<'xml> Deserialize<'xml> for ServerSideEncryptionConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("ServerSideEncryptionConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("ServerSideEncryptionConfiguration", Deserializer::content) +} } impl Serialize for Stats { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Stats", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Stats", self) +} } impl<'xml> Deserialize<'xml> for Stats { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Stats", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Stats", Deserializer::content) +} } impl Serialize for Tagging { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("Tagging", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("Tagging", self) +} } impl<'xml> Deserialize<'xml> for Tagging { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("Tagging", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("Tagging", Deserializer::content) +} } impl Serialize for VersioningConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("VersioningConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("VersioningConfiguration", self) +} } impl<'xml> Deserialize<'xml> for VersioningConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("VersioningConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("VersioningConfiguration", Deserializer::content) +} } impl Serialize for WebsiteConfiguration { - fn serialize(&self, s: &mut Serializer) -> SerResult { - s.content("WebsiteConfiguration", self) - } +fn serialize(&self, s: &mut Serializer) -> SerResult { +s.content("WebsiteConfiguration", self) +} } impl<'xml> Deserialize<'xml> for WebsiteConfiguration { - fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { - d.named_element("WebsiteConfiguration", Deserializer::content) - } +fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { +d.named_element("WebsiteConfiguration", Deserializer::content) +} } impl SerializeContent for AbortIncompleteMultipartUpload { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.days_after_initiation { - s.content("DaysAfterInitiation", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.days_after_initiation { +s.content("DaysAfterInitiation", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AbortIncompleteMultipartUpload { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut days_after_initiation: Option = None; - d.for_each_element(|d, x| match x { - b"DaysAfterInitiation" => { - if days_after_initiation.is_some() { - return Err(DeError::DuplicateField); - } - days_after_initiation = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { days_after_initiation }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut days_after_initiation: Option = None; +d.for_each_element(|d, x| match x { +b"DaysAfterInitiation" => { +if days_after_initiation.is_some() { return Err(DeError::DuplicateField); } +days_after_initiation = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +days_after_initiation, +}) +} } impl SerializeContent for AccelerateConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AccelerateConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status, +}) +} } impl SerializeContent for AccessControlPolicy { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.grants { - s.list("AccessControlList", "Grant", iter)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.grants { +s.list("AccessControlList", "Grant", iter)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AccessControlPolicy { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut grants: Option = None; - let mut owner: Option = None; - d.for_each_element(|d, x| match x { - b"AccessControlList" => { - if grants.is_some() { - return Err(DeError::DuplicateField); - } - grants = Some(d.list_content("Grant")?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { grants, owner }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut grants: Option = None; +let mut owner: Option = None; +d.for_each_element(|d, x| match x { +b"AccessControlList" => { +if grants.is_some() { return Err(DeError::DuplicateField); } +grants = Some(d.list_content("Grant")?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +grants, +owner, +}) +} } impl SerializeContent for AccessControlTranslation { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Owner", &self.owner)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Owner", &self.owner)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AccessControlTranslation { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut owner: Option = None; - d.for_each_element(|d, x| match x { - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - owner: owner.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut owner: Option = None; +d.for_each_element(|d, x| match x { +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +owner: owner.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for AnalyticsAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix, tags }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +tags, +}) +} } impl SerializeContent for AnalyticsConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - s.content("Id", &self.id)?; - s.content("StorageClassAnalysis", &self.storage_class_analysis)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +s.content("Id", &self.id)?; +s.content("StorageClassAnalysis", &self.storage_class_analysis)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut filter: Option = None; - let mut id: Option = None; - let mut storage_class_analysis: Option = None; - d.for_each_element(|d, x| match x { - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"StorageClassAnalysis" => { - if storage_class_analysis.is_some() { - return Err(DeError::DuplicateField); - } - storage_class_analysis = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - filter, - id: id.ok_or(DeError::MissingField)?, - storage_class_analysis: storage_class_analysis.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut filter: Option = None; +let mut id: Option = None; +let mut storage_class_analysis: Option = None; +d.for_each_element(|d, x| match x { +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"StorageClassAnalysis" => { +if storage_class_analysis.is_some() { return Err(DeError::DuplicateField); } +storage_class_analysis = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +filter, +id: id.ok_or(DeError::MissingField)?, +storage_class_analysis: storage_class_analysis.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for AnalyticsExportDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("S3BucketDestination", &self.s3_bucket_destination)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("S3BucketDestination", &self.s3_bucket_destination)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsExportDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3_bucket_destination: Option = None; - d.for_each_element(|d, x| match x { - b"S3BucketDestination" => { - if s3_bucket_destination.is_some() { - return Err(DeError::DuplicateField); - } - s3_bucket_destination = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3_bucket_destination: Option = None; +d.for_each_element(|d, x| match x { +b"S3BucketDestination" => { +if s3_bucket_destination.is_some() { return Err(DeError::DuplicateField); } +s3_bucket_destination = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for AnalyticsFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - match self { - Self::And(x) => s.content("And", x), - Self::Prefix(x) => s.content("Prefix", x), - Self::Tag(x) => s.content("Tag", x), - } - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +match self { +Self::And(x) => s.content("And", x), +Self::Prefix(x) => s.content("Prefix", x), +Self::Tag(x) => s.content("Tag", x), +} +} } impl<'xml> DeserializeContent<'xml> for AnalyticsFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.element(|d, x| match x { - b"And" => Ok(Self::And(d.content()?)), - b"Prefix" => Ok(Self::Prefix(d.content()?)), - b"Tag" => Ok(Self::Tag(d.content()?)), - _ => Err(DeError::UnexpectedTagName), - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.element(|d, x| match x { +b"And" => Ok(Self::And(d.content()?)), +b"Prefix" => Ok(Self::Prefix(d.content()?)), +b"Tag" => Ok(Self::Tag(d.content()?)), +_ => Err(DeError::UnexpectedTagName) +}) +} } impl SerializeContent for AnalyticsS3BucketDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Bucket", &self.bucket)?; - if let Some(ref val) = self.bucket_account_id { - s.content("BucketAccountId", val)?; - } - s.content("Format", &self.format)?; - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Bucket", &self.bucket)?; +if let Some(ref val) = self.bucket_account_id { +s.content("BucketAccountId", val)?; +} +s.content("Format", &self.format)?; +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsS3BucketDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bucket: Option = None; - let mut bucket_account_id: Option = None; - let mut format: Option = None; - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Bucket" => { - if bucket.is_some() { - return Err(DeError::DuplicateField); - } - bucket = Some(d.content()?); - Ok(()) - } - b"BucketAccountId" => { - if bucket_account_id.is_some() { - return Err(DeError::DuplicateField); - } - bucket_account_id = Some(d.content()?); - Ok(()) - } - b"Format" => { - if format.is_some() { - return Err(DeError::DuplicateField); - } - format = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bucket: bucket.ok_or(DeError::MissingField)?, - bucket_account_id, - format: format.ok_or(DeError::MissingField)?, - prefix, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bucket: Option = None; +let mut bucket_account_id: Option = None; +let mut format: Option = None; +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Bucket" => { +if bucket.is_some() { return Err(DeError::DuplicateField); } +bucket = Some(d.content()?); +Ok(()) +} +b"BucketAccountId" => { +if bucket_account_id.is_some() { return Err(DeError::DuplicateField); } +bucket_account_id = Some(d.content()?); +Ok(()) +} +b"Format" => { +if format.is_some() { return Err(DeError::DuplicateField); } +format = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bucket: bucket.ok_or(DeError::MissingField)?, +bucket_account_id, +format: format.ok_or(DeError::MissingField)?, +prefix, +}) +} } impl SerializeContent for AnalyticsS3ExportFileFormat { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for AnalyticsS3ExportFileFormat { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"CSV" => Ok(Self::from_static(AnalyticsS3ExportFileFormat::CSV)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"CSV" => Ok(Self::from_static(AnalyticsS3ExportFileFormat::CSV)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for AssumeRoleOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.assumed_role_user { - s.content("AssumedRoleUser", val)?; - } - if let Some(ref val) = self.credentials { - s.content("Credentials", val)?; - } - if let Some(ref val) = self.packed_policy_size { - s.content("PackedPolicySize", val)?; - } - if let Some(ref val) = self.source_identity { - s.content("SourceIdentity", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.assumed_role_user { +s.content("AssumedRoleUser", val)?; +} +if let Some(ref val) = self.credentials { +s.content("Credentials", val)?; +} +if let Some(ref val) = self.packed_policy_size { +s.content("PackedPolicySize", val)?; +} +if let Some(ref val) = self.source_identity { +s.content("SourceIdentity", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AssumeRoleOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut assumed_role_user: Option = None; - let mut credentials: Option = None; - let mut packed_policy_size: Option = None; - let mut source_identity: Option = None; - d.for_each_element(|d, x| match x { - b"AssumedRoleUser" => { - if assumed_role_user.is_some() { - return Err(DeError::DuplicateField); - } - assumed_role_user = Some(d.content()?); - Ok(()) - } - b"Credentials" => { - if credentials.is_some() { - return Err(DeError::DuplicateField); - } - credentials = Some(d.content()?); - Ok(()) - } - b"PackedPolicySize" => { - if packed_policy_size.is_some() { - return Err(DeError::DuplicateField); - } - packed_policy_size = Some(d.content()?); - Ok(()) - } - b"SourceIdentity" => { - if source_identity.is_some() { - return Err(DeError::DuplicateField); - } - source_identity = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - assumed_role_user, - credentials, - packed_policy_size, - source_identity, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut assumed_role_user: Option = None; +let mut credentials: Option = None; +let mut packed_policy_size: Option = None; +let mut source_identity: Option = None; +d.for_each_element(|d, x| match x { +b"AssumedRoleUser" => { +if assumed_role_user.is_some() { return Err(DeError::DuplicateField); } +assumed_role_user = Some(d.content()?); +Ok(()) +} +b"Credentials" => { +if credentials.is_some() { return Err(DeError::DuplicateField); } +credentials = Some(d.content()?); +Ok(()) +} +b"PackedPolicySize" => { +if packed_policy_size.is_some() { return Err(DeError::DuplicateField); } +packed_policy_size = Some(d.content()?); +Ok(()) +} +b"SourceIdentity" => { +if source_identity.is_some() { return Err(DeError::DuplicateField); } +source_identity = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +assumed_role_user, +credentials, +packed_policy_size, +source_identity, +}) +} } impl SerializeContent for AssumedRoleUser { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Arn", &self.arn)?; - s.content("AssumedRoleId", &self.assumed_role_id)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Arn", &self.arn)?; +s.content("AssumedRoleId", &self.assumed_role_id)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for AssumedRoleUser { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut arn: Option = None; - let mut assumed_role_id: Option = None; - d.for_each_element(|d, x| match x { - b"Arn" => { - if arn.is_some() { - return Err(DeError::DuplicateField); - } - arn = Some(d.content()?); - Ok(()) - } - b"AssumedRoleId" => { - if assumed_role_id.is_some() { - return Err(DeError::DuplicateField); - } - assumed_role_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - arn: arn.ok_or(DeError::MissingField)?, - assumed_role_id: assumed_role_id.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut arn: Option = None; +let mut assumed_role_id: Option = None; +d.for_each_element(|d, x| match x { +b"Arn" => { +if arn.is_some() { return Err(DeError::DuplicateField); } +arn = Some(d.content()?); +Ok(()) +} +b"AssumedRoleId" => { +if assumed_role_id.is_some() { return Err(DeError::DuplicateField); } +assumed_role_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +arn: arn.ok_or(DeError::MissingField)?, +assumed_role_id: assumed_role_id.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Bucket { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket_region { - s.content("BucketRegion", val)?; - } - if let Some(ref val) = self.creation_date { - s.timestamp("CreationDate", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket_region { +s.content("BucketRegion", val)?; +} +if let Some(ref val) = self.creation_date { +s.timestamp("CreationDate", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Bucket { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bucket_region: Option = None; - let mut creation_date: Option = None; - let mut name: Option = None; - d.for_each_element(|d, x| match x { - b"BucketRegion" => { - if bucket_region.is_some() { - return Err(DeError::DuplicateField); - } - bucket_region = Some(d.content()?); - Ok(()) - } - b"CreationDate" => { - if creation_date.is_some() { - return Err(DeError::DuplicateField); - } - creation_date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Name" => { - if name.is_some() { - return Err(DeError::DuplicateField); - } - name = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bucket_region, - creation_date, - name, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bucket_region: Option = None; +let mut creation_date: Option = None; +let mut name: Option = None; +d.for_each_element(|d, x| match x { +b"BucketRegion" => { +if bucket_region.is_some() { return Err(DeError::DuplicateField); } +bucket_region = Some(d.content()?); +Ok(()) +} +b"CreationDate" => { +if creation_date.is_some() { return Err(DeError::DuplicateField); } +creation_date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Name" => { +if name.is_some() { return Err(DeError::DuplicateField); } +name = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bucket_region, +creation_date, +name, +}) +} } impl SerializeContent for BucketAccelerateStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketAccelerateStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Enabled" => Ok(Self::from_static(BucketAccelerateStatus::ENABLED)), - b"Suspended" => Ok(Self::from_static(BucketAccelerateStatus::SUSPENDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Enabled" => Ok(Self::from_static(BucketAccelerateStatus::ENABLED)), +b"Suspended" => Ok(Self::from_static(BucketAccelerateStatus::SUSPENDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for BucketInfo { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.data_redundancy { - s.content("DataRedundancy", val)?; - } - if let Some(ref val) = self.type_ { - s.content("Type", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.data_redundancy { +s.content("DataRedundancy", val)?; +} +if let Some(ref val) = self.type_ { +s.content("Type", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for BucketInfo { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut data_redundancy: Option = None; - let mut type_: Option = None; - d.for_each_element(|d, x| match x { - b"DataRedundancy" => { - if data_redundancy.is_some() { - return Err(DeError::DuplicateField); - } - data_redundancy = Some(d.content()?); - Ok(()) - } - b"Type" => { - if type_.is_some() { - return Err(DeError::DuplicateField); - } - type_ = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { data_redundancy, type_ }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut data_redundancy: Option = None; +let mut type_: Option = None; +d.for_each_element(|d, x| match x { +b"DataRedundancy" => { +if data_redundancy.is_some() { return Err(DeError::DuplicateField); } +data_redundancy = Some(d.content()?); +Ok(()) +} +b"Type" => { +if type_.is_some() { return Err(DeError::DuplicateField); } +type_ = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +data_redundancy, +type_, +}) +} } impl SerializeContent for BucketLifecycleConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.rules; - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.rules; +s.flattened_list("Rule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for BucketLifecycleConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut rules: Option = None; - d.for_each_element(|d, x| match x { - b"Rule" => { - let ans: LifecycleRule = d.content()?; - rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - rules: rules.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut rules: Option = None; +d.for_each_element(|d, x| match x { +b"Rule" => { +let ans: LifecycleRule = d.content()?; +rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +rules: rules.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for BucketLocationConstraint { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketLocationConstraint { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"EU" => Ok(Self::from_static(BucketLocationConstraint::EU)), - b"af-south-1" => Ok(Self::from_static(BucketLocationConstraint::AF_SOUTH_1)), - b"ap-east-1" => Ok(Self::from_static(BucketLocationConstraint::AP_EAST_1)), - b"ap-northeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_1)), - b"ap-northeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_2)), - b"ap-northeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_3)), - b"ap-south-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_1)), - b"ap-south-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_2)), - b"ap-southeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_1)), - b"ap-southeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_2)), - b"ap-southeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_3)), - b"ap-southeast-4" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_4)), - b"ap-southeast-5" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_5)), - b"ca-central-1" => Ok(Self::from_static(BucketLocationConstraint::CA_CENTRAL_1)), - b"cn-north-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTH_1)), - b"cn-northwest-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTHWEST_1)), - b"eu-central-1" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_1)), - b"eu-central-2" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_2)), - b"eu-north-1" => Ok(Self::from_static(BucketLocationConstraint::EU_NORTH_1)), - b"eu-south-1" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_1)), - b"eu-south-2" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_2)), - b"eu-west-1" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_1)), - b"eu-west-2" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_2)), - b"eu-west-3" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_3)), - b"il-central-1" => Ok(Self::from_static(BucketLocationConstraint::IL_CENTRAL_1)), - b"me-central-1" => Ok(Self::from_static(BucketLocationConstraint::ME_CENTRAL_1)), - b"me-south-1" => Ok(Self::from_static(BucketLocationConstraint::ME_SOUTH_1)), - b"sa-east-1" => Ok(Self::from_static(BucketLocationConstraint::SA_EAST_1)), - b"us-east-2" => Ok(Self::from_static(BucketLocationConstraint::US_EAST_2)), - b"us-gov-east-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_EAST_1)), - b"us-gov-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_WEST_1)), - b"us-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_1)), - b"us-west-2" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_2)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"EU" => Ok(Self::from_static(BucketLocationConstraint::EU)), +b"af-south-1" => Ok(Self::from_static(BucketLocationConstraint::AF_SOUTH_1)), +b"ap-east-1" => Ok(Self::from_static(BucketLocationConstraint::AP_EAST_1)), +b"ap-northeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_1)), +b"ap-northeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_2)), +b"ap-northeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_3)), +b"ap-south-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_1)), +b"ap-south-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_2)), +b"ap-southeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_1)), +b"ap-southeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_2)), +b"ap-southeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_3)), +b"ap-southeast-4" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_4)), +b"ap-southeast-5" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_5)), +b"ca-central-1" => Ok(Self::from_static(BucketLocationConstraint::CA_CENTRAL_1)), +b"cn-north-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTH_1)), +b"cn-northwest-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTHWEST_1)), +b"eu-central-1" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_1)), +b"eu-central-2" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_2)), +b"eu-north-1" => Ok(Self::from_static(BucketLocationConstraint::EU_NORTH_1)), +b"eu-south-1" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_1)), +b"eu-south-2" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_2)), +b"eu-west-1" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_1)), +b"eu-west-2" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_2)), +b"eu-west-3" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_3)), +b"il-central-1" => Ok(Self::from_static(BucketLocationConstraint::IL_CENTRAL_1)), +b"me-central-1" => Ok(Self::from_static(BucketLocationConstraint::ME_CENTRAL_1)), +b"me-south-1" => Ok(Self::from_static(BucketLocationConstraint::ME_SOUTH_1)), +b"sa-east-1" => Ok(Self::from_static(BucketLocationConstraint::SA_EAST_1)), +b"us-east-2" => Ok(Self::from_static(BucketLocationConstraint::US_EAST_2)), +b"us-gov-east-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_EAST_1)), +b"us-gov-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_WEST_1)), +b"us-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_1)), +b"us-west-2" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_2)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for BucketLoggingStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.logging_enabled { - s.content("LoggingEnabled", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.logging_enabled { +s.content("LoggingEnabled", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for BucketLoggingStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut logging_enabled: Option = None; - d.for_each_element(|d, x| match x { - b"LoggingEnabled" => { - if logging_enabled.is_some() { - return Err(DeError::DuplicateField); - } - logging_enabled = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { logging_enabled }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut logging_enabled: Option = None; +d.for_each_element(|d, x| match x { +b"LoggingEnabled" => { +if logging_enabled.is_some() { return Err(DeError::DuplicateField); } +logging_enabled = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +logging_enabled, +}) +} } impl SerializeContent for BucketLogsPermission { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketLogsPermission { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"FULL_CONTROL" => Ok(Self::from_static(BucketLogsPermission::FULL_CONTROL)), - b"READ" => Ok(Self::from_static(BucketLogsPermission::READ)), - b"WRITE" => Ok(Self::from_static(BucketLogsPermission::WRITE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"FULL_CONTROL" => Ok(Self::from_static(BucketLogsPermission::FULL_CONTROL)), +b"READ" => Ok(Self::from_static(BucketLogsPermission::READ)), +b"WRITE" => Ok(Self::from_static(BucketLogsPermission::WRITE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for BucketType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Directory" => Ok(Self::from_static(BucketType::DIRECTORY)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Directory" => Ok(Self::from_static(BucketType::DIRECTORY)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for BucketVersioningStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for BucketVersioningStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Enabled" => Ok(Self::from_static(BucketVersioningStatus::ENABLED)), - b"Suspended" => Ok(Self::from_static(BucketVersioningStatus::SUSPENDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Enabled" => Ok(Self::from_static(BucketVersioningStatus::ENABLED)), +b"Suspended" => Ok(Self::from_static(BucketVersioningStatus::SUSPENDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for CORSConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.cors_rules; - s.flattened_list("CORSRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.cors_rules; +s.flattened_list("CORSRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CORSConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut cors_rules: Option = None; - d.for_each_element(|d, x| match x { - b"CORSRule" => { - let ans: CORSRule = d.content()?; - cors_rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - cors_rules: cors_rules.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut cors_rules: Option = None; +d.for_each_element(|d, x| match x { +b"CORSRule" => { +let ans: CORSRule = d.content()?; +cors_rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +cors_rules: cors_rules.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for CORSRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.allowed_headers { - s.flattened_list("AllowedHeader", iter)?; - } - { - let iter = &self.allowed_methods; - s.flattened_list("AllowedMethod", iter)?; - } - { - let iter = &self.allowed_origins; - s.flattened_list("AllowedOrigin", iter)?; - } - if let Some(iter) = &self.expose_headers { - s.flattened_list("ExposeHeader", iter)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - if let Some(ref val) = self.max_age_seconds { - s.content("MaxAgeSeconds", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.allowed_headers { +s.flattened_list("AllowedHeader", iter)?; +} +{ +let iter = &self.allowed_methods; +s.flattened_list("AllowedMethod", iter)?; +} +{ +let iter = &self.allowed_origins; +s.flattened_list("AllowedOrigin", iter)?; +} +if let Some(iter) = &self.expose_headers { +s.flattened_list("ExposeHeader", iter)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +if let Some(ref val) = self.max_age_seconds { +s.content("MaxAgeSeconds", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CORSRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut allowed_headers: Option = None; - let mut allowed_methods: Option = None; - let mut allowed_origins: Option = None; - let mut expose_headers: Option = None; - let mut id: Option = None; - let mut max_age_seconds: Option = None; - d.for_each_element(|d, x| match x { - b"AllowedHeader" => { - let ans: AllowedHeader = d.content()?; - allowed_headers.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"AllowedMethod" => { - let ans: AllowedMethod = d.content()?; - allowed_methods.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"AllowedOrigin" => { - let ans: AllowedOrigin = d.content()?; - allowed_origins.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ExposeHeader" => { - let ans: ExposeHeader = d.content()?; - expose_headers.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"MaxAgeSeconds" => { - if max_age_seconds.is_some() { - return Err(DeError::DuplicateField); - } - max_age_seconds = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - allowed_headers, - allowed_methods: allowed_methods.ok_or(DeError::MissingField)?, - allowed_origins: allowed_origins.ok_or(DeError::MissingField)?, - expose_headers, - id, - max_age_seconds, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut allowed_headers: Option = None; +let mut allowed_methods: Option = None; +let mut allowed_origins: Option = None; +let mut expose_headers: Option = None; +let mut id: Option = None; +let mut max_age_seconds: Option = None; +d.for_each_element(|d, x| match x { +b"AllowedHeader" => { +let ans: AllowedHeader = d.content()?; +allowed_headers.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"AllowedMethod" => { +let ans: AllowedMethod = d.content()?; +allowed_methods.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"AllowedOrigin" => { +let ans: AllowedOrigin = d.content()?; +allowed_origins.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ExposeHeader" => { +let ans: ExposeHeader = d.content()?; +expose_headers.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"MaxAgeSeconds" => { +if max_age_seconds.is_some() { return Err(DeError::DuplicateField); } +max_age_seconds = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +allowed_headers, +allowed_methods: allowed_methods.ok_or(DeError::MissingField)?, +allowed_origins: allowed_origins.ok_or(DeError::MissingField)?, +expose_headers, +id, +max_age_seconds, +}) +} } impl SerializeContent for CSVInput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.allow_quoted_record_delimiter { - s.content("AllowQuotedRecordDelimiter", val)?; - } - if let Some(ref val) = self.comments { - s.content("Comments", val)?; - } - if let Some(ref val) = self.field_delimiter { - s.content("FieldDelimiter", val)?; - } - if let Some(ref val) = self.file_header_info { - s.content("FileHeaderInfo", val)?; - } - if let Some(ref val) = self.quote_character { - s.content("QuoteCharacter", val)?; - } - if let Some(ref val) = self.quote_escape_character { - s.content("QuoteEscapeCharacter", val)?; - } - if let Some(ref val) = self.record_delimiter { - s.content("RecordDelimiter", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.allow_quoted_record_delimiter { +s.content("AllowQuotedRecordDelimiter", val)?; +} +if let Some(ref val) = self.comments { +s.content("Comments", val)?; +} +if let Some(ref val) = self.field_delimiter { +s.content("FieldDelimiter", val)?; +} +if let Some(ref val) = self.file_header_info { +s.content("FileHeaderInfo", val)?; +} +if let Some(ref val) = self.quote_character { +s.content("QuoteCharacter", val)?; +} +if let Some(ref val) = self.quote_escape_character { +s.content("QuoteEscapeCharacter", val)?; +} +if let Some(ref val) = self.record_delimiter { +s.content("RecordDelimiter", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CSVInput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut allow_quoted_record_delimiter: Option = None; - let mut comments: Option = None; - let mut field_delimiter: Option = None; - let mut file_header_info: Option = None; - let mut quote_character: Option = None; - let mut quote_escape_character: Option = None; - let mut record_delimiter: Option = None; - d.for_each_element(|d, x| match x { - b"AllowQuotedRecordDelimiter" => { - if allow_quoted_record_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - allow_quoted_record_delimiter = Some(d.content()?); - Ok(()) - } - b"Comments" => { - if comments.is_some() { - return Err(DeError::DuplicateField); - } - comments = Some(d.content()?); - Ok(()) - } - b"FieldDelimiter" => { - if field_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - field_delimiter = Some(d.content()?); - Ok(()) - } - b"FileHeaderInfo" => { - if file_header_info.is_some() { - return Err(DeError::DuplicateField); - } - file_header_info = Some(d.content()?); - Ok(()) - } - b"QuoteCharacter" => { - if quote_character.is_some() { - return Err(DeError::DuplicateField); - } - quote_character = Some(d.content()?); - Ok(()) - } - b"QuoteEscapeCharacter" => { - if quote_escape_character.is_some() { - return Err(DeError::DuplicateField); - } - quote_escape_character = Some(d.content()?); - Ok(()) - } - b"RecordDelimiter" => { - if record_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - record_delimiter = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - allow_quoted_record_delimiter, - comments, - field_delimiter, - file_header_info, - quote_character, - quote_escape_character, - record_delimiter, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut allow_quoted_record_delimiter: Option = None; +let mut comments: Option = None; +let mut field_delimiter: Option = None; +let mut file_header_info: Option = None; +let mut quote_character: Option = None; +let mut quote_escape_character: Option = None; +let mut record_delimiter: Option = None; +d.for_each_element(|d, x| match x { +b"AllowQuotedRecordDelimiter" => { +if allow_quoted_record_delimiter.is_some() { return Err(DeError::DuplicateField); } +allow_quoted_record_delimiter = Some(d.content()?); +Ok(()) +} +b"Comments" => { +if comments.is_some() { return Err(DeError::DuplicateField); } +comments = Some(d.content()?); +Ok(()) +} +b"FieldDelimiter" => { +if field_delimiter.is_some() { return Err(DeError::DuplicateField); } +field_delimiter = Some(d.content()?); +Ok(()) +} +b"FileHeaderInfo" => { +if file_header_info.is_some() { return Err(DeError::DuplicateField); } +file_header_info = Some(d.content()?); +Ok(()) +} +b"QuoteCharacter" => { +if quote_character.is_some() { return Err(DeError::DuplicateField); } +quote_character = Some(d.content()?); +Ok(()) +} +b"QuoteEscapeCharacter" => { +if quote_escape_character.is_some() { return Err(DeError::DuplicateField); } +quote_escape_character = Some(d.content()?); +Ok(()) +} +b"RecordDelimiter" => { +if record_delimiter.is_some() { return Err(DeError::DuplicateField); } +record_delimiter = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +allow_quoted_record_delimiter, +comments, +field_delimiter, +file_header_info, +quote_character, +quote_escape_character, +record_delimiter, +}) +} } impl SerializeContent for CSVOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.field_delimiter { - s.content("FieldDelimiter", val)?; - } - if let Some(ref val) = self.quote_character { - s.content("QuoteCharacter", val)?; - } - if let Some(ref val) = self.quote_escape_character { - s.content("QuoteEscapeCharacter", val)?; - } - if let Some(ref val) = self.quote_fields { - s.content("QuoteFields", val)?; - } - if let Some(ref val) = self.record_delimiter { - s.content("RecordDelimiter", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.field_delimiter { +s.content("FieldDelimiter", val)?; +} +if let Some(ref val) = self.quote_character { +s.content("QuoteCharacter", val)?; +} +if let Some(ref val) = self.quote_escape_character { +s.content("QuoteEscapeCharacter", val)?; +} +if let Some(ref val) = self.quote_fields { +s.content("QuoteFields", val)?; +} +if let Some(ref val) = self.record_delimiter { +s.content("RecordDelimiter", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CSVOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut field_delimiter: Option = None; - let mut quote_character: Option = None; - let mut quote_escape_character: Option = None; - let mut quote_fields: Option = None; - let mut record_delimiter: Option = None; - d.for_each_element(|d, x| match x { - b"FieldDelimiter" => { - if field_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - field_delimiter = Some(d.content()?); - Ok(()) - } - b"QuoteCharacter" => { - if quote_character.is_some() { - return Err(DeError::DuplicateField); - } - quote_character = Some(d.content()?); - Ok(()) - } - b"QuoteEscapeCharacter" => { - if quote_escape_character.is_some() { - return Err(DeError::DuplicateField); - } - quote_escape_character = Some(d.content()?); - Ok(()) - } - b"QuoteFields" => { - if quote_fields.is_some() { - return Err(DeError::DuplicateField); - } - quote_fields = Some(d.content()?); - Ok(()) - } - b"RecordDelimiter" => { - if record_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - record_delimiter = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - field_delimiter, - quote_character, - quote_escape_character, - quote_fields, - record_delimiter, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut field_delimiter: Option = None; +let mut quote_character: Option = None; +let mut quote_escape_character: Option = None; +let mut quote_fields: Option = None; +let mut record_delimiter: Option = None; +d.for_each_element(|d, x| match x { +b"FieldDelimiter" => { +if field_delimiter.is_some() { return Err(DeError::DuplicateField); } +field_delimiter = Some(d.content()?); +Ok(()) +} +b"QuoteCharacter" => { +if quote_character.is_some() { return Err(DeError::DuplicateField); } +quote_character = Some(d.content()?); +Ok(()) +} +b"QuoteEscapeCharacter" => { +if quote_escape_character.is_some() { return Err(DeError::DuplicateField); } +quote_escape_character = Some(d.content()?); +Ok(()) +} +b"QuoteFields" => { +if quote_fields.is_some() { return Err(DeError::DuplicateField); } +quote_fields = Some(d.content()?); +Ok(()) +} +b"RecordDelimiter" => { +if record_delimiter.is_some() { return Err(DeError::DuplicateField); } +record_delimiter = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +field_delimiter, +quote_character, +quote_escape_character, +quote_fields, +record_delimiter, +}) +} } impl SerializeContent for Checksum { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Checksum { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut checksum_type: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - checksum_type, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut checksum_type: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +checksum_type, +}) +} } impl SerializeContent for ChecksumAlgorithm { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ChecksumAlgorithm { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"CRC32" => Ok(Self::from_static(ChecksumAlgorithm::CRC32)), - b"CRC32C" => Ok(Self::from_static(ChecksumAlgorithm::CRC32C)), - b"CRC64NVME" => Ok(Self::from_static(ChecksumAlgorithm::CRC64NVME)), - b"SHA1" => Ok(Self::from_static(ChecksumAlgorithm::SHA1)), - b"SHA256" => Ok(Self::from_static(ChecksumAlgorithm::SHA256)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"CRC32" => Ok(Self::from_static(ChecksumAlgorithm::CRC32)), +b"CRC32C" => Ok(Self::from_static(ChecksumAlgorithm::CRC32C)), +b"CRC64NVME" => Ok(Self::from_static(ChecksumAlgorithm::CRC64NVME)), +b"SHA1" => Ok(Self::from_static(ChecksumAlgorithm::SHA1)), +b"SHA256" => Ok(Self::from_static(ChecksumAlgorithm::SHA256)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ChecksumType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ChecksumType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"COMPOSITE" => Ok(Self::from_static(ChecksumType::COMPOSITE)), - b"FULL_OBJECT" => Ok(Self::from_static(ChecksumType::FULL_OBJECT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"COMPOSITE" => Ok(Self::from_static(ChecksumType::COMPOSITE)), +b"FULL_OBJECT" => Ok(Self::from_static(ChecksumType::FULL_OBJECT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for CommonPrefix { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CommonPrefix { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +}) +} } impl SerializeContent for CompleteMultipartUploadOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.location { - s.content("Location", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.location { +s.content("Location", val)?; +} +Ok(()) +} } impl SerializeContent for CompletedMultipartUpload { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.parts { - s.flattened_list("Part", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.parts { +s.flattened_list("Part", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CompletedMultipartUpload { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut parts: Option = None; - d.for_each_element(|d, x| match x { - b"Part" => { - let ans: CompletedPart = d.content()?; - parts.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { parts }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut parts: Option = None; +d.for_each_element(|d, x| match x { +b"Part" => { +let ans: CompletedPart = d.content()?; +parts.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +parts, +}) +} } impl SerializeContent for CompletedPart { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.part_number { - s.content("PartNumber", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.part_number { +s.content("PartNumber", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CompletedPart { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut e_tag: Option = None; - let mut part_number: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"PartNumber" => { - if part_number.is_some() { - return Err(DeError::DuplicateField); - } - part_number = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - e_tag, - part_number, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut e_tag: Option = None; +let mut part_number: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"PartNumber" => { +if part_number.is_some() { return Err(DeError::DuplicateField); } +part_number = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +e_tag, +part_number, +}) +} } impl SerializeContent for CompressionType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for CompressionType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"BZIP2" => Ok(Self::from_static(CompressionType::BZIP2)), - b"GZIP" => Ok(Self::from_static(CompressionType::GZIP)), - b"NONE" => Ok(Self::from_static(CompressionType::NONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"BZIP2" => Ok(Self::from_static(CompressionType::BZIP2)), +b"GZIP" => Ok(Self::from_static(CompressionType::GZIP)), +b"NONE" => Ok(Self::from_static(CompressionType::NONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Condition { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.http_error_code_returned_equals { - s.content("HttpErrorCodeReturnedEquals", val)?; - } - if let Some(ref val) = self.key_prefix_equals { - s.content("KeyPrefixEquals", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.http_error_code_returned_equals { +s.content("HttpErrorCodeReturnedEquals", val)?; +} +if let Some(ref val) = self.key_prefix_equals { +s.content("KeyPrefixEquals", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Condition { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut http_error_code_returned_equals: Option = None; - let mut key_prefix_equals: Option = None; - d.for_each_element(|d, x| match x { - b"HttpErrorCodeReturnedEquals" => { - if http_error_code_returned_equals.is_some() { - return Err(DeError::DuplicateField); - } - http_error_code_returned_equals = Some(d.content()?); - Ok(()) - } - b"KeyPrefixEquals" => { - if key_prefix_equals.is_some() { - return Err(DeError::DuplicateField); - } - key_prefix_equals = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - http_error_code_returned_equals, - key_prefix_equals, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut http_error_code_returned_equals: Option = None; +let mut key_prefix_equals: Option = None; +d.for_each_element(|d, x| match x { +b"HttpErrorCodeReturnedEquals" => { +if http_error_code_returned_equals.is_some() { return Err(DeError::DuplicateField); } +http_error_code_returned_equals = Some(d.content()?); +Ok(()) +} +b"KeyPrefixEquals" => { +if key_prefix_equals.is_some() { return Err(DeError::DuplicateField); } +key_prefix_equals = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +http_error_code_returned_equals, +key_prefix_equals, +}) +} } impl SerializeContent for CopyObjectResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CopyObjectResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut checksum_type: Option = None; - let mut e_tag: Option = None; - let mut last_modified: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - checksum_type, - e_tag, - last_modified, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut checksum_type: Option = None; +let mut e_tag: Option = None; +let mut last_modified: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +checksum_type, +e_tag, +last_modified, +}) +} } impl SerializeContent for CopyPartResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CopyPartResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut e_tag: Option = None; - let mut last_modified: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - e_tag, - last_modified, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut e_tag: Option = None; +let mut last_modified: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +e_tag, +last_modified, +}) +} } impl SerializeContent for CreateBucketConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(ref val) = self.location { - s.content("Location", val)?; - } - if let Some(ref val) = self.location_constraint { - s.content("LocationConstraint", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(ref val) = self.location { +s.content("Location", val)?; +} +if let Some(ref val) = self.location_constraint { +s.content("LocationConstraint", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for CreateBucketConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bucket: Option = None; - let mut location: Option = None; - let mut location_constraint: Option = None; - d.for_each_element(|d, x| match x { - b"Bucket" => { - if bucket.is_some() { - return Err(DeError::DuplicateField); - } - bucket = Some(d.content()?); - Ok(()) - } - b"Location" => { - if location.is_some() { - return Err(DeError::DuplicateField); - } - location = Some(d.content()?); - Ok(()) - } - b"LocationConstraint" => { - if location_constraint.is_some() { - return Err(DeError::DuplicateField); - } - location_constraint = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bucket, - location, - location_constraint, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bucket: Option = None; +let mut location: Option = None; +let mut location_constraint: Option = None; +d.for_each_element(|d, x| match x { +b"Bucket" => { +if bucket.is_some() { return Err(DeError::DuplicateField); } +bucket = Some(d.content()?); +Ok(()) +} +b"Location" => { +if location.is_some() { return Err(DeError::DuplicateField); } +location = Some(d.content()?); +Ok(()) +} +b"LocationConstraint" => { +if location_constraint.is_some() { return Err(DeError::DuplicateField); } +location_constraint = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bucket, +location, +location_constraint, +}) +} } impl SerializeContent for CreateMultipartUploadOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.upload_id { - s.content("UploadId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.upload_id { +s.content("UploadId", val)?; +} +Ok(()) +} } impl SerializeContent for CreateSessionOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Credentials", &self.credentials)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Credentials", &self.credentials)?; +Ok(()) +} } impl SerializeContent for Credentials { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("AccessKeyId", &self.access_key_id)?; - s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; - s.content("SecretAccessKey", &self.secret_access_key)?; - s.content("SessionToken", &self.session_token)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("AccessKeyId", &self.access_key_id)?; +s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; +s.content("SecretAccessKey", &self.secret_access_key)?; +s.content("SessionToken", &self.session_token)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Credentials { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_key_id: Option = None; - let mut expiration: Option = None; - let mut secret_access_key: Option = None; - let mut session_token: Option = None; - d.for_each_element(|d, x| match x { - b"AccessKeyId" => { - if access_key_id.is_some() { - return Err(DeError::DuplicateField); - } - access_key_id = Some(d.content()?); - Ok(()) - } - b"Expiration" => { - if expiration.is_some() { - return Err(DeError::DuplicateField); - } - expiration = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"SecretAccessKey" => { - if secret_access_key.is_some() { - return Err(DeError::DuplicateField); - } - secret_access_key = Some(d.content()?); - Ok(()) - } - b"SessionToken" => { - if session_token.is_some() { - return Err(DeError::DuplicateField); - } - session_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_key_id: access_key_id.ok_or(DeError::MissingField)?, - expiration: expiration.ok_or(DeError::MissingField)?, - secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, - session_token: session_token.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_key_id: Option = None; +let mut expiration: Option = None; +let mut secret_access_key: Option = None; +let mut session_token: Option = None; +d.for_each_element(|d, x| match x { +b"AccessKeyId" => { +if access_key_id.is_some() { return Err(DeError::DuplicateField); } +access_key_id = Some(d.content()?); +Ok(()) +} +b"Expiration" => { +if expiration.is_some() { return Err(DeError::DuplicateField); } +expiration = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"SecretAccessKey" => { +if secret_access_key.is_some() { return Err(DeError::DuplicateField); } +secret_access_key = Some(d.content()?); +Ok(()) +} +b"SessionToken" => { +if session_token.is_some() { return Err(DeError::DuplicateField); } +session_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_key_id: access_key_id.ok_or(DeError::MissingField)?, +expiration: expiration.ok_or(DeError::MissingField)?, +secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, +session_token: session_token.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for DataRedundancy { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for DataRedundancy { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"SingleAvailabilityZone" => Ok(Self::from_static(DataRedundancy::SINGLE_AVAILABILITY_ZONE)), - b"SingleLocalZone" => Ok(Self::from_static(DataRedundancy::SINGLE_LOCAL_ZONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"SingleAvailabilityZone" => Ok(Self::from_static(DataRedundancy::SINGLE_AVAILABILITY_ZONE)), +b"SingleLocalZone" => Ok(Self::from_static(DataRedundancy::SINGLE_LOCAL_ZONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for DefaultRetention { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.days { - s.content("Days", val)?; - } - if let Some(ref val) = self.mode { - s.content("Mode", val)?; - } - if let Some(ref val) = self.years { - s.content("Years", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +if let Some(ref val) = self.mode { +s.content("Mode", val)?; +} +if let Some(ref val) = self.years { +s.content("Years", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DefaultRetention { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut days: Option = None; - let mut mode: Option = None; - let mut years: Option = None; - d.for_each_element(|d, x| match x { - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - b"Mode" => { - if mode.is_some() { - return Err(DeError::DuplicateField); - } - mode = Some(d.content()?); - Ok(()) - } - b"Years" => { - if years.is_some() { - return Err(DeError::DuplicateField); - } - years = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { days, mode, years }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut days: Option = None; +let mut mode: Option = None; +let mut years: Option = None; +d.for_each_element(|d, x| match x { +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +b"Mode" => { +if mode.is_some() { return Err(DeError::DuplicateField); } +mode = Some(d.content()?); +Ok(()) +} +b"Years" => { +if years.is_some() { return Err(DeError::DuplicateField); } +years = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +days, +mode, +years, +}) +} } impl SerializeContent for Delete { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.objects; - s.flattened_list("Object", iter)?; - } - if let Some(ref val) = self.quiet { - s.content("Quiet", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.objects; +s.flattened_list("Object", iter)?; +} +if let Some(ref val) = self.quiet { +s.content("Quiet", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Delete { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut objects: Option = None; - let mut quiet: Option = None; - d.for_each_element(|d, x| match x { - b"Object" => { - let ans: ObjectIdentifier = d.content()?; - objects.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Quiet" => { - if quiet.is_some() { - return Err(DeError::DuplicateField); - } - quiet = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - objects: objects.ok_or(DeError::MissingField)?, - quiet, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut objects: Option = None; +let mut quiet: Option = None; +d.for_each_element(|d, x| match x { +b"Object" => { +let ans: ObjectIdentifier = d.content()?; +objects.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Quiet" => { +if quiet.is_some() { return Err(DeError::DuplicateField); } +quiet = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +objects: objects.ok_or(DeError::MissingField)?, +quiet, +}) +} } impl SerializeContent for DeleteMarkerEntry { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.is_latest { - s.content("IsLatest", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.is_latest { +s.content("IsLatest", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DeleteMarkerEntry { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut is_latest: Option = None; - let mut key: Option = None; - let mut last_modified: Option = None; - let mut owner: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"IsLatest" => { - if is_latest.is_some() { - return Err(DeError::DuplicateField); - } - is_latest = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - is_latest, - key, - last_modified, - owner, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut is_latest: Option = None; +let mut key: Option = None; +let mut last_modified: Option = None; +let mut owner: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"IsLatest" => { +if is_latest.is_some() { return Err(DeError::DuplicateField); } +is_latest = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +is_latest, +key, +last_modified, +owner, +version_id, +}) +} } impl SerializeContent for DeleteMarkerReplication { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DeleteMarkerReplication { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status, +}) +} } impl SerializeContent for DeleteMarkerReplicationStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for DeleteMarkerReplicationStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for DeleteObjectsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.deleted { - s.flattened_list("Deleted", iter)?; - } - if let Some(iter) = &self.errors { - s.flattened_list("Error", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.deleted { +s.flattened_list("Deleted", iter)?; +} +if let Some(iter) = &self.errors { +s.flattened_list("Error", iter)?; +} +Ok(()) +} } impl SerializeContent for DeletedObject { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.delete_marker { - s.content("DeleteMarker", val)?; - } - if let Some(ref val) = self.delete_marker_version_id { - s.content("DeleteMarkerVersionId", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.delete_marker { +s.content("DeleteMarker", val)?; +} +if let Some(ref val) = self.delete_marker_version_id { +s.content("DeleteMarkerVersionId", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for DeletedObject { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut delete_marker: Option = None; - let mut delete_marker_version_id: Option = None; - let mut key: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"DeleteMarker" => { - if delete_marker.is_some() { - return Err(DeError::DuplicateField); - } - delete_marker = Some(d.content()?); - Ok(()) - } - b"DeleteMarkerVersionId" => { - if delete_marker_version_id.is_some() { - return Err(DeError::DuplicateField); - } - delete_marker_version_id = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - delete_marker, - delete_marker_version_id, - key, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut delete_marker: Option = None; +let mut delete_marker_version_id: Option = None; +let mut key: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"DeleteMarker" => { +if delete_marker.is_some() { return Err(DeError::DuplicateField); } +delete_marker = Some(d.content()?); +Ok(()) +} +b"DeleteMarkerVersionId" => { +if delete_marker_version_id.is_some() { return Err(DeError::DuplicateField); } +delete_marker_version_id = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +delete_marker, +delete_marker_version_id, +key, +version_id, +}) +} } impl SerializeContent for Destination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.access_control_translation { - s.content("AccessControlTranslation", val)?; - } - if let Some(ref val) = self.account { - s.content("Account", val)?; - } - s.content("Bucket", &self.bucket)?; - if let Some(ref val) = self.encryption_configuration { - s.content("EncryptionConfiguration", val)?; - } - if let Some(ref val) = self.metrics { - s.content("Metrics", val)?; - } - if let Some(ref val) = self.replication_time { - s.content("ReplicationTime", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.access_control_translation { +s.content("AccessControlTranslation", val)?; } - -impl<'xml> DeserializeContent<'xml> for Destination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_control_translation: Option = None; - let mut account: Option = None; - let mut bucket: Option = None; - let mut encryption_configuration: Option = None; - let mut metrics: Option = None; - let mut replication_time: Option = None; - let mut storage_class: Option = None; - d.for_each_element(|d, x| match x { - b"AccessControlTranslation" => { - if access_control_translation.is_some() { - return Err(DeError::DuplicateField); - } - access_control_translation = Some(d.content()?); - Ok(()) - } - b"Account" => { - if account.is_some() { - return Err(DeError::DuplicateField); - } - account = Some(d.content()?); - Ok(()) - } - b"Bucket" => { - if bucket.is_some() { - return Err(DeError::DuplicateField); - } - bucket = Some(d.content()?); - Ok(()) - } - b"EncryptionConfiguration" => { - if encryption_configuration.is_some() { - return Err(DeError::DuplicateField); - } - encryption_configuration = Some(d.content()?); - Ok(()) - } - b"Metrics" => { - if metrics.is_some() { - return Err(DeError::DuplicateField); - } - metrics = Some(d.content()?); - Ok(()) - } - b"ReplicationTime" => { - if replication_time.is_some() { - return Err(DeError::DuplicateField); - } - replication_time = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_control_translation, - account, - bucket: bucket.ok_or(DeError::MissingField)?, - encryption_configuration, - metrics, - replication_time, - storage_class, - }) - } +if let Some(ref val) = self.account { +s.content("Account", val)?; } -impl SerializeContent for EncodingType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +s.content("Bucket", &self.bucket)?; +if let Some(ref val) = self.encryption_configuration { +s.content("EncryptionConfiguration", val)?; } -impl<'xml> DeserializeContent<'xml> for EncodingType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"url" => Ok(Self::from_static(EncodingType::URL)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +if let Some(ref val) = self.metrics { +s.content("Metrics", val)?; +} +if let Some(ref val) = self.replication_time { +s.content("ReplicationTime", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} +} + +impl<'xml> DeserializeContent<'xml> for Destination { +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_control_translation: Option = None; +let mut account: Option = None; +let mut bucket: Option = None; +let mut encryption_configuration: Option = None; +let mut metrics: Option = None; +let mut replication_time: Option = None; +let mut storage_class: Option = None; +d.for_each_element(|d, x| match x { +b"AccessControlTranslation" => { +if access_control_translation.is_some() { return Err(DeError::DuplicateField); } +access_control_translation = Some(d.content()?); +Ok(()) +} +b"Account" => { +if account.is_some() { return Err(DeError::DuplicateField); } +account = Some(d.content()?); +Ok(()) +} +b"Bucket" => { +if bucket.is_some() { return Err(DeError::DuplicateField); } +bucket = Some(d.content()?); +Ok(()) +} +b"EncryptionConfiguration" => { +if encryption_configuration.is_some() { return Err(DeError::DuplicateField); } +encryption_configuration = Some(d.content()?); +Ok(()) +} +b"Metrics" => { +if metrics.is_some() { return Err(DeError::DuplicateField); } +metrics = Some(d.content()?); +Ok(()) +} +b"ReplicationTime" => { +if replication_time.is_some() { return Err(DeError::DuplicateField); } +replication_time = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_control_translation, +account, +bucket: bucket.ok_or(DeError::MissingField)?, +encryption_configuration, +metrics, +replication_time, +storage_class, +}) +} +} +impl SerializeContent for EncodingType { +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} +} +impl<'xml> DeserializeContent<'xml> for EncodingType { +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"url" => Ok(Self::from_static(EncodingType::URL)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Encryption { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("EncryptionType", &self.encryption_type)?; - if let Some(ref val) = self.kms_context { - s.content("KMSContext", val)?; - } - if let Some(ref val) = self.kms_key_id { - s.content("KMSKeyId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("EncryptionType", &self.encryption_type)?; +if let Some(ref val) = self.kms_context { +s.content("KMSContext", val)?; +} +if let Some(ref val) = self.kms_key_id { +s.content("KMSKeyId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Encryption { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut encryption_type: Option = None; - let mut kms_context: Option = None; - let mut kms_key_id: Option = None; - d.for_each_element(|d, x| match x { - b"EncryptionType" => { - if encryption_type.is_some() { - return Err(DeError::DuplicateField); - } - encryption_type = Some(d.content()?); - Ok(()) - } - b"KMSContext" => { - if kms_context.is_some() { - return Err(DeError::DuplicateField); - } - kms_context = Some(d.content()?); - Ok(()) - } - b"KMSKeyId" => { - if kms_key_id.is_some() { - return Err(DeError::DuplicateField); - } - kms_key_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - encryption_type: encryption_type.ok_or(DeError::MissingField)?, - kms_context, - kms_key_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut encryption_type: Option = None; +let mut kms_context: Option = None; +let mut kms_key_id: Option = None; +d.for_each_element(|d, x| match x { +b"EncryptionType" => { +if encryption_type.is_some() { return Err(DeError::DuplicateField); } +encryption_type = Some(d.content()?); +Ok(()) +} +b"KMSContext" => { +if kms_context.is_some() { return Err(DeError::DuplicateField); } +kms_context = Some(d.content()?); +Ok(()) +} +b"KMSKeyId" => { +if kms_key_id.is_some() { return Err(DeError::DuplicateField); } +kms_key_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +encryption_type: encryption_type.ok_or(DeError::MissingField)?, +kms_context, +kms_key_id, +}) +} } impl SerializeContent for EncryptionConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.replica_kms_key_id { - s.content("ReplicaKmsKeyID", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.replica_kms_key_id { +s.content("ReplicaKmsKeyID", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for EncryptionConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut replica_kms_key_id: Option = None; - d.for_each_element(|d, x| match x { - b"ReplicaKmsKeyID" => { - if replica_kms_key_id.is_some() { - return Err(DeError::DuplicateField); - } - replica_kms_key_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { replica_kms_key_id }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut replica_kms_key_id: Option = None; +d.for_each_element(|d, x| match x { +b"ReplicaKmsKeyID" => { +if replica_kms_key_id.is_some() { return Err(DeError::DuplicateField); } +replica_kms_key_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +replica_kms_key_id, +}) +} } impl SerializeContent for Error { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.code { - s.content("Code", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.message { - s.content("Message", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.code { +s.content("Code", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.message { +s.content("Message", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Error { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut code: Option = None; - let mut key: Option = None; - let mut message: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"Code" => { - if code.is_some() { - return Err(DeError::DuplicateField); - } - code = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"Message" => { - if message.is_some() { - return Err(DeError::DuplicateField); - } - message = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - code, - key, - message, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut code: Option = None; +let mut key: Option = None; +let mut message: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"Code" => { +if code.is_some() { return Err(DeError::DuplicateField); } +code = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"Message" => { +if message.is_some() { return Err(DeError::DuplicateField); } +message = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +code, +key, +message, +version_id, +}) +} } impl SerializeContent for ErrorDetails { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.error_code { - s.content("ErrorCode", val)?; - } - if let Some(ref val) = self.error_message { - s.content("ErrorMessage", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.error_code { +s.content("ErrorCode", val)?; +} +if let Some(ref val) = self.error_message { +s.content("ErrorMessage", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ErrorDetails { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut error_code: Option = None; - let mut error_message: Option = None; - d.for_each_element(|d, x| match x { - b"ErrorCode" => { - if error_code.is_some() { - return Err(DeError::DuplicateField); - } - error_code = Some(d.content()?); - Ok(()) - } - b"ErrorMessage" => { - if error_message.is_some() { - return Err(DeError::DuplicateField); - } - error_message = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - error_code, - error_message, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut error_code: Option = None; +let mut error_message: Option = None; +d.for_each_element(|d, x| match x { +b"ErrorCode" => { +if error_code.is_some() { return Err(DeError::DuplicateField); } +error_code = Some(d.content()?); +Ok(()) +} +b"ErrorMessage" => { +if error_message.is_some() { return Err(DeError::DuplicateField); } +error_message = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +error_code, +error_message, +}) +} } impl SerializeContent for ErrorDocument { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Key", &self.key)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Key", &self.key)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ErrorDocument { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut key: Option = None; - d.for_each_element(|d, x| match x { - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - key: key.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut key: Option = None; +d.for_each_element(|d, x| match x { +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +key: key.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for EventBridgeConfiguration { - fn serialize_content(&self, _: &mut Serializer) -> SerResult { - Ok(()) - } +fn serialize_content(&self, _: &mut Serializer) -> SerResult { +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for EventBridgeConfiguration { - fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { - Ok(Self {}) - } +fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { +Ok(Self { +}) +} } impl SerializeContent for ExistingObjectReplication { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ExistingObjectReplication { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ExistingObjectReplicationStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ExistingObjectReplicationStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ExpirationStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ExpirationStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ExpirationStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ExpirationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ExpirationStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ExpirationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ExpressionType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ExpressionType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"SQL" => Ok(Self::from_static(ExpressionType::SQL)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"SQL" => Ok(Self::from_static(ExpressionType::SQL)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for FileHeaderInfo { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for FileHeaderInfo { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"IGNORE" => Ok(Self::from_static(FileHeaderInfo::IGNORE)), - b"NONE" => Ok(Self::from_static(FileHeaderInfo::NONE)), - b"USE" => Ok(Self::from_static(FileHeaderInfo::USE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"IGNORE" => Ok(Self::from_static(FileHeaderInfo::IGNORE)), +b"NONE" => Ok(Self::from_static(FileHeaderInfo::NONE)), +b"USE" => Ok(Self::from_static(FileHeaderInfo::USE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for FilterRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.value { - s.content("Value", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.value { +s.content("Value", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for FilterRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut name: Option = None; - let mut value: Option = None; - d.for_each_element(|d, x| match x { - b"Name" => { - if name.is_some() { - return Err(DeError::DuplicateField); - } - name = Some(d.content()?); - Ok(()) - } - b"Value" => { - if value.is_some() { - return Err(DeError::DuplicateField); - } - value = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { name, value }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut name: Option = None; +let mut value: Option = None; +d.for_each_element(|d, x| match x { +b"Name" => { +if name.is_some() { return Err(DeError::DuplicateField); } +name = Some(d.content()?); +Ok(()) +} +b"Value" => { +if value.is_some() { return Err(DeError::DuplicateField); } +value = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +name, +value, +}) +} } impl SerializeContent for FilterRuleName { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for FilterRuleName { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"prefix" => Ok(Self::from_static(FilterRuleName::PREFIX)), - b"suffix" => Ok(Self::from_static(FilterRuleName::SUFFIX)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"prefix" => Ok(Self::from_static(FilterRuleName::PREFIX)), +b"suffix" => Ok(Self::from_static(FilterRuleName::SUFFIX)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for GetBucketAccelerateConfigurationOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl SerializeContent for GetBucketAclOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.grants { - s.list("AccessControlList", "Grant", iter)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.grants { +s.list("AccessControlList", "Grant", iter)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketAclOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut grants: Option = None; - let mut owner: Option = None; - d.for_each_element(|d, x| match x { - b"AccessControlList" => { - if grants.is_some() { - return Err(DeError::DuplicateField); - } - grants = Some(d.list_content("Grant")?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { grants, owner }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut grants: Option = None; +let mut owner: Option = None; +d.for_each_element(|d, x| match x { +b"AccessControlList" => { +if grants.is_some() { return Err(DeError::DuplicateField); } +grants = Some(d.list_content("Grant")?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +grants, +owner, +}) +} } impl SerializeContent for GetBucketCorsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.cors_rules { - s.flattened_list("CORSRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.cors_rules { +s.flattened_list("CORSRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketCorsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut cors_rules: Option = None; - d.for_each_element(|d, x| match x { - b"CORSRule" => { - let ans: CORSRule = d.content()?; - cors_rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { cors_rules }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut cors_rules: Option = None; +d.for_each_element(|d, x| match x { +b"CORSRule" => { +let ans: CORSRule = d.content()?; +cors_rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +cors_rules, +}) +} } impl SerializeContent for GetBucketLifecycleConfigurationOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.rules { - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.rules { +s.flattened_list("Rule", iter)?; +} +Ok(()) +} } impl SerializeContent for GetBucketLocationOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.location_constraint { - s.content("LocationConstraint", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.location_constraint { +s.content("LocationConstraint", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketLocationOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut location_constraint: Option = None; - d.for_each_element(|d, x| match x { - b"LocationConstraint" => { - if location_constraint.is_some() { - return Err(DeError::DuplicateField); - } - location_constraint = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { location_constraint }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut location_constraint: Option = None; +d.for_each_element(|d, x| match x { +b"LocationConstraint" => { +if location_constraint.is_some() { return Err(DeError::DuplicateField); } +location_constraint = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +location_constraint, +}) +} } impl SerializeContent for GetBucketLoggingOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.logging_enabled { - s.content("LoggingEnabled", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.logging_enabled { +s.content("LoggingEnabled", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketLoggingOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut logging_enabled: Option = None; - d.for_each_element(|d, x| match x { - b"LoggingEnabled" => { - if logging_enabled.is_some() { - return Err(DeError::DuplicateField); - } - logging_enabled = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { logging_enabled }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut logging_enabled: Option = None; +d.for_each_element(|d, x| match x { +b"LoggingEnabled" => { +if logging_enabled.is_some() { return Err(DeError::DuplicateField); } +logging_enabled = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +logging_enabled, +}) +} } impl SerializeContent for GetBucketMetadataTableConfigurationResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.error { - s.content("Error", val)?; - } - s.content("MetadataTableConfigurationResult", &self.metadata_table_configuration_result)?; - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.error { +s.content("Error", val)?; +} +s.content("MetadataTableConfigurationResult", &self.metadata_table_configuration_result)?; +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketMetadataTableConfigurationResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut error: Option = None; - let mut metadata_table_configuration_result: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Error" => { - if error.is_some() { - return Err(DeError::DuplicateField); - } - error = Some(d.content()?); - Ok(()) - } - b"MetadataTableConfigurationResult" => { - if metadata_table_configuration_result.is_some() { - return Err(DeError::DuplicateField); - } - metadata_table_configuration_result = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - error, - metadata_table_configuration_result: metadata_table_configuration_result.ok_or(DeError::MissingField)?, - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut error: Option = None; +let mut metadata_table_configuration_result: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Error" => { +if error.is_some() { return Err(DeError::DuplicateField); } +error = Some(d.content()?); +Ok(()) +} +b"MetadataTableConfigurationResult" => { +if metadata_table_configuration_result.is_some() { return Err(DeError::DuplicateField); } +metadata_table_configuration_result = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +error, +metadata_table_configuration_result: metadata_table_configuration_result.ok_or(DeError::MissingField)?, +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for GetBucketNotificationConfigurationOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.event_bridge_configuration { - s.content("EventBridgeConfiguration", val)?; - } - if let Some(iter) = &self.lambda_function_configurations { - s.flattened_list("CloudFunctionConfiguration", iter)?; - } - if let Some(iter) = &self.queue_configurations { - s.flattened_list("QueueConfiguration", iter)?; - } - if let Some(iter) = &self.topic_configurations { - s.flattened_list("TopicConfiguration", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.event_bridge_configuration { +s.content("EventBridgeConfiguration", val)?; +} +if let Some(iter) = &self.lambda_function_configurations { +s.flattened_list("CloudFunctionConfiguration", iter)?; +} +if let Some(iter) = &self.queue_configurations { +s.flattened_list("QueueConfiguration", iter)?; +} +if let Some(iter) = &self.topic_configurations { +s.flattened_list("TopicConfiguration", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketNotificationConfigurationOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut event_bridge_configuration: Option = None; - let mut lambda_function_configurations: Option = None; - let mut queue_configurations: Option = None; - let mut topic_configurations: Option = None; - d.for_each_element(|d, x| match x { - b"EventBridgeConfiguration" => { - if event_bridge_configuration.is_some() { - return Err(DeError::DuplicateField); - } - event_bridge_configuration = Some(d.content()?); - Ok(()) - } - b"CloudFunctionConfiguration" => { - let ans: LambdaFunctionConfiguration = d.content()?; - lambda_function_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"QueueConfiguration" => { - let ans: QueueConfiguration = d.content()?; - queue_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"TopicConfiguration" => { - let ans: TopicConfiguration = d.content()?; - topic_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - event_bridge_configuration, - lambda_function_configurations, - queue_configurations, - topic_configurations, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut event_bridge_configuration: Option = None; +let mut lambda_function_configurations: Option = None; +let mut queue_configurations: Option = None; +let mut topic_configurations: Option = None; +d.for_each_element(|d, x| match x { +b"EventBridgeConfiguration" => { +if event_bridge_configuration.is_some() { return Err(DeError::DuplicateField); } +event_bridge_configuration = Some(d.content()?); +Ok(()) +} +b"CloudFunctionConfiguration" => { +let ans: LambdaFunctionConfiguration = d.content()?; +lambda_function_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"QueueConfiguration" => { +let ans: QueueConfiguration = d.content()?; +queue_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"TopicConfiguration" => { +let ans: TopicConfiguration = d.content()?; +topic_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +event_bridge_configuration, +lambda_function_configurations, +queue_configurations, +topic_configurations, +}) +} } impl SerializeContent for GetBucketRequestPaymentOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.payer { - s.content("Payer", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.payer { +s.content("Payer", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketRequestPaymentOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut payer: Option = None; - d.for_each_element(|d, x| match x { - b"Payer" => { - if payer.is_some() { - return Err(DeError::DuplicateField); - } - payer = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { payer }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut payer: Option = None; +d.for_each_element(|d, x| match x { +b"Payer" => { +if payer.is_some() { return Err(DeError::DuplicateField); } +payer = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +payer, +}) +} } impl SerializeContent for GetBucketTaggingOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.tag_set; - s.list("TagSet", "Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.tag_set; +s.list("TagSet", "Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketTaggingOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut tag_set: Option = None; - d.for_each_element(|d, x| match x { - b"TagSet" => { - if tag_set.is_some() { - return Err(DeError::DuplicateField); - } - tag_set = Some(d.list_content("Tag")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - tag_set: tag_set.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut tag_set: Option = None; +d.for_each_element(|d, x| match x { +b"TagSet" => { +if tag_set.is_some() { return Err(DeError::DuplicateField); } +tag_set = Some(d.list_content("Tag")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +tag_set: tag_set.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for GetBucketVersioningOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.mfa_delete { - s.content("MfaDelete", val)?; - } - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.mfa_delete { +s.content("MfaDelete", val)?; +} +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketVersioningOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut mfa_delete: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"MfaDelete" => { - if mfa_delete.is_some() { - return Err(DeError::DuplicateField); - } - mfa_delete = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { mfa_delete, status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut mfa_delete: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"MfaDelete" => { +if mfa_delete.is_some() { return Err(DeError::DuplicateField); } +mfa_delete = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +mfa_delete, +status, +}) +} } impl SerializeContent for GetBucketWebsiteOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.error_document { - s.content("ErrorDocument", val)?; - } - if let Some(ref val) = self.index_document { - s.content("IndexDocument", val)?; - } - if let Some(ref val) = self.redirect_all_requests_to { - s.content("RedirectAllRequestsTo", val)?; - } - if let Some(iter) = &self.routing_rules { - s.list("RoutingRules", "RoutingRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.error_document { +s.content("ErrorDocument", val)?; +} +if let Some(ref val) = self.index_document { +s.content("IndexDocument", val)?; +} +if let Some(ref val) = self.redirect_all_requests_to { +s.content("RedirectAllRequestsTo", val)?; +} +if let Some(iter) = &self.routing_rules { +s.list("RoutingRules", "RoutingRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetBucketWebsiteOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut error_document: Option = None; - let mut index_document: Option = None; - let mut redirect_all_requests_to: Option = None; - let mut routing_rules: Option = None; - d.for_each_element(|d, x| match x { - b"ErrorDocument" => { - if error_document.is_some() { - return Err(DeError::DuplicateField); - } - error_document = Some(d.content()?); - Ok(()) - } - b"IndexDocument" => { - if index_document.is_some() { - return Err(DeError::DuplicateField); - } - index_document = Some(d.content()?); - Ok(()) - } - b"RedirectAllRequestsTo" => { - if redirect_all_requests_to.is_some() { - return Err(DeError::DuplicateField); - } - redirect_all_requests_to = Some(d.content()?); - Ok(()) - } - b"RoutingRules" => { - if routing_rules.is_some() { - return Err(DeError::DuplicateField); - } - routing_rules = Some(d.list_content("RoutingRule")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - error_document, - index_document, - redirect_all_requests_to, - routing_rules, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut error_document: Option = None; +let mut index_document: Option = None; +let mut redirect_all_requests_to: Option = None; +let mut routing_rules: Option = None; +d.for_each_element(|d, x| match x { +b"ErrorDocument" => { +if error_document.is_some() { return Err(DeError::DuplicateField); } +error_document = Some(d.content()?); +Ok(()) +} +b"IndexDocument" => { +if index_document.is_some() { return Err(DeError::DuplicateField); } +index_document = Some(d.content()?); +Ok(()) +} +b"RedirectAllRequestsTo" => { +if redirect_all_requests_to.is_some() { return Err(DeError::DuplicateField); } +redirect_all_requests_to = Some(d.content()?); +Ok(()) +} +b"RoutingRules" => { +if routing_rules.is_some() { return Err(DeError::DuplicateField); } +routing_rules = Some(d.list_content("RoutingRule")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +error_document, +index_document, +redirect_all_requests_to, +routing_rules, +}) +} } impl SerializeContent for GetObjectAclOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.grants { - s.list("AccessControlList", "Grant", iter)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.grants { +s.list("AccessControlList", "Grant", iter)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +Ok(()) +} } impl SerializeContent for GetObjectAttributesOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum { - s.content("Checksum", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.object_parts { - s.content("ObjectParts", val)?; - } - if let Some(ref val) = self.object_size { - s.content("ObjectSize", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum { +s.content("Checksum", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.object_parts { +s.content("ObjectParts", val)?; +} +if let Some(ref val) = self.object_size { +s.content("ObjectSize", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl SerializeContent for GetObjectAttributesParts { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.max_parts { - s.content("MaxParts", val)?; - } - if let Some(ref val) = self.next_part_number_marker { - s.content("NextPartNumberMarker", val)?; - } - if let Some(ref val) = self.part_number_marker { - s.content("PartNumberMarker", val)?; - } - if let Some(iter) = &self.parts { - s.flattened_list("Part", iter)?; - } - if let Some(ref val) = self.total_parts_count { - s.content("PartsCount", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.max_parts { +s.content("MaxParts", val)?; +} +if let Some(ref val) = self.next_part_number_marker { +s.content("NextPartNumberMarker", val)?; +} +if let Some(ref val) = self.part_number_marker { +s.content("PartNumberMarker", val)?; +} +if let Some(iter) = &self.parts { +s.flattened_list("Part", iter)?; +} +if let Some(ref val) = self.total_parts_count { +s.content("PartsCount", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GetObjectAttributesParts { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut is_truncated: Option = None; - let mut max_parts: Option = None; - let mut next_part_number_marker: Option = None; - let mut part_number_marker: Option = None; - let mut parts: Option = None; - let mut total_parts_count: Option = None; - d.for_each_element(|d, x| match x { - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"MaxParts" => { - if max_parts.is_some() { - return Err(DeError::DuplicateField); - } - max_parts = Some(d.content()?); - Ok(()) - } - b"NextPartNumberMarker" => { - if next_part_number_marker.is_some() { - return Err(DeError::DuplicateField); - } - next_part_number_marker = Some(d.content()?); - Ok(()) - } - b"PartNumberMarker" => { - if part_number_marker.is_some() { - return Err(DeError::DuplicateField); - } - part_number_marker = Some(d.content()?); - Ok(()) - } - b"Part" => { - let ans: ObjectPart = d.content()?; - parts.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"PartsCount" => { - if total_parts_count.is_some() { - return Err(DeError::DuplicateField); - } - total_parts_count = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - is_truncated, - max_parts, - next_part_number_marker, - part_number_marker, - parts, - total_parts_count, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut is_truncated: Option = None; +let mut max_parts: Option = None; +let mut next_part_number_marker: Option = None; +let mut part_number_marker: Option = None; +let mut parts: Option = None; +let mut total_parts_count: Option = None; +d.for_each_element(|d, x| match x { +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"MaxParts" => { +if max_parts.is_some() { return Err(DeError::DuplicateField); } +max_parts = Some(d.content()?); +Ok(()) +} +b"NextPartNumberMarker" => { +if next_part_number_marker.is_some() { return Err(DeError::DuplicateField); } +next_part_number_marker = Some(d.content()?); +Ok(()) +} +b"PartNumberMarker" => { +if part_number_marker.is_some() { return Err(DeError::DuplicateField); } +part_number_marker = Some(d.content()?); +Ok(()) +} +b"Part" => { +let ans: ObjectPart = d.content()?; +parts.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"PartsCount" => { +if total_parts_count.is_some() { return Err(DeError::DuplicateField); } +total_parts_count = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +is_truncated, +max_parts, +next_part_number_marker, +part_number_marker, +parts, +total_parts_count, +}) +} } impl SerializeContent for GetObjectTaggingOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.tag_set; - s.list("TagSet", "Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.tag_set; +s.list("TagSet", "Tag", iter)?; +} +Ok(()) +} } impl SerializeContent for GlacierJobParameters { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Tier", &self.tier)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Tier", &self.tier)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for GlacierJobParameters { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut tier: Option = None; - d.for_each_element(|d, x| match x { - b"Tier" => { - if tier.is_some() { - return Err(DeError::DuplicateField); - } - tier = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - tier: tier.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut tier: Option = None; +d.for_each_element(|d, x| match x { +b"Tier" => { +if tier.is_some() { return Err(DeError::DuplicateField); } +tier = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +tier: tier.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Grant { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.grantee { - let attrs = [ - ("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), - ("xsi:type", val.type_.as_str()), - ]; - s.content_with_attrs("Grantee", &attrs, val)?; - } - if let Some(ref val) = self.permission { - s.content("Permission", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.grantee { +let attrs = [ +("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), +("xsi:type", val.type_.as_str()), +]; +s.content_with_attrs("Grantee", &attrs, val)?; +} +if let Some(ref val) = self.permission { +s.content("Permission", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Grant { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut grantee: Option = None; - let mut permission: Option = None; - d.for_each_element_with_start(|d, x, start| match x { - b"Grantee" => { - if grantee.is_some() { - return Err(DeError::DuplicateField); - } - let mut type_: Option = None; - for attr in start.attributes() { - let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; - if attr.key.as_ref() == b"xsi:type" { - type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); - } - } - let mut display_name: Option = None; - let mut email_address: Option = None; - let mut id: Option = None; - let mut uri: Option = None; - d.for_each_element(|d, x| match x { - b"DisplayName" => { - if display_name.is_some() { - return Err(DeError::DuplicateField); - } - display_name = Some(d.content()?); - Ok(()) - } - b"EmailAddress" => { - if email_address.is_some() { - return Err(DeError::DuplicateField); - } - email_address = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"URI" => { - if uri.is_some() { - return Err(DeError::DuplicateField); - } - uri = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - grantee = Some(Grantee { - display_name, - email_address, - id, - type_: type_.ok_or(DeError::MissingField)?, - uri, - }); - Ok(()) - } - b"Permission" => { - if permission.is_some() { - return Err(DeError::DuplicateField); - } - permission = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { grantee, permission }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut grantee: Option = None; +let mut permission: Option = None; +d.for_each_element_with_start(|d, x, start| match x { +b"Grantee" => { +if grantee.is_some() { return Err(DeError::DuplicateField); } +let mut type_: Option = None; +for attr in start.attributes() { + let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; + if attr.key.as_ref() == b"xsi:type" { + type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); + } +} +let mut display_name: Option = None; +let mut email_address: Option = None; +let mut id: Option = None; +let mut uri: Option = None; +d.for_each_element(|d, x| match x { +b"DisplayName" => { + if display_name.is_some() { return Err(DeError::DuplicateField); } + display_name = Some(d.content()?); + Ok(()) +} +b"EmailAddress" => { + if email_address.is_some() { return Err(DeError::DuplicateField); } + email_address = Some(d.content()?); + Ok(()) +} +b"ID" => { + if id.is_some() { return Err(DeError::DuplicateField); } + id = Some(d.content()?); + Ok(()) +} +b"URI" => { + if uri.is_some() { return Err(DeError::DuplicateField); } + uri = Some(d.content()?); + Ok(()) +} +_ => Err(DeError::UnexpectedTagName), +})?; +grantee = Some(Grantee { +display_name, +email_address, +id, +type_: type_.ok_or(DeError::MissingField)?, +uri, +}); +Ok(()) +} +b"Permission" => { +if permission.is_some() { return Err(DeError::DuplicateField); } +permission = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +grantee, +permission, +}) +} } impl SerializeContent for Grantee { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.display_name { - s.content("DisplayName", val)?; - } - if let Some(ref val) = self.email_address { - s.content("EmailAddress", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - if let Some(ref val) = self.uri { - s.content("URI", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.display_name { +s.content("DisplayName", val)?; +} +if let Some(ref val) = self.email_address { +s.content("EmailAddress", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +if let Some(ref val) = self.uri { +s.content("URI", val)?; +} +Ok(()) +} } impl SerializeContent for IndexDocument { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Suffix", &self.suffix)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Suffix", &self.suffix)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for IndexDocument { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut suffix: Option = None; - d.for_each_element(|d, x| match x { - b"Suffix" => { - if suffix.is_some() { - return Err(DeError::DuplicateField); - } - suffix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - suffix: suffix.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut suffix: Option = None; +d.for_each_element(|d, x| match x { +b"Suffix" => { +if suffix.is_some() { return Err(DeError::DuplicateField); } +suffix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +suffix: suffix.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Initiator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.display_name { - s.content("DisplayName", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.display_name { +s.content("DisplayName", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Initiator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut display_name: Option = None; - let mut id: Option = None; - d.for_each_element(|d, x| match x { - b"DisplayName" => { - if display_name.is_some() { - return Err(DeError::DuplicateField); - } - display_name = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { display_name, id }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut display_name: Option = None; +let mut id: Option = None; +d.for_each_element(|d, x| match x { +b"DisplayName" => { +if display_name.is_some() { return Err(DeError::DuplicateField); } +display_name = Some(d.content()?); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +display_name, +id, +}) +} } impl SerializeContent for InputSerialization { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.csv { - s.content("CSV", val)?; - } - if let Some(ref val) = self.compression_type { - s.content("CompressionType", val)?; - } - if let Some(ref val) = self.json { - s.content("JSON", val)?; - } - if let Some(ref val) = self.parquet { - s.content("Parquet", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.csv { +s.content("CSV", val)?; +} +if let Some(ref val) = self.compression_type { +s.content("CompressionType", val)?; +} +if let Some(ref val) = self.json { +s.content("JSON", val)?; +} +if let Some(ref val) = self.parquet { +s.content("Parquet", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InputSerialization { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut csv: Option = None; - let mut compression_type: Option = None; - let mut json: Option = None; - let mut parquet: Option = None; - d.for_each_element(|d, x| match x { - b"CSV" => { - if csv.is_some() { - return Err(DeError::DuplicateField); - } - csv = Some(d.content()?); - Ok(()) - } - b"CompressionType" => { - if compression_type.is_some() { - return Err(DeError::DuplicateField); - } - compression_type = Some(d.content()?); - Ok(()) - } - b"JSON" => { - if json.is_some() { - return Err(DeError::DuplicateField); - } - json = Some(d.content()?); - Ok(()) - } - b"Parquet" => { - if parquet.is_some() { - return Err(DeError::DuplicateField); - } - parquet = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - csv, - compression_type, - json, - parquet, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut csv: Option = None; +let mut compression_type: Option = None; +let mut json: Option = None; +let mut parquet: Option = None; +d.for_each_element(|d, x| match x { +b"CSV" => { +if csv.is_some() { return Err(DeError::DuplicateField); } +csv = Some(d.content()?); +Ok(()) +} +b"CompressionType" => { +if compression_type.is_some() { return Err(DeError::DuplicateField); } +compression_type = Some(d.content()?); +Ok(()) +} +b"JSON" => { +if json.is_some() { return Err(DeError::DuplicateField); } +json = Some(d.content()?); +Ok(()) +} +b"Parquet" => { +if parquet.is_some() { return Err(DeError::DuplicateField); } +parquet = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +csv, +compression_type, +json, +parquet, +}) +} } impl SerializeContent for IntelligentTieringAccessTier { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringAccessTier { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::ARCHIVE_ACCESS)), - b"DEEP_ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::DEEP_ARCHIVE_ACCESS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::ARCHIVE_ACCESS)), +b"DEEP_ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::DEEP_ARCHIVE_ACCESS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for IntelligentTieringAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix, tags }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +tags, +}) +} } impl SerializeContent for IntelligentTieringConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - s.content("Id", &self.id)?; - s.content("Status", &self.status)?; - { - let iter = &self.tierings; - s.flattened_list("Tiering", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +s.content("Id", &self.id)?; +s.content("Status", &self.status)?; +{ +let iter = &self.tierings; +s.flattened_list("Tiering", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut filter: Option = None; - let mut id: Option = None; - let mut status: Option = None; - let mut tierings: Option = None; - d.for_each_element(|d, x| match x { - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - b"Tiering" => { - let ans: Tiering = d.content()?; - tierings.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - filter, - id: id.ok_or(DeError::MissingField)?, - status: status.ok_or(DeError::MissingField)?, - tierings: tierings.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut filter: Option = None; +let mut id: Option = None; +let mut status: Option = None; +let mut tierings: Option = None; +d.for_each_element(|d, x| match x { +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +b"Tiering" => { +let ans: Tiering = d.content()?; +tierings.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +filter, +id: id.ok_or(DeError::MissingField)?, +status: status.ok_or(DeError::MissingField)?, +tierings: tierings.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for IntelligentTieringFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.and { - s.content("And", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.tag { - s.content("Tag", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.and { +s.content("And", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.tag { +s.content("Tag", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut and: Option = None; - let mut prefix: Option = None; - let mut tag: Option = None; - d.for_each_element(|d, x| match x { - b"And" => { - if and.is_some() { - return Err(DeError::DuplicateField); - } - and = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - if tag.is_some() { - return Err(DeError::DuplicateField); - } - tag = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { and, prefix, tag }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut and: Option = None; +let mut prefix: Option = None; +let mut tag: Option = None; +d.for_each_element(|d, x| match x { +b"And" => { +if and.is_some() { return Err(DeError::DuplicateField); } +and = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +if tag.is_some() { return Err(DeError::DuplicateField); } +tag = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +and, +prefix, +tag, +}) +} } impl SerializeContent for IntelligentTieringStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for IntelligentTieringStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(IntelligentTieringStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(IntelligentTieringStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(IntelligentTieringStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(IntelligentTieringStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for InventoryConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Destination", &self.destination)?; - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - s.content("Id", &self.id)?; - s.content("IncludedObjectVersions", &self.included_object_versions)?; - s.content("IsEnabled", &self.is_enabled)?; - if let Some(iter) = &self.optional_fields { - s.list("OptionalFields", "Field", iter)?; - } - s.content("Schedule", &self.schedule)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Destination", &self.destination)?; +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +s.content("Id", &self.id)?; +s.content("IncludedObjectVersions", &self.included_object_versions)?; +s.content("IsEnabled", &self.is_enabled)?; +if let Some(iter) = &self.optional_fields { +s.list("OptionalFields", "Field", iter)?; +} +s.content("Schedule", &self.schedule)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut destination: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut included_object_versions: Option = None; - let mut is_enabled: Option = None; - let mut optional_fields: Option = None; - let mut schedule: Option = None; - d.for_each_element(|d, x| match x { - b"Destination" => { - if destination.is_some() { - return Err(DeError::DuplicateField); - } - destination = Some(d.content()?); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"IncludedObjectVersions" => { - if included_object_versions.is_some() { - return Err(DeError::DuplicateField); - } - included_object_versions = Some(d.content()?); - Ok(()) - } - b"IsEnabled" => { - if is_enabled.is_some() { - return Err(DeError::DuplicateField); - } - is_enabled = Some(d.content()?); - Ok(()) - } - b"OptionalFields" => { - if optional_fields.is_some() { - return Err(DeError::DuplicateField); - } - optional_fields = Some(d.list_content("Field")?); - Ok(()) - } - b"Schedule" => { - if schedule.is_some() { - return Err(DeError::DuplicateField); - } - schedule = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - destination: destination.ok_or(DeError::MissingField)?, - filter, - id: id.ok_or(DeError::MissingField)?, - included_object_versions: included_object_versions.ok_or(DeError::MissingField)?, - is_enabled: is_enabled.ok_or(DeError::MissingField)?, - optional_fields, - schedule: schedule.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut destination: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut included_object_versions: Option = None; +let mut is_enabled: Option = None; +let mut optional_fields: Option = None; +let mut schedule: Option = None; +d.for_each_element(|d, x| match x { +b"Destination" => { +if destination.is_some() { return Err(DeError::DuplicateField); } +destination = Some(d.content()?); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"IncludedObjectVersions" => { +if included_object_versions.is_some() { return Err(DeError::DuplicateField); } +included_object_versions = Some(d.content()?); +Ok(()) +} +b"IsEnabled" => { +if is_enabled.is_some() { return Err(DeError::DuplicateField); } +is_enabled = Some(d.content()?); +Ok(()) +} +b"OptionalFields" => { +if optional_fields.is_some() { return Err(DeError::DuplicateField); } +optional_fields = Some(d.list_content("Field")?); +Ok(()) +} +b"Schedule" => { +if schedule.is_some() { return Err(DeError::DuplicateField); } +schedule = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +destination: destination.ok_or(DeError::MissingField)?, +filter, +id: id.ok_or(DeError::MissingField)?, +included_object_versions: included_object_versions.ok_or(DeError::MissingField)?, +is_enabled: is_enabled.ok_or(DeError::MissingField)?, +optional_fields, +schedule: schedule.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for InventoryDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("S3BucketDestination", &self.s3_bucket_destination)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("S3BucketDestination", &self.s3_bucket_destination)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3_bucket_destination: Option = None; - d.for_each_element(|d, x| match x { - b"S3BucketDestination" => { - if s3_bucket_destination.is_some() { - return Err(DeError::DuplicateField); - } - s3_bucket_destination = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3_bucket_destination: Option = None; +d.for_each_element(|d, x| match x { +b"S3BucketDestination" => { +if s3_bucket_destination.is_some() { return Err(DeError::DuplicateField); } +s3_bucket_destination = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for InventoryEncryption { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.ssekms { - s.content("SSE-KMS", val)?; - } - if let Some(ref val) = self.sses3 { - s.content("SSE-S3", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.ssekms { +s.content("SSE-KMS", val)?; +} +if let Some(ref val) = self.sses3 { +s.content("SSE-S3", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryEncryption { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut ssekms: Option = None; - let mut sses3: Option = None; - d.for_each_element(|d, x| match x { - b"SSE-KMS" => { - if ssekms.is_some() { - return Err(DeError::DuplicateField); - } - ssekms = Some(d.content()?); - Ok(()) - } - b"SSE-S3" => { - if sses3.is_some() { - return Err(DeError::DuplicateField); - } - sses3 = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { ssekms, sses3 }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut ssekms: Option = None; +let mut sses3: Option = None; +d.for_each_element(|d, x| match x { +b"SSE-KMS" => { +if ssekms.is_some() { return Err(DeError::DuplicateField); } +ssekms = Some(d.content()?); +Ok(()) +} +b"SSE-S3" => { +if sses3.is_some() { return Err(DeError::DuplicateField); } +sses3 = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +ssekms, +sses3, +}) +} } impl SerializeContent for InventoryFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Prefix", &self.prefix)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Prefix", &self.prefix)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - prefix: prefix.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix: prefix.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for InventoryFormat { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for InventoryFormat { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"CSV" => Ok(Self::from_static(InventoryFormat::CSV)), - b"ORC" => Ok(Self::from_static(InventoryFormat::ORC)), - b"Parquet" => Ok(Self::from_static(InventoryFormat::PARQUET)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"CSV" => Ok(Self::from_static(InventoryFormat::CSV)), +b"ORC" => Ok(Self::from_static(InventoryFormat::ORC)), +b"Parquet" => Ok(Self::from_static(InventoryFormat::PARQUET)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for InventoryFrequency { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for InventoryFrequency { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Daily" => Ok(Self::from_static(InventoryFrequency::DAILY)), - b"Weekly" => Ok(Self::from_static(InventoryFrequency::WEEKLY)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Daily" => Ok(Self::from_static(InventoryFrequency::DAILY)), +b"Weekly" => Ok(Self::from_static(InventoryFrequency::WEEKLY)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for InventoryIncludedObjectVersions { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for InventoryIncludedObjectVersions { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"All" => Ok(Self::from_static(InventoryIncludedObjectVersions::ALL)), - b"Current" => Ok(Self::from_static(InventoryIncludedObjectVersions::CURRENT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"All" => Ok(Self::from_static(InventoryIncludedObjectVersions::ALL)), +b"Current" => Ok(Self::from_static(InventoryIncludedObjectVersions::CURRENT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for InventoryOptionalField { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for InventoryOptionalField { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"BucketKeyStatus" => Ok(Self::from_static(InventoryOptionalField::BUCKET_KEY_STATUS)), - b"ChecksumAlgorithm" => Ok(Self::from_static(InventoryOptionalField::CHECKSUM_ALGORITHM)), - b"ETag" => Ok(Self::from_static(InventoryOptionalField::E_TAG)), - b"EncryptionStatus" => Ok(Self::from_static(InventoryOptionalField::ENCRYPTION_STATUS)), - b"IntelligentTieringAccessTier" => Ok(Self::from_static(InventoryOptionalField::INTELLIGENT_TIERING_ACCESS_TIER)), - b"IsMultipartUploaded" => Ok(Self::from_static(InventoryOptionalField::IS_MULTIPART_UPLOADED)), - b"LastModifiedDate" => Ok(Self::from_static(InventoryOptionalField::LAST_MODIFIED_DATE)), - b"ObjectAccessControlList" => Ok(Self::from_static(InventoryOptionalField::OBJECT_ACCESS_CONTROL_LIST)), - b"ObjectLockLegalHoldStatus" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_LEGAL_HOLD_STATUS)), - b"ObjectLockMode" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_MODE)), - b"ObjectLockRetainUntilDate" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_RETAIN_UNTIL_DATE)), - b"ObjectOwner" => Ok(Self::from_static(InventoryOptionalField::OBJECT_OWNER)), - b"ReplicationStatus" => Ok(Self::from_static(InventoryOptionalField::REPLICATION_STATUS)), - b"Size" => Ok(Self::from_static(InventoryOptionalField::SIZE)), - b"StorageClass" => Ok(Self::from_static(InventoryOptionalField::STORAGE_CLASS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"BucketKeyStatus" => Ok(Self::from_static(InventoryOptionalField::BUCKET_KEY_STATUS)), +b"ChecksumAlgorithm" => Ok(Self::from_static(InventoryOptionalField::CHECKSUM_ALGORITHM)), +b"ETag" => Ok(Self::from_static(InventoryOptionalField::E_TAG)), +b"EncryptionStatus" => Ok(Self::from_static(InventoryOptionalField::ENCRYPTION_STATUS)), +b"IntelligentTieringAccessTier" => Ok(Self::from_static(InventoryOptionalField::INTELLIGENT_TIERING_ACCESS_TIER)), +b"IsMultipartUploaded" => Ok(Self::from_static(InventoryOptionalField::IS_MULTIPART_UPLOADED)), +b"LastModifiedDate" => Ok(Self::from_static(InventoryOptionalField::LAST_MODIFIED_DATE)), +b"ObjectAccessControlList" => Ok(Self::from_static(InventoryOptionalField::OBJECT_ACCESS_CONTROL_LIST)), +b"ObjectLockLegalHoldStatus" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_LEGAL_HOLD_STATUS)), +b"ObjectLockMode" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_MODE)), +b"ObjectLockRetainUntilDate" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_RETAIN_UNTIL_DATE)), +b"ObjectOwner" => Ok(Self::from_static(InventoryOptionalField::OBJECT_OWNER)), +b"ReplicationStatus" => Ok(Self::from_static(InventoryOptionalField::REPLICATION_STATUS)), +b"Size" => Ok(Self::from_static(InventoryOptionalField::SIZE)), +b"StorageClass" => Ok(Self::from_static(InventoryOptionalField::STORAGE_CLASS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for InventoryS3BucketDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.account_id { - s.content("AccountId", val)?; - } - s.content("Bucket", &self.bucket)?; - if let Some(ref val) = self.encryption { - s.content("Encryption", val)?; - } - s.content("Format", &self.format)?; - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.account_id { +s.content("AccountId", val)?; +} +s.content("Bucket", &self.bucket)?; +if let Some(ref val) = self.encryption { +s.content("Encryption", val)?; +} +s.content("Format", &self.format)?; +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventoryS3BucketDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut account_id: Option = None; - let mut bucket: Option = None; - let mut encryption: Option = None; - let mut format: Option = None; - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"AccountId" => { - if account_id.is_some() { - return Err(DeError::DuplicateField); - } - account_id = Some(d.content()?); - Ok(()) - } - b"Bucket" => { - if bucket.is_some() { - return Err(DeError::DuplicateField); - } - bucket = Some(d.content()?); - Ok(()) - } - b"Encryption" => { - if encryption.is_some() { - return Err(DeError::DuplicateField); - } - encryption = Some(d.content()?); - Ok(()) - } - b"Format" => { - if format.is_some() { - return Err(DeError::DuplicateField); - } - format = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - account_id, - bucket: bucket.ok_or(DeError::MissingField)?, - encryption, - format: format.ok_or(DeError::MissingField)?, - prefix, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut account_id: Option = None; +let mut bucket: Option = None; +let mut encryption: Option = None; +let mut format: Option = None; +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"AccountId" => { +if account_id.is_some() { return Err(DeError::DuplicateField); } +account_id = Some(d.content()?); +Ok(()) +} +b"Bucket" => { +if bucket.is_some() { return Err(DeError::DuplicateField); } +bucket = Some(d.content()?); +Ok(()) +} +b"Encryption" => { +if encryption.is_some() { return Err(DeError::DuplicateField); } +encryption = Some(d.content()?); +Ok(()) +} +b"Format" => { +if format.is_some() { return Err(DeError::DuplicateField); } +format = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +account_id, +bucket: bucket.ok_or(DeError::MissingField)?, +encryption, +format: format.ok_or(DeError::MissingField)?, +prefix, +}) +} } impl SerializeContent for InventorySchedule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Frequency", &self.frequency)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Frequency", &self.frequency)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for InventorySchedule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut frequency: Option = None; - d.for_each_element(|d, x| match x { - b"Frequency" => { - if frequency.is_some() { - return Err(DeError::DuplicateField); - } - frequency = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - frequency: frequency.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut frequency: Option = None; +d.for_each_element(|d, x| match x { +b"Frequency" => { +if frequency.is_some() { return Err(DeError::DuplicateField); } +frequency = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +frequency: frequency.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for JSONInput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.type_ { - s.content("Type", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.type_ { +s.content("Type", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for JSONInput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut type_: Option = None; - d.for_each_element(|d, x| match x { - b"Type" => { - if type_.is_some() { - return Err(DeError::DuplicateField); - } - type_ = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { type_ }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut type_: Option = None; +d.for_each_element(|d, x| match x { +b"Type" => { +if type_.is_some() { return Err(DeError::DuplicateField); } +type_ = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +type_, +}) +} } impl SerializeContent for JSONOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.record_delimiter { - s.content("RecordDelimiter", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.record_delimiter { +s.content("RecordDelimiter", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for JSONOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut record_delimiter: Option = None; - d.for_each_element(|d, x| match x { - b"RecordDelimiter" => { - if record_delimiter.is_some() { - return Err(DeError::DuplicateField); - } - record_delimiter = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { record_delimiter }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut record_delimiter: Option = None; +d.for_each_element(|d, x| match x { +b"RecordDelimiter" => { +if record_delimiter.is_some() { return Err(DeError::DuplicateField); } +record_delimiter = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +record_delimiter, +}) +} } impl SerializeContent for JSONType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for JSONType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DOCUMENT" => Ok(Self::from_static(JSONType::DOCUMENT)), - b"LINES" => Ok(Self::from_static(JSONType::LINES)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DOCUMENT" => Ok(Self::from_static(JSONType::DOCUMENT)), +b"LINES" => Ok(Self::from_static(JSONType::LINES)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for LambdaFunctionConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.events; - s.flattened_list("Event", iter)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("Id", val)?; - } - s.content("CloudFunction", &self.lambda_function_arn)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.events; +s.flattened_list("Event", iter)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("Id", val)?; +} +s.content("CloudFunction", &self.lambda_function_arn)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LambdaFunctionConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut events: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut lambda_function_arn: Option = None; - d.for_each_element(|d, x| match x { - b"Event" => { - let ans: Event = d.content()?; - events.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"CloudFunction" => { - if lambda_function_arn.is_some() { - return Err(DeError::DuplicateField); - } - lambda_function_arn = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - events: events.ok_or(DeError::MissingField)?, - filter, - id, - lambda_function_arn: lambda_function_arn.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut events: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut lambda_function_arn: Option = None; +d.for_each_element(|d, x| match x { +b"Event" => { +let ans: Event = d.content()?; +events.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"CloudFunction" => { +if lambda_function_arn.is_some() { return Err(DeError::DuplicateField); } +lambda_function_arn = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +events: events.ok_or(DeError::MissingField)?, +filter, +id, +lambda_function_arn: lambda_function_arn.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for LifecycleExpiration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.date { - s.timestamp("Date", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.days { - s.content("Days", val)?; - } - if let Some(ref val) = self.expired_object_delete_marker { - s.content("ExpiredObjectDeleteMarker", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.date { +s.timestamp("Date", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +if let Some(ref val) = self.expired_object_delete_marker { +s.content("ExpiredObjectDeleteMarker", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LifecycleExpiration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut date: Option = None; - let mut days: Option = None; - let mut expired_object_delete_marker: Option = None; - d.for_each_element(|d, x| match x { - b"Date" => { - if date.is_some() { - return Err(DeError::DuplicateField); - } - date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - b"ExpiredObjectDeleteMarker" => { - if expired_object_delete_marker.is_some() { - return Err(DeError::DuplicateField); - } - expired_object_delete_marker = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - date, - days, - expired_object_delete_marker, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut date: Option = None; +let mut days: Option = None; +let mut expired_object_delete_marker: Option = None; +d.for_each_element(|d, x| match x { +b"Date" => { +if date.is_some() { return Err(DeError::DuplicateField); } +date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +b"ExpiredObjectDeleteMarker" => { +if expired_object_delete_marker.is_some() { return Err(DeError::DuplicateField); } +expired_object_delete_marker = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +date, +days, +expired_object_delete_marker, +}) +} } impl SerializeContent for LifecycleRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.abort_incomplete_multipart_upload { - s.content("AbortIncompleteMultipartUpload", val)?; - } - if let Some(ref val) = self.expiration { - s.content("Expiration", val)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - if let Some(ref val) = self.noncurrent_version_expiration { - s.content("NoncurrentVersionExpiration", val)?; - } - if let Some(iter) = &self.noncurrent_version_transitions { - s.flattened_list("NoncurrentVersionTransition", iter)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - s.content("Status", &self.status)?; - if let Some(iter) = &self.transitions { - s.flattened_list("Transition", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.abort_incomplete_multipart_upload { +s.content("AbortIncompleteMultipartUpload", val)?; +} +if let Some(ref val) = self.expiration { +s.content("Expiration", val)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +if let Some(ref val) = self.noncurrent_version_expiration { +s.content("NoncurrentVersionExpiration", val)?; +} +if let Some(iter) = &self.noncurrent_version_transitions { +s.flattened_list("NoncurrentVersionTransition", iter)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +s.content("Status", &self.status)?; +if let Some(iter) = &self.transitions { +s.flattened_list("Transition", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LifecycleRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut abort_incomplete_multipart_upload: Option = None; - let mut expiration: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut noncurrent_version_expiration: Option = None; - let mut noncurrent_version_transitions: Option = None; - let mut prefix: Option = None; - let mut status: Option = None; - let mut transitions: Option = None; - d.for_each_element(|d, x| match x { - b"AbortIncompleteMultipartUpload" => { - if abort_incomplete_multipart_upload.is_some() { - return Err(DeError::DuplicateField); - } - abort_incomplete_multipart_upload = Some(d.content()?); - Ok(()) - } - b"Expiration" => { - if expiration.is_some() { - return Err(DeError::DuplicateField); - } - expiration = Some(d.content()?); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"NoncurrentVersionExpiration" => { - if noncurrent_version_expiration.is_some() { - return Err(DeError::DuplicateField); - } - noncurrent_version_expiration = Some(d.content()?); - Ok(()) - } - b"NoncurrentVersionTransition" => { - let ans: NoncurrentVersionTransition = d.content()?; - noncurrent_version_transitions.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - b"Transition" => { - let ans: Transition = d.content()?; - transitions.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - abort_incomplete_multipart_upload, - expiration, - filter, - id, - noncurrent_version_expiration, - noncurrent_version_transitions, - prefix, - status: status.ok_or(DeError::MissingField)?, - transitions, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut abort_incomplete_multipart_upload: Option = None; +let mut expiration: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut noncurrent_version_expiration: Option = None; +let mut noncurrent_version_transitions: Option = None; +let mut prefix: Option = None; +let mut status: Option = None; +let mut transitions: Option = None; +d.for_each_element(|d, x| match x { +b"AbortIncompleteMultipartUpload" => { +if abort_incomplete_multipart_upload.is_some() { return Err(DeError::DuplicateField); } +abort_incomplete_multipart_upload = Some(d.content()?); +Ok(()) +} +b"Expiration" => { +if expiration.is_some() { return Err(DeError::DuplicateField); } +expiration = Some(d.content()?); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"NoncurrentVersionExpiration" => { +if noncurrent_version_expiration.is_some() { return Err(DeError::DuplicateField); } +noncurrent_version_expiration = Some(d.content()?); +Ok(()) +} +b"NoncurrentVersionTransition" => { +let ans: NoncurrentVersionTransition = d.content()?; +noncurrent_version_transitions.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +b"Transition" => { +let ans: Transition = d.content()?; +transitions.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +abort_incomplete_multipart_upload, +expiration, +filter, +id, +noncurrent_version_expiration, +noncurrent_version_transitions, +prefix, +status: status.ok_or(DeError::MissingField)?, +transitions, +}) +} } impl SerializeContent for LifecycleRuleAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.object_size_greater_than { - s.content("ObjectSizeGreaterThan", val)?; - } - if let Some(ref val) = self.object_size_less_than { - s.content("ObjectSizeLessThan", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.object_size_greater_than { +s.content("ObjectSizeGreaterThan", val)?; +} +if let Some(ref val) = self.object_size_less_than { +s.content("ObjectSizeLessThan", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LifecycleRuleAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut object_size_greater_than: Option = None; - let mut object_size_less_than: Option = None; - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"ObjectSizeGreaterThan" => { - if object_size_greater_than.is_some() { - return Err(DeError::DuplicateField); - } - object_size_greater_than = Some(d.content()?); - Ok(()) - } - b"ObjectSizeLessThan" => { - if object_size_less_than.is_some() { - return Err(DeError::DuplicateField); - } - object_size_less_than = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - object_size_greater_than, - object_size_less_than, - prefix, - tags, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut object_size_greater_than: Option = None; +let mut object_size_less_than: Option = None; +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"ObjectSizeGreaterThan" => { +if object_size_greater_than.is_some() { return Err(DeError::DuplicateField); } +object_size_greater_than = Some(d.content()?); +Ok(()) +} +b"ObjectSizeLessThan" => { +if object_size_less_than.is_some() { return Err(DeError::DuplicateField); } +object_size_less_than = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +object_size_greater_than, +object_size_less_than, +prefix, +tags, +}) +} } impl SerializeContent for LifecycleRuleFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.and { - s.content("And", val)?; - } - if let Some(ref val) = self.object_size_greater_than { - s.content("ObjectSizeGreaterThan", val)?; - } - if let Some(ref val) = self.object_size_less_than { - s.content("ObjectSizeLessThan", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.tag { - s.content("Tag", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.and { +s.content("And", val)?; +} +if let Some(ref val) = self.object_size_greater_than { +s.content("ObjectSizeGreaterThan", val)?; +} +if let Some(ref val) = self.object_size_less_than { +s.content("ObjectSizeLessThan", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.tag { +s.content("Tag", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LifecycleRuleFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut and: Option = None; - let mut object_size_greater_than: Option = None; - let mut object_size_less_than: Option = None; - let mut prefix: Option = None; - let mut tag: Option = None; - d.for_each_element(|d, x| match x { - b"And" => { - if and.is_some() { - return Err(DeError::DuplicateField); - } - and = Some(d.content()?); - Ok(()) - } - b"ObjectSizeGreaterThan" => { - if object_size_greater_than.is_some() { - return Err(DeError::DuplicateField); - } - object_size_greater_than = Some(d.content()?); - Ok(()) - } - b"ObjectSizeLessThan" => { - if object_size_less_than.is_some() { - return Err(DeError::DuplicateField); - } - object_size_less_than = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - if tag.is_some() { - return Err(DeError::DuplicateField); - } - tag = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - and, - object_size_greater_than, - object_size_less_than, - prefix, - tag, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut and: Option = None; +let mut object_size_greater_than: Option = None; +let mut object_size_less_than: Option = None; +let mut prefix: Option = None; +let mut tag: Option = None; +d.for_each_element(|d, x| match x { +b"And" => { +if and.is_some() { return Err(DeError::DuplicateField); } +and = Some(d.content()?); +Ok(()) +} +b"ObjectSizeGreaterThan" => { +if object_size_greater_than.is_some() { return Err(DeError::DuplicateField); } +object_size_greater_than = Some(d.content()?); +Ok(()) +} +b"ObjectSizeLessThan" => { +if object_size_less_than.is_some() { return Err(DeError::DuplicateField); } +object_size_less_than = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +if tag.is_some() { return Err(DeError::DuplicateField); } +tag = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +and, +object_size_greater_than, +object_size_less_than, +prefix, +tag, +}) +} } impl SerializeContent for ListBucketAnalyticsConfigurationsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.analytics_configuration_list { - s.flattened_list("AnalyticsConfiguration", iter)?; - } - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.analytics_configuration_list { +s.flattened_list("AnalyticsConfiguration", iter)?; +} +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketAnalyticsConfigurationsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut analytics_configuration_list: Option = None; - let mut continuation_token: Option = None; - let mut is_truncated: Option = None; - let mut next_continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"AnalyticsConfiguration" => { - let ans: AnalyticsConfiguration = d.content()?; - analytics_configuration_list.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"NextContinuationToken" => { - if next_continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - next_continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - analytics_configuration_list, - continuation_token, - is_truncated, - next_continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut analytics_configuration_list: Option = None; +let mut continuation_token: Option = None; +let mut is_truncated: Option = None; +let mut next_continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"AnalyticsConfiguration" => { +let ans: AnalyticsConfiguration = d.content()?; +analytics_configuration_list.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"NextContinuationToken" => { +if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } +next_continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +analytics_configuration_list, +continuation_token, +is_truncated, +next_continuation_token, +}) +} } impl SerializeContent for ListBucketIntelligentTieringConfigurationsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(iter) = &self.intelligent_tiering_configuration_list { - s.flattened_list("IntelligentTieringConfiguration", iter)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(iter) = &self.intelligent_tiering_configuration_list { +s.flattened_list("IntelligentTieringConfiguration", iter)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketIntelligentTieringConfigurationsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut continuation_token: Option = None; - let mut intelligent_tiering_configuration_list: Option = None; - let mut is_truncated: Option = None; - let mut next_continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"IntelligentTieringConfiguration" => { - let ans: IntelligentTieringConfiguration = d.content()?; - intelligent_tiering_configuration_list.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"NextContinuationToken" => { - if next_continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - next_continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - continuation_token, - intelligent_tiering_configuration_list, - is_truncated, - next_continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut continuation_token: Option = None; +let mut intelligent_tiering_configuration_list: Option = None; +let mut is_truncated: Option = None; +let mut next_continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"IntelligentTieringConfiguration" => { +let ans: IntelligentTieringConfiguration = d.content()?; +intelligent_tiering_configuration_list.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"NextContinuationToken" => { +if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } +next_continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +continuation_token, +intelligent_tiering_configuration_list, +is_truncated, +next_continuation_token, +}) +} } impl SerializeContent for ListBucketInventoryConfigurationsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(iter) = &self.inventory_configuration_list { - s.flattened_list("InventoryConfiguration", iter)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(iter) = &self.inventory_configuration_list { +s.flattened_list("InventoryConfiguration", iter)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketInventoryConfigurationsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut continuation_token: Option = None; - let mut inventory_configuration_list: Option = None; - let mut is_truncated: Option = None; - let mut next_continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"InventoryConfiguration" => { - let ans: InventoryConfiguration = d.content()?; - inventory_configuration_list.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"NextContinuationToken" => { - if next_continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - next_continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - continuation_token, - inventory_configuration_list, - is_truncated, - next_continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut continuation_token: Option = None; +let mut inventory_configuration_list: Option = None; +let mut is_truncated: Option = None; +let mut next_continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"InventoryConfiguration" => { +let ans: InventoryConfiguration = d.content()?; +inventory_configuration_list.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"NextContinuationToken" => { +if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } +next_continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +continuation_token, +inventory_configuration_list, +is_truncated, +next_continuation_token, +}) +} } impl SerializeContent for ListBucketMetricsConfigurationsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(iter) = &self.metrics_configuration_list { - s.flattened_list("MetricsConfiguration", iter)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(iter) = &self.metrics_configuration_list { +s.flattened_list("MetricsConfiguration", iter)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketMetricsConfigurationsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut continuation_token: Option = None; - let mut is_truncated: Option = None; - let mut metrics_configuration_list: Option = None; - let mut next_continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"IsTruncated" => { - if is_truncated.is_some() { - return Err(DeError::DuplicateField); - } - is_truncated = Some(d.content()?); - Ok(()) - } - b"MetricsConfiguration" => { - let ans: MetricsConfiguration = d.content()?; - metrics_configuration_list.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"NextContinuationToken" => { - if next_continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - next_continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - continuation_token, - is_truncated, - metrics_configuration_list, - next_continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut continuation_token: Option = None; +let mut is_truncated: Option = None; +let mut metrics_configuration_list: Option = None; +let mut next_continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"IsTruncated" => { +if is_truncated.is_some() { return Err(DeError::DuplicateField); } +is_truncated = Some(d.content()?); +Ok(()) +} +b"MetricsConfiguration" => { +let ans: MetricsConfiguration = d.content()?; +metrics_configuration_list.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"NextContinuationToken" => { +if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } +next_continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +continuation_token, +is_truncated, +metrics_configuration_list, +next_continuation_token, +}) +} } impl SerializeContent for ListBucketsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.buckets { - s.list("Buckets", "Bucket", iter)?; - } - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.buckets { +s.list("Buckets", "Bucket", iter)?; +} +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListBucketsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut buckets: Option = None; - let mut continuation_token: Option = None; - let mut owner: Option = None; - let mut prefix: Option = None; - d.for_each_element(|d, x| match x { - b"Buckets" => { - if buckets.is_some() { - return Err(DeError::DuplicateField); - } - buckets = Some(d.list_content("Bucket")?); - Ok(()) - } - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - buckets, - continuation_token, - owner, - prefix, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut buckets: Option = None; +let mut continuation_token: Option = None; +let mut owner: Option = None; +let mut prefix: Option = None; +d.for_each_element(|d, x| match x { +b"Buckets" => { +if buckets.is_some() { return Err(DeError::DuplicateField); } +buckets = Some(d.list_content("Bucket")?); +Ok(()) +} +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +buckets, +continuation_token, +owner, +prefix, +}) +} } impl SerializeContent for ListDirectoryBucketsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.buckets { - s.list("Buckets", "Bucket", iter)?; - } - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.buckets { +s.list("Buckets", "Bucket", iter)?; +} +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ListDirectoryBucketsOutput { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut buckets: Option = None; - let mut continuation_token: Option = None; - d.for_each_element(|d, x| match x { - b"Buckets" => { - if buckets.is_some() { - return Err(DeError::DuplicateField); - } - buckets = Some(d.list_content("Bucket")?); - Ok(()) - } - b"ContinuationToken" => { - if continuation_token.is_some() { - return Err(DeError::DuplicateField); - } - continuation_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - buckets, - continuation_token, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut buckets: Option = None; +let mut continuation_token: Option = None; +d.for_each_element(|d, x| match x { +b"Buckets" => { +if buckets.is_some() { return Err(DeError::DuplicateField); } +buckets = Some(d.list_content("Bucket")?); +Ok(()) +} +b"ContinuationToken" => { +if continuation_token.is_some() { return Err(DeError::DuplicateField); } +continuation_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +buckets, +continuation_token, +}) +} } impl SerializeContent for ListMultipartUploadsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(iter) = &self.common_prefixes { - s.flattened_list("CommonPrefixes", iter)?; - } - if let Some(ref val) = self.delimiter { - s.content("Delimiter", val)?; - } - if let Some(ref val) = self.encoding_type { - s.content("EncodingType", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.key_marker { - s.content("KeyMarker", val)?; - } - if let Some(ref val) = self.max_uploads { - s.content("MaxUploads", val)?; - } - if let Some(ref val) = self.next_key_marker { - s.content("NextKeyMarker", val)?; - } - if let Some(ref val) = self.next_upload_id_marker { - s.content("NextUploadIdMarker", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.upload_id_marker { - s.content("UploadIdMarker", val)?; - } - if let Some(iter) = &self.uploads { - s.flattened_list("Upload", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(iter) = &self.common_prefixes { +s.flattened_list("CommonPrefixes", iter)?; +} +if let Some(ref val) = self.delimiter { +s.content("Delimiter", val)?; +} +if let Some(ref val) = self.encoding_type { +s.content("EncodingType", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.key_marker { +s.content("KeyMarker", val)?; +} +if let Some(ref val) = self.max_uploads { +s.content("MaxUploads", val)?; +} +if let Some(ref val) = self.next_key_marker { +s.content("NextKeyMarker", val)?; +} +if let Some(ref val) = self.next_upload_id_marker { +s.content("NextUploadIdMarker", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.upload_id_marker { +s.content("UploadIdMarker", val)?; +} +if let Some(iter) = &self.uploads { +s.flattened_list("Upload", iter)?; +} +Ok(()) +} } impl SerializeContent for ListObjectVersionsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.common_prefixes { - s.flattened_list("CommonPrefixes", iter)?; - } - if let Some(iter) = &self.delete_markers { - s.flattened_list("DeleteMarker", iter)?; - } - if let Some(ref val) = self.delimiter { - s.content("Delimiter", val)?; - } - if let Some(ref val) = self.encoding_type { - s.content("EncodingType", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.key_marker { - s.content("KeyMarker", val)?; - } - if let Some(ref val) = self.max_keys { - s.content("MaxKeys", val)?; - } - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.next_key_marker { - s.content("NextKeyMarker", val)?; - } - if let Some(ref val) = self.next_version_id_marker { - s.content("NextVersionIdMarker", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.version_id_marker { - s.content("VersionIdMarker", val)?; - } - if let Some(iter) = &self.versions { - s.flattened_list("Version", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.common_prefixes { +s.flattened_list("CommonPrefixes", iter)?; +} +if let Some(iter) = &self.delete_markers { +s.flattened_list("DeleteMarker", iter)?; +} +if let Some(ref val) = self.delimiter { +s.content("Delimiter", val)?; +} +if let Some(ref val) = self.encoding_type { +s.content("EncodingType", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.key_marker { +s.content("KeyMarker", val)?; +} +if let Some(ref val) = self.max_keys { +s.content("MaxKeys", val)?; +} +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.next_key_marker { +s.content("NextKeyMarker", val)?; +} +if let Some(ref val) = self.next_version_id_marker { +s.content("NextVersionIdMarker", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.version_id_marker { +s.content("VersionIdMarker", val)?; +} +if let Some(iter) = &self.versions { +s.flattened_list("Version", iter)?; +} +Ok(()) +} } impl SerializeContent for ListObjectsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.marker { - s.content("Marker", val)?; - } - if let Some(ref val) = self.max_keys { - s.content("MaxKeys", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(iter) = &self.contents { - s.flattened_list("Contents", iter)?; - } - if let Some(iter) = &self.common_prefixes { - s.flattened_list("CommonPrefixes", iter)?; - } - if let Some(ref val) = self.delimiter { - s.content("Delimiter", val)?; - } - if let Some(ref val) = self.next_marker { - s.content("NextMarker", val)?; - } - if let Some(ref val) = self.encoding_type { - s.content("EncodingType", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.marker { +s.content("Marker", val)?; +} +if let Some(ref val) = self.max_keys { +s.content("MaxKeys", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(iter) = &self.contents { +s.flattened_list("Contents", iter)?; +} +if let Some(iter) = &self.common_prefixes { +s.flattened_list("CommonPrefixes", iter)?; +} +if let Some(ref val) = self.delimiter { +s.content("Delimiter", val)?; +} +if let Some(ref val) = self.next_marker { +s.content("NextMarker", val)?; +} +if let Some(ref val) = self.encoding_type { +s.content("EncodingType", val)?; +} +Ok(()) +} } impl SerializeContent for ListObjectsV2Output { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.max_keys { - s.content("MaxKeys", val)?; - } - if let Some(ref val) = self.key_count { - s.content("KeyCount", val)?; - } - if let Some(ref val) = self.continuation_token { - s.content("ContinuationToken", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.next_continuation_token { - s.content("NextContinuationToken", val)?; - } - if let Some(iter) = &self.contents { - s.flattened_list("Contents", iter)?; - } - if let Some(iter) = &self.common_prefixes { - s.flattened_list("CommonPrefixes", iter)?; - } - if let Some(ref val) = self.delimiter { - s.content("Delimiter", val)?; - } - if let Some(ref val) = self.encoding_type { - s.content("EncodingType", val)?; - } - if let Some(ref val) = self.start_after { - s.content("StartAfter", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.max_keys { +s.content("MaxKeys", val)?; +} +if let Some(ref val) = self.key_count { +s.content("KeyCount", val)?; +} +if let Some(ref val) = self.continuation_token { +s.content("ContinuationToken", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.next_continuation_token { +s.content("NextContinuationToken", val)?; +} +if let Some(iter) = &self.contents { +s.flattened_list("Contents", iter)?; +} +if let Some(iter) = &self.common_prefixes { +s.flattened_list("CommonPrefixes", iter)?; +} +if let Some(ref val) = self.delimiter { +s.content("Delimiter", val)?; +} +if let Some(ref val) = self.encoding_type { +s.content("EncodingType", val)?; +} +if let Some(ref val) = self.start_after { +s.content("StartAfter", val)?; +} +Ok(()) +} } impl SerializeContent for ListPartsOutput { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bucket { - s.content("Bucket", val)?; - } - if let Some(ref val) = self.checksum_algorithm { - s.content("ChecksumAlgorithm", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.initiator { - s.content("Initiator", val)?; - } - if let Some(ref val) = self.is_truncated { - s.content("IsTruncated", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.max_parts { - s.content("MaxParts", val)?; - } - if let Some(ref val) = self.next_part_number_marker { - s.content("NextPartNumberMarker", val)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.part_number_marker { - s.content("PartNumberMarker", val)?; - } - if let Some(iter) = &self.parts { - s.flattened_list("Part", iter)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - if let Some(ref val) = self.upload_id { - s.content("UploadId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bucket { +s.content("Bucket", val)?; +} +if let Some(ref val) = self.checksum_algorithm { +s.content("ChecksumAlgorithm", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.initiator { +s.content("Initiator", val)?; +} +if let Some(ref val) = self.is_truncated { +s.content("IsTruncated", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.max_parts { +s.content("MaxParts", val)?; +} +if let Some(ref val) = self.next_part_number_marker { +s.content("NextPartNumberMarker", val)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.part_number_marker { +s.content("PartNumberMarker", val)?; +} +if let Some(iter) = &self.parts { +s.flattened_list("Part", iter)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +if let Some(ref val) = self.upload_id { +s.content("UploadId", val)?; +} +Ok(()) +} } impl SerializeContent for LocationInfo { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.type_ { - s.content("Type", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.type_ { +s.content("Type", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LocationInfo { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut name: Option = None; - let mut type_: Option = None; - d.for_each_element(|d, x| match x { - b"Name" => { - if name.is_some() { - return Err(DeError::DuplicateField); - } - name = Some(d.content()?); - Ok(()) - } - b"Type" => { - if type_.is_some() { - return Err(DeError::DuplicateField); - } - type_ = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { name, type_ }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut name: Option = None; +let mut type_: Option = None; +d.for_each_element(|d, x| match x { +b"Name" => { +if name.is_some() { return Err(DeError::DuplicateField); } +name = Some(d.content()?); +Ok(()) +} +b"Type" => { +if type_.is_some() { return Err(DeError::DuplicateField); } +type_ = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +name, +type_, +}) +} } impl SerializeContent for LocationType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for LocationType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"AvailabilityZone" => Ok(Self::from_static(LocationType::AVAILABILITY_ZONE)), - b"LocalZone" => Ok(Self::from_static(LocationType::LOCAL_ZONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"AvailabilityZone" => Ok(Self::from_static(LocationType::AVAILABILITY_ZONE)), +b"LocalZone" => Ok(Self::from_static(LocationType::LOCAL_ZONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for LoggingEnabled { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("TargetBucket", &self.target_bucket)?; - if let Some(iter) = &self.target_grants { - s.list("TargetGrants", "Grant", iter)?; - } - if let Some(ref val) = self.target_object_key_format { - s.content("TargetObjectKeyFormat", val)?; - } - s.content("TargetPrefix", &self.target_prefix)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("TargetBucket", &self.target_bucket)?; +if let Some(iter) = &self.target_grants { +s.list("TargetGrants", "Grant", iter)?; +} +if let Some(ref val) = self.target_object_key_format { +s.content("TargetObjectKeyFormat", val)?; +} +s.content("TargetPrefix", &self.target_prefix)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for LoggingEnabled { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut target_bucket: Option = None; - let mut target_grants: Option = None; - let mut target_object_key_format: Option = None; - let mut target_prefix: Option = None; - d.for_each_element(|d, x| match x { - b"TargetBucket" => { - if target_bucket.is_some() { - return Err(DeError::DuplicateField); - } - target_bucket = Some(d.content()?); - Ok(()) - } - b"TargetGrants" => { - if target_grants.is_some() { - return Err(DeError::DuplicateField); - } - target_grants = Some(d.list_content("Grant")?); - Ok(()) - } - b"TargetObjectKeyFormat" => { - if target_object_key_format.is_some() { - return Err(DeError::DuplicateField); - } - target_object_key_format = Some(d.content()?); - Ok(()) - } - b"TargetPrefix" => { - if target_prefix.is_some() { - return Err(DeError::DuplicateField); - } - target_prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - target_bucket: target_bucket.ok_or(DeError::MissingField)?, - target_grants, - target_object_key_format, - target_prefix: target_prefix.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut target_bucket: Option = None; +let mut target_grants: Option = None; +let mut target_object_key_format: Option = None; +let mut target_prefix: Option = None; +d.for_each_element(|d, x| match x { +b"TargetBucket" => { +if target_bucket.is_some() { return Err(DeError::DuplicateField); } +target_bucket = Some(d.content()?); +Ok(()) +} +b"TargetGrants" => { +if target_grants.is_some() { return Err(DeError::DuplicateField); } +target_grants = Some(d.list_content("Grant")?); +Ok(()) +} +b"TargetObjectKeyFormat" => { +if target_object_key_format.is_some() { return Err(DeError::DuplicateField); } +target_object_key_format = Some(d.content()?); +Ok(()) +} +b"TargetPrefix" => { +if target_prefix.is_some() { return Err(DeError::DuplicateField); } +target_prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +target_bucket: target_bucket.ok_or(DeError::MissingField)?, +target_grants, +target_object_key_format, +target_prefix: target_prefix.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for MFADelete { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for MFADelete { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(MFADelete::DISABLED)), - b"Enabled" => Ok(Self::from_static(MFADelete::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(MFADelete::DISABLED)), +b"Enabled" => Ok(Self::from_static(MFADelete::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for MFADeleteStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for MFADeleteStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(MFADeleteStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(MFADeleteStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(MFADeleteStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(MFADeleteStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for MetadataEntry { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.name { - s.content("Name", val)?; - } - if let Some(ref val) = self.value { - s.content("Value", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.name { +s.content("Name", val)?; +} +if let Some(ref val) = self.value { +s.content("Value", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetadataEntry { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut name: Option = None; - let mut value: Option = None; - d.for_each_element(|d, x| match x { - b"Name" => { - if name.is_some() { - return Err(DeError::DuplicateField); - } - name = Some(d.content()?); - Ok(()) - } - b"Value" => { - if value.is_some() { - return Err(DeError::DuplicateField); - } - value = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { name, value }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut name: Option = None; +let mut value: Option = None; +d.for_each_element(|d, x| match x { +b"Name" => { +if name.is_some() { return Err(DeError::DuplicateField); } +name = Some(d.content()?); +Ok(()) +} +b"Value" => { +if value.is_some() { return Err(DeError::DuplicateField); } +value = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +name, +value, +}) +} } impl SerializeContent for MetadataTableConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("S3TablesDestination", &self.s3_tables_destination)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("S3TablesDestination", &self.s3_tables_destination)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetadataTableConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3_tables_destination: Option = None; - d.for_each_element(|d, x| match x { - b"S3TablesDestination" => { - if s3_tables_destination.is_some() { - return Err(DeError::DuplicateField); - } - s3_tables_destination = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - s3_tables_destination: s3_tables_destination.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3_tables_destination: Option = None; +d.for_each_element(|d, x| match x { +b"S3TablesDestination" => { +if s3_tables_destination.is_some() { return Err(DeError::DuplicateField); } +s3_tables_destination = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3_tables_destination: s3_tables_destination.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for MetadataTableConfigurationResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("S3TablesDestinationResult", &self.s3_tables_destination_result)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("S3TablesDestinationResult", &self.s3_tables_destination_result)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetadataTableConfigurationResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3_tables_destination_result: Option = None; - d.for_each_element(|d, x| match x { - b"S3TablesDestinationResult" => { - if s3_tables_destination_result.is_some() { - return Err(DeError::DuplicateField); - } - s3_tables_destination_result = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - s3_tables_destination_result: s3_tables_destination_result.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3_tables_destination_result: Option = None; +d.for_each_element(|d, x| match x { +b"S3TablesDestinationResult" => { +if s3_tables_destination_result.is_some() { return Err(DeError::DuplicateField); } +s3_tables_destination_result = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3_tables_destination_result: s3_tables_destination_result.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Metrics { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.event_threshold { - s.content("EventThreshold", val)?; - } - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.event_threshold { +s.content("EventThreshold", val)?; +} +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Metrics { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut event_threshold: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"EventThreshold" => { - if event_threshold.is_some() { - return Err(DeError::DuplicateField); - } - event_threshold = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - event_threshold, - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut event_threshold: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"EventThreshold" => { +if event_threshold.is_some() { return Err(DeError::DuplicateField); } +event_threshold = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +event_threshold, +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for MetricsAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.access_point_arn { - s.content("AccessPointArn", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.access_point_arn { +s.content("AccessPointArn", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetricsAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_point_arn: Option = None; - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"AccessPointArn" => { - if access_point_arn.is_some() { - return Err(DeError::DuplicateField); - } - access_point_arn = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_point_arn, - prefix, - tags, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_point_arn: Option = None; +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"AccessPointArn" => { +if access_point_arn.is_some() { return Err(DeError::DuplicateField); } +access_point_arn = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_point_arn, +prefix, +tags, +}) +} } impl SerializeContent for MetricsConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - s.content("Id", &self.id)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +s.content("Id", &self.id)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MetricsConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut filter: Option = None; - let mut id: Option = None; - d.for_each_element(|d, x| match x { - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - filter, - id: id.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut filter: Option = None; +let mut id: Option = None; +d.for_each_element(|d, x| match x { +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +filter, +id: id.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for MetricsFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - match self { - Self::AccessPointArn(x) => s.content("AccessPointArn", x), - Self::And(x) => s.content("And", x), - Self::Prefix(x) => s.content("Prefix", x), - Self::Tag(x) => s.content("Tag", x), - } - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +match self { +Self::AccessPointArn(x) => s.content("AccessPointArn", x), +Self::And(x) => s.content("And", x), +Self::Prefix(x) => s.content("Prefix", x), +Self::Tag(x) => s.content("Tag", x), +} +} } impl<'xml> DeserializeContent<'xml> for MetricsFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.element(|d, x| match x { - b"AccessPointArn" => Ok(Self::AccessPointArn(d.content()?)), - b"And" => Ok(Self::And(d.content()?)), - b"Prefix" => Ok(Self::Prefix(d.content()?)), - b"Tag" => Ok(Self::Tag(d.content()?)), - _ => Err(DeError::UnexpectedTagName), - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.element(|d, x| match x { +b"AccessPointArn" => Ok(Self::AccessPointArn(d.content()?)), +b"And" => Ok(Self::And(d.content()?)), +b"Prefix" => Ok(Self::Prefix(d.content()?)), +b"Tag" => Ok(Self::Tag(d.content()?)), +_ => Err(DeError::UnexpectedTagName) +}) +} } impl SerializeContent for MetricsStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for MetricsStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(MetricsStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(MetricsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(MetricsStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(MetricsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for MultipartUpload { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_algorithm { - s.content("ChecksumAlgorithm", val)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.initiated { - s.timestamp("Initiated", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.initiator { - s.content("Initiator", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - if let Some(ref val) = self.upload_id { - s.content("UploadId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_algorithm { +s.content("ChecksumAlgorithm", val)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.initiated { +s.timestamp("Initiated", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.initiator { +s.content("Initiator", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +if let Some(ref val) = self.upload_id { +s.content("UploadId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for MultipartUpload { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_algorithm: Option = None; - let mut checksum_type: Option = None; - let mut initiated: Option = None; - let mut initiator: Option = None; - let mut key: Option = None; - let mut owner: Option = None; - let mut storage_class: Option = None; - let mut upload_id: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumAlgorithm" => { - if checksum_algorithm.is_some() { - return Err(DeError::DuplicateField); - } - checksum_algorithm = Some(d.content()?); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - b"Initiated" => { - if initiated.is_some() { - return Err(DeError::DuplicateField); - } - initiated = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Initiator" => { - if initiator.is_some() { - return Err(DeError::DuplicateField); - } - initiator = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - b"UploadId" => { - if upload_id.is_some() { - return Err(DeError::DuplicateField); - } - upload_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_algorithm, - checksum_type, - initiated, - initiator, - key, - owner, - storage_class, - upload_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_algorithm: Option = None; +let mut checksum_type: Option = None; +let mut initiated: Option = None; +let mut initiator: Option = None; +let mut key: Option = None; +let mut owner: Option = None; +let mut storage_class: Option = None; +let mut upload_id: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumAlgorithm" => { +if checksum_algorithm.is_some() { return Err(DeError::DuplicateField); } +checksum_algorithm = Some(d.content()?); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +b"Initiated" => { +if initiated.is_some() { return Err(DeError::DuplicateField); } +initiated = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Initiator" => { +if initiator.is_some() { return Err(DeError::DuplicateField); } +initiator = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +b"UploadId" => { +if upload_id.is_some() { return Err(DeError::DuplicateField); } +upload_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_algorithm, +checksum_type, +initiated, +initiator, +key, +owner, +storage_class, +upload_id, +}) +} } impl SerializeContent for NoncurrentVersionExpiration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.newer_noncurrent_versions { - s.content("NewerNoncurrentVersions", val)?; - } - if let Some(ref val) = self.noncurrent_days { - s.content("NoncurrentDays", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.newer_noncurrent_versions { +s.content("NewerNoncurrentVersions", val)?; +} +if let Some(ref val) = self.noncurrent_days { +s.content("NoncurrentDays", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for NoncurrentVersionExpiration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut newer_noncurrent_versions: Option = None; - let mut noncurrent_days: Option = None; - d.for_each_element(|d, x| match x { - b"NewerNoncurrentVersions" => { - if newer_noncurrent_versions.is_some() { - return Err(DeError::DuplicateField); - } - newer_noncurrent_versions = Some(d.content()?); - Ok(()) - } - b"NoncurrentDays" => { - if noncurrent_days.is_some() { - return Err(DeError::DuplicateField); - } - noncurrent_days = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - newer_noncurrent_versions, - noncurrent_days, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut newer_noncurrent_versions: Option = None; +let mut noncurrent_days: Option = None; +d.for_each_element(|d, x| match x { +b"NewerNoncurrentVersions" => { +if newer_noncurrent_versions.is_some() { return Err(DeError::DuplicateField); } +newer_noncurrent_versions = Some(d.content()?); +Ok(()) +} +b"NoncurrentDays" => { +if noncurrent_days.is_some() { return Err(DeError::DuplicateField); } +noncurrent_days = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +newer_noncurrent_versions, +noncurrent_days, +}) +} } impl SerializeContent for NoncurrentVersionTransition { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.newer_noncurrent_versions { - s.content("NewerNoncurrentVersions", val)?; - } - if let Some(ref val) = self.noncurrent_days { - s.content("NoncurrentDays", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.newer_noncurrent_versions { +s.content("NewerNoncurrentVersions", val)?; +} +if let Some(ref val) = self.noncurrent_days { +s.content("NoncurrentDays", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for NoncurrentVersionTransition { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut newer_noncurrent_versions: Option = None; - let mut noncurrent_days: Option = None; - let mut storage_class: Option = None; - d.for_each_element(|d, x| match x { - b"NewerNoncurrentVersions" => { - if newer_noncurrent_versions.is_some() { - return Err(DeError::DuplicateField); - } - newer_noncurrent_versions = Some(d.content()?); - Ok(()) - } - b"NoncurrentDays" => { - if noncurrent_days.is_some() { - return Err(DeError::DuplicateField); - } - noncurrent_days = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - newer_noncurrent_versions, - noncurrent_days, - storage_class, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut newer_noncurrent_versions: Option = None; +let mut noncurrent_days: Option = None; +let mut storage_class: Option = None; +d.for_each_element(|d, x| match x { +b"NewerNoncurrentVersions" => { +if newer_noncurrent_versions.is_some() { return Err(DeError::DuplicateField); } +newer_noncurrent_versions = Some(d.content()?); +Ok(()) +} +b"NoncurrentDays" => { +if noncurrent_days.is_some() { return Err(DeError::DuplicateField); } +noncurrent_days = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +newer_noncurrent_versions, +noncurrent_days, +storage_class, +}) +} } impl SerializeContent for NotificationConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.event_bridge_configuration { - s.content("EventBridgeConfiguration", val)?; - } - if let Some(iter) = &self.lambda_function_configurations { - s.flattened_list("CloudFunctionConfiguration", iter)?; - } - if let Some(iter) = &self.queue_configurations { - s.flattened_list("QueueConfiguration", iter)?; - } - if let Some(iter) = &self.topic_configurations { - s.flattened_list("TopicConfiguration", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.event_bridge_configuration { +s.content("EventBridgeConfiguration", val)?; +} +if let Some(iter) = &self.lambda_function_configurations { +s.flattened_list("CloudFunctionConfiguration", iter)?; +} +if let Some(iter) = &self.queue_configurations { +s.flattened_list("QueueConfiguration", iter)?; +} +if let Some(iter) = &self.topic_configurations { +s.flattened_list("TopicConfiguration", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for NotificationConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut event_bridge_configuration: Option = None; - let mut lambda_function_configurations: Option = None; - let mut queue_configurations: Option = None; - let mut topic_configurations: Option = None; - d.for_each_element(|d, x| match x { - b"EventBridgeConfiguration" => { - if event_bridge_configuration.is_some() { - return Err(DeError::DuplicateField); - } - event_bridge_configuration = Some(d.content()?); - Ok(()) - } - b"CloudFunctionConfiguration" => { - let ans: LambdaFunctionConfiguration = d.content()?; - lambda_function_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"QueueConfiguration" => { - let ans: QueueConfiguration = d.content()?; - queue_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"TopicConfiguration" => { - let ans: TopicConfiguration = d.content()?; - topic_configurations.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - event_bridge_configuration, - lambda_function_configurations, - queue_configurations, - topic_configurations, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut event_bridge_configuration: Option = None; +let mut lambda_function_configurations: Option = None; +let mut queue_configurations: Option = None; +let mut topic_configurations: Option = None; +d.for_each_element(|d, x| match x { +b"EventBridgeConfiguration" => { +if event_bridge_configuration.is_some() { return Err(DeError::DuplicateField); } +event_bridge_configuration = Some(d.content()?); +Ok(()) +} +b"CloudFunctionConfiguration" => { +let ans: LambdaFunctionConfiguration = d.content()?; +lambda_function_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"QueueConfiguration" => { +let ans: QueueConfiguration = d.content()?; +queue_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"TopicConfiguration" => { +let ans: TopicConfiguration = d.content()?; +topic_configurations.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +event_bridge_configuration, +lambda_function_configurations, +queue_configurations, +topic_configurations, +}) +} } impl SerializeContent for NotificationConfigurationFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.key { - s.content("S3Key", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.key { +s.content("S3Key", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for NotificationConfigurationFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut key: Option = None; - d.for_each_element(|d, x| match x { - b"S3Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { key }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut key: Option = None; +d.for_each_element(|d, x| match x { +b"S3Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +key, +}) +} } impl SerializeContent for Object { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.checksum_algorithm { - s.flattened_list("ChecksumAlgorithm", iter)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.restore_status { - s.content("RestoreStatus", val)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.checksum_algorithm { +s.flattened_list("ChecksumAlgorithm", iter)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.restore_status { +s.content("RestoreStatus", val)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Object { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_algorithm: Option = None; - let mut checksum_type: Option = None; - let mut e_tag: Option = None; - let mut key: Option = None; - let mut last_modified: Option = None; - let mut owner: Option = None; - let mut restore_status: Option = None; - let mut size: Option = None; - let mut storage_class: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumAlgorithm" => { - let ans: ChecksumAlgorithm = d.content()?; - checksum_algorithm.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"RestoreStatus" => { - if restore_status.is_some() { - return Err(DeError::DuplicateField); - } - restore_status = Some(d.content()?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_algorithm, - checksum_type, - e_tag, - key, - last_modified, - owner, - restore_status, - size, - storage_class, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_algorithm: Option = None; +let mut checksum_type: Option = None; +let mut e_tag: Option = None; +let mut key: Option = None; +let mut last_modified: Option = None; +let mut owner: Option = None; +let mut restore_status: Option = None; +let mut size: Option = None; +let mut storage_class: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumAlgorithm" => { +let ans: ChecksumAlgorithm = d.content()?; +checksum_algorithm.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"RestoreStatus" => { +if restore_status.is_some() { return Err(DeError::DuplicateField); } +restore_status = Some(d.content()?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_algorithm, +checksum_type, +e_tag, +key, +last_modified, +owner, +restore_status, +size, +storage_class, +}) +} } impl SerializeContent for ObjectCannedACL { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectCannedACL { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"authenticated-read" => Ok(Self::from_static(ObjectCannedACL::AUTHENTICATED_READ)), - b"aws-exec-read" => Ok(Self::from_static(ObjectCannedACL::AWS_EXEC_READ)), - b"bucket-owner-full-control" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_FULL_CONTROL)), - b"bucket-owner-read" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_READ)), - b"private" => Ok(Self::from_static(ObjectCannedACL::PRIVATE)), - b"public-read" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ)), - b"public-read-write" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ_WRITE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"authenticated-read" => Ok(Self::from_static(ObjectCannedACL::AUTHENTICATED_READ)), +b"aws-exec-read" => Ok(Self::from_static(ObjectCannedACL::AWS_EXEC_READ)), +b"bucket-owner-full-control" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_FULL_CONTROL)), +b"bucket-owner-read" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_READ)), +b"private" => Ok(Self::from_static(ObjectCannedACL::PRIVATE)), +b"public-read" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ)), +b"public-read-write" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ_WRITE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for ObjectIdentifier { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - s.content("Key", &self.key)?; - if let Some(ref val) = self.last_modified_time { - s.timestamp("LastModifiedTime", val, TimestampFormat::HttpDate)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +s.content("Key", &self.key)?; +if let Some(ref val) = self.last_modified_time { +s.timestamp("LastModifiedTime", val, TimestampFormat::HttpDate)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectIdentifier { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut e_tag: Option = None; - let mut key: Option = None; - let mut last_modified_time: Option = None; - let mut size: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"LastModifiedTime" => { - if last_modified_time.is_some() { - return Err(DeError::DuplicateField); - } - last_modified_time = Some(d.timestamp(TimestampFormat::HttpDate)?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - e_tag, - key: key.ok_or(DeError::MissingField)?, - last_modified_time, - size, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut e_tag: Option = None; +let mut key: Option = None; +let mut last_modified_time: Option = None; +let mut size: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"LastModifiedTime" => { +if last_modified_time.is_some() { return Err(DeError::DuplicateField); } +last_modified_time = Some(d.timestamp(TimestampFormat::HttpDate)?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +e_tag, +key: key.ok_or(DeError::MissingField)?, +last_modified_time, +size, +version_id, +}) +} } impl SerializeContent for ObjectLockConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.object_lock_enabled { - s.content("ObjectLockEnabled", val)?; - } - if let Some(ref val) = self.rule { - s.content("Rule", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.object_lock_enabled { +s.content("ObjectLockEnabled", val)?; +} +if let Some(ref val) = self.rule { +s.content("Rule", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut object_lock_enabled: Option = None; - let mut rule: Option = None; - d.for_each_element(|d, x| match x { - b"ObjectLockEnabled" => { - if object_lock_enabled.is_some() { - return Err(DeError::DuplicateField); - } - object_lock_enabled = Some(d.content()?); - Ok(()) - } - b"Rule" => { - if rule.is_some() { - return Err(DeError::DuplicateField); - } - rule = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - object_lock_enabled, - rule, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut object_lock_enabled: Option = None; +let mut rule: Option = None; +d.for_each_element(|d, x| match x { +b"ObjectLockEnabled" => { +if object_lock_enabled.is_some() { return Err(DeError::DuplicateField); } +object_lock_enabled = Some(d.content()?); +Ok(()) +} +b"Rule" => { +if rule.is_some() { return Err(DeError::DuplicateField); } +rule = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +object_lock_enabled, +rule, +}) +} } impl SerializeContent for ObjectLockEnabled { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockEnabled { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Enabled" => Ok(Self::from_static(ObjectLockEnabled::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Enabled" => Ok(Self::from_static(ObjectLockEnabled::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ObjectLockLegalHold { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockLegalHold { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status, +}) +} } impl SerializeContent for ObjectLockLegalHoldStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockLegalHoldStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"OFF" => Ok(Self::from_static(ObjectLockLegalHoldStatus::OFF)), - b"ON" => Ok(Self::from_static(ObjectLockLegalHoldStatus::ON)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"OFF" => Ok(Self::from_static(ObjectLockLegalHoldStatus::OFF)), +b"ON" => Ok(Self::from_static(ObjectLockLegalHoldStatus::ON)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ObjectLockRetention { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.mode { - s.content("Mode", val)?; - } - if let Some(ref val) = self.retain_until_date { - s.timestamp("RetainUntilDate", val, TimestampFormat::DateTime)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.mode { +s.content("Mode", val)?; +} +if let Some(ref val) = self.retain_until_date { +s.timestamp("RetainUntilDate", val, TimestampFormat::DateTime)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockRetention { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut mode: Option = None; - let mut retain_until_date: Option = None; - d.for_each_element(|d, x| match x { - b"Mode" => { - if mode.is_some() { - return Err(DeError::DuplicateField); - } - mode = Some(d.content()?); - Ok(()) - } - b"RetainUntilDate" => { - if retain_until_date.is_some() { - return Err(DeError::DuplicateField); - } - retain_until_date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { mode, retain_until_date }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut mode: Option = None; +let mut retain_until_date: Option = None; +d.for_each_element(|d, x| match x { +b"Mode" => { +if mode.is_some() { return Err(DeError::DuplicateField); } +mode = Some(d.content()?); +Ok(()) +} +b"RetainUntilDate" => { +if retain_until_date.is_some() { return Err(DeError::DuplicateField); } +retain_until_date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +mode, +retain_until_date, +}) +} } impl SerializeContent for ObjectLockRetentionMode { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockRetentionMode { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"COMPLIANCE" => Ok(Self::from_static(ObjectLockRetentionMode::COMPLIANCE)), - b"GOVERNANCE" => Ok(Self::from_static(ObjectLockRetentionMode::GOVERNANCE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"COMPLIANCE" => Ok(Self::from_static(ObjectLockRetentionMode::COMPLIANCE)), +b"GOVERNANCE" => Ok(Self::from_static(ObjectLockRetentionMode::GOVERNANCE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ObjectLockRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.default_retention { - s.content("DefaultRetention", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.default_retention { +s.content("DefaultRetention", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectLockRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut default_retention: Option = None; - d.for_each_element(|d, x| match x { - b"DefaultRetention" => { - if default_retention.is_some() { - return Err(DeError::DuplicateField); - } - default_retention = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { default_retention }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut default_retention: Option = None; +d.for_each_element(|d, x| match x { +b"DefaultRetention" => { +if default_retention.is_some() { return Err(DeError::DuplicateField); } +default_retention = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +default_retention, +}) +} } impl SerializeContent for ObjectOwnership { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectOwnership { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"BucketOwnerEnforced" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_ENFORCED)), - b"BucketOwnerPreferred" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_PREFERRED)), - b"ObjectWriter" => Ok(Self::from_static(ObjectOwnership::OBJECT_WRITER)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"BucketOwnerEnforced" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_ENFORCED)), +b"BucketOwnerPreferred" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_PREFERRED)), +b"ObjectWriter" => Ok(Self::from_static(ObjectOwnership::OBJECT_WRITER)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ObjectPart { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.part_number { - s.content("PartNumber", val)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.part_number { +s.content("PartNumber", val)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectPart { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut part_number: Option = None; - let mut size: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"PartNumber" => { - if part_number.is_some() { - return Err(DeError::DuplicateField); - } - part_number = Some(d.content()?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - part_number, - size, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut part_number: Option = None; +let mut size: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"PartNumber" => { +if part_number.is_some() { return Err(DeError::DuplicateField); } +part_number = Some(d.content()?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +part_number, +size, +}) +} } impl SerializeContent for ObjectStorageClass { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectStorageClass { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DEEP_ARCHIVE" => Ok(Self::from_static(ObjectStorageClass::DEEP_ARCHIVE)), - b"EXPRESS_ONEZONE" => Ok(Self::from_static(ObjectStorageClass::EXPRESS_ONEZONE)), - b"GLACIER" => Ok(Self::from_static(ObjectStorageClass::GLACIER)), - b"GLACIER_IR" => Ok(Self::from_static(ObjectStorageClass::GLACIER_IR)), - b"INTELLIGENT_TIERING" => Ok(Self::from_static(ObjectStorageClass::INTELLIGENT_TIERING)), - b"ONEZONE_IA" => Ok(Self::from_static(ObjectStorageClass::ONEZONE_IA)), - b"OUTPOSTS" => Ok(Self::from_static(ObjectStorageClass::OUTPOSTS)), - b"REDUCED_REDUNDANCY" => Ok(Self::from_static(ObjectStorageClass::REDUCED_REDUNDANCY)), - b"SNOW" => Ok(Self::from_static(ObjectStorageClass::SNOW)), - b"STANDARD" => Ok(Self::from_static(ObjectStorageClass::STANDARD)), - b"STANDARD_IA" => Ok(Self::from_static(ObjectStorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DEEP_ARCHIVE" => Ok(Self::from_static(ObjectStorageClass::DEEP_ARCHIVE)), +b"EXPRESS_ONEZONE" => Ok(Self::from_static(ObjectStorageClass::EXPRESS_ONEZONE)), +b"GLACIER" => Ok(Self::from_static(ObjectStorageClass::GLACIER)), +b"GLACIER_IR" => Ok(Self::from_static(ObjectStorageClass::GLACIER_IR)), +b"INTELLIGENT_TIERING" => Ok(Self::from_static(ObjectStorageClass::INTELLIGENT_TIERING)), +b"ONEZONE_IA" => Ok(Self::from_static(ObjectStorageClass::ONEZONE_IA)), +b"OUTPOSTS" => Ok(Self::from_static(ObjectStorageClass::OUTPOSTS)), +b"REDUCED_REDUNDANCY" => Ok(Self::from_static(ObjectStorageClass::REDUCED_REDUNDANCY)), +b"SNOW" => Ok(Self::from_static(ObjectStorageClass::SNOW)), +b"STANDARD" => Ok(Self::from_static(ObjectStorageClass::STANDARD)), +b"STANDARD_IA" => Ok(Self::from_static(ObjectStorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for ObjectVersion { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.checksum_algorithm { - s.flattened_list("ChecksumAlgorithm", iter)?; - } - if let Some(ref val) = self.checksum_type { - s.content("ChecksumType", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.is_latest { - s.content("IsLatest", val)?; - } - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.owner { - s.content("Owner", val)?; - } - if let Some(ref val) = self.restore_status { - s.content("RestoreStatus", val)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - if let Some(ref val) = self.version_id { - s.content("VersionId", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.checksum_algorithm { +s.flattened_list("ChecksumAlgorithm", iter)?; +} +if let Some(ref val) = self.checksum_type { +s.content("ChecksumType", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.is_latest { +s.content("IsLatest", val)?; +} +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.owner { +s.content("Owner", val)?; +} +if let Some(ref val) = self.restore_status { +s.content("RestoreStatus", val)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +if let Some(ref val) = self.version_id { +s.content("VersionId", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ObjectVersion { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_algorithm: Option = None; - let mut checksum_type: Option = None; - let mut e_tag: Option = None; - let mut is_latest: Option = None; - let mut key: Option = None; - let mut last_modified: Option = None; - let mut owner: Option = None; - let mut restore_status: Option = None; - let mut size: Option = None; - let mut storage_class: Option = None; - let mut version_id: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumAlgorithm" => { - let ans: ChecksumAlgorithm = d.content()?; - checksum_algorithm.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"ChecksumType" => { - if checksum_type.is_some() { - return Err(DeError::DuplicateField); - } - checksum_type = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"IsLatest" => { - if is_latest.is_some() { - return Err(DeError::DuplicateField); - } - is_latest = Some(d.content()?); - Ok(()) - } - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Owner" => { - if owner.is_some() { - return Err(DeError::DuplicateField); - } - owner = Some(d.content()?); - Ok(()) - } - b"RestoreStatus" => { - if restore_status.is_some() { - return Err(DeError::DuplicateField); - } - restore_status = Some(d.content()?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - b"VersionId" => { - if version_id.is_some() { - return Err(DeError::DuplicateField); - } - version_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_algorithm, - checksum_type, - e_tag, - is_latest, - key, - last_modified, - owner, - restore_status, - size, - storage_class, - version_id, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_algorithm: Option = None; +let mut checksum_type: Option = None; +let mut e_tag: Option = None; +let mut is_latest: Option = None; +let mut key: Option = None; +let mut last_modified: Option = None; +let mut owner: Option = None; +let mut restore_status: Option = None; +let mut size: Option = None; +let mut storage_class: Option = None; +let mut version_id: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumAlgorithm" => { +let ans: ChecksumAlgorithm = d.content()?; +checksum_algorithm.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"ChecksumType" => { +if checksum_type.is_some() { return Err(DeError::DuplicateField); } +checksum_type = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"IsLatest" => { +if is_latest.is_some() { return Err(DeError::DuplicateField); } +is_latest = Some(d.content()?); +Ok(()) +} +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Owner" => { +if owner.is_some() { return Err(DeError::DuplicateField); } +owner = Some(d.content()?); +Ok(()) +} +b"RestoreStatus" => { +if restore_status.is_some() { return Err(DeError::DuplicateField); } +restore_status = Some(d.content()?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +b"VersionId" => { +if version_id.is_some() { return Err(DeError::DuplicateField); } +version_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_algorithm, +checksum_type, +e_tag, +is_latest, +key, +last_modified, +owner, +restore_status, +size, +storage_class, +version_id, +}) +} } impl SerializeContent for ObjectVersionStorageClass { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ObjectVersionStorageClass { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"STANDARD" => Ok(Self::from_static(ObjectVersionStorageClass::STANDARD)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"STANDARD" => Ok(Self::from_static(ObjectVersionStorageClass::STANDARD)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for OutputLocation { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.s3 { - s.content("S3", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.s3 { +s.content("S3", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for OutputLocation { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut s3: Option = None; - d.for_each_element(|d, x| match x { - b"S3" => { - if s3.is_some() { - return Err(DeError::DuplicateField); - } - s3 = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { s3 }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut s3: Option = None; +d.for_each_element(|d, x| match x { +b"S3" => { +if s3.is_some() { return Err(DeError::DuplicateField); } +s3 = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +s3, +}) +} } impl SerializeContent for OutputSerialization { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.csv { - s.content("CSV", val)?; - } - if let Some(ref val) = self.json { - s.content("JSON", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.csv { +s.content("CSV", val)?; +} +if let Some(ref val) = self.json { +s.content("JSON", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for OutputSerialization { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut csv: Option = None; - let mut json: Option = None; - d.for_each_element(|d, x| match x { - b"CSV" => { - if csv.is_some() { - return Err(DeError::DuplicateField); - } - csv = Some(d.content()?); - Ok(()) - } - b"JSON" => { - if json.is_some() { - return Err(DeError::DuplicateField); - } - json = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { csv, json }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut csv: Option = None; +let mut json: Option = None; +d.for_each_element(|d, x| match x { +b"CSV" => { +if csv.is_some() { return Err(DeError::DuplicateField); } +csv = Some(d.content()?); +Ok(()) +} +b"JSON" => { +if json.is_some() { return Err(DeError::DuplicateField); } +json = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +csv, +json, +}) +} } impl SerializeContent for Owner { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.display_name { - s.content("DisplayName", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.display_name { +s.content("DisplayName", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Owner { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut display_name: Option = None; - let mut id: Option = None; - d.for_each_element(|d, x| match x { - b"DisplayName" => { - if display_name.is_some() { - return Err(DeError::DuplicateField); - } - display_name = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { display_name, id }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut display_name: Option = None; +let mut id: Option = None; +d.for_each_element(|d, x| match x { +b"DisplayName" => { +if display_name.is_some() { return Err(DeError::DuplicateField); } +display_name = Some(d.content()?); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +display_name, +id, +}) +} } impl SerializeContent for OwnerOverride { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for OwnerOverride { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Destination" => Ok(Self::from_static(OwnerOverride::DESTINATION)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Destination" => Ok(Self::from_static(OwnerOverride::DESTINATION)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for OwnershipControls { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.rules; - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.rules; +s.flattened_list("Rule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for OwnershipControls { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut rules: Option = None; - d.for_each_element(|d, x| match x { - b"Rule" => { - let ans: OwnershipControlsRule = d.content()?; - rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - rules: rules.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut rules: Option = None; +d.for_each_element(|d, x| match x { +b"Rule" => { +let ans: OwnershipControlsRule = d.content()?; +rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +rules: rules.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for OwnershipControlsRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("ObjectOwnership", &self.object_ownership)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("ObjectOwnership", &self.object_ownership)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for OwnershipControlsRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut object_ownership: Option = None; - d.for_each_element(|d, x| match x { - b"ObjectOwnership" => { - if object_ownership.is_some() { - return Err(DeError::DuplicateField); - } - object_ownership = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - object_ownership: object_ownership.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut object_ownership: Option = None; +d.for_each_element(|d, x| match x { +b"ObjectOwnership" => { +if object_ownership.is_some() { return Err(DeError::DuplicateField); } +object_ownership = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +object_ownership: object_ownership.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ParquetInput { - fn serialize_content(&self, _: &mut Serializer) -> SerResult { - Ok(()) - } +fn serialize_content(&self, _: &mut Serializer) -> SerResult { +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ParquetInput { - fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { - Ok(Self {}) - } +fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { +Ok(Self { +}) +} } impl SerializeContent for Part { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.checksum_crc32 { - s.content("ChecksumCRC32", val)?; - } - if let Some(ref val) = self.checksum_crc32c { - s.content("ChecksumCRC32C", val)?; - } - if let Some(ref val) = self.checksum_crc64nvme { - s.content("ChecksumCRC64NVME", val)?; - } - if let Some(ref val) = self.checksum_sha1 { - s.content("ChecksumSHA1", val)?; - } - if let Some(ref val) = self.checksum_sha256 { - s.content("ChecksumSHA256", val)?; - } - if let Some(ref val) = self.e_tag { - s.content("ETag", val)?; - } - if let Some(ref val) = self.last_modified { - s.timestamp("LastModified", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.part_number { - s.content("PartNumber", val)?; - } - if let Some(ref val) = self.size { - s.content("Size", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.checksum_crc32 { +s.content("ChecksumCRC32", val)?; +} +if let Some(ref val) = self.checksum_crc32c { +s.content("ChecksumCRC32C", val)?; +} +if let Some(ref val) = self.checksum_crc64nvme { +s.content("ChecksumCRC64NVME", val)?; +} +if let Some(ref val) = self.checksum_sha1 { +s.content("ChecksumSHA1", val)?; +} +if let Some(ref val) = self.checksum_sha256 { +s.content("ChecksumSHA256", val)?; +} +if let Some(ref val) = self.e_tag { +s.content("ETag", val)?; +} +if let Some(ref val) = self.last_modified { +s.timestamp("LastModified", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.part_number { +s.content("PartNumber", val)?; +} +if let Some(ref val) = self.size { +s.content("Size", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Part { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut checksum_crc32: Option = None; - let mut checksum_crc32c: Option = None; - let mut checksum_crc64nvme: Option = None; - let mut checksum_sha1: Option = None; - let mut checksum_sha256: Option = None; - let mut e_tag: Option = None; - let mut last_modified: Option = None; - let mut part_number: Option = None; - let mut size: Option = None; - d.for_each_element(|d, x| match x { - b"ChecksumCRC32" => { - if checksum_crc32.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32 = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC32C" => { - if checksum_crc32c.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc32c = Some(d.content()?); - Ok(()) - } - b"ChecksumCRC64NVME" => { - if checksum_crc64nvme.is_some() { - return Err(DeError::DuplicateField); - } - checksum_crc64nvme = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA1" => { - if checksum_sha1.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha1 = Some(d.content()?); - Ok(()) - } - b"ChecksumSHA256" => { - if checksum_sha256.is_some() { - return Err(DeError::DuplicateField); - } - checksum_sha256 = Some(d.content()?); - Ok(()) - } - b"ETag" => { - if e_tag.is_some() { - return Err(DeError::DuplicateField); - } - e_tag = Some(d.content()?); - Ok(()) - } - b"LastModified" => { - if last_modified.is_some() { - return Err(DeError::DuplicateField); - } - last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"PartNumber" => { - if part_number.is_some() { - return Err(DeError::DuplicateField); - } - part_number = Some(d.content()?); - Ok(()) - } - b"Size" => { - if size.is_some() { - return Err(DeError::DuplicateField); - } - size = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - checksum_crc32, - checksum_crc32c, - checksum_crc64nvme, - checksum_sha1, - checksum_sha256, - e_tag, - last_modified, - part_number, - size, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut checksum_crc32: Option = None; +let mut checksum_crc32c: Option = None; +let mut checksum_crc64nvme: Option = None; +let mut checksum_sha1: Option = None; +let mut checksum_sha256: Option = None; +let mut e_tag: Option = None; +let mut last_modified: Option = None; +let mut part_number: Option = None; +let mut size: Option = None; +d.for_each_element(|d, x| match x { +b"ChecksumCRC32" => { +if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32 = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC32C" => { +if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } +checksum_crc32c = Some(d.content()?); +Ok(()) +} +b"ChecksumCRC64NVME" => { +if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } +checksum_crc64nvme = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA1" => { +if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } +checksum_sha1 = Some(d.content()?); +Ok(()) +} +b"ChecksumSHA256" => { +if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } +checksum_sha256 = Some(d.content()?); +Ok(()) +} +b"ETag" => { +if e_tag.is_some() { return Err(DeError::DuplicateField); } +e_tag = Some(d.content()?); +Ok(()) +} +b"LastModified" => { +if last_modified.is_some() { return Err(DeError::DuplicateField); } +last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"PartNumber" => { +if part_number.is_some() { return Err(DeError::DuplicateField); } +part_number = Some(d.content()?); +Ok(()) +} +b"Size" => { +if size.is_some() { return Err(DeError::DuplicateField); } +size = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +checksum_crc32, +checksum_crc32c, +checksum_crc64nvme, +checksum_sha1, +checksum_sha256, +e_tag, +last_modified, +part_number, +size, +}) +} } impl SerializeContent for PartitionDateSource { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for PartitionDateSource { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DeliveryTime" => Ok(Self::from_static(PartitionDateSource::DELIVERY_TIME)), - b"EventTime" => Ok(Self::from_static(PartitionDateSource::EVENT_TIME)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DeliveryTime" => Ok(Self::from_static(PartitionDateSource::DELIVERY_TIME)), +b"EventTime" => Ok(Self::from_static(PartitionDateSource::EVENT_TIME)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for PartitionedPrefix { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.partition_date_source { - s.content("PartitionDateSource", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.partition_date_source { +s.content("PartitionDateSource", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for PartitionedPrefix { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut partition_date_source: Option = None; - d.for_each_element(|d, x| match x { - b"PartitionDateSource" => { - if partition_date_source.is_some() { - return Err(DeError::DuplicateField); - } - partition_date_source = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { partition_date_source }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut partition_date_source: Option = None; +d.for_each_element(|d, x| match x { +b"PartitionDateSource" => { +if partition_date_source.is_some() { return Err(DeError::DuplicateField); } +partition_date_source = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +partition_date_source, +}) +} } impl SerializeContent for Payer { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Payer { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"BucketOwner" => Ok(Self::from_static(Payer::BUCKET_OWNER)), - b"Requester" => Ok(Self::from_static(Payer::REQUESTER)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"BucketOwner" => Ok(Self::from_static(Payer::BUCKET_OWNER)), +b"Requester" => Ok(Self::from_static(Payer::REQUESTER)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Permission { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Permission { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"FULL_CONTROL" => Ok(Self::from_static(Permission::FULL_CONTROL)), - b"READ" => Ok(Self::from_static(Permission::READ)), - b"READ_ACP" => Ok(Self::from_static(Permission::READ_ACP)), - b"WRITE" => Ok(Self::from_static(Permission::WRITE)), - b"WRITE_ACP" => Ok(Self::from_static(Permission::WRITE_ACP)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"FULL_CONTROL" => Ok(Self::from_static(Permission::FULL_CONTROL)), +b"READ" => Ok(Self::from_static(Permission::READ)), +b"READ_ACP" => Ok(Self::from_static(Permission::READ_ACP)), +b"WRITE" => Ok(Self::from_static(Permission::WRITE)), +b"WRITE_ACP" => Ok(Self::from_static(Permission::WRITE_ACP)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for PolicyStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.is_public { - s.content("IsPublic", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.is_public { +s.content("IsPublic", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for PolicyStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut is_public: Option = None; - d.for_each_element(|d, x| match x { - b"IsPublic" => { - if is_public.is_some() { - return Err(DeError::DuplicateField); - } - is_public = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { is_public }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut is_public: Option = None; +d.for_each_element(|d, x| match x { +b"IsPublic" => { +if is_public.is_some() { return Err(DeError::DuplicateField); } +is_public = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +is_public, +}) +} } impl SerializeContent for Progress { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bytes_processed { - s.content("BytesProcessed", val)?; - } - if let Some(ref val) = self.bytes_returned { - s.content("BytesReturned", val)?; - } - if let Some(ref val) = self.bytes_scanned { - s.content("BytesScanned", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bytes_processed { +s.content("BytesProcessed", val)?; +} +if let Some(ref val) = self.bytes_returned { +s.content("BytesReturned", val)?; +} +if let Some(ref val) = self.bytes_scanned { +s.content("BytesScanned", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Progress { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bytes_processed: Option = None; - let mut bytes_returned: Option = None; - let mut bytes_scanned: Option = None; - d.for_each_element(|d, x| match x { - b"BytesProcessed" => { - if bytes_processed.is_some() { - return Err(DeError::DuplicateField); - } - bytes_processed = Some(d.content()?); - Ok(()) - } - b"BytesReturned" => { - if bytes_returned.is_some() { - return Err(DeError::DuplicateField); - } - bytes_returned = Some(d.content()?); - Ok(()) - } - b"BytesScanned" => { - if bytes_scanned.is_some() { - return Err(DeError::DuplicateField); - } - bytes_scanned = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bytes_processed, - bytes_returned, - bytes_scanned, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bytes_processed: Option = None; +let mut bytes_returned: Option = None; +let mut bytes_scanned: Option = None; +d.for_each_element(|d, x| match x { +b"BytesProcessed" => { +if bytes_processed.is_some() { return Err(DeError::DuplicateField); } +bytes_processed = Some(d.content()?); +Ok(()) +} +b"BytesReturned" => { +if bytes_returned.is_some() { return Err(DeError::DuplicateField); } +bytes_returned = Some(d.content()?); +Ok(()) +} +b"BytesScanned" => { +if bytes_scanned.is_some() { return Err(DeError::DuplicateField); } +bytes_scanned = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bytes_processed, +bytes_returned, +bytes_scanned, +}) +} } impl SerializeContent for Protocol { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Protocol { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"http" => Ok(Self::from_static(Protocol::HTTP)), - b"https" => Ok(Self::from_static(Protocol::HTTPS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"http" => Ok(Self::from_static(Protocol::HTTP)), +b"https" => Ok(Self::from_static(Protocol::HTTPS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for PublicAccessBlockConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.block_public_acls { - s.content("BlockPublicAcls", val)?; - } - if let Some(ref val) = self.block_public_policy { - s.content("BlockPublicPolicy", val)?; - } - if let Some(ref val) = self.ignore_public_acls { - s.content("IgnorePublicAcls", val)?; - } - if let Some(ref val) = self.restrict_public_buckets { - s.content("RestrictPublicBuckets", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.block_public_acls { +s.content("BlockPublicAcls", val)?; +} +if let Some(ref val) = self.block_public_policy { +s.content("BlockPublicPolicy", val)?; +} +if let Some(ref val) = self.ignore_public_acls { +s.content("IgnorePublicAcls", val)?; +} +if let Some(ref val) = self.restrict_public_buckets { +s.content("RestrictPublicBuckets", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for PublicAccessBlockConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut block_public_acls: Option = None; - let mut block_public_policy: Option = None; - let mut ignore_public_acls: Option = None; - let mut restrict_public_buckets: Option = None; - d.for_each_element(|d, x| match x { - b"BlockPublicAcls" => { - if block_public_acls.is_some() { - return Err(DeError::DuplicateField); - } - block_public_acls = Some(d.content()?); - Ok(()) - } - b"BlockPublicPolicy" => { - if block_public_policy.is_some() { - return Err(DeError::DuplicateField); - } - block_public_policy = Some(d.content()?); - Ok(()) - } - b"IgnorePublicAcls" => { - if ignore_public_acls.is_some() { - return Err(DeError::DuplicateField); - } - ignore_public_acls = Some(d.content()?); - Ok(()) - } - b"RestrictPublicBuckets" => { - if restrict_public_buckets.is_some() { - return Err(DeError::DuplicateField); - } - restrict_public_buckets = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - block_public_acls, - block_public_policy, - ignore_public_acls, - restrict_public_buckets, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut block_public_acls: Option = None; +let mut block_public_policy: Option = None; +let mut ignore_public_acls: Option = None; +let mut restrict_public_buckets: Option = None; +d.for_each_element(|d, x| match x { +b"BlockPublicAcls" => { +if block_public_acls.is_some() { return Err(DeError::DuplicateField); } +block_public_acls = Some(d.content()?); +Ok(()) +} +b"BlockPublicPolicy" => { +if block_public_policy.is_some() { return Err(DeError::DuplicateField); } +block_public_policy = Some(d.content()?); +Ok(()) +} +b"IgnorePublicAcls" => { +if ignore_public_acls.is_some() { return Err(DeError::DuplicateField); } +ignore_public_acls = Some(d.content()?); +Ok(()) +} +b"RestrictPublicBuckets" => { +if restrict_public_buckets.is_some() { return Err(DeError::DuplicateField); } +restrict_public_buckets = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +block_public_acls, +block_public_policy, +ignore_public_acls, +restrict_public_buckets, +}) +} } impl SerializeContent for QueueConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.events; - s.flattened_list("Event", iter)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("Id", val)?; - } - s.content("Queue", &self.queue_arn)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.events; +s.flattened_list("Event", iter)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("Id", val)?; +} +s.content("Queue", &self.queue_arn)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for QueueConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut events: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut queue_arn: Option = None; - d.for_each_element(|d, x| match x { - b"Event" => { - let ans: Event = d.content()?; - events.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"Queue" => { - if queue_arn.is_some() { - return Err(DeError::DuplicateField); - } - queue_arn = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - events: events.ok_or(DeError::MissingField)?, - filter, - id, - queue_arn: queue_arn.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut events: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut queue_arn: Option = None; +d.for_each_element(|d, x| match x { +b"Event" => { +let ans: Event = d.content()?; +events.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"Queue" => { +if queue_arn.is_some() { return Err(DeError::DuplicateField); } +queue_arn = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +events: events.ok_or(DeError::MissingField)?, +filter, +id, +queue_arn: queue_arn.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for QuoteFields { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for QuoteFields { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"ALWAYS" => Ok(Self::from_static(QuoteFields::ALWAYS)), - b"ASNEEDED" => Ok(Self::from_static(QuoteFields::ASNEEDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"ALWAYS" => Ok(Self::from_static(QuoteFields::ALWAYS)), +b"ASNEEDED" => Ok(Self::from_static(QuoteFields::ASNEEDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Redirect { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.host_name { - s.content("HostName", val)?; - } - if let Some(ref val) = self.http_redirect_code { - s.content("HttpRedirectCode", val)?; - } - if let Some(ref val) = self.protocol { - s.content("Protocol", val)?; - } - if let Some(ref val) = self.replace_key_prefix_with { - s.content("ReplaceKeyPrefixWith", val)?; - } - if let Some(ref val) = self.replace_key_with { - s.content("ReplaceKeyWith", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.host_name { +s.content("HostName", val)?; +} +if let Some(ref val) = self.http_redirect_code { +s.content("HttpRedirectCode", val)?; +} +if let Some(ref val) = self.protocol { +s.content("Protocol", val)?; +} +if let Some(ref val) = self.replace_key_prefix_with { +s.content("ReplaceKeyPrefixWith", val)?; +} +if let Some(ref val) = self.replace_key_with { +s.content("ReplaceKeyWith", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Redirect { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut host_name: Option = None; - let mut http_redirect_code: Option = None; - let mut protocol: Option = None; - let mut replace_key_prefix_with: Option = None; - let mut replace_key_with: Option = None; - d.for_each_element(|d, x| match x { - b"HostName" => { - if host_name.is_some() { - return Err(DeError::DuplicateField); - } - host_name = Some(d.content()?); - Ok(()) - } - b"HttpRedirectCode" => { - if http_redirect_code.is_some() { - return Err(DeError::DuplicateField); - } - http_redirect_code = Some(d.content()?); - Ok(()) - } - b"Protocol" => { - if protocol.is_some() { - return Err(DeError::DuplicateField); - } - protocol = Some(d.content()?); - Ok(()) - } - b"ReplaceKeyPrefixWith" => { - if replace_key_prefix_with.is_some() { - return Err(DeError::DuplicateField); - } - replace_key_prefix_with = Some(d.content()?); - Ok(()) - } - b"ReplaceKeyWith" => { - if replace_key_with.is_some() { - return Err(DeError::DuplicateField); - } - replace_key_with = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - host_name, - http_redirect_code, - protocol, - replace_key_prefix_with, - replace_key_with, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut host_name: Option = None; +let mut http_redirect_code: Option = None; +let mut protocol: Option = None; +let mut replace_key_prefix_with: Option = None; +let mut replace_key_with: Option = None; +d.for_each_element(|d, x| match x { +b"HostName" => { +if host_name.is_some() { return Err(DeError::DuplicateField); } +host_name = Some(d.content()?); +Ok(()) +} +b"HttpRedirectCode" => { +if http_redirect_code.is_some() { return Err(DeError::DuplicateField); } +http_redirect_code = Some(d.content()?); +Ok(()) +} +b"Protocol" => { +if protocol.is_some() { return Err(DeError::DuplicateField); } +protocol = Some(d.content()?); +Ok(()) +} +b"ReplaceKeyPrefixWith" => { +if replace_key_prefix_with.is_some() { return Err(DeError::DuplicateField); } +replace_key_prefix_with = Some(d.content()?); +Ok(()) +} +b"ReplaceKeyWith" => { +if replace_key_with.is_some() { return Err(DeError::DuplicateField); } +replace_key_with = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +host_name, +http_redirect_code, +protocol, +replace_key_prefix_with, +replace_key_with, +}) +} } impl SerializeContent for RedirectAllRequestsTo { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("HostName", &self.host_name)?; - if let Some(ref val) = self.protocol { - s.content("Protocol", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("HostName", &self.host_name)?; +if let Some(ref val) = self.protocol { +s.content("Protocol", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RedirectAllRequestsTo { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut host_name: Option = None; - let mut protocol: Option = None; - d.for_each_element(|d, x| match x { - b"HostName" => { - if host_name.is_some() { - return Err(DeError::DuplicateField); - } - host_name = Some(d.content()?); - Ok(()) - } - b"Protocol" => { - if protocol.is_some() { - return Err(DeError::DuplicateField); - } - protocol = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - host_name: host_name.ok_or(DeError::MissingField)?, - protocol, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut host_name: Option = None; +let mut protocol: Option = None; +d.for_each_element(|d, x| match x { +b"HostName" => { +if host_name.is_some() { return Err(DeError::DuplicateField); } +host_name = Some(d.content()?); +Ok(()) +} +b"Protocol" => { +if protocol.is_some() { return Err(DeError::DuplicateField); } +protocol = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +host_name: host_name.ok_or(DeError::MissingField)?, +protocol, +}) +} } impl SerializeContent for ReplicaModifications { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicaModifications { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ReplicaModificationsStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} +} +impl<'xml> DeserializeContent<'xml> for ReplicaModificationsStatus { +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ReplicaModificationsStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ReplicaModificationsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} +} +impl SerializeContent for ReplicationConfiguration { +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Role", &self.role)?; +{ +let iter = &self.rules; +s.flattened_list("Rule", iter)?; +} +Ok(()) +} +} + +impl<'xml> DeserializeContent<'xml> for ReplicationConfiguration { +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut role: Option = None; +let mut rules: Option = None; +d.for_each_element(|d, x| match x { +b"Role" => { +if role.is_some() { return Err(DeError::DuplicateField); } +role = Some(d.content()?); +Ok(()) +} +b"Rule" => { +let ans: ReplicationRule = d.content()?; +rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +role: role.ok_or(DeError::MissingField)?, +rules: rules.ok_or(DeError::MissingField)?, +}) +} +} +impl SerializeContent for ReplicationRule { +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.delete_marker_replication { +s.content("DeleteMarkerReplication", val)?; +} +s.content("Destination", &self.destination)?; +if let Some(ref val) = self.existing_object_replication { +s.content("ExistingObjectReplication", val)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("ID", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; } -impl<'xml> DeserializeContent<'xml> for ReplicaModificationsStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ReplicaModificationsStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ReplicaModificationsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +if let Some(ref val) = self.priority { +s.content("Priority", val)?; } -impl SerializeContent for ReplicationConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Role", &self.role)?; - { - let iter = &self.rules; - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +if let Some(ref val) = self.source_selection_criteria { +s.content("SourceSelectionCriteria", val)?; } - -impl<'xml> DeserializeContent<'xml> for ReplicationConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut role: Option = None; - let mut rules: Option = None; - d.for_each_element(|d, x| match x { - b"Role" => { - if role.is_some() { - return Err(DeError::DuplicateField); - } - role = Some(d.content()?); - Ok(()) - } - b"Rule" => { - let ans: ReplicationRule = d.content()?; - rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - role: role.ok_or(DeError::MissingField)?, - rules: rules.ok_or(DeError::MissingField)?, - }) - } +s.content("Status", &self.status)?; +Ok(()) } -impl SerializeContent for ReplicationRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.delete_marker_replication { - s.content("DeleteMarkerReplication", val)?; - } - s.content("Destination", &self.destination)?; - if let Some(ref val) = self.existing_object_replication { - s.content("ExistingObjectReplication", val)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("ID", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.priority { - s.content("Priority", val)?; - } - if let Some(ref val) = self.source_selection_criteria { - s.content("SourceSelectionCriteria", val)?; - } - s.content("Status", &self.status)?; - Ok(()) - } } impl<'xml> DeserializeContent<'xml> for ReplicationRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut delete_marker_replication: Option = None; - let mut destination: Option = None; - let mut existing_object_replication: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut prefix: Option = None; - let mut priority: Option = None; - let mut source_selection_criteria: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"DeleteMarkerReplication" => { - if delete_marker_replication.is_some() { - return Err(DeError::DuplicateField); - } - delete_marker_replication = Some(d.content()?); - Ok(()) - } - b"Destination" => { - if destination.is_some() { - return Err(DeError::DuplicateField); - } - destination = Some(d.content()?); - Ok(()) - } - b"ExistingObjectReplication" => { - if existing_object_replication.is_some() { - return Err(DeError::DuplicateField); - } - existing_object_replication = Some(d.content()?); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Priority" => { - if priority.is_some() { - return Err(DeError::DuplicateField); - } - priority = Some(d.content()?); - Ok(()) - } - b"SourceSelectionCriteria" => { - if source_selection_criteria.is_some() { - return Err(DeError::DuplicateField); - } - source_selection_criteria = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - delete_marker_replication, - destination: destination.ok_or(DeError::MissingField)?, - existing_object_replication, - filter, - id, - prefix, - priority, - source_selection_criteria, - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut delete_marker_replication: Option = None; +let mut destination: Option = None; +let mut existing_object_replication: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut prefix: Option = None; +let mut priority: Option = None; +let mut source_selection_criteria: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"DeleteMarkerReplication" => { +if delete_marker_replication.is_some() { return Err(DeError::DuplicateField); } +delete_marker_replication = Some(d.content()?); +Ok(()) +} +b"Destination" => { +if destination.is_some() { return Err(DeError::DuplicateField); } +destination = Some(d.content()?); +Ok(()) +} +b"ExistingObjectReplication" => { +if existing_object_replication.is_some() { return Err(DeError::DuplicateField); } +existing_object_replication = Some(d.content()?); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"ID" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Priority" => { +if priority.is_some() { return Err(DeError::DuplicateField); } +priority = Some(d.content()?); +Ok(()) +} +b"SourceSelectionCriteria" => { +if source_selection_criteria.is_some() { return Err(DeError::DuplicateField); } +source_selection_criteria = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +delete_marker_replication, +destination: destination.ok_or(DeError::MissingField)?, +existing_object_replication, +filter, +id, +prefix, +priority, +source_selection_criteria, +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ReplicationRuleAndOperator { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(iter) = &self.tags { - s.flattened_list("Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(iter) = &self.tags { +s.flattened_list("Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicationRuleAndOperator { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut prefix: Option = None; - let mut tags: Option = None; - d.for_each_element(|d, x| match x { - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - let ans: Tag = d.content()?; - tags.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { prefix, tags }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut prefix: Option = None; +let mut tags: Option = None; +d.for_each_element(|d, x| match x { +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +let ans: Tag = d.content()?; +tags.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +prefix, +tags, +}) +} } impl SerializeContent for ReplicationRuleFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.and { - s.content("And", val)?; - } - if let Some(ref val) = self.prefix { - s.content("Prefix", val)?; - } - if let Some(ref val) = self.tag { - s.content("Tag", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.and { +s.content("And", val)?; +} +if let Some(ref val) = self.prefix { +s.content("Prefix", val)?; +} +if let Some(ref val) = self.tag { +s.content("Tag", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicationRuleFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut and: Option = None; - let mut prefix: Option = None; - let mut tag: Option = None; - d.for_each_element(|d, x| match x { - b"And" => { - if and.is_some() { - return Err(DeError::DuplicateField); - } - and = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"Tag" => { - if tag.is_some() { - return Err(DeError::DuplicateField); - } - tag = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { and, prefix, tag }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut and: Option = None; +let mut prefix: Option = None; +let mut tag: Option = None; +d.for_each_element(|d, x| match x { +b"And" => { +if and.is_some() { return Err(DeError::DuplicateField); } +and = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"Tag" => { +if tag.is_some() { return Err(DeError::DuplicateField); } +tag = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +and, +prefix, +tag, +}) +} } impl SerializeContent for ReplicationRuleStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ReplicationRuleStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ReplicationRuleStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ReplicationRuleStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ReplicationRuleStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ReplicationRuleStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ReplicationTime { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - s.content("Time", &self.time)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +s.content("Time", &self.time)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicationTime { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - let mut time: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - b"Time" => { - if time.is_some() { - return Err(DeError::DuplicateField); - } - time = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - time: time.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +let mut time: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +b"Time" => { +if time.is_some() { return Err(DeError::DuplicateField); } +time = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +time: time.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ReplicationTimeStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ReplicationTimeStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(ReplicationTimeStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(ReplicationTimeStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(ReplicationTimeStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(ReplicationTimeStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ReplicationTimeValue { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.minutes { - s.content("Minutes", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.minutes { +s.content("Minutes", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ReplicationTimeValue { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut minutes: Option = None; - d.for_each_element(|d, x| match x { - b"Minutes" => { - if minutes.is_some() { - return Err(DeError::DuplicateField); - } - minutes = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { minutes }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut minutes: Option = None; +d.for_each_element(|d, x| match x { +b"Minutes" => { +if minutes.is_some() { return Err(DeError::DuplicateField); } +minutes = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +minutes, +}) +} } impl SerializeContent for RequestPaymentConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Payer", &self.payer)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Payer", &self.payer)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RequestPaymentConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut payer: Option = None; - d.for_each_element(|d, x| match x { - b"Payer" => { - if payer.is_some() { - return Err(DeError::DuplicateField); - } - payer = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - payer: payer.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut payer: Option = None; +d.for_each_element(|d, x| match x { +b"Payer" => { +if payer.is_some() { return Err(DeError::DuplicateField); } +payer = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +payer: payer.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for RequestProgress { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.enabled { - s.content("Enabled", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.enabled { +s.content("Enabled", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RequestProgress { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut enabled: Option = None; - d.for_each_element(|d, x| match x { - b"Enabled" => { - if enabled.is_some() { - return Err(DeError::DuplicateField); - } - enabled = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { enabled }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut enabled: Option = None; +d.for_each_element(|d, x| match x { +b"Enabled" => { +if enabled.is_some() { return Err(DeError::DuplicateField); } +enabled = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +enabled, +}) +} } impl SerializeContent for RestoreRequest { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.days { - s.content("Days", val)?; - } - if let Some(ref val) = self.description { - s.content("Description", val)?; - } - if let Some(ref val) = self.glacier_job_parameters { - s.content("GlacierJobParameters", val)?; - } - if let Some(ref val) = self.output_location { - s.content("OutputLocation", val)?; - } - if let Some(ref val) = self.select_parameters { - s.content("SelectParameters", val)?; - } - if let Some(ref val) = self.tier { - s.content("Tier", val)?; - } - if let Some(ref val) = self.type_ { - s.content("Type", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +if let Some(ref val) = self.description { +s.content("Description", val)?; +} +if let Some(ref val) = self.glacier_job_parameters { +s.content("GlacierJobParameters", val)?; +} +if let Some(ref val) = self.output_location { +s.content("OutputLocation", val)?; +} +if let Some(ref val) = self.select_parameters { +s.content("SelectParameters", val)?; +} +if let Some(ref val) = self.tier { +s.content("Tier", val)?; +} +if let Some(ref val) = self.type_ { +s.content("Type", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RestoreRequest { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut days: Option = None; - let mut description: Option = None; - let mut glacier_job_parameters: Option = None; - let mut output_location: Option = None; - let mut select_parameters: Option = None; - let mut tier: Option = None; - let mut type_: Option = None; - d.for_each_element(|d, x| match x { - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - b"Description" => { - if description.is_some() { - return Err(DeError::DuplicateField); - } - description = Some(d.content()?); - Ok(()) - } - b"GlacierJobParameters" => { - if glacier_job_parameters.is_some() { - return Err(DeError::DuplicateField); - } - glacier_job_parameters = Some(d.content()?); - Ok(()) - } - b"OutputLocation" => { - if output_location.is_some() { - return Err(DeError::DuplicateField); - } - output_location = Some(d.content()?); - Ok(()) - } - b"SelectParameters" => { - if select_parameters.is_some() { - return Err(DeError::DuplicateField); - } - select_parameters = Some(d.content()?); - Ok(()) - } - b"Tier" => { - if tier.is_some() { - return Err(DeError::DuplicateField); - } - tier = Some(d.content()?); - Ok(()) - } - b"Type" => { - if type_.is_some() { - return Err(DeError::DuplicateField); - } - type_ = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - days, - description, - glacier_job_parameters, - output_location, - select_parameters, - tier, - type_, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut days: Option = None; +let mut description: Option = None; +let mut glacier_job_parameters: Option = None; +let mut output_location: Option = None; +let mut select_parameters: Option = None; +let mut tier: Option = None; +let mut type_: Option = None; +d.for_each_element(|d, x| match x { +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +b"Description" => { +if description.is_some() { return Err(DeError::DuplicateField); } +description = Some(d.content()?); +Ok(()) +} +b"GlacierJobParameters" => { +if glacier_job_parameters.is_some() { return Err(DeError::DuplicateField); } +glacier_job_parameters = Some(d.content()?); +Ok(()) +} +b"OutputLocation" => { +if output_location.is_some() { return Err(DeError::DuplicateField); } +output_location = Some(d.content()?); +Ok(()) +} +b"SelectParameters" => { +if select_parameters.is_some() { return Err(DeError::DuplicateField); } +select_parameters = Some(d.content()?); +Ok(()) +} +b"Tier" => { +if tier.is_some() { return Err(DeError::DuplicateField); } +tier = Some(d.content()?); +Ok(()) +} +b"Type" => { +if type_.is_some() { return Err(DeError::DuplicateField); } +type_ = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +days, +description, +glacier_job_parameters, +output_location, +select_parameters, +tier, +type_, +}) +} } impl SerializeContent for RestoreRequestType { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for RestoreRequestType { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"SELECT" => Ok(Self::from_static(RestoreRequestType::SELECT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"SELECT" => Ok(Self::from_static(RestoreRequestType::SELECT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for RestoreStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.is_restore_in_progress { - s.content("IsRestoreInProgress", val)?; - } - if let Some(ref val) = self.restore_expiry_date { - s.timestamp("RestoreExpiryDate", val, TimestampFormat::DateTime)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.is_restore_in_progress { +s.content("IsRestoreInProgress", val)?; +} +if let Some(ref val) = self.restore_expiry_date { +s.timestamp("RestoreExpiryDate", val, TimestampFormat::DateTime)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RestoreStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut is_restore_in_progress: Option = None; - let mut restore_expiry_date: Option = None; - d.for_each_element(|d, x| match x { - b"IsRestoreInProgress" => { - if is_restore_in_progress.is_some() { - return Err(DeError::DuplicateField); - } - is_restore_in_progress = Some(d.content()?); - Ok(()) - } - b"RestoreExpiryDate" => { - if restore_expiry_date.is_some() { - return Err(DeError::DuplicateField); - } - restore_expiry_date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - is_restore_in_progress, - restore_expiry_date, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut is_restore_in_progress: Option = None; +let mut restore_expiry_date: Option = None; +d.for_each_element(|d, x| match x { +b"IsRestoreInProgress" => { +if is_restore_in_progress.is_some() { return Err(DeError::DuplicateField); } +is_restore_in_progress = Some(d.content()?); +Ok(()) +} +b"RestoreExpiryDate" => { +if restore_expiry_date.is_some() { return Err(DeError::DuplicateField); } +restore_expiry_date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +is_restore_in_progress, +restore_expiry_date, +}) +} } impl SerializeContent for RoutingRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.condition { - s.content("Condition", val)?; - } - s.content("Redirect", &self.redirect)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.condition { +s.content("Condition", val)?; +} +s.content("Redirect", &self.redirect)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for RoutingRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut condition: Option = None; - let mut redirect: Option = None; - d.for_each_element(|d, x| match x { - b"Condition" => { - if condition.is_some() { - return Err(DeError::DuplicateField); - } - condition = Some(d.content()?); - Ok(()) - } - b"Redirect" => { - if redirect.is_some() { - return Err(DeError::DuplicateField); - } - redirect = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - condition, - redirect: redirect.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut condition: Option = None; +let mut redirect: Option = None; +d.for_each_element(|d, x| match x { +b"Condition" => { +if condition.is_some() { return Err(DeError::DuplicateField); } +condition = Some(d.content()?); +Ok(()) +} +b"Redirect" => { +if redirect.is_some() { return Err(DeError::DuplicateField); } +redirect = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +condition, +redirect: redirect.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for S3KeyFilter { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.filter_rules { - s.flattened_list("FilterRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.filter_rules { +s.flattened_list("FilterRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for S3KeyFilter { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut filter_rules: Option = None; - d.for_each_element(|d, x| match x { - b"FilterRule" => { - let ans: FilterRule = d.content()?; - filter_rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { filter_rules }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut filter_rules: Option = None; +d.for_each_element(|d, x| match x { +b"FilterRule" => { +let ans: FilterRule = d.content()?; +filter_rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +filter_rules, +}) +} } impl SerializeContent for S3Location { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(iter) = &self.access_control_list { - s.list("AccessControlList", "Grant", iter)?; - } - s.content("BucketName", &self.bucket_name)?; - if let Some(ref val) = self.canned_acl { - s.content("CannedACL", val)?; - } - if let Some(ref val) = self.encryption { - s.content("Encryption", val)?; - } - s.content("Prefix", &self.prefix)?; - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - if let Some(ref val) = self.tagging { - s.content("Tagging", val)?; - } - if let Some(iter) = &self.user_metadata { - s.list("UserMetadata", "MetadataEntry", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(iter) = &self.access_control_list { +s.list("AccessControlList", "Grant", iter)?; +} +s.content("BucketName", &self.bucket_name)?; +if let Some(ref val) = self.canned_acl { +s.content("CannedACL", val)?; +} +if let Some(ref val) = self.encryption { +s.content("Encryption", val)?; +} +s.content("Prefix", &self.prefix)?; +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +if let Some(ref val) = self.tagging { +s.content("Tagging", val)?; +} +if let Some(iter) = &self.user_metadata { +s.list("UserMetadata", "MetadataEntry", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for S3Location { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_control_list: Option = None; - let mut bucket_name: Option = None; - let mut canned_acl: Option = None; - let mut encryption: Option = None; - let mut prefix: Option = None; - let mut storage_class: Option = None; - let mut tagging: Option = None; - let mut user_metadata: Option = None; - d.for_each_element(|d, x| match x { - b"AccessControlList" => { - if access_control_list.is_some() { - return Err(DeError::DuplicateField); - } - access_control_list = Some(d.list_content("Grant")?); - Ok(()) - } - b"BucketName" => { - if bucket_name.is_some() { - return Err(DeError::DuplicateField); - } - bucket_name = Some(d.content()?); - Ok(()) - } - b"CannedACL" => { - if canned_acl.is_some() { - return Err(DeError::DuplicateField); - } - canned_acl = Some(d.content()?); - Ok(()) - } - b"Encryption" => { - if encryption.is_some() { - return Err(DeError::DuplicateField); - } - encryption = Some(d.content()?); - Ok(()) - } - b"Prefix" => { - if prefix.is_some() { - return Err(DeError::DuplicateField); - } - prefix = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - b"Tagging" => { - if tagging.is_some() { - return Err(DeError::DuplicateField); - } - tagging = Some(d.content()?); - Ok(()) - } - b"UserMetadata" => { - if user_metadata.is_some() { - return Err(DeError::DuplicateField); - } - user_metadata = Some(d.list_content("MetadataEntry")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_control_list, - bucket_name: bucket_name.ok_or(DeError::MissingField)?, - canned_acl, - encryption, - prefix: prefix.ok_or(DeError::MissingField)?, - storage_class, - tagging, - user_metadata, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_control_list: Option = None; +let mut bucket_name: Option = None; +let mut canned_acl: Option = None; +let mut encryption: Option = None; +let mut prefix: Option = None; +let mut storage_class: Option = None; +let mut tagging: Option = None; +let mut user_metadata: Option = None; +d.for_each_element(|d, x| match x { +b"AccessControlList" => { +if access_control_list.is_some() { return Err(DeError::DuplicateField); } +access_control_list = Some(d.list_content("Grant")?); +Ok(()) +} +b"BucketName" => { +if bucket_name.is_some() { return Err(DeError::DuplicateField); } +bucket_name = Some(d.content()?); +Ok(()) +} +b"CannedACL" => { +if canned_acl.is_some() { return Err(DeError::DuplicateField); } +canned_acl = Some(d.content()?); +Ok(()) +} +b"Encryption" => { +if encryption.is_some() { return Err(DeError::DuplicateField); } +encryption = Some(d.content()?); +Ok(()) +} +b"Prefix" => { +if prefix.is_some() { return Err(DeError::DuplicateField); } +prefix = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +b"Tagging" => { +if tagging.is_some() { return Err(DeError::DuplicateField); } +tagging = Some(d.content()?); +Ok(()) +} +b"UserMetadata" => { +if user_metadata.is_some() { return Err(DeError::DuplicateField); } +user_metadata = Some(d.list_content("MetadataEntry")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_control_list, +bucket_name: bucket_name.ok_or(DeError::MissingField)?, +canned_acl, +encryption, +prefix: prefix.ok_or(DeError::MissingField)?, +storage_class, +tagging, +user_metadata, +}) +} } impl SerializeContent for S3TablesDestination { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("TableBucketArn", &self.table_bucket_arn)?; - s.content("TableName", &self.table_name)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("TableBucketArn", &self.table_bucket_arn)?; +s.content("TableName", &self.table_name)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for S3TablesDestination { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut table_bucket_arn: Option = None; - let mut table_name: Option = None; - d.for_each_element(|d, x| match x { - b"TableBucketArn" => { - if table_bucket_arn.is_some() { - return Err(DeError::DuplicateField); - } - table_bucket_arn = Some(d.content()?); - Ok(()) - } - b"TableName" => { - if table_name.is_some() { - return Err(DeError::DuplicateField); - } - table_name = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, - table_name: table_name.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut table_bucket_arn: Option = None; +let mut table_name: Option = None; +d.for_each_element(|d, x| match x { +b"TableBucketArn" => { +if table_bucket_arn.is_some() { return Err(DeError::DuplicateField); } +table_bucket_arn = Some(d.content()?); +Ok(()) +} +b"TableName" => { +if table_name.is_some() { return Err(DeError::DuplicateField); } +table_name = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, +table_name: table_name.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for S3TablesDestinationResult { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("TableArn", &self.table_arn)?; - s.content("TableBucketArn", &self.table_bucket_arn)?; - s.content("TableName", &self.table_name)?; - s.content("TableNamespace", &self.table_namespace)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("TableArn", &self.table_arn)?; +s.content("TableBucketArn", &self.table_bucket_arn)?; +s.content("TableName", &self.table_name)?; +s.content("TableNamespace", &self.table_namespace)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for S3TablesDestinationResult { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut table_arn: Option = None; - let mut table_bucket_arn: Option = None; - let mut table_name: Option = None; - let mut table_namespace: Option = None; - d.for_each_element(|d, x| match x { - b"TableArn" => { - if table_arn.is_some() { - return Err(DeError::DuplicateField); - } - table_arn = Some(d.content()?); - Ok(()) - } - b"TableBucketArn" => { - if table_bucket_arn.is_some() { - return Err(DeError::DuplicateField); - } - table_bucket_arn = Some(d.content()?); - Ok(()) - } - b"TableName" => { - if table_name.is_some() { - return Err(DeError::DuplicateField); - } - table_name = Some(d.content()?); - Ok(()) - } - b"TableNamespace" => { - if table_namespace.is_some() { - return Err(DeError::DuplicateField); - } - table_namespace = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - table_arn: table_arn.ok_or(DeError::MissingField)?, - table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, - table_name: table_name.ok_or(DeError::MissingField)?, - table_namespace: table_namespace.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut table_arn: Option = None; +let mut table_bucket_arn: Option = None; +let mut table_name: Option = None; +let mut table_namespace: Option = None; +d.for_each_element(|d, x| match x { +b"TableArn" => { +if table_arn.is_some() { return Err(DeError::DuplicateField); } +table_arn = Some(d.content()?); +Ok(()) +} +b"TableBucketArn" => { +if table_bucket_arn.is_some() { return Err(DeError::DuplicateField); } +table_bucket_arn = Some(d.content()?); +Ok(()) +} +b"TableName" => { +if table_name.is_some() { return Err(DeError::DuplicateField); } +table_name = Some(d.content()?); +Ok(()) +} +b"TableNamespace" => { +if table_namespace.is_some() { return Err(DeError::DuplicateField); } +table_namespace = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +table_arn: table_arn.ok_or(DeError::MissingField)?, +table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, +table_name: table_name.ok_or(DeError::MissingField)?, +table_namespace: table_namespace.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for SSEKMS { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("KeyId", &self.key_id)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("KeyId", &self.key_id)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SSEKMS { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut key_id: Option = None; - d.for_each_element(|d, x| match x { - b"KeyId" => { - if key_id.is_some() { - return Err(DeError::DuplicateField); - } - key_id = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - key_id: key_id.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut key_id: Option = None; +d.for_each_element(|d, x| match x { +b"KeyId" => { +if key_id.is_some() { return Err(DeError::DuplicateField); } +key_id = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +key_id: key_id.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for SSES3 { - fn serialize_content(&self, _: &mut Serializer) -> SerResult { - Ok(()) - } +fn serialize_content(&self, _: &mut Serializer) -> SerResult { +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SSES3 { - fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { - Ok(Self {}) - } +fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { +Ok(Self { +}) +} } impl SerializeContent for ScanRange { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.end { - s.content("End", val)?; - } - if let Some(ref val) = self.start { - s.content("Start", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.end { +s.content("End", val)?; +} +if let Some(ref val) = self.start { +s.content("Start", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ScanRange { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut end: Option = None; - let mut start: Option = None; - d.for_each_element(|d, x| match x { - b"End" => { - if end.is_some() { - return Err(DeError::DuplicateField); - } - end = Some(d.content()?); - Ok(()) - } - b"Start" => { - if start.is_some() { - return Err(DeError::DuplicateField); - } - start = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { end, start }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut end: Option = None; +let mut start: Option = None; +d.for_each_element(|d, x| match x { +b"End" => { +if end.is_some() { return Err(DeError::DuplicateField); } +end = Some(d.content()?); +Ok(()) +} +b"Start" => { +if start.is_some() { return Err(DeError::DuplicateField); } +start = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +end, +start, +}) +} } impl SerializeContent for SelectObjectContentRequest { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Expression", &self.expression)?; - s.content("ExpressionType", &self.expression_type)?; - s.content("InputSerialization", &self.input_serialization)?; - s.content("OutputSerialization", &self.output_serialization)?; - if let Some(ref val) = self.request_progress { - s.content("RequestProgress", val)?; - } - if let Some(ref val) = self.scan_range { - s.content("ScanRange", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Expression", &self.expression)?; +s.content("ExpressionType", &self.expression_type)?; +s.content("InputSerialization", &self.input_serialization)?; +s.content("OutputSerialization", &self.output_serialization)?; +if let Some(ref val) = self.request_progress { +s.content("RequestProgress", val)?; +} +if let Some(ref val) = self.scan_range { +s.content("ScanRange", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SelectObjectContentRequest { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut expression: Option = None; - let mut expression_type: Option = None; - let mut input_serialization: Option = None; - let mut output_serialization: Option = None; - let mut request_progress: Option = None; - let mut scan_range: Option = None; - d.for_each_element(|d, x| match x { - b"Expression" => { - if expression.is_some() { - return Err(DeError::DuplicateField); - } - expression = Some(d.content()?); - Ok(()) - } - b"ExpressionType" => { - if expression_type.is_some() { - return Err(DeError::DuplicateField); - } - expression_type = Some(d.content()?); - Ok(()) - } - b"InputSerialization" => { - if input_serialization.is_some() { - return Err(DeError::DuplicateField); - } - input_serialization = Some(d.content()?); - Ok(()) - } - b"OutputSerialization" => { - if output_serialization.is_some() { - return Err(DeError::DuplicateField); - } - output_serialization = Some(d.content()?); - Ok(()) - } - b"RequestProgress" => { - if request_progress.is_some() { - return Err(DeError::DuplicateField); - } - request_progress = Some(d.content()?); - Ok(()) - } - b"ScanRange" => { - if scan_range.is_some() { - return Err(DeError::DuplicateField); - } - scan_range = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - expression: expression.ok_or(DeError::MissingField)?, - expression_type: expression_type.ok_or(DeError::MissingField)?, - input_serialization: input_serialization.ok_or(DeError::MissingField)?, - output_serialization: output_serialization.ok_or(DeError::MissingField)?, - request_progress, - scan_range, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut expression: Option = None; +let mut expression_type: Option = None; +let mut input_serialization: Option = None; +let mut output_serialization: Option = None; +let mut request_progress: Option = None; +let mut scan_range: Option = None; +d.for_each_element(|d, x| match x { +b"Expression" => { +if expression.is_some() { return Err(DeError::DuplicateField); } +expression = Some(d.content()?); +Ok(()) +} +b"ExpressionType" => { +if expression_type.is_some() { return Err(DeError::DuplicateField); } +expression_type = Some(d.content()?); +Ok(()) +} +b"InputSerialization" => { +if input_serialization.is_some() { return Err(DeError::DuplicateField); } +input_serialization = Some(d.content()?); +Ok(()) +} +b"OutputSerialization" => { +if output_serialization.is_some() { return Err(DeError::DuplicateField); } +output_serialization = Some(d.content()?); +Ok(()) +} +b"RequestProgress" => { +if request_progress.is_some() { return Err(DeError::DuplicateField); } +request_progress = Some(d.content()?); +Ok(()) +} +b"ScanRange" => { +if scan_range.is_some() { return Err(DeError::DuplicateField); } +scan_range = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +expression: expression.ok_or(DeError::MissingField)?, +expression_type: expression_type.ok_or(DeError::MissingField)?, +input_serialization: input_serialization.ok_or(DeError::MissingField)?, +output_serialization: output_serialization.ok_or(DeError::MissingField)?, +request_progress, +scan_range, +}) +} } impl SerializeContent for SelectParameters { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Expression", &self.expression)?; - s.content("ExpressionType", &self.expression_type)?; - s.content("InputSerialization", &self.input_serialization)?; - s.content("OutputSerialization", &self.output_serialization)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Expression", &self.expression)?; +s.content("ExpressionType", &self.expression_type)?; +s.content("InputSerialization", &self.input_serialization)?; +s.content("OutputSerialization", &self.output_serialization)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SelectParameters { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut expression: Option = None; - let mut expression_type: Option = None; - let mut input_serialization: Option = None; - let mut output_serialization: Option = None; - d.for_each_element(|d, x| match x { - b"Expression" => { - if expression.is_some() { - return Err(DeError::DuplicateField); - } - expression = Some(d.content()?); - Ok(()) - } - b"ExpressionType" => { - if expression_type.is_some() { - return Err(DeError::DuplicateField); - } - expression_type = Some(d.content()?); - Ok(()) - } - b"InputSerialization" => { - if input_serialization.is_some() { - return Err(DeError::DuplicateField); - } - input_serialization = Some(d.content()?); - Ok(()) - } - b"OutputSerialization" => { - if output_serialization.is_some() { - return Err(DeError::DuplicateField); - } - output_serialization = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - expression: expression.ok_or(DeError::MissingField)?, - expression_type: expression_type.ok_or(DeError::MissingField)?, - input_serialization: input_serialization.ok_or(DeError::MissingField)?, - output_serialization: output_serialization.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut expression: Option = None; +let mut expression_type: Option = None; +let mut input_serialization: Option = None; +let mut output_serialization: Option = None; +d.for_each_element(|d, x| match x { +b"Expression" => { +if expression.is_some() { return Err(DeError::DuplicateField); } +expression = Some(d.content()?); +Ok(()) +} +b"ExpressionType" => { +if expression_type.is_some() { return Err(DeError::DuplicateField); } +expression_type = Some(d.content()?); +Ok(()) +} +b"InputSerialization" => { +if input_serialization.is_some() { return Err(DeError::DuplicateField); } +input_serialization = Some(d.content()?); +Ok(()) +} +b"OutputSerialization" => { +if output_serialization.is_some() { return Err(DeError::DuplicateField); } +output_serialization = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +expression: expression.ok_or(DeError::MissingField)?, +expression_type: expression_type.ok_or(DeError::MissingField)?, +input_serialization: input_serialization.ok_or(DeError::MissingField)?, +output_serialization: output_serialization.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ServerSideEncryption { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for ServerSideEncryption { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"AES256" => Ok(Self::from_static(ServerSideEncryption::AES256)), - b"aws:kms" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS)), - b"aws:kms:dsse" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS_DSSE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"AES256" => Ok(Self::from_static(ServerSideEncryption::AES256)), +b"aws:kms" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS)), +b"aws:kms:dsse" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS_DSSE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for ServerSideEncryptionByDefault { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.kms_master_key_id { - s.content("KMSMasterKeyID", val)?; - } - s.content("SSEAlgorithm", &self.sse_algorithm)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.kms_master_key_id { +s.content("KMSMasterKeyID", val)?; +} +s.content("SSEAlgorithm", &self.sse_algorithm)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionByDefault { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut kms_master_key_id: Option = None; - let mut sse_algorithm: Option = None; - d.for_each_element(|d, x| match x { - b"KMSMasterKeyID" => { - if kms_master_key_id.is_some() { - return Err(DeError::DuplicateField); - } - kms_master_key_id = Some(d.content()?); - Ok(()) - } - b"SSEAlgorithm" => { - if sse_algorithm.is_some() { - return Err(DeError::DuplicateField); - } - sse_algorithm = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - kms_master_key_id, - sse_algorithm: sse_algorithm.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut kms_master_key_id: Option = None; +let mut sse_algorithm: Option = None; +d.for_each_element(|d, x| match x { +b"KMSMasterKeyID" => { +if kms_master_key_id.is_some() { return Err(DeError::DuplicateField); } +kms_master_key_id = Some(d.content()?); +Ok(()) +} +b"SSEAlgorithm" => { +if sse_algorithm.is_some() { return Err(DeError::DuplicateField); } +sse_algorithm = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +kms_master_key_id, +sse_algorithm: sse_algorithm.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ServerSideEncryptionConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.rules; - s.flattened_list("Rule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.rules; +s.flattened_list("Rule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut rules: Option = None; - d.for_each_element(|d, x| match x { - b"Rule" => { - let ans: ServerSideEncryptionRule = d.content()?; - rules.get_or_insert_with(List::new).push(ans); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - rules: rules.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut rules: Option = None; +d.for_each_element(|d, x| match x { +b"Rule" => { +let ans: ServerSideEncryptionRule = d.content()?; +rules.get_or_insert_with(List::new).push(ans); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +rules: rules.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for ServerSideEncryptionRule { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.apply_server_side_encryption_by_default { - s.content("ApplyServerSideEncryptionByDefault", val)?; - } - if let Some(ref val) = self.bucket_key_enabled { - s.content("BucketKeyEnabled", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.apply_server_side_encryption_by_default { +s.content("ApplyServerSideEncryptionByDefault", val)?; +} +if let Some(ref val) = self.bucket_key_enabled { +s.content("BucketKeyEnabled", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionRule { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut apply_server_side_encryption_by_default: Option = None; - let mut bucket_key_enabled: Option = None; - d.for_each_element(|d, x| match x { - b"ApplyServerSideEncryptionByDefault" => { - if apply_server_side_encryption_by_default.is_some() { - return Err(DeError::DuplicateField); - } - apply_server_side_encryption_by_default = Some(d.content()?); - Ok(()) - } - b"BucketKeyEnabled" => { - if bucket_key_enabled.is_some() { - return Err(DeError::DuplicateField); - } - bucket_key_enabled = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - apply_server_side_encryption_by_default, - bucket_key_enabled, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut apply_server_side_encryption_by_default: Option = None; +let mut bucket_key_enabled: Option = None; +d.for_each_element(|d, x| match x { +b"ApplyServerSideEncryptionByDefault" => { +if apply_server_side_encryption_by_default.is_some() { return Err(DeError::DuplicateField); } +apply_server_side_encryption_by_default = Some(d.content()?); +Ok(()) +} +b"BucketKeyEnabled" => { +if bucket_key_enabled.is_some() { return Err(DeError::DuplicateField); } +bucket_key_enabled = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +apply_server_side_encryption_by_default, +bucket_key_enabled, +}) +} } impl SerializeContent for SessionCredentials { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("AccessKeyId", &self.access_key_id)?; - s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; - s.content("SecretAccessKey", &self.secret_access_key)?; - s.content("SessionToken", &self.session_token)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("AccessKeyId", &self.access_key_id)?; +s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; +s.content("SecretAccessKey", &self.secret_access_key)?; +s.content("SessionToken", &self.session_token)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SessionCredentials { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_key_id: Option = None; - let mut expiration: Option = None; - let mut secret_access_key: Option = None; - let mut session_token: Option = None; - d.for_each_element(|d, x| match x { - b"AccessKeyId" => { - if access_key_id.is_some() { - return Err(DeError::DuplicateField); - } - access_key_id = Some(d.content()?); - Ok(()) - } - b"Expiration" => { - if expiration.is_some() { - return Err(DeError::DuplicateField); - } - expiration = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"SecretAccessKey" => { - if secret_access_key.is_some() { - return Err(DeError::DuplicateField); - } - secret_access_key = Some(d.content()?); - Ok(()) - } - b"SessionToken" => { - if session_token.is_some() { - return Err(DeError::DuplicateField); - } - session_token = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_key_id: access_key_id.ok_or(DeError::MissingField)?, - expiration: expiration.ok_or(DeError::MissingField)?, - secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, - session_token: session_token.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_key_id: Option = None; +let mut expiration: Option = None; +let mut secret_access_key: Option = None; +let mut session_token: Option = None; +d.for_each_element(|d, x| match x { +b"AccessKeyId" => { +if access_key_id.is_some() { return Err(DeError::DuplicateField); } +access_key_id = Some(d.content()?); +Ok(()) +} +b"Expiration" => { +if expiration.is_some() { return Err(DeError::DuplicateField); } +expiration = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"SecretAccessKey" => { +if secret_access_key.is_some() { return Err(DeError::DuplicateField); } +secret_access_key = Some(d.content()?); +Ok(()) +} +b"SessionToken" => { +if session_token.is_some() { return Err(DeError::DuplicateField); } +session_token = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_key_id: access_key_id.ok_or(DeError::MissingField)?, +expiration: expiration.ok_or(DeError::MissingField)?, +secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, +session_token: session_token.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for SimplePrefix { - fn serialize_content(&self, _: &mut Serializer) -> SerResult { - Ok(()) - } +fn serialize_content(&self, _: &mut Serializer) -> SerResult { +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SimplePrefix { - fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { - Ok(Self {}) - } +fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { +Ok(Self { +}) +} } impl SerializeContent for SourceSelectionCriteria { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.replica_modifications { - s.content("ReplicaModifications", val)?; - } - if let Some(ref val) = self.sse_kms_encrypted_objects { - s.content("SseKmsEncryptedObjects", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.replica_modifications { +s.content("ReplicaModifications", val)?; +} +if let Some(ref val) = self.sse_kms_encrypted_objects { +s.content("SseKmsEncryptedObjects", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SourceSelectionCriteria { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut replica_modifications: Option = None; - let mut sse_kms_encrypted_objects: Option = None; - d.for_each_element(|d, x| match x { - b"ReplicaModifications" => { - if replica_modifications.is_some() { - return Err(DeError::DuplicateField); - } - replica_modifications = Some(d.content()?); - Ok(()) - } - b"SseKmsEncryptedObjects" => { - if sse_kms_encrypted_objects.is_some() { - return Err(DeError::DuplicateField); - } - sse_kms_encrypted_objects = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - replica_modifications, - sse_kms_encrypted_objects, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut replica_modifications: Option = None; +let mut sse_kms_encrypted_objects: Option = None; +d.for_each_element(|d, x| match x { +b"ReplicaModifications" => { +if replica_modifications.is_some() { return Err(DeError::DuplicateField); } +replica_modifications = Some(d.content()?); +Ok(()) +} +b"SseKmsEncryptedObjects" => { +if sse_kms_encrypted_objects.is_some() { return Err(DeError::DuplicateField); } +sse_kms_encrypted_objects = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +replica_modifications, +sse_kms_encrypted_objects, +}) +} } impl SerializeContent for SseKmsEncryptedObjects { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Status", &self.status)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Status", &self.status)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for SseKmsEncryptedObjects { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - status: status.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +status: status.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for SseKmsEncryptedObjectsStatus { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for SseKmsEncryptedObjectsStatus { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Disabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::DISABLED)), - b"Enabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Disabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::DISABLED)), +b"Enabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Stats { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.bytes_processed { - s.content("BytesProcessed", val)?; - } - if let Some(ref val) = self.bytes_returned { - s.content("BytesReturned", val)?; - } - if let Some(ref val) = self.bytes_scanned { - s.content("BytesScanned", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.bytes_processed { +s.content("BytesProcessed", val)?; +} +if let Some(ref val) = self.bytes_returned { +s.content("BytesReturned", val)?; +} +if let Some(ref val) = self.bytes_scanned { +s.content("BytesScanned", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Stats { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut bytes_processed: Option = None; - let mut bytes_returned: Option = None; - let mut bytes_scanned: Option = None; - d.for_each_element(|d, x| match x { - b"BytesProcessed" => { - if bytes_processed.is_some() { - return Err(DeError::DuplicateField); - } - bytes_processed = Some(d.content()?); - Ok(()) - } - b"BytesReturned" => { - if bytes_returned.is_some() { - return Err(DeError::DuplicateField); - } - bytes_returned = Some(d.content()?); - Ok(()) - } - b"BytesScanned" => { - if bytes_scanned.is_some() { - return Err(DeError::DuplicateField); - } - bytes_scanned = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - bytes_processed, - bytes_returned, - bytes_scanned, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut bytes_processed: Option = None; +let mut bytes_returned: Option = None; +let mut bytes_scanned: Option = None; +d.for_each_element(|d, x| match x { +b"BytesProcessed" => { +if bytes_processed.is_some() { return Err(DeError::DuplicateField); } +bytes_processed = Some(d.content()?); +Ok(()) +} +b"BytesReturned" => { +if bytes_returned.is_some() { return Err(DeError::DuplicateField); } +bytes_returned = Some(d.content()?); +Ok(()) +} +b"BytesScanned" => { +if bytes_scanned.is_some() { return Err(DeError::DuplicateField); } +bytes_scanned = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +bytes_processed, +bytes_returned, +bytes_scanned, +}) +} } impl SerializeContent for StorageClass { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for StorageClass { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DEEP_ARCHIVE" => Ok(Self::from_static(StorageClass::DEEP_ARCHIVE)), - b"EXPRESS_ONEZONE" => Ok(Self::from_static(StorageClass::EXPRESS_ONEZONE)), - b"GLACIER" => Ok(Self::from_static(StorageClass::GLACIER)), - b"GLACIER_IR" => Ok(Self::from_static(StorageClass::GLACIER_IR)), - b"INTELLIGENT_TIERING" => Ok(Self::from_static(StorageClass::INTELLIGENT_TIERING)), - b"ONEZONE_IA" => Ok(Self::from_static(StorageClass::ONEZONE_IA)), - b"OUTPOSTS" => Ok(Self::from_static(StorageClass::OUTPOSTS)), - b"REDUCED_REDUNDANCY" => Ok(Self::from_static(StorageClass::REDUCED_REDUNDANCY)), - b"SNOW" => Ok(Self::from_static(StorageClass::SNOW)), - b"STANDARD" => Ok(Self::from_static(StorageClass::STANDARD)), - b"STANDARD_IA" => Ok(Self::from_static(StorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DEEP_ARCHIVE" => Ok(Self::from_static(StorageClass::DEEP_ARCHIVE)), +b"EXPRESS_ONEZONE" => Ok(Self::from_static(StorageClass::EXPRESS_ONEZONE)), +b"GLACIER" => Ok(Self::from_static(StorageClass::GLACIER)), +b"GLACIER_IR" => Ok(Self::from_static(StorageClass::GLACIER_IR)), +b"INTELLIGENT_TIERING" => Ok(Self::from_static(StorageClass::INTELLIGENT_TIERING)), +b"ONEZONE_IA" => Ok(Self::from_static(StorageClass::ONEZONE_IA)), +b"OUTPOSTS" => Ok(Self::from_static(StorageClass::OUTPOSTS)), +b"REDUCED_REDUNDANCY" => Ok(Self::from_static(StorageClass::REDUCED_REDUNDANCY)), +b"SNOW" => Ok(Self::from_static(StorageClass::SNOW)), +b"STANDARD" => Ok(Self::from_static(StorageClass::STANDARD)), +b"STANDARD_IA" => Ok(Self::from_static(StorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } +}) +} } impl SerializeContent for StorageClassAnalysis { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.data_export { - s.content("DataExport", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.data_export { +s.content("DataExport", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysis { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut data_export: Option = None; - d.for_each_element(|d, x| match x { - b"DataExport" => { - if data_export.is_some() { - return Err(DeError::DuplicateField); - } - data_export = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { data_export }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut data_export: Option = None; +d.for_each_element(|d, x| match x { +b"DataExport" => { +if data_export.is_some() { return Err(DeError::DuplicateField); } +data_export = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +data_export, +}) +} } impl SerializeContent for StorageClassAnalysisDataExport { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("Destination", &self.destination)?; - s.content("OutputSchemaVersion", &self.output_schema_version)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("Destination", &self.destination)?; +s.content("OutputSchemaVersion", &self.output_schema_version)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysisDataExport { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut destination: Option = None; - let mut output_schema_version: Option = None; - d.for_each_element(|d, x| match x { - b"Destination" => { - if destination.is_some() { - return Err(DeError::DuplicateField); - } - destination = Some(d.content()?); - Ok(()) - } - b"OutputSchemaVersion" => { - if output_schema_version.is_some() { - return Err(DeError::DuplicateField); - } - output_schema_version = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - destination: destination.ok_or(DeError::MissingField)?, - output_schema_version: output_schema_version.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut destination: Option = None; +let mut output_schema_version: Option = None; +d.for_each_element(|d, x| match x { +b"Destination" => { +if destination.is_some() { return Err(DeError::DuplicateField); } +destination = Some(d.content()?); +Ok(()) +} +b"OutputSchemaVersion" => { +if output_schema_version.is_some() { return Err(DeError::DuplicateField); } +output_schema_version = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +destination: destination.ok_or(DeError::MissingField)?, +output_schema_version: output_schema_version.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for StorageClassAnalysisSchemaVersion { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysisSchemaVersion { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"V_1" => Ok(Self::from_static(StorageClassAnalysisSchemaVersion::V_1)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"V_1" => Ok(Self::from_static(StorageClassAnalysisSchemaVersion::V_1)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Tag { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.key { - s.content("Key", val)?; - } - if let Some(ref val) = self.value { - s.content("Value", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.key { +s.content("Key", val)?; +} +if let Some(ref val) = self.value { +s.content("Value", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Tag { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut key: Option = None; - let mut value: Option = None; - d.for_each_element(|d, x| match x { - b"Key" => { - if key.is_some() { - return Err(DeError::DuplicateField); - } - key = Some(d.content()?); - Ok(()) - } - b"Value" => { - if value.is_some() { - return Err(DeError::DuplicateField); - } - value = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { key, value }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut key: Option = None; +let mut value: Option = None; +d.for_each_element(|d, x| match x { +b"Key" => { +if key.is_some() { return Err(DeError::DuplicateField); } +key = Some(d.content()?); +Ok(()) +} +b"Value" => { +if value.is_some() { return Err(DeError::DuplicateField); } +value = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +key, +value, +}) +} } impl SerializeContent for Tagging { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.tag_set; - s.list("TagSet", "Tag", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.tag_set; +s.list("TagSet", "Tag", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Tagging { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut tag_set: Option = None; - d.for_each_element(|d, x| match x { - b"TagSet" => { - if tag_set.is_some() { - return Err(DeError::DuplicateField); - } - tag_set = Some(d.list_content("Tag")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - tag_set: tag_set.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut tag_set: Option = None; +d.for_each_element(|d, x| match x { +b"TagSet" => { +if tag_set.is_some() { return Err(DeError::DuplicateField); } +tag_set = Some(d.list_content("Tag")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +tag_set: tag_set.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for TargetGrant { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.grantee { - let attrs = [ - ("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), - ("xsi:type", val.type_.as_str()), - ]; - s.content_with_attrs("Grantee", &attrs, val)?; - } - if let Some(ref val) = self.permission { - s.content("Permission", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.grantee { +let attrs = [ +("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), +("xsi:type", val.type_.as_str()), +]; +s.content_with_attrs("Grantee", &attrs, val)?; +} +if let Some(ref val) = self.permission { +s.content("Permission", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for TargetGrant { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut grantee: Option = None; - let mut permission: Option = None; - d.for_each_element_with_start(|d, x, start| match x { - b"Grantee" => { - if grantee.is_some() { - return Err(DeError::DuplicateField); - } - let mut type_: Option = None; - for attr in start.attributes() { - let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; - if attr.key.as_ref() == b"xsi:type" { - type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); - } - } - let mut display_name: Option = None; - let mut email_address: Option = None; - let mut id: Option = None; - let mut uri: Option = None; - d.for_each_element(|d, x| match x { - b"DisplayName" => { - if display_name.is_some() { - return Err(DeError::DuplicateField); - } - display_name = Some(d.content()?); - Ok(()) - } - b"EmailAddress" => { - if email_address.is_some() { - return Err(DeError::DuplicateField); - } - email_address = Some(d.content()?); - Ok(()) - } - b"ID" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"URI" => { - if uri.is_some() { - return Err(DeError::DuplicateField); - } - uri = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - grantee = Some(Grantee { - display_name, - email_address, - id, - type_: type_.ok_or(DeError::MissingField)?, - uri, - }); - Ok(()) - } - b"Permission" => { - if permission.is_some() { - return Err(DeError::DuplicateField); - } - permission = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { grantee, permission }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut grantee: Option = None; +let mut permission: Option = None; +d.for_each_element_with_start(|d, x, start| match x { +b"Grantee" => { +if grantee.is_some() { return Err(DeError::DuplicateField); } +let mut type_: Option = None; +for attr in start.attributes() { + let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; + if attr.key.as_ref() == b"xsi:type" { + type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); + } +} +let mut display_name: Option = None; +let mut email_address: Option = None; +let mut id: Option = None; +let mut uri: Option = None; +d.for_each_element(|d, x| match x { +b"DisplayName" => { + if display_name.is_some() { return Err(DeError::DuplicateField); } + display_name = Some(d.content()?); + Ok(()) +} +b"EmailAddress" => { + if email_address.is_some() { return Err(DeError::DuplicateField); } + email_address = Some(d.content()?); + Ok(()) +} +b"ID" => { + if id.is_some() { return Err(DeError::DuplicateField); } + id = Some(d.content()?); + Ok(()) +} +b"URI" => { + if uri.is_some() { return Err(DeError::DuplicateField); } + uri = Some(d.content()?); + Ok(()) +} +_ => Err(DeError::UnexpectedTagName), +})?; +grantee = Some(Grantee { +display_name, +email_address, +id, +type_: type_.ok_or(DeError::MissingField)?, +uri, +}); +Ok(()) +} +b"Permission" => { +if permission.is_some() { return Err(DeError::DuplicateField); } +permission = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +grantee, +permission, +}) +} } impl SerializeContent for TargetObjectKeyFormat { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.partitioned_prefix { - s.content("PartitionedPrefix", val)?; - } - if let Some(ref val) = self.simple_prefix { - s.content("SimplePrefix", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.partitioned_prefix { +s.content("PartitionedPrefix", val)?; +} +if let Some(ref val) = self.simple_prefix { +s.content("SimplePrefix", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for TargetObjectKeyFormat { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut partitioned_prefix: Option = None; - let mut simple_prefix: Option = None; - d.for_each_element(|d, x| match x { - b"PartitionedPrefix" => { - if partitioned_prefix.is_some() { - return Err(DeError::DuplicateField); - } - partitioned_prefix = Some(d.content()?); - Ok(()) - } - b"SimplePrefix" => { - if simple_prefix.is_some() { - return Err(DeError::DuplicateField); - } - simple_prefix = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - partitioned_prefix, - simple_prefix, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut partitioned_prefix: Option = None; +let mut simple_prefix: Option = None; +d.for_each_element(|d, x| match x { +b"PartitionedPrefix" => { +if partitioned_prefix.is_some() { return Err(DeError::DuplicateField); } +partitioned_prefix = Some(d.content()?); +Ok(()) +} +b"SimplePrefix" => { +if simple_prefix.is_some() { return Err(DeError::DuplicateField); } +simple_prefix = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +partitioned_prefix, +simple_prefix, +}) +} } impl SerializeContent for Tier { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Tier { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"Bulk" => Ok(Self::from_static(Tier::BULK)), - b"Expedited" => Ok(Self::from_static(Tier::EXPEDITED)), - b"Standard" => Ok(Self::from_static(Tier::STANDARD)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"Bulk" => Ok(Self::from_static(Tier::BULK)), +b"Expedited" => Ok(Self::from_static(Tier::EXPEDITED)), +b"Standard" => Ok(Self::from_static(Tier::STANDARD)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Tiering { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - s.content("AccessTier", &self.access_tier)?; - s.content("Days", &self.days)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +s.content("AccessTier", &self.access_tier)?; +s.content("Days", &self.days)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Tiering { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut access_tier: Option = None; - let mut days: Option = None; - d.for_each_element(|d, x| match x { - b"AccessTier" => { - if access_tier.is_some() { - return Err(DeError::DuplicateField); - } - access_tier = Some(d.content()?); - Ok(()) - } - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - access_tier: access_tier.ok_or(DeError::MissingField)?, - days: days.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut access_tier: Option = None; +let mut days: Option = None; +d.for_each_element(|d, x| match x { +b"AccessTier" => { +if access_tier.is_some() { return Err(DeError::DuplicateField); } +access_tier = Some(d.content()?); +Ok(()) +} +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +access_tier: access_tier.ok_or(DeError::MissingField)?, +days: days.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for TopicConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - { - let iter = &self.events; - s.flattened_list("Event", iter)?; - } - if let Some(ref val) = self.filter { - s.content("Filter", val)?; - } - if let Some(ref val) = self.id { - s.content("Id", val)?; - } - s.content("Topic", &self.topic_arn)?; - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +{ +let iter = &self.events; +s.flattened_list("Event", iter)?; +} +if let Some(ref val) = self.filter { +s.content("Filter", val)?; +} +if let Some(ref val) = self.id { +s.content("Id", val)?; +} +s.content("Topic", &self.topic_arn)?; +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for TopicConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut events: Option = None; - let mut filter: Option = None; - let mut id: Option = None; - let mut topic_arn: Option = None; - d.for_each_element(|d, x| match x { - b"Event" => { - let ans: Event = d.content()?; - events.get_or_insert_with(List::new).push(ans); - Ok(()) - } - b"Filter" => { - if filter.is_some() { - return Err(DeError::DuplicateField); - } - filter = Some(d.content()?); - Ok(()) - } - b"Id" => { - if id.is_some() { - return Err(DeError::DuplicateField); - } - id = Some(d.content()?); - Ok(()) - } - b"Topic" => { - if topic_arn.is_some() { - return Err(DeError::DuplicateField); - } - topic_arn = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - events: events.ok_or(DeError::MissingField)?, - filter, - id, - topic_arn: topic_arn.ok_or(DeError::MissingField)?, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut events: Option = None; +let mut filter: Option = None; +let mut id: Option = None; +let mut topic_arn: Option = None; +d.for_each_element(|d, x| match x { +b"Event" => { +let ans: Event = d.content()?; +events.get_or_insert_with(List::new).push(ans); +Ok(()) +} +b"Filter" => { +if filter.is_some() { return Err(DeError::DuplicateField); } +filter = Some(d.content()?); +Ok(()) +} +b"Id" => { +if id.is_some() { return Err(DeError::DuplicateField); } +id = Some(d.content()?); +Ok(()) +} +b"Topic" => { +if topic_arn.is_some() { return Err(DeError::DuplicateField); } +topic_arn = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +events: events.ok_or(DeError::MissingField)?, +filter, +id, +topic_arn: topic_arn.ok_or(DeError::MissingField)?, +}) +} } impl SerializeContent for Transition { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.date { - s.timestamp("Date", val, TimestampFormat::DateTime)?; - } - if let Some(ref val) = self.days { - s.content("Days", val)?; - } - if let Some(ref val) = self.storage_class { - s.content("StorageClass", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.date { +s.timestamp("Date", val, TimestampFormat::DateTime)?; +} +if let Some(ref val) = self.days { +s.content("Days", val)?; +} +if let Some(ref val) = self.storage_class { +s.content("StorageClass", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for Transition { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut date: Option = None; - let mut days: Option = None; - let mut storage_class: Option = None; - d.for_each_element(|d, x| match x { - b"Date" => { - if date.is_some() { - return Err(DeError::DuplicateField); - } - date = Some(d.timestamp(TimestampFormat::DateTime)?); - Ok(()) - } - b"Days" => { - if days.is_some() { - return Err(DeError::DuplicateField); - } - days = Some(d.content()?); - Ok(()) - } - b"StorageClass" => { - if storage_class.is_some() { - return Err(DeError::DuplicateField); - } - storage_class = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - date, - days, - storage_class, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut date: Option = None; +let mut days: Option = None; +let mut storage_class: Option = None; +d.for_each_element(|d, x| match x { +b"Date" => { +if date.is_some() { return Err(DeError::DuplicateField); } +date = Some(d.timestamp(TimestampFormat::DateTime)?); +Ok(()) +} +b"Days" => { +if days.is_some() { return Err(DeError::DuplicateField); } +days = Some(d.content()?); +Ok(()) +} +b"StorageClass" => { +if storage_class.is_some() { return Err(DeError::DuplicateField); } +storage_class = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +date, +days, +storage_class, +}) +} } impl SerializeContent for TransitionStorageClass { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for TransitionStorageClass { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"DEEP_ARCHIVE" => Ok(Self::from_static(TransitionStorageClass::DEEP_ARCHIVE)), - b"GLACIER" => Ok(Self::from_static(TransitionStorageClass::GLACIER)), - b"GLACIER_IR" => Ok(Self::from_static(TransitionStorageClass::GLACIER_IR)), - b"INTELLIGENT_TIERING" => Ok(Self::from_static(TransitionStorageClass::INTELLIGENT_TIERING)), - b"ONEZONE_IA" => Ok(Self::from_static(TransitionStorageClass::ONEZONE_IA)), - b"STANDARD_IA" => Ok(Self::from_static(TransitionStorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"DEEP_ARCHIVE" => Ok(Self::from_static(TransitionStorageClass::DEEP_ARCHIVE)), +b"GLACIER" => Ok(Self::from_static(TransitionStorageClass::GLACIER)), +b"GLACIER_IR" => Ok(Self::from_static(TransitionStorageClass::GLACIER_IR)), +b"INTELLIGENT_TIERING" => Ok(Self::from_static(TransitionStorageClass::INTELLIGENT_TIERING)), +b"ONEZONE_IA" => Ok(Self::from_static(TransitionStorageClass::ONEZONE_IA)), +b"STANDARD_IA" => Ok(Self::from_static(TransitionStorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for Type { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - self.as_str().serialize_content(s) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +self.as_str().serialize_content(s) +} } impl<'xml> DeserializeContent<'xml> for Type { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - d.text(|t| { - let b: &[u8] = &t; - match b { - b"AmazonCustomerByEmail" => Ok(Self::from_static(Type::AMAZON_CUSTOMER_BY_EMAIL)), - b"CanonicalUser" => Ok(Self::from_static(Type::CANONICAL_USER)), - b"Group" => Ok(Self::from_static(Type::GROUP)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } - }) +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +d.text(|t| { + let b: &[u8] = &t; + match b { +b"AmazonCustomerByEmail" => Ok(Self::from_static(Type::AMAZON_CUSTOMER_BY_EMAIL)), +b"CanonicalUser" => Ok(Self::from_static(Type::CANONICAL_USER)), +b"Group" => Ok(Self::from_static(Type::GROUP)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), } +}) +} } impl SerializeContent for VersioningConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.mfa_delete { - s.content("MfaDelete", val)?; - } - if let Some(ref val) = self.status { - s.content("Status", val)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.mfa_delete { +s.content("MfaDelete", val)?; +} +if let Some(ref val) = self.status { +s.content("Status", val)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for VersioningConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut mfa_delete: Option = None; - let mut status: Option = None; - d.for_each_element(|d, x| match x { - b"MfaDelete" => { - if mfa_delete.is_some() { - return Err(DeError::DuplicateField); - } - mfa_delete = Some(d.content()?); - Ok(()) - } - b"Status" => { - if status.is_some() { - return Err(DeError::DuplicateField); - } - status = Some(d.content()?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { mfa_delete, status }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut mfa_delete: Option = None; +let mut status: Option = None; +d.for_each_element(|d, x| match x { +b"MfaDelete" => { +if mfa_delete.is_some() { return Err(DeError::DuplicateField); } +mfa_delete = Some(d.content()?); +Ok(()) +} +b"Status" => { +if status.is_some() { return Err(DeError::DuplicateField); } +status = Some(d.content()?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +mfa_delete, +status, +}) +} } impl SerializeContent for WebsiteConfiguration { - fn serialize_content(&self, s: &mut Serializer) -> SerResult { - if let Some(ref val) = self.error_document { - s.content("ErrorDocument", val)?; - } - if let Some(ref val) = self.index_document { - s.content("IndexDocument", val)?; - } - if let Some(ref val) = self.redirect_all_requests_to { - s.content("RedirectAllRequestsTo", val)?; - } - if let Some(iter) = &self.routing_rules { - s.list("RoutingRules", "RoutingRule", iter)?; - } - Ok(()) - } +fn serialize_content(&self, s: &mut Serializer) -> SerResult { +if let Some(ref val) = self.error_document { +s.content("ErrorDocument", val)?; +} +if let Some(ref val) = self.index_document { +s.content("IndexDocument", val)?; +} +if let Some(ref val) = self.redirect_all_requests_to { +s.content("RedirectAllRequestsTo", val)?; +} +if let Some(iter) = &self.routing_rules { +s.list("RoutingRules", "RoutingRule", iter)?; +} +Ok(()) +} } impl<'xml> DeserializeContent<'xml> for WebsiteConfiguration { - fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { - let mut error_document: Option = None; - let mut index_document: Option = None; - let mut redirect_all_requests_to: Option = None; - let mut routing_rules: Option = None; - d.for_each_element(|d, x| match x { - b"ErrorDocument" => { - if error_document.is_some() { - return Err(DeError::DuplicateField); - } - error_document = Some(d.content()?); - Ok(()) - } - b"IndexDocument" => { - if index_document.is_some() { - return Err(DeError::DuplicateField); - } - index_document = Some(d.content()?); - Ok(()) - } - b"RedirectAllRequestsTo" => { - if redirect_all_requests_to.is_some() { - return Err(DeError::DuplicateField); - } - redirect_all_requests_to = Some(d.content()?); - Ok(()) - } - b"RoutingRules" => { - if routing_rules.is_some() { - return Err(DeError::DuplicateField); - } - routing_rules = Some(d.list_content("RoutingRule")?); - Ok(()) - } - _ => Err(DeError::UnexpectedTagName), - })?; - Ok(Self { - error_document, - index_document, - redirect_all_requests_to, - routing_rules, - }) - } +fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { +let mut error_document: Option = None; +let mut index_document: Option = None; +let mut redirect_all_requests_to: Option = None; +let mut routing_rules: Option = None; +d.for_each_element(|d, x| match x { +b"ErrorDocument" => { +if error_document.is_some() { return Err(DeError::DuplicateField); } +error_document = Some(d.content()?); +Ok(()) +} +b"IndexDocument" => { +if index_document.is_some() { return Err(DeError::DuplicateField); } +index_document = Some(d.content()?); +Ok(()) +} +b"RedirectAllRequestsTo" => { +if redirect_all_requests_to.is_some() { return Err(DeError::DuplicateField); } +redirect_all_requests_to = Some(d.content()?); +Ok(()) +} +b"RoutingRules" => { +if routing_rules.is_some() { return Err(DeError::DuplicateField); } +routing_rules = Some(d.list_content("RoutingRule")?); +Ok(()) +} +_ => Err(DeError::UnexpectedTagName) +})?; +Ok(Self { +error_document, +index_document, +redirect_all_requests_to, +routing_rules, +}) +} } From 67de9c51c4a7f44036d0d5135ecd5daa47f435f4 Mon Sep 17 00:00:00 2001 From: weisd Date: Thu, 5 Mar 2026 14:43:08 +0800 Subject: [PATCH 3/4] style: apply cargo fmt --- codegen/src/v1/ops.rs | 6 +- codegen/src/v1/xml.rs | 9 +- crates/s3s-aws/src/conv/generated.rs | 14098 ++-- crates/s3s-aws/src/conv/generated_minio.rs | 14126 ++-- crates/s3s-aws/src/proxy/generated.rs | 4900 +- crates/s3s-aws/src/proxy/generated_minio.rs | 4900 +- crates/s3s/src/access/generated.rs | 1490 +- crates/s3s/src/access/generated_minio.rs | 1490 +- crates/s3s/src/dto/generated.rs | 70278 +++++++++--------- crates/s3s/src/dto/generated_minio.rs | 64564 ++++++++-------- crates/s3s/src/error/generated.rs | 4859 +- crates/s3s/src/error/generated_minio.rs | 4859 +- crates/s3s/src/header/generated.rs | 61 +- crates/s3s/src/header/generated_minio.rs | 61 +- crates/s3s/src/ops/generated.rs | 10386 ++- crates/s3s/src/ops/generated_minio.rs | 10408 ++- crates/s3s/src/s3_trait.rs | 14144 ++-- crates/s3s/src/xml/de.rs | 6 +- crates/s3s/src/xml/generated.rs | 15272 ++-- crates/s3s/src/xml/generated_minio.rs | 15552 ++-- 20 files changed, 126173 insertions(+), 125296 deletions(-) diff --git a/codegen/src/v1/ops.rs b/codegen/src/v1/ops.rs index 7b5e1043..2fc6e3f5 100644 --- a/codegen/src/v1/ops.rs +++ b/codegen/src/v1/ops.rs @@ -714,7 +714,11 @@ fn codegen_op_http_de(op: &Operation, rust_types: &RustTypes, patch: Option = http::take_opt_object_lock_configuration(req)?;", field.name, field.type_); + g!( + "let {}: Option<{}> = http::take_opt_object_lock_configuration(req)?;", + field.name, + field.type_ + ); } else { g!("let {}: Option<{}> = http::take_opt_xml_body(req)?;", field.name, field.type_); } diff --git a/codegen/src/v1/xml.rs b/codegen/src/v1/xml.rs index aa014ae3..1924f2fb 100644 --- a/codegen/src/v1/xml.rs +++ b/codegen/src/v1/xml.rs @@ -4,9 +4,9 @@ use super::rust; use super::rust::default_value_literal; use crate::declare_codegen; +use crate::v1::Patch; use crate::v1::ops::is_op_output; use crate::v1::rust::StructField; -use crate::v1::Patch; use std::collections::{BTreeMap, BTreeSet, VecDeque}; use std::ops::Not; @@ -221,7 +221,12 @@ fn s3_unwrapped_xml_output(ops: &Operations, ty_name: &str) -> bool { ops.iter().any(|(_, op)| op.s3_unwrapped_xml_output && op.output == ty_name) } -fn codegen_xml_serde(ops: &Operations, rust_types: &RustTypes, root_type_names: &BTreeMap<&str, Option<&str>>, patch: Option) { +fn codegen_xml_serde( + ops: &Operations, + rust_types: &RustTypes, + root_type_names: &BTreeMap<&str, Option<&str>>, + patch: Option, +) { for (rust_type, xml_name) in root_type_names.iter().map(|(&name, xml_name)| (&rust_types[name], xml_name)) { let rust::Type::Struct(ty) = rust_type else { panic!("{rust_type:#?}") }; diff --git a/crates/s3s-aws/src/conv/generated.rs b/crates/s3s-aws/src/conv/generated.rs index d45ca871..54deba94 100644 --- a/crates/s3s-aws/src/conv/generated.rs +++ b/crates/s3s-aws/src/conv/generated.rs @@ -4,9295 +4,9271 @@ use super::*; impl AwsConversion for s3s::dto::AbortIncompleteMultipartUpload { type Target = aws_sdk_s3::types::AbortIncompleteMultipartUpload; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -days_after_initiation: try_from_aws(x.days_after_initiation)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + days_after_initiation: try_from_aws(x.days_after_initiation)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_days_after_initiation(try_into_aws(x.days_after_initiation)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_days_after_initiation(try_into_aws(x.days_after_initiation)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AbortMultipartUploadInput { type Target = aws_sdk_s3::operation::abort_multipart_upload::AbortMultipartUploadInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match_initiated_time: try_from_aws(x.if_match_initiated_time)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match_initiated_time(try_into_aws(x.if_match_initiated_time)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match_initiated_time: try_from_aws(x.if_match_initiated_time)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match_initiated_time(try_into_aws(x.if_match_initiated_time)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::AbortMultipartUploadOutput { type Target = aws_sdk_s3::operation::abort_multipart_upload::AbortMultipartUploadOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AccelerateConfiguration { type Target = aws_sdk_s3::types::AccelerateConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AccessControlPolicy { type Target = aws_sdk_s3::types::AccessControlPolicy; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grants: try_from_aws(x.grants)?, -owner: try_from_aws(x.owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grants: try_from_aws(x.grants)?, + owner: try_from_aws(x.owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grants(try_into_aws(x.grants)?); -y = y.set_owner(try_into_aws(x.owner)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grants(try_into_aws(x.grants)?); + y = y.set_owner(try_into_aws(x.owner)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AccessControlTranslation { type Target = aws_sdk_s3::types::AccessControlTranslation; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -owner: try_from_aws(x.owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + owner: try_from_aws(x.owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_owner(Some(try_into_aws(x.owner)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_owner(Some(try_into_aws(x.owner)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::AnalyticsAndOperator { type Target = aws_sdk_s3::types::AnalyticsAndOperator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AnalyticsConfiguration { type Target = aws_sdk_s3::types::AnalyticsConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -storage_class_analysis: unwrap_from_aws(x.storage_class_analysis, "storage_class_analysis")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + storage_class_analysis: unwrap_from_aws(x.storage_class_analysis, "storage_class_analysis")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_storage_class_analysis(Some(try_into_aws(x.storage_class_analysis)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_storage_class_analysis(Some(try_into_aws(x.storage_class_analysis)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::AnalyticsExportDestination { type Target = aws_sdk_s3::types::AnalyticsExportDestination; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AnalyticsFilter { type Target = aws_sdk_s3::types::AnalyticsFilter; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::AnalyticsFilter::And(v) => Self::And(try_from_aws(v)?), -aws_sdk_s3::types::AnalyticsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), -aws_sdk_s3::types::AnalyticsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), -_ => unimplemented!("unknown variant of aws_sdk_s3::types::AnalyticsFilter: {x:?}"), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(match x { -Self::And(v) => aws_sdk_s3::types::AnalyticsFilter::And(try_into_aws(v)?), -Self::Prefix(v) => aws_sdk_s3::types::AnalyticsFilter::Prefix(try_into_aws(v)?), -Self::Tag(v) => aws_sdk_s3::types::AnalyticsFilter::Tag(try_into_aws(v)?), -_ => unimplemented!("unknown variant of AnalyticsFilter: {x:?}"), -}) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::AnalyticsFilter::And(v) => Self::And(try_from_aws(v)?), + aws_sdk_s3::types::AnalyticsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), + aws_sdk_s3::types::AnalyticsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), + _ => unimplemented!("unknown variant of aws_sdk_s3::types::AnalyticsFilter: {x:?}"), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(match x { + Self::And(v) => aws_sdk_s3::types::AnalyticsFilter::And(try_into_aws(v)?), + Self::Prefix(v) => aws_sdk_s3::types::AnalyticsFilter::Prefix(try_into_aws(v)?), + Self::Tag(v) => aws_sdk_s3::types::AnalyticsFilter::Tag(try_into_aws(v)?), + _ => unimplemented!("unknown variant of AnalyticsFilter: {x:?}"), + }) + } } impl AwsConversion for s3s::dto::AnalyticsS3BucketDestination { type Target = aws_sdk_s3::types::AnalyticsS3BucketDestination; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: try_from_aws(x.bucket)?, -bucket_account_id: try_from_aws(x.bucket_account_id)?, -format: try_from_aws(x.format)?, -prefix: try_from_aws(x.prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_account_id(try_into_aws(x.bucket_account_id)?); -y = y.set_format(Some(try_into_aws(x.format)?)); -y = y.set_prefix(try_into_aws(x.prefix)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: try_from_aws(x.bucket)?, + bucket_account_id: try_from_aws(x.bucket_account_id)?, + format: try_from_aws(x.format)?, + prefix: try_from_aws(x.prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_account_id(try_into_aws(x.bucket_account_id)?); + y = y.set_format(Some(try_into_aws(x.format)?)); + y = y.set_prefix(try_into_aws(x.prefix)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::AnalyticsS3ExportFileFormat { type Target = aws_sdk_s3::types::AnalyticsS3ExportFileFormat; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::AnalyticsS3ExportFileFormat::Csv => Self::from_static(Self::CSV), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::AnalyticsS3ExportFileFormat::Csv => Self::from_static(Self::CSV), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::AnalyticsS3ExportFileFormat::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::AnalyticsS3ExportFileFormat::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ArchiveStatus { type Target = aws_sdk_s3::types::ArchiveStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ArchiveStatus::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), -aws_sdk_s3::types::ArchiveStatus::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ArchiveStatus::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), + aws_sdk_s3::types::ArchiveStatus::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ArchiveStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ArchiveStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Bucket { type Target = aws_sdk_s3::types::Bucket; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_region: try_from_aws(x.bucket_region)?, -creation_date: try_from_aws(x.creation_date)?, -name: try_from_aws(x.name)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_region: try_from_aws(x.bucket_region)?, + creation_date: try_from_aws(x.creation_date)?, + name: try_from_aws(x.name)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_region(try_into_aws(x.bucket_region)?); -y = y.set_creation_date(try_into_aws(x.creation_date)?); -y = y.set_name(try_into_aws(x.name)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_region(try_into_aws(x.bucket_region)?); + y = y.set_creation_date(try_into_aws(x.creation_date)?); + y = y.set_name(try_into_aws(x.name)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketAccelerateStatus { type Target = aws_sdk_s3::types::BucketAccelerateStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketAccelerateStatus::Enabled => Self::from_static(Self::ENABLED), -aws_sdk_s3::types::BucketAccelerateStatus::Suspended => Self::from_static(Self::SUSPENDED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketAccelerateStatus::Enabled => Self::from_static(Self::ENABLED), + aws_sdk_s3::types::BucketAccelerateStatus::Suspended => Self::from_static(Self::SUSPENDED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketAccelerateStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketAccelerateStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketAlreadyExists { type Target = aws_sdk_s3::types::error::BucketAlreadyExists; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketAlreadyOwnedByYou { type Target = aws_sdk_s3::types::error::BucketAlreadyOwnedByYou; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketCannedACL { type Target = aws_sdk_s3::types::BucketCannedAcl; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), -aws_sdk_s3::types::BucketCannedAcl::Private => Self::from_static(Self::PRIVATE), -aws_sdk_s3::types::BucketCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), -aws_sdk_s3::types::BucketCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), + aws_sdk_s3::types::BucketCannedAcl::Private => Self::from_static(Self::PRIVATE), + aws_sdk_s3::types::BucketCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), + aws_sdk_s3::types::BucketCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketCannedAcl::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketCannedAcl::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketInfo { type Target = aws_sdk_s3::types::BucketInfo; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -data_redundancy: try_from_aws(x.data_redundancy)?, -type_: try_from_aws(x.r#type)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + data_redundancy: try_from_aws(x.data_redundancy)?, + type_: try_from_aws(x.r#type)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_data_redundancy(try_into_aws(x.data_redundancy)?); -y = y.set_type(try_into_aws(x.type_)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_data_redundancy(try_into_aws(x.data_redundancy)?); + y = y.set_type(try_into_aws(x.type_)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketLifecycleConfiguration { type Target = aws_sdk_s3::types::BucketLifecycleConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -rules: try_from_aws(x.rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + rules: try_from_aws(x.rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_rules(Some(try_into_aws(x.rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_rules(Some(try_into_aws(x.rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::BucketLocationConstraint { type Target = aws_sdk_s3::types::BucketLocationConstraint; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketLocationConstraint::Eu => Self::from_static(Self::EU), -aws_sdk_s3::types::BucketLocationConstraint::AfSouth1 => Self::from_static(Self::AF_SOUTH_1), -aws_sdk_s3::types::BucketLocationConstraint::ApEast1 => Self::from_static(Self::AP_EAST_1), -aws_sdk_s3::types::BucketLocationConstraint::ApNortheast1 => Self::from_static(Self::AP_NORTHEAST_1), -aws_sdk_s3::types::BucketLocationConstraint::ApNortheast2 => Self::from_static(Self::AP_NORTHEAST_2), -aws_sdk_s3::types::BucketLocationConstraint::ApNortheast3 => Self::from_static(Self::AP_NORTHEAST_3), -aws_sdk_s3::types::BucketLocationConstraint::ApSouth1 => Self::from_static(Self::AP_SOUTH_1), -aws_sdk_s3::types::BucketLocationConstraint::ApSouth2 => Self::from_static(Self::AP_SOUTH_2), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast1 => Self::from_static(Self::AP_SOUTHEAST_1), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast2 => Self::from_static(Self::AP_SOUTHEAST_2), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast3 => Self::from_static(Self::AP_SOUTHEAST_3), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast4 => Self::from_static(Self::AP_SOUTHEAST_4), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast5 => Self::from_static(Self::AP_SOUTHEAST_5), -aws_sdk_s3::types::BucketLocationConstraint::CaCentral1 => Self::from_static(Self::CA_CENTRAL_1), -aws_sdk_s3::types::BucketLocationConstraint::CnNorth1 => Self::from_static(Self::CN_NORTH_1), -aws_sdk_s3::types::BucketLocationConstraint::CnNorthwest1 => Self::from_static(Self::CN_NORTHWEST_1), -aws_sdk_s3::types::BucketLocationConstraint::EuCentral1 => Self::from_static(Self::EU_CENTRAL_1), -aws_sdk_s3::types::BucketLocationConstraint::EuCentral2 => Self::from_static(Self::EU_CENTRAL_2), -aws_sdk_s3::types::BucketLocationConstraint::EuNorth1 => Self::from_static(Self::EU_NORTH_1), -aws_sdk_s3::types::BucketLocationConstraint::EuSouth1 => Self::from_static(Self::EU_SOUTH_1), -aws_sdk_s3::types::BucketLocationConstraint::EuSouth2 => Self::from_static(Self::EU_SOUTH_2), -aws_sdk_s3::types::BucketLocationConstraint::EuWest1 => Self::from_static(Self::EU_WEST_1), -aws_sdk_s3::types::BucketLocationConstraint::EuWest2 => Self::from_static(Self::EU_WEST_2), -aws_sdk_s3::types::BucketLocationConstraint::EuWest3 => Self::from_static(Self::EU_WEST_3), -aws_sdk_s3::types::BucketLocationConstraint::IlCentral1 => Self::from_static(Self::IL_CENTRAL_1), -aws_sdk_s3::types::BucketLocationConstraint::MeCentral1 => Self::from_static(Self::ME_CENTRAL_1), -aws_sdk_s3::types::BucketLocationConstraint::MeSouth1 => Self::from_static(Self::ME_SOUTH_1), -aws_sdk_s3::types::BucketLocationConstraint::SaEast1 => Self::from_static(Self::SA_EAST_1), -aws_sdk_s3::types::BucketLocationConstraint::UsEast2 => Self::from_static(Self::US_EAST_2), -aws_sdk_s3::types::BucketLocationConstraint::UsGovEast1 => Self::from_static(Self::US_GOV_EAST_1), -aws_sdk_s3::types::BucketLocationConstraint::UsGovWest1 => Self::from_static(Self::US_GOV_WEST_1), -aws_sdk_s3::types::BucketLocationConstraint::UsWest1 => Self::from_static(Self::US_WEST_1), -aws_sdk_s3::types::BucketLocationConstraint::UsWest2 => Self::from_static(Self::US_WEST_2), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketLocationConstraint::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketLocationConstraint::Eu => Self::from_static(Self::EU), + aws_sdk_s3::types::BucketLocationConstraint::AfSouth1 => Self::from_static(Self::AF_SOUTH_1), + aws_sdk_s3::types::BucketLocationConstraint::ApEast1 => Self::from_static(Self::AP_EAST_1), + aws_sdk_s3::types::BucketLocationConstraint::ApNortheast1 => Self::from_static(Self::AP_NORTHEAST_1), + aws_sdk_s3::types::BucketLocationConstraint::ApNortheast2 => Self::from_static(Self::AP_NORTHEAST_2), + aws_sdk_s3::types::BucketLocationConstraint::ApNortheast3 => Self::from_static(Self::AP_NORTHEAST_3), + aws_sdk_s3::types::BucketLocationConstraint::ApSouth1 => Self::from_static(Self::AP_SOUTH_1), + aws_sdk_s3::types::BucketLocationConstraint::ApSouth2 => Self::from_static(Self::AP_SOUTH_2), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast1 => Self::from_static(Self::AP_SOUTHEAST_1), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast2 => Self::from_static(Self::AP_SOUTHEAST_2), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast3 => Self::from_static(Self::AP_SOUTHEAST_3), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast4 => Self::from_static(Self::AP_SOUTHEAST_4), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast5 => Self::from_static(Self::AP_SOUTHEAST_5), + aws_sdk_s3::types::BucketLocationConstraint::CaCentral1 => Self::from_static(Self::CA_CENTRAL_1), + aws_sdk_s3::types::BucketLocationConstraint::CnNorth1 => Self::from_static(Self::CN_NORTH_1), + aws_sdk_s3::types::BucketLocationConstraint::CnNorthwest1 => Self::from_static(Self::CN_NORTHWEST_1), + aws_sdk_s3::types::BucketLocationConstraint::EuCentral1 => Self::from_static(Self::EU_CENTRAL_1), + aws_sdk_s3::types::BucketLocationConstraint::EuCentral2 => Self::from_static(Self::EU_CENTRAL_2), + aws_sdk_s3::types::BucketLocationConstraint::EuNorth1 => Self::from_static(Self::EU_NORTH_1), + aws_sdk_s3::types::BucketLocationConstraint::EuSouth1 => Self::from_static(Self::EU_SOUTH_1), + aws_sdk_s3::types::BucketLocationConstraint::EuSouth2 => Self::from_static(Self::EU_SOUTH_2), + aws_sdk_s3::types::BucketLocationConstraint::EuWest1 => Self::from_static(Self::EU_WEST_1), + aws_sdk_s3::types::BucketLocationConstraint::EuWest2 => Self::from_static(Self::EU_WEST_2), + aws_sdk_s3::types::BucketLocationConstraint::EuWest3 => Self::from_static(Self::EU_WEST_3), + aws_sdk_s3::types::BucketLocationConstraint::IlCentral1 => Self::from_static(Self::IL_CENTRAL_1), + aws_sdk_s3::types::BucketLocationConstraint::MeCentral1 => Self::from_static(Self::ME_CENTRAL_1), + aws_sdk_s3::types::BucketLocationConstraint::MeSouth1 => Self::from_static(Self::ME_SOUTH_1), + aws_sdk_s3::types::BucketLocationConstraint::SaEast1 => Self::from_static(Self::SA_EAST_1), + aws_sdk_s3::types::BucketLocationConstraint::UsEast2 => Self::from_static(Self::US_EAST_2), + aws_sdk_s3::types::BucketLocationConstraint::UsGovEast1 => Self::from_static(Self::US_GOV_EAST_1), + aws_sdk_s3::types::BucketLocationConstraint::UsGovWest1 => Self::from_static(Self::US_GOV_WEST_1), + aws_sdk_s3::types::BucketLocationConstraint::UsWest1 => Self::from_static(Self::US_WEST_1), + aws_sdk_s3::types::BucketLocationConstraint::UsWest2 => Self::from_static(Self::US_WEST_2), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketLocationConstraint::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketLoggingStatus { type Target = aws_sdk_s3::types::BucketLoggingStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -logging_enabled: try_from_aws(x.logging_enabled)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + logging_enabled: try_from_aws(x.logging_enabled)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketLogsPermission { type Target = aws_sdk_s3::types::BucketLogsPermission; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketLogsPermission::FullControl => Self::from_static(Self::FULL_CONTROL), -aws_sdk_s3::types::BucketLogsPermission::Read => Self::from_static(Self::READ), -aws_sdk_s3::types::BucketLogsPermission::Write => Self::from_static(Self::WRITE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketLogsPermission::FullControl => Self::from_static(Self::FULL_CONTROL), + aws_sdk_s3::types::BucketLogsPermission::Read => Self::from_static(Self::READ), + aws_sdk_s3::types::BucketLogsPermission::Write => Self::from_static(Self::WRITE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketLogsPermission::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketLogsPermission::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketType { type Target = aws_sdk_s3::types::BucketType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketType::Directory => Self::from_static(Self::DIRECTORY), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketType::Directory => Self::from_static(Self::DIRECTORY), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketVersioningStatus { type Target = aws_sdk_s3::types::BucketVersioningStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketVersioningStatus::Enabled => Self::from_static(Self::ENABLED), -aws_sdk_s3::types::BucketVersioningStatus::Suspended => Self::from_static(Self::SUSPENDED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketVersioningStatus::Enabled => Self::from_static(Self::ENABLED), + aws_sdk_s3::types::BucketVersioningStatus::Suspended => Self::from_static(Self::SUSPENDED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketVersioningStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketVersioningStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::CORSConfiguration { type Target = aws_sdk_s3::types::CorsConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -cors_rules: try_from_aws(x.cors_rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + cors_rules: try_from_aws(x.cors_rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_cors_rules(Some(try_into_aws(x.cors_rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_cors_rules(Some(try_into_aws(x.cors_rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CORSRule { type Target = aws_sdk_s3::types::CorsRule; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -allowed_headers: try_from_aws(x.allowed_headers)?, -allowed_methods: try_from_aws(x.allowed_methods)?, -allowed_origins: try_from_aws(x.allowed_origins)?, -expose_headers: try_from_aws(x.expose_headers)?, -id: try_from_aws(x.id)?, -max_age_seconds: try_from_aws(x.max_age_seconds)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_allowed_headers(try_into_aws(x.allowed_headers)?); -y = y.set_allowed_methods(Some(try_into_aws(x.allowed_methods)?)); -y = y.set_allowed_origins(Some(try_into_aws(x.allowed_origins)?)); -y = y.set_expose_headers(try_into_aws(x.expose_headers)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_max_age_seconds(try_into_aws(x.max_age_seconds)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + allowed_headers: try_from_aws(x.allowed_headers)?, + allowed_methods: try_from_aws(x.allowed_methods)?, + allowed_origins: try_from_aws(x.allowed_origins)?, + expose_headers: try_from_aws(x.expose_headers)?, + id: try_from_aws(x.id)?, + max_age_seconds: try_from_aws(x.max_age_seconds)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_allowed_headers(try_into_aws(x.allowed_headers)?); + y = y.set_allowed_methods(Some(try_into_aws(x.allowed_methods)?)); + y = y.set_allowed_origins(Some(try_into_aws(x.allowed_origins)?)); + y = y.set_expose_headers(try_into_aws(x.expose_headers)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_max_age_seconds(try_into_aws(x.max_age_seconds)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CSVInput { type Target = aws_sdk_s3::types::CsvInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -allow_quoted_record_delimiter: try_from_aws(x.allow_quoted_record_delimiter)?, -comments: try_from_aws(x.comments)?, -field_delimiter: try_from_aws(x.field_delimiter)?, -file_header_info: try_from_aws(x.file_header_info)?, -quote_character: try_from_aws(x.quote_character)?, -quote_escape_character: try_from_aws(x.quote_escape_character)?, -record_delimiter: try_from_aws(x.record_delimiter)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_allow_quoted_record_delimiter(try_into_aws(x.allow_quoted_record_delimiter)?); -y = y.set_comments(try_into_aws(x.comments)?); -y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); -y = y.set_file_header_info(try_into_aws(x.file_header_info)?); -y = y.set_quote_character(try_into_aws(x.quote_character)?); -y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); -y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + allow_quoted_record_delimiter: try_from_aws(x.allow_quoted_record_delimiter)?, + comments: try_from_aws(x.comments)?, + field_delimiter: try_from_aws(x.field_delimiter)?, + file_header_info: try_from_aws(x.file_header_info)?, + quote_character: try_from_aws(x.quote_character)?, + quote_escape_character: try_from_aws(x.quote_escape_character)?, + record_delimiter: try_from_aws(x.record_delimiter)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_allow_quoted_record_delimiter(try_into_aws(x.allow_quoted_record_delimiter)?); + y = y.set_comments(try_into_aws(x.comments)?); + y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); + y = y.set_file_header_info(try_into_aws(x.file_header_info)?); + y = y.set_quote_character(try_into_aws(x.quote_character)?); + y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); + y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CSVOutput { type Target = aws_sdk_s3::types::CsvOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -field_delimiter: try_from_aws(x.field_delimiter)?, -quote_character: try_from_aws(x.quote_character)?, -quote_escape_character: try_from_aws(x.quote_escape_character)?, -quote_fields: try_from_aws(x.quote_fields)?, -record_delimiter: try_from_aws(x.record_delimiter)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); -y = y.set_quote_character(try_into_aws(x.quote_character)?); -y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); -y = y.set_quote_fields(try_into_aws(x.quote_fields)?); -y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + field_delimiter: try_from_aws(x.field_delimiter)?, + quote_character: try_from_aws(x.quote_character)?, + quote_escape_character: try_from_aws(x.quote_escape_character)?, + quote_fields: try_from_aws(x.quote_fields)?, + record_delimiter: try_from_aws(x.record_delimiter)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); + y = y.set_quote_character(try_into_aws(x.quote_character)?); + y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); + y = y.set_quote_fields(try_into_aws(x.quote_fields)?); + y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Checksum { type Target = aws_sdk_s3::types::Checksum; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ChecksumAlgorithm { type Target = aws_sdk_s3::types::ChecksumAlgorithm; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ChecksumAlgorithm::Crc32 => Self::from_static(Self::CRC32), -aws_sdk_s3::types::ChecksumAlgorithm::Crc32C => Self::from_static(Self::CRC32C), -aws_sdk_s3::types::ChecksumAlgorithm::Crc64Nvme => Self::from_static(Self::CRC64NVME), -aws_sdk_s3::types::ChecksumAlgorithm::Sha1 => Self::from_static(Self::SHA1), -aws_sdk_s3::types::ChecksumAlgorithm::Sha256 => Self::from_static(Self::SHA256), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ChecksumAlgorithm::Crc32 => Self::from_static(Self::CRC32), + aws_sdk_s3::types::ChecksumAlgorithm::Crc32C => Self::from_static(Self::CRC32C), + aws_sdk_s3::types::ChecksumAlgorithm::Crc64Nvme => Self::from_static(Self::CRC64NVME), + aws_sdk_s3::types::ChecksumAlgorithm::Sha1 => Self::from_static(Self::SHA1), + aws_sdk_s3::types::ChecksumAlgorithm::Sha256 => Self::from_static(Self::SHA256), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ChecksumAlgorithm::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ChecksumAlgorithm::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ChecksumMode { type Target = aws_sdk_s3::types::ChecksumMode; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ChecksumMode::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ChecksumMode::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ChecksumMode::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ChecksumMode::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ChecksumType { type Target = aws_sdk_s3::types::ChecksumType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ChecksumType::Composite => Self::from_static(Self::COMPOSITE), -aws_sdk_s3::types::ChecksumType::FullObject => Self::from_static(Self::FULL_OBJECT), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ChecksumType::Composite => Self::from_static(Self::COMPOSITE), + aws_sdk_s3::types::ChecksumType::FullObject => Self::from_static(Self::FULL_OBJECT), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ChecksumType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ChecksumType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::CommonPrefix { type Target = aws_sdk_s3::types::CommonPrefix; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(try_into_aws(x.prefix)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(try_into_aws(x.prefix)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CompleteMultipartUploadInput { type Target = aws_sdk_s3::operation::complete_multipart_upload::CompleteMultipartUploadInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match: try_from_aws(x.if_match)?, -if_none_match: try_from_aws(x.if_none_match)?, -key: unwrap_from_aws(x.key, "key")?, -mpu_object_size: try_from_aws(x.mpu_object_size)?, -multipart_upload: try_from_aws(x.multipart_upload)?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_none_match(try_into_aws(x.if_none_match)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_mpu_object_size(try_into_aws(x.mpu_object_size)?); -y = y.set_multipart_upload(try_into_aws(x.multipart_upload)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match: try_from_aws(x.if_match)?, + if_none_match: try_from_aws(x.if_none_match)?, + key: unwrap_from_aws(x.key, "key")?, + mpu_object_size: try_from_aws(x.mpu_object_size)?, + multipart_upload: try_from_aws(x.multipart_upload)?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_none_match(try_into_aws(x.if_none_match)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_mpu_object_size(try_into_aws(x.mpu_object_size)?); + y = y.set_multipart_upload(try_into_aws(x.multipart_upload)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CompleteMultipartUploadOutput { type Target = aws_sdk_s3::operation::complete_multipart_upload::CompleteMultipartUploadOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: try_from_aws(x.bucket)?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -expiration: try_from_aws(x.expiration)?, -key: try_from_aws(x.key)?, -location: try_from_aws(x.location)?, -request_charged: try_from_aws(x.request_charged)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -version_id: try_from_aws(x.version_id)?, -future: None, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_location(try_into_aws(x.location)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: try_from_aws(x.bucket)?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + expiration: try_from_aws(x.expiration)?, + key: try_from_aws(x.key)?, + location: try_from_aws(x.location)?, + request_charged: try_from_aws(x.request_charged)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + version_id: try_from_aws(x.version_id)?, + future: None, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_location(try_into_aws(x.location)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CompletedMultipartUpload { type Target = aws_sdk_s3::types::CompletedMultipartUpload; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -parts: try_from_aws(x.parts)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + parts: try_from_aws(x.parts)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_parts(try_into_aws(x.parts)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_parts(try_into_aws(x.parts)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CompletedPart { type Target = aws_sdk_s3::types::CompletedPart; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -e_tag: try_from_aws(x.e_tag)?, -part_number: try_from_aws(x.part_number)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_part_number(try_into_aws(x.part_number)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + e_tag: try_from_aws(x.e_tag)?, + part_number: try_from_aws(x.part_number)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_part_number(try_into_aws(x.part_number)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CompressionType { type Target = aws_sdk_s3::types::CompressionType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::CompressionType::Bzip2 => Self::from_static(Self::BZIP2), -aws_sdk_s3::types::CompressionType::Gzip => Self::from_static(Self::GZIP), -aws_sdk_s3::types::CompressionType::None => Self::from_static(Self::NONE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::CompressionType::Bzip2 => Self::from_static(Self::BZIP2), + aws_sdk_s3::types::CompressionType::Gzip => Self::from_static(Self::GZIP), + aws_sdk_s3::types::CompressionType::None => Self::from_static(Self::NONE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::CompressionType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::CompressionType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Condition { type Target = aws_sdk_s3::types::Condition; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -http_error_code_returned_equals: try_from_aws(x.http_error_code_returned_equals)?, -key_prefix_equals: try_from_aws(x.key_prefix_equals)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + http_error_code_returned_equals: try_from_aws(x.http_error_code_returned_equals)?, + key_prefix_equals: try_from_aws(x.key_prefix_equals)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_http_error_code_returned_equals(try_into_aws(x.http_error_code_returned_equals)?); -y = y.set_key_prefix_equals(try_into_aws(x.key_prefix_equals)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_http_error_code_returned_equals(try_into_aws(x.http_error_code_returned_equals)?); + y = y.set_key_prefix_equals(try_into_aws(x.key_prefix_equals)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ContinuationEvent { type Target = aws_sdk_s3::types::ContinuationEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CopyObjectInput { type Target = aws_sdk_s3::operation::copy_object::CopyObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_type: try_from_aws(x.content_type)?, -copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, -copy_source_if_match: try_from_aws(x.copy_source_if_match)?, -copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, -copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, -copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, -copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, -copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, -copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, -expires: try_from_aws(x.expires)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -key: unwrap_from_aws(x.key, "key")?, -metadata: try_from_aws(x.metadata)?, -metadata_directive: try_from_aws(x.metadata_directive)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -tagging: try_from_aws(x.tagging)?, -tagging_directive: try_from_aws(x.tagging_directive)?, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); -y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); -y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); -y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); -y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); -y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); -y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); -y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_metadata_directive(try_into_aws(x.metadata_directive)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tagging(try_into_aws(x.tagging)?); -y = y.set_tagging_directive(try_into_aws(x.tagging_directive)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_type: try_from_aws(x.content_type)?, + copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, + copy_source_if_match: try_from_aws(x.copy_source_if_match)?, + copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, + copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, + copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, + copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, + copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, + copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, + expires: try_from_aws(x.expires)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + key: unwrap_from_aws(x.key, "key")?, + metadata: try_from_aws(x.metadata)?, + metadata_directive: try_from_aws(x.metadata_directive)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + tagging: try_from_aws(x.tagging)?, + tagging_directive: try_from_aws(x.tagging_directive)?, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); + y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); + y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); + y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); + y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); + y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); + y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); + y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_metadata_directive(try_into_aws(x.metadata_directive)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tagging(try_into_aws(x.tagging)?); + y = y.set_tagging_directive(try_into_aws(x.tagging_directive)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CopyObjectOutput { type Target = aws_sdk_s3::operation::copy_object::CopyObjectOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -copy_object_result: try_from_aws(x.copy_object_result)?, -copy_source_version_id: try_from_aws(x.copy_source_version_id)?, -expiration: try_from_aws(x.expiration)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_copy_object_result(try_into_aws(x.copy_object_result)?); -y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + copy_object_result: try_from_aws(x.copy_object_result)?, + copy_source_version_id: try_from_aws(x.copy_source_version_id)?, + expiration: try_from_aws(x.expiration)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_copy_object_result(try_into_aws(x.copy_object_result)?); + y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CopyObjectResult { type Target = aws_sdk_s3::types::CopyObjectResult; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -last_modified: try_from_aws(x.last_modified)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + last_modified: try_from_aws(x.last_modified)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CopyPartResult { type Target = aws_sdk_s3::types::CopyPartResult; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -e_tag: try_from_aws(x.e_tag)?, -last_modified: try_from_aws(x.last_modified)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + e_tag: try_from_aws(x.e_tag)?, + last_modified: try_from_aws(x.last_modified)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateBucketConfiguration { type Target = aws_sdk_s3::types::CreateBucketConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: try_from_aws(x.bucket)?, -location: try_from_aws(x.location)?, -location_constraint: try_from_aws(x.location_constraint)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: try_from_aws(x.bucket)?, + location: try_from_aws(x.location)?, + location_constraint: try_from_aws(x.location_constraint)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_location(try_into_aws(x.location)?); -y = y.set_location_constraint(try_into_aws(x.location_constraint)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_location(try_into_aws(x.location)?); + y = y.set_location_constraint(try_into_aws(x.location_constraint)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateBucketInput { type Target = aws_sdk_s3::operation::create_bucket::CreateBucketInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -create_bucket_configuration: try_from_aws(x.create_bucket_configuration)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write: try_from_aws(x.grant_write)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -object_lock_enabled_for_bucket: try_from_aws(x.object_lock_enabled_for_bucket)?, -object_ownership: try_from_aws(x.object_ownership)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_create_bucket_configuration(try_into_aws(x.create_bucket_configuration)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write(try_into_aws(x.grant_write)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_object_lock_enabled_for_bucket(try_into_aws(x.object_lock_enabled_for_bucket)?); -y = y.set_object_ownership(try_into_aws(x.object_ownership)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + create_bucket_configuration: try_from_aws(x.create_bucket_configuration)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write: try_from_aws(x.grant_write)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + object_lock_enabled_for_bucket: try_from_aws(x.object_lock_enabled_for_bucket)?, + object_ownership: try_from_aws(x.object_ownership)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_create_bucket_configuration(try_into_aws(x.create_bucket_configuration)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write(try_into_aws(x.grant_write)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_object_lock_enabled_for_bucket(try_into_aws(x.object_lock_enabled_for_bucket)?); + y = y.set_object_ownership(try_into_aws(x.object_ownership)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CreateBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -metadata_table_configuration: unwrap_from_aws(x.metadata_table_configuration, "metadata_table_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_metadata_table_configuration(Some(try_into_aws(x.metadata_table_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + metadata_table_configuration: unwrap_from_aws(x.metadata_table_configuration, "metadata_table_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_metadata_table_configuration(Some(try_into_aws(x.metadata_table_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CreateBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateBucketOutput { type Target = aws_sdk_s3::operation::create_bucket::CreateBucketOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -location: try_from_aws(x.location)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + location: try_from_aws(x.location)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_location(try_into_aws(x.location)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_location(try_into_aws(x.location)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateMultipartUploadInput { type Target = aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_type: try_from_aws(x.content_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -expires: try_from_aws(x.expires)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -key: unwrap_from_aws(x.key, "key")?, -metadata: try_from_aws(x.metadata)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -tagging: try_from_aws(x.tagging)?, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tagging(try_into_aws(x.tagging)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_type: try_from_aws(x.content_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + expires: try_from_aws(x.expires)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + key: unwrap_from_aws(x.key, "key")?, + metadata: try_from_aws(x.metadata)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + tagging: try_from_aws(x.tagging)?, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tagging(try_into_aws(x.tagging)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CreateMultipartUploadOutput { type Target = aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -abort_date: try_from_aws(x.abort_date)?, -abort_rule_id: try_from_aws(x.abort_rule_id)?, -bucket: try_from_aws(x.bucket)?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -key: try_from_aws(x.key)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -upload_id: try_from_aws(x.upload_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_abort_date(try_into_aws(x.abort_date)?); -y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_upload_id(try_into_aws(x.upload_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + abort_date: try_from_aws(x.abort_date)?, + abort_rule_id: try_from_aws(x.abort_rule_id)?, + bucket: try_from_aws(x.bucket)?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + key: try_from_aws(x.key)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + upload_id: try_from_aws(x.upload_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_abort_date(try_into_aws(x.abort_date)?); + y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_upload_id(try_into_aws(x.upload_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateSessionInput { type Target = aws_sdk_s3::operation::create_session::CreateSessionInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -session_mode: try_from_aws(x.session_mode)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_session_mode(try_into_aws(x.session_mode)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + session_mode: try_from_aws(x.session_mode)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_session_mode(try_into_aws(x.session_mode)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CreateSessionOutput { type Target = aws_sdk_s3::operation::create_session::CreateSessionOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -credentials: unwrap_from_aws(x.credentials, "credentials")?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_credentials(Some(try_into_aws(x.credentials)?)); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + credentials: unwrap_from_aws(x.credentials, "credentials")?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_credentials(Some(try_into_aws(x.credentials)?)); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DataRedundancy { type Target = aws_sdk_s3::types::DataRedundancy; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::DataRedundancy::SingleAvailabilityZone => Self::from_static(Self::SINGLE_AVAILABILITY_ZONE), -aws_sdk_s3::types::DataRedundancy::SingleLocalZone => Self::from_static(Self::SINGLE_LOCAL_ZONE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::DataRedundancy::SingleAvailabilityZone => Self::from_static(Self::SINGLE_AVAILABILITY_ZONE), + aws_sdk_s3::types::DataRedundancy::SingleLocalZone => Self::from_static(Self::SINGLE_LOCAL_ZONE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::DataRedundancy::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::DataRedundancy::from(x.as_str())) + } } impl AwsConversion for s3s::dto::DefaultRetention { type Target = aws_sdk_s3::types::DefaultRetention; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -days: try_from_aws(x.days)?, -mode: try_from_aws(x.mode)?, -years: try_from_aws(x.years)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + days: try_from_aws(x.days)?, + mode: try_from_aws(x.mode)?, + years: try_from_aws(x.years)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_days(try_into_aws(x.days)?); -y = y.set_mode(try_into_aws(x.mode)?); -y = y.set_years(try_into_aws(x.years)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_days(try_into_aws(x.days)?); + y = y.set_mode(try_into_aws(x.mode)?); + y = y.set_years(try_into_aws(x.years)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Delete { type Target = aws_sdk_s3::types::Delete; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -objects: try_from_aws(x.objects)?, -quiet: try_from_aws(x.quiet)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + objects: try_from_aws(x.objects)?, + quiet: try_from_aws(x.quiet)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_objects(Some(try_into_aws(x.objects)?)); -y = y.set_quiet(try_into_aws(x.quiet)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_objects(Some(try_into_aws(x.objects)?)); + y = y.set_quiet(try_into_aws(x.quiet)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_analytics_configuration::DeleteBucketAnalyticsConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_analytics_configuration::DeleteBucketAnalyticsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketCorsInput { type Target = aws_sdk_s3::operation::delete_bucket_cors::DeleteBucketCorsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketCorsOutput { type Target = aws_sdk_s3::operation::delete_bucket_cors::DeleteBucketCorsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketEncryptionInput { type Target = aws_sdk_s3::operation::delete_bucket_encryption::DeleteBucketEncryptionInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketEncryptionOutput { type Target = aws_sdk_s3::operation::delete_bucket_encryption::DeleteBucketEncryptionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketInput { type Target = aws_sdk_s3::operation::delete_bucket::DeleteBucketInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketIntelligentTieringConfigurationInput { - type Target = aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationInput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationInput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketIntelligentTieringConfigurationOutput { - type Target = aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationOutput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationOutput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_inventory_configuration::DeleteBucketInventoryConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_inventory_configuration::DeleteBucketInventoryConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketLifecycleInput { type Target = aws_sdk_s3::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketLifecycleOutput { type Target = aws_sdk_s3::operation::delete_bucket_lifecycle::DeleteBucketLifecycleOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_metrics_configuration::DeleteBucketMetricsConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_metrics_configuration::DeleteBucketMetricsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketOutput { type Target = aws_sdk_s3::operation::delete_bucket::DeleteBucketOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::delete_bucket_ownership_controls::DeleteBucketOwnershipControlsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::delete_bucket_ownership_controls::DeleteBucketOwnershipControlsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketPolicyInput { type Target = aws_sdk_s3::operation::delete_bucket_policy::DeleteBucketPolicyInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketPolicyOutput { type Target = aws_sdk_s3::operation::delete_bucket_policy::DeleteBucketPolicyOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketReplicationInput { type Target = aws_sdk_s3::operation::delete_bucket_replication::DeleteBucketReplicationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketReplicationOutput { type Target = aws_sdk_s3::operation::delete_bucket_replication::DeleteBucketReplicationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketTaggingInput { type Target = aws_sdk_s3::operation::delete_bucket_tagging::DeleteBucketTaggingInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketTaggingOutput { type Target = aws_sdk_s3::operation::delete_bucket_tagging::DeleteBucketTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketWebsiteInput { type Target = aws_sdk_s3::operation::delete_bucket_website::DeleteBucketWebsiteInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketWebsiteOutput { type Target = aws_sdk_s3::operation::delete_bucket_website::DeleteBucketWebsiteOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteMarkerEntry { type Target = aws_sdk_s3::types::DeleteMarkerEntry; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -is_latest: try_from_aws(x.is_latest)?, -key: try_from_aws(x.key)?, -last_modified: try_from_aws(x.last_modified)?, -owner: try_from_aws(x.owner)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_is_latest(try_into_aws(x.is_latest)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + is_latest: try_from_aws(x.is_latest)?, + key: try_from_aws(x.key)?, + last_modified: try_from_aws(x.last_modified)?, + owner: try_from_aws(x.owner)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_is_latest(try_into_aws(x.is_latest)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteMarkerReplication { type Target = aws_sdk_s3::types::DeleteMarkerReplication; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteMarkerReplicationStatus { type Target = aws_sdk_s3::types::DeleteMarkerReplicationStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::DeleteMarkerReplicationStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::DeleteMarkerReplicationStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::DeleteMarkerReplicationStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::DeleteMarkerReplicationStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::DeleteMarkerReplicationStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::DeleteMarkerReplicationStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::DeleteObjectInput { type Target = aws_sdk_s3::operation::delete_object::DeleteObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match: try_from_aws(x.if_match)?, -if_match_last_modified_time: try_from_aws(x.if_match_last_modified_time)?, -if_match_size: try_from_aws(x.if_match_size)?, -key: unwrap_from_aws(x.key, "key")?, -mfa: try_from_aws(x.mfa)?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_match_last_modified_time(try_into_aws(x.if_match_last_modified_time)?); -y = y.set_if_match_size(try_into_aws(x.if_match_size)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_mfa(try_into_aws(x.mfa)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match: try_from_aws(x.if_match)?, + if_match_last_modified_time: try_from_aws(x.if_match_last_modified_time)?, + if_match_size: try_from_aws(x.if_match_size)?, + key: unwrap_from_aws(x.key, "key")?, + mfa: try_from_aws(x.mfa)?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_match_last_modified_time(try_into_aws(x.if_match_last_modified_time)?); + y = y.set_if_match_size(try_into_aws(x.if_match_size)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_mfa(try_into_aws(x.mfa)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteObjectOutput { type Target = aws_sdk_s3::operation::delete_object::DeleteObjectOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -delete_marker: try_from_aws(x.delete_marker)?, -request_charged: try_from_aws(x.request_charged)?, -version_id: try_from_aws(x.version_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + delete_marker: try_from_aws(x.delete_marker)?, + request_charged: try_from_aws(x.request_charged)?, + version_id: try_from_aws(x.version_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteObjectTaggingInput { type Target = aws_sdk_s3::operation::delete_object_tagging::DeleteObjectTaggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteObjectTaggingOutput { type Target = aws_sdk_s3::operation::delete_object_tagging::DeleteObjectTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -version_id: try_from_aws(x.version_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + version_id: try_from_aws(x.version_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteObjectsInput { type Target = aws_sdk_s3::operation::delete_objects::DeleteObjectsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -delete: unwrap_from_aws(x.delete, "delete")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -mfa: try_from_aws(x.mfa)?, -request_payer: try_from_aws(x.request_payer)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_delete(Some(try_into_aws(x.delete)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_mfa(try_into_aws(x.mfa)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + delete: unwrap_from_aws(x.delete, "delete")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + mfa: try_from_aws(x.mfa)?, + request_payer: try_from_aws(x.request_payer)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_delete(Some(try_into_aws(x.delete)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_mfa(try_into_aws(x.mfa)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteObjectsOutput { type Target = aws_sdk_s3::operation::delete_objects::DeleteObjectsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -deleted: try_from_aws(x.deleted)?, -errors: try_from_aws(x.errors)?, -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + deleted: try_from_aws(x.deleted)?, + errors: try_from_aws(x.errors)?, + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_deleted(try_into_aws(x.deleted)?); -y = y.set_errors(try_into_aws(x.errors)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_deleted(try_into_aws(x.deleted)?); + y = y.set_errors(try_into_aws(x.errors)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeletePublicAccessBlockInput { type Target = aws_sdk_s3::operation::delete_public_access_block::DeletePublicAccessBlockInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeletePublicAccessBlockOutput { type Target = aws_sdk_s3::operation::delete_public_access_block::DeletePublicAccessBlockOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeletedObject { type Target = aws_sdk_s3::types::DeletedObject; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -delete_marker: try_from_aws(x.delete_marker)?, -delete_marker_version_id: try_from_aws(x.delete_marker_version_id)?, -key: try_from_aws(x.key)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_delete_marker_version_id(try_into_aws(x.delete_marker_version_id)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + delete_marker: try_from_aws(x.delete_marker)?, + delete_marker_version_id: try_from_aws(x.delete_marker_version_id)?, + key: try_from_aws(x.key)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_delete_marker_version_id(try_into_aws(x.delete_marker_version_id)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Destination { type Target = aws_sdk_s3::types::Destination; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_control_translation: try_from_aws(x.access_control_translation)?, -account: try_from_aws(x.account)?, -bucket: try_from_aws(x.bucket)?, -encryption_configuration: try_from_aws(x.encryption_configuration)?, -metrics: try_from_aws(x.metrics)?, -replication_time: try_from_aws(x.replication_time)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_control_translation(try_into_aws(x.access_control_translation)?); -y = y.set_account(try_into_aws(x.account)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_encryption_configuration(try_into_aws(x.encryption_configuration)?); -y = y.set_metrics(try_into_aws(x.metrics)?); -y = y.set_replication_time(try_into_aws(x.replication_time)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_control_translation: try_from_aws(x.access_control_translation)?, + account: try_from_aws(x.account)?, + bucket: try_from_aws(x.bucket)?, + encryption_configuration: try_from_aws(x.encryption_configuration)?, + metrics: try_from_aws(x.metrics)?, + replication_time: try_from_aws(x.replication_time)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_control_translation(try_into_aws(x.access_control_translation)?); + y = y.set_account(try_into_aws(x.account)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_encryption_configuration(try_into_aws(x.encryption_configuration)?); + y = y.set_metrics(try_into_aws(x.metrics)?); + y = y.set_replication_time(try_into_aws(x.replication_time)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::EncodingType { type Target = aws_sdk_s3::types::EncodingType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::EncodingType::Url => Self::from_static(Self::URL), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::EncodingType::Url => Self::from_static(Self::URL), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::EncodingType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::EncodingType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Encryption { type Target = aws_sdk_s3::types::Encryption; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -encryption_type: try_from_aws(x.encryption_type)?, -kms_context: try_from_aws(x.kms_context)?, -kms_key_id: try_from_aws(x.kms_key_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + encryption_type: try_from_aws(x.encryption_type)?, + kms_context: try_from_aws(x.kms_context)?, + kms_key_id: try_from_aws(x.kms_key_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_encryption_type(Some(try_into_aws(x.encryption_type)?)); -y = y.set_kms_context(try_into_aws(x.kms_context)?); -y = y.set_kms_key_id(try_into_aws(x.kms_key_id)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_encryption_type(Some(try_into_aws(x.encryption_type)?)); + y = y.set_kms_context(try_into_aws(x.kms_context)?); + y = y.set_kms_key_id(try_into_aws(x.kms_key_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::EncryptionConfiguration { type Target = aws_sdk_s3::types::EncryptionConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -replica_kms_key_id: try_from_aws(x.replica_kms_key_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + replica_kms_key_id: try_from_aws(x.replica_kms_key_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_replica_kms_key_id(try_into_aws(x.replica_kms_key_id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_replica_kms_key_id(try_into_aws(x.replica_kms_key_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::EncryptionTypeMismatch { type Target = aws_sdk_s3::types::error::EncryptionTypeMismatch; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::EndEvent { type Target = aws_sdk_s3::types::EndEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Error { type Target = aws_sdk_s3::types::Error; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -code: try_from_aws(x.code)?, -key: try_from_aws(x.key)?, -message: try_from_aws(x.message)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_code(try_into_aws(x.code)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_message(try_into_aws(x.message)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + code: try_from_aws(x.code)?, + key: try_from_aws(x.key)?, + message: try_from_aws(x.message)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_code(try_into_aws(x.code)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_message(try_into_aws(x.message)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ErrorDetails { type Target = aws_sdk_s3::types::ErrorDetails; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -error_code: try_from_aws(x.error_code)?, -error_message: try_from_aws(x.error_message)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + error_code: try_from_aws(x.error_code)?, + error_message: try_from_aws(x.error_message)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_error_code(try_into_aws(x.error_code)?); -y = y.set_error_message(try_into_aws(x.error_message)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_error_code(try_into_aws(x.error_code)?); + y = y.set_error_message(try_into_aws(x.error_message)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ErrorDocument { type Target = aws_sdk_s3::types::ErrorDocument; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -key: try_from_aws(x.key)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + key: try_from_aws(x.key)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_key(Some(try_into_aws(x.key)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_key(Some(try_into_aws(x.key)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::EventBridgeConfiguration { type Target = aws_sdk_s3::types::EventBridgeConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ExistingObjectReplication { type Target = aws_sdk_s3::types::ExistingObjectReplication; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ExistingObjectReplicationStatus { type Target = aws_sdk_s3::types::ExistingObjectReplicationStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ExistingObjectReplicationStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ExistingObjectReplicationStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ExistingObjectReplicationStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ExistingObjectReplicationStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ExistingObjectReplicationStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ExistingObjectReplicationStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ExpirationStatus { type Target = aws_sdk_s3::types::ExpirationStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ExpirationStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ExpirationStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ExpirationStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ExpirationStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ExpirationStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ExpirationStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ExpressionType { type Target = aws_sdk_s3::types::ExpressionType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ExpressionType::Sql => Self::from_static(Self::SQL), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ExpressionType::Sql => Self::from_static(Self::SQL), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ExpressionType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ExpressionType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::FileHeaderInfo { type Target = aws_sdk_s3::types::FileHeaderInfo; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::FileHeaderInfo::Ignore => Self::from_static(Self::IGNORE), -aws_sdk_s3::types::FileHeaderInfo::None => Self::from_static(Self::NONE), -aws_sdk_s3::types::FileHeaderInfo::Use => Self::from_static(Self::USE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::FileHeaderInfo::Ignore => Self::from_static(Self::IGNORE), + aws_sdk_s3::types::FileHeaderInfo::None => Self::from_static(Self::NONE), + aws_sdk_s3::types::FileHeaderInfo::Use => Self::from_static(Self::USE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::FileHeaderInfo::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::FileHeaderInfo::from(x.as_str())) + } } impl AwsConversion for s3s::dto::FilterRule { type Target = aws_sdk_s3::types::FilterRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -value: try_from_aws(x.value)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + value: try_from_aws(x.value)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_value(try_into_aws(x.value)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_value(try_into_aws(x.value)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::FilterRuleName { type Target = aws_sdk_s3::types::FilterRuleName; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::FilterRuleName::Prefix => Self::from_static(Self::PREFIX), -aws_sdk_s3::types::FilterRuleName::Suffix => Self::from_static(Self::SUFFIX), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::FilterRuleName::Prefix => Self::from_static(Self::PREFIX), + aws_sdk_s3::types::FilterRuleName::Suffix => Self::from_static(Self::SUFFIX), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::FilterRuleName::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::FilterRuleName::from(x.as_str())) + } } impl AwsConversion for s3s::dto::GetBucketAccelerateConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -request_payer: try_from_aws(x.request_payer)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + request_payer: try_from_aws(x.request_payer)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketAccelerateConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketAclInput { type Target = aws_sdk_s3::operation::get_bucket_acl::GetBucketAclInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketAclOutput { type Target = aws_sdk_s3::operation::get_bucket_acl::GetBucketAclOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grants: try_from_aws(x.grants)?, -owner: try_from_aws(x.owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grants: try_from_aws(x.grants)?, + owner: try_from_aws(x.owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grants(try_into_aws(x.grants)?); -y = y.set_owner(try_into_aws(x.owner)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grants(try_into_aws(x.grants)?); + y = y.set_owner(try_into_aws(x.owner)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_analytics_configuration::GetBucketAnalyticsConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_analytics_configuration::GetBucketAnalyticsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -analytics_configuration: try_from_aws(x.analytics_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + analytics_configuration: try_from_aws(x.analytics_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_analytics_configuration(try_into_aws(x.analytics_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_analytics_configuration(try_into_aws(x.analytics_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketCorsInput { type Target = aws_sdk_s3::operation::get_bucket_cors::GetBucketCorsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketCorsOutput { type Target = aws_sdk_s3::operation::get_bucket_cors::GetBucketCorsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -cors_rules: try_from_aws(x.cors_rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + cors_rules: try_from_aws(x.cors_rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_cors_rules(try_into_aws(x.cors_rules)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_cors_rules(try_into_aws(x.cors_rules)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketEncryptionInput { type Target = aws_sdk_s3::operation::get_bucket_encryption::GetBucketEncryptionInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketEncryptionOutput { type Target = aws_sdk_s3::operation::get_bucket_encryption::GetBucketEncryptionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -server_side_encryption_configuration: try_from_aws(x.server_side_encryption_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + server_side_encryption_configuration: try_from_aws(x.server_side_encryption_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_server_side_encryption_configuration(try_into_aws(x.server_side_encryption_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_server_side_encryption_configuration(try_into_aws(x.server_side_encryption_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketIntelligentTieringConfigurationInput { - type Target = aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationInput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationInput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketIntelligentTieringConfigurationOutput { - type Target = aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -intelligent_tiering_configuration: try_from_aws(x.intelligent_tiering_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + intelligent_tiering_configuration: try_from_aws(x.intelligent_tiering_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_intelligent_tiering_configuration(try_into_aws(x.intelligent_tiering_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_intelligent_tiering_configuration(try_into_aws(x.intelligent_tiering_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_inventory_configuration::GetBucketInventoryConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_inventory_configuration::GetBucketInventoryConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -inventory_configuration: try_from_aws(x.inventory_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + inventory_configuration: try_from_aws(x.inventory_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_inventory_configuration(try_into_aws(x.inventory_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_inventory_configuration(try_into_aws(x.inventory_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketLifecycleConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_lifecycle_configuration::GetBucketLifecycleConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketLifecycleConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_lifecycle_configuration::GetBucketLifecycleConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -rules: try_from_aws(x.rules)?, -transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + rules: try_from_aws(x.rules)?, + transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_rules(try_into_aws(x.rules)?); -y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_rules(try_into_aws(x.rules)?); + y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketLocationInput { type Target = aws_sdk_s3::operation::get_bucket_location::GetBucketLocationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketLocationOutput { type Target = aws_sdk_s3::operation::get_bucket_location::GetBucketLocationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -location_constraint: try_from_aws(x.location_constraint)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + location_constraint: try_from_aws(x.location_constraint)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_location_constraint(try_into_aws(x.location_constraint)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_location_constraint(try_into_aws(x.location_constraint)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketLoggingInput { type Target = aws_sdk_s3::operation::get_bucket_logging::GetBucketLoggingInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketLoggingOutput { type Target = aws_sdk_s3::operation::get_bucket_logging::GetBucketLoggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -logging_enabled: try_from_aws(x.logging_enabled)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + logging_enabled: try_from_aws(x.logging_enabled)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -get_bucket_metadata_table_configuration_result: try_from_aws(x.get_bucket_metadata_table_configuration_result)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + get_bucket_metadata_table_configuration_result: try_from_aws(x.get_bucket_metadata_table_configuration_result)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_get_bucket_metadata_table_configuration_result(try_into_aws(x.get_bucket_metadata_table_configuration_result)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_get_bucket_metadata_table_configuration_result(try_into_aws(x.get_bucket_metadata_table_configuration_result)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationResult { type Target = aws_sdk_s3::types::GetBucketMetadataTableConfigurationResult; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -error: try_from_aws(x.error)?, -metadata_table_configuration_result: unwrap_from_aws(x.metadata_table_configuration_result, "metadata_table_configuration_result")?, -status: try_from_aws(x.status)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_error(try_into_aws(x.error)?); -y = y.set_metadata_table_configuration_result(Some(try_into_aws(x.metadata_table_configuration_result)?)); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + error: try_from_aws(x.error)?, + metadata_table_configuration_result: unwrap_from_aws( + x.metadata_table_configuration_result, + "metadata_table_configuration_result", + )?, + status: try_from_aws(x.status)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_error(try_into_aws(x.error)?); + y = y.set_metadata_table_configuration_result(Some(try_into_aws(x.metadata_table_configuration_result)?)); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_metrics_configuration::GetBucketMetricsConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_metrics_configuration::GetBucketMetricsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -metrics_configuration: try_from_aws(x.metrics_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + metrics_configuration: try_from_aws(x.metrics_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_metrics_configuration(try_into_aws(x.metrics_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_metrics_configuration(try_into_aws(x.metrics_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketNotificationConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_notification_configuration::GetBucketNotificationConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketNotificationConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_notification_configuration::GetBucketNotificationConfigurationOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, -lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, -queue_configurations: try_from_aws(x.queue_configurations)?, -topic_configurations: try_from_aws(x.topic_configurations)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); -y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); -y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); -y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, + lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, + queue_configurations: try_from_aws(x.queue_configurations)?, + topic_configurations: try_from_aws(x.topic_configurations)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); + y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); + y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); + y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::get_bucket_ownership_controls::GetBucketOwnershipControlsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::get_bucket_ownership_controls::GetBucketOwnershipControlsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -ownership_controls: try_from_aws(x.ownership_controls)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + ownership_controls: try_from_aws(x.ownership_controls)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_ownership_controls(try_into_aws(x.ownership_controls)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_ownership_controls(try_into_aws(x.ownership_controls)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketPolicyInput { type Target = aws_sdk_s3::operation::get_bucket_policy::GetBucketPolicyInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketPolicyOutput { type Target = aws_sdk_s3::operation::get_bucket_policy::GetBucketPolicyOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -policy: try_from_aws(x.policy)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + policy: try_from_aws(x.policy)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_policy(try_into_aws(x.policy)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_policy(try_into_aws(x.policy)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketPolicyStatusInput { type Target = aws_sdk_s3::operation::get_bucket_policy_status::GetBucketPolicyStatusInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketPolicyStatusOutput { type Target = aws_sdk_s3::operation::get_bucket_policy_status::GetBucketPolicyStatusOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -policy_status: try_from_aws(x.policy_status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + policy_status: try_from_aws(x.policy_status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_policy_status(try_into_aws(x.policy_status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_policy_status(try_into_aws(x.policy_status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketReplicationInput { type Target = aws_sdk_s3::operation::get_bucket_replication::GetBucketReplicationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketReplicationOutput { type Target = aws_sdk_s3::operation::get_bucket_replication::GetBucketReplicationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -replication_configuration: try_from_aws(x.replication_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + replication_configuration: try_from_aws(x.replication_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_replication_configuration(try_into_aws(x.replication_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_replication_configuration(try_into_aws(x.replication_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketRequestPaymentInput { type Target = aws_sdk_s3::operation::get_bucket_request_payment::GetBucketRequestPaymentInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketRequestPaymentOutput { type Target = aws_sdk_s3::operation::get_bucket_request_payment::GetBucketRequestPaymentOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -payer: try_from_aws(x.payer)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + payer: try_from_aws(x.payer)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_payer(try_into_aws(x.payer)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_payer(try_into_aws(x.payer)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketTaggingInput { type Target = aws_sdk_s3::operation::get_bucket_tagging::GetBucketTaggingInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketTaggingOutput { type Target = aws_sdk_s3::operation::get_bucket_tagging::GetBucketTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -tag_set: try_from_aws(x.tag_set)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + tag_set: try_from_aws(x.tag_set)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketVersioningInput { type Target = aws_sdk_s3::operation::get_bucket_versioning::GetBucketVersioningInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketVersioningOutput { type Target = aws_sdk_s3::operation::get_bucket_versioning::GetBucketVersioningOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -mfa_delete: try_from_aws(x.mfa_delete)?, -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + mfa_delete: try_from_aws(x.mfa_delete)?, + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketWebsiteInput { type Target = aws_sdk_s3::operation::get_bucket_website::GetBucketWebsiteInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketWebsiteOutput { type Target = aws_sdk_s3::operation::get_bucket_website::GetBucketWebsiteOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -error_document: try_from_aws(x.error_document)?, -index_document: try_from_aws(x.index_document)?, -redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, -routing_rules: try_from_aws(x.routing_rules)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_error_document(try_into_aws(x.error_document)?); -y = y.set_index_document(try_into_aws(x.index_document)?); -y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); -y = y.set_routing_rules(try_into_aws(x.routing_rules)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + error_document: try_from_aws(x.error_document)?, + index_document: try_from_aws(x.index_document)?, + redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, + routing_rules: try_from_aws(x.routing_rules)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_error_document(try_into_aws(x.error_document)?); + y = y.set_index_document(try_into_aws(x.index_document)?); + y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); + y = y.set_routing_rules(try_into_aws(x.routing_rules)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectAclInput { type Target = aws_sdk_s3::operation::get_object_acl::GetObjectAclInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectAclOutput { type Target = aws_sdk_s3::operation::get_object_acl::GetObjectAclOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grants: try_from_aws(x.grants)?, -owner: try_from_aws(x.owner)?, -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grants: try_from_aws(x.grants)?, + owner: try_from_aws(x.owner)?, + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grants(try_into_aws(x.grants)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grants(try_into_aws(x.grants)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectAttributesInput { type Target = aws_sdk_s3::operation::get_object_attributes::GetObjectAttributesInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -max_parts: try_from_aws(x.max_parts)?, -object_attributes: unwrap_from_aws(x.object_attributes, "object_attributes")?, -part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_max_parts(try_into_aws(x.max_parts)?); -y = y.set_object_attributes(Some(try_into_aws(x.object_attributes)?)); -y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + max_parts: try_from_aws(x.max_parts)?, + object_attributes: unwrap_from_aws(x.object_attributes, "object_attributes")?, + part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_max_parts(try_into_aws(x.max_parts)?); + y = y.set_object_attributes(Some(try_into_aws(x.object_attributes)?)); + y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectAttributesOutput { type Target = aws_sdk_s3::operation::get_object_attributes::GetObjectAttributesOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum: try_from_aws(x.checksum)?, -delete_marker: try_from_aws(x.delete_marker)?, -e_tag: try_from_aws(x.e_tag)?, -last_modified: try_from_aws(x.last_modified)?, -object_parts: try_from_aws(x.object_parts)?, -object_size: try_from_aws(x.object_size)?, -request_charged: try_from_aws(x.request_charged)?, -storage_class: try_from_aws(x.storage_class)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum(try_into_aws(x.checksum)?); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_object_parts(try_into_aws(x.object_parts)?); -y = y.set_object_size(try_into_aws(x.object_size)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum: try_from_aws(x.checksum)?, + delete_marker: try_from_aws(x.delete_marker)?, + e_tag: try_from_aws(x.e_tag)?, + last_modified: try_from_aws(x.last_modified)?, + object_parts: try_from_aws(x.object_parts)?, + object_size: try_from_aws(x.object_size)?, + request_charged: try_from_aws(x.request_charged)?, + storage_class: try_from_aws(x.storage_class)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum(try_into_aws(x.checksum)?); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_object_parts(try_into_aws(x.object_parts)?); + y = y.set_object_size(try_into_aws(x.object_size)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectAttributesParts { type Target = aws_sdk_s3::types::GetObjectAttributesParts; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -is_truncated: try_from_aws(x.is_truncated)?, -max_parts: try_from_aws(x.max_parts)?, -next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, -part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, -parts: try_from_aws(x.parts)?, -total_parts_count: try_from_aws(x.total_parts_count)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_max_parts(try_into_aws(x.max_parts)?); -y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); -y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); -y = y.set_parts(try_into_aws(x.parts)?); -y = y.set_total_parts_count(try_into_aws(x.total_parts_count)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + is_truncated: try_from_aws(x.is_truncated)?, + max_parts: try_from_aws(x.max_parts)?, + next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, + part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, + parts: try_from_aws(x.parts)?, + total_parts_count: try_from_aws(x.total_parts_count)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_max_parts(try_into_aws(x.max_parts)?); + y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); + y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); + y = y.set_parts(try_into_aws(x.parts)?); + y = y.set_total_parts_count(try_into_aws(x.total_parts_count)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectInput { type Target = aws_sdk_s3::operation::get_object::GetObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_mode: try_from_aws(x.checksum_mode)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match: try_from_aws(x.if_match)?, -if_modified_since: try_from_aws(x.if_modified_since)?, -if_none_match: try_from_aws(x.if_none_match)?, -if_unmodified_since: try_from_aws(x.if_unmodified_since)?, -key: unwrap_from_aws(x.key, "key")?, -part_number: try_from_aws(x.part_number)?, -range: try_from_aws(x.range)?, -request_payer: try_from_aws(x.request_payer)?, -response_cache_control: try_from_aws(x.response_cache_control)?, -response_content_disposition: try_from_aws(x.response_content_disposition)?, -response_content_encoding: try_from_aws(x.response_content_encoding)?, -response_content_language: try_from_aws(x.response_content_language)?, -response_content_type: try_from_aws(x.response_content_type)?, -response_expires: try_from_aws(x.response_expires)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); -y = y.set_if_none_match(try_into_aws(x.if_none_match)?); -y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_part_number(try_into_aws(x.part_number)?); -y = y.set_range(try_into_aws(x.range)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); -y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); -y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); -y = y.set_response_content_language(try_into_aws(x.response_content_language)?); -y = y.set_response_content_type(try_into_aws(x.response_content_type)?); -y = y.set_response_expires(try_into_aws(x.response_expires)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_mode: try_from_aws(x.checksum_mode)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match: try_from_aws(x.if_match)?, + if_modified_since: try_from_aws(x.if_modified_since)?, + if_none_match: try_from_aws(x.if_none_match)?, + if_unmodified_since: try_from_aws(x.if_unmodified_since)?, + key: unwrap_from_aws(x.key, "key")?, + part_number: try_from_aws(x.part_number)?, + range: try_from_aws(x.range)?, + request_payer: try_from_aws(x.request_payer)?, + response_cache_control: try_from_aws(x.response_cache_control)?, + response_content_disposition: try_from_aws(x.response_content_disposition)?, + response_content_encoding: try_from_aws(x.response_content_encoding)?, + response_content_language: try_from_aws(x.response_content_language)?, + response_content_type: try_from_aws(x.response_content_type)?, + response_expires: try_from_aws(x.response_expires)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); + y = y.set_if_none_match(try_into_aws(x.if_none_match)?); + y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_part_number(try_into_aws(x.part_number)?); + y = y.set_range(try_into_aws(x.range)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); + y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); + y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); + y = y.set_response_content_language(try_into_aws(x.response_content_language)?); + y = y.set_response_content_type(try_into_aws(x.response_content_type)?); + y = y.set_response_expires(try_into_aws(x.response_expires)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectLegalHoldInput { type Target = aws_sdk_s3::operation::get_object_legal_hold::GetObjectLegalHoldInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectLegalHoldOutput { type Target = aws_sdk_s3::operation::get_object_legal_hold::GetObjectLegalHoldOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -legal_hold: try_from_aws(x.legal_hold)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + legal_hold: try_from_aws(x.legal_hold)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_legal_hold(try_into_aws(x.legal_hold)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_legal_hold(try_into_aws(x.legal_hold)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectLockConfigurationInput { type Target = aws_sdk_s3::operation::get_object_lock_configuration::GetObjectLockConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectLockConfigurationOutput { type Target = aws_sdk_s3::operation::get_object_lock_configuration::GetObjectLockConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -object_lock_configuration: try_from_aws(x.object_lock_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + object_lock_configuration: try_from_aws(x.object_lock_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectOutput { type Target = aws_sdk_s3::operation::get_object::GetObjectOutput; -type Error = S3Error; - -#[allow(deprecated)] -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -accept_ranges: try_from_aws(x.accept_ranges)?, -body: Some(try_from_aws(x.body)?), -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_length: try_from_aws(x.content_length)?, -content_range: try_from_aws(x.content_range)?, -content_type: try_from_aws(x.content_type)?, -delete_marker: try_from_aws(x.delete_marker)?, -e_tag: try_from_aws(x.e_tag)?, -expiration: try_from_aws(x.expiration)?, -expires: try_from_aws(x.expires)?, -last_modified: try_from_aws(x.last_modified)?, -metadata: try_from_aws(x.metadata)?, -missing_meta: try_from_aws(x.missing_meta)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -parts_count: try_from_aws(x.parts_count)?, -replication_status: try_from_aws(x.replication_status)?, -request_charged: try_from_aws(x.request_charged)?, -restore: try_from_aws(x.restore)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -tag_count: try_from_aws(x.tag_count)?, -version_id: try_from_aws(x.version_id)?, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -}) -} - -#[allow(deprecated)] -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_range(try_into_aws(x.content_range)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_missing_meta(try_into_aws(x.missing_meta)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_parts_count(try_into_aws(x.parts_count)?); -y = y.set_replication_status(try_into_aws(x.replication_status)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_restore(try_into_aws(x.restore)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tag_count(try_into_aws(x.tag_count)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -Ok(y.build()) -} + type Error = S3Error; + + #[allow(deprecated)] + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + accept_ranges: try_from_aws(x.accept_ranges)?, + body: Some(try_from_aws(x.body)?), + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_length: try_from_aws(x.content_length)?, + content_range: try_from_aws(x.content_range)?, + content_type: try_from_aws(x.content_type)?, + delete_marker: try_from_aws(x.delete_marker)?, + e_tag: try_from_aws(x.e_tag)?, + expiration: try_from_aws(x.expiration)?, + expires: try_from_aws(x.expires)?, + last_modified: try_from_aws(x.last_modified)?, + metadata: try_from_aws(x.metadata)?, + missing_meta: try_from_aws(x.missing_meta)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + parts_count: try_from_aws(x.parts_count)?, + replication_status: try_from_aws(x.replication_status)?, + request_charged: try_from_aws(x.request_charged)?, + restore: try_from_aws(x.restore)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + tag_count: try_from_aws(x.tag_count)?, + version_id: try_from_aws(x.version_id)?, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + }) + } + + #[allow(deprecated)] + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_range(try_into_aws(x.content_range)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_missing_meta(try_into_aws(x.missing_meta)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_parts_count(try_into_aws(x.parts_count)?); + y = y.set_replication_status(try_into_aws(x.replication_status)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_restore(try_into_aws(x.restore)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tag_count(try_into_aws(x.tag_count)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectRetentionInput { type Target = aws_sdk_s3::operation::get_object_retention::GetObjectRetentionInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectRetentionOutput { type Target = aws_sdk_s3::operation::get_object_retention::GetObjectRetentionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -retention: try_from_aws(x.retention)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + retention: try_from_aws(x.retention)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_retention(try_into_aws(x.retention)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_retention(try_into_aws(x.retention)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectTaggingInput { type Target = aws_sdk_s3::operation::get_object_tagging::GetObjectTaggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectTaggingOutput { type Target = aws_sdk_s3::operation::get_object_tagging::GetObjectTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -tag_set: try_from_aws(x.tag_set)?, -version_id: try_from_aws(x.version_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + tag_set: try_from_aws(x.tag_set)?, + version_id: try_from_aws(x.version_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectTorrentInput { type Target = aws_sdk_s3::operation::get_object_torrent::GetObjectTorrentInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectTorrentOutput { type Target = aws_sdk_s3::operation::get_object_torrent::GetObjectTorrentOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -body: Some(try_from_aws(x.body)?), -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + body: Some(try_from_aws(x.body)?), + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetPublicAccessBlockInput { type Target = aws_sdk_s3::operation::get_public_access_block::GetPublicAccessBlockInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetPublicAccessBlockOutput { type Target = aws_sdk_s3::operation::get_public_access_block::GetPublicAccessBlockOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -public_access_block_configuration: try_from_aws(x.public_access_block_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + public_access_block_configuration: try_from_aws(x.public_access_block_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_public_access_block_configuration(try_into_aws(x.public_access_block_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_public_access_block_configuration(try_into_aws(x.public_access_block_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GlacierJobParameters { type Target = aws_sdk_s3::types::GlacierJobParameters; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -tier: try_from_aws(x.tier)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + tier: try_from_aws(x.tier)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_tier(Some(try_into_aws(x.tier)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_tier(Some(try_into_aws(x.tier)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::Grant { type Target = aws_sdk_s3::types::Grant; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grantee: try_from_aws(x.grantee)?, -permission: try_from_aws(x.permission)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grantee: try_from_aws(x.grantee)?, + permission: try_from_aws(x.permission)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grantee(try_into_aws(x.grantee)?); -y = y.set_permission(try_into_aws(x.permission)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grantee(try_into_aws(x.grantee)?); + y = y.set_permission(try_into_aws(x.permission)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Grantee { type Target = aws_sdk_s3::types::Grantee; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -display_name: try_from_aws(x.display_name)?, -email_address: try_from_aws(x.email_address)?, -id: try_from_aws(x.id)?, -type_: try_from_aws(x.r#type)?, -uri: try_from_aws(x.uri)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_display_name(try_into_aws(x.display_name)?); -y = y.set_email_address(try_into_aws(x.email_address)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_type(Some(try_into_aws(x.type_)?)); -y = y.set_uri(try_into_aws(x.uri)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + display_name: try_from_aws(x.display_name)?, + email_address: try_from_aws(x.email_address)?, + id: try_from_aws(x.id)?, + type_: try_from_aws(x.r#type)?, + uri: try_from_aws(x.uri)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_display_name(try_into_aws(x.display_name)?); + y = y.set_email_address(try_into_aws(x.email_address)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_type(Some(try_into_aws(x.type_)?)); + y = y.set_uri(try_into_aws(x.uri)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::HeadBucketInput { type Target = aws_sdk_s3::operation::head_bucket::HeadBucketInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::HeadBucketOutput { type Target = aws_sdk_s3::operation::head_bucket::HeadBucketOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_point_alias: try_from_aws(x.access_point_alias)?, -bucket_location_name: try_from_aws(x.bucket_location_name)?, -bucket_location_type: try_from_aws(x.bucket_location_type)?, -bucket_region: try_from_aws(x.bucket_region)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_point_alias(try_into_aws(x.access_point_alias)?); -y = y.set_bucket_location_name(try_into_aws(x.bucket_location_name)?); -y = y.set_bucket_location_type(try_into_aws(x.bucket_location_type)?); -y = y.set_bucket_region(try_into_aws(x.bucket_region)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_point_alias: try_from_aws(x.access_point_alias)?, + bucket_location_name: try_from_aws(x.bucket_location_name)?, + bucket_location_type: try_from_aws(x.bucket_location_type)?, + bucket_region: try_from_aws(x.bucket_region)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_point_alias(try_into_aws(x.access_point_alias)?); + y = y.set_bucket_location_name(try_into_aws(x.bucket_location_name)?); + y = y.set_bucket_location_type(try_into_aws(x.bucket_location_type)?); + y = y.set_bucket_region(try_into_aws(x.bucket_region)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::HeadObjectInput { type Target = aws_sdk_s3::operation::head_object::HeadObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_mode: try_from_aws(x.checksum_mode)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match: try_from_aws(x.if_match)?, -if_modified_since: try_from_aws(x.if_modified_since)?, -if_none_match: try_from_aws(x.if_none_match)?, -if_unmodified_since: try_from_aws(x.if_unmodified_since)?, -key: unwrap_from_aws(x.key, "key")?, -part_number: try_from_aws(x.part_number)?, -range: try_from_aws(x.range)?, -request_payer: try_from_aws(x.request_payer)?, -response_cache_control: try_from_aws(x.response_cache_control)?, -response_content_disposition: try_from_aws(x.response_content_disposition)?, -response_content_encoding: try_from_aws(x.response_content_encoding)?, -response_content_language: try_from_aws(x.response_content_language)?, -response_content_type: try_from_aws(x.response_content_type)?, -response_expires: try_from_aws(x.response_expires)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); -y = y.set_if_none_match(try_into_aws(x.if_none_match)?); -y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_part_number(try_into_aws(x.part_number)?); -y = y.set_range(try_into_aws(x.range)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); -y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); -y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); -y = y.set_response_content_language(try_into_aws(x.response_content_language)?); -y = y.set_response_content_type(try_into_aws(x.response_content_type)?); -y = y.set_response_expires(try_into_aws(x.response_expires)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_mode: try_from_aws(x.checksum_mode)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match: try_from_aws(x.if_match)?, + if_modified_since: try_from_aws(x.if_modified_since)?, + if_none_match: try_from_aws(x.if_none_match)?, + if_unmodified_since: try_from_aws(x.if_unmodified_since)?, + key: unwrap_from_aws(x.key, "key")?, + part_number: try_from_aws(x.part_number)?, + range: try_from_aws(x.range)?, + request_payer: try_from_aws(x.request_payer)?, + response_cache_control: try_from_aws(x.response_cache_control)?, + response_content_disposition: try_from_aws(x.response_content_disposition)?, + response_content_encoding: try_from_aws(x.response_content_encoding)?, + response_content_language: try_from_aws(x.response_content_language)?, + response_content_type: try_from_aws(x.response_content_type)?, + response_expires: try_from_aws(x.response_expires)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); + y = y.set_if_none_match(try_into_aws(x.if_none_match)?); + y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_part_number(try_into_aws(x.part_number)?); + y = y.set_range(try_into_aws(x.range)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); + y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); + y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); + y = y.set_response_content_language(try_into_aws(x.response_content_language)?); + y = y.set_response_content_type(try_into_aws(x.response_content_type)?); + y = y.set_response_expires(try_into_aws(x.response_expires)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::HeadObjectOutput { type Target = aws_sdk_s3::operation::head_object::HeadObjectOutput; -type Error = S3Error; - -#[allow(deprecated)] -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -accept_ranges: try_from_aws(x.accept_ranges)?, -archive_status: try_from_aws(x.archive_status)?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_length: try_from_aws(x.content_length)?, -content_range: try_from_aws(x.content_range)?, -content_type: try_from_aws(x.content_type)?, -delete_marker: try_from_aws(x.delete_marker)?, -e_tag: try_from_aws(x.e_tag)?, -expiration: try_from_aws(x.expiration)?, -expires: try_from_aws(x.expires)?, -last_modified: try_from_aws(x.last_modified)?, -metadata: try_from_aws(x.metadata)?, -missing_meta: try_from_aws(x.missing_meta)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -parts_count: try_from_aws(x.parts_count)?, -replication_status: try_from_aws(x.replication_status)?, -request_charged: try_from_aws(x.request_charged)?, -restore: try_from_aws(x.restore)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -version_id: try_from_aws(x.version_id)?, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -}) -} - -#[allow(deprecated)] -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); -y = y.set_archive_status(try_into_aws(x.archive_status)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_range(try_into_aws(x.content_range)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_missing_meta(try_into_aws(x.missing_meta)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_parts_count(try_into_aws(x.parts_count)?); -y = y.set_replication_status(try_into_aws(x.replication_status)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_restore(try_into_aws(x.restore)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -Ok(y.build()) -} + type Error = S3Error; + + #[allow(deprecated)] + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + accept_ranges: try_from_aws(x.accept_ranges)?, + archive_status: try_from_aws(x.archive_status)?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_length: try_from_aws(x.content_length)?, + content_range: try_from_aws(x.content_range)?, + content_type: try_from_aws(x.content_type)?, + delete_marker: try_from_aws(x.delete_marker)?, + e_tag: try_from_aws(x.e_tag)?, + expiration: try_from_aws(x.expiration)?, + expires: try_from_aws(x.expires)?, + last_modified: try_from_aws(x.last_modified)?, + metadata: try_from_aws(x.metadata)?, + missing_meta: try_from_aws(x.missing_meta)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + parts_count: try_from_aws(x.parts_count)?, + replication_status: try_from_aws(x.replication_status)?, + request_charged: try_from_aws(x.request_charged)?, + restore: try_from_aws(x.restore)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + version_id: try_from_aws(x.version_id)?, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + }) + } + + #[allow(deprecated)] + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); + y = y.set_archive_status(try_into_aws(x.archive_status)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_range(try_into_aws(x.content_range)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_missing_meta(try_into_aws(x.missing_meta)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_parts_count(try_into_aws(x.parts_count)?); + y = y.set_replication_status(try_into_aws(x.replication_status)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_restore(try_into_aws(x.restore)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::IndexDocument { type Target = aws_sdk_s3::types::IndexDocument; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -suffix: try_from_aws(x.suffix)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + suffix: try_from_aws(x.suffix)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_suffix(Some(try_into_aws(x.suffix)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_suffix(Some(try_into_aws(x.suffix)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::Initiator { type Target = aws_sdk_s3::types::Initiator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -display_name: try_from_aws(x.display_name)?, -id: try_from_aws(x.id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + display_name: try_from_aws(x.display_name)?, + id: try_from_aws(x.id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_display_name(try_into_aws(x.display_name)?); -y = y.set_id(try_into_aws(x.id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_display_name(try_into_aws(x.display_name)?); + y = y.set_id(try_into_aws(x.id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InputSerialization { type Target = aws_sdk_s3::types::InputSerialization; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -csv: try_from_aws(x.csv)?, -compression_type: try_from_aws(x.compression_type)?, -json: try_from_aws(x.json)?, -parquet: try_from_aws(x.parquet)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_csv(try_into_aws(x.csv)?); -y = y.set_compression_type(try_into_aws(x.compression_type)?); -y = y.set_json(try_into_aws(x.json)?); -y = y.set_parquet(try_into_aws(x.parquet)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + csv: try_from_aws(x.csv)?, + compression_type: try_from_aws(x.compression_type)?, + json: try_from_aws(x.json)?, + parquet: try_from_aws(x.parquet)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_csv(try_into_aws(x.csv)?); + y = y.set_compression_type(try_into_aws(x.compression_type)?); + y = y.set_json(try_into_aws(x.json)?); + y = y.set_parquet(try_into_aws(x.parquet)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::IntelligentTieringAccessTier { type Target = aws_sdk_s3::types::IntelligentTieringAccessTier; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::IntelligentTieringAccessTier::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), -aws_sdk_s3::types::IntelligentTieringAccessTier::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::IntelligentTieringAccessTier::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), + aws_sdk_s3::types::IntelligentTieringAccessTier::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::IntelligentTieringAccessTier::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::IntelligentTieringAccessTier::from(x.as_str())) + } } impl AwsConversion for s3s::dto::IntelligentTieringAndOperator { type Target = aws_sdk_s3::types::IntelligentTieringAndOperator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::IntelligentTieringConfiguration { type Target = aws_sdk_s3::types::IntelligentTieringConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -status: try_from_aws(x.status)?, -tierings: try_from_aws(x.tierings)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_status(Some(try_into_aws(x.status)?)); -y = y.set_tierings(Some(try_into_aws(x.tierings)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + status: try_from_aws(x.status)?, + tierings: try_from_aws(x.tierings)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_status(Some(try_into_aws(x.status)?)); + y = y.set_tierings(Some(try_into_aws(x.tierings)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::IntelligentTieringFilter { type Target = aws_sdk_s3::types::IntelligentTieringFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -and: try_from_aws(x.and)?, -prefix: try_from_aws(x.prefix)?, -tag: try_from_aws(x.tag)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + and: try_from_aws(x.and)?, + prefix: try_from_aws(x.prefix)?, + tag: try_from_aws(x.tag)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_and(try_into_aws(x.and)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tag(try_into_aws(x.tag)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_and(try_into_aws(x.and)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tag(try_into_aws(x.tag)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::IntelligentTieringStatus { type Target = aws_sdk_s3::types::IntelligentTieringStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::IntelligentTieringStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::IntelligentTieringStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::IntelligentTieringStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::IntelligentTieringStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::IntelligentTieringStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::IntelligentTieringStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InvalidObjectState { type Target = aws_sdk_s3::types::error::InvalidObjectState; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_tier: try_from_aws(x.access_tier)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_tier: try_from_aws(x.access_tier)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_tier(try_into_aws(x.access_tier)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_tier(try_into_aws(x.access_tier)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InvalidRequest { type Target = aws_sdk_s3::types::error::InvalidRequest; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InvalidWriteOffset { type Target = aws_sdk_s3::types::error::InvalidWriteOffset; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InventoryConfiguration { type Target = aws_sdk_s3::types::InventoryConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -destination: unwrap_from_aws(x.destination, "destination")?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -included_object_versions: try_from_aws(x.included_object_versions)?, -is_enabled: try_from_aws(x.is_enabled)?, -optional_fields: try_from_aws(x.optional_fields)?, -schedule: unwrap_from_aws(x.schedule, "schedule")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_destination(Some(try_into_aws(x.destination)?)); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_included_object_versions(Some(try_into_aws(x.included_object_versions)?)); -y = y.set_is_enabled(Some(try_into_aws(x.is_enabled)?)); -y = y.set_optional_fields(try_into_aws(x.optional_fields)?); -y = y.set_schedule(Some(try_into_aws(x.schedule)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + destination: unwrap_from_aws(x.destination, "destination")?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + included_object_versions: try_from_aws(x.included_object_versions)?, + is_enabled: try_from_aws(x.is_enabled)?, + optional_fields: try_from_aws(x.optional_fields)?, + schedule: unwrap_from_aws(x.schedule, "schedule")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_destination(Some(try_into_aws(x.destination)?)); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_included_object_versions(Some(try_into_aws(x.included_object_versions)?)); + y = y.set_is_enabled(Some(try_into_aws(x.is_enabled)?)); + y = y.set_optional_fields(try_into_aws(x.optional_fields)?); + y = y.set_schedule(Some(try_into_aws(x.schedule)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::InventoryDestination { type Target = aws_sdk_s3::types::InventoryDestination; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InventoryEncryption { type Target = aws_sdk_s3::types::InventoryEncryption; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -ssekms: try_from_aws(x.ssekms)?, -sses3: try_from_aws(x.sses3)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + ssekms: try_from_aws(x.ssekms)?, + sses3: try_from_aws(x.sses3)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_ssekms(try_into_aws(x.ssekms)?); -y = y.set_sses3(try_into_aws(x.sses3)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_ssekms(try_into_aws(x.ssekms)?); + y = y.set_sses3(try_into_aws(x.sses3)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InventoryFilter { type Target = aws_sdk_s3::types::InventoryFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(Some(try_into_aws(x.prefix)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(Some(try_into_aws(x.prefix)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::InventoryFormat { type Target = aws_sdk_s3::types::InventoryFormat; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::InventoryFormat::Csv => Self::from_static(Self::CSV), -aws_sdk_s3::types::InventoryFormat::Orc => Self::from_static(Self::ORC), -aws_sdk_s3::types::InventoryFormat::Parquet => Self::from_static(Self::PARQUET), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::InventoryFormat::Csv => Self::from_static(Self::CSV), + aws_sdk_s3::types::InventoryFormat::Orc => Self::from_static(Self::ORC), + aws_sdk_s3::types::InventoryFormat::Parquet => Self::from_static(Self::PARQUET), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::InventoryFormat::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::InventoryFormat::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InventoryFrequency { type Target = aws_sdk_s3::types::InventoryFrequency; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::InventoryFrequency::Daily => Self::from_static(Self::DAILY), -aws_sdk_s3::types::InventoryFrequency::Weekly => Self::from_static(Self::WEEKLY), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::InventoryFrequency::Daily => Self::from_static(Self::DAILY), + aws_sdk_s3::types::InventoryFrequency::Weekly => Self::from_static(Self::WEEKLY), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::InventoryFrequency::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::InventoryFrequency::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InventoryIncludedObjectVersions { type Target = aws_sdk_s3::types::InventoryIncludedObjectVersions; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::InventoryIncludedObjectVersions::All => Self::from_static(Self::ALL), -aws_sdk_s3::types::InventoryIncludedObjectVersions::Current => Self::from_static(Self::CURRENT), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::InventoryIncludedObjectVersions::All => Self::from_static(Self::ALL), + aws_sdk_s3::types::InventoryIncludedObjectVersions::Current => Self::from_static(Self::CURRENT), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::InventoryIncludedObjectVersions::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::InventoryIncludedObjectVersions::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InventoryOptionalField { type Target = aws_sdk_s3::types::InventoryOptionalField; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::InventoryOptionalField::BucketKeyStatus => Self::from_static(Self::BUCKET_KEY_STATUS), -aws_sdk_s3::types::InventoryOptionalField::ChecksumAlgorithm => Self::from_static(Self::CHECKSUM_ALGORITHM), -aws_sdk_s3::types::InventoryOptionalField::ETag => Self::from_static(Self::E_TAG), -aws_sdk_s3::types::InventoryOptionalField::EncryptionStatus => Self::from_static(Self::ENCRYPTION_STATUS), -aws_sdk_s3::types::InventoryOptionalField::IntelligentTieringAccessTier => Self::from_static(Self::INTELLIGENT_TIERING_ACCESS_TIER), -aws_sdk_s3::types::InventoryOptionalField::IsMultipartUploaded => Self::from_static(Self::IS_MULTIPART_UPLOADED), -aws_sdk_s3::types::InventoryOptionalField::LastModifiedDate => Self::from_static(Self::LAST_MODIFIED_DATE), -aws_sdk_s3::types::InventoryOptionalField::ObjectAccessControlList => Self::from_static(Self::OBJECT_ACCESS_CONTROL_LIST), -aws_sdk_s3::types::InventoryOptionalField::ObjectLockLegalHoldStatus => Self::from_static(Self::OBJECT_LOCK_LEGAL_HOLD_STATUS), -aws_sdk_s3::types::InventoryOptionalField::ObjectLockMode => Self::from_static(Self::OBJECT_LOCK_MODE), -aws_sdk_s3::types::InventoryOptionalField::ObjectLockRetainUntilDate => Self::from_static(Self::OBJECT_LOCK_RETAIN_UNTIL_DATE), -aws_sdk_s3::types::InventoryOptionalField::ObjectOwner => Self::from_static(Self::OBJECT_OWNER), -aws_sdk_s3::types::InventoryOptionalField::ReplicationStatus => Self::from_static(Self::REPLICATION_STATUS), -aws_sdk_s3::types::InventoryOptionalField::Size => Self::from_static(Self::SIZE), -aws_sdk_s3::types::InventoryOptionalField::StorageClass => Self::from_static(Self::STORAGE_CLASS), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::InventoryOptionalField::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::InventoryOptionalField::BucketKeyStatus => Self::from_static(Self::BUCKET_KEY_STATUS), + aws_sdk_s3::types::InventoryOptionalField::ChecksumAlgorithm => Self::from_static(Self::CHECKSUM_ALGORITHM), + aws_sdk_s3::types::InventoryOptionalField::ETag => Self::from_static(Self::E_TAG), + aws_sdk_s3::types::InventoryOptionalField::EncryptionStatus => Self::from_static(Self::ENCRYPTION_STATUS), + aws_sdk_s3::types::InventoryOptionalField::IntelligentTieringAccessTier => { + Self::from_static(Self::INTELLIGENT_TIERING_ACCESS_TIER) + } + aws_sdk_s3::types::InventoryOptionalField::IsMultipartUploaded => Self::from_static(Self::IS_MULTIPART_UPLOADED), + aws_sdk_s3::types::InventoryOptionalField::LastModifiedDate => Self::from_static(Self::LAST_MODIFIED_DATE), + aws_sdk_s3::types::InventoryOptionalField::ObjectAccessControlList => { + Self::from_static(Self::OBJECT_ACCESS_CONTROL_LIST) + } + aws_sdk_s3::types::InventoryOptionalField::ObjectLockLegalHoldStatus => { + Self::from_static(Self::OBJECT_LOCK_LEGAL_HOLD_STATUS) + } + aws_sdk_s3::types::InventoryOptionalField::ObjectLockMode => Self::from_static(Self::OBJECT_LOCK_MODE), + aws_sdk_s3::types::InventoryOptionalField::ObjectLockRetainUntilDate => { + Self::from_static(Self::OBJECT_LOCK_RETAIN_UNTIL_DATE) + } + aws_sdk_s3::types::InventoryOptionalField::ObjectOwner => Self::from_static(Self::OBJECT_OWNER), + aws_sdk_s3::types::InventoryOptionalField::ReplicationStatus => Self::from_static(Self::REPLICATION_STATUS), + aws_sdk_s3::types::InventoryOptionalField::Size => Self::from_static(Self::SIZE), + aws_sdk_s3::types::InventoryOptionalField::StorageClass => Self::from_static(Self::STORAGE_CLASS), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::InventoryOptionalField::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InventoryS3BucketDestination { type Target = aws_sdk_s3::types::InventoryS3BucketDestination; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -account_id: try_from_aws(x.account_id)?, -bucket: try_from_aws(x.bucket)?, -encryption: try_from_aws(x.encryption)?, -format: try_from_aws(x.format)?, -prefix: try_from_aws(x.prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_account_id(try_into_aws(x.account_id)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_encryption(try_into_aws(x.encryption)?); -y = y.set_format(Some(try_into_aws(x.format)?)); -y = y.set_prefix(try_into_aws(x.prefix)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + account_id: try_from_aws(x.account_id)?, + bucket: try_from_aws(x.bucket)?, + encryption: try_from_aws(x.encryption)?, + format: try_from_aws(x.format)?, + prefix: try_from_aws(x.prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_account_id(try_into_aws(x.account_id)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_encryption(try_into_aws(x.encryption)?); + y = y.set_format(Some(try_into_aws(x.format)?)); + y = y.set_prefix(try_into_aws(x.prefix)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::InventorySchedule { type Target = aws_sdk_s3::types::InventorySchedule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -frequency: try_from_aws(x.frequency)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + frequency: try_from_aws(x.frequency)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_frequency(Some(try_into_aws(x.frequency)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_frequency(Some(try_into_aws(x.frequency)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::JSONInput { type Target = aws_sdk_s3::types::JsonInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -type_: try_from_aws(x.r#type)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + type_: try_from_aws(x.r#type)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_type(try_into_aws(x.type_)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_type(try_into_aws(x.type_)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::JSONOutput { type Target = aws_sdk_s3::types::JsonOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -record_delimiter: try_from_aws(x.record_delimiter)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + record_delimiter: try_from_aws(x.record_delimiter)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::JSONType { type Target = aws_sdk_s3::types::JsonType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::JsonType::Document => Self::from_static(Self::DOCUMENT), -aws_sdk_s3::types::JsonType::Lines => Self::from_static(Self::LINES), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::JsonType::Document => Self::from_static(Self::DOCUMENT), + aws_sdk_s3::types::JsonType::Lines => Self::from_static(Self::LINES), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::JsonType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::JsonType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::LambdaFunctionConfiguration { type Target = aws_sdk_s3::types::LambdaFunctionConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -events: try_from_aws(x.events)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -lambda_function_arn: try_from_aws(x.lambda_function_arn)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_events(Some(try_into_aws(x.events)?)); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_lambda_function_arn(Some(try_into_aws(x.lambda_function_arn)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + events: try_from_aws(x.events)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + lambda_function_arn: try_from_aws(x.lambda_function_arn)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_events(Some(try_into_aws(x.events)?)); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_lambda_function_arn(Some(try_into_aws(x.lambda_function_arn)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::LifecycleExpiration { type Target = aws_sdk_s3::types::LifecycleExpiration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -date: try_from_aws(x.date)?, -days: try_from_aws(x.days)?, -expired_object_delete_marker: try_from_aws(x.expired_object_delete_marker)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + date: try_from_aws(x.date)?, + days: try_from_aws(x.days)?, + expired_object_delete_marker: try_from_aws(x.expired_object_delete_marker)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_date(try_into_aws(x.date)?); -y = y.set_days(try_into_aws(x.days)?); -y = y.set_expired_object_delete_marker(try_into_aws(x.expired_object_delete_marker)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_date(try_into_aws(x.date)?); + y = y.set_days(try_into_aws(x.days)?); + y = y.set_expired_object_delete_marker(try_into_aws(x.expired_object_delete_marker)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::LifecycleRule { type Target = aws_sdk_s3::types::LifecycleRule; -type Error = S3Error; - -#[allow(deprecated)] -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -abort_incomplete_multipart_upload: try_from_aws(x.abort_incomplete_multipart_upload)?, -expiration: try_from_aws(x.expiration)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -noncurrent_version_expiration: try_from_aws(x.noncurrent_version_expiration)?, -noncurrent_version_transitions: try_from_aws(x.noncurrent_version_transitions)?, -prefix: try_from_aws(x.prefix)?, -status: try_from_aws(x.status)?, -transitions: try_from_aws(x.transitions)?, -}) -} - -#[allow(deprecated)] -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_abort_incomplete_multipart_upload(try_into_aws(x.abort_incomplete_multipart_upload)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_noncurrent_version_expiration(try_into_aws(x.noncurrent_version_expiration)?); -y = y.set_noncurrent_version_transitions(try_into_aws(x.noncurrent_version_transitions)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_status(Some(try_into_aws(x.status)?)); -y = y.set_transitions(try_into_aws(x.transitions)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + #[allow(deprecated)] + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + abort_incomplete_multipart_upload: try_from_aws(x.abort_incomplete_multipart_upload)?, + expiration: try_from_aws(x.expiration)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + noncurrent_version_expiration: try_from_aws(x.noncurrent_version_expiration)?, + noncurrent_version_transitions: try_from_aws(x.noncurrent_version_transitions)?, + prefix: try_from_aws(x.prefix)?, + status: try_from_aws(x.status)?, + transitions: try_from_aws(x.transitions)?, + }) + } + + #[allow(deprecated)] + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_abort_incomplete_multipart_upload(try_into_aws(x.abort_incomplete_multipart_upload)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_noncurrent_version_expiration(try_into_aws(x.noncurrent_version_expiration)?); + y = y.set_noncurrent_version_transitions(try_into_aws(x.noncurrent_version_transitions)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_status(Some(try_into_aws(x.status)?)); + y = y.set_transitions(try_into_aws(x.transitions)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::LifecycleRuleAndOperator { type Target = aws_sdk_s3::types::LifecycleRuleAndOperator; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -object_size_greater_than: try_from_aws(x.object_size_greater_than)?, -object_size_less_than: try_from_aws(x.object_size_less_than)?, -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); -y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + object_size_greater_than: try_from_aws(x.object_size_greater_than)?, + object_size_less_than: try_from_aws(x.object_size_less_than)?, + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); + y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::LifecycleRuleFilter { type Target = aws_sdk_s3::types::LifecycleRuleFilter; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -and: try_from_aws(x.and)?, -object_size_greater_than: try_from_aws(x.object_size_greater_than)?, -object_size_less_than: try_from_aws(x.object_size_less_than)?, -prefix: try_from_aws(x.prefix)?, -tag: try_from_aws(x.tag)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_and(try_into_aws(x.and)?); -y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); -y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tag(try_into_aws(x.tag)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + and: try_from_aws(x.and)?, + object_size_greater_than: try_from_aws(x.object_size_greater_than)?, + object_size_less_than: try_from_aws(x.object_size_less_than)?, + prefix: try_from_aws(x.prefix)?, + tag: try_from_aws(x.tag)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_and(try_into_aws(x.and)?); + y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); + y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tag(try_into_aws(x.tag)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketAnalyticsConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_analytics_configurations::ListBucketAnalyticsConfigurationsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketAnalyticsConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_analytics_configurations::ListBucketAnalyticsConfigurationsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -analytics_configuration_list: try_from_aws(x.analytics_configuration_list)?, -continuation_token: try_from_aws(x.continuation_token)?, -is_truncated: try_from_aws(x.is_truncated)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_analytics_configuration_list(try_into_aws(x.analytics_configuration_list)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + analytics_configuration_list: try_from_aws(x.analytics_configuration_list)?, + continuation_token: try_from_aws(x.continuation_token)?, + is_truncated: try_from_aws(x.is_truncated)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_analytics_configuration_list(try_into_aws(x.analytics_configuration_list)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketIntelligentTieringConfigurationsInput { - type Target = aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsInput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsInput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketIntelligentTieringConfigurationsOutput { - type Target = aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -continuation_token: try_from_aws(x.continuation_token)?, -intelligent_tiering_configuration_list: try_from_aws(x.intelligent_tiering_configuration_list)?, -is_truncated: try_from_aws(x.is_truncated)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_intelligent_tiering_configuration_list(try_into_aws(x.intelligent_tiering_configuration_list)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -Ok(y.build()) -} + type Target = + aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput; + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + continuation_token: try_from_aws(x.continuation_token)?, + intelligent_tiering_configuration_list: try_from_aws(x.intelligent_tiering_configuration_list)?, + is_truncated: try_from_aws(x.is_truncated)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_intelligent_tiering_configuration_list(try_into_aws(x.intelligent_tiering_configuration_list)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketInventoryConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketInventoryConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -continuation_token: try_from_aws(x.continuation_token)?, -inventory_configuration_list: try_from_aws(x.inventory_configuration_list)?, -is_truncated: try_from_aws(x.is_truncated)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_inventory_configuration_list(try_into_aws(x.inventory_configuration_list)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + continuation_token: try_from_aws(x.continuation_token)?, + inventory_configuration_list: try_from_aws(x.inventory_configuration_list)?, + is_truncated: try_from_aws(x.is_truncated)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_inventory_configuration_list(try_into_aws(x.inventory_configuration_list)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketMetricsConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketMetricsConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -continuation_token: try_from_aws(x.continuation_token)?, -is_truncated: try_from_aws(x.is_truncated)?, -metrics_configuration_list: try_from_aws(x.metrics_configuration_list)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_metrics_configuration_list(try_into_aws(x.metrics_configuration_list)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + continuation_token: try_from_aws(x.continuation_token)?, + is_truncated: try_from_aws(x.is_truncated)?, + metrics_configuration_list: try_from_aws(x.metrics_configuration_list)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_metrics_configuration_list(try_into_aws(x.metrics_configuration_list)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketsInput { type Target = aws_sdk_s3::operation::list_buckets::ListBucketsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_region: try_from_aws(x.bucket_region)?, -continuation_token: try_from_aws(x.continuation_token)?, -max_buckets: try_from_aws(x.max_buckets)?, -prefix: try_from_aws(x.prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_region(try_into_aws(x.bucket_region)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_max_buckets(try_into_aws(x.max_buckets)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_region: try_from_aws(x.bucket_region)?, + continuation_token: try_from_aws(x.continuation_token)?, + max_buckets: try_from_aws(x.max_buckets)?, + prefix: try_from_aws(x.prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_region(try_into_aws(x.bucket_region)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_max_buckets(try_into_aws(x.max_buckets)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketsOutput { type Target = aws_sdk_s3::operation::list_buckets::ListBucketsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -buckets: try_from_aws(x.buckets)?, -continuation_token: try_from_aws(x.continuation_token)?, -owner: try_from_aws(x.owner)?, -prefix: try_from_aws(x.prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_buckets(try_into_aws(x.buckets)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + buckets: try_from_aws(x.buckets)?, + continuation_token: try_from_aws(x.continuation_token)?, + owner: try_from_aws(x.owner)?, + prefix: try_from_aws(x.prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_buckets(try_into_aws(x.buckets)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListDirectoryBucketsInput { type Target = aws_sdk_s3::operation::list_directory_buckets::ListDirectoryBucketsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -continuation_token: try_from_aws(x.continuation_token)?, -max_directory_buckets: try_from_aws(x.max_directory_buckets)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + continuation_token: try_from_aws(x.continuation_token)?, + max_directory_buckets: try_from_aws(x.max_directory_buckets)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_max_directory_buckets(try_into_aws(x.max_directory_buckets)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_max_directory_buckets(try_into_aws(x.max_directory_buckets)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListDirectoryBucketsOutput { type Target = aws_sdk_s3::operation::list_directory_buckets::ListDirectoryBucketsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -buckets: try_from_aws(x.buckets)?, -continuation_token: try_from_aws(x.continuation_token)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + buckets: try_from_aws(x.buckets)?, + continuation_token: try_from_aws(x.continuation_token)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_buckets(try_into_aws(x.buckets)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_buckets(try_into_aws(x.buckets)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListMultipartUploadsInput { type Target = aws_sdk_s3::operation::list_multipart_uploads::ListMultipartUploadsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key_marker: try_from_aws(x.key_marker)?, -max_uploads: try_from_aws(x.max_uploads)?, -prefix: try_from_aws(x.prefix)?, -request_payer: try_from_aws(x.request_payer)?, -upload_id_marker: try_from_aws(x.upload_id_marker)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key_marker(try_into_aws(x.key_marker)?); -y = y.set_max_uploads(try_into_aws(x.max_uploads)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key_marker: try_from_aws(x.key_marker)?, + max_uploads: try_from_aws(x.max_uploads)?, + prefix: try_from_aws(x.prefix)?, + request_payer: try_from_aws(x.request_payer)?, + upload_id_marker: try_from_aws(x.upload_id_marker)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key_marker(try_into_aws(x.key_marker)?); + y = y.set_max_uploads(try_into_aws(x.max_uploads)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListMultipartUploadsOutput { type Target = aws_sdk_s3::operation::list_multipart_uploads::ListMultipartUploadsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: try_from_aws(x.bucket)?, -common_prefixes: try_from_aws(x.common_prefixes)?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -is_truncated: try_from_aws(x.is_truncated)?, -key_marker: try_from_aws(x.key_marker)?, -max_uploads: try_from_aws(x.max_uploads)?, -next_key_marker: try_from_aws(x.next_key_marker)?, -next_upload_id_marker: try_from_aws(x.next_upload_id_marker)?, -prefix: try_from_aws(x.prefix)?, -request_charged: try_from_aws(x.request_charged)?, -upload_id_marker: try_from_aws(x.upload_id_marker)?, -uploads: try_from_aws(x.uploads)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_key_marker(try_into_aws(x.key_marker)?); -y = y.set_max_uploads(try_into_aws(x.max_uploads)?); -y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); -y = y.set_next_upload_id_marker(try_into_aws(x.next_upload_id_marker)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); -y = y.set_uploads(try_into_aws(x.uploads)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: try_from_aws(x.bucket)?, + common_prefixes: try_from_aws(x.common_prefixes)?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + is_truncated: try_from_aws(x.is_truncated)?, + key_marker: try_from_aws(x.key_marker)?, + max_uploads: try_from_aws(x.max_uploads)?, + next_key_marker: try_from_aws(x.next_key_marker)?, + next_upload_id_marker: try_from_aws(x.next_upload_id_marker)?, + prefix: try_from_aws(x.prefix)?, + request_charged: try_from_aws(x.request_charged)?, + upload_id_marker: try_from_aws(x.upload_id_marker)?, + uploads: try_from_aws(x.uploads)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_key_marker(try_into_aws(x.key_marker)?); + y = y.set_max_uploads(try_into_aws(x.max_uploads)?); + y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); + y = y.set_next_upload_id_marker(try_into_aws(x.next_upload_id_marker)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); + y = y.set_uploads(try_into_aws(x.uploads)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListObjectVersionsInput { type Target = aws_sdk_s3::operation::list_object_versions::ListObjectVersionsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key_marker: try_from_aws(x.key_marker)?, -max_keys: try_from_aws(x.max_keys)?, -optional_object_attributes: try_from_aws(x.optional_object_attributes)?, -prefix: try_from_aws(x.prefix)?, -request_payer: try_from_aws(x.request_payer)?, -version_id_marker: try_from_aws(x.version_id_marker)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key_marker(try_into_aws(x.key_marker)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key_marker: try_from_aws(x.key_marker)?, + max_keys: try_from_aws(x.max_keys)?, + optional_object_attributes: try_from_aws(x.optional_object_attributes)?, + prefix: try_from_aws(x.prefix)?, + request_payer: try_from_aws(x.request_payer)?, + version_id_marker: try_from_aws(x.version_id_marker)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key_marker(try_into_aws(x.key_marker)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListObjectVersionsOutput { type Target = aws_sdk_s3::operation::list_object_versions::ListObjectVersionsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -common_prefixes: try_from_aws(x.common_prefixes)?, -delete_markers: try_from_aws(x.delete_markers)?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -is_truncated: try_from_aws(x.is_truncated)?, -key_marker: try_from_aws(x.key_marker)?, -max_keys: try_from_aws(x.max_keys)?, -name: try_from_aws(x.name)?, -next_key_marker: try_from_aws(x.next_key_marker)?, -next_version_id_marker: try_from_aws(x.next_version_id_marker)?, -prefix: try_from_aws(x.prefix)?, -request_charged: try_from_aws(x.request_charged)?, -version_id_marker: try_from_aws(x.version_id_marker)?, -versions: try_from_aws(x.versions)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); -y = y.set_delete_markers(try_into_aws(x.delete_markers)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_key_marker(try_into_aws(x.key_marker)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); -y = y.set_next_version_id_marker(try_into_aws(x.next_version_id_marker)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); -y = y.set_versions(try_into_aws(x.versions)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + common_prefixes: try_from_aws(x.common_prefixes)?, + delete_markers: try_from_aws(x.delete_markers)?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + is_truncated: try_from_aws(x.is_truncated)?, + key_marker: try_from_aws(x.key_marker)?, + max_keys: try_from_aws(x.max_keys)?, + name: try_from_aws(x.name)?, + next_key_marker: try_from_aws(x.next_key_marker)?, + next_version_id_marker: try_from_aws(x.next_version_id_marker)?, + prefix: try_from_aws(x.prefix)?, + request_charged: try_from_aws(x.request_charged)?, + version_id_marker: try_from_aws(x.version_id_marker)?, + versions: try_from_aws(x.versions)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); + y = y.set_delete_markers(try_into_aws(x.delete_markers)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_key_marker(try_into_aws(x.key_marker)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); + y = y.set_next_version_id_marker(try_into_aws(x.next_version_id_marker)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); + y = y.set_versions(try_into_aws(x.versions)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListObjectsInput { type Target = aws_sdk_s3::operation::list_objects::ListObjectsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -marker: try_from_aws(x.marker)?, -max_keys: try_from_aws(x.max_keys)?, -optional_object_attributes: try_from_aws(x.optional_object_attributes)?, -prefix: try_from_aws(x.prefix)?, -request_payer: try_from_aws(x.request_payer)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_marker(try_into_aws(x.marker)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + marker: try_from_aws(x.marker)?, + max_keys: try_from_aws(x.max_keys)?, + optional_object_attributes: try_from_aws(x.optional_object_attributes)?, + prefix: try_from_aws(x.prefix)?, + request_payer: try_from_aws(x.request_payer)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_marker(try_into_aws(x.marker)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListObjectsOutput { type Target = aws_sdk_s3::operation::list_objects::ListObjectsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -prefix: try_from_aws(x.prefix)?, -marker: try_from_aws(x.marker)?, -max_keys: try_from_aws(x.max_keys)?, -is_truncated: try_from_aws(x.is_truncated)?, -contents: try_from_aws(x.contents)?, -common_prefixes: try_from_aws(x.common_prefixes)?, -delimiter: try_from_aws(x.delimiter)?, -next_marker: try_from_aws(x.next_marker)?, -encoding_type: try_from_aws(x.encoding_type)?, -request_charged: try_from_aws(x.request_charged)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_marker(try_into_aws(x.marker)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_contents(try_into_aws(x.contents)?); -y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_next_marker(try_into_aws(x.next_marker)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + prefix: try_from_aws(x.prefix)?, + marker: try_from_aws(x.marker)?, + max_keys: try_from_aws(x.max_keys)?, + is_truncated: try_from_aws(x.is_truncated)?, + contents: try_from_aws(x.contents)?, + common_prefixes: try_from_aws(x.common_prefixes)?, + delimiter: try_from_aws(x.delimiter)?, + next_marker: try_from_aws(x.next_marker)?, + encoding_type: try_from_aws(x.encoding_type)?, + request_charged: try_from_aws(x.request_charged)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_marker(try_into_aws(x.marker)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_contents(try_into_aws(x.contents)?); + y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_next_marker(try_into_aws(x.next_marker)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListObjectsV2Input { type Target = aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Input; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -fetch_owner: try_from_aws(x.fetch_owner)?, -max_keys: try_from_aws(x.max_keys)?, -optional_object_attributes: try_from_aws(x.optional_object_attributes)?, -prefix: try_from_aws(x.prefix)?, -request_payer: try_from_aws(x.request_payer)?, -start_after: try_from_aws(x.start_after)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_start_after(try_into_aws(x.start_after)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + fetch_owner: try_from_aws(x.fetch_owner)?, + max_keys: try_from_aws(x.max_keys)?, + optional_object_attributes: try_from_aws(x.optional_object_attributes)?, + prefix: try_from_aws(x.prefix)?, + request_payer: try_from_aws(x.request_payer)?, + start_after: try_from_aws(x.start_after)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_start_after(try_into_aws(x.start_after)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListObjectsV2Output { type Target = aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Output; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -prefix: try_from_aws(x.prefix)?, -max_keys: try_from_aws(x.max_keys)?, -key_count: try_from_aws(x.key_count)?, -continuation_token: try_from_aws(x.continuation_token)?, -is_truncated: try_from_aws(x.is_truncated)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -contents: try_from_aws(x.contents)?, -common_prefixes: try_from_aws(x.common_prefixes)?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -start_after: try_from_aws(x.start_after)?, -request_charged: try_from_aws(x.request_charged)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_key_count(try_into_aws(x.key_count)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -y = y.set_contents(try_into_aws(x.contents)?); -y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_start_after(try_into_aws(x.start_after)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + prefix: try_from_aws(x.prefix)?, + max_keys: try_from_aws(x.max_keys)?, + key_count: try_from_aws(x.key_count)?, + continuation_token: try_from_aws(x.continuation_token)?, + is_truncated: try_from_aws(x.is_truncated)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + contents: try_from_aws(x.contents)?, + common_prefixes: try_from_aws(x.common_prefixes)?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + start_after: try_from_aws(x.start_after)?, + request_charged: try_from_aws(x.request_charged)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_key_count(try_into_aws(x.key_count)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + y = y.set_contents(try_into_aws(x.contents)?); + y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_start_after(try_into_aws(x.start_after)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListPartsInput { type Target = aws_sdk_s3::operation::list_parts::ListPartsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -max_parts: try_from_aws(x.max_parts)?, -part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_max_parts(try_into_aws(x.max_parts)?); -y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + max_parts: try_from_aws(x.max_parts)?, + part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_max_parts(try_into_aws(x.max_parts)?); + y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListPartsOutput { type Target = aws_sdk_s3::operation::list_parts::ListPartsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -abort_date: try_from_aws(x.abort_date)?, -abort_rule_id: try_from_aws(x.abort_rule_id)?, -bucket: try_from_aws(x.bucket)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -initiator: try_from_aws(x.initiator)?, -is_truncated: try_from_aws(x.is_truncated)?, -key: try_from_aws(x.key)?, -max_parts: try_from_aws(x.max_parts)?, -next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, -owner: try_from_aws(x.owner)?, -part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, -parts: try_from_aws(x.parts)?, -request_charged: try_from_aws(x.request_charged)?, -storage_class: try_from_aws(x.storage_class)?, -upload_id: try_from_aws(x.upload_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_abort_date(try_into_aws(x.abort_date)?); -y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_initiator(try_into_aws(x.initiator)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_max_parts(try_into_aws(x.max_parts)?); -y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); -y = y.set_parts(try_into_aws(x.parts)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_upload_id(try_into_aws(x.upload_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + abort_date: try_from_aws(x.abort_date)?, + abort_rule_id: try_from_aws(x.abort_rule_id)?, + bucket: try_from_aws(x.bucket)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + initiator: try_from_aws(x.initiator)?, + is_truncated: try_from_aws(x.is_truncated)?, + key: try_from_aws(x.key)?, + max_parts: try_from_aws(x.max_parts)?, + next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, + owner: try_from_aws(x.owner)?, + part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, + parts: try_from_aws(x.parts)?, + request_charged: try_from_aws(x.request_charged)?, + storage_class: try_from_aws(x.storage_class)?, + upload_id: try_from_aws(x.upload_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_abort_date(try_into_aws(x.abort_date)?); + y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_initiator(try_into_aws(x.initiator)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_max_parts(try_into_aws(x.max_parts)?); + y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); + y = y.set_parts(try_into_aws(x.parts)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_upload_id(try_into_aws(x.upload_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::LocationInfo { type Target = aws_sdk_s3::types::LocationInfo; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -type_: try_from_aws(x.r#type)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + type_: try_from_aws(x.r#type)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_type(try_into_aws(x.type_)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_type(try_into_aws(x.type_)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::LocationType { type Target = aws_sdk_s3::types::LocationType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::LocationType::AvailabilityZone => Self::from_static(Self::AVAILABILITY_ZONE), -aws_sdk_s3::types::LocationType::LocalZone => Self::from_static(Self::LOCAL_ZONE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::LocationType::AvailabilityZone => Self::from_static(Self::AVAILABILITY_ZONE), + aws_sdk_s3::types::LocationType::LocalZone => Self::from_static(Self::LOCAL_ZONE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::LocationType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::LocationType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::LoggingEnabled { type Target = aws_sdk_s3::types::LoggingEnabled; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -target_bucket: try_from_aws(x.target_bucket)?, -target_grants: try_from_aws(x.target_grants)?, -target_object_key_format: try_from_aws(x.target_object_key_format)?, -target_prefix: try_from_aws(x.target_prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_target_bucket(Some(try_into_aws(x.target_bucket)?)); -y = y.set_target_grants(try_into_aws(x.target_grants)?); -y = y.set_target_object_key_format(try_into_aws(x.target_object_key_format)?); -y = y.set_target_prefix(Some(try_into_aws(x.target_prefix)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + target_bucket: try_from_aws(x.target_bucket)?, + target_grants: try_from_aws(x.target_grants)?, + target_object_key_format: try_from_aws(x.target_object_key_format)?, + target_prefix: try_from_aws(x.target_prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_target_bucket(Some(try_into_aws(x.target_bucket)?)); + y = y.set_target_grants(try_into_aws(x.target_grants)?); + y = y.set_target_object_key_format(try_into_aws(x.target_object_key_format)?); + y = y.set_target_prefix(Some(try_into_aws(x.target_prefix)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::MFADelete { type Target = aws_sdk_s3::types::MfaDelete; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MfaDelete::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::MfaDelete::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MfaDelete::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::MfaDelete::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::MfaDelete::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::MfaDelete::from(x.as_str())) + } } impl AwsConversion for s3s::dto::MFADeleteStatus { type Target = aws_sdk_s3::types::MfaDeleteStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MfaDeleteStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::MfaDeleteStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MfaDeleteStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::MfaDeleteStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::MfaDeleteStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::MfaDeleteStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::MetadataDirective { type Target = aws_sdk_s3::types::MetadataDirective; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MetadataDirective::Copy => Self::from_static(Self::COPY), -aws_sdk_s3::types::MetadataDirective::Replace => Self::from_static(Self::REPLACE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MetadataDirective::Copy => Self::from_static(Self::COPY), + aws_sdk_s3::types::MetadataDirective::Replace => Self::from_static(Self::REPLACE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::MetadataDirective::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::MetadataDirective::from(x.as_str())) + } } impl AwsConversion for s3s::dto::MetadataEntry { type Target = aws_sdk_s3::types::MetadataEntry; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -value: try_from_aws(x.value)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + value: try_from_aws(x.value)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_value(try_into_aws(x.value)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_value(try_into_aws(x.value)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::MetadataTableConfiguration { type Target = aws_sdk_s3::types::MetadataTableConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3_tables_destination: unwrap_from_aws(x.s3_tables_destination, "s3_tables_destination")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + s3_tables_destination: unwrap_from_aws(x.s3_tables_destination, "s3_tables_destination")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3_tables_destination(Some(try_into_aws(x.s3_tables_destination)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3_tables_destination(Some(try_into_aws(x.s3_tables_destination)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::MetadataTableConfigurationResult { type Target = aws_sdk_s3::types::MetadataTableConfigurationResult; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3_tables_destination_result: unwrap_from_aws(x.s3_tables_destination_result, "s3_tables_destination_result")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + s3_tables_destination_result: unwrap_from_aws(x.s3_tables_destination_result, "s3_tables_destination_result")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3_tables_destination_result(Some(try_into_aws(x.s3_tables_destination_result)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3_tables_destination_result(Some(try_into_aws(x.s3_tables_destination_result)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Metrics { type Target = aws_sdk_s3::types::Metrics; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -event_threshold: try_from_aws(x.event_threshold)?, -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + event_threshold: try_from_aws(x.event_threshold)?, + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_event_threshold(try_into_aws(x.event_threshold)?); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_event_threshold(try_into_aws(x.event_threshold)?); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::MetricsAndOperator { type Target = aws_sdk_s3::types::MetricsAndOperator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_point_arn: try_from_aws(x.access_point_arn)?, -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_point_arn: try_from_aws(x.access_point_arn)?, + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_point_arn(try_into_aws(x.access_point_arn)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_point_arn(try_into_aws(x.access_point_arn)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::MetricsConfiguration { type Target = aws_sdk_s3::types::MetricsConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::MetricsFilter { type Target = aws_sdk_s3::types::MetricsFilter; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MetricsFilter::AccessPointArn(v) => Self::AccessPointArn(try_from_aws(v)?), -aws_sdk_s3::types::MetricsFilter::And(v) => Self::And(try_from_aws(v)?), -aws_sdk_s3::types::MetricsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), -aws_sdk_s3::types::MetricsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), -_ => unimplemented!("unknown variant of aws_sdk_s3::types::MetricsFilter: {x:?}"), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(match x { -Self::AccessPointArn(v) => aws_sdk_s3::types::MetricsFilter::AccessPointArn(try_into_aws(v)?), -Self::And(v) => aws_sdk_s3::types::MetricsFilter::And(try_into_aws(v)?), -Self::Prefix(v) => aws_sdk_s3::types::MetricsFilter::Prefix(try_into_aws(v)?), -Self::Tag(v) => aws_sdk_s3::types::MetricsFilter::Tag(try_into_aws(v)?), -_ => unimplemented!("unknown variant of MetricsFilter: {x:?}"), -}) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MetricsFilter::AccessPointArn(v) => Self::AccessPointArn(try_from_aws(v)?), + aws_sdk_s3::types::MetricsFilter::And(v) => Self::And(try_from_aws(v)?), + aws_sdk_s3::types::MetricsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), + aws_sdk_s3::types::MetricsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), + _ => unimplemented!("unknown variant of aws_sdk_s3::types::MetricsFilter: {x:?}"), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(match x { + Self::AccessPointArn(v) => aws_sdk_s3::types::MetricsFilter::AccessPointArn(try_into_aws(v)?), + Self::And(v) => aws_sdk_s3::types::MetricsFilter::And(try_into_aws(v)?), + Self::Prefix(v) => aws_sdk_s3::types::MetricsFilter::Prefix(try_into_aws(v)?), + Self::Tag(v) => aws_sdk_s3::types::MetricsFilter::Tag(try_into_aws(v)?), + _ => unimplemented!("unknown variant of MetricsFilter: {x:?}"), + }) + } } impl AwsConversion for s3s::dto::MetricsStatus { type Target = aws_sdk_s3::types::MetricsStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MetricsStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::MetricsStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MetricsStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::MetricsStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::MetricsStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::MetricsStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::MultipartUpload { type Target = aws_sdk_s3::types::MultipartUpload; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -initiated: try_from_aws(x.initiated)?, -initiator: try_from_aws(x.initiator)?, -key: try_from_aws(x.key)?, -owner: try_from_aws(x.owner)?, -storage_class: try_from_aws(x.storage_class)?, -upload_id: try_from_aws(x.upload_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_initiated(try_into_aws(x.initiated)?); -y = y.set_initiator(try_into_aws(x.initiator)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_upload_id(try_into_aws(x.upload_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + initiated: try_from_aws(x.initiated)?, + initiator: try_from_aws(x.initiator)?, + key: try_from_aws(x.key)?, + owner: try_from_aws(x.owner)?, + storage_class: try_from_aws(x.storage_class)?, + upload_id: try_from_aws(x.upload_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_initiated(try_into_aws(x.initiated)?); + y = y.set_initiator(try_into_aws(x.initiator)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_upload_id(try_into_aws(x.upload_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoSuchBucket { type Target = aws_sdk_s3::types::error::NoSuchBucket; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoSuchKey { type Target = aws_sdk_s3::types::error::NoSuchKey; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoSuchUpload { type Target = aws_sdk_s3::types::error::NoSuchUpload; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoncurrentVersionExpiration { type Target = aws_sdk_s3::types::NoncurrentVersionExpiration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, -noncurrent_days: try_from_aws(x.noncurrent_days)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, + noncurrent_days: try_from_aws(x.noncurrent_days)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); -y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); + y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoncurrentVersionTransition { type Target = aws_sdk_s3::types::NoncurrentVersionTransition; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, -noncurrent_days: try_from_aws(x.noncurrent_days)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, + noncurrent_days: try_from_aws(x.noncurrent_days)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); -y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); + y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NotFound { type Target = aws_sdk_s3::types::error::NotFound; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NotificationConfiguration { type Target = aws_sdk_s3::types::NotificationConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, -lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, -queue_configurations: try_from_aws(x.queue_configurations)?, -topic_configurations: try_from_aws(x.topic_configurations)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); -y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); -y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); -y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, + lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, + queue_configurations: try_from_aws(x.queue_configurations)?, + topic_configurations: try_from_aws(x.topic_configurations)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); + y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); + y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); + y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NotificationConfigurationFilter { type Target = aws_sdk_s3::types::NotificationConfigurationFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -key: try_from_aws(x.key)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + key: try_from_aws(x.key)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_key(try_into_aws(x.key)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_key(try_into_aws(x.key)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Object { type Target = aws_sdk_s3::types::Object; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -key: try_from_aws(x.key)?, -last_modified: try_from_aws(x.last_modified)?, -owner: try_from_aws(x.owner)?, -restore_status: try_from_aws(x.restore_status)?, -size: try_from_aws(x.size)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_restore_status(try_into_aws(x.restore_status)?); -y = y.set_size(try_into_aws(x.size)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + key: try_from_aws(x.key)?, + last_modified: try_from_aws(x.last_modified)?, + owner: try_from_aws(x.owner)?, + restore_status: try_from_aws(x.restore_status)?, + size: try_from_aws(x.size)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_restore_status(try_into_aws(x.restore_status)?); + y = y.set_size(try_into_aws(x.size)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectAlreadyInActiveTierError { type Target = aws_sdk_s3::types::error::ObjectAlreadyInActiveTierError; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectAttributes { type Target = aws_sdk_s3::types::ObjectAttributes; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectAttributes::Checksum => Self::from_static(Self::CHECKSUM), -aws_sdk_s3::types::ObjectAttributes::Etag => Self::from_static(Self::ETAG), -aws_sdk_s3::types::ObjectAttributes::ObjectParts => Self::from_static(Self::OBJECT_PARTS), -aws_sdk_s3::types::ObjectAttributes::ObjectSize => Self::from_static(Self::OBJECT_SIZE), -aws_sdk_s3::types::ObjectAttributes::StorageClass => Self::from_static(Self::STORAGE_CLASS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectAttributes::Checksum => Self::from_static(Self::CHECKSUM), + aws_sdk_s3::types::ObjectAttributes::Etag => Self::from_static(Self::ETAG), + aws_sdk_s3::types::ObjectAttributes::ObjectParts => Self::from_static(Self::OBJECT_PARTS), + aws_sdk_s3::types::ObjectAttributes::ObjectSize => Self::from_static(Self::OBJECT_SIZE), + aws_sdk_s3::types::ObjectAttributes::StorageClass => Self::from_static(Self::STORAGE_CLASS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectAttributes::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectAttributes::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectCannedACL { type Target = aws_sdk_s3::types::ObjectCannedAcl; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), -aws_sdk_s3::types::ObjectCannedAcl::AwsExecRead => Self::from_static(Self::AWS_EXEC_READ), -aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerFullControl => Self::from_static(Self::BUCKET_OWNER_FULL_CONTROL), -aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerRead => Self::from_static(Self::BUCKET_OWNER_READ), -aws_sdk_s3::types::ObjectCannedAcl::Private => Self::from_static(Self::PRIVATE), -aws_sdk_s3::types::ObjectCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), -aws_sdk_s3::types::ObjectCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectCannedAcl::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), + aws_sdk_s3::types::ObjectCannedAcl::AwsExecRead => Self::from_static(Self::AWS_EXEC_READ), + aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerFullControl => Self::from_static(Self::BUCKET_OWNER_FULL_CONTROL), + aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerRead => Self::from_static(Self::BUCKET_OWNER_READ), + aws_sdk_s3::types::ObjectCannedAcl::Private => Self::from_static(Self::PRIVATE), + aws_sdk_s3::types::ObjectCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), + aws_sdk_s3::types::ObjectCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectCannedAcl::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectIdentifier { type Target = aws_sdk_s3::types::ObjectIdentifier; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -e_tag: try_from_aws(x.e_tag)?, -key: try_from_aws(x.key)?, -last_modified_time: try_from_aws(x.last_modified_time)?, -size: try_from_aws(x.size)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_last_modified_time(try_into_aws(x.last_modified_time)?); -y = y.set_size(try_into_aws(x.size)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + e_tag: try_from_aws(x.e_tag)?, + key: try_from_aws(x.key)?, + last_modified_time: try_from_aws(x.last_modified_time)?, + size: try_from_aws(x.size)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_last_modified_time(try_into_aws(x.last_modified_time)?); + y = y.set_size(try_into_aws(x.size)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ObjectLockConfiguration { type Target = aws_sdk_s3::types::ObjectLockConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -object_lock_enabled: try_from_aws(x.object_lock_enabled)?, -rule: try_from_aws(x.rule)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + object_lock_enabled: try_from_aws(x.object_lock_enabled)?, + rule: try_from_aws(x.rule)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_object_lock_enabled(try_into_aws(x.object_lock_enabled)?); -y = y.set_rule(try_into_aws(x.rule)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_object_lock_enabled(try_into_aws(x.object_lock_enabled)?); + y = y.set_rule(try_into_aws(x.rule)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectLockEnabled { type Target = aws_sdk_s3::types::ObjectLockEnabled; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectLockEnabled::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectLockEnabled::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectLockEnabled::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectLockEnabled::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectLockLegalHold { type Target = aws_sdk_s3::types::ObjectLockLegalHold; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectLockLegalHoldStatus { type Target = aws_sdk_s3::types::ObjectLockLegalHoldStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectLockLegalHoldStatus::Off => Self::from_static(Self::OFF), -aws_sdk_s3::types::ObjectLockLegalHoldStatus::On => Self::from_static(Self::ON), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectLockLegalHoldStatus::Off => Self::from_static(Self::OFF), + aws_sdk_s3::types::ObjectLockLegalHoldStatus::On => Self::from_static(Self::ON), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectLockLegalHoldStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectLockLegalHoldStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectLockMode { type Target = aws_sdk_s3::types::ObjectLockMode; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectLockMode::Compliance => Self::from_static(Self::COMPLIANCE), -aws_sdk_s3::types::ObjectLockMode::Governance => Self::from_static(Self::GOVERNANCE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectLockMode::Compliance => Self::from_static(Self::COMPLIANCE), + aws_sdk_s3::types::ObjectLockMode::Governance => Self::from_static(Self::GOVERNANCE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectLockMode::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectLockMode::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectLockRetention { type Target = aws_sdk_s3::types::ObjectLockRetention; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -mode: try_from_aws(x.mode)?, -retain_until_date: try_from_aws(x.retain_until_date)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + mode: try_from_aws(x.mode)?, + retain_until_date: try_from_aws(x.retain_until_date)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_mode(try_into_aws(x.mode)?); -y = y.set_retain_until_date(try_into_aws(x.retain_until_date)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_mode(try_into_aws(x.mode)?); + y = y.set_retain_until_date(try_into_aws(x.retain_until_date)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectLockRetentionMode { type Target = aws_sdk_s3::types::ObjectLockRetentionMode; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectLockRetentionMode::Compliance => Self::from_static(Self::COMPLIANCE), -aws_sdk_s3::types::ObjectLockRetentionMode::Governance => Self::from_static(Self::GOVERNANCE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectLockRetentionMode::Compliance => Self::from_static(Self::COMPLIANCE), + aws_sdk_s3::types::ObjectLockRetentionMode::Governance => Self::from_static(Self::GOVERNANCE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectLockRetentionMode::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectLockRetentionMode::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectLockRule { type Target = aws_sdk_s3::types::ObjectLockRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -default_retention: try_from_aws(x.default_retention)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + default_retention: try_from_aws(x.default_retention)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_default_retention(try_into_aws(x.default_retention)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_default_retention(try_into_aws(x.default_retention)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectNotInActiveTierError { type Target = aws_sdk_s3::types::error::ObjectNotInActiveTierError; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectOwnership { type Target = aws_sdk_s3::types::ObjectOwnership; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectOwnership::BucketOwnerEnforced => Self::from_static(Self::BUCKET_OWNER_ENFORCED), -aws_sdk_s3::types::ObjectOwnership::BucketOwnerPreferred => Self::from_static(Self::BUCKET_OWNER_PREFERRED), -aws_sdk_s3::types::ObjectOwnership::ObjectWriter => Self::from_static(Self::OBJECT_WRITER), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectOwnership::BucketOwnerEnforced => Self::from_static(Self::BUCKET_OWNER_ENFORCED), + aws_sdk_s3::types::ObjectOwnership::BucketOwnerPreferred => Self::from_static(Self::BUCKET_OWNER_PREFERRED), + aws_sdk_s3::types::ObjectOwnership::ObjectWriter => Self::from_static(Self::OBJECT_WRITER), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectOwnership::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectOwnership::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectPart { type Target = aws_sdk_s3::types::ObjectPart; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -part_number: try_from_aws(x.part_number)?, -size: try_from_aws(x.size)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_part_number(try_into_aws(x.part_number)?); -y = y.set_size(try_into_aws(x.size)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + part_number: try_from_aws(x.part_number)?, + size: try_from_aws(x.size)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_part_number(try_into_aws(x.part_number)?); + y = y.set_size(try_into_aws(x.size)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectStorageClass { type Target = aws_sdk_s3::types::ObjectStorageClass; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), -aws_sdk_s3::types::ObjectStorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), -aws_sdk_s3::types::ObjectStorageClass::Glacier => Self::from_static(Self::GLACIER), -aws_sdk_s3::types::ObjectStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), -aws_sdk_s3::types::ObjectStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), -aws_sdk_s3::types::ObjectStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), -aws_sdk_s3::types::ObjectStorageClass::Outposts => Self::from_static(Self::OUTPOSTS), -aws_sdk_s3::types::ObjectStorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), -aws_sdk_s3::types::ObjectStorageClass::Snow => Self::from_static(Self::SNOW), -aws_sdk_s3::types::ObjectStorageClass::Standard => Self::from_static(Self::STANDARD), -aws_sdk_s3::types::ObjectStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectStorageClass::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), + aws_sdk_s3::types::ObjectStorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), + aws_sdk_s3::types::ObjectStorageClass::Glacier => Self::from_static(Self::GLACIER), + aws_sdk_s3::types::ObjectStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), + aws_sdk_s3::types::ObjectStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), + aws_sdk_s3::types::ObjectStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), + aws_sdk_s3::types::ObjectStorageClass::Outposts => Self::from_static(Self::OUTPOSTS), + aws_sdk_s3::types::ObjectStorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), + aws_sdk_s3::types::ObjectStorageClass::Snow => Self::from_static(Self::SNOW), + aws_sdk_s3::types::ObjectStorageClass::Standard => Self::from_static(Self::STANDARD), + aws_sdk_s3::types::ObjectStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectStorageClass::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectVersion { type Target = aws_sdk_s3::types::ObjectVersion; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -is_latest: try_from_aws(x.is_latest)?, -key: try_from_aws(x.key)?, -last_modified: try_from_aws(x.last_modified)?, -owner: try_from_aws(x.owner)?, -restore_status: try_from_aws(x.restore_status)?, -size: try_from_aws(x.size)?, -storage_class: try_from_aws(x.storage_class)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_is_latest(try_into_aws(x.is_latest)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_restore_status(try_into_aws(x.restore_status)?); -y = y.set_size(try_into_aws(x.size)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + is_latest: try_from_aws(x.is_latest)?, + key: try_from_aws(x.key)?, + last_modified: try_from_aws(x.last_modified)?, + owner: try_from_aws(x.owner)?, + restore_status: try_from_aws(x.restore_status)?, + size: try_from_aws(x.size)?, + storage_class: try_from_aws(x.storage_class)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_is_latest(try_into_aws(x.is_latest)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_restore_status(try_into_aws(x.restore_status)?); + y = y.set_size(try_into_aws(x.size)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectVersionStorageClass { type Target = aws_sdk_s3::types::ObjectVersionStorageClass; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectVersionStorageClass::Standard => Self::from_static(Self::STANDARD), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectVersionStorageClass::Standard => Self::from_static(Self::STANDARD), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectVersionStorageClass::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectVersionStorageClass::from(x.as_str())) + } } impl AwsConversion for s3s::dto::OptionalObjectAttributes { type Target = aws_sdk_s3::types::OptionalObjectAttributes; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::OptionalObjectAttributes::RestoreStatus => Self::from_static(Self::RESTORE_STATUS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::OptionalObjectAttributes::RestoreStatus => Self::from_static(Self::RESTORE_STATUS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::OptionalObjectAttributes::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::OptionalObjectAttributes::from(x.as_str())) + } } impl AwsConversion for s3s::dto::OutputLocation { type Target = aws_sdk_s3::types::OutputLocation; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3: try_from_aws(x.s3)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { s3: try_from_aws(x.s3)? }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3(try_into_aws(x.s3)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3(try_into_aws(x.s3)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::OutputSerialization { type Target = aws_sdk_s3::types::OutputSerialization; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -csv: try_from_aws(x.csv)?, -json: try_from_aws(x.json)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + csv: try_from_aws(x.csv)?, + json: try_from_aws(x.json)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_csv(try_into_aws(x.csv)?); -y = y.set_json(try_into_aws(x.json)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_csv(try_into_aws(x.csv)?); + y = y.set_json(try_into_aws(x.json)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Owner { type Target = aws_sdk_s3::types::Owner; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -display_name: try_from_aws(x.display_name)?, -id: try_from_aws(x.id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + display_name: try_from_aws(x.display_name)?, + id: try_from_aws(x.id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_display_name(try_into_aws(x.display_name)?); -y = y.set_id(try_into_aws(x.id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_display_name(try_into_aws(x.display_name)?); + y = y.set_id(try_into_aws(x.id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::OwnerOverride { type Target = aws_sdk_s3::types::OwnerOverride; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::OwnerOverride::Destination => Self::from_static(Self::DESTINATION), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::OwnerOverride::Destination => Self::from_static(Self::DESTINATION), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::OwnerOverride::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::OwnerOverride::from(x.as_str())) + } } impl AwsConversion for s3s::dto::OwnershipControls { type Target = aws_sdk_s3::types::OwnershipControls; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -rules: try_from_aws(x.rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + rules: try_from_aws(x.rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_rules(Some(try_into_aws(x.rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_rules(Some(try_into_aws(x.rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::OwnershipControlsRule { type Target = aws_sdk_s3::types::OwnershipControlsRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -object_ownership: try_from_aws(x.object_ownership)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + object_ownership: try_from_aws(x.object_ownership)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_object_ownership(Some(try_into_aws(x.object_ownership)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_object_ownership(Some(try_into_aws(x.object_ownership)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ParquetInput { type Target = aws_sdk_s3::types::ParquetInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Part { type Target = aws_sdk_s3::types::Part; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -e_tag: try_from_aws(x.e_tag)?, -last_modified: try_from_aws(x.last_modified)?, -part_number: try_from_aws(x.part_number)?, -size: try_from_aws(x.size)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_part_number(try_into_aws(x.part_number)?); -y = y.set_size(try_into_aws(x.size)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + e_tag: try_from_aws(x.e_tag)?, + last_modified: try_from_aws(x.last_modified)?, + part_number: try_from_aws(x.part_number)?, + size: try_from_aws(x.size)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_part_number(try_into_aws(x.part_number)?); + y = y.set_size(try_into_aws(x.size)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PartitionDateSource { type Target = aws_sdk_s3::types::PartitionDateSource; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::PartitionDateSource::DeliveryTime => Self::from_static(Self::DELIVERY_TIME), -aws_sdk_s3::types::PartitionDateSource::EventTime => Self::from_static(Self::EVENT_TIME), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::PartitionDateSource::DeliveryTime => Self::from_static(Self::DELIVERY_TIME), + aws_sdk_s3::types::PartitionDateSource::EventTime => Self::from_static(Self::EVENT_TIME), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::PartitionDateSource::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::PartitionDateSource::from(x.as_str())) + } } impl AwsConversion for s3s::dto::PartitionedPrefix { type Target = aws_sdk_s3::types::PartitionedPrefix; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -partition_date_source: try_from_aws(x.partition_date_source)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + partition_date_source: try_from_aws(x.partition_date_source)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_partition_date_source(try_into_aws(x.partition_date_source)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_partition_date_source(try_into_aws(x.partition_date_source)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Payer { type Target = aws_sdk_s3::types::Payer; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Payer::BucketOwner => Self::from_static(Self::BUCKET_OWNER), -aws_sdk_s3::types::Payer::Requester => Self::from_static(Self::REQUESTER), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Payer::BucketOwner => Self::from_static(Self::BUCKET_OWNER), + aws_sdk_s3::types::Payer::Requester => Self::from_static(Self::REQUESTER), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Payer::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Payer::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Permission { type Target = aws_sdk_s3::types::Permission; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Permission::FullControl => Self::from_static(Self::FULL_CONTROL), -aws_sdk_s3::types::Permission::Read => Self::from_static(Self::READ), -aws_sdk_s3::types::Permission::ReadAcp => Self::from_static(Self::READ_ACP), -aws_sdk_s3::types::Permission::Write => Self::from_static(Self::WRITE), -aws_sdk_s3::types::Permission::WriteAcp => Self::from_static(Self::WRITE_ACP), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Permission::FullControl => Self::from_static(Self::FULL_CONTROL), + aws_sdk_s3::types::Permission::Read => Self::from_static(Self::READ), + aws_sdk_s3::types::Permission::ReadAcp => Self::from_static(Self::READ_ACP), + aws_sdk_s3::types::Permission::Write => Self::from_static(Self::WRITE), + aws_sdk_s3::types::Permission::WriteAcp => Self::from_static(Self::WRITE_ACP), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Permission::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Permission::from(x.as_str())) + } } impl AwsConversion for s3s::dto::PolicyStatus { type Target = aws_sdk_s3::types::PolicyStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -is_public: try_from_aws(x.is_public)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + is_public: try_from_aws(x.is_public)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_is_public(try_into_aws(x.is_public)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_is_public(try_into_aws(x.is_public)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Progress { type Target = aws_sdk_s3::types::Progress; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bytes_processed: try_from_aws(x.bytes_processed)?, -bytes_returned: try_from_aws(x.bytes_returned)?, -bytes_scanned: try_from_aws(x.bytes_scanned)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bytes_processed: try_from_aws(x.bytes_processed)?, + bytes_returned: try_from_aws(x.bytes_returned)?, + bytes_scanned: try_from_aws(x.bytes_scanned)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); -y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); -y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); + y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); + y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ProgressEvent { type Target = aws_sdk_s3::types::ProgressEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -details: try_from_aws(x.details)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + details: try_from_aws(x.details)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_details(try_into_aws(x.details)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_details(try_into_aws(x.details)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Protocol { type Target = aws_sdk_s3::types::Protocol; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Protocol::Http => Self::from_static(Self::HTTP), -aws_sdk_s3::types::Protocol::Https => Self::from_static(Self::HTTPS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Protocol::Http => Self::from_static(Self::HTTP), + aws_sdk_s3::types::Protocol::Https => Self::from_static(Self::HTTPS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Protocol::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Protocol::from(x.as_str())) + } } impl AwsConversion for s3s::dto::PublicAccessBlockConfiguration { type Target = aws_sdk_s3::types::PublicAccessBlockConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -block_public_acls: try_from_aws(x.block_public_acls)?, -block_public_policy: try_from_aws(x.block_public_policy)?, -ignore_public_acls: try_from_aws(x.ignore_public_acls)?, -restrict_public_buckets: try_from_aws(x.restrict_public_buckets)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_block_public_acls(try_into_aws(x.block_public_acls)?); -y = y.set_block_public_policy(try_into_aws(x.block_public_policy)?); -y = y.set_ignore_public_acls(try_into_aws(x.ignore_public_acls)?); -y = y.set_restrict_public_buckets(try_into_aws(x.restrict_public_buckets)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + block_public_acls: try_from_aws(x.block_public_acls)?, + block_public_policy: try_from_aws(x.block_public_policy)?, + ignore_public_acls: try_from_aws(x.ignore_public_acls)?, + restrict_public_buckets: try_from_aws(x.restrict_public_buckets)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_block_public_acls(try_into_aws(x.block_public_acls)?); + y = y.set_block_public_policy(try_into_aws(x.block_public_policy)?); + y = y.set_ignore_public_acls(try_into_aws(x.ignore_public_acls)?); + y = y.set_restrict_public_buckets(try_into_aws(x.restrict_public_buckets)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketAccelerateConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -accelerate_configuration: unwrap_from_aws(x.accelerate_configuration, "accelerate_configuration")?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_accelerate_configuration(Some(try_into_aws(x.accelerate_configuration)?)); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + accelerate_configuration: unwrap_from_aws(x.accelerate_configuration, "accelerate_configuration")?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_accelerate_configuration(Some(try_into_aws(x.accelerate_configuration)?)); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketAccelerateConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketAclInput { type Target = aws_sdk_s3::operation::put_bucket_acl::PutBucketAclInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -access_control_policy: try_from_aws(x.access_control_policy)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write: try_from_aws(x.grant_write)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write(try_into_aws(x.grant_write)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + access_control_policy: try_from_aws(x.access_control_policy)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write: try_from_aws(x.grant_write)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write(try_into_aws(x.grant_write)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketAclOutput { type Target = aws_sdk_s3::operation::put_bucket_acl::PutBucketAclOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -analytics_configuration: unwrap_from_aws(x.analytics_configuration, "analytics_configuration")?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_analytics_configuration(Some(try_into_aws(x.analytics_configuration)?)); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + analytics_configuration: unwrap_from_aws(x.analytics_configuration, "analytics_configuration")?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_analytics_configuration(Some(try_into_aws(x.analytics_configuration)?)); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketCorsInput { type Target = aws_sdk_s3::operation::put_bucket_cors::PutBucketCorsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -cors_configuration: unwrap_from_aws(x.cors_configuration, "cors_configuration")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_cors_configuration(Some(try_into_aws(x.cors_configuration)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + cors_configuration: unwrap_from_aws(x.cors_configuration, "cors_configuration")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_cors_configuration(Some(try_into_aws(x.cors_configuration)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketCorsOutput { type Target = aws_sdk_s3::operation::put_bucket_cors::PutBucketCorsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketEncryptionInput { type Target = aws_sdk_s3::operation::put_bucket_encryption::PutBucketEncryptionInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -server_side_encryption_configuration: unwrap_from_aws(x.server_side_encryption_configuration, "server_side_encryption_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_server_side_encryption_configuration(Some(try_into_aws(x.server_side_encryption_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + server_side_encryption_configuration: unwrap_from_aws( + x.server_side_encryption_configuration, + "server_side_encryption_configuration", + )?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_server_side_encryption_configuration(Some(try_into_aws(x.server_side_encryption_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketEncryptionOutput { type Target = aws_sdk_s3::operation::put_bucket_encryption::PutBucketEncryptionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketIntelligentTieringConfigurationInput { - type Target = aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -id: unwrap_from_aws(x.id, "id")?, -intelligent_tiering_configuration: unwrap_from_aws(x.intelligent_tiering_configuration, "intelligent_tiering_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_intelligent_tiering_configuration(Some(try_into_aws(x.intelligent_tiering_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Target = + aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationInput; + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + id: unwrap_from_aws(x.id, "id")?, + intelligent_tiering_configuration: unwrap_from_aws( + x.intelligent_tiering_configuration, + "intelligent_tiering_configuration", + )?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_intelligent_tiering_configuration(Some(try_into_aws(x.intelligent_tiering_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketIntelligentTieringConfigurationOutput { - type Target = aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationOutput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationOutput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } -impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationInput { - type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -inventory_configuration: unwrap_from_aws(x.inventory_configuration, "inventory_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_inventory_configuration(Some(try_into_aws(x.inventory_configuration)?)); -y.build().map_err(S3Error::internal_error) -} +impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationInput { + type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationInput; + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + inventory_configuration: unwrap_from_aws(x.inventory_configuration, "inventory_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_inventory_configuration(Some(try_into_aws(x.inventory_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketLifecycleConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -lifecycle_configuration: try_from_aws(x.lifecycle_configuration)?, -transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_lifecycle_configuration(try_into_aws(x.lifecycle_configuration)?); -y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + lifecycle_configuration: try_from_aws(x.lifecycle_configuration)?, + transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_lifecycle_configuration(try_into_aws(x.lifecycle_configuration)?); + y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketLifecycleConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketLoggingInput { type Target = aws_sdk_s3::operation::put_bucket_logging::PutBucketLoggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_logging_status: unwrap_from_aws(x.bucket_logging_status, "bucket_logging_status")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_logging_status(Some(try_into_aws(x.bucket_logging_status)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_logging_status: unwrap_from_aws(x.bucket_logging_status, "bucket_logging_status")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_logging_status(Some(try_into_aws(x.bucket_logging_status)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketLoggingOutput { type Target = aws_sdk_s3::operation::put_bucket_logging::PutBucketLoggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -metrics_configuration: unwrap_from_aws(x.metrics_configuration, "metrics_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_metrics_configuration(Some(try_into_aws(x.metrics_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + metrics_configuration: unwrap_from_aws(x.metrics_configuration, "metrics_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_metrics_configuration(Some(try_into_aws(x.metrics_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketNotificationConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_notification_configuration::PutBucketNotificationConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -notification_configuration: unwrap_from_aws(x.notification_configuration, "notification_configuration")?, -skip_destination_validation: try_from_aws(x.skip_destination_validation)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_notification_configuration(Some(try_into_aws(x.notification_configuration)?)); -y = y.set_skip_destination_validation(try_into_aws(x.skip_destination_validation)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + notification_configuration: unwrap_from_aws(x.notification_configuration, "notification_configuration")?, + skip_destination_validation: try_from_aws(x.skip_destination_validation)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_notification_configuration(Some(try_into_aws(x.notification_configuration)?)); + y = y.set_skip_destination_validation(try_into_aws(x.skip_destination_validation)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketNotificationConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_notification_configuration::PutBucketNotificationConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -ownership_controls: unwrap_from_aws(x.ownership_controls, "ownership_controls")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_ownership_controls(Some(try_into_aws(x.ownership_controls)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + ownership_controls: unwrap_from_aws(x.ownership_controls, "ownership_controls")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_ownership_controls(Some(try_into_aws(x.ownership_controls)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketPolicyInput { type Target = aws_sdk_s3::operation::put_bucket_policy::PutBucketPolicyInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -confirm_remove_self_bucket_access: try_from_aws(x.confirm_remove_self_bucket_access)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -policy: unwrap_from_aws(x.policy, "policy")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_confirm_remove_self_bucket_access(try_into_aws(x.confirm_remove_self_bucket_access)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_policy(Some(try_into_aws(x.policy)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + confirm_remove_self_bucket_access: try_from_aws(x.confirm_remove_self_bucket_access)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + policy: unwrap_from_aws(x.policy, "policy")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_confirm_remove_self_bucket_access(try_into_aws(x.confirm_remove_self_bucket_access)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_policy(Some(try_into_aws(x.policy)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketPolicyOutput { type Target = aws_sdk_s3::operation::put_bucket_policy::PutBucketPolicyOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketReplicationInput { type Target = aws_sdk_s3::operation::put_bucket_replication::PutBucketReplicationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -replication_configuration: unwrap_from_aws(x.replication_configuration, "replication_configuration")?, -token: try_from_aws(x.token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_replication_configuration(Some(try_into_aws(x.replication_configuration)?)); -y = y.set_token(try_into_aws(x.token)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + replication_configuration: unwrap_from_aws(x.replication_configuration, "replication_configuration")?, + token: try_from_aws(x.token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_replication_configuration(Some(try_into_aws(x.replication_configuration)?)); + y = y.set_token(try_into_aws(x.token)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketReplicationOutput { type Target = aws_sdk_s3::operation::put_bucket_replication::PutBucketReplicationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketRequestPaymentInput { type Target = aws_sdk_s3::operation::put_bucket_request_payment::PutBucketRequestPaymentInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -request_payment_configuration: unwrap_from_aws(x.request_payment_configuration, "request_payment_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_request_payment_configuration(Some(try_into_aws(x.request_payment_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + request_payment_configuration: unwrap_from_aws(x.request_payment_configuration, "request_payment_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_request_payment_configuration(Some(try_into_aws(x.request_payment_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketRequestPaymentOutput { type Target = aws_sdk_s3::operation::put_bucket_request_payment::PutBucketRequestPaymentOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketTaggingInput { type Target = aws_sdk_s3::operation::put_bucket_tagging::PutBucketTaggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -tagging: unwrap_from_aws(x.tagging, "tagging")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_tagging(Some(try_into_aws(x.tagging)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + tagging: unwrap_from_aws(x.tagging, "tagging")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_tagging(Some(try_into_aws(x.tagging)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketTaggingOutput { type Target = aws_sdk_s3::operation::put_bucket_tagging::PutBucketTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketVersioningInput { type Target = aws_sdk_s3::operation::put_bucket_versioning::PutBucketVersioningInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -mfa: try_from_aws(x.mfa)?, -versioning_configuration: unwrap_from_aws(x.versioning_configuration, "versioning_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_mfa(try_into_aws(x.mfa)?); -y = y.set_versioning_configuration(Some(try_into_aws(x.versioning_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + mfa: try_from_aws(x.mfa)?, + versioning_configuration: unwrap_from_aws(x.versioning_configuration, "versioning_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_mfa(try_into_aws(x.mfa)?); + y = y.set_versioning_configuration(Some(try_into_aws(x.versioning_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketVersioningOutput { type Target = aws_sdk_s3::operation::put_bucket_versioning::PutBucketVersioningOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketWebsiteInput { type Target = aws_sdk_s3::operation::put_bucket_website::PutBucketWebsiteInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -website_configuration: unwrap_from_aws(x.website_configuration, "website_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_website_configuration(Some(try_into_aws(x.website_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + website_configuration: unwrap_from_aws(x.website_configuration, "website_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_website_configuration(Some(try_into_aws(x.website_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketWebsiteOutput { type Target = aws_sdk_s3::operation::put_bucket_website::PutBucketWebsiteOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectAclInput { type Target = aws_sdk_s3::operation::put_object_acl::PutObjectAclInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -access_control_policy: try_from_aws(x.access_control_policy)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write: try_from_aws(x.grant_write)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write(try_into_aws(x.grant_write)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + access_control_policy: try_from_aws(x.access_control_policy)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write: try_from_aws(x.grant_write)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write(try_into_aws(x.grant_write)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectAclOutput { type Target = aws_sdk_s3::operation::put_object_acl::PutObjectAclOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectInput { type Target = aws_sdk_s3::operation::put_object::PutObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -body: Some(try_from_aws(x.body)?), -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_length: try_from_aws(x.content_length)?, -content_md5: try_from_aws(x.content_md5)?, -content_type: try_from_aws(x.content_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -expires: try_from_aws(x.expires)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -if_match: try_from_aws(x.if_match)?, -if_none_match: try_from_aws(x.if_none_match)?, -key: unwrap_from_aws(x.key, "key")?, -metadata: try_from_aws(x.metadata)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -tagging: try_from_aws(x.tagging)?, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -write_offset_bytes: try_from_aws(x.write_offset_bytes)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_none_match(try_into_aws(x.if_none_match)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tagging(try_into_aws(x.tagging)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -y = y.set_write_offset_bytes(try_into_aws(x.write_offset_bytes)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + body: Some(try_from_aws(x.body)?), + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_length: try_from_aws(x.content_length)?, + content_md5: try_from_aws(x.content_md5)?, + content_type: try_from_aws(x.content_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + expires: try_from_aws(x.expires)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + if_match: try_from_aws(x.if_match)?, + if_none_match: try_from_aws(x.if_none_match)?, + key: unwrap_from_aws(x.key, "key")?, + metadata: try_from_aws(x.metadata)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + tagging: try_from_aws(x.tagging)?, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + write_offset_bytes: try_from_aws(x.write_offset_bytes)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_none_match(try_into_aws(x.if_none_match)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tagging(try_into_aws(x.tagging)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + y = y.set_write_offset_bytes(try_into_aws(x.write_offset_bytes)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectLegalHoldInput { type Target = aws_sdk_s3::operation::put_object_legal_hold::PutObjectLegalHoldInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -legal_hold: try_from_aws(x.legal_hold)?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_legal_hold(try_into_aws(x.legal_hold)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + legal_hold: try_from_aws(x.legal_hold)?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_legal_hold(try_into_aws(x.legal_hold)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectLegalHoldOutput { type Target = aws_sdk_s3::operation::put_object_legal_hold::PutObjectLegalHoldOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectLockConfigurationInput { type Target = aws_sdk_s3::operation::put_object_lock_configuration::PutObjectLockConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -object_lock_configuration: try_from_aws(x.object_lock_configuration)?, -request_payer: try_from_aws(x.request_payer)?, -token: try_from_aws(x.token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_token(try_into_aws(x.token)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + object_lock_configuration: try_from_aws(x.object_lock_configuration)?, + request_payer: try_from_aws(x.request_payer)?, + token: try_from_aws(x.token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_token(try_into_aws(x.token)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectLockConfigurationOutput { type Target = aws_sdk_s3::operation::put_object_lock_configuration::PutObjectLockConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectOutput { type Target = aws_sdk_s3::operation::put_object::PutObjectOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -expiration: try_from_aws(x.expiration)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -size: try_from_aws(x.size)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_size(try_into_aws(x.size)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + expiration: try_from_aws(x.expiration)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + size: try_from_aws(x.size)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_size(try_into_aws(x.size)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectRetentionInput { type Target = aws_sdk_s3::operation::put_object_retention::PutObjectRetentionInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -retention: try_from_aws(x.retention)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_retention(try_into_aws(x.retention)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + retention: try_from_aws(x.retention)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_retention(try_into_aws(x.retention)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectRetentionOutput { type Target = aws_sdk_s3::operation::put_object_retention::PutObjectRetentionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectTaggingInput { type Target = aws_sdk_s3::operation::put_object_tagging::PutObjectTaggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -tagging: unwrap_from_aws(x.tagging, "tagging")?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_tagging(Some(try_into_aws(x.tagging)?)); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + tagging: unwrap_from_aws(x.tagging, "tagging")?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_tagging(Some(try_into_aws(x.tagging)?)); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectTaggingOutput { type Target = aws_sdk_s3::operation::put_object_tagging::PutObjectTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -version_id: try_from_aws(x.version_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + version_id: try_from_aws(x.version_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutPublicAccessBlockInput { type Target = aws_sdk_s3::operation::put_public_access_block::PutPublicAccessBlockInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -public_access_block_configuration: unwrap_from_aws(x.public_access_block_configuration, "public_access_block_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_public_access_block_configuration(Some(try_into_aws(x.public_access_block_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + public_access_block_configuration: unwrap_from_aws( + x.public_access_block_configuration, + "public_access_block_configuration", + )?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_public_access_block_configuration(Some(try_into_aws(x.public_access_block_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutPublicAccessBlockOutput { type Target = aws_sdk_s3::operation::put_public_access_block::PutPublicAccessBlockOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::QueueConfiguration { type Target = aws_sdk_s3::types::QueueConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -events: try_from_aws(x.events)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -queue_arn: try_from_aws(x.queue_arn)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_events(Some(try_into_aws(x.events)?)); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_queue_arn(Some(try_into_aws(x.queue_arn)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + events: try_from_aws(x.events)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + queue_arn: try_from_aws(x.queue_arn)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_events(Some(try_into_aws(x.events)?)); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_queue_arn(Some(try_into_aws(x.queue_arn)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::QuoteFields { type Target = aws_sdk_s3::types::QuoteFields; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::QuoteFields::Always => Self::from_static(Self::ALWAYS), -aws_sdk_s3::types::QuoteFields::Asneeded => Self::from_static(Self::ASNEEDED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::QuoteFields::Always => Self::from_static(Self::ALWAYS), + aws_sdk_s3::types::QuoteFields::Asneeded => Self::from_static(Self::ASNEEDED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::QuoteFields::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::QuoteFields::from(x.as_str())) + } } impl AwsConversion for s3s::dto::RecordsEvent { type Target = aws_sdk_s3::types::RecordsEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -payload: try_from_aws(x.payload)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + payload: try_from_aws(x.payload)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_payload(try_into_aws(x.payload)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_payload(try_into_aws(x.payload)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Redirect { type Target = aws_sdk_s3::types::Redirect; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -host_name: try_from_aws(x.host_name)?, -http_redirect_code: try_from_aws(x.http_redirect_code)?, -protocol: try_from_aws(x.protocol)?, -replace_key_prefix_with: try_from_aws(x.replace_key_prefix_with)?, -replace_key_with: try_from_aws(x.replace_key_with)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_host_name(try_into_aws(x.host_name)?); -y = y.set_http_redirect_code(try_into_aws(x.http_redirect_code)?); -y = y.set_protocol(try_into_aws(x.protocol)?); -y = y.set_replace_key_prefix_with(try_into_aws(x.replace_key_prefix_with)?); -y = y.set_replace_key_with(try_into_aws(x.replace_key_with)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + host_name: try_from_aws(x.host_name)?, + http_redirect_code: try_from_aws(x.http_redirect_code)?, + protocol: try_from_aws(x.protocol)?, + replace_key_prefix_with: try_from_aws(x.replace_key_prefix_with)?, + replace_key_with: try_from_aws(x.replace_key_with)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_host_name(try_into_aws(x.host_name)?); + y = y.set_http_redirect_code(try_into_aws(x.http_redirect_code)?); + y = y.set_protocol(try_into_aws(x.protocol)?); + y = y.set_replace_key_prefix_with(try_into_aws(x.replace_key_prefix_with)?); + y = y.set_replace_key_with(try_into_aws(x.replace_key_with)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RedirectAllRequestsTo { type Target = aws_sdk_s3::types::RedirectAllRequestsTo; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -host_name: try_from_aws(x.host_name)?, -protocol: try_from_aws(x.protocol)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + host_name: try_from_aws(x.host_name)?, + protocol: try_from_aws(x.protocol)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_host_name(Some(try_into_aws(x.host_name)?)); -y = y.set_protocol(try_into_aws(x.protocol)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_host_name(Some(try_into_aws(x.host_name)?)); + y = y.set_protocol(try_into_aws(x.protocol)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicaModifications { type Target = aws_sdk_s3::types::ReplicaModifications; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicaModificationsStatus { type Target = aws_sdk_s3::types::ReplicaModificationsStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ReplicaModificationsStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ReplicaModificationsStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ReplicaModificationsStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ReplicaModificationsStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ReplicaModificationsStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ReplicaModificationsStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ReplicationConfiguration { type Target = aws_sdk_s3::types::ReplicationConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -role: try_from_aws(x.role)?, -rules: try_from_aws(x.rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + role: try_from_aws(x.role)?, + rules: try_from_aws(x.rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_role(Some(try_into_aws(x.role)?)); -y = y.set_rules(Some(try_into_aws(x.rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_role(Some(try_into_aws(x.role)?)); + y = y.set_rules(Some(try_into_aws(x.rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicationRule { type Target = aws_sdk_s3::types::ReplicationRule; -type Error = S3Error; - -#[allow(deprecated)] -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -delete_marker_replication: try_from_aws(x.delete_marker_replication)?, -destination: unwrap_from_aws(x.destination, "destination")?, -existing_object_replication: try_from_aws(x.existing_object_replication)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -prefix: try_from_aws(x.prefix)?, -priority: try_from_aws(x.priority)?, -source_selection_criteria: try_from_aws(x.source_selection_criteria)?, -status: try_from_aws(x.status)?, -}) -} - -#[allow(deprecated)] -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_delete_marker_replication(try_into_aws(x.delete_marker_replication)?); -y = y.set_destination(Some(try_into_aws(x.destination)?)); -y = y.set_existing_object_replication(try_into_aws(x.existing_object_replication)?); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_priority(try_into_aws(x.priority)?); -y = y.set_source_selection_criteria(try_into_aws(x.source_selection_criteria)?); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + #[allow(deprecated)] + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + delete_marker_replication: try_from_aws(x.delete_marker_replication)?, + destination: unwrap_from_aws(x.destination, "destination")?, + existing_object_replication: try_from_aws(x.existing_object_replication)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + prefix: try_from_aws(x.prefix)?, + priority: try_from_aws(x.priority)?, + source_selection_criteria: try_from_aws(x.source_selection_criteria)?, + status: try_from_aws(x.status)?, + }) + } + + #[allow(deprecated)] + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_delete_marker_replication(try_into_aws(x.delete_marker_replication)?); + y = y.set_destination(Some(try_into_aws(x.destination)?)); + y = y.set_existing_object_replication(try_into_aws(x.existing_object_replication)?); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_priority(try_into_aws(x.priority)?); + y = y.set_source_selection_criteria(try_into_aws(x.source_selection_criteria)?); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicationRuleAndOperator { type Target = aws_sdk_s3::types::ReplicationRuleAndOperator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ReplicationRuleFilter { type Target = aws_sdk_s3::types::ReplicationRuleFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -and: try_from_aws(x.and)?, -prefix: try_from_aws(x.prefix)?, -tag: try_from_aws(x.tag)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + and: try_from_aws(x.and)?, + prefix: try_from_aws(x.prefix)?, + tag: try_from_aws(x.tag)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_and(try_into_aws(x.and)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tag(try_into_aws(x.tag)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_and(try_into_aws(x.and)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tag(try_into_aws(x.tag)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ReplicationRuleStatus { type Target = aws_sdk_s3::types::ReplicationRuleStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ReplicationRuleStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ReplicationRuleStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ReplicationRuleStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ReplicationRuleStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ReplicationRuleStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ReplicationRuleStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ReplicationStatus { type Target = aws_sdk_s3::types::ReplicationStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ReplicationStatus::Complete => Self::from_static(Self::COMPLETE), -aws_sdk_s3::types::ReplicationStatus::Completed => Self::from_static(Self::COMPLETED), -aws_sdk_s3::types::ReplicationStatus::Failed => Self::from_static(Self::FAILED), -aws_sdk_s3::types::ReplicationStatus::Pending => Self::from_static(Self::PENDING), -aws_sdk_s3::types::ReplicationStatus::Replica => Self::from_static(Self::REPLICA), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ReplicationStatus::Complete => Self::from_static(Self::COMPLETE), + aws_sdk_s3::types::ReplicationStatus::Completed => Self::from_static(Self::COMPLETED), + aws_sdk_s3::types::ReplicationStatus::Failed => Self::from_static(Self::FAILED), + aws_sdk_s3::types::ReplicationStatus::Pending => Self::from_static(Self::PENDING), + aws_sdk_s3::types::ReplicationStatus::Replica => Self::from_static(Self::REPLICA), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ReplicationStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ReplicationStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ReplicationTime { type Target = aws_sdk_s3::types::ReplicationTime; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -time: unwrap_from_aws(x.time, "time")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + time: unwrap_from_aws(x.time, "time")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(Some(try_into_aws(x.status)?)); -y = y.set_time(Some(try_into_aws(x.time)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(Some(try_into_aws(x.status)?)); + y = y.set_time(Some(try_into_aws(x.time)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicationTimeStatus { type Target = aws_sdk_s3::types::ReplicationTimeStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ReplicationTimeStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ReplicationTimeStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ReplicationTimeStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ReplicationTimeStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ReplicationTimeStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ReplicationTimeStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ReplicationTimeValue { type Target = aws_sdk_s3::types::ReplicationTimeValue; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -minutes: try_from_aws(x.minutes)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + minutes: try_from_aws(x.minutes)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_minutes(try_into_aws(x.minutes)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_minutes(try_into_aws(x.minutes)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RequestCharged { type Target = aws_sdk_s3::types::RequestCharged; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::RequestCharged::Requester => Self::from_static(Self::REQUESTER), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::RequestCharged::Requester => Self::from_static(Self::REQUESTER), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::RequestCharged::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::RequestCharged::from(x.as_str())) + } } impl AwsConversion for s3s::dto::RequestPayer { type Target = aws_sdk_s3::types::RequestPayer; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::RequestPayer::Requester => Self::from_static(Self::REQUESTER), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::RequestPayer::Requester => Self::from_static(Self::REQUESTER), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::RequestPayer::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::RequestPayer::from(x.as_str())) + } } impl AwsConversion for s3s::dto::RequestPaymentConfiguration { type Target = aws_sdk_s3::types::RequestPaymentConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -payer: try_from_aws(x.payer)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + payer: try_from_aws(x.payer)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_payer(Some(try_into_aws(x.payer)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_payer(Some(try_into_aws(x.payer)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::RequestProgress { type Target = aws_sdk_s3::types::RequestProgress; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -enabled: try_from_aws(x.enabled)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + enabled: try_from_aws(x.enabled)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_enabled(try_into_aws(x.enabled)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_enabled(try_into_aws(x.enabled)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RestoreObjectInput { type Target = aws_sdk_s3::operation::restore_object::RestoreObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -restore_request: try_from_aws(x.restore_request)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_restore_request(try_into_aws(x.restore_request)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + restore_request: try_from_aws(x.restore_request)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_restore_request(try_into_aws(x.restore_request)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::RestoreObjectOutput { type Target = aws_sdk_s3::operation::restore_object::RestoreObjectOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -restore_output_path: try_from_aws(x.restore_output_path)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + restore_output_path: try_from_aws(x.restore_output_path)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_restore_output_path(try_into_aws(x.restore_output_path)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_restore_output_path(try_into_aws(x.restore_output_path)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RestoreRequest { type Target = aws_sdk_s3::types::RestoreRequest; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -days: try_from_aws(x.days)?, -description: try_from_aws(x.description)?, -glacier_job_parameters: try_from_aws(x.glacier_job_parameters)?, -output_location: try_from_aws(x.output_location)?, -select_parameters: try_from_aws(x.select_parameters)?, -tier: try_from_aws(x.tier)?, -type_: try_from_aws(x.r#type)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_days(try_into_aws(x.days)?); -y = y.set_description(try_into_aws(x.description)?); -y = y.set_glacier_job_parameters(try_into_aws(x.glacier_job_parameters)?); -y = y.set_output_location(try_into_aws(x.output_location)?); -y = y.set_select_parameters(try_into_aws(x.select_parameters)?); -y = y.set_tier(try_into_aws(x.tier)?); -y = y.set_type(try_into_aws(x.type_)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + days: try_from_aws(x.days)?, + description: try_from_aws(x.description)?, + glacier_job_parameters: try_from_aws(x.glacier_job_parameters)?, + output_location: try_from_aws(x.output_location)?, + select_parameters: try_from_aws(x.select_parameters)?, + tier: try_from_aws(x.tier)?, + type_: try_from_aws(x.r#type)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_days(try_into_aws(x.days)?); + y = y.set_description(try_into_aws(x.description)?); + y = y.set_glacier_job_parameters(try_into_aws(x.glacier_job_parameters)?); + y = y.set_output_location(try_into_aws(x.output_location)?); + y = y.set_select_parameters(try_into_aws(x.select_parameters)?); + y = y.set_tier(try_into_aws(x.tier)?); + y = y.set_type(try_into_aws(x.type_)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RestoreRequestType { type Target = aws_sdk_s3::types::RestoreRequestType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::RestoreRequestType::Select => Self::from_static(Self::SELECT), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::RestoreRequestType::Select => Self::from_static(Self::SELECT), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::RestoreRequestType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::RestoreRequestType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::RestoreStatus { type Target = aws_sdk_s3::types::RestoreStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -is_restore_in_progress: try_from_aws(x.is_restore_in_progress)?, -restore_expiry_date: try_from_aws(x.restore_expiry_date)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + is_restore_in_progress: try_from_aws(x.is_restore_in_progress)?, + restore_expiry_date: try_from_aws(x.restore_expiry_date)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_is_restore_in_progress(try_into_aws(x.is_restore_in_progress)?); -y = y.set_restore_expiry_date(try_into_aws(x.restore_expiry_date)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_is_restore_in_progress(try_into_aws(x.is_restore_in_progress)?); + y = y.set_restore_expiry_date(try_into_aws(x.restore_expiry_date)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RoutingRule { type Target = aws_sdk_s3::types::RoutingRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -condition: try_from_aws(x.condition)?, -redirect: unwrap_from_aws(x.redirect, "redirect")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + condition: try_from_aws(x.condition)?, + redirect: unwrap_from_aws(x.redirect, "redirect")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_condition(try_into_aws(x.condition)?); -y = y.set_redirect(Some(try_into_aws(x.redirect)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_condition(try_into_aws(x.condition)?); + y = y.set_redirect(Some(try_into_aws(x.redirect)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::S3KeyFilter { type Target = aws_sdk_s3::types::S3KeyFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -filter_rules: try_from_aws(x.filter_rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + filter_rules: try_from_aws(x.filter_rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_filter_rules(try_into_aws(x.filter_rules)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_filter_rules(try_into_aws(x.filter_rules)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::S3Location { type Target = aws_sdk_s3::types::S3Location; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_control_list: try_from_aws(x.access_control_list)?, -bucket_name: try_from_aws(x.bucket_name)?, -canned_acl: try_from_aws(x.canned_acl)?, -encryption: try_from_aws(x.encryption)?, -prefix: try_from_aws(x.prefix)?, -storage_class: try_from_aws(x.storage_class)?, -tagging: try_from_aws(x.tagging)?, -user_metadata: try_from_aws(x.user_metadata)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_control_list(try_into_aws(x.access_control_list)?); -y = y.set_bucket_name(Some(try_into_aws(x.bucket_name)?)); -y = y.set_canned_acl(try_into_aws(x.canned_acl)?); -y = y.set_encryption(try_into_aws(x.encryption)?); -y = y.set_prefix(Some(try_into_aws(x.prefix)?)); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tagging(try_into_aws(x.tagging)?); -y = y.set_user_metadata(try_into_aws(x.user_metadata)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_control_list: try_from_aws(x.access_control_list)?, + bucket_name: try_from_aws(x.bucket_name)?, + canned_acl: try_from_aws(x.canned_acl)?, + encryption: try_from_aws(x.encryption)?, + prefix: try_from_aws(x.prefix)?, + storage_class: try_from_aws(x.storage_class)?, + tagging: try_from_aws(x.tagging)?, + user_metadata: try_from_aws(x.user_metadata)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_control_list(try_into_aws(x.access_control_list)?); + y = y.set_bucket_name(Some(try_into_aws(x.bucket_name)?)); + y = y.set_canned_acl(try_into_aws(x.canned_acl)?); + y = y.set_encryption(try_into_aws(x.encryption)?); + y = y.set_prefix(Some(try_into_aws(x.prefix)?)); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tagging(try_into_aws(x.tagging)?); + y = y.set_user_metadata(try_into_aws(x.user_metadata)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::S3TablesDestination { type Target = aws_sdk_s3::types::S3TablesDestination; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -table_bucket_arn: try_from_aws(x.table_bucket_arn)?, -table_name: try_from_aws(x.table_name)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + table_bucket_arn: try_from_aws(x.table_bucket_arn)?, + table_name: try_from_aws(x.table_name)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); -y = y.set_table_name(Some(try_into_aws(x.table_name)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); + y = y.set_table_name(Some(try_into_aws(x.table_name)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::S3TablesDestinationResult { type Target = aws_sdk_s3::types::S3TablesDestinationResult; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -table_arn: try_from_aws(x.table_arn)?, -table_bucket_arn: try_from_aws(x.table_bucket_arn)?, -table_name: try_from_aws(x.table_name)?, -table_namespace: try_from_aws(x.table_namespace)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_table_arn(Some(try_into_aws(x.table_arn)?)); -y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); -y = y.set_table_name(Some(try_into_aws(x.table_name)?)); -y = y.set_table_namespace(Some(try_into_aws(x.table_namespace)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + table_arn: try_from_aws(x.table_arn)?, + table_bucket_arn: try_from_aws(x.table_bucket_arn)?, + table_name: try_from_aws(x.table_name)?, + table_namespace: try_from_aws(x.table_namespace)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_table_arn(Some(try_into_aws(x.table_arn)?)); + y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); + y = y.set_table_name(Some(try_into_aws(x.table_name)?)); + y = y.set_table_namespace(Some(try_into_aws(x.table_namespace)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::SSEKMS { type Target = aws_sdk_s3::types::Ssekms; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -key_id: try_from_aws(x.key_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + key_id: try_from_aws(x.key_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_key_id(Some(try_into_aws(x.key_id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_key_id(Some(try_into_aws(x.key_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::SSES3 { type Target = aws_sdk_s3::types::Sses3; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ScanRange { type Target = aws_sdk_s3::types::ScanRange; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -end: try_from_aws(x.end)?, -start: try_from_aws(x.start)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + end: try_from_aws(x.end)?, + start: try_from_aws(x.start)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_end(try_into_aws(x.end)?); -y = y.set_start(try_into_aws(x.start)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_end(try_into_aws(x.end)?); + y = y.set_start(try_into_aws(x.start)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::SelectObjectContentEvent { type Target = aws_sdk_s3::types::SelectObjectContentEventStream; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::SelectObjectContentEventStream::Cont(v) => Self::Cont(try_from_aws(v)?), -aws_sdk_s3::types::SelectObjectContentEventStream::End(v) => Self::End(try_from_aws(v)?), -aws_sdk_s3::types::SelectObjectContentEventStream::Progress(v) => Self::Progress(try_from_aws(v)?), -aws_sdk_s3::types::SelectObjectContentEventStream::Records(v) => Self::Records(try_from_aws(v)?), -aws_sdk_s3::types::SelectObjectContentEventStream::Stats(v) => Self::Stats(try_from_aws(v)?), -_ => unimplemented!("unknown variant of aws_sdk_s3::types::SelectObjectContentEventStream: {x:?}"), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(match x { -Self::Cont(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Cont(try_into_aws(v)?), -Self::End(v) => aws_sdk_s3::types::SelectObjectContentEventStream::End(try_into_aws(v)?), -Self::Progress(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Progress(try_into_aws(v)?), -Self::Records(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Records(try_into_aws(v)?), -Self::Stats(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Stats(try_into_aws(v)?), -_ => unimplemented!("unknown variant of SelectObjectContentEvent: {x:?}"), -}) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::SelectObjectContentEventStream::Cont(v) => Self::Cont(try_from_aws(v)?), + aws_sdk_s3::types::SelectObjectContentEventStream::End(v) => Self::End(try_from_aws(v)?), + aws_sdk_s3::types::SelectObjectContentEventStream::Progress(v) => Self::Progress(try_from_aws(v)?), + aws_sdk_s3::types::SelectObjectContentEventStream::Records(v) => Self::Records(try_from_aws(v)?), + aws_sdk_s3::types::SelectObjectContentEventStream::Stats(v) => Self::Stats(try_from_aws(v)?), + _ => unimplemented!("unknown variant of aws_sdk_s3::types::SelectObjectContentEventStream: {x:?}"), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(match x { + Self::Cont(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Cont(try_into_aws(v)?), + Self::End(v) => aws_sdk_s3::types::SelectObjectContentEventStream::End(try_into_aws(v)?), + Self::Progress(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Progress(try_into_aws(v)?), + Self::Records(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Records(try_into_aws(v)?), + Self::Stats(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Stats(try_into_aws(v)?), + _ => unimplemented!("unknown variant of SelectObjectContentEvent: {x:?}"), + }) + } } impl AwsConversion for s3s::dto::SelectObjectContentOutput { type Target = aws_sdk_s3::operation::select_object_content::SelectObjectContentOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -payload: Some(crate::event_stream::from_aws(x.payload)), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + payload: Some(crate::event_stream::from_aws(x.payload)), + }) + } -fn try_into_aws(x: Self) -> S3Result { -drop(x); -unimplemented!("See https://github.com/Nugine/s3s/issues/5") -} + fn try_into_aws(x: Self) -> S3Result { + drop(x); + unimplemented!("See https://github.com/Nugine/s3s/issues/5") + } } impl AwsConversion for s3s::dto::SelectParameters { type Target = aws_sdk_s3::types::SelectParameters; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -expression: try_from_aws(x.expression)?, -expression_type: try_from_aws(x.expression_type)?, -input_serialization: unwrap_from_aws(x.input_serialization, "input_serialization")?, -output_serialization: unwrap_from_aws(x.output_serialization, "output_serialization")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_expression(Some(try_into_aws(x.expression)?)); -y = y.set_expression_type(Some(try_into_aws(x.expression_type)?)); -y = y.set_input_serialization(Some(try_into_aws(x.input_serialization)?)); -y = y.set_output_serialization(Some(try_into_aws(x.output_serialization)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + expression: try_from_aws(x.expression)?, + expression_type: try_from_aws(x.expression_type)?, + input_serialization: unwrap_from_aws(x.input_serialization, "input_serialization")?, + output_serialization: unwrap_from_aws(x.output_serialization, "output_serialization")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_expression(Some(try_into_aws(x.expression)?)); + y = y.set_expression_type(Some(try_into_aws(x.expression_type)?)); + y = y.set_input_serialization(Some(try_into_aws(x.input_serialization)?)); + y = y.set_output_serialization(Some(try_into_aws(x.output_serialization)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ServerSideEncryption { type Target = aws_sdk_s3::types::ServerSideEncryption; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ServerSideEncryption::Aes256 => Self::from_static(Self::AES256), -aws_sdk_s3::types::ServerSideEncryption::AwsKms => Self::from_static(Self::AWS_KMS), -aws_sdk_s3::types::ServerSideEncryption::AwsKmsDsse => Self::from_static(Self::AWS_KMS_DSSE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ServerSideEncryption::Aes256 => Self::from_static(Self::AES256), + aws_sdk_s3::types::ServerSideEncryption::AwsKms => Self::from_static(Self::AWS_KMS), + aws_sdk_s3::types::ServerSideEncryption::AwsKmsDsse => Self::from_static(Self::AWS_KMS_DSSE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ServerSideEncryption::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ServerSideEncryption::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ServerSideEncryptionByDefault { type Target = aws_sdk_s3::types::ServerSideEncryptionByDefault; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -kms_master_key_id: try_from_aws(x.kms_master_key_id)?, -sse_algorithm: try_from_aws(x.sse_algorithm)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + kms_master_key_id: try_from_aws(x.kms_master_key_id)?, + sse_algorithm: try_from_aws(x.sse_algorithm)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_kms_master_key_id(try_into_aws(x.kms_master_key_id)?); -y = y.set_sse_algorithm(Some(try_into_aws(x.sse_algorithm)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_kms_master_key_id(try_into_aws(x.kms_master_key_id)?); + y = y.set_sse_algorithm(Some(try_into_aws(x.sse_algorithm)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ServerSideEncryptionConfiguration { type Target = aws_sdk_s3::types::ServerSideEncryptionConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -rules: try_from_aws(x.rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + rules: try_from_aws(x.rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_rules(Some(try_into_aws(x.rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_rules(Some(try_into_aws(x.rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ServerSideEncryptionRule { type Target = aws_sdk_s3::types::ServerSideEncryptionRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -apply_server_side_encryption_by_default: try_from_aws(x.apply_server_side_encryption_by_default)?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + apply_server_side_encryption_by_default: try_from_aws(x.apply_server_side_encryption_by_default)?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_apply_server_side_encryption_by_default(try_into_aws(x.apply_server_side_encryption_by_default)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_apply_server_side_encryption_by_default(try_into_aws(x.apply_server_side_encryption_by_default)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::SessionCredentials { type Target = aws_sdk_s3::types::SessionCredentials; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_key_id: try_from_aws(x.access_key_id)?, -expiration: try_from_aws(x.expiration)?, -secret_access_key: try_from_aws(x.secret_access_key)?, -session_token: try_from_aws(x.session_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_key_id(Some(try_into_aws(x.access_key_id)?)); -y = y.set_expiration(Some(try_into_aws(x.expiration)?)); -y = y.set_secret_access_key(Some(try_into_aws(x.secret_access_key)?)); -y = y.set_session_token(Some(try_into_aws(x.session_token)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_key_id: try_from_aws(x.access_key_id)?, + expiration: try_from_aws(x.expiration)?, + secret_access_key: try_from_aws(x.secret_access_key)?, + session_token: try_from_aws(x.session_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_key_id(Some(try_into_aws(x.access_key_id)?)); + y = y.set_expiration(Some(try_into_aws(x.expiration)?)); + y = y.set_secret_access_key(Some(try_into_aws(x.secret_access_key)?)); + y = y.set_session_token(Some(try_into_aws(x.session_token)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::SessionMode { type Target = aws_sdk_s3::types::SessionMode; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::SessionMode::ReadOnly => Self::from_static(Self::READ_ONLY), -aws_sdk_s3::types::SessionMode::ReadWrite => Self::from_static(Self::READ_WRITE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::SessionMode::ReadOnly => Self::from_static(Self::READ_ONLY), + aws_sdk_s3::types::SessionMode::ReadWrite => Self::from_static(Self::READ_WRITE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::SessionMode::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::SessionMode::from(x.as_str())) + } } impl AwsConversion for s3s::dto::SimplePrefix { type Target = aws_sdk_s3::types::SimplePrefix; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::SourceSelectionCriteria { type Target = aws_sdk_s3::types::SourceSelectionCriteria; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -replica_modifications: try_from_aws(x.replica_modifications)?, -sse_kms_encrypted_objects: try_from_aws(x.sse_kms_encrypted_objects)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + replica_modifications: try_from_aws(x.replica_modifications)?, + sse_kms_encrypted_objects: try_from_aws(x.sse_kms_encrypted_objects)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_replica_modifications(try_into_aws(x.replica_modifications)?); -y = y.set_sse_kms_encrypted_objects(try_into_aws(x.sse_kms_encrypted_objects)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_replica_modifications(try_into_aws(x.replica_modifications)?); + y = y.set_sse_kms_encrypted_objects(try_into_aws(x.sse_kms_encrypted_objects)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::SseKmsEncryptedObjects { type Target = aws_sdk_s3::types::SseKmsEncryptedObjects; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::SseKmsEncryptedObjectsStatus { type Target = aws_sdk_s3::types::SseKmsEncryptedObjectsStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Stats { type Target = aws_sdk_s3::types::Stats; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bytes_processed: try_from_aws(x.bytes_processed)?, -bytes_returned: try_from_aws(x.bytes_returned)?, -bytes_scanned: try_from_aws(x.bytes_scanned)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bytes_processed: try_from_aws(x.bytes_processed)?, + bytes_returned: try_from_aws(x.bytes_returned)?, + bytes_scanned: try_from_aws(x.bytes_scanned)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); -y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); -y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); + y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); + y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::StatsEvent { type Target = aws_sdk_s3::types::StatsEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -details: try_from_aws(x.details)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + details: try_from_aws(x.details)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_details(try_into_aws(x.details)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_details(try_into_aws(x.details)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::StorageClass { type Target = aws_sdk_s3::types::StorageClass; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::StorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), -aws_sdk_s3::types::StorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), -aws_sdk_s3::types::StorageClass::Glacier => Self::from_static(Self::GLACIER), -aws_sdk_s3::types::StorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), -aws_sdk_s3::types::StorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), -aws_sdk_s3::types::StorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), -aws_sdk_s3::types::StorageClass::Outposts => Self::from_static(Self::OUTPOSTS), -aws_sdk_s3::types::StorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), -aws_sdk_s3::types::StorageClass::Snow => Self::from_static(Self::SNOW), -aws_sdk_s3::types::StorageClass::Standard => Self::from_static(Self::STANDARD), -aws_sdk_s3::types::StorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::StorageClass::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::StorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), + aws_sdk_s3::types::StorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), + aws_sdk_s3::types::StorageClass::Glacier => Self::from_static(Self::GLACIER), + aws_sdk_s3::types::StorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), + aws_sdk_s3::types::StorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), + aws_sdk_s3::types::StorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), + aws_sdk_s3::types::StorageClass::Outposts => Self::from_static(Self::OUTPOSTS), + aws_sdk_s3::types::StorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), + aws_sdk_s3::types::StorageClass::Snow => Self::from_static(Self::SNOW), + aws_sdk_s3::types::StorageClass::Standard => Self::from_static(Self::STANDARD), + aws_sdk_s3::types::StorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::StorageClass::from(x.as_str())) + } } impl AwsConversion for s3s::dto::StorageClassAnalysis { type Target = aws_sdk_s3::types::StorageClassAnalysis; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -data_export: try_from_aws(x.data_export)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + data_export: try_from_aws(x.data_export)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_data_export(try_into_aws(x.data_export)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_data_export(try_into_aws(x.data_export)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::StorageClassAnalysisDataExport { type Target = aws_sdk_s3::types::StorageClassAnalysisDataExport; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -destination: unwrap_from_aws(x.destination, "destination")?, -output_schema_version: try_from_aws(x.output_schema_version)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + destination: unwrap_from_aws(x.destination, "destination")?, + output_schema_version: try_from_aws(x.output_schema_version)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_destination(Some(try_into_aws(x.destination)?)); -y = y.set_output_schema_version(Some(try_into_aws(x.output_schema_version)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_destination(Some(try_into_aws(x.destination)?)); + y = y.set_output_schema_version(Some(try_into_aws(x.output_schema_version)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::StorageClassAnalysisSchemaVersion { type Target = aws_sdk_s3::types::StorageClassAnalysisSchemaVersion; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::V1 => Self::from_static(Self::V_1), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::V1 => Self::from_static(Self::V_1), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Tagging { type Target = aws_sdk_s3::types::Tagging; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -tag_set: try_from_aws(x.tag_set)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + tag_set: try_from_aws(x.tag_set)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::TaggingDirective { type Target = aws_sdk_s3::types::TaggingDirective; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::TaggingDirective::Copy => Self::from_static(Self::COPY), -aws_sdk_s3::types::TaggingDirective::Replace => Self::from_static(Self::REPLACE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::TaggingDirective::Copy => Self::from_static(Self::COPY), + aws_sdk_s3::types::TaggingDirective::Replace => Self::from_static(Self::REPLACE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::TaggingDirective::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::TaggingDirective::from(x.as_str())) + } } impl AwsConversion for s3s::dto::TargetGrant { type Target = aws_sdk_s3::types::TargetGrant; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grantee: try_from_aws(x.grantee)?, -permission: try_from_aws(x.permission)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grantee: try_from_aws(x.grantee)?, + permission: try_from_aws(x.permission)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grantee(try_into_aws(x.grantee)?); -y = y.set_permission(try_into_aws(x.permission)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grantee(try_into_aws(x.grantee)?); + y = y.set_permission(try_into_aws(x.permission)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::TargetObjectKeyFormat { type Target = aws_sdk_s3::types::TargetObjectKeyFormat; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -partitioned_prefix: try_from_aws(x.partitioned_prefix)?, -simple_prefix: try_from_aws(x.simple_prefix)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + partitioned_prefix: try_from_aws(x.partitioned_prefix)?, + simple_prefix: try_from_aws(x.simple_prefix)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_partitioned_prefix(try_into_aws(x.partitioned_prefix)?); -y = y.set_simple_prefix(try_into_aws(x.simple_prefix)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_partitioned_prefix(try_into_aws(x.partitioned_prefix)?); + y = y.set_simple_prefix(try_into_aws(x.simple_prefix)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Tier { type Target = aws_sdk_s3::types::Tier; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Tier::Bulk => Self::from_static(Self::BULK), -aws_sdk_s3::types::Tier::Expedited => Self::from_static(Self::EXPEDITED), -aws_sdk_s3::types::Tier::Standard => Self::from_static(Self::STANDARD), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Tier::Bulk => Self::from_static(Self::BULK), + aws_sdk_s3::types::Tier::Expedited => Self::from_static(Self::EXPEDITED), + aws_sdk_s3::types::Tier::Standard => Self::from_static(Self::STANDARD), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Tier::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Tier::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Tiering { type Target = aws_sdk_s3::types::Tiering; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_tier: try_from_aws(x.access_tier)?, -days: try_from_aws(x.days)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_tier: try_from_aws(x.access_tier)?, + days: try_from_aws(x.days)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_tier(Some(try_into_aws(x.access_tier)?)); -y = y.set_days(Some(try_into_aws(x.days)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_tier(Some(try_into_aws(x.access_tier)?)); + y = y.set_days(Some(try_into_aws(x.days)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::TooManyParts { type Target = aws_sdk_s3::types::error::TooManyParts; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::TopicConfiguration { type Target = aws_sdk_s3::types::TopicConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -events: try_from_aws(x.events)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -topic_arn: try_from_aws(x.topic_arn)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_events(Some(try_into_aws(x.events)?)); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_topic_arn(Some(try_into_aws(x.topic_arn)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + events: try_from_aws(x.events)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + topic_arn: try_from_aws(x.topic_arn)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_events(Some(try_into_aws(x.events)?)); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_topic_arn(Some(try_into_aws(x.topic_arn)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::Transition { type Target = aws_sdk_s3::types::Transition; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -date: try_from_aws(x.date)?, -days: try_from_aws(x.days)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + date: try_from_aws(x.date)?, + days: try_from_aws(x.days)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_date(try_into_aws(x.date)?); -y = y.set_days(try_into_aws(x.days)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_date(try_into_aws(x.date)?); + y = y.set_days(try_into_aws(x.days)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::TransitionDefaultMinimumObjectSize { type Target = aws_sdk_s3::types::TransitionDefaultMinimumObjectSize; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::AllStorageClasses128K => Self::from_static(Self::ALL_STORAGE_CLASSES_128K), -aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::VariesByStorageClass => Self::from_static(Self::VARIES_BY_STORAGE_CLASS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::AllStorageClasses128K => { + Self::from_static(Self::ALL_STORAGE_CLASSES_128K) + } + aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::VariesByStorageClass => { + Self::from_static(Self::VARIES_BY_STORAGE_CLASS) + } + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::from(x.as_str())) + } } impl AwsConversion for s3s::dto::TransitionStorageClass { type Target = aws_sdk_s3::types::TransitionStorageClass; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::TransitionStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), -aws_sdk_s3::types::TransitionStorageClass::Glacier => Self::from_static(Self::GLACIER), -aws_sdk_s3::types::TransitionStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), -aws_sdk_s3::types::TransitionStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), -aws_sdk_s3::types::TransitionStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), -aws_sdk_s3::types::TransitionStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::TransitionStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), + aws_sdk_s3::types::TransitionStorageClass::Glacier => Self::from_static(Self::GLACIER), + aws_sdk_s3::types::TransitionStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), + aws_sdk_s3::types::TransitionStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), + aws_sdk_s3::types::TransitionStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), + aws_sdk_s3::types::TransitionStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::TransitionStorageClass::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::TransitionStorageClass::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Type { type Target = aws_sdk_s3::types::Type; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Type::AmazonCustomerByEmail => Self::from_static(Self::AMAZON_CUSTOMER_BY_EMAIL), -aws_sdk_s3::types::Type::CanonicalUser => Self::from_static(Self::CANONICAL_USER), -aws_sdk_s3::types::Type::Group => Self::from_static(Self::GROUP), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Type::AmazonCustomerByEmail => Self::from_static(Self::AMAZON_CUSTOMER_BY_EMAIL), + aws_sdk_s3::types::Type::CanonicalUser => Self::from_static(Self::CANONICAL_USER), + aws_sdk_s3::types::Type::Group => Self::from_static(Self::GROUP), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Type::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Type::from(x.as_str())) + } } impl AwsConversion for s3s::dto::UploadPartCopyInput { type Target = aws_sdk_s3::operation::upload_part_copy::UploadPartCopyInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, -copy_source_if_match: try_from_aws(x.copy_source_if_match)?, -copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, -copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, -copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, -copy_source_range: try_from_aws(x.copy_source_range)?, -copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, -copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, -copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -part_number: unwrap_from_aws(x.part_number, "part_number")?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); -y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); -y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); -y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); -y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); -y = y.set_copy_source_range(try_into_aws(x.copy_source_range)?); -y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); -y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); -y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_part_number(Some(try_into_aws(x.part_number)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, + copy_source_if_match: try_from_aws(x.copy_source_if_match)?, + copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, + copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, + copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, + copy_source_range: try_from_aws(x.copy_source_range)?, + copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, + copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, + copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + part_number: unwrap_from_aws(x.part_number, "part_number")?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); + y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); + y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); + y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); + y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); + y = y.set_copy_source_range(try_into_aws(x.copy_source_range)?); + y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); + y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); + y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_part_number(Some(try_into_aws(x.part_number)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::UploadPartCopyOutput { type Target = aws_sdk_s3::operation::upload_part_copy::UploadPartCopyOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -copy_part_result: try_from_aws(x.copy_part_result)?, -copy_source_version_id: try_from_aws(x.copy_source_version_id)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_copy_part_result(try_into_aws(x.copy_part_result)?); -y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + copy_part_result: try_from_aws(x.copy_part_result)?, + copy_source_version_id: try_from_aws(x.copy_source_version_id)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_copy_part_result(try_into_aws(x.copy_part_result)?); + y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::UploadPartInput { type Target = aws_sdk_s3::operation::upload_part::UploadPartInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -body: Some(try_from_aws(x.body)?), -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -content_length: try_from_aws(x.content_length)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -part_number: unwrap_from_aws(x.part_number, "part_number")?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_part_number(Some(try_into_aws(x.part_number)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + body: Some(try_from_aws(x.body)?), + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + content_length: try_from_aws(x.content_length)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + part_number: unwrap_from_aws(x.part_number, "part_number")?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_part_number(Some(try_into_aws(x.part_number)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::UploadPartOutput { type Target = aws_sdk_s3::operation::upload_part::UploadPartOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -e_tag: try_from_aws(x.e_tag)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + e_tag: try_from_aws(x.e_tag)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::VersioningConfiguration { type Target = aws_sdk_s3::types::VersioningConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -mfa_delete: try_from_aws(x.mfa_delete)?, -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + mfa_delete: try_from_aws(x.mfa_delete)?, + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::WebsiteConfiguration { type Target = aws_sdk_s3::types::WebsiteConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -error_document: try_from_aws(x.error_document)?, -index_document: try_from_aws(x.index_document)?, -redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, -routing_rules: try_from_aws(x.routing_rules)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_error_document(try_into_aws(x.error_document)?); -y = y.set_index_document(try_into_aws(x.index_document)?); -y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); -y = y.set_routing_rules(try_into_aws(x.routing_rules)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + error_document: try_from_aws(x.error_document)?, + index_document: try_from_aws(x.index_document)?, + redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, + routing_rules: try_from_aws(x.routing_rules)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_error_document(try_into_aws(x.error_document)?); + y = y.set_index_document(try_into_aws(x.index_document)?); + y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); + y = y.set_routing_rules(try_into_aws(x.routing_rules)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::WriteGetObjectResponseInput { type Target = aws_sdk_s3::operation::write_get_object_response::WriteGetObjectResponseInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -accept_ranges: try_from_aws(x.accept_ranges)?, -body: Some(try_from_aws(x.body)?), -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_length: try_from_aws(x.content_length)?, -content_range: try_from_aws(x.content_range)?, -content_type: try_from_aws(x.content_type)?, -delete_marker: try_from_aws(x.delete_marker)?, -e_tag: try_from_aws(x.e_tag)?, -error_code: try_from_aws(x.error_code)?, -error_message: try_from_aws(x.error_message)?, -expiration: try_from_aws(x.expiration)?, -expires: try_from_aws(x.expires)?, -last_modified: try_from_aws(x.last_modified)?, -metadata: try_from_aws(x.metadata)?, -missing_meta: try_from_aws(x.missing_meta)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -parts_count: try_from_aws(x.parts_count)?, -replication_status: try_from_aws(x.replication_status)?, -request_charged: try_from_aws(x.request_charged)?, -request_route: unwrap_from_aws(x.request_route, "request_route")?, -request_token: unwrap_from_aws(x.request_token, "request_token")?, -restore: try_from_aws(x.restore)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -status_code: try_from_aws(x.status_code)?, -storage_class: try_from_aws(x.storage_class)?, -tag_count: try_from_aws(x.tag_count)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_range(try_into_aws(x.content_range)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_error_code(try_into_aws(x.error_code)?); -y = y.set_error_message(try_into_aws(x.error_message)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_missing_meta(try_into_aws(x.missing_meta)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_parts_count(try_into_aws(x.parts_count)?); -y = y.set_replication_status(try_into_aws(x.replication_status)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_request_route(Some(try_into_aws(x.request_route)?)); -y = y.set_request_token(Some(try_into_aws(x.request_token)?)); -y = y.set_restore(try_into_aws(x.restore)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_status_code(try_into_aws(x.status_code)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tag_count(try_into_aws(x.tag_count)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + accept_ranges: try_from_aws(x.accept_ranges)?, + body: Some(try_from_aws(x.body)?), + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_length: try_from_aws(x.content_length)?, + content_range: try_from_aws(x.content_range)?, + content_type: try_from_aws(x.content_type)?, + delete_marker: try_from_aws(x.delete_marker)?, + e_tag: try_from_aws(x.e_tag)?, + error_code: try_from_aws(x.error_code)?, + error_message: try_from_aws(x.error_message)?, + expiration: try_from_aws(x.expiration)?, + expires: try_from_aws(x.expires)?, + last_modified: try_from_aws(x.last_modified)?, + metadata: try_from_aws(x.metadata)?, + missing_meta: try_from_aws(x.missing_meta)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + parts_count: try_from_aws(x.parts_count)?, + replication_status: try_from_aws(x.replication_status)?, + request_charged: try_from_aws(x.request_charged)?, + request_route: unwrap_from_aws(x.request_route, "request_route")?, + request_token: unwrap_from_aws(x.request_token, "request_token")?, + restore: try_from_aws(x.restore)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + status_code: try_from_aws(x.status_code)?, + storage_class: try_from_aws(x.storage_class)?, + tag_count: try_from_aws(x.tag_count)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_range(try_into_aws(x.content_range)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_error_code(try_into_aws(x.error_code)?); + y = y.set_error_message(try_into_aws(x.error_message)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_missing_meta(try_into_aws(x.missing_meta)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_parts_count(try_into_aws(x.parts_count)?); + y = y.set_replication_status(try_into_aws(x.replication_status)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_request_route(Some(try_into_aws(x.request_route)?)); + y = y.set_request_token(Some(try_into_aws(x.request_token)?)); + y = y.set_restore(try_into_aws(x.restore)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_status_code(try_into_aws(x.status_code)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tag_count(try_into_aws(x.tag_count)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::WriteGetObjectResponseOutput { type Target = aws_sdk_s3::operation::write_get_object_response::WriteGetObjectResponseOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } -} - diff --git a/crates/s3s-aws/src/conv/generated_minio.rs b/crates/s3s-aws/src/conv/generated_minio.rs index 9209be50..83ed18c8 100644 --- a/crates/s3s-aws/src/conv/generated_minio.rs +++ b/crates/s3s-aws/src/conv/generated_minio.rs @@ -4,9307 +4,9283 @@ use super::*; impl AwsConversion for s3s::dto::AbortIncompleteMultipartUpload { type Target = aws_sdk_s3::types::AbortIncompleteMultipartUpload; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -days_after_initiation: try_from_aws(x.days_after_initiation)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + days_after_initiation: try_from_aws(x.days_after_initiation)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_days_after_initiation(try_into_aws(x.days_after_initiation)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_days_after_initiation(try_into_aws(x.days_after_initiation)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AbortMultipartUploadInput { type Target = aws_sdk_s3::operation::abort_multipart_upload::AbortMultipartUploadInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match_initiated_time: try_from_aws(x.if_match_initiated_time)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match_initiated_time(try_into_aws(x.if_match_initiated_time)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match_initiated_time: try_from_aws(x.if_match_initiated_time)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match_initiated_time(try_into_aws(x.if_match_initiated_time)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::AbortMultipartUploadOutput { type Target = aws_sdk_s3::operation::abort_multipart_upload::AbortMultipartUploadOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AccelerateConfiguration { type Target = aws_sdk_s3::types::AccelerateConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AccessControlPolicy { type Target = aws_sdk_s3::types::AccessControlPolicy; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grants: try_from_aws(x.grants)?, -owner: try_from_aws(x.owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grants: try_from_aws(x.grants)?, + owner: try_from_aws(x.owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grants(try_into_aws(x.grants)?); -y = y.set_owner(try_into_aws(x.owner)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grants(try_into_aws(x.grants)?); + y = y.set_owner(try_into_aws(x.owner)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AccessControlTranslation { type Target = aws_sdk_s3::types::AccessControlTranslation; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -owner: try_from_aws(x.owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + owner: try_from_aws(x.owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_owner(Some(try_into_aws(x.owner)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_owner(Some(try_into_aws(x.owner)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::AnalyticsAndOperator { type Target = aws_sdk_s3::types::AnalyticsAndOperator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AnalyticsConfiguration { type Target = aws_sdk_s3::types::AnalyticsConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -storage_class_analysis: unwrap_from_aws(x.storage_class_analysis, "storage_class_analysis")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + storage_class_analysis: unwrap_from_aws(x.storage_class_analysis, "storage_class_analysis")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_storage_class_analysis(Some(try_into_aws(x.storage_class_analysis)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_storage_class_analysis(Some(try_into_aws(x.storage_class_analysis)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::AnalyticsExportDestination { type Target = aws_sdk_s3::types::AnalyticsExportDestination; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::AnalyticsFilter { type Target = aws_sdk_s3::types::AnalyticsFilter; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::AnalyticsFilter::And(v) => Self::And(try_from_aws(v)?), -aws_sdk_s3::types::AnalyticsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), -aws_sdk_s3::types::AnalyticsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), -_ => unimplemented!("unknown variant of aws_sdk_s3::types::AnalyticsFilter: {x:?}"), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(match x { -Self::And(v) => aws_sdk_s3::types::AnalyticsFilter::And(try_into_aws(v)?), -Self::Prefix(v) => aws_sdk_s3::types::AnalyticsFilter::Prefix(try_into_aws(v)?), -Self::Tag(v) => aws_sdk_s3::types::AnalyticsFilter::Tag(try_into_aws(v)?), -_ => unimplemented!("unknown variant of AnalyticsFilter: {x:?}"), -}) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::AnalyticsFilter::And(v) => Self::And(try_from_aws(v)?), + aws_sdk_s3::types::AnalyticsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), + aws_sdk_s3::types::AnalyticsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), + _ => unimplemented!("unknown variant of aws_sdk_s3::types::AnalyticsFilter: {x:?}"), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(match x { + Self::And(v) => aws_sdk_s3::types::AnalyticsFilter::And(try_into_aws(v)?), + Self::Prefix(v) => aws_sdk_s3::types::AnalyticsFilter::Prefix(try_into_aws(v)?), + Self::Tag(v) => aws_sdk_s3::types::AnalyticsFilter::Tag(try_into_aws(v)?), + _ => unimplemented!("unknown variant of AnalyticsFilter: {x:?}"), + }) + } } impl AwsConversion for s3s::dto::AnalyticsS3BucketDestination { type Target = aws_sdk_s3::types::AnalyticsS3BucketDestination; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: try_from_aws(x.bucket)?, -bucket_account_id: try_from_aws(x.bucket_account_id)?, -format: try_from_aws(x.format)?, -prefix: try_from_aws(x.prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_account_id(try_into_aws(x.bucket_account_id)?); -y = y.set_format(Some(try_into_aws(x.format)?)); -y = y.set_prefix(try_into_aws(x.prefix)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: try_from_aws(x.bucket)?, + bucket_account_id: try_from_aws(x.bucket_account_id)?, + format: try_from_aws(x.format)?, + prefix: try_from_aws(x.prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_account_id(try_into_aws(x.bucket_account_id)?); + y = y.set_format(Some(try_into_aws(x.format)?)); + y = y.set_prefix(try_into_aws(x.prefix)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::AnalyticsS3ExportFileFormat { type Target = aws_sdk_s3::types::AnalyticsS3ExportFileFormat; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::AnalyticsS3ExportFileFormat::Csv => Self::from_static(Self::CSV), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::AnalyticsS3ExportFileFormat::Csv => Self::from_static(Self::CSV), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::AnalyticsS3ExportFileFormat::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::AnalyticsS3ExportFileFormat::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ArchiveStatus { type Target = aws_sdk_s3::types::ArchiveStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ArchiveStatus::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), -aws_sdk_s3::types::ArchiveStatus::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ArchiveStatus::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), + aws_sdk_s3::types::ArchiveStatus::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ArchiveStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ArchiveStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Bucket { type Target = aws_sdk_s3::types::Bucket; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_region: try_from_aws(x.bucket_region)?, -creation_date: try_from_aws(x.creation_date)?, -name: try_from_aws(x.name)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_region: try_from_aws(x.bucket_region)?, + creation_date: try_from_aws(x.creation_date)?, + name: try_from_aws(x.name)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_region(try_into_aws(x.bucket_region)?); -y = y.set_creation_date(try_into_aws(x.creation_date)?); -y = y.set_name(try_into_aws(x.name)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_region(try_into_aws(x.bucket_region)?); + y = y.set_creation_date(try_into_aws(x.creation_date)?); + y = y.set_name(try_into_aws(x.name)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketAccelerateStatus { type Target = aws_sdk_s3::types::BucketAccelerateStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketAccelerateStatus::Enabled => Self::from_static(Self::ENABLED), -aws_sdk_s3::types::BucketAccelerateStatus::Suspended => Self::from_static(Self::SUSPENDED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketAccelerateStatus::Enabled => Self::from_static(Self::ENABLED), + aws_sdk_s3::types::BucketAccelerateStatus::Suspended => Self::from_static(Self::SUSPENDED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketAccelerateStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketAccelerateStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketAlreadyExists { type Target = aws_sdk_s3::types::error::BucketAlreadyExists; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketAlreadyOwnedByYou { type Target = aws_sdk_s3::types::error::BucketAlreadyOwnedByYou; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketCannedACL { type Target = aws_sdk_s3::types::BucketCannedAcl; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), -aws_sdk_s3::types::BucketCannedAcl::Private => Self::from_static(Self::PRIVATE), -aws_sdk_s3::types::BucketCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), -aws_sdk_s3::types::BucketCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), + aws_sdk_s3::types::BucketCannedAcl::Private => Self::from_static(Self::PRIVATE), + aws_sdk_s3::types::BucketCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), + aws_sdk_s3::types::BucketCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketCannedAcl::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketCannedAcl::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketInfo { type Target = aws_sdk_s3::types::BucketInfo; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -data_redundancy: try_from_aws(x.data_redundancy)?, -type_: try_from_aws(x.r#type)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + data_redundancy: try_from_aws(x.data_redundancy)?, + type_: try_from_aws(x.r#type)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_data_redundancy(try_into_aws(x.data_redundancy)?); -y = y.set_type(try_into_aws(x.type_)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_data_redundancy(try_into_aws(x.data_redundancy)?); + y = y.set_type(try_into_aws(x.type_)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketLifecycleConfiguration { type Target = aws_sdk_s3::types::BucketLifecycleConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -expiry_updated_at: None, -rules: try_from_aws(x.rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + expiry_updated_at: None, + rules: try_from_aws(x.rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_rules(Some(try_into_aws(x.rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_rules(Some(try_into_aws(x.rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::BucketLocationConstraint { type Target = aws_sdk_s3::types::BucketLocationConstraint; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketLocationConstraint::Eu => Self::from_static(Self::EU), -aws_sdk_s3::types::BucketLocationConstraint::AfSouth1 => Self::from_static(Self::AF_SOUTH_1), -aws_sdk_s3::types::BucketLocationConstraint::ApEast1 => Self::from_static(Self::AP_EAST_1), -aws_sdk_s3::types::BucketLocationConstraint::ApNortheast1 => Self::from_static(Self::AP_NORTHEAST_1), -aws_sdk_s3::types::BucketLocationConstraint::ApNortheast2 => Self::from_static(Self::AP_NORTHEAST_2), -aws_sdk_s3::types::BucketLocationConstraint::ApNortheast3 => Self::from_static(Self::AP_NORTHEAST_3), -aws_sdk_s3::types::BucketLocationConstraint::ApSouth1 => Self::from_static(Self::AP_SOUTH_1), -aws_sdk_s3::types::BucketLocationConstraint::ApSouth2 => Self::from_static(Self::AP_SOUTH_2), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast1 => Self::from_static(Self::AP_SOUTHEAST_1), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast2 => Self::from_static(Self::AP_SOUTHEAST_2), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast3 => Self::from_static(Self::AP_SOUTHEAST_3), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast4 => Self::from_static(Self::AP_SOUTHEAST_4), -aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast5 => Self::from_static(Self::AP_SOUTHEAST_5), -aws_sdk_s3::types::BucketLocationConstraint::CaCentral1 => Self::from_static(Self::CA_CENTRAL_1), -aws_sdk_s3::types::BucketLocationConstraint::CnNorth1 => Self::from_static(Self::CN_NORTH_1), -aws_sdk_s3::types::BucketLocationConstraint::CnNorthwest1 => Self::from_static(Self::CN_NORTHWEST_1), -aws_sdk_s3::types::BucketLocationConstraint::EuCentral1 => Self::from_static(Self::EU_CENTRAL_1), -aws_sdk_s3::types::BucketLocationConstraint::EuCentral2 => Self::from_static(Self::EU_CENTRAL_2), -aws_sdk_s3::types::BucketLocationConstraint::EuNorth1 => Self::from_static(Self::EU_NORTH_1), -aws_sdk_s3::types::BucketLocationConstraint::EuSouth1 => Self::from_static(Self::EU_SOUTH_1), -aws_sdk_s3::types::BucketLocationConstraint::EuSouth2 => Self::from_static(Self::EU_SOUTH_2), -aws_sdk_s3::types::BucketLocationConstraint::EuWest1 => Self::from_static(Self::EU_WEST_1), -aws_sdk_s3::types::BucketLocationConstraint::EuWest2 => Self::from_static(Self::EU_WEST_2), -aws_sdk_s3::types::BucketLocationConstraint::EuWest3 => Self::from_static(Self::EU_WEST_3), -aws_sdk_s3::types::BucketLocationConstraint::IlCentral1 => Self::from_static(Self::IL_CENTRAL_1), -aws_sdk_s3::types::BucketLocationConstraint::MeCentral1 => Self::from_static(Self::ME_CENTRAL_1), -aws_sdk_s3::types::BucketLocationConstraint::MeSouth1 => Self::from_static(Self::ME_SOUTH_1), -aws_sdk_s3::types::BucketLocationConstraint::SaEast1 => Self::from_static(Self::SA_EAST_1), -aws_sdk_s3::types::BucketLocationConstraint::UsEast2 => Self::from_static(Self::US_EAST_2), -aws_sdk_s3::types::BucketLocationConstraint::UsGovEast1 => Self::from_static(Self::US_GOV_EAST_1), -aws_sdk_s3::types::BucketLocationConstraint::UsGovWest1 => Self::from_static(Self::US_GOV_WEST_1), -aws_sdk_s3::types::BucketLocationConstraint::UsWest1 => Self::from_static(Self::US_WEST_1), -aws_sdk_s3::types::BucketLocationConstraint::UsWest2 => Self::from_static(Self::US_WEST_2), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketLocationConstraint::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketLocationConstraint::Eu => Self::from_static(Self::EU), + aws_sdk_s3::types::BucketLocationConstraint::AfSouth1 => Self::from_static(Self::AF_SOUTH_1), + aws_sdk_s3::types::BucketLocationConstraint::ApEast1 => Self::from_static(Self::AP_EAST_1), + aws_sdk_s3::types::BucketLocationConstraint::ApNortheast1 => Self::from_static(Self::AP_NORTHEAST_1), + aws_sdk_s3::types::BucketLocationConstraint::ApNortheast2 => Self::from_static(Self::AP_NORTHEAST_2), + aws_sdk_s3::types::BucketLocationConstraint::ApNortheast3 => Self::from_static(Self::AP_NORTHEAST_3), + aws_sdk_s3::types::BucketLocationConstraint::ApSouth1 => Self::from_static(Self::AP_SOUTH_1), + aws_sdk_s3::types::BucketLocationConstraint::ApSouth2 => Self::from_static(Self::AP_SOUTH_2), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast1 => Self::from_static(Self::AP_SOUTHEAST_1), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast2 => Self::from_static(Self::AP_SOUTHEAST_2), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast3 => Self::from_static(Self::AP_SOUTHEAST_3), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast4 => Self::from_static(Self::AP_SOUTHEAST_4), + aws_sdk_s3::types::BucketLocationConstraint::ApSoutheast5 => Self::from_static(Self::AP_SOUTHEAST_5), + aws_sdk_s3::types::BucketLocationConstraint::CaCentral1 => Self::from_static(Self::CA_CENTRAL_1), + aws_sdk_s3::types::BucketLocationConstraint::CnNorth1 => Self::from_static(Self::CN_NORTH_1), + aws_sdk_s3::types::BucketLocationConstraint::CnNorthwest1 => Self::from_static(Self::CN_NORTHWEST_1), + aws_sdk_s3::types::BucketLocationConstraint::EuCentral1 => Self::from_static(Self::EU_CENTRAL_1), + aws_sdk_s3::types::BucketLocationConstraint::EuCentral2 => Self::from_static(Self::EU_CENTRAL_2), + aws_sdk_s3::types::BucketLocationConstraint::EuNorth1 => Self::from_static(Self::EU_NORTH_1), + aws_sdk_s3::types::BucketLocationConstraint::EuSouth1 => Self::from_static(Self::EU_SOUTH_1), + aws_sdk_s3::types::BucketLocationConstraint::EuSouth2 => Self::from_static(Self::EU_SOUTH_2), + aws_sdk_s3::types::BucketLocationConstraint::EuWest1 => Self::from_static(Self::EU_WEST_1), + aws_sdk_s3::types::BucketLocationConstraint::EuWest2 => Self::from_static(Self::EU_WEST_2), + aws_sdk_s3::types::BucketLocationConstraint::EuWest3 => Self::from_static(Self::EU_WEST_3), + aws_sdk_s3::types::BucketLocationConstraint::IlCentral1 => Self::from_static(Self::IL_CENTRAL_1), + aws_sdk_s3::types::BucketLocationConstraint::MeCentral1 => Self::from_static(Self::ME_CENTRAL_1), + aws_sdk_s3::types::BucketLocationConstraint::MeSouth1 => Self::from_static(Self::ME_SOUTH_1), + aws_sdk_s3::types::BucketLocationConstraint::SaEast1 => Self::from_static(Self::SA_EAST_1), + aws_sdk_s3::types::BucketLocationConstraint::UsEast2 => Self::from_static(Self::US_EAST_2), + aws_sdk_s3::types::BucketLocationConstraint::UsGovEast1 => Self::from_static(Self::US_GOV_EAST_1), + aws_sdk_s3::types::BucketLocationConstraint::UsGovWest1 => Self::from_static(Self::US_GOV_WEST_1), + aws_sdk_s3::types::BucketLocationConstraint::UsWest1 => Self::from_static(Self::US_WEST_1), + aws_sdk_s3::types::BucketLocationConstraint::UsWest2 => Self::from_static(Self::US_WEST_2), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketLocationConstraint::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketLoggingStatus { type Target = aws_sdk_s3::types::BucketLoggingStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -logging_enabled: try_from_aws(x.logging_enabled)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + logging_enabled: try_from_aws(x.logging_enabled)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::BucketLogsPermission { type Target = aws_sdk_s3::types::BucketLogsPermission; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketLogsPermission::FullControl => Self::from_static(Self::FULL_CONTROL), -aws_sdk_s3::types::BucketLogsPermission::Read => Self::from_static(Self::READ), -aws_sdk_s3::types::BucketLogsPermission::Write => Self::from_static(Self::WRITE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketLogsPermission::FullControl => Self::from_static(Self::FULL_CONTROL), + aws_sdk_s3::types::BucketLogsPermission::Read => Self::from_static(Self::READ), + aws_sdk_s3::types::BucketLogsPermission::Write => Self::from_static(Self::WRITE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketLogsPermission::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketLogsPermission::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketType { type Target = aws_sdk_s3::types::BucketType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketType::Directory => Self::from_static(Self::DIRECTORY), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketType::Directory => Self::from_static(Self::DIRECTORY), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::BucketVersioningStatus { type Target = aws_sdk_s3::types::BucketVersioningStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::BucketVersioningStatus::Enabled => Self::from_static(Self::ENABLED), -aws_sdk_s3::types::BucketVersioningStatus::Suspended => Self::from_static(Self::SUSPENDED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::BucketVersioningStatus::Enabled => Self::from_static(Self::ENABLED), + aws_sdk_s3::types::BucketVersioningStatus::Suspended => Self::from_static(Self::SUSPENDED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::BucketVersioningStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::BucketVersioningStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::CORSConfiguration { type Target = aws_sdk_s3::types::CorsConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -cors_rules: try_from_aws(x.cors_rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + cors_rules: try_from_aws(x.cors_rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_cors_rules(Some(try_into_aws(x.cors_rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_cors_rules(Some(try_into_aws(x.cors_rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CORSRule { type Target = aws_sdk_s3::types::CorsRule; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -allowed_headers: try_from_aws(x.allowed_headers)?, -allowed_methods: try_from_aws(x.allowed_methods)?, -allowed_origins: try_from_aws(x.allowed_origins)?, -expose_headers: try_from_aws(x.expose_headers)?, -id: try_from_aws(x.id)?, -max_age_seconds: try_from_aws(x.max_age_seconds)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_allowed_headers(try_into_aws(x.allowed_headers)?); -y = y.set_allowed_methods(Some(try_into_aws(x.allowed_methods)?)); -y = y.set_allowed_origins(Some(try_into_aws(x.allowed_origins)?)); -y = y.set_expose_headers(try_into_aws(x.expose_headers)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_max_age_seconds(try_into_aws(x.max_age_seconds)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + allowed_headers: try_from_aws(x.allowed_headers)?, + allowed_methods: try_from_aws(x.allowed_methods)?, + allowed_origins: try_from_aws(x.allowed_origins)?, + expose_headers: try_from_aws(x.expose_headers)?, + id: try_from_aws(x.id)?, + max_age_seconds: try_from_aws(x.max_age_seconds)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_allowed_headers(try_into_aws(x.allowed_headers)?); + y = y.set_allowed_methods(Some(try_into_aws(x.allowed_methods)?)); + y = y.set_allowed_origins(Some(try_into_aws(x.allowed_origins)?)); + y = y.set_expose_headers(try_into_aws(x.expose_headers)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_max_age_seconds(try_into_aws(x.max_age_seconds)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CSVInput { type Target = aws_sdk_s3::types::CsvInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -allow_quoted_record_delimiter: try_from_aws(x.allow_quoted_record_delimiter)?, -comments: try_from_aws(x.comments)?, -field_delimiter: try_from_aws(x.field_delimiter)?, -file_header_info: try_from_aws(x.file_header_info)?, -quote_character: try_from_aws(x.quote_character)?, -quote_escape_character: try_from_aws(x.quote_escape_character)?, -record_delimiter: try_from_aws(x.record_delimiter)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_allow_quoted_record_delimiter(try_into_aws(x.allow_quoted_record_delimiter)?); -y = y.set_comments(try_into_aws(x.comments)?); -y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); -y = y.set_file_header_info(try_into_aws(x.file_header_info)?); -y = y.set_quote_character(try_into_aws(x.quote_character)?); -y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); -y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + allow_quoted_record_delimiter: try_from_aws(x.allow_quoted_record_delimiter)?, + comments: try_from_aws(x.comments)?, + field_delimiter: try_from_aws(x.field_delimiter)?, + file_header_info: try_from_aws(x.file_header_info)?, + quote_character: try_from_aws(x.quote_character)?, + quote_escape_character: try_from_aws(x.quote_escape_character)?, + record_delimiter: try_from_aws(x.record_delimiter)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_allow_quoted_record_delimiter(try_into_aws(x.allow_quoted_record_delimiter)?); + y = y.set_comments(try_into_aws(x.comments)?); + y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); + y = y.set_file_header_info(try_into_aws(x.file_header_info)?); + y = y.set_quote_character(try_into_aws(x.quote_character)?); + y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); + y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CSVOutput { type Target = aws_sdk_s3::types::CsvOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -field_delimiter: try_from_aws(x.field_delimiter)?, -quote_character: try_from_aws(x.quote_character)?, -quote_escape_character: try_from_aws(x.quote_escape_character)?, -quote_fields: try_from_aws(x.quote_fields)?, -record_delimiter: try_from_aws(x.record_delimiter)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); -y = y.set_quote_character(try_into_aws(x.quote_character)?); -y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); -y = y.set_quote_fields(try_into_aws(x.quote_fields)?); -y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + field_delimiter: try_from_aws(x.field_delimiter)?, + quote_character: try_from_aws(x.quote_character)?, + quote_escape_character: try_from_aws(x.quote_escape_character)?, + quote_fields: try_from_aws(x.quote_fields)?, + record_delimiter: try_from_aws(x.record_delimiter)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_field_delimiter(try_into_aws(x.field_delimiter)?); + y = y.set_quote_character(try_into_aws(x.quote_character)?); + y = y.set_quote_escape_character(try_into_aws(x.quote_escape_character)?); + y = y.set_quote_fields(try_into_aws(x.quote_fields)?); + y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Checksum { type Target = aws_sdk_s3::types::Checksum; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ChecksumAlgorithm { type Target = aws_sdk_s3::types::ChecksumAlgorithm; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ChecksumAlgorithm::Crc32 => Self::from_static(Self::CRC32), -aws_sdk_s3::types::ChecksumAlgorithm::Crc32C => Self::from_static(Self::CRC32C), -aws_sdk_s3::types::ChecksumAlgorithm::Crc64Nvme => Self::from_static(Self::CRC64NVME), -aws_sdk_s3::types::ChecksumAlgorithm::Sha1 => Self::from_static(Self::SHA1), -aws_sdk_s3::types::ChecksumAlgorithm::Sha256 => Self::from_static(Self::SHA256), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ChecksumAlgorithm::Crc32 => Self::from_static(Self::CRC32), + aws_sdk_s3::types::ChecksumAlgorithm::Crc32C => Self::from_static(Self::CRC32C), + aws_sdk_s3::types::ChecksumAlgorithm::Crc64Nvme => Self::from_static(Self::CRC64NVME), + aws_sdk_s3::types::ChecksumAlgorithm::Sha1 => Self::from_static(Self::SHA1), + aws_sdk_s3::types::ChecksumAlgorithm::Sha256 => Self::from_static(Self::SHA256), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ChecksumAlgorithm::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ChecksumAlgorithm::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ChecksumMode { type Target = aws_sdk_s3::types::ChecksumMode; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ChecksumMode::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ChecksumMode::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ChecksumMode::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ChecksumMode::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ChecksumType { type Target = aws_sdk_s3::types::ChecksumType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ChecksumType::Composite => Self::from_static(Self::COMPOSITE), -aws_sdk_s3::types::ChecksumType::FullObject => Self::from_static(Self::FULL_OBJECT), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ChecksumType::Composite => Self::from_static(Self::COMPOSITE), + aws_sdk_s3::types::ChecksumType::FullObject => Self::from_static(Self::FULL_OBJECT), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ChecksumType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ChecksumType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::CommonPrefix { type Target = aws_sdk_s3::types::CommonPrefix; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(try_into_aws(x.prefix)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(try_into_aws(x.prefix)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CompleteMultipartUploadInput { type Target = aws_sdk_s3::operation::complete_multipart_upload::CompleteMultipartUploadInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match: try_from_aws(x.if_match)?, -if_none_match: try_from_aws(x.if_none_match)?, -key: unwrap_from_aws(x.key, "key")?, -mpu_object_size: try_from_aws(x.mpu_object_size)?, -multipart_upload: try_from_aws(x.multipart_upload)?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_none_match(try_into_aws(x.if_none_match)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_mpu_object_size(try_into_aws(x.mpu_object_size)?); -y = y.set_multipart_upload(try_into_aws(x.multipart_upload)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match: try_from_aws(x.if_match)?, + if_none_match: try_from_aws(x.if_none_match)?, + key: unwrap_from_aws(x.key, "key")?, + mpu_object_size: try_from_aws(x.mpu_object_size)?, + multipart_upload: try_from_aws(x.multipart_upload)?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_none_match(try_into_aws(x.if_none_match)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_mpu_object_size(try_into_aws(x.mpu_object_size)?); + y = y.set_multipart_upload(try_into_aws(x.multipart_upload)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CompleteMultipartUploadOutput { type Target = aws_sdk_s3::operation::complete_multipart_upload::CompleteMultipartUploadOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: try_from_aws(x.bucket)?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -expiration: try_from_aws(x.expiration)?, -key: try_from_aws(x.key)?, -location: try_from_aws(x.location)?, -request_charged: try_from_aws(x.request_charged)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -version_id: try_from_aws(x.version_id)?, -future: None, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_location(try_into_aws(x.location)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: try_from_aws(x.bucket)?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + expiration: try_from_aws(x.expiration)?, + key: try_from_aws(x.key)?, + location: try_from_aws(x.location)?, + request_charged: try_from_aws(x.request_charged)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + version_id: try_from_aws(x.version_id)?, + future: None, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_location(try_into_aws(x.location)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CompletedMultipartUpload { type Target = aws_sdk_s3::types::CompletedMultipartUpload; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -parts: try_from_aws(x.parts)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + parts: try_from_aws(x.parts)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_parts(try_into_aws(x.parts)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_parts(try_into_aws(x.parts)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CompletedPart { type Target = aws_sdk_s3::types::CompletedPart; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -e_tag: try_from_aws(x.e_tag)?, -part_number: try_from_aws(x.part_number)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_part_number(try_into_aws(x.part_number)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + e_tag: try_from_aws(x.e_tag)?, + part_number: try_from_aws(x.part_number)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_part_number(try_into_aws(x.part_number)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CompressionType { type Target = aws_sdk_s3::types::CompressionType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::CompressionType::Bzip2 => Self::from_static(Self::BZIP2), -aws_sdk_s3::types::CompressionType::Gzip => Self::from_static(Self::GZIP), -aws_sdk_s3::types::CompressionType::None => Self::from_static(Self::NONE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::CompressionType::Bzip2 => Self::from_static(Self::BZIP2), + aws_sdk_s3::types::CompressionType::Gzip => Self::from_static(Self::GZIP), + aws_sdk_s3::types::CompressionType::None => Self::from_static(Self::NONE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::CompressionType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::CompressionType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Condition { type Target = aws_sdk_s3::types::Condition; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -http_error_code_returned_equals: try_from_aws(x.http_error_code_returned_equals)?, -key_prefix_equals: try_from_aws(x.key_prefix_equals)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + http_error_code_returned_equals: try_from_aws(x.http_error_code_returned_equals)?, + key_prefix_equals: try_from_aws(x.key_prefix_equals)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_http_error_code_returned_equals(try_into_aws(x.http_error_code_returned_equals)?); -y = y.set_key_prefix_equals(try_into_aws(x.key_prefix_equals)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_http_error_code_returned_equals(try_into_aws(x.http_error_code_returned_equals)?); + y = y.set_key_prefix_equals(try_into_aws(x.key_prefix_equals)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ContinuationEvent { type Target = aws_sdk_s3::types::ContinuationEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CopyObjectInput { type Target = aws_sdk_s3::operation::copy_object::CopyObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_type: try_from_aws(x.content_type)?, -copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, -copy_source_if_match: try_from_aws(x.copy_source_if_match)?, -copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, -copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, -copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, -copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, -copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, -copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, -expires: try_from_aws(x.expires)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -key: unwrap_from_aws(x.key, "key")?, -metadata: try_from_aws(x.metadata)?, -metadata_directive: try_from_aws(x.metadata_directive)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -tagging: try_from_aws(x.tagging)?, -tagging_directive: try_from_aws(x.tagging_directive)?, -version_id: None, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); -y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); -y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); -y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); -y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); -y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); -y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); -y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_metadata_directive(try_into_aws(x.metadata_directive)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tagging(try_into_aws(x.tagging)?); -y = y.set_tagging_directive(try_into_aws(x.tagging_directive)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_type: try_from_aws(x.content_type)?, + copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, + copy_source_if_match: try_from_aws(x.copy_source_if_match)?, + copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, + copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, + copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, + copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, + copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, + copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, + expires: try_from_aws(x.expires)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + key: unwrap_from_aws(x.key, "key")?, + metadata: try_from_aws(x.metadata)?, + metadata_directive: try_from_aws(x.metadata_directive)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + tagging: try_from_aws(x.tagging)?, + tagging_directive: try_from_aws(x.tagging_directive)?, + version_id: None, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); + y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); + y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); + y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); + y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); + y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); + y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); + y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_metadata_directive(try_into_aws(x.metadata_directive)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tagging(try_into_aws(x.tagging)?); + y = y.set_tagging_directive(try_into_aws(x.tagging_directive)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CopyObjectOutput { type Target = aws_sdk_s3::operation::copy_object::CopyObjectOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -copy_object_result: try_from_aws(x.copy_object_result)?, -copy_source_version_id: try_from_aws(x.copy_source_version_id)?, -expiration: try_from_aws(x.expiration)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_copy_object_result(try_into_aws(x.copy_object_result)?); -y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + copy_object_result: try_from_aws(x.copy_object_result)?, + copy_source_version_id: try_from_aws(x.copy_source_version_id)?, + expiration: try_from_aws(x.expiration)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_copy_object_result(try_into_aws(x.copy_object_result)?); + y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CopyObjectResult { type Target = aws_sdk_s3::types::CopyObjectResult; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -last_modified: try_from_aws(x.last_modified)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + last_modified: try_from_aws(x.last_modified)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CopyPartResult { type Target = aws_sdk_s3::types::CopyPartResult; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -e_tag: try_from_aws(x.e_tag)?, -last_modified: try_from_aws(x.last_modified)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + e_tag: try_from_aws(x.e_tag)?, + last_modified: try_from_aws(x.last_modified)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateBucketConfiguration { type Target = aws_sdk_s3::types::CreateBucketConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: try_from_aws(x.bucket)?, -location: try_from_aws(x.location)?, -location_constraint: try_from_aws(x.location_constraint)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: try_from_aws(x.bucket)?, + location: try_from_aws(x.location)?, + location_constraint: try_from_aws(x.location_constraint)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_location(try_into_aws(x.location)?); -y = y.set_location_constraint(try_into_aws(x.location_constraint)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_location(try_into_aws(x.location)?); + y = y.set_location_constraint(try_into_aws(x.location_constraint)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateBucketInput { type Target = aws_sdk_s3::operation::create_bucket::CreateBucketInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -create_bucket_configuration: try_from_aws(x.create_bucket_configuration)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write: try_from_aws(x.grant_write)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -object_lock_enabled_for_bucket: try_from_aws(x.object_lock_enabled_for_bucket)?, -object_ownership: try_from_aws(x.object_ownership)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_create_bucket_configuration(try_into_aws(x.create_bucket_configuration)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write(try_into_aws(x.grant_write)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_object_lock_enabled_for_bucket(try_into_aws(x.object_lock_enabled_for_bucket)?); -y = y.set_object_ownership(try_into_aws(x.object_ownership)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + create_bucket_configuration: try_from_aws(x.create_bucket_configuration)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write: try_from_aws(x.grant_write)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + object_lock_enabled_for_bucket: try_from_aws(x.object_lock_enabled_for_bucket)?, + object_ownership: try_from_aws(x.object_ownership)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_create_bucket_configuration(try_into_aws(x.create_bucket_configuration)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write(try_into_aws(x.grant_write)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_object_lock_enabled_for_bucket(try_into_aws(x.object_lock_enabled_for_bucket)?); + y = y.set_object_ownership(try_into_aws(x.object_ownership)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CreateBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -metadata_table_configuration: unwrap_from_aws(x.metadata_table_configuration, "metadata_table_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_metadata_table_configuration(Some(try_into_aws(x.metadata_table_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + metadata_table_configuration: unwrap_from_aws(x.metadata_table_configuration, "metadata_table_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_metadata_table_configuration(Some(try_into_aws(x.metadata_table_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CreateBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::create_bucket_metadata_table_configuration::CreateBucketMetadataTableConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateBucketOutput { type Target = aws_sdk_s3::operation::create_bucket::CreateBucketOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -location: try_from_aws(x.location)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + location: try_from_aws(x.location)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_location(try_into_aws(x.location)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_location(try_into_aws(x.location)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateMultipartUploadInput { type Target = aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_type: try_from_aws(x.content_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -expires: try_from_aws(x.expires)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -key: unwrap_from_aws(x.key, "key")?, -metadata: try_from_aws(x.metadata)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -tagging: try_from_aws(x.tagging)?, -version_id: None, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tagging(try_into_aws(x.tagging)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_type: try_from_aws(x.content_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + expires: try_from_aws(x.expires)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + key: unwrap_from_aws(x.key, "key")?, + metadata: try_from_aws(x.metadata)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + tagging: try_from_aws(x.tagging)?, + version_id: None, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tagging(try_into_aws(x.tagging)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CreateMultipartUploadOutput { type Target = aws_sdk_s3::operation::create_multipart_upload::CreateMultipartUploadOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -abort_date: try_from_aws(x.abort_date)?, -abort_rule_id: try_from_aws(x.abort_rule_id)?, -bucket: try_from_aws(x.bucket)?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -key: try_from_aws(x.key)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -upload_id: try_from_aws(x.upload_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_abort_date(try_into_aws(x.abort_date)?); -y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_upload_id(try_into_aws(x.upload_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + abort_date: try_from_aws(x.abort_date)?, + abort_rule_id: try_from_aws(x.abort_rule_id)?, + bucket: try_from_aws(x.bucket)?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + key: try_from_aws(x.key)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + upload_id: try_from_aws(x.upload_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_abort_date(try_into_aws(x.abort_date)?); + y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_upload_id(try_into_aws(x.upload_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::CreateSessionInput { type Target = aws_sdk_s3::operation::create_session::CreateSessionInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -session_mode: try_from_aws(x.session_mode)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_session_mode(try_into_aws(x.session_mode)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + session_mode: try_from_aws(x.session_mode)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_session_mode(try_into_aws(x.session_mode)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::CreateSessionOutput { type Target = aws_sdk_s3::operation::create_session::CreateSessionOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -credentials: unwrap_from_aws(x.credentials, "credentials")?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_credentials(Some(try_into_aws(x.credentials)?)); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + credentials: unwrap_from_aws(x.credentials, "credentials")?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_credentials(Some(try_into_aws(x.credentials)?)); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DataRedundancy { type Target = aws_sdk_s3::types::DataRedundancy; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::DataRedundancy::SingleAvailabilityZone => Self::from_static(Self::SINGLE_AVAILABILITY_ZONE), -aws_sdk_s3::types::DataRedundancy::SingleLocalZone => Self::from_static(Self::SINGLE_LOCAL_ZONE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::DataRedundancy::SingleAvailabilityZone => Self::from_static(Self::SINGLE_AVAILABILITY_ZONE), + aws_sdk_s3::types::DataRedundancy::SingleLocalZone => Self::from_static(Self::SINGLE_LOCAL_ZONE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::DataRedundancy::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::DataRedundancy::from(x.as_str())) + } } impl AwsConversion for s3s::dto::DefaultRetention { type Target = aws_sdk_s3::types::DefaultRetention; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -days: try_from_aws(x.days)?, -mode: try_from_aws(x.mode)?, -years: try_from_aws(x.years)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + days: try_from_aws(x.days)?, + mode: try_from_aws(x.mode)?, + years: try_from_aws(x.years)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_days(try_into_aws(x.days)?); -y = y.set_mode(try_into_aws(x.mode)?); -y = y.set_years(try_into_aws(x.years)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_days(try_into_aws(x.days)?); + y = y.set_mode(try_into_aws(x.mode)?); + y = y.set_years(try_into_aws(x.years)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Delete { type Target = aws_sdk_s3::types::Delete; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -objects: try_from_aws(x.objects)?, -quiet: try_from_aws(x.quiet)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + objects: try_from_aws(x.objects)?, + quiet: try_from_aws(x.quiet)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_objects(Some(try_into_aws(x.objects)?)); -y = y.set_quiet(try_into_aws(x.quiet)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_objects(Some(try_into_aws(x.objects)?)); + y = y.set_quiet(try_into_aws(x.quiet)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_analytics_configuration::DeleteBucketAnalyticsConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_analytics_configuration::DeleteBucketAnalyticsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketCorsInput { type Target = aws_sdk_s3::operation::delete_bucket_cors::DeleteBucketCorsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketCorsOutput { type Target = aws_sdk_s3::operation::delete_bucket_cors::DeleteBucketCorsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketEncryptionInput { type Target = aws_sdk_s3::operation::delete_bucket_encryption::DeleteBucketEncryptionInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketEncryptionOutput { type Target = aws_sdk_s3::operation::delete_bucket_encryption::DeleteBucketEncryptionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketInput { type Target = aws_sdk_s3::operation::delete_bucket::DeleteBucketInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -force_delete: None, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + force_delete: None, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketIntelligentTieringConfigurationInput { - type Target = aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationInput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationInput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketIntelligentTieringConfigurationOutput { - type Target = aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationOutput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::delete_bucket_intelligent_tiering_configuration::DeleteBucketIntelligentTieringConfigurationOutput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_inventory_configuration::DeleteBucketInventoryConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_inventory_configuration::DeleteBucketInventoryConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketLifecycleInput { type Target = aws_sdk_s3::operation::delete_bucket_lifecycle::DeleteBucketLifecycleInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketLifecycleOutput { type Target = aws_sdk_s3::operation::delete_bucket_lifecycle::DeleteBucketLifecycleOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_metadata_table_configuration::DeleteBucketMetadataTableConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::delete_bucket_metrics_configuration::DeleteBucketMetricsConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::delete_bucket_metrics_configuration::DeleteBucketMetricsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketOutput { type Target = aws_sdk_s3::operation::delete_bucket::DeleteBucketOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::delete_bucket_ownership_controls::DeleteBucketOwnershipControlsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::delete_bucket_ownership_controls::DeleteBucketOwnershipControlsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketPolicyInput { type Target = aws_sdk_s3::operation::delete_bucket_policy::DeleteBucketPolicyInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketPolicyOutput { type Target = aws_sdk_s3::operation::delete_bucket_policy::DeleteBucketPolicyOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketReplicationInput { type Target = aws_sdk_s3::operation::delete_bucket_replication::DeleteBucketReplicationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketReplicationOutput { type Target = aws_sdk_s3::operation::delete_bucket_replication::DeleteBucketReplicationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketTaggingInput { type Target = aws_sdk_s3::operation::delete_bucket_tagging::DeleteBucketTaggingInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketTaggingOutput { type Target = aws_sdk_s3::operation::delete_bucket_tagging::DeleteBucketTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteBucketWebsiteInput { type Target = aws_sdk_s3::operation::delete_bucket_website::DeleteBucketWebsiteInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteBucketWebsiteOutput { type Target = aws_sdk_s3::operation::delete_bucket_website::DeleteBucketWebsiteOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteMarkerEntry { type Target = aws_sdk_s3::types::DeleteMarkerEntry; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -is_latest: try_from_aws(x.is_latest)?, -key: try_from_aws(x.key)?, -last_modified: try_from_aws(x.last_modified)?, -owner: try_from_aws(x.owner)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_is_latest(try_into_aws(x.is_latest)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + is_latest: try_from_aws(x.is_latest)?, + key: try_from_aws(x.key)?, + last_modified: try_from_aws(x.last_modified)?, + owner: try_from_aws(x.owner)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_is_latest(try_into_aws(x.is_latest)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteMarkerReplication { type Target = aws_sdk_s3::types::DeleteMarkerReplication; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteMarkerReplicationStatus { type Target = aws_sdk_s3::types::DeleteMarkerReplicationStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::DeleteMarkerReplicationStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::DeleteMarkerReplicationStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::DeleteMarkerReplicationStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::DeleteMarkerReplicationStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::DeleteMarkerReplicationStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::DeleteMarkerReplicationStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::DeleteObjectInput { type Target = aws_sdk_s3::operation::delete_object::DeleteObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match: try_from_aws(x.if_match)?, -if_match_last_modified_time: try_from_aws(x.if_match_last_modified_time)?, -if_match_size: try_from_aws(x.if_match_size)?, -key: unwrap_from_aws(x.key, "key")?, -mfa: try_from_aws(x.mfa)?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_match_last_modified_time(try_into_aws(x.if_match_last_modified_time)?); -y = y.set_if_match_size(try_into_aws(x.if_match_size)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_mfa(try_into_aws(x.mfa)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match: try_from_aws(x.if_match)?, + if_match_last_modified_time: try_from_aws(x.if_match_last_modified_time)?, + if_match_size: try_from_aws(x.if_match_size)?, + key: unwrap_from_aws(x.key, "key")?, + mfa: try_from_aws(x.mfa)?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_match_last_modified_time(try_into_aws(x.if_match_last_modified_time)?); + y = y.set_if_match_size(try_into_aws(x.if_match_size)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_mfa(try_into_aws(x.mfa)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteObjectOutput { type Target = aws_sdk_s3::operation::delete_object::DeleteObjectOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -delete_marker: try_from_aws(x.delete_marker)?, -request_charged: try_from_aws(x.request_charged)?, -version_id: try_from_aws(x.version_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + delete_marker: try_from_aws(x.delete_marker)?, + request_charged: try_from_aws(x.request_charged)?, + version_id: try_from_aws(x.version_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteObjectTaggingInput { type Target = aws_sdk_s3::operation::delete_object_tagging::DeleteObjectTaggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteObjectTaggingOutput { type Target = aws_sdk_s3::operation::delete_object_tagging::DeleteObjectTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -version_id: try_from_aws(x.version_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + version_id: try_from_aws(x.version_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeleteObjectsInput { type Target = aws_sdk_s3::operation::delete_objects::DeleteObjectsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -delete: unwrap_from_aws(x.delete, "delete")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -mfa: try_from_aws(x.mfa)?, -request_payer: try_from_aws(x.request_payer)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_delete(Some(try_into_aws(x.delete)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_mfa(try_into_aws(x.mfa)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + delete: unwrap_from_aws(x.delete, "delete")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + mfa: try_from_aws(x.mfa)?, + request_payer: try_from_aws(x.request_payer)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_delete(Some(try_into_aws(x.delete)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_mfa(try_into_aws(x.mfa)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeleteObjectsOutput { type Target = aws_sdk_s3::operation::delete_objects::DeleteObjectsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -deleted: try_from_aws(x.deleted)?, -errors: try_from_aws(x.errors)?, -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + deleted: try_from_aws(x.deleted)?, + errors: try_from_aws(x.errors)?, + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_deleted(try_into_aws(x.deleted)?); -y = y.set_errors(try_into_aws(x.errors)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_deleted(try_into_aws(x.deleted)?); + y = y.set_errors(try_into_aws(x.errors)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeletePublicAccessBlockInput { type Target = aws_sdk_s3::operation::delete_public_access_block::DeletePublicAccessBlockInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::DeletePublicAccessBlockOutput { type Target = aws_sdk_s3::operation::delete_public_access_block::DeletePublicAccessBlockOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::DeletedObject { type Target = aws_sdk_s3::types::DeletedObject; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -delete_marker: try_from_aws(x.delete_marker)?, -delete_marker_version_id: try_from_aws(x.delete_marker_version_id)?, -key: try_from_aws(x.key)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_delete_marker_version_id(try_into_aws(x.delete_marker_version_id)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + delete_marker: try_from_aws(x.delete_marker)?, + delete_marker_version_id: try_from_aws(x.delete_marker_version_id)?, + key: try_from_aws(x.key)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_delete_marker_version_id(try_into_aws(x.delete_marker_version_id)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Destination { type Target = aws_sdk_s3::types::Destination; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_control_translation: try_from_aws(x.access_control_translation)?, -account: try_from_aws(x.account)?, -bucket: try_from_aws(x.bucket)?, -encryption_configuration: try_from_aws(x.encryption_configuration)?, -metrics: try_from_aws(x.metrics)?, -replication_time: try_from_aws(x.replication_time)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_control_translation(try_into_aws(x.access_control_translation)?); -y = y.set_account(try_into_aws(x.account)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_encryption_configuration(try_into_aws(x.encryption_configuration)?); -y = y.set_metrics(try_into_aws(x.metrics)?); -y = y.set_replication_time(try_into_aws(x.replication_time)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_control_translation: try_from_aws(x.access_control_translation)?, + account: try_from_aws(x.account)?, + bucket: try_from_aws(x.bucket)?, + encryption_configuration: try_from_aws(x.encryption_configuration)?, + metrics: try_from_aws(x.metrics)?, + replication_time: try_from_aws(x.replication_time)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_control_translation(try_into_aws(x.access_control_translation)?); + y = y.set_account(try_into_aws(x.account)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_encryption_configuration(try_into_aws(x.encryption_configuration)?); + y = y.set_metrics(try_into_aws(x.metrics)?); + y = y.set_replication_time(try_into_aws(x.replication_time)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::EncodingType { type Target = aws_sdk_s3::types::EncodingType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::EncodingType::Url => Self::from_static(Self::URL), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::EncodingType::Url => Self::from_static(Self::URL), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::EncodingType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::EncodingType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Encryption { type Target = aws_sdk_s3::types::Encryption; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -encryption_type: try_from_aws(x.encryption_type)?, -kms_context: try_from_aws(x.kms_context)?, -kms_key_id: try_from_aws(x.kms_key_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + encryption_type: try_from_aws(x.encryption_type)?, + kms_context: try_from_aws(x.kms_context)?, + kms_key_id: try_from_aws(x.kms_key_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_encryption_type(Some(try_into_aws(x.encryption_type)?)); -y = y.set_kms_context(try_into_aws(x.kms_context)?); -y = y.set_kms_key_id(try_into_aws(x.kms_key_id)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_encryption_type(Some(try_into_aws(x.encryption_type)?)); + y = y.set_kms_context(try_into_aws(x.kms_context)?); + y = y.set_kms_key_id(try_into_aws(x.kms_key_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::EncryptionConfiguration { type Target = aws_sdk_s3::types::EncryptionConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -replica_kms_key_id: try_from_aws(x.replica_kms_key_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + replica_kms_key_id: try_from_aws(x.replica_kms_key_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_replica_kms_key_id(try_into_aws(x.replica_kms_key_id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_replica_kms_key_id(try_into_aws(x.replica_kms_key_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::EncryptionTypeMismatch { type Target = aws_sdk_s3::types::error::EncryptionTypeMismatch; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::EndEvent { type Target = aws_sdk_s3::types::EndEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Error { type Target = aws_sdk_s3::types::Error; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -code: try_from_aws(x.code)?, -key: try_from_aws(x.key)?, -message: try_from_aws(x.message)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_code(try_into_aws(x.code)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_message(try_into_aws(x.message)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + code: try_from_aws(x.code)?, + key: try_from_aws(x.key)?, + message: try_from_aws(x.message)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_code(try_into_aws(x.code)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_message(try_into_aws(x.message)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ErrorDetails { type Target = aws_sdk_s3::types::ErrorDetails; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -error_code: try_from_aws(x.error_code)?, -error_message: try_from_aws(x.error_message)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + error_code: try_from_aws(x.error_code)?, + error_message: try_from_aws(x.error_message)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_error_code(try_into_aws(x.error_code)?); -y = y.set_error_message(try_into_aws(x.error_message)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_error_code(try_into_aws(x.error_code)?); + y = y.set_error_message(try_into_aws(x.error_message)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ErrorDocument { type Target = aws_sdk_s3::types::ErrorDocument; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -key: try_from_aws(x.key)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + key: try_from_aws(x.key)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_key(Some(try_into_aws(x.key)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_key(Some(try_into_aws(x.key)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::EventBridgeConfiguration { type Target = aws_sdk_s3::types::EventBridgeConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ExistingObjectReplication { type Target = aws_sdk_s3::types::ExistingObjectReplication; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ExistingObjectReplicationStatus { type Target = aws_sdk_s3::types::ExistingObjectReplicationStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ExistingObjectReplicationStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ExistingObjectReplicationStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ExistingObjectReplicationStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ExistingObjectReplicationStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ExistingObjectReplicationStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ExistingObjectReplicationStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ExpirationStatus { type Target = aws_sdk_s3::types::ExpirationStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ExpirationStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ExpirationStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ExpirationStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ExpirationStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ExpirationStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ExpirationStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ExpressionType { type Target = aws_sdk_s3::types::ExpressionType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ExpressionType::Sql => Self::from_static(Self::SQL), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ExpressionType::Sql => Self::from_static(Self::SQL), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ExpressionType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ExpressionType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::FileHeaderInfo { type Target = aws_sdk_s3::types::FileHeaderInfo; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::FileHeaderInfo::Ignore => Self::from_static(Self::IGNORE), -aws_sdk_s3::types::FileHeaderInfo::None => Self::from_static(Self::NONE), -aws_sdk_s3::types::FileHeaderInfo::Use => Self::from_static(Self::USE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::FileHeaderInfo::Ignore => Self::from_static(Self::IGNORE), + aws_sdk_s3::types::FileHeaderInfo::None => Self::from_static(Self::NONE), + aws_sdk_s3::types::FileHeaderInfo::Use => Self::from_static(Self::USE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::FileHeaderInfo::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::FileHeaderInfo::from(x.as_str())) + } } impl AwsConversion for s3s::dto::FilterRule { type Target = aws_sdk_s3::types::FilterRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -value: try_from_aws(x.value)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + value: try_from_aws(x.value)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_value(try_into_aws(x.value)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_value(try_into_aws(x.value)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::FilterRuleName { type Target = aws_sdk_s3::types::FilterRuleName; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::FilterRuleName::Prefix => Self::from_static(Self::PREFIX), -aws_sdk_s3::types::FilterRuleName::Suffix => Self::from_static(Self::SUFFIX), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::FilterRuleName::Prefix => Self::from_static(Self::PREFIX), + aws_sdk_s3::types::FilterRuleName::Suffix => Self::from_static(Self::SUFFIX), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::FilterRuleName::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::FilterRuleName::from(x.as_str())) + } } impl AwsConversion for s3s::dto::GetBucketAccelerateConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -request_payer: try_from_aws(x.request_payer)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + request_payer: try_from_aws(x.request_payer)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketAccelerateConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_accelerate_configuration::GetBucketAccelerateConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketAclInput { type Target = aws_sdk_s3::operation::get_bucket_acl::GetBucketAclInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketAclOutput { type Target = aws_sdk_s3::operation::get_bucket_acl::GetBucketAclOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grants: try_from_aws(x.grants)?, -owner: try_from_aws(x.owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grants: try_from_aws(x.grants)?, + owner: try_from_aws(x.owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grants(try_into_aws(x.grants)?); -y = y.set_owner(try_into_aws(x.owner)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grants(try_into_aws(x.grants)?); + y = y.set_owner(try_into_aws(x.owner)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_analytics_configuration::GetBucketAnalyticsConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_analytics_configuration::GetBucketAnalyticsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -analytics_configuration: try_from_aws(x.analytics_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + analytics_configuration: try_from_aws(x.analytics_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_analytics_configuration(try_into_aws(x.analytics_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_analytics_configuration(try_into_aws(x.analytics_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketCorsInput { type Target = aws_sdk_s3::operation::get_bucket_cors::GetBucketCorsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketCorsOutput { type Target = aws_sdk_s3::operation::get_bucket_cors::GetBucketCorsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -cors_rules: try_from_aws(x.cors_rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + cors_rules: try_from_aws(x.cors_rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_cors_rules(try_into_aws(x.cors_rules)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_cors_rules(try_into_aws(x.cors_rules)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketEncryptionInput { type Target = aws_sdk_s3::operation::get_bucket_encryption::GetBucketEncryptionInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketEncryptionOutput { type Target = aws_sdk_s3::operation::get_bucket_encryption::GetBucketEncryptionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -server_side_encryption_configuration: try_from_aws(x.server_side_encryption_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + server_side_encryption_configuration: try_from_aws(x.server_side_encryption_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_server_side_encryption_configuration(try_into_aws(x.server_side_encryption_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_server_side_encryption_configuration(try_into_aws(x.server_side_encryption_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketIntelligentTieringConfigurationInput { - type Target = aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationInput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationInput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketIntelligentTieringConfigurationOutput { - type Target = aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::get_bucket_intelligent_tiering_configuration::GetBucketIntelligentTieringConfigurationOutput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -intelligent_tiering_configuration: try_from_aws(x.intelligent_tiering_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + intelligent_tiering_configuration: try_from_aws(x.intelligent_tiering_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_intelligent_tiering_configuration(try_into_aws(x.intelligent_tiering_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_intelligent_tiering_configuration(try_into_aws(x.intelligent_tiering_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_inventory_configuration::GetBucketInventoryConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_inventory_configuration::GetBucketInventoryConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -inventory_configuration: try_from_aws(x.inventory_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + inventory_configuration: try_from_aws(x.inventory_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_inventory_configuration(try_into_aws(x.inventory_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_inventory_configuration(try_into_aws(x.inventory_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketLifecycleConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_lifecycle_configuration::GetBucketLifecycleConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketLifecycleConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_lifecycle_configuration::GetBucketLifecycleConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -rules: try_from_aws(x.rules)?, -transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + rules: try_from_aws(x.rules)?, + transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_rules(try_into_aws(x.rules)?); -y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_rules(try_into_aws(x.rules)?); + y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketLocationInput { type Target = aws_sdk_s3::operation::get_bucket_location::GetBucketLocationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketLocationOutput { type Target = aws_sdk_s3::operation::get_bucket_location::GetBucketLocationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -location_constraint: try_from_aws(x.location_constraint)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + location_constraint: try_from_aws(x.location_constraint)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_location_constraint(try_into_aws(x.location_constraint)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_location_constraint(try_into_aws(x.location_constraint)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketLoggingInput { type Target = aws_sdk_s3::operation::get_bucket_logging::GetBucketLoggingInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketLoggingOutput { type Target = aws_sdk_s3::operation::get_bucket_logging::GetBucketLoggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -logging_enabled: try_from_aws(x.logging_enabled)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + logging_enabled: try_from_aws(x.logging_enabled)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_logging_enabled(try_into_aws(x.logging_enabled)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_metadata_table_configuration::GetBucketMetadataTableConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -get_bucket_metadata_table_configuration_result: try_from_aws(x.get_bucket_metadata_table_configuration_result)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + get_bucket_metadata_table_configuration_result: try_from_aws(x.get_bucket_metadata_table_configuration_result)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_get_bucket_metadata_table_configuration_result(try_into_aws(x.get_bucket_metadata_table_configuration_result)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_get_bucket_metadata_table_configuration_result(try_into_aws(x.get_bucket_metadata_table_configuration_result)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketMetadataTableConfigurationResult { type Target = aws_sdk_s3::types::GetBucketMetadataTableConfigurationResult; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -error: try_from_aws(x.error)?, -metadata_table_configuration_result: unwrap_from_aws(x.metadata_table_configuration_result, "metadata_table_configuration_result")?, -status: try_from_aws(x.status)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_error(try_into_aws(x.error)?); -y = y.set_metadata_table_configuration_result(Some(try_into_aws(x.metadata_table_configuration_result)?)); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + error: try_from_aws(x.error)?, + metadata_table_configuration_result: unwrap_from_aws( + x.metadata_table_configuration_result, + "metadata_table_configuration_result", + )?, + status: try_from_aws(x.status)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_error(try_into_aws(x.error)?); + y = y.set_metadata_table_configuration_result(Some(try_into_aws(x.metadata_table_configuration_result)?)); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_metrics_configuration::GetBucketMetricsConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_metrics_configuration::GetBucketMetricsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -metrics_configuration: try_from_aws(x.metrics_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + metrics_configuration: try_from_aws(x.metrics_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_metrics_configuration(try_into_aws(x.metrics_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_metrics_configuration(try_into_aws(x.metrics_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketNotificationConfigurationInput { type Target = aws_sdk_s3::operation::get_bucket_notification_configuration::GetBucketNotificationConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketNotificationConfigurationOutput { type Target = aws_sdk_s3::operation::get_bucket_notification_configuration::GetBucketNotificationConfigurationOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, -lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, -queue_configurations: try_from_aws(x.queue_configurations)?, -topic_configurations: try_from_aws(x.topic_configurations)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); -y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); -y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); -y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, + lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, + queue_configurations: try_from_aws(x.queue_configurations)?, + topic_configurations: try_from_aws(x.topic_configurations)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); + y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); + y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); + y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::get_bucket_ownership_controls::GetBucketOwnershipControlsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::get_bucket_ownership_controls::GetBucketOwnershipControlsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -ownership_controls: try_from_aws(x.ownership_controls)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + ownership_controls: try_from_aws(x.ownership_controls)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_ownership_controls(try_into_aws(x.ownership_controls)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_ownership_controls(try_into_aws(x.ownership_controls)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketPolicyInput { type Target = aws_sdk_s3::operation::get_bucket_policy::GetBucketPolicyInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketPolicyOutput { type Target = aws_sdk_s3::operation::get_bucket_policy::GetBucketPolicyOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -policy: try_from_aws(x.policy)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + policy: try_from_aws(x.policy)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_policy(try_into_aws(x.policy)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_policy(try_into_aws(x.policy)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketPolicyStatusInput { type Target = aws_sdk_s3::operation::get_bucket_policy_status::GetBucketPolicyStatusInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketPolicyStatusOutput { type Target = aws_sdk_s3::operation::get_bucket_policy_status::GetBucketPolicyStatusOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -policy_status: try_from_aws(x.policy_status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + policy_status: try_from_aws(x.policy_status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_policy_status(try_into_aws(x.policy_status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_policy_status(try_into_aws(x.policy_status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketReplicationInput { type Target = aws_sdk_s3::operation::get_bucket_replication::GetBucketReplicationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketReplicationOutput { type Target = aws_sdk_s3::operation::get_bucket_replication::GetBucketReplicationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -replication_configuration: try_from_aws(x.replication_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + replication_configuration: try_from_aws(x.replication_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_replication_configuration(try_into_aws(x.replication_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_replication_configuration(try_into_aws(x.replication_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketRequestPaymentInput { type Target = aws_sdk_s3::operation::get_bucket_request_payment::GetBucketRequestPaymentInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketRequestPaymentOutput { type Target = aws_sdk_s3::operation::get_bucket_request_payment::GetBucketRequestPaymentOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -payer: try_from_aws(x.payer)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + payer: try_from_aws(x.payer)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_payer(try_into_aws(x.payer)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_payer(try_into_aws(x.payer)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketTaggingInput { type Target = aws_sdk_s3::operation::get_bucket_tagging::GetBucketTaggingInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketTaggingOutput { type Target = aws_sdk_s3::operation::get_bucket_tagging::GetBucketTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -tag_set: try_from_aws(x.tag_set)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + tag_set: try_from_aws(x.tag_set)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketVersioningInput { type Target = aws_sdk_s3::operation::get_bucket_versioning::GetBucketVersioningInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketVersioningOutput { type Target = aws_sdk_s3::operation::get_bucket_versioning::GetBucketVersioningOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -mfa_delete: try_from_aws(x.mfa_delete)?, -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + mfa_delete: try_from_aws(x.mfa_delete)?, + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetBucketWebsiteInput { type Target = aws_sdk_s3::operation::get_bucket_website::GetBucketWebsiteInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetBucketWebsiteOutput { type Target = aws_sdk_s3::operation::get_bucket_website::GetBucketWebsiteOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -error_document: try_from_aws(x.error_document)?, -index_document: try_from_aws(x.index_document)?, -redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, -routing_rules: try_from_aws(x.routing_rules)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_error_document(try_into_aws(x.error_document)?); -y = y.set_index_document(try_into_aws(x.index_document)?); -y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); -y = y.set_routing_rules(try_into_aws(x.routing_rules)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + error_document: try_from_aws(x.error_document)?, + index_document: try_from_aws(x.index_document)?, + redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, + routing_rules: try_from_aws(x.routing_rules)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_error_document(try_into_aws(x.error_document)?); + y = y.set_index_document(try_into_aws(x.index_document)?); + y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); + y = y.set_routing_rules(try_into_aws(x.routing_rules)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectAclInput { type Target = aws_sdk_s3::operation::get_object_acl::GetObjectAclInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectAclOutput { type Target = aws_sdk_s3::operation::get_object_acl::GetObjectAclOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grants: try_from_aws(x.grants)?, -owner: try_from_aws(x.owner)?, -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grants: try_from_aws(x.grants)?, + owner: try_from_aws(x.owner)?, + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grants(try_into_aws(x.grants)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grants(try_into_aws(x.grants)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectAttributesInput { type Target = aws_sdk_s3::operation::get_object_attributes::GetObjectAttributesInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -max_parts: try_from_aws(x.max_parts)?, -object_attributes: unwrap_from_aws(x.object_attributes, "object_attributes")?, -part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_max_parts(try_into_aws(x.max_parts)?); -y = y.set_object_attributes(Some(try_into_aws(x.object_attributes)?)); -y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + max_parts: try_from_aws(x.max_parts)?, + object_attributes: unwrap_from_aws(x.object_attributes, "object_attributes")?, + part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_max_parts(try_into_aws(x.max_parts)?); + y = y.set_object_attributes(Some(try_into_aws(x.object_attributes)?)); + y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectAttributesOutput { type Target = aws_sdk_s3::operation::get_object_attributes::GetObjectAttributesOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum: try_from_aws(x.checksum)?, -delete_marker: try_from_aws(x.delete_marker)?, -e_tag: try_from_aws(x.e_tag)?, -last_modified: try_from_aws(x.last_modified)?, -object_parts: try_from_aws(x.object_parts)?, -object_size: try_from_aws(x.object_size)?, -request_charged: try_from_aws(x.request_charged)?, -storage_class: try_from_aws(x.storage_class)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum(try_into_aws(x.checksum)?); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_object_parts(try_into_aws(x.object_parts)?); -y = y.set_object_size(try_into_aws(x.object_size)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum: try_from_aws(x.checksum)?, + delete_marker: try_from_aws(x.delete_marker)?, + e_tag: try_from_aws(x.e_tag)?, + last_modified: try_from_aws(x.last_modified)?, + object_parts: try_from_aws(x.object_parts)?, + object_size: try_from_aws(x.object_size)?, + request_charged: try_from_aws(x.request_charged)?, + storage_class: try_from_aws(x.storage_class)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum(try_into_aws(x.checksum)?); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_object_parts(try_into_aws(x.object_parts)?); + y = y.set_object_size(try_into_aws(x.object_size)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectAttributesParts { type Target = aws_sdk_s3::types::GetObjectAttributesParts; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -is_truncated: try_from_aws(x.is_truncated)?, -max_parts: try_from_aws(x.max_parts)?, -next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, -part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, -parts: try_from_aws(x.parts)?, -total_parts_count: try_from_aws(x.total_parts_count)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_max_parts(try_into_aws(x.max_parts)?); -y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); -y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); -y = y.set_parts(try_into_aws(x.parts)?); -y = y.set_total_parts_count(try_into_aws(x.total_parts_count)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + is_truncated: try_from_aws(x.is_truncated)?, + max_parts: try_from_aws(x.max_parts)?, + next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, + part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, + parts: try_from_aws(x.parts)?, + total_parts_count: try_from_aws(x.total_parts_count)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_max_parts(try_into_aws(x.max_parts)?); + y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); + y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); + y = y.set_parts(try_into_aws(x.parts)?); + y = y.set_total_parts_count(try_into_aws(x.total_parts_count)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectInput { type Target = aws_sdk_s3::operation::get_object::GetObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_mode: try_from_aws(x.checksum_mode)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match: try_from_aws(x.if_match)?, -if_modified_since: try_from_aws(x.if_modified_since)?, -if_none_match: try_from_aws(x.if_none_match)?, -if_unmodified_since: try_from_aws(x.if_unmodified_since)?, -key: unwrap_from_aws(x.key, "key")?, -part_number: try_from_aws(x.part_number)?, -range: try_from_aws(x.range)?, -request_payer: try_from_aws(x.request_payer)?, -response_cache_control: try_from_aws(x.response_cache_control)?, -response_content_disposition: try_from_aws(x.response_content_disposition)?, -response_content_encoding: try_from_aws(x.response_content_encoding)?, -response_content_language: try_from_aws(x.response_content_language)?, -response_content_type: try_from_aws(x.response_content_type)?, -response_expires: try_from_aws(x.response_expires)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); -y = y.set_if_none_match(try_into_aws(x.if_none_match)?); -y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_part_number(try_into_aws(x.part_number)?); -y = y.set_range(try_into_aws(x.range)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); -y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); -y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); -y = y.set_response_content_language(try_into_aws(x.response_content_language)?); -y = y.set_response_content_type(try_into_aws(x.response_content_type)?); -y = y.set_response_expires(try_into_aws(x.response_expires)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_mode: try_from_aws(x.checksum_mode)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match: try_from_aws(x.if_match)?, + if_modified_since: try_from_aws(x.if_modified_since)?, + if_none_match: try_from_aws(x.if_none_match)?, + if_unmodified_since: try_from_aws(x.if_unmodified_since)?, + key: unwrap_from_aws(x.key, "key")?, + part_number: try_from_aws(x.part_number)?, + range: try_from_aws(x.range)?, + request_payer: try_from_aws(x.request_payer)?, + response_cache_control: try_from_aws(x.response_cache_control)?, + response_content_disposition: try_from_aws(x.response_content_disposition)?, + response_content_encoding: try_from_aws(x.response_content_encoding)?, + response_content_language: try_from_aws(x.response_content_language)?, + response_content_type: try_from_aws(x.response_content_type)?, + response_expires: try_from_aws(x.response_expires)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); + y = y.set_if_none_match(try_into_aws(x.if_none_match)?); + y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_part_number(try_into_aws(x.part_number)?); + y = y.set_range(try_into_aws(x.range)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); + y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); + y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); + y = y.set_response_content_language(try_into_aws(x.response_content_language)?); + y = y.set_response_content_type(try_into_aws(x.response_content_type)?); + y = y.set_response_expires(try_into_aws(x.response_expires)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectLegalHoldInput { type Target = aws_sdk_s3::operation::get_object_legal_hold::GetObjectLegalHoldInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectLegalHoldOutput { type Target = aws_sdk_s3::operation::get_object_legal_hold::GetObjectLegalHoldOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -legal_hold: try_from_aws(x.legal_hold)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + legal_hold: try_from_aws(x.legal_hold)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_legal_hold(try_into_aws(x.legal_hold)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_legal_hold(try_into_aws(x.legal_hold)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectLockConfigurationInput { type Target = aws_sdk_s3::operation::get_object_lock_configuration::GetObjectLockConfigurationInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectLockConfigurationOutput { type Target = aws_sdk_s3::operation::get_object_lock_configuration::GetObjectLockConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -object_lock_configuration: try_from_aws(x.object_lock_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + object_lock_configuration: try_from_aws(x.object_lock_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectOutput { type Target = aws_sdk_s3::operation::get_object::GetObjectOutput; -type Error = S3Error; - -#[allow(deprecated)] -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -accept_ranges: try_from_aws(x.accept_ranges)?, -body: Some(try_from_aws(x.body)?), -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_length: try_from_aws(x.content_length)?, -content_range: try_from_aws(x.content_range)?, -content_type: try_from_aws(x.content_type)?, -delete_marker: try_from_aws(x.delete_marker)?, -e_tag: try_from_aws(x.e_tag)?, -expiration: try_from_aws(x.expiration)?, -expires: try_from_aws(x.expires)?, -last_modified: try_from_aws(x.last_modified)?, -metadata: try_from_aws(x.metadata)?, -missing_meta: try_from_aws(x.missing_meta)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -parts_count: try_from_aws(x.parts_count)?, -replication_status: try_from_aws(x.replication_status)?, -request_charged: try_from_aws(x.request_charged)?, -restore: try_from_aws(x.restore)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -tag_count: try_from_aws(x.tag_count)?, -version_id: try_from_aws(x.version_id)?, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -}) -} - -#[allow(deprecated)] -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_range(try_into_aws(x.content_range)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_missing_meta(try_into_aws(x.missing_meta)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_parts_count(try_into_aws(x.parts_count)?); -y = y.set_replication_status(try_into_aws(x.replication_status)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_restore(try_into_aws(x.restore)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tag_count(try_into_aws(x.tag_count)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -Ok(y.build()) -} + type Error = S3Error; + + #[allow(deprecated)] + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + accept_ranges: try_from_aws(x.accept_ranges)?, + body: Some(try_from_aws(x.body)?), + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_length: try_from_aws(x.content_length)?, + content_range: try_from_aws(x.content_range)?, + content_type: try_from_aws(x.content_type)?, + delete_marker: try_from_aws(x.delete_marker)?, + e_tag: try_from_aws(x.e_tag)?, + expiration: try_from_aws(x.expiration)?, + expires: try_from_aws(x.expires)?, + last_modified: try_from_aws(x.last_modified)?, + metadata: try_from_aws(x.metadata)?, + missing_meta: try_from_aws(x.missing_meta)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + parts_count: try_from_aws(x.parts_count)?, + replication_status: try_from_aws(x.replication_status)?, + request_charged: try_from_aws(x.request_charged)?, + restore: try_from_aws(x.restore)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + tag_count: try_from_aws(x.tag_count)?, + version_id: try_from_aws(x.version_id)?, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + }) + } + + #[allow(deprecated)] + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_range(try_into_aws(x.content_range)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_missing_meta(try_into_aws(x.missing_meta)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_parts_count(try_into_aws(x.parts_count)?); + y = y.set_replication_status(try_into_aws(x.replication_status)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_restore(try_into_aws(x.restore)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tag_count(try_into_aws(x.tag_count)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectRetentionInput { type Target = aws_sdk_s3::operation::get_object_retention::GetObjectRetentionInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectRetentionOutput { type Target = aws_sdk_s3::operation::get_object_retention::GetObjectRetentionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -retention: try_from_aws(x.retention)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + retention: try_from_aws(x.retention)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_retention(try_into_aws(x.retention)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_retention(try_into_aws(x.retention)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetObjectTaggingInput { type Target = aws_sdk_s3::operation::get_object_tagging::GetObjectTaggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectTaggingOutput { type Target = aws_sdk_s3::operation::get_object_tagging::GetObjectTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -tag_set: try_from_aws(x.tag_set)?, -version_id: try_from_aws(x.version_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + tag_set: try_from_aws(x.tag_set)?, + version_id: try_from_aws(x.version_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectTorrentInput { type Target = aws_sdk_s3::operation::get_object_torrent::GetObjectTorrentInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetObjectTorrentOutput { type Target = aws_sdk_s3::operation::get_object_torrent::GetObjectTorrentOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -body: Some(try_from_aws(x.body)?), -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + body: Some(try_from_aws(x.body)?), + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GetPublicAccessBlockInput { type Target = aws_sdk_s3::operation::get_public_access_block::GetPublicAccessBlockInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::GetPublicAccessBlockOutput { type Target = aws_sdk_s3::operation::get_public_access_block::GetPublicAccessBlockOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -public_access_block_configuration: try_from_aws(x.public_access_block_configuration)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + public_access_block_configuration: try_from_aws(x.public_access_block_configuration)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_public_access_block_configuration(try_into_aws(x.public_access_block_configuration)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_public_access_block_configuration(try_into_aws(x.public_access_block_configuration)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::GlacierJobParameters { type Target = aws_sdk_s3::types::GlacierJobParameters; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -tier: try_from_aws(x.tier)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + tier: try_from_aws(x.tier)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_tier(Some(try_into_aws(x.tier)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_tier(Some(try_into_aws(x.tier)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::Grant { type Target = aws_sdk_s3::types::Grant; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grantee: try_from_aws(x.grantee)?, -permission: try_from_aws(x.permission)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grantee: try_from_aws(x.grantee)?, + permission: try_from_aws(x.permission)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grantee(try_into_aws(x.grantee)?); -y = y.set_permission(try_into_aws(x.permission)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grantee(try_into_aws(x.grantee)?); + y = y.set_permission(try_into_aws(x.permission)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Grantee { type Target = aws_sdk_s3::types::Grantee; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -display_name: try_from_aws(x.display_name)?, -email_address: try_from_aws(x.email_address)?, -id: try_from_aws(x.id)?, -type_: try_from_aws(x.r#type)?, -uri: try_from_aws(x.uri)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_display_name(try_into_aws(x.display_name)?); -y = y.set_email_address(try_into_aws(x.email_address)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_type(Some(try_into_aws(x.type_)?)); -y = y.set_uri(try_into_aws(x.uri)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + display_name: try_from_aws(x.display_name)?, + email_address: try_from_aws(x.email_address)?, + id: try_from_aws(x.id)?, + type_: try_from_aws(x.r#type)?, + uri: try_from_aws(x.uri)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_display_name(try_into_aws(x.display_name)?); + y = y.set_email_address(try_into_aws(x.email_address)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_type(Some(try_into_aws(x.type_)?)); + y = y.set_uri(try_into_aws(x.uri)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::HeadBucketInput { type Target = aws_sdk_s3::operation::head_bucket::HeadBucketInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::HeadBucketOutput { type Target = aws_sdk_s3::operation::head_bucket::HeadBucketOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_point_alias: try_from_aws(x.access_point_alias)?, -bucket_location_name: try_from_aws(x.bucket_location_name)?, -bucket_location_type: try_from_aws(x.bucket_location_type)?, -bucket_region: try_from_aws(x.bucket_region)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_point_alias(try_into_aws(x.access_point_alias)?); -y = y.set_bucket_location_name(try_into_aws(x.bucket_location_name)?); -y = y.set_bucket_location_type(try_into_aws(x.bucket_location_type)?); -y = y.set_bucket_region(try_into_aws(x.bucket_region)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_point_alias: try_from_aws(x.access_point_alias)?, + bucket_location_name: try_from_aws(x.bucket_location_name)?, + bucket_location_type: try_from_aws(x.bucket_location_type)?, + bucket_region: try_from_aws(x.bucket_region)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_point_alias(try_into_aws(x.access_point_alias)?); + y = y.set_bucket_location_name(try_into_aws(x.bucket_location_name)?); + y = y.set_bucket_location_type(try_into_aws(x.bucket_location_type)?); + y = y.set_bucket_region(try_into_aws(x.bucket_region)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::HeadObjectInput { type Target = aws_sdk_s3::operation::head_object::HeadObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_mode: try_from_aws(x.checksum_mode)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -if_match: try_from_aws(x.if_match)?, -if_modified_since: try_from_aws(x.if_modified_since)?, -if_none_match: try_from_aws(x.if_none_match)?, -if_unmodified_since: try_from_aws(x.if_unmodified_since)?, -key: unwrap_from_aws(x.key, "key")?, -part_number: try_from_aws(x.part_number)?, -range: try_from_aws(x.range)?, -request_payer: try_from_aws(x.request_payer)?, -response_cache_control: try_from_aws(x.response_cache_control)?, -response_content_disposition: try_from_aws(x.response_content_disposition)?, -response_content_encoding: try_from_aws(x.response_content_encoding)?, -response_content_language: try_from_aws(x.response_content_language)?, -response_content_type: try_from_aws(x.response_content_type)?, -response_expires: try_from_aws(x.response_expires)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); -y = y.set_if_none_match(try_into_aws(x.if_none_match)?); -y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_part_number(try_into_aws(x.part_number)?); -y = y.set_range(try_into_aws(x.range)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); -y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); -y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); -y = y.set_response_content_language(try_into_aws(x.response_content_language)?); -y = y.set_response_content_type(try_into_aws(x.response_content_type)?); -y = y.set_response_expires(try_into_aws(x.response_expires)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_mode: try_from_aws(x.checksum_mode)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + if_match: try_from_aws(x.if_match)?, + if_modified_since: try_from_aws(x.if_modified_since)?, + if_none_match: try_from_aws(x.if_none_match)?, + if_unmodified_since: try_from_aws(x.if_unmodified_since)?, + key: unwrap_from_aws(x.key, "key")?, + part_number: try_from_aws(x.part_number)?, + range: try_from_aws(x.range)?, + request_payer: try_from_aws(x.request_payer)?, + response_cache_control: try_from_aws(x.response_cache_control)?, + response_content_disposition: try_from_aws(x.response_content_disposition)?, + response_content_encoding: try_from_aws(x.response_content_encoding)?, + response_content_language: try_from_aws(x.response_content_language)?, + response_content_type: try_from_aws(x.response_content_type)?, + response_expires: try_from_aws(x.response_expires)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_mode(try_into_aws(x.checksum_mode)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_modified_since(try_into_aws(x.if_modified_since)?); + y = y.set_if_none_match(try_into_aws(x.if_none_match)?); + y = y.set_if_unmodified_since(try_into_aws(x.if_unmodified_since)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_part_number(try_into_aws(x.part_number)?); + y = y.set_range(try_into_aws(x.range)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_response_cache_control(try_into_aws(x.response_cache_control)?); + y = y.set_response_content_disposition(try_into_aws(x.response_content_disposition)?); + y = y.set_response_content_encoding(try_into_aws(x.response_content_encoding)?); + y = y.set_response_content_language(try_into_aws(x.response_content_language)?); + y = y.set_response_content_type(try_into_aws(x.response_content_type)?); + y = y.set_response_expires(try_into_aws(x.response_expires)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::HeadObjectOutput { type Target = aws_sdk_s3::operation::head_object::HeadObjectOutput; -type Error = S3Error; - -#[allow(deprecated)] -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -accept_ranges: try_from_aws(x.accept_ranges)?, -archive_status: try_from_aws(x.archive_status)?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_length: try_from_aws(x.content_length)?, -content_range: try_from_aws(x.content_range)?, -content_type: try_from_aws(x.content_type)?, -delete_marker: try_from_aws(x.delete_marker)?, -e_tag: try_from_aws(x.e_tag)?, -expiration: try_from_aws(x.expiration)?, -expires: try_from_aws(x.expires)?, -last_modified: try_from_aws(x.last_modified)?, -metadata: try_from_aws(x.metadata)?, -missing_meta: try_from_aws(x.missing_meta)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -parts_count: try_from_aws(x.parts_count)?, -replication_status: try_from_aws(x.replication_status)?, -request_charged: try_from_aws(x.request_charged)?, -restore: try_from_aws(x.restore)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -version_id: try_from_aws(x.version_id)?, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -}) -} - -#[allow(deprecated)] -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); -y = y.set_archive_status(try_into_aws(x.archive_status)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_range(try_into_aws(x.content_range)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_missing_meta(try_into_aws(x.missing_meta)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_parts_count(try_into_aws(x.parts_count)?); -y = y.set_replication_status(try_into_aws(x.replication_status)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_restore(try_into_aws(x.restore)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -Ok(y.build()) -} + type Error = S3Error; + + #[allow(deprecated)] + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + accept_ranges: try_from_aws(x.accept_ranges)?, + archive_status: try_from_aws(x.archive_status)?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_length: try_from_aws(x.content_length)?, + content_range: try_from_aws(x.content_range)?, + content_type: try_from_aws(x.content_type)?, + delete_marker: try_from_aws(x.delete_marker)?, + e_tag: try_from_aws(x.e_tag)?, + expiration: try_from_aws(x.expiration)?, + expires: try_from_aws(x.expires)?, + last_modified: try_from_aws(x.last_modified)?, + metadata: try_from_aws(x.metadata)?, + missing_meta: try_from_aws(x.missing_meta)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + parts_count: try_from_aws(x.parts_count)?, + replication_status: try_from_aws(x.replication_status)?, + request_charged: try_from_aws(x.request_charged)?, + restore: try_from_aws(x.restore)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + version_id: try_from_aws(x.version_id)?, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + }) + } + + #[allow(deprecated)] + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); + y = y.set_archive_status(try_into_aws(x.archive_status)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_range(try_into_aws(x.content_range)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_missing_meta(try_into_aws(x.missing_meta)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_parts_count(try_into_aws(x.parts_count)?); + y = y.set_replication_status(try_into_aws(x.replication_status)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_restore(try_into_aws(x.restore)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::IndexDocument { type Target = aws_sdk_s3::types::IndexDocument; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -suffix: try_from_aws(x.suffix)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + suffix: try_from_aws(x.suffix)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_suffix(Some(try_into_aws(x.suffix)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_suffix(Some(try_into_aws(x.suffix)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::Initiator { type Target = aws_sdk_s3::types::Initiator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -display_name: try_from_aws(x.display_name)?, -id: try_from_aws(x.id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + display_name: try_from_aws(x.display_name)?, + id: try_from_aws(x.id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_display_name(try_into_aws(x.display_name)?); -y = y.set_id(try_into_aws(x.id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_display_name(try_into_aws(x.display_name)?); + y = y.set_id(try_into_aws(x.id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InputSerialization { type Target = aws_sdk_s3::types::InputSerialization; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -csv: try_from_aws(x.csv)?, -compression_type: try_from_aws(x.compression_type)?, -json: try_from_aws(x.json)?, -parquet: try_from_aws(x.parquet)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_csv(try_into_aws(x.csv)?); -y = y.set_compression_type(try_into_aws(x.compression_type)?); -y = y.set_json(try_into_aws(x.json)?); -y = y.set_parquet(try_into_aws(x.parquet)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + csv: try_from_aws(x.csv)?, + compression_type: try_from_aws(x.compression_type)?, + json: try_from_aws(x.json)?, + parquet: try_from_aws(x.parquet)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_csv(try_into_aws(x.csv)?); + y = y.set_compression_type(try_into_aws(x.compression_type)?); + y = y.set_json(try_into_aws(x.json)?); + y = y.set_parquet(try_into_aws(x.parquet)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::IntelligentTieringAccessTier { type Target = aws_sdk_s3::types::IntelligentTieringAccessTier; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::IntelligentTieringAccessTier::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), -aws_sdk_s3::types::IntelligentTieringAccessTier::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::IntelligentTieringAccessTier::ArchiveAccess => Self::from_static(Self::ARCHIVE_ACCESS), + aws_sdk_s3::types::IntelligentTieringAccessTier::DeepArchiveAccess => Self::from_static(Self::DEEP_ARCHIVE_ACCESS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::IntelligentTieringAccessTier::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::IntelligentTieringAccessTier::from(x.as_str())) + } } impl AwsConversion for s3s::dto::IntelligentTieringAndOperator { type Target = aws_sdk_s3::types::IntelligentTieringAndOperator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::IntelligentTieringConfiguration { type Target = aws_sdk_s3::types::IntelligentTieringConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -status: try_from_aws(x.status)?, -tierings: try_from_aws(x.tierings)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_status(Some(try_into_aws(x.status)?)); -y = y.set_tierings(Some(try_into_aws(x.tierings)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + status: try_from_aws(x.status)?, + tierings: try_from_aws(x.tierings)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_status(Some(try_into_aws(x.status)?)); + y = y.set_tierings(Some(try_into_aws(x.tierings)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::IntelligentTieringFilter { type Target = aws_sdk_s3::types::IntelligentTieringFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -and: try_from_aws(x.and)?, -prefix: try_from_aws(x.prefix)?, -tag: try_from_aws(x.tag)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + and: try_from_aws(x.and)?, + prefix: try_from_aws(x.prefix)?, + tag: try_from_aws(x.tag)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_and(try_into_aws(x.and)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tag(try_into_aws(x.tag)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_and(try_into_aws(x.and)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tag(try_into_aws(x.tag)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::IntelligentTieringStatus { type Target = aws_sdk_s3::types::IntelligentTieringStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::IntelligentTieringStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::IntelligentTieringStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::IntelligentTieringStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::IntelligentTieringStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::IntelligentTieringStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::IntelligentTieringStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InvalidObjectState { type Target = aws_sdk_s3::types::error::InvalidObjectState; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_tier: try_from_aws(x.access_tier)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_tier: try_from_aws(x.access_tier)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_tier(try_into_aws(x.access_tier)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_tier(try_into_aws(x.access_tier)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InvalidRequest { type Target = aws_sdk_s3::types::error::InvalidRequest; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InvalidWriteOffset { type Target = aws_sdk_s3::types::error::InvalidWriteOffset; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InventoryConfiguration { type Target = aws_sdk_s3::types::InventoryConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -destination: unwrap_from_aws(x.destination, "destination")?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -included_object_versions: try_from_aws(x.included_object_versions)?, -is_enabled: try_from_aws(x.is_enabled)?, -optional_fields: try_from_aws(x.optional_fields)?, -schedule: unwrap_from_aws(x.schedule, "schedule")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_destination(Some(try_into_aws(x.destination)?)); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_included_object_versions(Some(try_into_aws(x.included_object_versions)?)); -y = y.set_is_enabled(Some(try_into_aws(x.is_enabled)?)); -y = y.set_optional_fields(try_into_aws(x.optional_fields)?); -y = y.set_schedule(Some(try_into_aws(x.schedule)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + destination: unwrap_from_aws(x.destination, "destination")?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + included_object_versions: try_from_aws(x.included_object_versions)?, + is_enabled: try_from_aws(x.is_enabled)?, + optional_fields: try_from_aws(x.optional_fields)?, + schedule: unwrap_from_aws(x.schedule, "schedule")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_destination(Some(try_into_aws(x.destination)?)); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_included_object_versions(Some(try_into_aws(x.included_object_versions)?)); + y = y.set_is_enabled(Some(try_into_aws(x.is_enabled)?)); + y = y.set_optional_fields(try_into_aws(x.optional_fields)?); + y = y.set_schedule(Some(try_into_aws(x.schedule)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::InventoryDestination { type Target = aws_sdk_s3::types::InventoryDestination; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + s3_bucket_destination: unwrap_from_aws(x.s3_bucket_destination, "s3_bucket_destination")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3_bucket_destination(Some(try_into_aws(x.s3_bucket_destination)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InventoryEncryption { type Target = aws_sdk_s3::types::InventoryEncryption; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -ssekms: try_from_aws(x.ssekms)?, -sses3: try_from_aws(x.sses3)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + ssekms: try_from_aws(x.ssekms)?, + sses3: try_from_aws(x.sses3)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_ssekms(try_into_aws(x.ssekms)?); -y = y.set_sses3(try_into_aws(x.sses3)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_ssekms(try_into_aws(x.ssekms)?); + y = y.set_sses3(try_into_aws(x.sses3)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::InventoryFilter { type Target = aws_sdk_s3::types::InventoryFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(Some(try_into_aws(x.prefix)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(Some(try_into_aws(x.prefix)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::InventoryFormat { type Target = aws_sdk_s3::types::InventoryFormat; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::InventoryFormat::Csv => Self::from_static(Self::CSV), -aws_sdk_s3::types::InventoryFormat::Orc => Self::from_static(Self::ORC), -aws_sdk_s3::types::InventoryFormat::Parquet => Self::from_static(Self::PARQUET), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::InventoryFormat::Csv => Self::from_static(Self::CSV), + aws_sdk_s3::types::InventoryFormat::Orc => Self::from_static(Self::ORC), + aws_sdk_s3::types::InventoryFormat::Parquet => Self::from_static(Self::PARQUET), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::InventoryFormat::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::InventoryFormat::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InventoryFrequency { type Target = aws_sdk_s3::types::InventoryFrequency; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::InventoryFrequency::Daily => Self::from_static(Self::DAILY), -aws_sdk_s3::types::InventoryFrequency::Weekly => Self::from_static(Self::WEEKLY), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::InventoryFrequency::Daily => Self::from_static(Self::DAILY), + aws_sdk_s3::types::InventoryFrequency::Weekly => Self::from_static(Self::WEEKLY), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::InventoryFrequency::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::InventoryFrequency::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InventoryIncludedObjectVersions { type Target = aws_sdk_s3::types::InventoryIncludedObjectVersions; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::InventoryIncludedObjectVersions::All => Self::from_static(Self::ALL), -aws_sdk_s3::types::InventoryIncludedObjectVersions::Current => Self::from_static(Self::CURRENT), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::InventoryIncludedObjectVersions::All => Self::from_static(Self::ALL), + aws_sdk_s3::types::InventoryIncludedObjectVersions::Current => Self::from_static(Self::CURRENT), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::InventoryIncludedObjectVersions::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::InventoryIncludedObjectVersions::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InventoryOptionalField { type Target = aws_sdk_s3::types::InventoryOptionalField; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::InventoryOptionalField::BucketKeyStatus => Self::from_static(Self::BUCKET_KEY_STATUS), -aws_sdk_s3::types::InventoryOptionalField::ChecksumAlgorithm => Self::from_static(Self::CHECKSUM_ALGORITHM), -aws_sdk_s3::types::InventoryOptionalField::ETag => Self::from_static(Self::E_TAG), -aws_sdk_s3::types::InventoryOptionalField::EncryptionStatus => Self::from_static(Self::ENCRYPTION_STATUS), -aws_sdk_s3::types::InventoryOptionalField::IntelligentTieringAccessTier => Self::from_static(Self::INTELLIGENT_TIERING_ACCESS_TIER), -aws_sdk_s3::types::InventoryOptionalField::IsMultipartUploaded => Self::from_static(Self::IS_MULTIPART_UPLOADED), -aws_sdk_s3::types::InventoryOptionalField::LastModifiedDate => Self::from_static(Self::LAST_MODIFIED_DATE), -aws_sdk_s3::types::InventoryOptionalField::ObjectAccessControlList => Self::from_static(Self::OBJECT_ACCESS_CONTROL_LIST), -aws_sdk_s3::types::InventoryOptionalField::ObjectLockLegalHoldStatus => Self::from_static(Self::OBJECT_LOCK_LEGAL_HOLD_STATUS), -aws_sdk_s3::types::InventoryOptionalField::ObjectLockMode => Self::from_static(Self::OBJECT_LOCK_MODE), -aws_sdk_s3::types::InventoryOptionalField::ObjectLockRetainUntilDate => Self::from_static(Self::OBJECT_LOCK_RETAIN_UNTIL_DATE), -aws_sdk_s3::types::InventoryOptionalField::ObjectOwner => Self::from_static(Self::OBJECT_OWNER), -aws_sdk_s3::types::InventoryOptionalField::ReplicationStatus => Self::from_static(Self::REPLICATION_STATUS), -aws_sdk_s3::types::InventoryOptionalField::Size => Self::from_static(Self::SIZE), -aws_sdk_s3::types::InventoryOptionalField::StorageClass => Self::from_static(Self::STORAGE_CLASS), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::InventoryOptionalField::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::InventoryOptionalField::BucketKeyStatus => Self::from_static(Self::BUCKET_KEY_STATUS), + aws_sdk_s3::types::InventoryOptionalField::ChecksumAlgorithm => Self::from_static(Self::CHECKSUM_ALGORITHM), + aws_sdk_s3::types::InventoryOptionalField::ETag => Self::from_static(Self::E_TAG), + aws_sdk_s3::types::InventoryOptionalField::EncryptionStatus => Self::from_static(Self::ENCRYPTION_STATUS), + aws_sdk_s3::types::InventoryOptionalField::IntelligentTieringAccessTier => { + Self::from_static(Self::INTELLIGENT_TIERING_ACCESS_TIER) + } + aws_sdk_s3::types::InventoryOptionalField::IsMultipartUploaded => Self::from_static(Self::IS_MULTIPART_UPLOADED), + aws_sdk_s3::types::InventoryOptionalField::LastModifiedDate => Self::from_static(Self::LAST_MODIFIED_DATE), + aws_sdk_s3::types::InventoryOptionalField::ObjectAccessControlList => { + Self::from_static(Self::OBJECT_ACCESS_CONTROL_LIST) + } + aws_sdk_s3::types::InventoryOptionalField::ObjectLockLegalHoldStatus => { + Self::from_static(Self::OBJECT_LOCK_LEGAL_HOLD_STATUS) + } + aws_sdk_s3::types::InventoryOptionalField::ObjectLockMode => Self::from_static(Self::OBJECT_LOCK_MODE), + aws_sdk_s3::types::InventoryOptionalField::ObjectLockRetainUntilDate => { + Self::from_static(Self::OBJECT_LOCK_RETAIN_UNTIL_DATE) + } + aws_sdk_s3::types::InventoryOptionalField::ObjectOwner => Self::from_static(Self::OBJECT_OWNER), + aws_sdk_s3::types::InventoryOptionalField::ReplicationStatus => Self::from_static(Self::REPLICATION_STATUS), + aws_sdk_s3::types::InventoryOptionalField::Size => Self::from_static(Self::SIZE), + aws_sdk_s3::types::InventoryOptionalField::StorageClass => Self::from_static(Self::STORAGE_CLASS), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::InventoryOptionalField::from(x.as_str())) + } } impl AwsConversion for s3s::dto::InventoryS3BucketDestination { type Target = aws_sdk_s3::types::InventoryS3BucketDestination; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -account_id: try_from_aws(x.account_id)?, -bucket: try_from_aws(x.bucket)?, -encryption: try_from_aws(x.encryption)?, -format: try_from_aws(x.format)?, -prefix: try_from_aws(x.prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_account_id(try_into_aws(x.account_id)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_encryption(try_into_aws(x.encryption)?); -y = y.set_format(Some(try_into_aws(x.format)?)); -y = y.set_prefix(try_into_aws(x.prefix)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + account_id: try_from_aws(x.account_id)?, + bucket: try_from_aws(x.bucket)?, + encryption: try_from_aws(x.encryption)?, + format: try_from_aws(x.format)?, + prefix: try_from_aws(x.prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_account_id(try_into_aws(x.account_id)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_encryption(try_into_aws(x.encryption)?); + y = y.set_format(Some(try_into_aws(x.format)?)); + y = y.set_prefix(try_into_aws(x.prefix)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::InventorySchedule { type Target = aws_sdk_s3::types::InventorySchedule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -frequency: try_from_aws(x.frequency)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + frequency: try_from_aws(x.frequency)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_frequency(Some(try_into_aws(x.frequency)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_frequency(Some(try_into_aws(x.frequency)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::JSONInput { type Target = aws_sdk_s3::types::JsonInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -type_: try_from_aws(x.r#type)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + type_: try_from_aws(x.r#type)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_type(try_into_aws(x.type_)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_type(try_into_aws(x.type_)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::JSONOutput { type Target = aws_sdk_s3::types::JsonOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -record_delimiter: try_from_aws(x.record_delimiter)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + record_delimiter: try_from_aws(x.record_delimiter)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_record_delimiter(try_into_aws(x.record_delimiter)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::JSONType { type Target = aws_sdk_s3::types::JsonType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::JsonType::Document => Self::from_static(Self::DOCUMENT), -aws_sdk_s3::types::JsonType::Lines => Self::from_static(Self::LINES), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::JsonType::Document => Self::from_static(Self::DOCUMENT), + aws_sdk_s3::types::JsonType::Lines => Self::from_static(Self::LINES), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::JsonType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::JsonType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::LambdaFunctionConfiguration { type Target = aws_sdk_s3::types::LambdaFunctionConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -events: try_from_aws(x.events)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -lambda_function_arn: try_from_aws(x.lambda_function_arn)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_events(Some(try_into_aws(x.events)?)); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_lambda_function_arn(Some(try_into_aws(x.lambda_function_arn)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + events: try_from_aws(x.events)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + lambda_function_arn: try_from_aws(x.lambda_function_arn)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_events(Some(try_into_aws(x.events)?)); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_lambda_function_arn(Some(try_into_aws(x.lambda_function_arn)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::LifecycleExpiration { type Target = aws_sdk_s3::types::LifecycleExpiration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -date: try_from_aws(x.date)?, -days: try_from_aws(x.days)?, -expired_object_all_versions: None, -expired_object_delete_marker: try_from_aws(x.expired_object_delete_marker)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_date(try_into_aws(x.date)?); -y = y.set_days(try_into_aws(x.days)?); -y = y.set_expired_object_delete_marker(try_into_aws(x.expired_object_delete_marker)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + date: try_from_aws(x.date)?, + days: try_from_aws(x.days)?, + expired_object_all_versions: None, + expired_object_delete_marker: try_from_aws(x.expired_object_delete_marker)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_date(try_into_aws(x.date)?); + y = y.set_days(try_into_aws(x.days)?); + y = y.set_expired_object_delete_marker(try_into_aws(x.expired_object_delete_marker)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::LifecycleRule { type Target = aws_sdk_s3::types::LifecycleRule; -type Error = S3Error; - -#[allow(deprecated)] -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -abort_incomplete_multipart_upload: try_from_aws(x.abort_incomplete_multipart_upload)?, -del_marker_expiration: None, -expiration: try_from_aws(x.expiration)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -noncurrent_version_expiration: try_from_aws(x.noncurrent_version_expiration)?, -noncurrent_version_transitions: try_from_aws(x.noncurrent_version_transitions)?, -prefix: try_from_aws(x.prefix)?, -status: try_from_aws(x.status)?, -transitions: try_from_aws(x.transitions)?, -}) -} - -#[allow(deprecated)] -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_abort_incomplete_multipart_upload(try_into_aws(x.abort_incomplete_multipart_upload)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_noncurrent_version_expiration(try_into_aws(x.noncurrent_version_expiration)?); -y = y.set_noncurrent_version_transitions(try_into_aws(x.noncurrent_version_transitions)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_status(Some(try_into_aws(x.status)?)); -y = y.set_transitions(try_into_aws(x.transitions)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + #[allow(deprecated)] + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + abort_incomplete_multipart_upload: try_from_aws(x.abort_incomplete_multipart_upload)?, + del_marker_expiration: None, + expiration: try_from_aws(x.expiration)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + noncurrent_version_expiration: try_from_aws(x.noncurrent_version_expiration)?, + noncurrent_version_transitions: try_from_aws(x.noncurrent_version_transitions)?, + prefix: try_from_aws(x.prefix)?, + status: try_from_aws(x.status)?, + transitions: try_from_aws(x.transitions)?, + }) + } + + #[allow(deprecated)] + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_abort_incomplete_multipart_upload(try_into_aws(x.abort_incomplete_multipart_upload)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_noncurrent_version_expiration(try_into_aws(x.noncurrent_version_expiration)?); + y = y.set_noncurrent_version_transitions(try_into_aws(x.noncurrent_version_transitions)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_status(Some(try_into_aws(x.status)?)); + y = y.set_transitions(try_into_aws(x.transitions)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::LifecycleRuleAndOperator { type Target = aws_sdk_s3::types::LifecycleRuleAndOperator; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -object_size_greater_than: try_from_aws(x.object_size_greater_than)?, -object_size_less_than: try_from_aws(x.object_size_less_than)?, -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); -y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + object_size_greater_than: try_from_aws(x.object_size_greater_than)?, + object_size_less_than: try_from_aws(x.object_size_less_than)?, + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); + y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::LifecycleRuleFilter { type Target = aws_sdk_s3::types::LifecycleRuleFilter; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -and: try_from_aws(x.and)?, -cached_tags: s3s::dto::CachedTags::default(), -object_size_greater_than: try_from_aws(x.object_size_greater_than)?, -object_size_less_than: try_from_aws(x.object_size_less_than)?, -prefix: try_from_aws(x.prefix)?, -tag: try_from_aws(x.tag)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_and(try_into_aws(x.and)?); -y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); -y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tag(try_into_aws(x.tag)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + and: try_from_aws(x.and)?, + cached_tags: s3s::dto::CachedTags::default(), + object_size_greater_than: try_from_aws(x.object_size_greater_than)?, + object_size_less_than: try_from_aws(x.object_size_less_than)?, + prefix: try_from_aws(x.prefix)?, + tag: try_from_aws(x.tag)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_and(try_into_aws(x.and)?); + y = y.set_object_size_greater_than(try_into_aws(x.object_size_greater_than)?); + y = y.set_object_size_less_than(try_into_aws(x.object_size_less_than)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tag(try_into_aws(x.tag)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketAnalyticsConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_analytics_configurations::ListBucketAnalyticsConfigurationsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketAnalyticsConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_analytics_configurations::ListBucketAnalyticsConfigurationsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -analytics_configuration_list: try_from_aws(x.analytics_configuration_list)?, -continuation_token: try_from_aws(x.continuation_token)?, -is_truncated: try_from_aws(x.is_truncated)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_analytics_configuration_list(try_into_aws(x.analytics_configuration_list)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + analytics_configuration_list: try_from_aws(x.analytics_configuration_list)?, + continuation_token: try_from_aws(x.continuation_token)?, + is_truncated: try_from_aws(x.is_truncated)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_analytics_configuration_list(try_into_aws(x.analytics_configuration_list)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketIntelligentTieringConfigurationsInput { - type Target = aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsInput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsInput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketIntelligentTieringConfigurationsOutput { - type Target = aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -continuation_token: try_from_aws(x.continuation_token)?, -intelligent_tiering_configuration_list: try_from_aws(x.intelligent_tiering_configuration_list)?, -is_truncated: try_from_aws(x.is_truncated)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_intelligent_tiering_configuration_list(try_into_aws(x.intelligent_tiering_configuration_list)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -Ok(y.build()) -} + type Target = + aws_sdk_s3::operation::list_bucket_intelligent_tiering_configurations::ListBucketIntelligentTieringConfigurationsOutput; + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + continuation_token: try_from_aws(x.continuation_token)?, + intelligent_tiering_configuration_list: try_from_aws(x.intelligent_tiering_configuration_list)?, + is_truncated: try_from_aws(x.is_truncated)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_intelligent_tiering_configuration_list(try_into_aws(x.intelligent_tiering_configuration_list)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketInventoryConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketInventoryConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_inventory_configurations::ListBucketInventoryConfigurationsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -continuation_token: try_from_aws(x.continuation_token)?, -inventory_configuration_list: try_from_aws(x.inventory_configuration_list)?, -is_truncated: try_from_aws(x.is_truncated)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_inventory_configuration_list(try_into_aws(x.inventory_configuration_list)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + continuation_token: try_from_aws(x.continuation_token)?, + inventory_configuration_list: try_from_aws(x.inventory_configuration_list)?, + is_truncated: try_from_aws(x.is_truncated)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_inventory_configuration_list(try_into_aws(x.inventory_configuration_list)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketMetricsConfigurationsInput { type Target = aws_sdk_s3::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketMetricsConfigurationsOutput { type Target = aws_sdk_s3::operation::list_bucket_metrics_configurations::ListBucketMetricsConfigurationsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -continuation_token: try_from_aws(x.continuation_token)?, -is_truncated: try_from_aws(x.is_truncated)?, -metrics_configuration_list: try_from_aws(x.metrics_configuration_list)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_metrics_configuration_list(try_into_aws(x.metrics_configuration_list)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + continuation_token: try_from_aws(x.continuation_token)?, + is_truncated: try_from_aws(x.is_truncated)?, + metrics_configuration_list: try_from_aws(x.metrics_configuration_list)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_metrics_configuration_list(try_into_aws(x.metrics_configuration_list)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListBucketsInput { type Target = aws_sdk_s3::operation::list_buckets::ListBucketsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_region: try_from_aws(x.bucket_region)?, -continuation_token: try_from_aws(x.continuation_token)?, -max_buckets: try_from_aws(x.max_buckets)?, -prefix: try_from_aws(x.prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_region(try_into_aws(x.bucket_region)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_max_buckets(try_into_aws(x.max_buckets)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_region: try_from_aws(x.bucket_region)?, + continuation_token: try_from_aws(x.continuation_token)?, + max_buckets: try_from_aws(x.max_buckets)?, + prefix: try_from_aws(x.prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_region(try_into_aws(x.bucket_region)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_max_buckets(try_into_aws(x.max_buckets)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListBucketsOutput { type Target = aws_sdk_s3::operation::list_buckets::ListBucketsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -buckets: try_from_aws(x.buckets)?, -continuation_token: try_from_aws(x.continuation_token)?, -owner: try_from_aws(x.owner)?, -prefix: try_from_aws(x.prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_buckets(try_into_aws(x.buckets)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + buckets: try_from_aws(x.buckets)?, + continuation_token: try_from_aws(x.continuation_token)?, + owner: try_from_aws(x.owner)?, + prefix: try_from_aws(x.prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_buckets(try_into_aws(x.buckets)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListDirectoryBucketsInput { type Target = aws_sdk_s3::operation::list_directory_buckets::ListDirectoryBucketsInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -continuation_token: try_from_aws(x.continuation_token)?, -max_directory_buckets: try_from_aws(x.max_directory_buckets)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + continuation_token: try_from_aws(x.continuation_token)?, + max_directory_buckets: try_from_aws(x.max_directory_buckets)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_max_directory_buckets(try_into_aws(x.max_directory_buckets)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_max_directory_buckets(try_into_aws(x.max_directory_buckets)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListDirectoryBucketsOutput { type Target = aws_sdk_s3::operation::list_directory_buckets::ListDirectoryBucketsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -buckets: try_from_aws(x.buckets)?, -continuation_token: try_from_aws(x.continuation_token)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + buckets: try_from_aws(x.buckets)?, + continuation_token: try_from_aws(x.continuation_token)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_buckets(try_into_aws(x.buckets)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_buckets(try_into_aws(x.buckets)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListMultipartUploadsInput { type Target = aws_sdk_s3::operation::list_multipart_uploads::ListMultipartUploadsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key_marker: try_from_aws(x.key_marker)?, -max_uploads: try_from_aws(x.max_uploads)?, -prefix: try_from_aws(x.prefix)?, -request_payer: try_from_aws(x.request_payer)?, -upload_id_marker: try_from_aws(x.upload_id_marker)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key_marker(try_into_aws(x.key_marker)?); -y = y.set_max_uploads(try_into_aws(x.max_uploads)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key_marker: try_from_aws(x.key_marker)?, + max_uploads: try_from_aws(x.max_uploads)?, + prefix: try_from_aws(x.prefix)?, + request_payer: try_from_aws(x.request_payer)?, + upload_id_marker: try_from_aws(x.upload_id_marker)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key_marker(try_into_aws(x.key_marker)?); + y = y.set_max_uploads(try_into_aws(x.max_uploads)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListMultipartUploadsOutput { type Target = aws_sdk_s3::operation::list_multipart_uploads::ListMultipartUploadsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: try_from_aws(x.bucket)?, -common_prefixes: try_from_aws(x.common_prefixes)?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -is_truncated: try_from_aws(x.is_truncated)?, -key_marker: try_from_aws(x.key_marker)?, -max_uploads: try_from_aws(x.max_uploads)?, -next_key_marker: try_from_aws(x.next_key_marker)?, -next_upload_id_marker: try_from_aws(x.next_upload_id_marker)?, -prefix: try_from_aws(x.prefix)?, -request_charged: try_from_aws(x.request_charged)?, -upload_id_marker: try_from_aws(x.upload_id_marker)?, -uploads: try_from_aws(x.uploads)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_key_marker(try_into_aws(x.key_marker)?); -y = y.set_max_uploads(try_into_aws(x.max_uploads)?); -y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); -y = y.set_next_upload_id_marker(try_into_aws(x.next_upload_id_marker)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); -y = y.set_uploads(try_into_aws(x.uploads)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: try_from_aws(x.bucket)?, + common_prefixes: try_from_aws(x.common_prefixes)?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + is_truncated: try_from_aws(x.is_truncated)?, + key_marker: try_from_aws(x.key_marker)?, + max_uploads: try_from_aws(x.max_uploads)?, + next_key_marker: try_from_aws(x.next_key_marker)?, + next_upload_id_marker: try_from_aws(x.next_upload_id_marker)?, + prefix: try_from_aws(x.prefix)?, + request_charged: try_from_aws(x.request_charged)?, + upload_id_marker: try_from_aws(x.upload_id_marker)?, + uploads: try_from_aws(x.uploads)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_key_marker(try_into_aws(x.key_marker)?); + y = y.set_max_uploads(try_into_aws(x.max_uploads)?); + y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); + y = y.set_next_upload_id_marker(try_into_aws(x.next_upload_id_marker)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_upload_id_marker(try_into_aws(x.upload_id_marker)?); + y = y.set_uploads(try_into_aws(x.uploads)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListObjectVersionsInput { type Target = aws_sdk_s3::operation::list_object_versions::ListObjectVersionsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key_marker: try_from_aws(x.key_marker)?, -max_keys: try_from_aws(x.max_keys)?, -optional_object_attributes: try_from_aws(x.optional_object_attributes)?, -prefix: try_from_aws(x.prefix)?, -request_payer: try_from_aws(x.request_payer)?, -version_id_marker: try_from_aws(x.version_id_marker)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key_marker(try_into_aws(x.key_marker)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key_marker: try_from_aws(x.key_marker)?, + max_keys: try_from_aws(x.max_keys)?, + optional_object_attributes: try_from_aws(x.optional_object_attributes)?, + prefix: try_from_aws(x.prefix)?, + request_payer: try_from_aws(x.request_payer)?, + version_id_marker: try_from_aws(x.version_id_marker)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key_marker(try_into_aws(x.key_marker)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListObjectVersionsOutput { type Target = aws_sdk_s3::operation::list_object_versions::ListObjectVersionsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -common_prefixes: try_from_aws(x.common_prefixes)?, -delete_markers: try_from_aws(x.delete_markers)?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -is_truncated: try_from_aws(x.is_truncated)?, -key_marker: try_from_aws(x.key_marker)?, -max_keys: try_from_aws(x.max_keys)?, -name: try_from_aws(x.name)?, -next_key_marker: try_from_aws(x.next_key_marker)?, -next_version_id_marker: try_from_aws(x.next_version_id_marker)?, -prefix: try_from_aws(x.prefix)?, -request_charged: try_from_aws(x.request_charged)?, -version_id_marker: try_from_aws(x.version_id_marker)?, -versions: try_from_aws(x.versions)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); -y = y.set_delete_markers(try_into_aws(x.delete_markers)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_key_marker(try_into_aws(x.key_marker)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); -y = y.set_next_version_id_marker(try_into_aws(x.next_version_id_marker)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); -y = y.set_versions(try_into_aws(x.versions)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + common_prefixes: try_from_aws(x.common_prefixes)?, + delete_markers: try_from_aws(x.delete_markers)?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + is_truncated: try_from_aws(x.is_truncated)?, + key_marker: try_from_aws(x.key_marker)?, + max_keys: try_from_aws(x.max_keys)?, + name: try_from_aws(x.name)?, + next_key_marker: try_from_aws(x.next_key_marker)?, + next_version_id_marker: try_from_aws(x.next_version_id_marker)?, + prefix: try_from_aws(x.prefix)?, + request_charged: try_from_aws(x.request_charged)?, + version_id_marker: try_from_aws(x.version_id_marker)?, + versions: try_from_aws(x.versions)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); + y = y.set_delete_markers(try_into_aws(x.delete_markers)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_key_marker(try_into_aws(x.key_marker)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_next_key_marker(try_into_aws(x.next_key_marker)?); + y = y.set_next_version_id_marker(try_into_aws(x.next_version_id_marker)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_version_id_marker(try_into_aws(x.version_id_marker)?); + y = y.set_versions(try_into_aws(x.versions)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListObjectsInput { type Target = aws_sdk_s3::operation::list_objects::ListObjectsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -marker: try_from_aws(x.marker)?, -max_keys: try_from_aws(x.max_keys)?, -optional_object_attributes: try_from_aws(x.optional_object_attributes)?, -prefix: try_from_aws(x.prefix)?, -request_payer: try_from_aws(x.request_payer)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_marker(try_into_aws(x.marker)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + marker: try_from_aws(x.marker)?, + max_keys: try_from_aws(x.max_keys)?, + optional_object_attributes: try_from_aws(x.optional_object_attributes)?, + prefix: try_from_aws(x.prefix)?, + request_payer: try_from_aws(x.request_payer)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_marker(try_into_aws(x.marker)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListObjectsOutput { type Target = aws_sdk_s3::operation::list_objects::ListObjectsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -prefix: try_from_aws(x.prefix)?, -marker: try_from_aws(x.marker)?, -max_keys: try_from_aws(x.max_keys)?, -is_truncated: try_from_aws(x.is_truncated)?, -contents: try_from_aws(x.contents)?, -common_prefixes: try_from_aws(x.common_prefixes)?, -delimiter: try_from_aws(x.delimiter)?, -next_marker: try_from_aws(x.next_marker)?, -encoding_type: try_from_aws(x.encoding_type)?, -request_charged: try_from_aws(x.request_charged)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_marker(try_into_aws(x.marker)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_contents(try_into_aws(x.contents)?); -y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_next_marker(try_into_aws(x.next_marker)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + prefix: try_from_aws(x.prefix)?, + marker: try_from_aws(x.marker)?, + max_keys: try_from_aws(x.max_keys)?, + is_truncated: try_from_aws(x.is_truncated)?, + contents: try_from_aws(x.contents)?, + common_prefixes: try_from_aws(x.common_prefixes)?, + delimiter: try_from_aws(x.delimiter)?, + next_marker: try_from_aws(x.next_marker)?, + encoding_type: try_from_aws(x.encoding_type)?, + request_charged: try_from_aws(x.request_charged)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_marker(try_into_aws(x.marker)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_contents(try_into_aws(x.contents)?); + y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_next_marker(try_into_aws(x.next_marker)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListObjectsV2Input { type Target = aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Input; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -continuation_token: try_from_aws(x.continuation_token)?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -fetch_owner: try_from_aws(x.fetch_owner)?, -max_keys: try_from_aws(x.max_keys)?, -optional_object_attributes: try_from_aws(x.optional_object_attributes)?, -prefix: try_from_aws(x.prefix)?, -request_payer: try_from_aws(x.request_payer)?, -start_after: try_from_aws(x.start_after)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_start_after(try_into_aws(x.start_after)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + continuation_token: try_from_aws(x.continuation_token)?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + fetch_owner: try_from_aws(x.fetch_owner)?, + max_keys: try_from_aws(x.max_keys)?, + optional_object_attributes: try_from_aws(x.optional_object_attributes)?, + prefix: try_from_aws(x.prefix)?, + request_payer: try_from_aws(x.request_payer)?, + start_after: try_from_aws(x.start_after)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_fetch_owner(try_into_aws(x.fetch_owner)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_optional_object_attributes(try_into_aws(x.optional_object_attributes)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_start_after(try_into_aws(x.start_after)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListObjectsV2Output { type Target = aws_sdk_s3::operation::list_objects_v2::ListObjectsV2Output; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -prefix: try_from_aws(x.prefix)?, -max_keys: try_from_aws(x.max_keys)?, -key_count: try_from_aws(x.key_count)?, -continuation_token: try_from_aws(x.continuation_token)?, -is_truncated: try_from_aws(x.is_truncated)?, -next_continuation_token: try_from_aws(x.next_continuation_token)?, -contents: try_from_aws(x.contents)?, -common_prefixes: try_from_aws(x.common_prefixes)?, -delimiter: try_from_aws(x.delimiter)?, -encoding_type: try_from_aws(x.encoding_type)?, -start_after: try_from_aws(x.start_after)?, -request_charged: try_from_aws(x.request_charged)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_max_keys(try_into_aws(x.max_keys)?); -y = y.set_key_count(try_into_aws(x.key_count)?); -y = y.set_continuation_token(try_into_aws(x.continuation_token)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); -y = y.set_contents(try_into_aws(x.contents)?); -y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); -y = y.set_delimiter(try_into_aws(x.delimiter)?); -y = y.set_encoding_type(try_into_aws(x.encoding_type)?); -y = y.set_start_after(try_into_aws(x.start_after)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + prefix: try_from_aws(x.prefix)?, + max_keys: try_from_aws(x.max_keys)?, + key_count: try_from_aws(x.key_count)?, + continuation_token: try_from_aws(x.continuation_token)?, + is_truncated: try_from_aws(x.is_truncated)?, + next_continuation_token: try_from_aws(x.next_continuation_token)?, + contents: try_from_aws(x.contents)?, + common_prefixes: try_from_aws(x.common_prefixes)?, + delimiter: try_from_aws(x.delimiter)?, + encoding_type: try_from_aws(x.encoding_type)?, + start_after: try_from_aws(x.start_after)?, + request_charged: try_from_aws(x.request_charged)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_max_keys(try_into_aws(x.max_keys)?); + y = y.set_key_count(try_into_aws(x.key_count)?); + y = y.set_continuation_token(try_into_aws(x.continuation_token)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_next_continuation_token(try_into_aws(x.next_continuation_token)?); + y = y.set_contents(try_into_aws(x.contents)?); + y = y.set_common_prefixes(try_into_aws(x.common_prefixes)?); + y = y.set_delimiter(try_into_aws(x.delimiter)?); + y = y.set_encoding_type(try_into_aws(x.encoding_type)?); + y = y.set_start_after(try_into_aws(x.start_after)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ListPartsInput { type Target = aws_sdk_s3::operation::list_parts::ListPartsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -max_parts: try_from_aws(x.max_parts)?, -part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_max_parts(try_into_aws(x.max_parts)?); -y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + max_parts: try_from_aws(x.max_parts)?, + part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_max_parts(try_into_aws(x.max_parts)?); + y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ListPartsOutput { type Target = aws_sdk_s3::operation::list_parts::ListPartsOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -abort_date: try_from_aws(x.abort_date)?, -abort_rule_id: try_from_aws(x.abort_rule_id)?, -bucket: try_from_aws(x.bucket)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -initiator: try_from_aws(x.initiator)?, -is_truncated: try_from_aws(x.is_truncated)?, -key: try_from_aws(x.key)?, -max_parts: try_from_aws(x.max_parts)?, -next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, -owner: try_from_aws(x.owner)?, -part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, -parts: try_from_aws(x.parts)?, -request_charged: try_from_aws(x.request_charged)?, -storage_class: try_from_aws(x.storage_class)?, -upload_id: try_from_aws(x.upload_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_abort_date(try_into_aws(x.abort_date)?); -y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); -y = y.set_bucket(try_into_aws(x.bucket)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_initiator(try_into_aws(x.initiator)?); -y = y.set_is_truncated(try_into_aws(x.is_truncated)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_max_parts(try_into_aws(x.max_parts)?); -y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); -y = y.set_parts(try_into_aws(x.parts)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_upload_id(try_into_aws(x.upload_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + abort_date: try_from_aws(x.abort_date)?, + abort_rule_id: try_from_aws(x.abort_rule_id)?, + bucket: try_from_aws(x.bucket)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + initiator: try_from_aws(x.initiator)?, + is_truncated: try_from_aws(x.is_truncated)?, + key: try_from_aws(x.key)?, + max_parts: try_from_aws(x.max_parts)?, + next_part_number_marker: x.next_part_number_marker.as_deref().map(integer_from_string).transpose()?, + owner: try_from_aws(x.owner)?, + part_number_marker: x.part_number_marker.as_deref().map(integer_from_string).transpose()?, + parts: try_from_aws(x.parts)?, + request_charged: try_from_aws(x.request_charged)?, + storage_class: try_from_aws(x.storage_class)?, + upload_id: try_from_aws(x.upload_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_abort_date(try_into_aws(x.abort_date)?); + y = y.set_abort_rule_id(try_into_aws(x.abort_rule_id)?); + y = y.set_bucket(try_into_aws(x.bucket)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_initiator(try_into_aws(x.initiator)?); + y = y.set_is_truncated(try_into_aws(x.is_truncated)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_max_parts(try_into_aws(x.max_parts)?); + y = y.set_next_part_number_marker(x.next_part_number_marker.map(string_from_integer)); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_part_number_marker(x.part_number_marker.map(string_from_integer)); + y = y.set_parts(try_into_aws(x.parts)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_upload_id(try_into_aws(x.upload_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::LocationInfo { type Target = aws_sdk_s3::types::LocationInfo; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -type_: try_from_aws(x.r#type)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + type_: try_from_aws(x.r#type)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_type(try_into_aws(x.type_)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_type(try_into_aws(x.type_)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::LocationType { type Target = aws_sdk_s3::types::LocationType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::LocationType::AvailabilityZone => Self::from_static(Self::AVAILABILITY_ZONE), -aws_sdk_s3::types::LocationType::LocalZone => Self::from_static(Self::LOCAL_ZONE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::LocationType::AvailabilityZone => Self::from_static(Self::AVAILABILITY_ZONE), + aws_sdk_s3::types::LocationType::LocalZone => Self::from_static(Self::LOCAL_ZONE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::LocationType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::LocationType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::LoggingEnabled { type Target = aws_sdk_s3::types::LoggingEnabled; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -target_bucket: try_from_aws(x.target_bucket)?, -target_grants: try_from_aws(x.target_grants)?, -target_object_key_format: try_from_aws(x.target_object_key_format)?, -target_prefix: try_from_aws(x.target_prefix)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_target_bucket(Some(try_into_aws(x.target_bucket)?)); -y = y.set_target_grants(try_into_aws(x.target_grants)?); -y = y.set_target_object_key_format(try_into_aws(x.target_object_key_format)?); -y = y.set_target_prefix(Some(try_into_aws(x.target_prefix)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + target_bucket: try_from_aws(x.target_bucket)?, + target_grants: try_from_aws(x.target_grants)?, + target_object_key_format: try_from_aws(x.target_object_key_format)?, + target_prefix: try_from_aws(x.target_prefix)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_target_bucket(Some(try_into_aws(x.target_bucket)?)); + y = y.set_target_grants(try_into_aws(x.target_grants)?); + y = y.set_target_object_key_format(try_into_aws(x.target_object_key_format)?); + y = y.set_target_prefix(Some(try_into_aws(x.target_prefix)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::MFADelete { type Target = aws_sdk_s3::types::MfaDelete; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MfaDelete::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::MfaDelete::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MfaDelete::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::MfaDelete::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::MfaDelete::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::MfaDelete::from(x.as_str())) + } } impl AwsConversion for s3s::dto::MFADeleteStatus { type Target = aws_sdk_s3::types::MfaDeleteStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MfaDeleteStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::MfaDeleteStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MfaDeleteStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::MfaDeleteStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::MfaDeleteStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::MfaDeleteStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::MetadataDirective { type Target = aws_sdk_s3::types::MetadataDirective; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MetadataDirective::Copy => Self::from_static(Self::COPY), -aws_sdk_s3::types::MetadataDirective::Replace => Self::from_static(Self::REPLACE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MetadataDirective::Copy => Self::from_static(Self::COPY), + aws_sdk_s3::types::MetadataDirective::Replace => Self::from_static(Self::REPLACE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::MetadataDirective::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::MetadataDirective::from(x.as_str())) + } } impl AwsConversion for s3s::dto::MetadataEntry { type Target = aws_sdk_s3::types::MetadataEntry; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -name: try_from_aws(x.name)?, -value: try_from_aws(x.value)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + name: try_from_aws(x.name)?, + value: try_from_aws(x.value)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_name(try_into_aws(x.name)?); -y = y.set_value(try_into_aws(x.value)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_name(try_into_aws(x.name)?); + y = y.set_value(try_into_aws(x.value)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::MetadataTableConfiguration { type Target = aws_sdk_s3::types::MetadataTableConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3_tables_destination: unwrap_from_aws(x.s3_tables_destination, "s3_tables_destination")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + s3_tables_destination: unwrap_from_aws(x.s3_tables_destination, "s3_tables_destination")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3_tables_destination(Some(try_into_aws(x.s3_tables_destination)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3_tables_destination(Some(try_into_aws(x.s3_tables_destination)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::MetadataTableConfigurationResult { type Target = aws_sdk_s3::types::MetadataTableConfigurationResult; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3_tables_destination_result: unwrap_from_aws(x.s3_tables_destination_result, "s3_tables_destination_result")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + s3_tables_destination_result: unwrap_from_aws(x.s3_tables_destination_result, "s3_tables_destination_result")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3_tables_destination_result(Some(try_into_aws(x.s3_tables_destination_result)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3_tables_destination_result(Some(try_into_aws(x.s3_tables_destination_result)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Metrics { type Target = aws_sdk_s3::types::Metrics; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -event_threshold: try_from_aws(x.event_threshold)?, -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + event_threshold: try_from_aws(x.event_threshold)?, + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_event_threshold(try_into_aws(x.event_threshold)?); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_event_threshold(try_into_aws(x.event_threshold)?); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::MetricsAndOperator { type Target = aws_sdk_s3::types::MetricsAndOperator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_point_arn: try_from_aws(x.access_point_arn)?, -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_point_arn: try_from_aws(x.access_point_arn)?, + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_point_arn(try_into_aws(x.access_point_arn)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_point_arn(try_into_aws(x.access_point_arn)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::MetricsConfiguration { type Target = aws_sdk_s3::types::MetricsConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::MetricsFilter { type Target = aws_sdk_s3::types::MetricsFilter; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MetricsFilter::AccessPointArn(v) => Self::AccessPointArn(try_from_aws(v)?), -aws_sdk_s3::types::MetricsFilter::And(v) => Self::And(try_from_aws(v)?), -aws_sdk_s3::types::MetricsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), -aws_sdk_s3::types::MetricsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), -_ => unimplemented!("unknown variant of aws_sdk_s3::types::MetricsFilter: {x:?}"), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(match x { -Self::AccessPointArn(v) => aws_sdk_s3::types::MetricsFilter::AccessPointArn(try_into_aws(v)?), -Self::And(v) => aws_sdk_s3::types::MetricsFilter::And(try_into_aws(v)?), -Self::Prefix(v) => aws_sdk_s3::types::MetricsFilter::Prefix(try_into_aws(v)?), -Self::Tag(v) => aws_sdk_s3::types::MetricsFilter::Tag(try_into_aws(v)?), -_ => unimplemented!("unknown variant of MetricsFilter: {x:?}"), -}) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MetricsFilter::AccessPointArn(v) => Self::AccessPointArn(try_from_aws(v)?), + aws_sdk_s3::types::MetricsFilter::And(v) => Self::And(try_from_aws(v)?), + aws_sdk_s3::types::MetricsFilter::Prefix(v) => Self::Prefix(try_from_aws(v)?), + aws_sdk_s3::types::MetricsFilter::Tag(v) => Self::Tag(try_from_aws(v)?), + _ => unimplemented!("unknown variant of aws_sdk_s3::types::MetricsFilter: {x:?}"), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(match x { + Self::AccessPointArn(v) => aws_sdk_s3::types::MetricsFilter::AccessPointArn(try_into_aws(v)?), + Self::And(v) => aws_sdk_s3::types::MetricsFilter::And(try_into_aws(v)?), + Self::Prefix(v) => aws_sdk_s3::types::MetricsFilter::Prefix(try_into_aws(v)?), + Self::Tag(v) => aws_sdk_s3::types::MetricsFilter::Tag(try_into_aws(v)?), + _ => unimplemented!("unknown variant of MetricsFilter: {x:?}"), + }) + } } impl AwsConversion for s3s::dto::MetricsStatus { type Target = aws_sdk_s3::types::MetricsStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::MetricsStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::MetricsStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::MetricsStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::MetricsStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::MetricsStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::MetricsStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::MultipartUpload { type Target = aws_sdk_s3::types::MultipartUpload; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -initiated: try_from_aws(x.initiated)?, -initiator: try_from_aws(x.initiator)?, -key: try_from_aws(x.key)?, -owner: try_from_aws(x.owner)?, -storage_class: try_from_aws(x.storage_class)?, -upload_id: try_from_aws(x.upload_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_initiated(try_into_aws(x.initiated)?); -y = y.set_initiator(try_into_aws(x.initiator)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_upload_id(try_into_aws(x.upload_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + initiated: try_from_aws(x.initiated)?, + initiator: try_from_aws(x.initiator)?, + key: try_from_aws(x.key)?, + owner: try_from_aws(x.owner)?, + storage_class: try_from_aws(x.storage_class)?, + upload_id: try_from_aws(x.upload_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_initiated(try_into_aws(x.initiated)?); + y = y.set_initiator(try_into_aws(x.initiator)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_upload_id(try_into_aws(x.upload_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoSuchBucket { type Target = aws_sdk_s3::types::error::NoSuchBucket; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoSuchKey { type Target = aws_sdk_s3::types::error::NoSuchKey; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoSuchUpload { type Target = aws_sdk_s3::types::error::NoSuchUpload; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoncurrentVersionExpiration { type Target = aws_sdk_s3::types::NoncurrentVersionExpiration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, -noncurrent_days: try_from_aws(x.noncurrent_days)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, + noncurrent_days: try_from_aws(x.noncurrent_days)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); -y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); + y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NoncurrentVersionTransition { type Target = aws_sdk_s3::types::NoncurrentVersionTransition; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, -noncurrent_days: try_from_aws(x.noncurrent_days)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + newer_noncurrent_versions: try_from_aws(x.newer_noncurrent_versions)?, + noncurrent_days: try_from_aws(x.noncurrent_days)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); -y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_newer_noncurrent_versions(try_into_aws(x.newer_noncurrent_versions)?); + y = y.set_noncurrent_days(try_into_aws(x.noncurrent_days)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NotFound { type Target = aws_sdk_s3::types::error::NotFound; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NotificationConfiguration { type Target = aws_sdk_s3::types::NotificationConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, -lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, -queue_configurations: try_from_aws(x.queue_configurations)?, -topic_configurations: try_from_aws(x.topic_configurations)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); -y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); -y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); -y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + event_bridge_configuration: try_from_aws(x.event_bridge_configuration)?, + lambda_function_configurations: try_from_aws(x.lambda_function_configurations)?, + queue_configurations: try_from_aws(x.queue_configurations)?, + topic_configurations: try_from_aws(x.topic_configurations)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_event_bridge_configuration(try_into_aws(x.event_bridge_configuration)?); + y = y.set_lambda_function_configurations(try_into_aws(x.lambda_function_configurations)?); + y = y.set_queue_configurations(try_into_aws(x.queue_configurations)?); + y = y.set_topic_configurations(try_into_aws(x.topic_configurations)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::NotificationConfigurationFilter { type Target = aws_sdk_s3::types::NotificationConfigurationFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -key: try_from_aws(x.key)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + key: try_from_aws(x.key)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_key(try_into_aws(x.key)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_key(try_into_aws(x.key)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Object { type Target = aws_sdk_s3::types::Object; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -key: try_from_aws(x.key)?, -last_modified: try_from_aws(x.last_modified)?, -owner: try_from_aws(x.owner)?, -restore_status: try_from_aws(x.restore_status)?, -size: try_from_aws(x.size)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_restore_status(try_into_aws(x.restore_status)?); -y = y.set_size(try_into_aws(x.size)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + key: try_from_aws(x.key)?, + last_modified: try_from_aws(x.last_modified)?, + owner: try_from_aws(x.owner)?, + restore_status: try_from_aws(x.restore_status)?, + size: try_from_aws(x.size)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_restore_status(try_into_aws(x.restore_status)?); + y = y.set_size(try_into_aws(x.size)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectAlreadyInActiveTierError { type Target = aws_sdk_s3::types::error::ObjectAlreadyInActiveTierError; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectAttributes { type Target = aws_sdk_s3::types::ObjectAttributes; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectAttributes::Checksum => Self::from_static(Self::CHECKSUM), -aws_sdk_s3::types::ObjectAttributes::Etag => Self::from_static(Self::ETAG), -aws_sdk_s3::types::ObjectAttributes::ObjectParts => Self::from_static(Self::OBJECT_PARTS), -aws_sdk_s3::types::ObjectAttributes::ObjectSize => Self::from_static(Self::OBJECT_SIZE), -aws_sdk_s3::types::ObjectAttributes::StorageClass => Self::from_static(Self::STORAGE_CLASS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectAttributes::Checksum => Self::from_static(Self::CHECKSUM), + aws_sdk_s3::types::ObjectAttributes::Etag => Self::from_static(Self::ETAG), + aws_sdk_s3::types::ObjectAttributes::ObjectParts => Self::from_static(Self::OBJECT_PARTS), + aws_sdk_s3::types::ObjectAttributes::ObjectSize => Self::from_static(Self::OBJECT_SIZE), + aws_sdk_s3::types::ObjectAttributes::StorageClass => Self::from_static(Self::STORAGE_CLASS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectAttributes::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectAttributes::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectCannedACL { type Target = aws_sdk_s3::types::ObjectCannedAcl; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), -aws_sdk_s3::types::ObjectCannedAcl::AwsExecRead => Self::from_static(Self::AWS_EXEC_READ), -aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerFullControl => Self::from_static(Self::BUCKET_OWNER_FULL_CONTROL), -aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerRead => Self::from_static(Self::BUCKET_OWNER_READ), -aws_sdk_s3::types::ObjectCannedAcl::Private => Self::from_static(Self::PRIVATE), -aws_sdk_s3::types::ObjectCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), -aws_sdk_s3::types::ObjectCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectCannedAcl::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectCannedAcl::AuthenticatedRead => Self::from_static(Self::AUTHENTICATED_READ), + aws_sdk_s3::types::ObjectCannedAcl::AwsExecRead => Self::from_static(Self::AWS_EXEC_READ), + aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerFullControl => Self::from_static(Self::BUCKET_OWNER_FULL_CONTROL), + aws_sdk_s3::types::ObjectCannedAcl::BucketOwnerRead => Self::from_static(Self::BUCKET_OWNER_READ), + aws_sdk_s3::types::ObjectCannedAcl::Private => Self::from_static(Self::PRIVATE), + aws_sdk_s3::types::ObjectCannedAcl::PublicRead => Self::from_static(Self::PUBLIC_READ), + aws_sdk_s3::types::ObjectCannedAcl::PublicReadWrite => Self::from_static(Self::PUBLIC_READ_WRITE), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectCannedAcl::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectIdentifier { type Target = aws_sdk_s3::types::ObjectIdentifier; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -e_tag: try_from_aws(x.e_tag)?, -key: try_from_aws(x.key)?, -last_modified_time: try_from_aws(x.last_modified_time)?, -size: try_from_aws(x.size)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_last_modified_time(try_into_aws(x.last_modified_time)?); -y = y.set_size(try_into_aws(x.size)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + e_tag: try_from_aws(x.e_tag)?, + key: try_from_aws(x.key)?, + last_modified_time: try_from_aws(x.last_modified_time)?, + size: try_from_aws(x.size)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_last_modified_time(try_into_aws(x.last_modified_time)?); + y = y.set_size(try_into_aws(x.size)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ObjectLockConfiguration { type Target = aws_sdk_s3::types::ObjectLockConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -object_lock_enabled: try_from_aws(x.object_lock_enabled)?, -rule: try_from_aws(x.rule)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + object_lock_enabled: try_from_aws(x.object_lock_enabled)?, + rule: try_from_aws(x.rule)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_object_lock_enabled(try_into_aws(x.object_lock_enabled)?); -y = y.set_rule(try_into_aws(x.rule)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_object_lock_enabled(try_into_aws(x.object_lock_enabled)?); + y = y.set_rule(try_into_aws(x.rule)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectLockEnabled { type Target = aws_sdk_s3::types::ObjectLockEnabled; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectLockEnabled::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectLockEnabled::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectLockEnabled::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectLockEnabled::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectLockLegalHold { type Target = aws_sdk_s3::types::ObjectLockLegalHold; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectLockLegalHoldStatus { type Target = aws_sdk_s3::types::ObjectLockLegalHoldStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectLockLegalHoldStatus::Off => Self::from_static(Self::OFF), -aws_sdk_s3::types::ObjectLockLegalHoldStatus::On => Self::from_static(Self::ON), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectLockLegalHoldStatus::Off => Self::from_static(Self::OFF), + aws_sdk_s3::types::ObjectLockLegalHoldStatus::On => Self::from_static(Self::ON), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectLockLegalHoldStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectLockLegalHoldStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectLockMode { type Target = aws_sdk_s3::types::ObjectLockMode; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectLockMode::Compliance => Self::from_static(Self::COMPLIANCE), -aws_sdk_s3::types::ObjectLockMode::Governance => Self::from_static(Self::GOVERNANCE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectLockMode::Compliance => Self::from_static(Self::COMPLIANCE), + aws_sdk_s3::types::ObjectLockMode::Governance => Self::from_static(Self::GOVERNANCE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectLockMode::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectLockMode::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectLockRetention { type Target = aws_sdk_s3::types::ObjectLockRetention; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -mode: try_from_aws(x.mode)?, -retain_until_date: try_from_aws(x.retain_until_date)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + mode: try_from_aws(x.mode)?, + retain_until_date: try_from_aws(x.retain_until_date)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_mode(try_into_aws(x.mode)?); -y = y.set_retain_until_date(try_into_aws(x.retain_until_date)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_mode(try_into_aws(x.mode)?); + y = y.set_retain_until_date(try_into_aws(x.retain_until_date)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectLockRetentionMode { type Target = aws_sdk_s3::types::ObjectLockRetentionMode; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectLockRetentionMode::Compliance => Self::from_static(Self::COMPLIANCE), -aws_sdk_s3::types::ObjectLockRetentionMode::Governance => Self::from_static(Self::GOVERNANCE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectLockRetentionMode::Compliance => Self::from_static(Self::COMPLIANCE), + aws_sdk_s3::types::ObjectLockRetentionMode::Governance => Self::from_static(Self::GOVERNANCE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectLockRetentionMode::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectLockRetentionMode::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectLockRule { type Target = aws_sdk_s3::types::ObjectLockRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -default_retention: try_from_aws(x.default_retention)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + default_retention: try_from_aws(x.default_retention)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_default_retention(try_into_aws(x.default_retention)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_default_retention(try_into_aws(x.default_retention)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectNotInActiveTierError { type Target = aws_sdk_s3::types::error::ObjectNotInActiveTierError; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectOwnership { type Target = aws_sdk_s3::types::ObjectOwnership; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectOwnership::BucketOwnerEnforced => Self::from_static(Self::BUCKET_OWNER_ENFORCED), -aws_sdk_s3::types::ObjectOwnership::BucketOwnerPreferred => Self::from_static(Self::BUCKET_OWNER_PREFERRED), -aws_sdk_s3::types::ObjectOwnership::ObjectWriter => Self::from_static(Self::OBJECT_WRITER), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectOwnership::BucketOwnerEnforced => Self::from_static(Self::BUCKET_OWNER_ENFORCED), + aws_sdk_s3::types::ObjectOwnership::BucketOwnerPreferred => Self::from_static(Self::BUCKET_OWNER_PREFERRED), + aws_sdk_s3::types::ObjectOwnership::ObjectWriter => Self::from_static(Self::OBJECT_WRITER), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectOwnership::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectOwnership::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectPart { type Target = aws_sdk_s3::types::ObjectPart; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -part_number: try_from_aws(x.part_number)?, -size: try_from_aws(x.size)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_part_number(try_into_aws(x.part_number)?); -y = y.set_size(try_into_aws(x.size)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + part_number: try_from_aws(x.part_number)?, + size: try_from_aws(x.size)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_part_number(try_into_aws(x.part_number)?); + y = y.set_size(try_into_aws(x.size)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectStorageClass { type Target = aws_sdk_s3::types::ObjectStorageClass; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), -aws_sdk_s3::types::ObjectStorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), -aws_sdk_s3::types::ObjectStorageClass::Glacier => Self::from_static(Self::GLACIER), -aws_sdk_s3::types::ObjectStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), -aws_sdk_s3::types::ObjectStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), -aws_sdk_s3::types::ObjectStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), -aws_sdk_s3::types::ObjectStorageClass::Outposts => Self::from_static(Self::OUTPOSTS), -aws_sdk_s3::types::ObjectStorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), -aws_sdk_s3::types::ObjectStorageClass::Snow => Self::from_static(Self::SNOW), -aws_sdk_s3::types::ObjectStorageClass::Standard => Self::from_static(Self::STANDARD), -aws_sdk_s3::types::ObjectStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectStorageClass::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), + aws_sdk_s3::types::ObjectStorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), + aws_sdk_s3::types::ObjectStorageClass::Glacier => Self::from_static(Self::GLACIER), + aws_sdk_s3::types::ObjectStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), + aws_sdk_s3::types::ObjectStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), + aws_sdk_s3::types::ObjectStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), + aws_sdk_s3::types::ObjectStorageClass::Outposts => Self::from_static(Self::OUTPOSTS), + aws_sdk_s3::types::ObjectStorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), + aws_sdk_s3::types::ObjectStorageClass::Snow => Self::from_static(Self::SNOW), + aws_sdk_s3::types::ObjectStorageClass::Standard => Self::from_static(Self::STANDARD), + aws_sdk_s3::types::ObjectStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectStorageClass::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ObjectVersion { type Target = aws_sdk_s3::types::ObjectVersion; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -is_latest: try_from_aws(x.is_latest)?, -key: try_from_aws(x.key)?, -last_modified: try_from_aws(x.last_modified)?, -owner: try_from_aws(x.owner)?, -restore_status: try_from_aws(x.restore_status)?, -size: try_from_aws(x.size)?, -storage_class: try_from_aws(x.storage_class)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_is_latest(try_into_aws(x.is_latest)?); -y = y.set_key(try_into_aws(x.key)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_owner(try_into_aws(x.owner)?); -y = y.set_restore_status(try_into_aws(x.restore_status)?); -y = y.set_size(try_into_aws(x.size)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + is_latest: try_from_aws(x.is_latest)?, + key: try_from_aws(x.key)?, + last_modified: try_from_aws(x.last_modified)?, + owner: try_from_aws(x.owner)?, + restore_status: try_from_aws(x.restore_status)?, + size: try_from_aws(x.size)?, + storage_class: try_from_aws(x.storage_class)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_is_latest(try_into_aws(x.is_latest)?); + y = y.set_key(try_into_aws(x.key)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_owner(try_into_aws(x.owner)?); + y = y.set_restore_status(try_into_aws(x.restore_status)?); + y = y.set_size(try_into_aws(x.size)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ObjectVersionStorageClass { type Target = aws_sdk_s3::types::ObjectVersionStorageClass; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ObjectVersionStorageClass::Standard => Self::from_static(Self::STANDARD), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ObjectVersionStorageClass::Standard => Self::from_static(Self::STANDARD), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ObjectVersionStorageClass::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ObjectVersionStorageClass::from(x.as_str())) + } } impl AwsConversion for s3s::dto::OptionalObjectAttributes { type Target = aws_sdk_s3::types::OptionalObjectAttributes; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::OptionalObjectAttributes::RestoreStatus => Self::from_static(Self::RESTORE_STATUS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::OptionalObjectAttributes::RestoreStatus => Self::from_static(Self::RESTORE_STATUS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::OptionalObjectAttributes::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::OptionalObjectAttributes::from(x.as_str())) + } } impl AwsConversion for s3s::dto::OutputLocation { type Target = aws_sdk_s3::types::OutputLocation; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -s3: try_from_aws(x.s3)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { s3: try_from_aws(x.s3)? }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_s3(try_into_aws(x.s3)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_s3(try_into_aws(x.s3)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::OutputSerialization { type Target = aws_sdk_s3::types::OutputSerialization; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -csv: try_from_aws(x.csv)?, -json: try_from_aws(x.json)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + csv: try_from_aws(x.csv)?, + json: try_from_aws(x.json)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_csv(try_into_aws(x.csv)?); -y = y.set_json(try_into_aws(x.json)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_csv(try_into_aws(x.csv)?); + y = y.set_json(try_into_aws(x.json)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Owner { type Target = aws_sdk_s3::types::Owner; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -display_name: try_from_aws(x.display_name)?, -id: try_from_aws(x.id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + display_name: try_from_aws(x.display_name)?, + id: try_from_aws(x.id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_display_name(try_into_aws(x.display_name)?); -y = y.set_id(try_into_aws(x.id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_display_name(try_into_aws(x.display_name)?); + y = y.set_id(try_into_aws(x.id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::OwnerOverride { type Target = aws_sdk_s3::types::OwnerOverride; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::OwnerOverride::Destination => Self::from_static(Self::DESTINATION), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::OwnerOverride::Destination => Self::from_static(Self::DESTINATION), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::OwnerOverride::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::OwnerOverride::from(x.as_str())) + } } impl AwsConversion for s3s::dto::OwnershipControls { type Target = aws_sdk_s3::types::OwnershipControls; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -rules: try_from_aws(x.rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + rules: try_from_aws(x.rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_rules(Some(try_into_aws(x.rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_rules(Some(try_into_aws(x.rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::OwnershipControlsRule { type Target = aws_sdk_s3::types::OwnershipControlsRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -object_ownership: try_from_aws(x.object_ownership)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + object_ownership: try_from_aws(x.object_ownership)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_object_ownership(Some(try_into_aws(x.object_ownership)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_object_ownership(Some(try_into_aws(x.object_ownership)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ParquetInput { type Target = aws_sdk_s3::types::ParquetInput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Part { type Target = aws_sdk_s3::types::Part; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -e_tag: try_from_aws(x.e_tag)?, -last_modified: try_from_aws(x.last_modified)?, -part_number: try_from_aws(x.part_number)?, -size: try_from_aws(x.size)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_part_number(try_into_aws(x.part_number)?); -y = y.set_size(try_into_aws(x.size)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + e_tag: try_from_aws(x.e_tag)?, + last_modified: try_from_aws(x.last_modified)?, + part_number: try_from_aws(x.part_number)?, + size: try_from_aws(x.size)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_part_number(try_into_aws(x.part_number)?); + y = y.set_size(try_into_aws(x.size)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PartitionDateSource { type Target = aws_sdk_s3::types::PartitionDateSource; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::PartitionDateSource::DeliveryTime => Self::from_static(Self::DELIVERY_TIME), -aws_sdk_s3::types::PartitionDateSource::EventTime => Self::from_static(Self::EVENT_TIME), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::PartitionDateSource::DeliveryTime => Self::from_static(Self::DELIVERY_TIME), + aws_sdk_s3::types::PartitionDateSource::EventTime => Self::from_static(Self::EVENT_TIME), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::PartitionDateSource::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::PartitionDateSource::from(x.as_str())) + } } impl AwsConversion for s3s::dto::PartitionedPrefix { type Target = aws_sdk_s3::types::PartitionedPrefix; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -partition_date_source: try_from_aws(x.partition_date_source)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + partition_date_source: try_from_aws(x.partition_date_source)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_partition_date_source(try_into_aws(x.partition_date_source)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_partition_date_source(try_into_aws(x.partition_date_source)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Payer { type Target = aws_sdk_s3::types::Payer; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Payer::BucketOwner => Self::from_static(Self::BUCKET_OWNER), -aws_sdk_s3::types::Payer::Requester => Self::from_static(Self::REQUESTER), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Payer::BucketOwner => Self::from_static(Self::BUCKET_OWNER), + aws_sdk_s3::types::Payer::Requester => Self::from_static(Self::REQUESTER), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Payer::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Payer::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Permission { type Target = aws_sdk_s3::types::Permission; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Permission::FullControl => Self::from_static(Self::FULL_CONTROL), -aws_sdk_s3::types::Permission::Read => Self::from_static(Self::READ), -aws_sdk_s3::types::Permission::ReadAcp => Self::from_static(Self::READ_ACP), -aws_sdk_s3::types::Permission::Write => Self::from_static(Self::WRITE), -aws_sdk_s3::types::Permission::WriteAcp => Self::from_static(Self::WRITE_ACP), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Permission::FullControl => Self::from_static(Self::FULL_CONTROL), + aws_sdk_s3::types::Permission::Read => Self::from_static(Self::READ), + aws_sdk_s3::types::Permission::ReadAcp => Self::from_static(Self::READ_ACP), + aws_sdk_s3::types::Permission::Write => Self::from_static(Self::WRITE), + aws_sdk_s3::types::Permission::WriteAcp => Self::from_static(Self::WRITE_ACP), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Permission::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Permission::from(x.as_str())) + } } impl AwsConversion for s3s::dto::PolicyStatus { type Target = aws_sdk_s3::types::PolicyStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -is_public: try_from_aws(x.is_public)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + is_public: try_from_aws(x.is_public)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_is_public(try_into_aws(x.is_public)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_is_public(try_into_aws(x.is_public)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Progress { type Target = aws_sdk_s3::types::Progress; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bytes_processed: try_from_aws(x.bytes_processed)?, -bytes_returned: try_from_aws(x.bytes_returned)?, -bytes_scanned: try_from_aws(x.bytes_scanned)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bytes_processed: try_from_aws(x.bytes_processed)?, + bytes_returned: try_from_aws(x.bytes_returned)?, + bytes_scanned: try_from_aws(x.bytes_scanned)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); -y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); -y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); + y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); + y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ProgressEvent { type Target = aws_sdk_s3::types::ProgressEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -details: try_from_aws(x.details)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + details: try_from_aws(x.details)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_details(try_into_aws(x.details)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_details(try_into_aws(x.details)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Protocol { type Target = aws_sdk_s3::types::Protocol; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Protocol::Http => Self::from_static(Self::HTTP), -aws_sdk_s3::types::Protocol::Https => Self::from_static(Self::HTTPS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Protocol::Http => Self::from_static(Self::HTTP), + aws_sdk_s3::types::Protocol::Https => Self::from_static(Self::HTTPS), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Protocol::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Protocol::from(x.as_str())) + } } impl AwsConversion for s3s::dto::PublicAccessBlockConfiguration { type Target = aws_sdk_s3::types::PublicAccessBlockConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -block_public_acls: try_from_aws(x.block_public_acls)?, -block_public_policy: try_from_aws(x.block_public_policy)?, -ignore_public_acls: try_from_aws(x.ignore_public_acls)?, -restrict_public_buckets: try_from_aws(x.restrict_public_buckets)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_block_public_acls(try_into_aws(x.block_public_acls)?); -y = y.set_block_public_policy(try_into_aws(x.block_public_policy)?); -y = y.set_ignore_public_acls(try_into_aws(x.ignore_public_acls)?); -y = y.set_restrict_public_buckets(try_into_aws(x.restrict_public_buckets)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + block_public_acls: try_from_aws(x.block_public_acls)?, + block_public_policy: try_from_aws(x.block_public_policy)?, + ignore_public_acls: try_from_aws(x.ignore_public_acls)?, + restrict_public_buckets: try_from_aws(x.restrict_public_buckets)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_block_public_acls(try_into_aws(x.block_public_acls)?); + y = y.set_block_public_policy(try_into_aws(x.block_public_policy)?); + y = y.set_ignore_public_acls(try_into_aws(x.ignore_public_acls)?); + y = y.set_restrict_public_buckets(try_into_aws(x.restrict_public_buckets)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketAccelerateConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -accelerate_configuration: unwrap_from_aws(x.accelerate_configuration, "accelerate_configuration")?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_accelerate_configuration(Some(try_into_aws(x.accelerate_configuration)?)); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + accelerate_configuration: unwrap_from_aws(x.accelerate_configuration, "accelerate_configuration")?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_accelerate_configuration(Some(try_into_aws(x.accelerate_configuration)?)); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketAccelerateConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_accelerate_configuration::PutBucketAccelerateConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketAclInput { type Target = aws_sdk_s3::operation::put_bucket_acl::PutBucketAclInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -access_control_policy: try_from_aws(x.access_control_policy)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write: try_from_aws(x.grant_write)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write(try_into_aws(x.grant_write)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + access_control_policy: try_from_aws(x.access_control_policy)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write: try_from_aws(x.grant_write)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write(try_into_aws(x.grant_write)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketAclOutput { type Target = aws_sdk_s3::operation::put_bucket_acl::PutBucketAclOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketAnalyticsConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -analytics_configuration: unwrap_from_aws(x.analytics_configuration, "analytics_configuration")?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_analytics_configuration(Some(try_into_aws(x.analytics_configuration)?)); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + analytics_configuration: unwrap_from_aws(x.analytics_configuration, "analytics_configuration")?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_analytics_configuration(Some(try_into_aws(x.analytics_configuration)?)); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketAnalyticsConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_analytics_configuration::PutBucketAnalyticsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketCorsInput { type Target = aws_sdk_s3::operation::put_bucket_cors::PutBucketCorsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -cors_configuration: unwrap_from_aws(x.cors_configuration, "cors_configuration")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_cors_configuration(Some(try_into_aws(x.cors_configuration)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + cors_configuration: unwrap_from_aws(x.cors_configuration, "cors_configuration")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_cors_configuration(Some(try_into_aws(x.cors_configuration)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketCorsOutput { type Target = aws_sdk_s3::operation::put_bucket_cors::PutBucketCorsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketEncryptionInput { type Target = aws_sdk_s3::operation::put_bucket_encryption::PutBucketEncryptionInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -server_side_encryption_configuration: unwrap_from_aws(x.server_side_encryption_configuration, "server_side_encryption_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_server_side_encryption_configuration(Some(try_into_aws(x.server_side_encryption_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + server_side_encryption_configuration: unwrap_from_aws( + x.server_side_encryption_configuration, + "server_side_encryption_configuration", + )?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_server_side_encryption_configuration(Some(try_into_aws(x.server_side_encryption_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketEncryptionOutput { type Target = aws_sdk_s3::operation::put_bucket_encryption::PutBucketEncryptionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketIntelligentTieringConfigurationInput { - type Target = aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -id: unwrap_from_aws(x.id, "id")?, -intelligent_tiering_configuration: unwrap_from_aws(x.intelligent_tiering_configuration, "intelligent_tiering_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_intelligent_tiering_configuration(Some(try_into_aws(x.intelligent_tiering_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Target = + aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationInput; + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + id: unwrap_from_aws(x.id, "id")?, + intelligent_tiering_configuration: unwrap_from_aws( + x.intelligent_tiering_configuration, + "intelligent_tiering_configuration", + )?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_intelligent_tiering_configuration(Some(try_into_aws(x.intelligent_tiering_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketIntelligentTieringConfigurationOutput { - type Target = aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationOutput; -type Error = S3Error; + type Target = + aws_sdk_s3::operation::put_bucket_intelligent_tiering_configuration::PutBucketIntelligentTieringConfigurationOutput; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -inventory_configuration: unwrap_from_aws(x.inventory_configuration, "inventory_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_inventory_configuration(Some(try_into_aws(x.inventory_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + inventory_configuration: unwrap_from_aws(x.inventory_configuration, "inventory_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_inventory_configuration(Some(try_into_aws(x.inventory_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketInventoryConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_inventory_configuration::PutBucketInventoryConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketLifecycleConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -lifecycle_configuration: try_from_aws(x.lifecycle_configuration)?, -transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_lifecycle_configuration(try_into_aws(x.lifecycle_configuration)?); -y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + lifecycle_configuration: try_from_aws(x.lifecycle_configuration)?, + transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_lifecycle_configuration(try_into_aws(x.lifecycle_configuration)?); + y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketLifecycleConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_lifecycle_configuration::PutBucketLifecycleConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + transition_default_minimum_object_size: try_from_aws(x.transition_default_minimum_object_size)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_transition_default_minimum_object_size(try_into_aws(x.transition_default_minimum_object_size)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketLoggingInput { type Target = aws_sdk_s3::operation::put_bucket_logging::PutBucketLoggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_logging_status: unwrap_from_aws(x.bucket_logging_status, "bucket_logging_status")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_logging_status(Some(try_into_aws(x.bucket_logging_status)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_logging_status: unwrap_from_aws(x.bucket_logging_status, "bucket_logging_status")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_logging_status(Some(try_into_aws(x.bucket_logging_status)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketLoggingOutput { type Target = aws_sdk_s3::operation::put_bucket_logging::PutBucketLoggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketMetricsConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -id: unwrap_from_aws(x.id, "id")?, -metrics_configuration: unwrap_from_aws(x.metrics_configuration, "metrics_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_id(Some(try_into_aws(x.id)?)); -y = y.set_metrics_configuration(Some(try_into_aws(x.metrics_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + id: unwrap_from_aws(x.id, "id")?, + metrics_configuration: unwrap_from_aws(x.metrics_configuration, "metrics_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_id(Some(try_into_aws(x.id)?)); + y = y.set_metrics_configuration(Some(try_into_aws(x.metrics_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketMetricsConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_metrics_configuration::PutBucketMetricsConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketNotificationConfigurationInput { type Target = aws_sdk_s3::operation::put_bucket_notification_configuration::PutBucketNotificationConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -notification_configuration: unwrap_from_aws(x.notification_configuration, "notification_configuration")?, -skip_destination_validation: try_from_aws(x.skip_destination_validation)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_notification_configuration(Some(try_into_aws(x.notification_configuration)?)); -y = y.set_skip_destination_validation(try_into_aws(x.skip_destination_validation)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + notification_configuration: unwrap_from_aws(x.notification_configuration, "notification_configuration")?, + skip_destination_validation: try_from_aws(x.skip_destination_validation)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_notification_configuration(Some(try_into_aws(x.notification_configuration)?)); + y = y.set_skip_destination_validation(try_into_aws(x.skip_destination_validation)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketNotificationConfigurationOutput { type Target = aws_sdk_s3::operation::put_bucket_notification_configuration::PutBucketNotificationConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketOwnershipControlsInput { type Target = aws_sdk_s3::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -ownership_controls: unwrap_from_aws(x.ownership_controls, "ownership_controls")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_ownership_controls(Some(try_into_aws(x.ownership_controls)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + ownership_controls: unwrap_from_aws(x.ownership_controls, "ownership_controls")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_ownership_controls(Some(try_into_aws(x.ownership_controls)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketOwnershipControlsOutput { type Target = aws_sdk_s3::operation::put_bucket_ownership_controls::PutBucketOwnershipControlsOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketPolicyInput { type Target = aws_sdk_s3::operation::put_bucket_policy::PutBucketPolicyInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -confirm_remove_self_bucket_access: try_from_aws(x.confirm_remove_self_bucket_access)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -policy: unwrap_from_aws(x.policy, "policy")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_confirm_remove_self_bucket_access(try_into_aws(x.confirm_remove_self_bucket_access)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_policy(Some(try_into_aws(x.policy)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + confirm_remove_self_bucket_access: try_from_aws(x.confirm_remove_self_bucket_access)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + policy: unwrap_from_aws(x.policy, "policy")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_confirm_remove_self_bucket_access(try_into_aws(x.confirm_remove_self_bucket_access)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_policy(Some(try_into_aws(x.policy)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketPolicyOutput { type Target = aws_sdk_s3::operation::put_bucket_policy::PutBucketPolicyOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketReplicationInput { type Target = aws_sdk_s3::operation::put_bucket_replication::PutBucketReplicationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -replication_configuration: unwrap_from_aws(x.replication_configuration, "replication_configuration")?, -token: try_from_aws(x.token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_replication_configuration(Some(try_into_aws(x.replication_configuration)?)); -y = y.set_token(try_into_aws(x.token)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + replication_configuration: unwrap_from_aws(x.replication_configuration, "replication_configuration")?, + token: try_from_aws(x.token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_replication_configuration(Some(try_into_aws(x.replication_configuration)?)); + y = y.set_token(try_into_aws(x.token)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketReplicationOutput { type Target = aws_sdk_s3::operation::put_bucket_replication::PutBucketReplicationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketRequestPaymentInput { type Target = aws_sdk_s3::operation::put_bucket_request_payment::PutBucketRequestPaymentInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -request_payment_configuration: unwrap_from_aws(x.request_payment_configuration, "request_payment_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_request_payment_configuration(Some(try_into_aws(x.request_payment_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + request_payment_configuration: unwrap_from_aws(x.request_payment_configuration, "request_payment_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_request_payment_configuration(Some(try_into_aws(x.request_payment_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketRequestPaymentOutput { type Target = aws_sdk_s3::operation::put_bucket_request_payment::PutBucketRequestPaymentOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketTaggingInput { type Target = aws_sdk_s3::operation::put_bucket_tagging::PutBucketTaggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -tagging: unwrap_from_aws(x.tagging, "tagging")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_tagging(Some(try_into_aws(x.tagging)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + tagging: unwrap_from_aws(x.tagging, "tagging")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_tagging(Some(try_into_aws(x.tagging)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketTaggingOutput { type Target = aws_sdk_s3::operation::put_bucket_tagging::PutBucketTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketVersioningInput { type Target = aws_sdk_s3::operation::put_bucket_versioning::PutBucketVersioningInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -mfa: try_from_aws(x.mfa)?, -versioning_configuration: unwrap_from_aws(x.versioning_configuration, "versioning_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_mfa(try_into_aws(x.mfa)?); -y = y.set_versioning_configuration(Some(try_into_aws(x.versioning_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + mfa: try_from_aws(x.mfa)?, + versioning_configuration: unwrap_from_aws(x.versioning_configuration, "versioning_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_mfa(try_into_aws(x.mfa)?); + y = y.set_versioning_configuration(Some(try_into_aws(x.versioning_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketVersioningOutput { type Target = aws_sdk_s3::operation::put_bucket_versioning::PutBucketVersioningOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutBucketWebsiteInput { type Target = aws_sdk_s3::operation::put_bucket_website::PutBucketWebsiteInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -website_configuration: unwrap_from_aws(x.website_configuration, "website_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_website_configuration(Some(try_into_aws(x.website_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + website_configuration: unwrap_from_aws(x.website_configuration, "website_configuration")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_website_configuration(Some(try_into_aws(x.website_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutBucketWebsiteOutput { type Target = aws_sdk_s3::operation::put_bucket_website::PutBucketWebsiteOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectAclInput { type Target = aws_sdk_s3::operation::put_object_acl::PutObjectAclInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -access_control_policy: try_from_aws(x.access_control_policy)?, -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write: try_from_aws(x.grant_write)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write(try_into_aws(x.grant_write)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + access_control_policy: try_from_aws(x.access_control_policy)?, + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write: try_from_aws(x.grant_write)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_access_control_policy(try_into_aws(x.access_control_policy)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write(try_into_aws(x.grant_write)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectAclOutput { type Target = aws_sdk_s3::operation::put_object_acl::PutObjectAclOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectInput { type Target = aws_sdk_s3::operation::put_object::PutObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -acl: try_from_aws(x.acl)?, -body: Some(try_from_aws(x.body)?), -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_length: try_from_aws(x.content_length)?, -content_md5: try_from_aws(x.content_md5)?, -content_type: try_from_aws(x.content_type)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -expires: try_from_aws(x.expires)?, -grant_full_control: try_from_aws(x.grant_full_control)?, -grant_read: try_from_aws(x.grant_read)?, -grant_read_acp: try_from_aws(x.grant_read_acp)?, -grant_write_acp: try_from_aws(x.grant_write_acp)?, -if_match: try_from_aws(x.if_match)?, -if_none_match: try_from_aws(x.if_none_match)?, -key: unwrap_from_aws(x.key, "key")?, -metadata: try_from_aws(x.metadata)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -storage_class: try_from_aws(x.storage_class)?, -tagging: try_from_aws(x.tagging)?, -version_id: None, -website_redirect_location: try_from_aws(x.website_redirect_location)?, -write_offset_bytes: try_from_aws(x.write_offset_bytes)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_acl(try_into_aws(x.acl)?); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); -y = y.set_grant_read(try_into_aws(x.grant_read)?); -y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); -y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); -y = y.set_if_match(try_into_aws(x.if_match)?); -y = y.set_if_none_match(try_into_aws(x.if_none_match)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tagging(try_into_aws(x.tagging)?); -y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); -y = y.set_write_offset_bytes(try_into_aws(x.write_offset_bytes)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + acl: try_from_aws(x.acl)?, + body: Some(try_from_aws(x.body)?), + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_length: try_from_aws(x.content_length)?, + content_md5: try_from_aws(x.content_md5)?, + content_type: try_from_aws(x.content_type)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + expires: try_from_aws(x.expires)?, + grant_full_control: try_from_aws(x.grant_full_control)?, + grant_read: try_from_aws(x.grant_read)?, + grant_read_acp: try_from_aws(x.grant_read_acp)?, + grant_write_acp: try_from_aws(x.grant_write_acp)?, + if_match: try_from_aws(x.if_match)?, + if_none_match: try_from_aws(x.if_none_match)?, + key: unwrap_from_aws(x.key, "key")?, + metadata: try_from_aws(x.metadata)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + storage_class: try_from_aws(x.storage_class)?, + tagging: try_from_aws(x.tagging)?, + version_id: None, + website_redirect_location: try_from_aws(x.website_redirect_location)?, + write_offset_bytes: try_from_aws(x.write_offset_bytes)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_acl(try_into_aws(x.acl)?); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_grant_full_control(try_into_aws(x.grant_full_control)?); + y = y.set_grant_read(try_into_aws(x.grant_read)?); + y = y.set_grant_read_acp(try_into_aws(x.grant_read_acp)?); + y = y.set_grant_write_acp(try_into_aws(x.grant_write_acp)?); + y = y.set_if_match(try_into_aws(x.if_match)?); + y = y.set_if_none_match(try_into_aws(x.if_none_match)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tagging(try_into_aws(x.tagging)?); + y = y.set_website_redirect_location(try_into_aws(x.website_redirect_location)?); + y = y.set_write_offset_bytes(try_into_aws(x.write_offset_bytes)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectLegalHoldInput { type Target = aws_sdk_s3::operation::put_object_legal_hold::PutObjectLegalHoldInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -legal_hold: try_from_aws(x.legal_hold)?, -request_payer: try_from_aws(x.request_payer)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_legal_hold(try_into_aws(x.legal_hold)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + legal_hold: try_from_aws(x.legal_hold)?, + request_payer: try_from_aws(x.request_payer)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_legal_hold(try_into_aws(x.legal_hold)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectLegalHoldOutput { type Target = aws_sdk_s3::operation::put_object_legal_hold::PutObjectLegalHoldOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectLockConfigurationInput { type Target = aws_sdk_s3::operation::put_object_lock_configuration::PutObjectLockConfigurationInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -object_lock_configuration: try_from_aws(x.object_lock_configuration)?, -request_payer: try_from_aws(x.request_payer)?, -token: try_from_aws(x.token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_token(try_into_aws(x.token)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + object_lock_configuration: try_from_aws(x.object_lock_configuration)?, + request_payer: try_from_aws(x.request_payer)?, + token: try_from_aws(x.token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_object_lock_configuration(try_into_aws(x.object_lock_configuration)?); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_token(try_into_aws(x.token)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectLockConfigurationOutput { type Target = aws_sdk_s3::operation::put_object_lock_configuration::PutObjectLockConfigurationOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectOutput { type Target = aws_sdk_s3::operation::put_object::PutObjectOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -checksum_type: try_from_aws(x.checksum_type)?, -e_tag: try_from_aws(x.e_tag)?, -expiration: try_from_aws(x.expiration)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -size: try_from_aws(x.size)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_checksum_type(try_into_aws(x.checksum_type)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_size(try_into_aws(x.size)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + checksum_type: try_from_aws(x.checksum_type)?, + e_tag: try_from_aws(x.e_tag)?, + expiration: try_from_aws(x.expiration)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_encryption_context: try_from_aws(x.ssekms_encryption_context)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + size: try_from_aws(x.size)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_checksum_type(try_into_aws(x.checksum_type)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_encryption_context(try_into_aws(x.ssekms_encryption_context)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_size(try_into_aws(x.size)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectRetentionInput { type Target = aws_sdk_s3::operation::put_object_retention::PutObjectRetentionInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -retention: try_from_aws(x.retention)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_retention(try_into_aws(x.retention)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + bypass_governance_retention: try_from_aws(x.bypass_governance_retention)?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + retention: try_from_aws(x.retention)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_bypass_governance_retention(try_into_aws(x.bypass_governance_retention)?); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_retention(try_into_aws(x.retention)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectRetentionOutput { type Target = aws_sdk_s3::operation::put_object_retention::PutObjectRetentionOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutObjectTaggingInput { type Target = aws_sdk_s3::operation::put_object_tagging::PutObjectTaggingInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -tagging: unwrap_from_aws(x.tagging, "tagging")?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_tagging(Some(try_into_aws(x.tagging)?)); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + tagging: unwrap_from_aws(x.tagging, "tagging")?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_tagging(Some(try_into_aws(x.tagging)?)); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutObjectTaggingOutput { type Target = aws_sdk_s3::operation::put_object_tagging::PutObjectTaggingOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -version_id: try_from_aws(x.version_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + version_id: try_from_aws(x.version_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_version_id(try_into_aws(x.version_id)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_version_id(try_into_aws(x.version_id)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::PutPublicAccessBlockInput { type Target = aws_sdk_s3::operation::put_public_access_block::PutPublicAccessBlockInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -public_access_block_configuration: unwrap_from_aws(x.public_access_block_configuration, "public_access_block_configuration")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_public_access_block_configuration(Some(try_into_aws(x.public_access_block_configuration)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + public_access_block_configuration: unwrap_from_aws( + x.public_access_block_configuration, + "public_access_block_configuration", + )?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_public_access_block_configuration(Some(try_into_aws(x.public_access_block_configuration)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::PutPublicAccessBlockOutput { type Target = aws_sdk_s3::operation::put_public_access_block::PutPublicAccessBlockOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::QueueConfiguration { type Target = aws_sdk_s3::types::QueueConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -events: try_from_aws(x.events)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -queue_arn: try_from_aws(x.queue_arn)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_events(Some(try_into_aws(x.events)?)); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_queue_arn(Some(try_into_aws(x.queue_arn)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + events: try_from_aws(x.events)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + queue_arn: try_from_aws(x.queue_arn)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_events(Some(try_into_aws(x.events)?)); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_queue_arn(Some(try_into_aws(x.queue_arn)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::QuoteFields { type Target = aws_sdk_s3::types::QuoteFields; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::QuoteFields::Always => Self::from_static(Self::ALWAYS), -aws_sdk_s3::types::QuoteFields::Asneeded => Self::from_static(Self::ASNEEDED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::QuoteFields::Always => Self::from_static(Self::ALWAYS), + aws_sdk_s3::types::QuoteFields::Asneeded => Self::from_static(Self::ASNEEDED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::QuoteFields::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::QuoteFields::from(x.as_str())) + } } impl AwsConversion for s3s::dto::RecordsEvent { type Target = aws_sdk_s3::types::RecordsEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -payload: try_from_aws(x.payload)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + payload: try_from_aws(x.payload)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_payload(try_into_aws(x.payload)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_payload(try_into_aws(x.payload)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Redirect { type Target = aws_sdk_s3::types::Redirect; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -host_name: try_from_aws(x.host_name)?, -http_redirect_code: try_from_aws(x.http_redirect_code)?, -protocol: try_from_aws(x.protocol)?, -replace_key_prefix_with: try_from_aws(x.replace_key_prefix_with)?, -replace_key_with: try_from_aws(x.replace_key_with)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_host_name(try_into_aws(x.host_name)?); -y = y.set_http_redirect_code(try_into_aws(x.http_redirect_code)?); -y = y.set_protocol(try_into_aws(x.protocol)?); -y = y.set_replace_key_prefix_with(try_into_aws(x.replace_key_prefix_with)?); -y = y.set_replace_key_with(try_into_aws(x.replace_key_with)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + host_name: try_from_aws(x.host_name)?, + http_redirect_code: try_from_aws(x.http_redirect_code)?, + protocol: try_from_aws(x.protocol)?, + replace_key_prefix_with: try_from_aws(x.replace_key_prefix_with)?, + replace_key_with: try_from_aws(x.replace_key_with)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_host_name(try_into_aws(x.host_name)?); + y = y.set_http_redirect_code(try_into_aws(x.http_redirect_code)?); + y = y.set_protocol(try_into_aws(x.protocol)?); + y = y.set_replace_key_prefix_with(try_into_aws(x.replace_key_prefix_with)?); + y = y.set_replace_key_with(try_into_aws(x.replace_key_with)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RedirectAllRequestsTo { type Target = aws_sdk_s3::types::RedirectAllRequestsTo; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -host_name: try_from_aws(x.host_name)?, -protocol: try_from_aws(x.protocol)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + host_name: try_from_aws(x.host_name)?, + protocol: try_from_aws(x.protocol)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_host_name(Some(try_into_aws(x.host_name)?)); -y = y.set_protocol(try_into_aws(x.protocol)?); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_host_name(Some(try_into_aws(x.host_name)?)); + y = y.set_protocol(try_into_aws(x.protocol)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicaModifications { type Target = aws_sdk_s3::types::ReplicaModifications; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicaModificationsStatus { type Target = aws_sdk_s3::types::ReplicaModificationsStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ReplicaModificationsStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ReplicaModificationsStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ReplicaModificationsStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ReplicaModificationsStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ReplicaModificationsStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ReplicaModificationsStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ReplicationConfiguration { type Target = aws_sdk_s3::types::ReplicationConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -role: try_from_aws(x.role)?, -rules: try_from_aws(x.rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + role: try_from_aws(x.role)?, + rules: try_from_aws(x.rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_role(Some(try_into_aws(x.role)?)); -y = y.set_rules(Some(try_into_aws(x.rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_role(Some(try_into_aws(x.role)?)); + y = y.set_rules(Some(try_into_aws(x.rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicationRule { type Target = aws_sdk_s3::types::ReplicationRule; -type Error = S3Error; - -#[allow(deprecated)] -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -delete_marker_replication: try_from_aws(x.delete_marker_replication)?, -delete_replication: None, -destination: unwrap_from_aws(x.destination, "destination")?, -existing_object_replication: try_from_aws(x.existing_object_replication)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -prefix: try_from_aws(x.prefix)?, -priority: try_from_aws(x.priority)?, -source_selection_criteria: try_from_aws(x.source_selection_criteria)?, -status: try_from_aws(x.status)?, -}) -} - -#[allow(deprecated)] -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_delete_marker_replication(try_into_aws(x.delete_marker_replication)?); -y = y.set_destination(Some(try_into_aws(x.destination)?)); -y = y.set_existing_object_replication(try_into_aws(x.existing_object_replication)?); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_priority(try_into_aws(x.priority)?); -y = y.set_source_selection_criteria(try_into_aws(x.source_selection_criteria)?); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + #[allow(deprecated)] + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + delete_marker_replication: try_from_aws(x.delete_marker_replication)?, + delete_replication: None, + destination: unwrap_from_aws(x.destination, "destination")?, + existing_object_replication: try_from_aws(x.existing_object_replication)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + prefix: try_from_aws(x.prefix)?, + priority: try_from_aws(x.priority)?, + source_selection_criteria: try_from_aws(x.source_selection_criteria)?, + status: try_from_aws(x.status)?, + }) + } + + #[allow(deprecated)] + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_delete_marker_replication(try_into_aws(x.delete_marker_replication)?); + y = y.set_destination(Some(try_into_aws(x.destination)?)); + y = y.set_existing_object_replication(try_into_aws(x.existing_object_replication)?); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_priority(try_into_aws(x.priority)?); + y = y.set_source_selection_criteria(try_into_aws(x.source_selection_criteria)?); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicationRuleAndOperator { type Target = aws_sdk_s3::types::ReplicationRuleAndOperator; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -prefix: try_from_aws(x.prefix)?, -tags: try_from_aws(x.tags)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + prefix: try_from_aws(x.prefix)?, + tags: try_from_aws(x.tags)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tags(try_into_aws(x.tags)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tags(try_into_aws(x.tags)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ReplicationRuleFilter { type Target = aws_sdk_s3::types::ReplicationRuleFilter; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -and: try_from_aws(x.and)?, -cached_tags: s3s::dto::CachedTags::default(), -prefix: try_from_aws(x.prefix)?, -tag: try_from_aws(x.tag)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_and(try_into_aws(x.and)?); -y = y.set_prefix(try_into_aws(x.prefix)?); -y = y.set_tag(try_into_aws(x.tag)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + and: try_from_aws(x.and)?, + cached_tags: s3s::dto::CachedTags::default(), + prefix: try_from_aws(x.prefix)?, + tag: try_from_aws(x.tag)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_and(try_into_aws(x.and)?); + y = y.set_prefix(try_into_aws(x.prefix)?); + y = y.set_tag(try_into_aws(x.tag)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ReplicationRuleStatus { type Target = aws_sdk_s3::types::ReplicationRuleStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ReplicationRuleStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ReplicationRuleStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ReplicationRuleStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ReplicationRuleStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ReplicationRuleStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ReplicationRuleStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ReplicationStatus { type Target = aws_sdk_s3::types::ReplicationStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ReplicationStatus::Complete => Self::from_static(Self::COMPLETE), -aws_sdk_s3::types::ReplicationStatus::Completed => Self::from_static(Self::COMPLETED), -aws_sdk_s3::types::ReplicationStatus::Failed => Self::from_static(Self::FAILED), -aws_sdk_s3::types::ReplicationStatus::Pending => Self::from_static(Self::PENDING), -aws_sdk_s3::types::ReplicationStatus::Replica => Self::from_static(Self::REPLICA), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ReplicationStatus::Complete => Self::from_static(Self::COMPLETE), + aws_sdk_s3::types::ReplicationStatus::Completed => Self::from_static(Self::COMPLETED), + aws_sdk_s3::types::ReplicationStatus::Failed => Self::from_static(Self::FAILED), + aws_sdk_s3::types::ReplicationStatus::Pending => Self::from_static(Self::PENDING), + aws_sdk_s3::types::ReplicationStatus::Replica => Self::from_static(Self::REPLICA), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ReplicationStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ReplicationStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ReplicationTime { type Target = aws_sdk_s3::types::ReplicationTime; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -time: unwrap_from_aws(x.time, "time")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + time: unwrap_from_aws(x.time, "time")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(Some(try_into_aws(x.status)?)); -y = y.set_time(Some(try_into_aws(x.time)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(Some(try_into_aws(x.status)?)); + y = y.set_time(Some(try_into_aws(x.time)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ReplicationTimeStatus { type Target = aws_sdk_s3::types::ReplicationTimeStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ReplicationTimeStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::ReplicationTimeStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ReplicationTimeStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::ReplicationTimeStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ReplicationTimeStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ReplicationTimeStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ReplicationTimeValue { type Target = aws_sdk_s3::types::ReplicationTimeValue; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -minutes: try_from_aws(x.minutes)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + minutes: try_from_aws(x.minutes)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_minutes(try_into_aws(x.minutes)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_minutes(try_into_aws(x.minutes)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RequestCharged { type Target = aws_sdk_s3::types::RequestCharged; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::RequestCharged::Requester => Self::from_static(Self::REQUESTER), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::RequestCharged::Requester => Self::from_static(Self::REQUESTER), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::RequestCharged::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::RequestCharged::from(x.as_str())) + } } impl AwsConversion for s3s::dto::RequestPayer { type Target = aws_sdk_s3::types::RequestPayer; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::RequestPayer::Requester => Self::from_static(Self::REQUESTER), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::RequestPayer::Requester => Self::from_static(Self::REQUESTER), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::RequestPayer::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::RequestPayer::from(x.as_str())) + } } impl AwsConversion for s3s::dto::RequestPaymentConfiguration { type Target = aws_sdk_s3::types::RequestPaymentConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -payer: try_from_aws(x.payer)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + payer: try_from_aws(x.payer)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_payer(Some(try_into_aws(x.payer)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_payer(Some(try_into_aws(x.payer)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::RequestProgress { type Target = aws_sdk_s3::types::RequestProgress; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -enabled: try_from_aws(x.enabled)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + enabled: try_from_aws(x.enabled)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_enabled(try_into_aws(x.enabled)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_enabled(try_into_aws(x.enabled)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RestoreObjectInput { type Target = aws_sdk_s3::operation::restore_object::RestoreObjectInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -request_payer: try_from_aws(x.request_payer)?, -restore_request: try_from_aws(x.restore_request)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_restore_request(try_into_aws(x.restore_request)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + request_payer: try_from_aws(x.request_payer)?, + restore_request: try_from_aws(x.restore_request)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_restore_request(try_into_aws(x.restore_request)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::RestoreObjectOutput { type Target = aws_sdk_s3::operation::restore_object::RestoreObjectOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -request_charged: try_from_aws(x.request_charged)?, -restore_output_path: try_from_aws(x.restore_output_path)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + request_charged: try_from_aws(x.request_charged)?, + restore_output_path: try_from_aws(x.restore_output_path)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_restore_output_path(try_into_aws(x.restore_output_path)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_restore_output_path(try_into_aws(x.restore_output_path)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RestoreRequest { type Target = aws_sdk_s3::types::RestoreRequest; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -days: try_from_aws(x.days)?, -description: try_from_aws(x.description)?, -glacier_job_parameters: try_from_aws(x.glacier_job_parameters)?, -output_location: try_from_aws(x.output_location)?, -select_parameters: try_from_aws(x.select_parameters)?, -tier: try_from_aws(x.tier)?, -type_: try_from_aws(x.r#type)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_days(try_into_aws(x.days)?); -y = y.set_description(try_into_aws(x.description)?); -y = y.set_glacier_job_parameters(try_into_aws(x.glacier_job_parameters)?); -y = y.set_output_location(try_into_aws(x.output_location)?); -y = y.set_select_parameters(try_into_aws(x.select_parameters)?); -y = y.set_tier(try_into_aws(x.tier)?); -y = y.set_type(try_into_aws(x.type_)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + days: try_from_aws(x.days)?, + description: try_from_aws(x.description)?, + glacier_job_parameters: try_from_aws(x.glacier_job_parameters)?, + output_location: try_from_aws(x.output_location)?, + select_parameters: try_from_aws(x.select_parameters)?, + tier: try_from_aws(x.tier)?, + type_: try_from_aws(x.r#type)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_days(try_into_aws(x.days)?); + y = y.set_description(try_into_aws(x.description)?); + y = y.set_glacier_job_parameters(try_into_aws(x.glacier_job_parameters)?); + y = y.set_output_location(try_into_aws(x.output_location)?); + y = y.set_select_parameters(try_into_aws(x.select_parameters)?); + y = y.set_tier(try_into_aws(x.tier)?); + y = y.set_type(try_into_aws(x.type_)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RestoreRequestType { type Target = aws_sdk_s3::types::RestoreRequestType; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::RestoreRequestType::Select => Self::from_static(Self::SELECT), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::RestoreRequestType::Select => Self::from_static(Self::SELECT), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::RestoreRequestType::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::RestoreRequestType::from(x.as_str())) + } } impl AwsConversion for s3s::dto::RestoreStatus { type Target = aws_sdk_s3::types::RestoreStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -is_restore_in_progress: try_from_aws(x.is_restore_in_progress)?, -restore_expiry_date: try_from_aws(x.restore_expiry_date)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + is_restore_in_progress: try_from_aws(x.is_restore_in_progress)?, + restore_expiry_date: try_from_aws(x.restore_expiry_date)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_is_restore_in_progress(try_into_aws(x.is_restore_in_progress)?); -y = y.set_restore_expiry_date(try_into_aws(x.restore_expiry_date)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_is_restore_in_progress(try_into_aws(x.is_restore_in_progress)?); + y = y.set_restore_expiry_date(try_into_aws(x.restore_expiry_date)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::RoutingRule { type Target = aws_sdk_s3::types::RoutingRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -condition: try_from_aws(x.condition)?, -redirect: unwrap_from_aws(x.redirect, "redirect")?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + condition: try_from_aws(x.condition)?, + redirect: unwrap_from_aws(x.redirect, "redirect")?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_condition(try_into_aws(x.condition)?); -y = y.set_redirect(Some(try_into_aws(x.redirect)?)); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_condition(try_into_aws(x.condition)?); + y = y.set_redirect(Some(try_into_aws(x.redirect)?)); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::S3KeyFilter { type Target = aws_sdk_s3::types::S3KeyFilter; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -filter_rules: try_from_aws(x.filter_rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + filter_rules: try_from_aws(x.filter_rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_filter_rules(try_into_aws(x.filter_rules)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_filter_rules(try_into_aws(x.filter_rules)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::S3Location { type Target = aws_sdk_s3::types::S3Location; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_control_list: try_from_aws(x.access_control_list)?, -bucket_name: try_from_aws(x.bucket_name)?, -canned_acl: try_from_aws(x.canned_acl)?, -encryption: try_from_aws(x.encryption)?, -prefix: try_from_aws(x.prefix)?, -storage_class: try_from_aws(x.storage_class)?, -tagging: try_from_aws(x.tagging)?, -user_metadata: try_from_aws(x.user_metadata)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_control_list(try_into_aws(x.access_control_list)?); -y = y.set_bucket_name(Some(try_into_aws(x.bucket_name)?)); -y = y.set_canned_acl(try_into_aws(x.canned_acl)?); -y = y.set_encryption(try_into_aws(x.encryption)?); -y = y.set_prefix(Some(try_into_aws(x.prefix)?)); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tagging(try_into_aws(x.tagging)?); -y = y.set_user_metadata(try_into_aws(x.user_metadata)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_control_list: try_from_aws(x.access_control_list)?, + bucket_name: try_from_aws(x.bucket_name)?, + canned_acl: try_from_aws(x.canned_acl)?, + encryption: try_from_aws(x.encryption)?, + prefix: try_from_aws(x.prefix)?, + storage_class: try_from_aws(x.storage_class)?, + tagging: try_from_aws(x.tagging)?, + user_metadata: try_from_aws(x.user_metadata)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_control_list(try_into_aws(x.access_control_list)?); + y = y.set_bucket_name(Some(try_into_aws(x.bucket_name)?)); + y = y.set_canned_acl(try_into_aws(x.canned_acl)?); + y = y.set_encryption(try_into_aws(x.encryption)?); + y = y.set_prefix(Some(try_into_aws(x.prefix)?)); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tagging(try_into_aws(x.tagging)?); + y = y.set_user_metadata(try_into_aws(x.user_metadata)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::S3TablesDestination { type Target = aws_sdk_s3::types::S3TablesDestination; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -table_bucket_arn: try_from_aws(x.table_bucket_arn)?, -table_name: try_from_aws(x.table_name)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + table_bucket_arn: try_from_aws(x.table_bucket_arn)?, + table_name: try_from_aws(x.table_name)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); -y = y.set_table_name(Some(try_into_aws(x.table_name)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); + y = y.set_table_name(Some(try_into_aws(x.table_name)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::S3TablesDestinationResult { type Target = aws_sdk_s3::types::S3TablesDestinationResult; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -table_arn: try_from_aws(x.table_arn)?, -table_bucket_arn: try_from_aws(x.table_bucket_arn)?, -table_name: try_from_aws(x.table_name)?, -table_namespace: try_from_aws(x.table_namespace)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_table_arn(Some(try_into_aws(x.table_arn)?)); -y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); -y = y.set_table_name(Some(try_into_aws(x.table_name)?)); -y = y.set_table_namespace(Some(try_into_aws(x.table_namespace)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + table_arn: try_from_aws(x.table_arn)?, + table_bucket_arn: try_from_aws(x.table_bucket_arn)?, + table_name: try_from_aws(x.table_name)?, + table_namespace: try_from_aws(x.table_namespace)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_table_arn(Some(try_into_aws(x.table_arn)?)); + y = y.set_table_bucket_arn(Some(try_into_aws(x.table_bucket_arn)?)); + y = y.set_table_name(Some(try_into_aws(x.table_name)?)); + y = y.set_table_namespace(Some(try_into_aws(x.table_namespace)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::SSEKMS { type Target = aws_sdk_s3::types::Ssekms; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -key_id: try_from_aws(x.key_id)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + key_id: try_from_aws(x.key_id)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_key_id(Some(try_into_aws(x.key_id)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_key_id(Some(try_into_aws(x.key_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::SSES3 { type Target = aws_sdk_s3::types::Sses3; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::ScanRange { type Target = aws_sdk_s3::types::ScanRange; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -end: try_from_aws(x.end)?, -start: try_from_aws(x.start)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + end: try_from_aws(x.end)?, + start: try_from_aws(x.start)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_end(try_into_aws(x.end)?); -y = y.set_start(try_into_aws(x.start)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_end(try_into_aws(x.end)?); + y = y.set_start(try_into_aws(x.start)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::SelectObjectContentEvent { type Target = aws_sdk_s3::types::SelectObjectContentEventStream; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::SelectObjectContentEventStream::Cont(v) => Self::Cont(try_from_aws(v)?), -aws_sdk_s3::types::SelectObjectContentEventStream::End(v) => Self::End(try_from_aws(v)?), -aws_sdk_s3::types::SelectObjectContentEventStream::Progress(v) => Self::Progress(try_from_aws(v)?), -aws_sdk_s3::types::SelectObjectContentEventStream::Records(v) => Self::Records(try_from_aws(v)?), -aws_sdk_s3::types::SelectObjectContentEventStream::Stats(v) => Self::Stats(try_from_aws(v)?), -_ => unimplemented!("unknown variant of aws_sdk_s3::types::SelectObjectContentEventStream: {x:?}"), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(match x { -Self::Cont(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Cont(try_into_aws(v)?), -Self::End(v) => aws_sdk_s3::types::SelectObjectContentEventStream::End(try_into_aws(v)?), -Self::Progress(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Progress(try_into_aws(v)?), -Self::Records(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Records(try_into_aws(v)?), -Self::Stats(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Stats(try_into_aws(v)?), -_ => unimplemented!("unknown variant of SelectObjectContentEvent: {x:?}"), -}) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::SelectObjectContentEventStream::Cont(v) => Self::Cont(try_from_aws(v)?), + aws_sdk_s3::types::SelectObjectContentEventStream::End(v) => Self::End(try_from_aws(v)?), + aws_sdk_s3::types::SelectObjectContentEventStream::Progress(v) => Self::Progress(try_from_aws(v)?), + aws_sdk_s3::types::SelectObjectContentEventStream::Records(v) => Self::Records(try_from_aws(v)?), + aws_sdk_s3::types::SelectObjectContentEventStream::Stats(v) => Self::Stats(try_from_aws(v)?), + _ => unimplemented!("unknown variant of aws_sdk_s3::types::SelectObjectContentEventStream: {x:?}"), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(match x { + Self::Cont(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Cont(try_into_aws(v)?), + Self::End(v) => aws_sdk_s3::types::SelectObjectContentEventStream::End(try_into_aws(v)?), + Self::Progress(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Progress(try_into_aws(v)?), + Self::Records(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Records(try_into_aws(v)?), + Self::Stats(v) => aws_sdk_s3::types::SelectObjectContentEventStream::Stats(try_into_aws(v)?), + _ => unimplemented!("unknown variant of SelectObjectContentEvent: {x:?}"), + }) + } } impl AwsConversion for s3s::dto::SelectObjectContentOutput { type Target = aws_sdk_s3::operation::select_object_content::SelectObjectContentOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -payload: Some(crate::event_stream::from_aws(x.payload)), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + payload: Some(crate::event_stream::from_aws(x.payload)), + }) + } -fn try_into_aws(x: Self) -> S3Result { -drop(x); -unimplemented!("See https://github.com/Nugine/s3s/issues/5") -} + fn try_into_aws(x: Self) -> S3Result { + drop(x); + unimplemented!("See https://github.com/Nugine/s3s/issues/5") + } } impl AwsConversion for s3s::dto::SelectParameters { type Target = aws_sdk_s3::types::SelectParameters; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -expression: try_from_aws(x.expression)?, -expression_type: try_from_aws(x.expression_type)?, -input_serialization: unwrap_from_aws(x.input_serialization, "input_serialization")?, -output_serialization: unwrap_from_aws(x.output_serialization, "output_serialization")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_expression(Some(try_into_aws(x.expression)?)); -y = y.set_expression_type(Some(try_into_aws(x.expression_type)?)); -y = y.set_input_serialization(Some(try_into_aws(x.input_serialization)?)); -y = y.set_output_serialization(Some(try_into_aws(x.output_serialization)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + expression: try_from_aws(x.expression)?, + expression_type: try_from_aws(x.expression_type)?, + input_serialization: unwrap_from_aws(x.input_serialization, "input_serialization")?, + output_serialization: unwrap_from_aws(x.output_serialization, "output_serialization")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_expression(Some(try_into_aws(x.expression)?)); + y = y.set_expression_type(Some(try_into_aws(x.expression_type)?)); + y = y.set_input_serialization(Some(try_into_aws(x.input_serialization)?)); + y = y.set_output_serialization(Some(try_into_aws(x.output_serialization)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ServerSideEncryption { type Target = aws_sdk_s3::types::ServerSideEncryption; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::ServerSideEncryption::Aes256 => Self::from_static(Self::AES256), -aws_sdk_s3::types::ServerSideEncryption::AwsKms => Self::from_static(Self::AWS_KMS), -aws_sdk_s3::types::ServerSideEncryption::AwsKmsDsse => Self::from_static(Self::AWS_KMS_DSSE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::ServerSideEncryption::Aes256 => Self::from_static(Self::AES256), + aws_sdk_s3::types::ServerSideEncryption::AwsKms => Self::from_static(Self::AWS_KMS), + aws_sdk_s3::types::ServerSideEncryption::AwsKmsDsse => Self::from_static(Self::AWS_KMS_DSSE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::ServerSideEncryption::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::ServerSideEncryption::from(x.as_str())) + } } impl AwsConversion for s3s::dto::ServerSideEncryptionByDefault { type Target = aws_sdk_s3::types::ServerSideEncryptionByDefault; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -kms_master_key_id: try_from_aws(x.kms_master_key_id)?, -sse_algorithm: try_from_aws(x.sse_algorithm)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + kms_master_key_id: try_from_aws(x.kms_master_key_id)?, + sse_algorithm: try_from_aws(x.sse_algorithm)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_kms_master_key_id(try_into_aws(x.kms_master_key_id)?); -y = y.set_sse_algorithm(Some(try_into_aws(x.sse_algorithm)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_kms_master_key_id(try_into_aws(x.kms_master_key_id)?); + y = y.set_sse_algorithm(Some(try_into_aws(x.sse_algorithm)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ServerSideEncryptionConfiguration { type Target = aws_sdk_s3::types::ServerSideEncryptionConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -rules: try_from_aws(x.rules)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + rules: try_from_aws(x.rules)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_rules(Some(try_into_aws(x.rules)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_rules(Some(try_into_aws(x.rules)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::ServerSideEncryptionRule { type Target = aws_sdk_s3::types::ServerSideEncryptionRule; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -apply_server_side_encryption_by_default: try_from_aws(x.apply_server_side_encryption_by_default)?, -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + apply_server_side_encryption_by_default: try_from_aws(x.apply_server_side_encryption_by_default)?, + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_apply_server_side_encryption_by_default(try_into_aws(x.apply_server_side_encryption_by_default)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_apply_server_side_encryption_by_default(try_into_aws(x.apply_server_side_encryption_by_default)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::SessionCredentials { type Target = aws_sdk_s3::types::SessionCredentials; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_key_id: try_from_aws(x.access_key_id)?, -expiration: try_from_aws(x.expiration)?, -secret_access_key: try_from_aws(x.secret_access_key)?, -session_token: try_from_aws(x.session_token)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_key_id(Some(try_into_aws(x.access_key_id)?)); -y = y.set_expiration(Some(try_into_aws(x.expiration)?)); -y = y.set_secret_access_key(Some(try_into_aws(x.secret_access_key)?)); -y = y.set_session_token(Some(try_into_aws(x.session_token)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_key_id: try_from_aws(x.access_key_id)?, + expiration: try_from_aws(x.expiration)?, + secret_access_key: try_from_aws(x.secret_access_key)?, + session_token: try_from_aws(x.session_token)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_key_id(Some(try_into_aws(x.access_key_id)?)); + y = y.set_expiration(Some(try_into_aws(x.expiration)?)); + y = y.set_secret_access_key(Some(try_into_aws(x.secret_access_key)?)); + y = y.set_session_token(Some(try_into_aws(x.session_token)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::SessionMode { type Target = aws_sdk_s3::types::SessionMode; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::SessionMode::ReadOnly => Self::from_static(Self::READ_ONLY), -aws_sdk_s3::types::SessionMode::ReadWrite => Self::from_static(Self::READ_WRITE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::SessionMode::ReadOnly => Self::from_static(Self::READ_ONLY), + aws_sdk_s3::types::SessionMode::ReadWrite => Self::from_static(Self::READ_WRITE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::SessionMode::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::SessionMode::from(x.as_str())) + } } impl AwsConversion for s3s::dto::SimplePrefix { type Target = aws_sdk_s3::types::SimplePrefix; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::SourceSelectionCriteria { type Target = aws_sdk_s3::types::SourceSelectionCriteria; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -replica_modifications: try_from_aws(x.replica_modifications)?, -sse_kms_encrypted_objects: try_from_aws(x.sse_kms_encrypted_objects)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + replica_modifications: try_from_aws(x.replica_modifications)?, + sse_kms_encrypted_objects: try_from_aws(x.sse_kms_encrypted_objects)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_replica_modifications(try_into_aws(x.replica_modifications)?); -y = y.set_sse_kms_encrypted_objects(try_into_aws(x.sse_kms_encrypted_objects)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_replica_modifications(try_into_aws(x.replica_modifications)?); + y = y.set_sse_kms_encrypted_objects(try_into_aws(x.sse_kms_encrypted_objects)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::SseKmsEncryptedObjects { type Target = aws_sdk_s3::types::SseKmsEncryptedObjects; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_status(Some(try_into_aws(x.status)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_status(Some(try_into_aws(x.status)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::SseKmsEncryptedObjectsStatus { type Target = aws_sdk_s3::types::SseKmsEncryptedObjectsStatus; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Disabled => Self::from_static(Self::DISABLED), -aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Enabled => Self::from_static(Self::ENABLED), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Disabled => Self::from_static(Self::DISABLED), + aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::Enabled => Self::from_static(Self::ENABLED), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::SseKmsEncryptedObjectsStatus::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Stats { type Target = aws_sdk_s3::types::Stats; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bytes_processed: try_from_aws(x.bytes_processed)?, -bytes_returned: try_from_aws(x.bytes_returned)?, -bytes_scanned: try_from_aws(x.bytes_scanned)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bytes_processed: try_from_aws(x.bytes_processed)?, + bytes_returned: try_from_aws(x.bytes_returned)?, + bytes_scanned: try_from_aws(x.bytes_scanned)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); -y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); -y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bytes_processed(try_into_aws(x.bytes_processed)?); + y = y.set_bytes_returned(try_into_aws(x.bytes_returned)?); + y = y.set_bytes_scanned(try_into_aws(x.bytes_scanned)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::StatsEvent { type Target = aws_sdk_s3::types::StatsEvent; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -details: try_from_aws(x.details)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + details: try_from_aws(x.details)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_details(try_into_aws(x.details)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_details(try_into_aws(x.details)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::StorageClass { type Target = aws_sdk_s3::types::StorageClass; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::StorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), -aws_sdk_s3::types::StorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), -aws_sdk_s3::types::StorageClass::Glacier => Self::from_static(Self::GLACIER), -aws_sdk_s3::types::StorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), -aws_sdk_s3::types::StorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), -aws_sdk_s3::types::StorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), -aws_sdk_s3::types::StorageClass::Outposts => Self::from_static(Self::OUTPOSTS), -aws_sdk_s3::types::StorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), -aws_sdk_s3::types::StorageClass::Snow => Self::from_static(Self::SNOW), -aws_sdk_s3::types::StorageClass::Standard => Self::from_static(Self::STANDARD), -aws_sdk_s3::types::StorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), -_ => Self::from(x.as_str().to_owned()), -}) -} - -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::StorageClass::from(x.as_str())) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::StorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), + aws_sdk_s3::types::StorageClass::ExpressOnezone => Self::from_static(Self::EXPRESS_ONEZONE), + aws_sdk_s3::types::StorageClass::Glacier => Self::from_static(Self::GLACIER), + aws_sdk_s3::types::StorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), + aws_sdk_s3::types::StorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), + aws_sdk_s3::types::StorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), + aws_sdk_s3::types::StorageClass::Outposts => Self::from_static(Self::OUTPOSTS), + aws_sdk_s3::types::StorageClass::ReducedRedundancy => Self::from_static(Self::REDUCED_REDUNDANCY), + aws_sdk_s3::types::StorageClass::Snow => Self::from_static(Self::SNOW), + aws_sdk_s3::types::StorageClass::Standard => Self::from_static(Self::STANDARD), + aws_sdk_s3::types::StorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), + _ => Self::from(x.as_str().to_owned()), + }) + } + + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::StorageClass::from(x.as_str())) + } } impl AwsConversion for s3s::dto::StorageClassAnalysis { type Target = aws_sdk_s3::types::StorageClassAnalysis; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -data_export: try_from_aws(x.data_export)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + data_export: try_from_aws(x.data_export)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_data_export(try_into_aws(x.data_export)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_data_export(try_into_aws(x.data_export)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::StorageClassAnalysisDataExport { type Target = aws_sdk_s3::types::StorageClassAnalysisDataExport; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -destination: unwrap_from_aws(x.destination, "destination")?, -output_schema_version: try_from_aws(x.output_schema_version)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + destination: unwrap_from_aws(x.destination, "destination")?, + output_schema_version: try_from_aws(x.output_schema_version)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_destination(Some(try_into_aws(x.destination)?)); -y = y.set_output_schema_version(Some(try_into_aws(x.output_schema_version)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_destination(Some(try_into_aws(x.destination)?)); + y = y.set_output_schema_version(Some(try_into_aws(x.output_schema_version)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::StorageClassAnalysisSchemaVersion { type Target = aws_sdk_s3::types::StorageClassAnalysisSchemaVersion; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::V1 => Self::from_static(Self::V_1), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::V1 => Self::from_static(Self::V_1), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::StorageClassAnalysisSchemaVersion::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Tagging { type Target = aws_sdk_s3::types::Tagging; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -tag_set: try_from_aws(x.tag_set)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + tag_set: try_from_aws(x.tag_set)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_tag_set(Some(try_into_aws(x.tag_set)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::TaggingDirective { type Target = aws_sdk_s3::types::TaggingDirective; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::TaggingDirective::Copy => Self::from_static(Self::COPY), -aws_sdk_s3::types::TaggingDirective::Replace => Self::from_static(Self::REPLACE), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::TaggingDirective::Copy => Self::from_static(Self::COPY), + aws_sdk_s3::types::TaggingDirective::Replace => Self::from_static(Self::REPLACE), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::TaggingDirective::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::TaggingDirective::from(x.as_str())) + } } impl AwsConversion for s3s::dto::TargetGrant { type Target = aws_sdk_s3::types::TargetGrant; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -grantee: try_from_aws(x.grantee)?, -permission: try_from_aws(x.permission)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + grantee: try_from_aws(x.grantee)?, + permission: try_from_aws(x.permission)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_grantee(try_into_aws(x.grantee)?); -y = y.set_permission(try_into_aws(x.permission)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_grantee(try_into_aws(x.grantee)?); + y = y.set_permission(try_into_aws(x.permission)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::TargetObjectKeyFormat { type Target = aws_sdk_s3::types::TargetObjectKeyFormat; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -partitioned_prefix: try_from_aws(x.partitioned_prefix)?, -simple_prefix: try_from_aws(x.simple_prefix)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + partitioned_prefix: try_from_aws(x.partitioned_prefix)?, + simple_prefix: try_from_aws(x.simple_prefix)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_partitioned_prefix(try_into_aws(x.partitioned_prefix)?); -y = y.set_simple_prefix(try_into_aws(x.simple_prefix)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_partitioned_prefix(try_into_aws(x.partitioned_prefix)?); + y = y.set_simple_prefix(try_into_aws(x.simple_prefix)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::Tier { type Target = aws_sdk_s3::types::Tier; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Tier::Bulk => Self::from_static(Self::BULK), -aws_sdk_s3::types::Tier::Expedited => Self::from_static(Self::EXPEDITED), -aws_sdk_s3::types::Tier::Standard => Self::from_static(Self::STANDARD), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Tier::Bulk => Self::from_static(Self::BULK), + aws_sdk_s3::types::Tier::Expedited => Self::from_static(Self::EXPEDITED), + aws_sdk_s3::types::Tier::Standard => Self::from_static(Self::STANDARD), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Tier::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Tier::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Tiering { type Target = aws_sdk_s3::types::Tiering; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -access_tier: try_from_aws(x.access_tier)?, -days: try_from_aws(x.days)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + access_tier: try_from_aws(x.access_tier)?, + days: try_from_aws(x.days)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_access_tier(Some(try_into_aws(x.access_tier)?)); -y = y.set_days(Some(try_into_aws(x.days)?)); -y.build().map_err(S3Error::internal_error) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_access_tier(Some(try_into_aws(x.access_tier)?)); + y = y.set_days(Some(try_into_aws(x.days)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::TooManyParts { type Target = aws_sdk_s3::types::error::TooManyParts; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::TopicConfiguration { type Target = aws_sdk_s3::types::TopicConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -events: try_from_aws(x.events)?, -filter: try_from_aws(x.filter)?, -id: try_from_aws(x.id)?, -topic_arn: try_from_aws(x.topic_arn)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_events(Some(try_into_aws(x.events)?)); -y = y.set_filter(try_into_aws(x.filter)?); -y = y.set_id(try_into_aws(x.id)?); -y = y.set_topic_arn(Some(try_into_aws(x.topic_arn)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + events: try_from_aws(x.events)?, + filter: try_from_aws(x.filter)?, + id: try_from_aws(x.id)?, + topic_arn: try_from_aws(x.topic_arn)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_events(Some(try_into_aws(x.events)?)); + y = y.set_filter(try_into_aws(x.filter)?); + y = y.set_id(try_into_aws(x.id)?); + y = y.set_topic_arn(Some(try_into_aws(x.topic_arn)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::Transition { type Target = aws_sdk_s3::types::Transition; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -date: try_from_aws(x.date)?, -days: try_from_aws(x.days)?, -storage_class: try_from_aws(x.storage_class)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + date: try_from_aws(x.date)?, + days: try_from_aws(x.days)?, + storage_class: try_from_aws(x.storage_class)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_date(try_into_aws(x.date)?); -y = y.set_days(try_into_aws(x.days)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_date(try_into_aws(x.date)?); + y = y.set_days(try_into_aws(x.days)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::TransitionDefaultMinimumObjectSize { type Target = aws_sdk_s3::types::TransitionDefaultMinimumObjectSize; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::AllStorageClasses128K => Self::from_static(Self::ALL_STORAGE_CLASSES_128K), -aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::VariesByStorageClass => Self::from_static(Self::VARIES_BY_STORAGE_CLASS), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::AllStorageClasses128K => { + Self::from_static(Self::ALL_STORAGE_CLASSES_128K) + } + aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::VariesByStorageClass => { + Self::from_static(Self::VARIES_BY_STORAGE_CLASS) + } + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::TransitionDefaultMinimumObjectSize::from(x.as_str())) + } } impl AwsConversion for s3s::dto::TransitionStorageClass { type Target = aws_sdk_s3::types::TransitionStorageClass; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::TransitionStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), -aws_sdk_s3::types::TransitionStorageClass::Glacier => Self::from_static(Self::GLACIER), -aws_sdk_s3::types::TransitionStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), -aws_sdk_s3::types::TransitionStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), -aws_sdk_s3::types::TransitionStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), -aws_sdk_s3::types::TransitionStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::TransitionStorageClass::DeepArchive => Self::from_static(Self::DEEP_ARCHIVE), + aws_sdk_s3::types::TransitionStorageClass::Glacier => Self::from_static(Self::GLACIER), + aws_sdk_s3::types::TransitionStorageClass::GlacierIr => Self::from_static(Self::GLACIER_IR), + aws_sdk_s3::types::TransitionStorageClass::IntelligentTiering => Self::from_static(Self::INTELLIGENT_TIERING), + aws_sdk_s3::types::TransitionStorageClass::OnezoneIa => Self::from_static(Self::ONEZONE_IA), + aws_sdk_s3::types::TransitionStorageClass::StandardIa => Self::from_static(Self::STANDARD_IA), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::TransitionStorageClass::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::TransitionStorageClass::from(x.as_str())) + } } impl AwsConversion for s3s::dto::Type { type Target = aws_sdk_s3::types::Type; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(match x { -aws_sdk_s3::types::Type::AmazonCustomerByEmail => Self::from_static(Self::AMAZON_CUSTOMER_BY_EMAIL), -aws_sdk_s3::types::Type::CanonicalUser => Self::from_static(Self::CANONICAL_USER), -aws_sdk_s3::types::Type::Group => Self::from_static(Self::GROUP), -_ => Self::from(x.as_str().to_owned()), -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(match x { + aws_sdk_s3::types::Type::AmazonCustomerByEmail => Self::from_static(Self::AMAZON_CUSTOMER_BY_EMAIL), + aws_sdk_s3::types::Type::CanonicalUser => Self::from_static(Self::CANONICAL_USER), + aws_sdk_s3::types::Type::Group => Self::from_static(Self::GROUP), + _ => Self::from(x.as_str().to_owned()), + }) + } -fn try_into_aws(x: Self) -> S3Result { -Ok(aws_sdk_s3::types::Type::from(x.as_str())) -} + fn try_into_aws(x: Self) -> S3Result { + Ok(aws_sdk_s3::types::Type::from(x.as_str())) + } } impl AwsConversion for s3s::dto::UploadPartCopyInput { type Target = aws_sdk_s3::operation::upload_part_copy::UploadPartCopyInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket: unwrap_from_aws(x.bucket, "bucket")?, -copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, -copy_source_if_match: try_from_aws(x.copy_source_if_match)?, -copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, -copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, -copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, -copy_source_range: try_from_aws(x.copy_source_range)?, -copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, -copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, -copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -part_number: unwrap_from_aws(x.part_number, "part_number")?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); -y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); -y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); -y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); -y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); -y = y.set_copy_source_range(try_into_aws(x.copy_source_range)?); -y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); -y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); -y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_part_number(Some(try_into_aws(x.part_number)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket: unwrap_from_aws(x.bucket, "bucket")?, + copy_source: unwrap_from_aws(x.copy_source, "copy_source")?, + copy_source_if_match: try_from_aws(x.copy_source_if_match)?, + copy_source_if_modified_since: try_from_aws(x.copy_source_if_modified_since)?, + copy_source_if_none_match: try_from_aws(x.copy_source_if_none_match)?, + copy_source_if_unmodified_since: try_from_aws(x.copy_source_if_unmodified_since)?, + copy_source_range: try_from_aws(x.copy_source_range)?, + copy_source_sse_customer_algorithm: try_from_aws(x.copy_source_sse_customer_algorithm)?, + copy_source_sse_customer_key: try_from_aws(x.copy_source_sse_customer_key)?, + copy_source_sse_customer_key_md5: try_from_aws(x.copy_source_sse_customer_key_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + expected_source_bucket_owner: try_from_aws(x.expected_source_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + part_number: unwrap_from_aws(x.part_number, "part_number")?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_copy_source(Some(try_into_aws(x.copy_source)?)); + y = y.set_copy_source_if_match(try_into_aws(x.copy_source_if_match)?); + y = y.set_copy_source_if_modified_since(try_into_aws(x.copy_source_if_modified_since)?); + y = y.set_copy_source_if_none_match(try_into_aws(x.copy_source_if_none_match)?); + y = y.set_copy_source_if_unmodified_since(try_into_aws(x.copy_source_if_unmodified_since)?); + y = y.set_copy_source_range(try_into_aws(x.copy_source_range)?); + y = y.set_copy_source_sse_customer_algorithm(try_into_aws(x.copy_source_sse_customer_algorithm)?); + y = y.set_copy_source_sse_customer_key(try_into_aws(x.copy_source_sse_customer_key)?); + y = y.set_copy_source_sse_customer_key_md5(try_into_aws(x.copy_source_sse_customer_key_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_expected_source_bucket_owner(try_into_aws(x.expected_source_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_part_number(Some(try_into_aws(x.part_number)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::UploadPartCopyOutput { type Target = aws_sdk_s3::operation::upload_part_copy::UploadPartCopyOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -copy_part_result: try_from_aws(x.copy_part_result)?, -copy_source_version_id: try_from_aws(x.copy_source_version_id)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_copy_part_result(try_into_aws(x.copy_part_result)?); -y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + copy_part_result: try_from_aws(x.copy_part_result)?, + copy_source_version_id: try_from_aws(x.copy_source_version_id)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_copy_part_result(try_into_aws(x.copy_part_result)?); + y = y.set_copy_source_version_id(try_into_aws(x.copy_source_version_id)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::UploadPartInput { type Target = aws_sdk_s3::operation::upload_part::UploadPartInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -body: Some(try_from_aws(x.body)?), -bucket: unwrap_from_aws(x.bucket, "bucket")?, -checksum_algorithm: try_from_aws(x.checksum_algorithm)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -content_length: try_from_aws(x.content_length)?, -content_md5: try_from_aws(x.content_md5)?, -expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, -key: unwrap_from_aws(x.key, "key")?, -part_number: unwrap_from_aws(x.part_number, "part_number")?, -request_payer: try_from_aws(x.request_payer)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key: try_from_aws(x.sse_customer_key)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_bucket(Some(try_into_aws(x.bucket)?)); -y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_md5(try_into_aws(x.content_md5)?); -y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); -y = y.set_key(Some(try_into_aws(x.key)?)); -y = y.set_part_number(Some(try_into_aws(x.part_number)?)); -y = y.set_request_payer(try_into_aws(x.request_payer)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + body: Some(try_from_aws(x.body)?), + bucket: unwrap_from_aws(x.bucket, "bucket")?, + checksum_algorithm: try_from_aws(x.checksum_algorithm)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + content_length: try_from_aws(x.content_length)?, + content_md5: try_from_aws(x.content_md5)?, + expected_bucket_owner: try_from_aws(x.expected_bucket_owner)?, + key: unwrap_from_aws(x.key, "key")?, + part_number: unwrap_from_aws(x.part_number, "part_number")?, + request_payer: try_from_aws(x.request_payer)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key: try_from_aws(x.sse_customer_key)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + upload_id: unwrap_from_aws(x.upload_id, "upload_id")?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_bucket(Some(try_into_aws(x.bucket)?)); + y = y.set_checksum_algorithm(try_into_aws(x.checksum_algorithm)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_md5(try_into_aws(x.content_md5)?); + y = y.set_expected_bucket_owner(try_into_aws(x.expected_bucket_owner)?); + y = y.set_key(Some(try_into_aws(x.key)?)); + y = y.set_part_number(Some(try_into_aws(x.part_number)?)); + y = y.set_request_payer(try_into_aws(x.request_payer)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key(try_into_aws(x.sse_customer_key)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_upload_id(Some(try_into_aws(x.upload_id)?)); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::UploadPartOutput { type Target = aws_sdk_s3::operation::upload_part::UploadPartOutput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -e_tag: try_from_aws(x.e_tag)?, -request_charged: try_from_aws(x.request_charged)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + e_tag: try_from_aws(x.e_tag)?, + request_charged: try_from_aws(x.request_charged)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::VersioningConfiguration { type Target = aws_sdk_s3::types::VersioningConfiguration; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -exclude_folders: None, -excluded_prefixes: None, -mfa_delete: try_from_aws(x.mfa_delete)?, -status: try_from_aws(x.status)?, -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + exclude_folders: None, + excluded_prefixes: None, + mfa_delete: try_from_aws(x.mfa_delete)?, + status: try_from_aws(x.status)?, + }) + } -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); -y = y.set_status(try_into_aws(x.status)?); -Ok(y.build()) -} + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_mfa_delete(try_into_aws(x.mfa_delete)?); + y = y.set_status(try_into_aws(x.status)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::WebsiteConfiguration { type Target = aws_sdk_s3::types::WebsiteConfiguration; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -error_document: try_from_aws(x.error_document)?, -index_document: try_from_aws(x.index_document)?, -redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, -routing_rules: try_from_aws(x.routing_rules)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_error_document(try_into_aws(x.error_document)?); -y = y.set_index_document(try_into_aws(x.index_document)?); -y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); -y = y.set_routing_rules(try_into_aws(x.routing_rules)?); -Ok(y.build()) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + error_document: try_from_aws(x.error_document)?, + index_document: try_from_aws(x.index_document)?, + redirect_all_requests_to: try_from_aws(x.redirect_all_requests_to)?, + routing_rules: try_from_aws(x.routing_rules)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_error_document(try_into_aws(x.error_document)?); + y = y.set_index_document(try_into_aws(x.index_document)?); + y = y.set_redirect_all_requests_to(try_into_aws(x.redirect_all_requests_to)?); + y = y.set_routing_rules(try_into_aws(x.routing_rules)?); + Ok(y.build()) + } } impl AwsConversion for s3s::dto::WriteGetObjectResponseInput { type Target = aws_sdk_s3::operation::write_get_object_response::WriteGetObjectResponseInput; -type Error = S3Error; - -fn try_from_aws(x: Self::Target) -> S3Result { -Ok(Self { -accept_ranges: try_from_aws(x.accept_ranges)?, -body: Some(try_from_aws(x.body)?), -bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, -cache_control: try_from_aws(x.cache_control)?, -checksum_crc32: try_from_aws(x.checksum_crc32)?, -checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, -checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, -checksum_sha1: try_from_aws(x.checksum_sha1)?, -checksum_sha256: try_from_aws(x.checksum_sha256)?, -content_disposition: try_from_aws(x.content_disposition)?, -content_encoding: try_from_aws(x.content_encoding)?, -content_language: try_from_aws(x.content_language)?, -content_length: try_from_aws(x.content_length)?, -content_range: try_from_aws(x.content_range)?, -content_type: try_from_aws(x.content_type)?, -delete_marker: try_from_aws(x.delete_marker)?, -e_tag: try_from_aws(x.e_tag)?, -error_code: try_from_aws(x.error_code)?, -error_message: try_from_aws(x.error_message)?, -expiration: try_from_aws(x.expiration)?, -expires: try_from_aws(x.expires)?, -last_modified: try_from_aws(x.last_modified)?, -metadata: try_from_aws(x.metadata)?, -missing_meta: try_from_aws(x.missing_meta)?, -object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, -object_lock_mode: try_from_aws(x.object_lock_mode)?, -object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, -parts_count: try_from_aws(x.parts_count)?, -replication_status: try_from_aws(x.replication_status)?, -request_charged: try_from_aws(x.request_charged)?, -request_route: unwrap_from_aws(x.request_route, "request_route")?, -request_token: unwrap_from_aws(x.request_token, "request_token")?, -restore: try_from_aws(x.restore)?, -sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, -sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, -ssekms_key_id: try_from_aws(x.ssekms_key_id)?, -server_side_encryption: try_from_aws(x.server_side_encryption)?, -status_code: try_from_aws(x.status_code)?, -storage_class: try_from_aws(x.storage_class)?, -tag_count: try_from_aws(x.tag_count)?, -version_id: try_from_aws(x.version_id)?, -}) -} - -fn try_into_aws(x: Self) -> S3Result { -let mut y = Self::Target::builder(); -y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); -y = y.set_body(try_into_aws(x.body)?); -y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); -y = y.set_cache_control(try_into_aws(x.cache_control)?); -y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); -y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); -y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); -y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); -y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); -y = y.set_content_disposition(try_into_aws(x.content_disposition)?); -y = y.set_content_encoding(try_into_aws(x.content_encoding)?); -y = y.set_content_language(try_into_aws(x.content_language)?); -y = y.set_content_length(try_into_aws(x.content_length)?); -y = y.set_content_range(try_into_aws(x.content_range)?); -y = y.set_content_type(try_into_aws(x.content_type)?); -y = y.set_delete_marker(try_into_aws(x.delete_marker)?); -y = y.set_e_tag(try_into_aws(x.e_tag)?); -y = y.set_error_code(try_into_aws(x.error_code)?); -y = y.set_error_message(try_into_aws(x.error_message)?); -y = y.set_expiration(try_into_aws(x.expiration)?); -y = y.set_expires(try_into_aws(x.expires)?); -y = y.set_last_modified(try_into_aws(x.last_modified)?); -y = y.set_metadata(try_into_aws(x.metadata)?); -y = y.set_missing_meta(try_into_aws(x.missing_meta)?); -y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); -y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); -y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); -y = y.set_parts_count(try_into_aws(x.parts_count)?); -y = y.set_replication_status(try_into_aws(x.replication_status)?); -y = y.set_request_charged(try_into_aws(x.request_charged)?); -y = y.set_request_route(Some(try_into_aws(x.request_route)?)); -y = y.set_request_token(Some(try_into_aws(x.request_token)?)); -y = y.set_restore(try_into_aws(x.restore)?); -y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); -y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); -y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); -y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); -y = y.set_status_code(try_into_aws(x.status_code)?); -y = y.set_storage_class(try_into_aws(x.storage_class)?); -y = y.set_tag_count(try_into_aws(x.tag_count)?); -y = y.set_version_id(try_into_aws(x.version_id)?); -y.build().map_err(S3Error::internal_error) -} + type Error = S3Error; + + fn try_from_aws(x: Self::Target) -> S3Result { + Ok(Self { + accept_ranges: try_from_aws(x.accept_ranges)?, + body: Some(try_from_aws(x.body)?), + bucket_key_enabled: try_from_aws(x.bucket_key_enabled)?, + cache_control: try_from_aws(x.cache_control)?, + checksum_crc32: try_from_aws(x.checksum_crc32)?, + checksum_crc32c: try_from_aws(x.checksum_crc32_c)?, + checksum_crc64nvme: try_from_aws(x.checksum_crc64_nvme)?, + checksum_sha1: try_from_aws(x.checksum_sha1)?, + checksum_sha256: try_from_aws(x.checksum_sha256)?, + content_disposition: try_from_aws(x.content_disposition)?, + content_encoding: try_from_aws(x.content_encoding)?, + content_language: try_from_aws(x.content_language)?, + content_length: try_from_aws(x.content_length)?, + content_range: try_from_aws(x.content_range)?, + content_type: try_from_aws(x.content_type)?, + delete_marker: try_from_aws(x.delete_marker)?, + e_tag: try_from_aws(x.e_tag)?, + error_code: try_from_aws(x.error_code)?, + error_message: try_from_aws(x.error_message)?, + expiration: try_from_aws(x.expiration)?, + expires: try_from_aws(x.expires)?, + last_modified: try_from_aws(x.last_modified)?, + metadata: try_from_aws(x.metadata)?, + missing_meta: try_from_aws(x.missing_meta)?, + object_lock_legal_hold_status: try_from_aws(x.object_lock_legal_hold_status)?, + object_lock_mode: try_from_aws(x.object_lock_mode)?, + object_lock_retain_until_date: try_from_aws(x.object_lock_retain_until_date)?, + parts_count: try_from_aws(x.parts_count)?, + replication_status: try_from_aws(x.replication_status)?, + request_charged: try_from_aws(x.request_charged)?, + request_route: unwrap_from_aws(x.request_route, "request_route")?, + request_token: unwrap_from_aws(x.request_token, "request_token")?, + restore: try_from_aws(x.restore)?, + sse_customer_algorithm: try_from_aws(x.sse_customer_algorithm)?, + sse_customer_key_md5: try_from_aws(x.sse_customer_key_md5)?, + ssekms_key_id: try_from_aws(x.ssekms_key_id)?, + server_side_encryption: try_from_aws(x.server_side_encryption)?, + status_code: try_from_aws(x.status_code)?, + storage_class: try_from_aws(x.storage_class)?, + tag_count: try_from_aws(x.tag_count)?, + version_id: try_from_aws(x.version_id)?, + }) + } + + fn try_into_aws(x: Self) -> S3Result { + let mut y = Self::Target::builder(); + y = y.set_accept_ranges(try_into_aws(x.accept_ranges)?); + y = y.set_body(try_into_aws(x.body)?); + y = y.set_bucket_key_enabled(try_into_aws(x.bucket_key_enabled)?); + y = y.set_cache_control(try_into_aws(x.cache_control)?); + y = y.set_checksum_crc32(try_into_aws(x.checksum_crc32)?); + y = y.set_checksum_crc32_c(try_into_aws(x.checksum_crc32c)?); + y = y.set_checksum_crc64_nvme(try_into_aws(x.checksum_crc64nvme)?); + y = y.set_checksum_sha1(try_into_aws(x.checksum_sha1)?); + y = y.set_checksum_sha256(try_into_aws(x.checksum_sha256)?); + y = y.set_content_disposition(try_into_aws(x.content_disposition)?); + y = y.set_content_encoding(try_into_aws(x.content_encoding)?); + y = y.set_content_language(try_into_aws(x.content_language)?); + y = y.set_content_length(try_into_aws(x.content_length)?); + y = y.set_content_range(try_into_aws(x.content_range)?); + y = y.set_content_type(try_into_aws(x.content_type)?); + y = y.set_delete_marker(try_into_aws(x.delete_marker)?); + y = y.set_e_tag(try_into_aws(x.e_tag)?); + y = y.set_error_code(try_into_aws(x.error_code)?); + y = y.set_error_message(try_into_aws(x.error_message)?); + y = y.set_expiration(try_into_aws(x.expiration)?); + y = y.set_expires(try_into_aws(x.expires)?); + y = y.set_last_modified(try_into_aws(x.last_modified)?); + y = y.set_metadata(try_into_aws(x.metadata)?); + y = y.set_missing_meta(try_into_aws(x.missing_meta)?); + y = y.set_object_lock_legal_hold_status(try_into_aws(x.object_lock_legal_hold_status)?); + y = y.set_object_lock_mode(try_into_aws(x.object_lock_mode)?); + y = y.set_object_lock_retain_until_date(try_into_aws(x.object_lock_retain_until_date)?); + y = y.set_parts_count(try_into_aws(x.parts_count)?); + y = y.set_replication_status(try_into_aws(x.replication_status)?); + y = y.set_request_charged(try_into_aws(x.request_charged)?); + y = y.set_request_route(Some(try_into_aws(x.request_route)?)); + y = y.set_request_token(Some(try_into_aws(x.request_token)?)); + y = y.set_restore(try_into_aws(x.restore)?); + y = y.set_sse_customer_algorithm(try_into_aws(x.sse_customer_algorithm)?); + y = y.set_sse_customer_key_md5(try_into_aws(x.sse_customer_key_md5)?); + y = y.set_ssekms_key_id(try_into_aws(x.ssekms_key_id)?); + y = y.set_server_side_encryption(try_into_aws(x.server_side_encryption)?); + y = y.set_status_code(try_into_aws(x.status_code)?); + y = y.set_storage_class(try_into_aws(x.storage_class)?); + y = y.set_tag_count(try_into_aws(x.tag_count)?); + y = y.set_version_id(try_into_aws(x.version_id)?); + y.build().map_err(S3Error::internal_error) + } } impl AwsConversion for s3s::dto::WriteGetObjectResponseOutput { type Target = aws_sdk_s3::operation::write_get_object_response::WriteGetObjectResponseOutput; -type Error = S3Error; + type Error = S3Error; -fn try_from_aws(x: Self::Target) -> S3Result { -let _ = x; -Ok(Self { -}) -} + fn try_from_aws(x: Self::Target) -> S3Result { + let _ = x; + Ok(Self {}) + } -fn try_into_aws(x: Self) -> S3Result { -let _ = x; -let y = Self::Target::builder(); -Ok(y.build()) + fn try_into_aws(x: Self) -> S3Result { + let _ = x; + let y = Self::Target::builder(); + Ok(y.build()) + } } -} - diff --git a/crates/s3s-aws/src/proxy/generated.rs b/crates/s3s-aws/src/proxy/generated.rs index e0297a2b..36073ae7 100644 --- a/crates/s3s-aws/src/proxy/generated.rs +++ b/crates/s3s-aws/src/proxy/generated.rs @@ -2,2327 +2,2599 @@ use super::*; -use crate::conv::{try_from_aws, try_into_aws}; use crate::conv::string_from_integer; +use crate::conv::{try_from_aws, try_into_aws}; use s3s::S3; -use s3s::{S3Request, S3Response}; use s3s::S3Result; +use s3s::{S3Request, S3Response}; use tracing::debug; #[async_trait::async_trait] impl S3 for Proxy { -#[tracing::instrument(skip(self, req))] -async fn abort_multipart_upload(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.abort_multipart_upload(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn complete_multipart_upload(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.complete_multipart_upload(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); -b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); -b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); -b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); -b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); -b = b.set_checksum_type(try_into_aws(input.checksum_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_none_match(try_into_aws(input.if_none_match)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?); -b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn copy_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.copy_object(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_cache_control(try_into_aws(input.cache_control)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_disposition(try_into_aws(input.content_disposition)?); -b = b.set_content_encoding(try_into_aws(input.content_encoding)?); -b = b.set_content_language(try_into_aws(input.content_language)?); -b = b.set_content_type(try_into_aws(input.content_type)?); -b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); -b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); -b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); -b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); -b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); -b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); -b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); -b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); -b = b.set_expires(try_into_aws(input.expires)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_metadata(try_into_aws(input.metadata)?); -b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?); -b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); -b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); -b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_storage_class(try_into_aws(input.storage_class)?); -b = b.set_tagging(try_into_aws(input.tagging)?); -b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?); -b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn create_bucket(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.create_bucket(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write(try_into_aws(input.grant_write)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?); -b = b.set_object_ownership(try_into_aws(input.object_ownership)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn create_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.create_bucket_metadata_table_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn create_multipart_upload(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.create_multipart_upload(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_cache_control(try_into_aws(input.cache_control)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_checksum_type(try_into_aws(input.checksum_type)?); -b = b.set_content_disposition(try_into_aws(input.content_disposition)?); -b = b.set_content_encoding(try_into_aws(input.content_encoding)?); -b = b.set_content_language(try_into_aws(input.content_language)?); -b = b.set_content_type(try_into_aws(input.content_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_expires(try_into_aws(input.expires)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_metadata(try_into_aws(input.metadata)?); -b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); -b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); -b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_storage_class(try_into_aws(input.storage_class)?); -b = b.set_tagging(try_into_aws(input.tagging)?); -b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn create_session(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.create_session(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_session_mode(try_into_aws(input.session_mode)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_analytics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_cors(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_cors(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_encryption(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_encryption(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_intelligent_tiering_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_inventory_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_lifecycle(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_lifecycle(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_metadata_table_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_metrics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_ownership_controls(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_policy(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_policy(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_replication(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_replication(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_website(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_website(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_object(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?); -b = b.set_if_match_size(try_into_aws(input.if_match_size)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_mfa(try_into_aws(input.mfa)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_object_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_object_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_objects(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_objects(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_delete(Some(try_into_aws(input.delete)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_mfa(try_into_aws(input.mfa)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_public_access_block(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_public_access_block(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_accelerate_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_accelerate_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_acl(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_acl(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_analytics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_cors(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_cors(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_encryption(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_encryption(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_intelligent_tiering_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_inventory_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_lifecycle_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_lifecycle_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_location(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_location(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_logging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_logging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_metadata_table_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_metrics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_notification_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_notification_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_ownership_controls(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_policy(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_policy(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_policy_status(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_policy_status(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_replication(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_replication(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_request_payment(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_request_payment(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_versioning(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_versioning(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_website(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_website(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); -b = b.set_if_none_match(try_into_aws(input.if_none_match)?); -b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_part_number(try_into_aws(input.part_number)?); -b = b.set_range(try_into_aws(input.range)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); -b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); -b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); -b = b.set_response_content_language(try_into_aws(input.response_content_language)?); -b = b.set_response_content_type(try_into_aws(input.response_content_type)?); -b = b.set_response_expires(try_into_aws(input.response_expires)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_acl(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_acl(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_attributes(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_attributes(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_max_parts(try_into_aws(input.max_parts)?); -b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?)); -b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_legal_hold(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_legal_hold(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_lock_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_lock_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_retention(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_retention(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_torrent(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_torrent(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_public_access_block(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_public_access_block(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn head_bucket(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.head_bucket(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn head_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.head_object(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); -b = b.set_if_none_match(try_into_aws(input.if_none_match)?); -b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_part_number(try_into_aws(input.part_number)?); -b = b.set_range(try_into_aws(input.range)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); -b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); -b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); -b = b.set_response_content_language(try_into_aws(input.response_content_language)?); -b = b.set_response_content_type(try_into_aws(input.response_content_type)?); -b = b.set_response_expires(try_into_aws(input.response_expires)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_bucket_analytics_configurations(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_bucket_analytics_configurations(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_bucket_intelligent_tiering_configurations(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_bucket_intelligent_tiering_configurations(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_bucket_inventory_configurations(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_bucket_inventory_configurations(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_bucket_metrics_configurations(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_bucket_metrics_configurations(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_buckets(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_buckets(); -b = b.set_bucket_region(try_into_aws(input.bucket_region)?); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_max_buckets(try_into_aws(input.max_buckets)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_directory_buckets(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_directory_buckets(); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_max_directory_buckets(try_into_aws(input.max_directory_buckets)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_multipart_uploads(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_multipart_uploads(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_delimiter(try_into_aws(input.delimiter)?); -b = b.set_encoding_type(try_into_aws(input.encoding_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key_marker(try_into_aws(input.key_marker)?); -b = b.set_max_uploads(try_into_aws(input.max_uploads)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_object_versions(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_object_versions(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_delimiter(try_into_aws(input.delimiter)?); -b = b.set_encoding_type(try_into_aws(input.encoding_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key_marker(try_into_aws(input.key_marker)?); -b = b.set_max_keys(try_into_aws(input.max_keys)?); -b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_objects(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_objects(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_delimiter(try_into_aws(input.delimiter)?); -b = b.set_encoding_type(try_into_aws(input.encoding_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_marker(try_into_aws(input.marker)?); -b = b.set_max_keys(try_into_aws(input.max_keys)?); -b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_objects_v2(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_objects_v2(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_delimiter(try_into_aws(input.delimiter)?); -b = b.set_encoding_type(try_into_aws(input.encoding_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?); -b = b.set_max_keys(try_into_aws(input.max_keys)?); -b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_start_after(try_into_aws(input.start_after)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_parts(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_parts(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_max_parts(try_into_aws(input.max_parts)?); -b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_accelerate_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_accelerate_configuration(); -b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?)); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_acl(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_acl(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write(try_into_aws(input.grant_write)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_analytics_configuration(); -b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?)); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_cors(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_cors(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_encryption(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_encryption(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_intelligent_tiering_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_id(Some(try_into_aws(input.id)?)); -b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_inventory_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_lifecycle_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_lifecycle_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?); -b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_logging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_logging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_metrics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_notification_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_notification_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?)); -b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_ownership_controls(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_policy(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_policy(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_policy(Some(try_into_aws(input.policy)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_replication(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_replication(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?)); -b = b.set_token(try_into_aws(input.token)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_request_payment(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_request_payment(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_tagging(Some(try_into_aws(input.tagging)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_versioning(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_versioning(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_mfa(try_into_aws(input.mfa)?); -b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_website(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_website(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_body(try_into_aws(input.body)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_cache_control(try_into_aws(input.cache_control)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); -b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); -b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); -b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); -b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); -b = b.set_content_disposition(try_into_aws(input.content_disposition)?); -b = b.set_content_encoding(try_into_aws(input.content_encoding)?); -b = b.set_content_language(try_into_aws(input.content_language)?); -b = b.set_content_length(try_into_aws(input.content_length)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_content_type(try_into_aws(input.content_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_expires(try_into_aws(input.expires)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_none_match(try_into_aws(input.if_none_match)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_metadata(try_into_aws(input.metadata)?); -b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); -b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); -b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_storage_class(try_into_aws(input.storage_class)?); -b = b.set_tagging(try_into_aws(input.tagging)?); -b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); -b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_acl(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_acl(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write(try_into_aws(input.grant_write)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_legal_hold(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_legal_hold(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_legal_hold(try_into_aws(input.legal_hold)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_lock_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_lock_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_token(try_into_aws(input.token)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_retention(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_retention(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_retention(try_into_aws(input.retention)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_tagging(Some(try_into_aws(input.tagging)?)); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_public_access_block(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_public_access_block(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn restore_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.restore_object(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_restore_request(try_into_aws(input.restore_request)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn select_object_content(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.select_object_content(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_expression(Some(try_into_aws(input.request.expression)?)); -b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?)); -b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?)); -b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?)); -b = b.set_request_progress(try_into_aws(input.request.request_progress)?); -b = b.set_scan_range(try_into_aws(input.request.scan_range)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn upload_part(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.upload_part(); -b = b.set_body(try_into_aws(input.body)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); -b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); -b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); -b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); -b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); -b = b.set_content_length(try_into_aws(input.content_length)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_part_number(Some(try_into_aws(input.part_number)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn upload_part_copy(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.upload_part_copy(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); -b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); -b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); -b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); -b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); -b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?); -b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); -b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); -b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_part_number(Some(try_into_aws(input.part_number)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn write_get_object_response(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.write_get_object_response(); -b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?); -b = b.set_body(try_into_aws(input.body)?); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_cache_control(try_into_aws(input.cache_control)?); -b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); -b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); -b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); -b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); -b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); -b = b.set_content_disposition(try_into_aws(input.content_disposition)?); -b = b.set_content_encoding(try_into_aws(input.content_encoding)?); -b = b.set_content_language(try_into_aws(input.content_language)?); -b = b.set_content_length(try_into_aws(input.content_length)?); -b = b.set_content_range(try_into_aws(input.content_range)?); -b = b.set_content_type(try_into_aws(input.content_type)?); -b = b.set_delete_marker(try_into_aws(input.delete_marker)?); -b = b.set_e_tag(try_into_aws(input.e_tag)?); -b = b.set_error_code(try_into_aws(input.error_code)?); -b = b.set_error_message(try_into_aws(input.error_message)?); -b = b.set_expiration(try_into_aws(input.expiration)?); -b = b.set_expires(try_into_aws(input.expires)?); -b = b.set_last_modified(try_into_aws(input.last_modified)?); -b = b.set_metadata(try_into_aws(input.metadata)?); -b = b.set_missing_meta(try_into_aws(input.missing_meta)?); -b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); -b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); -b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); -b = b.set_parts_count(try_into_aws(input.parts_count)?); -b = b.set_replication_status(try_into_aws(input.replication_status)?); -b = b.set_request_charged(try_into_aws(input.request_charged)?); -b = b.set_request_route(Some(try_into_aws(input.request_route)?)); -b = b.set_request_token(Some(try_into_aws(input.request_token)?)); -b = b.set_restore(try_into_aws(input.restore)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_status_code(try_into_aws(input.status_code)?); -b = b.set_storage_class(try_into_aws(input.storage_class)?); -b = b.set_tag_count(try_into_aws(input.tag_count)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - + #[tracing::instrument(skip(self, req))] + async fn abort_multipart_upload( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.abort_multipart_upload(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn complete_multipart_upload( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.complete_multipart_upload(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); + b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); + b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); + b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); + b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); + b = b.set_checksum_type(try_into_aws(input.checksum_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_none_match(try_into_aws(input.if_none_match)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?); + b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn copy_object(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.copy_object(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_cache_control(try_into_aws(input.cache_control)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_disposition(try_into_aws(input.content_disposition)?); + b = b.set_content_encoding(try_into_aws(input.content_encoding)?); + b = b.set_content_language(try_into_aws(input.content_language)?); + b = b.set_content_type(try_into_aws(input.content_type)?); + b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); + b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); + b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); + b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); + b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); + b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); + b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); + b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); + b = b.set_expires(try_into_aws(input.expires)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_metadata(try_into_aws(input.metadata)?); + b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?); + b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); + b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); + b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_storage_class(try_into_aws(input.storage_class)?); + b = b.set_tagging(try_into_aws(input.tagging)?); + b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?); + b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn create_bucket( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.create_bucket(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write(try_into_aws(input.grant_write)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?); + b = b.set_object_ownership(try_into_aws(input.object_ownership)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn create_bucket_metadata_table_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.create_bucket_metadata_table_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn create_multipart_upload( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.create_multipart_upload(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_cache_control(try_into_aws(input.cache_control)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_checksum_type(try_into_aws(input.checksum_type)?); + b = b.set_content_disposition(try_into_aws(input.content_disposition)?); + b = b.set_content_encoding(try_into_aws(input.content_encoding)?); + b = b.set_content_language(try_into_aws(input.content_language)?); + b = b.set_content_type(try_into_aws(input.content_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_expires(try_into_aws(input.expires)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_metadata(try_into_aws(input.metadata)?); + b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); + b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); + b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_storage_class(try_into_aws(input.storage_class)?); + b = b.set_tagging(try_into_aws(input.tagging)?); + b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn create_session( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.create_session(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_session_mode(try_into_aws(input.session_mode)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_analytics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_analytics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_cors( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_cors(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_encryption( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_encryption(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_intelligent_tiering_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_intelligent_tiering_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_inventory_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_inventory_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_lifecycle( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_lifecycle(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_metadata_table_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_metadata_table_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_metrics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_metrics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_ownership_controls( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_ownership_controls(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_policy( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_policy(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_replication( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_replication(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_website( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_website(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_object( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_object(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?); + b = b.set_if_match_size(try_into_aws(input.if_match_size)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_mfa(try_into_aws(input.mfa)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_object_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_object_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_objects( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_objects(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_delete(Some(try_into_aws(input.delete)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_mfa(try_into_aws(input.mfa)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_public_access_block( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_public_access_block(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_accelerate_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_accelerate_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_acl( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_acl(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_analytics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_analytics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_cors( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_cors(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_encryption( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_encryption(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_intelligent_tiering_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_intelligent_tiering_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_inventory_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_inventory_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_lifecycle_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_lifecycle_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_location( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_location(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_logging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_logging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_metadata_table_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_metadata_table_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_metrics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_metrics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_notification_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_notification_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_ownership_controls( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_ownership_controls(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_policy( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_policy(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_policy_status( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_policy_status(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_replication( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_replication(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_request_payment( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_request_payment(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_versioning( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_versioning(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_website( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_website(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); + b = b.set_if_none_match(try_into_aws(input.if_none_match)?); + b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_part_number(try_into_aws(input.part_number)?); + b = b.set_range(try_into_aws(input.range)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); + b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); + b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); + b = b.set_response_content_language(try_into_aws(input.response_content_language)?); + b = b.set_response_content_type(try_into_aws(input.response_content_type)?); + b = b.set_response_expires(try_into_aws(input.response_expires)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_acl( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_acl(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_attributes( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_attributes(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_max_parts(try_into_aws(input.max_parts)?); + b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?)); + b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_legal_hold( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_legal_hold(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_lock_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_lock_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_retention( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_retention(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_torrent( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_torrent(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_public_access_block( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_public_access_block(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn head_bucket(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.head_bucket(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn head_object(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.head_object(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); + b = b.set_if_none_match(try_into_aws(input.if_none_match)?); + b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_part_number(try_into_aws(input.part_number)?); + b = b.set_range(try_into_aws(input.range)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); + b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); + b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); + b = b.set_response_content_language(try_into_aws(input.response_content_language)?); + b = b.set_response_content_type(try_into_aws(input.response_content_type)?); + b = b.set_response_expires(try_into_aws(input.response_expires)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_bucket_analytics_configurations( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_bucket_analytics_configurations(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_bucket_intelligent_tiering_configurations( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_bucket_intelligent_tiering_configurations(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_bucket_inventory_configurations( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_bucket_inventory_configurations(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_bucket_metrics_configurations( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_bucket_metrics_configurations(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_buckets( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_buckets(); + b = b.set_bucket_region(try_into_aws(input.bucket_region)?); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_max_buckets(try_into_aws(input.max_buckets)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_directory_buckets( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_directory_buckets(); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_max_directory_buckets(try_into_aws(input.max_directory_buckets)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_multipart_uploads( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_multipart_uploads(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_delimiter(try_into_aws(input.delimiter)?); + b = b.set_encoding_type(try_into_aws(input.encoding_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key_marker(try_into_aws(input.key_marker)?); + b = b.set_max_uploads(try_into_aws(input.max_uploads)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_object_versions( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_object_versions(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_delimiter(try_into_aws(input.delimiter)?); + b = b.set_encoding_type(try_into_aws(input.encoding_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key_marker(try_into_aws(input.key_marker)?); + b = b.set_max_keys(try_into_aws(input.max_keys)?); + b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_objects( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_objects(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_delimiter(try_into_aws(input.delimiter)?); + b = b.set_encoding_type(try_into_aws(input.encoding_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_marker(try_into_aws(input.marker)?); + b = b.set_max_keys(try_into_aws(input.max_keys)?); + b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_objects_v2( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_objects_v2(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_delimiter(try_into_aws(input.delimiter)?); + b = b.set_encoding_type(try_into_aws(input.encoding_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?); + b = b.set_max_keys(try_into_aws(input.max_keys)?); + b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_start_after(try_into_aws(input.start_after)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_parts(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_parts(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_max_parts(try_into_aws(input.max_parts)?); + b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_accelerate_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_accelerate_configuration(); + b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?)); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_acl( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_acl(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write(try_into_aws(input.grant_write)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_analytics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_analytics_configuration(); + b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?)); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_cors( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_cors(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_encryption( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_encryption(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_intelligent_tiering_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_intelligent_tiering_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_id(Some(try_into_aws(input.id)?)); + b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_inventory_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_inventory_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_lifecycle_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_lifecycle_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?); + b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_logging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_logging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_metrics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_metrics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_notification_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_notification_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?)); + b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_ownership_controls( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_ownership_controls(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_policy( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_policy(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_policy(Some(try_into_aws(input.policy)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_replication( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_replication(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?)); + b = b.set_token(try_into_aws(input.token)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_request_payment( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_request_payment(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_tagging(Some(try_into_aws(input.tagging)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_versioning( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_versioning(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_mfa(try_into_aws(input.mfa)?); + b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_website( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_website(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_body(try_into_aws(input.body)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_cache_control(try_into_aws(input.cache_control)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); + b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); + b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); + b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); + b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); + b = b.set_content_disposition(try_into_aws(input.content_disposition)?); + b = b.set_content_encoding(try_into_aws(input.content_encoding)?); + b = b.set_content_language(try_into_aws(input.content_language)?); + b = b.set_content_length(try_into_aws(input.content_length)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_content_type(try_into_aws(input.content_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_expires(try_into_aws(input.expires)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_none_match(try_into_aws(input.if_none_match)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_metadata(try_into_aws(input.metadata)?); + b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); + b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); + b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_storage_class(try_into_aws(input.storage_class)?); + b = b.set_tagging(try_into_aws(input.tagging)?); + b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); + b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_acl( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_acl(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write(try_into_aws(input.grant_write)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_legal_hold( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_legal_hold(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_legal_hold(try_into_aws(input.legal_hold)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_lock_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_lock_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_token(try_into_aws(input.token)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_retention( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_retention(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_retention(try_into_aws(input.retention)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_tagging(Some(try_into_aws(input.tagging)?)); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_public_access_block( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_public_access_block(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn restore_object( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.restore_object(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_restore_request(try_into_aws(input.restore_request)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn select_object_content( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.select_object_content(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_expression(Some(try_into_aws(input.request.expression)?)); + b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?)); + b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?)); + b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?)); + b = b.set_request_progress(try_into_aws(input.request.request_progress)?); + b = b.set_scan_range(try_into_aws(input.request.scan_range)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn upload_part(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.upload_part(); + b = b.set_body(try_into_aws(input.body)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); + b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); + b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); + b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); + b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); + b = b.set_content_length(try_into_aws(input.content_length)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_part_number(Some(try_into_aws(input.part_number)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn upload_part_copy( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.upload_part_copy(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); + b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); + b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); + b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); + b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); + b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?); + b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); + b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); + b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_part_number(Some(try_into_aws(input.part_number)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn write_get_object_response( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.write_get_object_response(); + b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?); + b = b.set_body(try_into_aws(input.body)?); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_cache_control(try_into_aws(input.cache_control)?); + b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); + b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); + b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); + b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); + b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); + b = b.set_content_disposition(try_into_aws(input.content_disposition)?); + b = b.set_content_encoding(try_into_aws(input.content_encoding)?); + b = b.set_content_language(try_into_aws(input.content_language)?); + b = b.set_content_length(try_into_aws(input.content_length)?); + b = b.set_content_range(try_into_aws(input.content_range)?); + b = b.set_content_type(try_into_aws(input.content_type)?); + b = b.set_delete_marker(try_into_aws(input.delete_marker)?); + b = b.set_e_tag(try_into_aws(input.e_tag)?); + b = b.set_error_code(try_into_aws(input.error_code)?); + b = b.set_error_message(try_into_aws(input.error_message)?); + b = b.set_expiration(try_into_aws(input.expiration)?); + b = b.set_expires(try_into_aws(input.expires)?); + b = b.set_last_modified(try_into_aws(input.last_modified)?); + b = b.set_metadata(try_into_aws(input.metadata)?); + b = b.set_missing_meta(try_into_aws(input.missing_meta)?); + b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); + b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); + b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); + b = b.set_parts_count(try_into_aws(input.parts_count)?); + b = b.set_replication_status(try_into_aws(input.replication_status)?); + b = b.set_request_charged(try_into_aws(input.request_charged)?); + b = b.set_request_route(Some(try_into_aws(input.request_route)?)); + b = b.set_request_token(Some(try_into_aws(input.request_token)?)); + b = b.set_restore(try_into_aws(input.restore)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_status_code(try_into_aws(input.status_code)?); + b = b.set_storage_class(try_into_aws(input.storage_class)?); + b = b.set_tag_count(try_into_aws(input.tag_count)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } } diff --git a/crates/s3s-aws/src/proxy/generated_minio.rs b/crates/s3s-aws/src/proxy/generated_minio.rs index e0297a2b..36073ae7 100644 --- a/crates/s3s-aws/src/proxy/generated_minio.rs +++ b/crates/s3s-aws/src/proxy/generated_minio.rs @@ -2,2327 +2,2599 @@ use super::*; -use crate::conv::{try_from_aws, try_into_aws}; use crate::conv::string_from_integer; +use crate::conv::{try_from_aws, try_into_aws}; use s3s::S3; -use s3s::{S3Request, S3Response}; use s3s::S3Result; +use s3s::{S3Request, S3Response}; use tracing::debug; #[async_trait::async_trait] impl S3 for Proxy { -#[tracing::instrument(skip(self, req))] -async fn abort_multipart_upload(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.abort_multipart_upload(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn complete_multipart_upload(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.complete_multipart_upload(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); -b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); -b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); -b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); -b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); -b = b.set_checksum_type(try_into_aws(input.checksum_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_none_match(try_into_aws(input.if_none_match)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?); -b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn copy_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.copy_object(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_cache_control(try_into_aws(input.cache_control)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_disposition(try_into_aws(input.content_disposition)?); -b = b.set_content_encoding(try_into_aws(input.content_encoding)?); -b = b.set_content_language(try_into_aws(input.content_language)?); -b = b.set_content_type(try_into_aws(input.content_type)?); -b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); -b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); -b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); -b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); -b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); -b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); -b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); -b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); -b = b.set_expires(try_into_aws(input.expires)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_metadata(try_into_aws(input.metadata)?); -b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?); -b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); -b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); -b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_storage_class(try_into_aws(input.storage_class)?); -b = b.set_tagging(try_into_aws(input.tagging)?); -b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?); -b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn create_bucket(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.create_bucket(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write(try_into_aws(input.grant_write)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?); -b = b.set_object_ownership(try_into_aws(input.object_ownership)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn create_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.create_bucket_metadata_table_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn create_multipart_upload(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.create_multipart_upload(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_cache_control(try_into_aws(input.cache_control)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_checksum_type(try_into_aws(input.checksum_type)?); -b = b.set_content_disposition(try_into_aws(input.content_disposition)?); -b = b.set_content_encoding(try_into_aws(input.content_encoding)?); -b = b.set_content_language(try_into_aws(input.content_language)?); -b = b.set_content_type(try_into_aws(input.content_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_expires(try_into_aws(input.expires)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_metadata(try_into_aws(input.metadata)?); -b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); -b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); -b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_storage_class(try_into_aws(input.storage_class)?); -b = b.set_tagging(try_into_aws(input.tagging)?); -b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn create_session(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.create_session(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_session_mode(try_into_aws(input.session_mode)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_analytics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_cors(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_cors(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_encryption(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_encryption(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_intelligent_tiering_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_inventory_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_lifecycle(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_lifecycle(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_metadata_table_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_metrics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_ownership_controls(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_policy(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_policy(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_replication(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_replication(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_bucket_website(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_bucket_website(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_object(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?); -b = b.set_if_match_size(try_into_aws(input.if_match_size)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_mfa(try_into_aws(input.mfa)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_object_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_object_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_objects(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_objects(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_delete(Some(try_into_aws(input.delete)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_mfa(try_into_aws(input.mfa)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn delete_public_access_block(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.delete_public_access_block(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_accelerate_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_accelerate_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_acl(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_acl(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_analytics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_cors(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_cors(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_encryption(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_encryption(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_intelligent_tiering_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_inventory_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_lifecycle_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_lifecycle_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_location(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_location(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_logging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_logging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_metadata_table_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_metadata_table_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_metrics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_notification_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_notification_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_ownership_controls(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_policy(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_policy(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_policy_status(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_policy_status(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_replication(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_replication(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_request_payment(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_request_payment(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_versioning(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_versioning(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_bucket_website(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_bucket_website(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); -b = b.set_if_none_match(try_into_aws(input.if_none_match)?); -b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_part_number(try_into_aws(input.part_number)?); -b = b.set_range(try_into_aws(input.range)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); -b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); -b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); -b = b.set_response_content_language(try_into_aws(input.response_content_language)?); -b = b.set_response_content_type(try_into_aws(input.response_content_type)?); -b = b.set_response_expires(try_into_aws(input.response_expires)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_acl(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_acl(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_attributes(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_attributes(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_max_parts(try_into_aws(input.max_parts)?); -b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?)); -b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_legal_hold(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_legal_hold(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_lock_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_lock_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_retention(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_retention(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_object_torrent(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_object_torrent(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn get_public_access_block(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.get_public_access_block(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn head_bucket(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.head_bucket(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn head_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.head_object(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); -b = b.set_if_none_match(try_into_aws(input.if_none_match)?); -b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_part_number(try_into_aws(input.part_number)?); -b = b.set_range(try_into_aws(input.range)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); -b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); -b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); -b = b.set_response_content_language(try_into_aws(input.response_content_language)?); -b = b.set_response_content_type(try_into_aws(input.response_content_type)?); -b = b.set_response_expires(try_into_aws(input.response_expires)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_bucket_analytics_configurations(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_bucket_analytics_configurations(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_bucket_intelligent_tiering_configurations(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_bucket_intelligent_tiering_configurations(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_bucket_inventory_configurations(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_bucket_inventory_configurations(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_bucket_metrics_configurations(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_bucket_metrics_configurations(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_buckets(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_buckets(); -b = b.set_bucket_region(try_into_aws(input.bucket_region)?); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_max_buckets(try_into_aws(input.max_buckets)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_directory_buckets(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_directory_buckets(); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_max_directory_buckets(try_into_aws(input.max_directory_buckets)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_multipart_uploads(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_multipart_uploads(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_delimiter(try_into_aws(input.delimiter)?); -b = b.set_encoding_type(try_into_aws(input.encoding_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key_marker(try_into_aws(input.key_marker)?); -b = b.set_max_uploads(try_into_aws(input.max_uploads)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_object_versions(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_object_versions(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_delimiter(try_into_aws(input.delimiter)?); -b = b.set_encoding_type(try_into_aws(input.encoding_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key_marker(try_into_aws(input.key_marker)?); -b = b.set_max_keys(try_into_aws(input.max_keys)?); -b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_objects(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_objects(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_delimiter(try_into_aws(input.delimiter)?); -b = b.set_encoding_type(try_into_aws(input.encoding_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_marker(try_into_aws(input.marker)?); -b = b.set_max_keys(try_into_aws(input.max_keys)?); -b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_objects_v2(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_objects_v2(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_continuation_token(try_into_aws(input.continuation_token)?); -b = b.set_delimiter(try_into_aws(input.delimiter)?); -b = b.set_encoding_type(try_into_aws(input.encoding_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?); -b = b.set_max_keys(try_into_aws(input.max_keys)?); -b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); -b = b.set_prefix(try_into_aws(input.prefix)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_start_after(try_into_aws(input.start_after)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn list_parts(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.list_parts(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_max_parts(try_into_aws(input.max_parts)?); -b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_accelerate_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_accelerate_configuration(); -b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?)); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_acl(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_acl(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write(try_into_aws(input.grant_write)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_analytics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_analytics_configuration(); -b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?)); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_cors(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_cors(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_encryption(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_encryption(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_intelligent_tiering_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_intelligent_tiering_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_id(Some(try_into_aws(input.id)?)); -b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_inventory_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_inventory_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_lifecycle_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_lifecycle_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?); -b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_logging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_logging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_metrics_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_metrics_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_id(Some(try_into_aws(input.id)?)); -b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_notification_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_notification_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?)); -b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_ownership_controls(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_ownership_controls(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_policy(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_policy(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_policy(Some(try_into_aws(input.policy)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_replication(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_replication(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?)); -b = b.set_token(try_into_aws(input.token)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_request_payment(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_request_payment(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_tagging(Some(try_into_aws(input.tagging)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_versioning(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_versioning(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_mfa(try_into_aws(input.mfa)?); -b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_bucket_website(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_bucket_website(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_body(try_into_aws(input.body)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_cache_control(try_into_aws(input.cache_control)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); -b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); -b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); -b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); -b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); -b = b.set_content_disposition(try_into_aws(input.content_disposition)?); -b = b.set_content_encoding(try_into_aws(input.content_encoding)?); -b = b.set_content_language(try_into_aws(input.content_language)?); -b = b.set_content_length(try_into_aws(input.content_length)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_content_type(try_into_aws(input.content_type)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_expires(try_into_aws(input.expires)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_if_match(try_into_aws(input.if_match)?); -b = b.set_if_none_match(try_into_aws(input.if_none_match)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_metadata(try_into_aws(input.metadata)?); -b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); -b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); -b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_storage_class(try_into_aws(input.storage_class)?); -b = b.set_tagging(try_into_aws(input.tagging)?); -b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); -b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_acl(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_acl(); -b = b.set_acl(try_into_aws(input.acl)?); -b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); -b = b.set_grant_read(try_into_aws(input.grant_read)?); -b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); -b = b.set_grant_write(try_into_aws(input.grant_write)?); -b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_legal_hold(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_legal_hold(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_legal_hold(try_into_aws(input.legal_hold)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_lock_configuration(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_lock_configuration(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_token(try_into_aws(input.token)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_retention(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_retention(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_retention(try_into_aws(input.retention)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_object_tagging(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_object_tagging(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_tagging(Some(try_into_aws(input.tagging)?)); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn put_public_access_block(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.put_public_access_block(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn restore_object(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.restore_object(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_restore_request(try_into_aws(input.restore_request)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn select_object_content(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.select_object_content(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_expression(Some(try_into_aws(input.request.expression)?)); -b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?)); -b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?)); -b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?)); -b = b.set_request_progress(try_into_aws(input.request.request_progress)?); -b = b.set_scan_range(try_into_aws(input.request.scan_range)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn upload_part(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.upload_part(); -b = b.set_body(try_into_aws(input.body)?); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); -b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); -b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); -b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); -b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); -b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); -b = b.set_content_length(try_into_aws(input.content_length)?); -b = b.set_content_md5(try_into_aws(input.content_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_part_number(Some(try_into_aws(input.part_number)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn upload_part_copy(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.upload_part_copy(); -b = b.set_bucket(Some(try_into_aws(input.bucket)?)); -b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); -b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); -b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); -b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); -b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); -b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?); -b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); -b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); -b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); -b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); -b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); -b = b.set_key(Some(try_into_aws(input.key)?)); -b = b.set_part_number(Some(try_into_aws(input.part_number)?)); -b = b.set_request_payer(try_into_aws(input.request_payer)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - -#[tracing::instrument(skip(self, req))] -async fn write_get_object_response(&self, req: S3Request) -> S3Result> { -let input = req.input; -debug!(?input); -let mut b = self.0.write_get_object_response(); -b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?); -b = b.set_body(try_into_aws(input.body)?); -b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); -b = b.set_cache_control(try_into_aws(input.cache_control)?); -b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); -b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); -b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); -b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); -b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); -b = b.set_content_disposition(try_into_aws(input.content_disposition)?); -b = b.set_content_encoding(try_into_aws(input.content_encoding)?); -b = b.set_content_language(try_into_aws(input.content_language)?); -b = b.set_content_length(try_into_aws(input.content_length)?); -b = b.set_content_range(try_into_aws(input.content_range)?); -b = b.set_content_type(try_into_aws(input.content_type)?); -b = b.set_delete_marker(try_into_aws(input.delete_marker)?); -b = b.set_e_tag(try_into_aws(input.e_tag)?); -b = b.set_error_code(try_into_aws(input.error_code)?); -b = b.set_error_message(try_into_aws(input.error_message)?); -b = b.set_expiration(try_into_aws(input.expiration)?); -b = b.set_expires(try_into_aws(input.expires)?); -b = b.set_last_modified(try_into_aws(input.last_modified)?); -b = b.set_metadata(try_into_aws(input.metadata)?); -b = b.set_missing_meta(try_into_aws(input.missing_meta)?); -b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); -b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); -b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); -b = b.set_parts_count(try_into_aws(input.parts_count)?); -b = b.set_replication_status(try_into_aws(input.replication_status)?); -b = b.set_request_charged(try_into_aws(input.request_charged)?); -b = b.set_request_route(Some(try_into_aws(input.request_route)?)); -b = b.set_request_token(Some(try_into_aws(input.request_token)?)); -b = b.set_restore(try_into_aws(input.restore)?); -b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); -b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); -b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); -b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); -b = b.set_status_code(try_into_aws(input.status_code)?); -b = b.set_storage_class(try_into_aws(input.storage_class)?); -b = b.set_tag_count(try_into_aws(input.tag_count)?); -b = b.set_version_id(try_into_aws(input.version_id)?); -let result = b.send().await; -match result { - Ok(output) => { - let headers = super::meta::build_headers(&output)?; - let output = try_from_aws(output)?; - debug!(?output); - Ok(S3Response::with_headers(output, headers)) - }, - Err(e) => Err(wrap_sdk_error!(e)), -} -} - + #[tracing::instrument(skip(self, req))] + async fn abort_multipart_upload( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.abort_multipart_upload(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match_initiated_time(try_into_aws(input.if_match_initiated_time)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn complete_multipart_upload( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.complete_multipart_upload(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); + b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); + b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); + b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); + b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); + b = b.set_checksum_type(try_into_aws(input.checksum_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_none_match(try_into_aws(input.if_none_match)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_mpu_object_size(try_into_aws(input.mpu_object_size)?); + b = b.set_multipart_upload(try_into_aws(input.multipart_upload)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn copy_object(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.copy_object(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_cache_control(try_into_aws(input.cache_control)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_disposition(try_into_aws(input.content_disposition)?); + b = b.set_content_encoding(try_into_aws(input.content_encoding)?); + b = b.set_content_language(try_into_aws(input.content_language)?); + b = b.set_content_type(try_into_aws(input.content_type)?); + b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); + b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); + b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); + b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); + b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); + b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); + b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); + b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); + b = b.set_expires(try_into_aws(input.expires)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_metadata(try_into_aws(input.metadata)?); + b = b.set_metadata_directive(try_into_aws(input.metadata_directive)?); + b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); + b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); + b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_storage_class(try_into_aws(input.storage_class)?); + b = b.set_tagging(try_into_aws(input.tagging)?); + b = b.set_tagging_directive(try_into_aws(input.tagging_directive)?); + b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn create_bucket( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.create_bucket(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_create_bucket_configuration(try_into_aws(input.create_bucket_configuration)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write(try_into_aws(input.grant_write)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_object_lock_enabled_for_bucket(try_into_aws(input.object_lock_enabled_for_bucket)?); + b = b.set_object_ownership(try_into_aws(input.object_ownership)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn create_bucket_metadata_table_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.create_bucket_metadata_table_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_metadata_table_configuration(Some(try_into_aws(input.metadata_table_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn create_multipart_upload( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.create_multipart_upload(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_cache_control(try_into_aws(input.cache_control)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_checksum_type(try_into_aws(input.checksum_type)?); + b = b.set_content_disposition(try_into_aws(input.content_disposition)?); + b = b.set_content_encoding(try_into_aws(input.content_encoding)?); + b = b.set_content_language(try_into_aws(input.content_language)?); + b = b.set_content_type(try_into_aws(input.content_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_expires(try_into_aws(input.expires)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_metadata(try_into_aws(input.metadata)?); + b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); + b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); + b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_storage_class(try_into_aws(input.storage_class)?); + b = b.set_tagging(try_into_aws(input.tagging)?); + b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn create_session( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.create_session(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_session_mode(try_into_aws(input.session_mode)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_analytics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_analytics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_cors( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_cors(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_encryption( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_encryption(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_intelligent_tiering_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_intelligent_tiering_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_inventory_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_inventory_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_lifecycle( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_lifecycle(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_metadata_table_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_metadata_table_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_metrics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_metrics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_ownership_controls( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_ownership_controls(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_policy( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_policy(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_replication( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_replication(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_bucket_website( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_bucket_website(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_object( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_object(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_match_last_modified_time(try_into_aws(input.if_match_last_modified_time)?); + b = b.set_if_match_size(try_into_aws(input.if_match_size)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_mfa(try_into_aws(input.mfa)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_object_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_object_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_objects( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_objects(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_delete(Some(try_into_aws(input.delete)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_mfa(try_into_aws(input.mfa)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn delete_public_access_block( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.delete_public_access_block(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_accelerate_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_accelerate_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_acl( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_acl(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_analytics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_analytics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_cors( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_cors(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_encryption( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_encryption(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_intelligent_tiering_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_intelligent_tiering_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_inventory_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_inventory_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_lifecycle_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_lifecycle_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_location( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_location(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_logging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_logging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_metadata_table_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_metadata_table_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_metrics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_metrics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_notification_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_notification_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_ownership_controls( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_ownership_controls(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_policy( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_policy(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_policy_status( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_policy_status(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_replication( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_replication(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_request_payment( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_request_payment(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_versioning( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_versioning(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_bucket_website( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_bucket_website(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); + b = b.set_if_none_match(try_into_aws(input.if_none_match)?); + b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_part_number(try_into_aws(input.part_number)?); + b = b.set_range(try_into_aws(input.range)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); + b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); + b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); + b = b.set_response_content_language(try_into_aws(input.response_content_language)?); + b = b.set_response_content_type(try_into_aws(input.response_content_type)?); + b = b.set_response_expires(try_into_aws(input.response_expires)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_acl( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_acl(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_attributes( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_attributes(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_max_parts(try_into_aws(input.max_parts)?); + b = b.set_object_attributes(Some(try_into_aws(input.object_attributes)?)); + b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_legal_hold( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_legal_hold(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_lock_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_lock_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_retention( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_retention(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_object_torrent( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_object_torrent(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn get_public_access_block( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.get_public_access_block(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn head_bucket(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.head_bucket(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn head_object(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.head_object(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_mode(try_into_aws(input.checksum_mode)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_modified_since(try_into_aws(input.if_modified_since)?); + b = b.set_if_none_match(try_into_aws(input.if_none_match)?); + b = b.set_if_unmodified_since(try_into_aws(input.if_unmodified_since)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_part_number(try_into_aws(input.part_number)?); + b = b.set_range(try_into_aws(input.range)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_response_cache_control(try_into_aws(input.response_cache_control)?); + b = b.set_response_content_disposition(try_into_aws(input.response_content_disposition)?); + b = b.set_response_content_encoding(try_into_aws(input.response_content_encoding)?); + b = b.set_response_content_language(try_into_aws(input.response_content_language)?); + b = b.set_response_content_type(try_into_aws(input.response_content_type)?); + b = b.set_response_expires(try_into_aws(input.response_expires)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_bucket_analytics_configurations( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_bucket_analytics_configurations(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_bucket_intelligent_tiering_configurations( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_bucket_intelligent_tiering_configurations(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_bucket_inventory_configurations( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_bucket_inventory_configurations(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_bucket_metrics_configurations( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_bucket_metrics_configurations(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_buckets( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_buckets(); + b = b.set_bucket_region(try_into_aws(input.bucket_region)?); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_max_buckets(try_into_aws(input.max_buckets)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_directory_buckets( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_directory_buckets(); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_max_directory_buckets(try_into_aws(input.max_directory_buckets)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_multipart_uploads( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_multipart_uploads(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_delimiter(try_into_aws(input.delimiter)?); + b = b.set_encoding_type(try_into_aws(input.encoding_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key_marker(try_into_aws(input.key_marker)?); + b = b.set_max_uploads(try_into_aws(input.max_uploads)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_upload_id_marker(try_into_aws(input.upload_id_marker)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_object_versions( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_object_versions(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_delimiter(try_into_aws(input.delimiter)?); + b = b.set_encoding_type(try_into_aws(input.encoding_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key_marker(try_into_aws(input.key_marker)?); + b = b.set_max_keys(try_into_aws(input.max_keys)?); + b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id_marker(try_into_aws(input.version_id_marker)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_objects( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_objects(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_delimiter(try_into_aws(input.delimiter)?); + b = b.set_encoding_type(try_into_aws(input.encoding_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_marker(try_into_aws(input.marker)?); + b = b.set_max_keys(try_into_aws(input.max_keys)?); + b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_objects_v2( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_objects_v2(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_continuation_token(try_into_aws(input.continuation_token)?); + b = b.set_delimiter(try_into_aws(input.delimiter)?); + b = b.set_encoding_type(try_into_aws(input.encoding_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_fetch_owner(try_into_aws(input.fetch_owner)?); + b = b.set_max_keys(try_into_aws(input.max_keys)?); + b = b.set_optional_object_attributes(try_into_aws(input.optional_object_attributes)?); + b = b.set_prefix(try_into_aws(input.prefix)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_start_after(try_into_aws(input.start_after)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn list_parts(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.list_parts(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_max_parts(try_into_aws(input.max_parts)?); + b = b.set_part_number_marker(input.part_number_marker.map(string_from_integer)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_accelerate_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_accelerate_configuration(); + b = b.set_accelerate_configuration(Some(try_into_aws(input.accelerate_configuration)?)); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_acl( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_acl(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write(try_into_aws(input.grant_write)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_analytics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_analytics_configuration(); + b = b.set_analytics_configuration(Some(try_into_aws(input.analytics_configuration)?)); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_cors( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_cors(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_cors_configuration(Some(try_into_aws(input.cors_configuration)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_encryption( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_encryption(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_server_side_encryption_configuration(Some(try_into_aws(input.server_side_encryption_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_intelligent_tiering_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_intelligent_tiering_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_id(Some(try_into_aws(input.id)?)); + b = b.set_intelligent_tiering_configuration(Some(try_into_aws(input.intelligent_tiering_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_inventory_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_inventory_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + b = b.set_inventory_configuration(Some(try_into_aws(input.inventory_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_lifecycle_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_lifecycle_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_lifecycle_configuration(try_into_aws(input.lifecycle_configuration)?); + b = b.set_transition_default_minimum_object_size(try_into_aws(input.transition_default_minimum_object_size)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_logging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_logging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_logging_status(Some(try_into_aws(input.bucket_logging_status)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_metrics_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_metrics_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_id(Some(try_into_aws(input.id)?)); + b = b.set_metrics_configuration(Some(try_into_aws(input.metrics_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_notification_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_notification_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_notification_configuration(Some(try_into_aws(input.notification_configuration)?)); + b = b.set_skip_destination_validation(try_into_aws(input.skip_destination_validation)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_ownership_controls( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_ownership_controls(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_ownership_controls(Some(try_into_aws(input.ownership_controls)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_policy( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_policy(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_confirm_remove_self_bucket_access(try_into_aws(input.confirm_remove_self_bucket_access)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_policy(Some(try_into_aws(input.policy)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_replication( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_replication(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_replication_configuration(Some(try_into_aws(input.replication_configuration)?)); + b = b.set_token(try_into_aws(input.token)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_request_payment( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_request_payment(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_request_payment_configuration(Some(try_into_aws(input.request_payment_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_tagging(Some(try_into_aws(input.tagging)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_versioning( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_versioning(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_mfa(try_into_aws(input.mfa)?); + b = b.set_versioning_configuration(Some(try_into_aws(input.versioning_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_bucket_website( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_bucket_website(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_website_configuration(Some(try_into_aws(input.website_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_body(try_into_aws(input.body)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_cache_control(try_into_aws(input.cache_control)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); + b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); + b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); + b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); + b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); + b = b.set_content_disposition(try_into_aws(input.content_disposition)?); + b = b.set_content_encoding(try_into_aws(input.content_encoding)?); + b = b.set_content_language(try_into_aws(input.content_language)?); + b = b.set_content_length(try_into_aws(input.content_length)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_content_type(try_into_aws(input.content_type)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_expires(try_into_aws(input.expires)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_if_match(try_into_aws(input.if_match)?); + b = b.set_if_none_match(try_into_aws(input.if_none_match)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_metadata(try_into_aws(input.metadata)?); + b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); + b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); + b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_ssekms_encryption_context(try_into_aws(input.ssekms_encryption_context)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_storage_class(try_into_aws(input.storage_class)?); + b = b.set_tagging(try_into_aws(input.tagging)?); + b = b.set_website_redirect_location(try_into_aws(input.website_redirect_location)?); + b = b.set_write_offset_bytes(try_into_aws(input.write_offset_bytes)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_acl( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_acl(); + b = b.set_acl(try_into_aws(input.acl)?); + b = b.set_access_control_policy(try_into_aws(input.access_control_policy)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_grant_full_control(try_into_aws(input.grant_full_control)?); + b = b.set_grant_read(try_into_aws(input.grant_read)?); + b = b.set_grant_read_acp(try_into_aws(input.grant_read_acp)?); + b = b.set_grant_write(try_into_aws(input.grant_write)?); + b = b.set_grant_write_acp(try_into_aws(input.grant_write_acp)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_legal_hold( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_legal_hold(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_legal_hold(try_into_aws(input.legal_hold)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_lock_configuration( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_lock_configuration(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_object_lock_configuration(try_into_aws(input.object_lock_configuration)?); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_token(try_into_aws(input.token)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_retention( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_retention(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_bypass_governance_retention(try_into_aws(input.bypass_governance_retention)?); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_retention(try_into_aws(input.retention)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_object_tagging( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_object_tagging(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_tagging(Some(try_into_aws(input.tagging)?)); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn put_public_access_block( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.put_public_access_block(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_public_access_block_configuration(Some(try_into_aws(input.public_access_block_configuration)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn restore_object( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.restore_object(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_restore_request(try_into_aws(input.restore_request)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn select_object_content( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.select_object_content(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_expression(Some(try_into_aws(input.request.expression)?)); + b = b.set_expression_type(Some(try_into_aws(input.request.expression_type)?)); + b = b.set_input_serialization(Some(try_into_aws(input.request.input_serialization)?)); + b = b.set_output_serialization(Some(try_into_aws(input.request.output_serialization)?)); + b = b.set_request_progress(try_into_aws(input.request.request_progress)?); + b = b.set_scan_range(try_into_aws(input.request.scan_range)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn upload_part(&self, req: S3Request) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.upload_part(); + b = b.set_body(try_into_aws(input.body)?); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_checksum_algorithm(try_into_aws(input.checksum_algorithm)?); + b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); + b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); + b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); + b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); + b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); + b = b.set_content_length(try_into_aws(input.content_length)?); + b = b.set_content_md5(try_into_aws(input.content_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_part_number(Some(try_into_aws(input.part_number)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn upload_part_copy( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.upload_part_copy(); + b = b.set_bucket(Some(try_into_aws(input.bucket)?)); + b = b.set_copy_source(Some(try_into_aws(input.copy_source)?)); + b = b.set_copy_source_if_match(try_into_aws(input.copy_source_if_match)?); + b = b.set_copy_source_if_modified_since(try_into_aws(input.copy_source_if_modified_since)?); + b = b.set_copy_source_if_none_match(try_into_aws(input.copy_source_if_none_match)?); + b = b.set_copy_source_if_unmodified_since(try_into_aws(input.copy_source_if_unmodified_since)?); + b = b.set_copy_source_range(try_into_aws(input.copy_source_range)?); + b = b.set_copy_source_sse_customer_algorithm(try_into_aws(input.copy_source_sse_customer_algorithm)?); + b = b.set_copy_source_sse_customer_key(try_into_aws(input.copy_source_sse_customer_key)?); + b = b.set_copy_source_sse_customer_key_md5(try_into_aws(input.copy_source_sse_customer_key_md5)?); + b = b.set_expected_bucket_owner(try_into_aws(input.expected_bucket_owner)?); + b = b.set_expected_source_bucket_owner(try_into_aws(input.expected_source_bucket_owner)?); + b = b.set_key(Some(try_into_aws(input.key)?)); + b = b.set_part_number(Some(try_into_aws(input.part_number)?)); + b = b.set_request_payer(try_into_aws(input.request_payer)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key(try_into_aws(input.sse_customer_key)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_upload_id(Some(try_into_aws(input.upload_id)?)); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } + + #[tracing::instrument(skip(self, req))] + async fn write_get_object_response( + &self, + req: S3Request, + ) -> S3Result> { + let input = req.input; + debug!(?input); + let mut b = self.0.write_get_object_response(); + b = b.set_accept_ranges(try_into_aws(input.accept_ranges)?); + b = b.set_body(try_into_aws(input.body)?); + b = b.set_bucket_key_enabled(try_into_aws(input.bucket_key_enabled)?); + b = b.set_cache_control(try_into_aws(input.cache_control)?); + b = b.set_checksum_crc32(try_into_aws(input.checksum_crc32)?); + b = b.set_checksum_crc32_c(try_into_aws(input.checksum_crc32c)?); + b = b.set_checksum_crc64_nvme(try_into_aws(input.checksum_crc64nvme)?); + b = b.set_checksum_sha1(try_into_aws(input.checksum_sha1)?); + b = b.set_checksum_sha256(try_into_aws(input.checksum_sha256)?); + b = b.set_content_disposition(try_into_aws(input.content_disposition)?); + b = b.set_content_encoding(try_into_aws(input.content_encoding)?); + b = b.set_content_language(try_into_aws(input.content_language)?); + b = b.set_content_length(try_into_aws(input.content_length)?); + b = b.set_content_range(try_into_aws(input.content_range)?); + b = b.set_content_type(try_into_aws(input.content_type)?); + b = b.set_delete_marker(try_into_aws(input.delete_marker)?); + b = b.set_e_tag(try_into_aws(input.e_tag)?); + b = b.set_error_code(try_into_aws(input.error_code)?); + b = b.set_error_message(try_into_aws(input.error_message)?); + b = b.set_expiration(try_into_aws(input.expiration)?); + b = b.set_expires(try_into_aws(input.expires)?); + b = b.set_last_modified(try_into_aws(input.last_modified)?); + b = b.set_metadata(try_into_aws(input.metadata)?); + b = b.set_missing_meta(try_into_aws(input.missing_meta)?); + b = b.set_object_lock_legal_hold_status(try_into_aws(input.object_lock_legal_hold_status)?); + b = b.set_object_lock_mode(try_into_aws(input.object_lock_mode)?); + b = b.set_object_lock_retain_until_date(try_into_aws(input.object_lock_retain_until_date)?); + b = b.set_parts_count(try_into_aws(input.parts_count)?); + b = b.set_replication_status(try_into_aws(input.replication_status)?); + b = b.set_request_charged(try_into_aws(input.request_charged)?); + b = b.set_request_route(Some(try_into_aws(input.request_route)?)); + b = b.set_request_token(Some(try_into_aws(input.request_token)?)); + b = b.set_restore(try_into_aws(input.restore)?); + b = b.set_sse_customer_algorithm(try_into_aws(input.sse_customer_algorithm)?); + b = b.set_sse_customer_key_md5(try_into_aws(input.sse_customer_key_md5)?); + b = b.set_ssekms_key_id(try_into_aws(input.ssekms_key_id)?); + b = b.set_server_side_encryption(try_into_aws(input.server_side_encryption)?); + b = b.set_status_code(try_into_aws(input.status_code)?); + b = b.set_storage_class(try_into_aws(input.storage_class)?); + b = b.set_tag_count(try_into_aws(input.tag_count)?); + b = b.set_version_id(try_into_aws(input.version_id)?); + let result = b.send().await; + match result { + Ok(output) => { + let headers = super::meta::build_headers(&output)?; + let output = try_from_aws(output)?; + debug!(?output); + Ok(S3Response::with_headers(output, headers)) + } + Err(e) => Err(wrap_sdk_error!(e)), + } + } } diff --git a/crates/s3s/src/access/generated.rs b/crates/s3s/src/access/generated.rs index 0e9f26d7..381b2908 100644 --- a/crates/s3s/src/access/generated.rs +++ b/crates/s3s/src/access/generated.rs @@ -10,716 +10,782 @@ use crate::protocol::S3Request; #[async_trait::async_trait] pub trait S3Access: Send + Sync + 'static { - -/// Checks whether the current request has accesses to the resources. -/// -/// This method is called before deserializing the operation input. -/// -/// By default, this method rejects all anonymous requests -/// and returns [`AccessDenied`](crate::S3ErrorCode::AccessDenied) error. -/// -/// An access control provider can override this method to implement custom logic. -/// -/// Common fields in the context: -/// + [`cx.credentials()`](S3AccessContext::credentials) -/// + [`cx.s3_path()`](S3AccessContext::s3_path) -/// + [`cx.s3_op().name()`](crate::S3Operation::name) -/// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut) -async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> { - super::default_check(cx) -} -/// Checks whether the AbortMultipartUpload request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn abort_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CompleteMultipartUpload request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn complete_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CopyObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn copy_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CreateBucket request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn create_bucket(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CreateBucketMetadataTableConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn create_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CreateMultipartUpload request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn create_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CreateSession request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn create_session(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucket request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketAnalyticsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketCors request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketEncryption request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketIntelligentTieringConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketInventoryConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) + /// Checks whether the current request has accesses to the resources. + /// + /// This method is called before deserializing the operation input. + /// + /// By default, this method rejects all anonymous requests + /// and returns [`AccessDenied`](crate::S3ErrorCode::AccessDenied) error. + /// + /// An access control provider can override this method to implement custom logic. + /// + /// Common fields in the context: + /// + [`cx.credentials()`](S3AccessContext::credentials) + /// + [`cx.s3_path()`](S3AccessContext::s3_path) + /// + [`cx.s3_op().name()`](crate::S3Operation::name) + /// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut) + async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> { + super::default_check(cx) + } + /// Checks whether the AbortMultipartUpload request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn abort_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CompleteMultipartUpload request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn complete_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CopyObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn copy_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CreateBucket request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn create_bucket(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CreateBucketMetadataTableConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn create_bucket_metadata_table_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CreateMultipartUpload request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn create_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CreateSession request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn create_session(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucket request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketAnalyticsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_analytics_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketCors request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketEncryption request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketIntelligentTieringConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_intelligent_tiering_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketInventoryConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_inventory_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketLifecycle request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_lifecycle(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketMetadataTableConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_metadata_table_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketMetricsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_metrics_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketOwnershipControls request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketPolicy request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketReplication request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketWebsite request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteObjectTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteObjects request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_objects(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeletePublicAccessBlock request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketAccelerateConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_accelerate_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketAcl request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketAnalyticsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_analytics_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketCors request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketEncryption request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketIntelligentTieringConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_intelligent_tiering_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketInventoryConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_inventory_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketLifecycleConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_lifecycle_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketLocation request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_location(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketLogging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketMetadataTableConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_metadata_table_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketMetricsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketNotificationConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_notification_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketOwnershipControls request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketPolicy request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketPolicyStatus request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_policy_status(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketReplication request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketRequestPayment request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketVersioning request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketWebsite request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectAcl request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectAttributes request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_attributes(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectLegalHold request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectLockConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectRetention request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectTorrent request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_torrent(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetPublicAccessBlock request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the HeadBucket request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn head_bucket(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the HeadObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn head_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBucketAnalyticsConfigurations request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_bucket_analytics_configurations( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBucketIntelligentTieringConfigurations request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_bucket_intelligent_tiering_configurations( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBucketInventoryConfigurations request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_bucket_inventory_configurations( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBucketMetricsConfigurations request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_bucket_metrics_configurations( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBuckets request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_buckets(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListDirectoryBuckets request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_directory_buckets(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListMultipartUploads request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_multipart_uploads(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListObjectVersions request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_object_versions(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListObjects request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_objects(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListObjectsV2 request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_objects_v2(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListParts request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_parts(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PostObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn post_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketAccelerateConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_accelerate_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketAcl request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketAnalyticsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_analytics_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketCors request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketEncryption request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketIntelligentTieringConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_intelligent_tiering_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketInventoryConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_inventory_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketLifecycleConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_lifecycle_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketLogging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketMetricsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketNotificationConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_notification_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketOwnershipControls request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketPolicy request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketReplication request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketRequestPayment request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketVersioning request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketWebsite request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectAcl request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectLegalHold request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectLockConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectRetention request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutPublicAccessBlock request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the RestoreObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn restore_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the SelectObjectContent request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn select_object_content(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the UploadPart request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn upload_part(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the UploadPartCopy request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn upload_part_copy(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the WriteGetObjectResponse request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn write_get_object_response(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } } - -/// Checks whether the DeleteBucketLifecycle request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_lifecycle(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketMetadataTableConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketMetricsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketOwnershipControls request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketPolicy request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketReplication request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketWebsite request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteObjectTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteObjects request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_objects(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeletePublicAccessBlock request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketAccelerateConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_accelerate_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketAcl request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketAnalyticsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketCors request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketEncryption request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketIntelligentTieringConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketInventoryConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketLifecycleConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_lifecycle_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketLocation request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_location(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketLogging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketMetadataTableConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketMetricsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketNotificationConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_notification_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketOwnershipControls request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketPolicy request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketPolicyStatus request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_policy_status(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketReplication request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketRequestPayment request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketVersioning request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketWebsite request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectAcl request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectAttributes request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_attributes(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectLegalHold request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectLockConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectRetention request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectTorrent request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_torrent(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetPublicAccessBlock request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the HeadBucket request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn head_bucket(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the HeadObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn head_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBucketAnalyticsConfigurations request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_bucket_analytics_configurations(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBucketIntelligentTieringConfigurations request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_bucket_intelligent_tiering_configurations(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBucketInventoryConfigurations request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_bucket_inventory_configurations(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBucketMetricsConfigurations request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_bucket_metrics_configurations(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBuckets request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_buckets(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListDirectoryBuckets request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_directory_buckets(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListMultipartUploads request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_multipart_uploads(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListObjectVersions request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_object_versions(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListObjects request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_objects(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListObjectsV2 request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_objects_v2(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListParts request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_parts(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PostObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn post_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketAccelerateConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_accelerate_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketAcl request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketAnalyticsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketCors request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketEncryption request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketIntelligentTieringConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketInventoryConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketLifecycleConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_lifecycle_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketLogging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketMetricsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketNotificationConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_notification_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketOwnershipControls request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketPolicy request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketReplication request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketRequestPayment request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketVersioning request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketWebsite request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectAcl request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectLegalHold request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectLockConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectRetention request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutPublicAccessBlock request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the RestoreObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn restore_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the SelectObjectContent request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn select_object_content(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the UploadPart request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn upload_part(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the UploadPartCopy request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn upload_part_copy(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the WriteGetObjectResponse request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn write_get_object_response(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -} - diff --git a/crates/s3s/src/access/generated_minio.rs b/crates/s3s/src/access/generated_minio.rs index 0e9f26d7..381b2908 100644 --- a/crates/s3s/src/access/generated_minio.rs +++ b/crates/s3s/src/access/generated_minio.rs @@ -10,716 +10,782 @@ use crate::protocol::S3Request; #[async_trait::async_trait] pub trait S3Access: Send + Sync + 'static { - -/// Checks whether the current request has accesses to the resources. -/// -/// This method is called before deserializing the operation input. -/// -/// By default, this method rejects all anonymous requests -/// and returns [`AccessDenied`](crate::S3ErrorCode::AccessDenied) error. -/// -/// An access control provider can override this method to implement custom logic. -/// -/// Common fields in the context: -/// + [`cx.credentials()`](S3AccessContext::credentials) -/// + [`cx.s3_path()`](S3AccessContext::s3_path) -/// + [`cx.s3_op().name()`](crate::S3Operation::name) -/// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut) -async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> { - super::default_check(cx) -} -/// Checks whether the AbortMultipartUpload request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn abort_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CompleteMultipartUpload request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn complete_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CopyObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn copy_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CreateBucket request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn create_bucket(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CreateBucketMetadataTableConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn create_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CreateMultipartUpload request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn create_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the CreateSession request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn create_session(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucket request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketAnalyticsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketCors request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketEncryption request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketIntelligentTieringConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketInventoryConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) + /// Checks whether the current request has accesses to the resources. + /// + /// This method is called before deserializing the operation input. + /// + /// By default, this method rejects all anonymous requests + /// and returns [`AccessDenied`](crate::S3ErrorCode::AccessDenied) error. + /// + /// An access control provider can override this method to implement custom logic. + /// + /// Common fields in the context: + /// + [`cx.credentials()`](S3AccessContext::credentials) + /// + [`cx.s3_path()`](S3AccessContext::s3_path) + /// + [`cx.s3_op().name()`](crate::S3Operation::name) + /// + [`cx.extensions_mut()`](S3AccessContext::extensions_mut) + async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> { + super::default_check(cx) + } + /// Checks whether the AbortMultipartUpload request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn abort_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CompleteMultipartUpload request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn complete_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CopyObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn copy_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CreateBucket request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn create_bucket(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CreateBucketMetadataTableConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn create_bucket_metadata_table_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CreateMultipartUpload request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn create_multipart_upload(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the CreateSession request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn create_session(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucket request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketAnalyticsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_analytics_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketCors request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketEncryption request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketIntelligentTieringConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_intelligent_tiering_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketInventoryConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_inventory_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketLifecycle request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_lifecycle(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketMetadataTableConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_metadata_table_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketMetricsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_metrics_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketOwnershipControls request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketPolicy request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketReplication request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteBucketWebsite request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteObjectTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeleteObjects request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_objects(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the DeletePublicAccessBlock request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn delete_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketAccelerateConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_accelerate_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketAcl request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketAnalyticsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_analytics_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketCors request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketEncryption request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketIntelligentTieringConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_intelligent_tiering_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketInventoryConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_inventory_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketLifecycleConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_lifecycle_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketLocation request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_location(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketLogging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketMetadataTableConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_metadata_table_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketMetricsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketNotificationConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_notification_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketOwnershipControls request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketPolicy request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketPolicyStatus request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_policy_status(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketReplication request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketRequestPayment request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketVersioning request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetBucketWebsite request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectAcl request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectAttributes request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_attributes(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectLegalHold request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectLockConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectRetention request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetObjectTorrent request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_object_torrent(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the GetPublicAccessBlock request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn get_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the HeadBucket request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn head_bucket(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the HeadObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn head_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBucketAnalyticsConfigurations request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_bucket_analytics_configurations( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBucketIntelligentTieringConfigurations request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_bucket_intelligent_tiering_configurations( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBucketInventoryConfigurations request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_bucket_inventory_configurations( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBucketMetricsConfigurations request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_bucket_metrics_configurations( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListBuckets request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_buckets(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListDirectoryBuckets request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_directory_buckets(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListMultipartUploads request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_multipart_uploads(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListObjectVersions request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_object_versions(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListObjects request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_objects(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListObjectsV2 request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_objects_v2(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the ListParts request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn list_parts(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PostObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn post_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketAccelerateConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_accelerate_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketAcl request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketAnalyticsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_analytics_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketCors request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketEncryption request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketIntelligentTieringConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_intelligent_tiering_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketInventoryConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_inventory_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketLifecycleConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_lifecycle_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketLogging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketMetricsConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketNotificationConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_notification_configuration( + &self, + _req: &mut S3Request, + ) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketOwnershipControls request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketPolicy request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketReplication request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketRequestPayment request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketVersioning request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutBucketWebsite request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectAcl request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectLegalHold request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectLockConfiguration request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectRetention request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutObjectTagging request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the PutPublicAccessBlock request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn put_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the RestoreObject request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn restore_object(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the SelectObjectContent request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn select_object_content(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the UploadPart request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn upload_part(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the UploadPartCopy request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn upload_part_copy(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } + + /// Checks whether the WriteGetObjectResponse request has accesses to the resources. + /// + /// This method returns `Ok(())` by default. + async fn write_get_object_response(&self, _req: &mut S3Request) -> S3Result<()> { + Ok(()) + } } - -/// Checks whether the DeleteBucketLifecycle request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_lifecycle(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketMetadataTableConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketMetricsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketOwnershipControls request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketPolicy request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketReplication request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteBucketWebsite request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteObjectTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeleteObjects request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_objects(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the DeletePublicAccessBlock request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn delete_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketAccelerateConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_accelerate_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketAcl request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketAnalyticsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketCors request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketEncryption request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketIntelligentTieringConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketInventoryConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketLifecycleConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_lifecycle_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketLocation request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_location(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketLogging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketMetadataTableConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_metadata_table_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketMetricsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketNotificationConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_notification_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketOwnershipControls request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketPolicy request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketPolicyStatus request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_policy_status(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketReplication request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketRequestPayment request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketVersioning request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetBucketWebsite request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectAcl request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectAttributes request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_attributes(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectLegalHold request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectLockConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectRetention request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetObjectTorrent request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_object_torrent(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the GetPublicAccessBlock request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn get_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the HeadBucket request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn head_bucket(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the HeadObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn head_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBucketAnalyticsConfigurations request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_bucket_analytics_configurations(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBucketIntelligentTieringConfigurations request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_bucket_intelligent_tiering_configurations(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBucketInventoryConfigurations request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_bucket_inventory_configurations(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBucketMetricsConfigurations request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_bucket_metrics_configurations(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListBuckets request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_buckets(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListDirectoryBuckets request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_directory_buckets(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListMultipartUploads request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_multipart_uploads(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListObjectVersions request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_object_versions(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListObjects request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_objects(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListObjectsV2 request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_objects_v2(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the ListParts request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn list_parts(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PostObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn post_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketAccelerateConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_accelerate_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketAcl request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_acl(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketAnalyticsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_analytics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketCors request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_cors(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketEncryption request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_encryption(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketIntelligentTieringConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_intelligent_tiering_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketInventoryConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_inventory_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketLifecycleConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_lifecycle_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketLogging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_logging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketMetricsConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_metrics_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketNotificationConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_notification_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketOwnershipControls request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_ownership_controls(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketPolicy request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_policy(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketReplication request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_replication(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketRequestPayment request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_request_payment(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketVersioning request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_versioning(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutBucketWebsite request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_bucket_website(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectAcl request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_acl(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectLegalHold request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_legal_hold(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectLockConfiguration request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_lock_configuration(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectRetention request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_retention(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutObjectTagging request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_object_tagging(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the PutPublicAccessBlock request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn put_public_access_block(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the RestoreObject request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn restore_object(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the SelectObjectContent request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn select_object_content(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the UploadPart request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn upload_part(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the UploadPartCopy request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn upload_part_copy(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -/// Checks whether the WriteGetObjectResponse request has accesses to the resources. -/// -/// This method returns `Ok(())` by default. -async fn write_get_object_response(&self, _req: &mut S3Request) -> S3Result<()> { -Ok(()) -} - -} - diff --git a/crates/s3s/src/dto/generated.rs b/crates/s3s/src/dto/generated.rs index 0e56364f..3f55ba58 100644 --- a/crates/s3s/src/dto/generated.rs +++ b/crates/s3s/src/dto/generated.rs @@ -13,8 +13,8 @@ use std::fmt; use std::str::FromStr; use futures::future::BoxFuture; +use serde::{Deserialize, Serialize}; use stdx::default::default; -use serde::{Serialize, Deserialize}; pub type AbortDate = Timestamp; @@ -24,84 +24,83 @@ pub type AbortDate = Timestamp; /// the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AbortIncompleteMultipartUpload { -///

    Specifies the number of days after which Amazon S3 aborts an incomplete multipart -/// upload.

    + ///

    Specifies the number of days after which Amazon S3 aborts an incomplete multipart + /// upload.

    pub days_after_initiation: Option, } impl fmt::Debug for AbortIncompleteMultipartUpload { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AbortIncompleteMultipartUpload"); -if let Some(ref val) = self.days_after_initiation { -d.field("days_after_initiation", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AbortIncompleteMultipartUpload"); + if let Some(ref val) = self.days_after_initiation { + d.field("days_after_initiation", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct AbortMultipartUploadInput { -///

    The bucket name to which the upload was taking place.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The bucket name to which the upload was taking place.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp. -/// If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. -/// If the initiated timestamp matches or if the multipart upload doesn’t exist, the operation returns a 204 Success (No Content) response. -///

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    + ///

    If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp. + /// If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. + /// If the initiated timestamp matches or if the multipart upload doesn’t exist, the operation returns a 204 Success (No Content) response. + ///

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    pub if_match_initiated_time: Option, -///

    Key of the object for which the multipart upload was initiated.

    + ///

    Key of the object for which the multipart upload was initiated.

    pub key: ObjectKey, pub request_payer: Option, -///

    Upload ID that identifies the multipart upload.

    + ///

    Upload ID that identifies the multipart upload.

    pub upload_id: MultipartUploadId, } impl fmt::Debug for AbortMultipartUploadInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AbortMultipartUploadInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match_initiated_time { -d.field("if_match_initiated_time", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AbortMultipartUploadInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match_initiated_time { + d.field("if_match_initiated_time", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } impl AbortMultipartUploadInput { -#[must_use] -pub fn builder() -> builders::AbortMultipartUploadInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::AbortMultipartUploadInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] @@ -110,16 +109,15 @@ pub struct AbortMultipartUploadOutput { } impl fmt::Debug for AbortMultipartUploadOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AbortMultipartUploadOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AbortMultipartUploadOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } - pub type AbortRuleId = String; ///

    Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see @@ -127,63 +125,60 @@ pub type AbortRuleId = String; /// Transfer Acceleration in the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AccelerateConfiguration { -///

    Specifies the transfer acceleration status of the bucket.

    + ///

    Specifies the transfer acceleration status of the bucket.

    pub status: Option, } impl fmt::Debug for AccelerateConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AccelerateConfiguration"); -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AccelerateConfiguration"); + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } - pub type AcceptRanges = String; ///

    Contains the elements that set the ACL permissions for an object per grantee.

    #[derive(Clone, Default, PartialEq)] pub struct AccessControlPolicy { -///

    A list of grants.

    + ///

    A list of grants.

    pub grants: Option, -///

    Container for the bucket owner's display name and ID.

    + ///

    Container for the bucket owner's display name and ID.

    pub owner: Option, } impl fmt::Debug for AccessControlPolicy { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AccessControlPolicy"); -if let Some(ref val) = self.grants { -d.field("grants", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AccessControlPolicy"); + if let Some(ref val) = self.grants { + d.field("grants", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + d.finish_non_exhaustive() + } } - ///

    A container for information about access control for replicas.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AccessControlTranslation { -///

    Specifies the replica ownership. For default and valid values, see PUT bucket -/// replication in the Amazon S3 API Reference.

    + ///

    Specifies the replica ownership. For default and valid values, see PUT bucket + /// replication in the Amazon S3 API Reference.

    pub owner: OwnerOverride, } impl fmt::Debug for AccessControlTranslation { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AccessControlTranslation"); -d.field("owner", &self.owner); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AccessControlTranslation"); + d.field("owner", &self.owner); + d.finish_non_exhaustive() + } } - pub type AccessKeyIdType = String; pub type AccessKeyIdValue = String; @@ -215,83 +210,80 @@ pub type AllowedOrigins = List; /// all of the predicates for the filter to apply.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AnalyticsAndOperator { -///

    The prefix to use when evaluating an AND predicate: The prefix that an object must have -/// to be included in the metrics results.

    + ///

    The prefix to use when evaluating an AND predicate: The prefix that an object must have + /// to be included in the metrics results.

    pub prefix: Option, -///

    The list of tags to use when evaluating an AND predicate.

    + ///

    The list of tags to use when evaluating an AND predicate.

    pub tags: Option, } impl fmt::Debug for AnalyticsAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AnalyticsAndOperator"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AnalyticsAndOperator"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } - ///

    Specifies the configuration and any analyses for the analytics filter of an Amazon S3 /// bucket.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsConfiguration { -///

    The filter used to describe a set of objects for analyses. A filter must have exactly -/// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, -/// all objects will be considered in any analysis.

    + ///

    The filter used to describe a set of objects for analyses. A filter must have exactly + /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, + /// all objects will be considered in any analysis.

    pub filter: Option, -///

    The ID that identifies the analytics configuration.

    + ///

    The ID that identifies the analytics configuration.

    pub id: AnalyticsId, -///

    Contains data related to access patterns to be collected and made available to analyze -/// the tradeoffs between different storage classes.

    + ///

    Contains data related to access patterns to be collected and made available to analyze + /// the tradeoffs between different storage classes.

    pub storage_class_analysis: StorageClassAnalysis, } impl fmt::Debug for AnalyticsConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AnalyticsConfiguration"); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -d.field("id", &self.id); -d.field("storage_class_analysis", &self.storage_class_analysis); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AnalyticsConfiguration"); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + d.field("id", &self.id); + d.field("storage_class_analysis", &self.storage_class_analysis); + d.finish_non_exhaustive() + } } impl Default for AnalyticsConfiguration { -fn default() -> Self { -Self { -filter: None, -id: default(), -storage_class_analysis: default(), -} -} + fn default() -> Self { + Self { + filter: None, + id: default(), + storage_class_analysis: default(), + } + } } - pub type AnalyticsConfigurationList = List; ///

    Where to publish the analytics results.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsExportDestination { -///

    A destination signifying output to an S3 bucket.

    + ///

    A destination signifying output to an S3 bucket.

    pub s3_bucket_destination: AnalyticsS3BucketDestination, } impl fmt::Debug for AnalyticsExportDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AnalyticsExportDestination"); -d.field("s3_bucket_destination", &self.s3_bucket_destination); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AnalyticsExportDestination"); + d.field("s3_bucket_destination", &self.s3_bucket_destination); + d.finish_non_exhaustive() + } } - ///

    The filter used to describe a set of objects for analyses. A filter must have exactly /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, /// all objects will be considered in any analysis.

    @@ -299,12 +291,12 @@ d.finish_non_exhaustive() #[non_exhaustive] #[serde(rename_all = "PascalCase")] pub enum AnalyticsFilter { -///

    A conjunction (logical AND) of predicates, which is used in evaluating an analytics -/// filter. The operator must have at least two predicates.

    + ///

    A conjunction (logical AND) of predicates, which is used in evaluating an analytics + /// filter. The operator must have at least two predicates.

    And(AnalyticsAndOperator), -///

    The prefix to use when evaluating an analytics filter.

    + ///

    The prefix to use when evaluating an analytics filter.

    Prefix(Prefix), -///

    The tag to use when evaluating an analytics filter.

    + ///

    The tag to use when evaluating an analytics filter.

    Tag(Tag), } @@ -313,111 +305,108 @@ pub type AnalyticsId = String; ///

    Contains information about where to publish the analytics results.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsS3BucketDestination { -///

    The Amazon Resource Name (ARN) of the bucket to which data is exported.

    + ///

    The Amazon Resource Name (ARN) of the bucket to which data is exported.

    pub bucket: BucketName, -///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the -/// owner is not validated before exporting data.

    -/// -///

    Although this value is optional, we strongly recommend that you set it to help -/// prevent problems if the destination bucket ownership changes.

    -///
    + ///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the + /// owner is not validated before exporting data.

    + /// + ///

    Although this value is optional, we strongly recommend that you set it to help + /// prevent problems if the destination bucket ownership changes.

    + ///
    pub bucket_account_id: Option, -///

    Specifies the file format used when exporting data to Amazon S3.

    + ///

    Specifies the file format used when exporting data to Amazon S3.

    pub format: AnalyticsS3ExportFileFormat, -///

    The prefix to use when exporting data. The prefix is prepended to all results.

    + ///

    The prefix to use when exporting data. The prefix is prepended to all results.

    pub prefix: Option, } impl fmt::Debug for AnalyticsS3BucketDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AnalyticsS3BucketDestination"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_account_id { -d.field("bucket_account_id", val); -} -d.field("format", &self.format); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AnalyticsS3BucketDestination"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_account_id { + d.field("bucket_account_id", val); + } + d.field("format", &self.format); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AnalyticsS3ExportFileFormat(Cow<'static, str>); impl AnalyticsS3ExportFileFormat { -pub const CSV: &'static str = "CSV"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const CSV: &'static str = "CSV"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for AnalyticsS3ExportFileFormat { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: AnalyticsS3ExportFileFormat) -> Self { -s.0 -} + fn from(s: AnalyticsS3ExportFileFormat) -> Self { + s.0 + } } impl FromStr for AnalyticsS3ExportFileFormat { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } #[derive(Debug, Clone, PartialEq, Eq)] pub struct ArchiveStatus(Cow<'static, str>); impl ArchiveStatus { -pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; + pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; -pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; + pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for ArchiveStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: ArchiveStatus) -> Self { -s.0 -} + fn from(s: ArchiveStatus) -> Self { + s.0 + } } impl FromStr for ArchiveStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type ArnType = String; @@ -426,226 +415,216 @@ pub type ArnType = String; /// temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

    #[derive(Clone, Default, PartialEq)] pub struct AssumeRoleOutput { -///

    The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you -/// can use to refer to the resulting temporary security credentials. For example, you can -/// reference these credentials as a principal in a resource-based policy by using the ARN or -/// assumed role ID. The ARN and ID include the RoleSessionName that you specified -/// when you called AssumeRole.

    + ///

    The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you + /// can use to refer to the resulting temporary security credentials. For example, you can + /// reference these credentials as a principal in a resource-based policy by using the ARN or + /// assumed role ID. The ARN and ID include the RoleSessionName that you specified + /// when you called AssumeRole.

    pub assumed_role_user: Option, -///

    The temporary security credentials, which include an access key ID, a secret access key, -/// and a security (or session) token.

    -/// -///

    The size of the security token that STS API operations return is not fixed. We -/// strongly recommend that you make no assumptions about the maximum size.

    -///
    + ///

    The temporary security credentials, which include an access key ID, a secret access key, + /// and a security (or session) token.

    + /// + ///

    The size of the security token that STS API operations return is not fixed. We + /// strongly recommend that you make no assumptions about the maximum size.

    + ///
    pub credentials: Option, -///

    A percentage value that indicates the packed size of the session policies and session -/// tags combined passed in the request. The request fails if the packed size is greater than 100 percent, -/// which means the policies and tags exceeded the allowed space.

    + ///

    A percentage value that indicates the packed size of the session policies and session + /// tags combined passed in the request. The request fails if the packed size is greater than 100 percent, + /// which means the policies and tags exceeded the allowed space.

    pub packed_policy_size: Option, -///

    The source identity specified by the principal that is calling the -/// AssumeRole operation.

    -///

    You can require users to specify a source identity when they assume a role. You do this -/// by using the sts:SourceIdentity condition key in a role trust policy. You can -/// use source identity information in CloudTrail logs to determine who took actions with a role. -/// You can use the aws:SourceIdentity condition key to further control access to -/// Amazon Web Services resources based on the value of source identity. For more information about using -/// source identity, see Monitor and control -/// actions taken with assumed roles in the -/// IAM User Guide.

    -///

    The regex used to validate this parameter is a string of characters consisting of upper- -/// and lower-case alphanumeric characters with no spaces. You can also include underscores or -/// any of the following characters: =,.@-

    + ///

    The source identity specified by the principal that is calling the + /// AssumeRole operation.

    + ///

    You can require users to specify a source identity when they assume a role. You do this + /// by using the sts:SourceIdentity condition key in a role trust policy. You can + /// use source identity information in CloudTrail logs to determine who took actions with a role. + /// You can use the aws:SourceIdentity condition key to further control access to + /// Amazon Web Services resources based on the value of source identity. For more information about using + /// source identity, see Monitor and control + /// actions taken with assumed roles in the + /// IAM User Guide.

    + ///

    The regex used to validate this parameter is a string of characters consisting of upper- + /// and lower-case alphanumeric characters with no spaces. You can also include underscores or + /// any of the following characters: =,.@-

    pub source_identity: Option, } impl fmt::Debug for AssumeRoleOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AssumeRoleOutput"); -if let Some(ref val) = self.assumed_role_user { -d.field("assumed_role_user", val); -} -if let Some(ref val) = self.credentials { -d.field("credentials", val); -} -if let Some(ref val) = self.packed_policy_size { -d.field("packed_policy_size", val); -} -if let Some(ref val) = self.source_identity { -d.field("source_identity", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AssumeRoleOutput"); + if let Some(ref val) = self.assumed_role_user { + d.field("assumed_role_user", val); + } + if let Some(ref val) = self.credentials { + d.field("credentials", val); + } + if let Some(ref val) = self.packed_policy_size { + d.field("packed_policy_size", val); + } + if let Some(ref val) = self.source_identity { + d.field("source_identity", val); + } + d.finish_non_exhaustive() + } } - pub type AssumedRoleIdType = String; ///

    The identifiers for the temporary security credentials that the operation /// returns.

    #[derive(Clone, Default, PartialEq)] pub struct AssumedRoleUser { -///

    The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in -/// policies, see IAM Identifiers in the -/// IAM User Guide.

    + ///

    The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in + /// policies, see IAM Identifiers in the + /// IAM User Guide.

    pub arn: ArnType, -///

    A unique identifier that contains the role ID and the role session name of the role that -/// is being assumed. The role ID is generated by Amazon Web Services when the role is created.

    + ///

    A unique identifier that contains the role ID and the role session name of the role that + /// is being assumed. The role ID is generated by Amazon Web Services when the role is created.

    pub assumed_role_id: AssumedRoleIdType, } impl fmt::Debug for AssumedRoleUser { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AssumedRoleUser"); -d.field("arn", &self.arn); -d.field("assumed_role_id", &self.assumed_role_id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AssumedRoleUser"); + d.field("arn", &self.arn); + d.field("assumed_role_id", &self.assumed_role_id); + d.finish_non_exhaustive() + } } - - ///

    In terms of implementation, a Bucket is a resource.

    #[derive(Clone, Default, PartialEq)] pub struct Bucket { -///

    -/// BucketRegion indicates the Amazon Web Services region where the bucket is located. If the -/// request contains at least one valid parameter, it is included in the response.

    + ///

    + /// BucketRegion indicates the Amazon Web Services region where the bucket is located. If the + /// request contains at least one valid parameter, it is included in the response.

    pub bucket_region: Option, -///

    Date the bucket was created. This date can change when making changes to your bucket, -/// such as editing its bucket policy.

    + ///

    Date the bucket was created. This date can change when making changes to your bucket, + /// such as editing its bucket policy.

    pub creation_date: Option, -///

    The name of the bucket.

    + ///

    The name of the bucket.

    pub name: Option, } impl fmt::Debug for Bucket { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Bucket"); -if let Some(ref val) = self.bucket_region { -d.field("bucket_region", val); -} -if let Some(ref val) = self.creation_date { -d.field("creation_date", val); -} -if let Some(ref val) = self.name { -d.field("name", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Bucket"); + if let Some(ref val) = self.bucket_region { + d.field("bucket_region", val); + } + if let Some(ref val) = self.creation_date { + d.field("creation_date", val); + } + if let Some(ref val) = self.name { + d.field("name", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketAccelerateStatus(Cow<'static, str>); impl BucketAccelerateStatus { -pub const ENABLED: &'static str = "Enabled"; - -pub const SUSPENDED: &'static str = "Suspended"; + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const SUSPENDED: &'static str = "Suspended"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketAccelerateStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketAccelerateStatus) -> Self { -s.0 -} + fn from(s: BucketAccelerateStatus) -> Self { + s.0 + } } impl FromStr for BucketAccelerateStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    The requested bucket name is not available. The bucket namespace is shared by all users /// of the system. Select a different name and try again.

    #[derive(Clone, Default, PartialEq)] -pub struct BucketAlreadyExists { -} +pub struct BucketAlreadyExists {} impl fmt::Debug for BucketAlreadyExists { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketAlreadyExists"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketAlreadyExists"); + d.finish_non_exhaustive() + } } - ///

    The bucket you tried to create already exists, and you own it. Amazon S3 returns this error /// in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you /// re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 /// returns 200 OK and resets the bucket access control lists (ACLs).

    #[derive(Clone, Default, PartialEq)] -pub struct BucketAlreadyOwnedByYou { -} +pub struct BucketAlreadyOwnedByYou {} impl fmt::Debug for BucketAlreadyOwnedByYou { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketAlreadyOwnedByYou"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketAlreadyOwnedByYou"); + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq)] pub struct BucketCannedACL(Cow<'static, str>); impl BucketCannedACL { -pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; + pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; -pub const PRIVATE: &'static str = "private"; + pub const PRIVATE: &'static str = "private"; -pub const PUBLIC_READ: &'static str = "public-read"; + pub const PUBLIC_READ: &'static str = "public-read"; -pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketCannedACL { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketCannedACL) -> Self { -s.0 -} + fn from(s: BucketCannedACL) -> Self { + s.0 + } } impl FromStr for BucketCannedACL { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    Specifies the information about the bucket that will be created. For more information @@ -655,26 +634,25 @@ Ok(Self::from(s.to_owned())) /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct BucketInfo { -///

    The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

    + ///

    The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

    pub data_redundancy: Option, -///

    The type of bucket.

    + ///

    The type of bucket.

    pub type_: Option, } impl fmt::Debug for BucketInfo { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketInfo"); -if let Some(ref val) = self.data_redundancy { -d.field("data_redundancy", val); -} -if let Some(ref val) = self.type_ { -d.field("type_", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketInfo"); + if let Some(ref val) = self.data_redundancy { + d.field("data_redundancy", val); + } + if let Some(ref val) = self.type_ { + d.field("type_", val); + } + d.finish_non_exhaustive() + } } - pub type BucketKeyEnabled = bool; ///

    Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more @@ -682,118 +660,116 @@ pub type BucketKeyEnabled = bool; /// in the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct BucketLifecycleConfiguration { -///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    + ///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    pub rules: LifecycleRules, } impl fmt::Debug for BucketLifecycleConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketLifecycleConfiguration"); -d.field("rules", &self.rules); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketLifecycleConfiguration"); + d.field("rules", &self.rules); + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketLocationConstraint(Cow<'static, str>); impl BucketLocationConstraint { -pub const EU: &'static str = "EU"; + pub const EU: &'static str = "EU"; -pub const AF_SOUTH_1: &'static str = "af-south-1"; + pub const AF_SOUTH_1: &'static str = "af-south-1"; -pub const AP_EAST_1: &'static str = "ap-east-1"; + pub const AP_EAST_1: &'static str = "ap-east-1"; -pub const AP_NORTHEAST_1: &'static str = "ap-northeast-1"; + pub const AP_NORTHEAST_1: &'static str = "ap-northeast-1"; -pub const AP_NORTHEAST_2: &'static str = "ap-northeast-2"; + pub const AP_NORTHEAST_2: &'static str = "ap-northeast-2"; -pub const AP_NORTHEAST_3: &'static str = "ap-northeast-3"; + pub const AP_NORTHEAST_3: &'static str = "ap-northeast-3"; -pub const AP_SOUTH_1: &'static str = "ap-south-1"; + pub const AP_SOUTH_1: &'static str = "ap-south-1"; -pub const AP_SOUTH_2: &'static str = "ap-south-2"; + pub const AP_SOUTH_2: &'static str = "ap-south-2"; -pub const AP_SOUTHEAST_1: &'static str = "ap-southeast-1"; + pub const AP_SOUTHEAST_1: &'static str = "ap-southeast-1"; -pub const AP_SOUTHEAST_2: &'static str = "ap-southeast-2"; + pub const AP_SOUTHEAST_2: &'static str = "ap-southeast-2"; -pub const AP_SOUTHEAST_3: &'static str = "ap-southeast-3"; + pub const AP_SOUTHEAST_3: &'static str = "ap-southeast-3"; -pub const AP_SOUTHEAST_4: &'static str = "ap-southeast-4"; + pub const AP_SOUTHEAST_4: &'static str = "ap-southeast-4"; -pub const AP_SOUTHEAST_5: &'static str = "ap-southeast-5"; + pub const AP_SOUTHEAST_5: &'static str = "ap-southeast-5"; -pub const CA_CENTRAL_1: &'static str = "ca-central-1"; + pub const CA_CENTRAL_1: &'static str = "ca-central-1"; -pub const CN_NORTH_1: &'static str = "cn-north-1"; + pub const CN_NORTH_1: &'static str = "cn-north-1"; -pub const CN_NORTHWEST_1: &'static str = "cn-northwest-1"; + pub const CN_NORTHWEST_1: &'static str = "cn-northwest-1"; -pub const EU_CENTRAL_1: &'static str = "eu-central-1"; + pub const EU_CENTRAL_1: &'static str = "eu-central-1"; -pub const EU_CENTRAL_2: &'static str = "eu-central-2"; + pub const EU_CENTRAL_2: &'static str = "eu-central-2"; -pub const EU_NORTH_1: &'static str = "eu-north-1"; + pub const EU_NORTH_1: &'static str = "eu-north-1"; -pub const EU_SOUTH_1: &'static str = "eu-south-1"; + pub const EU_SOUTH_1: &'static str = "eu-south-1"; -pub const EU_SOUTH_2: &'static str = "eu-south-2"; + pub const EU_SOUTH_2: &'static str = "eu-south-2"; -pub const EU_WEST_1: &'static str = "eu-west-1"; + pub const EU_WEST_1: &'static str = "eu-west-1"; -pub const EU_WEST_2: &'static str = "eu-west-2"; + pub const EU_WEST_2: &'static str = "eu-west-2"; -pub const EU_WEST_3: &'static str = "eu-west-3"; + pub const EU_WEST_3: &'static str = "eu-west-3"; -pub const IL_CENTRAL_1: &'static str = "il-central-1"; + pub const IL_CENTRAL_1: &'static str = "il-central-1"; -pub const ME_CENTRAL_1: &'static str = "me-central-1"; + pub const ME_CENTRAL_1: &'static str = "me-central-1"; -pub const ME_SOUTH_1: &'static str = "me-south-1"; + pub const ME_SOUTH_1: &'static str = "me-south-1"; -pub const SA_EAST_1: &'static str = "sa-east-1"; + pub const SA_EAST_1: &'static str = "sa-east-1"; -pub const US_EAST_2: &'static str = "us-east-2"; + pub const US_EAST_2: &'static str = "us-east-2"; -pub const US_GOV_EAST_1: &'static str = "us-gov-east-1"; + pub const US_GOV_EAST_1: &'static str = "us-gov-east-1"; -pub const US_GOV_WEST_1: &'static str = "us-gov-west-1"; + pub const US_GOV_WEST_1: &'static str = "us-gov-west-1"; -pub const US_WEST_1: &'static str = "us-west-1"; + pub const US_WEST_1: &'static str = "us-west-1"; -pub const US_WEST_2: &'static str = "us-west-2"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const US_WEST_2: &'static str = "us-west-2"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketLocationConstraint { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketLocationConstraint) -> Self { -s.0 -} + fn from(s: BucketLocationConstraint) -> Self { + s.0 + } } impl FromStr for BucketLocationConstraint { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type BucketLocationName = String; @@ -805,55 +781,53 @@ pub struct BucketLoggingStatus { } impl fmt::Debug for BucketLoggingStatus { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketLoggingStatus"); -if let Some(ref val) = self.logging_enabled { -d.field("logging_enabled", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketLoggingStatus"); + if let Some(ref val) = self.logging_enabled { + d.field("logging_enabled", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq)] pub struct BucketLogsPermission(Cow<'static, str>); impl BucketLogsPermission { -pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; - -pub const READ: &'static str = "READ"; + pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; -pub const WRITE: &'static str = "WRITE"; + pub const READ: &'static str = "READ"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const WRITE: &'static str = "WRITE"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketLogsPermission { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketLogsPermission) -> Self { -s.0 -} + fn from(s: BucketLogsPermission) -> Self { + s.0 + } } impl FromStr for BucketLogsPermission { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type BucketName = String; @@ -864,76 +838,74 @@ pub type BucketRegion = String; pub struct BucketType(Cow<'static, str>); impl BucketType { -pub const DIRECTORY: &'static str = "Directory"; + pub const DIRECTORY: &'static str = "Directory"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketType) -> Self { -s.0 -} + fn from(s: BucketType) -> Self { + s.0 + } } impl FromStr for BucketType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketVersioningStatus(Cow<'static, str>); impl BucketVersioningStatus { -pub const ENABLED: &'static str = "Enabled"; - -pub const SUSPENDED: &'static str = "Suspended"; + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const SUSPENDED: &'static str = "Suspended"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketVersioningStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketVersioningStatus) -> Self { -s.0 -} + fn from(s: BucketVersioningStatus) -> Self { + s.0 + } } impl FromStr for BucketVersioningStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type Buckets = List; @@ -952,307 +924,301 @@ pub type BytesScanned = i64; /// Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CORSConfiguration { -///

    A set of origins and methods (cross-origin access that you want to allow). You can add -/// up to 100 rules to the configuration.

    + ///

    A set of origins and methods (cross-origin access that you want to allow). You can add + /// up to 100 rules to the configuration.

    pub cors_rules: CORSRules, } impl fmt::Debug for CORSConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CORSConfiguration"); -d.field("cors_rules", &self.cors_rules); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CORSConfiguration"); + d.field("cors_rules", &self.cors_rules); + d.finish_non_exhaustive() + } } - ///

    Specifies a cross-origin access rule for an Amazon S3 bucket.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CORSRule { -///

    Headers that are specified in the Access-Control-Request-Headers header. -/// These headers are allowed in a preflight OPTIONS request. In response to any preflight -/// OPTIONS request, Amazon S3 returns any requested headers that are allowed.

    + ///

    Headers that are specified in the Access-Control-Request-Headers header. + /// These headers are allowed in a preflight OPTIONS request. In response to any preflight + /// OPTIONS request, Amazon S3 returns any requested headers that are allowed.

    pub allowed_headers: Option, -///

    An HTTP method that you allow the origin to execute. Valid values are GET, -/// PUT, HEAD, POST, and DELETE.

    + ///

    An HTTP method that you allow the origin to execute. Valid values are GET, + /// PUT, HEAD, POST, and DELETE.

    pub allowed_methods: AllowedMethods, -///

    One or more origins you want customers to be able to access the bucket from.

    + ///

    One or more origins you want customers to be able to access the bucket from.

    pub allowed_origins: AllowedOrigins, -///

    One or more headers in the response that you want customers to be able to access from -/// their applications (for example, from a JavaScript XMLHttpRequest -/// object).

    + ///

    One or more headers in the response that you want customers to be able to access from + /// their applications (for example, from a JavaScript XMLHttpRequest + /// object).

    pub expose_headers: Option, -///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    + ///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    pub id: Option, -///

    The time in seconds that your browser is to cache the preflight response for the -/// specified resource.

    + ///

    The time in seconds that your browser is to cache the preflight response for the + /// specified resource.

    pub max_age_seconds: Option, } impl fmt::Debug for CORSRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CORSRule"); -if let Some(ref val) = self.allowed_headers { -d.field("allowed_headers", val); -} -d.field("allowed_methods", &self.allowed_methods); -d.field("allowed_origins", &self.allowed_origins); -if let Some(ref val) = self.expose_headers { -d.field("expose_headers", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -if let Some(ref val) = self.max_age_seconds { -d.field("max_age_seconds", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CORSRule"); + if let Some(ref val) = self.allowed_headers { + d.field("allowed_headers", val); + } + d.field("allowed_methods", &self.allowed_methods); + d.field("allowed_origins", &self.allowed_origins); + if let Some(ref val) = self.expose_headers { + d.field("expose_headers", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + if let Some(ref val) = self.max_age_seconds { + d.field("max_age_seconds", val); + } + d.finish_non_exhaustive() + } } - pub type CORSRules = List; ///

    Describes how an uncompressed comma-separated values (CSV)-formatted input object is /// formatted.

    #[derive(Clone, Default, PartialEq)] pub struct CSVInput { -///

    Specifies that CSV field values may contain quoted record delimiters and such records -/// should be allowed. Default value is FALSE. Setting this value to TRUE may lower -/// performance.

    + ///

    Specifies that CSV field values may contain quoted record delimiters and such records + /// should be allowed. Default value is FALSE. Setting this value to TRUE may lower + /// performance.

    pub allow_quoted_record_delimiter: Option, -///

    A single character used to indicate that a row should be ignored when the character is -/// present at the start of that row. You can specify any character to indicate a comment line. -/// The default character is #.

    -///

    Default: # -///

    + ///

    A single character used to indicate that a row should be ignored when the character is + /// present at the start of that row. You can specify any character to indicate a comment line. + /// The default character is #.

    + ///

    Default: # + ///

    pub comments: Option, -///

    A single character used to separate individual fields in a record. You can specify an -/// arbitrary delimiter.

    + ///

    A single character used to separate individual fields in a record. You can specify an + /// arbitrary delimiter.

    pub field_delimiter: Option, -///

    Describes the first line of input. Valid values are:

    -///
      -///
    • -///

      -/// NONE: First line is not a header.

      -///
    • -///
    • -///

      -/// IGNORE: First line is a header, but you can't use the header values -/// to indicate the column in an expression. You can use column position (such as _1, _2, -/// …) to indicate the column (SELECT s._1 FROM OBJECT s).

      -///
    • -///
    • -///

      -/// Use: First line is a header, and you can use the header value to -/// identify a column in an expression (SELECT "name" FROM OBJECT).

      -///
    • -///
    + ///

    Describes the first line of input. Valid values are:

    + ///
      + ///
    • + ///

      + /// NONE: First line is not a header.

      + ///
    • + ///
    • + ///

      + /// IGNORE: First line is a header, but you can't use the header values + /// to indicate the column in an expression. You can use column position (such as _1, _2, + /// …) to indicate the column (SELECT s._1 FROM OBJECT s).

      + ///
    • + ///
    • + ///

      + /// Use: First line is a header, and you can use the header value to + /// identify a column in an expression (SELECT "name" FROM OBJECT).

      + ///
    • + ///
    pub file_header_info: Option, -///

    A single character used for escaping when the field delimiter is part of the value. For -/// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, -/// as follows: " a , b ".

    -///

    Type: String

    -///

    Default: " -///

    -///

    Ancestors: CSV -///

    + ///

    A single character used for escaping when the field delimiter is part of the value. For + /// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, + /// as follows: " a , b ".

    + ///

    Type: String

    + ///

    Default: " + ///

    + ///

    Ancestors: CSV + ///

    pub quote_character: Option, -///

    A single character used for escaping the quotation mark character inside an already -/// escaped value. For example, the value """ a , b """ is parsed as " a , b -/// ".

    + ///

    A single character used for escaping the quotation mark character inside an already + /// escaped value. For example, the value """ a , b """ is parsed as " a , b + /// ".

    pub quote_escape_character: Option, -///

    A single character used to separate individual records in the input. Instead of the -/// default value, you can specify an arbitrary delimiter.

    + ///

    A single character used to separate individual records in the input. Instead of the + /// default value, you can specify an arbitrary delimiter.

    pub record_delimiter: Option, } impl fmt::Debug for CSVInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CSVInput"); -if let Some(ref val) = self.allow_quoted_record_delimiter { -d.field("allow_quoted_record_delimiter", val); -} -if let Some(ref val) = self.comments { -d.field("comments", val); -} -if let Some(ref val) = self.field_delimiter { -d.field("field_delimiter", val); -} -if let Some(ref val) = self.file_header_info { -d.field("file_header_info", val); -} -if let Some(ref val) = self.quote_character { -d.field("quote_character", val); -} -if let Some(ref val) = self.quote_escape_character { -d.field("quote_escape_character", val); -} -if let Some(ref val) = self.record_delimiter { -d.field("record_delimiter", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CSVInput"); + if let Some(ref val) = self.allow_quoted_record_delimiter { + d.field("allow_quoted_record_delimiter", val); + } + if let Some(ref val) = self.comments { + d.field("comments", val); + } + if let Some(ref val) = self.field_delimiter { + d.field("field_delimiter", val); + } + if let Some(ref val) = self.file_header_info { + d.field("file_header_info", val); + } + if let Some(ref val) = self.quote_character { + d.field("quote_character", val); + } + if let Some(ref val) = self.quote_escape_character { + d.field("quote_escape_character", val); + } + if let Some(ref val) = self.record_delimiter { + d.field("record_delimiter", val); + } + d.finish_non_exhaustive() + } } - ///

    Describes how uncompressed comma-separated values (CSV)-formatted results are /// formatted.

    #[derive(Clone, Default, PartialEq)] pub struct CSVOutput { -///

    The value used to separate individual fields in a record. You can specify an arbitrary -/// delimiter.

    + ///

    The value used to separate individual fields in a record. You can specify an arbitrary + /// delimiter.

    pub field_delimiter: Option, -///

    A single character used for escaping when the field delimiter is part of the value. For -/// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, -/// as follows: " a , b ".

    + ///

    A single character used for escaping when the field delimiter is part of the value. For + /// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, + /// as follows: " a , b ".

    pub quote_character: Option, -///

    The single character used for escaping the quote character inside an already escaped -/// value.

    + ///

    The single character used for escaping the quote character inside an already escaped + /// value.

    pub quote_escape_character: Option, -///

    Indicates whether to use quotation marks around output fields.

    -///
      -///
    • -///

      -/// ALWAYS: Always use quotation marks for output fields.

      -///
    • -///
    • -///

      -/// ASNEEDED: Use quotation marks for output fields when needed.

      -///
    • -///
    + ///

    Indicates whether to use quotation marks around output fields.

    + ///
      + ///
    • + ///

      + /// ALWAYS: Always use quotation marks for output fields.

      + ///
    • + ///
    • + ///

      + /// ASNEEDED: Use quotation marks for output fields when needed.

      + ///
    • + ///
    pub quote_fields: Option, -///

    A single character used to separate individual records in the output. Instead of the -/// default value, you can specify an arbitrary delimiter.

    + ///

    A single character used to separate individual records in the output. Instead of the + /// default value, you can specify an arbitrary delimiter.

    pub record_delimiter: Option, } impl fmt::Debug for CSVOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CSVOutput"); -if let Some(ref val) = self.field_delimiter { -d.field("field_delimiter", val); -} -if let Some(ref val) = self.quote_character { -d.field("quote_character", val); -} -if let Some(ref val) = self.quote_escape_character { -d.field("quote_escape_character", val); -} -if let Some(ref val) = self.quote_fields { -d.field("quote_fields", val); -} -if let Some(ref val) = self.record_delimiter { -d.field("record_delimiter", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CSVOutput"); + if let Some(ref val) = self.field_delimiter { + d.field("field_delimiter", val); + } + if let Some(ref val) = self.quote_character { + d.field("quote_character", val); + } + if let Some(ref val) = self.quote_escape_character { + d.field("quote_escape_character", val); + } + if let Some(ref val) = self.quote_fields { + d.field("quote_fields", val); + } + if let Some(ref val) = self.record_delimiter { + d.field("record_delimiter", val); + } + d.finish_non_exhaustive() + } } - pub type CacheControl = String; ///

    Contains all the possible checksum or digest values for an object.

    #[derive(Clone, Default, PartialEq)] pub struct Checksum { -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present -/// if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a -/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present + /// if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a + /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, } impl fmt::Debug for Checksum { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Checksum"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Checksum"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq)] pub struct ChecksumAlgorithm(Cow<'static, str>); impl ChecksumAlgorithm { -pub const CRC32: &'static str = "CRC32"; - -pub const CRC32C: &'static str = "CRC32C"; + pub const CRC32: &'static str = "CRC32"; -pub const CRC64NVME: &'static str = "CRC64NVME"; + pub const CRC32C: &'static str = "CRC32C"; -pub const SHA1: &'static str = "SHA1"; + pub const CRC64NVME: &'static str = "CRC64NVME"; -pub const SHA256: &'static str = "SHA256"; + pub const SHA1: &'static str = "SHA1"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const SHA256: &'static str = "SHA256"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for ChecksumAlgorithm { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: ChecksumAlgorithm) -> Self { -s.0 -} + fn from(s: ChecksumAlgorithm) -> Self { + s.0 + } } impl FromStr for ChecksumAlgorithm { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type ChecksumAlgorithmList = List; @@ -1267,37 +1233,36 @@ pub type ChecksumCRC64NVME = String; pub struct ChecksumMode(Cow<'static, str>); impl ChecksumMode { -pub const ENABLED: &'static str = "ENABLED"; + pub const ENABLED: &'static str = "ENABLED"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for ChecksumMode { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: ChecksumMode) -> Self { -s.0 -} + fn from(s: ChecksumMode) -> Self { + s.0 + } } impl FromStr for ChecksumMode { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type ChecksumSHA1 = String; @@ -1308,39 +1273,38 @@ pub type ChecksumSHA256 = String; pub struct ChecksumType(Cow<'static, str>); impl ChecksumType { -pub const COMPOSITE: &'static str = "COMPOSITE"; - -pub const FULL_OBJECT: &'static str = "FULL_OBJECT"; + pub const COMPOSITE: &'static str = "COMPOSITE"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const FULL_OBJECT: &'static str = "FULL_OBJECT"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for ChecksumType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: ChecksumType) -> Self { -s.0 -} + fn from(s: ChecksumType) -> Self { + s.0 + } } impl FromStr for ChecksumType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type Code = String; @@ -1353,470 +1317,465 @@ pub type Comments = String; /// is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

    #[derive(Clone, Default, PartialEq)] pub struct CommonPrefix { -///

    Container for the specified common prefix.

    + ///

    Container for the specified common prefix.

    pub prefix: Option, } impl fmt::Debug for CommonPrefix { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CommonPrefix"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CommonPrefix"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } - pub type CommonPrefixList = List; #[derive(Clone, Default, PartialEq)] pub struct CompleteMultipartUploadInput { -///

    Name of the bucket to which the multipart upload was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    Name of the bucket to which the multipart upload was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the object. The CRC64NVME checksum is -/// always a full object checksum. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the object. The CRC64NVME checksum is + /// always a full object checksum. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    This header specifies the checksum type of the object, which determines how part-level -/// checksums are combined to create an object-level checksum for multipart objects. You can -/// use this header as a data integrity check to verify that the checksum type that is received -/// is the same checksum that was specified. If the checksum type doesn’t match the checksum -/// type that was specified for the object during the CreateMultipartUpload -/// request, it’ll result in a BadDigest error. For more information, see Checking -/// object integrity in the Amazon S3 User Guide.

    + ///

    This header specifies the checksum type of the object, which determines how part-level + /// checksums are combined to create an object-level checksum for multipart objects. You can + /// use this header as a data integrity check to verify that the checksum type that is received + /// is the same checksum that was specified. If the checksum type doesn’t match the checksum + /// type that was specified for the object during the CreateMultipartUpload + /// request, it’ll result in a BadDigest error. For more information, see Checking + /// object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE -/// operation matches the ETag of the object in S3. If the ETag values do not match, the -/// operation returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 -/// ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the -/// multipart upload with CreateMultipartUpload, and re-upload each part.

    -///

    Expects the ETag value as a string.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE + /// operation matches the ETag of the object in S3. If the ETag values do not match, the + /// operation returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 + /// ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the + /// multipart upload with CreateMultipartUpload, and re-upload each part.

    + ///

    Expects the ETag value as a string.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    pub if_match: Option, -///

    Uploads the object only if the object key name does not already exist in the bucket -/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 -/// ConditionalRequestConflict response. On a 409 failure you should re-initiate the -/// multipart upload with CreateMultipartUpload and re-upload each part.

    -///

    Expects the '*' (asterisk) character.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + ///

    Uploads the object only if the object key name does not already exist in the bucket + /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 + /// ConditionalRequestConflict response. On a 409 failure you should re-initiate the + /// multipart upload with CreateMultipartUpload and re-upload each part.

    + ///

    Expects the '*' (asterisk) character.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    pub if_none_match: Option, -///

    Object key for which the multipart upload was initiated.

    + ///

    Object key for which the multipart upload was initiated.

    pub key: ObjectKey, -///

    The expected total object size of the multipart upload request. If there’s a mismatch -/// between the specified object size value and the actual object size value, it results in an -/// HTTP 400 InvalidRequest error.

    + ///

    The expected total object size of the multipart upload request. If there’s a mismatch + /// between the specified object size value and the actual object size value, it results in an + /// HTTP 400 InvalidRequest error.

    pub mpu_object_size: Option, -///

    The container for the multipart upload request information.

    + ///

    The container for the multipart upload request information.

    pub multipart_upload: Option, pub request_payer: Option, -///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is -/// required only when the object was created using a checksum algorithm or if your bucket -/// policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User -/// Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is + /// required only when the object was created using a checksum algorithm or if your bucket + /// policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User + /// Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_algorithm: Option, -///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. -/// For more information, see -/// Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. + /// For more information, see + /// Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key: Option, -///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum -/// algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum + /// algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key_md5: Option, -///

    ID for the initiated multipart upload.

    + ///

    ID for the initiated multipart upload.

    pub upload_id: MultipartUploadId, } impl fmt::Debug for CompleteMultipartUploadInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CompleteMultipartUploadInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.mpu_object_size { -d.field("mpu_object_size", val); -} -if let Some(ref val) = self.multipart_upload { -d.field("multipart_upload", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CompleteMultipartUploadInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.mpu_object_size { + d.field("mpu_object_size", val); + } + if let Some(ref val) = self.multipart_upload { + d.field("multipart_upload", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } impl CompleteMultipartUploadInput { -#[must_use] -pub fn builder() -> builders::CompleteMultipartUploadInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CompleteMultipartUploadInputBuilder { + default() + } } #[derive(Default)] pub struct CompleteMultipartUploadOutput { -///

    The name of the bucket that contains the newly created object. Does not return the access point -/// ARN or access point alias if used.

    -/// -///

    Access points are not supported by directory buckets.

    -///
    + ///

    The name of the bucket that contains the newly created object. Does not return the access point + /// ARN or access point alias if used.

    + /// + ///

    Access points are not supported by directory buckets.

    + ///
    pub bucket: Option, -///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    + ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    pub bucket_key_enabled: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the object. The CRC64NVME checksum is -/// always a full object checksum. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the object. The CRC64NVME checksum is + /// always a full object checksum. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    The checksum type, which determines how part-level checksums are combined to create an -/// object-level checksum for multipart objects. You can use this header as a data integrity -/// check to verify that the checksum type that is received is the same checksum type that was -/// specified during the CreateMultipartUpload request. For more information, see -/// Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    The checksum type, which determines how part-level checksums are combined to create an + /// object-level checksum for multipart objects. You can use this header as a data integrity + /// check to verify that the checksum type that is received is the same checksum type that was + /// specified during the CreateMultipartUpload request. For more information, see + /// Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    Entity tag that identifies the newly created object's data. Objects with different -/// object data will have different entity tags. The entity tag is an opaque string. The entity -/// tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 -/// digest of the object data, it will contain one or more nonhexadecimal characters and/or -/// will consist of less than 32 or more than 32 hexadecimal digits. For more information about -/// how the entity tag is calculated, see Checking object -/// integrity in the Amazon S3 User Guide.

    + ///

    Entity tag that identifies the newly created object's data. Objects with different + /// object data will have different entity tags. The entity tag is an opaque string. The entity + /// tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 + /// digest of the object data, it will contain one or more nonhexadecimal characters and/or + /// will consist of less than 32 or more than 32 hexadecimal digits. For more information about + /// how the entity tag is calculated, see Checking object + /// integrity in the Amazon S3 User Guide.

    pub e_tag: Option, -///

    If the object expiration is configured, this will contain the expiration date -/// (expiry-date) and rule ID (rule-id). The value of -/// rule-id is URL-encoded.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If the object expiration is configured, this will contain the expiration date + /// (expiry-date) and rule ID (rule-id). The value of + /// rule-id is URL-encoded.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub expiration: Option, -///

    The object key of the newly created object.

    + ///

    The object key of the newly created object.

    pub key: Option, -///

    The URI that identifies the newly created object.

    + ///

    The URI that identifies the newly created object.

    pub location: Option, pub request_charged: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when storing this object in Amazon S3 (for example, -/// AES256, aws:kms).

    + ///

    The server-side encryption algorithm used when storing this object in Amazon S3 (for example, + /// AES256, aws:kms).

    pub server_side_encryption: Option, -///

    Version ID of the newly created object, in case the bucket has versioning turned -/// on.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Version ID of the newly created object, in case the bucket has versioning turned + /// on.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub version_id: Option, -/// A future that resolves to the upload output or an error. This field is used to implement AWS-like keep-alive behavior. + /// A future that resolves to the upload output or an error. This field is used to implement AWS-like keep-alive behavior. pub future: Option>>, } impl fmt::Debug for CompleteMultipartUploadOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CompleteMultipartUploadOutput"); -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.location { -d.field("location", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -if self.future.is_some() { -d.field("future", &">>"); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CompleteMultipartUploadOutput"); + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.location { + d.field("location", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if self.future.is_some() { + d.field("future", &">>"); + } + d.finish_non_exhaustive() + } } - ///

    The container for the completed multipart upload details.

    #[derive(Clone, Default, PartialEq)] pub struct CompletedMultipartUpload { -///

    Array of CompletedPart data types.

    -///

    If you do not supply a valid Part with your request, the service sends back -/// an HTTP 400 response.

    + ///

    Array of CompletedPart data types.

    + ///

    If you do not supply a valid Part with your request, the service sends back + /// an HTTP 400 response.

    pub parts: Option, } impl fmt::Debug for CompletedMultipartUpload { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CompletedMultipartUpload"); -if let Some(ref val) = self.parts { -d.field("parts", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CompletedMultipartUpload"); + if let Some(ref val) = self.parts { + d.field("parts", val); + } + d.finish_non_exhaustive() + } } - ///

    Details of the parts that were uploaded.

    #[derive(Clone, Default, PartialEq)] pub struct CompletedPart { -///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present -/// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present + /// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present -/// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present + /// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    Entity tag returned when the part was uploaded.

    + ///

    Entity tag returned when the part was uploaded.

    pub e_tag: Option, -///

    Part number that identifies the part. This is a positive integer between 1 and -/// 10,000.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - In -/// CompleteMultipartUpload, when a additional checksum (including -/// x-amz-checksum-crc32, x-amz-checksum-crc32c, -/// x-amz-checksum-sha1, or x-amz-checksum-sha256) is -/// applied to each part, the PartNumber must start at 1 and the part -/// numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad -/// Request status code and an InvalidPartOrder error -/// code.

      -///
    • -///
    • -///

      -/// Directory buckets - In -/// CompleteMultipartUpload, the PartNumber must start at -/// 1 and the part numbers must be consecutive.

      -///
    • -///
    -///
    + ///

    Part number that identifies the part. This is a positive integer between 1 and + /// 10,000.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - In + /// CompleteMultipartUpload, when a additional checksum (including + /// x-amz-checksum-crc32, x-amz-checksum-crc32c, + /// x-amz-checksum-sha1, or x-amz-checksum-sha256) is + /// applied to each part, the PartNumber must start at 1 and the part + /// numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad + /// Request status code and an InvalidPartOrder error + /// code.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - In + /// CompleteMultipartUpload, the PartNumber must start at + /// 1 and the part numbers must be consecutive.

      + ///
    • + ///
    + ///
    pub part_number: Option, } impl fmt::Debug for CompletedPart { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CompletedPart"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CompletedPart"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + d.finish_non_exhaustive() + } } - pub type CompletedPartList = List; #[derive(Debug, Clone, PartialEq, Eq)] pub struct CompressionType(Cow<'static, str>); impl CompressionType { -pub const BZIP2: &'static str = "BZIP2"; + pub const BZIP2: &'static str = "BZIP2"; -pub const GZIP: &'static str = "GZIP"; + pub const GZIP: &'static str = "GZIP"; -pub const NONE: &'static str = "NONE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const NONE: &'static str = "NONE"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for CompressionType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: CompressionType) -> Self { -s.0 -} + fn from(s: CompressionType) -> Self { + s.0 + } } impl FromStr for CompressionType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    A container for describing a condition that must be met for the specified redirect to @@ -1825,42 +1784,41 @@ Ok(Self::from(s.to_owned())) /// request to another host where you might process the error.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct Condition { -///

    The HTTP error code when the redirect is applied. In the event of an error, if the error -/// code equals this value, then the specified redirect is applied. Required when parent -/// element Condition is specified and sibling KeyPrefixEquals is not -/// specified. If both are specified, then both must be true for the redirect to be -/// applied.

    + ///

    The HTTP error code when the redirect is applied. In the event of an error, if the error + /// code equals this value, then the specified redirect is applied. Required when parent + /// element Condition is specified and sibling KeyPrefixEquals is not + /// specified. If both are specified, then both must be true for the redirect to be + /// applied.

    pub http_error_code_returned_equals: Option, -///

    The object key name prefix when the redirect is applied. For example, to redirect -/// requests for ExamplePage.html, the key prefix will be -/// ExamplePage.html. To redirect request for all pages with the prefix -/// docs/, the key prefix will be /docs, which identifies all -/// objects in the docs/ folder. Required when the parent element -/// Condition is specified and sibling HttpErrorCodeReturnedEquals -/// is not specified. If both conditions are specified, both must be true for the redirect to -/// be applied.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    + ///

    The object key name prefix when the redirect is applied. For example, to redirect + /// requests for ExamplePage.html, the key prefix will be + /// ExamplePage.html. To redirect request for all pages with the prefix + /// docs/, the key prefix will be /docs, which identifies all + /// objects in the docs/ folder. Required when the parent element + /// Condition is specified and sibling HttpErrorCodeReturnedEquals + /// is not specified. If both conditions are specified, both must be true for the redirect to + /// be applied.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    pub key_prefix_equals: Option, } impl fmt::Debug for Condition { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Condition"); -if let Some(ref val) = self.http_error_code_returned_equals { -d.field("http_error_code_returned_equals", val); -} -if let Some(ref val) = self.key_prefix_equals { -d.field("key_prefix_equals", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Condition"); + if let Some(ref val) = self.http_error_code_returned_equals { + d.field("http_error_code_returned_equals", val); + } + if let Some(ref val) = self.key_prefix_equals { + d.field("key_prefix_equals", val); + } + d.finish_non_exhaustive() + } } - pub type ConfirmRemoveSelfBucketAccess = bool; pub type ContentDisposition = String; @@ -1875,951 +1833,944 @@ pub type ContentMD5 = String; pub type ContentRange = String; - ///

    #[derive(Clone, Default, PartialEq)] -pub struct ContinuationEvent { -} +pub struct ContinuationEvent {} impl fmt::Debug for ContinuationEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ContinuationEvent"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ContinuationEvent"); + d.finish_non_exhaustive() + } } - #[derive(Clone, PartialEq)] pub struct CopyObjectInput { -///

    The canned access control list (ACL) to apply to the object.

    -///

    When you copy an object, the ACL metadata is not preserved and is set to -/// private by default. Only the owner has full access control. To override the -/// default ACL setting, specify a new ACL when you generate a copy request. For more -/// information, see Using ACLs.

    -///

    If the destination bucket that you're copying objects to uses the bucket owner enforced -/// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. -/// Buckets that use this setting only accept PUT requests that don't specify an -/// ACL or PUT requests that specify bucket owner full control ACLs, such as the -/// bucket-owner-full-control canned ACL or an equivalent form of this ACL -/// expressed in the XML format. For more information, see Controlling ownership of -/// objects and disabling ACLs in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      If your destination bucket uses the bucket owner enforced setting for Object -/// Ownership, all objects written to the bucket by any account will be owned by the -/// bucket owner.

      -///
    • -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    The canned access control list (ACL) to apply to the object.

    + ///

    When you copy an object, the ACL metadata is not preserved and is set to + /// private by default. Only the owner has full access control. To override the + /// default ACL setting, specify a new ACL when you generate a copy request. For more + /// information, see Using ACLs.

    + ///

    If the destination bucket that you're copying objects to uses the bucket owner enforced + /// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. + /// Buckets that use this setting only accept PUT requests that don't specify an + /// ACL or PUT requests that specify bucket owner full control ACLs, such as the + /// bucket-owner-full-control canned ACL or an equivalent form of this ACL + /// expressed in the XML format. For more information, see Controlling ownership of + /// objects and disabling ACLs in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      If your destination bucket uses the bucket owner enforced setting for Object + /// Ownership, all objects written to the bucket by any account will be owned by the + /// bucket owner.

      + ///
    • + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub acl: Option, -///

    The name of the destination bucket.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -/// -///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, -/// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    -///
    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. -/// -/// You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. -/// For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. -/// When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format -/// -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs. -///

    + ///

    The name of the destination bucket.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + /// + ///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, + /// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    + ///
    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. + /// + /// You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. + /// For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. + /// When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format + /// + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs. + ///

    pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses -/// SSE-KMS, you can enable an S3 Bucket Key for the object.

    -///

    Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object -/// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect -/// bucket-level settings for S3 Bucket Key.

    -///

    For more information, see Amazon S3 Bucket Keys in the -/// Amazon S3 User Guide.

    -/// -///

    -/// Directory buckets - -/// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    -///
    + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses + /// SSE-KMS, you can enable an S3 Bucket Key for the object.

    + ///

    Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object + /// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect + /// bucket-level settings for S3 Bucket Key.

    + ///

    For more information, see Amazon S3 Bucket Keys in the + /// Amazon S3 User Guide.

    + /// + ///

    + /// Directory buckets - + /// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + ///
    pub bucket_key_enabled: Option, -///

    Specifies the caching behavior along the request/reply chain.

    + ///

    Specifies the caching behavior along the request/reply chain.

    pub cache_control: Option, -///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see -/// Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    When you copy an object, if the source object has a checksum, that checksum value will -/// be copied to the new object by default. If the CopyObject request does not -/// include this x-amz-checksum-algorithm header, the checksum algorithm will be -/// copied from the source object to the destination object (if it's present on the source -/// object). You can optionally specify a different checksum algorithm to use with the -/// x-amz-checksum-algorithm header. Unrecognized or unsupported values will -/// respond with the HTTP status code 400 Bad Request.

    -/// -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    -///
    + ///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see + /// Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    When you copy an object, if the source object has a checksum, that checksum value will + /// be copied to the new object by default. If the CopyObject request does not + /// include this x-amz-checksum-algorithm header, the checksum algorithm will be + /// copied from the source object to the destination object (if it's present on the source + /// object). You can optionally specify a different checksum algorithm to use with the + /// x-amz-checksum-algorithm header. Unrecognized or unsupported values will + /// respond with the HTTP status code 400 Bad Request.

    + /// + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + ///
    pub checksum_algorithm: Option, -///

    Specifies presentational information for the object. Indicates whether an object should -/// be displayed in a web browser or downloaded as a file. It allows specifying the desired -/// filename for the downloaded file.

    + ///

    Specifies presentational information for the object. Indicates whether an object should + /// be displayed in a web browser or downloaded as a file. It allows specifying the desired + /// filename for the downloaded file.

    pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    -/// -///

    For directory buckets, only the aws-chunked value is supported in this header field.

    -///
    + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + /// + ///

    For directory buckets, only the aws-chunked value is supported in this header field.

    + ///
    pub content_encoding: Option, -///

    The language the content is in.

    + ///

    The language the content is in.

    pub content_language: Option, -///

    A standard MIME type that describes the format of the object data.

    + ///

    A standard MIME type that describes the format of the object data.

    pub content_type: Option, -///

    Specifies the source object for the copy operation. The source object can be up to 5 GB. -/// If the source object is an object that was uploaded by using a multipart upload, the object -/// copy will be a single part object after the source object is copied to the destination -/// bucket.

    -///

    You specify the value of the copy source in one of two formats, depending on whether you -/// want to access the source object through an access point:

    -///
      -///
    • -///

      For objects not accessed through an access point, specify the name of the source bucket -/// and the key of the source object, separated by a slash (/). For example, to copy the -/// object reports/january.pdf from the general purpose bucket -/// awsexamplebucket, use -/// awsexamplebucket/reports/january.pdf. The value must be URL-encoded. -/// To copy the object reports/january.pdf from the directory bucket -/// awsexamplebucket--use1-az5--x-s3, use -/// awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must -/// be URL-encoded.

      -///
    • -///
    • -///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      -/// -///
        -///
      • -///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        -///
      • -///
      • -///

        Access points are not supported by directory buckets.

        -///
      • -///
      -///
      -///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      -///
    • -///
    -///

    If your source bucket versioning is enabled, the x-amz-copy-source header -/// by default identifies the current version of an object to copy. If the current version is a -/// delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use -/// the versionId query parameter. Specifically, append -/// ?versionId=<version-id> to the value (for example, -/// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). -/// If you don't specify a version ID, Amazon S3 copies the latest version of the source -/// object.

    -///

    If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID -/// for the copied object. This version ID is different from the version ID of the source -/// object. Amazon S3 returns the version ID of the copied object in the -/// x-amz-version-id response header in the response.

    -///

    If you do not enable versioning or suspend it on the destination bucket, the version ID -/// that Amazon S3 generates in the x-amz-version-id response header is always -/// null.

    -/// -///

    -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets.

    -///
    + ///

    Specifies the source object for the copy operation. The source object can be up to 5 GB. + /// If the source object is an object that was uploaded by using a multipart upload, the object + /// copy will be a single part object after the source object is copied to the destination + /// bucket.

    + ///

    You specify the value of the copy source in one of two formats, depending on whether you + /// want to access the source object through an access point:

    + ///
      + ///
    • + ///

      For objects not accessed through an access point, specify the name of the source bucket + /// and the key of the source object, separated by a slash (/). For example, to copy the + /// object reports/january.pdf from the general purpose bucket + /// awsexamplebucket, use + /// awsexamplebucket/reports/january.pdf. The value must be URL-encoded. + /// To copy the object reports/january.pdf from the directory bucket + /// awsexamplebucket--use1-az5--x-s3, use + /// awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must + /// be URL-encoded.

      + ///
    • + ///
    • + ///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      + /// + ///
        + ///
      • + ///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        + ///
      • + ///
      • + ///

        Access points are not supported by directory buckets.

        + ///
      • + ///
      + ///
      + ///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      + ///
    • + ///
    + ///

    If your source bucket versioning is enabled, the x-amz-copy-source header + /// by default identifies the current version of an object to copy. If the current version is a + /// delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use + /// the versionId query parameter. Specifically, append + /// ?versionId=<version-id> to the value (for example, + /// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). + /// If you don't specify a version ID, Amazon S3 copies the latest version of the source + /// object.

    + ///

    If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID + /// for the copied object. This version ID is different from the version ID of the source + /// object. Amazon S3 returns the version ID of the copied object in the + /// x-amz-version-id response header in the response.

    + ///

    If you do not enable versioning or suspend it on the destination bucket, the version ID + /// that Amazon S3 generates in the x-amz-version-id response header is always + /// null.

    + /// + ///

    + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets.

    + ///
    pub copy_source: CopySource, -///

    Copies the object if its entity tag (ETag) matches the specified tag.

    -///

    If both the x-amz-copy-source-if-match and -/// x-amz-copy-source-if-unmodified-since headers are present in the request -/// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    -///
      -///
    • -///

      -/// x-amz-copy-source-if-match condition evaluates to true

      -///
    • -///
    • -///

      -/// x-amz-copy-source-if-unmodified-since condition evaluates to -/// false

      -///
    • -///
    + ///

    Copies the object if its entity tag (ETag) matches the specified tag.

    + ///

    If both the x-amz-copy-source-if-match and + /// x-amz-copy-source-if-unmodified-since headers are present in the request + /// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    + ///
      + ///
    • + ///

      + /// x-amz-copy-source-if-match condition evaluates to true

      + ///
    • + ///
    • + ///

      + /// x-amz-copy-source-if-unmodified-since condition evaluates to + /// false

      + ///
    • + ///
    pub copy_source_if_match: Option, -///

    Copies the object if it has been modified since the specified time.

    -///

    If both the x-amz-copy-source-if-none-match and -/// x-amz-copy-source-if-modified-since headers are present in the request and -/// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response -/// code:

    -///
      -///
    • -///

      -/// x-amz-copy-source-if-none-match condition evaluates to false

      -///
    • -///
    • -///

      -/// x-amz-copy-source-if-modified-since condition evaluates to -/// true

      -///
    • -///
    + ///

    Copies the object if it has been modified since the specified time.

    + ///

    If both the x-amz-copy-source-if-none-match and + /// x-amz-copy-source-if-modified-since headers are present in the request and + /// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response + /// code:

    + ///
      + ///
    • + ///

      + /// x-amz-copy-source-if-none-match condition evaluates to false

      + ///
    • + ///
    • + ///

      + /// x-amz-copy-source-if-modified-since condition evaluates to + /// true

      + ///
    • + ///
    pub copy_source_if_modified_since: Option, -///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    -///

    If both the x-amz-copy-source-if-none-match and -/// x-amz-copy-source-if-modified-since headers are present in the request and -/// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response -/// code:

    -///
      -///
    • -///

      -/// x-amz-copy-source-if-none-match condition evaluates to false

      -///
    • -///
    • -///

      -/// x-amz-copy-source-if-modified-since condition evaluates to -/// true

      -///
    • -///
    + ///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    + ///

    If both the x-amz-copy-source-if-none-match and + /// x-amz-copy-source-if-modified-since headers are present in the request and + /// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response + /// code:

    + ///
      + ///
    • + ///

      + /// x-amz-copy-source-if-none-match condition evaluates to false

      + ///
    • + ///
    • + ///

      + /// x-amz-copy-source-if-modified-since condition evaluates to + /// true

      + ///
    • + ///
    pub copy_source_if_none_match: Option, -///

    Copies the object if it hasn't been modified since the specified time.

    -///

    If both the x-amz-copy-source-if-match and -/// x-amz-copy-source-if-unmodified-since headers are present in the request -/// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    -///
      -///
    • -///

      -/// x-amz-copy-source-if-match condition evaluates to true

      -///
    • -///
    • -///

      -/// x-amz-copy-source-if-unmodified-since condition evaluates to -/// false

      -///
    • -///
    + ///

    Copies the object if it hasn't been modified since the specified time.

    + ///

    If both the x-amz-copy-source-if-match and + /// x-amz-copy-source-if-unmodified-since headers are present in the request + /// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    + ///
      + ///
    • + ///

      + /// x-amz-copy-source-if-match condition evaluates to true

      + ///
    • + ///
    • + ///

      + /// x-amz-copy-source-if-unmodified-since condition evaluates to + /// false

      + ///
    • + ///
    pub copy_source_if_unmodified_since: Option, -///

    Specifies the algorithm to use when decrypting the source object (for example, -/// AES256).

    -///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the -/// necessary encryption information in your request so that Amazon S3 can decrypt the object for -/// copying.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    + ///

    Specifies the algorithm to use when decrypting the source object (for example, + /// AES256).

    + ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the + /// necessary encryption information in your request so that Amazon S3 can decrypt the object for + /// copying.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    pub copy_source_sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source -/// object. The encryption key provided in this header must be the same one that was used when -/// the source object was created.

    -///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the -/// necessary encryption information in your request so that Amazon S3 can decrypt the object for -/// copying.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    + ///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source + /// object. The encryption key provided in this header must be the same one that was used when + /// the source object was created.

    + ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the + /// necessary encryption information in your request so that Amazon S3 can decrypt the object for + /// copying.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    pub copy_source_sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the -/// necessary encryption information in your request so that Amazon S3 can decrypt the object for -/// copying.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the + /// necessary encryption information in your request so that Amazon S3 can decrypt the object for + /// copying.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    pub copy_source_sse_customer_key_md5: Option, -///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_source_bucket_owner: Option, -///

    The date and time at which the object is no longer cacheable.

    + ///

    The date and time at which the object is no longer cacheable.

    pub expires: Option, -///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_full_control: Option, -///

    Allows grantee to read the object data and its metadata.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Allows grantee to read the object data and its metadata.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_read: Option, -///

    Allows grantee to read the object ACL.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Allows grantee to read the object ACL.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_read_acp: Option, -///

    Allows grantee to write the ACL for the applicable object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Allows grantee to write the ACL for the applicable object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_write_acp: Option, -///

    The key of the destination object.

    + ///

    The key of the destination object.

    pub key: ObjectKey, -///

    A map of metadata to store with the object in S3.

    + ///

    A map of metadata to store with the object in S3.

    pub metadata: Option, -///

    Specifies whether the metadata is copied from the source object or replaced with -/// metadata that's provided in the request. When copying an object, you can preserve all -/// metadata (the default) or specify new metadata. If this header isn’t specified, -/// COPY is the default behavior.

    -///

    -/// General purpose bucket - For general purpose buckets, when you -/// grant permissions, you can use the s3:x-amz-metadata-directive condition key -/// to enforce certain metadata behavior when objects are uploaded. For more information, see -/// Amazon S3 -/// condition key examples in the Amazon S3 User Guide.

    -/// -///

    -/// x-amz-website-redirect-location is unique to each object and is not -/// copied when using the x-amz-metadata-directive header. To copy the value, -/// you must specify x-amz-website-redirect-location in the request -/// header.

    -///
    + ///

    Specifies whether the metadata is copied from the source object or replaced with + /// metadata that's provided in the request. When copying an object, you can preserve all + /// metadata (the default) or specify new metadata. If this header isn’t specified, + /// COPY is the default behavior.

    + ///

    + /// General purpose bucket - For general purpose buckets, when you + /// grant permissions, you can use the s3:x-amz-metadata-directive condition key + /// to enforce certain metadata behavior when objects are uploaded. For more information, see + /// Amazon S3 + /// condition key examples in the Amazon S3 User Guide.

    + /// + ///

    + /// x-amz-website-redirect-location is unique to each object and is not + /// copied when using the x-amz-metadata-directive header. To copy the value, + /// you must specify x-amz-website-redirect-location in the request + /// header.

    + ///
    pub metadata_directive: Option, -///

    Specifies whether you want to apply a legal hold to the object copy.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies whether you want to apply a legal hold to the object copy.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode that you want to apply to the object copy.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The Object Lock mode that you want to apply to the object copy.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_mode: Option, -///

    The date and time when you want the Object Lock of the object copy to expire.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The date and time when you want the Object Lock of the object copy to expire.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_retain_until_date: Option, pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, -/// AES256).

    -///

    When you perform a CopyObject operation, if you want to use a different -/// type of encryption setting for the target object, you can specify appropriate -/// encryption-related headers to encrypt the target object with an Amazon S3 managed key, a -/// KMS key, or a customer-provided key. If the encryption setting in your request is -/// different from the default encryption configuration of the destination bucket, the -/// encryption setting in your request takes precedence.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    + ///

    Specifies the algorithm to use when encrypting the object (for example, + /// AES256).

    + ///

    When you perform a CopyObject operation, if you want to use a different + /// type of encryption setting for the target object, you can specify appropriate + /// encryption-related headers to encrypt the target object with an Amazon S3 managed key, a + /// KMS key, or a customer-provided key. If the encryption setting in your request is + /// different from the default encryption configuration of the destination bucket, the + /// encryption setting in your request takes precedence.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded. Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded. Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    pub sse_customer_key_md5: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use -/// for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

    -///

    -/// General purpose buckets - This value must be explicitly -/// added to specify encryption context for CopyObject requests if you want an -/// additional encryption context for your destination object. The additional encryption -/// context of the source object won't be copied to the destination object. For more -/// information, see Encryption -/// context in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use + /// for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

    + ///

    + /// General purpose buckets - This value must be explicitly + /// added to specify encryption context for CopyObject requests if you want an + /// additional encryption context for your destination object. The additional encryption + /// context of the source object won't be copied to the destination object. For more + /// information, see Encryption + /// context in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, -///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. -/// All GET and PUT requests for an object protected by KMS will fail if they're not made via -/// SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services -/// SDKs and Amazon Web Services CLI, see Specifying the -/// Signature Version in Request Authentication in the -/// Amazon S3 User Guide.

    -///

    -/// Directory buckets - -/// To encrypt data using SSE-KMS, it's recommended to specify the -/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses -/// the bucket's default KMS customer managed key ID. If you want to explicitly set the -/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -/// -/// Incorrect key specification results in an HTTP 400 Bad Request error.

    + ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. + /// All GET and PUT requests for an object protected by KMS will fail if they're not made via + /// SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services + /// SDKs and Amazon Web Services CLI, see Specifying the + /// Signature Version in Request Authentication in the + /// Amazon S3 User Guide.

    + ///

    + /// Directory buckets - + /// To encrypt data using SSE-KMS, it's recommended to specify the + /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses + /// the bucket's default KMS customer managed key ID. If you want to explicitly set the + /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + /// + /// Incorrect key specification results in an HTTP 400 Bad Request error.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized -/// or unsupported values won’t write a destination object and will receive a 400 Bad -/// Request response.

    -///

    Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When -/// copying an object, if you don't specify encryption information in your copy request, the -/// encryption setting of the target object is set to the default encryption configuration of -/// the destination bucket. By default, all buckets have a base level of encryption -/// configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the -/// destination bucket has a different default encryption configuration, Amazon S3 uses the -/// corresponding encryption key to encrypt the target object copy.

    -///

    With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in -/// its data centers and decrypts the data when you access it. For more information about -/// server-side encryption, see Using Server-Side Encryption -/// in the Amazon S3 User Guide.

    -///

    -/// General purpose buckets -///

    -///
      -///
    • -///

      For general purpose buckets, there are the following supported options for server-side -/// encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer -/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption -/// with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding -/// KMS key, or a customer-provided key to encrypt the target object copy.

      -///
    • -///
    • -///

      When you perform a CopyObject operation, if you want to use a -/// different type of encryption setting for the target object, you can specify -/// appropriate encryption-related headers to encrypt the target object with an Amazon S3 -/// managed key, a KMS key, or a customer-provided key. If the encryption setting in -/// your request is different from the default encryption configuration of the -/// destination bucket, the encryption setting in your request takes precedence.

      -///
    • -///
    -///

    -/// Directory buckets -///

    -///
      -///
    • -///

      For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///
    • -///
    • -///

      To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you -/// specify SSE-KMS as the directory bucket's default encryption configuration with -/// a KMS key (specifically, a customer managed key). -/// The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS -/// configuration can only support 1 customer managed key per -/// directory bucket for the lifetime of the bucket. After you specify a customer managed key for -/// SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS -/// configuration. Then, when you perform a CopyObject operation and want to -/// specify server-side encryption settings for new object copies with SSE-KMS in the -/// encryption-related request headers, you must ensure the encryption key is the same -/// customer managed key that you specified for the directory bucket's default encryption -/// configuration. -///

      -///
    • -///
    + ///

    The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized + /// or unsupported values won’t write a destination object and will receive a 400 Bad + /// Request response.

    + ///

    Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When + /// copying an object, if you don't specify encryption information in your copy request, the + /// encryption setting of the target object is set to the default encryption configuration of + /// the destination bucket. By default, all buckets have a base level of encryption + /// configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the + /// destination bucket has a different default encryption configuration, Amazon S3 uses the + /// corresponding encryption key to encrypt the target object copy.

    + ///

    With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in + /// its data centers and decrypts the data when you access it. For more information about + /// server-side encryption, see Using Server-Side Encryption + /// in the Amazon S3 User Guide.

    + ///

    + /// General purpose buckets + ///

    + ///
      + ///
    • + ///

      For general purpose buckets, there are the following supported options for server-side + /// encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer + /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption + /// with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding + /// KMS key, or a customer-provided key to encrypt the target object copy.

      + ///
    • + ///
    • + ///

      When you perform a CopyObject operation, if you want to use a + /// different type of encryption setting for the target object, you can specify + /// appropriate encryption-related headers to encrypt the target object with an Amazon S3 + /// managed key, a KMS key, or a customer-provided key. If the encryption setting in + /// your request is different from the default encryption configuration of the + /// destination bucket, the encryption setting in your request takes precedence.

      + ///
    • + ///
    + ///

    + /// Directory buckets + ///

    + ///
      + ///
    • + ///

      For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///
    • + ///
    • + ///

      To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you + /// specify SSE-KMS as the directory bucket's default encryption configuration with + /// a KMS key (specifically, a customer managed key). + /// The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS + /// configuration can only support 1 customer managed key per + /// directory bucket for the lifetime of the bucket. After you specify a customer managed key for + /// SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS + /// configuration. Then, when you perform a CopyObject operation and want to + /// specify server-side encryption settings for new object copies with SSE-KMS in the + /// encryption-related request headers, you must ensure the encryption key is the same + /// customer managed key that you specified for the directory bucket's default encryption + /// configuration. + ///

      + ///
    • + ///
    pub server_side_encryption: Option, -///

    If the x-amz-storage-class header is not used, the copied object will be -/// stored in the STANDARD Storage Class by default. The STANDARD -/// storage class provides high durability and high availability. Depending on performance -/// needs, you can specify a different Storage Class.

    -/// -///
      -///
    • -///

      -/// Directory buckets - -/// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. -/// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

      -///
    • -///
    • -///

      -/// Amazon S3 on Outposts - S3 on Outposts only -/// uses the OUTPOSTS Storage Class.

      -///
    • -///
    -///
    -///

    You can use the CopyObject action to change the storage class of an object -/// that is already stored in Amazon S3 by using the x-amz-storage-class header. For -/// more information, see Storage Classes in the -/// Amazon S3 User Guide.

    -///

    Before using an object as a source object for the copy operation, you must restore a -/// copy of it if it meets any of the following conditions:

    -///
      -///
    • -///

      The storage class of the source object is GLACIER or -/// DEEP_ARCHIVE.

      -///
    • -///
    • -///

      The storage class of the source object is INTELLIGENT_TIERING and -/// it's S3 Intelligent-Tiering access tier is Archive Access or -/// Deep Archive Access.

      -///
    • -///
    -///

    For more information, see RestoreObject and Copying -/// Objects in the Amazon S3 User Guide.

    + ///

    If the x-amz-storage-class header is not used, the copied object will be + /// stored in the STANDARD Storage Class by default. The STANDARD + /// storage class provides high durability and high availability. Depending on performance + /// needs, you can specify a different Storage Class.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. + /// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

      + ///
    • + ///
    • + ///

      + /// Amazon S3 on Outposts - S3 on Outposts only + /// uses the OUTPOSTS Storage Class.

      + ///
    • + ///
    + ///
    + ///

    You can use the CopyObject action to change the storage class of an object + /// that is already stored in Amazon S3 by using the x-amz-storage-class header. For + /// more information, see Storage Classes in the + /// Amazon S3 User Guide.

    + ///

    Before using an object as a source object for the copy operation, you must restore a + /// copy of it if it meets any of the following conditions:

    + ///
      + ///
    • + ///

      The storage class of the source object is GLACIER or + /// DEEP_ARCHIVE.

      + ///
    • + ///
    • + ///

      The storage class of the source object is INTELLIGENT_TIERING and + /// it's S3 Intelligent-Tiering access tier is Archive Access or + /// Deep Archive Access.

      + ///
    • + ///
    + ///

    For more information, see RestoreObject and Copying + /// Objects in the Amazon S3 User Guide.

    pub storage_class: Option, -///

    The tag-set for the object copy in the destination bucket. This value must be used in -/// conjunction with the x-amz-tagging-directive if you choose -/// REPLACE for the x-amz-tagging-directive. If you choose -/// COPY for the x-amz-tagging-directive, you don't need to set -/// the x-amz-tagging header, because the tag-set will be copied from the source -/// object directly. The tag-set must be encoded as URL Query parameters.

    -///

    The default value is the empty value.

    -/// -///

    -/// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. -/// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    -///
      -///
    • -///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      -///
    • -///
    • -///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      -///
    • -///
    -///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    -///
      -///
    • -///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      -///
    • -///
    -///
    + ///

    The tag-set for the object copy in the destination bucket. This value must be used in + /// conjunction with the x-amz-tagging-directive if you choose + /// REPLACE for the x-amz-tagging-directive. If you choose + /// COPY for the x-amz-tagging-directive, you don't need to set + /// the x-amz-tagging header, because the tag-set will be copied from the source + /// object directly. The tag-set must be encoded as URL Query parameters.

    + ///

    The default value is the empty value.

    + /// + ///

    + /// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. + /// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    + ///
      + ///
    • + ///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      + ///
    • + ///
    • + ///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      + ///
    • + ///
    + ///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    + ///
      + ///
    • + ///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      + ///
    • + ///
    + ///
    pub tagging: Option, -///

    Specifies whether the object tag-set is copied from the source object or replaced with -/// the tag-set that's provided in the request.

    -///

    The default value is COPY.

    -/// -///

    -/// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. -/// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    -///
      -///
    • -///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      -///
    • -///
    • -///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      -///
    • -///
    -///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    -///
      -///
    • -///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      -///
    • -///
    -///
    + ///

    Specifies whether the object tag-set is copied from the source object or replaced with + /// the tag-set that's provided in the request.

    + ///

    The default value is COPY.

    + /// + ///

    + /// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. + /// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    + ///
      + ///
    • + ///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      + ///
    • + ///
    • + ///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      + ///
    • + ///
    + ///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    + ///
      + ///
    • + ///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      + ///
    • + ///
    + ///
    pub tagging_directive: Option, -///

    If the destination bucket is configured as a website, redirects requests for this object -/// copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of -/// this header in the object metadata. This value is unique to each object and is not copied -/// when using the x-amz-metadata-directive header. Instead, you may opt to -/// provide this header in combination with the x-amz-metadata-directive -/// header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If the destination bucket is configured as a website, redirects requests for this object + /// copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of + /// this header in the object metadata. This value is unique to each object and is not copied + /// when using the x-amz-metadata-directive header. Instead, you may opt to + /// provide this header in combination with the x-amz-metadata-directive + /// header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub website_redirect_location: Option, } impl fmt::Debug for CopyObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CopyObjectInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -d.field("copy_source", &self.copy_source); -if let Some(ref val) = self.copy_source_if_match { -d.field("copy_source_if_match", val); -} -if let Some(ref val) = self.copy_source_if_modified_since { -d.field("copy_source_if_modified_since", val); -} -if let Some(ref val) = self.copy_source_if_none_match { -d.field("copy_source_if_none_match", val); -} -if let Some(ref val) = self.copy_source_if_unmodified_since { -d.field("copy_source_if_unmodified_since", val); -} -if let Some(ref val) = self.copy_source_sse_customer_algorithm { -d.field("copy_source_sse_customer_algorithm", val); -} -if let Some(ref val) = self.copy_source_sse_customer_key { -d.field("copy_source_sse_customer_key", val); -} -if let Some(ref val) = self.copy_source_sse_customer_key_md5 { -d.field("copy_source_sse_customer_key_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.expected_source_bucket_owner { -d.field("expected_source_bucket_owner", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.metadata_directive { -d.field("metadata_directive", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tagging { -d.field("tagging", val); -} -if let Some(ref val) = self.tagging_directive { -d.field("tagging_directive", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CopyObjectInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + d.field("copy_source", &self.copy_source); + if let Some(ref val) = self.copy_source_if_match { + d.field("copy_source_if_match", val); + } + if let Some(ref val) = self.copy_source_if_modified_since { + d.field("copy_source_if_modified_since", val); + } + if let Some(ref val) = self.copy_source_if_none_match { + d.field("copy_source_if_none_match", val); + } + if let Some(ref val) = self.copy_source_if_unmodified_since { + d.field("copy_source_if_unmodified_since", val); + } + if let Some(ref val) = self.copy_source_sse_customer_algorithm { + d.field("copy_source_sse_customer_algorithm", val); + } + if let Some(ref val) = self.copy_source_sse_customer_key { + d.field("copy_source_sse_customer_key", val); + } + if let Some(ref val) = self.copy_source_sse_customer_key_md5 { + d.field("copy_source_sse_customer_key_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expected_source_bucket_owner { + d.field("expected_source_bucket_owner", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.metadata_directive { + d.field("metadata_directive", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.tagging_directive { + d.field("tagging_directive", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + d.finish_non_exhaustive() + } } impl CopyObjectInput { -#[must_use] -pub fn builder() -> builders::CopyObjectInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CopyObjectInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct CopyObjectOutput { -///

    Indicates whether the copied object uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    + ///

    Indicates whether the copied object uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    pub bucket_key_enabled: Option, -///

    Container for all response elements.

    + ///

    Container for all response elements.

    pub copy_object_result: Option, -///

    Version ID of the source object that was copied.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    + ///

    Version ID of the source object that was copied.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    pub copy_source_version_id: Option, -///

    If the object expiration is configured, the response includes this header.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    + ///

    If the object expiration is configured, the response includes this header.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    pub expiration: Option, pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key_md5: Option, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The -/// value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption -/// context key-value pairs.

    + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The + /// value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption + /// context key-value pairs.

    pub ssekms_encryption_context: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms, aws:kms:dsse).

    + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms, aws:kms:dsse).

    pub server_side_encryption: Option, -///

    Version ID of the newly created copy.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Version ID of the newly created copy.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub version_id: Option, } impl fmt::Debug for CopyObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CopyObjectOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.copy_object_result { -d.field("copy_object_result", val); -} -if let Some(ref val) = self.copy_source_version_id { -d.field("copy_source_version_id", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CopyObjectOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.copy_object_result { + d.field("copy_object_result", val); + } + if let Some(ref val) = self.copy_source_version_id { + d.field("copy_source_version_id", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - ///

    Container for all response elements.

    #[derive(Clone, Default, PartialEq)] pub struct CopyObjectResult { -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present -/// if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a -/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present + /// if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a + /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    Returns the ETag of the new object. The ETag reflects only changes to the contents of an -/// object, not its metadata.

    + ///

    Returns the ETag of the new object. The ETag reflects only changes to the contents of an + /// object, not its metadata.

    pub e_tag: Option, -///

    Creation date of the object.

    + ///

    Creation date of the object.

    pub last_modified: Option, } impl fmt::Debug for CopyObjectResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CopyObjectResult"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CopyObjectResult"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + d.finish_non_exhaustive() + } } - ///

    Container for all response elements.

    #[derive(Clone, Default, PartialEq)] pub struct CopyPartResult { -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the part. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the part. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the part. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the part. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 checksum of the part. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 checksum of the part. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 checksum of the part. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 checksum of the part. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    Entity tag of the object.

    + ///

    Entity tag of the object.

    pub e_tag: Option, -///

    Date and time at which the object was uploaded.

    + ///

    Date and time at which the object was uploaded.

    pub last_modified: Option, } impl fmt::Debug for CopyPartResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CopyPartResult"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CopyPartResult"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + d.finish_non_exhaustive() + } } - - pub type CopySourceIfMatch = ETagCondition; pub type CopySourceIfModifiedSince = Timestamp; @@ -2841,1117 +2792,1109 @@ pub type CopySourceVersionId = String; ///

    The configuration information for the bucket.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CreateBucketConfiguration { -///

    Specifies the information about the bucket that will be created.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    + ///

    Specifies the information about the bucket that will be created.

    + /// + ///

    This functionality is only supported by directory buckets.

    + ///
    pub bucket: Option, -///

    Specifies the location where the bucket will be created.

    -///

    -/// Directory buckets - The location type is Availability Zone or Local Zone. -/// To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the -/// error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide. -///

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    + ///

    Specifies the location where the bucket will be created.

    + ///

    + /// Directory buckets - The location type is Availability Zone or Local Zone. + /// To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the + /// error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide. + ///

    + /// + ///

    This functionality is only supported by directory buckets.

    + ///
    pub location: Option, -///

    Specifies the Region where the bucket will be created. You might choose a Region to -/// optimize latency, minimize costs, or address regulatory requirements. For example, if you -/// reside in Europe, you will probably find it advantageous to create buckets in the Europe -/// (Ireland) Region.

    -///

    If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region -/// (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

    -///

    For a list of the valid values for all of the Amazon Web Services Regions, see Regions and -/// Endpoints.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the Region where the bucket will be created. You might choose a Region to + /// optimize latency, minimize costs, or address regulatory requirements. For example, if you + /// reside in Europe, you will probably find it advantageous to create buckets in the Europe + /// (Ireland) Region.

    + ///

    If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region + /// (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

    + ///

    For a list of the valid values for all of the Amazon Web Services Regions, see Regions and + /// Endpoints.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub location_constraint: Option, } impl fmt::Debug for CreateBucketConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketConfiguration"); -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.location { -d.field("location", val); -} -if let Some(ref val) = self.location_constraint { -d.field("location_constraint", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketConfiguration"); + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.location { + d.field("location", val); + } + if let Some(ref val) = self.location_constraint { + d.field("location_constraint", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct CreateBucketInput { -///

    The canned ACL to apply to the bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The canned ACL to apply to the bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub acl: Option, -///

    The name of the bucket to create.

    -///

    -/// General purpose buckets - For information about bucket naming -/// restrictions, see Bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    + ///

    The name of the bucket to create.

    + ///

    + /// General purpose buckets - For information about bucket naming + /// restrictions, see Bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    pub bucket: BucketName, -///

    The configuration information for the bucket.

    + ///

    The configuration information for the bucket.

    pub create_bucket_configuration: Option, -///

    Allows grantee the read, write, read ACP, and write ACP permissions on the -/// bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the + /// bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_full_control: Option, -///

    Allows grantee to list the objects in the bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee to list the objects in the bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_read: Option, -///

    Allows grantee to read the bucket ACL.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee to read the bucket ACL.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_read_acp: Option, -///

    Allows grantee to create new objects in the bucket.

    -///

    For the bucket and object owners of existing objects, also allows deletions and -/// overwrites of those objects.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee to create new objects in the bucket.

    + ///

    For the bucket and object owners of existing objects, also allows deletions and + /// overwrites of those objects.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_write: Option, -///

    Allows grantee to write the ACL for the applicable bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee to write the ACL for the applicable bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_write_acp: Option, -///

    Specifies whether you want S3 Object Lock to be enabled for the new bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies whether you want S3 Object Lock to be enabled for the new bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_enabled_for_bucket: Option, pub object_ownership: Option, } impl fmt::Debug for CreateBucketInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.create_bucket_configuration { -d.field("create_bucket_configuration", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write { -d.field("grant_write", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -if let Some(ref val) = self.object_lock_enabled_for_bucket { -d.field("object_lock_enabled_for_bucket", val); -} -if let Some(ref val) = self.object_ownership { -d.field("object_ownership", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.create_bucket_configuration { + d.field("create_bucket_configuration", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write { + d.field("grant_write", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + if let Some(ref val) = self.object_lock_enabled_for_bucket { + d.field("object_lock_enabled_for_bucket", val); + } + if let Some(ref val) = self.object_ownership { + d.field("object_ownership", val); + } + d.finish_non_exhaustive() + } } impl CreateBucketInput { -#[must_use] -pub fn builder() -> builders::CreateBucketInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CreateBucketInputBuilder { + default() + } } #[derive(Clone, PartialEq)] pub struct CreateBucketMetadataTableConfigurationInput { -///

    -/// The general purpose bucket that you want to create the metadata table configuration in. -///

    + ///

    + /// The general purpose bucket that you want to create the metadata table configuration in. + ///

    pub bucket: BucketName, -///

    -/// The checksum algorithm to use with your metadata table configuration. -///

    + ///

    + /// The checksum algorithm to use with your metadata table configuration. + ///

    pub checksum_algorithm: Option, -///

    -/// The Content-MD5 header for the metadata table configuration. -///

    + ///

    + /// The Content-MD5 header for the metadata table configuration. + ///

    pub content_md5: Option, -///

    -/// The expected owner of the general purpose bucket that contains your metadata table configuration. -///

    + ///

    + /// The expected owner of the general purpose bucket that contains your metadata table configuration. + ///

    pub expected_bucket_owner: Option, -///

    -/// The contents of your metadata table configuration. -///

    + ///

    + /// The contents of your metadata table configuration. + ///

    pub metadata_table_configuration: MetadataTableConfiguration, } impl fmt::Debug for CreateBucketMetadataTableConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("metadata_table_configuration", &self.metadata_table_configuration); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("metadata_table_configuration", &self.metadata_table_configuration); + d.finish_non_exhaustive() + } } impl CreateBucketMetadataTableConfigurationInput { -#[must_use] -pub fn builder() -> builders::CreateBucketMetadataTableConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CreateBucketMetadataTableConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct CreateBucketMetadataTableConfigurationOutput { -} +pub struct CreateBucketMetadataTableConfigurationOutput {} impl fmt::Debug for CreateBucketMetadataTableConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct CreateBucketOutput { -///

    A forward slash followed by the name of the bucket.

    + ///

    A forward slash followed by the name of the bucket.

    pub location: Option, } impl fmt::Debug for CreateBucketOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketOutput"); -if let Some(ref val) = self.location { -d.field("location", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketOutput"); + if let Some(ref val) = self.location { + d.field("location", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct CreateMultipartUploadInput { -///

    The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as -/// canned ACLs. Each canned ACL has a predefined set of grantees and -/// permissions. For more information, see Canned ACL in the -/// Amazon S3 User Guide.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to -/// predefined groups defined by Amazon S3. These permissions are then added to the access control -/// list (ACL) on the new object. For more information, see Using ACLs. One way to grant -/// the permissions using the request headers is to specify a canned ACL with the -/// x-amz-acl request header.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as + /// canned ACLs. Each canned ACL has a predefined set of grantees and + /// permissions. For more information, see Canned ACL in the + /// Amazon S3 User Guide.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to + /// predefined groups defined by Amazon S3. These permissions are then added to the access control + /// list (ACL) on the new object. For more information, see Using ACLs. One way to grant + /// the permissions using the request headers is to specify a canned ACL with the + /// x-amz-acl request header.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub acl: Option, -///

    The name of the bucket where the multipart upload is initiated and where the object is -/// uploaded.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The name of the bucket where the multipart upload is initiated and where the object is + /// uploaded.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    -///

    -/// General purpose buckets - Setting this header to -/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with -/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 -/// Bucket Key.

    -///

    -/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    + ///

    + /// General purpose buckets - Setting this header to + /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with + /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 + /// Bucket Key.

    + ///

    + /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    pub bucket_key_enabled: Option, -///

    Specifies caching behavior along the request/reply chain.

    + ///

    Specifies caching behavior along the request/reply chain.

    pub cache_control: Option, -///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see -/// Checking object integrity in -/// the Amazon S3 User Guide.

    + ///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see + /// Checking object integrity in + /// the Amazon S3 User Guide.

    pub checksum_algorithm: Option, -///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s -/// checksum value. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s + /// checksum value. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    Specifies presentational information for the object.

    + ///

    Specifies presentational information for the object.

    pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    -/// -///

    For directory buckets, only the aws-chunked value is supported in this header field.

    -///
    + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + /// + ///

    For directory buckets, only the aws-chunked value is supported in this header field.

    + ///
    pub content_encoding: Option, -///

    The language that the content is in.

    + ///

    The language that the content is in.

    pub content_language: Option, -///

    A standard MIME type describing the format of the object data.

    + ///

    A standard MIME type describing the format of the object data.

    pub content_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The date and time at which the object is no longer cacheable.

    + ///

    The date and time at which the object is no longer cacheable.

    pub expires: Option, -///

    Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP -/// permissions on the object.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can use this header to explicitly grant access permissions to -/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 -/// supports in an ACL. For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -///

    You specify each grantee as a type=value pair, where the type is one of the -/// following:

    -///
      -///
    • -///

      -/// id – if the value specified is the canonical user ID of an -/// Amazon Web Services account

      -///
    • -///
    • -///

      -/// uri – if you are granting permissions to a predefined group

      -///
    • -///
    • -///

      -/// emailAddress – if the value specified is the email address of an -/// Amazon Web Services account

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    -///

    -/// x-amz-grant-read: id="11112222333", id="444455556666" -///

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP + /// permissions on the object.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can use this header to explicitly grant access permissions to + /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 + /// supports in an ACL. For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + ///

    You specify each grantee as a type=value pair, where the type is one of the + /// following:

    + ///
      + ///
    • + ///

      + /// id – if the value specified is the canonical user ID of an + /// Amazon Web Services account

      + ///
    • + ///
    • + ///

      + /// uri – if you are granting permissions to a predefined group

      + ///
    • + ///
    • + ///

      + /// emailAddress – if the value specified is the email address of an + /// Amazon Web Services account

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    + ///

    + /// x-amz-grant-read: id="11112222333", id="444455556666" + ///

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_full_control: Option, -///

    Specify access permissions explicitly to allow grantee to read the object data and its -/// metadata.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can use this header to explicitly grant access permissions to -/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 -/// supports in an ACL. For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -///

    You specify each grantee as a type=value pair, where the type is one of the -/// following:

    -///
      -///
    • -///

      -/// id – if the value specified is the canonical user ID of an -/// Amazon Web Services account

      -///
    • -///
    • -///

      -/// uri – if you are granting permissions to a predefined group

      -///
    • -///
    • -///

      -/// emailAddress – if the value specified is the email address of an -/// Amazon Web Services account

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    -///

    -/// x-amz-grant-read: id="11112222333", id="444455556666" -///

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Specify access permissions explicitly to allow grantee to read the object data and its + /// metadata.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can use this header to explicitly grant access permissions to + /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 + /// supports in an ACL. For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + ///

    You specify each grantee as a type=value pair, where the type is one of the + /// following:

    + ///
      + ///
    • + ///

      + /// id – if the value specified is the canonical user ID of an + /// Amazon Web Services account

      + ///
    • + ///
    • + ///

      + /// uri – if you are granting permissions to a predefined group

      + ///
    • + ///
    • + ///

      + /// emailAddress – if the value specified is the email address of an + /// Amazon Web Services account

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    + ///

    + /// x-amz-grant-read: id="11112222333", id="444455556666" + ///

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_read: Option, -///

    Specify access permissions explicitly to allows grantee to read the object ACL.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can use this header to explicitly grant access permissions to -/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 -/// supports in an ACL. For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -///

    You specify each grantee as a type=value pair, where the type is one of the -/// following:

    -///
      -///
    • -///

      -/// id – if the value specified is the canonical user ID of an -/// Amazon Web Services account

      -///
    • -///
    • -///

      -/// uri – if you are granting permissions to a predefined group

      -///
    • -///
    • -///

      -/// emailAddress – if the value specified is the email address of an -/// Amazon Web Services account

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    -///

    -/// x-amz-grant-read: id="11112222333", id="444455556666" -///

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Specify access permissions explicitly to allows grantee to read the object ACL.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can use this header to explicitly grant access permissions to + /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 + /// supports in an ACL. For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + ///

    You specify each grantee as a type=value pair, where the type is one of the + /// following:

    + ///
      + ///
    • + ///

      + /// id – if the value specified is the canonical user ID of an + /// Amazon Web Services account

      + ///
    • + ///
    • + ///

      + /// uri – if you are granting permissions to a predefined group

      + ///
    • + ///
    • + ///

      + /// emailAddress – if the value specified is the email address of an + /// Amazon Web Services account

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    + ///

    + /// x-amz-grant-read: id="11112222333", id="444455556666" + ///

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_read_acp: Option, -///

    Specify access permissions explicitly to allows grantee to allow grantee to write the -/// ACL for the applicable object.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can use this header to explicitly grant access permissions to -/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 -/// supports in an ACL. For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -///

    You specify each grantee as a type=value pair, where the type is one of the -/// following:

    -///
      -///
    • -///

      -/// id – if the value specified is the canonical user ID of an -/// Amazon Web Services account

      -///
    • -///
    • -///

      -/// uri – if you are granting permissions to a predefined group

      -///
    • -///
    • -///

      -/// emailAddress – if the value specified is the email address of an -/// Amazon Web Services account

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    -///

    -/// x-amz-grant-read: id="11112222333", id="444455556666" -///

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Specify access permissions explicitly to allows grantee to allow grantee to write the + /// ACL for the applicable object.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can use this header to explicitly grant access permissions to + /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 + /// supports in an ACL. For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + ///

    You specify each grantee as a type=value pair, where the type is one of the + /// following:

    + ///
      + ///
    • + ///

      + /// id – if the value specified is the canonical user ID of an + /// Amazon Web Services account

      + ///
    • + ///
    • + ///

      + /// uri – if you are granting permissions to a predefined group

      + ///
    • + ///
    • + ///

      + /// emailAddress – if the value specified is the email address of an + /// Amazon Web Services account

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    + ///

    + /// x-amz-grant-read: id="11112222333", id="444455556666" + ///

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_write_acp: Option, -///

    Object key for which the multipart upload is to be initiated.

    + ///

    Object key for which the multipart upload is to be initiated.

    pub key: ObjectKey, -///

    A map of metadata to store with the object in S3.

    + ///

    A map of metadata to store with the object in S3.

    pub metadata: Option, -///

    Specifies whether you want to apply a legal hold to the uploaded object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies whether you want to apply a legal hold to the uploaded object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_legal_hold_status: Option, -///

    Specifies the Object Lock mode that you want to apply to the uploaded object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the Object Lock mode that you want to apply to the uploaded object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_mode: Option, -///

    Specifies the date and time when you want the Object Lock to expire.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the date and time when you want the Object Lock to expire.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_retain_until_date: Option, pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to -/// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption -/// key was transmitted without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to + /// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption + /// key was transmitted without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key_md5: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + ///

    Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, -///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same -/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    -///

    -/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS -/// key to use. If you specify -/// x-amz-server-side-encryption:aws:kms or -/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key -/// (aws/s3) to protect the data.

    -///

    -/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the -/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses -/// the bucket's default KMS customer managed key ID. If you want to explicitly set the -/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -/// -/// Incorrect key specification results in an HTTP 400 Bad Request error.

    + ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same + /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    + ///

    + /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS + /// key to use. If you specify + /// x-amz-server-side-encryption:aws:kms or + /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key + /// (aws/s3) to protect the data.

    + ///

    + /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the + /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses + /// the bucket's default KMS customer managed key ID. If you want to explicitly set the + /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + /// + /// Incorrect key specification results in an HTTP 400 Bad Request error.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms).

    -///
      -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. -/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. -/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and -/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. -///

      -/// -///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the -/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. -/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), -/// the encryption request headers must match the default encryption configuration of the directory bucket. -/// -///

      -///
      -///
    • -///
    + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms).

    + ///
      + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. + /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. + /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and + /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. + ///

      + /// + ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the + /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. + /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), + /// the encryption request headers must match the default encryption configuration of the directory bucket. + /// + ///

      + ///
      + ///
    • + ///
    pub server_side_encryption: Option, -///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The -/// STANDARD storage class provides high durability and high availability. Depending on -/// performance needs, you can specify a different Storage Class. For more information, see -/// Storage -/// Classes in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      For directory buckets, only the S3 Express One Zone storage class is supported to store -/// newly created objects.

      -///
    • -///
    • -///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      -///
    • -///
    -///
    + ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The + /// STANDARD storage class provides high durability and high availability. Depending on + /// performance needs, you can specify a different Storage Class. For more information, see + /// Storage + /// Classes in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store + /// newly created objects.

      + ///
    • + ///
    • + ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      + ///
    • + ///
    + ///
    pub storage_class: Option, -///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub tagging: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub website_redirect_location: Option, } impl fmt::Debug for CreateMultipartUploadInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateMultipartUploadInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tagging { -d.field("tagging", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateMultipartUploadInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + d.finish_non_exhaustive() + } } impl CreateMultipartUploadInput { -#[must_use] -pub fn builder() -> builders::CreateMultipartUploadInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CreateMultipartUploadInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct CreateMultipartUploadOutput { -///

    If the bucket has a lifecycle rule configured with an action to abort incomplete -/// multipart uploads and the prefix in the lifecycle rule matches the object name in the -/// request, the response includes this header. The header indicates when the initiated -/// multipart upload becomes eligible for an abort operation. For more information, see -/// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in -/// the Amazon S3 User Guide.

    -///

    The response also includes the x-amz-abort-rule-id header that provides the -/// ID of the lifecycle configuration rule that defines the abort action.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If the bucket has a lifecycle rule configured with an action to abort incomplete + /// multipart uploads and the prefix in the lifecycle rule matches the object name in the + /// request, the response includes this header. The header indicates when the initiated + /// multipart upload becomes eligible for an abort operation. For more information, see + /// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in + /// the Amazon S3 User Guide.

    + ///

    The response also includes the x-amz-abort-rule-id header that provides the + /// ID of the lifecycle configuration rule that defines the abort action.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub abort_date: Option, -///

    This header is returned along with the x-amz-abort-date header. It -/// identifies the applicable lifecycle configuration rule that defines the action to abort -/// incomplete multipart uploads.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    This header is returned along with the x-amz-abort-date header. It + /// identifies the applicable lifecycle configuration rule that defines the action to abort + /// incomplete multipart uploads.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub abort_rule_id: Option, -///

    The name of the bucket to which the multipart upload was initiated. Does not return the -/// access point ARN or access point alias if used.

    -/// -///

    Access points are not supported by directory buckets.

    -///
    + ///

    The name of the bucket to which the multipart upload was initiated. Does not return the + /// access point ARN or access point alias if used.

    + /// + ///

    Access points are not supported by directory buckets.

    + ///
    pub bucket: Option, -///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    + ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    pub bucket_key_enabled: Option, -///

    The algorithm that was used to create a checksum of the object.

    + ///

    The algorithm that was used to create a checksum of the object.

    pub checksum_algorithm: Option, -///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s -/// checksum value. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s + /// checksum value. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    Object key for which the multipart upload was initiated.

    + ///

    Object key for which the multipart upload was initiated.

    pub key: Option, pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key_md5: Option, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    pub ssekms_encryption_context: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms).

    + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms).

    pub server_side_encryption: Option, -///

    ID for the initiated multipart upload.

    + ///

    ID for the initiated multipart upload.

    pub upload_id: Option, } impl fmt::Debug for CreateMultipartUploadOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateMultipartUploadOutput"); -if let Some(ref val) = self.abort_date { -d.field("abort_date", val); -} -if let Some(ref val) = self.abort_rule_id { -d.field("abort_rule_id", val); -} -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.upload_id { -d.field("upload_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateMultipartUploadOutput"); + if let Some(ref val) = self.abort_date { + d.field("abort_date", val); + } + if let Some(ref val) = self.abort_rule_id { + d.field("abort_rule_id", val); + } + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.upload_id { + d.field("upload_id", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct CreateSessionInput { -///

    The name of the bucket that you create a session for.

    + ///

    The name of the bucket that you create a session for.

    pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using KMS keys (SSE-KMS).

    -///

    S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using KMS keys (SSE-KMS).

    + ///

    S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    pub bucket_key_enabled: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets passed on -/// to Amazon Web Services KMS for future GetObject operations on -/// this object.

    -///

    -/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets passed on + /// to Amazon Web Services KMS for future GetObject operations on + /// this object.

    + ///

    + /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, -///

    If you specify x-amz-server-side-encryption with aws:kms, you must specify the -/// x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS -/// symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same -/// account that't issuing the command, you must use the full Key ARN not the Key ID.

    -///

    Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -///

    + ///

    If you specify x-amz-server-side-encryption with aws:kms, you must specify the + /// x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS + /// symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same + /// account that't issuing the command, you must use the full Key ARN not the Key ID.

    + ///

    Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + ///

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm to use when you store objects in the directory bucket.

    -///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. -/// For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    + ///

    The server-side encryption algorithm to use when you store objects in the directory bucket.

    + ///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. + /// For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    pub server_side_encryption: Option, -///

    Specifies the mode of the session that will be created, either ReadWrite or -/// ReadOnly. By default, a ReadWrite session is created. A -/// ReadWrite session is capable of executing all the Zonal endpoint API operations on a -/// directory bucket. A ReadOnly session is constrained to execute the following -/// Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2, -/// GetObjectAttributes, ListParts, and -/// ListMultipartUploads.

    + ///

    Specifies the mode of the session that will be created, either ReadWrite or + /// ReadOnly. By default, a ReadWrite session is created. A + /// ReadWrite session is capable of executing all the Zonal endpoint API operations on a + /// directory bucket. A ReadOnly session is constrained to execute the following + /// Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2, + /// GetObjectAttributes, ListParts, and + /// ListMultipartUploads.

    pub session_mode: Option, } impl fmt::Debug for CreateSessionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateSessionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.session_mode { -d.field("session_mode", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateSessionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.session_mode { + d.field("session_mode", val); + } + d.finish_non_exhaustive() + } } impl CreateSessionInput { -#[must_use] -pub fn builder() -> builders::CreateSessionInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CreateSessionInputBuilder { + default() + } } #[derive(Clone, PartialEq)] pub struct CreateSessionOutput { -///

    Indicates whether to use an S3 Bucket Key for server-side encryption -/// with KMS keys (SSE-KMS).

    + ///

    Indicates whether to use an S3 Bucket Key for server-side encryption + /// with KMS keys (SSE-KMS).

    pub bucket_key_enabled: Option, -///

    The established temporary security credentials for the created session.

    + ///

    The established temporary security credentials for the created session.

    pub credentials: SessionCredentials, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets -/// passed on to Amazon Web Services KMS for future GetObject -/// operations on this object.

    + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets + /// passed on to Amazon Web Services KMS for future GetObject + /// operations on this object.

    pub ssekms_encryption_context: Option, -///

    If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS -/// symmetric encryption customer managed key that was used for object encryption.

    + ///

    If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS + /// symmetric encryption customer managed key that was used for object encryption.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store objects in the directory bucket.

    + ///

    The server-side encryption algorithm used when you store objects in the directory bucket.

    pub server_side_encryption: Option, } impl fmt::Debug for CreateSessionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateSessionOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -d.field("credentials", &self.credentials); -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateSessionOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + d.field("credentials", &self.credentials); + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + d.finish_non_exhaustive() + } } impl Default for CreateSessionOutput { -fn default() -> Self { -Self { -bucket_key_enabled: None, -credentials: default(), -ssekms_encryption_context: None, -ssekms_key_id: None, -server_side_encryption: None, -} -} + fn default() -> Self { + Self { + bucket_key_enabled: None, + credentials: default(), + ssekms_encryption_context: None, + ssekms_key_id: None, + server_side_encryption: None, + } + } } - pub type CreationDate = Timestamp; ///

    Amazon Web Services credentials for API authentication.

    #[derive(Clone, PartialEq)] pub struct Credentials { -///

    The access key ID that identifies the temporary security credentials.

    + ///

    The access key ID that identifies the temporary security credentials.

    pub access_key_id: AccessKeyIdType, -///

    The date on which the current credentials expire.

    + ///

    The date on which the current credentials expire.

    pub expiration: DateType, -///

    The secret access key that can be used to sign requests.

    + ///

    The secret access key that can be used to sign requests.

    pub secret_access_key: AccessKeySecretType, -///

    The token that users must pass to the service API to use the temporary -/// credentials.

    + ///

    The token that users must pass to the service API to use the temporary + /// credentials.

    pub session_token: TokenType, } impl fmt::Debug for Credentials { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Credentials"); -d.field("access_key_id", &self.access_key_id); -d.field("expiration", &self.expiration); -d.field("secret_access_key", &self.secret_access_key); -d.field("session_token", &self.session_token); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Credentials"); + d.field("access_key_id", &self.access_key_id); + d.field("expiration", &self.expiration); + d.field("secret_access_key", &self.secret_access_key); + d.field("session_token", &self.session_token); + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DataRedundancy(Cow<'static, str>); impl DataRedundancy { -pub const SINGLE_AVAILABILITY_ZONE: &'static str = "SingleAvailabilityZone"; + pub const SINGLE_AVAILABILITY_ZONE: &'static str = "SingleAvailabilityZone"; -pub const SINGLE_LOCAL_ZONE: &'static str = "SingleLocalZone"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const SINGLE_LOCAL_ZONE: &'static str = "SingleLocalZone"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for DataRedundancy { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: DataRedundancy) -> Self { -s.0 -} + fn from(s: DataRedundancy) -> Self { + s.0 + } } impl FromStr for DataRedundancy { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type Date = Timestamp; @@ -3979,684 +3922,653 @@ pub type DaysAfterInitiation = i32; /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DefaultRetention { -///

    The number of days that you want to specify for the default retention period. Must be -/// used with Mode.

    + ///

    The number of days that you want to specify for the default retention period. Must be + /// used with Mode.

    pub days: Option, -///

    The default Object Lock retention mode you want to apply to new objects placed in the -/// specified bucket. Must be used with either Days or Years.

    + ///

    The default Object Lock retention mode you want to apply to new objects placed in the + /// specified bucket. Must be used with either Days or Years.

    pub mode: Option, -///

    The number of years that you want to specify for the default retention period. Must be -/// used with Mode.

    + ///

    The number of years that you want to specify for the default retention period. Must be + /// used with Mode.

    pub years: Option, } impl fmt::Debug for DefaultRetention { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DefaultRetention"); -if let Some(ref val) = self.days { -d.field("days", val); -} -if let Some(ref val) = self.mode { -d.field("mode", val); -} -if let Some(ref val) = self.years { -d.field("years", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DefaultRetention"); + if let Some(ref val) = self.days { + d.field("days", val); + } + if let Some(ref val) = self.mode { + d.field("mode", val); + } + if let Some(ref val) = self.years { + d.field("years", val); + } + d.finish_non_exhaustive() + } } - ///

    Container for the objects to delete.

    #[derive(Clone, Default, PartialEq)] pub struct Delete { -///

    The object to delete.

    -/// -///

    -/// Directory buckets - For directory buckets, -/// an object that's composed entirely of whitespace characters is not supported by the -/// DeleteObjects API operation. The request will receive a 400 Bad -/// Request error and none of the objects in the request will be deleted.

    -///
    + ///

    The object to delete.

    + /// + ///

    + /// Directory buckets - For directory buckets, + /// an object that's composed entirely of whitespace characters is not supported by the + /// DeleteObjects API operation. The request will receive a 400 Bad + /// Request error and none of the objects in the request will be deleted.

    + ///
    pub objects: ObjectIdentifierList, -///

    Element to enable quiet mode for the request. When you add this element, you must set -/// its value to true.

    + ///

    Element to enable quiet mode for the request. When you add this element, you must set + /// its value to true.

    pub quiet: Option, } impl fmt::Debug for Delete { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Delete"); -d.field("objects", &self.objects); -if let Some(ref val) = self.quiet { -d.field("quiet", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Delete"); + d.field("objects", &self.objects); + if let Some(ref val) = self.quiet { + d.field("quiet", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketAnalyticsConfigurationInput { -///

    The name of the bucket from which an analytics configuration is deleted.

    + ///

    The name of the bucket from which an analytics configuration is deleted.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The ID that identifies the analytics configuration.

    + ///

    The ID that identifies the analytics configuration.

    pub id: AnalyticsId, } impl fmt::Debug for DeleteBucketAnalyticsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } impl DeleteBucketAnalyticsConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketAnalyticsConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketAnalyticsConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketAnalyticsConfigurationOutput { -} +pub struct DeleteBucketAnalyticsConfigurationOutput {} impl fmt::Debug for DeleteBucketAnalyticsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketCorsInput { -///

    Specifies the bucket whose cors configuration is being deleted.

    + ///

    Specifies the bucket whose cors configuration is being deleted.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketCorsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketCorsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketCorsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketCorsInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketCorsInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketCorsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketCorsOutput { -} +pub struct DeleteBucketCorsOutput {} impl fmt::Debug for DeleteBucketCorsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketCorsOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketCorsOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketEncryptionInput { -///

    The name of the bucket containing the server-side encryption configuration to -/// delete.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    + ///

    The name of the bucket containing the server-side encryption configuration to + /// delete.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketEncryptionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketEncryptionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketEncryptionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketEncryptionInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketEncryptionInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketEncryptionInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketEncryptionOutput { -} +pub struct DeleteBucketEncryptionOutput {} impl fmt::Debug for DeleteBucketEncryptionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketEncryptionOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketEncryptionOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketInput { -///

    Specifies the bucket being deleted.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    + ///

    Specifies the bucket being deleted.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketIntelligentTieringConfigurationInput { -///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    pub bucket: BucketName, -///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    pub id: IntelligentTieringId, } impl fmt::Debug for DeleteBucketIntelligentTieringConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationInput"); -d.field("bucket", &self.bucket); -d.field("id", &self.id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationInput"); + d.field("bucket", &self.bucket); + d.field("id", &self.id); + d.finish_non_exhaustive() + } } impl DeleteBucketIntelligentTieringConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketIntelligentTieringConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketIntelligentTieringConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketIntelligentTieringConfigurationOutput { -} +pub struct DeleteBucketIntelligentTieringConfigurationOutput {} impl fmt::Debug for DeleteBucketIntelligentTieringConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketInventoryConfigurationInput { -///

    The name of the bucket containing the inventory configuration to delete.

    + ///

    The name of the bucket containing the inventory configuration to delete.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The ID used to identify the inventory configuration.

    + ///

    The ID used to identify the inventory configuration.

    pub id: InventoryId, } impl fmt::Debug for DeleteBucketInventoryConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketInventoryConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketInventoryConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } impl DeleteBucketInventoryConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketInventoryConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketInventoryConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketInventoryConfigurationOutput { -} +pub struct DeleteBucketInventoryConfigurationOutput {} impl fmt::Debug for DeleteBucketInventoryConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketInventoryConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketInventoryConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketLifecycleInput { -///

    The bucket name of the lifecycle to delete.

    + ///

    The bucket name of the lifecycle to delete.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketLifecycleInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketLifecycleInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketLifecycleInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketLifecycleInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketLifecycleInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketLifecycleInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketLifecycleOutput { -} +pub struct DeleteBucketLifecycleOutput {} impl fmt::Debug for DeleteBucketLifecycleOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketLifecycleOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketLifecycleOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketMetadataTableConfigurationInput { -///

    -/// The general purpose bucket that you want to remove the metadata table configuration from. -///

    + ///

    + /// The general purpose bucket that you want to remove the metadata table configuration from. + ///

    pub bucket: BucketName, -///

    -/// The expected bucket owner of the general purpose bucket that you want to remove the -/// metadata table configuration from. -///

    + ///

    + /// The expected bucket owner of the general purpose bucket that you want to remove the + /// metadata table configuration from. + ///

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketMetadataTableConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketMetadataTableConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketMetadataTableConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketMetadataTableConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketMetadataTableConfigurationOutput { -} +pub struct DeleteBucketMetadataTableConfigurationOutput {} impl fmt::Debug for DeleteBucketMetadataTableConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketMetricsConfigurationInput { -///

    The name of the bucket containing the metrics configuration to delete.

    + ///

    The name of the bucket containing the metrics configuration to delete.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and -/// can only contain letters, numbers, periods, dashes, and underscores.

    + ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and + /// can only contain letters, numbers, periods, dashes, and underscores.

    pub id: MetricsId, } impl fmt::Debug for DeleteBucketMetricsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketMetricsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketMetricsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } impl DeleteBucketMetricsConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketMetricsConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketMetricsConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketMetricsConfigurationOutput { -} +pub struct DeleteBucketMetricsConfigurationOutput {} impl fmt::Debug for DeleteBucketMetricsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketMetricsConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketMetricsConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketOutput { -} +pub struct DeleteBucketOutput {} impl fmt::Debug for DeleteBucketOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketOwnershipControlsInput { -///

    The Amazon S3 bucket whose OwnershipControls you want to delete.

    + ///

    The Amazon S3 bucket whose OwnershipControls you want to delete.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketOwnershipControlsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketOwnershipControlsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketOwnershipControlsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketOwnershipControlsInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketOwnershipControlsInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketOwnershipControlsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketOwnershipControlsOutput { -} +pub struct DeleteBucketOwnershipControlsOutput {} impl fmt::Debug for DeleteBucketOwnershipControlsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketOwnershipControlsOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketOwnershipControlsOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketPolicyInput { -///

    The bucket name.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    + ///

    The bucket name.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketPolicyInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketPolicyInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketPolicyInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketPolicyInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketPolicyInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketPolicyInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketPolicyOutput { -} +pub struct DeleteBucketPolicyOutput {} impl fmt::Debug for DeleteBucketPolicyOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketPolicyOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketPolicyOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketReplicationInput { -///

    The bucket name.

    + ///

    The bucket name.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketReplicationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketReplicationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketReplicationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketReplicationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketReplicationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketReplicationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketReplicationOutput { -} +pub struct DeleteBucketReplicationOutput {} impl fmt::Debug for DeleteBucketReplicationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketReplicationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketReplicationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketTaggingInput { -///

    The bucket that has the tag set to be removed.

    + ///

    The bucket that has the tag set to be removed.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketTaggingInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketTaggingInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketTaggingInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketTaggingOutput { -} +pub struct DeleteBucketTaggingOutput {} impl fmt::Debug for DeleteBucketTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketTaggingOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketTaggingOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketWebsiteInput { -///

    The bucket name for which you want to remove the website configuration.

    + ///

    The bucket name for which you want to remove the website configuration.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketWebsiteInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketWebsiteInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketWebsiteInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketWebsiteInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketWebsiteInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketWebsiteInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketWebsiteOutput { -} +pub struct DeleteBucketWebsiteOutput {} impl fmt::Debug for DeleteBucketWebsiteOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketWebsiteOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketWebsiteOutput"); + d.finish_non_exhaustive() + } } - pub type DeleteMarker = bool; ///

    Information about the delete marker.

    #[derive(Clone, Default, PartialEq)] pub struct DeleteMarkerEntry { -///

    Specifies whether the object is (true) or is not (false) the latest version of an -/// object.

    + ///

    Specifies whether the object is (true) or is not (false) the latest version of an + /// object.

    pub is_latest: Option, -///

    The object key.

    + ///

    The object key.

    pub key: Option, -///

    Date and time when the object was last modified.

    + ///

    Date and time when the object was last modified.

    pub last_modified: Option, -///

    The account that created the delete marker.

    + ///

    The account that created the delete marker.

    pub owner: Option, -///

    Version ID of an object.

    + ///

    Version ID of an object.

    pub version_id: Option, } impl fmt::Debug for DeleteMarkerEntry { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteMarkerEntry"); -if let Some(ref val) = self.is_latest { -d.field("is_latest", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteMarkerEntry"); + if let Some(ref val) = self.is_latest { + d.field("is_latest", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - ///

    Specifies whether Amazon S3 replicates delete markers. If you specify a Filter /// in your replication configuration, you must also include a /// DeleteMarkerReplication element. If your Filter includes a @@ -4671,61 +4583,59 @@ d.finish_non_exhaustive() /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DeleteMarkerReplication { -///

    Indicates whether to replicate delete markers.

    -/// -///

    Indicates whether to replicate delete markers.

    -///
    + ///

    Indicates whether to replicate delete markers.

    + /// + ///

    Indicates whether to replicate delete markers.

    + ///
    pub status: Option, } impl fmt::Debug for DeleteMarkerReplication { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteMarkerReplication"); -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteMarkerReplication"); + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeleteMarkerReplicationStatus(Cow<'static, str>); impl DeleteMarkerReplicationStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; + pub const DISABLED: &'static str = "Disabled"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for DeleteMarkerReplicationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: DeleteMarkerReplicationStatus) -> Self { -s.0 -} + fn from(s: DeleteMarkerReplicationStatus) -> Self { + s.0 + } } impl FromStr for DeleteMarkerReplicationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type DeleteMarkerVersionId = String; @@ -4734,448 +4644,442 @@ pub type DeleteMarkers = List; #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectInput { -///

    The bucket name of the bucket containing the object.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The bucket name of the bucket containing the object.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process -/// this operation. To use this header, you must have the -/// s3:BypassGovernanceRetention permission.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process + /// this operation. To use this header, you must have the + /// s3:BypassGovernanceRetention permission.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub bypass_governance_retention: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns -/// a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No -/// Content) response.

    -///

    For more information about conditional requests, see RFC 7232.

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    + ///

    The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns + /// a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No + /// Content) response.

    + ///

    For more information about conditional requests, see RFC 7232.

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    pub if_match: Option, -///

    If present, the object is deleted only if its modification times matches the provided -/// Timestamp. If the Timestamp values do not match, the operation -/// returns a 412 Precondition Failed error. If the Timestamp matches -/// or if the object doesn’t exist, the operation returns a 204 Success (No -/// Content) response.

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    + ///

    If present, the object is deleted only if its modification times matches the provided + /// Timestamp. If the Timestamp values do not match, the operation + /// returns a 412 Precondition Failed error. If the Timestamp matches + /// or if the object doesn’t exist, the operation returns a 204 Success (No + /// Content) response.

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    pub if_match_last_modified_time: Option, -///

    If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn’t exist, -/// the operation returns a 204 Success (No Content) response.

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    -/// -///

    You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size -/// conditional headers in conjunction with each-other or individually.

    -///
    + ///

    If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn’t exist, + /// the operation returns a 204 Success (No Content) response.

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    + /// + ///

    You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size + /// conditional headers in conjunction with each-other or individually.

    + ///
    pub if_match_size: Option, -///

    Key name of the object to delete.

    + ///

    Key name of the object to delete.

    pub key: ObjectKey, -///

    The concatenation of the authentication device's serial number, a space, and the value -/// that is displayed on your authentication device. Required to permanently delete a versioned -/// object if versioning is configured with MFA delete enabled.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The concatenation of the authentication device's serial number, a space, and the value + /// that is displayed on your authentication device. Required to permanently delete a versioned + /// object if versioning is configured with MFA delete enabled.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub mfa: Option, pub request_payer: Option, -///

    Version ID used to reference a specific version of the object.

    -/// -///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    -///
    + ///

    Version ID used to reference a specific version of the object.

    + /// + ///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    + ///
    pub version_id: Option, } impl fmt::Debug for DeleteObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bypass_governance_retention { -d.field("bypass_governance_retention", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_match_last_modified_time { -d.field("if_match_last_modified_time", val); -} -if let Some(ref val) = self.if_match_size { -d.field("if_match_size", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.mfa { -d.field("mfa", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bypass_governance_retention { + d.field("bypass_governance_retention", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_match_last_modified_time { + d.field("if_match_last_modified_time", val); + } + if let Some(ref val) = self.if_match_size { + d.field("if_match_size", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.mfa { + d.field("mfa", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } impl DeleteObjectInput { -#[must_use] -pub fn builder() -> builders::DeleteObjectInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteObjectInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectOutput { -///

    Indicates whether the specified object version that was permanently deleted was (true) -/// or was not (false) a delete marker before deletion. In a simple DELETE, this header -/// indicates whether (true) or not (false) the current version of the object is a delete -/// marker. To learn more about delete markers, see Working with delete markers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Indicates whether the specified object version that was permanently deleted was (true) + /// or was not (false) a delete marker before deletion. In a simple DELETE, this header + /// indicates whether (true) or not (false) the current version of the object is a delete + /// marker. To learn more about delete markers, see Working with delete markers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub delete_marker: Option, pub request_charged: Option, -///

    Returns the version ID of the delete marker created as a result of the DELETE -/// operation.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Returns the version ID of the delete marker created as a result of the DELETE + /// operation.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub version_id: Option, } impl fmt::Debug for DeleteObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectOutput"); -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectOutput"); + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectTaggingInput { -///

    The bucket name containing the objects from which to remove the tags.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The bucket name containing the objects from which to remove the tags.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The key that identifies the object in the bucket from which to remove all tags.

    + ///

    The key that identifies the object in the bucket from which to remove all tags.

    pub key: ObjectKey, -///

    The versionId of the object that the tag-set will be removed from.

    + ///

    The versionId of the object that the tag-set will be removed from.

    pub version_id: Option, } impl fmt::Debug for DeleteObjectTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } impl DeleteObjectTaggingInput { -#[must_use] -pub fn builder() -> builders::DeleteObjectTaggingInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteObjectTaggingInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectTaggingOutput { -///

    The versionId of the object the tag-set was removed from.

    + ///

    The versionId of the object the tag-set was removed from.

    pub version_id: Option, } impl fmt::Debug for DeleteObjectTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectTaggingOutput"); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectTaggingOutput"); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, PartialEq)] pub struct DeleteObjectsInput { -///

    The bucket name containing the objects to delete.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The bucket name containing the objects to delete.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Specifies whether you want to delete this object even if it has a Governance-type Object -/// Lock in place. To use this header, you must have the -/// s3:BypassGovernanceRetention permission.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies whether you want to delete this object even if it has a Governance-type Object + /// Lock in place. To use this header, you must have the + /// s3:BypassGovernanceRetention permission.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub bypass_governance_retention: Option, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm -/// or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    -///

    For the x-amz-checksum-algorithm -/// header, replace -/// algorithm -/// with the supported algorithm from the following list:

    -///
      -///
    • -///

      -/// CRC32 -///

      -///
    • -///
    • -///

      -/// CRC32C -///

      -///
    • -///
    • -///

      -/// CRC64NVME -///

      -///
    • -///
    • -///

      -/// SHA1 -///

      -///
    • -///
    • -///

      -/// SHA256 -///

      -///
    • -///
    -///

    For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If the individual checksum value you provide through x-amz-checksum-algorithm -/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    + ///

    For the x-amz-checksum-algorithm + /// header, replace + /// algorithm + /// with the supported algorithm from the following list:

    + ///
      + ///
    • + ///

      + /// CRC32 + ///

      + ///
    • + ///
    • + ///

      + /// CRC32C + ///

      + ///
    • + ///
    • + ///

      + /// CRC64NVME + ///

      + ///
    • + ///
    • + ///

      + /// SHA1 + ///

      + ///
    • + ///
    • + ///

      + /// SHA256 + ///

      + ///
    • + ///
    + ///

    For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    pub checksum_algorithm: Option, -///

    Container for the request.

    + ///

    Container for the request.

    pub delete: Delete, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The concatenation of the authentication device's serial number, a space, and the value -/// that is displayed on your authentication device. Required to permanently delete a versioned -/// object if versioning is configured with MFA delete enabled.

    -///

    When performing the DeleteObjects operation on an MFA delete enabled -/// bucket, which attempts to delete the specified versioned objects, you must include an MFA -/// token. If you don't provide an MFA token, the entire request will fail, even if there are -/// non-versioned objects that you are trying to delete. If you provide an invalid token, -/// whether there are versioned object keys in the request or not, the entire Multi-Object -/// Delete request will fail. For information about MFA Delete, see MFA -/// Delete in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The concatenation of the authentication device's serial number, a space, and the value + /// that is displayed on your authentication device. Required to permanently delete a versioned + /// object if versioning is configured with MFA delete enabled.

    + ///

    When performing the DeleteObjects operation on an MFA delete enabled + /// bucket, which attempts to delete the specified versioned objects, you must include an MFA + /// token. If you don't provide an MFA token, the entire request will fail, even if there are + /// non-versioned objects that you are trying to delete. If you provide an invalid token, + /// whether there are versioned object keys in the request or not, the entire Multi-Object + /// Delete request will fail. For information about MFA Delete, see MFA + /// Delete in the Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub mfa: Option, pub request_payer: Option, } impl fmt::Debug for DeleteObjectsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bypass_governance_retention { -d.field("bypass_governance_retention", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -d.field("delete", &self.delete); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.mfa { -d.field("mfa", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bypass_governance_retention { + d.field("bypass_governance_retention", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + d.field("delete", &self.delete); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.mfa { + d.field("mfa", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.finish_non_exhaustive() + } } impl DeleteObjectsInput { -#[must_use] -pub fn builder() -> builders::DeleteObjectsInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteObjectsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectsOutput { -///

    Container element for a successful delete. It identifies the object that was -/// successfully deleted.

    + ///

    Container element for a successful delete. It identifies the object that was + /// successfully deleted.

    pub deleted: Option, -///

    Container for a failed delete action that describes the object that Amazon S3 attempted to -/// delete and the error it encountered.

    + ///

    Container for a failed delete action that describes the object that Amazon S3 attempted to + /// delete and the error it encountered.

    pub errors: Option, pub request_charged: Option, } impl fmt::Debug for DeleteObjectsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectsOutput"); -if let Some(ref val) = self.deleted { -d.field("deleted", val); -} -if let Some(ref val) = self.errors { -d.field("errors", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectsOutput"); + if let Some(ref val) = self.deleted { + d.field("deleted", val); + } + if let Some(ref val) = self.errors { + d.field("errors", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeletePublicAccessBlockInput { -///

    The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. -///

    + ///

    The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. + ///

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeletePublicAccessBlockInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeletePublicAccessBlockInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeletePublicAccessBlockInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeletePublicAccessBlockInput { -#[must_use] -pub fn builder() -> builders::DeletePublicAccessBlockInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeletePublicAccessBlockInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeletePublicAccessBlockOutput { -} +pub struct DeletePublicAccessBlockOutput {} impl fmt::Debug for DeletePublicAccessBlockOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeletePublicAccessBlockOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeletePublicAccessBlockOutput"); + d.finish_non_exhaustive() + } } - ///

    Information about the deleted object.

    #[derive(Clone, Default, PartialEq)] pub struct DeletedObject { -///

    Indicates whether the specified object version that was permanently deleted was (true) -/// or was not (false) a delete marker before deletion. In a simple DELETE, this header -/// indicates whether (true) or not (false) the current version of the object is a delete -/// marker. To learn more about delete markers, see Working with delete markers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Indicates whether the specified object version that was permanently deleted was (true) + /// or was not (false) a delete marker before deletion. In a simple DELETE, this header + /// indicates whether (true) or not (false) the current version of the object is a delete + /// marker. To learn more about delete markers, see Working with delete markers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub delete_marker: Option, -///

    The version ID of the delete marker created as a result of the DELETE operation. If you -/// delete a specific object version, the value returned by this header is the version ID of -/// the object version deleted.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The version ID of the delete marker created as a result of the DELETE operation. If you + /// delete a specific object version, the value returned by this header is the version ID of + /// the object version deleted.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub delete_marker_version_id: Option, -///

    The name of the deleted object.

    + ///

    The name of the deleted object.

    pub key: Option, -///

    The version ID of the deleted object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The version ID of the deleted object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub version_id: Option, } impl fmt::Debug for DeletedObject { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeletedObject"); -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.delete_marker_version_id { -d.field("delete_marker_version_id", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeletedObject"); + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.delete_marker_version_id { + d.field("delete_marker_version_id", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - pub type DeletedObjects = List; pub type Delimiter = String; @@ -5186,72 +5090,70 @@ pub type Description = String; /// Amazon S3 bucket and S3 Replication Time Control (S3 RTC).

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct Destination { -///

    Specify this only in a cross-account scenario (where source and destination bucket -/// owners are not the same), and you want to change replica ownership to the Amazon Web Services account -/// that owns the destination bucket. If this is not specified in the replication -/// configuration, the replicas are owned by same Amazon Web Services account that owns the source -/// object.

    + ///

    Specify this only in a cross-account scenario (where source and destination bucket + /// owners are not the same), and you want to change replica ownership to the Amazon Web Services account + /// that owns the destination bucket. If this is not specified in the replication + /// configuration, the replicas are owned by same Amazon Web Services account that owns the source + /// object.

    pub access_control_translation: Option, -///

    Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to -/// change replica ownership to the Amazon Web Services account that owns the destination bucket by -/// specifying the AccessControlTranslation property, this is the account ID of -/// the destination bucket owner. For more information, see Replication Additional -/// Configuration: Changing the Replica Owner in the -/// Amazon S3 User Guide.

    + ///

    Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to + /// change replica ownership to the Amazon Web Services account that owns the destination bucket by + /// specifying the AccessControlTranslation property, this is the account ID of + /// the destination bucket owner. For more information, see Replication Additional + /// Configuration: Changing the Replica Owner in the + /// Amazon S3 User Guide.

    pub account: Option, -///

    The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the -/// results.

    + ///

    The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the + /// results.

    pub bucket: BucketName, -///

    A container that provides information about encryption. If -/// SourceSelectionCriteria is specified, you must specify this element.

    + ///

    A container that provides information about encryption. If + /// SourceSelectionCriteria is specified, you must specify this element.

    pub encryption_configuration: Option, -///

    A container specifying replication metrics-related settings enabling replication -/// metrics and events.

    + ///

    A container specifying replication metrics-related settings enabling replication + /// metrics and events.

    pub metrics: Option, -///

    A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time -/// when all objects and operations on objects must be replicated. Must be specified together -/// with a Metrics block.

    + ///

    A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time + /// when all objects and operations on objects must be replicated. Must be specified together + /// with a Metrics block.

    pub replication_time: Option, -///

    The storage class to use when replicating objects, such as S3 Standard or reduced -/// redundancy. By default, Amazon S3 uses the storage class of the source object to create the -/// object replica.

    -///

    For valid values, see the StorageClass element of the PUT Bucket -/// replication action in the Amazon S3 API Reference.

    + ///

    The storage class to use when replicating objects, such as S3 Standard or reduced + /// redundancy. By default, Amazon S3 uses the storage class of the source object to create the + /// object replica.

    + ///

    For valid values, see the StorageClass element of the PUT Bucket + /// replication action in the Amazon S3 API Reference.

    pub storage_class: Option, } impl fmt::Debug for Destination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Destination"); -if let Some(ref val) = self.access_control_translation { -d.field("access_control_translation", val); -} -if let Some(ref val) = self.account { -d.field("account", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.encryption_configuration { -d.field("encryption_configuration", val); -} -if let Some(ref val) = self.metrics { -d.field("metrics", val); -} -if let Some(ref val) = self.replication_time { -d.field("replication_time", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Destination"); + if let Some(ref val) = self.access_control_translation { + d.field("access_control_translation", val); + } + if let Some(ref val) = self.account { + d.field("account", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.encryption_configuration { + d.field("encryption_configuration", val); + } + if let Some(ref val) = self.metrics { + d.field("metrics", val); + } + if let Some(ref val) = self.replication_time { + d.field("replication_time", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } - pub type DirectoryBucketToken = String; pub type DisplayName = String; - pub type EmailAddress = String; pub type EnableRequestProgress = bool; @@ -5273,70 +5175,68 @@ pub type EnableRequestProgress = bool; pub struct EncodingType(Cow<'static, str>); impl EncodingType { -pub const URL: &'static str = "url"; + pub const URL: &'static str = "url"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for EncodingType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: EncodingType) -> Self { -s.0 -} + fn from(s: EncodingType) -> Self { + s.0 + } } impl FromStr for EncodingType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    Contains the type of server-side encryption used.

    #[derive(Clone, PartialEq)] pub struct Encryption { -///

    The server-side encryption algorithm used when storing job results in Amazon S3 (for example, -/// AES256, aws:kms).

    + ///

    The server-side encryption algorithm used when storing job results in Amazon S3 (for example, + /// AES256, aws:kms).

    pub encryption_type: ServerSideEncryption, -///

    If the encryption type is aws:kms, this optional value can be used to -/// specify the encryption context for the restore results.

    + ///

    If the encryption type is aws:kms, this optional value can be used to + /// specify the encryption context for the restore results.

    pub kms_context: Option, -///

    If the encryption type is aws:kms, this optional value specifies the ID of -/// the symmetric encryption customer managed key to use for encryption of job results. Amazon S3 only -/// supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service -/// Developer Guide.

    + ///

    If the encryption type is aws:kms, this optional value specifies the ID of + /// the symmetric encryption customer managed key to use for encryption of job results. Amazon S3 only + /// supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service + /// Developer Guide.

    pub kms_key_id: Option, } impl fmt::Debug for Encryption { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Encryption"); -d.field("encryption_type", &self.encryption_type); -if let Some(ref val) = self.kms_context { -d.field("kms_context", val); -} -if let Some(ref val) = self.kms_key_id { -d.field("kms_key_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Encryption"); + d.field("encryption_type", &self.encryption_type); + if let Some(ref val) = self.kms_context { + d.field("kms_context", val); + } + if let Some(ref val) = self.kms_key_id { + d.field("kms_key_id", val); + } + d.finish_non_exhaustive() + } } - ///

    Specifies encryption-related information for an Amazon S3 bucket that is a destination for /// replicated objects.

    /// @@ -5347,33048 +5247,32656 @@ d.finish_non_exhaustive() /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct EncryptionConfiguration { -///

    Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in -/// Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to -/// encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more -/// information, see Asymmetric keys in Amazon Web Services -/// KMS in the Amazon Web Services Key Management Service Developer -/// Guide.

    + ///

    Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in + /// Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to + /// encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more + /// information, see Asymmetric keys in Amazon Web Services + /// KMS in the Amazon Web Services Key Management Service Developer + /// Guide.

    pub replica_kms_key_id: Option, } impl fmt::Debug for EncryptionConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("EncryptionConfiguration"); -if let Some(ref val) = self.replica_kms_key_id { -d.field("replica_kms_key_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("EncryptionConfiguration"); + if let Some(ref val) = self.replica_kms_key_id { + d.field("replica_kms_key_id", val); + } + d.finish_non_exhaustive() + } } - ///

    -/// The existing object was created with a different encryption type. -/// Subsequent write requests must include the appropriate encryption +/// The existing object was created with a different encryption type. +/// Subsequent write requests must include the appropriate encryption /// parameters in the request or while creating the session. ///

    #[derive(Clone, Default, PartialEq)] -pub struct EncryptionTypeMismatch { -} +pub struct EncryptionTypeMismatch {} impl fmt::Debug for EncryptionTypeMismatch { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("EncryptionTypeMismatch"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("EncryptionTypeMismatch"); + d.finish_non_exhaustive() + } } - pub type End = i64; ///

    A message that indicates the request is complete and no more messages will be sent. You /// should not assume that the request is complete until the client receives an /// EndEvent.

    #[derive(Clone, Default, PartialEq)] -pub struct EndEvent { -} +pub struct EndEvent {} impl fmt::Debug for EndEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("EndEvent"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("EndEvent"); + d.finish_non_exhaustive() + } } - ///

    Container for all error elements.

    #[derive(Clone, Default, PartialEq)] pub struct Error { -///

    The error code is a string that uniquely identifies an error condition. It is meant to -/// be read and understood by programs that detect and handle errors by type. The following is -/// a list of Amazon S3 error codes. For more information, see Error responses.

    -///
      -///
    • -///
        -///
      • -///

        -/// Code: AccessDenied

        -///
      • -///
      • -///

        -/// Description: Access Denied

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • + ///

        The error code is a string that uniquely identifies an error condition. It is meant to + /// be read and understood by programs that detect and handle errors by type. The following is + /// a list of Amazon S3 error codes. For more information, see Error responses.

        + ///
          + ///
        • + ///
            + ///
          • + ///

            + /// Code: AccessDenied

            + ///
          • + ///
          • + ///

            + /// Description: Access Denied

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: AccountProblem

            + ///
          • + ///
          • + ///

            + /// Description: There is a problem with your Amazon Web Services account + /// that prevents the action from completing successfully. Contact Amazon Web Services Support + /// for further assistance.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: AllAccessDisabled

            + ///
          • + ///
          • + ///

            + /// Description: All access to this Amazon S3 resource has been + /// disabled. Contact Amazon Web Services Support for further assistance.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: AmbiguousGrantByEmailAddress

            + ///
          • + ///
          • + ///

            + /// Description: The email address you provided is + /// associated with more than one account.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: AuthorizationHeaderMalformed

            + ///
          • + ///
          • + ///

            + /// Description: The authorization header you provided is + /// invalid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: BadDigest

            + ///
          • + ///
          • + ///

            + /// Description: The Content-MD5 you specified did not + /// match what we received.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: BucketAlreadyExists

            + ///
          • + ///
          • + ///

            + /// Description: The requested bucket name is not + /// available. The bucket namespace is shared by all users of the system. Please + /// select a different name and try again.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: BucketAlreadyOwnedByYou

            + ///
          • + ///
          • + ///

            + /// Description: The bucket you tried to create already + /// exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in + /// the North Virginia Region. For legacy compatibility, if you re-create an + /// existing bucket that you already own in the North Virginia Region, Amazon S3 returns + /// 200 OK and resets the bucket access control lists (ACLs).

            + ///
          • + ///
          • + ///

            + /// Code: 409 Conflict (in all Regions except the North + /// Virginia Region)

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: BucketNotEmpty

            + ///
          • + ///
          • + ///

            + /// Description: The bucket you tried to delete is not + /// empty.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: CredentialsNotSupported

            + ///
          • + ///
          • + ///

            + /// Description: This request does not support + /// credentials.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: CrossLocationLoggingProhibited

            + ///
          • + ///
          • + ///

            + /// Description: Cross-location logging not allowed. + /// Buckets in one geographic location cannot log information to a bucket in + /// another location.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: EntityTooSmall

            + ///
          • + ///
          • + ///

            + /// Description: Your proposed upload is smaller than the + /// minimum allowed object size.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: EntityTooLarge

            + ///
          • + ///
          • + ///

            + /// Description: Your proposed upload exceeds the maximum + /// allowed object size.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: ExpiredToken

            + ///
          • + ///
          • + ///

            + /// Description: The provided token has expired.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: IllegalVersioningConfigurationException

            + ///
          • + ///
          • + ///

            + /// Description: Indicates that the versioning + /// configuration specified in the request is invalid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: IncompleteBody

            + ///
          • + ///
          • + ///

            + /// Description: You did not provide the number of bytes + /// specified by the Content-Length HTTP header

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: IncorrectNumberOfFilesInPostRequest

            + ///
          • + ///
          • + ///

            + /// Description: POST requires exactly one file upload per + /// request.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InlineDataTooLarge

            + ///
          • + ///
          • + ///

            + /// Description: Inline data exceeds the maximum allowed + /// size.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InternalError

            + ///
          • + ///
          • + ///

            + /// Description: We encountered an internal error. Please + /// try again.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 500 Internal Server Error

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Server

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidAccessKeyId

            + ///
          • + ///
          • + ///

            + /// Description: The Amazon Web Services access key ID you provided does + /// not exist in our records.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidAddressingHeader

            + ///
          • + ///
          • + ///

            + /// Description: You must specify the Anonymous + /// role.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: N/A

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidArgument

            + ///
          • + ///
          • + ///

            + /// Description: Invalid Argument

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidBucketName

            + ///
          • + ///
          • + ///

            + /// Description: The specified bucket is not valid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidBucketState

            + ///
          • + ///
          • + ///

            + /// Description: The request is not valid with the current + /// state of the bucket.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidDigest

            + ///
          • + ///
          • + ///

            + /// Description: The Content-MD5 you specified is not + /// valid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidEncryptionAlgorithmError

            + ///
          • + ///
          • + ///

            + /// Description: The encryption request you specified is + /// not valid. The valid value is AES256.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidLocationConstraint

            + ///
          • + ///
          • + ///

            + /// Description: The specified location constraint is not + /// valid. For more information about Regions, see How to Select + /// a Region for Your Buckets.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidObjectState

            + ///
          • + ///
          • + ///

            + /// Description: The action is not valid for the current + /// state of the object.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidPart

            + ///
          • + ///
          • + ///

            + /// Description: One or more of the specified parts could + /// not be found. The part might not have been uploaded, or the specified entity + /// tag might not have matched the part's entity tag.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidPartOrder

            + ///
          • + ///
          • + ///

            + /// Description: The list of parts was not in ascending + /// order. Parts list must be specified in order by part number.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidPayer

            + ///
          • + ///
          • + ///

            + /// Description: All access to this object has been + /// disabled. Please contact Amazon Web Services Support for further assistance.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidPolicyDocument

            + ///
          • + ///
          • + ///

            + /// Description: The content of the form does not meet the + /// conditions specified in the policy document.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRange

            + ///
          • + ///
          • + ///

            + /// Description: The requested range cannot be + /// satisfied.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 416 Requested Range Not + /// Satisfiable

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Please use + /// AWS4-HMAC-SHA256.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: SOAP requests must be made over an HTTPS + /// connection.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Acceleration is not + /// supported for buckets with non-DNS compliant names.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Acceleration is not + /// supported for buckets with periods (.) in their names.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Accelerate endpoint only + /// supports virtual style requests.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Accelerate is not configured + /// on this bucket.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Accelerate is disabled on + /// this bucket.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Acceleration is not + /// supported on this bucket. Contact Amazon Web Services Support for more information.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Acceleration cannot be + /// enabled on this bucket. Contact Amazon Web Services Support for more information.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidSecurity

            + ///
          • + ///
          • + ///

            + /// Description: The provided security credentials are not + /// valid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidSOAPRequest

            + ///
          • + ///
          • + ///

            + /// Description: The SOAP request body is invalid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidStorageClass

            + ///
          • + ///
          • + ///

            + /// Description: The storage class you specified is not + /// valid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidTargetBucketForLogging

            + ///
          • + ///
          • + ///

            + /// Description: The target bucket for logging does not + /// exist, is not owned by you, or does not have the appropriate grants for the + /// log-delivery group.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidToken

            + ///
          • + ///
          • + ///

            + /// Description: The provided token is malformed or + /// otherwise invalid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidURI

            + ///
          • + ///
          • + ///

            + /// Description: Couldn't parse the specified URI.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: KeyTooLongError

            + ///
          • + ///
          • + ///

            + /// Description: Your key is too long.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MalformedACLError

            + ///
          • + ///
          • + ///

            + /// Description: The XML you provided was not well-formed + /// or did not validate against our published schema.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MalformedPOSTRequest

            + ///
          • + ///
          • + ///

            + /// Description: The body of your POST request is not + /// well-formed multipart/form-data.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MalformedXML

            + ///
          • + ///
          • + ///

            + /// Description: This happens when the user sends malformed + /// XML (XML that doesn't conform to the published XSD) for the configuration. The + /// error message is, "The XML you provided was not well-formed or did not validate + /// against our published schema."

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MaxMessageLengthExceeded

            + ///
          • + ///
          • + ///

            + /// Description: Your request was too big.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MaxPostPreDataLengthExceededError

            + ///
          • + ///
          • + ///

            + /// Description: Your POST request fields preceding the + /// upload file were too large.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MetadataTooLarge

            + ///
          • + ///
          • + ///

            + /// Description: Your metadata headers exceed the maximum + /// allowed metadata size.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MethodNotAllowed

            + ///
          • + ///
          • + ///

            + /// Description: The specified method is not allowed + /// against this resource.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 405 Method Not Allowed

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingAttachment

            + ///
          • + ///
          • + ///

            + /// Description: A SOAP attachment was expected, but none + /// were found.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: N/A

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingContentLength

            + ///
          • + ///
          • + ///

            + /// Description: You must provide the Content-Length HTTP + /// header.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 411 Length Required

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingRequestBodyError

            + ///
          • + ///
          • + ///

            + /// Description: This happens when the user sends an empty + /// XML document as a request. The error message is, "Request body is empty." + ///

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingSecurityElement

            + ///
          • + ///
          • + ///

            + /// Description: The SOAP 1.1 request is missing a security + /// element.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingSecurityHeader

            + ///
          • + ///
          • + ///

            + /// Description: Your request is missing a required + /// header.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoLoggingStatusForKey

            + ///
          • + ///
          • + ///

            + /// Description: There is no such thing as a logging status + /// subresource for a key.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchBucket

            + ///
          • + ///
          • + ///

            + /// Description: The specified bucket does not + /// exist.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchBucketPolicy

            + ///
          • + ///
          • + ///

            + /// Description: The specified bucket does not have a + /// bucket policy.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchKey

            + ///
          • + ///
          • + ///

            + /// Description: The specified key does not exist.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchLifecycleConfiguration

            + ///
          • + ///
          • + ///

            + /// Description: The lifecycle configuration does not + /// exist.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchUpload

            + ///
          • + ///
          • + ///

            + /// Description: The specified multipart upload does not + /// exist. The upload ID might be invalid, or the multipart upload might have been + /// aborted or completed.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchVersion

            + ///
          • + ///
          • + ///

            + /// Description: Indicates that the version ID specified in + /// the request does not match an existing version.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NotImplemented

            + ///
          • + ///
          • + ///

            + /// Description: A header you provided implies + /// functionality that is not implemented.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 501 Not Implemented

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Server

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NotSignedUp

            + ///
          • + ///
          • + ///

            + /// Description: Your account is not signed up for the Amazon S3 + /// service. You must sign up before you can use Amazon S3. You can sign up at the + /// following URL: Amazon S3 + ///

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: OperationAborted

            + ///
          • + ///
          • + ///

            + /// Description: A conflicting conditional action is + /// currently in progress against this resource. Try again.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: PermanentRedirect

            + ///
          • + ///
          • + ///

            + /// Description: The bucket you are attempting to access + /// must be addressed using the specified endpoint. Send all future requests to + /// this endpoint.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 301 Moved Permanently

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: PreconditionFailed

            + ///
          • + ///
          • + ///

            + /// Description: At least one of the preconditions you + /// specified did not hold.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 412 Precondition Failed

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: Redirect

            + ///
          • + ///
          • + ///

            + /// Description: Temporary redirect.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 307 Moved Temporarily

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RestoreAlreadyInProgress

            + ///
          • + ///
          • + ///

            + /// Description: Object restore is already in + /// progress.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RequestIsNotMultiPartContent

            + ///
          • + ///
          • + ///

            + /// Description: Bucket POST must be of the enclosure-type + /// multipart/form-data.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RequestTimeout

            + ///
          • + ///
          • + ///

            + /// Description: Your socket connection to the server was + /// not read from or written to within the timeout period.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RequestTimeTooSkewed

            + ///
          • + ///
          • + ///

            + /// Description: The difference between the request time + /// and the server's time is too large.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RequestTorrentOfBucketError

            + ///
          • + ///
          • + ///

            + /// Description: Requesting the torrent file of a bucket is + /// not permitted.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: SignatureDoesNotMatch

            + ///
          • + ///
          • + ///

            + /// Description: The request signature we calculated does + /// not match the signature you provided. Check your Amazon Web Services secret access key and + /// signing method. For more information, see REST + /// Authentication and SOAP + /// Authentication for details.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: ServiceUnavailable

            + ///
          • + ///
          • + ///

            + /// Description: Service is unable to handle + /// request.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 503 Service Unavailable

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Server

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: SlowDown

            + ///
          • + ///
          • + ///

            + /// Description: Reduce your request rate.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 503 Slow Down

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Server

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: TemporaryRedirect

            + ///
          • + ///
          • + ///

            + /// Description: You are being redirected to the bucket + /// while DNS updates.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 307 Moved Temporarily

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: TokenRefreshRequired

            + ///
          • + ///
          • + ///

            + /// Description: The provided token must be + /// refreshed.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: TooManyBuckets

            + ///
          • + ///
          • + ///

            + /// Description: You have attempted to create more buckets + /// than allowed.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: UnexpectedContent

            + ///
          • + ///
          • + ///

            + /// Description: This request does not support + /// content.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: UnresolvableGrantByEmailAddress

            + ///
          • + ///
          • + ///

            + /// Description: The email address you provided does not + /// match any account on record.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: UserKeyMustBeSpecified

            + ///
          • + ///
          • + ///

            + /// Description: The bucket POST must contain the specified + /// field name. If it is specified, check the order of the fields.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        + ///

        + pub code: Option, + ///

        The error key.

        + pub key: Option, + ///

        The error message contains a generic description of the error condition in English. It + /// is intended for a human audience. Simple programs display the message directly to the end + /// user if they encounter an error condition they don't know how or don't care to handle. + /// Sophisticated programs with more exhaustive error handling and proper internationalization + /// are more likely to ignore the error message.

        + pub message: Option, + ///

        The version ID of the error.

        + /// + ///

        This functionality is not supported for directory buckets.

        + ///
        + pub version_id: Option, +} + +impl fmt::Debug for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Error"); + if let Some(ref val) = self.code { + d.field("code", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.message { + d.field("message", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } +} + +pub type ErrorCode = String; + ///

        -/// Code: AccountProblem

        -///
      • -///
      • -///

        -/// Description: There is a problem with your Amazon Web Services account -/// that prevents the action from completing successfully. Contact Amazon Web Services Support -/// for further assistance.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: AllAccessDisabled

        -///
      • -///
      • -///

        -/// Description: All access to this Amazon S3 resource has been -/// disabled. Contact Amazon Web Services Support for further assistance.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: AmbiguousGrantByEmailAddress

        -///
      • -///
      • -///

        -/// Description: The email address you provided is -/// associated with more than one account.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: AuthorizationHeaderMalformed

        -///
      • -///
      • -///

        -/// Description: The authorization header you provided is -/// invalid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// HTTP Status Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: BadDigest

        -///
      • -///
      • -///

        -/// Description: The Content-MD5 you specified did not -/// match what we received.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: BucketAlreadyExists

        -///
      • -///
      • -///

        -/// Description: The requested bucket name is not -/// available. The bucket namespace is shared by all users of the system. Please -/// select a different name and try again.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: BucketAlreadyOwnedByYou

        -///
      • -///
      • -///

        -/// Description: The bucket you tried to create already -/// exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in -/// the North Virginia Region. For legacy compatibility, if you re-create an -/// existing bucket that you already own in the North Virginia Region, Amazon S3 returns -/// 200 OK and resets the bucket access control lists (ACLs).

        -///
      • -///
      • -///

        -/// Code: 409 Conflict (in all Regions except the North -/// Virginia Region)

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: BucketNotEmpty

        -///
      • -///
      • -///

        -/// Description: The bucket you tried to delete is not -/// empty.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: CredentialsNotSupported

        -///
      • -///
      • -///

        -/// Description: This request does not support -/// credentials.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: CrossLocationLoggingProhibited

        -///
      • -///
      • -///

        -/// Description: Cross-location logging not allowed. -/// Buckets in one geographic location cannot log information to a bucket in -/// another location.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: EntityTooSmall

        -///
      • -///
      • -///

        -/// Description: Your proposed upload is smaller than the -/// minimum allowed object size.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: EntityTooLarge

        -///
      • -///
      • -///

        -/// Description: Your proposed upload exceeds the maximum -/// allowed object size.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: ExpiredToken

        -///
      • -///
      • -///

        -/// Description: The provided token has expired.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: IllegalVersioningConfigurationException

        -///
      • -///
      • -///

        -/// Description: Indicates that the versioning -/// configuration specified in the request is invalid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: IncompleteBody

        -///
      • -///
      • -///

        -/// Description: You did not provide the number of bytes -/// specified by the Content-Length HTTP header

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: IncorrectNumberOfFilesInPostRequest

        -///
      • -///
      • -///

        -/// Description: POST requires exactly one file upload per -/// request.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InlineDataTooLarge

        -///
      • -///
      • -///

        -/// Description: Inline data exceeds the maximum allowed -/// size.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InternalError

        -///
      • -///
      • -///

        -/// Description: We encountered an internal error. Please -/// try again.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 500 Internal Server Error

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Server

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidAccessKeyId

        -///
      • -///
      • -///

        -/// Description: The Amazon Web Services access key ID you provided does -/// not exist in our records.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidAddressingHeader

        -///
      • -///
      • -///

        -/// Description: You must specify the Anonymous -/// role.

        -///
      • -///
      • -///

        -/// HTTP Status Code: N/A

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidArgument

        -///
      • -///
      • -///

        -/// Description: Invalid Argument

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidBucketName

        -///
      • -///
      • -///

        -/// Description: The specified bucket is not valid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidBucketState

        -///
      • -///
      • -///

        -/// Description: The request is not valid with the current -/// state of the bucket.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidDigest

        -///
      • -///
      • -///

        -/// Description: The Content-MD5 you specified is not -/// valid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidEncryptionAlgorithmError

        -///
      • -///
      • -///

        -/// Description: The encryption request you specified is -/// not valid. The valid value is AES256.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidLocationConstraint

        -///
      • -///
      • -///

        -/// Description: The specified location constraint is not -/// valid. For more information about Regions, see How to Select -/// a Region for Your Buckets.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidObjectState

        -///
      • -///
      • -///

        -/// Description: The action is not valid for the current -/// state of the object.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidPart

        -///
      • -///
      • -///

        -/// Description: One or more of the specified parts could -/// not be found. The part might not have been uploaded, or the specified entity -/// tag might not have matched the part's entity tag.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidPartOrder

        -///
      • -///
      • -///

        -/// Description: The list of parts was not in ascending -/// order. Parts list must be specified in order by part number.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidPayer

        -///
      • -///
      • -///

        -/// Description: All access to this object has been -/// disabled. Please contact Amazon Web Services Support for further assistance.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidPolicyDocument

        -///
      • -///
      • -///

        -/// Description: The content of the form does not meet the -/// conditions specified in the policy document.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRange

        -///
      • -///
      • -///

        -/// Description: The requested range cannot be -/// satisfied.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 416 Requested Range Not -/// Satisfiable

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Please use -/// AWS4-HMAC-SHA256.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: SOAP requests must be made over an HTTPS -/// connection.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Acceleration is not -/// supported for buckets with non-DNS compliant names.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Acceleration is not -/// supported for buckets with periods (.) in their names.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Accelerate endpoint only -/// supports virtual style requests.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Accelerate is not configured -/// on this bucket.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Accelerate is disabled on -/// this bucket.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Acceleration is not -/// supported on this bucket. Contact Amazon Web Services Support for more information.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Acceleration cannot be -/// enabled on this bucket. Contact Amazon Web Services Support for more information.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidSecurity

        -///
      • -///
      • -///

        -/// Description: The provided security credentials are not -/// valid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidSOAPRequest

        -///
      • -///
      • -///

        -/// Description: The SOAP request body is invalid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidStorageClass

        -///
      • -///
      • -///

        -/// Description: The storage class you specified is not -/// valid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidTargetBucketForLogging

        -///
      • -///
      • -///

        -/// Description: The target bucket for logging does not -/// exist, is not owned by you, or does not have the appropriate grants for the -/// log-delivery group.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidToken

        -///
      • -///
      • -///

        -/// Description: The provided token is malformed or -/// otherwise invalid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidURI

        -///
      • -///
      • -///

        -/// Description: Couldn't parse the specified URI.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: KeyTooLongError

        -///
      • -///
      • -///

        -/// Description: Your key is too long.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MalformedACLError

        -///
      • -///
      • -///

        -/// Description: The XML you provided was not well-formed -/// or did not validate against our published schema.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MalformedPOSTRequest

        -///
      • -///
      • -///

        -/// Description: The body of your POST request is not -/// well-formed multipart/form-data.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MalformedXML

        -///
      • -///
      • -///

        -/// Description: This happens when the user sends malformed -/// XML (XML that doesn't conform to the published XSD) for the configuration. The -/// error message is, "The XML you provided was not well-formed or did not validate -/// against our published schema."

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MaxMessageLengthExceeded

        -///
      • -///
      • -///

        -/// Description: Your request was too big.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MaxPostPreDataLengthExceededError

        -///
      • -///
      • -///

        -/// Description: Your POST request fields preceding the -/// upload file were too large.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MetadataTooLarge

        -///
      • -///
      • -///

        -/// Description: Your metadata headers exceed the maximum -/// allowed metadata size.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MethodNotAllowed

        -///
      • -///
      • -///

        -/// Description: The specified method is not allowed -/// against this resource.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 405 Method Not Allowed

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingAttachment

        -///
      • -///
      • -///

        -/// Description: A SOAP attachment was expected, but none -/// were found.

        -///
      • -///
      • -///

        -/// HTTP Status Code: N/A

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingContentLength

        -///
      • -///
      • -///

        -/// Description: You must provide the Content-Length HTTP -/// header.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 411 Length Required

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingRequestBodyError

        -///
      • -///
      • -///

        -/// Description: This happens when the user sends an empty -/// XML document as a request. The error message is, "Request body is empty." -///

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingSecurityElement

        -///
      • -///
      • -///

        -/// Description: The SOAP 1.1 request is missing a security -/// element.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingSecurityHeader

        -///
      • -///
      • -///

        -/// Description: Your request is missing a required -/// header.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoLoggingStatusForKey

        -///
      • -///
      • -///

        -/// Description: There is no such thing as a logging status -/// subresource for a key.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchBucket

        -///
      • -///
      • -///

        -/// Description: The specified bucket does not -/// exist.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchBucketPolicy

        -///
      • -///
      • -///

        -/// Description: The specified bucket does not have a -/// bucket policy.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchKey

        -///
      • -///
      • -///

        -/// Description: The specified key does not exist.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchLifecycleConfiguration

        -///
      • -///
      • -///

        -/// Description: The lifecycle configuration does not -/// exist.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchUpload

        -///
      • -///
      • -///

        -/// Description: The specified multipart upload does not -/// exist. The upload ID might be invalid, or the multipart upload might have been -/// aborted or completed.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchVersion

        -///
      • -///
      • -///

        -/// Description: Indicates that the version ID specified in -/// the request does not match an existing version.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NotImplemented

        -///
      • -///
      • -///

        -/// Description: A header you provided implies -/// functionality that is not implemented.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 501 Not Implemented

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Server

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NotSignedUp

        -///
      • -///
      • -///

        -/// Description: Your account is not signed up for the Amazon S3 -/// service. You must sign up before you can use Amazon S3. You can sign up at the -/// following URL: Amazon S3 -///

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: OperationAborted

        -///
      • -///
      • -///

        -/// Description: A conflicting conditional action is -/// currently in progress against this resource. Try again.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: PermanentRedirect

        -///
      • -///
      • -///

        -/// Description: The bucket you are attempting to access -/// must be addressed using the specified endpoint. Send all future requests to -/// this endpoint.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 301 Moved Permanently

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: PreconditionFailed

        -///
      • -///
      • -///

        -/// Description: At least one of the preconditions you -/// specified did not hold.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 412 Precondition Failed

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: Redirect

        -///
      • -///
      • -///

        -/// Description: Temporary redirect.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 307 Moved Temporarily

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RestoreAlreadyInProgress

        -///
      • -///
      • -///

        -/// Description: Object restore is already in -/// progress.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RequestIsNotMultiPartContent

        -///
      • -///
      • -///

        -/// Description: Bucket POST must be of the enclosure-type -/// multipart/form-data.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RequestTimeout

        -///
      • -///
      • -///

        -/// Description: Your socket connection to the server was -/// not read from or written to within the timeout period.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RequestTimeTooSkewed

        -///
      • -///
      • -///

        -/// Description: The difference between the request time -/// and the server's time is too large.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RequestTorrentOfBucketError

        -///
      • -///
      • -///

        -/// Description: Requesting the torrent file of a bucket is -/// not permitted.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: SignatureDoesNotMatch

        -///
      • -///
      • -///

        -/// Description: The request signature we calculated does -/// not match the signature you provided. Check your Amazon Web Services secret access key and -/// signing method. For more information, see REST -/// Authentication and SOAP -/// Authentication for details.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: ServiceUnavailable

        -///
      • -///
      • -///

        -/// Description: Service is unable to handle -/// request.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 503 Service Unavailable

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Server

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: SlowDown

        -///
      • -///
      • -///

        -/// Description: Reduce your request rate.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 503 Slow Down

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Server

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: TemporaryRedirect

        -///
      • -///
      • -///

        -/// Description: You are being redirected to the bucket -/// while DNS updates.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 307 Moved Temporarily

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: TokenRefreshRequired

        -///
      • -///
      • -///

        -/// Description: The provided token must be -/// refreshed.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: TooManyBuckets

        -///
      • -///
      • -///

        -/// Description: You have attempted to create more buckets -/// than allowed.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: UnexpectedContent

        -///
      • -///
      • -///

        -/// Description: This request does not support -/// content.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: UnresolvableGrantByEmailAddress

        -///
      • -///
      • -///

        -/// Description: The email address you provided does not -/// match any account on record.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: UserKeyMustBeSpecified

        -///
      • -///
      • -///

        -/// Description: The bucket POST must contain the specified -/// field name. If it is specified, check the order of the fields.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    -///

    - pub code: Option, -///

    The error key.

    - pub key: Option, -///

    The error message contains a generic description of the error condition in English. It -/// is intended for a human audience. Simple programs display the message directly to the end -/// user if they encounter an error condition they don't know how or don't care to handle. -/// Sophisticated programs with more exhaustive error handling and proper internationalization -/// are more likely to ignore the error message.

    - pub message: Option, -///

    The version ID of the error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for Error { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Error"); -if let Some(ref val) = self.code { -d.field("code", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.message { -d.field("message", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ErrorCode = String; - -///

    -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error code and error message. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct ErrorDetails { -///

    -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error code. The possible error codes and -/// error messages are as follows: -///

    -///
      -///
    • -///

      -/// AccessDeniedCreatingResources - You don't have sufficient permissions to -/// create the required resources. Make sure that you have s3tables:CreateNamespace, -/// s3tables:CreateTable, s3tables:GetTable and -/// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata -/// table, you must delete the metadata configuration for this bucket, and then create a new -/// metadata configuration. -///

      -///
    • -///
    • -///

      -/// AccessDeniedWritingToTable - Unable to write to the metadata table because of -/// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new -/// metadata table. To create a new metadata table, you must delete the metadata configuration for -/// this bucket, and then create a new metadata configuration.

      -///
    • -///
    • -///

      -/// DestinationTableNotFound - The destination table doesn't exist. To create a -/// new metadata table, you must delete the metadata configuration for this bucket, and then -/// create a new metadata configuration.

      -///
    • -///
    • -///

      -/// ServerInternalError - An internal error has occurred. To create a new metadata -/// table, you must delete the metadata configuration for this bucket, and then create a new -/// metadata configuration.

      -///
    • -///
    • -///

      -/// TableAlreadyExists - The table that you specified already exists in the table -/// bucket's namespace. Specify a different table name. To create a new metadata table, you must -/// delete the metadata configuration for this bucket, and then create a new metadata -/// configuration.

      -///
    • -///
    • -///

      -/// TableBucketNotFound - The table bucket that you specified doesn't exist in -/// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new -/// metadata table, you must delete the metadata configuration for this bucket, and then create -/// a new metadata configuration.

      -///
    • -///
    - pub error_code: Option, -///

    -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error message. The possible error codes and -/// error messages are as follows: -///

    -///
      -///
    • -///

      -/// AccessDeniedCreatingResources - You don't have sufficient permissions to -/// create the required resources. Make sure that you have s3tables:CreateNamespace, -/// s3tables:CreateTable, s3tables:GetTable and -/// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata -/// table, you must delete the metadata configuration for this bucket, and then create a new -/// metadata configuration. -///

      -///
    • -///
    • -///

      -/// AccessDeniedWritingToTable - Unable to write to the metadata table because of -/// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new -/// metadata table. To create a new metadata table, you must delete the metadata configuration for -/// this bucket, and then create a new metadata configuration.

      -///
    • -///
    • -///

      -/// DestinationTableNotFound - The destination table doesn't exist. To create a -/// new metadata table, you must delete the metadata configuration for this bucket, and then -/// create a new metadata configuration.

      -///
    • -///
    • -///

      -/// ServerInternalError - An internal error has occurred. To create a new metadata -/// table, you must delete the metadata configuration for this bucket, and then create a new -/// metadata configuration.

      -///
    • -///
    • -///

      -/// TableAlreadyExists - The table that you specified already exists in the table -/// bucket's namespace. Specify a different table name. To create a new metadata table, you must -/// delete the metadata configuration for this bucket, and then create a new metadata -/// configuration.

      -///
    • -///
    • -///

      -/// TableBucketNotFound - The table bucket that you specified doesn't exist in -/// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new -/// metadata table, you must delete the metadata configuration for this bucket, and then create -/// a new metadata configuration.

      -///
    • -///
    - pub error_message: Option, -} - -impl fmt::Debug for ErrorDetails { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ErrorDetails"); -if let Some(ref val) = self.error_code { -d.field("error_code", val); -} -if let Some(ref val) = self.error_message { -d.field("error_message", val); -} -d.finish_non_exhaustive() -} -} - - -///

    The error information.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ErrorDocument { -///

    The object key name to use when a 4XX class error occurs.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub key: ObjectKey, -} - -impl fmt::Debug for ErrorDocument { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ErrorDocument"); -d.field("key", &self.key); -d.finish_non_exhaustive() -} -} - - -pub type ErrorMessage = String; - -pub type Errors = List; - - -///

    A container for specifying the configuration for Amazon EventBridge.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct EventBridgeConfiguration { -} - -impl fmt::Debug for EventBridgeConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("EventBridgeConfiguration"); -d.finish_non_exhaustive() -} -} - - -pub type EventList = List; - -///

    Optional configuration to replicate existing source bucket objects.

    -/// -///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the -/// Amazon S3 User Guide.

    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ExistingObjectReplication { -///

    Specifies whether Amazon S3 replicates existing source bucket objects.

    - pub status: ExistingObjectReplicationStatus, -} - -impl fmt::Debug for ExistingObjectReplication { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ExistingObjectReplication"); -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ExistingObjectReplicationStatus(Cow<'static, str>); - -impl ExistingObjectReplicationStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ExistingObjectReplicationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ExistingObjectReplicationStatus) -> Self { -s.0 -} -} - -impl FromStr for ExistingObjectReplicationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Expiration = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ExpirationStatus(Cow<'static, str>); - -impl ExpirationStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ExpirationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ExpirationStatus) -> Self { -s.0 -} -} - -impl FromStr for ExpirationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ExpiredObjectDeleteMarker = bool; - -pub type Expires = Timestamp; - -pub type ExposeHeader = String; - -pub type ExposeHeaders = List; - -pub type Expression = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ExpressionType(Cow<'static, str>); - -impl ExpressionType { -pub const SQL: &'static str = "SQL"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ExpressionType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ExpressionType) -> Self { -s.0 -} -} - -impl FromStr for ExpressionType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type FetchOwner = bool; - -pub type FieldDelimiter = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct FileHeaderInfo(Cow<'static, str>); - -impl FileHeaderInfo { -pub const IGNORE: &'static str = "IGNORE"; - -pub const NONE: &'static str = "NONE"; - -pub const USE: &'static str = "USE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for FileHeaderInfo { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: FileHeaderInfo) -> Self { -s.0 -} -} - -impl FromStr for FileHeaderInfo { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned -/// to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of -/// the object key name. A prefix is a specific string of characters at the beginning of an -/// object key name, which you can use to organize objects. For example, you can start the key -/// names of related objects with a prefix, such as 2023- or -/// engineering/. Then, you can use FilterRule to find objects in -/// a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it -/// is at the end of the object key name instead of at the beginning.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct FilterRule { -///

    The object key name prefix or suffix identifying one or more objects to which the -/// filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and -/// suffixes are not supported. For more information, see Configuring Event Notifications -/// in the Amazon S3 User Guide.

    - pub name: Option, -///

    The value that the filter searches for in object key names.

    - pub value: Option, -} - -impl fmt::Debug for FilterRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("FilterRule"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.value { -d.field("value", val); -} -d.finish_non_exhaustive() -} -} - - -///

    A list of containers for the key-value pair that defines the criteria for the filter -/// rule.

    -pub type FilterRuleList = List; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct FilterRuleName(Cow<'static, str>); - -impl FilterRuleName { -pub const PREFIX: &'static str = "prefix"; - -pub const SUFFIX: &'static str = "suffix"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for FilterRuleName { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: FilterRuleName) -> Self { -s.0 -} -} - -impl FromStr for FilterRuleName { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type FilterRuleValue = String; - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAccelerateConfigurationInput { -///

    The name of the bucket for which the accelerate configuration is retrieved.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub request_payer: Option, -} - -impl fmt::Debug for GetBucketAccelerateConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAccelerateConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketAccelerateConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketAccelerateConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAccelerateConfigurationOutput { - pub request_charged: Option, -///

    The accelerate configuration of the bucket.

    - pub status: Option, -} - -impl fmt::Debug for GetBucketAccelerateConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAccelerateConfigurationOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAclInput { -///

    Specifies the S3 bucket whose ACL is being requested.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketAclInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAclInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketAclInput { -#[must_use] -pub fn builder() -> builders::GetBucketAclInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAclOutput { -///

    A list of grants.

    - pub grants: Option, -///

    Container for the bucket owner's display name and ID.

    - pub owner: Option, -} - -impl fmt::Debug for GetBucketAclOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAclOutput"); -if let Some(ref val) = self.grants { -d.field("grants", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAnalyticsConfigurationInput { -///

    The name of the bucket from which an analytics configuration is retrieved.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID that identifies the analytics configuration.

    - pub id: AnalyticsId, -} - -impl fmt::Debug for GetBucketAnalyticsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAnalyticsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl GetBucketAnalyticsConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketAnalyticsConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAnalyticsConfigurationOutput { -///

    The configuration and any analyses for the analytics filter.

    - pub analytics_configuration: Option, -} - -impl fmt::Debug for GetBucketAnalyticsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAnalyticsConfigurationOutput"); -if let Some(ref val) = self.analytics_configuration { -d.field("analytics_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketCorsInput { -///

    The bucket name for which to get the cors configuration.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketCorsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketCorsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketCorsInput { -#[must_use] -pub fn builder() -> builders::GetBucketCorsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketCorsOutput { -///

    A set of origins and methods (cross-origin access that you want to allow). You can add -/// up to 100 rules to the configuration.

    - pub cors_rules: Option, -} - -impl fmt::Debug for GetBucketCorsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketCorsOutput"); -if let Some(ref val) = self.cors_rules { -d.field("cors_rules", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketEncryptionInput { -///

    The name of the bucket from which the server-side encryption configuration is -/// retrieved.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketEncryptionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketEncryptionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketEncryptionInput { -#[must_use] -pub fn builder() -> builders::GetBucketEncryptionInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketEncryptionOutput { - pub server_side_encryption_configuration: Option, -} - -impl fmt::Debug for GetBucketEncryptionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketEncryptionOutput"); -if let Some(ref val) = self.server_side_encryption_configuration { -d.field("server_side_encryption_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketIntelligentTieringConfigurationInput { -///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, -///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, -} - -impl fmt::Debug for GetBucketIntelligentTieringConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationInput"); -d.field("bucket", &self.bucket); -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl GetBucketIntelligentTieringConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketIntelligentTieringConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketIntelligentTieringConfigurationOutput { -///

    Container for S3 Intelligent-Tiering configuration.

    - pub intelligent_tiering_configuration: Option, -} - -impl fmt::Debug for GetBucketIntelligentTieringConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationOutput"); -if let Some(ref val) = self.intelligent_tiering_configuration { -d.field("intelligent_tiering_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketInventoryConfigurationInput { -///

    The name of the bucket containing the inventory configuration to retrieve.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, -} - -impl fmt::Debug for GetBucketInventoryConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketInventoryConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl GetBucketInventoryConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketInventoryConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketInventoryConfigurationOutput { -///

    Specifies the inventory configuration.

    - pub inventory_configuration: Option, -} - -impl fmt::Debug for GetBucketInventoryConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketInventoryConfigurationOutput"); -if let Some(ref val) = self.inventory_configuration { -d.field("inventory_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLifecycleConfigurationInput { -///

    The name of the bucket for which to get the lifecycle information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketLifecycleConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLifecycleConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketLifecycleConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketLifecycleConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLifecycleConfigurationOutput { -///

    Container for a lifecycle rule.

    - pub rules: Option, -///

    Indicates which default minimum object size behavior is applied to the lifecycle -/// configuration.

    -/// -///

    This parameter applies to general purpose buckets only. It isn't supported for -/// directory bucket lifecycle configurations.

    -///
    -///
      -///
    • -///

      -/// all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

      -///
    • -///
    • -///

      -/// varies_by_storage_class - Objects smaller than 128 KB will -/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By -/// default, all other storage classes will prevent transitions smaller than 128 KB. -///

      -///
    • -///
    -///

    To customize the minimum object size for any transition you can add a filter that -/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in -/// the body of your transition rule. Custom filters always take precedence over the default -/// transition behavior.

    - pub transition_default_minimum_object_size: Option, -} - -impl fmt::Debug for GetBucketLifecycleConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLifecycleConfigurationOutput"); -if let Some(ref val) = self.rules { -d.field("rules", val); -} -if let Some(ref val) = self.transition_default_minimum_object_size { -d.field("transition_default_minimum_object_size", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLocationInput { -///

    The name of the bucket for which to get the location.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketLocationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLocationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketLocationInput { -#[must_use] -pub fn builder() -> builders::GetBucketLocationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLocationOutput { -///

    Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported -/// location constraints by Region, see Regions and Endpoints.

    -///

    Buckets in Region us-east-1 have a LocationConstraint of -/// null. Buckets with a LocationConstraint of EU reside in eu-west-1.

    - pub location_constraint: Option, -} - -impl fmt::Debug for GetBucketLocationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLocationOutput"); -if let Some(ref val) = self.location_constraint { -d.field("location_constraint", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLoggingInput { -///

    The bucket name for which to get the logging information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketLoggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLoggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketLoggingInput { -#[must_use] -pub fn builder() -> builders::GetBucketLoggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLoggingOutput { - pub logging_enabled: Option, -} - -impl fmt::Debug for GetBucketLoggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLoggingOutput"); -if let Some(ref val) = self.logging_enabled { -d.field("logging_enabled", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetadataTableConfigurationInput { -///

    -/// The general purpose bucket that contains the metadata table configuration that you want to retrieve. -///

    - pub bucket: BucketName, -///

    -/// The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. -///

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketMetadataTableConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetadataTableConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketMetadataTableConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketMetadataTableConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetadataTableConfigurationOutput { -///

    -/// The metadata table configuration for the general purpose bucket. -///

    - pub get_bucket_metadata_table_configuration_result: Option, -} - -impl fmt::Debug for GetBucketMetadataTableConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetadataTableConfigurationOutput"); -if let Some(ref val) = self.get_bucket_metadata_table_configuration_result { -d.field("get_bucket_metadata_table_configuration_result", val); -} -d.finish_non_exhaustive() -} -} - - -///

    -/// The metadata table configuration for a general purpose bucket. -///

    -#[derive(Clone, PartialEq)] -pub struct GetBucketMetadataTableConfigurationResult { -///

    -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error code and error message. -///

    - pub error: Option, -///

    -/// The metadata table configuration for a general purpose bucket. -///

    - pub metadata_table_configuration_result: MetadataTableConfigurationResult, -///

    -/// The status of the metadata table. The status values are: -///

    -///
      -///
    • -///

      -/// CREATING - The metadata table is in the process of being created in the -/// specified table bucket.

      -///
    • -///
    • -///

      -/// ACTIVE - The metadata table has been created successfully and records -/// are being delivered to the table. -///

      -///
    • -///
    • -///

      -/// FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver -/// records. See ErrorDetails for details.

      -///
    • -///
    - pub status: MetadataTableStatus, -} - -impl fmt::Debug for GetBucketMetadataTableConfigurationResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetadataTableConfigurationResult"); -if let Some(ref val) = self.error { -d.field("error", val); -} -d.field("metadata_table_configuration_result", &self.metadata_table_configuration_result); -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetricsConfigurationInput { -///

    The name of the bucket containing the metrics configuration to retrieve.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and -/// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, -} - -impl fmt::Debug for GetBucketMetricsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetricsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl GetBucketMetricsConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketMetricsConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetricsConfigurationOutput { -///

    Specifies the metrics configuration.

    - pub metrics_configuration: Option, -} - -impl fmt::Debug for GetBucketMetricsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetricsConfigurationOutput"); -if let Some(ref val) = self.metrics_configuration { -d.field("metrics_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketNotificationConfigurationInput { -///

    The name of the bucket for which to get the notification configuration.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketNotificationConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketNotificationConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketNotificationConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketNotificationConfigurationInputBuilder { -default() -} -} - -///

    A container for specifying the notification configuration of the bucket. If this element -/// is empty, notifications are turned off for the bucket.

    -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketNotificationConfigurationOutput { -///

    Enables delivery of events to Amazon EventBridge.

    - pub event_bridge_configuration: Option, -///

    Describes the Lambda functions to invoke and the events for which to invoke -/// them.

    - pub lambda_function_configurations: Option, -///

    The Amazon Simple Queue Service queues to publish messages to and the events for which -/// to publish messages.

    - pub queue_configurations: Option, -///

    The topic to which notifications are sent and the events for which notifications are -/// generated.

    - pub topic_configurations: Option, -} - -impl fmt::Debug for GetBucketNotificationConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketNotificationConfigurationOutput"); -if let Some(ref val) = self.event_bridge_configuration { -d.field("event_bridge_configuration", val); -} -if let Some(ref val) = self.lambda_function_configurations { -d.field("lambda_function_configurations", val); -} -if let Some(ref val) = self.queue_configurations { -d.field("queue_configurations", val); -} -if let Some(ref val) = self.topic_configurations { -d.field("topic_configurations", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketOwnershipControlsInput { -///

    The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. -///

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketOwnershipControlsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketOwnershipControlsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketOwnershipControlsInput { -#[must_use] -pub fn builder() -> builders::GetBucketOwnershipControlsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketOwnershipControlsOutput { -///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or -/// ObjectWriter) currently in effect for this Amazon S3 bucket.

    - pub ownership_controls: Option, -} - -impl fmt::Debug for GetBucketOwnershipControlsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketOwnershipControlsOutput"); -if let Some(ref val) = self.ownership_controls { -d.field("ownership_controls", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyInput { -///

    The bucket name to get the bucket policy for.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    -///

    -/// Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    -/// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketPolicyInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketPolicyInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketPolicyInput { -#[must_use] -pub fn builder() -> builders::GetBucketPolicyInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyOutput { -///

    The bucket policy as a JSON document.

    - pub policy: Option, -} - -impl fmt::Debug for GetBucketPolicyOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketPolicyOutput"); -if let Some(ref val) = self.policy { -d.field("policy", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyStatusInput { -///

    The name of the Amazon S3 bucket whose policy status you want to retrieve.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketPolicyStatusInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketPolicyStatusInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketPolicyStatusInput { -#[must_use] -pub fn builder() -> builders::GetBucketPolicyStatusInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyStatusOutput { -///

    The policy status for the specified bucket.

    - pub policy_status: Option, -} - -impl fmt::Debug for GetBucketPolicyStatusOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketPolicyStatusOutput"); -if let Some(ref val) = self.policy_status { -d.field("policy_status", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketReplicationInput { -///

    The bucket name for which to get the replication information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketReplicationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketReplicationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketReplicationInput { -#[must_use] -pub fn builder() -> builders::GetBucketReplicationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketReplicationOutput { - pub replication_configuration: Option, -} - -impl fmt::Debug for GetBucketReplicationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketReplicationOutput"); -if let Some(ref val) = self.replication_configuration { -d.field("replication_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketRequestPaymentInput { -///

    The name of the bucket for which to get the payment request configuration

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketRequestPaymentInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketRequestPaymentInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketRequestPaymentInput { -#[must_use] -pub fn builder() -> builders::GetBucketRequestPaymentInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketRequestPaymentOutput { -///

    Specifies who pays for the download and request fees.

    - pub payer: Option, -} - -impl fmt::Debug for GetBucketRequestPaymentOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketRequestPaymentOutput"); -if let Some(ref val) = self.payer { -d.field("payer", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketTaggingInput { -///

    The name of the bucket for which to get the tagging information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketTaggingInput { -#[must_use] -pub fn builder() -> builders::GetBucketTaggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketTaggingOutput { -///

    Contains the tag set.

    - pub tag_set: TagSet, -} - -impl fmt::Debug for GetBucketTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketTaggingOutput"); -d.field("tag_set", &self.tag_set); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketVersioningInput { -///

    The name of the bucket for which to get the versioning information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketVersioningInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketVersioningInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketVersioningInput { -#[must_use] -pub fn builder() -> builders::GetBucketVersioningInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketVersioningOutput { -///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This -/// element is only returned if the bucket has been configured with MFA delete. If the bucket -/// has never been so configured, this element is not returned.

    - pub mfa_delete: Option, -///

    The versioning state of the bucket.

    - pub status: Option, -} - -impl fmt::Debug for GetBucketVersioningOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketVersioningOutput"); -if let Some(ref val) = self.mfa_delete { -d.field("mfa_delete", val); -} -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketWebsiteInput { -///

    The bucket name for which to get the website configuration.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketWebsiteInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketWebsiteInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketWebsiteInput { -#[must_use] -pub fn builder() -> builders::GetBucketWebsiteInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketWebsiteOutput { -///

    The object key name of the website error document to use for 4XX class errors.

    - pub error_document: Option, -///

    The name of the index document for the website (for example -/// index.html).

    - pub index_document: Option, -///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 -/// bucket.

    - pub redirect_all_requests_to: Option, -///

    Rules that define when a redirect is applied and the redirect behavior.

    - pub routing_rules: Option, -} - -impl fmt::Debug for GetBucketWebsiteOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketWebsiteOutput"); -if let Some(ref val) = self.error_document { -d.field("error_document", val); -} -if let Some(ref val) = self.index_document { -d.field("index_document", val); -} -if let Some(ref val) = self.redirect_all_requests_to { -d.field("redirect_all_requests_to", val); -} -if let Some(ref val) = self.routing_rules { -d.field("routing_rules", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAclInput { -///

    The bucket name that contains the object for which to get the ACL information.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The key of the object for which to get the ACL information.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    Version ID used to reference a specific version of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectAclInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAclInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectAclInput { -#[must_use] -pub fn builder() -> builders::GetObjectAclInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAclOutput { -///

    A list of grants.

    - pub grants: Option, -///

    Container for the bucket owner's display name and ID.

    - pub owner: Option, - pub request_charged: Option, -} - -impl fmt::Debug for GetObjectAclOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAclOutput"); -if let Some(ref val) = self.grants { -d.field("grants", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesInput { -///

    The name of the bucket that contains the object.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The object key.

    - pub key: ObjectKey, -///

    Sets the maximum number of parts to return.

    - pub max_parts: Option, -///

    Specifies the fields at the root level that you want returned in the response. Fields -/// that you do not specify are not returned.

    - pub object_attributes: ObjectAttributesList, -///

    Specifies the part after which listing should begin. Only parts with higher part numbers -/// will be listed.

    - pub part_number_marker: Option, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    The version ID used to reference a specific version of the object.

    -/// -///

    S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the -/// versionId query parameter in the request.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectAttributesInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAttributesInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.max_parts { -d.field("max_parts", val); -} -d.field("object_attributes", &self.object_attributes); -if let Some(ref val) = self.part_number_marker { -d.field("part_number_marker", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectAttributesInput { -#[must_use] -pub fn builder() -> builders::GetObjectAttributesInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesOutput { -///

    The checksum or digest of the object.

    - pub checksum: Option, -///

    Specifies whether the object retrieved was (true) or was not -/// (false) a delete marker. If false, this response header does -/// not appear in the response. To learn more about delete markers, see Working with delete markers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub delete_marker: Option, -///

    An ETag is an opaque identifier assigned by a web server to a specific version of a -/// resource found at a URL.

    - pub e_tag: Option, -///

    Date and time when the object was last modified.

    - pub last_modified: Option, -///

    A collection of parts associated with a multipart upload.

    - pub object_parts: Option, -///

    The size of the object in bytes.

    - pub object_size: Option, - pub request_charged: Option, -///

    Provides the storage class information of the object. Amazon S3 returns this header for all -/// objects except for S3 Standard storage class objects.

    -///

    For more information, see Storage Classes.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    The version ID of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectAttributesOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAttributesOutput"); -if let Some(ref val) = self.checksum { -d.field("checksum", val); -} -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.object_parts { -d.field("object_parts", val); -} -if let Some(ref val) = self.object_size { -d.field("object_size", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -///

    A collection of parts associated with a multipart upload.

    -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesParts { -///

    Indicates whether the returned list of parts is truncated. A value of true -/// indicates that the list was truncated. A list can be truncated if the number of parts -/// exceeds the limit returned in the MaxParts element.

    - pub is_truncated: Option, -///

    The maximum number of parts allowed in the response.

    - pub max_parts: Option, -///

    When a list is truncated, this element specifies the last part in the list, as well as -/// the value to use for the PartNumberMarker request parameter in a subsequent -/// request.

    - pub next_part_number_marker: Option, -///

    The marker for the current part.

    - pub part_number_marker: Option, -///

    A container for elements related to a particular part. A response can contain zero or -/// more Parts elements.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - For -/// GetObjectAttributes, if a additional checksum (including -/// x-amz-checksum-crc32, x-amz-checksum-crc32c, -/// x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't -/// applied to the object specified in the request, the response doesn't return -/// Part.

      -///
    • -///
    • -///

      -/// Directory buckets - For -/// GetObjectAttributes, no matter whether a additional checksum is -/// applied to the object specified in the request, the response returns -/// Part.

      -///
    • -///
    -///
    - pub parts: Option, -///

    The total number of parts.

    - pub total_parts_count: Option, -} - -impl fmt::Debug for GetObjectAttributesParts { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAttributesParts"); -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.max_parts { -d.field("max_parts", val); -} -if let Some(ref val) = self.next_part_number_marker { -d.field("next_part_number_marker", val); -} -if let Some(ref val) = self.part_number_marker { -d.field("part_number_marker", val); -} -if let Some(ref val) = self.parts { -d.field("parts", val); -} -if let Some(ref val) = self.total_parts_count { -d.field("total_parts_count", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectInput { -///

    The bucket name containing the object.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    To retrieve the checksum, this mode must be enabled.

    - pub checksum_mode: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Return the object only if its entity tag (ETag) is the same as the one specified in this -/// header; otherwise, return a 412 Precondition Failed error.

    -///

    If both of the If-Match and If-Unmodified-Since headers are -/// present in the request as follows: If-Match condition evaluates to -/// true, and; If-Unmodified-Since condition evaluates to -/// false; then, S3 returns 200 OK and the data requested.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_match: Option, -///

    Return the object only if it has been modified since the specified time; otherwise, -/// return a 304 Not Modified error.

    -///

    If both of the If-None-Match and If-Modified-Since headers are -/// present in the request as follows: If-None-Match condition evaluates to -/// false, and; If-Modified-Since condition evaluates to -/// true; then, S3 returns 304 Not Modified status code.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_modified_since: Option, -///

    Return the object only if its entity tag (ETag) is different from the one specified in -/// this header; otherwise, return a 304 Not Modified error.

    -///

    If both of the If-None-Match and If-Modified-Since headers are -/// present in the request as follows: If-None-Match condition evaluates to -/// false, and; If-Modified-Since condition evaluates to -/// true; then, S3 returns 304 Not Modified HTTP status -/// code.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_none_match: Option, -///

    Return the object only if it has not been modified since the specified time; otherwise, -/// return a 412 Precondition Failed error.

    -///

    If both of the If-Match and If-Unmodified-Since headers are -/// present in the request as follows: If-Match condition evaluates to -/// true, and; If-Unmodified-Since condition evaluates to -/// false; then, S3 returns 200 OK and the data requested.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_unmodified_since: Option, -///

    Key of the object to get.

    - pub key: ObjectKey, -///

    Part number of the object being read. This is a positive integer between 1 and 10,000. -/// Effectively performs a 'ranged' GET request for the part specified. Useful for downloading -/// just a part of an object.

    - pub part_number: Option, -///

    Downloads the specified byte range of an object. For more information about the HTTP -/// Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

    -/// -///

    Amazon S3 doesn't support retrieving multiple ranges of data per GET -/// request.

    -///
    - pub range: Option, - pub request_payer: Option, -///

    Sets the Cache-Control header of the response.

    - pub response_cache_control: Option, -///

    Sets the Content-Disposition header of the response.

    - pub response_content_disposition: Option, -///

    Sets the Content-Encoding header of the response.

    - pub response_content_encoding: Option, -///

    Sets the Content-Language header of the response.

    - pub response_content_language: Option, -///

    Sets the Content-Type header of the response.

    - pub response_content_type: Option, -///

    Sets the Expires header of the response.

    - pub response_expires: Option, -///

    Specifies the algorithm to use when decrypting the object (for example, -/// AES256).

    -///

    If you encrypt an object by using server-side encryption with customer-provided -/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, -/// you must use the following headers:

    -///
      -///
    • -///

      -/// x-amz-server-side-encryption-customer-algorithm -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key-MD5 -///

      -///
    • -///
    -///

    For more information about SSE-C, see Server-Side Encryption -/// (Using Customer-Provided Encryption Keys) in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key that you originally provided for Amazon S3 to -/// encrypt the data before storing it. This value is used to decrypt the object when -/// recovering it and must match the one used when storing the data. The key must be -/// appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -///

    If you encrypt an object by using server-side encryption with customer-provided -/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, -/// you must use the following headers:

    -///
      -///
    • -///

      -/// x-amz-server-side-encryption-customer-algorithm -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key-MD5 -///

      -///
    • -///
    -///

    For more information about SSE-C, see Server-Side Encryption -/// (Using Customer-Provided Encryption Keys) in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to -/// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption -/// key was transmitted without error.

    -///

    If you encrypt an object by using server-side encryption with customer-provided -/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, -/// you must use the following headers:

    -///
      -///
    • -///

      -/// x-amz-server-side-encryption-customer-algorithm -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key-MD5 -///

      -///
    • -///
    -///

    For more information about SSE-C, see Server-Side Encryption -/// (Using Customer-Provided Encryption Keys) in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Version ID used to reference a specific version of the object.

    -///

    By default, the GetObject operation returns the current version of an -/// object. To return a different version, use the versionId subresource.

    -/// -///
      -///
    • -///

      If you include a versionId in your request header, you must have -/// the s3:GetObjectVersion permission to access a specific version of an -/// object. The s3:GetObject permission is not required in this -/// scenario.

      -///
    • -///
    • -///

      If you request the current version of an object without a specific -/// versionId in the request header, only the -/// s3:GetObject permission is required. The -/// s3:GetObjectVersion permission is not required in this -/// scenario.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the -/// versionId query parameter in the request.

      -///
    • -///
    -///
    -///

    For more information about versioning, see PutBucketVersioning.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_mode { -d.field("checksum_mode", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_modified_since { -d.field("if_modified_since", val); -} -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); -} -if let Some(ref val) = self.if_unmodified_since { -d.field("if_unmodified_since", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -if let Some(ref val) = self.range { -d.field("range", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.response_cache_control { -d.field("response_cache_control", val); -} -if let Some(ref val) = self.response_content_disposition { -d.field("response_content_disposition", val); -} -if let Some(ref val) = self.response_content_encoding { -d.field("response_content_encoding", val); -} -if let Some(ref val) = self.response_content_language { -d.field("response_content_language", val); -} -if let Some(ref val) = self.response_content_type { -d.field("response_content_type", val); -} -if let Some(ref val) = self.response_expires { -d.field("response_expires", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectInput { -#[must_use] -pub fn builder() -> builders::GetObjectInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLegalHoldInput { -///

    The bucket name containing the object whose legal hold status you want to retrieve.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The key name for the object whose legal hold status you want to retrieve.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    The version ID of the object whose legal hold status you want to retrieve.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectLegalHoldInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectLegalHoldInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectLegalHoldInput { -#[must_use] -pub fn builder() -> builders::GetObjectLegalHoldInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLegalHoldOutput { -///

    The current legal hold status for the specified object.

    - pub legal_hold: Option, -} - -impl fmt::Debug for GetObjectLegalHoldOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectLegalHoldOutput"); -if let Some(ref val) = self.legal_hold { -d.field("legal_hold", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLockConfigurationInput { -///

    The bucket whose Object Lock configuration you want to retrieve.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetObjectLockConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectLockConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectLockConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetObjectLockConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLockConfigurationOutput { -///

    The specified bucket's Object Lock configuration.

    - pub object_lock_configuration: Option, -} - -impl fmt::Debug for GetObjectLockConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectLockConfigurationOutput"); -if let Some(ref val) = self.object_lock_configuration { -d.field("object_lock_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Default)] -pub struct GetObjectOutput { -///

    Indicates that a range of bytes was specified in the request.

    - pub accept_ranges: Option, -///

    Object data.

    - pub body: Option, -///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with -/// Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more -/// information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    The checksum type, which determines how part-level checksums are combined to create an -/// object-level checksum for multipart objects. You can use this header response to verify -/// that the checksum type that is received is the same checksum type that was specified in the -/// CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Specifies presentational information for the object.

    - pub content_disposition: Option, -///

    Indicates what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    Size of the body in bytes.

    - pub content_length: Option, -///

    The portion of the object returned in the response.

    - pub content_range: Option, -///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, -///

    Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If -/// false, this response header does not appear in the response.

    -/// -///
      -///
    • -///

      If the current version of the object is a delete marker, Amazon S3 behaves as if the -/// object was deleted and includes x-amz-delete-marker: true in the -/// response.

      -///
    • -///
    • -///

      If the specified version in the request is a delete marker, the response -/// returns a 405 Method Not Allowed error and the Last-Modified: -/// timestamp response header.

      -///
    • -///
    -///
    - pub delete_marker: Option, -///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific -/// version of a resource found at a URL.

    - pub e_tag: Option, -///

    If the object expiration is configured (see -/// PutBucketLifecycleConfiguration -/// ), the response includes this -/// header. It includes the expiry-date and rule-id key-value pairs -/// providing object expiration information. The value of the rule-id is -/// URL-encoded.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    - pub expiration: Option, -///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, -///

    Date and time when the object was last modified.

    -///

    -/// General purpose buckets - When you specify a -/// versionId of the object in your request, if the specified version in the -/// request is a delete marker, the response returns a 405 Method Not Allowed -/// error and the Last-Modified: timestamp response header.

    - pub last_modified: Option, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    This is set to the number of metadata entries not returned in the headers that are -/// prefixed with x-amz-meta-. This can happen if you create metadata using an API -/// like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, -/// you can create metadata whose values are not legal HTTP headers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub missing_meta: Option, -///

    Indicates whether this object has an active legal hold. This field is only returned if -/// you have permission to view an object's legal hold status.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode that's currently in place for this object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_mode: Option, -///

    The date and time when this object's Object Lock will expire.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_retain_until_date: Option, -///

    The count of parts this object has. This value is only returned if you specify -/// partNumber in your request and the object was uploaded as a multipart -/// upload.

    - pub parts_count: Option, -///

    Amazon S3 can return this if your request involves a bucket that is either a source or -/// destination in a replication rule.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub replication_status: Option, - pub request_charged: Option, -///

    Provides information about object restoration action and expiration time of the restored -/// object copy.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub restore: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, -///

    Provides storage class information of the object. Amazon S3 returns this header for all -/// objects except for S3 Standard storage class objects.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    The number of tags, if any, on the object, when you have the relevant permission to read -/// object tags.

    -///

    You can use GetObjectTagging to retrieve -/// the tag set associated with an object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub tag_count: Option, -///

    Version ID of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub website_redirect_location: Option, -} - -impl fmt::Debug for GetObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectOutput"); -if let Some(ref val) = self.accept_ranges { -d.field("accept_ranges", val); -} -if let Some(ref val) = self.body { -d.field("body", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_length { -d.field("content_length", val); -} -if let Some(ref val) = self.content_range { -d.field("content_range", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.missing_meta { -d.field("missing_meta", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.parts_count { -d.field("parts_count", val); -} -if let Some(ref val) = self.replication_status { -d.field("replication_status", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.restore { -d.field("restore", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tag_count { -d.field("tag_count", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -d.finish_non_exhaustive() -} -} - - -pub type GetObjectResponseStatusCode = i32; - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectRetentionInput { -///

    The bucket name containing the object whose retention settings you want to retrieve.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The key name for the object whose retention settings you want to retrieve.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    The version ID for the object whose retention settings you want to retrieve.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectRetentionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectRetentionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectRetentionInput { -#[must_use] -pub fn builder() -> builders::GetObjectRetentionInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectRetentionOutput { -///

    The container element for an object's retention settings.

    - pub retention: Option, -} - -impl fmt::Debug for GetObjectRetentionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectRetentionOutput"); -if let Some(ref val) = self.retention { -d.field("retention", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTaggingInput { -///

    The bucket name containing the object for which to get the tagging information.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Object key for which to get the tagging information.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    The versionId of the object for which to get the tagging information.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectTaggingInput { -#[must_use] -pub fn builder() -> builders::GetObjectTaggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTaggingOutput { -///

    Contains the tag set.

    - pub tag_set: TagSet, -///

    The versionId of the object for which you got the tagging information.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectTaggingOutput"); -d.field("tag_set", &self.tag_set); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTorrentInput { -///

    The name of the bucket containing the object for which to get the torrent files.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The object key for which to get the information.

    - pub key: ObjectKey, - pub request_payer: Option, -} - -impl fmt::Debug for GetObjectTorrentInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectTorrentInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectTorrentInput { -#[must_use] -pub fn builder() -> builders::GetObjectTorrentInputBuilder { -default() -} -} - -#[derive(Default)] -pub struct GetObjectTorrentOutput { -///

    A Bencoded dictionary as defined by the BitTorrent specification

    - pub body: Option, - pub request_charged: Option, -} - -impl fmt::Debug for GetObjectTorrentOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectTorrentOutput"); -if let Some(ref val) = self.body { -d.field("body", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetPublicAccessBlockInput { -///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want -/// to retrieve.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetPublicAccessBlockInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetPublicAccessBlockInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetPublicAccessBlockInput { -#[must_use] -pub fn builder() -> builders::GetPublicAccessBlockInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetPublicAccessBlockOutput { -///

    The PublicAccessBlock configuration currently in effect for this Amazon S3 -/// bucket.

    - pub public_access_block_configuration: Option, -} - -impl fmt::Debug for GetPublicAccessBlockOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetPublicAccessBlockOutput"); -if let Some(ref val) = self.public_access_block_configuration { -d.field("public_access_block_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Container for S3 Glacier job parameters.

    -#[derive(Clone, PartialEq)] -pub struct GlacierJobParameters { -///

    Retrieval tier at which the restore will be processed.

    - pub tier: Tier, -} - -impl fmt::Debug for GlacierJobParameters { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GlacierJobParameters"); -d.field("tier", &self.tier); -d.finish_non_exhaustive() -} -} - - -///

    Container for grant information.

    -#[derive(Clone, Default, PartialEq)] -pub struct Grant { -///

    The person being granted permissions.

    - pub grantee: Option, -///

    Specifies the permission given to the grantee.

    - pub permission: Option, -} - -impl fmt::Debug for Grant { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Grant"); -if let Some(ref val) = self.grantee { -d.field("grantee", val); -} -if let Some(ref val) = self.permission { -d.field("permission", val); -} -d.finish_non_exhaustive() -} -} - - -pub type GrantFullControl = String; - -pub type GrantRead = String; - -pub type GrantReadACP = String; - -pub type GrantWrite = String; - -pub type GrantWriteACP = String; - -///

    Container for the person being granted permissions.

    -#[derive(Clone, PartialEq)] -pub struct Grantee { -///

    Screen name of the grantee.

    - pub display_name: Option, -///

    Email address of the grantee.

    -/// -///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    -///
      -///
    • -///

      US East (N. Virginia)

      -///
    • -///
    • -///

      US West (N. California)

      -///
    • -///
    • -///

      US West (Oregon)

      -///
    • -///
    • -///

      Asia Pacific (Singapore)

      -///
    • -///
    • -///

      Asia Pacific (Sydney)

      -///
    • -///
    • -///

      Asia Pacific (Tokyo)

      -///
    • -///
    • -///

      Europe (Ireland)

      -///
    • -///
    • -///

      South America (São Paulo)

      -///
    • -///
    -///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    -///
    - pub email_address: Option, -///

    The canonical user ID of the grantee.

    - pub id: Option, -///

    Type of grantee

    - pub type_: Type, -///

    URI of the grantee group.

    - pub uri: Option, -} - -impl fmt::Debug for Grantee { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Grantee"); -if let Some(ref val) = self.display_name { -d.field("display_name", val); -} -if let Some(ref val) = self.email_address { -d.field("email_address", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.field("type_", &self.type_); -if let Some(ref val) = self.uri { -d.field("uri", val); -} -d.finish_non_exhaustive() -} -} - - -pub type Grants = List; - -#[derive(Clone, Default, PartialEq)] -pub struct HeadBucketInput { -///

    The bucket name.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for HeadBucketInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("HeadBucketInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl HeadBucketInput { -#[must_use] -pub fn builder() -> builders::HeadBucketInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct HeadBucketOutput { -///

    Indicates whether the bucket name used in the request is an access point alias.

    -/// -///

    For directory buckets, the value of this field is false.

    -///
    - pub access_point_alias: Option, -///

    The name of the location where the bucket will be created.

    -///

    For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    - pub bucket_location_name: Option, -///

    The type of location where the bucket is created.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    - pub bucket_location_type: Option, -///

    The Region that the bucket is located.

    - pub bucket_region: Option, -} - -impl fmt::Debug for HeadBucketOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("HeadBucketOutput"); -if let Some(ref val) = self.access_point_alias { -d.field("access_point_alias", val); -} -if let Some(ref val) = self.bucket_location_name { -d.field("bucket_location_name", val); -} -if let Some(ref val) = self.bucket_location_type { -d.field("bucket_location_type", val); -} -if let Some(ref val) = self.bucket_region { -d.field("bucket_region", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct HeadObjectInput { -///

    The name of the bucket that contains the object.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    To retrieve the checksum, this parameter must be enabled.

    -///

    -/// General purpose buckets - -/// If you enable checksum mode and the object is uploaded with a -/// checksum -/// and encrypted with an Key Management Service (KMS) key, you must have permission to use the -/// kms:Decrypt action to retrieve the checksum.

    -///

    -/// Directory buckets - If you enable -/// ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service -/// (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and -/// kms:Decrypt permissions in IAM identity-based policies and KMS key -/// policies for the KMS key to retrieve the checksum of the object.

    - pub checksum_mode: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Return the object only if its entity tag (ETag) is the same as the one specified; -/// otherwise, return a 412 (precondition failed) error.

    -///

    If both of the If-Match and If-Unmodified-Since headers are -/// present in the request as follows:

    -///
      -///
    • -///

      -/// If-Match condition evaluates to true, and;

      -///
    • -///
    • -///

      -/// If-Unmodified-Since condition evaluates to false;

      -///
    • -///
    -///

    Then Amazon S3 returns 200 OK and the data requested.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_match: Option, -///

    Return the object only if it has been modified since the specified time; otherwise, -/// return a 304 (not modified) error.

    -///

    If both of the If-None-Match and If-Modified-Since headers are -/// present in the request as follows:

    -///
      -///
    • -///

      -/// If-None-Match condition evaluates to false, and;

      -///
    • -///
    • -///

      -/// If-Modified-Since condition evaluates to true;

      -///
    • -///
    -///

    Then Amazon S3 returns the 304 Not Modified response code.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_modified_since: Option, -///

    Return the object only if its entity tag (ETag) is different from the one specified; -/// otherwise, return a 304 (not modified) error.

    -///

    If both of the If-None-Match and If-Modified-Since headers are -/// present in the request as follows:

    -///
      -///
    • -///

      -/// If-None-Match condition evaluates to false, and;

      -///
    • -///
    • -///

      -/// If-Modified-Since condition evaluates to true;

      -///
    • -///
    -///

    Then Amazon S3 returns the 304 Not Modified response code.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_none_match: Option, -///

    Return the object only if it has not been modified since the specified time; otherwise, -/// return a 412 (precondition failed) error.

    -///

    If both of the If-Match and If-Unmodified-Since headers are -/// present in the request as follows:

    -///
      -///
    • -///

      -/// If-Match condition evaluates to true, and;

      -///
    • -///
    • -///

      -/// If-Unmodified-Since condition evaluates to false;

      -///
    • -///
    -///

    Then Amazon S3 returns 200 OK and the data requested.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_unmodified_since: Option, -///

    The object key.

    - pub key: ObjectKey, -///

    Part number of the object being read. This is a positive integer between 1 and 10,000. -/// Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about -/// the size of the part and the number of parts in this object.

    - pub part_number: Option, -///

    HeadObject returns only the metadata for an object. If the Range is satisfiable, only -/// the ContentLength is affected in the response. If the Range is not -/// satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

    - pub range: Option, - pub request_payer: Option, -///

    Sets the Cache-Control header of the response.

    - pub response_cache_control: Option, -///

    Sets the Content-Disposition header of the response.

    - pub response_content_disposition: Option, -///

    Sets the Content-Encoding header of the response.

    - pub response_content_encoding: Option, -///

    Sets the Content-Language header of the response.

    - pub response_content_language: Option, -///

    Sets the Content-Type header of the response.

    - pub response_content_type: Option, -///

    Sets the Expires header of the response.

    - pub response_expires: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Version ID used to reference a specific version of the object.

    -/// -///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for HeadObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("HeadObjectInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_mode { -d.field("checksum_mode", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_modified_since { -d.field("if_modified_since", val); -} -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); -} -if let Some(ref val) = self.if_unmodified_since { -d.field("if_unmodified_since", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -if let Some(ref val) = self.range { -d.field("range", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.response_cache_control { -d.field("response_cache_control", val); -} -if let Some(ref val) = self.response_content_disposition { -d.field("response_content_disposition", val); -} -if let Some(ref val) = self.response_content_encoding { -d.field("response_content_encoding", val); -} -if let Some(ref val) = self.response_content_language { -d.field("response_content_language", val); -} -if let Some(ref val) = self.response_content_type { -d.field("response_content_type", val); -} -if let Some(ref val) = self.response_expires { -d.field("response_expires", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl HeadObjectInput { -#[must_use] -pub fn builder() -> builders::HeadObjectInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct HeadObjectOutput { -///

    Indicates that a range of bytes was specified.

    - pub accept_ranges: Option, -///

    The archive state of the head object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub archive_status: Option, -///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with -/// Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more -/// information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    The checksum type, which determines how part-level checksums are combined to create an -/// object-level checksum for multipart objects. You can use this header response to verify -/// that the checksum type that is received is the same checksum type that was specified in -/// CreateMultipartUpload request. For more -/// information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Specifies presentational information for the object.

    - pub content_disposition: Option, -///

    Indicates what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    Size of the body in bytes.

    - pub content_length: Option, -///

    The portion of the object returned in the response for a GET request.

    - pub content_range: Option, -///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, -///

    Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If -/// false, this response header does not appear in the response.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub delete_marker: Option, -///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific -/// version of a resource found at a URL.

    - pub e_tag: Option, -///

    If the object expiration is configured (see -/// PutBucketLifecycleConfiguration -/// ), the response includes this -/// header. It includes the expiry-date and rule-id key-value pairs -/// providing object expiration information. The value of the rule-id is -/// URL-encoded.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    - pub expiration: Option, -///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, -///

    Date and time when the object was last modified.

    - pub last_modified: Option, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    This is set to the number of metadata entries not returned in x-amz-meta -/// headers. This can happen if you create metadata using an API like SOAP that supports more -/// flexible metadata than the REST API. For example, using SOAP, you can create metadata whose -/// values are not legal HTTP headers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub missing_meta: Option, -///

    Specifies whether a legal hold is in effect for this object. This header is only -/// returned if the requester has the s3:GetObjectLegalHold permission. This -/// header is not returned if the specified version of this object has never had a legal hold -/// applied. For more information about S3 Object Lock, see Object Lock.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode, if any, that's in effect for this object. This header is only -/// returned if the requester has the s3:GetObjectRetention permission. For more -/// information about S3 Object Lock, see Object Lock.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_mode: Option, -///

    The date and time when the Object Lock retention period expires. This header is only -/// returned if the requester has the s3:GetObjectRetention permission.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_retain_until_date: Option, -///

    The count of parts this object has. This value is only returned if you specify -/// partNumber in your request and the object was uploaded as a multipart -/// upload.

    - pub parts_count: Option, -///

    Amazon S3 can return this header if your request involves a bucket that is either a source or -/// a destination in a replication rule.

    -///

    In replication, you have a source bucket on which you configure replication and -/// destination bucket or buckets where Amazon S3 stores object replicas. When you request an object -/// (GetObject) or object metadata (HeadObject) from these -/// buckets, Amazon S3 will return the x-amz-replication-status header in the response -/// as follows:

    -///
      -///
    • -///

      -/// If requesting an object from the source bucket, -/// Amazon S3 will return the x-amz-replication-status header if the object in -/// your request is eligible for replication.

      -///

      For example, suppose that in your replication configuration, you specify object -/// prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix -/// TaxDocs. Any objects you upload with this key name prefix, for -/// example TaxDocs/document1.pdf, are eligible for replication. For any -/// object request with this key name prefix, Amazon S3 will return the -/// x-amz-replication-status header with value PENDING, COMPLETED or -/// FAILED indicating object replication status.

      -///
    • -///
    • -///

      -/// If requesting an object from a destination -/// bucket, Amazon S3 will return the x-amz-replication-status header -/// with value REPLICA if the object in your request is a replica that Amazon S3 created and -/// there is no replica modification replication in progress.

      -///
    • -///
    • -///

      -/// When replicating objects to multiple destination -/// buckets, the x-amz-replication-status header acts -/// differently. The header of the source object will only return a value of COMPLETED -/// when replication is successful to all destinations. The header will remain at value -/// PENDING until replication has completed for all destinations. If one or more -/// destinations fails replication the header will return FAILED.

      -///
    • -///
    -///

    For more information, see Replication.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub replication_status: Option, - pub request_charged: Option, -///

    If the object is an archived object (an object whose storage class is GLACIER), the -/// response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

    -///

    If an archive copy is already restored, the header value indicates when Amazon S3 is -/// scheduled to delete the object copy. For example:

    -///

    -/// x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 -/// GMT" -///

    -///

    If the object restoration is in progress, the header returns the value -/// ongoing-request="true".

    -///

    For more information about archiving objects, see Transitioning Objects: General Considerations.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub restore: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms, aws:kms:dsse).

    - pub server_side_encryption: Option, -///

    Provides storage class information of the object. Amazon S3 returns this header for all -/// objects except for S3 Standard storage class objects.

    -///

    For more information, see Storage Classes.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    Version ID of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub website_redirect_location: Option, -} - -impl fmt::Debug for HeadObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("HeadObjectOutput"); -if let Some(ref val) = self.accept_ranges { -d.field("accept_ranges", val); -} -if let Some(ref val) = self.archive_status { -d.field("archive_status", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_length { -d.field("content_length", val); -} -if let Some(ref val) = self.content_range { -d.field("content_range", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.missing_meta { -d.field("missing_meta", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.parts_count { -d.field("parts_count", val); -} -if let Some(ref val) = self.replication_status { -d.field("replication_status", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.restore { -d.field("restore", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -d.finish_non_exhaustive() -} -} - - -pub type HostName = String; - -pub type HttpErrorCodeReturnedEquals = String; - -pub type HttpRedirectCode = String; - -pub type ID = String; - -pub type IfMatch = ETagCondition; - -pub type IfMatchInitiatedTime = Timestamp; - -pub type IfMatchLastModifiedTime = Timestamp; - -pub type IfMatchSize = i64; - -pub type IfModifiedSince = Timestamp; - -pub type IfNoneMatch = ETagCondition; - -pub type IfUnmodifiedSince = Timestamp; - -///

    Container for the Suffix element.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IndexDocument { -///

    A suffix that is appended to a request that is for a directory on the website endpoint. -/// (For example, if the suffix is index.html and you make a request to -/// samplebucket/images/, the data that is returned will be for the object with -/// the key name images/index.html.) The suffix must not be empty and must not -/// include a slash character.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub suffix: Suffix, -} - -impl fmt::Debug for IndexDocument { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("IndexDocument"); -d.field("suffix", &self.suffix); -d.finish_non_exhaustive() -} -} - - -pub type Initiated = Timestamp; - -///

    Container element that identifies who initiated the multipart upload.

    -#[derive(Clone, Default, PartialEq)] -pub struct Initiator { -///

    Name of the Principal.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub display_name: Option, -///

    If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the -/// principal is an IAM User, it provides a user ARN value.

    -/// -///

    -/// Directory buckets - If the principal is an -/// Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it -/// provides a user ARN value.

    -///
    - pub id: Option, -} - -impl fmt::Debug for Initiator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Initiator"); -if let Some(ref val) = self.display_name { -d.field("display_name", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Describes the serialization format of the object.

    -#[derive(Clone, Default, PartialEq)] -pub struct InputSerialization { -///

    Describes the serialization of a CSV-encoded object.

    - pub csv: Option, -///

    Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: -/// NONE.

    - pub compression_type: Option, -///

    Specifies JSON as object's input serialization format.

    - pub json: Option, -///

    Specifies Parquet as object's input serialization format.

    - pub parquet: Option, -} - -impl fmt::Debug for InputSerialization { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InputSerialization"); -if let Some(ref val) = self.csv { -d.field("csv", val); -} -if let Some(ref val) = self.compression_type { -d.field("compression_type", val); -} -if let Some(ref val) = self.json { -d.field("json", val); -} -if let Some(ref val) = self.parquet { -d.field("parquet", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct IntelligentTieringAccessTier(Cow<'static, str>); - -impl IntelligentTieringAccessTier { -pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; - -pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for IntelligentTieringAccessTier { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: IntelligentTieringAccessTier) -> Self { -s.0 -} -} - -impl FromStr for IntelligentTieringAccessTier { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A container for specifying S3 Intelligent-Tiering filters. The filters determine the -/// subset of objects to which the rule applies.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringAndOperator { -///

    An object key name prefix that identifies the subset of objects to which the -/// configuration applies.

    - pub prefix: Option, -///

    All of these tags must exist in the object's tag set in order for the configuration to -/// apply.

    - pub tags: Option, -} - -impl fmt::Debug for IntelligentTieringAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("IntelligentTieringAndOperator"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

    -///

    For information about the S3 Intelligent-Tiering storage class, see Storage class -/// for automatically optimizing frequently and infrequently accessed -/// objects.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringConfiguration { -///

    Specifies a bucket filter. The configuration only includes objects that meet the -/// filter's criteria.

    - pub filter: Option, -///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, -///

    Specifies the status of the configuration.

    - pub status: IntelligentTieringStatus, -///

    Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

    - pub tierings: TieringList, -} - -impl fmt::Debug for IntelligentTieringConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("IntelligentTieringConfiguration"); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -d.field("id", &self.id); -d.field("status", &self.status); -d.field("tierings", &self.tierings); -d.finish_non_exhaustive() -} -} - -impl Default for IntelligentTieringConfiguration { -fn default() -> Self { -Self { -filter: None, -id: default(), -status: String::new().into(), -tierings: default(), -} -} -} - - -pub type IntelligentTieringConfigurationList = List; - -pub type IntelligentTieringDays = i32; - -///

    The Filter is used to identify objects that the S3 Intelligent-Tiering -/// configuration applies to.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringFilter { -///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. -/// The operator must have at least two predicates, and an object must match all of the -/// predicates in order for the filter to apply.

    - pub and: Option, -///

    An object key name prefix that identifies the subset of objects to which the rule -/// applies.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, - pub tag: Option, -} - -impl fmt::Debug for IntelligentTieringFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("IntelligentTieringFilter"); -if let Some(ref val) = self.and { -d.field("and", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tag { -d.field("tag", val); -} -d.finish_non_exhaustive() -} -} - - -pub type IntelligentTieringId = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct IntelligentTieringStatus(Cow<'static, str>); - -impl IntelligentTieringStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for IntelligentTieringStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: IntelligentTieringStatus) -> Self { -s.0 -} -} - -impl FromStr for IntelligentTieringStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Object is archived and inaccessible until restored.

    -///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage -/// class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access -/// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you -/// must first restore a copy using RestoreObject. Otherwise, this -/// operation returns an InvalidObjectState error. For information about restoring -/// archived objects, see Restoring Archived Objects in -/// the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidObjectState { - pub access_tier: Option, - pub storage_class: Option, -} - -impl fmt::Debug for InvalidObjectState { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InvalidObjectState"); -if let Some(ref val) = self.access_tier { -d.field("access_tier", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} -} - - -///

    You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

    -///
      -///
    • -///

      Cannot specify both a write offset value and user-defined object metadata for existing objects.

      -///
    • -///
    • -///

      Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

      -///
    • -///
    • -///

      Request body cannot be empty when 'write offset' is specified.

      -///
    • -///
    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidRequest { -} - -impl fmt::Debug for InvalidRequest { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InvalidRequest"); -d.finish_non_exhaustive() -} -} - - -///

    -/// The write offset value that you specified does not match the current object size. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidWriteOffset { -} - -impl fmt::Debug for InvalidWriteOffset { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InvalidWriteOffset"); -d.finish_non_exhaustive() -} -} - - -///

    Specifies the inventory configuration for an Amazon S3 bucket. For more information, see -/// GET Bucket inventory in the Amazon S3 API Reference.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryConfiguration { -///

    Contains information about where to publish the inventory results.

    - pub destination: InventoryDestination, -///

    Specifies an inventory filter. The inventory only includes objects that meet the -/// filter's criteria.

    - pub filter: Option, -///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, -///

    Object versions to include in the inventory list. If set to All, the list -/// includes all the object versions, which adds the version-related fields -/// VersionId, IsLatest, and DeleteMarker to the -/// list. If set to Current, the list does not contain these version-related -/// fields.

    - pub included_object_versions: InventoryIncludedObjectVersions, -///

    Specifies whether the inventory is enabled or disabled. If set to True, an -/// inventory list is generated. If set to False, no inventory list is -/// generated.

    - pub is_enabled: IsEnabled, -///

    Contains the optional fields that are included in the inventory results.

    - pub optional_fields: Option, -///

    Specifies the schedule for generating inventory results.

    - pub schedule: InventorySchedule, -} - -impl fmt::Debug for InventoryConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryConfiguration"); -d.field("destination", &self.destination); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -d.field("id", &self.id); -d.field("included_object_versions", &self.included_object_versions); -d.field("is_enabled", &self.is_enabled); -if let Some(ref val) = self.optional_fields { -d.field("optional_fields", val); -} -d.field("schedule", &self.schedule); -d.finish_non_exhaustive() -} -} - -impl Default for InventoryConfiguration { -fn default() -> Self { -Self { -destination: default(), -filter: None, -id: default(), -included_object_versions: String::new().into(), -is_enabled: default(), -optional_fields: None, -schedule: default(), -} -} -} - - -pub type InventoryConfigurationList = List; - -///

    Specifies the inventory configuration for an Amazon S3 bucket.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryDestination { -///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) -/// where inventory results are published.

    - pub s3_bucket_destination: InventoryS3BucketDestination, -} - -impl fmt::Debug for InventoryDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryDestination"); -d.field("s3_bucket_destination", &self.s3_bucket_destination); -d.finish_non_exhaustive() -} -} - -impl Default for InventoryDestination { -fn default() -> Self { -Self { -s3_bucket_destination: default(), -} -} -} - - -///

    Contains the type of server-side encryption used to encrypt the inventory -/// results.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct InventoryEncryption { -///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    - pub ssekms: Option, -///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    - pub sses3: Option, -} - -impl fmt::Debug for InventoryEncryption { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryEncryption"); -if let Some(ref val) = self.ssekms { -d.field("ssekms", val); -} -if let Some(ref val) = self.sses3 { -d.field("sses3", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies an inventory filter. The inventory only includes objects that meet the -/// filter's criteria.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct InventoryFilter { -///

    The prefix that an object must have to be included in the inventory results.

    - pub prefix: Prefix, -} - -impl fmt::Debug for InventoryFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryFilter"); -d.field("prefix", &self.prefix); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryFormat(Cow<'static, str>); - -impl InventoryFormat { -pub const CSV: &'static str = "CSV"; - -pub const ORC: &'static str = "ORC"; - -pub const PARQUET: &'static str = "Parquet"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for InventoryFormat { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: InventoryFormat) -> Self { -s.0 -} -} - -impl FromStr for InventoryFormat { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryFrequency(Cow<'static, str>); - -impl InventoryFrequency { -pub const DAILY: &'static str = "Daily"; - -pub const WEEKLY: &'static str = "Weekly"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for InventoryFrequency { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: InventoryFrequency) -> Self { -s.0 -} -} - -impl FromStr for InventoryFrequency { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type InventoryId = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryIncludedObjectVersions(Cow<'static, str>); - -impl InventoryIncludedObjectVersions { -pub const ALL: &'static str = "All"; - -pub const CURRENT: &'static str = "Current"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for InventoryIncludedObjectVersions { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: InventoryIncludedObjectVersions) -> Self { -s.0 -} -} - -impl FromStr for InventoryIncludedObjectVersions { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryOptionalField(Cow<'static, str>); - -impl InventoryOptionalField { -pub const BUCKET_KEY_STATUS: &'static str = "BucketKeyStatus"; - -pub const CHECKSUM_ALGORITHM: &'static str = "ChecksumAlgorithm"; - -pub const E_TAG: &'static str = "ETag"; - -pub const ENCRYPTION_STATUS: &'static str = "EncryptionStatus"; - -pub const INTELLIGENT_TIERING_ACCESS_TIER: &'static str = "IntelligentTieringAccessTier"; - -pub const IS_MULTIPART_UPLOADED: &'static str = "IsMultipartUploaded"; - -pub const LAST_MODIFIED_DATE: &'static str = "LastModifiedDate"; - -pub const OBJECT_ACCESS_CONTROL_LIST: &'static str = "ObjectAccessControlList"; - -pub const OBJECT_LOCK_LEGAL_HOLD_STATUS: &'static str = "ObjectLockLegalHoldStatus"; - -pub const OBJECT_LOCK_MODE: &'static str = "ObjectLockMode"; - -pub const OBJECT_LOCK_RETAIN_UNTIL_DATE: &'static str = "ObjectLockRetainUntilDate"; - -pub const OBJECT_OWNER: &'static str = "ObjectOwner"; - -pub const REPLICATION_STATUS: &'static str = "ReplicationStatus"; - -pub const SIZE: &'static str = "Size"; - -pub const STORAGE_CLASS: &'static str = "StorageClass"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for InventoryOptionalField { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: InventoryOptionalField) -> Self { -s.0 -} -} - -impl FromStr for InventoryOptionalField { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type InventoryOptionalFields = List; - -///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) -/// where inventory results are published.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryS3BucketDestination { -///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the -/// owner is not validated before exporting data.

    -/// -///

    Although this value is optional, we strongly recommend that you set it to help -/// prevent problems if the destination bucket ownership changes.

    -///
    - pub account_id: Option, -///

    The Amazon Resource Name (ARN) of the bucket where inventory results will be -/// published.

    - pub bucket: BucketName, -///

    Contains the type of server-side encryption used to encrypt the inventory -/// results.

    - pub encryption: Option, -///

    Specifies the output format of the inventory results.

    - pub format: InventoryFormat, -///

    The prefix that is prepended to all inventory results.

    - pub prefix: Option, -} - -impl fmt::Debug for InventoryS3BucketDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryS3BucketDestination"); -if let Some(ref val) = self.account_id { -d.field("account_id", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.encryption { -d.field("encryption", val); -} -d.field("format", &self.format); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} -} - -impl Default for InventoryS3BucketDestination { -fn default() -> Self { -Self { -account_id: None, -bucket: default(), -encryption: None, -format: String::new().into(), -prefix: None, -} -} -} - - -///

    Specifies the schedule for generating inventory results.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventorySchedule { -///

    Specifies how frequently inventory results are produced.

    - pub frequency: InventoryFrequency, -} - -impl fmt::Debug for InventorySchedule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventorySchedule"); -d.field("frequency", &self.frequency); -d.finish_non_exhaustive() -} -} - -impl Default for InventorySchedule { -fn default() -> Self { -Self { -frequency: String::new().into(), -} -} -} - - -pub type IsEnabled = bool; - -pub type IsLatest = bool; - -pub type IsPublic = bool; - -pub type IsRestoreInProgress = bool; - -pub type IsTruncated = bool; - -///

    Specifies JSON as object's input serialization format.

    -#[derive(Clone, Default, PartialEq)] -pub struct JSONInput { -///

    The type of JSON. Valid values: Document, Lines.

    - pub type_: Option, -} - -impl fmt::Debug for JSONInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("JSONInput"); -if let Some(ref val) = self.type_ { -d.field("type_", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies JSON as request's output serialization format.

    -#[derive(Clone, Default, PartialEq)] -pub struct JSONOutput { -///

    The value used to separate individual records in the output. If no value is specified, -/// Amazon S3 uses a newline character ('\n').

    - pub record_delimiter: Option, -} - -impl fmt::Debug for JSONOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("JSONOutput"); -if let Some(ref val) = self.record_delimiter { -d.field("record_delimiter", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct JSONType(Cow<'static, str>); - -impl JSONType { -pub const DOCUMENT: &'static str = "DOCUMENT"; - -pub const LINES: &'static str = "LINES"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for JSONType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: JSONType) -> Self { -s.0 -} -} - -impl FromStr for JSONType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type KMSContext = String; - -pub type KeyCount = i32; - -pub type KeyMarker = String; - -pub type KeyPrefixEquals = String; - -pub type LambdaFunctionArn = String; - -///

    A container for specifying the configuration for Lambda notifications.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LambdaFunctionConfiguration { -///

    The Amazon S3 bucket event for which to invoke the Lambda function. For more information, -/// see Supported -/// Event Types in the Amazon S3 User Guide.

    - pub events: EventList, - pub filter: Option, - pub id: Option, -///

    The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the -/// specified event type occurs.

    - pub lambda_function_arn: LambdaFunctionArn, -} - -impl fmt::Debug for LambdaFunctionConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LambdaFunctionConfiguration"); -d.field("events", &self.events); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.field("lambda_function_arn", &self.lambda_function_arn); -d.finish_non_exhaustive() -} -} - - -pub type LambdaFunctionConfigurationList = List; - -pub type LastModified = Timestamp; - -pub type LastModifiedTime = Timestamp; - -///

    Container for the expiration for the lifecycle of the object.

    -///

    For more information see, Managing your storage -/// lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleExpiration { -///

    Indicates at what date the object is to be moved or deleted. The date value must conform -/// to the ISO 8601 format. The time is always midnight UTC.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub date: Option, -///

    Indicates the lifetime, in days, of the objects that are subject to the rule. The value -/// must be a non-zero positive integer.

    - pub days: Option, -///

    Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set -/// to true, the delete marker will be expired; if set to false the policy takes no action. -/// This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub expired_object_delete_marker: Option, -} - -impl fmt::Debug for LifecycleExpiration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LifecycleExpiration"); -if let Some(ref val) = self.date { -d.field("date", val); -} -if let Some(ref val) = self.days { -d.field("days", val); -} -if let Some(ref val) = self.expired_object_delete_marker { -d.field("expired_object_delete_marker", val); -} -d.finish_non_exhaustive() -} -} - - -///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    -///

    For more information see, Managing your storage -/// lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRule { - pub abort_incomplete_multipart_upload: Option, -///

    Specifies the expiration for the lifecycle of the object in the form of date, days and, -/// whether the object has a delete marker.

    - pub expiration: Option, -///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A -/// Filter must have exactly one of Prefix, Tag, or -/// And specified. Filter is required if the -/// LifecycleRule does not contain a Prefix element.

    -/// -///

    -/// Tag filters are not supported for directory buckets.

    -///
    - pub filter: Option, -///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    - pub id: Option, - pub noncurrent_version_expiration: Option, -///

    Specifies the transition rule for the lifecycle rule that describes when noncurrent -/// objects transition to a specific storage class. If your bucket is versioning-enabled (or -/// versioning is suspended), you can set this action to request that Amazon S3 transition -/// noncurrent object versions to a specific storage class at a set period in the object's -/// lifetime.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub noncurrent_version_transitions: Option, -///

    Prefix identifying one or more objects to which the rule applies. This is -/// no longer used; use Filter instead.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, -///

    If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not -/// currently being applied.

    - pub status: ExpirationStatus, -///

    Specifies when an Amazon S3 object transitions to a specified storage class.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub transitions: Option, -} - -impl fmt::Debug for LifecycleRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LifecycleRule"); -if let Some(ref val) = self.abort_incomplete_multipart_upload { -d.field("abort_incomplete_multipart_upload", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -if let Some(ref val) = self.noncurrent_version_expiration { -d.field("noncurrent_version_expiration", val); -} -if let Some(ref val) = self.noncurrent_version_transitions { -d.field("noncurrent_version_transitions", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.field("status", &self.status); -if let Some(ref val) = self.transitions { -d.field("transitions", val); -} -d.finish_non_exhaustive() -} -} - - -///

    This is used in a Lifecycle Rule Filter to apply a logical AND to two or more -/// predicates. The Lifecycle Rule will apply to any object matching all of the predicates -/// configured inside the And operator.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRuleAndOperator { -///

    Minimum object size to which the rule applies.

    - pub object_size_greater_than: Option, -///

    Maximum object size to which the rule applies.

    - pub object_size_less_than: Option, -///

    Prefix identifying one or more objects to which the rule applies.

    - pub prefix: Option, -///

    All of these tags must exist in the object's tag set in order for the rule to -/// apply.

    - pub tags: Option, -} - -impl fmt::Debug for LifecycleRuleAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LifecycleRuleAndOperator"); -if let Some(ref val) = self.object_size_greater_than { -d.field("object_size_greater_than", val); -} -if let Some(ref val) = self.object_size_less_than { -d.field("object_size_less_than", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} -} - - -///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A -/// Filter can have exactly one of Prefix, Tag, -/// ObjectSizeGreaterThan, ObjectSizeLessThan, or And -/// specified. If the Filter element is left empty, the Lifecycle Rule applies to -/// all objects in the bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRuleFilter { - pub and: Option, -///

    Minimum object size to which the rule applies.

    - pub object_size_greater_than: Option, -///

    Maximum object size to which the rule applies.

    - pub object_size_less_than: Option, -///

    Prefix identifying one or more objects to which the rule applies.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, -///

    This tag must exist in the object's tag set in order for the rule to apply.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub tag: Option, -} - -impl fmt::Debug for LifecycleRuleFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LifecycleRuleFilter"); -if let Some(ref val) = self.and { -d.field("and", val); -} -if let Some(ref val) = self.object_size_greater_than { -d.field("object_size_greater_than", val); -} -if let Some(ref val) = self.object_size_less_than { -d.field("object_size_less_than", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tag { -d.field("tag", val); -} -d.finish_non_exhaustive() -} -} - - -pub type LifecycleRules = List; - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketAnalyticsConfigurationsInput { -///

    The name of the bucket from which analytics configurations are retrieved.

    - pub bucket: BucketName, -///

    The ContinuationToken that represents a placeholder from where this request -/// should begin.

    - pub continuation_token: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for ListBucketAnalyticsConfigurationsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketAnalyticsConfigurationsInput { -#[must_use] -pub fn builder() -> builders::ListBucketAnalyticsConfigurationsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketAnalyticsConfigurationsOutput { -///

    The list of analytics configurations for a bucket.

    - pub analytics_configuration_list: Option, -///

    The marker that is used as a starting point for this analytics configuration list -/// response. This value is present if it was sent in the request.

    - pub continuation_token: Option, -///

    Indicates whether the returned list of analytics configurations is complete. A value of -/// true indicates that the list is not complete and the NextContinuationToken will be provided -/// for a subsequent request.

    - pub is_truncated: Option, -///

    -/// NextContinuationToken is sent when isTruncated is true, which -/// indicates that there are more analytics configurations to list. The next request must -/// include this NextContinuationToken. The token is obfuscated and is not a -/// usable value.

    - pub next_continuation_token: Option, -} - -impl fmt::Debug for ListBucketAnalyticsConfigurationsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsOutput"); -if let Some(ref val) = self.analytics_configuration_list { -d.field("analytics_configuration_list", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketIntelligentTieringConfigurationsInput { -///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, -///

    The ContinuationToken that represents a placeholder from where this request -/// should begin.

    - pub continuation_token: Option, -} - -impl fmt::Debug for ListBucketIntelligentTieringConfigurationsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketIntelligentTieringConfigurationsInput { -#[must_use] -pub fn builder() -> builders::ListBucketIntelligentTieringConfigurationsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketIntelligentTieringConfigurationsOutput { -///

    The ContinuationToken that represents a placeholder from where this request -/// should begin.

    - pub continuation_token: Option, -///

    The list of S3 Intelligent-Tiering configurations for a bucket.

    - pub intelligent_tiering_configuration_list: Option, -///

    Indicates whether the returned list of analytics configurations is complete. A value of -/// true indicates that the list is not complete and the -/// NextContinuationToken will be provided for a subsequent request.

    - pub is_truncated: Option, -///

    The marker used to continue this inventory configuration listing. Use the -/// NextContinuationToken from this response to continue the listing in a -/// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    - pub next_continuation_token: Option, -} - -impl fmt::Debug for ListBucketIntelligentTieringConfigurationsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsOutput"); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.intelligent_tiering_configuration_list { -d.field("intelligent_tiering_configuration_list", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketInventoryConfigurationsInput { -///

    The name of the bucket containing the inventory configurations to retrieve.

    - pub bucket: BucketName, -///

    The marker used to continue an inventory configuration listing that has been truncated. -/// Use the NextContinuationToken from a previously truncated list response to -/// continue the listing. The continuation token is an opaque value that Amazon S3 -/// understands.

    - pub continuation_token: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for ListBucketInventoryConfigurationsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketInventoryConfigurationsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketInventoryConfigurationsInput { -#[must_use] -pub fn builder() -> builders::ListBucketInventoryConfigurationsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketInventoryConfigurationsOutput { -///

    If sent in the request, the marker that is used as a starting point for this inventory -/// configuration list response.

    - pub continuation_token: Option, -///

    The list of inventory configurations for a bucket.

    - pub inventory_configuration_list: Option, -///

    Tells whether the returned list of inventory configurations is complete. A value of true -/// indicates that the list is not complete and the NextContinuationToken is provided for a -/// subsequent request.

    - pub is_truncated: Option, -///

    The marker used to continue this inventory configuration listing. Use the -/// NextContinuationToken from this response to continue the listing in a -/// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    - pub next_continuation_token: Option, -} - -impl fmt::Debug for ListBucketInventoryConfigurationsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketInventoryConfigurationsOutput"); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.inventory_configuration_list { -d.field("inventory_configuration_list", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketMetricsConfigurationsInput { -///

    The name of the bucket containing the metrics configurations to retrieve.

    - pub bucket: BucketName, -///

    The marker that is used to continue a metrics configuration listing that has been -/// truncated. Use the NextContinuationToken from a previously truncated list -/// response to continue the listing. The continuation token is an opaque value that Amazon S3 -/// understands.

    - pub continuation_token: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for ListBucketMetricsConfigurationsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketMetricsConfigurationsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketMetricsConfigurationsInput { -#[must_use] -pub fn builder() -> builders::ListBucketMetricsConfigurationsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketMetricsConfigurationsOutput { -///

    The marker that is used as a starting point for this metrics configuration list -/// response. This value is present if it was sent in the request.

    - pub continuation_token: Option, -///

    Indicates whether the returned list of metrics configurations is complete. A value of -/// true indicates that the list is not complete and the NextContinuationToken will be provided -/// for a subsequent request.

    - pub is_truncated: Option, -///

    The list of metrics configurations for a bucket.

    - pub metrics_configuration_list: Option, -///

    The marker used to continue a metrics configuration listing that has been truncated. Use -/// the NextContinuationToken from a previously truncated list response to -/// continue the listing. The continuation token is an opaque value that Amazon S3 -/// understands.

    - pub next_continuation_token: Option, -} - -impl fmt::Debug for ListBucketMetricsConfigurationsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketMetricsConfigurationsOutput"); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.metrics_configuration_list { -d.field("metrics_configuration_list", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketsInput { -///

    Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services -/// Region must be expressed according to the Amazon Web Services Region code, such as us-west-2 -/// for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services -/// Regions, see Regions and Endpoints.

    -/// -///

    Requests made to a Regional endpoint that is different from the -/// bucket-region parameter are not supported. For example, if you want to -/// limit the response to your buckets in Region us-west-2, the request must be -/// made to an endpoint in Region us-west-2.

    -///
    - pub bucket_region: Option, -///

    -/// ContinuationToken indicates to Amazon S3 that the list is being continued on -/// this bucket with a token. ContinuationToken is obfuscated and is not a real -/// key. You can use this ContinuationToken for pagination of the list results.

    -///

    Length Constraints: Minimum length of 0. Maximum length of 1024.

    -///

    Required: No.

    -/// -///

    If you specify the bucket-region, prefix, or continuation-token -/// query parameters without using max-buckets to set the maximum number of buckets returned in the response, -/// Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

    -///
    - pub continuation_token: Option, -///

    Maximum number of buckets to be returned in response. When the number is more than the -/// count of buckets that are owned by an Amazon Web Services account, return all the buckets in -/// response.

    - pub max_buckets: Option, -///

    Limits the response to bucket names that begin with the specified bucket name -/// prefix.

    - pub prefix: Option, -} - -impl fmt::Debug for ListBucketsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketsInput"); -if let Some(ref val) = self.bucket_region { -d.field("bucket_region", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.max_buckets { -d.field("max_buckets", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketsInput { -#[must_use] -pub fn builder() -> builders::ListBucketsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketsOutput { -///

    The list of buckets owned by the requester.

    - pub buckets: Option, -///

    -/// ContinuationToken is included in the response when there are more buckets -/// that can be listed with pagination. The next ListBuckets request to Amazon S3 can -/// be continued with this ContinuationToken. ContinuationToken is -/// obfuscated and is not a real bucket.

    - pub continuation_token: Option, -///

    The owner of the buckets listed.

    - pub owner: Option, -///

    If Prefix was sent with the request, it is included in the response.

    -///

    All bucket names in the response begin with the specified bucket name prefix.

    - pub prefix: Option, -} - -impl fmt::Debug for ListBucketsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketsOutput"); -if let Some(ref val) = self.buckets { -d.field("buckets", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListDirectoryBucketsInput { -///

    -/// ContinuationToken indicates to Amazon S3 that the list is being continued on -/// buckets in this account with a token. ContinuationToken is obfuscated and is -/// not a real bucket name. You can use this ContinuationToken for the pagination -/// of the list results.

    - pub continuation_token: Option, -///

    Maximum number of buckets to be returned in response. When the number is more than the -/// count of buckets that are owned by an Amazon Web Services account, return all the buckets in -/// response.

    - pub max_directory_buckets: Option, -} - -impl fmt::Debug for ListDirectoryBucketsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListDirectoryBucketsInput"); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.max_directory_buckets { -d.field("max_directory_buckets", val); -} -d.finish_non_exhaustive() -} -} - -impl ListDirectoryBucketsInput { -#[must_use] -pub fn builder() -> builders::ListDirectoryBucketsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListDirectoryBucketsOutput { -///

    The list of buckets owned by the requester.

    - pub buckets: Option, -///

    If ContinuationToken was sent with the request, it is included in the -/// response. You can use the returned ContinuationToken for pagination of the -/// list response.

    - pub continuation_token: Option, -} - -impl fmt::Debug for ListDirectoryBucketsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListDirectoryBucketsOutput"); -if let Some(ref val) = self.buckets { -d.field("buckets", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListMultipartUploadsInput { -///

    The name of the bucket to which the multipart upload was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Character you use to group keys.

    -///

    All keys that contain the same string between the prefix, if specified, and the first -/// occurrence of the delimiter after the prefix are grouped under a single result element, -/// CommonPrefixes. If you don't specify the prefix parameter, then the -/// substring starts at the beginning of the key. The keys that are grouped under -/// CommonPrefixes result element are not returned elsewhere in the -/// response.

    -/// -///

    -/// Directory buckets - For directory buckets, / is the only supported delimiter.

    -///
    - pub delimiter: Option, - pub encoding_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Specifies the multipart upload after which listing should begin.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - For -/// general purpose buckets, key-marker is an object key. Together with -/// upload-id-marker, this parameter specifies the multipart upload -/// after which listing should begin.

      -///

      If upload-id-marker is not specified, only the keys -/// lexicographically greater than the specified key-marker will be -/// included in the list.

      -///

      If upload-id-marker is specified, any multipart uploads for a key -/// equal to the key-marker might also be included, provided those -/// multipart uploads have upload IDs lexicographically greater than the specified -/// upload-id-marker.

      -///
    • -///
    • -///

      -/// Directory buckets - For -/// directory buckets, key-marker is obfuscated and isn't a real object -/// key. The upload-id-marker parameter isn't supported by -/// directory buckets. To list the additional multipart uploads, you only need to set -/// the value of key-marker to the NextKeyMarker value from -/// the previous response.

      -///

      In the ListMultipartUploads response, the multipart uploads aren't -/// sorted lexicographically based on the object keys. -/// -///

      -///
    • -///
    -///
    - pub key_marker: Option, -///

    Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response -/// body. 1,000 is the maximum number of uploads that can be returned in a response.

    - pub max_uploads: Option, -///

    Lists in-progress uploads only for those keys that begin with the specified prefix. You -/// can use prefixes to separate a bucket into different grouping of keys. (You can think of -/// using prefix to make groups in the same way that you'd use a folder in a file -/// system.)

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub prefix: Option, - pub request_payer: Option, -///

    Together with key-marker, specifies the multipart upload after which listing should -/// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. -/// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the -/// list only if they have an upload ID lexicographically greater than the specified -/// upload-id-marker.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub upload_id_marker: Option, -} - -impl fmt::Debug for ListMultipartUploadsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListMultipartUploadsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.key_marker { -d.field("key_marker", val); -} -if let Some(ref val) = self.max_uploads { -d.field("max_uploads", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.upload_id_marker { -d.field("upload_id_marker", val); -} -d.finish_non_exhaustive() -} -} - -impl ListMultipartUploadsInput { -#[must_use] -pub fn builder() -> builders::ListMultipartUploadsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListMultipartUploadsOutput { -///

    The name of the bucket to which the multipart upload was initiated. Does not return the -/// access point ARN or access point alias if used.

    - pub bucket: Option, -///

    If you specify a delimiter in the request, then the result returns each distinct key -/// prefix containing the delimiter in a CommonPrefixes element. The distinct key -/// prefixes are returned in the Prefix child element.

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub common_prefixes: Option, -///

    Contains the delimiter you specified in the request. If you don't specify a delimiter in -/// your request, this element is absent from the response.

    -/// -///

    -/// Directory buckets - For directory buckets, / is the only supported delimiter.

    -///
    - pub delimiter: Option, -///

    Encoding type used by Amazon S3 to encode object keys in the response.

    -///

    If you specify the encoding-type request parameter, Amazon S3 includes this -/// element in the response, and returns encoded key name values in the following response -/// elements:

    -///

    -/// Delimiter, KeyMarker, Prefix, -/// NextKeyMarker, Key.

    - pub encoding_type: Option, -///

    Indicates whether the returned list of multipart uploads is truncated. A value of true -/// indicates that the list was truncated. The list can be truncated if the number of multipart -/// uploads exceeds the limit allowed or specified by max uploads.

    - pub is_truncated: Option, -///

    The key at or after which the listing began.

    - pub key_marker: Option, -///

    Maximum number of multipart uploads that could have been included in the -/// response.

    - pub max_uploads: Option, -///

    When a list is truncated, this element specifies the value that should be used for the -/// key-marker request parameter in a subsequent request.

    - pub next_key_marker: Option, -///

    When a list is truncated, this element specifies the value that should be used for the -/// upload-id-marker request parameter in a subsequent request.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub next_upload_id_marker: Option, -///

    When a prefix is provided in the request, this field contains the specified prefix. The -/// result contains only keys starting with the specified prefix.

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub prefix: Option, - pub request_charged: Option, -///

    Together with key-marker, specifies the multipart upload after which listing should -/// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. -/// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the -/// list only if they have an upload ID lexicographically greater than the specified -/// upload-id-marker.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub upload_id_marker: Option, -///

    Container for elements related to a particular multipart upload. A response can contain -/// zero or more Upload elements.

    - pub uploads: Option, -} - -impl fmt::Debug for ListMultipartUploadsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListMultipartUploadsOutput"); -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.common_prefixes { -d.field("common_prefixes", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.key_marker { -d.field("key_marker", val); -} -if let Some(ref val) = self.max_uploads { -d.field("max_uploads", val); -} -if let Some(ref val) = self.next_key_marker { -d.field("next_key_marker", val); -} -if let Some(ref val) = self.next_upload_id_marker { -d.field("next_upload_id_marker", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.upload_id_marker { -d.field("upload_id_marker", val); -} -if let Some(ref val) = self.uploads { -d.field("uploads", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectVersionsInput { -///

    The bucket name that contains the objects.

    - pub bucket: BucketName, -///

    A delimiter is a character that you specify to group keys. All keys that contain the -/// same string between the prefix and the first occurrence of the delimiter are -/// grouped under a single result element in CommonPrefixes. These groups are -/// counted as one result against the max-keys limitation. These keys are not -/// returned elsewhere in the response.

    - pub delimiter: Option, - pub encoding_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Specifies the key to start with when listing objects in a bucket.

    - pub key_marker: Option, -///

    Sets the maximum number of keys returned in the response. By default, the action returns -/// up to 1,000 key names. The response might contain fewer keys but will never contain more. -/// If additional keys satisfy the search criteria, but were not returned because -/// max-keys was exceeded, the response contains -/// true. To return the additional keys, -/// see key-marker and version-id-marker.

    - pub max_keys: Option, -///

    Specifies the optional fields that you want returned in the response. Fields that you do -/// not specify are not returned.

    - pub optional_object_attributes: Option, -///

    Use this parameter to select only those keys that begin with the specified prefix. You -/// can use prefixes to separate a bucket into different groupings of keys. (You can think of -/// using prefix to make groups in the same way that you'd use a folder in a file -/// system.) You can use prefix with delimiter to roll up numerous -/// objects into a single result under CommonPrefixes.

    - pub prefix: Option, - pub request_payer: Option, -///

    Specifies the object version you want to start listing from.

    - pub version_id_marker: Option, -} - -impl fmt::Debug for ListObjectVersionsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectVersionsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.key_marker { -d.field("key_marker", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.optional_object_attributes { -d.field("optional_object_attributes", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id_marker { -d.field("version_id_marker", val); -} -d.finish_non_exhaustive() -} -} - -impl ListObjectVersionsInput { -#[must_use] -pub fn builder() -> builders::ListObjectVersionsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectVersionsOutput { -///

    All of the keys rolled up into a common prefix count as a single return when calculating -/// the number of returns.

    - pub common_prefixes: Option, -///

    Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

    - pub delete_markers: Option, -///

    The delimiter grouping the included keys. A delimiter is a character that you specify to -/// group keys. All keys that contain the same string between the prefix and the first -/// occurrence of the delimiter are grouped under a single result element in -/// CommonPrefixes. These groups are counted as one result against the -/// max-keys limitation. These keys are not returned elsewhere in the -/// response.

    - pub delimiter: Option, -///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    -///

    If you specify the encoding-type request parameter, Amazon S3 includes this -/// element in the response, and returns encoded key name values in the following response -/// elements:

    -///

    -/// KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

    - pub encoding_type: Option, -///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search -/// criteria. If your results were truncated, you can make a follow-up paginated request by -/// using the NextKeyMarker and NextVersionIdMarker response -/// parameters as a starting place in another request to return the rest of the results.

    - pub is_truncated: Option, -///

    Marks the last key returned in a truncated response.

    - pub key_marker: Option, -///

    Specifies the maximum number of objects to return.

    - pub max_keys: Option, -///

    The bucket name.

    - pub name: Option, -///

    When the number of responses exceeds the value of MaxKeys, -/// NextKeyMarker specifies the first key not returned that satisfies the -/// search criteria. Use this value for the key-marker request parameter in a subsequent -/// request.

    - pub next_key_marker: Option, -///

    When the number of responses exceeds the value of MaxKeys, -/// NextVersionIdMarker specifies the first object version not returned that -/// satisfies the search criteria. Use this value for the version-id-marker -/// request parameter in a subsequent request.

    - pub next_version_id_marker: Option, -///

    Selects objects that start with the value supplied by this parameter.

    - pub prefix: Option, - pub request_charged: Option, -///

    Marks the last version of the key returned in a truncated response.

    - pub version_id_marker: Option, -///

    Container for version information.

    - pub versions: Option, -} - -impl fmt::Debug for ListObjectVersionsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectVersionsOutput"); -if let Some(ref val) = self.common_prefixes { -d.field("common_prefixes", val); -} -if let Some(ref val) = self.delete_markers { -d.field("delete_markers", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.key_marker { -d.field("key_marker", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.next_key_marker { -d.field("next_key_marker", val); -} -if let Some(ref val) = self.next_version_id_marker { -d.field("next_version_id_marker", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.version_id_marker { -d.field("version_id_marker", val); -} -if let Some(ref val) = self.versions { -d.field("versions", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsInput { -///

    The name of the bucket containing the objects.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    A delimiter is a character that you use to group keys.

    - pub delimiter: Option, - pub encoding_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this -/// specified key. Marker can be any key in the bucket.

    - pub marker: Option, -///

    Sets the maximum number of keys returned in the response. By default, the action returns -/// up to 1,000 key names. The response might contain fewer keys but will never contain more. -///

    - pub max_keys: Option, -///

    Specifies the optional fields that you want returned in the response. Fields that you do -/// not specify are not returned.

    - pub optional_object_attributes: Option, -///

    Limits the response to keys that begin with the specified prefix.

    - pub prefix: Option, -///

    Confirms that the requester knows that she or he will be charged for the list objects -/// request. Bucket owners need not specify this parameter in their requests.

    - pub request_payer: Option, -} - -impl fmt::Debug for ListObjectsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.marker { -d.field("marker", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.optional_object_attributes { -d.field("optional_object_attributes", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.finish_non_exhaustive() -} -} - -impl ListObjectsInput { -#[must_use] -pub fn builder() -> builders::ListObjectsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsOutput { -///

    The bucket name.

    - pub name: Option, -///

    Keys that begin with the indicated prefix.

    - pub prefix: Option, -///

    Indicates where in the bucket listing begins. Marker is included in the response if it -/// was sent with the request.

    - pub marker: Option, -///

    The maximum number of keys returned in the response body.

    - pub max_keys: Option, -///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search -/// criteria.

    - pub is_truncated: Option, -///

    Metadata about each object returned.

    - pub contents: Option, -///

    All of the keys (up to 1,000) rolled up in a common prefix count as a single return when -/// calculating the number of returns.

    -///

    A response can contain CommonPrefixes only if you specify a -/// delimiter.

    -///

    -/// CommonPrefixes contains all (if there are any) keys between -/// Prefix and the next occurrence of the string specified by the -/// delimiter.

    -///

    -/// CommonPrefixes lists keys that act like subdirectories in the directory -/// specified by Prefix.

    -///

    For example, if the prefix is notes/ and the delimiter is a slash -/// (/), as in notes/summer/july, the common prefix is -/// notes/summer/. All of the keys that roll up into a common prefix count as a -/// single return when calculating the number of returns.

    - pub common_prefixes: Option, -///

    Causes keys that contain the same string between the prefix and the first occurrence of -/// the delimiter to be rolled up into a single result element in the -/// CommonPrefixes collection. These rolled-up keys are not returned elsewhere -/// in the response. Each rolled-up result counts as only one return against the -/// MaxKeys value.

    - pub delimiter: Option, -///

    When the response is truncated (the IsTruncated element value in the -/// response is true), you can use the key name in this field as the -/// marker parameter in the subsequent request to get the next set of objects. -/// Amazon S3 lists objects in alphabetical order.

    -/// -///

    This element is returned only if you have the delimiter request -/// parameter specified. If the response does not include the NextMarker -/// element and it is truncated, you can use the value of the last Key element -/// in the response as the marker parameter in the subsequent request to get -/// the next set of object keys.

    -///
    - pub next_marker: Option, -///

    Encoding type used by Amazon S3 to encode the object keys in the response. -/// Responses are encoded only in UTF-8. An object key can contain any Unicode character. -/// However, the XML 1.0 parser can't parse certain characters, such as characters with an -/// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this -/// parameter to request that Amazon S3 encode the keys in the response. For more information about -/// characters to avoid in object key names, see Object key naming -/// guidelines.

    -/// -///

    When using the URL encoding type, non-ASCII characters that are used in an object's -/// key name will be percent-encoded according to UTF-8 code values. For example, the object -/// test_file(3).png will appear as -/// test_file%283%29.png.

    -///
    - pub encoding_type: Option, - pub request_charged: Option, -} - -impl fmt::Debug for ListObjectsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectsOutput"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.marker { -d.field("marker", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.contents { -d.field("contents", val); -} -if let Some(ref val) = self.common_prefixes { -d.field("common_prefixes", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.next_marker { -d.field("next_marker", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsV2Input { -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    -/// ContinuationToken indicates to Amazon S3 that the list is being continued on -/// this bucket with a token. ContinuationToken is obfuscated and is not a real -/// key. You can use this ContinuationToken for pagination of the list results. -///

    - pub continuation_token: Option, -///

    A delimiter is a character that you use to group keys.

    -/// -///
      -///
    • -///

      -/// Directory buckets - For directory buckets, / is the only supported delimiter.

      -///
    • -///
    • -///

      -/// Directory buckets - When you query -/// ListObjectsV2 with a delimiter during in-progress multipart -/// uploads, the CommonPrefixes response parameter contains the prefixes -/// that are associated with the in-progress multipart uploads. For more information -/// about multipart uploads, see Multipart Upload Overview in -/// the Amazon S3 User Guide.

      -///
    • -///
    -///
    - pub delimiter: Option, -///

    Encoding type used by Amazon S3 to encode the object keys in the response. -/// Responses are encoded only in UTF-8. An object key can contain any Unicode character. -/// However, the XML 1.0 parser can't parse certain characters, such as characters with an -/// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this -/// parameter to request that Amazon S3 encode the keys in the response. For more information about -/// characters to avoid in object key names, see Object key naming -/// guidelines.

    -/// -///

    When using the URL encoding type, non-ASCII characters that are used in an object's -/// key name will be percent-encoded according to UTF-8 code values. For example, the object -/// test_file(3).png will appear as -/// test_file%283%29.png.

    -///
    - pub encoding_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The owner field is not present in ListObjectsV2 by default. If you want to -/// return the owner field with each key in the result, then set the FetchOwner -/// field to true.

    -/// -///

    -/// Directory buckets - For directory buckets, -/// the bucket owner is returned as the object owner for all objects.

    -///
    - pub fetch_owner: Option, -///

    Sets the maximum number of keys returned in the response. By default, the action returns -/// up to 1,000 key names. The response might contain fewer keys but will never contain -/// more.

    - pub max_keys: Option, -///

    Specifies the optional fields that you want returned in the response. Fields that you do -/// not specify are not returned.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub optional_object_attributes: Option, -///

    Limits the response to keys that begin with the specified prefix.

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub prefix: Option, -///

    Confirms that the requester knows that she or he will be charged for the list objects -/// request in V2 style. Bucket owners need not specify this parameter in their -/// requests.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub request_payer: Option, -///

    StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this -/// specified key. StartAfter can be any key in the bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub start_after: Option, -} - -impl fmt::Debug for ListObjectsV2Input { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectsV2Input"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.fetch_owner { -d.field("fetch_owner", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.optional_object_attributes { -d.field("optional_object_attributes", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.start_after { -d.field("start_after", val); -} -d.finish_non_exhaustive() -} -} - -impl ListObjectsV2Input { -#[must_use] -pub fn builder() -> builders::ListObjectsV2InputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsV2Output { -///

    The bucket name.

    - pub name: Option, -///

    Keys that begin with the indicated prefix.

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub prefix: Option, -///

    Sets the maximum number of keys returned in the response. By default, the action returns -/// up to 1,000 key names. The response might contain fewer keys but will never contain -/// more.

    - pub max_keys: Option, -///

    -/// KeyCount is the number of keys returned with this request. -/// KeyCount will always be less than or equal to the MaxKeys -/// field. For example, if you ask for 50 keys, your result will include 50 keys or -/// fewer.

    - pub key_count: Option, -///

    If ContinuationToken was sent with the request, it is included in the -/// response. You can use the returned ContinuationToken for pagination of the -/// list response. You can use this ContinuationToken for pagination of the list -/// results.

    - pub continuation_token: Option, -///

    Set to false if all of the results were returned. Set to true -/// if more keys are available to return. If the number of results exceeds that specified by -/// MaxKeys, all of the results might not be returned.

    - pub is_truncated: Option, -///

    -/// NextContinuationToken is sent when isTruncated is true, which -/// means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 -/// can be continued with this NextContinuationToken. -/// NextContinuationToken is obfuscated and is not a real key

    - pub next_continuation_token: Option, -///

    Metadata about each object returned.

    - pub contents: Option, -///

    All of the keys (up to 1,000) that share the same prefix are grouped together. When -/// counting the total numbers of returns by this API operation, this group of keys is -/// considered as one item.

    -///

    A response can contain CommonPrefixes only if you specify a -/// delimiter.

    -///

    -/// CommonPrefixes contains all (if there are any) keys between -/// Prefix and the next occurrence of the string specified by a -/// delimiter.

    -///

    -/// CommonPrefixes lists keys that act like subdirectories in the directory -/// specified by Prefix.

    -///

    For example, if the prefix is notes/ and the delimiter is a slash -/// (/) as in notes/summer/july, the common prefix is -/// notes/summer/. All of the keys that roll up into a common prefix count as a -/// single return when calculating the number of returns.

    -/// -///
      -///
    • -///

      -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

      -///
    • -///
    • -///

      -/// Directory buckets - When you query -/// ListObjectsV2 with a delimiter during in-progress multipart -/// uploads, the CommonPrefixes response parameter contains the prefixes -/// that are associated with the in-progress multipart uploads. For more information -/// about multipart uploads, see Multipart Upload Overview in -/// the Amazon S3 User Guide.

      -///
    • -///
    -///
    - pub common_prefixes: Option, -///

    Causes keys that contain the same string between the prefix and the first -/// occurrence of the delimiter to be rolled up into a single result element in the -/// CommonPrefixes collection. These rolled-up keys are not returned elsewhere -/// in the response. Each rolled-up result counts as only one return against the -/// MaxKeys value.

    -/// -///

    -/// Directory buckets - For directory buckets, / is the only supported delimiter.

    -///
    - pub delimiter: Option, -///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    -///

    If you specify the encoding-type request parameter, Amazon S3 includes this -/// element in the response, and returns encoded key name values in the following response -/// elements:

    -///

    -/// Delimiter, Prefix, Key, and StartAfter.

    - pub encoding_type: Option, -///

    If StartAfter was sent with the request, it is included in the response.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub start_after: Option, - pub request_charged: Option, -} - -impl fmt::Debug for ListObjectsV2Output { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectsV2Output"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.key_count { -d.field("key_count", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -if let Some(ref val) = self.contents { -d.field("contents", val); -} -if let Some(ref val) = self.common_prefixes { -d.field("common_prefixes", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.start_after { -d.field("start_after", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListPartsInput { -///

    The name of the bucket to which the parts are being uploaded.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, -///

    Sets the maximum number of parts to return.

    - pub max_parts: Option, -///

    Specifies the part after which listing should begin. Only parts with higher part numbers -/// will be listed.

    - pub part_number_marker: Option, - pub request_payer: Option, -///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created -/// using a checksum algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. -/// For more information, see -/// Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum -/// algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Upload ID identifying the multipart upload whose parts are being listed.

    - pub upload_id: MultipartUploadId, -} - -impl fmt::Debug for ListPartsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListPartsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.max_parts { -d.field("max_parts", val); -} -if let Some(ref val) = self.part_number_marker { -d.field("part_number_marker", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} -} - -impl ListPartsInput { -#[must_use] -pub fn builder() -> builders::ListPartsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListPartsOutput { -///

    If the bucket has a lifecycle rule configured with an action to abort incomplete -/// multipart uploads and the prefix in the lifecycle rule matches the object name in the -/// request, then the response includes this header indicating when the initiated multipart -/// upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle -/// Configuration.

    -///

    The response will also include the x-amz-abort-rule-id header that will -/// provide the ID of the lifecycle configuration rule that defines this action.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub abort_date: Option, -///

    This header is returned along with the x-amz-abort-date header. It -/// identifies applicable lifecycle configuration rule that defines the action to abort -/// incomplete multipart uploads.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub abort_rule_id: Option, -///

    The name of the bucket to which the multipart upload was initiated. Does not return the -/// access point ARN or access point alias if used.

    - pub bucket: Option, -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    The checksum type, which determines how part-level checksums are combined to create an -/// object-level checksum for multipart objects. You can use this header response to verify -/// that the checksum type that is received is the same checksum type that was specified in -/// CreateMultipartUpload request. For more -/// information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Container element that identifies who initiated the multipart upload. If the initiator -/// is an Amazon Web Services account, this element provides the same information as the Owner -/// element. If the initiator is an IAM User, this element provides the user ARN and display -/// name.

    - pub initiator: Option, -///

    Indicates whether the returned list of parts is truncated. A true value indicates that -/// the list was truncated. A list can be truncated if the number of parts exceeds the limit -/// returned in the MaxParts element.

    - pub is_truncated: Option, -///

    Object key for which the multipart upload was initiated.

    - pub key: Option, -///

    Maximum number of parts that were allowed in the response.

    - pub max_parts: Option, -///

    When a list is truncated, this element specifies the last part in the list, as well as -/// the value to use for the part-number-marker request parameter in a subsequent -/// request.

    - pub next_part_number_marker: Option, -///

    Container element that identifies the object owner, after the object is created. If -/// multipart upload is initiated by an IAM user, this element provides the parent account ID -/// and display name.

    -/// -///

    -/// Directory buckets - The bucket owner is -/// returned as the object owner for all the parts.

    -///
    - pub owner: Option, -///

    Specifies the part after which listing should begin. Only parts with higher part numbers -/// will be listed.

    - pub part_number_marker: Option, -///

    Container for elements related to a particular part. A response can contain zero or more -/// Part elements.

    - pub parts: Option, - pub request_charged: Option, -///

    The class of storage used to store the uploaded object.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    Upload ID identifying the multipart upload whose parts are being listed.

    - pub upload_id: Option, -} - -impl fmt::Debug for ListPartsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListPartsOutput"); -if let Some(ref val) = self.abort_date { -d.field("abort_date", val); -} -if let Some(ref val) = self.abort_rule_id { -d.field("abort_rule_id", val); -} -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.initiator { -d.field("initiator", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.max_parts { -d.field("max_parts", val); -} -if let Some(ref val) = self.next_part_number_marker { -d.field("next_part_number_marker", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.part_number_marker { -d.field("part_number_marker", val); -} -if let Some(ref val) = self.parts { -d.field("parts", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.upload_id { -d.field("upload_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type Location = String; - -///

    Specifies the location where the bucket will be created.

    -///

    For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see -/// Working with directory buckets in the Amazon S3 User Guide.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LocationInfo { -///

    The name of the location where the bucket will be created.

    -///

    For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

    - pub name: Option, -///

    The type of location where the bucket will be created.

    - pub type_: Option, -} - -impl fmt::Debug for LocationInfo { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LocationInfo"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.type_ { -d.field("type_", val); -} -d.finish_non_exhaustive() -} -} - - -pub type LocationNameAsString = String; - -pub type LocationPrefix = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct LocationType(Cow<'static, str>); - -impl LocationType { -pub const AVAILABILITY_ZONE: &'static str = "AvailabilityZone"; - -pub const LOCAL_ZONE: &'static str = "LocalZone"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for LocationType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: LocationType) -> Self { -s.0 -} -} - -impl FromStr for LocationType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys -/// for a bucket. For more information, see PUT Bucket logging in the -/// Amazon S3 API Reference.

    -#[derive(Clone, Default, PartialEq)] -pub struct LoggingEnabled { -///

    Specifies the bucket where you want Amazon S3 to store server access logs. You can have your -/// logs delivered to any bucket that you own, including the same bucket that is being logged. -/// You can also configure multiple buckets to deliver their logs to the same target bucket. In -/// this case, you should choose a different TargetPrefix for each source bucket -/// so that the delivered log files can be distinguished by key.

    - pub target_bucket: TargetBucket, -///

    Container for granting information.

    -///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support -/// target grants. For more information, see Permissions for server access log delivery in the -/// Amazon S3 User Guide.

    - pub target_grants: Option, -///

    Amazon S3 key format for log objects.

    - pub target_object_key_format: Option, -///

    A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a -/// single bucket, you can use a prefix to distinguish which log files came from which -/// bucket.

    - pub target_prefix: TargetPrefix, -} - -impl fmt::Debug for LoggingEnabled { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LoggingEnabled"); -d.field("target_bucket", &self.target_bucket); -if let Some(ref val) = self.target_grants { -d.field("target_grants", val); -} -if let Some(ref val) = self.target_object_key_format { -d.field("target_object_key_format", val); -} -d.field("target_prefix", &self.target_prefix); -d.finish_non_exhaustive() -} -} - - -pub type MFA = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct MFADelete(Cow<'static, str>); - -impl MFADelete { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for MFADelete { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: MFADelete) -> Self { -s.0 -} -} - -impl FromStr for MFADelete { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct MFADeleteStatus(Cow<'static, str>); - -impl MFADeleteStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for MFADeleteStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: MFADeleteStatus) -> Self { -s.0 -} -} - -impl FromStr for MFADeleteStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Marker = String; - -pub type MaxAgeSeconds = i32; - -pub type MaxBuckets = i32; - -pub type MaxDirectoryBuckets = i32; - -pub type MaxKeys = i32; - -pub type MaxParts = i32; - -pub type MaxUploads = i32; - -pub type Message = String; - -pub type Metadata = Map; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct MetadataDirective(Cow<'static, str>); - -impl MetadataDirective { -pub const COPY: &'static str = "COPY"; - -pub const REPLACE: &'static str = "REPLACE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for MetadataDirective { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: MetadataDirective) -> Self { -s.0 -} -} - -impl FromStr for MetadataDirective { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A metadata key-value pair to store with an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct MetadataEntry { -///

    Name of the object.

    - pub name: Option, -///

    Value of the object.

    - pub value: Option, -} - -impl fmt::Debug for MetadataEntry { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetadataEntry"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.value { -d.field("value", val); -} -d.finish_non_exhaustive() -} -} - - -pub type MetadataKey = String; - -///

    -/// The metadata table configuration for a general purpose bucket. -///

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct MetadataTableConfiguration { -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    - pub s3_tables_destination: S3TablesDestination, -} - -impl fmt::Debug for MetadataTableConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetadataTableConfiguration"); -d.field("s3_tables_destination", &self.s3_tables_destination); -d.finish_non_exhaustive() -} -} - -impl Default for MetadataTableConfiguration { -fn default() -> Self { -Self { -s3_tables_destination: default(), -} -} -} - - -///

    -/// The metadata table configuration for a general purpose bucket. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, PartialEq)] -pub struct MetadataTableConfigurationResult { -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    - pub s3_tables_destination_result: S3TablesDestinationResult, -} - -impl fmt::Debug for MetadataTableConfigurationResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetadataTableConfigurationResult"); -d.field("s3_tables_destination_result", &self.s3_tables_destination_result); -d.finish_non_exhaustive() -} -} - - -pub type MetadataTableStatus = String; - -pub type MetadataValue = String; - -///

    A container specifying replication metrics-related settings enabling replication -/// metrics and events.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct Metrics { -///

    A container specifying the time threshold for emitting the -/// s3:Replication:OperationMissedThreshold event.

    - pub event_threshold: Option, -///

    Specifies whether the replication metrics are enabled.

    - pub status: MetricsStatus, -} - -impl fmt::Debug for Metrics { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Metrics"); -if let Some(ref val) = self.event_threshold { -d.field("event_threshold", val); -} -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. -/// The operator must have at least two predicates, and an object must match all of the -/// predicates in order for the filter to apply.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct MetricsAndOperator { -///

    The access point ARN used when evaluating an AND predicate.

    - pub access_point_arn: Option, -///

    The prefix used when evaluating an AND predicate.

    - pub prefix: Option, -///

    The list of tags used when evaluating an AND predicate.

    - pub tags: Option, -} - -impl fmt::Debug for MetricsAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetricsAndOperator"); -if let Some(ref val) = self.access_point_arn { -d.field("access_point_arn", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies a metrics configuration for the CloudWatch request metrics (specified by the -/// metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics -/// configuration, note that this is a full replacement of the existing metrics configuration. -/// If you don't include the elements you want to keep, they are erased. For more information, -/// see PutBucketMetricsConfiguration.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct MetricsConfiguration { -///

    Specifies a metrics configuration filter. The metrics configuration will only include -/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an -/// access point ARN, or a conjunction (MetricsAndOperator).

    - pub filter: Option, -///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and -/// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, -} - -impl fmt::Debug for MetricsConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetricsConfiguration"); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - - -pub type MetricsConfigurationList = List; - -///

    Specifies a metrics configuration filter. The metrics configuration only includes -/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an -/// access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

    -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -#[non_exhaustive] -#[serde(rename_all = "PascalCase")] -pub enum MetricsFilter { -///

    The access point ARN used when evaluating a metrics filter.

    - AccessPointArn(AccessPointArn), -///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. -/// The operator must have at least two predicates, and an object must match all of the -/// predicates in order for the filter to apply.

    - And(MetricsAndOperator), -///

    The prefix used when evaluating a metrics filter.

    - Prefix(Prefix), -///

    The tag used when evaluating a metrics filter.

    - Tag(Tag), -} - -pub type MetricsId = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct MetricsStatus(Cow<'static, str>); - -impl MetricsStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for MetricsStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: MetricsStatus) -> Self { -s.0 -} -} - -impl FromStr for MetricsStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Minutes = i32; - -pub type MissingMeta = i32; - -pub type MpuObjectSize = i64; - -///

    Container for the MultipartUpload for the Amazon S3 object.

    -#[derive(Clone, Default, PartialEq)] -pub struct MultipartUpload { -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Date and time at which the multipart upload was initiated.

    - pub initiated: Option, -///

    Identifies who initiated the multipart upload.

    - pub initiator: Option, -///

    Key of the object for which the multipart upload was initiated.

    - pub key: Option, -///

    Specifies the owner of the object that is part of the multipart upload.

    -/// -///

    -/// Directory buckets - The bucket owner is -/// returned as the object owner for all the objects.

    -///
    - pub owner: Option, -///

    The class of storage used to store the object.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    Upload ID that identifies the multipart upload.

    - pub upload_id: Option, -} - -impl fmt::Debug for MultipartUpload { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MultipartUpload"); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.initiated { -d.field("initiated", val); -} -if let Some(ref val) = self.initiator { -d.field("initiator", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.upload_id { -d.field("upload_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type MultipartUploadId = String; - -pub type MultipartUploadList = List; - -pub type NextKeyMarker = String; - -pub type NextMarker = String; - -pub type NextPartNumberMarker = i32; - -pub type NextToken = String; - -pub type NextUploadIdMarker = String; - -pub type NextVersionIdMarker = String; - -///

    The specified bucket does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchBucket { -} - -impl fmt::Debug for NoSuchBucket { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoSuchBucket"); -d.finish_non_exhaustive() -} -} - - -///

    The specified key does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchKey { -} - -impl fmt::Debug for NoSuchKey { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoSuchKey"); -d.finish_non_exhaustive() -} -} - - -///

    The specified multipart upload does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchUpload { -} - -impl fmt::Debug for NoSuchUpload { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoSuchUpload"); -d.finish_non_exhaustive() -} -} - - -pub type NonNegativeIntegerType = i32; - -///

    Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently -/// deletes the noncurrent object versions. You set this lifecycle configuration action on a -/// bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent -/// object versions at a specific period in the object's lifetime.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NoncurrentVersionExpiration { -///

    Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100 -/// noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent -/// versions beyond the specified number to retain. For more information about noncurrent -/// versions, see Lifecycle configuration -/// elements in the Amazon S3 User Guide.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub newer_noncurrent_versions: Option, -///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the -/// associated action. The value must be a non-zero positive integer. For information about the -/// noncurrent days calculations, see How -/// Amazon S3 Calculates When an Object Became Noncurrent in the -/// Amazon S3 User Guide.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub noncurrent_days: Option, -} - -impl fmt::Debug for NoncurrentVersionExpiration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoncurrentVersionExpiration"); -if let Some(ref val) = self.newer_noncurrent_versions { -d.field("newer_noncurrent_versions", val); -} -if let Some(ref val) = self.noncurrent_days { -d.field("noncurrent_days", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Container for the transition rule that describes when noncurrent objects transition to -/// the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage -/// class. If your bucket is versioning-enabled (or versioning is suspended), you can set this -/// action to request that Amazon S3 transition noncurrent object versions to the -/// STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage -/// class at a specific period in the object's lifetime.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NoncurrentVersionTransition { -///

    Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before -/// transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will -/// transition any additional noncurrent versions beyond the specified number to retain. For -/// more information about noncurrent versions, see Lifecycle configuration -/// elements in the Amazon S3 User Guide.

    - pub newer_noncurrent_versions: Option, -///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the -/// associated action. For information about the noncurrent days calculations, see How -/// Amazon S3 Calculates How Long an Object Has Been Noncurrent in the -/// Amazon S3 User Guide.

    - pub noncurrent_days: Option, -///

    The class of storage used to store the object.

    - pub storage_class: Option, -} - -impl fmt::Debug for NoncurrentVersionTransition { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoncurrentVersionTransition"); -if let Some(ref val) = self.newer_noncurrent_versions { -d.field("newer_noncurrent_versions", val); -} -if let Some(ref val) = self.noncurrent_days { -d.field("noncurrent_days", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} -} - - -pub type NoncurrentVersionTransitionList = List; - -///

    The specified content does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NotFound { -} - -impl fmt::Debug for NotFound { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NotFound"); -d.finish_non_exhaustive() -} -} - - -///

    A container for specifying the notification configuration of the bucket. If this element -/// is empty, notifications are turned off for the bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NotificationConfiguration { -///

    Enables delivery of events to Amazon EventBridge.

    - pub event_bridge_configuration: Option, -///

    Describes the Lambda functions to invoke and the events for which to invoke -/// them.

    - pub lambda_function_configurations: Option, -///

    The Amazon Simple Queue Service queues to publish messages to and the events for which -/// to publish messages.

    - pub queue_configurations: Option, -///

    The topic to which notifications are sent and the events for which notifications are -/// generated.

    - pub topic_configurations: Option, -} - -impl fmt::Debug for NotificationConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NotificationConfiguration"); -if let Some(ref val) = self.event_bridge_configuration { -d.field("event_bridge_configuration", val); -} -if let Some(ref val) = self.lambda_function_configurations { -d.field("lambda_function_configurations", val); -} -if let Some(ref val) = self.queue_configurations { -d.field("queue_configurations", val); -} -if let Some(ref val) = self.topic_configurations { -d.field("topic_configurations", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies object key name filtering rules. For information about key name filtering, see -/// Configuring event -/// notifications using object key name filtering in the -/// Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NotificationConfigurationFilter { - pub key: Option, -} - -impl fmt::Debug for NotificationConfigurationFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NotificationConfigurationFilter"); -if let Some(ref val) = self.key { -d.field("key", val); -} -d.finish_non_exhaustive() -} -} - - -///

    An optional unique identifier for configurations in a notification configuration. If you -/// don't provide one, Amazon S3 will assign an ID.

    -pub type NotificationId = String; - -///

    An object consists of data and its descriptive metadata.

    -#[derive(Clone, Default, PartialEq)] -pub struct Object { -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    The entity tag is a hash of the object. The ETag reflects changes only to the contents -/// of an object, not its metadata. The ETag may or may not be an MD5 digest of the object -/// data. Whether or not it is depends on how the object was created and how it is encrypted as -/// described below:

    -///
      -///
    • -///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the -/// Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that -/// are an MD5 digest of their object data.

      -///
    • -///
    • -///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the -/// Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are -/// not an MD5 digest of their object data.

      -///
    • -///
    • -///

      If an object is created by either the Multipart Upload or Part Copy operation, the -/// ETag is not an MD5 digest, regardless of the method of encryption. If an object is -/// larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a -/// Multipart Upload, and therefore the ETag will not be an MD5 digest.

      -///
    • -///
    -/// -///

    -/// Directory buckets - MD5 is not supported by directory buckets.

    -///
    - pub e_tag: Option, -///

    The name that you assign to an object. You use the object key to retrieve the -/// object.

    - pub key: Option, -///

    Creation date of the object.

    - pub last_modified: Option, -///

    The owner of the object

    -/// -///

    -/// Directory buckets - The bucket owner is -/// returned as the object owner.

    -///
    - pub owner: Option, -///

    Specifies the restoration status of an object. Objects in certain storage classes must -/// be restored before they can be retrieved. For more information about these storage classes -/// and how to work with archived objects, see Working with archived -/// objects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub restore_status: Option, -///

    Size in bytes of the object

    - pub size: Option, -///

    The class of storage used to store the object.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -} - -impl fmt::Debug for Object { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Object"); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.restore_status { -d.field("restore_status", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} -} - - -///

    This action is not allowed against this storage tier.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectAlreadyInActiveTierError { -} - -impl fmt::Debug for ObjectAlreadyInActiveTierError { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectAlreadyInActiveTierError"); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectAttributes(Cow<'static, str>); - -impl ObjectAttributes { -pub const CHECKSUM: &'static str = "Checksum"; - -pub const ETAG: &'static str = "ETag"; - -pub const OBJECT_PARTS: &'static str = "ObjectParts"; - -pub const OBJECT_SIZE: &'static str = "ObjectSize"; - -pub const STORAGE_CLASS: &'static str = "StorageClass"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectAttributes { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectAttributes) -> Self { -s.0 -} -} - -impl FromStr for ObjectAttributes { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ObjectAttributesList = List; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectCannedACL(Cow<'static, str>); - -impl ObjectCannedACL { -pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; - -pub const AWS_EXEC_READ: &'static str = "aws-exec-read"; - -pub const BUCKET_OWNER_FULL_CONTROL: &'static str = "bucket-owner-full-control"; - -pub const BUCKET_OWNER_READ: &'static str = "bucket-owner-read"; - -pub const PRIVATE: &'static str = "private"; - -pub const PUBLIC_READ: &'static str = "public-read"; - -pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectCannedACL { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectCannedACL) -> Self { -s.0 -} -} - -impl FromStr for ObjectCannedACL { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Object Identifier is unique value to identify objects.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectIdentifier { -///

    An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. -/// This header field makes the request method conditional on ETags.

    -/// -///

    Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

    -///
    - pub e_tag: Option, -///

    Key name of the object.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub key: ObjectKey, -///

    If present, the objects are deleted only if its modification times matches the provided Timestamp. -///

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    - pub last_modified_time: Option, -///

    If present, the objects are deleted only if its size matches the provided size in bytes.

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    - pub size: Option, -///

    Version ID for the specific version of the object to delete.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for ObjectIdentifier { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectIdentifier"); -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.last_modified_time { -d.field("last_modified_time", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ObjectIdentifierList = List; - -pub type ObjectKey = String; - -pub type ObjectList = List; - -///

    The container element for Object Lock configuration parameters.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ObjectLockConfiguration { -///

    Indicates whether this bucket has an Object Lock configuration enabled. Enable -/// ObjectLockEnabled when you apply ObjectLockConfiguration to a -/// bucket.

    - pub object_lock_enabled: Option, -///

    Specifies the Object Lock rule for the specified object. Enable the this rule when you -/// apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode -/// and a period. The period can be either Days or Years but you must -/// select one. You cannot specify Days and Years at the same -/// time.

    - pub rule: Option, -} - -impl fmt::Debug for ObjectLockConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectLockConfiguration"); -if let Some(ref val) = self.object_lock_enabled { -d.field("object_lock_enabled", val); -} -if let Some(ref val) = self.rule { -d.field("rule", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ObjectLockEnabled(Cow<'static, str>); - -impl ObjectLockEnabled { -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectLockEnabled { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectLockEnabled) -> Self { -s.0 -} -} - -impl FromStr for ObjectLockEnabled { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ObjectLockEnabledForBucket = bool; - -///

    A legal hold configuration for an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectLockLegalHold { -///

    Indicates whether the specified object has a legal hold in place.

    - pub status: Option, -} - -impl fmt::Debug for ObjectLockLegalHold { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectLockLegalHold"); -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectLockLegalHoldStatus(Cow<'static, str>); - -impl ObjectLockLegalHoldStatus { -pub const OFF: &'static str = "OFF"; - -pub const ON: &'static str = "ON"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectLockLegalHoldStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectLockLegalHoldStatus) -> Self { -s.0 -} -} - -impl FromStr for ObjectLockLegalHoldStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectLockMode(Cow<'static, str>); - -impl ObjectLockMode { -pub const COMPLIANCE: &'static str = "COMPLIANCE"; - -pub const GOVERNANCE: &'static str = "GOVERNANCE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectLockMode { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectLockMode) -> Self { -s.0 -} -} - -impl FromStr for ObjectLockMode { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ObjectLockRetainUntilDate = Timestamp; - -///

    A Retention configuration for an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectLockRetention { -///

    Indicates the Retention mode for the specified object.

    - pub mode: Option, -///

    The date on which this Object Lock Retention will expire.

    - pub retain_until_date: Option, -} - -impl fmt::Debug for ObjectLockRetention { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectLockRetention"); -if let Some(ref val) = self.mode { -d.field("mode", val); -} -if let Some(ref val) = self.retain_until_date { -d.field("retain_until_date", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ObjectLockRetentionMode(Cow<'static, str>); - -impl ObjectLockRetentionMode { -pub const COMPLIANCE: &'static str = "COMPLIANCE"; - -pub const GOVERNANCE: &'static str = "GOVERNANCE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectLockRetentionMode { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectLockRetentionMode) -> Self { -s.0 -} -} - -impl FromStr for ObjectLockRetentionMode { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    The container element for an Object Lock rule.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ObjectLockRule { -///

    The default Object Lock retention mode and period that you want to apply to new objects -/// placed in the specified bucket. Bucket settings require both a mode and a period. The -/// period can be either Days or Years but you must select one. You -/// cannot specify Days and Years at the same time.

    - pub default_retention: Option, -} - -impl fmt::Debug for ObjectLockRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectLockRule"); -if let Some(ref val) = self.default_retention { -d.field("default_retention", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ObjectLockToken = String; - -///

    The source object of the COPY action is not in the active tier and is only stored in -/// Amazon S3 Glacier.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectNotInActiveTierError { -} - -impl fmt::Debug for ObjectNotInActiveTierError { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectNotInActiveTierError"); -d.finish_non_exhaustive() -} -} - - -///

    The container element for object ownership for a bucket's ownership controls.

    -///

    -/// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to -/// the bucket owner if the objects are uploaded with the -/// bucket-owner-full-control canned ACL.

    -///

    -/// ObjectWriter - The uploading account will own the object if the object is -/// uploaded with the bucket-owner-full-control canned ACL.

    -///

    -/// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no -/// longer affect permissions. The bucket owner automatically owns and has full control over -/// every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL -/// or specify bucket owner full control ACLs (such as the predefined -/// bucket-owner-full-control canned ACL or a custom ACL in XML format that -/// grants the same permissions).

    -///

    By default, ObjectOwnership is set to BucketOwnerEnforced and -/// ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where -/// you must control access for each object individually. For more information about S3 Object -/// Ownership, see Controlling ownership of -/// objects and disabling ACLs for your bucket in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectOwnership(Cow<'static, str>); - -impl ObjectOwnership { -pub const BUCKET_OWNER_ENFORCED: &'static str = "BucketOwnerEnforced"; - -pub const BUCKET_OWNER_PREFERRED: &'static str = "BucketOwnerPreferred"; - -pub const OBJECT_WRITER: &'static str = "ObjectWriter"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectOwnership { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectOwnership) -> Self { -s.0 -} -} - -impl FromStr for ObjectOwnership { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A container for elements related to an individual part.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectPart { -///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a -/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present -/// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present -/// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    The part number identifying the part. This value is a positive integer between 1 and -/// 10,000.

    - pub part_number: Option, -///

    The size of the uploaded part in bytes.

    - pub size: Option, -} - -impl fmt::Debug for ObjectPart { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectPart"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ObjectSize = i64; - -pub type ObjectSizeGreaterThanBytes = i64; - -pub type ObjectSizeLessThanBytes = i64; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectStorageClass(Cow<'static, str>); - -impl ObjectStorageClass { -pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; - -pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; - -pub const GLACIER: &'static str = "GLACIER"; - -pub const GLACIER_IR: &'static str = "GLACIER_IR"; - -pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; - -pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; - -pub const OUTPOSTS: &'static str = "OUTPOSTS"; - -pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; - -pub const SNOW: &'static str = "SNOW"; - -pub const STANDARD: &'static str = "STANDARD"; - -pub const STANDARD_IA: &'static str = "STANDARD_IA"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectStorageClass { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectStorageClass) -> Self { -s.0 -} -} - -impl FromStr for ObjectStorageClass { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    The version of an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectVersion { -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    The entity tag is an MD5 hash of that version of the object.

    - pub e_tag: Option, -///

    Specifies whether the object is (true) or is not (false) the latest version of an -/// object.

    - pub is_latest: Option, -///

    The object key.

    - pub key: Option, -///

    Date and time when the object was last modified.

    - pub last_modified: Option, -///

    Specifies the owner of the object.

    - pub owner: Option, -///

    Specifies the restoration status of an object. Objects in certain storage classes must -/// be restored before they can be retrieved. For more information about these storage classes -/// and how to work with archived objects, see Working with archived -/// objects in the Amazon S3 User Guide.

    - pub restore_status: Option, -///

    Size in bytes of the object.

    - pub size: Option, -///

    The class of storage used to store the object.

    - pub storage_class: Option, -///

    Version ID of an object.

    - pub version_id: Option, -} - -impl fmt::Debug for ObjectVersion { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectVersion"); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.is_latest { -d.field("is_latest", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.restore_status { -d.field("restore_status", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ObjectVersionId = String; - -pub type ObjectVersionList = List; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectVersionStorageClass(Cow<'static, str>); - -impl ObjectVersionStorageClass { -pub const STANDARD: &'static str = "STANDARD"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectVersionStorageClass { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectVersionStorageClass) -> Self { -s.0 -} -} - -impl FromStr for ObjectVersionStorageClass { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct OptionalObjectAttributes(Cow<'static, str>); - -impl OptionalObjectAttributes { -pub const RESTORE_STATUS: &'static str = "RestoreStatus"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for OptionalObjectAttributes { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: OptionalObjectAttributes) -> Self { -s.0 -} -} - -impl FromStr for OptionalObjectAttributes { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type OptionalObjectAttributesList = List; - -///

    Describes the location where the restore job's output is stored.

    -#[derive(Clone, Default, PartialEq)] -pub struct OutputLocation { -///

    Describes an S3 location that will receive the results of the restore request.

    - pub s3: Option, -} - -impl fmt::Debug for OutputLocation { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("OutputLocation"); -if let Some(ref val) = self.s3 { -d.field("s3", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Describes how results of the Select job are serialized.

    -#[derive(Clone, Default, PartialEq)] -pub struct OutputSerialization { -///

    Describes the serialization of CSV-encoded Select results.

    - pub csv: Option, -///

    Specifies JSON as request's output serialization format.

    - pub json: Option, -} - -impl fmt::Debug for OutputSerialization { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("OutputSerialization"); -if let Some(ref val) = self.csv { -d.field("csv", val); -} -if let Some(ref val) = self.json { -d.field("json", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Container for the owner's display name and ID.

    -#[derive(Clone, Default, PartialEq)] -pub struct Owner { -///

    Container for the display name of the owner. This value is only supported in the -/// following Amazon Web Services Regions:

    -///
      -///
    • -///

      US East (N. Virginia)

      -///
    • -///
    • -///

      US West (N. California)

      -///
    • -///
    • -///

      US West (Oregon)

      -///
    • -///
    • -///

      Asia Pacific (Singapore)

      -///
    • -///
    • -///

      Asia Pacific (Sydney)

      -///
    • -///
    • -///

      Asia Pacific (Tokyo)

      -///
    • -///
    • -///

      Europe (Ireland)

      -///
    • -///
    • -///

      South America (São Paulo)

      -///
    • -///
    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub display_name: Option, -///

    Container for the ID of the owner.

    - pub id: Option, -} - -impl fmt::Debug for Owner { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Owner"); -if let Some(ref val) = self.display_name { -d.field("display_name", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct OwnerOverride(Cow<'static, str>); - -impl OwnerOverride { -pub const DESTINATION: &'static str = "Destination"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for OwnerOverride { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: OwnerOverride) -> Self { -s.0 -} -} - -impl FromStr for OwnerOverride { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    The container element for a bucket's ownership controls.

    -#[derive(Clone, Default, PartialEq)] -pub struct OwnershipControls { -///

    The container element for an ownership control rule.

    - pub rules: OwnershipControlsRules, -} - -impl fmt::Debug for OwnershipControls { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("OwnershipControls"); -d.field("rules", &self.rules); -d.finish_non_exhaustive() -} -} - - -///

    The container element for an ownership control rule.

    -#[derive(Clone, PartialEq)] -pub struct OwnershipControlsRule { - pub object_ownership: ObjectOwnership, -} - -impl fmt::Debug for OwnershipControlsRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("OwnershipControlsRule"); -d.field("object_ownership", &self.object_ownership); -d.finish_non_exhaustive() -} -} - - -pub type OwnershipControlsRules = List; - -///

    Container for Parquet.

    -#[derive(Clone, Default, PartialEq)] -pub struct ParquetInput { -} - -impl fmt::Debug for ParquetInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ParquetInput"); -d.finish_non_exhaustive() -} -} - - -///

    Container for elements related to a part.

    -#[derive(Clone, Default, PartialEq)] -pub struct Part { -///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present -/// if the object was uploaded with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present -/// if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a -/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present -/// if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present -/// if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Entity tag returned when the part was uploaded.

    - pub e_tag: Option, -///

    Date and time at which the part was uploaded.

    - pub last_modified: Option, -///

    Part number identifying the part. This is a positive integer between 1 and -/// 10,000.

    - pub part_number: Option, -///

    Size in bytes of the uploaded part data.

    - pub size: Option, -} - -impl fmt::Debug for Part { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Part"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -d.finish_non_exhaustive() -} -} - - -pub type PartNumber = i32; - -pub type PartNumberMarker = i32; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct PartitionDateSource(Cow<'static, str>); - -impl PartitionDateSource { -pub const DELIVERY_TIME: &'static str = "DeliveryTime"; - -pub const EVENT_TIME: &'static str = "EventTime"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for PartitionDateSource { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: PartitionDateSource) -> Self { -s.0 -} -} - -impl FromStr for PartitionDateSource { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Amazon S3 keys for log objects are partitioned in the following format:

    -///

    -/// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -///

    -///

    PartitionedPrefix defaults to EventTime delivery when server access logs are -/// delivered.

    -#[derive(Clone, Default, PartialEq)] -pub struct PartitionedPrefix { -///

    Specifies the partition date source for the partitioned prefix. -/// PartitionDateSource can be EventTime or -/// DeliveryTime.

    -///

    For DeliveryTime, the time in the log file names corresponds to the -/// delivery time for the log files.

    -///

    For EventTime, The logs delivered are for a specific day only. The year, -/// month, and day correspond to the day on which the event occurred, and the hour, minutes and -/// seconds are set to 00 in the key.

    - pub partition_date_source: Option, -} - -impl fmt::Debug for PartitionedPrefix { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PartitionedPrefix"); -if let Some(ref val) = self.partition_date_source { -d.field("partition_date_source", val); -} -d.finish_non_exhaustive() -} -} - - -pub type Parts = List; - -pub type PartsCount = i32; - -pub type PartsList = List; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Payer(Cow<'static, str>); - -impl Payer { -pub const BUCKET_OWNER: &'static str = "BucketOwner"; - -pub const REQUESTER: &'static str = "Requester"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for Payer { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: Payer) -> Self { -s.0 -} -} - -impl FromStr for Payer { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Permission(Cow<'static, str>); - -impl Permission { -pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; - -pub const READ: &'static str = "READ"; - -pub const READ_ACP: &'static str = "READ_ACP"; - -pub const WRITE: &'static str = "WRITE"; - -pub const WRITE_ACP: &'static str = "WRITE_ACP"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for Permission { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: Permission) -> Self { -s.0 -} -} - -impl FromStr for Permission { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Policy = String; - -///

    The container element for a bucket's policy status.

    -#[derive(Clone, Default, PartialEq)] -pub struct PolicyStatus { -///

    The policy status for this bucket. TRUE indicates that this bucket is -/// public. FALSE indicates that the bucket is not public.

    - pub is_public: Option, -} - -impl fmt::Debug for PolicyStatus { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PolicyStatus"); -if let Some(ref val) = self.is_public { -d.field("is_public", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Default)] -pub struct PostObjectInput { -///

    The canned ACL to apply to the object. For more information, see Canned -/// ACL in the Amazon S3 User Guide.

    -///

    When adding a new object, you can use headers to grant ACL-based permissions to -/// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are -/// then added to the ACL on the object. By default, all objects are private. Only the owner -/// has full access control. For more information, see Access Control List (ACL) Overview -/// and Managing -/// ACLs Using the REST API in the Amazon S3 User Guide.

    -///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting -/// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that -/// use this setting only accept PUT requests that don't specify an ACL or PUT requests that -/// specify bucket owner full control ACLs, such as the bucket-owner-full-control -/// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that -/// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a -/// 400 error with the error code AccessControlListNotSupported. -/// For more information, see Controlling ownership of -/// objects and disabling ACLs in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub acl: Option, -///

    Object data.

    - pub body: Option, -///

    The bucket name to which the PUT action was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    -///

    -/// General purpose buckets - Setting this header to -/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with -/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 -/// Bucket Key.

    -///

    -/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - pub bucket_key_enabled: Option, -///

    Can be used to specify caching behavior along the request/reply chain. For more -/// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    - pub cache_control: Option, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm -/// or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    -///

    For the x-amz-checksum-algorithm -/// header, replace -/// algorithm -/// with the supported algorithm from the following list:

    -///
      -///
    • -///

      -/// CRC32 -///

      -///
    • -///
    • -///

      -/// CRC32C -///

      -///
    • -///
    • -///

      -/// CRC64NVME -///

      -///
    • -///
    • -///

      -/// SHA1 -///

      -///
    • -///
    • -///

      -/// SHA256 -///

      -///
    • -///
    -///

    For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If the individual checksum value you provide through x-amz-checksum-algorithm -/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    -/// -///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is -/// required for any request to upload an object with a retention period configured using -/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the -/// Amazon S3 User Guide.

    -///
    -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - pub checksum_algorithm: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the object. The CRC64NVME checksum is -/// always a full object checksum. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    - pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be -/// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    - pub content_length: Option, -///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to -/// RFC 1864. This header can be used as a message integrity check to verify that the data is -/// the same data that was originally sent. Although it is optional, we recommend using the -/// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST -/// request authentication, see REST Authentication.

    -/// -///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is -/// required for any request to upload an object with a retention period configured using -/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the -/// Amazon S3 User Guide.

    -///
    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    A standard MIME type describing the format of the contents. For more information, see -/// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    - pub content_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The date and time at which the object is no longer cacheable. For more information, see -/// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    - pub expires: Option, -///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_full_control: Option, -///

    Allows grantee to read the object data and its metadata.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_read: Option, -///

    Allows grantee to read the object ACL.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_read_acp: Option, -///

    Allows grantee to write the ACL for the applicable object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_write_acp: Option, -///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE -/// operation matches the ETag of the object in S3. If the ETag values do not match, the -/// operation returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    -///

    Expects the ETag value as a string.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_match: Option, -///

    Uploads the object only if the object key name does not already exist in the bucket -/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 -/// ConditionalRequestConflict response. On a 409 failure you should retry the -/// upload.

    -///

    Expects the '*' (asterisk) character.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_none_match: Option, -///

    Object key for which the PUT action was initiated.

    - pub key: ObjectKey, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    Specifies whether a legal hold will be applied to this object. For more information -/// about S3 Object Lock, see Object Lock in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode that you want to apply to this object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_mode: Option, -///

    The date and time when you want this object's Object Lock to expire. Must be formatted -/// as a timestamp parameter.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_retain_until_date: Option, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, -/// AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets passed on -/// to Amazon Web Services KMS for future GetObject operations on -/// this object.

    -///

    -/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    - pub ssekms_encryption_context: Option, -///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same -/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    -///

    -/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS -/// key to use. If you specify -/// x-amz-server-side-encryption:aws:kms or -/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key -/// (aws/s3) to protect the data.

    -///

    -/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the -/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses -/// the bucket's default KMS customer managed key ID. If you want to explicitly set the -/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -/// -/// Incorrect key specification results in an HTTP 400 Bad Request error.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 -/// (for example, AES256, aws:kms, aws:kms:dsse).

    -///
      -///
    • -///

      -/// General purpose buckets - You have four mutually -/// exclusive options to protect data using server-side encryption in Amazon S3, depending on -/// how you choose to manage the encryption keys. Specifically, the encryption key -/// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and -/// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by -/// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt -/// data at rest by using server-side encryption with other key options. For more -/// information, see Using Server-Side -/// Encryption in the Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. -/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. -/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and -/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. -///

      -/// -///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the -/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. -/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), -/// the encryption request headers must match the default encryption configuration of the directory bucket. -/// -///

      -///
      -///
    • -///
    - pub server_side_encryption: Option, -///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The -/// STANDARD storage class provides high durability and high availability. Depending on -/// performance needs, you can specify a different Storage Class. For more information, see -/// Storage -/// Classes in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      For directory buckets, only the S3 Express One Zone storage class is supported to store -/// newly created objects.

      -///
    • -///
    • -///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      -///
    • -///
    -///
    - pub storage_class: Option, -///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For -/// example, "Key1=Value1")

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub tagging: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata. For information about object metadata, see Object Key and Metadata in the -/// Amazon S3 User Guide.

    -///

    In the following example, the request header sets the redirect to an object -/// (anotherPage.html) in the same bucket:

    -///

    -/// x-amz-website-redirect-location: /anotherPage.html -///

    -///

    In the following example, the request header sets the object redirect to another -/// website:

    -///

    -/// x-amz-website-redirect-location: http://www.example.com/ -///

    -///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and -/// How to -/// Configure Website Page Redirects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub website_redirect_location: Option, -///

    -/// Specifies the offset for appending data to existing objects in bytes. -/// The offset must be equal to the size of the existing object being appended to. -/// If no object exists, setting this header to 0 will create a new object. -///

    -/// -///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    -///
    - pub write_offset_bytes: Option, -/// The URL to which the client is redirected upon successful upload. - pub success_action_redirect: Option, -/// The status code returned to the client upon successful upload. Valid values are 200, 201, and 204. - pub success_action_status: Option, -/// The POST policy document that was included in the request. - pub policy: Option, -} - -impl fmt::Debug for PostObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PostObjectInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -if let Some(ref val) = self.body { -d.field("body", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_length { -d.field("content_length", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tagging { -d.field("tagging", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -if let Some(ref val) = self.write_offset_bytes { -d.field("write_offset_bytes", val); -} -if let Some(ref val) = self.success_action_redirect { -d.field("success_action_redirect", val); -} -if let Some(ref val) = self.success_action_status { -d.field("success_action_status", val); -} -if let Some(ref val) = self.policy { -d.field("policy", val); -} -d.finish_non_exhaustive() -} -} - -impl PostObjectInput { -#[must_use] -pub fn builder() -> builders::PostObjectInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PostObjectOutput { -///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header -/// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it -/// was uploaded without a checksum (and Amazon S3 added the default checksum, -/// CRC64NVME, to the uploaded object). For more information about how -/// checksums are calculated with multipart uploads, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    This header specifies the checksum type of the object, which determines how part-level -/// checksums are combined to create an object-level checksum for multipart objects. For -/// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a -/// data integrity check to verify that the checksum type that is received is the same checksum -/// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Entity tag for the uploaded object.

    -///

    -/// General purpose buckets - To ensure that data is not -/// corrupted traversing the network, for objects where the ETag is the MD5 digest of the -/// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned -/// ETag to the calculated MD5 value.

    -///

    -/// Directory buckets - The ETag for the object in -/// a directory bucket isn't the MD5 digest of the object.

    - pub e_tag: Option, -///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, -/// the response includes this header. It includes the expiry-date and -/// rule-id key-value pairs that provide information about object expiration. -/// The value of the rule-id is URL-encoded.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    - pub expiration: Option, - pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets -/// passed on to Amazon Web Services KMS for future GetObject -/// operations on this object.

    - pub ssekms_encryption_context: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, -///

    -/// The size of the object in bytes. This value is only be present if you append to an object. -///

    -/// -///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    -///
    - pub size: Option, -///

    Version ID of the object.

    -///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID -/// for the object being stored. Amazon S3 returns this ID in the response. When you enable -/// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object -/// simultaneously, it stores all of the objects. For more information about versioning, see -/// Adding Objects to -/// Versioning-Enabled Buckets in the Amazon S3 User Guide. For -/// information about returning the versioning state of a bucket, see GetBucketVersioning.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for PostObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PostObjectOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type Prefix = String; - -pub type Priority = i32; - -///

    This data type contains information about progress of an operation.

    -#[derive(Clone, Default, PartialEq)] -pub struct Progress { -///

    The current number of uncompressed object bytes processed.

    - pub bytes_processed: Option, -///

    The current number of bytes of records payload data returned.

    - pub bytes_returned: Option, -///

    The current number of object bytes scanned.

    - pub bytes_scanned: Option, -} - -impl fmt::Debug for Progress { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Progress"); -if let Some(ref val) = self.bytes_processed { -d.field("bytes_processed", val); -} -if let Some(ref val) = self.bytes_returned { -d.field("bytes_returned", val); -} -if let Some(ref val) = self.bytes_scanned { -d.field("bytes_scanned", val); -} -d.finish_non_exhaustive() -} -} - - -///

    This data type contains information about the progress event of an operation.

    -#[derive(Clone, Default, PartialEq)] -pub struct ProgressEvent { -///

    The Progress event details.

    - pub details: Option, -} - -impl fmt::Debug for ProgressEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ProgressEvent"); -if let Some(ref val) = self.details { -d.field("details", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Protocol(Cow<'static, str>); - -impl Protocol { -pub const HTTP: &'static str = "http"; - -pub const HTTPS: &'static str = "https"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for Protocol { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: Protocol) -> Self { -s.0 -} -} - -impl FromStr for Protocol { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can -/// enable the configuration options in any combination. For more information about when Amazon S3 -/// considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct PublicAccessBlockConfiguration { -///

    Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket -/// and objects in this bucket. Setting this element to TRUE causes the following -/// behavior:

    -///
      -///
    • -///

      PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is -/// public.

      -///
    • -///
    • -///

      PUT Object calls fail if the request includes a public ACL.

      -///
    • -///
    • -///

      PUT Bucket calls fail if the request includes a public ACL.

      -///
    • -///
    -///

    Enabling this setting doesn't affect existing policies or ACLs.

    - pub block_public_acls: Option, -///

    Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this -/// element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the -/// specified bucket policy allows public access.

    -///

    Enabling this setting doesn't affect existing bucket policies.

    - pub block_public_policy: Option, -///

    Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this -/// bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on -/// this bucket and objects in this bucket.

    -///

    Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't -/// prevent new public ACLs from being set.

    - pub ignore_public_acls: Option, -///

    Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting -/// this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has -/// a public policy.

    -///

    Enabling this setting doesn't affect previously stored bucket policies, except that -/// public and cross-account access within any public bucket policy, including non-public -/// delegation to specific accounts, is blocked.

    - pub restrict_public_buckets: Option, -} - -impl fmt::Debug for PublicAccessBlockConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PublicAccessBlockConfiguration"); -if let Some(ref val) = self.block_public_acls { -d.field("block_public_acls", val); -} -if let Some(ref val) = self.block_public_policy { -d.field("block_public_policy", val); -} -if let Some(ref val) = self.ignore_public_acls { -d.field("ignore_public_acls", val); -} -if let Some(ref val) = self.restrict_public_buckets { -d.field("restrict_public_buckets", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketAccelerateConfigurationInput { -///

    Container for setting the transfer acceleration state.

    - pub accelerate_configuration: AccelerateConfiguration, -///

    The name of the bucket for which the accelerate configuration is set.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for PutBucketAccelerateConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAccelerateConfigurationInput"); -d.field("accelerate_configuration", &self.accelerate_configuration); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl PutBucketAccelerateConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketAccelerateConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAccelerateConfigurationOutput { -} - -impl fmt::Debug for PutBucketAccelerateConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAccelerateConfigurationOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAclInput { -///

    The canned ACL to apply to the bucket.

    - pub acl: Option, -///

    Contains the elements that set the ACL permissions for an object per grantee.

    - pub access_control_policy: Option, -///

    The bucket to which to apply the ACL.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, go to RFC -/// 1864. -///

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Allows grantee the read, write, read ACP, and write ACP permissions on the -/// bucket.

    - pub grant_full_control: Option, -///

    Allows grantee to list the objects in the bucket.

    - pub grant_read: Option, -///

    Allows grantee to read the bucket ACL.

    - pub grant_read_acp: Option, -///

    Allows grantee to create new objects in the bucket.

    -///

    For the bucket and object owners of existing objects, also allows deletions and -/// overwrites of those objects.

    - pub grant_write: Option, -///

    Allows grantee to write the ACL for the applicable bucket.

    - pub grant_write_acp: Option, -} - -impl fmt::Debug for PutBucketAclInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAclInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -if let Some(ref val) = self.access_control_policy { -d.field("access_control_policy", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write { -d.field("grant_write", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -d.finish_non_exhaustive() -} -} - -impl PutBucketAclInput { -#[must_use] -pub fn builder() -> builders::PutBucketAclInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAclOutput { -} - -impl fmt::Debug for PutBucketAclOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAclOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketAnalyticsConfigurationInput { -///

    The configuration and any analyses for the analytics filter.

    - pub analytics_configuration: AnalyticsConfiguration, -///

    The name of the bucket to which an analytics configuration is stored.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID that identifies the analytics configuration.

    - pub id: AnalyticsId, -} - -impl fmt::Debug for PutBucketAnalyticsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAnalyticsConfigurationInput"); -d.field("analytics_configuration", &self.analytics_configuration); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl PutBucketAnalyticsConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketAnalyticsConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketAnalyticsConfigurationOutput { -} - -impl fmt::Debug for PutBucketAnalyticsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAnalyticsConfigurationOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketCorsInput { -///

    Specifies the bucket impacted by the corsconfiguration.

    - pub bucket: BucketName, -///

    Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more -/// information, see Enabling -/// Cross-Origin Resource Sharing in the -/// Amazon S3 User Guide.

    - pub cors_configuration: CORSConfiguration, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, go to RFC -/// 1864. -///

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for PutBucketCorsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketCorsInput"); -d.field("bucket", &self.bucket); -d.field("cors_configuration", &self.cors_configuration); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl PutBucketCorsInput { -#[must_use] -pub fn builder() -> builders::PutBucketCorsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketCorsOutput { -} - -impl fmt::Debug for PutBucketCorsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketCorsOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketEncryptionInput { -///

    Specifies default encryption for a bucket using server-side encryption with different -/// key options.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    -/// -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    -///
    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the server-side encryption -/// configuration.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    - pub expected_bucket_owner: Option, - pub server_side_encryption_configuration: ServerSideEncryptionConfiguration, -} - -impl fmt::Debug for PutBucketEncryptionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketEncryptionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("server_side_encryption_configuration", &self.server_side_encryption_configuration); -d.finish_non_exhaustive() -} -} - -impl PutBucketEncryptionInput { -#[must_use] -pub fn builder() -> builders::PutBucketEncryptionInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketEncryptionOutput { -} - -impl fmt::Debug for PutBucketEncryptionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketEncryptionOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketIntelligentTieringConfigurationInput { -///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, -///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, -///

    Container for S3 Intelligent-Tiering configuration.

    - pub intelligent_tiering_configuration: IntelligentTieringConfiguration, -} - -impl fmt::Debug for PutBucketIntelligentTieringConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationInput"); -d.field("bucket", &self.bucket); -d.field("id", &self.id); -d.field("intelligent_tiering_configuration", &self.intelligent_tiering_configuration); -d.finish_non_exhaustive() -} -} - -impl PutBucketIntelligentTieringConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketIntelligentTieringConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketIntelligentTieringConfigurationOutput { -} - -impl fmt::Debug for PutBucketIntelligentTieringConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketInventoryConfigurationInput { -///

    The name of the bucket where the inventory configuration will be stored.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, -///

    Specifies the inventory configuration.

    - pub inventory_configuration: InventoryConfiguration, -} - -impl fmt::Debug for PutBucketInventoryConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketInventoryConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.field("inventory_configuration", &self.inventory_configuration); -d.finish_non_exhaustive() -} -} - -impl PutBucketInventoryConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketInventoryConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketInventoryConfigurationOutput { -} - -impl fmt::Debug for PutBucketInventoryConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketInventoryConfigurationOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLifecycleConfigurationInput { -///

    The name of the bucket for which to set the configuration.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub expected_bucket_owner: Option, -///

    Container for lifecycle rules. You can add as many as 1,000 rules.

    - pub lifecycle_configuration: Option, -///

    Indicates which default minimum object size behavior is applied to the lifecycle -/// configuration.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    -///
      -///
    • -///

      -/// all_storage_classes_128K - Objects smaller than 128 KB will not -/// transition to any storage class by default.

      -///
    • -///
    • -///

      -/// varies_by_storage_class - Objects smaller than 128 KB will -/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By -/// default, all other storage classes will prevent transitions smaller than 128 KB. -///

      -///
    • -///
    -///

    To customize the minimum object size for any transition you can add a filter that -/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in -/// the body of your transition rule. Custom filters always take precedence over the default -/// transition behavior.

    - pub transition_default_minimum_object_size: Option, -} - -impl fmt::Debug for PutBucketLifecycleConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketLifecycleConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.lifecycle_configuration { -d.field("lifecycle_configuration", val); -} -if let Some(ref val) = self.transition_default_minimum_object_size { -d.field("transition_default_minimum_object_size", val); -} -d.finish_non_exhaustive() -} -} - -impl PutBucketLifecycleConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketLifecycleConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLifecycleConfigurationOutput { -///

    Indicates which default minimum object size behavior is applied to the lifecycle -/// configuration.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    -///
      -///
    • -///

      -/// all_storage_classes_128K - Objects smaller than 128 KB will not -/// transition to any storage class by default.

      -///
    • -///
    • -///

      -/// varies_by_storage_class - Objects smaller than 128 KB will -/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By -/// default, all other storage classes will prevent transitions smaller than 128 KB. -///

      -///
    • -///
    -///

    To customize the minimum object size for any transition you can add a filter that -/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in -/// the body of your transition rule. Custom filters always take precedence over the default -/// transition behavior.

    - pub transition_default_minimum_object_size: Option, -} - -impl fmt::Debug for PutBucketLifecycleConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketLifecycleConfigurationOutput"); -if let Some(ref val) = self.transition_default_minimum_object_size { -d.field("transition_default_minimum_object_size", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketLoggingInput { -///

    The name of the bucket for which to set the logging parameters.

    - pub bucket: BucketName, -///

    Container for logging status information.

    - pub bucket_logging_status: BucketLoggingStatus, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash of the PutBucketLogging request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for PutBucketLoggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketLoggingInput"); -d.field("bucket", &self.bucket); -d.field("bucket_logging_status", &self.bucket_logging_status); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl PutBucketLoggingInput { -#[must_use] -pub fn builder() -> builders::PutBucketLoggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLoggingOutput { -} - -impl fmt::Debug for PutBucketLoggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketLoggingOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketMetricsConfigurationInput { -///

    The name of the bucket for which the metrics configuration is set.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and -/// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, -///

    Specifies the metrics configuration.

    - pub metrics_configuration: MetricsConfiguration, -} - -impl fmt::Debug for PutBucketMetricsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketMetricsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.field("metrics_configuration", &self.metrics_configuration); -d.finish_non_exhaustive() -} -} - -impl PutBucketMetricsConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketMetricsConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketMetricsConfigurationOutput { -} - -impl fmt::Debug for PutBucketMetricsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketMetricsConfigurationOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketNotificationConfigurationInput { -///

    The name of the bucket.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub notification_configuration: NotificationConfiguration, -///

    Skips validation of Amazon SQS, Amazon SNS, and Lambda -/// destinations. True or false value.

    - pub skip_destination_validation: Option, -} - -impl fmt::Debug for PutBucketNotificationConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketNotificationConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("notification_configuration", &self.notification_configuration); -if let Some(ref val) = self.skip_destination_validation { -d.field("skip_destination_validation", val); -} -d.finish_non_exhaustive() -} -} - -impl PutBucketNotificationConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketNotificationConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketNotificationConfigurationOutput { -} - -impl fmt::Debug for PutBucketNotificationConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketNotificationConfigurationOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketOwnershipControlsInput { -///

    The name of the Amazon S3 bucket whose OwnershipControls you want to set.

    - pub bucket: BucketName, -///

    The MD5 hash of the OwnershipControls request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or -/// ObjectWriter) that you want to apply to this Amazon S3 bucket.

    - pub ownership_controls: OwnershipControls, -} - -impl fmt::Debug for PutBucketOwnershipControlsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketOwnershipControlsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("ownership_controls", &self.ownership_controls); -d.finish_non_exhaustive() -} -} - -impl PutBucketOwnershipControlsInput { -#[must_use] -pub fn builder() -> builders::PutBucketOwnershipControlsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketOwnershipControlsOutput { -} - -impl fmt::Debug for PutBucketOwnershipControlsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketOwnershipControlsOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketPolicyInput { -///

    The name of the bucket.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm -/// or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    -///

    For the x-amz-checksum-algorithm -/// header, replace -/// algorithm -/// with the supported algorithm from the following list:

    -///
      -///
    • -///

      -/// CRC32 -///

      -///
    • -///
    • -///

      -/// CRC32C -///

      -///
    • -///
    • -///

      -/// CRC64NVME -///

      -///
    • -///
    • -///

      -/// SHA1 -///

      -///
    • -///
    • -///

      -/// SHA256 -///

      -///
    • -///
    -///

    For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If the individual checksum value you provide through x-amz-checksum-algorithm -/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    -/// -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    -///
    - pub checksum_algorithm: Option, -///

    Set this parameter to true to confirm that you want to remove your permissions to change -/// this bucket policy in the future.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub confirm_remove_self_bucket_access: Option, -///

    The MD5 hash of the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    - pub expected_bucket_owner: Option, -///

    The bucket policy as a JSON document.

    -///

    For directory buckets, the only IAM action supported in the bucket policy is -/// s3express:CreateSession.

    - pub policy: Policy, -} - -impl fmt::Debug for PutBucketPolicyInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketPolicyInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.confirm_remove_self_bucket_access { -d.field("confirm_remove_self_bucket_access", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("policy", &self.policy); -d.finish_non_exhaustive() -} -} - -impl PutBucketPolicyInput { -#[must_use] -pub fn builder() -> builders::PutBucketPolicyInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketPolicyOutput { -} - -impl fmt::Debug for PutBucketPolicyOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketPolicyOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketReplicationInput { -///

    The name of the bucket

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, see RFC 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub replication_configuration: ReplicationConfiguration, -///

    A token to allow Object Lock to be enabled for an existing bucket.

    - pub token: Option, -} - -impl fmt::Debug for PutBucketReplicationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketReplicationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("replication_configuration", &self.replication_configuration); -if let Some(ref val) = self.token { -d.field("token", val); -} -d.finish_non_exhaustive() -} -} - -impl PutBucketReplicationInput { -#[must_use] -pub fn builder() -> builders::PutBucketReplicationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketReplicationOutput { -} - -impl fmt::Debug for PutBucketReplicationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketReplicationOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketRequestPaymentInput { -///

    The bucket name.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, see RFC 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Container for Payer.

    - pub request_payment_configuration: RequestPaymentConfiguration, -} - -impl fmt::Debug for PutBucketRequestPaymentInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketRequestPaymentInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("request_payment_configuration", &self.request_payment_configuration); -d.finish_non_exhaustive() -} -} - -impl PutBucketRequestPaymentInput { -#[must_use] -pub fn builder() -> builders::PutBucketRequestPaymentInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketRequestPaymentOutput { -} - -impl fmt::Debug for PutBucketRequestPaymentOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketRequestPaymentOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketTaggingInput { -///

    The bucket name.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, see RFC 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Container for the TagSet and Tag elements.

    - pub tagging: Tagging, -} - -impl fmt::Debug for PutBucketTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("tagging", &self.tagging); -d.finish_non_exhaustive() -} -} - -impl PutBucketTaggingInput { -#[must_use] -pub fn builder() -> builders::PutBucketTaggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketTaggingOutput { -} - -impl fmt::Debug for PutBucketTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketTaggingOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketVersioningInput { -///

    The bucket name.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a -/// message integrity check to verify that the request body was not corrupted in transit. For -/// more information, see RFC -/// 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The concatenation of the authentication device's serial number, a space, and the value -/// that is displayed on your authentication device.

    - pub mfa: Option, -///

    Container for setting the versioning state.

    - pub versioning_configuration: VersioningConfiguration, -} - -impl fmt::Debug for PutBucketVersioningInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketVersioningInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.mfa { -d.field("mfa", val); -} -d.field("versioning_configuration", &self.versioning_configuration); -d.finish_non_exhaustive() -} -} - -impl PutBucketVersioningInput { -#[must_use] -pub fn builder() -> builders::PutBucketVersioningInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketVersioningOutput { -} - -impl fmt::Debug for PutBucketVersioningOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketVersioningOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutBucketWebsiteInput { -///

    The bucket name.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, see RFC 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Container for the request.

    - pub website_configuration: WebsiteConfiguration, -} - -impl fmt::Debug for PutBucketWebsiteInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketWebsiteInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("website_configuration", &self.website_configuration); -d.finish_non_exhaustive() -} -} - -impl PutBucketWebsiteInput { -#[must_use] -pub fn builder() -> builders::PutBucketWebsiteInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketWebsiteOutput { -} - -impl fmt::Debug for PutBucketWebsiteOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketWebsiteOutput"); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectAclInput { -///

    The canned ACL to apply to the object. For more information, see Canned -/// ACL.

    - pub acl: Option, -///

    Contains the elements that set the ACL permissions for an object per grantee.

    - pub access_control_policy: Option, -///

    The bucket name that contains the object to which you want to attach the ACL.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, go to RFC -/// 1864.> -///

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Allows grantee the read, write, read ACP, and write ACP permissions on the -/// bucket.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_full_control: Option, -///

    Allows grantee to list the objects in the bucket.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_read: Option, -///

    Allows grantee to read the bucket ACL.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_read_acp: Option, -///

    Allows grantee to create new objects in the bucket.

    -///

    For the bucket and object owners of existing objects, also allows deletions and -/// overwrites of those objects.

    - pub grant_write: Option, -///

    Allows grantee to write the ACL for the applicable bucket.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_write_acp: Option, -///

    Key for which the PUT action was initiated.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    Version ID used to reference a specific version of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for PutObjectAclInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectAclInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -if let Some(ref val) = self.access_control_policy { -d.field("access_control_policy", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write { -d.field("grant_write", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl PutObjectAclInput { -#[must_use] -pub fn builder() -> builders::PutObjectAclInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectAclOutput { - pub request_charged: Option, -} - -impl fmt::Debug for PutObjectAclOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectAclOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Default)] -pub struct PutObjectInput { -///

    The canned ACL to apply to the object. For more information, see Canned -/// ACL in the Amazon S3 User Guide.

    -///

    When adding a new object, you can use headers to grant ACL-based permissions to -/// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are -/// then added to the ACL on the object. By default, all objects are private. Only the owner -/// has full access control. For more information, see Access Control List (ACL) Overview -/// and Managing -/// ACLs Using the REST API in the Amazon S3 User Guide.

    -///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting -/// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that -/// use this setting only accept PUT requests that don't specify an ACL or PUT requests that -/// specify bucket owner full control ACLs, such as the bucket-owner-full-control -/// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that -/// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a -/// 400 error with the error code AccessControlListNotSupported. -/// For more information, see Controlling ownership of -/// objects and disabling ACLs in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub acl: Option, -///

    Object data.

    - pub body: Option, -///

    The bucket name to which the PUT action was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    -///

    -/// General purpose buckets - Setting this header to -/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with -/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 -/// Bucket Key.

    -///

    -/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - pub bucket_key_enabled: Option, -///

    Can be used to specify caching behavior along the request/reply chain. For more -/// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    - pub cache_control: Option, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm -/// or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    -///

    For the x-amz-checksum-algorithm -/// header, replace -/// algorithm -/// with the supported algorithm from the following list:

    -///
      -///
    • -///

      -/// CRC32 -///

      -///
    • -///
    • -///

      -/// CRC32C -///

      -///
    • -///
    • -///

      -/// CRC64NVME -///

      -///
    • -///
    • -///

      -/// SHA1 -///

      -///
    • -///
    • -///

      -/// SHA256 -///

      -///
    • -///
    -///

    For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If the individual checksum value you provide through x-amz-checksum-algorithm -/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    -/// -///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is -/// required for any request to upload an object with a retention period configured using -/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the -/// Amazon S3 User Guide.

    -///
    -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - pub checksum_algorithm: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the object. The CRC64NVME checksum is -/// always a full object checksum. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    - pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be -/// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    - pub content_length: Option, -///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to -/// RFC 1864. This header can be used as a message integrity check to verify that the data is -/// the same data that was originally sent. Although it is optional, we recommend using the -/// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST -/// request authentication, see REST Authentication.

    -/// -///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is -/// required for any request to upload an object with a retention period configured using -/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the -/// Amazon S3 User Guide.

    -///
    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    A standard MIME type describing the format of the contents. For more information, see -/// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    - pub content_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The date and time at which the object is no longer cacheable. For more information, see -/// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    - pub expires: Option, -///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_full_control: Option, -///

    Allows grantee to read the object data and its metadata.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_read: Option, -///

    Allows grantee to read the object ACL.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_read_acp: Option, -///

    Allows grantee to write the ACL for the applicable object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_write_acp: Option, -///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE -/// operation matches the ETag of the object in S3. If the ETag values do not match, the -/// operation returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    -///

    Expects the ETag value as a string.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_match: Option, -///

    Uploads the object only if the object key name does not already exist in the bucket -/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 -/// ConditionalRequestConflict response. On a 409 failure you should retry the -/// upload.

    -///

    Expects the '*' (asterisk) character.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_none_match: Option, -///

    Object key for which the PUT action was initiated.

    - pub key: ObjectKey, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    Specifies whether a legal hold will be applied to this object. For more information -/// about S3 Object Lock, see Object Lock in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode that you want to apply to this object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_mode: Option, -///

    The date and time when you want this object's Object Lock to expire. Must be formatted -/// as a timestamp parameter.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_retain_until_date: Option, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, -/// AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets passed on -/// to Amazon Web Services KMS for future GetObject operations on -/// this object.

    -///

    -/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    - pub ssekms_encryption_context: Option, -///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same -/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    -///

    -/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS -/// key to use. If you specify -/// x-amz-server-side-encryption:aws:kms or -/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key -/// (aws/s3) to protect the data.

    -///

    -/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the -/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses -/// the bucket's default KMS customer managed key ID. If you want to explicitly set the -/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -/// -/// Incorrect key specification results in an HTTP 400 Bad Request error.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 -/// (for example, AES256, aws:kms, aws:kms:dsse).

    -///
      -///
    • -///

      -/// General purpose buckets - You have four mutually -/// exclusive options to protect data using server-side encryption in Amazon S3, depending on -/// how you choose to manage the encryption keys. Specifically, the encryption key -/// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and -/// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by -/// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt -/// data at rest by using server-side encryption with other key options. For more -/// information, see Using Server-Side -/// Encryption in the Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. -/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. -/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and -/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. -///

      -/// -///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the -/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. -/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), -/// the encryption request headers must match the default encryption configuration of the directory bucket. -/// -///

      -///
      -///
    • -///
    - pub server_side_encryption: Option, -///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The -/// STANDARD storage class provides high durability and high availability. Depending on -/// performance needs, you can specify a different Storage Class. For more information, see -/// Storage -/// Classes in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      For directory buckets, only the S3 Express One Zone storage class is supported to store -/// newly created objects.

      -///
    • -///
    • -///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      -///
    • -///
    -///
    - pub storage_class: Option, -///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For -/// example, "Key1=Value1")

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub tagging: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata. For information about object metadata, see Object Key and Metadata in the -/// Amazon S3 User Guide.

    -///

    In the following example, the request header sets the redirect to an object -/// (anotherPage.html) in the same bucket:

    -///

    -/// x-amz-website-redirect-location: /anotherPage.html -///

    -///

    In the following example, the request header sets the object redirect to another -/// website:

    -///

    -/// x-amz-website-redirect-location: http://www.example.com/ -///

    -///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and -/// How to -/// Configure Website Page Redirects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub website_redirect_location: Option, -///

    -/// Specifies the offset for appending data to existing objects in bytes. -/// The offset must be equal to the size of the existing object being appended to. -/// If no object exists, setting this header to 0 will create a new object. -///

    -/// -///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    -///
    - pub write_offset_bytes: Option, -} - -impl fmt::Debug for PutObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -if let Some(ref val) = self.body { -d.field("body", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_length { -d.field("content_length", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tagging { -d.field("tagging", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -if let Some(ref val) = self.write_offset_bytes { -d.field("write_offset_bytes", val); -} -d.finish_non_exhaustive() -} -} - -impl PutObjectInput { -#[must_use] -pub fn builder() -> builders::PutObjectInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLegalHoldInput { -///

    The bucket name containing the object that you want to place a legal hold on.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash for the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The key name for the object that you want to place a legal hold on.

    - pub key: ObjectKey, -///

    Container element for the legal hold configuration you want to apply to the specified -/// object.

    - pub legal_hold: Option, - pub request_payer: Option, -///

    The version ID of the object that you want to place a legal hold on.

    - pub version_id: Option, -} - -impl fmt::Debug for PutObjectLegalHoldInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectLegalHoldInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.legal_hold { -d.field("legal_hold", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl PutObjectLegalHoldInput { -#[must_use] -pub fn builder() -> builders::PutObjectLegalHoldInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLegalHoldOutput { - pub request_charged: Option, -} - -impl fmt::Debug for PutObjectLegalHoldOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectLegalHoldOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLockConfigurationInput { -///

    The bucket whose Object Lock configuration you want to create or replace.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash for the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The Object Lock configuration that you want to apply to the specified bucket.

    - pub object_lock_configuration: Option, - pub request_payer: Option, -///

    A token to allow Object Lock to be enabled for an existing bucket.

    - pub token: Option, -} - -impl fmt::Debug for PutObjectLockConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectLockConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.object_lock_configuration { -d.field("object_lock_configuration", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.token { -d.field("token", val); -} -d.finish_non_exhaustive() -} -} - -impl PutObjectLockConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutObjectLockConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectLockConfigurationOutput { - pub request_charged: Option, -} - -impl fmt::Debug for PutObjectLockConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectLockConfigurationOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectOutput { -///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header -/// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it -/// was uploaded without a checksum (and Amazon S3 added the default checksum, -/// CRC64NVME, to the uploaded object). For more information about how -/// checksums are calculated with multipart uploads, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    This header specifies the checksum type of the object, which determines how part-level -/// checksums are combined to create an object-level checksum for multipart objects. For -/// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a -/// data integrity check to verify that the checksum type that is received is the same checksum -/// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Entity tag for the uploaded object.

    -///

    -/// General purpose buckets - To ensure that data is not -/// corrupted traversing the network, for objects where the ETag is the MD5 digest of the -/// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned -/// ETag to the calculated MD5 value.

    -///

    -/// Directory buckets - The ETag for the object in -/// a directory bucket isn't the MD5 digest of the object.

    - pub e_tag: Option, -///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, -/// the response includes this header. It includes the expiry-date and -/// rule-id key-value pairs that provide information about object expiration. -/// The value of the rule-id is URL-encoded.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    - pub expiration: Option, - pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets -/// passed on to Amazon Web Services KMS for future GetObject -/// operations on this object.

    - pub ssekms_encryption_context: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, -///

    -/// The size of the object in bytes. This value is only be present if you append to an object. -///

    -/// -///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    -///
    - pub size: Option, -///

    Version ID of the object.

    -///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID -/// for the object being stored. Amazon S3 returns this ID in the response. When you enable -/// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object -/// simultaneously, it stores all of the objects. For more information about versioning, see -/// Adding Objects to -/// Versioning-Enabled Buckets in the Amazon S3 User Guide. For -/// information about returning the versioning state of a bucket, see GetBucketVersioning.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for PutObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectRetentionInput { -///

    The bucket name that contains the object you want to apply this Object Retention -/// configuration to.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates whether this action should bypass Governance-mode restrictions.

    - pub bypass_governance_retention: Option, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash for the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The key name for the object that you want to apply this Object Retention configuration -/// to.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    The container element for the Object Retention configuration.

    - pub retention: Option, -///

    The version ID for the object that you want to apply this Object Retention configuration -/// to.

    - pub version_id: Option, -} - -impl fmt::Debug for PutObjectRetentionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectRetentionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bypass_governance_retention { -d.field("bypass_governance_retention", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.retention { -d.field("retention", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl PutObjectRetentionInput { -#[must_use] -pub fn builder() -> builders::PutObjectRetentionInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectRetentionOutput { - pub request_charged: Option, -} - -impl fmt::Debug for PutObjectRetentionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectRetentionOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutObjectTaggingInput { -///

    The bucket name containing the object.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash for the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Name of the object key.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    Container for the TagSet and Tag elements

    - pub tagging: Tagging, -///

    The versionId of the object that the tag-set will be added to.

    - pub version_id: Option, -} - -impl fmt::Debug for PutObjectTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.field("tagging", &self.tagging); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl PutObjectTaggingInput { -#[must_use] -pub fn builder() -> builders::PutObjectTaggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectTaggingOutput { -///

    The versionId of the object the tag-set was added to.

    - pub version_id: Option, -} - -impl fmt::Debug for PutObjectTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectTaggingOutput"); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutPublicAccessBlockInput { -///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want -/// to set.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash of the PutPublicAccessBlock request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 -/// bucket. You can enable the configuration options in any combination. For more information -/// about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    - pub public_access_block_configuration: PublicAccessBlockConfiguration, -} - -impl fmt::Debug for PutPublicAccessBlockInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutPublicAccessBlockInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("public_access_block_configuration", &self.public_access_block_configuration); -d.finish_non_exhaustive() -} -} - -impl PutPublicAccessBlockInput { -#[must_use] -pub fn builder() -> builders::PutPublicAccessBlockInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct PutPublicAccessBlockOutput { -} - -impl fmt::Debug for PutPublicAccessBlockOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutPublicAccessBlockOutput"); -d.finish_non_exhaustive() -} -} - - -pub type QueueArn = String; - -///

    Specifies the configuration for publishing messages to an Amazon Simple Queue Service -/// (Amazon SQS) queue when Amazon S3 detects specified events.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct QueueConfiguration { -///

    A collection of bucket events for which to send notifications

    - pub events: EventList, - pub filter: Option, - pub id: Option, -///

    The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message -/// when it detects events of the specified type.

    - pub queue_arn: QueueArn, -} - -impl fmt::Debug for QueueConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("QueueConfiguration"); -d.field("events", &self.events); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.field("queue_arn", &self.queue_arn); -d.finish_non_exhaustive() -} -} - - -pub type QueueConfigurationList = List; - -pub type Quiet = bool; - -pub type QuoteCharacter = String; - -pub type QuoteEscapeCharacter = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct QuoteFields(Cow<'static, str>); - -impl QuoteFields { -pub const ALWAYS: &'static str = "ALWAYS"; - -pub const ASNEEDED: &'static str = "ASNEEDED"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for QuoteFields { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: QuoteFields) -> Self { -s.0 -} -} - -impl FromStr for QuoteFields { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - - -pub type RecordDelimiter = String; - -///

    The container for the records event.

    -#[derive(Clone, Default, PartialEq)] -pub struct RecordsEvent { -///

    The byte array of partial, one or more result records. S3 Select doesn't guarantee that -/// a record will be self-contained in one record frame. To ensure continuous streaming of -/// data, S3 Select might split the same record across multiple record frames instead of -/// aggregating the results in memory. Some S3 clients (for example, the SDK for Java) handle this behavior by creating a ByteStream out of the response by -/// default. Other clients might not handle this behavior by default. In those cases, you must -/// aggregate the results on the client side and parse the response.

    - pub payload: Option, -} - -impl fmt::Debug for RecordsEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RecordsEvent"); -if let Some(ref val) = self.payload { -d.field("payload", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies how requests are redirected. In the event of an error, you can specify a -/// different error code to return.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Redirect { -///

    The host name to use in the redirect request.

    - pub host_name: Option, -///

    The HTTP redirect code to use on the response. Not required if one of the siblings is -/// present.

    - pub http_redirect_code: Option, -///

    Protocol to use when redirecting requests. The default is the protocol that is used in -/// the original request.

    - pub protocol: Option, -///

    The object key prefix to use in the redirect request. For example, to redirect requests -/// for all pages with prefix docs/ (objects in the docs/ folder) to -/// documents/, you can set a condition block with KeyPrefixEquals -/// set to docs/ and in the Redirect set ReplaceKeyPrefixWith to -/// /documents. Not required if one of the siblings is present. Can be present -/// only if ReplaceKeyWith is not provided.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub replace_key_prefix_with: Option, -///

    The specific object key to use in the redirect request. For example, redirect request to -/// error.html. Not required if one of the siblings is present. Can be present -/// only if ReplaceKeyPrefixWith is not provided.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub replace_key_with: Option, -} - -impl fmt::Debug for Redirect { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Redirect"); -if let Some(ref val) = self.host_name { -d.field("host_name", val); -} -if let Some(ref val) = self.http_redirect_code { -d.field("http_redirect_code", val); -} -if let Some(ref val) = self.protocol { -d.field("protocol", val); -} -if let Some(ref val) = self.replace_key_prefix_with { -d.field("replace_key_prefix_with", val); -} -if let Some(ref val) = self.replace_key_with { -d.field("replace_key_with", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 -/// bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct RedirectAllRequestsTo { -///

    Name of the host where requests are redirected.

    - pub host_name: HostName, -///

    Protocol to use when redirecting requests. The default is the protocol that is used in -/// the original request.

    - pub protocol: Option, -} - -impl fmt::Debug for RedirectAllRequestsTo { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RedirectAllRequestsTo"); -d.field("host_name", &self.host_name); -if let Some(ref val) = self.protocol { -d.field("protocol", val); -} -d.finish_non_exhaustive() -} -} - - -pub type Region = String; - -pub type ReplaceKeyPrefixWith = String; - -pub type ReplaceKeyWith = String; - -pub type ReplicaKmsKeyID = String; - -///

    A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't -/// replicate replica modifications by default. In the latest version of replication -/// configuration (when Filter is specified), you can specify this element and set -/// the status to Enabled to replicate modifications on replicas.

    -/// -///

    If you don't specify the Filter element, Amazon S3 assumes that the -/// replication configuration is the earlier version, V1. In the earlier version, this -/// element is not allowed.

    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicaModifications { -///

    Specifies whether Amazon S3 replicates modifications on replicas.

    - pub status: ReplicaModificationsStatus, -} - -impl fmt::Debug for ReplicaModifications { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicaModifications"); -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicaModificationsStatus(Cow<'static, str>); - -impl ReplicaModificationsStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ReplicaModificationsStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ReplicaModificationsStatus) -> Self { -s.0 -} -} - -impl FromStr for ReplicaModificationsStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A container for replication rules. You can add up to 1,000 rules. The maximum size of a -/// replication configuration is 2 MB.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationConfiguration { -///

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when -/// replicating objects. For more information, see How to Set Up Replication -/// in the Amazon S3 User Guide.

    - pub role: Role, -///

    A container for one or more replication rules. A replication configuration must have at -/// least one rule and can contain a maximum of 1,000 rules.

    - pub rules: ReplicationRules, -} - -impl fmt::Debug for ReplicationConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationConfiguration"); -d.field("role", &self.role); -d.field("rules", &self.rules); -d.finish_non_exhaustive() -} -} - - -///

    Specifies which Amazon S3 objects to replicate and where to store the replicas.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRule { - pub delete_marker_replication: Option, -///

    A container for information about the replication destination and its configurations -/// including enabling the S3 Replication Time Control (S3 RTC).

    - pub destination: Destination, -///

    Optional configuration to replicate existing source bucket objects.

    -/// -///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the -/// Amazon S3 User Guide.

    -///
    - pub existing_object_replication: Option, - pub filter: Option, -///

    A unique identifier for the rule. The maximum value is 255 characters.

    - pub id: Option, -///

    An object key name prefix that identifies the object or objects to which the rule -/// applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, -/// specify an empty string.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, -///

    The priority indicates which rule has precedence whenever two or more replication rules -/// conflict. Amazon S3 will attempt to replicate objects according to all replication rules. -/// However, if there are two or more rules with the same destination bucket, then objects will -/// be replicated according to the rule with the highest priority. The higher the number, the -/// higher the priority.

    -///

    For more information, see Replication in the -/// Amazon S3 User Guide.

    - pub priority: Option, -///

    A container that describes additional filters for identifying the source objects that -/// you want to replicate. You can choose to enable or disable the replication of these -/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created -/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service -/// (SSE-KMS).

    - pub source_selection_criteria: Option, -///

    Specifies whether the rule is enabled.

    - pub status: ReplicationRuleStatus, -} - -impl fmt::Debug for ReplicationRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationRule"); -if let Some(ref val) = self.delete_marker_replication { -d.field("delete_marker_replication", val); -} -d.field("destination", &self.destination); -if let Some(ref val) = self.existing_object_replication { -d.field("existing_object_replication", val); -} -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.priority { -d.field("priority", val); -} -if let Some(ref val) = self.source_selection_criteria { -d.field("source_selection_criteria", val); -} -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -///

    A container for specifying rule filters. The filters determine the subset of objects to -/// which the rule applies. This element is required only if you specify more than one filter.

    -///

    For example:

    -///
      -///
    • -///

      If you specify both a Prefix and a Tag filter, wrap -/// these filters in an And tag.

      -///
    • -///
    • -///

      If you specify a filter based on multiple tags, wrap the Tag elements -/// in an And tag.

      -///
    • -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRuleAndOperator { -///

    An object key name prefix that identifies the subset of objects to which the rule -/// applies.

    - pub prefix: Option, -///

    An array of tags containing key and value pairs.

    - pub tags: Option, -} - -impl fmt::Debug for ReplicationRuleAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationRuleAndOperator"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} -} - - -///

    A filter that identifies the subset of objects to which the replication rule applies. A -/// Filter must specify exactly one Prefix, Tag, or -/// an And child element.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRuleFilter { -///

    A container for specifying rule filters. The filters determine the subset of objects to -/// which the rule applies. This element is required only if you specify more than one filter. -/// For example:

    -///
      -///
    • -///

      If you specify both a Prefix and a Tag filter, wrap -/// these filters in an And tag.

      -///
    • -///
    • -///

      If you specify a filter based on multiple tags, wrap the Tag elements -/// in an And tag.

      -///
    • -///
    - pub and: Option, -///

    An object key name prefix that identifies the subset of objects to which the rule -/// applies.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, -///

    A container for specifying a tag key and value.

    -///

    The rule applies only to objects that have the tag in their tag set.

    - pub tag: Option, -} - -impl fmt::Debug for ReplicationRuleFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationRuleFilter"); -if let Some(ref val) = self.and { -d.field("and", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tag { -d.field("tag", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicationRuleStatus(Cow<'static, str>); - -impl ReplicationRuleStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ReplicationRuleStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ReplicationRuleStatus) -> Self { -s.0 -} -} - -impl FromStr for ReplicationRuleStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ReplicationRules = List; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ReplicationStatus(Cow<'static, str>); - -impl ReplicationStatus { -pub const COMPLETE: &'static str = "COMPLETE"; - -pub const COMPLETED: &'static str = "COMPLETED"; - -pub const FAILED: &'static str = "FAILED"; - -pub const PENDING: &'static str = "PENDING"; - -pub const REPLICA: &'static str = "REPLICA"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ReplicationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ReplicationStatus) -> Self { -s.0 -} -} - -impl FromStr for ReplicationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is -/// enabled and the time when all objects and operations on objects must be replicated. Must be -/// specified together with a Metrics block.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicationTime { -///

    Specifies whether the replication time is enabled.

    - pub status: ReplicationTimeStatus, -///

    A container specifying the time by which replication should be complete for all objects -/// and operations on objects.

    - pub time: ReplicationTimeValue, -} - -impl fmt::Debug for ReplicationTime { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationTime"); -d.field("status", &self.status); -d.field("time", &self.time); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicationTimeStatus(Cow<'static, str>); - -impl ReplicationTimeStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ReplicationTimeStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ReplicationTimeStatus) -> Self { -s.0 -} -} - -impl FromStr for ReplicationTimeStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics -/// EventThreshold.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationTimeValue { -///

    Contains an integer specifying time in minutes.

    -///

    Valid value: 15

    - pub minutes: Option, -} - -impl fmt::Debug for ReplicationTimeValue { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationTimeValue"); -if let Some(ref val) = self.minutes { -d.field("minutes", val); -} -d.finish_non_exhaustive() -} -} - - -///

    If present, indicates that the requester was successfully charged for the -/// request.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RequestCharged(Cow<'static, str>); - -impl RequestCharged { -pub const REQUESTER: &'static str = "requester"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for RequestCharged { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: RequestCharged) -> Self { -s.0 -} -} - -impl FromStr for RequestCharged { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Confirms that the requester knows that they will be charged for the request. Bucket -/// owners need not specify this parameter in their requests. If either the source or -/// destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding -/// charges to copy the object. For information about downloading objects from Requester Pays -/// buckets, see Downloading Objects in -/// Requester Pays Buckets in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RequestPayer(Cow<'static, str>); - -impl RequestPayer { -pub const REQUESTER: &'static str = "requester"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for RequestPayer { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: RequestPayer) -> Self { -s.0 -} -} - -impl FromStr for RequestPayer { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Container for Payer.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct RequestPaymentConfiguration { -///

    Specifies who pays for the download and request fees.

    - pub payer: Payer, -} - -impl fmt::Debug for RequestPaymentConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RequestPaymentConfiguration"); -d.field("payer", &self.payer); -d.finish_non_exhaustive() -} -} - -impl Default for RequestPaymentConfiguration { -fn default() -> Self { -Self { -payer: String::new().into(), -} -} -} - - -///

    Container for specifying if periodic QueryProgress messages should be -/// sent.

    -#[derive(Clone, Default, PartialEq)] -pub struct RequestProgress { -///

    Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, -/// FALSE. Default value: FALSE.

    - pub enabled: Option, -} - -impl fmt::Debug for RequestProgress { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RequestProgress"); -if let Some(ref val) = self.enabled { -d.field("enabled", val); -} -d.finish_non_exhaustive() -} -} - - -pub type RequestRoute = String; - -pub type RequestToken = String; - -pub type ResponseCacheControl = String; - -pub type ResponseContentDisposition = String; - -pub type ResponseContentEncoding = String; - -pub type ResponseContentLanguage = String; - -pub type ResponseContentType = String; - -pub type ResponseExpires = Timestamp; - -pub type Restore = String; - -pub type RestoreExpiryDate = Timestamp; - -#[derive(Clone, Default, PartialEq)] -pub struct RestoreObjectInput { -///

    The bucket name containing the object to restore.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Object key for which the action was initiated.

    - pub key: ObjectKey, - pub request_payer: Option, - pub restore_request: Option, -///

    VersionId used to reference a specific version of the object.

    - pub version_id: Option, -} - -impl fmt::Debug for RestoreObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RestoreObjectInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.restore_request { -d.field("restore_request", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl RestoreObjectInput { -#[must_use] -pub fn builder() -> builders::RestoreObjectInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct RestoreObjectOutput { - pub request_charged: Option, -///

    Indicates the path in the provided S3 output location where Select results will be -/// restored to.

    - pub restore_output_path: Option, -} - -impl fmt::Debug for RestoreObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RestoreObjectOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.restore_output_path { -d.field("restore_output_path", val); -} -d.finish_non_exhaustive() -} -} - - -pub type RestoreOutputPath = String; - -///

    Container for restore job parameters.

    -#[derive(Clone, Default, PartialEq)] -pub struct RestoreRequest { -///

    Lifetime of the active copy in days. Do not use with restores that specify -/// OutputLocation.

    -///

    The Days element is required for regular restores, and must not be provided for select -/// requests.

    - pub days: Option, -///

    The optional description for the job.

    - pub description: Option, -///

    S3 Glacier related parameters pertaining to this job. Do not use with restores that -/// specify OutputLocation.

    - pub glacier_job_parameters: Option, -///

    Describes the location where the restore job's output is stored.

    - pub output_location: Option, -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Describes the parameters for Select job types.

    - pub select_parameters: Option, -///

    Retrieval tier at which the restore will be processed.

    - pub tier: Option, -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Type of restore request.

    - pub type_: Option, -} - -impl fmt::Debug for RestoreRequest { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RestoreRequest"); -if let Some(ref val) = self.days { -d.field("days", val); -} -if let Some(ref val) = self.description { -d.field("description", val); -} -if let Some(ref val) = self.glacier_job_parameters { -d.field("glacier_job_parameters", val); -} -if let Some(ref val) = self.output_location { -d.field("output_location", val); -} -if let Some(ref val) = self.select_parameters { -d.field("select_parameters", val); -} -if let Some(ref val) = self.tier { -d.field("tier", val); -} -if let Some(ref val) = self.type_ { -d.field("type_", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RestoreRequestType(Cow<'static, str>); - -impl RestoreRequestType { -pub const SELECT: &'static str = "SELECT"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for RestoreRequestType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: RestoreRequestType) -> Self { -s.0 -} -} - -impl FromStr for RestoreRequestType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Specifies the restoration status of an object. Objects in certain storage classes must -/// be restored before they can be retrieved. For more information about these storage classes -/// and how to work with archived objects, see Working with archived -/// objects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    -#[derive(Clone, Default, PartialEq)] -pub struct RestoreStatus { -///

    Specifies whether the object is currently being restored. If the object restoration is -/// in progress, the header returns the value TRUE. For example:

    -///

    -/// x-amz-optional-object-attributes: IsRestoreInProgress="true" -///

    -///

    If the object restoration has completed, the header returns the value -/// FALSE. For example:

    -///

    -/// x-amz-optional-object-attributes: IsRestoreInProgress="false", -/// RestoreExpiryDate="2012-12-21T00:00:00.000Z" -///

    -///

    If the object hasn't been restored, there is no header response.

    - pub is_restore_in_progress: Option, -///

    Indicates when the restored copy will expire. This value is populated only if the object -/// has already been restored. For example:

    -///

    -/// x-amz-optional-object-attributes: IsRestoreInProgress="false", -/// RestoreExpiryDate="2012-12-21T00:00:00.000Z" -///

    - pub restore_expiry_date: Option, -} - -impl fmt::Debug for RestoreStatus { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RestoreStatus"); -if let Some(ref val) = self.is_restore_in_progress { -d.field("is_restore_in_progress", val); -} -if let Some(ref val) = self.restore_expiry_date { -d.field("restore_expiry_date", val); -} -d.finish_non_exhaustive() -} -} - - -pub type Role = String; - -///

    Specifies the redirect behavior and when a redirect is applied. For more information -/// about routing rules, see Configuring advanced conditional redirects in the -/// Amazon S3 User Guide.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct RoutingRule { -///

    A container for describing a condition that must be met for the specified redirect to -/// apply. For example, 1. If request is for pages in the /docs folder, redirect -/// to the /documents folder. 2. If request results in HTTP error 4xx, redirect -/// request to another host where you might process the error.

    - pub condition: Option, -///

    Container for redirect information. You can redirect requests to another host, to -/// another page, or with another protocol. In the event of an error, you can specify a -/// different error code to return.

    - pub redirect: Redirect, -} - -impl fmt::Debug for RoutingRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RoutingRule"); -if let Some(ref val) = self.condition { -d.field("condition", val); -} -d.field("redirect", &self.redirect); -d.finish_non_exhaustive() -} -} - - -pub type RoutingRules = List; - -///

    A container for object key name prefix and suffix filtering rules.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct S3KeyFilter { - pub filter_rules: Option, -} - -impl fmt::Debug for S3KeyFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("S3KeyFilter"); -if let Some(ref val) = self.filter_rules { -d.field("filter_rules", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Describes an Amazon S3 location that will receive the results of the restore request.

    -#[derive(Clone, Default, PartialEq)] -pub struct S3Location { -///

    A list of grants that control access to the staged results.

    - pub access_control_list: Option, -///

    The name of the bucket where the restore results will be placed.

    - pub bucket_name: BucketName, -///

    The canned ACL to apply to the restore results.

    - pub canned_acl: Option, - pub encryption: Option, -///

    The prefix that is prepended to the restore results for this request.

    - pub prefix: LocationPrefix, -///

    The class of storage used to store the restore results.

    - pub storage_class: Option, -///

    The tag-set that is applied to the restore results.

    - pub tagging: Option, -///

    A list of metadata to store with the restore results in S3.

    - pub user_metadata: Option, -} - -impl fmt::Debug for S3Location { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("S3Location"); -if let Some(ref val) = self.access_control_list { -d.field("access_control_list", val); -} -d.field("bucket_name", &self.bucket_name); -if let Some(ref val) = self.canned_acl { -d.field("canned_acl", val); -} -if let Some(ref val) = self.encryption { -d.field("encryption", val); -} -d.field("prefix", &self.prefix); -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tagging { -d.field("tagging", val); -} -if let Some(ref val) = self.user_metadata { -d.field("user_metadata", val); -} -d.finish_non_exhaustive() -} -} - - -pub type S3TablesArn = String; - -pub type S3TablesBucketArn = String; - -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct S3TablesDestination { -///

    -/// The Amazon Resource Name (ARN) for the table bucket that's specified as the -/// destination in the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. -///

    - pub table_bucket_arn: S3TablesBucketArn, -///

    -/// The name for the metadata table in your metadata table configuration. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    - pub table_name: S3TablesName, -} - -impl fmt::Debug for S3TablesDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("S3TablesDestination"); -d.field("table_bucket_arn", &self.table_bucket_arn); -d.field("table_name", &self.table_name); -d.finish_non_exhaustive() -} -} - - -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct S3TablesDestinationResult { -///

    -/// The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The -/// specified metadata table name must be unique within the aws_s3_metadata namespace -/// in the destination table bucket. -///

    - pub table_arn: S3TablesArn, -///

    -/// The Amazon Resource Name (ARN) for the table bucket that's specified as the -/// destination in the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. -///

    - pub table_bucket_arn: S3TablesBucketArn, -///

    -/// The name for the metadata table in your metadata table configuration. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    - pub table_name: S3TablesName, -///

    -/// The table bucket namespace for the metadata table in your metadata table configuration. This value -/// is always aws_s3_metadata. -///

    - pub table_namespace: S3TablesNamespace, -} - -impl fmt::Debug for S3TablesDestinationResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("S3TablesDestinationResult"); -d.field("table_arn", &self.table_arn); -d.field("table_bucket_arn", &self.table_bucket_arn); -d.field("table_name", &self.table_name); -d.field("table_namespace", &self.table_namespace); -d.finish_non_exhaustive() -} -} - - -pub type S3TablesName = String; - -pub type S3TablesNamespace = String; - -pub type SSECustomerAlgorithm = String; - -pub type SSECustomerKey = String; - -pub type SSECustomerKeyMD5 = String; - -///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SSEKMS { -///

    Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for -/// encrypting inventory reports.

    - pub key_id: SSEKMSKeyId, -} - -impl fmt::Debug for SSEKMS { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SSEKMS"); -d.field("key_id", &self.key_id); -d.finish_non_exhaustive() -} -} - - -pub type SSEKMSEncryptionContext = String; - -pub type SSEKMSKeyId = String; - -///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SSES3 { -} - -impl fmt::Debug for SSES3 { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SSES3"); -d.finish_non_exhaustive() -} -} - - -///

    Specifies the byte range of the object to get the records from. A record is processed -/// when its first byte is contained by the range. This parameter is optional, but when -/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the -/// start and end of the range.

    -#[derive(Clone, Default, PartialEq)] -pub struct ScanRange { -///

    Specifies the end of the byte range. This parameter is optional. Valid values: -/// non-negative integers. The default value is one less than the size of the object being -/// queried. If only the End parameter is supplied, it is interpreted to mean scan the last N -/// bytes of the file. For example, -/// 50 means scan the -/// last 50 bytes.

    - pub end: Option, -///

    Specifies the start of the byte range. This parameter is optional. Valid values: -/// non-negative integers. The default value is 0. If only start is supplied, it -/// means scan from that point to the end of the file. For example, -/// 50 means scan -/// from byte 50 until the end of the file.

    - pub start: Option, -} - -impl fmt::Debug for ScanRange { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ScanRange"); -if let Some(ref val) = self.end { -d.field("end", val); -} -if let Some(ref val) = self.start { -d.field("start", val); -} -d.finish_non_exhaustive() -} -} - - -///

    The container for selecting objects from a content event stream.

    -#[derive(Debug, Clone, PartialEq)] -#[non_exhaustive] -pub enum SelectObjectContentEvent { -///

    The Continuation Event.

    - Cont(ContinuationEvent), -///

    The End Event.

    - End(EndEvent), -///

    The Progress Event.

    - Progress(ProgressEvent), -///

    The Records Event.

    - Records(RecordsEvent), -///

    The Stats Event.

    - Stats(StatsEvent), -} - -/// -///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query -/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a -/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data -/// into records. It returns only records that match the specified SQL expression. You must -/// also specify the data serialization format for the response. For more information, see -/// S3Select API Documentation.

    -#[derive(Clone, PartialEq)] -pub struct SelectObjectContentInput { -///

    The S3 bucket.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The object key.

    - pub key: ObjectKey, -///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created -/// using a checksum algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    - pub sse_customer_algorithm: Option, -///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. -/// For more information, see -/// Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    - pub sse_customer_key: Option, -///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum -/// algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    - pub sse_customer_key_md5: Option, - pub request: SelectObjectContentRequest, -} - -impl fmt::Debug for SelectObjectContentInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SelectObjectContentInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -d.field("request", &self.request); -d.finish_non_exhaustive() -} -} - -impl SelectObjectContentInput { -#[must_use] -pub fn builder() -> builders::SelectObjectContentInputBuilder { -default() -} -} - -#[derive(Default)] -pub struct SelectObjectContentOutput { -///

    The array of results.

    - pub payload: Option, -} - -impl fmt::Debug for SelectObjectContentOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SelectObjectContentOutput"); -if let Some(ref val) = self.payload { -d.field("payload", val); -} -d.finish_non_exhaustive() -} -} - - -/// -///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query -/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a -/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data -/// into records. It returns only records that match the specified SQL expression. You must -/// also specify the data serialization format for the response. For more information, see -/// S3Select API Documentation.

    -#[derive(Clone, PartialEq)] -pub struct SelectObjectContentRequest { -///

    The expression that is used to query the object.

    - pub expression: Expression, -///

    The type of the provided expression (for example, SQL).

    - pub expression_type: ExpressionType, -///

    Describes the format of the data in the object that is being queried.

    - pub input_serialization: InputSerialization, -///

    Describes the format of the data that you want Amazon S3 to return in response.

    - pub output_serialization: OutputSerialization, -///

    Specifies if periodic request progress information should be enabled.

    - pub request_progress: Option, -///

    Specifies the byte range of the object to get the records from. A record is processed -/// when its first byte is contained by the range. This parameter is optional, but when -/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the -/// start and end of the range.

    -///

    -/// ScanRangemay be used in the following ways:

    -///
      -///
    • -///

      -/// 50100 -/// - process only the records starting between the bytes 50 and 100 (inclusive, counting -/// from zero)

      -///
    • -///
    • -///

      -/// 50 - -/// process only the records starting after the byte 50

      -///
    • -///
    • -///

      -/// 50 - -/// process only the records within the last 50 bytes of the file.

      -///
    • -///
    - pub scan_range: Option, -} - -impl fmt::Debug for SelectObjectContentRequest { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SelectObjectContentRequest"); -d.field("expression", &self.expression); -d.field("expression_type", &self.expression_type); -d.field("input_serialization", &self.input_serialization); -d.field("output_serialization", &self.output_serialization); -if let Some(ref val) = self.request_progress { -d.field("request_progress", val); -} -if let Some(ref val) = self.scan_range { -d.field("scan_range", val); -} -d.finish_non_exhaustive() -} -} - - -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Describes the parameters for Select job types.

    -///

    Learn How to optimize querying your data in Amazon S3 using -/// Amazon Athena, S3 Object Lambda, or client-side filtering.

    -#[derive(Clone, PartialEq)] -pub struct SelectParameters { -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    The expression that is used to query the object.

    - pub expression: Expression, -///

    The type of the provided expression (for example, SQL).

    - pub expression_type: ExpressionType, -///

    Describes the serialization format of the object.

    - pub input_serialization: InputSerialization, -///

    Describes how the results of the Select job are serialized.

    - pub output_serialization: OutputSerialization, -} - -impl fmt::Debug for SelectParameters { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SelectParameters"); -d.field("expression", &self.expression); -d.field("expression_type", &self.expression_type); -d.field("input_serialization", &self.input_serialization); -d.field("output_serialization", &self.output_serialization); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ServerSideEncryption(Cow<'static, str>); - -impl ServerSideEncryption { -pub const AES256: &'static str = "AES256"; - -pub const AWS_KMS: &'static str = "aws:kms"; - -pub const AWS_KMS_DSSE: &'static str = "aws:kms:dsse"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ServerSideEncryption { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ServerSideEncryption) -> Self { -s.0 -} -} - -impl FromStr for ServerSideEncryption { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Describes the default server-side encryption to apply to new objects in the bucket. If a -/// PUT Object request doesn't specify any server-side encryption, this default encryption will -/// be applied. For more information, see PutBucketEncryption.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you don't specify -/// a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key -/// (aws/s3) in your Amazon Web Services account the first time that you add an -/// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key -/// for SSE-KMS.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -///

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

      -///
    • -///
    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionByDefault { -///

    Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default -/// encryption.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - This parameter is -/// allowed if and only if SSEAlgorithm is set to aws:kms or -/// aws:kms:dsse.

      -///
    • -///
    • -///

      -/// Directory buckets - This parameter is -/// allowed if and only if SSEAlgorithm is set to -/// aws:kms.

      -///
    • -///
    -///
    -///

    You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS -/// key.

    -///
      -///
    • -///

      Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab -///

      -///
    • -///
    • -///

      Key ARN: -/// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab -///

      -///
    • -///
    • -///

      Key Alias: alias/alias-name -///

      -///
    • -///
    -///

    If you are using encryption with cross-account or Amazon Web Services service operations, you must use -/// a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you're specifying -/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. -/// If you use a KMS key alias instead, then KMS resolves the key within the -/// requester’s account. This behavior can result in data that's encrypted with a -/// KMS key that belongs to the requester, and not the bucket owner. Also, if you -/// use a key ID, you can run into a LogDestination undeliverable error when creating -/// a VPC flow log.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      -///
    • -///
    -///
    -/// -///

    Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service -/// Developer Guide.

    -///
    - pub kms_master_key_id: Option, -///

    Server-side encryption algorithm to use for the default encryption.

    -/// -///

    For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

    -///
    - pub sse_algorithm: ServerSideEncryption, -} - -impl fmt::Debug for ServerSideEncryptionByDefault { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ServerSideEncryptionByDefault"); -if let Some(ref val) = self.kms_master_key_id { -d.field("kms_master_key_id", val); -} -d.field("sse_algorithm", &self.sse_algorithm); -d.finish_non_exhaustive() -} -} - - -///

    Specifies the default server-side-encryption configuration.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionConfiguration { -///

    Container for information about a particular server-side encryption configuration -/// rule.

    - pub rules: ServerSideEncryptionRules, -} - -impl fmt::Debug for ServerSideEncryptionConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ServerSideEncryptionConfiguration"); -d.field("rules", &self.rules); -d.finish_non_exhaustive() -} -} - - -///

    Specifies the default server-side encryption configuration.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you're specifying -/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. -/// If you use a KMS key alias instead, then KMS resolves the key within the -/// requester’s account. This behavior can result in data that's encrypted with a -/// KMS key that belongs to the requester, and not the bucket owner.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      -///
    • -///
    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionRule { -///

    Specifies the default server-side encryption to apply to new objects in the bucket. If a -/// PUT Object request doesn't specify any server-side encryption, this default encryption will -/// be applied.

    - pub apply_server_side_encryption_by_default: Option, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS -/// (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the -/// BucketKeyEnabled element to true causes Amazon S3 to use an S3 -/// Bucket Key.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - By default, S3 -/// Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      -///
    • -///
    -///
    - pub bucket_key_enabled: Option, -} - -impl fmt::Debug for ServerSideEncryptionRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ServerSideEncryptionRule"); -if let Some(ref val) = self.apply_server_side_encryption_by_default { -d.field("apply_server_side_encryption_by_default", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ServerSideEncryptionRules = List; - -pub type SessionCredentialValue = String; - -///

    The established temporary security credentials of the session.

    -/// -///

    -/// Directory buckets - These session -/// credentials are only supported for the authentication and authorization of Zonal endpoint API operations -/// on directory buckets.

    -///
    -#[derive(Clone, PartialEq)] -pub struct SessionCredentials { -///

    A unique identifier that's associated with a secret access key. The access key ID and -/// the secret access key are used together to sign programmatic Amazon Web Services requests -/// cryptographically.

    - pub access_key_id: AccessKeyIdValue, -///

    Temporary security credentials expire after a specified interval. After temporary -/// credentials expire, any calls that you make with those credentials will fail. So you must -/// generate a new set of temporary credentials. Temporary credentials cannot be extended or -/// refreshed beyond the original specified interval.

    - pub expiration: SessionExpiration, -///

    A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services -/// requests. Signing a request identifies the sender and prevents the request from being -/// altered.

    - pub secret_access_key: SessionCredentialValue, -///

    A part of the temporary security credentials. The session token is used to validate the -/// temporary security credentials. -/// -///

    - pub session_token: SessionCredentialValue, -} - -impl fmt::Debug for SessionCredentials { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SessionCredentials"); -d.field("access_key_id", &self.access_key_id); -d.field("expiration", &self.expiration); -d.field("secret_access_key", &self.secret_access_key); -d.field("session_token", &self.session_token); -d.finish_non_exhaustive() -} -} - -impl Default for SessionCredentials { -fn default() -> Self { -Self { -access_key_id: default(), -expiration: default(), -secret_access_key: default(), -session_token: default(), -} -} -} - - -pub type SessionExpiration = Timestamp; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct SessionMode(Cow<'static, str>); - -impl SessionMode { -pub const READ_ONLY: &'static str = "ReadOnly"; - -pub const READ_WRITE: &'static str = "ReadWrite"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for SessionMode { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: SessionMode) -> Self { -s.0 -} -} - -impl FromStr for SessionMode { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Setting = bool; - -///

    To use simple format for S3 keys for log objects, set SimplePrefix to an empty -/// object.

    -///

    -/// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -///

    -#[derive(Clone, Default, PartialEq)] -pub struct SimplePrefix { -} - -impl fmt::Debug for SimplePrefix { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SimplePrefix"); -d.finish_non_exhaustive() -} -} - - -pub type Size = i64; - -pub type SkipValidation = bool; - -pub type SourceIdentityType = String; - -///

    A container that describes additional filters for identifying the source objects that -/// you want to replicate. You can choose to enable or disable the replication of these -/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created -/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service -/// (SSE-KMS).

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SourceSelectionCriteria { -///

    A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't -/// replicate replica modifications by default. In the latest version of replication -/// configuration (when Filter is specified), you can specify this element and set -/// the status to Enabled to replicate modifications on replicas.

    -/// -///

    If you don't specify the Filter element, Amazon S3 assumes that the -/// replication configuration is the earlier version, V1. In the earlier version, this -/// element is not allowed

    -///
    - pub replica_modifications: Option, -///

    A container for filter information for the selection of Amazon S3 objects encrypted with -/// Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication -/// configuration, this element is required.

    - pub sse_kms_encrypted_objects: Option, -} - -impl fmt::Debug for SourceSelectionCriteria { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SourceSelectionCriteria"); -if let Some(ref val) = self.replica_modifications { -d.field("replica_modifications", val); -} -if let Some(ref val) = self.sse_kms_encrypted_objects { -d.field("sse_kms_encrypted_objects", val); -} -d.finish_non_exhaustive() -} -} - - -///

    A container for filter information for the selection of S3 objects encrypted with Amazon Web Services -/// KMS.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct SseKmsEncryptedObjects { -///

    Specifies whether Amazon S3 replicates objects created with server-side encryption using an -/// Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

    - pub status: SseKmsEncryptedObjectsStatus, -} - -impl fmt::Debug for SseKmsEncryptedObjects { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SseKmsEncryptedObjects"); -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct SseKmsEncryptedObjectsStatus(Cow<'static, str>); - -impl SseKmsEncryptedObjectsStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for SseKmsEncryptedObjectsStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: SseKmsEncryptedObjectsStatus) -> Self { -s.0 -} -} - -impl FromStr for SseKmsEncryptedObjectsStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Start = i64; - -pub type StartAfter = String; - -///

    Container for the stats details.

    -#[derive(Clone, Default, PartialEq)] -pub struct Stats { -///

    The total number of uncompressed object bytes processed.

    - pub bytes_processed: Option, -///

    The total number of bytes of records payload data returned.

    - pub bytes_returned: Option, -///

    The total number of object bytes scanned.

    - pub bytes_scanned: Option, -} - -impl fmt::Debug for Stats { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Stats"); -if let Some(ref val) = self.bytes_processed { -d.field("bytes_processed", val); -} -if let Some(ref val) = self.bytes_returned { -d.field("bytes_returned", val); -} -if let Some(ref val) = self.bytes_scanned { -d.field("bytes_scanned", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Container for the Stats Event.

    -#[derive(Clone, Default, PartialEq)] -pub struct StatsEvent { -///

    The Stats event details.

    - pub details: Option, -} - -impl fmt::Debug for StatsEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("StatsEvent"); -if let Some(ref val) = self.details { -d.field("details", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StorageClass(Cow<'static, str>); - -impl StorageClass { -pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; - -pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; - -pub const GLACIER: &'static str = "GLACIER"; - -pub const GLACIER_IR: &'static str = "GLACIER_IR"; - -pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; - -pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; - -pub const OUTPOSTS: &'static str = "OUTPOSTS"; - -pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; - -pub const SNOW: &'static str = "SNOW"; - -pub const STANDARD: &'static str = "STANDARD"; - -pub const STANDARD_IA: &'static str = "STANDARD_IA"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for StorageClass { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: StorageClass) -> Self { -s.0 -} -} - -impl FromStr for StorageClass { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Specifies data related to access patterns to be collected and made available to analyze -/// the tradeoffs between different storage classes for an Amazon S3 bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct StorageClassAnalysis { -///

    Specifies how data related to the storage class analysis for an Amazon S3 bucket should be -/// exported.

    - pub data_export: Option, -} - -impl fmt::Debug for StorageClassAnalysis { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("StorageClassAnalysis"); -if let Some(ref val) = self.data_export { -d.field("data_export", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Container for data related to the storage class analysis for an Amazon S3 bucket for -/// export.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct StorageClassAnalysisDataExport { -///

    The place to store the data for an analysis.

    - pub destination: AnalyticsExportDestination, -///

    The version of the output schema to use when exporting data. Must be -/// V_1.

    - pub output_schema_version: StorageClassAnalysisSchemaVersion, -} - -impl fmt::Debug for StorageClassAnalysisDataExport { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("StorageClassAnalysisDataExport"); -d.field("destination", &self.destination); -d.field("output_schema_version", &self.output_schema_version); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StorageClassAnalysisSchemaVersion(Cow<'static, str>); - -impl StorageClassAnalysisSchemaVersion { -pub const V_1: &'static str = "V_1"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for StorageClassAnalysisSchemaVersion { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: StorageClassAnalysisSchemaVersion) -> Self { -s.0 -} -} - -impl FromStr for StorageClassAnalysisSchemaVersion { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - - -pub type Suffix = String; - -///

    A container of a key value name pair.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Tag { -///

    Name of the object key.

    - pub key: Option, -///

    Value of the tag.

    - pub value: Option, -} - -impl fmt::Debug for Tag { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Tag"); -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.value { -d.field("value", val); -} -d.finish_non_exhaustive() -} -} - - -pub type TagCount = i32; - -pub type TagSet = List; - -///

    Container for TagSet elements.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Tagging { -///

    A collection for a set of tags

    - pub tag_set: TagSet, -} - -impl fmt::Debug for Tagging { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Tagging"); -d.field("tag_set", &self.tag_set); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct TaggingDirective(Cow<'static, str>); - -impl TaggingDirective { -pub const COPY: &'static str = "COPY"; - -pub const REPLACE: &'static str = "REPLACE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for TaggingDirective { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: TaggingDirective) -> Self { -s.0 -} -} - -impl FromStr for TaggingDirective { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type TaggingHeader = String; - -pub type TargetBucket = String; - -///

    Container for granting information.

    -///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support -/// target grants. For more information, see Permissions server access log delivery in the -/// Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq)] -pub struct TargetGrant { -///

    Container for the person being granted permissions.

    - pub grantee: Option, -///

    Logging permissions assigned to the grantee for the bucket.

    - pub permission: Option, -} - -impl fmt::Debug for TargetGrant { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("TargetGrant"); -if let Some(ref val) = self.grantee { -d.field("grantee", val); -} -if let Some(ref val) = self.permission { -d.field("permission", val); -} -d.finish_non_exhaustive() -} -} - - -pub type TargetGrants = List; - -///

    Amazon S3 key format for log objects. Only one format, PartitionedPrefix or -/// SimplePrefix, is allowed.

    -#[derive(Clone, Default, PartialEq)] -pub struct TargetObjectKeyFormat { -///

    Partitioned S3 key for log objects.

    - pub partitioned_prefix: Option, -///

    To use the simple format for S3 keys for log objects. To specify SimplePrefix format, -/// set SimplePrefix to {}.

    - pub simple_prefix: Option, -} - -impl fmt::Debug for TargetObjectKeyFormat { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("TargetObjectKeyFormat"); -if let Some(ref val) = self.partitioned_prefix { -d.field("partitioned_prefix", val); -} -if let Some(ref val) = self.simple_prefix { -d.field("simple_prefix", val); -} -d.finish_non_exhaustive() -} -} - - -pub type TargetPrefix = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Tier(Cow<'static, str>); - -impl Tier { -pub const BULK: &'static str = "Bulk"; - -pub const EXPEDITED: &'static str = "Expedited"; - -pub const STANDARD: &'static str = "Standard"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for Tier { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: Tier) -> Self { -s.0 -} -} - -impl FromStr for Tier { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by -/// automatically moving data to the most cost-effective storage access tier, without -/// additional operational overhead.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct Tiering { -///

    S3 Intelligent-Tiering access tier. See Storage class -/// for automatically optimizing frequently and infrequently accessed objects for a -/// list of access tiers in the S3 Intelligent-Tiering storage class.

    - pub access_tier: IntelligentTieringAccessTier, -///

    The number of consecutive days of no access after which an object will be eligible to be -/// transitioned to the corresponding tier. The minimum number of days specified for -/// Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least -/// 180 days. The maximum can be up to 2 years (730 days).

    - pub days: IntelligentTieringDays, -} - -impl fmt::Debug for Tiering { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Tiering"); -d.field("access_tier", &self.access_tier); -d.field("days", &self.days); -d.finish_non_exhaustive() -} -} - - -pub type TieringList = List; - -pub type Token = String; - -pub type TokenType = String; - -///

    -/// You have attempted to add more parts than the maximum of 10000 -/// that are allowed for this object. You can use the CopyObject operation -/// to copy this object to another and then add more data to the newly copied object. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct TooManyParts { -} - -impl fmt::Debug for TooManyParts { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("TooManyParts"); -d.finish_non_exhaustive() -} -} - - -pub type TopicArn = String; - -///

    A container for specifying the configuration for publication of messages to an Amazon -/// Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct TopicConfiguration { -///

    The Amazon S3 bucket event about which to send notifications. For more information, see -/// Supported -/// Event Types in the Amazon S3 User Guide.

    - pub events: EventList, - pub filter: Option, - pub id: Option, -///

    The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message -/// when it detects events of the specified type.

    - pub topic_arn: TopicArn, -} - -impl fmt::Debug for TopicConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("TopicConfiguration"); -d.field("events", &self.events); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.field("topic_arn", &self.topic_arn); -d.finish_non_exhaustive() -} -} - - -pub type TopicConfigurationList = List; - -///

    Specifies when an object transitions to a specified storage class. For more information -/// about Amazon S3 lifecycle configuration rules, see Transitioning -/// Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Transition { -///

    Indicates when objects are transitioned to the specified storage class. The date value -/// must be in ISO 8601 format. The time is always midnight UTC.

    - pub date: Option, -///

    Indicates the number of days after creation when objects are transitioned to the -/// specified storage class. If the specified storage class is INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are -/// 0 or positive integers. If the specified storage class is STANDARD_IA -/// or ONEZONE_IA, valid values are positive integers greater than 30. Be -/// aware that some storage classes have a minimum storage duration and that you're charged for -/// transitioning objects before their minimum storage duration. For more information, see -/// -/// Constraints and considerations for transitions in the -/// Amazon S3 User Guide.

    - pub days: Option, -///

    The storage class to which you want the object to transition.

    - pub storage_class: Option, -} - -impl fmt::Debug for Transition { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Transition"); -if let Some(ref val) = self.date { -d.field("date", val); -} -if let Some(ref val) = self.days { -d.field("days", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct TransitionDefaultMinimumObjectSize(Cow<'static, str>); - -impl TransitionDefaultMinimumObjectSize { -pub const ALL_STORAGE_CLASSES_128K: &'static str = "all_storage_classes_128K"; - -pub const VARIES_BY_STORAGE_CLASS: &'static str = "varies_by_storage_class"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for TransitionDefaultMinimumObjectSize { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: TransitionDefaultMinimumObjectSize) -> Self { -s.0 -} -} - -impl FromStr for TransitionDefaultMinimumObjectSize { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type TransitionList = List; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct TransitionStorageClass(Cow<'static, str>); - -impl TransitionStorageClass { -pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; - -pub const GLACIER: &'static str = "GLACIER"; - -pub const GLACIER_IR: &'static str = "GLACIER_IR"; - -pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; - -pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; - -pub const STANDARD_IA: &'static str = "STANDARD_IA"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for TransitionStorageClass { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: TransitionStorageClass) -> Self { -s.0 -} -} - -impl FromStr for TransitionStorageClass { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Type(Cow<'static, str>); - -impl Type { -pub const AMAZON_CUSTOMER_BY_EMAIL: &'static str = "AmazonCustomerByEmail"; - -pub const CANONICAL_USER: &'static str = "CanonicalUser"; - -pub const GROUP: &'static str = "Group"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for Type { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: Type) -> Self { -s.0 -} -} - -impl FromStr for Type { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type URI = String; - -pub type UploadIdMarker = String; - -#[derive(Clone, PartialEq)] -pub struct UploadPartCopyInput { -///

    The bucket name.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -/// -///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, -/// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    -///
    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Specifies the source object for the copy operation. You specify the value in one of two -/// formats, depending on whether you want to access the source object through an access point:

    -///
      -///
    • -///

      For objects not accessed through an access point, specify the name of the source bucket -/// and key of the source object, separated by a slash (/). For example, to copy the -/// object reports/january.pdf from the bucket -/// awsexamplebucket, use awsexamplebucket/reports/january.pdf. -/// The value must be URL-encoded.

      -///
    • -///
    • -///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      -/// -///
        -///
      • -///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        -///
      • -///
      • -///

        Access points are not supported by directory buckets.

        -///
      • -///
      -///
      -///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      -///
    • -///
    -///

    If your bucket has versioning enabled, you could have multiple versions of the same -/// object. By default, x-amz-copy-source identifies the current version of the -/// source object to copy. To copy a specific version of the source object to copy, append -/// ?versionId=<version-id> to the x-amz-copy-source request -/// header (for example, x-amz-copy-source: -/// /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

    -///

    If the current version is a delete marker and you don't specify a versionId in the -/// x-amz-copy-source request header, Amazon S3 returns a 404 Not Found -/// error, because the object does not exist. If you specify versionId in the -/// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an -/// HTTP 400 Bad Request error, because you are not allowed to specify a delete -/// marker as a version for the x-amz-copy-source.

    -/// -///

    -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets.

    -///
    - pub copy_source: CopySource, -///

    Copies the object if its entity tag (ETag) matches the specified tag.

    -///

    If both of the x-amz-copy-source-if-match and -/// x-amz-copy-source-if-unmodified-since headers are present in the request as -/// follows:

    -///

    -/// x-amz-copy-source-if-match condition evaluates to true, -/// and;

    -///

    -/// x-amz-copy-source-if-unmodified-since condition evaluates to -/// false;

    -///

    Amazon S3 returns 200 OK and copies the data. -///

    - pub copy_source_if_match: Option, -///

    Copies the object if it has been modified since the specified time.

    -///

    If both of the x-amz-copy-source-if-none-match and -/// x-amz-copy-source-if-modified-since headers are present in the request as -/// follows:

    -///

    -/// x-amz-copy-source-if-none-match condition evaluates to false, -/// and;

    -///

    -/// x-amz-copy-source-if-modified-since condition evaluates to -/// true;

    -///

    Amazon S3 returns 412 Precondition Failed response code. -///

    - pub copy_source_if_modified_since: Option, -///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    -///

    If both of the x-amz-copy-source-if-none-match and -/// x-amz-copy-source-if-modified-since headers are present in the request as -/// follows:

    -///

    -/// x-amz-copy-source-if-none-match condition evaluates to false, -/// and;

    -///

    -/// x-amz-copy-source-if-modified-since condition evaluates to -/// true;

    -///

    Amazon S3 returns 412 Precondition Failed response code. -///

    - pub copy_source_if_none_match: Option, -///

    Copies the object if it hasn't been modified since the specified time.

    -///

    If both of the x-amz-copy-source-if-match and -/// x-amz-copy-source-if-unmodified-since headers are present in the request as -/// follows:

    -///

    -/// x-amz-copy-source-if-match condition evaluates to true, -/// and;

    -///

    -/// x-amz-copy-source-if-unmodified-since condition evaluates to -/// false;

    -///

    Amazon S3 returns 200 OK and copies the data. -///

    - pub copy_source_if_unmodified_since: Option, -///

    The range of bytes to copy from the source object. The range value must use the form -/// bytes=first-last, where the first and last are the zero-based byte offsets to copy. For -/// example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You -/// can copy a range only if the source object is greater than 5 MB.

    - pub copy_source_range: Option, -///

    Specifies the algorithm to use when decrypting the source object (for example, -/// AES256).

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    - pub copy_source_sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source -/// object. The encryption key provided in this header must be one that was used when the -/// source object was created.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    - pub copy_source_sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    - pub copy_source_sse_customer_key_md5: Option, -///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_source_bucket_owner: Option, -///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, -///

    Part number of part being copied. This is a positive integer between 1 and -/// 10,000.

    - pub part_number: PartNumber, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header. This must be the -/// same encryption key specified in the initiate multipart upload request.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    - pub sse_customer_key_md5: Option, -///

    Upload ID identifying the multipart upload whose part is being copied.

    - pub upload_id: MultipartUploadId, -} - -impl fmt::Debug for UploadPartCopyInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("UploadPartCopyInput"); -d.field("bucket", &self.bucket); -d.field("copy_source", &self.copy_source); -if let Some(ref val) = self.copy_source_if_match { -d.field("copy_source_if_match", val); -} -if let Some(ref val) = self.copy_source_if_modified_since { -d.field("copy_source_if_modified_since", val); -} -if let Some(ref val) = self.copy_source_if_none_match { -d.field("copy_source_if_none_match", val); -} -if let Some(ref val) = self.copy_source_if_unmodified_since { -d.field("copy_source_if_unmodified_since", val); -} -if let Some(ref val) = self.copy_source_range { -d.field("copy_source_range", val); -} -if let Some(ref val) = self.copy_source_sse_customer_algorithm { -d.field("copy_source_sse_customer_algorithm", val); -} -if let Some(ref val) = self.copy_source_sse_customer_key { -d.field("copy_source_sse_customer_key", val); -} -if let Some(ref val) = self.copy_source_sse_customer_key_md5 { -d.field("copy_source_sse_customer_key_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.expected_source_bucket_owner { -d.field("expected_source_bucket_owner", val); -} -d.field("key", &self.key); -d.field("part_number", &self.part_number); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} -} - -impl UploadPartCopyInput { -#[must_use] -pub fn builder() -> builders::UploadPartCopyInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct UploadPartCopyOutput { -///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    Container for all response elements.

    - pub copy_part_result: Option, -///

    The version of the source object that was copied, if you have enabled versioning on the -/// source bucket.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    - pub copy_source_version_id: Option, - pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms).

    - pub server_side_encryption: Option, -} - -impl fmt::Debug for UploadPartCopyOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("UploadPartCopyOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.copy_part_result { -d.field("copy_part_result", val); -} -if let Some(ref val) = self.copy_source_version_id { -d.field("copy_source_version_id", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Default)] -pub struct UploadPartInput { -///

    Object data.

    - pub body: Option, -///

    The name of the bucket to which the multipart upload was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    -///

    This checksum algorithm must be the same for all parts and it match the checksum value -/// supplied in the CreateMultipartUpload request.

    - pub checksum_algorithm: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be -/// determined automatically.

    - pub content_length: Option, -///

    The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated -/// when using the command from the CLI. This parameter is required if object lock parameters -/// are specified.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, -///

    Part number of part being uploaded. This is a positive integer between 1 and -/// 10,000.

    - pub part_number: PartNumber, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header. This must be the -/// same encryption key specified in the initiate multipart upload request.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Upload ID identifying the multipart upload whose part is being uploaded.

    - pub upload_id: MultipartUploadId, -} - -impl fmt::Debug for UploadPartInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("UploadPartInput"); -if let Some(ref val) = self.body { -d.field("body", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.content_length { -d.field("content_length", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -d.field("part_number", &self.part_number); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} -} - -impl UploadPartInput { -#[must_use] -pub fn builder() -> builders::UploadPartInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct UploadPartOutput { -///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Entity tag for the uploaded object.

    - pub e_tag: Option, - pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms).

    - pub server_side_encryption: Option, -} - -impl fmt::Debug for UploadPartOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("UploadPartOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -d.finish_non_exhaustive() -} -} - - -pub type UserMetadata = List; - -pub type Value = String; - -pub type VersionCount = i32; - -pub type VersionIdMarker = String; - -///

    Describes the versioning state of an Amazon S3 bucket. For more information, see PUT -/// Bucket versioning in the Amazon S3 API Reference.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct VersioningConfiguration { -///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This -/// element is only returned if the bucket has been configured with MFA delete. If the bucket -/// has never been so configured, this element is not returned.

    - pub mfa_delete: Option, -///

    The versioning state of the bucket.

    - pub status: Option, -} - -impl fmt::Debug for VersioningConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("VersioningConfiguration"); -if let Some(ref val) = self.mfa_delete { -d.field("mfa_delete", val); -} -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies website configuration parameters for an Amazon S3 bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct WebsiteConfiguration { -///

    The name of the error document for the website.

    - pub error_document: Option, -///

    The name of the index document for the website.

    - pub index_document: Option, -///

    The redirect behavior for every request to this bucket's website endpoint.

    -/// -///

    If you specify this property, you can't specify any other property.

    -///
    - pub redirect_all_requests_to: Option, -///

    Rules that define when a redirect is applied and the redirect behavior.

    - pub routing_rules: Option, -} - -impl fmt::Debug for WebsiteConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("WebsiteConfiguration"); -if let Some(ref val) = self.error_document { -d.field("error_document", val); -} -if let Some(ref val) = self.index_document { -d.field("index_document", val); -} -if let Some(ref val) = self.redirect_all_requests_to { -d.field("redirect_all_requests_to", val); -} -if let Some(ref val) = self.routing_rules { -d.field("routing_rules", val); -} -d.finish_non_exhaustive() -} -} - - -pub type WebsiteRedirectLocation = String; - -#[derive(Default)] -pub struct WriteGetObjectResponseInput { -///

    Indicates that a range of bytes was specified.

    - pub accept_ranges: Option, -///

    The object data.

    - pub body: Option, -///

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side -/// encryption with Amazon Web Services KMS (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 -/// checksum of the object returned by the Object Lambda function. This may not match the -/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values -/// only when the original GetObject request required checksum validation. For -/// more information about checksums, see Checking object -/// integrity in the Amazon S3 User Guide.

    -///

    Only one checksum header can be specified at a time. If you supply multiple checksum -/// headers, this request will fail.

    -///

    - pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C -/// checksum of the object returned by the Object Lambda function. This may not match the -/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values -/// only when the original GetObject request required checksum validation. For -/// more information about checksums, see Checking object -/// integrity in the Amazon S3 User Guide.

    -///

    Only one checksum header can be specified at a time. If you supply multiple checksum -/// headers, this request will fail.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 -/// digest of the object returned by the Object Lambda function. This may not match the -/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values -/// only when the original GetObject request required checksum validation. For -/// more information about checksums, see Checking object -/// integrity in the Amazon S3 User Guide.

    -///

    Only one checksum header can be specified at a time. If you supply multiple checksum -/// headers, this request will fail.

    - pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 -/// digest of the object returned by the Object Lambda function. This may not match the -/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values -/// only when the original GetObject request required checksum validation. For -/// more information about checksums, see Checking object -/// integrity in the Amazon S3 User Guide.

    -///

    Only one checksum header can be specified at a time. If you supply multiple checksum -/// headers, this request will fail.

    - pub checksum_sha256: Option, -///

    Specifies presentational information for the object.

    - pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    The size of the content body in bytes.

    - pub content_length: Option, -///

    The portion of the object returned in the response.

    - pub content_range: Option, -///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, -///

    Specifies whether an object stored in Amazon S3 is (true) or is not -/// (false) a delete marker. To learn more about delete markers, see Working with delete markers.

    - pub delete_marker: Option, -///

    An opaque identifier assigned by a web server to a specific version of a resource found -/// at a URL.

    - pub e_tag: Option, -///

    A string that uniquely identifies an error condition. Returned in the <Code> tag -/// of the error XML response for a corresponding GetObject call. Cannot be used -/// with a successful StatusCode header or when the transformed object is provided -/// in the body. All error codes from S3 are sentence-cased. The regular expression (regex) -/// value is "^[A-Z][a-zA-Z]+$".

    - pub error_code: Option, -///

    Contains a generic description of the error condition. Returned in the <Message> -/// tag of the error XML response for a corresponding GetObject call. Cannot be -/// used with a successful StatusCode header or when the transformed object is -/// provided in body.

    - pub error_message: Option, -///

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes -/// this header. It includes the expiry-date and rule-id key-value -/// pairs that provide the object expiration information. The value of the rule-id -/// is URL-encoded.

    - pub expiration: Option, -///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, -///

    The date and time that the object was last modified.

    - pub last_modified: Option, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    Set to the number of metadata entries not returned in x-amz-meta headers. -/// This can happen if you create metadata using an API like SOAP that supports more flexible -/// metadata than the REST API. For example, using SOAP, you can create metadata whose values -/// are not legal HTTP headers.

    - pub missing_meta: Option, -///

    Indicates whether an object stored in Amazon S3 has an active legal hold.

    - pub object_lock_legal_hold_status: Option, -///

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information -/// about S3 Object Lock, see Object Lock.

    - pub object_lock_mode: Option, -///

    The date and time when Object Lock is configured to expire.

    - pub object_lock_retain_until_date: Option, -///

    The count of parts this object has.

    - pub parts_count: Option, -///

    Indicates if request involves bucket that is either a source or destination in a -/// Replication rule. For more information about S3 Replication, see Replication.

    - pub replication_status: Option, - pub request_charged: Option, -///

    Route prefix to the HTTP URL generated.

    - pub request_route: RequestRoute, -///

    A single use encrypted token that maps WriteGetObjectResponse to the end -/// user GetObject request.

    - pub request_token: RequestToken, -///

    Provides information about object restoration operation and expiration time of the -/// restored object copy.

    - pub restore: Option, -///

    Encryption algorithm used if server-side encryption with a customer-provided encryption -/// key was specified for object stored in Amazon S3.

    - pub sse_customer_algorithm: Option, -///

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data -/// stored in S3. For more information, see Protecting data -/// using server-side encryption with customer-provided encryption keys -/// (SSE-C).

    - pub sse_customer_key_md5: Option, -///

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key -/// Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in -/// Amazon S3 object.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when storing requested object in Amazon S3 (for -/// example, AES256, aws:kms).

    - pub server_side_encryption: Option, -///

    The integer status code for an HTTP response of a corresponding GetObject -/// request. The following is a list of status codes.

    -///
      -///
    • -///

      -/// 200 - OK -///

      -///
    • -///
    • -///

      -/// 206 - Partial Content -///

      -///
    • -///
    • -///

      -/// 304 - Not Modified -///

      -///
    • -///
    • -///

      -/// 400 - Bad Request -///

      -///
    • -///
    • -///

      -/// 401 - Unauthorized -///

      -///
    • -///
    • -///

      -/// 403 - Forbidden -///

      -///
    • -///
    • -///

      -/// 404 - Not Found -///

      -///
    • -///
    • -///

      -/// 405 - Method Not Allowed -///

      -///
    • -///
    • -///

      -/// 409 - Conflict -///

      -///
    • -///
    • -///

      -/// 411 - Length Required -///

      -///
    • -///
    • -///

      -/// 412 - Precondition Failed -///

      -///
    • -///
    • -///

      -/// 416 - Range Not Satisfiable -///

      -///
    • -///
    • -///

      -/// 500 - Internal Server Error -///

      -///
    • -///
    • -///

      -/// 503 - Service Unavailable -///

      -///
    • -///
    - pub status_code: Option, -///

    Provides storage class information of the object. Amazon S3 returns this header for all -/// objects except for S3 Standard storage class objects.

    -///

    For more information, see Storage Classes.

    - pub storage_class: Option, -///

    The number of tags, if any, on the object.

    - pub tag_count: Option, -///

    An ID used to reference a specific version of the object.

    - pub version_id: Option, -} - -impl fmt::Debug for WriteGetObjectResponseInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("WriteGetObjectResponseInput"); -if let Some(ref val) = self.accept_ranges { -d.field("accept_ranges", val); -} -if let Some(ref val) = self.body { -d.field("body", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_length { -d.field("content_length", val); -} -if let Some(ref val) = self.content_range { -d.field("content_range", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.error_code { -d.field("error_code", val); -} -if let Some(ref val) = self.error_message { -d.field("error_message", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.missing_meta { -d.field("missing_meta", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.parts_count { -d.field("parts_count", val); -} -if let Some(ref val) = self.replication_status { -d.field("replication_status", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.field("request_route", &self.request_route); -d.field("request_token", &self.request_token); -if let Some(ref val) = self.restore { -d.field("restore", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.status_code { -d.field("status_code", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tag_count { -d.field("tag_count", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl WriteGetObjectResponseInput { -#[must_use] -pub fn builder() -> builders::WriteGetObjectResponseInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct WriteGetObjectResponseOutput { -} - -impl fmt::Debug for WriteGetObjectResponseOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("WriteGetObjectResponseOutput"); -d.finish_non_exhaustive() -} -} - - -pub type WriteOffsetBytes = i64; - -pub type Years = i32; - -#[cfg(test)] -mod tests { -use super::*; - -fn require_default() {} -fn require_clone() {} - -#[test] -fn test_default() { -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -} -#[test] -fn test_clone() { -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -} -} -pub mod builders { -#![allow(clippy::missing_errors_doc)] - -use super::*; -pub use super::build_error::BuildError; - -/// A builder for [`AbortMultipartUploadInput`] -#[derive(Default)] -pub struct AbortMultipartUploadInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -if_match_initiated_time: Option, - -key: Option, - -request_payer: Option, - -upload_id: Option, - -} - -impl AbortMultipartUploadInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_if_match_initiated_time(&mut self, field: Option) -> &mut Self { - self.if_match_initiated_time = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn if_match_initiated_time(mut self, field: Option) -> Self { - self.if_match_initiated_time = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match_initiated_time = self.if_match_initiated_time; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(AbortMultipartUploadInput { -bucket, -expected_bucket_owner, -if_match_initiated_time, -key, -request_payer, -upload_id, -}) -} - -} - - -/// A builder for [`CompleteMultipartUploadInput`] -#[derive(Default)] -pub struct CompleteMultipartUploadInputBuilder { -bucket: Option, - -checksum_crc32: Option, - -checksum_crc32c: Option, - -checksum_crc64nvme: Option, - -checksum_sha1: Option, - -checksum_sha256: Option, - -checksum_type: Option, - -expected_bucket_owner: Option, - -if_match: Option, - -if_none_match: Option, - -key: Option, - -mpu_object_size: Option, - -multipart_upload: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -upload_id: Option, - -} - -impl CompleteMultipartUploadInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} - -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self -} - -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self -} - -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} - -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} - -pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { - self.checksum_type = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} - -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_mpu_object_size(&mut self, field: Option) -> &mut Self { - self.mpu_object_size = field; -self -} - -pub fn set_multipart_upload(&mut self, field: Option) -> &mut Self { - self.multipart_upload = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self -} - -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self -} - -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self -} - -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self -} - -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} - -#[must_use] -pub fn checksum_type(mut self, field: Option) -> Self { - self.checksum_type = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} - -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn mpu_object_size(mut self, field: Option) -> Self { - self.mpu_object_size = field; -self -} - -#[must_use] -pub fn multipart_upload(mut self, field: Option) -> Self { - self.multipart_upload = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let checksum_type = self.checksum_type; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match = self.if_match; -let if_none_match = self.if_none_match; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let mpu_object_size = self.mpu_object_size; -let multipart_upload = self.multipart_upload; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(CompleteMultipartUploadInput { -bucket, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -checksum_type, -expected_bucket_owner, -if_match, -if_none_match, -key, -mpu_object_size, -multipart_upload, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - -} - - -/// A builder for [`CopyObjectInput`] -#[derive(Default)] -pub struct CopyObjectInputBuilder { -acl: Option, - -bucket: Option, - -bucket_key_enabled: Option, - -cache_control: Option, - -checksum_algorithm: Option, - -content_disposition: Option, - -content_encoding: Option, - -content_language: Option, - -content_type: Option, - -copy_source: Option, - -copy_source_if_match: Option, - -copy_source_if_modified_since: Option, - -copy_source_if_none_match: Option, - -copy_source_if_unmodified_since: Option, - -copy_source_sse_customer_algorithm: Option, - -copy_source_sse_customer_key: Option, - -copy_source_sse_customer_key_md5: Option, - -expected_bucket_owner: Option, - -expected_source_bucket_owner: Option, - -expires: Option, - -grant_full_control: Option, - -grant_read: Option, - -grant_read_acp: Option, - -grant_write_acp: Option, - -key: Option, - -metadata: Option, - -metadata_directive: Option, - -object_lock_legal_hold_status: Option, - -object_lock_mode: Option, - -object_lock_retain_until_date: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -ssekms_encryption_context: Option, - -ssekms_key_id: Option, - -server_side_encryption: Option, - -storage_class: Option, - -tagging: Option, - -tagging_directive: Option, - -website_redirect_location: Option, - -} - -impl CopyObjectInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} - -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self -} - -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self -} - -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} - -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} - -pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { - self.copy_source = Some(field); -self -} - -pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_match = field; -self -} - -pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_modified_since = field; -self -} - -pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_none_match = field; -self -} - -pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_unmodified_since = field; -self -} - -pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_algorithm = field; -self -} - -pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key = field; -self -} - -pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_source_bucket_owner = field; -self -} - -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} - -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} - -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} - -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} - -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self -} - -pub fn set_metadata_directive(&mut self, field: Option) -> &mut Self { - self.metadata_directive = field; -self -} - -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self -} - -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self -} - -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} - -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} - -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} - -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self -} - -pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; -self -} - -pub fn set_tagging_directive(&mut self, field: Option) -> &mut Self { - self.tagging_directive = field; -self -} - -pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; -self -} - -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} - -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self -} - -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} - -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self -} - -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self -} - -#[must_use] -pub fn copy_source(mut self, field: CopySource) -> Self { - self.copy_source = Some(field); -self -} - -#[must_use] -pub fn copy_source_if_match(mut self, field: Option) -> Self { - self.copy_source_if_match = field; -self -} - -#[must_use] -pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { - self.copy_source_if_modified_since = field; -self -} - -#[must_use] -pub fn copy_source_if_none_match(mut self, field: Option) -> Self { - self.copy_source_if_none_match = field; -self -} - -#[must_use] -pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { - self.copy_source_if_unmodified_since = field; -self -} - -#[must_use] -pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { - self.copy_source_sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key = field; -self -} - -#[must_use] -pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { - self.expected_source_bucket_owner = field; -self -} - -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self -} - -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} - -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} - -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} - -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} - -#[must_use] -pub fn metadata_directive(mut self, field: Option) -> Self { - self.metadata_directive = field; -self -} - -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} - -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} - -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; -self -} - -#[must_use] -pub fn tagging_directive(mut self, field: Option) -> Self { - self.tagging_directive = field; -self -} - -#[must_use] -pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_algorithm = self.checksum_algorithm; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_type = self.content_type; -let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; -let copy_source_if_match = self.copy_source_if_match; -let copy_source_if_modified_since = self.copy_source_if_modified_since; -let copy_source_if_none_match = self.copy_source_if_none_match; -let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; -let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; -let copy_source_sse_customer_key = self.copy_source_sse_customer_key; -let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let expected_source_bucket_owner = self.expected_source_bucket_owner; -let expires = self.expires; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write_acp = self.grant_write_acp; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let metadata = self.metadata; -let metadata_directive = self.metadata_directive; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let storage_class = self.storage_class; -let tagging = self.tagging; -let tagging_directive = self.tagging_directive; -let website_redirect_location = self.website_redirect_location; -Ok(CopyObjectInput { -acl, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -content_disposition, -content_encoding, -content_language, -content_type, -copy_source, -copy_source_if_match, -copy_source_if_modified_since, -copy_source_if_none_match, -copy_source_if_unmodified_since, -copy_source_sse_customer_algorithm, -copy_source_sse_customer_key, -copy_source_sse_customer_key_md5, -expected_bucket_owner, -expected_source_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -key, -metadata, -metadata_directive, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -tagging_directive, -website_redirect_location, -}) -} - -} - - -/// A builder for [`CreateBucketInput`] -#[derive(Default)] -pub struct CreateBucketInputBuilder { -acl: Option, - -bucket: Option, - -create_bucket_configuration: Option, - -grant_full_control: Option, - -grant_read: Option, - -grant_read_acp: Option, - -grant_write: Option, - -grant_write_acp: Option, - -object_lock_enabled_for_bucket: Option, - -object_ownership: Option, - -} - -impl CreateBucketInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_create_bucket_configuration(&mut self, field: Option) -> &mut Self { - self.create_bucket_configuration = field; -self -} - -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} - -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} - -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} - -pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; -self -} - -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} - -pub fn set_object_lock_enabled_for_bucket(&mut self, field: Option) -> &mut Self { - self.object_lock_enabled_for_bucket = field; -self -} - -pub fn set_object_ownership(&mut self, field: Option) -> &mut Self { - self.object_ownership = field; -self -} - -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn create_bucket_configuration(mut self, field: Option) -> Self { - self.create_bucket_configuration = field; -self -} - -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} - -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} - -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} - -#[must_use] -pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; -self -} - -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} - -#[must_use] -pub fn object_lock_enabled_for_bucket(mut self, field: Option) -> Self { - self.object_lock_enabled_for_bucket = field; -self -} - -#[must_use] -pub fn object_ownership(mut self, field: Option) -> Self { - self.object_ownership = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let create_bucket_configuration = self.create_bucket_configuration; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write = self.grant_write; -let grant_write_acp = self.grant_write_acp; -let object_lock_enabled_for_bucket = self.object_lock_enabled_for_bucket; -let object_ownership = self.object_ownership; -Ok(CreateBucketInput { -acl, -bucket, -create_bucket_configuration, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -object_lock_enabled_for_bucket, -object_ownership, -}) -} - -} - - -/// A builder for [`CreateBucketMetadataTableConfigurationInput`] -#[derive(Default)] -pub struct CreateBucketMetadataTableConfigurationInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -metadata_table_configuration: Option, - -} - -impl CreateBucketMetadataTableConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_metadata_table_configuration(&mut self, field: MetadataTableConfiguration) -> &mut Self { - self.metadata_table_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn metadata_table_configuration(mut self, field: MetadataTableConfiguration) -> Self { - self.metadata_table_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let metadata_table_configuration = self.metadata_table_configuration.ok_or_else(|| BuildError::missing_field("metadata_table_configuration"))?; -Ok(CreateBucketMetadataTableConfigurationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -metadata_table_configuration, -}) -} - -} - - -/// A builder for [`CreateMultipartUploadInput`] -#[derive(Default)] -pub struct CreateMultipartUploadInputBuilder { -acl: Option, - -bucket: Option, - -bucket_key_enabled: Option, - -cache_control: Option, - -checksum_algorithm: Option, - -checksum_type: Option, - -content_disposition: Option, - -content_encoding: Option, - -content_language: Option, - -content_type: Option, - -expected_bucket_owner: Option, - -expires: Option, - -grant_full_control: Option, - -grant_read: Option, - -grant_read_acp: Option, - -grant_write_acp: Option, - -key: Option, - -metadata: Option, - -object_lock_legal_hold_status: Option, - -object_lock_mode: Option, - -object_lock_retain_until_date: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -ssekms_encryption_context: Option, - -ssekms_key_id: Option, - -server_side_encryption: Option, - -storage_class: Option, - -tagging: Option, - -website_redirect_location: Option, - -} - -impl CreateMultipartUploadInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} - -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { - self.checksum_type = field; -self -} - -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self -} - -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self -} - -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} - -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} - -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} - -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} - -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} - -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self -} - -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self -} - -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self -} - -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} - -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} - -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} - -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self -} - -pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; -self -} - -pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; -self -} - -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} - -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn checksum_type(mut self, field: Option) -> Self { - self.checksum_type = field; -self -} - -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self -} - -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} - -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self -} - -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self -} - -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} - -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} - -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} - -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} - -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} - -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} - -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; -self -} - -#[must_use] -pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_algorithm = self.checksum_algorithm; -let checksum_type = self.checksum_type; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_type = self.content_type; -let expected_bucket_owner = self.expected_bucket_owner; -let expires = self.expires; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write_acp = self.grant_write_acp; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let metadata = self.metadata; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let storage_class = self.storage_class; -let tagging = self.tagging; -let website_redirect_location = self.website_redirect_location; -Ok(CreateMultipartUploadInput { -acl, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_type, -content_disposition, -content_encoding, -content_language, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -website_redirect_location, -}) -} - -} - - -/// A builder for [`CreateSessionInput`] -#[derive(Default)] -pub struct CreateSessionInputBuilder { -bucket: Option, - -bucket_key_enabled: Option, - -ssekms_encryption_context: Option, - -ssekms_key_id: Option, - -server_side_encryption: Option, - -session_mode: Option, - -} - -impl CreateSessionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} - -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} - -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} - -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} - -pub fn set_session_mode(&mut self, field: Option) -> &mut Self { - self.session_mode = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} - -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn session_mode(mut self, field: Option) -> Self { - self.session_mode = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let session_mode = self.session_mode; -Ok(CreateSessionInput { -bucket, -bucket_key_enabled, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -session_mode, -}) -} - -} - - -/// A builder for [`DeleteBucketInput`] -#[derive(Default)] -pub struct DeleteBucketInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketAnalyticsConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketAnalyticsConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -} - -impl DeleteBucketAnalyticsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(DeleteBucketAnalyticsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - -} - - -/// A builder for [`DeleteBucketCorsInput`] -#[derive(Default)] -pub struct DeleteBucketCorsInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketCorsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketCorsInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketEncryptionInput`] -#[derive(Default)] -pub struct DeleteBucketEncryptionInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketEncryptionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketEncryptionInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketIntelligentTieringConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketIntelligentTieringConfigurationInputBuilder { -bucket: Option, - -id: Option, - -} - -impl DeleteBucketIntelligentTieringConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(DeleteBucketIntelligentTieringConfigurationInput { -bucket, -id, -}) -} - -} - - -/// A builder for [`DeleteBucketInventoryConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketInventoryConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -} - -impl DeleteBucketInventoryConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(DeleteBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - -} - - -/// A builder for [`DeleteBucketLifecycleInput`] -#[derive(Default)] -pub struct DeleteBucketLifecycleInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketLifecycleInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketLifecycleInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketMetadataTableConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketMetadataTableConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketMetadataTableConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketMetadataTableConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketMetricsConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketMetricsConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -} - -impl DeleteBucketMetricsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(DeleteBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - -} - - -/// A builder for [`DeleteBucketOwnershipControlsInput`] -#[derive(Default)] -pub struct DeleteBucketOwnershipControlsInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketOwnershipControlsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketOwnershipControlsInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketPolicyInput`] -#[derive(Default)] -pub struct DeleteBucketPolicyInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketPolicyInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketPolicyInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketReplicationInput`] -#[derive(Default)] -pub struct DeleteBucketReplicationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketReplicationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketReplicationInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketTaggingInput`] -#[derive(Default)] -pub struct DeleteBucketTaggingInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketTaggingInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteBucketWebsiteInput`] -#[derive(Default)] -pub struct DeleteBucketWebsiteInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeleteBucketWebsiteInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketWebsiteInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`DeleteObjectInput`] -#[derive(Default)] -pub struct DeleteObjectInputBuilder { -bucket: Option, - -bypass_governance_retention: Option, - -expected_bucket_owner: Option, - -if_match: Option, - -if_match_last_modified_time: Option, - -if_match_size: Option, - -key: Option, - -mfa: Option, - -request_payer: Option, - -version_id: Option, - -} - -impl DeleteObjectInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} - -pub fn set_if_match_last_modified_time(&mut self, field: Option) -> &mut Self { - self.if_match_last_modified_time = field; -self -} - -pub fn set_if_match_size(&mut self, field: Option) -> &mut Self { - self.if_match_size = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} - -#[must_use] -pub fn if_match_last_modified_time(mut self, field: Option) -> Self { - self.if_match_last_modified_time = field; -self -} - -#[must_use] -pub fn if_match_size(mut self, field: Option) -> Self { - self.if_match_size = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bypass_governance_retention = self.bypass_governance_retention; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match = self.if_match; -let if_match_last_modified_time = self.if_match_last_modified_time; -let if_match_size = self.if_match_size; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let mfa = self.mfa; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(DeleteObjectInput { -bucket, -bypass_governance_retention, -expected_bucket_owner, -if_match, -if_match_last_modified_time, -if_match_size, -key, -mfa, -request_payer, -version_id, -}) -} - -} - - -/// A builder for [`DeleteObjectTaggingInput`] -#[derive(Default)] -pub struct DeleteObjectTaggingInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -version_id: Option, - -} - -impl DeleteObjectTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let version_id = self.version_id; -Ok(DeleteObjectTaggingInput { -bucket, -expected_bucket_owner, -key, -version_id, -}) -} - -} - - -/// A builder for [`DeleteObjectsInput`] -#[derive(Default)] -pub struct DeleteObjectsInputBuilder { -bucket: Option, - -bypass_governance_retention: Option, - -checksum_algorithm: Option, - -delete: Option, - -expected_bucket_owner: Option, - -mfa: Option, - -request_payer: Option, - -} - -impl DeleteObjectsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_delete(&mut self, field: Delete) -> &mut Self { - self.delete = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn delete(mut self, field: Delete) -> Self { - self.delete = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bypass_governance_retention = self.bypass_governance_retention; -let checksum_algorithm = self.checksum_algorithm; -let delete = self.delete.ok_or_else(|| BuildError::missing_field("delete"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let mfa = self.mfa; -let request_payer = self.request_payer; -Ok(DeleteObjectsInput { -bucket, -bypass_governance_retention, -checksum_algorithm, -delete, -expected_bucket_owner, -mfa, -request_payer, -}) -} - -} - - -/// A builder for [`DeletePublicAccessBlockInput`] -#[derive(Default)] -pub struct DeletePublicAccessBlockInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl DeletePublicAccessBlockInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeletePublicAccessBlockInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketAccelerateConfigurationInput`] -#[derive(Default)] -pub struct GetBucketAccelerateConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -request_payer: Option, - -} - -impl GetBucketAccelerateConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let request_payer = self.request_payer; -Ok(GetBucketAccelerateConfigurationInput { -bucket, -expected_bucket_owner, -request_payer, -}) -} - -} - - -/// A builder for [`GetBucketAclInput`] -#[derive(Default)] -pub struct GetBucketAclInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketAclInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketAclInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketAnalyticsConfigurationInput`] -#[derive(Default)] -pub struct GetBucketAnalyticsConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -} - -impl GetBucketAnalyticsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(GetBucketAnalyticsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - -} - - -/// A builder for [`GetBucketCorsInput`] -#[derive(Default)] -pub struct GetBucketCorsInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketCorsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketCorsInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketEncryptionInput`] -#[derive(Default)] -pub struct GetBucketEncryptionInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketEncryptionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketEncryptionInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketIntelligentTieringConfigurationInput`] -#[derive(Default)] -pub struct GetBucketIntelligentTieringConfigurationInputBuilder { -bucket: Option, - -id: Option, - -} - -impl GetBucketIntelligentTieringConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(GetBucketIntelligentTieringConfigurationInput { -bucket, -id, -}) -} - -} - - -/// A builder for [`GetBucketInventoryConfigurationInput`] -#[derive(Default)] -pub struct GetBucketInventoryConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -} - -impl GetBucketInventoryConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(GetBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - -} - - -/// A builder for [`GetBucketLifecycleConfigurationInput`] -#[derive(Default)] -pub struct GetBucketLifecycleConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketLifecycleConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketLifecycleConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketLocationInput`] -#[derive(Default)] -pub struct GetBucketLocationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketLocationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketLocationInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketLoggingInput`] -#[derive(Default)] -pub struct GetBucketLoggingInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketLoggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketLoggingInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketMetadataTableConfigurationInput`] -#[derive(Default)] -pub struct GetBucketMetadataTableConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketMetadataTableConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketMetadataTableConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketMetricsConfigurationInput`] -#[derive(Default)] -pub struct GetBucketMetricsConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -} - -impl GetBucketMetricsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(GetBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - -} - - -/// A builder for [`GetBucketNotificationConfigurationInput`] -#[derive(Default)] -pub struct GetBucketNotificationConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketNotificationConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketNotificationConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketOwnershipControlsInput`] -#[derive(Default)] -pub struct GetBucketOwnershipControlsInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketOwnershipControlsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketOwnershipControlsInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketPolicyInput`] -#[derive(Default)] -pub struct GetBucketPolicyInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketPolicyInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketPolicyInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketPolicyStatusInput`] -#[derive(Default)] -pub struct GetBucketPolicyStatusInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketPolicyStatusInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketPolicyStatusInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketReplicationInput`] -#[derive(Default)] -pub struct GetBucketReplicationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketReplicationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketReplicationInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketRequestPaymentInput`] -#[derive(Default)] -pub struct GetBucketRequestPaymentInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketRequestPaymentInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketRequestPaymentInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketTaggingInput`] -#[derive(Default)] -pub struct GetBucketTaggingInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketTaggingInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketVersioningInput`] -#[derive(Default)] -pub struct GetBucketVersioningInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketVersioningInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketVersioningInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetBucketWebsiteInput`] -#[derive(Default)] -pub struct GetBucketWebsiteInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetBucketWebsiteInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketWebsiteInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetObjectInput`] -#[derive(Default)] -pub struct GetObjectInputBuilder { -bucket: Option, - -checksum_mode: Option, - -expected_bucket_owner: Option, - -if_match: Option, - -if_modified_since: Option, - -if_none_match: Option, - -if_unmodified_since: Option, - -key: Option, - -part_number: Option, - -range: Option, - -request_payer: Option, - -response_cache_control: Option, - -response_content_disposition: Option, - -response_content_encoding: Option, - -response_content_language: Option, - -response_content_type: Option, - -response_expires: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -version_id: Option, - -} - -impl GetObjectInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { - self.checksum_mode = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} - -pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { - self.if_modified_since = field; -self -} - -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} - -pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.if_unmodified_since = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_part_number(&mut self, field: Option) -> &mut Self { - self.part_number = field; -self -} - -pub fn set_range(&mut self, field: Option) -> &mut Self { - self.range = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { - self.response_cache_control = field; -self -} - -pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { - self.response_content_disposition = field; -self -} - -pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { - self.response_content_encoding = field; -self -} - -pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { - self.response_content_language = field; -self -} - -pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { - self.response_content_type = field; -self -} - -pub fn set_response_expires(&mut self, field: Option) -> &mut Self { - self.response_expires = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_mode(mut self, field: Option) -> Self { - self.checksum_mode = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} - -#[must_use] -pub fn if_modified_since(mut self, field: Option) -> Self { - self.if_modified_since = field; -self -} - -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} - -#[must_use] -pub fn if_unmodified_since(mut self, field: Option) -> Self { - self.if_unmodified_since = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn part_number(mut self, field: Option) -> Self { - self.part_number = field; -self -} - -#[must_use] -pub fn range(mut self, field: Option) -> Self { - self.range = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn response_cache_control(mut self, field: Option) -> Self { - self.response_cache_control = field; -self -} - -#[must_use] -pub fn response_content_disposition(mut self, field: Option) -> Self { - self.response_content_disposition = field; -self -} - -#[must_use] -pub fn response_content_encoding(mut self, field: Option) -> Self { - self.response_content_encoding = field; -self -} - -#[must_use] -pub fn response_content_language(mut self, field: Option) -> Self { - self.response_content_language = field; -self -} - -#[must_use] -pub fn response_content_type(mut self, field: Option) -> Self { - self.response_content_type = field; -self -} - -#[must_use] -pub fn response_expires(mut self, field: Option) -> Self { - self.response_expires = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_mode = self.checksum_mode; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match = self.if_match; -let if_modified_since = self.if_modified_since; -let if_none_match = self.if_none_match; -let if_unmodified_since = self.if_unmodified_since; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let part_number = self.part_number; -let range = self.range; -let request_payer = self.request_payer; -let response_cache_control = self.response_cache_control; -let response_content_disposition = self.response_content_disposition; -let response_content_encoding = self.response_content_encoding; -let response_content_language = self.response_content_language; -let response_content_type = self.response_content_type; -let response_expires = self.response_expires; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let version_id = self.version_id; -Ok(GetObjectInput { -bucket, -checksum_mode, -expected_bucket_owner, -if_match, -if_modified_since, -if_none_match, -if_unmodified_since, -key, -part_number, -range, -request_payer, -response_cache_control, -response_content_disposition, -response_content_encoding, -response_content_language, -response_content_type, -response_expires, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} - -} - - -/// A builder for [`GetObjectAclInput`] -#[derive(Default)] -pub struct GetObjectAclInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -request_payer: Option, - -version_id: Option, - -} - -impl GetObjectAclInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(GetObjectAclInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - -} - - -/// A builder for [`GetObjectAttributesInput`] -#[derive(Default)] -pub struct GetObjectAttributesInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -max_parts: Option, - -object_attributes: ObjectAttributesList, - -part_number_marker: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -version_id: Option, - -} - -impl GetObjectAttributesInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_max_parts(&mut self, field: Option) -> &mut Self { - self.max_parts = field; -self -} - -pub fn set_object_attributes(&mut self, field: ObjectAttributesList) -> &mut Self { - self.object_attributes = field; -self -} - -pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { - self.part_number_marker = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn max_parts(mut self, field: Option) -> Self { - self.max_parts = field; -self -} - -#[must_use] -pub fn object_attributes(mut self, field: ObjectAttributesList) -> Self { - self.object_attributes = field; -self -} - -#[must_use] -pub fn part_number_marker(mut self, field: Option) -> Self { - self.part_number_marker = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let max_parts = self.max_parts; -let object_attributes = self.object_attributes; -let part_number_marker = self.part_number_marker; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let version_id = self.version_id; -Ok(GetObjectAttributesInput { -bucket, -expected_bucket_owner, -key, -max_parts, -object_attributes, -part_number_marker, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} - -} - - -/// A builder for [`GetObjectLegalHoldInput`] -#[derive(Default)] -pub struct GetObjectLegalHoldInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -request_payer: Option, - -version_id: Option, - -} - -impl GetObjectLegalHoldInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(GetObjectLegalHoldInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - -} - - -/// A builder for [`GetObjectLockConfigurationInput`] -#[derive(Default)] -pub struct GetObjectLockConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetObjectLockConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetObjectLockConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`GetObjectRetentionInput`] -#[derive(Default)] -pub struct GetObjectRetentionInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -request_payer: Option, - -version_id: Option, - -} - -impl GetObjectRetentionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(GetObjectRetentionInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - -} - - -/// A builder for [`GetObjectTaggingInput`] -#[derive(Default)] -pub struct GetObjectTaggingInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -request_payer: Option, - -version_id: Option, - -} - -impl GetObjectTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(GetObjectTaggingInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - -} - - -/// A builder for [`GetObjectTorrentInput`] -#[derive(Default)] -pub struct GetObjectTorrentInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -request_payer: Option, - -} - -impl GetObjectTorrentInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -Ok(GetObjectTorrentInput { -bucket, -expected_bucket_owner, -key, -request_payer, -}) -} - -} - - -/// A builder for [`GetPublicAccessBlockInput`] -#[derive(Default)] -pub struct GetPublicAccessBlockInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl GetPublicAccessBlockInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetPublicAccessBlockInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`HeadBucketInput`] -#[derive(Default)] -pub struct HeadBucketInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -} - -impl HeadBucketInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(HeadBucketInput { -bucket, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`HeadObjectInput`] -#[derive(Default)] -pub struct HeadObjectInputBuilder { -bucket: Option, - -checksum_mode: Option, - -expected_bucket_owner: Option, - -if_match: Option, - -if_modified_since: Option, - -if_none_match: Option, - -if_unmodified_since: Option, - -key: Option, - -part_number: Option, - -range: Option, - -request_payer: Option, - -response_cache_control: Option, - -response_content_disposition: Option, - -response_content_encoding: Option, - -response_content_language: Option, - -response_content_type: Option, - -response_expires: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -version_id: Option, - -} - -impl HeadObjectInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { - self.checksum_mode = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} - -pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { - self.if_modified_since = field; -self -} - -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} - -pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.if_unmodified_since = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_part_number(&mut self, field: Option) -> &mut Self { - self.part_number = field; -self -} - -pub fn set_range(&mut self, field: Option) -> &mut Self { - self.range = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { - self.response_cache_control = field; -self -} - -pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { - self.response_content_disposition = field; -self -} - -pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { - self.response_content_encoding = field; -self -} - -pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { - self.response_content_language = field; -self -} - -pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { - self.response_content_type = field; -self -} - -pub fn set_response_expires(&mut self, field: Option) -> &mut Self { - self.response_expires = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_mode(mut self, field: Option) -> Self { - self.checksum_mode = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} - -#[must_use] -pub fn if_modified_since(mut self, field: Option) -> Self { - self.if_modified_since = field; -self -} - -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} - -#[must_use] -pub fn if_unmodified_since(mut self, field: Option) -> Self { - self.if_unmodified_since = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn part_number(mut self, field: Option) -> Self { - self.part_number = field; -self -} - -#[must_use] -pub fn range(mut self, field: Option) -> Self { - self.range = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn response_cache_control(mut self, field: Option) -> Self { - self.response_cache_control = field; -self -} - -#[must_use] -pub fn response_content_disposition(mut self, field: Option) -> Self { - self.response_content_disposition = field; -self -} - -#[must_use] -pub fn response_content_encoding(mut self, field: Option) -> Self { - self.response_content_encoding = field; -self -} - -#[must_use] -pub fn response_content_language(mut self, field: Option) -> Self { - self.response_content_language = field; -self -} - -#[must_use] -pub fn response_content_type(mut self, field: Option) -> Self { - self.response_content_type = field; -self -} - -#[must_use] -pub fn response_expires(mut self, field: Option) -> Self { - self.response_expires = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_mode = self.checksum_mode; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match = self.if_match; -let if_modified_since = self.if_modified_since; -let if_none_match = self.if_none_match; -let if_unmodified_since = self.if_unmodified_since; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let part_number = self.part_number; -let range = self.range; -let request_payer = self.request_payer; -let response_cache_control = self.response_cache_control; -let response_content_disposition = self.response_content_disposition; -let response_content_encoding = self.response_content_encoding; -let response_content_language = self.response_content_language; -let response_content_type = self.response_content_type; -let response_expires = self.response_expires; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let version_id = self.version_id; -Ok(HeadObjectInput { -bucket, -checksum_mode, -expected_bucket_owner, -if_match, -if_modified_since, -if_none_match, -if_unmodified_since, -key, -part_number, -range, -request_payer, -response_cache_control, -response_content_disposition, -response_content_encoding, -response_content_language, -response_content_type, -response_expires, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} - -} - - -/// A builder for [`ListBucketAnalyticsConfigurationsInput`] -#[derive(Default)] -pub struct ListBucketAnalyticsConfigurationsInputBuilder { -bucket: Option, - -continuation_token: Option, - -expected_bucket_owner: Option, - -} - -impl ListBucketAnalyticsConfigurationsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(ListBucketAnalyticsConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`ListBucketIntelligentTieringConfigurationsInput`] -#[derive(Default)] -pub struct ListBucketIntelligentTieringConfigurationsInputBuilder { -bucket: Option, - -continuation_token: Option, - -} - -impl ListBucketIntelligentTieringConfigurationsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -Ok(ListBucketIntelligentTieringConfigurationsInput { -bucket, -continuation_token, -}) -} - -} - - -/// A builder for [`ListBucketInventoryConfigurationsInput`] -#[derive(Default)] -pub struct ListBucketInventoryConfigurationsInputBuilder { -bucket: Option, - -continuation_token: Option, - -expected_bucket_owner: Option, - -} - -impl ListBucketInventoryConfigurationsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(ListBucketInventoryConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`ListBucketMetricsConfigurationsInput`] -#[derive(Default)] -pub struct ListBucketMetricsConfigurationsInputBuilder { -bucket: Option, - -continuation_token: Option, - -expected_bucket_owner: Option, - -} - -impl ListBucketMetricsConfigurationsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(ListBucketMetricsConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`ListBucketsInput`] -#[derive(Default)] -pub struct ListBucketsInputBuilder { -bucket_region: Option, - -continuation_token: Option, - -max_buckets: Option, - -prefix: Option, - -} - -impl ListBucketsInputBuilder { -pub fn set_bucket_region(&mut self, field: Option) -> &mut Self { - self.bucket_region = field; -self -} - -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} - -pub fn set_max_buckets(&mut self, field: Option) -> &mut Self { - self.max_buckets = field; -self -} - -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} - -#[must_use] -pub fn bucket_region(mut self, field: Option) -> Self { - self.bucket_region = field; -self -} - -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} - -#[must_use] -pub fn max_buckets(mut self, field: Option) -> Self { - self.max_buckets = field; -self -} - -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} - -pub fn build(self) -> Result { -let bucket_region = self.bucket_region; -let continuation_token = self.continuation_token; -let max_buckets = self.max_buckets; -let prefix = self.prefix; -Ok(ListBucketsInput { -bucket_region, -continuation_token, -max_buckets, -prefix, -}) -} - -} - - -/// A builder for [`ListDirectoryBucketsInput`] -#[derive(Default)] -pub struct ListDirectoryBucketsInputBuilder { -continuation_token: Option, - -max_directory_buckets: Option, - -} - -impl ListDirectoryBucketsInputBuilder { -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} - -pub fn set_max_directory_buckets(&mut self, field: Option) -> &mut Self { - self.max_directory_buckets = field; -self -} - -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} - -#[must_use] -pub fn max_directory_buckets(mut self, field: Option) -> Self { - self.max_directory_buckets = field; -self -} - -pub fn build(self) -> Result { -let continuation_token = self.continuation_token; -let max_directory_buckets = self.max_directory_buckets; -Ok(ListDirectoryBucketsInput { -continuation_token, -max_directory_buckets, -}) -} - -} - - -/// A builder for [`ListMultipartUploadsInput`] -#[derive(Default)] -pub struct ListMultipartUploadsInputBuilder { -bucket: Option, - -delimiter: Option, - -encoding_type: Option, - -expected_bucket_owner: Option, - -key_marker: Option, - -max_uploads: Option, - -prefix: Option, - -request_payer: Option, - -upload_id_marker: Option, - -} - -impl ListMultipartUploadsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; -self -} - -pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key_marker(&mut self, field: Option) -> &mut Self { - self.key_marker = field; -self -} - -pub fn set_max_uploads(&mut self, field: Option) -> &mut Self { - self.max_uploads = field; -self -} - -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_upload_id_marker(&mut self, field: Option) -> &mut Self { - self.upload_id_marker = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; -self -} - -#[must_use] -pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key_marker(mut self, field: Option) -> Self { - self.key_marker = field; -self -} - -#[must_use] -pub fn max_uploads(mut self, field: Option) -> Self { - self.max_uploads = field; -self -} - -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn upload_id_marker(mut self, field: Option) -> Self { - self.upload_id_marker = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let delimiter = self.delimiter; -let encoding_type = self.encoding_type; -let expected_bucket_owner = self.expected_bucket_owner; -let key_marker = self.key_marker; -let max_uploads = self.max_uploads; -let prefix = self.prefix; -let request_payer = self.request_payer; -let upload_id_marker = self.upload_id_marker; -Ok(ListMultipartUploadsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -key_marker, -max_uploads, -prefix, -request_payer, -upload_id_marker, -}) -} - -} - - -/// A builder for [`ListObjectVersionsInput`] -#[derive(Default)] -pub struct ListObjectVersionsInputBuilder { -bucket: Option, - -delimiter: Option, - -encoding_type: Option, - -expected_bucket_owner: Option, - -key_marker: Option, - -max_keys: Option, - -optional_object_attributes: Option, - -prefix: Option, - -request_payer: Option, - -version_id_marker: Option, - -} - -impl ListObjectVersionsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; -self -} - -pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key_marker(&mut self, field: Option) -> &mut Self { - self.key_marker = field; -self -} - -pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; -self -} - -pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; -self -} - -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_version_id_marker(&mut self, field: Option) -> &mut Self { - self.version_id_marker = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; -self -} - -#[must_use] -pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key_marker(mut self, field: Option) -> Self { - self.key_marker = field; -self -} - -#[must_use] -pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; -self -} - -#[must_use] -pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; -self -} - -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn version_id_marker(mut self, field: Option) -> Self { - self.version_id_marker = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let delimiter = self.delimiter; -let encoding_type = self.encoding_type; -let expected_bucket_owner = self.expected_bucket_owner; -let key_marker = self.key_marker; -let max_keys = self.max_keys; -let optional_object_attributes = self.optional_object_attributes; -let prefix = self.prefix; -let request_payer = self.request_payer; -let version_id_marker = self.version_id_marker; -Ok(ListObjectVersionsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -key_marker, -max_keys, -optional_object_attributes, -prefix, -request_payer, -version_id_marker, -}) -} - -} - - -/// A builder for [`ListObjectsInput`] -#[derive(Default)] -pub struct ListObjectsInputBuilder { -bucket: Option, - -delimiter: Option, - -encoding_type: Option, - -expected_bucket_owner: Option, - -marker: Option, - -max_keys: Option, - -optional_object_attributes: Option, - -prefix: Option, - -request_payer: Option, - -} - -impl ListObjectsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; -self -} - -pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_marker(&mut self, field: Option) -> &mut Self { - self.marker = field; -self -} - -pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; -self -} - -pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; -self -} - -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; -self -} - -#[must_use] -pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn marker(mut self, field: Option) -> Self { - self.marker = field; -self -} - -#[must_use] -pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; -self -} - -#[must_use] -pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; -self -} - -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let delimiter = self.delimiter; -let encoding_type = self.encoding_type; -let expected_bucket_owner = self.expected_bucket_owner; -let marker = self.marker; -let max_keys = self.max_keys; -let optional_object_attributes = self.optional_object_attributes; -let prefix = self.prefix; -let request_payer = self.request_payer; -Ok(ListObjectsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -marker, -max_keys, -optional_object_attributes, -prefix, -request_payer, -}) -} - -} - - -/// A builder for [`ListObjectsV2Input`] -#[derive(Default)] -pub struct ListObjectsV2InputBuilder { -bucket: Option, - -continuation_token: Option, - -delimiter: Option, - -encoding_type: Option, - -expected_bucket_owner: Option, - -fetch_owner: Option, - -max_keys: Option, - -optional_object_attributes: Option, - -prefix: Option, - -request_payer: Option, - -start_after: Option, - -} - -impl ListObjectsV2InputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} - -pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; -self -} - -pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_fetch_owner(&mut self, field: Option) -> &mut Self { - self.fetch_owner = field; -self -} - -pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; -self -} - -pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; -self -} - -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_start_after(&mut self, field: Option) -> &mut Self { - self.start_after = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} - -#[must_use] -pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; -self -} - -#[must_use] -pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn fetch_owner(mut self, field: Option) -> Self { - self.fetch_owner = field; -self -} - -#[must_use] -pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; -self -} - -#[must_use] -pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; -self -} - -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn start_after(mut self, field: Option) -> Self { - self.start_after = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -let delimiter = self.delimiter; -let encoding_type = self.encoding_type; -let expected_bucket_owner = self.expected_bucket_owner; -let fetch_owner = self.fetch_owner; -let max_keys = self.max_keys; -let optional_object_attributes = self.optional_object_attributes; -let prefix = self.prefix; -let request_payer = self.request_payer; -let start_after = self.start_after; -Ok(ListObjectsV2Input { -bucket, -continuation_token, -delimiter, -encoding_type, -expected_bucket_owner, -fetch_owner, -max_keys, -optional_object_attributes, -prefix, -request_payer, -start_after, -}) -} - -} - - -/// A builder for [`ListPartsInput`] -#[derive(Default)] -pub struct ListPartsInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -max_parts: Option, - -part_number_marker: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -upload_id: Option, - -} - -impl ListPartsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_max_parts(&mut self, field: Option) -> &mut Self { - self.max_parts = field; -self -} - -pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { - self.part_number_marker = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn max_parts(mut self, field: Option) -> Self { - self.max_parts = field; -self -} - -#[must_use] -pub fn part_number_marker(mut self, field: Option) -> Self { - self.part_number_marker = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let max_parts = self.max_parts; -let part_number_marker = self.part_number_marker; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(ListPartsInput { -bucket, -expected_bucket_owner, -key, -max_parts, -part_number_marker, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - -} - - -/// A builder for [`PostObjectInput`] -#[derive(Default)] -pub struct PostObjectInputBuilder { -acl: Option, - -body: Option, - -bucket: Option, - -bucket_key_enabled: Option, - -cache_control: Option, - -checksum_algorithm: Option, - -checksum_crc32: Option, - -checksum_crc32c: Option, - -checksum_crc64nvme: Option, - -checksum_sha1: Option, - -checksum_sha256: Option, - -content_disposition: Option, - -content_encoding: Option, - -content_language: Option, - -content_length: Option, - -content_md5: Option, - -content_type: Option, - -expected_bucket_owner: Option, - -expires: Option, - -grant_full_control: Option, - -grant_read: Option, - -grant_read_acp: Option, - -grant_write_acp: Option, - -if_match: Option, - -if_none_match: Option, - -key: Option, - -metadata: Option, - -object_lock_legal_hold_status: Option, - -object_lock_mode: Option, - -object_lock_retain_until_date: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -ssekms_encryption_context: Option, - -ssekms_key_id: Option, - -server_side_encryption: Option, - -storage_class: Option, - -tagging: Option, - -website_redirect_location: Option, - -write_offset_bytes: Option, - -success_action_redirect: Option, - -success_action_status: Option, - -policy: Option, - -} - -impl PostObjectInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} - -pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} - -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} - -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self -} - -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self -} - -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} - -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} - -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self -} - -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self -} - -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} - -pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} - -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} - -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} - -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} - -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} - -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} - -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self -} - -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self -} - -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self -} - -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} - -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} - -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} - -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self -} - -pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; -self -} - -pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; -self -} - -pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { - self.write_offset_bytes = field; -self -} - -pub fn set_success_action_redirect(&mut self, field: Option) -> &mut Self { - self.success_action_redirect = field; -self -} - -pub fn set_success_action_status(&mut self, field: Option) -> &mut Self { - self.success_action_status = field; -self -} - -pub fn set_policy(&mut self, field: Option) -> &mut Self { - self.policy = field; -self -} - -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} - -#[must_use] -pub fn body(mut self, field: Option) -> Self { - self.body = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} - -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self -} - -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self -} - -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self -} - -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self -} - -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} - -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self -} - -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} - -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self -} - -#[must_use] -pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self -} - -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} - -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} - -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} - -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} - -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} - -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} - -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} - -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} - -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; -self -} - -#[must_use] -pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; -self -} - -#[must_use] -pub fn write_offset_bytes(mut self, field: Option) -> Self { - self.write_offset_bytes = field; -self -} - -#[must_use] -pub fn success_action_redirect(mut self, field: Option) -> Self { - self.success_action_redirect = field; -self -} - -#[must_use] -pub fn success_action_status(mut self, field: Option) -> Self { - self.success_action_status = field; -self -} - -#[must_use] -pub fn policy(mut self, field: Option) -> Self { - self.policy = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let body = self.body; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_algorithm = self.checksum_algorithm; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_length = self.content_length; -let content_md5 = self.content_md5; -let content_type = self.content_type; -let expected_bucket_owner = self.expected_bucket_owner; -let expires = self.expires; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write_acp = self.grant_write_acp; -let if_match = self.if_match; -let if_none_match = self.if_none_match; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let metadata = self.metadata; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let storage_class = self.storage_class; -let tagging = self.tagging; -let website_redirect_location = self.website_redirect_location; -let write_offset_bytes = self.write_offset_bytes; -let success_action_redirect = self.success_action_redirect; -let success_action_status = self.success_action_status; -let policy = self.policy; -Ok(PostObjectInput { -acl, -body, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_md5, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -if_match, -if_none_match, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -website_redirect_location, -write_offset_bytes, -success_action_redirect, -success_action_status, -policy, -}) -} - -} - - -/// A builder for [`PutBucketAccelerateConfigurationInput`] -#[derive(Default)] -pub struct PutBucketAccelerateConfigurationInputBuilder { -accelerate_configuration: Option, - -bucket: Option, - -checksum_algorithm: Option, - -expected_bucket_owner: Option, - -} - -impl PutBucketAccelerateConfigurationInputBuilder { -pub fn set_accelerate_configuration(&mut self, field: AccelerateConfiguration) -> &mut Self { - self.accelerate_configuration = Some(field); -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn accelerate_configuration(mut self, field: AccelerateConfiguration) -> Self { - self.accelerate_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let accelerate_configuration = self.accelerate_configuration.ok_or_else(|| BuildError::missing_field("accelerate_configuration"))?; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(PutBucketAccelerateConfigurationInput { -accelerate_configuration, -bucket, -checksum_algorithm, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`PutBucketAclInput`] -#[derive(Default)] -pub struct PutBucketAclInputBuilder { -acl: Option, - -access_control_policy: Option, - -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -grant_full_control: Option, - -grant_read: Option, - -grant_read_acp: Option, - -grant_write: Option, - -grant_write_acp: Option, - -} - -impl PutBucketAclInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} - -pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { - self.access_control_policy = field; -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} - -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} - -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} - -pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; -self -} - -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} - -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} - -#[must_use] -pub fn access_control_policy(mut self, field: Option) -> Self { - self.access_control_policy = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} - -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} - -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} - -#[must_use] -pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; -self -} - -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let access_control_policy = self.access_control_policy; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write = self.grant_write; -let grant_write_acp = self.grant_write_acp; -Ok(PutBucketAclInput { -acl, -access_control_policy, -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -}) -} - -} - - -/// A builder for [`PutBucketAnalyticsConfigurationInput`] -#[derive(Default)] -pub struct PutBucketAnalyticsConfigurationInputBuilder { -analytics_configuration: Option, - -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -} - -impl PutBucketAnalyticsConfigurationInputBuilder { -pub fn set_analytics_configuration(&mut self, field: AnalyticsConfiguration) -> &mut Self { - self.analytics_configuration = Some(field); -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn analytics_configuration(mut self, field: AnalyticsConfiguration) -> Self { - self.analytics_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); -self -} - -pub fn build(self) -> Result { -let analytics_configuration = self.analytics_configuration.ok_or_else(|| BuildError::missing_field("analytics_configuration"))?; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(PutBucketAnalyticsConfigurationInput { -analytics_configuration, -bucket, -expected_bucket_owner, -id, -}) -} - -} - - -/// A builder for [`PutBucketCorsInput`] -#[derive(Default)] -pub struct PutBucketCorsInputBuilder { -bucket: Option, - -cors_configuration: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -} - -impl PutBucketCorsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_cors_configuration(&mut self, field: CORSConfiguration) -> &mut Self { - self.cors_configuration = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn cors_configuration(mut self, field: CORSConfiguration) -> Self { - self.cors_configuration = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let cors_configuration = self.cors_configuration.ok_or_else(|| BuildError::missing_field("cors_configuration"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(PutBucketCorsInput { -bucket, -cors_configuration, -checksum_algorithm, -content_md5, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`PutBucketEncryptionInput`] -#[derive(Default)] -pub struct PutBucketEncryptionInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -server_side_encryption_configuration: Option, - -} - -impl PutBucketEncryptionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_server_side_encryption_configuration(&mut self, field: ServerSideEncryptionConfiguration) -> &mut Self { - self.server_side_encryption_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn server_side_encryption_configuration(mut self, field: ServerSideEncryptionConfiguration) -> Self { - self.server_side_encryption_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let server_side_encryption_configuration = self.server_side_encryption_configuration.ok_or_else(|| BuildError::missing_field("server_side_encryption_configuration"))?; -Ok(PutBucketEncryptionInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -server_side_encryption_configuration, -}) -} - -} - - -/// A builder for [`PutBucketIntelligentTieringConfigurationInput`] -#[derive(Default)] -pub struct PutBucketIntelligentTieringConfigurationInputBuilder { -bucket: Option, - -id: Option, - -intelligent_tiering_configuration: Option, - -} - -impl PutBucketIntelligentTieringConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); -self -} - -pub fn set_intelligent_tiering_configuration(&mut self, field: IntelligentTieringConfiguration) -> &mut Self { - self.intelligent_tiering_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn intelligent_tiering_configuration(mut self, field: IntelligentTieringConfiguration) -> Self { - self.intelligent_tiering_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -let intelligent_tiering_configuration = self.intelligent_tiering_configuration.ok_or_else(|| BuildError::missing_field("intelligent_tiering_configuration"))?; -Ok(PutBucketIntelligentTieringConfigurationInput { -bucket, -id, -intelligent_tiering_configuration, -}) -} - -} - - -/// A builder for [`PutBucketInventoryConfigurationInput`] -#[derive(Default)] -pub struct PutBucketInventoryConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -inventory_configuration: Option, - -} - -impl PutBucketInventoryConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); -self -} - -pub fn set_inventory_configuration(&mut self, field: InventoryConfiguration) -> &mut Self { - self.inventory_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn inventory_configuration(mut self, field: InventoryConfiguration) -> Self { - self.inventory_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -let inventory_configuration = self.inventory_configuration.ok_or_else(|| BuildError::missing_field("inventory_configuration"))?; -Ok(PutBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -inventory_configuration, -}) -} - -} - - -/// A builder for [`PutBucketLifecycleConfigurationInput`] -#[derive(Default)] -pub struct PutBucketLifecycleConfigurationInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -expected_bucket_owner: Option, - -lifecycle_configuration: Option, - -transition_default_minimum_object_size: Option, - -} - -impl PutBucketLifecycleConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_lifecycle_configuration(&mut self, field: Option) -> &mut Self { - self.lifecycle_configuration = field; -self -} - -pub fn set_transition_default_minimum_object_size(&mut self, field: Option) -> &mut Self { - self.transition_default_minimum_object_size = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn lifecycle_configuration(mut self, field: Option) -> Self { - self.lifecycle_configuration = field; -self -} - -#[must_use] -pub fn transition_default_minimum_object_size(mut self, field: Option) -> Self { - self.transition_default_minimum_object_size = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let expected_bucket_owner = self.expected_bucket_owner; -let lifecycle_configuration = self.lifecycle_configuration; -let transition_default_minimum_object_size = self.transition_default_minimum_object_size; -Ok(PutBucketLifecycleConfigurationInput { -bucket, -checksum_algorithm, -expected_bucket_owner, -lifecycle_configuration, -transition_default_minimum_object_size, -}) -} - -} - - -/// A builder for [`PutBucketLoggingInput`] -#[derive(Default)] -pub struct PutBucketLoggingInputBuilder { -bucket: Option, - -bucket_logging_status: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -} - -impl PutBucketLoggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bucket_logging_status(&mut self, field: BucketLoggingStatus) -> &mut Self { - self.bucket_logging_status = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bucket_logging_status(mut self, field: BucketLoggingStatus) -> Self { - self.bucket_logging_status = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_logging_status = self.bucket_logging_status.ok_or_else(|| BuildError::missing_field("bucket_logging_status"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(PutBucketLoggingInput { -bucket, -bucket_logging_status, -checksum_algorithm, -content_md5, -expected_bucket_owner, -}) -} - -} - - -/// A builder for [`PutBucketMetricsConfigurationInput`] -#[derive(Default)] -pub struct PutBucketMetricsConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -id: Option, - -metrics_configuration: Option, - -} - -impl PutBucketMetricsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); -self -} - -pub fn set_metrics_configuration(&mut self, field: MetricsConfiguration) -> &mut Self { - self.metrics_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); -self -} - -#[must_use] -pub fn metrics_configuration(mut self, field: MetricsConfiguration) -> Self { - self.metrics_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -let metrics_configuration = self.metrics_configuration.ok_or_else(|| BuildError::missing_field("metrics_configuration"))?; -Ok(PutBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -metrics_configuration, -}) -} - -} - - -/// A builder for [`PutBucketNotificationConfigurationInput`] -#[derive(Default)] -pub struct PutBucketNotificationConfigurationInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -notification_configuration: Option, - -skip_destination_validation: Option, - -} - -impl PutBucketNotificationConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_notification_configuration(&mut self, field: NotificationConfiguration) -> &mut Self { - self.notification_configuration = Some(field); -self -} - -pub fn set_skip_destination_validation(&mut self, field: Option) -> &mut Self { - self.skip_destination_validation = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn notification_configuration(mut self, field: NotificationConfiguration) -> Self { - self.notification_configuration = Some(field); -self -} - -#[must_use] -pub fn skip_destination_validation(mut self, field: Option) -> Self { - self.skip_destination_validation = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let notification_configuration = self.notification_configuration.ok_or_else(|| BuildError::missing_field("notification_configuration"))?; -let skip_destination_validation = self.skip_destination_validation; -Ok(PutBucketNotificationConfigurationInput { -bucket, -expected_bucket_owner, -notification_configuration, -skip_destination_validation, -}) -} - -} - - -/// A builder for [`PutBucketOwnershipControlsInput`] -#[derive(Default)] -pub struct PutBucketOwnershipControlsInputBuilder { -bucket: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -ownership_controls: Option, - -} - -impl PutBucketOwnershipControlsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_ownership_controls(&mut self, field: OwnershipControls) -> &mut Self { - self.ownership_controls = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn ownership_controls(mut self, field: OwnershipControls) -> Self { - self.ownership_controls = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let ownership_controls = self.ownership_controls.ok_or_else(|| BuildError::missing_field("ownership_controls"))?; -Ok(PutBucketOwnershipControlsInput { -bucket, -content_md5, -expected_bucket_owner, -ownership_controls, -}) -} - -} - - -/// A builder for [`PutBucketPolicyInput`] -#[derive(Default)] -pub struct PutBucketPolicyInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -confirm_remove_self_bucket_access: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -policy: Option, - -} - -impl PutBucketPolicyInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_confirm_remove_self_bucket_access(&mut self, field: Option) -> &mut Self { - self.confirm_remove_self_bucket_access = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_policy(&mut self, field: Policy) -> &mut Self { - self.policy = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn confirm_remove_self_bucket_access(mut self, field: Option) -> Self { - self.confirm_remove_self_bucket_access = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn policy(mut self, field: Policy) -> Self { - self.policy = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let confirm_remove_self_bucket_access = self.confirm_remove_self_bucket_access; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let policy = self.policy.ok_or_else(|| BuildError::missing_field("policy"))?; -Ok(PutBucketPolicyInput { -bucket, -checksum_algorithm, -confirm_remove_self_bucket_access, -content_md5, -expected_bucket_owner, -policy, -}) -} - -} - - -/// A builder for [`PutBucketReplicationInput`] -#[derive(Default)] -pub struct PutBucketReplicationInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -replication_configuration: Option, - -token: Option, - -} - -impl PutBucketReplicationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_replication_configuration(&mut self, field: ReplicationConfiguration) -> &mut Self { - self.replication_configuration = Some(field); -self -} - -pub fn set_token(&mut self, field: Option) -> &mut Self { - self.token = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn replication_configuration(mut self, field: ReplicationConfiguration) -> Self { - self.replication_configuration = Some(field); -self -} - -#[must_use] -pub fn token(mut self, field: Option) -> Self { - self.token = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let replication_configuration = self.replication_configuration.ok_or_else(|| BuildError::missing_field("replication_configuration"))?; -let token = self.token; -Ok(PutBucketReplicationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -replication_configuration, -token, -}) -} - -} - - -/// A builder for [`PutBucketRequestPaymentInput`] -#[derive(Default)] -pub struct PutBucketRequestPaymentInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -request_payment_configuration: Option, - -} - -impl PutBucketRequestPaymentInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_request_payment_configuration(&mut self, field: RequestPaymentConfiguration) -> &mut Self { - self.request_payment_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn request_payment_configuration(mut self, field: RequestPaymentConfiguration) -> Self { - self.request_payment_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let request_payment_configuration = self.request_payment_configuration.ok_or_else(|| BuildError::missing_field("request_payment_configuration"))?; -Ok(PutBucketRequestPaymentInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -request_payment_configuration, -}) -} - -} - - -/// A builder for [`PutBucketTaggingInput`] -#[derive(Default)] -pub struct PutBucketTaggingInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -tagging: Option, - -} - -impl PutBucketTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { - self.tagging = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Tagging) -> Self { - self.tagging = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; -Ok(PutBucketTaggingInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -tagging, -}) -} - -} - - -/// A builder for [`PutBucketVersioningInput`] -#[derive(Default)] -pub struct PutBucketVersioningInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -mfa: Option, - -versioning_configuration: Option, - -} - -impl PutBucketVersioningInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; -self -} - -pub fn set_versioning_configuration(&mut self, field: VersioningConfiguration) -> &mut Self { - self.versioning_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; -self -} - -#[must_use] -pub fn versioning_configuration(mut self, field: VersioningConfiguration) -> Self { - self.versioning_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let mfa = self.mfa; -let versioning_configuration = self.versioning_configuration.ok_or_else(|| BuildError::missing_field("versioning_configuration"))?; -Ok(PutBucketVersioningInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -mfa, -versioning_configuration, -}) -} - -} - - -/// A builder for [`PutBucketWebsiteInput`] -#[derive(Default)] -pub struct PutBucketWebsiteInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -website_configuration: Option, - -} - -impl PutBucketWebsiteInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_website_configuration(&mut self, field: WebsiteConfiguration) -> &mut Self { - self.website_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn website_configuration(mut self, field: WebsiteConfiguration) -> Self { - self.website_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let website_configuration = self.website_configuration.ok_or_else(|| BuildError::missing_field("website_configuration"))?; -Ok(PutBucketWebsiteInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -website_configuration, -}) -} - -} - - -/// A builder for [`PutObjectInput`] -#[derive(Default)] -pub struct PutObjectInputBuilder { -acl: Option, - -body: Option, - -bucket: Option, - -bucket_key_enabled: Option, - -cache_control: Option, - -checksum_algorithm: Option, - -checksum_crc32: Option, - -checksum_crc32c: Option, - -checksum_crc64nvme: Option, - -checksum_sha1: Option, - -checksum_sha256: Option, - -content_disposition: Option, - -content_encoding: Option, - -content_language: Option, - -content_length: Option, - -content_md5: Option, - -content_type: Option, - -expected_bucket_owner: Option, - -expires: Option, - -grant_full_control: Option, - -grant_read: Option, - -grant_read_acp: Option, - -grant_write_acp: Option, - -if_match: Option, - -if_none_match: Option, - -key: Option, - -metadata: Option, - -object_lock_legal_hold_status: Option, - -object_lock_mode: Option, - -object_lock_retain_until_date: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -ssekms_encryption_context: Option, - -ssekms_key_id: Option, - -server_side_encryption: Option, - -storage_class: Option, - -tagging: Option, - -website_redirect_location: Option, - -write_offset_bytes: Option, - -} - -impl PutObjectInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} - -pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} - -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} - -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self -} - -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self -} - -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} - -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} - -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self -} - -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self -} - -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} - -pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} - -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} - -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} - -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} - -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} - -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} - -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self -} - -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self -} - -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self -} - -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} - -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} - -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} - -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self -} - -pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; -self -} - -pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; -self -} - -pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { - self.write_offset_bytes = field; -self -} - -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} - -#[must_use] -pub fn body(mut self, field: Option) -> Self { - self.body = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} - -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self -} - -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self -} - -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self -} - -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self -} - -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} - -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self -} - -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} - -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self -} - -#[must_use] -pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self -} - -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} - -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} - -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} - -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} - -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} - -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} - -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} - -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} - -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; -self -} - -#[must_use] -pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; -self -} - -#[must_use] -pub fn write_offset_bytes(mut self, field: Option) -> Self { - self.write_offset_bytes = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let body = self.body; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_algorithm = self.checksum_algorithm; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_length = self.content_length; -let content_md5 = self.content_md5; -let content_type = self.content_type; -let expected_bucket_owner = self.expected_bucket_owner; -let expires = self.expires; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write_acp = self.grant_write_acp; -let if_match = self.if_match; -let if_none_match = self.if_none_match; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let metadata = self.metadata; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let storage_class = self.storage_class; -let tagging = self.tagging; -let website_redirect_location = self.website_redirect_location; -let write_offset_bytes = self.write_offset_bytes; -Ok(PutObjectInput { -acl, -body, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_md5, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -if_match, -if_none_match, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -website_redirect_location, -write_offset_bytes, -}) -} - -} - - -/// A builder for [`PutObjectAclInput`] -#[derive(Default)] -pub struct PutObjectAclInputBuilder { -acl: Option, - -access_control_policy: Option, - -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -grant_full_control: Option, - -grant_read: Option, - -grant_read_acp: Option, - -grant_write: Option, - -grant_write_acp: Option, - -key: Option, - -request_payer: Option, - -version_id: Option, - -} - -impl PutObjectAclInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} - -pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { - self.access_control_policy = field; -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} - -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} - -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} - -pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; -self -} - -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} - -#[must_use] -pub fn access_control_policy(mut self, field: Option) -> Self { - self.access_control_policy = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} - -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} - -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} - -#[must_use] -pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; -self -} - -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let access_control_policy = self.access_control_policy; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write = self.grant_write; -let grant_write_acp = self.grant_write_acp; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(PutObjectAclInput { -acl, -access_control_policy, -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -key, -request_payer, -version_id, -}) -} - -} - - -/// A builder for [`PutObjectLegalHoldInput`] -#[derive(Default)] -pub struct PutObjectLegalHoldInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -key: Option, - -legal_hold: Option, - -request_payer: Option, - -version_id: Option, - -} - -impl PutObjectLegalHoldInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_legal_hold(&mut self, field: Option) -> &mut Self { - self.legal_hold = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn legal_hold(mut self, field: Option) -> Self { - self.legal_hold = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let legal_hold = self.legal_hold; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(PutObjectLegalHoldInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -legal_hold, -request_payer, -version_id, -}) -} - -} - - -/// A builder for [`PutObjectLockConfigurationInput`] -#[derive(Default)] -pub struct PutObjectLockConfigurationInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -object_lock_configuration: Option, - -request_payer: Option, - -token: Option, - -} - -impl PutObjectLockConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_object_lock_configuration(&mut self, field: Option) -> &mut Self { - self.object_lock_configuration = field; -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_token(&mut self, field: Option) -> &mut Self { - self.token = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn object_lock_configuration(mut self, field: Option) -> Self { - self.object_lock_configuration = field; -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn token(mut self, field: Option) -> Self { - self.token = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let object_lock_configuration = self.object_lock_configuration; -let request_payer = self.request_payer; -let token = self.token; -Ok(PutObjectLockConfigurationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -object_lock_configuration, -request_payer, -token, -}) -} - -} - - -/// A builder for [`PutObjectRetentionInput`] -#[derive(Default)] -pub struct PutObjectRetentionInputBuilder { -bucket: Option, - -bypass_governance_retention: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -key: Option, - -request_payer: Option, - -retention: Option, - -version_id: Option, - -} - -impl PutObjectRetentionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_retention(&mut self, field: Option) -> &mut Self { - self.retention = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn retention(mut self, field: Option) -> Self { - self.retention = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bypass_governance_retention = self.bypass_governance_retention; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let retention = self.retention; -let version_id = self.version_id; -Ok(PutObjectRetentionInput { -bucket, -bypass_governance_retention, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -request_payer, -retention, -version_id, -}) -} - -} - - -/// A builder for [`PutObjectTaggingInput`] -#[derive(Default)] -pub struct PutObjectTaggingInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -key: Option, - -request_payer: Option, - -tagging: Option, - -version_id: Option, - -} - -impl PutObjectTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { - self.tagging = Some(field); -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Tagging) -> Self { - self.tagging = Some(field); -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; -let version_id = self.version_id; -Ok(PutObjectTaggingInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -request_payer, -tagging, -version_id, -}) -} - -} - - -/// A builder for [`PutPublicAccessBlockInput`] -#[derive(Default)] -pub struct PutPublicAccessBlockInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -public_access_block_configuration: Option, - -} - -impl PutPublicAccessBlockInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_public_access_block_configuration(&mut self, field: PublicAccessBlockConfiguration) -> &mut Self { - self.public_access_block_configuration = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn public_access_block_configuration(mut self, field: PublicAccessBlockConfiguration) -> Self { - self.public_access_block_configuration = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let public_access_block_configuration = self.public_access_block_configuration.ok_or_else(|| BuildError::missing_field("public_access_block_configuration"))?; -Ok(PutPublicAccessBlockInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -public_access_block_configuration, -}) -} - -} - - -/// A builder for [`RestoreObjectInput`] -#[derive(Default)] -pub struct RestoreObjectInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -expected_bucket_owner: Option, - -key: Option, - -request_payer: Option, - -restore_request: Option, - -version_id: Option, - -} - -impl RestoreObjectInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_restore_request(&mut self, field: Option) -> &mut Self { - self.restore_request = field; -self -} - -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn restore_request(mut self, field: Option) -> Self { - self.restore_request = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let restore_request = self.restore_request; -let version_id = self.version_id; -Ok(RestoreObjectInput { -bucket, -checksum_algorithm, -expected_bucket_owner, -key, -request_payer, -restore_request, -version_id, -}) -} - -} - - -/// A builder for [`SelectObjectContentInput`] -#[derive(Default)] -pub struct SelectObjectContentInputBuilder { -bucket: Option, - -expected_bucket_owner: Option, - -key: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -request: Option, - -} - -impl SelectObjectContentInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_request(&mut self, field: SelectObjectContentRequest) -> &mut Self { - self.request = Some(field); -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn request(mut self, field: SelectObjectContentRequest) -> Self { - self.request = Some(field); -self -} - -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let request = self.request.ok_or_else(|| BuildError::missing_field("request"))?; -Ok(SelectObjectContentInput { -bucket, -expected_bucket_owner, -key, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -request, -}) -} - -} - - -/// A builder for [`UploadPartInput`] -#[derive(Default)] -pub struct UploadPartInputBuilder { -body: Option, - -bucket: Option, - -checksum_algorithm: Option, - -checksum_crc32: Option, - -checksum_crc32c: Option, - -checksum_crc64nvme: Option, - -checksum_sha1: Option, - -checksum_sha256: Option, - -content_length: Option, - -content_md5: Option, - -expected_bucket_owner: Option, - -key: Option, - -part_number: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -upload_id: Option, - -} - -impl UploadPartInputBuilder { -pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; -self -} - -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} - -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} - -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} - -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self -} - -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self -} - -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} - -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} - -pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; -self -} - -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} - -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} - -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} - -pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { - self.part_number = Some(field); -self -} - -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} - -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} - -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} - -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} - -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} - -#[must_use] -pub fn body(mut self, field: Option) -> Self { - self.body = field; -self -} - -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} - -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} - -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self -} - -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self -} - -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self -} - -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self -} - -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} - -#[must_use] -pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; -self -} - -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} - -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} - -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} - -#[must_use] -pub fn part_number(mut self, field: PartNumber) -> Self { - self.part_number = Some(field); -self -} - -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} - -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self -} - -pub fn build(self) -> Result { -let body = self.body; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let content_length = self.content_length; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(UploadPartInput { -body, -bucket, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_length, -content_md5, -expected_bucket_owner, -key, -part_number, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) +/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error code and error message. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct ErrorDetails { + ///

    + /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + /// unable to create the table, this structure contains the error code. The possible error codes and + /// error messages are as follows: + ///

    + ///
      + ///
    • + ///

      + /// AccessDeniedCreatingResources - You don't have sufficient permissions to + /// create the required resources. Make sure that you have s3tables:CreateNamespace, + /// s3tables:CreateTable, s3tables:GetTable and + /// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata + /// table, you must delete the metadata configuration for this bucket, and then create a new + /// metadata configuration. + ///

      + ///
    • + ///
    • + ///

      + /// AccessDeniedWritingToTable - Unable to write to the metadata table because of + /// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new + /// metadata table. To create a new metadata table, you must delete the metadata configuration for + /// this bucket, and then create a new metadata configuration.

      + ///
    • + ///
    • + ///

      + /// DestinationTableNotFound - The destination table doesn't exist. To create a + /// new metadata table, you must delete the metadata configuration for this bucket, and then + /// create a new metadata configuration.

      + ///
    • + ///
    • + ///

      + /// ServerInternalError - An internal error has occurred. To create a new metadata + /// table, you must delete the metadata configuration for this bucket, and then create a new + /// metadata configuration.

      + ///
    • + ///
    • + ///

      + /// TableAlreadyExists - The table that you specified already exists in the table + /// bucket's namespace. Specify a different table name. To create a new metadata table, you must + /// delete the metadata configuration for this bucket, and then create a new metadata + /// configuration.

      + ///
    • + ///
    • + ///

      + /// TableBucketNotFound - The table bucket that you specified doesn't exist in + /// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new + /// metadata table, you must delete the metadata configuration for this bucket, and then create + /// a new metadata configuration.

      + ///
    • + ///
    + pub error_code: Option, + ///

    + /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + /// unable to create the table, this structure contains the error message. The possible error codes and + /// error messages are as follows: + ///

    + ///
      + ///
    • + ///

      + /// AccessDeniedCreatingResources - You don't have sufficient permissions to + /// create the required resources. Make sure that you have s3tables:CreateNamespace, + /// s3tables:CreateTable, s3tables:GetTable and + /// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata + /// table, you must delete the metadata configuration for this bucket, and then create a new + /// metadata configuration. + ///

      + ///
    • + ///
    • + ///

      + /// AccessDeniedWritingToTable - Unable to write to the metadata table because of + /// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new + /// metadata table. To create a new metadata table, you must delete the metadata configuration for + /// this bucket, and then create a new metadata configuration.

      + ///
    • + ///
    • + ///

      + /// DestinationTableNotFound - The destination table doesn't exist. To create a + /// new metadata table, you must delete the metadata configuration for this bucket, and then + /// create a new metadata configuration.

      + ///
    • + ///
    • + ///

      + /// ServerInternalError - An internal error has occurred. To create a new metadata + /// table, you must delete the metadata configuration for this bucket, and then create a new + /// metadata configuration.

      + ///
    • + ///
    • + ///

      + /// TableAlreadyExists - The table that you specified already exists in the table + /// bucket's namespace. Specify a different table name. To create a new metadata table, you must + /// delete the metadata configuration for this bucket, and then create a new metadata + /// configuration.

      + ///
    • + ///
    • + ///

      + /// TableBucketNotFound - The table bucket that you specified doesn't exist in + /// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new + /// metadata table, you must delete the metadata configuration for this bucket, and then create + /// a new metadata configuration.

      + ///
    • + ///
    + pub error_message: Option, } +impl fmt::Debug for ErrorDetails { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ErrorDetails"); + if let Some(ref val) = self.error_code { + d.field("error_code", val); + } + if let Some(ref val) = self.error_message { + d.field("error_message", val); + } + d.finish_non_exhaustive() + } } - -/// A builder for [`UploadPartCopyInput`] -#[derive(Default)] -pub struct UploadPartCopyInputBuilder { -bucket: Option, - -copy_source: Option, - -copy_source_if_match: Option, - -copy_source_if_modified_since: Option, - -copy_source_if_none_match: Option, - -copy_source_if_unmodified_since: Option, - -copy_source_range: Option, - -copy_source_sse_customer_algorithm: Option, - -copy_source_sse_customer_key: Option, - -copy_source_sse_customer_key_md5: Option, - -expected_bucket_owner: Option, - -expected_source_bucket_owner: Option, - -key: Option, - -part_number: Option, - -request_payer: Option, - -sse_customer_algorithm: Option, - -sse_customer_key: Option, - -sse_customer_key_md5: Option, - -upload_id: Option, - -} - -impl UploadPartCopyInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self +///

    The error information.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ErrorDocument { + ///

    The object key name to use when a 4XX class error occurs.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub key: ObjectKey, } -pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { - self.copy_source = Some(field); -self +impl fmt::Debug for ErrorDocument { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ErrorDocument"); + d.field("key", &self.key); + d.finish_non_exhaustive() + } } -pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_match = field; -self -} +pub type ErrorMessage = String; -pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_modified_since = field; -self -} +pub type Errors = List; -pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_none_match = field; -self -} +///

    A container for specifying the configuration for Amazon EventBridge.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct EventBridgeConfiguration {} -pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_unmodified_since = field; -self +impl fmt::Debug for EventBridgeConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("EventBridgeConfiguration"); + d.finish_non_exhaustive() + } } -pub fn set_copy_source_range(&mut self, field: Option) -> &mut Self { - self.copy_source_range = field; -self -} +pub type EventList = List; -pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_algorithm = field; -self +///

    Optional configuration to replicate existing source bucket objects.

    +/// +///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the +/// Amazon S3 User Guide.

    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ExistingObjectReplication { + ///

    Specifies whether Amazon S3 replicates existing source bucket objects.

    + pub status: ExistingObjectReplicationStatus, } -pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key = field; -self +impl fmt::Debug for ExistingObjectReplication { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ExistingObjectReplication"); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key_md5 = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ExistingObjectReplicationStatus(Cow<'static, str>); -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} +impl ExistingObjectReplicationStatus { + pub const DISABLED: &'static str = "Disabled"; -pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_source_bucket_owner = field; -self -} + pub const ENABLED: &'static str = "Enabled"; -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { - self.part_number = Some(field); -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self +impl From for ExistingObjectReplicationStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self +impl From for Cow<'static, str> { + fn from(s: ExistingObjectReplicationStatus) -> Self { + s.0 + } } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self +impl FromStr for ExistingObjectReplicationStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} +pub type Expiration = String; -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ExpirationStatus(Cow<'static, str>); -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} +impl ExpirationStatus { + pub const DISABLED: &'static str = "Disabled"; -#[must_use] -pub fn copy_source(mut self, field: CopySource) -> Self { - self.copy_source = Some(field); -self -} + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn copy_source_if_match(mut self, field: Option) -> Self { - self.copy_source_if_match = field; -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { - self.copy_source_if_modified_since = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn copy_source_if_none_match(mut self, field: Option) -> Self { - self.copy_source_if_none_match = field; -self +impl From for ExpirationStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { - self.copy_source_if_unmodified_since = field; -self +impl From for Cow<'static, str> { + fn from(s: ExpirationStatus) -> Self { + s.0 + } } -#[must_use] -pub fn copy_source_range(mut self, field: Option) -> Self { - self.copy_source_range = field; -self +impl FromStr for ExpirationStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -#[must_use] -pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { - self.copy_source_sse_customer_algorithm = field; -self -} +pub type ExpiredObjectDeleteMarker = bool; -#[must_use] -pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key = field; -self -} +pub type Expires = Timestamp; -#[must_use] -pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key_md5 = field; -self -} +pub type ExposeHeader = String; -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} +pub type ExposeHeaders = List; -#[must_use] -pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { - self.expected_source_bucket_owner = field; -self -} +pub type Expression = String; -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ExpressionType(Cow<'static, str>); -#[must_use] -pub fn part_number(mut self, field: PartNumber) -> Self { - self.part_number = Some(field); -self -} +impl ExpressionType { + pub const SQL: &'static str = "SQL"; -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self +impl From for ExpressionType { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self +impl From for Cow<'static, str> { + fn from(s: ExpressionType) -> Self { + s.0 + } } -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self +impl FromStr for ExpressionType { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; -let copy_source_if_match = self.copy_source_if_match; -let copy_source_if_modified_since = self.copy_source_if_modified_since; -let copy_source_if_none_match = self.copy_source_if_none_match; -let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; -let copy_source_range = self.copy_source_range; -let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; -let copy_source_sse_customer_key = self.copy_source_sse_customer_key; -let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let expected_source_bucket_owner = self.expected_source_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(UploadPartCopyInput { -bucket, -copy_source, -copy_source_if_match, -copy_source_if_modified_since, -copy_source_if_none_match, -copy_source_if_unmodified_since, -copy_source_range, -copy_source_sse_customer_algorithm, -copy_source_sse_customer_key, -copy_source_sse_customer_key_md5, -expected_bucket_owner, -expected_source_bucket_owner, -key, -part_number, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - -} - - -/// A builder for [`WriteGetObjectResponseInput`] -#[derive(Default)] -pub struct WriteGetObjectResponseInputBuilder { -accept_ranges: Option, - -body: Option, - -bucket_key_enabled: Option, - -cache_control: Option, - -checksum_crc32: Option, - -checksum_crc32c: Option, - -checksum_crc64nvme: Option, - -checksum_sha1: Option, - -checksum_sha256: Option, - -content_disposition: Option, - -content_encoding: Option, - -content_language: Option, - -content_length: Option, - -content_range: Option, - -content_type: Option, - -delete_marker: Option, - -e_tag: Option, - -error_code: Option, - -error_message: Option, - -expiration: Option, - -expires: Option, - -last_modified: Option, - -metadata: Option, - -missing_meta: Option, - -object_lock_legal_hold_status: Option, - -object_lock_mode: Option, - -object_lock_retain_until_date: Option, - -parts_count: Option, - -replication_status: Option, - -request_charged: Option, - -request_route: Option, - -request_token: Option, - -restore: Option, - -sse_customer_algorithm: Option, - -sse_customer_key_md5: Option, - -ssekms_key_id: Option, - -server_side_encryption: Option, - -status_code: Option, - -storage_class: Option, - -tag_count: Option, - -version_id: Option, +pub type FetchOwner = bool; -} +pub type FieldDelimiter = String; -impl WriteGetObjectResponseInputBuilder { -pub fn set_accept_ranges(&mut self, field: Option) -> &mut Self { - self.accept_ranges = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct FileHeaderInfo(Cow<'static, str>); -pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; -self -} +impl FileHeaderInfo { + pub const IGNORE: &'static str = "IGNORE"; -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} + pub const NONE: &'static str = "NONE"; -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} + pub const USE: &'static str = "USE"; -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self +impl From for FileHeaderInfo { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self +impl From for Cow<'static, str> { + fn from(s: FileHeaderInfo) -> Self { + s.0 + } } -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self +impl FromStr for FileHeaderInfo { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self +///

    Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned +/// to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of +/// the object key name. A prefix is a specific string of characters at the beginning of an +/// object key name, which you can use to organize objects. For example, you can start the key +/// names of related objects with a prefix, such as 2023- or +/// engineering/. Then, you can use FilterRule to find objects in +/// a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it +/// is at the end of the object key name instead of at the beginning.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct FilterRule { + ///

    The object key name prefix or suffix identifying one or more objects to which the + /// filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and + /// suffixes are not supported. For more information, see Configuring Event Notifications + /// in the Amazon S3 User Guide.

    + pub name: Option, + ///

    The value that the filter searches for in object key names.

    + pub value: Option, } -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self +impl fmt::Debug for FilterRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("FilterRule"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.value { + d.field("value", val); + } + d.finish_non_exhaustive() + } } -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} +///

    A list of containers for the key-value pair that defines the criteria for the filter +/// rule.

    +pub type FilterRuleList = List; -pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct FilterRuleName(Cow<'static, str>); -pub fn set_content_range(&mut self, field: Option) -> &mut Self { - self.content_range = field; -self -} +impl FilterRuleName { + pub const PREFIX: &'static str = "prefix"; -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} + pub const SUFFIX: &'static str = "suffix"; -pub fn set_delete_marker(&mut self, field: Option) -> &mut Self { - self.delete_marker = field; -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -pub fn set_e_tag(&mut self, field: Option) -> &mut Self { - self.e_tag = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -pub fn set_error_code(&mut self, field: Option) -> &mut Self { - self.error_code = field; -self +impl From for FilterRuleName { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -pub fn set_error_message(&mut self, field: Option) -> &mut Self { - self.error_message = field; -self +impl From for Cow<'static, str> { + fn from(s: FilterRuleName) -> Self { + s.0 + } } -pub fn set_expiration(&mut self, field: Option) -> &mut Self { - self.expiration = field; -self +impl FromStr for FilterRuleName { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} +pub type FilterRuleValue = String; -pub fn set_last_modified(&mut self, field: Option) -> &mut Self { - self.last_modified = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAccelerateConfigurationInput { + ///

    The name of the bucket for which the accelerate configuration is retrieved.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub request_payer: Option, } -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self +impl fmt::Debug for GetBucketAccelerateConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAccelerateConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.finish_non_exhaustive() + } } -pub fn set_missing_meta(&mut self, field: Option) -> &mut Self { - self.missing_meta = field; -self +impl GetBucketAccelerateConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketAccelerateConfigurationInputBuilder { + default() + } } -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAccelerateConfigurationOutput { + pub request_charged: Option, + ///

    The accelerate configuration of the bucket.

    + pub status: Option, } -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self +impl fmt::Debug for GetBucketAccelerateConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAccelerateConfigurationOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAclInput { + ///

    Specifies the S3 bucket whose ACL is being requested.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -pub fn set_parts_count(&mut self, field: Option) -> &mut Self { - self.parts_count = field; -self +impl fmt::Debug for GetBucketAclInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAclInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -pub fn set_replication_status(&mut self, field: Option) -> &mut Self { - self.replication_status = field; -self +impl GetBucketAclInput { + #[must_use] + pub fn builder() -> builders::GetBucketAclInputBuilder { + default() + } } -pub fn set_request_charged(&mut self, field: Option) -> &mut Self { - self.request_charged = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAclOutput { + ///

    A list of grants.

    + pub grants: Option, + ///

    Container for the bucket owner's display name and ID.

    + pub owner: Option, } -pub fn set_request_route(&mut self, field: RequestRoute) -> &mut Self { - self.request_route = Some(field); -self +impl fmt::Debug for GetBucketAclOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAclOutput"); + if let Some(ref val) = self.grants { + d.field("grants", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + d.finish_non_exhaustive() + } } -pub fn set_request_token(&mut self, field: RequestToken) -> &mut Self { - self.request_token = Some(field); -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAnalyticsConfigurationInput { + ///

    The name of the bucket from which an analytics configuration is retrieved.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID that identifies the analytics configuration.

    + pub id: AnalyticsId, } -pub fn set_restore(&mut self, field: Option) -> &mut Self { - self.restore = field; -self +impl fmt::Debug for GetBucketAnalyticsConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAnalyticsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self +impl GetBucketAnalyticsConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketAnalyticsConfigurationInputBuilder { + default() + } } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAnalyticsConfigurationOutput { + ///

    The configuration and any analyses for the analytics filter.

    + pub analytics_configuration: Option, } -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self +impl fmt::Debug for GetBucketAnalyticsConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAnalyticsConfigurationOutput"); + if let Some(ref val) = self.analytics_configuration { + d.field("analytics_configuration", val); + } + d.finish_non_exhaustive() + } } -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketCorsInput { + ///

    The bucket name for which to get the cors configuration.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -pub fn set_status_code(&mut self, field: Option) -> &mut Self { - self.status_code = field; -self +impl fmt::Debug for GetBucketCorsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketCorsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self +impl GetBucketCorsInput { + #[must_use] + pub fn builder() -> builders::GetBucketCorsInputBuilder { + default() + } } -pub fn set_tag_count(&mut self, field: Option) -> &mut Self { - self.tag_count = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketCorsOutput { + ///

    A set of origins and methods (cross-origin access that you want to allow). You can add + /// up to 100 rules to the configuration.

    + pub cors_rules: Option, } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self +impl fmt::Debug for GetBucketCorsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketCorsOutput"); + if let Some(ref val) = self.cors_rules { + d.field("cors_rules", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn accept_ranges(mut self, field: Option) -> Self { - self.accept_ranges = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketEncryptionInput { + ///

    The name of the bucket from which the server-side encryption configuration is + /// retrieved.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    + pub expected_bucket_owner: Option, } -#[must_use] -pub fn body(mut self, field: Option) -> Self { - self.body = field; -self +impl fmt::Debug for GetBucketEncryptionInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketEncryptionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self +impl GetBucketEncryptionInput { + #[must_use] + pub fn builder() -> builders::GetBucketEncryptionInputBuilder { + default() + } } -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketEncryptionOutput { + pub server_side_encryption_configuration: Option, } -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self +impl fmt::Debug for GetBucketEncryptionOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketEncryptionOutput"); + if let Some(ref val) = self.server_side_encryption_configuration { + d.field("server_side_encryption_configuration", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketIntelligentTieringConfigurationInput { + ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, + ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, } -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self +impl fmt::Debug for GetBucketIntelligentTieringConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationInput"); + d.field("bucket", &self.bucket); + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self +impl GetBucketIntelligentTieringConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketIntelligentTieringConfigurationInputBuilder { + default() + } } -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketIntelligentTieringConfigurationOutput { + ///

    Container for S3 Intelligent-Tiering configuration.

    + pub intelligent_tiering_configuration: Option, } -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self +impl fmt::Debug for GetBucketIntelligentTieringConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationOutput"); + if let Some(ref val) = self.intelligent_tiering_configuration { + d.field("intelligent_tiering_configuration", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketInventoryConfigurationInput { + ///

    The name of the bucket containing the inventory configuration to retrieve.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, } -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self +impl fmt::Debug for GetBucketInventoryConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketInventoryConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; -self +impl GetBucketInventoryConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketInventoryConfigurationInputBuilder { + default() + } } -#[must_use] -pub fn content_range(mut self, field: Option) -> Self { - self.content_range = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketInventoryConfigurationOutput { + ///

    Specifies the inventory configuration.

    + pub inventory_configuration: Option, } -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self +impl fmt::Debug for GetBucketInventoryConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketInventoryConfigurationOutput"); + if let Some(ref val) = self.inventory_configuration { + d.field("inventory_configuration", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn delete_marker(mut self, field: Option) -> Self { - self.delete_marker = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLifecycleConfigurationInput { + ///

    The name of the bucket for which to get the lifecycle information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub expected_bucket_owner: Option, } -#[must_use] -pub fn e_tag(mut self, field: Option) -> Self { - self.e_tag = field; -self +impl fmt::Debug for GetBucketLifecycleConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLifecycleConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn error_code(mut self, field: Option) -> Self { - self.error_code = field; -self +impl GetBucketLifecycleConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketLifecycleConfigurationInputBuilder { + default() + } } -#[must_use] -pub fn error_message(mut self, field: Option) -> Self { - self.error_message = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLifecycleConfigurationOutput { + ///

    Container for a lifecycle rule.

    + pub rules: Option, + ///

    Indicates which default minimum object size behavior is applied to the lifecycle + /// configuration.

    + /// + ///

    This parameter applies to general purpose buckets only. It isn't supported for + /// directory bucket lifecycle configurations.

    + ///
    + ///
      + ///
    • + ///

      + /// all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

      + ///
    • + ///
    • + ///

      + /// varies_by_storage_class - Objects smaller than 128 KB will + /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By + /// default, all other storage classes will prevent transitions smaller than 128 KB. + ///

      + ///
    • + ///
    + ///

    To customize the minimum object size for any transition you can add a filter that + /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in + /// the body of your transition rule. Custom filters always take precedence over the default + /// transition behavior.

    + pub transition_default_minimum_object_size: Option, } -#[must_use] -pub fn expiration(mut self, field: Option) -> Self { - self.expiration = field; -self +impl fmt::Debug for GetBucketLifecycleConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLifecycleConfigurationOutput"); + if let Some(ref val) = self.rules { + d.field("rules", val); + } + if let Some(ref val) = self.transition_default_minimum_object_size { + d.field("transition_default_minimum_object_size", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLocationInput { + ///

    The name of the bucket for which to get the location.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -#[must_use] -pub fn last_modified(mut self, field: Option) -> Self { - self.last_modified = field; -self +impl fmt::Debug for GetBucketLocationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLocationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self +impl GetBucketLocationInput { + #[must_use] + pub fn builder() -> builders::GetBucketLocationInputBuilder { + default() + } } -#[must_use] -pub fn missing_meta(mut self, field: Option) -> Self { - self.missing_meta = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLocationOutput { + ///

    Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported + /// location constraints by Region, see Regions and Endpoints.

    + ///

    Buckets in Region us-east-1 have a LocationConstraint of + /// null. Buckets with a LocationConstraint of EU reside in eu-west-1.

    + pub location_constraint: Option, } -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self +impl fmt::Debug for GetBucketLocationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLocationOutput"); + if let Some(ref val) = self.location_constraint { + d.field("location_constraint", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLoggingInput { + ///

    The bucket name for which to get the logging information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self +impl fmt::Debug for GetBucketLoggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLoggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn parts_count(mut self, field: Option) -> Self { - self.parts_count = field; -self +impl GetBucketLoggingInput { + #[must_use] + pub fn builder() -> builders::GetBucketLoggingInputBuilder { + default() + } } -#[must_use] -pub fn replication_status(mut self, field: Option) -> Self { - self.replication_status = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLoggingOutput { + pub logging_enabled: Option, } -#[must_use] -pub fn request_charged(mut self, field: Option) -> Self { - self.request_charged = field; -self +impl fmt::Debug for GetBucketLoggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLoggingOutput"); + if let Some(ref val) = self.logging_enabled { + d.field("logging_enabled", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn request_route(mut self, field: RequestRoute) -> Self { - self.request_route = Some(field); -self +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetadataTableConfigurationInput { + ///

    + /// The general purpose bucket that contains the metadata table configuration that you want to retrieve. + ///

    + pub bucket: BucketName, + ///

    + /// The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. + ///

    + pub expected_bucket_owner: Option, } -#[must_use] -pub fn request_token(mut self, field: RequestToken) -> Self { - self.request_token = Some(field); -self +impl fmt::Debug for GetBucketMetadataTableConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetadataTableConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn restore(mut self, field: Option) -> Self { - self.restore = field; -self +impl GetBucketMetadataTableConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketMetadataTableConfigurationInputBuilder { + default() + } } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn status_code(mut self, field: Option) -> Self { - self.status_code = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tag_count(mut self, field: Option) -> Self { - self.tag_count = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let accept_ranges = self.accept_ranges; -let body = self.body; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_length = self.content_length; -let content_range = self.content_range; -let content_type = self.content_type; -let delete_marker = self.delete_marker; -let e_tag = self.e_tag; -let error_code = self.error_code; -let error_message = self.error_message; -let expiration = self.expiration; -let expires = self.expires; -let last_modified = self.last_modified; -let metadata = self.metadata; -let missing_meta = self.missing_meta; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let parts_count = self.parts_count; -let replication_status = self.replication_status; -let request_charged = self.request_charged; -let request_route = self.request_route.ok_or_else(|| BuildError::missing_field("request_route"))?; -let request_token = self.request_token.ok_or_else(|| BuildError::missing_field("request_token"))?; -let restore = self.restore; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let status_code = self.status_code; -let storage_class = self.storage_class; -let tag_count = self.tag_count; -let version_id = self.version_id; -Ok(WriteGetObjectResponseInput { -accept_ranges, -body, -bucket_key_enabled, -cache_control, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_range, -content_type, -delete_marker, -e_tag, -error_code, -error_message, -expiration, -expires, -last_modified, -metadata, -missing_meta, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -parts_count, -replication_status, -request_charged, -request_route, -request_token, -restore, -sse_customer_algorithm, -sse_customer_key_md5, -ssekms_key_id, -server_side_encryption, -status_code, -storage_class, -tag_count, -version_id, -}) +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetadataTableConfigurationOutput { + ///

    + /// The metadata table configuration for the general purpose bucket. + ///

    + pub get_bucket_metadata_table_configuration_result: Option, } +impl fmt::Debug for GetBucketMetadataTableConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetadataTableConfigurationOutput"); + if let Some(ref val) = self.get_bucket_metadata_table_configuration_result { + d.field("get_bucket_metadata_table_configuration_result", val); + } + d.finish_non_exhaustive() + } } - -} -pub trait DtoExt { - /// Modifies all empty string fields from `Some("")` to `None` - fn ignore_empty_strings(&mut self); -} -impl DtoExt for AbortIncompleteMultipartUpload { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for AbortMultipartUploadInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -} -} -impl DtoExt for AbortMultipartUploadOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} -} -impl DtoExt for AccelerateConfiguration { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; -} -} -} -impl DtoExt for AccessControlPolicy { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -} -} -impl DtoExt for AccessControlTranslation { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for AnalyticsAndOperator { - fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} -} -impl DtoExt for AnalyticsConfiguration { - fn ignore_empty_strings(&mut self) { -self.storage_class_analysis.ignore_empty_strings(); -} -} -impl DtoExt for AnalyticsExportDestination { - fn ignore_empty_strings(&mut self) { -self.s3_bucket_destination.ignore_empty_strings(); -} -} -impl DtoExt for AnalyticsS3BucketDestination { - fn ignore_empty_strings(&mut self) { -if self.bucket_account_id.as_deref() == Some("") { - self.bucket_account_id = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} -} -impl DtoExt for AssumeRoleOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.assumed_role_user { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.credentials { -val.ignore_empty_strings(); -} -if self.source_identity.as_deref() == Some("") { - self.source_identity = None; -} -} -} -impl DtoExt for AssumedRoleUser { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for Bucket { - fn ignore_empty_strings(&mut self) { -if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; -} -if self.name.as_deref() == Some("") { - self.name = None; -} -} -} -impl DtoExt for BucketInfo { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.data_redundancy - && val.as_str() == "" { - self.data_redundancy = None; -} -if let Some(ref val) = self.type_ - && val.as_str() == "" { - self.type_ = None; -} -} -} -impl DtoExt for BucketLifecycleConfiguration { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for BucketLoggingStatus { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.logging_enabled { -val.ignore_empty_strings(); -} -} -} -impl DtoExt for CORSConfiguration { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for CORSRule { - fn ignore_empty_strings(&mut self) { -if self.id.as_deref() == Some("") { - self.id = None; -} -} -} -impl DtoExt for CSVInput { - fn ignore_empty_strings(&mut self) { -if self.comments.as_deref() == Some("") { - self.comments = None; -} -if self.field_delimiter.as_deref() == Some("") { - self.field_delimiter = None; -} -if let Some(ref val) = self.file_header_info - && val.as_str() == "" { - self.file_header_info = None; -} -if self.quote_character.as_deref() == Some("") { - self.quote_character = None; -} -if self.quote_escape_character.as_deref() == Some("") { - self.quote_escape_character = None; -} -if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; -} -} -} -impl DtoExt for CSVOutput { - fn ignore_empty_strings(&mut self) { -if self.field_delimiter.as_deref() == Some("") { - self.field_delimiter = None; -} -if self.quote_character.as_deref() == Some("") { - self.quote_character = None; -} -if self.quote_escape_character.as_deref() == Some("") { - self.quote_escape_character = None; -} -if let Some(ref val) = self.quote_fields - && val.as_str() == "" { - self.quote_fields = None; -} -if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; -} -} -} -impl DtoExt for Checksum { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -} -} -impl DtoExt for CommonPrefix { - fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} -} -impl DtoExt for CompleteMultipartUploadInput { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; +///

    +/// The metadata table configuration for a general purpose bucket. +///

    +#[derive(Clone, PartialEq)] +pub struct GetBucketMetadataTableConfigurationResult { + ///

    + /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + /// unable to create the table, this structure contains the error code and error message. + ///

    + pub error: Option, + ///

    + /// The metadata table configuration for a general purpose bucket. + ///

    + pub metadata_table_configuration_result: MetadataTableConfigurationResult, + ///

    + /// The status of the metadata table. The status values are: + ///

    + ///
      + ///
    • + ///

      + /// CREATING - The metadata table is in the process of being created in the + /// specified table bucket.

      + ///
    • + ///
    • + ///

      + /// ACTIVE - The metadata table has been created successfully and records + /// are being delivered to the table. + ///

      + ///
    • + ///
    • + ///

      + /// FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver + /// records. See ErrorDetails for details.

      + ///
    • + ///
    + pub status: MetadataTableStatus, } -if let Some(ref mut val) = self.multipart_upload { -val.ignore_empty_strings(); + +impl fmt::Debug for GetBucketMetadataTableConfigurationResult { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetadataTableConfigurationResult"); + if let Some(ref val) = self.error { + d.field("error", val); + } + d.field("metadata_table_configuration_result", &self.metadata_table_configuration_result); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetricsConfigurationInput { + ///

    The name of the bucket containing the metrics configuration to retrieve.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and + /// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +impl fmt::Debug for GetBucketMetricsConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetricsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; + +impl GetBucketMetricsConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketMetricsConfigurationInputBuilder { + default() + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetricsConfigurationOutput { + ///

    Specifies the metrics configuration.

    + pub metrics_configuration: Option, } + +impl fmt::Debug for GetBucketMetricsConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetricsConfigurationOutput"); + if let Some(ref val) = self.metrics_configuration { + d.field("metrics_configuration", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketNotificationConfigurationInput { + ///

    The name of the bucket for which to get the notification configuration.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl DtoExt for CompleteMultipartUploadOutput { - fn ignore_empty_strings(&mut self) { -if self.bucket.as_deref() == Some("") { - self.bucket = None; + +impl fmt::Debug for GetBucketNotificationConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketNotificationConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + +impl GetBucketNotificationConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketNotificationConfigurationInputBuilder { + default() + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; + +///

    A container for specifying the notification configuration of the bucket. If this element +/// is empty, notifications are turned off for the bucket.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketNotificationConfigurationOutput { + ///

    Enables delivery of events to Amazon EventBridge.

    + pub event_bridge_configuration: Option, + ///

    Describes the Lambda functions to invoke and the events for which to invoke + /// them.

    + pub lambda_function_configurations: Option, + ///

    The Amazon Simple Queue Service queues to publish messages to and the events for which + /// to publish messages.

    + pub queue_configurations: Option, + ///

    The topic to which notifications are sent and the events for which notifications are + /// generated.

    + pub topic_configurations: Option, } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; + +impl fmt::Debug for GetBucketNotificationConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketNotificationConfigurationOutput"); + if let Some(ref val) = self.event_bridge_configuration { + d.field("event_bridge_configuration", val); + } + if let Some(ref val) = self.lambda_function_configurations { + d.field("lambda_function_configurations", val); + } + if let Some(ref val) = self.queue_configurations { + d.field("queue_configurations", val); + } + if let Some(ref val) = self.topic_configurations { + d.field("topic_configurations", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketOwnershipControlsInput { + ///

    The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. + ///

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; + +impl fmt::Debug for GetBucketOwnershipControlsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketOwnershipControlsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; + +impl GetBucketOwnershipControlsInput { + #[must_use] + pub fn builder() -> builders::GetBucketOwnershipControlsInputBuilder { + default() + } } -if self.expiration.as_deref() == Some("") { - self.expiration = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketOwnershipControlsOutput { + ///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or + /// ObjectWriter) currently in effect for this Amazon S3 bucket.

    + pub ownership_controls: Option, } -if self.key.as_deref() == Some("") { - self.key = None; + +impl fmt::Debug for GetBucketOwnershipControlsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketOwnershipControlsOutput"); + if let Some(ref val) = self.ownership_controls { + d.field("ownership_controls", val); + } + d.finish_non_exhaustive() + } } -if self.location.as_deref() == Some("") { - self.location = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyInput { + ///

    The bucket name to get the bucket policy for.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    + ///

    + /// Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    + /// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for GetBucketPolicyInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketPolicyInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +impl GetBucketPolicyInput { + #[must_use] + pub fn builder() -> builders::GetBucketPolicyInputBuilder { + default() + } } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyOutput { + ///

    The bucket policy as a JSON document.

    + pub policy: Option, } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl fmt::Debug for GetBucketPolicyOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketPolicyOutput"); + if let Some(ref val) = self.policy { + d.field("policy", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyStatusInput { + ///

    The name of the Amazon S3 bucket whose policy status you want to retrieve.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } + +impl fmt::Debug for GetBucketPolicyStatusInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketPolicyStatusInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for CompletedMultipartUpload { - fn ignore_empty_strings(&mut self) { + +impl GetBucketPolicyStatusInput { + #[must_use] + pub fn builder() -> builders::GetBucketPolicyStatusInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyStatusOutput { + ///

    The policy status for the specified bucket.

    + pub policy_status: Option, } -impl DtoExt for CompletedPart { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + +impl fmt::Debug for GetBucketPolicyStatusOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketPolicyStatusOutput"); + if let Some(ref val) = self.policy_status { + d.field("policy_status", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketReplicationInput { + ///

    The bucket name for which to get the replication information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; + +impl fmt::Debug for GetBucketReplicationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketReplicationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; + +impl GetBucketReplicationInput { + #[must_use] + pub fn builder() -> builders::GetBucketReplicationInputBuilder { + default() + } } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketReplicationOutput { + pub replication_configuration: Option, } + +impl fmt::Debug for GetBucketReplicationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketReplicationOutput"); + if let Some(ref val) = self.replication_configuration { + d.field("replication_configuration", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketRequestPaymentInput { + ///

    The name of the bucket for which to get the payment request configuration

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl DtoExt for Condition { - fn ignore_empty_strings(&mut self) { -if self.http_error_code_returned_equals.as_deref() == Some("") { - self.http_error_code_returned_equals = None; + +impl fmt::Debug for GetBucketRequestPaymentInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketRequestPaymentInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if self.key_prefix_equals.as_deref() == Some("") { - self.key_prefix_equals = None; + +impl GetBucketRequestPaymentInput { + #[must_use] + pub fn builder() -> builders::GetBucketRequestPaymentInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketRequestPaymentOutput { + ///

    Specifies who pays for the download and request fees.

    + pub payer: Option, } + +impl fmt::Debug for GetBucketRequestPaymentOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketRequestPaymentOutput"); + if let Some(ref val) = self.payer { + d.field("payer", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for CopyObjectInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketTaggingInput { + ///

    The name of the bucket for which to get the tagging information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; + +impl fmt::Debug for GetBucketTaggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; + +impl GetBucketTaggingInput { + #[must_use] + pub fn builder() -> builders::GetBucketTaggingInputBuilder { + default() + } } -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketTaggingOutput { + ///

    Contains the tag set.

    + pub tag_set: TagSet, } -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; + +impl fmt::Debug for GetBucketTaggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketTaggingOutput"); + d.field("tag_set", &self.tag_set); + d.finish_non_exhaustive() + } } -if self.content_language.as_deref() == Some("") { - self.content_language = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketVersioningInput { + ///

    The name of the bucket for which to get the versioning information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { - self.copy_source_sse_customer_algorithm = None; + +impl fmt::Debug for GetBucketVersioningInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketVersioningInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if self.copy_source_sse_customer_key.as_deref() == Some("") { - self.copy_source_sse_customer_key = None; + +impl GetBucketVersioningInput { + #[must_use] + pub fn builder() -> builders::GetBucketVersioningInputBuilder { + default() + } } -if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { - self.copy_source_sse_customer_key_md5 = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketVersioningOutput { + ///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This + /// element is only returned if the bucket has been configured with MFA delete. If the bucket + /// has never been so configured, this element is not returned.

    + pub mfa_delete: Option, + ///

    The versioning state of the bucket.

    + pub status: Option, } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for GetBucketVersioningOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketVersioningOutput"); + if let Some(ref val) = self.mfa_delete { + d.field("mfa_delete", val); + } + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } -if self.expected_source_bucket_owner.as_deref() == Some("") { - self.expected_source_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketWebsiteInput { + ///

    The bucket name for which to get the website configuration.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; + +impl fmt::Debug for GetBucketWebsiteInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketWebsiteInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; + +impl GetBucketWebsiteInput { + #[must_use] + pub fn builder() -> builders::GetBucketWebsiteInputBuilder { + default() + } } -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketWebsiteOutput { + ///

    The object key name of the website error document to use for 4XX class errors.

    + pub error_document: Option, + ///

    The name of the index document for the website (for example + /// index.html).

    + pub index_document: Option, + ///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 + /// bucket.

    + pub redirect_all_requests_to: Option, + ///

    Rules that define when a redirect is applied and the redirect behavior.

    + pub routing_rules: Option, } -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; + +impl fmt::Debug for GetBucketWebsiteOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketWebsiteOutput"); + if let Some(ref val) = self.error_document { + d.field("error_document", val); + } + if let Some(ref val) = self.index_document { + d.field("index_document", val); + } + if let Some(ref val) = self.redirect_all_requests_to { + d.field("redirect_all_requests_to", val); + } + if let Some(ref val) = self.routing_rules { + d.field("routing_rules", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.metadata_directive - && val.as_str() == "" { - self.metadata_directive = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAclInput { + ///

    The bucket name that contains the object for which to get the ACL information.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The key of the object for which to get the ACL information.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    Version ID used to reference a specific version of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; + +impl fmt::Debug for GetObjectAclInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAclInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; + +impl GetObjectAclInput { + #[must_use] + pub fn builder() -> builders::GetObjectAclInputBuilder { + default() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAclOutput { + ///

    A list of grants.

    + pub grants: Option, + ///

    Container for the bucket owner's display name and ID.

    + pub owner: Option, + pub request_charged: Option, } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +impl fmt::Debug for GetObjectAclOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAclOutput"); + if let Some(ref val) = self.grants { + d.field("grants", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesInput { + ///

    The name of the bucket that contains the object.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The object key.

    + pub key: ObjectKey, + ///

    Sets the maximum number of parts to return.

    + pub max_parts: Option, + ///

    Specifies the fields at the root level that you want returned in the response. Fields + /// that you do not specify are not returned.

    + pub object_attributes: ObjectAttributesList, + ///

    Specifies the part after which listing should begin. Only parts with higher part numbers + /// will be listed.

    + pub part_number_marker: Option, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    The version ID used to reference a specific version of the object.

    + /// + ///

    S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the + /// versionId query parameter in the request.

    + ///
    + pub version_id: Option, } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +impl fmt::Debug for GetObjectAttributesInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAttributesInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.max_parts { + d.field("max_parts", val); + } + d.field("object_attributes", &self.object_attributes); + if let Some(ref val) = self.part_number_marker { + d.field("part_number_marker", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; + +impl GetObjectAttributesInput { + #[must_use] + pub fn builder() -> builders::GetObjectAttributesInputBuilder { + default() + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesOutput { + ///

    The checksum or digest of the object.

    + pub checksum: Option, + ///

    Specifies whether the object retrieved was (true) or was not + /// (false) a delete marker. If false, this response header does + /// not appear in the response. To learn more about delete markers, see Working with delete markers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub delete_marker: Option, + ///

    An ETag is an opaque identifier assigned by a web server to a specific version of a + /// resource found at a URL.

    + pub e_tag: Option, + ///

    Date and time when the object was last modified.

    + pub last_modified: Option, + ///

    A collection of parts associated with a multipart upload.

    + pub object_parts: Option, + ///

    The size of the object in bytes.

    + pub object_size: Option, + pub request_charged: Option, + ///

    Provides the storage class information of the object. Amazon S3 returns this header for all + /// objects except for S3 Standard storage class objects.

    + ///

    For more information, see Storage Classes.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    The version ID of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +impl fmt::Debug for GetObjectAttributesOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAttributesOutput"); + if let Some(ref val) = self.checksum { + d.field("checksum", val); + } + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.object_parts { + d.field("object_parts", val); + } + if let Some(ref val) = self.object_size { + d.field("object_size", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; + +///

    A collection of parts associated with a multipart upload.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesParts { + ///

    Indicates whether the returned list of parts is truncated. A value of true + /// indicates that the list was truncated. A list can be truncated if the number of parts + /// exceeds the limit returned in the MaxParts element.

    + pub is_truncated: Option, + ///

    The maximum number of parts allowed in the response.

    + pub max_parts: Option, + ///

    When a list is truncated, this element specifies the last part in the list, as well as + /// the value to use for the PartNumberMarker request parameter in a subsequent + /// request.

    + pub next_part_number_marker: Option, + ///

    The marker for the current part.

    + pub part_number_marker: Option, + ///

    A container for elements related to a particular part. A response can contain zero or + /// more Parts elements.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - For + /// GetObjectAttributes, if a additional checksum (including + /// x-amz-checksum-crc32, x-amz-checksum-crc32c, + /// x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't + /// applied to the object specified in the request, the response doesn't return + /// Part.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - For + /// GetObjectAttributes, no matter whether a additional checksum is + /// applied to the object specified in the request, the response returns + /// Part.

      + ///
    • + ///
    + ///
    + pub parts: Option, + ///

    The total number of parts.

    + pub total_parts_count: Option, } -if self.tagging.as_deref() == Some("") { - self.tagging = None; + +impl fmt::Debug for GetObjectAttributesParts { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAttributesParts"); + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.max_parts { + d.field("max_parts", val); + } + if let Some(ref val) = self.next_part_number_marker { + d.field("next_part_number_marker", val); + } + if let Some(ref val) = self.part_number_marker { + d.field("part_number_marker", val); + } + if let Some(ref val) = self.parts { + d.field("parts", val); + } + if let Some(ref val) = self.total_parts_count { + d.field("total_parts_count", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.tagging_directive - && val.as_str() == "" { - self.tagging_directive = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectInput { + ///

    The bucket name containing the object.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    To retrieve the checksum, this mode must be enabled.

    + pub checksum_mode: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Return the object only if its entity tag (ETag) is the same as the one specified in this + /// header; otherwise, return a 412 Precondition Failed error.

    + ///

    If both of the If-Match and If-Unmodified-Since headers are + /// present in the request as follows: If-Match condition evaluates to + /// true, and; If-Unmodified-Since condition evaluates to + /// false; then, S3 returns 200 OK and the data requested.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_match: Option, + ///

    Return the object only if it has been modified since the specified time; otherwise, + /// return a 304 Not Modified error.

    + ///

    If both of the If-None-Match and If-Modified-Since headers are + /// present in the request as follows: If-None-Match condition evaluates to + /// false, and; If-Modified-Since condition evaluates to + /// true; then, S3 returns 304 Not Modified status code.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_modified_since: Option, + ///

    Return the object only if its entity tag (ETag) is different from the one specified in + /// this header; otherwise, return a 304 Not Modified error.

    + ///

    If both of the If-None-Match and If-Modified-Since headers are + /// present in the request as follows: If-None-Match condition evaluates to + /// false, and; If-Modified-Since condition evaluates to + /// true; then, S3 returns 304 Not Modified HTTP status + /// code.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_none_match: Option, + ///

    Return the object only if it has not been modified since the specified time; otherwise, + /// return a 412 Precondition Failed error.

    + ///

    If both of the If-Match and If-Unmodified-Since headers are + /// present in the request as follows: If-Match condition evaluates to + /// true, and; If-Unmodified-Since condition evaluates to + /// false; then, S3 returns 200 OK and the data requested.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_unmodified_since: Option, + ///

    Key of the object to get.

    + pub key: ObjectKey, + ///

    Part number of the object being read. This is a positive integer between 1 and 10,000. + /// Effectively performs a 'ranged' GET request for the part specified. Useful for downloading + /// just a part of an object.

    + pub part_number: Option, + ///

    Downloads the specified byte range of an object. For more information about the HTTP + /// Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

    + /// + ///

    Amazon S3 doesn't support retrieving multiple ranges of data per GET + /// request.

    + ///
    + pub range: Option, + pub request_payer: Option, + ///

    Sets the Cache-Control header of the response.

    + pub response_cache_control: Option, + ///

    Sets the Content-Disposition header of the response.

    + pub response_content_disposition: Option, + ///

    Sets the Content-Encoding header of the response.

    + pub response_content_encoding: Option, + ///

    Sets the Content-Language header of the response.

    + pub response_content_language: Option, + ///

    Sets the Content-Type header of the response.

    + pub response_content_type: Option, + ///

    Sets the Expires header of the response.

    + pub response_expires: Option, + ///

    Specifies the algorithm to use when decrypting the object (for example, + /// AES256).

    + ///

    If you encrypt an object by using server-side encryption with customer-provided + /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, + /// you must use the following headers:

    + ///
      + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-algorithm + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key-MD5 + ///

      + ///
    • + ///
    + ///

    For more information about SSE-C, see Server-Side Encryption + /// (Using Customer-Provided Encryption Keys) in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key that you originally provided for Amazon S3 to + /// encrypt the data before storing it. This value is used to decrypt the object when + /// recovering it and must match the one used when storing the data. The key must be + /// appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + ///

    If you encrypt an object by using server-side encryption with customer-provided + /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, + /// you must use the following headers:

    + ///
      + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-algorithm + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key-MD5 + ///

      + ///
    • + ///
    + ///

    For more information about SSE-C, see Server-Side Encryption + /// (Using Customer-Provided Encryption Keys) in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to + /// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption + /// key was transmitted without error.

    + ///

    If you encrypt an object by using server-side encryption with customer-provided + /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, + /// you must use the following headers:

    + ///
      + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-algorithm + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key-MD5 + ///

      + ///
    • + ///
    + ///

    For more information about SSE-C, see Server-Side Encryption + /// (Using Customer-Provided Encryption Keys) in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Version ID used to reference a specific version of the object.

    + ///

    By default, the GetObject operation returns the current version of an + /// object. To return a different version, use the versionId subresource.

    + /// + ///
      + ///
    • + ///

      If you include a versionId in your request header, you must have + /// the s3:GetObjectVersion permission to access a specific version of an + /// object. The s3:GetObject permission is not required in this + /// scenario.

      + ///
    • + ///
    • + ///

      If you request the current version of an object without a specific + /// versionId in the request header, only the + /// s3:GetObject permission is required. The + /// s3:GetObjectVersion permission is not required in this + /// scenario.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the + /// versionId query parameter in the request.

      + ///
    • + ///
    + ///
    + ///

    For more information about versioning, see PutBucketVersioning.

    + pub version_id: Option, } -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; + +impl fmt::Debug for GetObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_mode { + d.field("checksum_mode", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_modified_since { + d.field("if_modified_since", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + if let Some(ref val) = self.if_unmodified_since { + d.field("if_unmodified_since", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + if let Some(ref val) = self.range { + d.field("range", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.response_cache_control { + d.field("response_cache_control", val); + } + if let Some(ref val) = self.response_content_disposition { + d.field("response_content_disposition", val); + } + if let Some(ref val) = self.response_content_encoding { + d.field("response_content_encoding", val); + } + if let Some(ref val) = self.response_content_language { + d.field("response_content_language", val); + } + if let Some(ref val) = self.response_content_type { + d.field("response_content_type", val); + } + if let Some(ref val) = self.response_expires { + d.field("response_expires", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +impl GetObjectInput { + #[must_use] + pub fn builder() -> builders::GetObjectInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLegalHoldInput { + ///

    The bucket name containing the object whose legal hold status you want to retrieve.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The key name for the object whose legal hold status you want to retrieve.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    The version ID of the object whose legal hold status you want to retrieve.

    + pub version_id: Option, } -impl DtoExt for CopyObjectOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.copy_object_result { -val.ignore_empty_strings(); + +impl fmt::Debug for GetObjectLegalHoldInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectLegalHoldInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if self.copy_source_version_id.as_deref() == Some("") { - self.copy_source_version_id = None; + +impl GetObjectLegalHoldInput { + #[must_use] + pub fn builder() -> builders::GetObjectLegalHoldInputBuilder { + default() + } } -if self.expiration.as_deref() == Some("") { - self.expiration = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLegalHoldOutput { + ///

    The current legal hold status for the specified object.

    + pub legal_hold: Option, } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for GetObjectLegalHoldOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectLegalHoldOutput"); + if let Some(ref val) = self.legal_hold { + d.field("legal_hold", val); + } + d.finish_non_exhaustive() + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLockConfigurationInput { + ///

    The bucket whose Object Lock configuration you want to retrieve.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +impl fmt::Debug for GetObjectLockConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectLockConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; + +impl GetObjectLockConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetObjectLockConfigurationInputBuilder { + default() + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLockConfigurationOutput { + ///

    The specified bucket's Object Lock configuration.

    + pub object_lock_configuration: Option, } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +impl fmt::Debug for GetObjectLockConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectLockConfigurationOutput"); + if let Some(ref val) = self.object_lock_configuration { + d.field("object_lock_configuration", val); + } + d.finish_non_exhaustive() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +#[derive(Default)] +pub struct GetObjectOutput { + ///

    Indicates that a range of bytes was specified in the request.

    + pub accept_ranges: Option, + ///

    Object data.

    + pub body: Option, + ///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with + /// Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more + /// information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    The checksum type, which determines how part-level checksums are combined to create an + /// object-level checksum for multipart objects. You can use this header response to verify + /// that the checksum type that is received is the same checksum type that was specified in the + /// CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Specifies presentational information for the object.

    + pub content_disposition: Option, + ///

    Indicates what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    Size of the body in bytes.

    + pub content_length: Option, + ///

    The portion of the object returned in the response.

    + pub content_range: Option, + ///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, + ///

    Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If + /// false, this response header does not appear in the response.

    + /// + ///
      + ///
    • + ///

      If the current version of the object is a delete marker, Amazon S3 behaves as if the + /// object was deleted and includes x-amz-delete-marker: true in the + /// response.

      + ///
    • + ///
    • + ///

      If the specified version in the request is a delete marker, the response + /// returns a 405 Method Not Allowed error and the Last-Modified: + /// timestamp response header.

      + ///
    • + ///
    + ///
    + pub delete_marker: Option, + ///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific + /// version of a resource found at a URL.

    + pub e_tag: Option, + ///

    If the object expiration is configured (see + /// PutBucketLifecycleConfiguration + /// ), the response includes this + /// header. It includes the expiry-date and rule-id key-value pairs + /// providing object expiration information. The value of the rule-id is + /// URL-encoded.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    + pub expiration: Option, + ///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, + ///

    Date and time when the object was last modified.

    + ///

    + /// General purpose buckets - When you specify a + /// versionId of the object in your request, if the specified version in the + /// request is a delete marker, the response returns a 405 Method Not Allowed + /// error and the Last-Modified: timestamp response header.

    + pub last_modified: Option, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    This is set to the number of metadata entries not returned in the headers that are + /// prefixed with x-amz-meta-. This can happen if you create metadata using an API + /// like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, + /// you can create metadata whose values are not legal HTTP headers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub missing_meta: Option, + ///

    Indicates whether this object has an active legal hold. This field is only returned if + /// you have permission to view an object's legal hold status.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_legal_hold_status: Option, + ///

    The Object Lock mode that's currently in place for this object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_mode: Option, + ///

    The date and time when this object's Object Lock will expire.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_retain_until_date: Option, + ///

    The count of parts this object has. This value is only returned if you specify + /// partNumber in your request and the object was uploaded as a multipart + /// upload.

    + pub parts_count: Option, + ///

    Amazon S3 can return this if your request involves a bucket that is either a source or + /// destination in a replication rule.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub replication_status: Option, + pub request_charged: Option, + ///

    Provides information about object restoration action and expiration time of the restored + /// object copy.

    + /// + ///

    This functionality is not supported for directory buckets. + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub restore: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, + ///

    Provides storage class information of the object. Amazon S3 returns this header for all + /// objects except for S3 Standard storage class objects.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    The number of tags, if any, on the object, when you have the relevant permission to read + /// object tags.

    + ///

    You can use GetObjectTagging to retrieve + /// the tag set associated with an object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub tag_count: Option, + ///

    Version ID of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub website_redirect_location: Option, } + +impl fmt::Debug for GetObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectOutput"); + if let Some(ref val) = self.accept_ranges { + d.field("accept_ranges", val); + } + if let Some(ref val) = self.body { + d.field("body", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_range { + d.field("content_range", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.missing_meta { + d.field("missing_meta", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.parts_count { + d.field("parts_count", val); + } + if let Some(ref val) = self.replication_status { + d.field("replication_status", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.restore { + d.field("restore", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tag_count { + d.field("tag_count", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + d.finish_non_exhaustive() + } } + +pub type GetObjectResponseStatusCode = i32; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectRetentionInput { + ///

    The bucket name containing the object whose retention settings you want to retrieve.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The key name for the object whose retention settings you want to retrieve.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    The version ID for the object whose retention settings you want to retrieve.

    + pub version_id: Option, } -impl DtoExt for CopyObjectResult { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + +impl fmt::Debug for GetObjectRetentionInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectRetentionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; + +impl GetObjectRetentionInput { + #[must_use] + pub fn builder() -> builders::GetObjectRetentionInputBuilder { + default() + } } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectRetentionOutput { + ///

    The container element for an object's retention settings.

    + pub retention: Option, } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; + +impl fmt::Debug for GetObjectRetentionOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectRetentionOutput"); + if let Some(ref val) = self.retention { + d.field("retention", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTaggingInput { + ///

    The bucket name containing the object for which to get the tagging information.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Object key for which to get the tagging information.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    The versionId of the object for which to get the tagging information.

    + pub version_id: Option, } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; + +impl fmt::Debug for GetObjectTaggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +impl GetObjectTaggingInput { + #[must_use] + pub fn builder() -> builders::GetObjectTaggingInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTaggingOutput { + ///

    Contains the tag set.

    + pub tag_set: TagSet, + ///

    The versionId of the object for which you got the tagging information.

    + pub version_id: Option, } -impl DtoExt for CopyPartResult { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + +impl fmt::Debug for GetObjectTaggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectTaggingOutput"); + d.field("tag_set", &self.tag_set); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTorrentInput { + ///

    The name of the bucket containing the object for which to get the torrent files.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The object key for which to get the information.

    + pub key: ObjectKey, + pub request_payer: Option, } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; + +impl fmt::Debug for GetObjectTorrentInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectTorrentInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; + +impl GetObjectTorrentInput { + #[must_use] + pub fn builder() -> builders::GetObjectTorrentInputBuilder { + default() + } } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; + +#[derive(Default)] +pub struct GetObjectTorrentOutput { + ///

    A Bencoded dictionary as defined by the BitTorrent specification

    + pub body: Option, + pub request_charged: Option, } + +impl fmt::Debug for GetObjectTorrentOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectTorrentOutput"); + if let Some(ref val) = self.body { + d.field("body", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetPublicAccessBlockInput { + ///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want + /// to retrieve.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl DtoExt for CreateBucketConfiguration { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.bucket { -val.ignore_empty_strings(); + +impl fmt::Debug for GetPublicAccessBlockInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetPublicAccessBlockInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref mut val) = self.location { -val.ignore_empty_strings(); + +impl GetPublicAccessBlockInput { + #[must_use] + pub fn builder() -> builders::GetPublicAccessBlockInputBuilder { + default() + } } -if let Some(ref val) = self.location_constraint - && val.as_str() == "" { - self.location_constraint = None; + +#[derive(Clone, Default, PartialEq)] +pub struct GetPublicAccessBlockOutput { + ///

    The PublicAccessBlock configuration currently in effect for this Amazon S3 + /// bucket.

    + pub public_access_block_configuration: Option, } + +impl fmt::Debug for GetPublicAccessBlockOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetPublicAccessBlockOutput"); + if let Some(ref val) = self.public_access_block_configuration { + d.field("public_access_block_configuration", val); + } + d.finish_non_exhaustive() + } } + +///

    Container for S3 Glacier job parameters.

    +#[derive(Clone, PartialEq)] +pub struct GlacierJobParameters { + ///

    Retrieval tier at which the restore will be processed.

    + pub tier: Tier, } -impl DtoExt for CreateBucketInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; + +impl fmt::Debug for GlacierJobParameters { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GlacierJobParameters"); + d.field("tier", &self.tier); + d.finish_non_exhaustive() + } } -if let Some(ref mut val) = self.create_bucket_configuration { -val.ignore_empty_strings(); + +///

    Container for grant information.

    +#[derive(Clone, Default, PartialEq)] +pub struct Grant { + ///

    The person being granted permissions.

    + pub grantee: Option, + ///

    Specifies the permission given to the grantee.

    + pub permission: Option, } -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; + +impl fmt::Debug for Grant { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Grant"); + if let Some(ref val) = self.grantee { + d.field("grantee", val); + } + if let Some(ref val) = self.permission { + d.field("permission", val); + } + d.finish_non_exhaustive() + } } -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; + +pub type GrantFullControl = String; + +pub type GrantRead = String; + +pub type GrantReadACP = String; + +pub type GrantWrite = String; + +pub type GrantWriteACP = String; + +///

    Container for the person being granted permissions.

    +#[derive(Clone, PartialEq)] +pub struct Grantee { + ///

    Screen name of the grantee.

    + pub display_name: Option, + ///

    Email address of the grantee.

    + /// + ///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    + ///
      + ///
    • + ///

      US East (N. Virginia)

      + ///
    • + ///
    • + ///

      US West (N. California)

      + ///
    • + ///
    • + ///

      US West (Oregon)

      + ///
    • + ///
    • + ///

      Asia Pacific (Singapore)

      + ///
    • + ///
    • + ///

      Asia Pacific (Sydney)

      + ///
    • + ///
    • + ///

      Asia Pacific (Tokyo)

      + ///
    • + ///
    • + ///

      Europe (Ireland)

      + ///
    • + ///
    • + ///

      South America (São Paulo)

      + ///
    • + ///
    + ///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    + ///
    + pub email_address: Option, + ///

    The canonical user ID of the grantee.

    + pub id: Option, + ///

    Type of grantee

    + pub type_: Type, + ///

    URI of the grantee group.

    + pub uri: Option, } -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; + +impl fmt::Debug for Grantee { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Grantee"); + if let Some(ref val) = self.display_name { + d.field("display_name", val); + } + if let Some(ref val) = self.email_address { + d.field("email_address", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.field("type_", &self.type_); + if let Some(ref val) = self.uri { + d.field("uri", val); + } + d.finish_non_exhaustive() + } } -if self.grant_write.as_deref() == Some("") { - self.grant_write = None; + +pub type Grants = List; + +#[derive(Clone, Default, PartialEq)] +pub struct HeadBucketInput { + ///

    The bucket name.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; + +impl fmt::Debug for HeadBucketInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("HeadBucketInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.object_ownership - && val.as_str() == "" { - self.object_ownership = None; + +impl HeadBucketInput { + #[must_use] + pub fn builder() -> builders::HeadBucketInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct HeadBucketOutput { + ///

    Indicates whether the bucket name used in the request is an access point alias.

    + /// + ///

    For directory buckets, the value of this field is false.

    + ///
    + pub access_point_alias: Option, + ///

    The name of the location where the bucket will be created.

    + ///

    For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

    + /// + ///

    This functionality is only supported by directory buckets.

    + ///
    + pub bucket_location_name: Option, + ///

    The type of location where the bucket is created.

    + /// + ///

    This functionality is only supported by directory buckets.

    + ///
    + pub bucket_location_type: Option, + ///

    The Region that the bucket is located.

    + pub bucket_region: Option, } + +impl fmt::Debug for HeadBucketOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("HeadBucketOutput"); + if let Some(ref val) = self.access_point_alias { + d.field("access_point_alias", val); + } + if let Some(ref val) = self.bucket_location_name { + d.field("bucket_location_name", val); + } + if let Some(ref val) = self.bucket_location_type { + d.field("bucket_location_type", val); + } + if let Some(ref val) = self.bucket_region { + d.field("bucket_region", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for CreateBucketMetadataTableConfigurationInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; + +#[derive(Clone, Default, PartialEq)] +pub struct HeadObjectInput { + ///

    The name of the bucket that contains the object.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    To retrieve the checksum, this parameter must be enabled.

    + ///

    + /// General purpose buckets - + /// If you enable checksum mode and the object is uploaded with a + /// checksum + /// and encrypted with an Key Management Service (KMS) key, you must have permission to use the + /// kms:Decrypt action to retrieve the checksum.

    + ///

    + /// Directory buckets - If you enable + /// ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service + /// (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and + /// kms:Decrypt permissions in IAM identity-based policies and KMS key + /// policies for the KMS key to retrieve the checksum of the object.

    + pub checksum_mode: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Return the object only if its entity tag (ETag) is the same as the one specified; + /// otherwise, return a 412 (precondition failed) error.

    + ///

    If both of the If-Match and If-Unmodified-Since headers are + /// present in the request as follows:

    + ///
      + ///
    • + ///

      + /// If-Match condition evaluates to true, and;

      + ///
    • + ///
    • + ///

      + /// If-Unmodified-Since condition evaluates to false;

      + ///
    • + ///
    + ///

    Then Amazon S3 returns 200 OK and the data requested.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_match: Option, + ///

    Return the object only if it has been modified since the specified time; otherwise, + /// return a 304 (not modified) error.

    + ///

    If both of the If-None-Match and If-Modified-Since headers are + /// present in the request as follows:

    + ///
      + ///
    • + ///

      + /// If-None-Match condition evaluates to false, and;

      + ///
    • + ///
    • + ///

      + /// If-Modified-Since condition evaluates to true;

      + ///
    • + ///
    + ///

    Then Amazon S3 returns the 304 Not Modified response code.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_modified_since: Option, + ///

    Return the object only if its entity tag (ETag) is different from the one specified; + /// otherwise, return a 304 (not modified) error.

    + ///

    If both of the If-None-Match and If-Modified-Since headers are + /// present in the request as follows:

    + ///
      + ///
    • + ///

      + /// If-None-Match condition evaluates to false, and;

      + ///
    • + ///
    • + ///

      + /// If-Modified-Since condition evaluates to true;

      + ///
    • + ///
    + ///

    Then Amazon S3 returns the 304 Not Modified response code.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_none_match: Option, + ///

    Return the object only if it has not been modified since the specified time; otherwise, + /// return a 412 (precondition failed) error.

    + ///

    If both of the If-Match and If-Unmodified-Since headers are + /// present in the request as follows:

    + ///
      + ///
    • + ///

      + /// If-Match condition evaluates to true, and;

      + ///
    • + ///
    • + ///

      + /// If-Unmodified-Since condition evaluates to false;

      + ///
    • + ///
    + ///

    Then Amazon S3 returns 200 OK and the data requested.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_unmodified_since: Option, + ///

    The object key.

    + pub key: ObjectKey, + ///

    Part number of the object being read. This is a positive integer between 1 and 10,000. + /// Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about + /// the size of the part and the number of parts in this object.

    + pub part_number: Option, + ///

    HeadObject returns only the metadata for an object. If the Range is satisfiable, only + /// the ContentLength is affected in the response. If the Range is not + /// satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

    + pub range: Option, + pub request_payer: Option, + ///

    Sets the Cache-Control header of the response.

    + pub response_cache_control: Option, + ///

    Sets the Content-Disposition header of the response.

    + pub response_content_disposition: Option, + ///

    Sets the Content-Encoding header of the response.

    + pub response_content_encoding: Option, + ///

    Sets the Content-Language header of the response.

    + pub response_content_language: Option, + ///

    Sets the Content-Type header of the response.

    + pub response_content_type: Option, + ///

    Sets the Expires header of the response.

    + pub response_expires: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Version ID used to reference a specific version of the object.

    + /// + ///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    + ///
    + pub version_id: Option, } -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; + +impl fmt::Debug for HeadObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("HeadObjectInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_mode { + d.field("checksum_mode", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_modified_since { + d.field("if_modified_since", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + if let Some(ref val) = self.if_unmodified_since { + d.field("if_unmodified_since", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + if let Some(ref val) = self.range { + d.field("range", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.response_cache_control { + d.field("response_cache_control", val); + } + if let Some(ref val) = self.response_content_disposition { + d.field("response_content_disposition", val); + } + if let Some(ref val) = self.response_content_encoding { + d.field("response_content_encoding", val); + } + if let Some(ref val) = self.response_content_language { + d.field("response_content_language", val); + } + if let Some(ref val) = self.response_content_type { + d.field("response_content_type", val); + } + if let Some(ref val) = self.response_expires { + d.field("response_expires", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl HeadObjectInput { + #[must_use] + pub fn builder() -> builders::HeadObjectInputBuilder { + default() + } } -self.metadata_table_configuration.ignore_empty_strings(); + +#[derive(Clone, Default, PartialEq)] +pub struct HeadObjectOutput { + ///

    Indicates that a range of bytes was specified.

    + pub accept_ranges: Option, + ///

    The archive state of the head object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub archive_status: Option, + ///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with + /// Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more + /// information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    The checksum type, which determines how part-level checksums are combined to create an + /// object-level checksum for multipart objects. You can use this header response to verify + /// that the checksum type that is received is the same checksum type that was specified in + /// CreateMultipartUpload request. For more + /// information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Specifies presentational information for the object.

    + pub content_disposition: Option, + ///

    Indicates what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    Size of the body in bytes.

    + pub content_length: Option, + ///

    The portion of the object returned in the response for a GET request.

    + pub content_range: Option, + ///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, + ///

    Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If + /// false, this response header does not appear in the response.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub delete_marker: Option, + ///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific + /// version of a resource found at a URL.

    + pub e_tag: Option, + ///

    If the object expiration is configured (see + /// PutBucketLifecycleConfiguration + /// ), the response includes this + /// header. It includes the expiry-date and rule-id key-value pairs + /// providing object expiration information. The value of the rule-id is + /// URL-encoded.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    + pub expiration: Option, + ///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, + ///

    Date and time when the object was last modified.

    + pub last_modified: Option, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    This is set to the number of metadata entries not returned in x-amz-meta + /// headers. This can happen if you create metadata using an API like SOAP that supports more + /// flexible metadata than the REST API. For example, using SOAP, you can create metadata whose + /// values are not legal HTTP headers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub missing_meta: Option, + ///

    Specifies whether a legal hold is in effect for this object. This header is only + /// returned if the requester has the s3:GetObjectLegalHold permission. This + /// header is not returned if the specified version of this object has never had a legal hold + /// applied. For more information about S3 Object Lock, see Object Lock.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_legal_hold_status: Option, + ///

    The Object Lock mode, if any, that's in effect for this object. This header is only + /// returned if the requester has the s3:GetObjectRetention permission. For more + /// information about S3 Object Lock, see Object Lock.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_mode: Option, + ///

    The date and time when the Object Lock retention period expires. This header is only + /// returned if the requester has the s3:GetObjectRetention permission.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_retain_until_date: Option, + ///

    The count of parts this object has. This value is only returned if you specify + /// partNumber in your request and the object was uploaded as a multipart + /// upload.

    + pub parts_count: Option, + ///

    Amazon S3 can return this header if your request involves a bucket that is either a source or + /// a destination in a replication rule.

    + ///

    In replication, you have a source bucket on which you configure replication and + /// destination bucket or buckets where Amazon S3 stores object replicas. When you request an object + /// (GetObject) or object metadata (HeadObject) from these + /// buckets, Amazon S3 will return the x-amz-replication-status header in the response + /// as follows:

    + ///
      + ///
    • + ///

      + /// If requesting an object from the source bucket, + /// Amazon S3 will return the x-amz-replication-status header if the object in + /// your request is eligible for replication.

      + ///

      For example, suppose that in your replication configuration, you specify object + /// prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix + /// TaxDocs. Any objects you upload with this key name prefix, for + /// example TaxDocs/document1.pdf, are eligible for replication. For any + /// object request with this key name prefix, Amazon S3 will return the + /// x-amz-replication-status header with value PENDING, COMPLETED or + /// FAILED indicating object replication status.

      + ///
    • + ///
    • + ///

      + /// If requesting an object from a destination + /// bucket, Amazon S3 will return the x-amz-replication-status header + /// with value REPLICA if the object in your request is a replica that Amazon S3 created and + /// there is no replica modification replication in progress.

      + ///
    • + ///
    • + ///

      + /// When replicating objects to multiple destination + /// buckets, the x-amz-replication-status header acts + /// differently. The header of the source object will only return a value of COMPLETED + /// when replication is successful to all destinations. The header will remain at value + /// PENDING until replication has completed for all destinations. If one or more + /// destinations fails replication the header will return FAILED.

      + ///
    • + ///
    + ///

    For more information, see Replication.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub replication_status: Option, + pub request_charged: Option, + ///

    If the object is an archived object (an object whose storage class is GLACIER), the + /// response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

    + ///

    If an archive copy is already restored, the header value indicates when Amazon S3 is + /// scheduled to delete the object copy. For example:

    + ///

    + /// x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 + /// GMT" + ///

    + ///

    If the object restoration is in progress, the header returns the value + /// ongoing-request="true".

    + ///

    For more information about archiving objects, see Transitioning Objects: General Considerations.

    + /// + ///

    This functionality is not supported for directory buckets. + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub restore: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms, aws:kms:dsse).

    + pub server_side_encryption: Option, + ///

    Provides storage class information of the object. Amazon S3 returns this header for all + /// objects except for S3 Standard storage class objects.

    + ///

    For more information, see Storage Classes.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    Version ID of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub website_redirect_location: Option, } + +impl fmt::Debug for HeadObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("HeadObjectOutput"); + if let Some(ref val) = self.accept_ranges { + d.field("accept_ranges", val); + } + if let Some(ref val) = self.archive_status { + d.field("archive_status", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_range { + d.field("content_range", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.missing_meta { + d.field("missing_meta", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.parts_count { + d.field("parts_count", val); + } + if let Some(ref val) = self.replication_status { + d.field("replication_status", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.restore { + d.field("restore", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for CreateBucketOutput { - fn ignore_empty_strings(&mut self) { -if self.location.as_deref() == Some("") { - self.location = None; + +pub type HostName = String; + +pub type HttpErrorCodeReturnedEquals = String; + +pub type HttpRedirectCode = String; + +pub type ID = String; + +pub type IfMatch = ETagCondition; + +pub type IfMatchInitiatedTime = Timestamp; + +pub type IfMatchLastModifiedTime = Timestamp; + +pub type IfMatchSize = i64; + +pub type IfModifiedSince = Timestamp; + +pub type IfNoneMatch = ETagCondition; + +pub type IfUnmodifiedSince = Timestamp; + +///

    Container for the Suffix element.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IndexDocument { + ///

    A suffix that is appended to a request that is for a directory on the website endpoint. + /// (For example, if the suffix is index.html and you make a request to + /// samplebucket/images/, the data that is returned will be for the object with + /// the key name images/index.html.) The suffix must not be empty and must not + /// include a slash character.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub suffix: Suffix, } + +impl fmt::Debug for IndexDocument { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("IndexDocument"); + d.field("suffix", &self.suffix); + d.finish_non_exhaustive() + } } + +pub type Initiated = Timestamp; + +///

    Container element that identifies who initiated the multipart upload.

    +#[derive(Clone, Default, PartialEq)] +pub struct Initiator { + ///

    Name of the Principal.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub display_name: Option, + ///

    If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the + /// principal is an IAM User, it provides a user ARN value.

    + /// + ///

    + /// Directory buckets - If the principal is an + /// Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it + /// provides a user ARN value.

    + ///
    + pub id: Option, } -impl DtoExt for CreateMultipartUploadInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; + +impl fmt::Debug for Initiator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Initiator"); + if let Some(ref val) = self.display_name { + d.field("display_name", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.finish_non_exhaustive() + } } -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; + +///

    Describes the serialization format of the object.

    +#[derive(Clone, Default, PartialEq)] +pub struct InputSerialization { + ///

    Describes the serialization of a CSV-encoded object.

    + pub csv: Option, + ///

    Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: + /// NONE.

    + pub compression_type: Option, + ///

    Specifies JSON as object's input serialization format.

    + pub json: Option, + ///

    Specifies Parquet as object's input serialization format.

    + pub parquet: Option, } -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; + +impl fmt::Debug for InputSerialization { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InputSerialization"); + if let Some(ref val) = self.csv { + d.field("csv", val); + } + if let Some(ref val) = self.compression_type { + d.field("compression_type", val); + } + if let Some(ref val) = self.json { + d.field("json", val); + } + if let Some(ref val) = self.parquet { + d.field("parquet", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct IntelligentTieringAccessTier(Cow<'static, str>); + +impl IntelligentTieringAccessTier { + pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; + + pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; + +impl From for IntelligentTieringAccessTier { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; + +impl From for Cow<'static, str> { + fn from(s: IntelligentTieringAccessTier) -> Self { + s.0 + } } -if self.content_language.as_deref() == Some("") { - self.content_language = None; + +impl FromStr for IntelligentTieringAccessTier { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +///

    A container for specifying S3 Intelligent-Tiering filters. The filters determine the +/// subset of objects to which the rule applies.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringAndOperator { + ///

    An object key name prefix that identifies the subset of objects to which the + /// configuration applies.

    + pub prefix: Option, + ///

    All of these tags must exist in the object's tag set in order for the configuration to + /// apply.

    + pub tags: Option, } -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; + +impl fmt::Debug for IntelligentTieringAndOperator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("IntelligentTieringAndOperator"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; + +///

    Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

    +///

    For information about the S3 Intelligent-Tiering storage class, see Storage class +/// for automatically optimizing frequently and infrequently accessed +/// objects.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringConfiguration { + ///

    Specifies a bucket filter. The configuration only includes objects that meet the + /// filter's criteria.

    + pub filter: Option, + ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, + ///

    Specifies the status of the configuration.

    + pub status: IntelligentTieringStatus, + ///

    Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

    + pub tierings: TieringList, } -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; + +impl fmt::Debug for IntelligentTieringConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("IntelligentTieringConfiguration"); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + d.field("id", &self.id); + d.field("status", &self.status); + d.field("tierings", &self.tierings); + d.finish_non_exhaustive() + } } -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; + +impl Default for IntelligentTieringConfiguration { + fn default() -> Self { + Self { + filter: None, + id: default(), + status: String::new().into(), + tierings: default(), + } + } } -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; + +pub type IntelligentTieringConfigurationList = List; + +pub type IntelligentTieringDays = i32; + +///

    The Filter is used to identify objects that the S3 Intelligent-Tiering +/// configuration applies to.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringFilter { + ///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. + /// The operator must have at least two predicates, and an object must match all of the + /// predicates in order for the filter to apply.

    + pub and: Option, + ///

    An object key name prefix that identifies the subset of objects to which the rule + /// applies.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + pub tag: Option, } -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; + +impl fmt::Debug for IntelligentTieringFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("IntelligentTieringFilter"); + if let Some(ref val) = self.and { + d.field("and", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tag { + d.field("tag", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +pub type IntelligentTieringId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct IntelligentTieringStatus(Cow<'static, str>); + +impl IntelligentTieringStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +impl From for IntelligentTieringStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; + +impl From for Cow<'static, str> { + fn from(s: IntelligentTieringStatus) -> Self { + s.0 + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +impl FromStr for IntelligentTieringStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; + +///

    Object is archived and inaccessible until restored.

    +///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage +/// class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access +/// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you +/// must first restore a copy using RestoreObject. Otherwise, this +/// operation returns an InvalidObjectState error. For information about restoring +/// archived objects, see Restoring Archived Objects in +/// the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq)] +pub struct InvalidObjectState { + pub access_tier: Option, + pub storage_class: Option, } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +impl fmt::Debug for InvalidObjectState { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InvalidObjectState"); + if let Some(ref val) = self.access_tier { + d.field("access_tier", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +///

    You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

    +///
      +///
    • +///

      Cannot specify both a write offset value and user-defined object metadata for existing objects.

      +///
    • +///
    • +///

      Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

      +///
    • +///
    • +///

      Request body cannot be empty when 'write offset' is specified.

      +///
    • +///
    +#[derive(Clone, Default, PartialEq)] +pub struct InvalidRequest {} + +impl fmt::Debug for InvalidRequest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InvalidRequest"); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; + +///

    +/// The write offset value that you specified does not match the current object size. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct InvalidWriteOffset {} + +impl fmt::Debug for InvalidWriteOffset { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InvalidWriteOffset"); + d.finish_non_exhaustive() + } } -if self.tagging.as_deref() == Some("") { - self.tagging = None; + +///

    Specifies the inventory configuration for an Amazon S3 bucket. For more information, see +/// GET Bucket inventory in the Amazon S3 API Reference.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryConfiguration { + ///

    Contains information about where to publish the inventory results.

    + pub destination: InventoryDestination, + ///

    Specifies an inventory filter. The inventory only includes objects that meet the + /// filter's criteria.

    + pub filter: Option, + ///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, + ///

    Object versions to include in the inventory list. If set to All, the list + /// includes all the object versions, which adds the version-related fields + /// VersionId, IsLatest, and DeleteMarker to the + /// list. If set to Current, the list does not contain these version-related + /// fields.

    + pub included_object_versions: InventoryIncludedObjectVersions, + ///

    Specifies whether the inventory is enabled or disabled. If set to True, an + /// inventory list is generated. If set to False, no inventory list is + /// generated.

    + pub is_enabled: IsEnabled, + ///

    Contains the optional fields that are included in the inventory results.

    + pub optional_fields: Option, + ///

    Specifies the schedule for generating inventory results.

    + pub schedule: InventorySchedule, } -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; + +impl fmt::Debug for InventoryConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryConfiguration"); + d.field("destination", &self.destination); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + d.field("id", &self.id); + d.field("included_object_versions", &self.included_object_versions); + d.field("is_enabled", &self.is_enabled); + if let Some(ref val) = self.optional_fields { + d.field("optional_fields", val); + } + d.field("schedule", &self.schedule); + d.finish_non_exhaustive() + } } + +impl Default for InventoryConfiguration { + fn default() -> Self { + Self { + destination: default(), + filter: None, + id: default(), + included_object_versions: String::new().into(), + is_enabled: default(), + optional_fields: None, + schedule: default(), + } + } } + +pub type InventoryConfigurationList = List; + +///

    Specifies the inventory configuration for an Amazon S3 bucket.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryDestination { + ///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) + /// where inventory results are published.

    + pub s3_bucket_destination: InventoryS3BucketDestination, } -impl DtoExt for CreateMultipartUploadOutput { - fn ignore_empty_strings(&mut self) { -if self.abort_rule_id.as_deref() == Some("") { - self.abort_rule_id = None; + +impl fmt::Debug for InventoryDestination { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryDestination"); + d.field("s3_bucket_destination", &self.s3_bucket_destination); + d.finish_non_exhaustive() + } } -if self.bucket.as_deref() == Some("") { - self.bucket = None; + +impl Default for InventoryDestination { + fn default() -> Self { + Self { + s3_bucket_destination: default(), + } + } } -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; + +///

    Contains the type of server-side encryption used to encrypt the inventory +/// results.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct InventoryEncryption { + ///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    + pub ssekms: Option, + ///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    + pub sses3: Option, } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; + +impl fmt::Debug for InventoryEncryption { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryEncryption"); + if let Some(ref val) = self.ssekms { + d.field("ssekms", val); + } + if let Some(ref val) = self.sses3 { + d.field("sses3", val); + } + d.finish_non_exhaustive() + } } -if self.key.as_deref() == Some("") { - self.key = None; + +///

    Specifies an inventory filter. The inventory only includes objects that meet the +/// filter's criteria.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct InventoryFilter { + ///

    The prefix that an object must have to be included in the inventory results.

    + pub prefix: Prefix, } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for InventoryFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryFilter"); + d.field("prefix", &self.prefix); + d.finish_non_exhaustive() + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryFormat(Cow<'static, str>); + +impl InventoryFormat { + pub const CSV: &'static str = "CSV"; + + pub const ORC: &'static str = "ORC"; + + pub const PARQUET: &'static str = "Parquet"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +impl From for InventoryFormat { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; + +impl From for Cow<'static, str> { + fn from(s: InventoryFormat) -> Self { + s.0 + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +impl FromStr for InventoryFormat { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryFrequency(Cow<'static, str>); + +impl InventoryFrequency { + pub const DAILY: &'static str = "Daily"; + + pub const WEEKLY: &'static str = "Weekly"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.upload_id.as_deref() == Some("") { - self.upload_id = None; + +impl From for InventoryFrequency { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: InventoryFrequency) -> Self { + s.0 + } } + +impl FromStr for InventoryFrequency { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for CreateSessionInput { - fn ignore_empty_strings(&mut self) { -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; + +pub type InventoryId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryIncludedObjectVersions(Cow<'static, str>); + +impl InventoryIncludedObjectVersions { + pub const ALL: &'static str = "All"; + + pub const CURRENT: &'static str = "Current"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +impl From for InventoryIncludedObjectVersions { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +impl From for Cow<'static, str> { + fn from(s: InventoryIncludedObjectVersions) -> Self { + s.0 + } } -if let Some(ref val) = self.session_mode - && val.as_str() == "" { - self.session_mode = None; + +impl FromStr for InventoryIncludedObjectVersions { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryOptionalField(Cow<'static, str>); + +impl InventoryOptionalField { + pub const BUCKET_KEY_STATUS: &'static str = "BucketKeyStatus"; + + pub const CHECKSUM_ALGORITHM: &'static str = "ChecksumAlgorithm"; + + pub const E_TAG: &'static str = "ETag"; + + pub const ENCRYPTION_STATUS: &'static str = "EncryptionStatus"; + + pub const INTELLIGENT_TIERING_ACCESS_TIER: &'static str = "IntelligentTieringAccessTier"; + + pub const IS_MULTIPART_UPLOADED: &'static str = "IsMultipartUploaded"; + + pub const LAST_MODIFIED_DATE: &'static str = "LastModifiedDate"; + + pub const OBJECT_ACCESS_CONTROL_LIST: &'static str = "ObjectAccessControlList"; + + pub const OBJECT_LOCK_LEGAL_HOLD_STATUS: &'static str = "ObjectLockLegalHoldStatus"; + + pub const OBJECT_LOCK_MODE: &'static str = "ObjectLockMode"; + + pub const OBJECT_LOCK_RETAIN_UNTIL_DATE: &'static str = "ObjectLockRetainUntilDate"; + + pub const OBJECT_OWNER: &'static str = "ObjectOwner"; + + pub const REPLICATION_STATUS: &'static str = "ReplicationStatus"; + + pub const SIZE: &'static str = "Size"; + + pub const STORAGE_CLASS: &'static str = "StorageClass"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for InventoryOptionalField { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for CreateSessionOutput { - fn ignore_empty_strings(&mut self) { -self.credentials.ignore_empty_strings(); -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; + +impl From for Cow<'static, str> { + fn from(s: InventoryOptionalField) -> Self { + s.0 + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +impl FromStr for InventoryOptionalField { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +pub type InventoryOptionalFields = List; + +///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) +/// where inventory results are published.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryS3BucketDestination { + ///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the + /// owner is not validated before exporting data.

    + /// + ///

    Although this value is optional, we strongly recommend that you set it to help + /// prevent problems if the destination bucket ownership changes.

    + ///
    + pub account_id: Option, + ///

    The Amazon Resource Name (ARN) of the bucket where inventory results will be + /// published.

    + pub bucket: BucketName, + ///

    Contains the type of server-side encryption used to encrypt the inventory + /// results.

    + pub encryption: Option, + ///

    Specifies the output format of the inventory results.

    + pub format: InventoryFormat, + ///

    The prefix that is prepended to all inventory results.

    + pub prefix: Option, } + +impl fmt::Debug for InventoryS3BucketDestination { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryS3BucketDestination"); + if let Some(ref val) = self.account_id { + d.field("account_id", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.encryption { + d.field("encryption", val); + } + d.field("format", &self.format); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } + +impl Default for InventoryS3BucketDestination { + fn default() -> Self { + Self { + account_id: None, + bucket: default(), + encryption: None, + format: String::new().into(), + prefix: None, + } + } } -impl DtoExt for Credentials { - fn ignore_empty_strings(&mut self) { + +///

    Specifies the schedule for generating inventory results.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventorySchedule { + ///

    Specifies how frequently inventory results are produced.

    + pub frequency: InventoryFrequency, } + +impl fmt::Debug for InventorySchedule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventorySchedule"); + d.field("frequency", &self.frequency); + d.finish_non_exhaustive() + } } -impl DtoExt for DefaultRetention { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.mode - && val.as_str() == "" { - self.mode = None; + +impl Default for InventorySchedule { + fn default() -> Self { + Self { + frequency: String::new().into(), + } + } } + +pub type IsEnabled = bool; + +pub type IsLatest = bool; + +pub type IsPublic = bool; + +pub type IsRestoreInProgress = bool; + +pub type IsTruncated = bool; + +///

    Specifies JSON as object's input serialization format.

    +#[derive(Clone, Default, PartialEq)] +pub struct JSONInput { + ///

    The type of JSON. Valid values: Document, Lines.

    + pub type_: Option, } + +impl fmt::Debug for JSONInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("JSONInput"); + if let Some(ref val) = self.type_ { + d.field("type_", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for Delete { - fn ignore_empty_strings(&mut self) { + +///

    Specifies JSON as request's output serialization format.

    +#[derive(Clone, Default, PartialEq)] +pub struct JSONOutput { + ///

    The value used to separate individual records in the output. If no value is specified, + /// Amazon S3 uses a newline character ('\n').

    + pub record_delimiter: Option, } + +impl fmt::Debug for JSONOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("JSONOutput"); + if let Some(ref val) = self.record_delimiter { + d.field("record_delimiter", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteBucketAnalyticsConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct JSONType(Cow<'static, str>); + +impl JSONType { + pub const DOCUMENT: &'static str = "DOCUMENT"; + + pub const LINES: &'static str = "LINES"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for JSONType { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: JSONType) -> Self { + s.0 + } } -impl DtoExt for DeleteBucketCorsInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl FromStr for JSONType { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type KMSContext = String; + +pub type KeyCount = i32; + +pub type KeyMarker = String; + +pub type KeyPrefixEquals = String; + +pub type LambdaFunctionArn = String; + +///

    A container for specifying the configuration for Lambda notifications.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LambdaFunctionConfiguration { + ///

    The Amazon S3 bucket event for which to invoke the Lambda function. For more information, + /// see Supported + /// Event Types in the Amazon S3 User Guide.

    + pub events: EventList, + pub filter: Option, + pub id: Option, + ///

    The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the + /// specified event type occurs.

    + pub lambda_function_arn: LambdaFunctionArn, } + +impl fmt::Debug for LambdaFunctionConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LambdaFunctionConfiguration"); + d.field("events", &self.events); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.field("lambda_function_arn", &self.lambda_function_arn); + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteBucketEncryptionInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +pub type LambdaFunctionConfigurationList = List; + +pub type LastModified = Timestamp; + +pub type LastModifiedTime = Timestamp; + +///

    Container for the expiration for the lifecycle of the object.

    +///

    For more information see, Managing your storage +/// lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleExpiration { + ///

    Indicates at what date the object is to be moved or deleted. The date value must conform + /// to the ISO 8601 format. The time is always midnight UTC.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub date: Option, + ///

    Indicates the lifetime, in days, of the objects that are subject to the rule. The value + /// must be a non-zero positive integer.

    + pub days: Option, + ///

    Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set + /// to true, the delete marker will be expired; if set to false the policy takes no action. + /// This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub expired_object_delete_marker: Option, } + +impl fmt::Debug for LifecycleExpiration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LifecycleExpiration"); + if let Some(ref val) = self.date { + d.field("date", val); + } + if let Some(ref val) = self.days { + d.field("days", val); + } + if let Some(ref val) = self.expired_object_delete_marker { + d.field("expired_object_delete_marker", val); + } + d.finish_non_exhaustive() + } } + +///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    +///

    For more information see, Managing your storage +/// lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRule { + pub abort_incomplete_multipart_upload: Option, + ///

    Specifies the expiration for the lifecycle of the object in the form of date, days and, + /// whether the object has a delete marker.

    + pub expiration: Option, + ///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A + /// Filter must have exactly one of Prefix, Tag, or + /// And specified. Filter is required if the + /// LifecycleRule does not contain a Prefix element.

    + /// + ///

    + /// Tag filters are not supported for directory buckets.

    + ///
    + pub filter: Option, + ///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    + pub id: Option, + pub noncurrent_version_expiration: Option, + ///

    Specifies the transition rule for the lifecycle rule that describes when noncurrent + /// objects transition to a specific storage class. If your bucket is versioning-enabled (or + /// versioning is suspended), you can set this action to request that Amazon S3 transition + /// noncurrent object versions to a specific storage class at a set period in the object's + /// lifetime.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub noncurrent_version_transitions: Option, + ///

    Prefix identifying one or more objects to which the rule applies. This is + /// no longer used; use Filter instead.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + ///

    If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not + /// currently being applied.

    + pub status: ExpirationStatus, + ///

    Specifies when an Amazon S3 object transitions to a specified storage class.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub transitions: Option, } -impl DtoExt for DeleteBucketInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for LifecycleRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LifecycleRule"); + if let Some(ref val) = self.abort_incomplete_multipart_upload { + d.field("abort_incomplete_multipart_upload", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + if let Some(ref val) = self.noncurrent_version_expiration { + d.field("noncurrent_version_expiration", val); + } + if let Some(ref val) = self.noncurrent_version_transitions { + d.field("noncurrent_version_transitions", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.field("status", &self.status); + if let Some(ref val) = self.transitions { + d.field("transitions", val); + } + d.finish_non_exhaustive() + } } + +///

    This is used in a Lifecycle Rule Filter to apply a logical AND to two or more +/// predicates. The Lifecycle Rule will apply to any object matching all of the predicates +/// configured inside the And operator.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRuleAndOperator { + ///

    Minimum object size to which the rule applies.

    + pub object_size_greater_than: Option, + ///

    Maximum object size to which the rule applies.

    + pub object_size_less_than: Option, + ///

    Prefix identifying one or more objects to which the rule applies.

    + pub prefix: Option, + ///

    All of these tags must exist in the object's tag set in order for the rule to + /// apply.

    + pub tags: Option, } + +impl fmt::Debug for LifecycleRuleAndOperator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LifecycleRuleAndOperator"); + if let Some(ref val) = self.object_size_greater_than { + d.field("object_size_greater_than", val); + } + if let Some(ref val) = self.object_size_less_than { + d.field("object_size_less_than", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteBucketIntelligentTieringConfigurationInput { - fn ignore_empty_strings(&mut self) { + +///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A +/// Filter can have exactly one of Prefix, Tag, +/// ObjectSizeGreaterThan, ObjectSizeLessThan, or And +/// specified. If the Filter element is left empty, the Lifecycle Rule applies to +/// all objects in the bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRuleFilter { + pub and: Option, + ///

    Minimum object size to which the rule applies.

    + pub object_size_greater_than: Option, + ///

    Maximum object size to which the rule applies.

    + pub object_size_less_than: Option, + ///

    Prefix identifying one or more objects to which the rule applies.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + ///

    This tag must exist in the object's tag set in order for the rule to apply.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub tag: Option, } + +impl fmt::Debug for LifecycleRuleFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LifecycleRuleFilter"); + if let Some(ref val) = self.and { + d.field("and", val); + } + if let Some(ref val) = self.object_size_greater_than { + d.field("object_size_greater_than", val); + } + if let Some(ref val) = self.object_size_less_than { + d.field("object_size_less_than", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tag { + d.field("tag", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteBucketInventoryConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +pub type LifecycleRules = List; + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketAnalyticsConfigurationsInput { + ///

    The name of the bucket from which analytics configurations are retrieved.

    + pub bucket: BucketName, + ///

    The ContinuationToken that represents a placeholder from where this request + /// should begin.

    + pub continuation_token: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } + +impl fmt::Debug for ListBucketAnalyticsConfigurationsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } + +impl ListBucketAnalyticsConfigurationsInput { + #[must_use] + pub fn builder() -> builders::ListBucketAnalyticsConfigurationsInputBuilder { + default() + } } -impl DtoExt for DeleteBucketLifecycleInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketAnalyticsConfigurationsOutput { + ///

    The list of analytics configurations for a bucket.

    + pub analytics_configuration_list: Option, + ///

    The marker that is used as a starting point for this analytics configuration list + /// response. This value is present if it was sent in the request.

    + pub continuation_token: Option, + ///

    Indicates whether the returned list of analytics configurations is complete. A value of + /// true indicates that the list is not complete and the NextContinuationToken will be provided + /// for a subsequent request.

    + pub is_truncated: Option, + ///

    + /// NextContinuationToken is sent when isTruncated is true, which + /// indicates that there are more analytics configurations to list. The next request must + /// include this NextContinuationToken. The token is obfuscated and is not a + /// usable value.

    + pub next_continuation_token: Option, } + +impl fmt::Debug for ListBucketAnalyticsConfigurationsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsOutput"); + if let Some(ref val) = self.analytics_configuration_list { + d.field("analytics_configuration_list", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketIntelligentTieringConfigurationsInput { + ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, + ///

    The ContinuationToken that represents a placeholder from where this request + /// should begin.

    + pub continuation_token: Option, } -impl DtoExt for DeleteBucketMetadataTableConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for ListBucketIntelligentTieringConfigurationsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + d.finish_non_exhaustive() + } } + +impl ListBucketIntelligentTieringConfigurationsInput { + #[must_use] + pub fn builder() -> builders::ListBucketIntelligentTieringConfigurationsInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketIntelligentTieringConfigurationsOutput { + ///

    The ContinuationToken that represents a placeholder from where this request + /// should begin.

    + pub continuation_token: Option, + ///

    The list of S3 Intelligent-Tiering configurations for a bucket.

    + pub intelligent_tiering_configuration_list: Option, + ///

    Indicates whether the returned list of analytics configurations is complete. A value of + /// true indicates that the list is not complete and the + /// NextContinuationToken will be provided for a subsequent request.

    + pub is_truncated: Option, + ///

    The marker used to continue this inventory configuration listing. Use the + /// NextContinuationToken from this response to continue the listing in a + /// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    + pub next_continuation_token: Option, } -impl DtoExt for DeleteBucketMetricsConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for ListBucketIntelligentTieringConfigurationsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsOutput"); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.intelligent_tiering_configuration_list { + d.field("intelligent_tiering_configuration_list", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketInventoryConfigurationsInput { + ///

    The name of the bucket containing the inventory configurations to retrieve.

    + pub bucket: BucketName, + ///

    The marker used to continue an inventory configuration listing that has been truncated. + /// Use the NextContinuationToken from a previously truncated list response to + /// continue the listing. The continuation token is an opaque value that Amazon S3 + /// understands.

    + pub continuation_token: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } + +impl fmt::Debug for ListBucketInventoryConfigurationsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketInventoryConfigurationsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteBucketOwnershipControlsInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl ListBucketInventoryConfigurationsInput { + #[must_use] + pub fn builder() -> builders::ListBucketInventoryConfigurationsInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketInventoryConfigurationsOutput { + ///

    If sent in the request, the marker that is used as a starting point for this inventory + /// configuration list response.

    + pub continuation_token: Option, + ///

    The list of inventory configurations for a bucket.

    + pub inventory_configuration_list: Option, + ///

    Tells whether the returned list of inventory configurations is complete. A value of true + /// indicates that the list is not complete and the NextContinuationToken is provided for a + /// subsequent request.

    + pub is_truncated: Option, + ///

    The marker used to continue this inventory configuration listing. Use the + /// NextContinuationToken from this response to continue the listing in a + /// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    + pub next_continuation_token: Option, } + +impl fmt::Debug for ListBucketInventoryConfigurationsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketInventoryConfigurationsOutput"); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.inventory_configuration_list { + d.field("inventory_configuration_list", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteBucketPolicyInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketMetricsConfigurationsInput { + ///

    The name of the bucket containing the metrics configurations to retrieve.

    + pub bucket: BucketName, + ///

    The marker that is used to continue a metrics configuration listing that has been + /// truncated. Use the NextContinuationToken from a previously truncated list + /// response to continue the listing. The continuation token is an opaque value that Amazon S3 + /// understands.

    + pub continuation_token: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } + +impl fmt::Debug for ListBucketMetricsConfigurationsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketMetricsConfigurationsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } + +impl ListBucketMetricsConfigurationsInput { + #[must_use] + pub fn builder() -> builders::ListBucketMetricsConfigurationsInputBuilder { + default() + } } -impl DtoExt for DeleteBucketReplicationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketMetricsConfigurationsOutput { + ///

    The marker that is used as a starting point for this metrics configuration list + /// response. This value is present if it was sent in the request.

    + pub continuation_token: Option, + ///

    Indicates whether the returned list of metrics configurations is complete. A value of + /// true indicates that the list is not complete and the NextContinuationToken will be provided + /// for a subsequent request.

    + pub is_truncated: Option, + ///

    The list of metrics configurations for a bucket.

    + pub metrics_configuration_list: Option, + ///

    The marker used to continue a metrics configuration listing that has been truncated. Use + /// the NextContinuationToken from a previously truncated list response to + /// continue the listing. The continuation token is an opaque value that Amazon S3 + /// understands.

    + pub next_continuation_token: Option, } + +impl fmt::Debug for ListBucketMetricsConfigurationsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketMetricsConfigurationsOutput"); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.metrics_configuration_list { + d.field("metrics_configuration_list", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketsInput { + ///

    Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services + /// Region must be expressed according to the Amazon Web Services Region code, such as us-west-2 + /// for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services + /// Regions, see Regions and Endpoints.

    + /// + ///

    Requests made to a Regional endpoint that is different from the + /// bucket-region parameter are not supported. For example, if you want to + /// limit the response to your buckets in Region us-west-2, the request must be + /// made to an endpoint in Region us-west-2.

    + ///
    + pub bucket_region: Option, + ///

    + /// ContinuationToken indicates to Amazon S3 that the list is being continued on + /// this bucket with a token. ContinuationToken is obfuscated and is not a real + /// key. You can use this ContinuationToken for pagination of the list results.

    + ///

    Length Constraints: Minimum length of 0. Maximum length of 1024.

    + ///

    Required: No.

    + /// + ///

    If you specify the bucket-region, prefix, or continuation-token + /// query parameters without using max-buckets to set the maximum number of buckets returned in the response, + /// Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

    + ///
    + pub continuation_token: Option, + ///

    Maximum number of buckets to be returned in response. When the number is more than the + /// count of buckets that are owned by an Amazon Web Services account, return all the buckets in + /// response.

    + pub max_buckets: Option, + ///

    Limits the response to bucket names that begin with the specified bucket name + /// prefix.

    + pub prefix: Option, } -impl DtoExt for DeleteBucketTaggingInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for ListBucketsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketsInput"); + if let Some(ref val) = self.bucket_region { + d.field("bucket_region", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.max_buckets { + d.field("max_buckets", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } + +impl ListBucketsInput { + #[must_use] + pub fn builder() -> builders::ListBucketsInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketsOutput { + ///

    The list of buckets owned by the requester.

    + pub buckets: Option, + ///

    + /// ContinuationToken is included in the response when there are more buckets + /// that can be listed with pagination. The next ListBuckets request to Amazon S3 can + /// be continued with this ContinuationToken. ContinuationToken is + /// obfuscated and is not a real bucket.

    + pub continuation_token: Option, + ///

    The owner of the buckets listed.

    + pub owner: Option, + ///

    If Prefix was sent with the request, it is included in the response.

    + ///

    All bucket names in the response begin with the specified bucket name prefix.

    + pub prefix: Option, } -impl DtoExt for DeleteBucketWebsiteInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for ListBucketsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketsOutput"); + if let Some(ref val) = self.buckets { + d.field("buckets", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListDirectoryBucketsInput { + ///

    + /// ContinuationToken indicates to Amazon S3 that the list is being continued on + /// buckets in this account with a token. ContinuationToken is obfuscated and is + /// not a real bucket name. You can use this ContinuationToken for the pagination + /// of the list results.

    + pub continuation_token: Option, + ///

    Maximum number of buckets to be returned in response. When the number is more than the + /// count of buckets that are owned by an Amazon Web Services account, return all the buckets in + /// response.

    + pub max_directory_buckets: Option, } + +impl fmt::Debug for ListDirectoryBucketsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListDirectoryBucketsInput"); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.max_directory_buckets { + d.field("max_directory_buckets", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteMarkerEntry { - fn ignore_empty_strings(&mut self) { -if self.key.as_deref() == Some("") { - self.key = None; + +impl ListDirectoryBucketsInput { + #[must_use] + pub fn builder() -> builders::ListDirectoryBucketsInputBuilder { + default() + } } -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); + +#[derive(Clone, Default, PartialEq)] +pub struct ListDirectoryBucketsOutput { + ///

    The list of buckets owned by the requester.

    + pub buckets: Option, + ///

    If ContinuationToken was sent with the request, it is included in the + /// response. You can use the returned ContinuationToken for pagination of the + /// list response.

    + pub continuation_token: Option, } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl fmt::Debug for ListDirectoryBucketsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListDirectoryBucketsOutput"); + if let Some(ref val) = self.buckets { + d.field("buckets", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListMultipartUploadsInput { + ///

    The name of the bucket to which the multipart upload was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Character you use to group keys.

    + ///

    All keys that contain the same string between the prefix, if specified, and the first + /// occurrence of the delimiter after the prefix are grouped under a single result element, + /// CommonPrefixes. If you don't specify the prefix parameter, then the + /// substring starts at the beginning of the key. The keys that are grouped under + /// CommonPrefixes result element are not returned elsewhere in the + /// response.

    + /// + ///

    + /// Directory buckets - For directory buckets, / is the only supported delimiter.

    + ///
    + pub delimiter: Option, + pub encoding_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Specifies the multipart upload after which listing should begin.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - For + /// general purpose buckets, key-marker is an object key. Together with + /// upload-id-marker, this parameter specifies the multipart upload + /// after which listing should begin.

      + ///

      If upload-id-marker is not specified, only the keys + /// lexicographically greater than the specified key-marker will be + /// included in the list.

      + ///

      If upload-id-marker is specified, any multipart uploads for a key + /// equal to the key-marker might also be included, provided those + /// multipart uploads have upload IDs lexicographically greater than the specified + /// upload-id-marker.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - For + /// directory buckets, key-marker is obfuscated and isn't a real object + /// key. The upload-id-marker parameter isn't supported by + /// directory buckets. To list the additional multipart uploads, you only need to set + /// the value of key-marker to the NextKeyMarker value from + /// the previous response.

      + ///

      In the ListMultipartUploads response, the multipart uploads aren't + /// sorted lexicographically based on the object keys. + /// + ///

      + ///
    • + ///
    + ///
    + pub key_marker: Option, + ///

    Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response + /// body. 1,000 is the maximum number of uploads that can be returned in a response.

    + pub max_uploads: Option, + ///

    Lists in-progress uploads only for those keys that begin with the specified prefix. You + /// can use prefixes to separate a bucket into different grouping of keys. (You can think of + /// using prefix to make groups in the same way that you'd use a folder in a file + /// system.)

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub prefix: Option, + pub request_payer: Option, + ///

    Together with key-marker, specifies the multipart upload after which listing should + /// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. + /// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the + /// list only if they have an upload ID lexicographically greater than the specified + /// upload-id-marker.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub upload_id_marker: Option, } + +impl fmt::Debug for ListMultipartUploadsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListMultipartUploadsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.key_marker { + d.field("key_marker", val); + } + if let Some(ref val) = self.max_uploads { + d.field("max_uploads", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.upload_id_marker { + d.field("upload_id_marker", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteMarkerReplication { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; + +impl ListMultipartUploadsInput { + #[must_use] + pub fn builder() -> builders::ListMultipartUploadsInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListMultipartUploadsOutput { + ///

    The name of the bucket to which the multipart upload was initiated. Does not return the + /// access point ARN or access point alias if used.

    + pub bucket: Option, + ///

    If you specify a delimiter in the request, then the result returns each distinct key + /// prefix containing the delimiter in a CommonPrefixes element. The distinct key + /// prefixes are returned in the Prefix child element.

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub common_prefixes: Option, + ///

    Contains the delimiter you specified in the request. If you don't specify a delimiter in + /// your request, this element is absent from the response.

    + /// + ///

    + /// Directory buckets - For directory buckets, / is the only supported delimiter.

    + ///
    + pub delimiter: Option, + ///

    Encoding type used by Amazon S3 to encode object keys in the response.

    + ///

    If you specify the encoding-type request parameter, Amazon S3 includes this + /// element in the response, and returns encoded key name values in the following response + /// elements:

    + ///

    + /// Delimiter, KeyMarker, Prefix, + /// NextKeyMarker, Key.

    + pub encoding_type: Option, + ///

    Indicates whether the returned list of multipart uploads is truncated. A value of true + /// indicates that the list was truncated. The list can be truncated if the number of multipart + /// uploads exceeds the limit allowed or specified by max uploads.

    + pub is_truncated: Option, + ///

    The key at or after which the listing began.

    + pub key_marker: Option, + ///

    Maximum number of multipart uploads that could have been included in the + /// response.

    + pub max_uploads: Option, + ///

    When a list is truncated, this element specifies the value that should be used for the + /// key-marker request parameter in a subsequent request.

    + pub next_key_marker: Option, + ///

    When a list is truncated, this element specifies the value that should be used for the + /// upload-id-marker request parameter in a subsequent request.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub next_upload_id_marker: Option, + ///

    When a prefix is provided in the request, this field contains the specified prefix. The + /// result contains only keys starting with the specified prefix.

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub prefix: Option, + pub request_charged: Option, + ///

    Together with key-marker, specifies the multipart upload after which listing should + /// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. + /// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the + /// list only if they have an upload ID lexicographically greater than the specified + /// upload-id-marker.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub upload_id_marker: Option, + ///

    Container for elements related to a particular multipart upload. A response can contain + /// zero or more Upload elements.

    + pub uploads: Option, } + +impl fmt::Debug for ListMultipartUploadsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListMultipartUploadsOutput"); + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.common_prefixes { + d.field("common_prefixes", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.key_marker { + d.field("key_marker", val); + } + if let Some(ref val) = self.max_uploads { + d.field("max_uploads", val); + } + if let Some(ref val) = self.next_key_marker { + d.field("next_key_marker", val); + } + if let Some(ref val) = self.next_upload_id_marker { + d.field("next_upload_id_marker", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.upload_id_marker { + d.field("upload_id_marker", val); + } + if let Some(ref val) = self.uploads { + d.field("uploads", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteObjectInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectVersionsInput { + ///

    The bucket name that contains the objects.

    + pub bucket: BucketName, + ///

    A delimiter is a character that you specify to group keys. All keys that contain the + /// same string between the prefix and the first occurrence of the delimiter are + /// grouped under a single result element in CommonPrefixes. These groups are + /// counted as one result against the max-keys limitation. These keys are not + /// returned elsewhere in the response.

    + pub delimiter: Option, + pub encoding_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Specifies the key to start with when listing objects in a bucket.

    + pub key_marker: Option, + ///

    Sets the maximum number of keys returned in the response. By default, the action returns + /// up to 1,000 key names. The response might contain fewer keys but will never contain more. + /// If additional keys satisfy the search criteria, but were not returned because + /// max-keys was exceeded, the response contains + /// true. To return the additional keys, + /// see key-marker and version-id-marker.

    + pub max_keys: Option, + ///

    Specifies the optional fields that you want returned in the response. Fields that you do + /// not specify are not returned.

    + pub optional_object_attributes: Option, + ///

    Use this parameter to select only those keys that begin with the specified prefix. You + /// can use prefixes to separate a bucket into different groupings of keys. (You can think of + /// using prefix to make groups in the same way that you'd use a folder in a file + /// system.) You can use prefix with delimiter to roll up numerous + /// objects into a single result under CommonPrefixes.

    + pub prefix: Option, + pub request_payer: Option, + ///

    Specifies the object version you want to start listing from.

    + pub version_id_marker: Option, } -if self.mfa.as_deref() == Some("") { - self.mfa = None; + +impl fmt::Debug for ListObjectVersionsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectVersionsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.key_marker { + d.field("key_marker", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.optional_object_attributes { + d.field("optional_object_attributes", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id_marker { + d.field("version_id_marker", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +impl ListObjectVersionsInput { + #[must_use] + pub fn builder() -> builders::ListObjectVersionsInputBuilder { + default() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectVersionsOutput { + ///

    All of the keys rolled up into a common prefix count as a single return when calculating + /// the number of returns.

    + pub common_prefixes: Option, + ///

    Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

    + pub delete_markers: Option, + ///

    The delimiter grouping the included keys. A delimiter is a character that you specify to + /// group keys. All keys that contain the same string between the prefix and the first + /// occurrence of the delimiter are grouped under a single result element in + /// CommonPrefixes. These groups are counted as one result against the + /// max-keys limitation. These keys are not returned elsewhere in the + /// response.

    + pub delimiter: Option, + ///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    + ///

    If you specify the encoding-type request parameter, Amazon S3 includes this + /// element in the response, and returns encoded key name values in the following response + /// elements:

    + ///

    + /// KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

    + pub encoding_type: Option, + ///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search + /// criteria. If your results were truncated, you can make a follow-up paginated request by + /// using the NextKeyMarker and NextVersionIdMarker response + /// parameters as a starting place in another request to return the rest of the results.

    + pub is_truncated: Option, + ///

    Marks the last key returned in a truncated response.

    + pub key_marker: Option, + ///

    Specifies the maximum number of objects to return.

    + pub max_keys: Option, + ///

    The bucket name.

    + pub name: Option, + ///

    When the number of responses exceeds the value of MaxKeys, + /// NextKeyMarker specifies the first key not returned that satisfies the + /// search criteria. Use this value for the key-marker request parameter in a subsequent + /// request.

    + pub next_key_marker: Option, + ///

    When the number of responses exceeds the value of MaxKeys, + /// NextVersionIdMarker specifies the first object version not returned that + /// satisfies the search criteria. Use this value for the version-id-marker + /// request parameter in a subsequent request.

    + pub next_version_id_marker: Option, + ///

    Selects objects that start with the value supplied by this parameter.

    + pub prefix: Option, + pub request_charged: Option, + ///

    Marks the last version of the key returned in a truncated response.

    + pub version_id_marker: Option, + ///

    Container for version information.

    + pub versions: Option, } + +impl fmt::Debug for ListObjectVersionsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectVersionsOutput"); + if let Some(ref val) = self.common_prefixes { + d.field("common_prefixes", val); + } + if let Some(ref val) = self.delete_markers { + d.field("delete_markers", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.key_marker { + d.field("key_marker", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.next_key_marker { + d.field("next_key_marker", val); + } + if let Some(ref val) = self.next_version_id_marker { + d.field("next_version_id_marker", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.version_id_marker { + d.field("version_id_marker", val); + } + if let Some(ref val) = self.versions { + d.field("versions", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsInput { + ///

    The name of the bucket containing the objects.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    A delimiter is a character that you use to group keys.

    + pub delimiter: Option, + pub encoding_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this + /// specified key. Marker can be any key in the bucket.

    + pub marker: Option, + ///

    Sets the maximum number of keys returned in the response. By default, the action returns + /// up to 1,000 key names. The response might contain fewer keys but will never contain more. + ///

    + pub max_keys: Option, + ///

    Specifies the optional fields that you want returned in the response. Fields that you do + /// not specify are not returned.

    + pub optional_object_attributes: Option, + ///

    Limits the response to keys that begin with the specified prefix.

    + pub prefix: Option, + ///

    Confirms that the requester knows that she or he will be charged for the list objects + /// request. Bucket owners need not specify this parameter in their requests.

    + pub request_payer: Option, } -impl DtoExt for DeleteObjectOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for ListObjectsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.marker { + d.field("marker", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.optional_object_attributes { + d.field("optional_object_attributes", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.finish_non_exhaustive() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl ListObjectsInput { + #[must_use] + pub fn builder() -> builders::ListObjectsInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsOutput { + ///

    The bucket name.

    + pub name: Option, + ///

    Keys that begin with the indicated prefix.

    + pub prefix: Option, + ///

    Indicates where in the bucket listing begins. Marker is included in the response if it + /// was sent with the request.

    + pub marker: Option, + ///

    The maximum number of keys returned in the response body.

    + pub max_keys: Option, + ///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search + /// criteria.

    + pub is_truncated: Option, + ///

    Metadata about each object returned.

    + pub contents: Option, + ///

    All of the keys (up to 1,000) rolled up in a common prefix count as a single return when + /// calculating the number of returns.

    + ///

    A response can contain CommonPrefixes only if you specify a + /// delimiter.

    + ///

    + /// CommonPrefixes contains all (if there are any) keys between + /// Prefix and the next occurrence of the string specified by the + /// delimiter.

    + ///

    + /// CommonPrefixes lists keys that act like subdirectories in the directory + /// specified by Prefix.

    + ///

    For example, if the prefix is notes/ and the delimiter is a slash + /// (/), as in notes/summer/july, the common prefix is + /// notes/summer/. All of the keys that roll up into a common prefix count as a + /// single return when calculating the number of returns.

    + pub common_prefixes: Option, + ///

    Causes keys that contain the same string between the prefix and the first occurrence of + /// the delimiter to be rolled up into a single result element in the + /// CommonPrefixes collection. These rolled-up keys are not returned elsewhere + /// in the response. Each rolled-up result counts as only one return against the + /// MaxKeys value.

    + pub delimiter: Option, + ///

    When the response is truncated (the IsTruncated element value in the + /// response is true), you can use the key name in this field as the + /// marker parameter in the subsequent request to get the next set of objects. + /// Amazon S3 lists objects in alphabetical order.

    + /// + ///

    This element is returned only if you have the delimiter request + /// parameter specified. If the response does not include the NextMarker + /// element and it is truncated, you can use the value of the last Key element + /// in the response as the marker parameter in the subsequent request to get + /// the next set of object keys.

    + ///
    + pub next_marker: Option, + ///

    Encoding type used by Amazon S3 to encode the object keys in the response. + /// Responses are encoded only in UTF-8. An object key can contain any Unicode character. + /// However, the XML 1.0 parser can't parse certain characters, such as characters with an + /// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this + /// parameter to request that Amazon S3 encode the keys in the response. For more information about + /// characters to avoid in object key names, see Object key naming + /// guidelines.

    + /// + ///

    When using the URL encoding type, non-ASCII characters that are used in an object's + /// key name will be percent-encoded according to UTF-8 code values. For example, the object + /// test_file(3).png will appear as + /// test_file%283%29.png.

    + ///
    + pub encoding_type: Option, + pub request_charged: Option, } + +impl fmt::Debug for ListObjectsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectsOutput"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.marker { + d.field("marker", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.contents { + d.field("contents", val); + } + if let Some(ref val) = self.common_prefixes { + d.field("common_prefixes", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.next_marker { + d.field("next_marker", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteObjectTaggingInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsV2Input { + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    + /// ContinuationToken indicates to Amazon S3 that the list is being continued on + /// this bucket with a token. ContinuationToken is obfuscated and is not a real + /// key. You can use this ContinuationToken for pagination of the list results. + ///

    + pub continuation_token: Option, + ///

    A delimiter is a character that you use to group keys.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - For directory buckets, / is the only supported delimiter.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - When you query + /// ListObjectsV2 with a delimiter during in-progress multipart + /// uploads, the CommonPrefixes response parameter contains the prefixes + /// that are associated with the in-progress multipart uploads. For more information + /// about multipart uploads, see Multipart Upload Overview in + /// the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + pub delimiter: Option, + ///

    Encoding type used by Amazon S3 to encode the object keys in the response. + /// Responses are encoded only in UTF-8. An object key can contain any Unicode character. + /// However, the XML 1.0 parser can't parse certain characters, such as characters with an + /// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this + /// parameter to request that Amazon S3 encode the keys in the response. For more information about + /// characters to avoid in object key names, see Object key naming + /// guidelines.

    + /// + ///

    When using the URL encoding type, non-ASCII characters that are used in an object's + /// key name will be percent-encoded according to UTF-8 code values. For example, the object + /// test_file(3).png will appear as + /// test_file%283%29.png.

    + ///
    + pub encoding_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The owner field is not present in ListObjectsV2 by default. If you want to + /// return the owner field with each key in the result, then set the FetchOwner + /// field to true.

    + /// + ///

    + /// Directory buckets - For directory buckets, + /// the bucket owner is returned as the object owner for all objects.

    + ///
    + pub fetch_owner: Option, + ///

    Sets the maximum number of keys returned in the response. By default, the action returns + /// up to 1,000 key names. The response might contain fewer keys but will never contain + /// more.

    + pub max_keys: Option, + ///

    Specifies the optional fields that you want returned in the response. Fields that you do + /// not specify are not returned.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub optional_object_attributes: Option, + ///

    Limits the response to keys that begin with the specified prefix.

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub prefix: Option, + ///

    Confirms that the requester knows that she or he will be charged for the list objects + /// request in V2 style. Bucket owners need not specify this parameter in their + /// requests.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub request_payer: Option, + ///

    StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this + /// specified key. StartAfter can be any key in the bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub start_after: Option, } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl fmt::Debug for ListObjectsV2Input { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectsV2Input"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.fetch_owner { + d.field("fetch_owner", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.optional_object_attributes { + d.field("optional_object_attributes", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.start_after { + d.field("start_after", val); + } + d.finish_non_exhaustive() + } } + +impl ListObjectsV2Input { + #[must_use] + pub fn builder() -> builders::ListObjectsV2InputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsV2Output { + ///

    The bucket name.

    + pub name: Option, + ///

    Keys that begin with the indicated prefix.

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub prefix: Option, + ///

    Sets the maximum number of keys returned in the response. By default, the action returns + /// up to 1,000 key names. The response might contain fewer keys but will never contain + /// more.

    + pub max_keys: Option, + ///

    + /// KeyCount is the number of keys returned with this request. + /// KeyCount will always be less than or equal to the MaxKeys + /// field. For example, if you ask for 50 keys, your result will include 50 keys or + /// fewer.

    + pub key_count: Option, + ///

    If ContinuationToken was sent with the request, it is included in the + /// response. You can use the returned ContinuationToken for pagination of the + /// list response. You can use this ContinuationToken for pagination of the list + /// results.

    + pub continuation_token: Option, + ///

    Set to false if all of the results were returned. Set to true + /// if more keys are available to return. If the number of results exceeds that specified by + /// MaxKeys, all of the results might not be returned.

    + pub is_truncated: Option, + ///

    + /// NextContinuationToken is sent when isTruncated is true, which + /// means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 + /// can be continued with this NextContinuationToken. + /// NextContinuationToken is obfuscated and is not a real key

    + pub next_continuation_token: Option, + ///

    Metadata about each object returned.

    + pub contents: Option, + ///

    All of the keys (up to 1,000) that share the same prefix are grouped together. When + /// counting the total numbers of returns by this API operation, this group of keys is + /// considered as one item.

    + ///

    A response can contain CommonPrefixes only if you specify a + /// delimiter.

    + ///

    + /// CommonPrefixes contains all (if there are any) keys between + /// Prefix and the next occurrence of the string specified by a + /// delimiter.

    + ///

    + /// CommonPrefixes lists keys that act like subdirectories in the directory + /// specified by Prefix.

    + ///

    For example, if the prefix is notes/ and the delimiter is a slash + /// (/) as in notes/summer/july, the common prefix is + /// notes/summer/. All of the keys that roll up into a common prefix count as a + /// single return when calculating the number of returns.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - When you query + /// ListObjectsV2 with a delimiter during in-progress multipart + /// uploads, the CommonPrefixes response parameter contains the prefixes + /// that are associated with the in-progress multipart uploads. For more information + /// about multipart uploads, see Multipart Upload Overview in + /// the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + pub common_prefixes: Option, + ///

    Causes keys that contain the same string between the prefix and the first + /// occurrence of the delimiter to be rolled up into a single result element in the + /// CommonPrefixes collection. These rolled-up keys are not returned elsewhere + /// in the response. Each rolled-up result counts as only one return against the + /// MaxKeys value.

    + /// + ///

    + /// Directory buckets - For directory buckets, / is the only supported delimiter.

    + ///
    + pub delimiter: Option, + ///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    + ///

    If you specify the encoding-type request parameter, Amazon S3 includes this + /// element in the response, and returns encoded key name values in the following response + /// elements:

    + ///

    + /// Delimiter, Prefix, Key, and StartAfter.

    + pub encoding_type: Option, + ///

    If StartAfter was sent with the request, it is included in the response.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub start_after: Option, + pub request_charged: Option, } -impl DtoExt for DeleteObjectTaggingOutput { - fn ignore_empty_strings(&mut self) { -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl fmt::Debug for ListObjectsV2Output { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectsV2Output"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.key_count { + d.field("key_count", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + if let Some(ref val) = self.contents { + d.field("contents", val); + } + if let Some(ref val) = self.common_prefixes { + d.field("common_prefixes", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.start_after { + d.field("start_after", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListPartsInput { + ///

    The name of the bucket to which the parts are being uploaded.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, + ///

    Sets the maximum number of parts to return.

    + pub max_parts: Option, + ///

    Specifies the part after which listing should begin. Only parts with higher part numbers + /// will be listed.

    + pub part_number_marker: Option, + pub request_payer: Option, + ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created + /// using a checksum algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. + /// For more information, see + /// Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum + /// algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Upload ID identifying the multipart upload whose parts are being listed.

    + pub upload_id: MultipartUploadId, } + +impl fmt::Debug for ListPartsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListPartsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.max_parts { + d.field("max_parts", val); + } + if let Some(ref val) = self.part_number_marker { + d.field("part_number_marker", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } -impl DtoExt for DeleteObjectsInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; + +impl ListPartsInput { + #[must_use] + pub fn builder() -> builders::ListPartsInputBuilder { + default() + } } -self.delete.ignore_empty_strings(); -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct ListPartsOutput { + ///

    If the bucket has a lifecycle rule configured with an action to abort incomplete + /// multipart uploads and the prefix in the lifecycle rule matches the object name in the + /// request, then the response includes this header indicating when the initiated multipart + /// upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle + /// Configuration.

    + ///

    The response will also include the x-amz-abort-rule-id header that will + /// provide the ID of the lifecycle configuration rule that defines this action.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub abort_date: Option, + ///

    This header is returned along with the x-amz-abort-date header. It + /// identifies applicable lifecycle configuration rule that defines the action to abort + /// incomplete multipart uploads.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub abort_rule_id: Option, + ///

    The name of the bucket to which the multipart upload was initiated. Does not return the + /// access point ARN or access point alias if used.

    + pub bucket: Option, + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    The checksum type, which determines how part-level checksums are combined to create an + /// object-level checksum for multipart objects. You can use this header response to verify + /// that the checksum type that is received is the same checksum type that was specified in + /// CreateMultipartUpload request. For more + /// information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Container element that identifies who initiated the multipart upload. If the initiator + /// is an Amazon Web Services account, this element provides the same information as the Owner + /// element. If the initiator is an IAM User, this element provides the user ARN and display + /// name.

    + pub initiator: Option, + ///

    Indicates whether the returned list of parts is truncated. A true value indicates that + /// the list was truncated. A list can be truncated if the number of parts exceeds the limit + /// returned in the MaxParts element.

    + pub is_truncated: Option, + ///

    Object key for which the multipart upload was initiated.

    + pub key: Option, + ///

    Maximum number of parts that were allowed in the response.

    + pub max_parts: Option, + ///

    When a list is truncated, this element specifies the last part in the list, as well as + /// the value to use for the part-number-marker request parameter in a subsequent + /// request.

    + pub next_part_number_marker: Option, + ///

    Container element that identifies the object owner, after the object is created. If + /// multipart upload is initiated by an IAM user, this element provides the parent account ID + /// and display name.

    + /// + ///

    + /// Directory buckets - The bucket owner is + /// returned as the object owner for all the parts.

    + ///
    + pub owner: Option, + ///

    Specifies the part after which listing should begin. Only parts with higher part numbers + /// will be listed.

    + pub part_number_marker: Option, + ///

    Container for elements related to a particular part. A response can contain zero or more + /// Part elements.

    + pub parts: Option, + pub request_charged: Option, + ///

    The class of storage used to store the uploaded object.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    Upload ID identifying the multipart upload whose parts are being listed.

    + pub upload_id: Option, } -if self.mfa.as_deref() == Some("") { - self.mfa = None; + +impl fmt::Debug for ListPartsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListPartsOutput"); + if let Some(ref val) = self.abort_date { + d.field("abort_date", val); + } + if let Some(ref val) = self.abort_rule_id { + d.field("abort_rule_id", val); + } + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.initiator { + d.field("initiator", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.max_parts { + d.field("max_parts", val); + } + if let Some(ref val) = self.next_part_number_marker { + d.field("next_part_number_marker", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.part_number_marker { + d.field("part_number_marker", val); + } + if let Some(ref val) = self.parts { + d.field("parts", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.upload_id { + d.field("upload_id", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +pub type Location = String; + +///

    Specifies the location where the bucket will be created.

    +///

    For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see +/// Working with directory buckets in the Amazon S3 User Guide.

    +/// +///

    This functionality is only supported by directory buckets.

    +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LocationInfo { + ///

    The name of the location where the bucket will be created.

    + ///

    For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

    + pub name: Option, + ///

    The type of location where the bucket will be created.

    + pub type_: Option, } + +impl fmt::Debug for LocationInfo { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LocationInfo"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.type_ { + d.field("type_", val); + } + d.finish_non_exhaustive() + } } + +pub type LocationNameAsString = String; + +pub type LocationPrefix = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct LocationType(Cow<'static, str>); + +impl LocationType { + pub const AVAILABILITY_ZONE: &'static str = "AvailabilityZone"; + + pub const LOCAL_ZONE: &'static str = "LocalZone"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for DeleteObjectsOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl From for LocationType { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: LocationType) -> Self { + s.0 + } } + +impl FromStr for LocationType { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for DeletePublicAccessBlockInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +///

    Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys +/// for a bucket. For more information, see PUT Bucket logging in the +/// Amazon S3 API Reference.

    +#[derive(Clone, Default, PartialEq)] +pub struct LoggingEnabled { + ///

    Specifies the bucket where you want Amazon S3 to store server access logs. You can have your + /// logs delivered to any bucket that you own, including the same bucket that is being logged. + /// You can also configure multiple buckets to deliver their logs to the same target bucket. In + /// this case, you should choose a different TargetPrefix for each source bucket + /// so that the delivered log files can be distinguished by key.

    + pub target_bucket: TargetBucket, + ///

    Container for granting information.

    + ///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support + /// target grants. For more information, see Permissions for server access log delivery in the + /// Amazon S3 User Guide.

    + pub target_grants: Option, + ///

    Amazon S3 key format for log objects.

    + pub target_object_key_format: Option, + ///

    A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a + /// single bucket, you can use a prefix to distinguish which log files came from which + /// bucket.

    + pub target_prefix: TargetPrefix, } + +impl fmt::Debug for LoggingEnabled { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LoggingEnabled"); + d.field("target_bucket", &self.target_bucket); + if let Some(ref val) = self.target_grants { + d.field("target_grants", val); + } + if let Some(ref val) = self.target_object_key_format { + d.field("target_object_key_format", val); + } + d.field("target_prefix", &self.target_prefix); + d.finish_non_exhaustive() + } } + +pub type MFA = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct MFADelete(Cow<'static, str>); + +impl MFADelete { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for DeletedObject { - fn ignore_empty_strings(&mut self) { -if self.delete_marker_version_id.as_deref() == Some("") { - self.delete_marker_version_id = None; + +impl From for MFADelete { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if self.key.as_deref() == Some("") { - self.key = None; + +impl From for Cow<'static, str> { + fn from(s: MFADelete) -> Self { + s.0 + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl FromStr for MFADelete { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MFADeleteStatus(Cow<'static, str>); + +impl MFADeleteStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for MFADeleteStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for Destination { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.access_control_translation { -val.ignore_empty_strings(); + +impl From for Cow<'static, str> { + fn from(s: MFADeleteStatus) -> Self { + s.0 + } } -if self.account.as_deref() == Some("") { - self.account = None; + +impl FromStr for MFADeleteStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref mut val) = self.encryption_configuration { -val.ignore_empty_strings(); + +pub type Marker = String; + +pub type MaxAgeSeconds = i32; + +pub type MaxBuckets = i32; + +pub type MaxDirectoryBuckets = i32; + +pub type MaxKeys = i32; + +pub type MaxParts = i32; + +pub type MaxUploads = i32; + +pub type Message = String; + +pub type Metadata = Map; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MetadataDirective(Cow<'static, str>); + +impl MetadataDirective { + pub const COPY: &'static str = "COPY"; + + pub const REPLACE: &'static str = "REPLACE"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref mut val) = self.metrics { -val.ignore_empty_strings(); + +impl From for MetadataDirective { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref mut val) = self.replication_time { -val.ignore_empty_strings(); + +impl From for Cow<'static, str> { + fn from(s: MetadataDirective) -> Self { + s.0 + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; + +impl FromStr for MetadataDirective { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    A metadata key-value pair to store with an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct MetadataEntry { + ///

    Name of the object.

    + pub name: Option, + ///

    Value of the object.

    + pub value: Option, } + +impl fmt::Debug for MetadataEntry { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetadataEntry"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.value { + d.field("value", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for Encryption { - fn ignore_empty_strings(&mut self) { -if self.kms_context.as_deref() == Some("") { - self.kms_context = None; + +pub type MetadataKey = String; + +///

    +/// The metadata table configuration for a general purpose bucket. +///

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct MetadataTableConfiguration { + ///

    + /// The destination information for the metadata table configuration. The destination table bucket + /// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + /// table name must be unique within the aws_s3_metadata namespace in the destination + /// table bucket. + ///

    + pub s3_tables_destination: S3TablesDestination, } -if self.kms_key_id.as_deref() == Some("") { - self.kms_key_id = None; + +impl fmt::Debug for MetadataTableConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetadataTableConfiguration"); + d.field("s3_tables_destination", &self.s3_tables_destination); + d.finish_non_exhaustive() + } } + +impl Default for MetadataTableConfiguration { + fn default() -> Self { + Self { + s3_tables_destination: default(), + } + } } + +///

    +/// The metadata table configuration for a general purpose bucket. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, PartialEq)] +pub struct MetadataTableConfigurationResult { + ///

    + /// The destination information for the metadata table configuration. The destination table bucket + /// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + /// table name must be unique within the aws_s3_metadata namespace in the destination + /// table bucket. + ///

    + pub s3_tables_destination_result: S3TablesDestinationResult, } -impl DtoExt for EncryptionConfiguration { - fn ignore_empty_strings(&mut self) { -if self.replica_kms_key_id.as_deref() == Some("") { - self.replica_kms_key_id = None; + +impl fmt::Debug for MetadataTableConfigurationResult { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetadataTableConfigurationResult"); + d.field("s3_tables_destination_result", &self.s3_tables_destination_result); + d.finish_non_exhaustive() + } } + +pub type MetadataTableStatus = String; + +pub type MetadataValue = String; + +///

    A container specifying replication metrics-related settings enabling replication +/// metrics and events.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct Metrics { + ///

    A container specifying the time threshold for emitting the + /// s3:Replication:OperationMissedThreshold event.

    + pub event_threshold: Option, + ///

    Specifies whether the replication metrics are enabled.

    + pub status: MetricsStatus, } + +impl fmt::Debug for Metrics { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Metrics"); + if let Some(ref val) = self.event_threshold { + d.field("event_threshold", val); + } + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -impl DtoExt for Error { - fn ignore_empty_strings(&mut self) { -if self.code.as_deref() == Some("") { - self.code = None; + +///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. +/// The operator must have at least two predicates, and an object must match all of the +/// predicates in order for the filter to apply.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct MetricsAndOperator { + ///

    The access point ARN used when evaluating an AND predicate.

    + pub access_point_arn: Option, + ///

    The prefix used when evaluating an AND predicate.

    + pub prefix: Option, + ///

    The list of tags used when evaluating an AND predicate.

    + pub tags: Option, } -if self.key.as_deref() == Some("") { - self.key = None; + +impl fmt::Debug for MetricsAndOperator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetricsAndOperator"); + if let Some(ref val) = self.access_point_arn { + d.field("access_point_arn", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } -if self.message.as_deref() == Some("") { - self.message = None; + +///

    Specifies a metrics configuration for the CloudWatch request metrics (specified by the +/// metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics +/// configuration, note that this is a full replacement of the existing metrics configuration. +/// If you don't include the elements you want to keep, they are erased. For more information, +/// see PutBucketMetricsConfiguration.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct MetricsConfiguration { + ///

    Specifies a metrics configuration filter. The metrics configuration will only include + /// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an + /// access point ARN, or a conjunction (MetricsAndOperator).

    + pub filter: Option, + ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and + /// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl fmt::Debug for MetricsConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetricsConfiguration"); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } + +pub type MetricsConfigurationList = List; + +///

    Specifies a metrics configuration filter. The metrics configuration only includes +/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an +/// access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

    +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[non_exhaustive] +#[serde(rename_all = "PascalCase")] +pub enum MetricsFilter { + ///

    The access point ARN used when evaluating a metrics filter.

    + AccessPointArn(AccessPointArn), + ///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. + /// The operator must have at least two predicates, and an object must match all of the + /// predicates in order for the filter to apply.

    + And(MetricsAndOperator), + ///

    The prefix used when evaluating a metrics filter.

    + Prefix(Prefix), + ///

    The tag used when evaluating a metrics filter.

    + Tag(Tag), } + +pub type MetricsId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct MetricsStatus(Cow<'static, str>); + +impl MetricsStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for ErrorDetails { - fn ignore_empty_strings(&mut self) { -if self.error_code.as_deref() == Some("") { - self.error_code = None; + +impl From for MetricsStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if self.error_message.as_deref() == Some("") { - self.error_message = None; + +impl From for Cow<'static, str> { + fn from(s: MetricsStatus) -> Self { + s.0 + } } + +impl FromStr for MetricsStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type Minutes = i32; + +pub type MissingMeta = i32; + +pub type MpuObjectSize = i64; + +///

    Container for the MultipartUpload for the Amazon S3 object.

    +#[derive(Clone, Default, PartialEq)] +pub struct MultipartUpload { + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Date and time at which the multipart upload was initiated.

    + pub initiated: Option, + ///

    Identifies who initiated the multipart upload.

    + pub initiator: Option, + ///

    Key of the object for which the multipart upload was initiated.

    + pub key: Option, + ///

    Specifies the owner of the object that is part of the multipart upload.

    + /// + ///

    + /// Directory buckets - The bucket owner is + /// returned as the object owner for all the objects.

    + ///
    + pub owner: Option, + ///

    The class of storage used to store the object.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    Upload ID that identifies the multipart upload.

    + pub upload_id: Option, } -impl DtoExt for ErrorDocument { - fn ignore_empty_strings(&mut self) { + +impl fmt::Debug for MultipartUpload { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MultipartUpload"); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.initiated { + d.field("initiated", val); + } + if let Some(ref val) = self.initiator { + d.field("initiator", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.upload_id { + d.field("upload_id", val); + } + d.finish_non_exhaustive() + } } + +pub type MultipartUploadId = String; + +pub type MultipartUploadList = List; + +pub type NextKeyMarker = String; + +pub type NextMarker = String; + +pub type NextPartNumberMarker = i32; + +pub type NextToken = String; + +pub type NextUploadIdMarker = String; + +pub type NextVersionIdMarker = String; + +///

    The specified bucket does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchBucket {} + +impl fmt::Debug for NoSuchBucket { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoSuchBucket"); + d.finish_non_exhaustive() + } } -impl DtoExt for ExistingObjectReplication { - fn ignore_empty_strings(&mut self) { + +///

    The specified key does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchKey {} + +impl fmt::Debug for NoSuchKey { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoSuchKey"); + d.finish_non_exhaustive() + } } + +///

    The specified multipart upload does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchUpload {} + +impl fmt::Debug for NoSuchUpload { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoSuchUpload"); + d.finish_non_exhaustive() + } } -impl DtoExt for FilterRule { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.name - && val.as_str() == "" { - self.name = None; + +pub type NonNegativeIntegerType = i32; + +///

    Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently +/// deletes the noncurrent object versions. You set this lifecycle configuration action on a +/// bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent +/// object versions at a specific period in the object's lifetime.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NoncurrentVersionExpiration { + ///

    Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100 + /// noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent + /// versions beyond the specified number to retain. For more information about noncurrent + /// versions, see Lifecycle configuration + /// elements in the Amazon S3 User Guide.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub newer_noncurrent_versions: Option, + ///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the + /// associated action. The value must be a non-zero positive integer. For information about the + /// noncurrent days calculations, see How + /// Amazon S3 Calculates When an Object Became Noncurrent in the + /// Amazon S3 User Guide.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub noncurrent_days: Option, } -if self.value.as_deref() == Some("") { - self.value = None; + +impl fmt::Debug for NoncurrentVersionExpiration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoncurrentVersionExpiration"); + if let Some(ref val) = self.newer_noncurrent_versions { + d.field("newer_noncurrent_versions", val); + } + if let Some(ref val) = self.noncurrent_days { + d.field("noncurrent_days", val); + } + d.finish_non_exhaustive() + } } + +///

    Container for the transition rule that describes when noncurrent objects transition to +/// the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage +/// class. If your bucket is versioning-enabled (or versioning is suspended), you can set this +/// action to request that Amazon S3 transition noncurrent object versions to the +/// STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage +/// class at a specific period in the object's lifetime.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NoncurrentVersionTransition { + ///

    Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before + /// transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will + /// transition any additional noncurrent versions beyond the specified number to retain. For + /// more information about noncurrent versions, see Lifecycle configuration + /// elements in the Amazon S3 User Guide.

    + pub newer_noncurrent_versions: Option, + ///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the + /// associated action. For information about the noncurrent days calculations, see How + /// Amazon S3 Calculates How Long an Object Has Been Noncurrent in the + /// Amazon S3 User Guide.

    + pub noncurrent_days: Option, + ///

    The class of storage used to store the object.

    + pub storage_class: Option, } + +impl fmt::Debug for NoncurrentVersionTransition { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoncurrentVersionTransition"); + if let Some(ref val) = self.newer_noncurrent_versions { + d.field("newer_noncurrent_versions", val); + } + if let Some(ref val) = self.noncurrent_days { + d.field("noncurrent_days", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketAccelerateConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +pub type NoncurrentVersionTransitionList = List; + +///

    The specified content does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NotFound {} + +impl fmt::Debug for NotFound { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NotFound"); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +///

    A container for specifying the notification configuration of the bucket. If this element +/// is empty, notifications are turned off for the bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NotificationConfiguration { + ///

    Enables delivery of events to Amazon EventBridge.

    + pub event_bridge_configuration: Option, + ///

    Describes the Lambda functions to invoke and the events for which to invoke + /// them.

    + pub lambda_function_configurations: Option, + ///

    The Amazon Simple Queue Service queues to publish messages to and the events for which + /// to publish messages.

    + pub queue_configurations: Option, + ///

    The topic to which notifications are sent and the events for which notifications are + /// generated.

    + pub topic_configurations: Option, } + +impl fmt::Debug for NotificationConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NotificationConfiguration"); + if let Some(ref val) = self.event_bridge_configuration { + d.field("event_bridge_configuration", val); + } + if let Some(ref val) = self.lambda_function_configurations { + d.field("lambda_function_configurations", val); + } + if let Some(ref val) = self.queue_configurations { + d.field("queue_configurations", val); + } + if let Some(ref val) = self.topic_configurations { + d.field("topic_configurations", val); + } + d.finish_non_exhaustive() + } } + +///

    Specifies object key name filtering rules. For information about key name filtering, see +/// Configuring event +/// notifications using object key name filtering in the +/// Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NotificationConfigurationFilter { + pub key: Option, } -impl DtoExt for GetBucketAccelerateConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for NotificationConfigurationFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NotificationConfigurationFilter"); + if let Some(ref val) = self.key { + d.field("key", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; + +///

    An optional unique identifier for configurations in a notification configuration. If you +/// don't provide one, Amazon S3 will assign an ID.

    +pub type NotificationId = String; + +///

    An object consists of data and its descriptive metadata.

    +#[derive(Clone, Default, PartialEq)] +pub struct Object { + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    The entity tag is a hash of the object. The ETag reflects changes only to the contents + /// of an object, not its metadata. The ETag may or may not be an MD5 digest of the object + /// data. Whether or not it is depends on how the object was created and how it is encrypted as + /// described below:

    + ///
      + ///
    • + ///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the + /// Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that + /// are an MD5 digest of their object data.

      + ///
    • + ///
    • + ///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the + /// Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are + /// not an MD5 digest of their object data.

      + ///
    • + ///
    • + ///

      If an object is created by either the Multipart Upload or Part Copy operation, the + /// ETag is not an MD5 digest, regardless of the method of encryption. If an object is + /// larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a + /// Multipart Upload, and therefore the ETag will not be an MD5 digest.

      + ///
    • + ///
    + /// + ///

    + /// Directory buckets - MD5 is not supported by directory buckets.

    + ///
    + pub e_tag: Option, + ///

    The name that you assign to an object. You use the object key to retrieve the + /// object.

    + pub key: Option, + ///

    Creation date of the object.

    + pub last_modified: Option, + ///

    The owner of the object

    + /// + ///

    + /// Directory buckets - The bucket owner is + /// returned as the object owner.

    + ///
    + pub owner: Option, + ///

    Specifies the restoration status of an object. Objects in certain storage classes must + /// be restored before they can be retrieved. For more information about these storage classes + /// and how to work with archived objects, see Working with archived + /// objects in the Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets. + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub restore_status: Option, + ///

    Size in bytes of the object

    + pub size: Option, + ///

    The class of storage used to store the object.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, } + +impl fmt::Debug for Object { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Object"); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.restore_status { + d.field("restore_status", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } + +///

    This action is not allowed against this storage tier.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectAlreadyInActiveTierError {} + +impl fmt::Debug for ObjectAlreadyInActiveTierError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectAlreadyInActiveTierError"); + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketAclInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectAttributes(Cow<'static, str>); + +impl ObjectAttributes { + pub const CHECKSUM: &'static str = "Checksum"; + + pub const ETAG: &'static str = "ETag"; + + pub const OBJECT_PARTS: &'static str = "ObjectParts"; + + pub const OBJECT_SIZE: &'static str = "ObjectSize"; + + pub const STORAGE_CLASS: &'static str = "StorageClass"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ObjectAttributes { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: ObjectAttributes) -> Self { + s.0 + } } -impl DtoExt for GetBucketAclOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); + +impl FromStr for ObjectAttributes { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type ObjectAttributesList = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectCannedACL(Cow<'static, str>); + +impl ObjectCannedACL { + pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; + + pub const AWS_EXEC_READ: &'static str = "aws-exec-read"; + + pub const BUCKET_OWNER_FULL_CONTROL: &'static str = "bucket-owner-full-control"; + + pub const BUCKET_OWNER_READ: &'static str = "bucket-owner-read"; + + pub const PRIVATE: &'static str = "private"; + + pub const PUBLIC_READ: &'static str = "public-read"; + + pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ObjectCannedACL { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketAnalyticsConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl From for Cow<'static, str> { + fn from(s: ObjectCannedACL) -> Self { + s.0 + } } + +impl FromStr for ObjectCannedACL { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    Object Identifier is unique value to identify objects.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectIdentifier { + ///

    An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. + /// This header field makes the request method conditional on ETags.

    + /// + ///

    Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

    + ///
    + pub e_tag: Option, + ///

    Key name of the object.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub key: ObjectKey, + ///

    If present, the objects are deleted only if its modification times matches the provided Timestamp. + ///

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    + pub last_modified_time: Option, + ///

    If present, the objects are deleted only if its size matches the provided size in bytes.

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    + pub size: Option, + ///

    Version ID for the specific version of the object to delete.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } -impl DtoExt for GetBucketAnalyticsConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.analytics_configuration { -val.ignore_empty_strings(); + +impl fmt::Debug for ObjectIdentifier { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectIdentifier"); + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.last_modified_time { + d.field("last_modified_time", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +pub type ObjectIdentifierList = List; + +pub type ObjectKey = String; + +pub type ObjectList = List; + +///

    The container element for Object Lock configuration parameters.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ObjectLockConfiguration { + ///

    Indicates whether this bucket has an Object Lock configuration enabled. Enable + /// ObjectLockEnabled when you apply ObjectLockConfiguration to a + /// bucket.

    + pub object_lock_enabled: Option, + ///

    Specifies the Object Lock rule for the specified object. Enable the this rule when you + /// apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode + /// and a period. The period can be either Days or Years but you must + /// select one. You cannot specify Days and Years at the same + /// time.

    + pub rule: Option, } + +impl fmt::Debug for ObjectLockConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectLockConfiguration"); + if let Some(ref val) = self.object_lock_enabled { + d.field("object_lock_enabled", val); + } + if let Some(ref val) = self.rule { + d.field("rule", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketCorsInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ObjectLockEnabled(Cow<'static, str>); + +impl ObjectLockEnabled { + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ObjectLockEnabled { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: ObjectLockEnabled) -> Self { + s.0 + } } -impl DtoExt for GetBucketCorsOutput { - fn ignore_empty_strings(&mut self) { + +impl FromStr for ObjectLockEnabled { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type ObjectLockEnabledForBucket = bool; + +///

    A legal hold configuration for an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectLockLegalHold { + ///

    Indicates whether the specified object has a legal hold in place.

    + pub status: Option, } -impl DtoExt for GetBucketEncryptionInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for ObjectLockLegalHold { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectLockLegalHold"); + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectLockLegalHoldStatus(Cow<'static, str>); + +impl ObjectLockLegalHoldStatus { + pub const OFF: &'static str = "OFF"; + + pub const ON: &'static str = "ON"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ObjectLockLegalHoldStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketEncryptionOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.server_side_encryption_configuration { -val.ignore_empty_strings(); + +impl From for Cow<'static, str> { + fn from(s: ObjectLockLegalHoldStatus) -> Self { + s.0 + } } + +impl FromStr for ObjectLockLegalHoldStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectLockMode(Cow<'static, str>); + +impl ObjectLockMode { + pub const COMPLIANCE: &'static str = "COMPLIANCE"; + + pub const GOVERNANCE: &'static str = "GOVERNANCE"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketIntelligentTieringConfigurationInput { - fn ignore_empty_strings(&mut self) { + +impl From for ObjectLockMode { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: ObjectLockMode) -> Self { + s.0 + } } -impl DtoExt for GetBucketIntelligentTieringConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.intelligent_tiering_configuration { -val.ignore_empty_strings(); + +impl FromStr for ObjectLockMode { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type ObjectLockRetainUntilDate = Timestamp; + +///

    A Retention configuration for an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectLockRetention { + ///

    Indicates the Retention mode for the specified object.

    + pub mode: Option, + ///

    The date on which this Object Lock Retention will expire.

    + pub retain_until_date: Option, } + +impl fmt::Debug for ObjectLockRetention { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectLockRetention"); + if let Some(ref val) = self.mode { + d.field("mode", val); + } + if let Some(ref val) = self.retain_until_date { + d.field("retain_until_date", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketInventoryConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ObjectLockRetentionMode(Cow<'static, str>); + +impl ObjectLockRetentionMode { + pub const COMPLIANCE: &'static str = "COMPLIANCE"; + + pub const GOVERNANCE: &'static str = "GOVERNANCE"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ObjectLockRetentionMode { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: ObjectLockRetentionMode) -> Self { + s.0 + } } -impl DtoExt for GetBucketInventoryConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.inventory_configuration { -val.ignore_empty_strings(); + +impl FromStr for ObjectLockRetentionMode { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    The container element for an Object Lock rule.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ObjectLockRule { + ///

    The default Object Lock retention mode and period that you want to apply to new objects + /// placed in the specified bucket. Bucket settings require both a mode and a period. The + /// period can be either Days or Years but you must select one. You + /// cannot specify Days and Years at the same time.

    + pub default_retention: Option, } + +impl fmt::Debug for ObjectLockRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectLockRule"); + if let Some(ref val) = self.default_retention { + d.field("default_retention", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketLifecycleConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +pub type ObjectLockToken = String; + +///

    The source object of the COPY action is not in the active tier and is only stored in +/// Amazon S3 Glacier.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectNotInActiveTierError {} + +impl fmt::Debug for ObjectNotInActiveTierError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectNotInActiveTierError"); + d.finish_non_exhaustive() + } } + +///

    The container element for object ownership for a bucket's ownership controls.

    +///

    +/// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to +/// the bucket owner if the objects are uploaded with the +/// bucket-owner-full-control canned ACL.

    +///

    +/// ObjectWriter - The uploading account will own the object if the object is +/// uploaded with the bucket-owner-full-control canned ACL.

    +///

    +/// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no +/// longer affect permissions. The bucket owner automatically owns and has full control over +/// every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL +/// or specify bucket owner full control ACLs (such as the predefined +/// bucket-owner-full-control canned ACL or a custom ACL in XML format that +/// grants the same permissions).

    +///

    By default, ObjectOwnership is set to BucketOwnerEnforced and +/// ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where +/// you must control access for each object individually. For more information about S3 Object +/// Ownership, see Controlling ownership of +/// objects and disabling ACLs for your bucket in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectOwnership(Cow<'static, str>); + +impl ObjectOwnership { + pub const BUCKET_OWNER_ENFORCED: &'static str = "BucketOwnerEnforced"; + + pub const BUCKET_OWNER_PREFERRED: &'static str = "BucketOwnerPreferred"; + + pub const OBJECT_WRITER: &'static str = "ObjectWriter"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ObjectOwnership { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketLifecycleConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" { - self.transition_default_minimum_object_size = None; + +impl From for Cow<'static, str> { + fn from(s: ObjectOwnership) -> Self { + s.0 + } } + +impl FromStr for ObjectOwnership { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    A container for elements related to an individual part.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectPart { + ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a + /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present + /// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present + /// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    The part number identifying the part. This value is a positive integer between 1 and + /// 10,000.

    + pub part_number: Option, + ///

    The size of the uploaded part in bytes.

    + pub size: Option, } -impl DtoExt for GetBucketLocationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for ObjectPart { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectPart"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + d.finish_non_exhaustive() + } } + +pub type ObjectSize = i64; + +pub type ObjectSizeGreaterThanBytes = i64; + +pub type ObjectSizeLessThanBytes = i64; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectStorageClass(Cow<'static, str>); + +impl ObjectStorageClass { + pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + + pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; + + pub const GLACIER: &'static str = "GLACIER"; + + pub const GLACIER_IR: &'static str = "GLACIER_IR"; + + pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + + pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + + pub const OUTPOSTS: &'static str = "OUTPOSTS"; + + pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; + + pub const SNOW: &'static str = "SNOW"; + + pub const STANDARD: &'static str = "STANDARD"; + + pub const STANDARD_IA: &'static str = "STANDARD_IA"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ObjectStorageClass { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketLocationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.location_constraint - && val.as_str() == "" { - self.location_constraint = None; + +impl From for Cow<'static, str> { + fn from(s: ObjectStorageClass) -> Self { + s.0 + } } + +impl FromStr for ObjectStorageClass { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    The version of an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectVersion { + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    The entity tag is an MD5 hash of that version of the object.

    + pub e_tag: Option, + ///

    Specifies whether the object is (true) or is not (false) the latest version of an + /// object.

    + pub is_latest: Option, + ///

    The object key.

    + pub key: Option, + ///

    Date and time when the object was last modified.

    + pub last_modified: Option, + ///

    Specifies the owner of the object.

    + pub owner: Option, + ///

    Specifies the restoration status of an object. Objects in certain storage classes must + /// be restored before they can be retrieved. For more information about these storage classes + /// and how to work with archived objects, see Working with archived + /// objects in the Amazon S3 User Guide.

    + pub restore_status: Option, + ///

    Size in bytes of the object.

    + pub size: Option, + ///

    The class of storage used to store the object.

    + pub storage_class: Option, + ///

    Version ID of an object.

    + pub version_id: Option, } -impl DtoExt for GetBucketLoggingInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for ObjectVersion { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectVersion"); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.is_latest { + d.field("is_latest", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.restore_status { + d.field("restore_status", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +pub type ObjectVersionId = String; + +pub type ObjectVersionList = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectVersionStorageClass(Cow<'static, str>); + +impl ObjectVersionStorageClass { + pub const STANDARD: &'static str = "STANDARD"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ObjectVersionStorageClass { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketLoggingOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.logging_enabled { -val.ignore_empty_strings(); + +impl From for Cow<'static, str> { + fn from(s: ObjectVersionStorageClass) -> Self { + s.0 + } } + +impl FromStr for ObjectVersionStorageClass { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct OptionalObjectAttributes(Cow<'static, str>); + +impl OptionalObjectAttributes { + pub const RESTORE_STATUS: &'static str = "RestoreStatus"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketMetadataTableConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl From for OptionalObjectAttributes { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: OptionalObjectAttributes) -> Self { + s.0 + } } + +impl FromStr for OptionalObjectAttributes { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for GetBucketMetadataTableConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.get_bucket_metadata_table_configuration_result { -val.ignore_empty_strings(); + +pub type OptionalObjectAttributesList = List; + +///

    Describes the location where the restore job's output is stored.

    +#[derive(Clone, Default, PartialEq)] +pub struct OutputLocation { + ///

    Describes an S3 location that will receive the results of the restore request.

    + pub s3: Option, } + +impl fmt::Debug for OutputLocation { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("OutputLocation"); + if let Some(ref val) = self.s3 { + d.field("s3", val); + } + d.finish_non_exhaustive() + } } + +///

    Describes how results of the Select job are serialized.

    +#[derive(Clone, Default, PartialEq)] +pub struct OutputSerialization { + ///

    Describes the serialization of CSV-encoded Select results.

    + pub csv: Option, + ///

    Specifies JSON as request's output serialization format.

    + pub json: Option, } -impl DtoExt for GetBucketMetadataTableConfigurationResult { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.error { -val.ignore_empty_strings(); + +impl fmt::Debug for OutputSerialization { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("OutputSerialization"); + if let Some(ref val) = self.csv { + d.field("csv", val); + } + if let Some(ref val) = self.json { + d.field("json", val); + } + d.finish_non_exhaustive() + } } -self.metadata_table_configuration_result.ignore_empty_strings(); + +///

    Container for the owner's display name and ID.

    +#[derive(Clone, Default, PartialEq)] +pub struct Owner { + ///

    Container for the display name of the owner. This value is only supported in the + /// following Amazon Web Services Regions:

    + ///
      + ///
    • + ///

      US East (N. Virginia)

      + ///
    • + ///
    • + ///

      US West (N. California)

      + ///
    • + ///
    • + ///

      US West (Oregon)

      + ///
    • + ///
    • + ///

      Asia Pacific (Singapore)

      + ///
    • + ///
    • + ///

      Asia Pacific (Sydney)

      + ///
    • + ///
    • + ///

      Asia Pacific (Tokyo)

      + ///
    • + ///
    • + ///

      Europe (Ireland)

      + ///
    • + ///
    • + ///

      South America (São Paulo)

      + ///
    • + ///
    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub display_name: Option, + ///

    Container for the ID of the owner.

    + pub id: Option, } + +impl fmt::Debug for Owner { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Owner"); + if let Some(ref val) = self.display_name { + d.field("display_name", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketMetricsConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct OwnerOverride(Cow<'static, str>); + +impl OwnerOverride { + pub const DESTINATION: &'static str = "Destination"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for OwnerOverride { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: OwnerOverride) -> Self { + s.0 + } } -impl DtoExt for GetBucketMetricsConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.metrics_configuration { -val.ignore_empty_strings(); + +impl FromStr for OwnerOverride { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    The container element for a bucket's ownership controls.

    +#[derive(Clone, Default, PartialEq)] +pub struct OwnershipControls { + ///

    The container element for an ownership control rule.

    + pub rules: OwnershipControlsRules, } + +impl fmt::Debug for OwnershipControls { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("OwnershipControls"); + d.field("rules", &self.rules); + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketNotificationConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +///

    The container element for an ownership control rule.

    +#[derive(Clone, PartialEq)] +pub struct OwnershipControlsRule { + pub object_ownership: ObjectOwnership, } + +impl fmt::Debug for OwnershipControlsRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("OwnershipControlsRule"); + d.field("object_ownership", &self.object_ownership); + d.finish_non_exhaustive() + } } + +pub type OwnershipControlsRules = List; + +///

    Container for Parquet.

    +#[derive(Clone, Default, PartialEq)] +pub struct ParquetInput {} + +impl fmt::Debug for ParquetInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ParquetInput"); + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketNotificationConfigurationOutput { - fn ignore_empty_strings(&mut self) { + +///

    Container for elements related to a part.

    +#[derive(Clone, Default, PartialEq)] +pub struct Part { + ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present + /// if the object was uploaded with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present + /// if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a + /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present + /// if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present + /// if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Entity tag returned when the part was uploaded.

    + pub e_tag: Option, + ///

    Date and time at which the part was uploaded.

    + pub last_modified: Option, + ///

    Part number identifying the part. This is a positive integer between 1 and + /// 10,000.

    + pub part_number: Option, + ///

    Size in bytes of the uploaded part data.

    + pub size: Option, } + +impl fmt::Debug for Part { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Part"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketOwnershipControlsInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +pub type PartNumber = i32; + +pub type PartNumberMarker = i32; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct PartitionDateSource(Cow<'static, str>); + +impl PartitionDateSource { + pub const DELIVERY_TIME: &'static str = "DeliveryTime"; + + pub const EVENT_TIME: &'static str = "EventTime"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for PartitionDateSource { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: PartitionDateSource) -> Self { + s.0 + } } -impl DtoExt for GetBucketOwnershipControlsOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.ownership_controls { -val.ignore_empty_strings(); + +impl FromStr for PartitionDateSource { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    Amazon S3 keys for log objects are partitioned in the following format:

    +///

    +/// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +///

    +///

    PartitionedPrefix defaults to EventTime delivery when server access logs are +/// delivered.

    +#[derive(Clone, Default, PartialEq)] +pub struct PartitionedPrefix { + ///

    Specifies the partition date source for the partitioned prefix. + /// PartitionDateSource can be EventTime or + /// DeliveryTime.

    + ///

    For DeliveryTime, the time in the log file names corresponds to the + /// delivery time for the log files.

    + ///

    For EventTime, The logs delivered are for a specific day only. The year, + /// month, and day correspond to the day on which the event occurred, and the hour, minutes and + /// seconds are set to 00 in the key.

    + pub partition_date_source: Option, } + +impl fmt::Debug for PartitionedPrefix { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PartitionedPrefix"); + if let Some(ref val) = self.partition_date_source { + d.field("partition_date_source", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketPolicyInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +pub type Parts = List; + +pub type PartsCount = i32; + +pub type PartsList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Payer(Cow<'static, str>); + +impl Payer { + pub const BUCKET_OWNER: &'static str = "BucketOwner"; + + pub const REQUESTER: &'static str = "Requester"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for Payer { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: Payer) -> Self { + s.0 + } } -impl DtoExt for GetBucketPolicyOutput { - fn ignore_empty_strings(&mut self) { -if self.policy.as_deref() == Some("") { - self.policy = None; + +impl FromStr for Payer { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Permission(Cow<'static, str>); + +impl Permission { + pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; + + pub const READ: &'static str = "READ"; + + pub const READ_ACP: &'static str = "READ_ACP"; + + pub const WRITE: &'static str = "WRITE"; + + pub const WRITE_ACP: &'static str = "WRITE_ACP"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for Permission { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketPolicyStatusInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl From for Cow<'static, str> { + fn from(s: Permission) -> Self { + s.0 + } } + +impl FromStr for Permission { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type Policy = String; + +///

    The container element for a bucket's policy status.

    +#[derive(Clone, Default, PartialEq)] +pub struct PolicyStatus { + ///

    The policy status for this bucket. TRUE indicates that this bucket is + /// public. FALSE indicates that the bucket is not public.

    + pub is_public: Option, } -impl DtoExt for GetBucketPolicyStatusOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.policy_status { -val.ignore_empty_strings(); + +impl fmt::Debug for PolicyStatus { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PolicyStatus"); + if let Some(ref val) = self.is_public { + d.field("is_public", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Default)] +pub struct PostObjectInput { + ///

    The canned ACL to apply to the object. For more information, see Canned + /// ACL in the Amazon S3 User Guide.

    + ///

    When adding a new object, you can use headers to grant ACL-based permissions to + /// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are + /// then added to the ACL on the object. By default, all objects are private. Only the owner + /// has full access control. For more information, see Access Control List (ACL) Overview + /// and Managing + /// ACLs Using the REST API in the Amazon S3 User Guide.

    + ///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting + /// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that + /// use this setting only accept PUT requests that don't specify an ACL or PUT requests that + /// specify bucket owner full control ACLs, such as the bucket-owner-full-control + /// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that + /// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a + /// 400 error with the error code AccessControlListNotSupported. + /// For more information, see Controlling ownership of + /// objects and disabling ACLs in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub acl: Option, + ///

    Object data.

    + pub body: Option, + ///

    The bucket name to which the PUT action was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    + ///

    + /// General purpose buckets - Setting this header to + /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with + /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 + /// Bucket Key.

    + ///

    + /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + pub bucket_key_enabled: Option, + ///

    Can be used to specify caching behavior along the request/reply chain. For more + /// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    + pub cache_control: Option, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    + ///

    For the x-amz-checksum-algorithm + /// header, replace + /// algorithm + /// with the supported algorithm from the following list:

    + ///
      + ///
    • + ///

      + /// CRC32 + ///

      + ///
    • + ///
    • + ///

      + /// CRC32C + ///

      + ///
    • + ///
    • + ///

      + /// CRC64NVME + ///

      + ///
    • + ///
    • + ///

      + /// SHA1 + ///

      + ///
    • + ///
    • + ///

      + /// SHA256 + ///

      + ///
    • + ///
    + ///

    For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    + /// + ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is + /// required for any request to upload an object with a retention period configured using + /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the + /// Amazon S3 User Guide.

    + ///
    + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + pub checksum_algorithm: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the object. The CRC64NVME checksum is + /// always a full object checksum. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    + pub content_disposition: Option, + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be + /// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    + pub content_length: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to + /// RFC 1864. This header can be used as a message integrity check to verify that the data is + /// the same data that was originally sent. Although it is optional, we recommend using the + /// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST + /// request authentication, see REST Authentication.

    + /// + ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is + /// required for any request to upload an object with a retention period configured using + /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the + /// Amazon S3 User Guide.

    + ///
    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    A standard MIME type describing the format of the contents. For more information, see + /// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    + pub content_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The date and time at which the object is no longer cacheable. For more information, see + /// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    + pub expires: Option, + ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_full_control: Option, + ///

    Allows grantee to read the object data and its metadata.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_read: Option, + ///

    Allows grantee to read the object ACL.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_read_acp: Option, + ///

    Allows grantee to write the ACL for the applicable object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_write_acp: Option, + ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE + /// operation matches the ETag of the object in S3. If the ETag values do not match, the + /// operation returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    + ///

    Expects the ETag value as a string.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_match: Option, + ///

    Uploads the object only if the object key name does not already exist in the bucket + /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 + /// ConditionalRequestConflict response. On a 409 failure you should retry the + /// upload.

    + ///

    Expects the '*' (asterisk) character.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_none_match: Option, + ///

    Object key for which the PUT action was initiated.

    + pub key: ObjectKey, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    Specifies whether a legal hold will be applied to this object. For more information + /// about S3 Object Lock, see Object Lock in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_legal_hold_status: Option, + ///

    The Object Lock mode that you want to apply to this object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_mode: Option, + ///

    The date and time when you want this object's Object Lock to expire. Must be formatted + /// as a timestamp parameter.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_retain_until_date: Option, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, + /// AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets passed on + /// to Amazon Web Services KMS for future GetObject operations on + /// this object.

    + ///

    + /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + pub ssekms_encryption_context: Option, + ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same + /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    + ///

    + /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS + /// key to use. If you specify + /// x-amz-server-side-encryption:aws:kms or + /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key + /// (aws/s3) to protect the data.

    + ///

    + /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the + /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses + /// the bucket's default KMS customer managed key ID. If you want to explicitly set the + /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + /// + /// Incorrect key specification results in an HTTP 400 Bad Request error.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 + /// (for example, AES256, aws:kms, aws:kms:dsse).

    + ///
      + ///
    • + ///

      + /// General purpose buckets - You have four mutually + /// exclusive options to protect data using server-side encryption in Amazon S3, depending on + /// how you choose to manage the encryption keys. Specifically, the encryption key + /// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and + /// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by + /// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt + /// data at rest by using server-side encryption with other key options. For more + /// information, see Using Server-Side + /// Encryption in the Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. + /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. + /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and + /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. + ///

      + /// + ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the + /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. + /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), + /// the encryption request headers must match the default encryption configuration of the directory bucket. + /// + ///

      + ///
      + ///
    • + ///
    + pub server_side_encryption: Option, + ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The + /// STANDARD storage class provides high durability and high availability. Depending on + /// performance needs, you can specify a different Storage Class. For more information, see + /// Storage + /// Classes in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store + /// newly created objects.

      + ///
    • + ///
    • + ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      + ///
    • + ///
    + ///
    + pub storage_class: Option, + ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For + /// example, "Key1=Value1")

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub tagging: Option, + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata. For information about object metadata, see Object Key and Metadata in the + /// Amazon S3 User Guide.

    + ///

    In the following example, the request header sets the redirect to an object + /// (anotherPage.html) in the same bucket:

    + ///

    + /// x-amz-website-redirect-location: /anotherPage.html + ///

    + ///

    In the following example, the request header sets the object redirect to another + /// website:

    + ///

    + /// x-amz-website-redirect-location: http://www.example.com/ + ///

    + ///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and + /// How to + /// Configure Website Page Redirects in the Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub website_redirect_location: Option, + ///

    + /// Specifies the offset for appending data to existing objects in bytes. + /// The offset must be equal to the size of the existing object being appended to. + /// If no object exists, setting this header to 0 will create a new object. + ///

    + /// + ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    + ///
    + pub write_offset_bytes: Option, + /// The URL to which the client is redirected upon successful upload. + pub success_action_redirect: Option, + /// The status code returned to the client upon successful upload. Valid values are 200, 201, and 204. + pub success_action_status: Option, + /// The POST policy document that was included in the request. + pub policy: Option, } + +impl fmt::Debug for PostObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PostObjectInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + if let Some(ref val) = self.body { + d.field("body", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + if let Some(ref val) = self.write_offset_bytes { + d.field("write_offset_bytes", val); + } + if let Some(ref val) = self.success_action_redirect { + d.field("success_action_redirect", val); + } + if let Some(ref val) = self.success_action_status { + d.field("success_action_status", val); + } + if let Some(ref val) = self.policy { + d.field("policy", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketReplicationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl PostObjectInput { + #[must_use] + pub fn builder() -> builders::PostObjectInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct PostObjectOutput { + ///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header + /// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it + /// was uploaded without a checksum (and Amazon S3 added the default checksum, + /// CRC64NVME, to the uploaded object). For more information about how + /// checksums are calculated with multipart uploads, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    This header specifies the checksum type of the object, which determines how part-level + /// checksums are combined to create an object-level checksum for multipart objects. For + /// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a + /// data integrity check to verify that the checksum type that is received is the same checksum + /// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Entity tag for the uploaded object.

    + ///

    + /// General purpose buckets - To ensure that data is not + /// corrupted traversing the network, for objects where the ETag is the MD5 digest of the + /// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned + /// ETag to the calculated MD5 value.

    + ///

    + /// Directory buckets - The ETag for the object in + /// a directory bucket isn't the MD5 digest of the object.

    + pub e_tag: Option, + ///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, + /// the response includes this header. It includes the expiry-date and + /// rule-id key-value pairs that provide information about object expiration. + /// The value of the rule-id is URL-encoded.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    + pub expiration: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets + /// passed on to Amazon Web Services KMS for future GetObject + /// operations on this object.

    + pub ssekms_encryption_context: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, + ///

    + /// The size of the object in bytes. This value is only be present if you append to an object. + ///

    + /// + ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    + ///
    + pub size: Option, + ///

    Version ID of the object.

    + ///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID + /// for the object being stored. Amazon S3 returns this ID in the response. When you enable + /// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object + /// simultaneously, it stores all of the objects. For more information about versioning, see + /// Adding Objects to + /// Versioning-Enabled Buckets in the Amazon S3 User Guide. For + /// information about returning the versioning state of a bucket, see GetBucketVersioning.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } + +impl fmt::Debug for PostObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PostObjectOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketReplicationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.replication_configuration { -val.ignore_empty_strings(); + +pub type Prefix = String; + +pub type Priority = i32; + +///

    This data type contains information about progress of an operation.

    +#[derive(Clone, Default, PartialEq)] +pub struct Progress { + ///

    The current number of uncompressed object bytes processed.

    + pub bytes_processed: Option, + ///

    The current number of bytes of records payload data returned.

    + pub bytes_returned: Option, + ///

    The current number of object bytes scanned.

    + pub bytes_scanned: Option, } + +impl fmt::Debug for Progress { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Progress"); + if let Some(ref val) = self.bytes_processed { + d.field("bytes_processed", val); + } + if let Some(ref val) = self.bytes_returned { + d.field("bytes_returned", val); + } + if let Some(ref val) = self.bytes_scanned { + d.field("bytes_scanned", val); + } + d.finish_non_exhaustive() + } } + +///

    This data type contains information about the progress event of an operation.

    +#[derive(Clone, Default, PartialEq)] +pub struct ProgressEvent { + ///

    The Progress event details.

    + pub details: Option, } -impl DtoExt for GetBucketRequestPaymentInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for ProgressEvent { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ProgressEvent"); + if let Some(ref val) = self.details { + d.field("details", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Protocol(Cow<'static, str>); + +impl Protocol { + pub const HTTP: &'static str = "http"; + + pub const HTTPS: &'static str = "https"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for Protocol { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetBucketRequestPaymentOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.payer - && val.as_str() == "" { - self.payer = None; + +impl From for Cow<'static, str> { + fn from(s: Protocol) -> Self { + s.0 + } } + +impl FromStr for Protocol { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can +/// enable the configuration options in any combination. For more information about when Amazon S3 +/// considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct PublicAccessBlockConfiguration { + ///

    Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket + /// and objects in this bucket. Setting this element to TRUE causes the following + /// behavior:

    + ///
      + ///
    • + ///

      PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is + /// public.

      + ///
    • + ///
    • + ///

      PUT Object calls fail if the request includes a public ACL.

      + ///
    • + ///
    • + ///

      PUT Bucket calls fail if the request includes a public ACL.

      + ///
    • + ///
    + ///

    Enabling this setting doesn't affect existing policies or ACLs.

    + pub block_public_acls: Option, + ///

    Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this + /// element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the + /// specified bucket policy allows public access.

    + ///

    Enabling this setting doesn't affect existing bucket policies.

    + pub block_public_policy: Option, + ///

    Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this + /// bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on + /// this bucket and objects in this bucket.

    + ///

    Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't + /// prevent new public ACLs from being set.

    + pub ignore_public_acls: Option, + ///

    Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting + /// this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has + /// a public policy.

    + ///

    Enabling this setting doesn't affect previously stored bucket policies, except that + /// public and cross-account access within any public bucket policy, including non-public + /// delegation to specific accounts, is blocked.

    + pub restrict_public_buckets: Option, } -impl DtoExt for GetBucketTaggingInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for PublicAccessBlockConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PublicAccessBlockConfiguration"); + if let Some(ref val) = self.block_public_acls { + d.field("block_public_acls", val); + } + if let Some(ref val) = self.block_public_policy { + d.field("block_public_policy", val); + } + if let Some(ref val) = self.ignore_public_acls { + d.field("ignore_public_acls", val); + } + if let Some(ref val) = self.restrict_public_buckets { + d.field("restrict_public_buckets", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutBucketAccelerateConfigurationInput { + ///

    Container for setting the transfer acceleration state.

    + pub accelerate_configuration: AccelerateConfiguration, + ///

    The name of the bucket for which the accelerate configuration is set.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } + +impl fmt::Debug for PutBucketAccelerateConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAccelerateConfigurationInput"); + d.field("accelerate_configuration", &self.accelerate_configuration); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketTaggingOutput { - fn ignore_empty_strings(&mut self) { + +impl PutBucketAccelerateConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketAccelerateConfigurationInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAccelerateConfigurationOutput {} + +impl fmt::Debug for PutBucketAccelerateConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAccelerateConfigurationOutput"); + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketVersioningInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAclInput { + ///

    The canned ACL to apply to the bucket.

    + pub acl: Option, + ///

    Contains the elements that set the ACL permissions for an object per grantee.

    + pub access_control_policy: Option, + ///

    The bucket to which to apply the ACL.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, go to RFC + /// 1864. + ///

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the + /// bucket.

    + pub grant_full_control: Option, + ///

    Allows grantee to list the objects in the bucket.

    + pub grant_read: Option, + ///

    Allows grantee to read the bucket ACL.

    + pub grant_read_acp: Option, + ///

    Allows grantee to create new objects in the bucket.

    + ///

    For the bucket and object owners of existing objects, also allows deletions and + /// overwrites of those objects.

    + pub grant_write: Option, + ///

    Allows grantee to write the ACL for the applicable bucket.

    + pub grant_write_acp: Option, } + +impl fmt::Debug for PutBucketAclInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAclInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + if let Some(ref val) = self.access_control_policy { + d.field("access_control_policy", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write { + d.field("grant_write", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + d.finish_non_exhaustive() + } } + +impl PutBucketAclInput { + #[must_use] + pub fn builder() -> builders::PutBucketAclInputBuilder { + default() + } } -impl DtoExt for GetBucketVersioningOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.mfa_delete - && val.as_str() == "" { - self.mfa_delete = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAclOutput {} + +impl fmt::Debug for PutBucketAclOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAclOutput"); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; + +#[derive(Clone, PartialEq)] +pub struct PutBucketAnalyticsConfigurationInput { + ///

    The configuration and any analyses for the analytics filter.

    + pub analytics_configuration: AnalyticsConfiguration, + ///

    The name of the bucket to which an analytics configuration is stored.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID that identifies the analytics configuration.

    + pub id: AnalyticsId, } + +impl fmt::Debug for PutBucketAnalyticsConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAnalyticsConfigurationInput"); + d.field("analytics_configuration", &self.analytics_configuration); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } + +impl PutBucketAnalyticsConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketAnalyticsConfigurationInputBuilder { + default() + } } -impl DtoExt for GetBucketWebsiteInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAnalyticsConfigurationOutput {} + +impl fmt::Debug for PutBucketAnalyticsConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAnalyticsConfigurationOutput"); + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutBucketCorsInput { + ///

    Specifies the bucket impacted by the corsconfiguration.

    + pub bucket: BucketName, + ///

    Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more + /// information, see Enabling + /// Cross-Origin Resource Sharing in the + /// Amazon S3 User Guide.

    + pub cors_configuration: CORSConfiguration, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, go to RFC + /// 1864. + ///

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } + +impl fmt::Debug for PutBucketCorsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketCorsInput"); + d.field("bucket", &self.bucket); + d.field("cors_configuration", &self.cors_configuration); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetBucketWebsiteOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.error_document { -val.ignore_empty_strings(); + +impl PutBucketCorsInput { + #[must_use] + pub fn builder() -> builders::PutBucketCorsInputBuilder { + default() + } } -if let Some(ref mut val) = self.index_document { -val.ignore_empty_strings(); + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketCorsOutput {} + +impl fmt::Debug for PutBucketCorsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketCorsOutput"); + d.finish_non_exhaustive() + } } -if let Some(ref mut val) = self.redirect_all_requests_to { -val.ignore_empty_strings(); + +#[derive(Clone, PartialEq)] +pub struct PutBucketEncryptionInput { + ///

    Specifies default encryption for a bucket using server-side encryption with different + /// key options.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + /// + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + ///
    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the server-side encryption + /// configuration.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    + pub expected_bucket_owner: Option, + pub server_side_encryption_configuration: ServerSideEncryptionConfiguration, } + +impl fmt::Debug for PutBucketEncryptionInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketEncryptionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("server_side_encryption_configuration", &self.server_side_encryption_configuration); + d.finish_non_exhaustive() + } } + +impl PutBucketEncryptionInput { + #[must_use] + pub fn builder() -> builders::PutBucketEncryptionInputBuilder { + default() + } } -impl DtoExt for GetObjectAclInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketEncryptionOutput {} + +impl fmt::Debug for PutBucketEncryptionOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketEncryptionOutput"); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +#[derive(Clone, PartialEq)] +pub struct PutBucketIntelligentTieringConfigurationInput { + ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, + ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, + ///

    Container for S3 Intelligent-Tiering configuration.

    + pub intelligent_tiering_configuration: IntelligentTieringConfiguration, } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl fmt::Debug for PutBucketIntelligentTieringConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationInput"); + d.field("bucket", &self.bucket); + d.field("id", &self.id); + d.field("intelligent_tiering_configuration", &self.intelligent_tiering_configuration); + d.finish_non_exhaustive() + } } + +impl PutBucketIntelligentTieringConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketIntelligentTieringConfigurationInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketIntelligentTieringConfigurationOutput {} + +impl fmt::Debug for PutBucketIntelligentTieringConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationOutput"); + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectAclOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); + +#[derive(Clone, PartialEq)] +pub struct PutBucketInventoryConfigurationInput { + ///

    The name of the bucket where the inventory configuration will be stored.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, + ///

    Specifies the inventory configuration.

    + pub inventory_configuration: InventoryConfiguration, } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for PutBucketInventoryConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketInventoryConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.field("inventory_configuration", &self.inventory_configuration); + d.finish_non_exhaustive() + } } + +impl PutBucketInventoryConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketInventoryConfigurationInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketInventoryConfigurationOutput {} + +impl fmt::Debug for PutBucketInventoryConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketInventoryConfigurationOutput"); + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectAttributesInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLifecycleConfigurationInput { + ///

    The name of the bucket for which to set the configuration.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub expected_bucket_owner: Option, + ///

    Container for lifecycle rules. You can add as many as 1,000 rules.

    + pub lifecycle_configuration: Option, + ///

    Indicates which default minimum object size behavior is applied to the lifecycle + /// configuration.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + ///
      + ///
    • + ///

      + /// all_storage_classes_128K - Objects smaller than 128 KB will not + /// transition to any storage class by default.

      + ///
    • + ///
    • + ///

      + /// varies_by_storage_class - Objects smaller than 128 KB will + /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By + /// default, all other storage classes will prevent transitions smaller than 128 KB. + ///

      + ///
    • + ///
    + ///

    To customize the minimum object size for any transition you can add a filter that + /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in + /// the body of your transition rule. Custom filters always take precedence over the default + /// transition behavior.

    + pub transition_default_minimum_object_size: Option, } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +impl fmt::Debug for PutBucketLifecycleConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketLifecycleConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.lifecycle_configuration { + d.field("lifecycle_configuration", val); + } + if let Some(ref val) = self.transition_default_minimum_object_size { + d.field("transition_default_minimum_object_size", val); + } + d.finish_non_exhaustive() + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +impl PutBucketLifecycleConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketLifecycleConfigurationInputBuilder { + default() + } } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLifecycleConfigurationOutput { + ///

    Indicates which default minimum object size behavior is applied to the lifecycle + /// configuration.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + ///
      + ///
    • + ///

      + /// all_storage_classes_128K - Objects smaller than 128 KB will not + /// transition to any storage class by default.

      + ///
    • + ///
    • + ///

      + /// varies_by_storage_class - Objects smaller than 128 KB will + /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By + /// default, all other storage classes will prevent transitions smaller than 128 KB. + ///

      + ///
    • + ///
    + ///

    To customize the minimum object size for any transition you can add a filter that + /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in + /// the body of your transition rule. Custom filters always take precedence over the default + /// transition behavior.

    + pub transition_default_minimum_object_size: Option, } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +impl fmt::Debug for PutBucketLifecycleConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketLifecycleConfigurationOutput"); + if let Some(ref val) = self.transition_default_minimum_object_size { + d.field("transition_default_minimum_object_size", val); + } + d.finish_non_exhaustive() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +#[derive(Clone, PartialEq)] +pub struct PutBucketLoggingInput { + ///

    The name of the bucket for which to set the logging parameters.

    + pub bucket: BucketName, + ///

    Container for logging status information.

    + pub bucket_logging_status: BucketLoggingStatus, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash of the PutBucketLogging request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } + +impl fmt::Debug for PutBucketLoggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketLoggingInput"); + d.field("bucket", &self.bucket); + d.field("bucket_logging_status", &self.bucket_logging_status); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } + +impl PutBucketLoggingInput { + #[must_use] + pub fn builder() -> builders::PutBucketLoggingInputBuilder { + default() + } } -impl DtoExt for GetObjectAttributesOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.checksum { -val.ignore_empty_strings(); + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLoggingOutput {} + +impl fmt::Debug for PutBucketLoggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketLoggingOutput"); + d.finish_non_exhaustive() + } } -if let Some(ref mut val) = self.object_parts { -val.ignore_empty_strings(); + +#[derive(Clone, PartialEq)] +pub struct PutBucketMetricsConfigurationInput { + ///

    The name of the bucket for which the metrics configuration is set.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and + /// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, + ///

    Specifies the metrics configuration.

    + pub metrics_configuration: MetricsConfiguration, } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for PutBucketMetricsConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketMetricsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.field("metrics_configuration", &self.metrics_configuration); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; + +impl PutBucketMetricsConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketMetricsConfigurationInputBuilder { + default() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketMetricsConfigurationOutput {} + +impl fmt::Debug for PutBucketMetricsConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketMetricsConfigurationOutput"); + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutBucketNotificationConfigurationInput { + ///

    The name of the bucket.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub notification_configuration: NotificationConfiguration, + ///

    Skips validation of Amazon SQS, Amazon SNS, and Lambda + /// destinations. True or false value.

    + pub skip_destination_validation: Option, } + +impl fmt::Debug for PutBucketNotificationConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketNotificationConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("notification_configuration", &self.notification_configuration); + if let Some(ref val) = self.skip_destination_validation { + d.field("skip_destination_validation", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectAttributesParts { - fn ignore_empty_strings(&mut self) { + +impl PutBucketNotificationConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketNotificationConfigurationInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketNotificationConfigurationOutput {} + +impl fmt::Debug for PutBucketNotificationConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketNotificationConfigurationOutput"); + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_mode - && val.as_str() == "" { - self.checksum_mode = None; + +#[derive(Clone, PartialEq)] +pub struct PutBucketOwnershipControlsInput { + ///

    The name of the Amazon S3 bucket whose OwnershipControls you want to set.

    + pub bucket: BucketName, + ///

    The MD5 hash of the OwnershipControls request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or + /// ObjectWriter) that you want to apply to this Amazon S3 bucket.

    + pub ownership_controls: OwnershipControls, } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for PutBucketOwnershipControlsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketOwnershipControlsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("ownership_controls", &self.ownership_controls); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +impl PutBucketOwnershipControlsInput { + #[must_use] + pub fn builder() -> builders::PutBucketOwnershipControlsInputBuilder { + default() + } } -if self.response_cache_control.as_deref() == Some("") { - self.response_cache_control = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketOwnershipControlsOutput {} + +impl fmt::Debug for PutBucketOwnershipControlsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketOwnershipControlsOutput"); + d.finish_non_exhaustive() + } } -if self.response_content_disposition.as_deref() == Some("") { - self.response_content_disposition = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketPolicyInput { + ///

    The name of the bucket.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    + ///

    For the x-amz-checksum-algorithm + /// header, replace + /// algorithm + /// with the supported algorithm from the following list:

    + ///
      + ///
    • + ///

      + /// CRC32 + ///

      + ///
    • + ///
    • + ///

      + /// CRC32C + ///

      + ///
    • + ///
    • + ///

      + /// CRC64NVME + ///

      + ///
    • + ///
    • + ///

      + /// SHA1 + ///

      + ///
    • + ///
    • + ///

      + /// SHA256 + ///

      + ///
    • + ///
    + ///

    For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    + /// + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + ///
    + pub checksum_algorithm: Option, + ///

    Set this parameter to true to confirm that you want to remove your permissions to change + /// this bucket policy in the future.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub confirm_remove_self_bucket_access: Option, + ///

    The MD5 hash of the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    + pub expected_bucket_owner: Option, + ///

    The bucket policy as a JSON document.

    + ///

    For directory buckets, the only IAM action supported in the bucket policy is + /// s3express:CreateSession.

    + pub policy: Policy, } -if self.response_content_encoding.as_deref() == Some("") { - self.response_content_encoding = None; + +impl fmt::Debug for PutBucketPolicyInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketPolicyInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.confirm_remove_self_bucket_access { + d.field("confirm_remove_self_bucket_access", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("policy", &self.policy); + d.finish_non_exhaustive() + } } -if self.response_content_language.as_deref() == Some("") { - self.response_content_language = None; + +impl PutBucketPolicyInput { + #[must_use] + pub fn builder() -> builders::PutBucketPolicyInputBuilder { + default() + } } -if self.response_content_type.as_deref() == Some("") { - self.response_content_type = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketPolicyOutput {} + +impl fmt::Debug for PutBucketPolicyOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketPolicyOutput"); + d.finish_non_exhaustive() + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +#[derive(Clone, PartialEq)] +pub struct PutBucketReplicationInput { + ///

    The name of the bucket

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, see RFC 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub replication_configuration: ReplicationConfiguration, + ///

    A token to allow Object Lock to be enabled for an existing bucket.

    + pub token: Option, } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; + +impl fmt::Debug for PutBucketReplicationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketReplicationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("replication_configuration", &self.replication_configuration); + if let Some(ref val) = self.token { + d.field("token", val); + } + d.finish_non_exhaustive() + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +impl PutBucketReplicationInput { + #[must_use] + pub fn builder() -> builders::PutBucketReplicationInputBuilder { + default() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketReplicationOutput {} + +impl fmt::Debug for PutBucketReplicationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketReplicationOutput"); + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutBucketRequestPaymentInput { + ///

    The bucket name.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, see RFC 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Container for Payer.

    + pub request_payment_configuration: RequestPaymentConfiguration, } + +impl fmt::Debug for PutBucketRequestPaymentInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketRequestPaymentInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("request_payment_configuration", &self.request_payment_configuration); + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectLegalHoldInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl PutBucketRequestPaymentInput { + #[must_use] + pub fn builder() -> builders::PutBucketRequestPaymentInputBuilder { + default() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketRequestPaymentOutput {} + +impl fmt::Debug for PutBucketRequestPaymentOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketRequestPaymentOutput"); + d.finish_non_exhaustive() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +#[derive(Clone, PartialEq)] +pub struct PutBucketTaggingInput { + ///

    The bucket name.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, see RFC 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Container for the TagSet and Tag elements.

    + pub tagging: Tagging, } + +impl fmt::Debug for PutBucketTaggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("tagging", &self.tagging); + d.finish_non_exhaustive() + } } + +impl PutBucketTaggingInput { + #[must_use] + pub fn builder() -> builders::PutBucketTaggingInputBuilder { + default() + } } -impl DtoExt for GetObjectLegalHoldOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.legal_hold { -val.ignore_empty_strings(); + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketTaggingOutput {} + +impl fmt::Debug for PutBucketTaggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketTaggingOutput"); + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutBucketVersioningInput { + ///

    The bucket name.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a + /// message integrity check to verify that the request body was not corrupted in transit. For + /// more information, see RFC + /// 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The concatenation of the authentication device's serial number, a space, and the value + /// that is displayed on your authentication device.

    + pub mfa: Option, + ///

    Container for setting the versioning state.

    + pub versioning_configuration: VersioningConfiguration, } + +impl fmt::Debug for PutBucketVersioningInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketVersioningInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.mfa { + d.field("mfa", val); + } + d.field("versioning_configuration", &self.versioning_configuration); + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectLockConfigurationInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl PutBucketVersioningInput { + #[must_use] + pub fn builder() -> builders::PutBucketVersioningInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketVersioningOutput {} + +impl fmt::Debug for PutBucketVersioningOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketVersioningOutput"); + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutBucketWebsiteInput { + ///

    The bucket name.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, see RFC 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Container for the request.

    + pub website_configuration: WebsiteConfiguration, } -impl DtoExt for GetObjectLockConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.object_lock_configuration { -val.ignore_empty_strings(); + +impl fmt::Debug for PutBucketWebsiteInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketWebsiteInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("website_configuration", &self.website_configuration); + d.finish_non_exhaustive() + } } + +impl PutBucketWebsiteInput { + #[must_use] + pub fn builder() -> builders::PutBucketWebsiteInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketWebsiteOutput {} + +impl fmt::Debug for PutBucketWebsiteOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketWebsiteOutput"); + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectOutput { - fn ignore_empty_strings(&mut self) { -if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectAclInput { + ///

    The canned ACL to apply to the object. For more information, see Canned + /// ACL.

    + pub acl: Option, + ///

    Contains the elements that set the ACL permissions for an object per grantee.

    + pub access_control_policy: Option, + ///

    The bucket name that contains the object to which you want to attach the ACL.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, go to RFC + /// 1864.> + ///

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the + /// bucket.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_full_control: Option, + ///

    Allows grantee to list the objects in the bucket.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_read: Option, + ///

    Allows grantee to read the bucket ACL.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_read_acp: Option, + ///

    Allows grantee to create new objects in the bucket.

    + ///

    For the bucket and object owners of existing objects, also allows deletions and + /// overwrites of those objects.

    + pub grant_write: Option, + ///

    Allows grantee to write the ACL for the applicable bucket.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_write_acp: Option, + ///

    Key for which the PUT action was initiated.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    Version ID used to reference a specific version of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; + +impl fmt::Debug for PutObjectAclInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectAclInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + if let Some(ref val) = self.access_control_policy { + d.field("access_control_policy", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write { + d.field("grant_write", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + +impl PutObjectAclInput { + #[must_use] + pub fn builder() -> builders::PutObjectAclInputBuilder { + default() + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectAclOutput { + pub request_charged: Option, } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; + +impl fmt::Debug for PutObjectAclOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectAclOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; + +#[derive(Default)] +pub struct PutObjectInput { + ///

    The canned ACL to apply to the object. For more information, see Canned + /// ACL in the Amazon S3 User Guide.

    + ///

    When adding a new object, you can use headers to grant ACL-based permissions to + /// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are + /// then added to the ACL on the object. By default, all objects are private. Only the owner + /// has full access control. For more information, see Access Control List (ACL) Overview + /// and Managing + /// ACLs Using the REST API in the Amazon S3 User Guide.

    + ///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting + /// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that + /// use this setting only accept PUT requests that don't specify an ACL or PUT requests that + /// specify bucket owner full control ACLs, such as the bucket-owner-full-control + /// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that + /// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a + /// 400 error with the error code AccessControlListNotSupported. + /// For more information, see Controlling ownership of + /// objects and disabling ACLs in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub acl: Option, + ///

    Object data.

    + pub body: Option, + ///

    The bucket name to which the PUT action was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    + ///

    + /// General purpose buckets - Setting this header to + /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with + /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 + /// Bucket Key.

    + ///

    + /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + pub bucket_key_enabled: Option, + ///

    Can be used to specify caching behavior along the request/reply chain. For more + /// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    + pub cache_control: Option, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    + ///

    For the x-amz-checksum-algorithm + /// header, replace + /// algorithm + /// with the supported algorithm from the following list:

    + ///
      + ///
    • + ///

      + /// CRC32 + ///

      + ///
    • + ///
    • + ///

      + /// CRC32C + ///

      + ///
    • + ///
    • + ///

      + /// CRC64NVME + ///

      + ///
    • + ///
    • + ///

      + /// SHA1 + ///

      + ///
    • + ///
    • + ///

      + /// SHA256 + ///

      + ///
    • + ///
    + ///

    For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    + /// + ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is + /// required for any request to upload an object with a retention period configured using + /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the + /// Amazon S3 User Guide.

    + ///
    + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + pub checksum_algorithm: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the object. The CRC64NVME checksum is + /// always a full object checksum. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    + pub content_disposition: Option, + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be + /// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    + pub content_length: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to + /// RFC 1864. This header can be used as a message integrity check to verify that the data is + /// the same data that was originally sent. Although it is optional, we recommend using the + /// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST + /// request authentication, see REST Authentication.

    + /// + ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is + /// required for any request to upload an object with a retention period configured using + /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the + /// Amazon S3 User Guide.

    + ///
    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    A standard MIME type describing the format of the contents. For more information, see + /// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    + pub content_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The date and time at which the object is no longer cacheable. For more information, see + /// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    + pub expires: Option, + ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_full_control: Option, + ///

    Allows grantee to read the object data and its metadata.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_read: Option, + ///

    Allows grantee to read the object ACL.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_read_acp: Option, + ///

    Allows grantee to write the ACL for the applicable object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_write_acp: Option, + ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE + /// operation matches the ETag of the object in S3. If the ETag values do not match, the + /// operation returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    + ///

    Expects the ETag value as a string.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_match: Option, + ///

    Uploads the object only if the object key name does not already exist in the bucket + /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 + /// ConditionalRequestConflict response. On a 409 failure you should retry the + /// upload.

    + ///

    Expects the '*' (asterisk) character.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_none_match: Option, + ///

    Object key for which the PUT action was initiated.

    + pub key: ObjectKey, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    Specifies whether a legal hold will be applied to this object. For more information + /// about S3 Object Lock, see Object Lock in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_legal_hold_status: Option, + ///

    The Object Lock mode that you want to apply to this object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_mode: Option, + ///

    The date and time when you want this object's Object Lock to expire. Must be formatted + /// as a timestamp parameter.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_retain_until_date: Option, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, + /// AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets passed on + /// to Amazon Web Services KMS for future GetObject operations on + /// this object.

    + ///

    + /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + pub ssekms_encryption_context: Option, + ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same + /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    + ///

    + /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS + /// key to use. If you specify + /// x-amz-server-side-encryption:aws:kms or + /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key + /// (aws/s3) to protect the data.

    + ///

    + /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the + /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses + /// the bucket's default KMS customer managed key ID. If you want to explicitly set the + /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + /// + /// Incorrect key specification results in an HTTP 400 Bad Request error.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 + /// (for example, AES256, aws:kms, aws:kms:dsse).

    + ///
      + ///
    • + ///

      + /// General purpose buckets - You have four mutually + /// exclusive options to protect data using server-side encryption in Amazon S3, depending on + /// how you choose to manage the encryption keys. Specifically, the encryption key + /// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and + /// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by + /// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt + /// data at rest by using server-side encryption with other key options. For more + /// information, see Using Server-Side + /// Encryption in the Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. + /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. + /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and + /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. + ///

      + /// + ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the + /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. + /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), + /// the encryption request headers must match the default encryption configuration of the directory bucket. + /// + ///

      + ///
      + ///
    • + ///
    + pub server_side_encryption: Option, + ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The + /// STANDARD storage class provides high durability and high availability. Depending on + /// performance needs, you can specify a different Storage Class. For more information, see + /// Storage + /// Classes in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store + /// newly created objects.

      + ///
    • + ///
    • + ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      + ///
    • + ///
    + ///
    + pub storage_class: Option, + ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For + /// example, "Key1=Value1")

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub tagging: Option, + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata. For information about object metadata, see Object Key and Metadata in the + /// Amazon S3 User Guide.

    + ///

    In the following example, the request header sets the redirect to an object + /// (anotherPage.html) in the same bucket:

    + ///

    + /// x-amz-website-redirect-location: /anotherPage.html + ///

    + ///

    In the following example, the request header sets the object redirect to another + /// website:

    + ///

    + /// x-amz-website-redirect-location: http://www.example.com/ + ///

    + ///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and + /// How to + /// Configure Website Page Redirects in the Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub website_redirect_location: Option, + ///

    + /// Specifies the offset for appending data to existing objects in bytes. + /// The offset must be equal to the size of the existing object being appended to. + /// If no object exists, setting this header to 0 will create a new object. + ///

    + /// + ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    + ///
    + pub write_offset_bytes: Option, } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; + +impl fmt::Debug for PutObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + if let Some(ref val) = self.body { + d.field("body", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + if let Some(ref val) = self.write_offset_bytes { + d.field("write_offset_bytes", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; + +impl PutObjectInput { + #[must_use] + pub fn builder() -> builders::PutObjectInputBuilder { + default() + } } -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLegalHoldInput { + ///

    The bucket name containing the object that you want to place a legal hold on.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash for the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The key name for the object that you want to place a legal hold on.

    + pub key: ObjectKey, + ///

    Container element for the legal hold configuration you want to apply to the specified + /// object.

    + pub legal_hold: Option, + pub request_payer: Option, + ///

    The version ID of the object that you want to place a legal hold on.

    + pub version_id: Option, } -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; + +impl fmt::Debug for PutObjectLegalHoldInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectLegalHoldInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.legal_hold { + d.field("legal_hold", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if self.content_language.as_deref() == Some("") { - self.content_language = None; + +impl PutObjectLegalHoldInput { + #[must_use] + pub fn builder() -> builders::PutObjectLegalHoldInputBuilder { + default() + } } -if self.content_range.as_deref() == Some("") { - self.content_range = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLegalHoldOutput { + pub request_charged: Option, } -if self.expiration.as_deref() == Some("") { - self.expiration = None; + +impl fmt::Debug for PutObjectLegalHoldOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectLegalHoldOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLockConfigurationInput { + ///

    The bucket whose Object Lock configuration you want to create or replace.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash for the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The Object Lock configuration that you want to apply to the specified bucket.

    + pub object_lock_configuration: Option, + pub request_payer: Option, + ///

    A token to allow Object Lock to be enabled for an existing bucket.

    + pub token: Option, } -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; + +impl fmt::Debug for PutObjectLockConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectLockConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.object_lock_configuration { + d.field("object_lock_configuration", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.token { + d.field("token", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.replication_status - && val.as_str() == "" { - self.replication_status = None; + +impl PutObjectLockConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutObjectLockConfigurationInputBuilder { + default() + } } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLockConfigurationOutput { + pub request_charged: Option, } -if self.restore.as_deref() == Some("") { - self.restore = None; + +impl fmt::Debug for PutObjectLockConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectLockConfigurationOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectOutput { + ///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header + /// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it + /// was uploaded without a checksum (and Amazon S3 added the default checksum, + /// CRC64NVME, to the uploaded object). For more information about how + /// checksums are calculated with multipart uploads, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    This header specifies the checksum type of the object, which determines how part-level + /// checksums are combined to create an object-level checksum for multipart objects. For + /// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a + /// data integrity check to verify that the checksum type that is received is the same checksum + /// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Entity tag for the uploaded object.

    + ///

    + /// General purpose buckets - To ensure that data is not + /// corrupted traversing the network, for objects where the ETag is the MD5 digest of the + /// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned + /// ETag to the calculated MD5 value.

    + ///

    + /// Directory buckets - The ETag for the object in + /// a directory bucket isn't the MD5 digest of the object.

    + pub e_tag: Option, + ///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, + /// the response includes this header. It includes the expiry-date and + /// rule-id key-value pairs that provide information about object expiration. + /// The value of the rule-id is URL-encoded.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    + pub expiration: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets + /// passed on to Amazon Web Services KMS for future GetObject + /// operations on this object.

    + pub ssekms_encryption_context: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, + ///

    + /// The size of the object in bytes. This value is only be present if you append to an object. + ///

    + /// + ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    + ///
    + pub size: Option, + ///

    Version ID of the object.

    + ///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID + /// for the object being stored. Amazon S3 returns this ID in the response. When you enable + /// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object + /// simultaneously, it stores all of the objects. For more information about versioning, see + /// Adding Objects to + /// Versioning-Enabled Buckets in the Amazon S3 User Guide. For + /// information about returning the versioning state of a bucket, see GetBucketVersioning.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +impl fmt::Debug for PutObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectRetentionInput { + ///

    The bucket name that contains the object you want to apply this Object Retention + /// configuration to.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates whether this action should bypass Governance-mode restrictions.

    + pub bypass_governance_retention: Option, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash for the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The key name for the object that you want to apply this Object Retention configuration + /// to.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    The container element for the Object Retention configuration.

    + pub retention: Option, + ///

    The version ID for the object that you want to apply this Object Retention configuration + /// to.

    + pub version_id: Option, } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +impl fmt::Debug for PutObjectRetentionInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectRetentionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bypass_governance_retention { + d.field("bypass_governance_retention", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.retention { + d.field("retention", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; + +impl PutObjectRetentionInput { + #[must_use] + pub fn builder() -> builders::PutObjectRetentionInputBuilder { + default() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectRetentionOutput { + pub request_charged: Option, } -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; + +impl fmt::Debug for PutObjectRetentionOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectRetentionOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutObjectTaggingInput { + ///

    The bucket name containing the object.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash for the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Name of the object key.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    Container for the TagSet and Tag elements

    + pub tagging: Tagging, + ///

    The versionId of the object that the tag-set will be added to.

    + pub version_id: Option, } + +impl fmt::Debug for PutObjectTaggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.field("tagging", &self.tagging); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectRetentionInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl PutObjectTaggingInput { + #[must_use] + pub fn builder() -> builders::PutObjectTaggingInputBuilder { + default() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectTaggingOutput { + ///

    The versionId of the object the tag-set was added to.

    + pub version_id: Option, } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl fmt::Debug for PutObjectTaggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectTaggingOutput"); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutPublicAccessBlockInput { + ///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want + /// to set.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash of the PutPublicAccessBlock request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 + /// bucket. You can enable the configuration options in any combination. For more information + /// about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    + pub public_access_block_configuration: PublicAccessBlockConfiguration, } + +impl fmt::Debug for PutPublicAccessBlockInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutPublicAccessBlockInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("public_access_block_configuration", &self.public_access_block_configuration); + d.finish_non_exhaustive() + } } -impl DtoExt for GetObjectRetentionOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.retention { -val.ignore_empty_strings(); + +impl PutPublicAccessBlockInput { + #[must_use] + pub fn builder() -> builders::PutPublicAccessBlockInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct PutPublicAccessBlockOutput {} + +impl fmt::Debug for PutPublicAccessBlockOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutPublicAccessBlockOutput"); + d.finish_non_exhaustive() + } } + +pub type QueueArn = String; + +///

    Specifies the configuration for publishing messages to an Amazon Simple Queue Service +/// (Amazon SQS) queue when Amazon S3 detects specified events.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct QueueConfiguration { + ///

    A collection of bucket events for which to send notifications

    + pub events: EventList, + pub filter: Option, + pub id: Option, + ///

    The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message + /// when it detects events of the specified type.

    + pub queue_arn: QueueArn, } -impl DtoExt for GetObjectTaggingInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for QueueConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("QueueConfiguration"); + d.field("events", &self.events); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.field("queue_arn", &self.queue_arn); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +pub type QueueConfigurationList = List; + +pub type Quiet = bool; + +pub type QuoteCharacter = String; + +pub type QuoteEscapeCharacter = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct QuoteFields(Cow<'static, str>); + +impl QuoteFields { + pub const ALWAYS: &'static str = "ALWAYS"; + + pub const ASNEEDED: &'static str = "ASNEEDED"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +impl From for QuoteFields { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: QuoteFields) -> Self { + s.0 + } } + +impl FromStr for QuoteFields { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for GetObjectTaggingOutput { - fn ignore_empty_strings(&mut self) { -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +pub type RecordDelimiter = String; + +///

    The container for the records event.

    +#[derive(Clone, Default, PartialEq)] +pub struct RecordsEvent { + ///

    The byte array of partial, one or more result records. S3 Select doesn't guarantee that + /// a record will be self-contained in one record frame. To ensure continuous streaming of + /// data, S3 Select might split the same record across multiple record frames instead of + /// aggregating the results in memory. Some S3 clients (for example, the SDK for Java) handle this behavior by creating a ByteStream out of the response by + /// default. Other clients might not handle this behavior by default. In those cases, you must + /// aggregate the results on the client side and parse the response.

    + pub payload: Option, } + +impl fmt::Debug for RecordsEvent { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RecordsEvent"); + if let Some(ref val) = self.payload { + d.field("payload", val); + } + d.finish_non_exhaustive() + } } + +///

    Specifies how requests are redirected. In the event of an error, you can specify a +/// different error code to return.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Redirect { + ///

    The host name to use in the redirect request.

    + pub host_name: Option, + ///

    The HTTP redirect code to use on the response. Not required if one of the siblings is + /// present.

    + pub http_redirect_code: Option, + ///

    Protocol to use when redirecting requests. The default is the protocol that is used in + /// the original request.

    + pub protocol: Option, + ///

    The object key prefix to use in the redirect request. For example, to redirect requests + /// for all pages with prefix docs/ (objects in the docs/ folder) to + /// documents/, you can set a condition block with KeyPrefixEquals + /// set to docs/ and in the Redirect set ReplaceKeyPrefixWith to + /// /documents. Not required if one of the siblings is present. Can be present + /// only if ReplaceKeyWith is not provided.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub replace_key_prefix_with: Option, + ///

    The specific object key to use in the redirect request. For example, redirect request to + /// error.html. Not required if one of the siblings is present. Can be present + /// only if ReplaceKeyPrefixWith is not provided.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub replace_key_with: Option, } -impl DtoExt for GetObjectTorrentInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for Redirect { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Redirect"); + if let Some(ref val) = self.host_name { + d.field("host_name", val); + } + if let Some(ref val) = self.http_redirect_code { + d.field("http_redirect_code", val); + } + if let Some(ref val) = self.protocol { + d.field("protocol", val); + } + if let Some(ref val) = self.replace_key_prefix_with { + d.field("replace_key_prefix_with", val); + } + if let Some(ref val) = self.replace_key_with { + d.field("replace_key_with", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 +/// bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct RedirectAllRequestsTo { + ///

    Name of the host where requests are redirected.

    + pub host_name: HostName, + ///

    Protocol to use when redirecting requests. The default is the protocol that is used in + /// the original request.

    + pub protocol: Option, } + +impl fmt::Debug for RedirectAllRequestsTo { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RedirectAllRequestsTo"); + d.field("host_name", &self.host_name); + if let Some(ref val) = self.protocol { + d.field("protocol", val); + } + d.finish_non_exhaustive() + } } + +pub type Region = String; + +pub type ReplaceKeyPrefixWith = String; + +pub type ReplaceKeyWith = String; + +pub type ReplicaKmsKeyID = String; + +///

    A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't +/// replicate replica modifications by default. In the latest version of replication +/// configuration (when Filter is specified), you can specify this element and set +/// the status to Enabled to replicate modifications on replicas.

    +/// +///

    If you don't specify the Filter element, Amazon S3 assumes that the +/// replication configuration is the earlier version, V1. In the earlier version, this +/// element is not allowed.

    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicaModifications { + ///

    Specifies whether Amazon S3 replicates modifications on replicas.

    + pub status: ReplicaModificationsStatus, } -impl DtoExt for GetObjectTorrentOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for ReplicaModifications { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicaModifications"); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicaModificationsStatus(Cow<'static, str>); + +impl ReplicaModificationsStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ReplicaModificationsStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for GetPublicAccessBlockInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl From for Cow<'static, str> { + fn from(s: ReplicaModificationsStatus) -> Self { + s.0 + } } + +impl FromStr for ReplicaModificationsStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    A container for replication rules. You can add up to 1,000 rules. The maximum size of a +/// replication configuration is 2 MB.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationConfiguration { + ///

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when + /// replicating objects. For more information, see How to Set Up Replication + /// in the Amazon S3 User Guide.

    + pub role: Role, + ///

    A container for one or more replication rules. A replication configuration must have at + /// least one rule and can contain a maximum of 1,000 rules.

    + pub rules: ReplicationRules, } -impl DtoExt for GetPublicAccessBlockOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.public_access_block_configuration { -val.ignore_empty_strings(); + +impl fmt::Debug for ReplicationConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationConfiguration"); + d.field("role", &self.role); + d.field("rules", &self.rules); + d.finish_non_exhaustive() + } } + +///

    Specifies which Amazon S3 objects to replicate and where to store the replicas.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicationRule { + pub delete_marker_replication: Option, + ///

    A container for information about the replication destination and its configurations + /// including enabling the S3 Replication Time Control (S3 RTC).

    + pub destination: Destination, + ///

    Optional configuration to replicate existing source bucket objects.

    + /// + ///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the + /// Amazon S3 User Guide.

    + ///
    + pub existing_object_replication: Option, + pub filter: Option, + ///

    A unique identifier for the rule. The maximum value is 255 characters.

    + pub id: Option, + ///

    An object key name prefix that identifies the object or objects to which the rule + /// applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, + /// specify an empty string.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + ///

    The priority indicates which rule has precedence whenever two or more replication rules + /// conflict. Amazon S3 will attempt to replicate objects according to all replication rules. + /// However, if there are two or more rules with the same destination bucket, then objects will + /// be replicated according to the rule with the highest priority. The higher the number, the + /// higher the priority.

    + ///

    For more information, see Replication in the + /// Amazon S3 User Guide.

    + pub priority: Option, + ///

    A container that describes additional filters for identifying the source objects that + /// you want to replicate. You can choose to enable or disable the replication of these + /// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created + /// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service + /// (SSE-KMS).

    + pub source_selection_criteria: Option, + ///

    Specifies whether the rule is enabled.

    + pub status: ReplicationRuleStatus, } + +impl fmt::Debug for ReplicationRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationRule"); + if let Some(ref val) = self.delete_marker_replication { + d.field("delete_marker_replication", val); + } + d.field("destination", &self.destination); + if let Some(ref val) = self.existing_object_replication { + d.field("existing_object_replication", val); + } + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.priority { + d.field("priority", val); + } + if let Some(ref val) = self.source_selection_criteria { + d.field("source_selection_criteria", val); + } + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -impl DtoExt for GlacierJobParameters { - fn ignore_empty_strings(&mut self) { + +///

    A container for specifying rule filters. The filters determine the subset of objects to +/// which the rule applies. This element is required only if you specify more than one filter.

    +///

    For example:

    +///
      +///
    • +///

      If you specify both a Prefix and a Tag filter, wrap +/// these filters in an And tag.

      +///
    • +///
    • +///

      If you specify a filter based on multiple tags, wrap the Tag elements +/// in an And tag.

      +///
    • +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationRuleAndOperator { + ///

    An object key name prefix that identifies the subset of objects to which the rule + /// applies.

    + pub prefix: Option, + ///

    An array of tags containing key and value pairs.

    + pub tags: Option, } + +impl fmt::Debug for ReplicationRuleAndOperator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationRuleAndOperator"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for Grant { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.grantee { -val.ignore_empty_strings(); + +///

    A filter that identifies the subset of objects to which the replication rule applies. A +/// Filter must specify exactly one Prefix, Tag, or +/// an And child element.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationRuleFilter { + ///

    A container for specifying rule filters. The filters determine the subset of objects to + /// which the rule applies. This element is required only if you specify more than one filter. + /// For example:

    + ///
      + ///
    • + ///

      If you specify both a Prefix and a Tag filter, wrap + /// these filters in an And tag.

      + ///
    • + ///
    • + ///

      If you specify a filter based on multiple tags, wrap the Tag elements + /// in an And tag.

      + ///
    • + ///
    + pub and: Option, + ///

    An object key name prefix that identifies the subset of objects to which the rule + /// applies.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + ///

    A container for specifying a tag key and value.

    + ///

    The rule applies only to objects that have the tag in their tag set.

    + pub tag: Option, } -if let Some(ref val) = self.permission - && val.as_str() == "" { - self.permission = None; + +impl fmt::Debug for ReplicationRuleFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationRuleFilter"); + if let Some(ref val) = self.and { + d.field("and", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tag { + d.field("tag", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicationRuleStatus(Cow<'static, str>); + +impl ReplicationRuleStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ReplicationRuleStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for Grantee { - fn ignore_empty_strings(&mut self) { -if self.display_name.as_deref() == Some("") { - self.display_name = None; + +impl From for Cow<'static, str> { + fn from(s: ReplicationRuleStatus) -> Self { + s.0 + } } -if self.email_address.as_deref() == Some("") { - self.email_address = None; + +impl FromStr for ReplicationRuleStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if self.id.as_deref() == Some("") { - self.id = None; + +pub type ReplicationRules = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ReplicationStatus(Cow<'static, str>); + +impl ReplicationStatus { + pub const COMPLETE: &'static str = "COMPLETE"; + + pub const COMPLETED: &'static str = "COMPLETED"; + + pub const FAILED: &'static str = "FAILED"; + + pub const PENDING: &'static str = "PENDING"; + + pub const REPLICA: &'static str = "REPLICA"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.uri.as_deref() == Some("") { - self.uri = None; + +impl From for ReplicationStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: ReplicationStatus) -> Self { + s.0 + } } + +impl FromStr for ReplicationStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for HeadBucketInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +///

    A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is +/// enabled and the time when all objects and operations on objects must be replicated. Must be +/// specified together with a Metrics block.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicationTime { + ///

    Specifies whether the replication time is enabled.

    + pub status: ReplicationTimeStatus, + ///

    A container specifying the time by which replication should be complete for all objects + /// and operations on objects.

    + pub time: ReplicationTimeValue, } + +impl fmt::Debug for ReplicationTime { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationTime"); + d.field("status", &self.status); + d.field("time", &self.time); + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicationTimeStatus(Cow<'static, str>); + +impl ReplicationTimeStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for HeadBucketOutput { - fn ignore_empty_strings(&mut self) { -if self.bucket_location_name.as_deref() == Some("") { - self.bucket_location_name = None; + +impl From for ReplicationTimeStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.bucket_location_type - && val.as_str() == "" { - self.bucket_location_type = None; + +impl From for Cow<'static, str> { + fn from(s: ReplicationTimeStatus) -> Self { + s.0 + } } -if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; + +impl FromStr for ReplicationTimeStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics +/// EventThreshold.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationTimeValue { + ///

    Contains an integer specifying time in minutes.

    + ///

    Valid value: 15

    + pub minutes: Option, } + +impl fmt::Debug for ReplicationTimeValue { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationTimeValue"); + if let Some(ref val) = self.minutes { + d.field("minutes", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for HeadObjectInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_mode - && val.as_str() == "" { - self.checksum_mode = None; + +///

    If present, indicates that the requester was successfully charged for the +/// request.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RequestCharged(Cow<'static, str>); + +impl RequestCharged { + pub const REQUESTER: &'static str = "requester"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl From for RequestCharged { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; + +impl From for Cow<'static, str> { + fn from(s: RequestCharged) -> Self { + s.0 + } } -if self.response_cache_control.as_deref() == Some("") { - self.response_cache_control = None; + +impl FromStr for RequestCharged { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if self.response_content_disposition.as_deref() == Some("") { - self.response_content_disposition = None; + +///

    Confirms that the requester knows that they will be charged for the request. Bucket +/// owners need not specify this parameter in their requests. If either the source or +/// destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding +/// charges to copy the object. For information about downloading objects from Requester Pays +/// buckets, see Downloading Objects in +/// Requester Pays Buckets in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RequestPayer(Cow<'static, str>); + +impl RequestPayer { + pub const REQUESTER: &'static str = "requester"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.response_content_encoding.as_deref() == Some("") { - self.response_content_encoding = None; + +impl From for RequestPayer { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if self.response_content_language.as_deref() == Some("") { - self.response_content_language = None; + +impl From for Cow<'static, str> { + fn from(s: RequestPayer) -> Self { + s.0 + } } -if self.response_content_type.as_deref() == Some("") { - self.response_content_type = None; + +impl FromStr for RequestPayer { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +///

    Container for Payer.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct RequestPaymentConfiguration { + ///

    Specifies who pays for the download and request fees.

    + pub payer: Payer, } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; + +impl fmt::Debug for RequestPaymentConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RequestPaymentConfiguration"); + d.field("payer", &self.payer); + d.finish_non_exhaustive() + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +impl Default for RequestPaymentConfiguration { + fn default() -> Self { + Self { + payer: String::new().into(), + } + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +///

    Container for specifying if periodic QueryProgress messages should be +/// sent.

    +#[derive(Clone, Default, PartialEq)] +pub struct RequestProgress { + ///

    Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, + /// FALSE. Default value: FALSE.

    + pub enabled: Option, } + +impl fmt::Debug for RequestProgress { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RequestProgress"); + if let Some(ref val) = self.enabled { + d.field("enabled", val); + } + d.finish_non_exhaustive() + } } + +pub type RequestRoute = String; + +pub type RequestToken = String; + +pub type ResponseCacheControl = String; + +pub type ResponseContentDisposition = String; + +pub type ResponseContentEncoding = String; + +pub type ResponseContentLanguage = String; + +pub type ResponseContentType = String; + +pub type ResponseExpires = Timestamp; + +pub type Restore = String; + +pub type RestoreExpiryDate = Timestamp; + +#[derive(Clone, Default, PartialEq)] +pub struct RestoreObjectInput { + ///

    The bucket name containing the object to restore.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Object key for which the action was initiated.

    + pub key: ObjectKey, + pub request_payer: Option, + pub restore_request: Option, + ///

    VersionId used to reference a specific version of the object.

    + pub version_id: Option, } -impl DtoExt for HeadObjectOutput { - fn ignore_empty_strings(&mut self) { -if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; + +impl fmt::Debug for RestoreObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RestoreObjectInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.restore_request { + d.field("restore_request", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.archive_status - && val.as_str() == "" { - self.archive_status = None; + +impl RestoreObjectInput { + #[must_use] + pub fn builder() -> builders::RestoreObjectInputBuilder { + default() + } } -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; + +#[derive(Clone, Default, PartialEq)] +pub struct RestoreObjectOutput { + pub request_charged: Option, + ///

    Indicates the path in the provided S3 output location where Select results will be + /// restored to.

    + pub restore_output_path: Option, } -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + +impl fmt::Debug for RestoreObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RestoreObjectOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.restore_output_path { + d.field("restore_output_path", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; + +pub type RestoreOutputPath = String; + +///

    Container for restore job parameters.

    +#[derive(Clone, Default, PartialEq)] +pub struct RestoreRequest { + ///

    Lifetime of the active copy in days. Do not use with restores that specify + /// OutputLocation.

    + ///

    The Days element is required for regular restores, and must not be provided for select + /// requests.

    + pub days: Option, + ///

    The optional description for the job.

    + pub description: Option, + ///

    S3 Glacier related parameters pertaining to this job. Do not use with restores that + /// specify OutputLocation.

    + pub glacier_job_parameters: Option, + ///

    Describes the location where the restore job's output is stored.

    + pub output_location: Option, + /// + ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more + ///

    + ///
    + ///

    Describes the parameters for Select job types.

    + pub select_parameters: Option, + ///

    Retrieval tier at which the restore will be processed.

    + pub tier: Option, + /// + ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more + ///

    + ///
    + ///

    Type of restore request.

    + pub type_: Option, } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; + +impl fmt::Debug for RestoreRequest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RestoreRequest"); + if let Some(ref val) = self.days { + d.field("days", val); + } + if let Some(ref val) = self.description { + d.field("description", val); + } + if let Some(ref val) = self.glacier_job_parameters { + d.field("glacier_job_parameters", val); + } + if let Some(ref val) = self.output_location { + d.field("output_location", val); + } + if let Some(ref val) = self.select_parameters { + d.field("select_parameters", val); + } + if let Some(ref val) = self.tier { + d.field("tier", val); + } + if let Some(ref val) = self.type_ { + d.field("type_", val); + } + d.finish_non_exhaustive() + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RestoreRequestType(Cow<'static, str>); + +impl RestoreRequestType { + pub const SELECT: &'static str = "SELECT"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; + +impl From for RestoreRequestType { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; + +impl From for Cow<'static, str> { + fn from(s: RestoreRequestType) -> Self { + s.0 + } } -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; + +impl FromStr for RestoreRequestType { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; + +///

    Specifies the restoration status of an object. Objects in certain storage classes must +/// be restored before they can be retrieved. For more information about these storage classes +/// and how to work with archived objects, see Working with archived +/// objects in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    +#[derive(Clone, Default, PartialEq)] +pub struct RestoreStatus { + ///

    Specifies whether the object is currently being restored. If the object restoration is + /// in progress, the header returns the value TRUE. For example:

    + ///

    + /// x-amz-optional-object-attributes: IsRestoreInProgress="true" + ///

    + ///

    If the object restoration has completed, the header returns the value + /// FALSE. For example:

    + ///

    + /// x-amz-optional-object-attributes: IsRestoreInProgress="false", + /// RestoreExpiryDate="2012-12-21T00:00:00.000Z" + ///

    + ///

    If the object hasn't been restored, there is no header response.

    + pub is_restore_in_progress: Option, + ///

    Indicates when the restored copy will expire. This value is populated only if the object + /// has already been restored. For example:

    + ///

    + /// x-amz-optional-object-attributes: IsRestoreInProgress="false", + /// RestoreExpiryDate="2012-12-21T00:00:00.000Z" + ///

    + pub restore_expiry_date: Option, } -if self.content_language.as_deref() == Some("") { - self.content_language = None; + +impl fmt::Debug for RestoreStatus { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RestoreStatus"); + if let Some(ref val) = self.is_restore_in_progress { + d.field("is_restore_in_progress", val); + } + if let Some(ref val) = self.restore_expiry_date { + d.field("restore_expiry_date", val); + } + d.finish_non_exhaustive() + } } -if self.content_range.as_deref() == Some("") { - self.content_range = None; + +pub type Role = String; + +///

    Specifies the redirect behavior and when a redirect is applied. For more information +/// about routing rules, see Configuring advanced conditional redirects in the +/// Amazon S3 User Guide.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct RoutingRule { + ///

    A container for describing a condition that must be met for the specified redirect to + /// apply. For example, 1. If request is for pages in the /docs folder, redirect + /// to the /documents folder. 2. If request results in HTTP error 4xx, redirect + /// request to another host where you might process the error.

    + pub condition: Option, + ///

    Container for redirect information. You can redirect requests to another host, to + /// another page, or with another protocol. In the event of an error, you can specify a + /// different error code to return.

    + pub redirect: Redirect, } -if self.expiration.as_deref() == Some("") { - self.expiration = None; + +impl fmt::Debug for RoutingRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RoutingRule"); + if let Some(ref val) = self.condition { + d.field("condition", val); + } + d.field("redirect", &self.redirect); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; + +pub type RoutingRules = List; + +///

    A container for object key name prefix and suffix filtering rules.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct S3KeyFilter { + pub filter_rules: Option, } -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; + +impl fmt::Debug for S3KeyFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("S3KeyFilter"); + if let Some(ref val) = self.filter_rules { + d.field("filter_rules", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.replication_status - && val.as_str() == "" { - self.replication_status = None; + +///

    Describes an Amazon S3 location that will receive the results of the restore request.

    +#[derive(Clone, Default, PartialEq)] +pub struct S3Location { + ///

    A list of grants that control access to the staged results.

    + pub access_control_list: Option, + ///

    The name of the bucket where the restore results will be placed.

    + pub bucket_name: BucketName, + ///

    The canned ACL to apply to the restore results.

    + pub canned_acl: Option, + pub encryption: Option, + ///

    The prefix that is prepended to the restore results for this request.

    + pub prefix: LocationPrefix, + ///

    The class of storage used to store the restore results.

    + pub storage_class: Option, + ///

    The tag-set that is applied to the restore results.

    + pub tagging: Option, + ///

    A list of metadata to store with the restore results in S3.

    + pub user_metadata: Option, } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; + +impl fmt::Debug for S3Location { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("S3Location"); + if let Some(ref val) = self.access_control_list { + d.field("access_control_list", val); + } + d.field("bucket_name", &self.bucket_name); + if let Some(ref val) = self.canned_acl { + d.field("canned_acl", val); + } + if let Some(ref val) = self.encryption { + d.field("encryption", val); + } + d.field("prefix", &self.prefix); + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.user_metadata { + d.field("user_metadata", val); + } + d.finish_non_exhaustive() + } } -if self.restore.as_deref() == Some("") { - self.restore = None; + +pub type S3TablesArn = String; + +pub type S3TablesBucketArn = String; + +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct S3TablesDestination { + ///

    + /// The Amazon Resource Name (ARN) for the table bucket that's specified as the + /// destination in the metadata table configuration. The destination table bucket + /// must be in the same Region and Amazon Web Services account as the general purpose bucket. + ///

    + pub table_bucket_arn: S3TablesBucketArn, + ///

    + /// The name for the metadata table in your metadata table configuration. The specified metadata + /// table name must be unique within the aws_s3_metadata namespace in the destination + /// table bucket. + ///

    + pub table_name: S3TablesName, } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; + +impl fmt::Debug for S3TablesDestination { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("S3TablesDestination"); + d.field("table_bucket_arn", &self.table_bucket_arn); + d.field("table_name", &self.table_name); + d.finish_non_exhaustive() + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; + +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct S3TablesDestinationResult { + ///

    + /// The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The + /// specified metadata table name must be unique within the aws_s3_metadata namespace + /// in the destination table bucket. + ///

    + pub table_arn: S3TablesArn, + ///

    + /// The Amazon Resource Name (ARN) for the table bucket that's specified as the + /// destination in the metadata table configuration. The destination table bucket + /// must be in the same Region and Amazon Web Services account as the general purpose bucket. + ///

    + pub table_bucket_arn: S3TablesBucketArn, + ///

    + /// The name for the metadata table in your metadata table configuration. The specified metadata + /// table name must be unique within the aws_s3_metadata namespace in the destination + /// table bucket. + ///

    + pub table_name: S3TablesName, + ///

    + /// The table bucket namespace for the metadata table in your metadata table configuration. This value + /// is always aws_s3_metadata. + ///

    + pub table_namespace: S3TablesNamespace, } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; + +impl fmt::Debug for S3TablesDestinationResult { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("S3TablesDestinationResult"); + d.field("table_arn", &self.table_arn); + d.field("table_bucket_arn", &self.table_bucket_arn); + d.field("table_name", &self.table_name); + d.field("table_namespace", &self.table_namespace); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; + +pub type S3TablesName = String; + +pub type S3TablesNamespace = String; + +pub type SSECustomerAlgorithm = String; + +pub type SSECustomerKey = String; + +pub type SSECustomerKeyMD5 = String; + +///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SSEKMS { + ///

    Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for + /// encrypting inventory reports.

    + pub key_id: SSEKMSKeyId, } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; + +impl fmt::Debug for SSEKMS { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SSEKMS"); + d.field("key_id", &self.key_id); + d.finish_non_exhaustive() + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; + +pub type SSEKMSEncryptionContext = String; + +pub type SSEKMSKeyId = String; + +///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SSES3 {} + +impl fmt::Debug for SSES3 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SSES3"); + d.finish_non_exhaustive() + } } -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; + +///

    Specifies the byte range of the object to get the records from. A record is processed +/// when its first byte is contained by the range. This parameter is optional, but when +/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the +/// start and end of the range.

    +#[derive(Clone, Default, PartialEq)] +pub struct ScanRange { + ///

    Specifies the end of the byte range. This parameter is optional. Valid values: + /// non-negative integers. The default value is one less than the size of the object being + /// queried. If only the End parameter is supplied, it is interpreted to mean scan the last N + /// bytes of the file. For example, + /// 50 means scan the + /// last 50 bytes.

    + pub end: Option, + ///

    Specifies the start of the byte range. This parameter is optional. Valid values: + /// non-negative integers. The default value is 0. If only start is supplied, it + /// means scan from that point to the end of the file. For example, + /// 50 means scan + /// from byte 50 until the end of the file.

    + pub start: Option, } + +impl fmt::Debug for ScanRange { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ScanRange"); + if let Some(ref val) = self.end { + d.field("end", val); + } + if let Some(ref val) = self.start { + d.field("start", val); + } + d.finish_non_exhaustive() + } } + +///

    The container for selecting objects from a content event stream.

    +#[derive(Debug, Clone, PartialEq)] +#[non_exhaustive] +pub enum SelectObjectContentEvent { + ///

    The Continuation Event.

    + Cont(ContinuationEvent), + ///

    The End Event.

    + End(EndEvent), + ///

    The Progress Event.

    + Progress(ProgressEvent), + ///

    The Records Event.

    + Records(RecordsEvent), + ///

    The Stats Event.

    + Stats(StatsEvent), } -impl DtoExt for IndexDocument { - fn ignore_empty_strings(&mut self) { + +/// +///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query +/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a +/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data +/// into records. It returns only records that match the specified SQL expression. You must +/// also specify the data serialization format for the response. For more information, see +/// S3Select API Documentation.

    +#[derive(Clone, PartialEq)] +pub struct SelectObjectContentInput { + ///

    The S3 bucket.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The object key.

    + pub key: ObjectKey, + ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created + /// using a checksum algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + pub sse_customer_algorithm: Option, + ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. + /// For more information, see + /// Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + pub sse_customer_key: Option, + ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum + /// algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + pub sse_customer_key_md5: Option, + pub request: SelectObjectContentRequest, } + +impl fmt::Debug for SelectObjectContentInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SelectObjectContentInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("request", &self.request); + d.finish_non_exhaustive() + } } -impl DtoExt for Initiator { - fn ignore_empty_strings(&mut self) { -if self.display_name.as_deref() == Some("") { - self.display_name = None; + +impl SelectObjectContentInput { + #[must_use] + pub fn builder() -> builders::SelectObjectContentInputBuilder { + default() + } } -if self.id.as_deref() == Some("") { - self.id = None; + +#[derive(Default)] +pub struct SelectObjectContentOutput { + ///

    The array of results.

    + pub payload: Option, } + +impl fmt::Debug for SelectObjectContentOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SelectObjectContentOutput"); + if let Some(ref val) = self.payload { + d.field("payload", val); + } + d.finish_non_exhaustive() + } } + +/// +///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query +/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a +/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data +/// into records. It returns only records that match the specified SQL expression. You must +/// also specify the data serialization format for the response. For more information, see +/// S3Select API Documentation.

    +#[derive(Clone, PartialEq)] +pub struct SelectObjectContentRequest { + ///

    The expression that is used to query the object.

    + pub expression: Expression, + ///

    The type of the provided expression (for example, SQL).

    + pub expression_type: ExpressionType, + ///

    Describes the format of the data in the object that is being queried.

    + pub input_serialization: InputSerialization, + ///

    Describes the format of the data that you want Amazon S3 to return in response.

    + pub output_serialization: OutputSerialization, + ///

    Specifies if periodic request progress information should be enabled.

    + pub request_progress: Option, + ///

    Specifies the byte range of the object to get the records from. A record is processed + /// when its first byte is contained by the range. This parameter is optional, but when + /// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the + /// start and end of the range.

    + ///

    + /// ScanRangemay be used in the following ways:

    + ///
      + ///
    • + ///

      + /// 50100 + /// - process only the records starting between the bytes 50 and 100 (inclusive, counting + /// from zero)

      + ///
    • + ///
    • + ///

      + /// 50 - + /// process only the records starting after the byte 50

      + ///
    • + ///
    • + ///

      + /// 50 - + /// process only the records within the last 50 bytes of the file.

      + ///
    • + ///
    + pub scan_range: Option, } -impl DtoExt for InputSerialization { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.csv { -val.ignore_empty_strings(); + +impl fmt::Debug for SelectObjectContentRequest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SelectObjectContentRequest"); + d.field("expression", &self.expression); + d.field("expression_type", &self.expression_type); + d.field("input_serialization", &self.input_serialization); + d.field("output_serialization", &self.output_serialization); + if let Some(ref val) = self.request_progress { + d.field("request_progress", val); + } + if let Some(ref val) = self.scan_range { + d.field("scan_range", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.compression_type - && val.as_str() == "" { - self.compression_type = None; + +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Describes the parameters for Select job types.

    +///

    Learn How to optimize querying your data in Amazon S3 using +/// Amazon Athena, S3 Object Lambda, or client-side filtering.

    +#[derive(Clone, PartialEq)] +pub struct SelectParameters { + /// + ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more + ///

    + ///
    + ///

    The expression that is used to query the object.

    + pub expression: Expression, + ///

    The type of the provided expression (for example, SQL).

    + pub expression_type: ExpressionType, + ///

    Describes the serialization format of the object.

    + pub input_serialization: InputSerialization, + ///

    Describes how the results of the Select job are serialized.

    + pub output_serialization: OutputSerialization, } -if let Some(ref mut val) = self.json { -val.ignore_empty_strings(); + +impl fmt::Debug for SelectParameters { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SelectParameters"); + d.field("expression", &self.expression); + d.field("expression_type", &self.expression_type); + d.field("input_serialization", &self.input_serialization); + d.field("output_serialization", &self.output_serialization); + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ServerSideEncryption(Cow<'static, str>); + +impl ServerSideEncryption { + pub const AES256: &'static str = "AES256"; + + pub const AWS_KMS: &'static str = "aws:kms"; + + pub const AWS_KMS_DSSE: &'static str = "aws:kms:dsse"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for ServerSideEncryption { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for IntelligentTieringAndOperator { - fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; + +impl From for Cow<'static, str> { + fn from(s: ServerSideEncryption) -> Self { + s.0 + } } + +impl FromStr for ServerSideEncryption { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    Describes the default server-side encryption to apply to new objects in the bucket. If a +/// PUT Object request doesn't specify any server-side encryption, this default encryption will +/// be applied. For more information, see PutBucketEncryption.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you don't specify +/// a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key +/// (aws/s3) in your Amazon Web Services account the first time that you add an +/// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key +/// for SSE-KMS.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +///

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

      +///
    • +///
    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionByDefault { + ///

    Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default + /// encryption.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - This parameter is + /// allowed if and only if SSEAlgorithm is set to aws:kms or + /// aws:kms:dsse.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - This parameter is + /// allowed if and only if SSEAlgorithm is set to + /// aws:kms.

      + ///
    • + ///
    + ///
    + ///

    You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS + /// key.

    + ///
      + ///
    • + ///

      Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + ///

      + ///
    • + ///
    • + ///

      Key ARN: + /// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + ///

      + ///
    • + ///
    • + ///

      Key Alias: alias/alias-name + ///

      + ///
    • + ///
    + ///

    If you are using encryption with cross-account or Amazon Web Services service operations, you must use + /// a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - If you're specifying + /// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. + /// If you use a KMS key alias instead, then KMS resolves the key within the + /// requester’s account. This behavior can result in data that's encrypted with a + /// KMS key that belongs to the requester, and not the bucket owner. Also, if you + /// use a key ID, you can run into a LogDestination undeliverable error when creating + /// a VPC flow log.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      + ///
    • + ///
    + ///
    + /// + ///

    Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service + /// Developer Guide.

    + ///
    + pub kms_master_key_id: Option, + ///

    Server-side encryption algorithm to use for the default encryption.

    + /// + ///

    For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

    + ///
    + pub sse_algorithm: ServerSideEncryption, } -impl DtoExt for IntelligentTieringConfiguration { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); + +impl fmt::Debug for ServerSideEncryptionByDefault { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ServerSideEncryptionByDefault"); + if let Some(ref val) = self.kms_master_key_id { + d.field("kms_master_key_id", val); + } + d.field("sse_algorithm", &self.sse_algorithm); + d.finish_non_exhaustive() + } } + +///

    Specifies the default server-side-encryption configuration.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionConfiguration { + ///

    Container for information about a particular server-side encryption configuration + /// rule.

    + pub rules: ServerSideEncryptionRules, } + +impl fmt::Debug for ServerSideEncryptionConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ServerSideEncryptionConfiguration"); + d.field("rules", &self.rules); + d.finish_non_exhaustive() + } } -impl DtoExt for IntelligentTieringFilter { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.and { -val.ignore_empty_strings(); + +///

    Specifies the default server-side encryption configuration.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you're specifying +/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. +/// If you use a KMS key alias instead, then KMS resolves the key within the +/// requester’s account. This behavior can result in data that's encrypted with a +/// KMS key that belongs to the requester, and not the bucket owner.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      +///
    • +///
    +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionRule { + ///

    Specifies the default server-side encryption to apply to new objects in the bucket. If a + /// PUT Object request doesn't specify any server-side encryption, this default encryption will + /// be applied.

    + pub apply_server_side_encryption_by_default: Option, + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS + /// (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the + /// BucketKeyEnabled element to true causes Amazon S3 to use an S3 + /// Bucket Key.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - By default, S3 + /// Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      + ///
    • + ///
    + ///
    + pub bucket_key_enabled: Option, } -if self.prefix.as_deref() == Some("") { - self.prefix = None; + +impl fmt::Debug for ServerSideEncryptionRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ServerSideEncryptionRule"); + if let Some(ref val) = self.apply_server_side_encryption_by_default { + d.field("apply_server_side_encryption_by_default", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref mut val) = self.tag { -val.ignore_empty_strings(); + +pub type ServerSideEncryptionRules = List; + +pub type SessionCredentialValue = String; + +///

    The established temporary security credentials of the session.

    +/// +///

    +/// Directory buckets - These session +/// credentials are only supported for the authentication and authorization of Zonal endpoint API operations +/// on directory buckets.

    +///
    +#[derive(Clone, PartialEq)] +pub struct SessionCredentials { + ///

    A unique identifier that's associated with a secret access key. The access key ID and + /// the secret access key are used together to sign programmatic Amazon Web Services requests + /// cryptographically.

    + pub access_key_id: AccessKeyIdValue, + ///

    Temporary security credentials expire after a specified interval. After temporary + /// credentials expire, any calls that you make with those credentials will fail. So you must + /// generate a new set of temporary credentials. Temporary credentials cannot be extended or + /// refreshed beyond the original specified interval.

    + pub expiration: SessionExpiration, + ///

    A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services + /// requests. Signing a request identifies the sender and prevents the request from being + /// altered.

    + pub secret_access_key: SessionCredentialValue, + ///

    A part of the temporary security credentials. The session token is used to validate the + /// temporary security credentials. + /// + ///

    + pub session_token: SessionCredentialValue, } + +impl fmt::Debug for SessionCredentials { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SessionCredentials"); + d.field("access_key_id", &self.access_key_id); + d.field("expiration", &self.expiration); + d.field("secret_access_key", &self.secret_access_key); + d.field("session_token", &self.session_token); + d.finish_non_exhaustive() + } } + +impl Default for SessionCredentials { + fn default() -> Self { + Self { + access_key_id: default(), + expiration: default(), + secret_access_key: default(), + session_token: default(), + } + } } -impl DtoExt for InvalidObjectState { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.access_tier - && val.as_str() == "" { - self.access_tier = None; + +pub type SessionExpiration = Timestamp; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct SessionMode(Cow<'static, str>); + +impl SessionMode { + pub const READ_ONLY: &'static str = "ReadOnly"; + + pub const READ_WRITE: &'static str = "ReadWrite"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; + +impl From for SessionMode { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: SessionMode) -> Self { + s.0 + } } + +impl FromStr for SessionMode { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for InventoryConfiguration { - fn ignore_empty_strings(&mut self) { -self.destination.ignore_empty_strings(); -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); + +pub type Setting = bool; + +///

    To use simple format for S3 keys for log objects, set SimplePrefix to an empty +/// object.

    +///

    +/// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +///

    +#[derive(Clone, Default, PartialEq)] +pub struct SimplePrefix {} + +impl fmt::Debug for SimplePrefix { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SimplePrefix"); + d.finish_non_exhaustive() + } } -self.schedule.ignore_empty_strings(); + +pub type Size = i64; + +pub type SkipValidation = bool; + +pub type SourceIdentityType = String; + +///

    A container that describes additional filters for identifying the source objects that +/// you want to replicate. You can choose to enable or disable the replication of these +/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created +/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service +/// (SSE-KMS).

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SourceSelectionCriteria { + ///

    A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't + /// replicate replica modifications by default. In the latest version of replication + /// configuration (when Filter is specified), you can specify this element and set + /// the status to Enabled to replicate modifications on replicas.

    + /// + ///

    If you don't specify the Filter element, Amazon S3 assumes that the + /// replication configuration is the earlier version, V1. In the earlier version, this + /// element is not allowed

    + ///
    + pub replica_modifications: Option, + ///

    A container for filter information for the selection of Amazon S3 objects encrypted with + /// Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication + /// configuration, this element is required.

    + pub sse_kms_encrypted_objects: Option, } + +impl fmt::Debug for SourceSelectionCriteria { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SourceSelectionCriteria"); + if let Some(ref val) = self.replica_modifications { + d.field("replica_modifications", val); + } + if let Some(ref val) = self.sse_kms_encrypted_objects { + d.field("sse_kms_encrypted_objects", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for InventoryDestination { - fn ignore_empty_strings(&mut self) { -self.s3_bucket_destination.ignore_empty_strings(); + +///

    A container for filter information for the selection of S3 objects encrypted with Amazon Web Services +/// KMS.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct SseKmsEncryptedObjects { + ///

    Specifies whether Amazon S3 replicates objects created with server-side encryption using an + /// Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

    + pub status: SseKmsEncryptedObjectsStatus, } + +impl fmt::Debug for SseKmsEncryptedObjects { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SseKmsEncryptedObjects"); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -impl DtoExt for InventoryEncryption { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.ssekms { -val.ignore_empty_strings(); + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct SseKmsEncryptedObjectsStatus(Cow<'static, str>); + +impl SseKmsEncryptedObjectsStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for SseKmsEncryptedObjectsStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: SseKmsEncryptedObjectsStatus) -> Self { + s.0 + } } -impl DtoExt for InventoryFilter { - fn ignore_empty_strings(&mut self) { + +impl FromStr for SseKmsEncryptedObjectsStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type Start = i64; + +pub type StartAfter = String; + +///

    Container for the stats details.

    +#[derive(Clone, Default, PartialEq)] +pub struct Stats { + ///

    The total number of uncompressed object bytes processed.

    + pub bytes_processed: Option, + ///

    The total number of bytes of records payload data returned.

    + pub bytes_returned: Option, + ///

    The total number of object bytes scanned.

    + pub bytes_scanned: Option, } -impl DtoExt for InventoryS3BucketDestination { - fn ignore_empty_strings(&mut self) { -if self.account_id.as_deref() == Some("") { - self.account_id = None; + +impl fmt::Debug for Stats { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Stats"); + if let Some(ref val) = self.bytes_processed { + d.field("bytes_processed", val); + } + if let Some(ref val) = self.bytes_returned { + d.field("bytes_returned", val); + } + if let Some(ref val) = self.bytes_scanned { + d.field("bytes_scanned", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref mut val) = self.encryption { -val.ignore_empty_strings(); + +///

    Container for the Stats Event.

    +#[derive(Clone, Default, PartialEq)] +pub struct StatsEvent { + ///

    The Stats event details.

    + pub details: Option, } -if self.prefix.as_deref() == Some("") { - self.prefix = None; + +impl fmt::Debug for StatsEvent { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("StatsEvent"); + if let Some(ref val) = self.details { + d.field("details", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct StorageClass(Cow<'static, str>); + +impl StorageClass { + pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + + pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; + + pub const GLACIER: &'static str = "GLACIER"; + + pub const GLACIER_IR: &'static str = "GLACIER_IR"; + + pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + + pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + + pub const OUTPOSTS: &'static str = "OUTPOSTS"; + + pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; + + pub const SNOW: &'static str = "SNOW"; + + pub const STANDARD: &'static str = "STANDARD"; + + pub const STANDARD_IA: &'static str = "STANDARD_IA"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for StorageClass { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for InventorySchedule { - fn ignore_empty_strings(&mut self) { + +impl From for Cow<'static, str> { + fn from(s: StorageClass) -> Self { + s.0 + } } + +impl FromStr for StorageClass { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for JSONInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.type_ - && val.as_str() == "" { - self.type_ = None; + +///

    Specifies data related to access patterns to be collected and made available to analyze +/// the tradeoffs between different storage classes for an Amazon S3 bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct StorageClassAnalysis { + ///

    Specifies how data related to the storage class analysis for an Amazon S3 bucket should be + /// exported.

    + pub data_export: Option, } + +impl fmt::Debug for StorageClassAnalysis { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("StorageClassAnalysis"); + if let Some(ref val) = self.data_export { + d.field("data_export", val); + } + d.finish_non_exhaustive() + } } + +///

    Container for data related to the storage class analysis for an Amazon S3 bucket for +/// export.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct StorageClassAnalysisDataExport { + ///

    The place to store the data for an analysis.

    + pub destination: AnalyticsExportDestination, + ///

    The version of the output schema to use when exporting data. Must be + /// V_1.

    + pub output_schema_version: StorageClassAnalysisSchemaVersion, } -impl DtoExt for JSONOutput { - fn ignore_empty_strings(&mut self) { -if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; + +impl fmt::Debug for StorageClassAnalysisDataExport { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("StorageClassAnalysisDataExport"); + d.field("destination", &self.destination); + d.field("output_schema_version", &self.output_schema_version); + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct StorageClassAnalysisSchemaVersion(Cow<'static, str>); + +impl StorageClassAnalysisSchemaVersion { + pub const V_1: &'static str = "V_1"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for StorageClassAnalysisSchemaVersion { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for LambdaFunctionConfiguration { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); + +impl From for Cow<'static, str> { + fn from(s: StorageClassAnalysisSchemaVersion) -> Self { + s.0 + } } -if self.id.as_deref() == Some("") { - self.id = None; + +impl FromStr for StorageClassAnalysisSchemaVersion { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type Suffix = String; + +///

    A container of a key value name pair.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Tag { + ///

    Name of the object key.

    + pub key: Option, + ///

    Value of the tag.

    + pub value: Option, } + +impl fmt::Debug for Tag { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Tag"); + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.value { + d.field("value", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for LifecycleExpiration { - fn ignore_empty_strings(&mut self) { + +pub type TagCount = i32; + +pub type TagSet = List; + +///

    Container for TagSet elements.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Tagging { + ///

    A collection for a set of tags

    + pub tag_set: TagSet, } + +impl fmt::Debug for Tagging { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Tagging"); + d.field("tag_set", &self.tag_set); + d.finish_non_exhaustive() + } } -impl DtoExt for LifecycleRule { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.abort_incomplete_multipart_upload { -val.ignore_empty_strings(); + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TaggingDirective(Cow<'static, str>); + +impl TaggingDirective { + pub const COPY: &'static str = "COPY"; + + pub const REPLACE: &'static str = "REPLACE"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref mut val) = self.expiration { -val.ignore_empty_strings(); + +impl From for TaggingDirective { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); + +impl From for Cow<'static, str> { + fn from(s: TaggingDirective) -> Self { + s.0 + } } -if self.id.as_deref() == Some("") { - self.id = None; + +impl FromStr for TaggingDirective { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref mut val) = self.noncurrent_version_expiration { -val.ignore_empty_strings(); + +pub type TaggingHeader = String; + +pub type TargetBucket = String; + +///

    Container for granting information.

    +///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support +/// target grants. For more information, see Permissions server access log delivery in the +/// Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq)] +pub struct TargetGrant { + ///

    Container for the person being granted permissions.

    + pub grantee: Option, + ///

    Logging permissions assigned to the grantee for the bucket.

    + pub permission: Option, } -if self.prefix.as_deref() == Some("") { - self.prefix = None; + +impl fmt::Debug for TargetGrant { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("TargetGrant"); + if let Some(ref val) = self.grantee { + d.field("grantee", val); + } + if let Some(ref val) = self.permission { + d.field("permission", val); + } + d.finish_non_exhaustive() + } } + +pub type TargetGrants = List; + +///

    Amazon S3 key format for log objects. Only one format, PartitionedPrefix or +/// SimplePrefix, is allowed.

    +#[derive(Clone, Default, PartialEq)] +pub struct TargetObjectKeyFormat { + ///

    Partitioned S3 key for log objects.

    + pub partitioned_prefix: Option, + ///

    To use the simple format for S3 keys for log objects. To specify SimplePrefix format, + /// set SimplePrefix to {}.

    + pub simple_prefix: Option, } + +impl fmt::Debug for TargetObjectKeyFormat { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("TargetObjectKeyFormat"); + if let Some(ref val) = self.partitioned_prefix { + d.field("partitioned_prefix", val); + } + if let Some(ref val) = self.simple_prefix { + d.field("simple_prefix", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for LifecycleRuleAndOperator { - fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; + +pub type TargetPrefix = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Tier(Cow<'static, str>); + +impl Tier { + pub const BULK: &'static str = "Bulk"; + + pub const EXPEDITED: &'static str = "Expedited"; + + pub const STANDARD: &'static str = "Standard"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for Tier { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: Tier) -> Self { + s.0 + } } -impl DtoExt for LifecycleRuleFilter { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.and { -val.ignore_empty_strings(); + +impl FromStr for Tier { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if self.prefix.as_deref() == Some("") { - self.prefix = None; + +///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by +/// automatically moving data to the most cost-effective storage access tier, without +/// additional operational overhead.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct Tiering { + ///

    S3 Intelligent-Tiering access tier. See Storage class + /// for automatically optimizing frequently and infrequently accessed objects for a + /// list of access tiers in the S3 Intelligent-Tiering storage class.

    + pub access_tier: IntelligentTieringAccessTier, + ///

    The number of consecutive days of no access after which an object will be eligible to be + /// transitioned to the corresponding tier. The minimum number of days specified for + /// Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least + /// 180 days. The maximum can be up to 2 years (730 days).

    + pub days: IntelligentTieringDays, } -if let Some(ref mut val) = self.tag { -val.ignore_empty_strings(); + +impl fmt::Debug for Tiering { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Tiering"); + d.field("access_tier", &self.access_tier); + d.field("days", &self.days); + d.finish_non_exhaustive() + } } + +pub type TieringList = List; + +pub type Token = String; + +pub type TokenType = String; + +///

    +/// You have attempted to add more parts than the maximum of 10000 +/// that are allowed for this object. You can use the CopyObject operation +/// to copy this object to another and then add more data to the newly copied object. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct TooManyParts {} + +impl fmt::Debug for TooManyParts { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("TooManyParts"); + d.finish_non_exhaustive() + } } + +pub type TopicArn = String; + +///

    A container for specifying the configuration for publication of messages to an Amazon +/// Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct TopicConfiguration { + ///

    The Amazon S3 bucket event about which to send notifications. For more information, see + /// Supported + /// Event Types in the Amazon S3 User Guide.

    + pub events: EventList, + pub filter: Option, + pub id: Option, + ///

    The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message + /// when it detects events of the specified type.

    + pub topic_arn: TopicArn, } -impl DtoExt for ListBucketAnalyticsConfigurationsInput { - fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +impl fmt::Debug for TopicConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("TopicConfiguration"); + d.field("events", &self.events); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.field("topic_arn", &self.topic_arn); + d.finish_non_exhaustive() + } } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +pub type TopicConfigurationList = List; + +///

    Specifies when an object transitions to a specified storage class. For more information +/// about Amazon S3 lifecycle configuration rules, see Transitioning +/// Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Transition { + ///

    Indicates when objects are transitioned to the specified storage class. The date value + /// must be in ISO 8601 format. The time is always midnight UTC.

    + pub date: Option, + ///

    Indicates the number of days after creation when objects are transitioned to the + /// specified storage class. If the specified storage class is INTELLIGENT_TIERING, + /// GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are + /// 0 or positive integers. If the specified storage class is STANDARD_IA + /// or ONEZONE_IA, valid values are positive integers greater than 30. Be + /// aware that some storage classes have a minimum storage duration and that you're charged for + /// transitioning objects before their minimum storage duration. For more information, see + /// + /// Constraints and considerations for transitions in the + /// Amazon S3 User Guide.

    + pub days: Option, + ///

    The storage class to which you want the object to transition.

    + pub storage_class: Option, } + +impl fmt::Debug for Transition { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Transition"); + if let Some(ref val) = self.date { + d.field("date", val); + } + if let Some(ref val) = self.days { + d.field("days", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TransitionDefaultMinimumObjectSize(Cow<'static, str>); + +impl TransitionDefaultMinimumObjectSize { + pub const ALL_STORAGE_CLASSES_128K: &'static str = "all_storage_classes_128K"; + + pub const VARIES_BY_STORAGE_CLASS: &'static str = "varies_by_storage_class"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for ListBucketAnalyticsConfigurationsOutput { - fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +impl From for TransitionDefaultMinimumObjectSize { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; + +impl From for Cow<'static, str> { + fn from(s: TransitionDefaultMinimumObjectSize) -> Self { + s.0 + } } + +impl FromStr for TransitionDefaultMinimumObjectSize { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +pub type TransitionList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct TransitionStorageClass(Cow<'static, str>); + +impl TransitionStorageClass { + pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; + + pub const GLACIER: &'static str = "GLACIER"; + + pub const GLACIER_IR: &'static str = "GLACIER_IR"; + + pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; + + pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; + + pub const STANDARD_IA: &'static str = "STANDARD_IA"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl DtoExt for ListBucketIntelligentTieringConfigurationsInput { - fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +impl From for TransitionStorageClass { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: TransitionStorageClass) -> Self { + s.0 + } } + +impl FromStr for TransitionStorageClass { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for ListBucketIntelligentTieringConfigurationsOutput { - fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Type(Cow<'static, str>); + +impl Type { + pub const AMAZON_CUSTOMER_BY_EMAIL: &'static str = "AmazonCustomerByEmail"; + + pub const CANONICAL_USER: &'static str = "CanonicalUser"; + + pub const GROUP: &'static str = "Group"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; + +impl From for Type { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: Type) -> Self { + s.0 + } } + +impl FromStr for Type { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl DtoExt for ListBucketInventoryConfigurationsInput { - fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +pub type URI = String; + +pub type UploadIdMarker = String; + +#[derive(Clone, PartialEq)] +pub struct UploadPartCopyInput { + ///

    The bucket name.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + /// + ///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, + /// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    + ///
    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Specifies the source object for the copy operation. You specify the value in one of two + /// formats, depending on whether you want to access the source object through an access point:

    + ///
      + ///
    • + ///

      For objects not accessed through an access point, specify the name of the source bucket + /// and key of the source object, separated by a slash (/). For example, to copy the + /// object reports/january.pdf from the bucket + /// awsexamplebucket, use awsexamplebucket/reports/january.pdf. + /// The value must be URL-encoded.

      + ///
    • + ///
    • + ///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      + /// + ///
        + ///
      • + ///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        + ///
      • + ///
      • + ///

        Access points are not supported by directory buckets.

        + ///
      • + ///
      + ///
      + ///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      + ///
    • + ///
    + ///

    If your bucket has versioning enabled, you could have multiple versions of the same + /// object. By default, x-amz-copy-source identifies the current version of the + /// source object to copy. To copy a specific version of the source object to copy, append + /// ?versionId=<version-id> to the x-amz-copy-source request + /// header (for example, x-amz-copy-source: + /// /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

    + ///

    If the current version is a delete marker and you don't specify a versionId in the + /// x-amz-copy-source request header, Amazon S3 returns a 404 Not Found + /// error, because the object does not exist. If you specify versionId in the + /// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an + /// HTTP 400 Bad Request error, because you are not allowed to specify a delete + /// marker as a version for the x-amz-copy-source.

    + /// + ///

    + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets.

    + ///
    + pub copy_source: CopySource, + ///

    Copies the object if its entity tag (ETag) matches the specified tag.

    + ///

    If both of the x-amz-copy-source-if-match and + /// x-amz-copy-source-if-unmodified-since headers are present in the request as + /// follows:

    + ///

    + /// x-amz-copy-source-if-match condition evaluates to true, + /// and;

    + ///

    + /// x-amz-copy-source-if-unmodified-since condition evaluates to + /// false;

    + ///

    Amazon S3 returns 200 OK and copies the data. + ///

    + pub copy_source_if_match: Option, + ///

    Copies the object if it has been modified since the specified time.

    + ///

    If both of the x-amz-copy-source-if-none-match and + /// x-amz-copy-source-if-modified-since headers are present in the request as + /// follows:

    + ///

    + /// x-amz-copy-source-if-none-match condition evaluates to false, + /// and;

    + ///

    + /// x-amz-copy-source-if-modified-since condition evaluates to + /// true;

    + ///

    Amazon S3 returns 412 Precondition Failed response code. + ///

    + pub copy_source_if_modified_since: Option, + ///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    + ///

    If both of the x-amz-copy-source-if-none-match and + /// x-amz-copy-source-if-modified-since headers are present in the request as + /// follows:

    + ///

    + /// x-amz-copy-source-if-none-match condition evaluates to false, + /// and;

    + ///

    + /// x-amz-copy-source-if-modified-since condition evaluates to + /// true;

    + ///

    Amazon S3 returns 412 Precondition Failed response code. + ///

    + pub copy_source_if_none_match: Option, + ///

    Copies the object if it hasn't been modified since the specified time.

    + ///

    If both of the x-amz-copy-source-if-match and + /// x-amz-copy-source-if-unmodified-since headers are present in the request as + /// follows:

    + ///

    + /// x-amz-copy-source-if-match condition evaluates to true, + /// and;

    + ///

    + /// x-amz-copy-source-if-unmodified-since condition evaluates to + /// false;

    + ///

    Amazon S3 returns 200 OK and copies the data. + ///

    + pub copy_source_if_unmodified_since: Option, + ///

    The range of bytes to copy from the source object. The range value must use the form + /// bytes=first-last, where the first and last are the zero-based byte offsets to copy. For + /// example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You + /// can copy a range only if the source object is greater than 5 MB.

    + pub copy_source_range: Option, + ///

    Specifies the algorithm to use when decrypting the source object (for example, + /// AES256).

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    + pub copy_source_sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source + /// object. The encryption key provided in this header must be one that was used when the + /// source object was created.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    + pub copy_source_sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    + pub copy_source_sse_customer_key_md5: Option, + ///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_source_bucket_owner: Option, + ///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, + ///

    Part number of part being copied. This is a positive integer between 1 and + /// 10,000.

    + pub part_number: PartNumber, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header. This must be the + /// same encryption key specified in the initiate multipart upload request.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Upload ID identifying the multipart upload whose part is being copied.

    + pub upload_id: MultipartUploadId, } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +impl fmt::Debug for UploadPartCopyInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("UploadPartCopyInput"); + d.field("bucket", &self.bucket); + d.field("copy_source", &self.copy_source); + if let Some(ref val) = self.copy_source_if_match { + d.field("copy_source_if_match", val); + } + if let Some(ref val) = self.copy_source_if_modified_since { + d.field("copy_source_if_modified_since", val); + } + if let Some(ref val) = self.copy_source_if_none_match { + d.field("copy_source_if_none_match", val); + } + if let Some(ref val) = self.copy_source_if_unmodified_since { + d.field("copy_source_if_unmodified_since", val); + } + if let Some(ref val) = self.copy_source_range { + d.field("copy_source_range", val); + } + if let Some(ref val) = self.copy_source_sse_customer_algorithm { + d.field("copy_source_sse_customer_algorithm", val); + } + if let Some(ref val) = self.copy_source_sse_customer_key { + d.field("copy_source_sse_customer_key", val); + } + if let Some(ref val) = self.copy_source_sse_customer_key_md5 { + d.field("copy_source_sse_customer_key_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expected_source_bucket_owner { + d.field("expected_source_bucket_owner", val); + } + d.field("key", &self.key); + d.field("part_number", &self.part_number); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } +} + +impl UploadPartCopyInput { + #[must_use] + pub fn builder() -> builders::UploadPartCopyInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct UploadPartCopyOutput { + ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    Container for all response elements.

    + pub copy_part_result: Option, + ///

    The version of the source object that was copied, if you have enabled versioning on the + /// source bucket.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    + pub copy_source_version_id: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms).

    + pub server_side_encryption: Option, } + +impl fmt::Debug for UploadPartCopyOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("UploadPartCopyOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.copy_part_result { + d.field("copy_part_result", val); + } + if let Some(ref val) = self.copy_source_version_id { + d.field("copy_source_version_id", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + d.finish_non_exhaustive() + } } -impl DtoExt for ListBucketInventoryConfigurationsOutput { - fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +#[derive(Default)] +pub struct UploadPartInput { + ///

    Object data.

    + pub body: Option, + ///

    The name of the bucket to which the multipart upload was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + ///

    This checksum algorithm must be the same for all parts and it match the checksum value + /// supplied in the CreateMultipartUpload request.

    + pub checksum_algorithm: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be + /// determined automatically.

    + pub content_length: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated + /// when using the command from the CLI. This parameter is required if object lock parameters + /// are specified.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, + ///

    Part number of part being uploaded. This is a positive integer between 1 and + /// 10,000.

    + pub part_number: PartNumber, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header. This must be the + /// same encryption key specified in the initiate multipart upload request.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Upload ID identifying the multipart upload whose part is being uploaded.

    + pub upload_id: MultipartUploadId, } -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; + +impl fmt::Debug for UploadPartInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("UploadPartInput"); + if let Some(ref val) = self.body { + d.field("body", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + d.field("part_number", &self.part_number); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } + +impl UploadPartInput { + #[must_use] + pub fn builder() -> builders::UploadPartInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct UploadPartOutput { + ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Entity tag for the uploaded object.

    + pub e_tag: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms).

    + pub server_side_encryption: Option, } -impl DtoExt for ListBucketMetricsConfigurationsInput { - fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +impl fmt::Debug for UploadPartOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("UploadPartOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + d.finish_non_exhaustive() + } } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + +pub type UserMetadata = List; + +pub type Value = String; + +pub type VersionCount = i32; + +pub type VersionIdMarker = String; + +///

    Describes the versioning state of an Amazon S3 bucket. For more information, see PUT +/// Bucket versioning in the Amazon S3 API Reference.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct VersioningConfiguration { + ///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This + /// element is only returned if the bucket has been configured with MFA delete. If the bucket + /// has never been so configured, this element is not returned.

    + pub mfa_delete: Option, + ///

    The versioning state of the bucket.

    + pub status: Option, } + +impl fmt::Debug for VersioningConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("VersioningConfiguration"); + if let Some(ref val) = self.mfa_delete { + d.field("mfa_delete", val); + } + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } + +///

    Specifies website configuration parameters for an Amazon S3 bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct WebsiteConfiguration { + ///

    The name of the error document for the website.

    + pub error_document: Option, + ///

    The name of the index document for the website.

    + pub index_document: Option, + ///

    The redirect behavior for every request to this bucket's website endpoint.

    + /// + ///

    If you specify this property, you can't specify any other property.

    + ///
    + pub redirect_all_requests_to: Option, + ///

    Rules that define when a redirect is applied and the redirect behavior.

    + pub routing_rules: Option, } -impl DtoExt for ListBucketMetricsConfigurationsOutput { - fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +impl fmt::Debug for WebsiteConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("WebsiteConfiguration"); + if let Some(ref val) = self.error_document { + d.field("error_document", val); + } + if let Some(ref val) = self.index_document { + d.field("index_document", val); + } + if let Some(ref val) = self.redirect_all_requests_to { + d.field("redirect_all_requests_to", val); + } + if let Some(ref val) = self.routing_rules { + d.field("routing_rules", val); + } + d.finish_non_exhaustive() + } } -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; + +pub type WebsiteRedirectLocation = String; + +#[derive(Default)] +pub struct WriteGetObjectResponseInput { + ///

    Indicates that a range of bytes was specified.

    + pub accept_ranges: Option, + ///

    The object data.

    + pub body: Option, + ///

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side + /// encryption with Amazon Web Services KMS (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 + /// checksum of the object returned by the Object Lambda function. This may not match the + /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values + /// only when the original GetObject request required checksum validation. For + /// more information about checksums, see Checking object + /// integrity in the Amazon S3 User Guide.

    + ///

    Only one checksum header can be specified at a time. If you supply multiple checksum + /// headers, this request will fail.

    + ///

    + pub checksum_crc32: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C + /// checksum of the object returned by the Object Lambda function. This may not match the + /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values + /// only when the original GetObject request required checksum validation. For + /// more information about checksums, see Checking object + /// integrity in the Amazon S3 User Guide.

    + ///

    Only one checksum header can be specified at a time. If you supply multiple checksum + /// headers, this request will fail.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 + /// digest of the object returned by the Object Lambda function. This may not match the + /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values + /// only when the original GetObject request required checksum validation. For + /// more information about checksums, see Checking object + /// integrity in the Amazon S3 User Guide.

    + ///

    Only one checksum header can be specified at a time. If you supply multiple checksum + /// headers, this request will fail.

    + pub checksum_sha1: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 + /// digest of the object returned by the Object Lambda function. This may not match the + /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values + /// only when the original GetObject request required checksum validation. For + /// more information about checksums, see Checking object + /// integrity in the Amazon S3 User Guide.

    + ///

    Only one checksum header can be specified at a time. If you supply multiple checksum + /// headers, this request will fail.

    + pub checksum_sha256: Option, + ///

    Specifies presentational information for the object.

    + pub content_disposition: Option, + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    The size of the content body in bytes.

    + pub content_length: Option, + ///

    The portion of the object returned in the response.

    + pub content_range: Option, + ///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, + ///

    Specifies whether an object stored in Amazon S3 is (true) or is not + /// (false) a delete marker. To learn more about delete markers, see Working with delete markers.

    + pub delete_marker: Option, + ///

    An opaque identifier assigned by a web server to a specific version of a resource found + /// at a URL.

    + pub e_tag: Option, + ///

    A string that uniquely identifies an error condition. Returned in the <Code> tag + /// of the error XML response for a corresponding GetObject call. Cannot be used + /// with a successful StatusCode header or when the transformed object is provided + /// in the body. All error codes from S3 are sentence-cased. The regular expression (regex) + /// value is "^[A-Z][a-zA-Z]+$".

    + pub error_code: Option, + ///

    Contains a generic description of the error condition. Returned in the <Message> + /// tag of the error XML response for a corresponding GetObject call. Cannot be + /// used with a successful StatusCode header or when the transformed object is + /// provided in body.

    + pub error_message: Option, + ///

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes + /// this header. It includes the expiry-date and rule-id key-value + /// pairs that provide the object expiration information. The value of the rule-id + /// is URL-encoded.

    + pub expiration: Option, + ///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, + ///

    The date and time that the object was last modified.

    + pub last_modified: Option, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    Set to the number of metadata entries not returned in x-amz-meta headers. + /// This can happen if you create metadata using an API like SOAP that supports more flexible + /// metadata than the REST API. For example, using SOAP, you can create metadata whose values + /// are not legal HTTP headers.

    + pub missing_meta: Option, + ///

    Indicates whether an object stored in Amazon S3 has an active legal hold.

    + pub object_lock_legal_hold_status: Option, + ///

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information + /// about S3 Object Lock, see Object Lock.

    + pub object_lock_mode: Option, + ///

    The date and time when Object Lock is configured to expire.

    + pub object_lock_retain_until_date: Option, + ///

    The count of parts this object has.

    + pub parts_count: Option, + ///

    Indicates if request involves bucket that is either a source or destination in a + /// Replication rule. For more information about S3 Replication, see Replication.

    + pub replication_status: Option, + pub request_charged: Option, + ///

    Route prefix to the HTTP URL generated.

    + pub request_route: RequestRoute, + ///

    A single use encrypted token that maps WriteGetObjectResponse to the end + /// user GetObject request.

    + pub request_token: RequestToken, + ///

    Provides information about object restoration operation and expiration time of the + /// restored object copy.

    + pub restore: Option, + ///

    Encryption algorithm used if server-side encryption with a customer-provided encryption + /// key was specified for object stored in Amazon S3.

    + pub sse_customer_algorithm: Option, + ///

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data + /// stored in S3. For more information, see Protecting data + /// using server-side encryption with customer-provided encryption keys + /// (SSE-C).

    + pub sse_customer_key_md5: Option, + ///

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key + /// Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in + /// Amazon S3 object.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when storing requested object in Amazon S3 (for + /// example, AES256, aws:kms).

    + pub server_side_encryption: Option, + ///

    The integer status code for an HTTP response of a corresponding GetObject + /// request. The following is a list of status codes.

    + ///
      + ///
    • + ///

      + /// 200 - OK + ///

      + ///
    • + ///
    • + ///

      + /// 206 - Partial Content + ///

      + ///
    • + ///
    • + ///

      + /// 304 - Not Modified + ///

      + ///
    • + ///
    • + ///

      + /// 400 - Bad Request + ///

      + ///
    • + ///
    • + ///

      + /// 401 - Unauthorized + ///

      + ///
    • + ///
    • + ///

      + /// 403 - Forbidden + ///

      + ///
    • + ///
    • + ///

      + /// 404 - Not Found + ///

      + ///
    • + ///
    • + ///

      + /// 405 - Method Not Allowed + ///

      + ///
    • + ///
    • + ///

      + /// 409 - Conflict + ///

      + ///
    • + ///
    • + ///

      + /// 411 - Length Required + ///

      + ///
    • + ///
    • + ///

      + /// 412 - Precondition Failed + ///

      + ///
    • + ///
    • + ///

      + /// 416 - Range Not Satisfiable + ///

      + ///
    • + ///
    • + ///

      + /// 500 - Internal Server Error + ///

      + ///
    • + ///
    • + ///

      + /// 503 - Service Unavailable + ///

      + ///
    • + ///
    + pub status_code: Option, + ///

    Provides storage class information of the object. Amazon S3 returns this header for all + /// objects except for S3 Standard storage class objects.

    + ///

    For more information, see Storage Classes.

    + pub storage_class: Option, + ///

    The number of tags, if any, on the object.

    + pub tag_count: Option, + ///

    An ID used to reference a specific version of the object.

    + pub version_id: Option, } + +impl fmt::Debug for WriteGetObjectResponseInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("WriteGetObjectResponseInput"); + if let Some(ref val) = self.accept_ranges { + d.field("accept_ranges", val); + } + if let Some(ref val) = self.body { + d.field("body", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_range { + d.field("content_range", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.error_code { + d.field("error_code", val); + } + if let Some(ref val) = self.error_message { + d.field("error_message", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.missing_meta { + d.field("missing_meta", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.parts_count { + d.field("parts_count", val); + } + if let Some(ref val) = self.replication_status { + d.field("replication_status", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.field("request_route", &self.request_route); + d.field("request_token", &self.request_token); + if let Some(ref val) = self.restore { + d.field("restore", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.status_code { + d.field("status_code", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tag_count { + d.field("tag_count", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +impl WriteGetObjectResponseInput { + #[must_use] + pub fn builder() -> builders::WriteGetObjectResponseInputBuilder { + default() + } } -impl DtoExt for ListBucketsInput { - fn ignore_empty_strings(&mut self) { -if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; + +#[derive(Clone, Default, PartialEq)] +pub struct WriteGetObjectResponseOutput {} + +impl fmt::Debug for WriteGetObjectResponseOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("WriteGetObjectResponseOutput"); + d.finish_non_exhaustive() + } } -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; + +pub type WriteOffsetBytes = i64; + +pub type Years = i32; + +#[cfg(test)] +mod tests { + use super::*; + + fn require_default() {} + fn require_clone() {} + + #[test] + fn test_default() { + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + } + #[test] + fn test_clone() { + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + } } -if self.prefix.as_deref() == Some("") { - self.prefix = None; +pub mod builders { + #![allow(clippy::missing_errors_doc)] + + pub use super::build_error::BuildError; + use super::*; + + /// A builder for [`AbortMultipartUploadInput`] + #[derive(Default)] + pub struct AbortMultipartUploadInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + if_match_initiated_time: Option, + + key: Option, + + request_payer: Option, + + upload_id: Option, + } + + impl AbortMultipartUploadInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_if_match_initiated_time(&mut self, field: Option) -> &mut Self { + self.if_match_initiated_time = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn if_match_initiated_time(mut self, field: Option) -> Self { + self.if_match_initiated_time = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match_initiated_time = self.if_match_initiated_time; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(AbortMultipartUploadInput { + bucket, + expected_bucket_owner, + if_match_initiated_time, + key, + request_payer, + upload_id, + }) + } + } + + /// A builder for [`CompleteMultipartUploadInput`] + #[derive(Default)] + pub struct CompleteMultipartUploadInputBuilder { + bucket: Option, + + checksum_crc32: Option, + + checksum_crc32c: Option, + + checksum_crc64nvme: Option, + + checksum_sha1: Option, + + checksum_sha256: Option, + + checksum_type: Option, + + expected_bucket_owner: Option, + + if_match: Option, + + if_none_match: Option, + + key: Option, + + mpu_object_size: Option, + + multipart_upload: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + upload_id: Option, + } + + impl CompleteMultipartUploadInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } + + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } + + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } + + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } + + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } + + pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { + self.checksum_type = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } + + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_mpu_object_size(&mut self, field: Option) -> &mut Self { + self.mpu_object_size = field; + self + } + + pub fn set_multipart_upload(&mut self, field: Option) -> &mut Self { + self.multipart_upload = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } + + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } + + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } + + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } + + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } + + #[must_use] + pub fn checksum_type(mut self, field: Option) -> Self { + self.checksum_type = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } + + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn mpu_object_size(mut self, field: Option) -> Self { + self.mpu_object_size = field; + self + } + + #[must_use] + pub fn multipart_upload(mut self, field: Option) -> Self { + self.multipart_upload = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let checksum_type = self.checksum_type; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match = self.if_match; + let if_none_match = self.if_none_match; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let mpu_object_size = self.mpu_object_size; + let multipart_upload = self.multipart_upload; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(CompleteMultipartUploadInput { + bucket, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + checksum_type, + expected_bucket_owner, + if_match, + if_none_match, + key, + mpu_object_size, + multipart_upload, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + } + + /// A builder for [`CopyObjectInput`] + #[derive(Default)] + pub struct CopyObjectInputBuilder { + acl: Option, + + bucket: Option, + + bucket_key_enabled: Option, + + cache_control: Option, + + checksum_algorithm: Option, + + content_disposition: Option, + + content_encoding: Option, + + content_language: Option, + + content_type: Option, + + copy_source: Option, + + copy_source_if_match: Option, + + copy_source_if_modified_since: Option, + + copy_source_if_none_match: Option, + + copy_source_if_unmodified_since: Option, + + copy_source_sse_customer_algorithm: Option, + + copy_source_sse_customer_key: Option, + + copy_source_sse_customer_key_md5: Option, + + expected_bucket_owner: Option, + + expected_source_bucket_owner: Option, + + expires: Option, + + grant_full_control: Option, + + grant_read: Option, + + grant_read_acp: Option, + + grant_write_acp: Option, + + key: Option, + + metadata: Option, + + metadata_directive: Option, + + object_lock_legal_hold_status: Option, + + object_lock_mode: Option, + + object_lock_retain_until_date: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + ssekms_encryption_context: Option, + + ssekms_key_id: Option, + + server_side_encryption: Option, + + storage_class: Option, + + tagging: Option, + + tagging_directive: Option, + + website_redirect_location: Option, + } + + impl CopyObjectInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } + + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } + + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } + + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } + + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } + + pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { + self.copy_source = Some(field); + self + } + + pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_match = field; + self + } + + pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_modified_since = field; + self + } + + pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_none_match = field; + self + } + + pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_unmodified_since = field; + self + } + + pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_algorithm = field; + self + } + + pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key = field; + self + } + + pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_source_bucket_owner = field; + self + } + + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } + + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } + + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } + + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } + + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } + + pub fn set_metadata_directive(&mut self, field: Option) -> &mut Self { + self.metadata_directive = field; + self + } + + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } + + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } + + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } + + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } + + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } + + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } + + pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; + self + } + + pub fn set_tagging_directive(&mut self, field: Option) -> &mut Self { + self.tagging_directive = field; + self + } + + pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; + self + } + + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } + + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } + + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } + + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } + + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } + + #[must_use] + pub fn copy_source(mut self, field: CopySource) -> Self { + self.copy_source = Some(field); + self + } + + #[must_use] + pub fn copy_source_if_match(mut self, field: Option) -> Self { + self.copy_source_if_match = field; + self + } + + #[must_use] + pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { + self.copy_source_if_modified_since = field; + self + } + + #[must_use] + pub fn copy_source_if_none_match(mut self, field: Option) -> Self { + self.copy_source_if_none_match = field; + self + } + + #[must_use] + pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { + self.copy_source_if_unmodified_since = field; + self + } + + #[must_use] + pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { + self.copy_source_sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key = field; + self + } + + #[must_use] + pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { + self.expected_source_bucket_owner = field; + self + } + + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } + + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } + + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } + + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } + + #[must_use] + pub fn metadata_directive(mut self, field: Option) -> Self { + self.metadata_directive = field; + self + } + + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } + + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } + + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } + + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } + + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } + + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } + + #[must_use] + pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; + self + } + + #[must_use] + pub fn tagging_directive(mut self, field: Option) -> Self { + self.tagging_directive = field; + self + } + + #[must_use] + pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; + self + } + + pub fn build(self) -> Result { + let acl = self.acl; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_algorithm = self.checksum_algorithm; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_type = self.content_type; + let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; + let copy_source_if_match = self.copy_source_if_match; + let copy_source_if_modified_since = self.copy_source_if_modified_since; + let copy_source_if_none_match = self.copy_source_if_none_match; + let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; + let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; + let copy_source_sse_customer_key = self.copy_source_sse_customer_key; + let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let expected_source_bucket_owner = self.expected_source_bucket_owner; + let expires = self.expires; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write_acp = self.grant_write_acp; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let metadata = self.metadata; + let metadata_directive = self.metadata_directive; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let storage_class = self.storage_class; + let tagging = self.tagging; + let tagging_directive = self.tagging_directive; + let website_redirect_location = self.website_redirect_location; + Ok(CopyObjectInput { + acl, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + content_disposition, + content_encoding, + content_language, + content_type, + copy_source, + copy_source_if_match, + copy_source_if_modified_since, + copy_source_if_none_match, + copy_source_if_unmodified_since, + copy_source_sse_customer_algorithm, + copy_source_sse_customer_key, + copy_source_sse_customer_key_md5, + expected_bucket_owner, + expected_source_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + key, + metadata, + metadata_directive, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + tagging_directive, + website_redirect_location, + }) + } + } + + /// A builder for [`CreateBucketInput`] + #[derive(Default)] + pub struct CreateBucketInputBuilder { + acl: Option, + + bucket: Option, + + create_bucket_configuration: Option, + + grant_full_control: Option, + + grant_read: Option, + + grant_read_acp: Option, + + grant_write: Option, + + grant_write_acp: Option, + + object_lock_enabled_for_bucket: Option, + + object_ownership: Option, + } + + impl CreateBucketInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_create_bucket_configuration(&mut self, field: Option) -> &mut Self { + self.create_bucket_configuration = field; + self + } + + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } + + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } + + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } + + pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; + self + } + + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } + + pub fn set_object_lock_enabled_for_bucket(&mut self, field: Option) -> &mut Self { + self.object_lock_enabled_for_bucket = field; + self + } + + pub fn set_object_ownership(&mut self, field: Option) -> &mut Self { + self.object_ownership = field; + self + } + + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn create_bucket_configuration(mut self, field: Option) -> Self { + self.create_bucket_configuration = field; + self + } + + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } + + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } + + #[must_use] + pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; + self + } + + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } + + #[must_use] + pub fn object_lock_enabled_for_bucket(mut self, field: Option) -> Self { + self.object_lock_enabled_for_bucket = field; + self + } + + #[must_use] + pub fn object_ownership(mut self, field: Option) -> Self { + self.object_ownership = field; + self + } + + pub fn build(self) -> Result { + let acl = self.acl; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let create_bucket_configuration = self.create_bucket_configuration; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write = self.grant_write; + let grant_write_acp = self.grant_write_acp; + let object_lock_enabled_for_bucket = self.object_lock_enabled_for_bucket; + let object_ownership = self.object_ownership; + Ok(CreateBucketInput { + acl, + bucket, + create_bucket_configuration, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + object_lock_enabled_for_bucket, + object_ownership, + }) + } + } + + /// A builder for [`CreateBucketMetadataTableConfigurationInput`] + #[derive(Default)] + pub struct CreateBucketMetadataTableConfigurationInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + metadata_table_configuration: Option, + } + + impl CreateBucketMetadataTableConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_metadata_table_configuration(&mut self, field: MetadataTableConfiguration) -> &mut Self { + self.metadata_table_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn metadata_table_configuration(mut self, field: MetadataTableConfiguration) -> Self { + self.metadata_table_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let metadata_table_configuration = self + .metadata_table_configuration + .ok_or_else(|| BuildError::missing_field("metadata_table_configuration"))?; + Ok(CreateBucketMetadataTableConfigurationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + metadata_table_configuration, + }) + } + } + + /// A builder for [`CreateMultipartUploadInput`] + #[derive(Default)] + pub struct CreateMultipartUploadInputBuilder { + acl: Option, + + bucket: Option, + + bucket_key_enabled: Option, + + cache_control: Option, + + checksum_algorithm: Option, + + checksum_type: Option, + + content_disposition: Option, + + content_encoding: Option, + + content_language: Option, + + content_type: Option, + + expected_bucket_owner: Option, + + expires: Option, + + grant_full_control: Option, + + grant_read: Option, + + grant_read_acp: Option, + + grant_write_acp: Option, + + key: Option, + + metadata: Option, + + object_lock_legal_hold_status: Option, + + object_lock_mode: Option, + + object_lock_retain_until_date: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + ssekms_encryption_context: Option, + + ssekms_key_id: Option, + + server_side_encryption: Option, + + storage_class: Option, + + tagging: Option, + + website_redirect_location: Option, + } + + impl CreateMultipartUploadInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } + + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { + self.checksum_type = field; + self + } + + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } + + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } + + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } + + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } + + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } + + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } + + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } + + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } + + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } + + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } + + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } + + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } + + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } + + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } + + pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; + self + } + + pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; + self + } + + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } + + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn checksum_type(mut self, field: Option) -> Self { + self.checksum_type = field; + self + } + + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } + + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } + + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } + + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } + + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } + + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } + + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } + + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } + + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } + + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } + + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } + + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } + + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } + + #[must_use] + pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; + self + } + + #[must_use] + pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; + self + } + + pub fn build(self) -> Result { + let acl = self.acl; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_algorithm = self.checksum_algorithm; + let checksum_type = self.checksum_type; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_type = self.content_type; + let expected_bucket_owner = self.expected_bucket_owner; + let expires = self.expires; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write_acp = self.grant_write_acp; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let metadata = self.metadata; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let storage_class = self.storage_class; + let tagging = self.tagging; + let website_redirect_location = self.website_redirect_location; + Ok(CreateMultipartUploadInput { + acl, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_type, + content_disposition, + content_encoding, + content_language, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + website_redirect_location, + }) + } + } + + /// A builder for [`CreateSessionInput`] + #[derive(Default)] + pub struct CreateSessionInputBuilder { + bucket: Option, + + bucket_key_enabled: Option, + + ssekms_encryption_context: Option, + + ssekms_key_id: Option, + + server_side_encryption: Option, + + session_mode: Option, + } + + impl CreateSessionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } + + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } + + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } + + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } + + pub fn set_session_mode(&mut self, field: Option) -> &mut Self { + self.session_mode = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } + + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } + + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } + + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } + + #[must_use] + pub fn session_mode(mut self, field: Option) -> Self { + self.session_mode = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let session_mode = self.session_mode; + Ok(CreateSessionInput { + bucket, + bucket_key_enabled, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + session_mode, + }) + } + } + + /// A builder for [`DeleteBucketInput`] + #[derive(Default)] + pub struct DeleteBucketInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketAnalyticsConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketAnalyticsConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + } + + impl DeleteBucketAnalyticsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(DeleteBucketAnalyticsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } + + /// A builder for [`DeleteBucketCorsInput`] + #[derive(Default)] + pub struct DeleteBucketCorsInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketCorsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketCorsInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketEncryptionInput`] + #[derive(Default)] + pub struct DeleteBucketEncryptionInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketEncryptionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketEncryptionInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketIntelligentTieringConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketIntelligentTieringConfigurationInputBuilder { + bucket: Option, + + id: Option, + } + + impl DeleteBucketIntelligentTieringConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(DeleteBucketIntelligentTieringConfigurationInput { bucket, id }) + } + } + + /// A builder for [`DeleteBucketInventoryConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketInventoryConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + } + + impl DeleteBucketInventoryConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(DeleteBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } + + /// A builder for [`DeleteBucketLifecycleInput`] + #[derive(Default)] + pub struct DeleteBucketLifecycleInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketLifecycleInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketLifecycleInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketMetadataTableConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketMetadataTableConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketMetadataTableConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketMetadataTableConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketMetricsConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketMetricsConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + } + + impl DeleteBucketMetricsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(DeleteBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } + + /// A builder for [`DeleteBucketOwnershipControlsInput`] + #[derive(Default)] + pub struct DeleteBucketOwnershipControlsInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketOwnershipControlsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketOwnershipControlsInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketPolicyInput`] + #[derive(Default)] + pub struct DeleteBucketPolicyInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketPolicyInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketPolicyInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketReplicationInput`] + #[derive(Default)] + pub struct DeleteBucketReplicationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketReplicationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketReplicationInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketTaggingInput`] + #[derive(Default)] + pub struct DeleteBucketTaggingInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketTaggingInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteBucketWebsiteInput`] + #[derive(Default)] + pub struct DeleteBucketWebsiteInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeleteBucketWebsiteInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketWebsiteInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`DeleteObjectInput`] + #[derive(Default)] + pub struct DeleteObjectInputBuilder { + bucket: Option, + + bypass_governance_retention: Option, + + expected_bucket_owner: Option, + + if_match: Option, + + if_match_last_modified_time: Option, + + if_match_size: Option, + + key: Option, + + mfa: Option, + + request_payer: Option, + + version_id: Option, + } + + impl DeleteObjectInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } + + pub fn set_if_match_last_modified_time(&mut self, field: Option) -> &mut Self { + self.if_match_last_modified_time = field; + self + } + + pub fn set_if_match_size(&mut self, field: Option) -> &mut Self { + self.if_match_size = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } + + #[must_use] + pub fn if_match_last_modified_time(mut self, field: Option) -> Self { + self.if_match_last_modified_time = field; + self + } + + #[must_use] + pub fn if_match_size(mut self, field: Option) -> Self { + self.if_match_size = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bypass_governance_retention = self.bypass_governance_retention; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match = self.if_match; + let if_match_last_modified_time = self.if_match_last_modified_time; + let if_match_size = self.if_match_size; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let mfa = self.mfa; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(DeleteObjectInput { + bucket, + bypass_governance_retention, + expected_bucket_owner, + if_match, + if_match_last_modified_time, + if_match_size, + key, + mfa, + request_payer, + version_id, + }) + } + } + + /// A builder for [`DeleteObjectTaggingInput`] + #[derive(Default)] + pub struct DeleteObjectTaggingInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + version_id: Option, + } + + impl DeleteObjectTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let version_id = self.version_id; + Ok(DeleteObjectTaggingInput { + bucket, + expected_bucket_owner, + key, + version_id, + }) + } + } + + /// A builder for [`DeleteObjectsInput`] + #[derive(Default)] + pub struct DeleteObjectsInputBuilder { + bucket: Option, + + bypass_governance_retention: Option, + + checksum_algorithm: Option, + + delete: Option, + + expected_bucket_owner: Option, + + mfa: Option, + + request_payer: Option, + } + + impl DeleteObjectsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_delete(&mut self, field: Delete) -> &mut Self { + self.delete = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn delete(mut self, field: Delete) -> Self { + self.delete = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bypass_governance_retention = self.bypass_governance_retention; + let checksum_algorithm = self.checksum_algorithm; + let delete = self.delete.ok_or_else(|| BuildError::missing_field("delete"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let mfa = self.mfa; + let request_payer = self.request_payer; + Ok(DeleteObjectsInput { + bucket, + bypass_governance_retention, + checksum_algorithm, + delete, + expected_bucket_owner, + mfa, + request_payer, + }) + } + } + + /// A builder for [`DeletePublicAccessBlockInput`] + #[derive(Default)] + pub struct DeletePublicAccessBlockInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl DeletePublicAccessBlockInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeletePublicAccessBlockInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketAccelerateConfigurationInput`] + #[derive(Default)] + pub struct GetBucketAccelerateConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + request_payer: Option, + } + + impl GetBucketAccelerateConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let request_payer = self.request_payer; + Ok(GetBucketAccelerateConfigurationInput { + bucket, + expected_bucket_owner, + request_payer, + }) + } + } + + /// A builder for [`GetBucketAclInput`] + #[derive(Default)] + pub struct GetBucketAclInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketAclInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketAclInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketAnalyticsConfigurationInput`] + #[derive(Default)] + pub struct GetBucketAnalyticsConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + } + + impl GetBucketAnalyticsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(GetBucketAnalyticsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } + + /// A builder for [`GetBucketCorsInput`] + #[derive(Default)] + pub struct GetBucketCorsInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketCorsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketCorsInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketEncryptionInput`] + #[derive(Default)] + pub struct GetBucketEncryptionInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketEncryptionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketEncryptionInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketIntelligentTieringConfigurationInput`] + #[derive(Default)] + pub struct GetBucketIntelligentTieringConfigurationInputBuilder { + bucket: Option, + + id: Option, + } + + impl GetBucketIntelligentTieringConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(GetBucketIntelligentTieringConfigurationInput { bucket, id }) + } + } + + /// A builder for [`GetBucketInventoryConfigurationInput`] + #[derive(Default)] + pub struct GetBucketInventoryConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + } + + impl GetBucketInventoryConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(GetBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } + + /// A builder for [`GetBucketLifecycleConfigurationInput`] + #[derive(Default)] + pub struct GetBucketLifecycleConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketLifecycleConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketLifecycleConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketLocationInput`] + #[derive(Default)] + pub struct GetBucketLocationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketLocationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketLocationInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketLoggingInput`] + #[derive(Default)] + pub struct GetBucketLoggingInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketLoggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketLoggingInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketMetadataTableConfigurationInput`] + #[derive(Default)] + pub struct GetBucketMetadataTableConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketMetadataTableConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketMetadataTableConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketMetricsConfigurationInput`] + #[derive(Default)] + pub struct GetBucketMetricsConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + } + + impl GetBucketMetricsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(GetBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } + + /// A builder for [`GetBucketNotificationConfigurationInput`] + #[derive(Default)] + pub struct GetBucketNotificationConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketNotificationConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketNotificationConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketOwnershipControlsInput`] + #[derive(Default)] + pub struct GetBucketOwnershipControlsInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketOwnershipControlsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketOwnershipControlsInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketPolicyInput`] + #[derive(Default)] + pub struct GetBucketPolicyInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketPolicyInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketPolicyInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketPolicyStatusInput`] + #[derive(Default)] + pub struct GetBucketPolicyStatusInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketPolicyStatusInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketPolicyStatusInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketReplicationInput`] + #[derive(Default)] + pub struct GetBucketReplicationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketReplicationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketReplicationInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketRequestPaymentInput`] + #[derive(Default)] + pub struct GetBucketRequestPaymentInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketRequestPaymentInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketRequestPaymentInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketTaggingInput`] + #[derive(Default)] + pub struct GetBucketTaggingInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketTaggingInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketVersioningInput`] + #[derive(Default)] + pub struct GetBucketVersioningInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketVersioningInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketVersioningInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetBucketWebsiteInput`] + #[derive(Default)] + pub struct GetBucketWebsiteInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetBucketWebsiteInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketWebsiteInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetObjectInput`] + #[derive(Default)] + pub struct GetObjectInputBuilder { + bucket: Option, + + checksum_mode: Option, + + expected_bucket_owner: Option, + + if_match: Option, + + if_modified_since: Option, + + if_none_match: Option, + + if_unmodified_since: Option, + + key: Option, + + part_number: Option, + + range: Option, + + request_payer: Option, + + response_cache_control: Option, + + response_content_disposition: Option, + + response_content_encoding: Option, + + response_content_language: Option, + + response_content_type: Option, + + response_expires: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + version_id: Option, + } + + impl GetObjectInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { + self.checksum_mode = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } + + pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { + self.if_modified_since = field; + self + } + + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } + + pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.if_unmodified_since = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_part_number(&mut self, field: Option) -> &mut Self { + self.part_number = field; + self + } + + pub fn set_range(&mut self, field: Option) -> &mut Self { + self.range = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { + self.response_cache_control = field; + self + } + + pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { + self.response_content_disposition = field; + self + } + + pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { + self.response_content_encoding = field; + self + } + + pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { + self.response_content_language = field; + self + } + + pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { + self.response_content_type = field; + self + } + + pub fn set_response_expires(&mut self, field: Option) -> &mut Self { + self.response_expires = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_mode(mut self, field: Option) -> Self { + self.checksum_mode = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } + + #[must_use] + pub fn if_modified_since(mut self, field: Option) -> Self { + self.if_modified_since = field; + self + } + + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } + + #[must_use] + pub fn if_unmodified_since(mut self, field: Option) -> Self { + self.if_unmodified_since = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn part_number(mut self, field: Option) -> Self { + self.part_number = field; + self + } + + #[must_use] + pub fn range(mut self, field: Option) -> Self { + self.range = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn response_cache_control(mut self, field: Option) -> Self { + self.response_cache_control = field; + self + } + + #[must_use] + pub fn response_content_disposition(mut self, field: Option) -> Self { + self.response_content_disposition = field; + self + } + + #[must_use] + pub fn response_content_encoding(mut self, field: Option) -> Self { + self.response_content_encoding = field; + self + } + + #[must_use] + pub fn response_content_language(mut self, field: Option) -> Self { + self.response_content_language = field; + self + } + + #[must_use] + pub fn response_content_type(mut self, field: Option) -> Self { + self.response_content_type = field; + self + } + + #[must_use] + pub fn response_expires(mut self, field: Option) -> Self { + self.response_expires = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_mode = self.checksum_mode; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match = self.if_match; + let if_modified_since = self.if_modified_since; + let if_none_match = self.if_none_match; + let if_unmodified_since = self.if_unmodified_since; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let part_number = self.part_number; + let range = self.range; + let request_payer = self.request_payer; + let response_cache_control = self.response_cache_control; + let response_content_disposition = self.response_content_disposition; + let response_content_encoding = self.response_content_encoding; + let response_content_language = self.response_content_language; + let response_content_type = self.response_content_type; + let response_expires = self.response_expires; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let version_id = self.version_id; + Ok(GetObjectInput { + bucket, + checksum_mode, + expected_bucket_owner, + if_match, + if_modified_since, + if_none_match, + if_unmodified_since, + key, + part_number, + range, + request_payer, + response_cache_control, + response_content_disposition, + response_content_encoding, + response_content_language, + response_content_type, + response_expires, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + } + + /// A builder for [`GetObjectAclInput`] + #[derive(Default)] + pub struct GetObjectAclInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + request_payer: Option, + + version_id: Option, + } + + impl GetObjectAclInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(GetObjectAclInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + } + + /// A builder for [`GetObjectAttributesInput`] + #[derive(Default)] + pub struct GetObjectAttributesInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + max_parts: Option, + + object_attributes: ObjectAttributesList, + + part_number_marker: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + version_id: Option, + } + + impl GetObjectAttributesInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_max_parts(&mut self, field: Option) -> &mut Self { + self.max_parts = field; + self + } + + pub fn set_object_attributes(&mut self, field: ObjectAttributesList) -> &mut Self { + self.object_attributes = field; + self + } + + pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { + self.part_number_marker = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn max_parts(mut self, field: Option) -> Self { + self.max_parts = field; + self + } + + #[must_use] + pub fn object_attributes(mut self, field: ObjectAttributesList) -> Self { + self.object_attributes = field; + self + } + + #[must_use] + pub fn part_number_marker(mut self, field: Option) -> Self { + self.part_number_marker = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let max_parts = self.max_parts; + let object_attributes = self.object_attributes; + let part_number_marker = self.part_number_marker; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let version_id = self.version_id; + Ok(GetObjectAttributesInput { + bucket, + expected_bucket_owner, + key, + max_parts, + object_attributes, + part_number_marker, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + } + + /// A builder for [`GetObjectLegalHoldInput`] + #[derive(Default)] + pub struct GetObjectLegalHoldInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + request_payer: Option, + + version_id: Option, + } + + impl GetObjectLegalHoldInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(GetObjectLegalHoldInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + } + + /// A builder for [`GetObjectLockConfigurationInput`] + #[derive(Default)] + pub struct GetObjectLockConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetObjectLockConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetObjectLockConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`GetObjectRetentionInput`] + #[derive(Default)] + pub struct GetObjectRetentionInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + request_payer: Option, + + version_id: Option, + } + + impl GetObjectRetentionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(GetObjectRetentionInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + } + + /// A builder for [`GetObjectTaggingInput`] + #[derive(Default)] + pub struct GetObjectTaggingInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + request_payer: Option, + + version_id: Option, + } + + impl GetObjectTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(GetObjectTaggingInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + } + + /// A builder for [`GetObjectTorrentInput`] + #[derive(Default)] + pub struct GetObjectTorrentInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + request_payer: Option, + } + + impl GetObjectTorrentInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + Ok(GetObjectTorrentInput { + bucket, + expected_bucket_owner, + key, + request_payer, + }) + } + } + + /// A builder for [`GetPublicAccessBlockInput`] + #[derive(Default)] + pub struct GetPublicAccessBlockInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl GetPublicAccessBlockInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetPublicAccessBlockInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`HeadBucketInput`] + #[derive(Default)] + pub struct HeadBucketInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + } + + impl HeadBucketInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(HeadBucketInput { + bucket, + expected_bucket_owner, + }) + } + } + + /// A builder for [`HeadObjectInput`] + #[derive(Default)] + pub struct HeadObjectInputBuilder { + bucket: Option, + + checksum_mode: Option, + + expected_bucket_owner: Option, + + if_match: Option, + + if_modified_since: Option, + + if_none_match: Option, + + if_unmodified_since: Option, + + key: Option, + + part_number: Option, + + range: Option, + + request_payer: Option, + + response_cache_control: Option, + + response_content_disposition: Option, + + response_content_encoding: Option, + + response_content_language: Option, + + response_content_type: Option, + + response_expires: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + version_id: Option, + } + + impl HeadObjectInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { + self.checksum_mode = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } + + pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { + self.if_modified_since = field; + self + } + + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } + + pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.if_unmodified_since = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_part_number(&mut self, field: Option) -> &mut Self { + self.part_number = field; + self + } + + pub fn set_range(&mut self, field: Option) -> &mut Self { + self.range = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { + self.response_cache_control = field; + self + } + + pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { + self.response_content_disposition = field; + self + } + + pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { + self.response_content_encoding = field; + self + } + + pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { + self.response_content_language = field; + self + } + + pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { + self.response_content_type = field; + self + } + + pub fn set_response_expires(&mut self, field: Option) -> &mut Self { + self.response_expires = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_mode(mut self, field: Option) -> Self { + self.checksum_mode = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } + + #[must_use] + pub fn if_modified_since(mut self, field: Option) -> Self { + self.if_modified_since = field; + self + } + + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } + + #[must_use] + pub fn if_unmodified_since(mut self, field: Option) -> Self { + self.if_unmodified_since = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn part_number(mut self, field: Option) -> Self { + self.part_number = field; + self + } + + #[must_use] + pub fn range(mut self, field: Option) -> Self { + self.range = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn response_cache_control(mut self, field: Option) -> Self { + self.response_cache_control = field; + self + } + + #[must_use] + pub fn response_content_disposition(mut self, field: Option) -> Self { + self.response_content_disposition = field; + self + } + + #[must_use] + pub fn response_content_encoding(mut self, field: Option) -> Self { + self.response_content_encoding = field; + self + } + + #[must_use] + pub fn response_content_language(mut self, field: Option) -> Self { + self.response_content_language = field; + self + } + + #[must_use] + pub fn response_content_type(mut self, field: Option) -> Self { + self.response_content_type = field; + self + } + + #[must_use] + pub fn response_expires(mut self, field: Option) -> Self { + self.response_expires = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_mode = self.checksum_mode; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match = self.if_match; + let if_modified_since = self.if_modified_since; + let if_none_match = self.if_none_match; + let if_unmodified_since = self.if_unmodified_since; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let part_number = self.part_number; + let range = self.range; + let request_payer = self.request_payer; + let response_cache_control = self.response_cache_control; + let response_content_disposition = self.response_content_disposition; + let response_content_encoding = self.response_content_encoding; + let response_content_language = self.response_content_language; + let response_content_type = self.response_content_type; + let response_expires = self.response_expires; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let version_id = self.version_id; + Ok(HeadObjectInput { + bucket, + checksum_mode, + expected_bucket_owner, + if_match, + if_modified_since, + if_none_match, + if_unmodified_since, + key, + part_number, + range, + request_payer, + response_cache_control, + response_content_disposition, + response_content_encoding, + response_content_language, + response_content_type, + response_expires, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + } + + /// A builder for [`ListBucketAnalyticsConfigurationsInput`] + #[derive(Default)] + pub struct ListBucketAnalyticsConfigurationsInputBuilder { + bucket: Option, + + continuation_token: Option, + + expected_bucket_owner: Option, + } + + impl ListBucketAnalyticsConfigurationsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(ListBucketAnalyticsConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + } + + /// A builder for [`ListBucketIntelligentTieringConfigurationsInput`] + #[derive(Default)] + pub struct ListBucketIntelligentTieringConfigurationsInputBuilder { + bucket: Option, + + continuation_token: Option, + } + + impl ListBucketIntelligentTieringConfigurationsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + Ok(ListBucketIntelligentTieringConfigurationsInput { + bucket, + continuation_token, + }) + } + } + + /// A builder for [`ListBucketInventoryConfigurationsInput`] + #[derive(Default)] + pub struct ListBucketInventoryConfigurationsInputBuilder { + bucket: Option, + + continuation_token: Option, + + expected_bucket_owner: Option, + } + + impl ListBucketInventoryConfigurationsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(ListBucketInventoryConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + } + + /// A builder for [`ListBucketMetricsConfigurationsInput`] + #[derive(Default)] + pub struct ListBucketMetricsConfigurationsInputBuilder { + bucket: Option, + + continuation_token: Option, + + expected_bucket_owner: Option, + } + + impl ListBucketMetricsConfigurationsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(ListBucketMetricsConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + } + + /// A builder for [`ListBucketsInput`] + #[derive(Default)] + pub struct ListBucketsInputBuilder { + bucket_region: Option, + + continuation_token: Option, + + max_buckets: Option, + + prefix: Option, + } + + impl ListBucketsInputBuilder { + pub fn set_bucket_region(&mut self, field: Option) -> &mut Self { + self.bucket_region = field; + self + } + + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } + + pub fn set_max_buckets(&mut self, field: Option) -> &mut Self { + self.max_buckets = field; + self + } + + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } + + #[must_use] + pub fn bucket_region(mut self, field: Option) -> Self { + self.bucket_region = field; + self + } + + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } + + #[must_use] + pub fn max_buckets(mut self, field: Option) -> Self { + self.max_buckets = field; + self + } + + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } + + pub fn build(self) -> Result { + let bucket_region = self.bucket_region; + let continuation_token = self.continuation_token; + let max_buckets = self.max_buckets; + let prefix = self.prefix; + Ok(ListBucketsInput { + bucket_region, + continuation_token, + max_buckets, + prefix, + }) + } + } + + /// A builder for [`ListDirectoryBucketsInput`] + #[derive(Default)] + pub struct ListDirectoryBucketsInputBuilder { + continuation_token: Option, + + max_directory_buckets: Option, + } + + impl ListDirectoryBucketsInputBuilder { + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } + + pub fn set_max_directory_buckets(&mut self, field: Option) -> &mut Self { + self.max_directory_buckets = field; + self + } + + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } + + #[must_use] + pub fn max_directory_buckets(mut self, field: Option) -> Self { + self.max_directory_buckets = field; + self + } + + pub fn build(self) -> Result { + let continuation_token = self.continuation_token; + let max_directory_buckets = self.max_directory_buckets; + Ok(ListDirectoryBucketsInput { + continuation_token, + max_directory_buckets, + }) + } + } + + /// A builder for [`ListMultipartUploadsInput`] + #[derive(Default)] + pub struct ListMultipartUploadsInputBuilder { + bucket: Option, + + delimiter: Option, + + encoding_type: Option, + + expected_bucket_owner: Option, + + key_marker: Option, + + max_uploads: Option, + + prefix: Option, + + request_payer: Option, + + upload_id_marker: Option, + } + + impl ListMultipartUploadsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; + self + } + + pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key_marker(&mut self, field: Option) -> &mut Self { + self.key_marker = field; + self + } + + pub fn set_max_uploads(&mut self, field: Option) -> &mut Self { + self.max_uploads = field; + self + } + + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_upload_id_marker(&mut self, field: Option) -> &mut Self { + self.upload_id_marker = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; + self + } + + #[must_use] + pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key_marker(mut self, field: Option) -> Self { + self.key_marker = field; + self + } + + #[must_use] + pub fn max_uploads(mut self, field: Option) -> Self { + self.max_uploads = field; + self + } + + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn upload_id_marker(mut self, field: Option) -> Self { + self.upload_id_marker = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let delimiter = self.delimiter; + let encoding_type = self.encoding_type; + let expected_bucket_owner = self.expected_bucket_owner; + let key_marker = self.key_marker; + let max_uploads = self.max_uploads; + let prefix = self.prefix; + let request_payer = self.request_payer; + let upload_id_marker = self.upload_id_marker; + Ok(ListMultipartUploadsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + key_marker, + max_uploads, + prefix, + request_payer, + upload_id_marker, + }) + } + } + + /// A builder for [`ListObjectVersionsInput`] + #[derive(Default)] + pub struct ListObjectVersionsInputBuilder { + bucket: Option, + + delimiter: Option, + + encoding_type: Option, + + expected_bucket_owner: Option, + + key_marker: Option, + + max_keys: Option, + + optional_object_attributes: Option, + + prefix: Option, + + request_payer: Option, + + version_id_marker: Option, + } + + impl ListObjectVersionsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; + self + } + + pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key_marker(&mut self, field: Option) -> &mut Self { + self.key_marker = field; + self + } + + pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; + self + } + + pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; + self + } + + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_version_id_marker(&mut self, field: Option) -> &mut Self { + self.version_id_marker = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; + self + } + + #[must_use] + pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key_marker(mut self, field: Option) -> Self { + self.key_marker = field; + self + } + + #[must_use] + pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; + self + } + + #[must_use] + pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; + self + } + + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn version_id_marker(mut self, field: Option) -> Self { + self.version_id_marker = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let delimiter = self.delimiter; + let encoding_type = self.encoding_type; + let expected_bucket_owner = self.expected_bucket_owner; + let key_marker = self.key_marker; + let max_keys = self.max_keys; + let optional_object_attributes = self.optional_object_attributes; + let prefix = self.prefix; + let request_payer = self.request_payer; + let version_id_marker = self.version_id_marker; + Ok(ListObjectVersionsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + key_marker, + max_keys, + optional_object_attributes, + prefix, + request_payer, + version_id_marker, + }) + } + } + + /// A builder for [`ListObjectsInput`] + #[derive(Default)] + pub struct ListObjectsInputBuilder { + bucket: Option, + + delimiter: Option, + + encoding_type: Option, + + expected_bucket_owner: Option, + + marker: Option, + + max_keys: Option, + + optional_object_attributes: Option, + + prefix: Option, + + request_payer: Option, + } + + impl ListObjectsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; + self + } + + pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_marker(&mut self, field: Option) -> &mut Self { + self.marker = field; + self + } + + pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; + self + } + + pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; + self + } + + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; + self + } + + #[must_use] + pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn marker(mut self, field: Option) -> Self { + self.marker = field; + self + } + + #[must_use] + pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; + self + } + + #[must_use] + pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; + self + } + + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let delimiter = self.delimiter; + let encoding_type = self.encoding_type; + let expected_bucket_owner = self.expected_bucket_owner; + let marker = self.marker; + let max_keys = self.max_keys; + let optional_object_attributes = self.optional_object_attributes; + let prefix = self.prefix; + let request_payer = self.request_payer; + Ok(ListObjectsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + marker, + max_keys, + optional_object_attributes, + prefix, + request_payer, + }) + } + } + + /// A builder for [`ListObjectsV2Input`] + #[derive(Default)] + pub struct ListObjectsV2InputBuilder { + bucket: Option, + + continuation_token: Option, + + delimiter: Option, + + encoding_type: Option, + + expected_bucket_owner: Option, + + fetch_owner: Option, + + max_keys: Option, + + optional_object_attributes: Option, + + prefix: Option, + + request_payer: Option, + + start_after: Option, + } + + impl ListObjectsV2InputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } + + pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; + self + } + + pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_fetch_owner(&mut self, field: Option) -> &mut Self { + self.fetch_owner = field; + self + } + + pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; + self + } + + pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; + self + } + + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_start_after(&mut self, field: Option) -> &mut Self { + self.start_after = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } + + #[must_use] + pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; + self + } + + #[must_use] + pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn fetch_owner(mut self, field: Option) -> Self { + self.fetch_owner = field; + self + } + + #[must_use] + pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; + self + } + + #[must_use] + pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; + self + } + + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn start_after(mut self, field: Option) -> Self { + self.start_after = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + let delimiter = self.delimiter; + let encoding_type = self.encoding_type; + let expected_bucket_owner = self.expected_bucket_owner; + let fetch_owner = self.fetch_owner; + let max_keys = self.max_keys; + let optional_object_attributes = self.optional_object_attributes; + let prefix = self.prefix; + let request_payer = self.request_payer; + let start_after = self.start_after; + Ok(ListObjectsV2Input { + bucket, + continuation_token, + delimiter, + encoding_type, + expected_bucket_owner, + fetch_owner, + max_keys, + optional_object_attributes, + prefix, + request_payer, + start_after, + }) + } + } + + /// A builder for [`ListPartsInput`] + #[derive(Default)] + pub struct ListPartsInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + max_parts: Option, + + part_number_marker: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + upload_id: Option, + } + + impl ListPartsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_max_parts(&mut self, field: Option) -> &mut Self { + self.max_parts = field; + self + } + + pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { + self.part_number_marker = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn max_parts(mut self, field: Option) -> Self { + self.max_parts = field; + self + } + + #[must_use] + pub fn part_number_marker(mut self, field: Option) -> Self { + self.part_number_marker = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let max_parts = self.max_parts; + let part_number_marker = self.part_number_marker; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(ListPartsInput { + bucket, + expected_bucket_owner, + key, + max_parts, + part_number_marker, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + } + + /// A builder for [`PostObjectInput`] + #[derive(Default)] + pub struct PostObjectInputBuilder { + acl: Option, + + body: Option, + + bucket: Option, + + bucket_key_enabled: Option, + + cache_control: Option, + + checksum_algorithm: Option, + + checksum_crc32: Option, + + checksum_crc32c: Option, + + checksum_crc64nvme: Option, + + checksum_sha1: Option, + + checksum_sha256: Option, + + content_disposition: Option, + + content_encoding: Option, + + content_language: Option, + + content_length: Option, + + content_md5: Option, + + content_type: Option, + + expected_bucket_owner: Option, + + expires: Option, + + grant_full_control: Option, + + grant_read: Option, + + grant_read_acp: Option, + + grant_write_acp: Option, + + if_match: Option, + + if_none_match: Option, + + key: Option, + + metadata: Option, + + object_lock_legal_hold_status: Option, + + object_lock_mode: Option, + + object_lock_retain_until_date: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + ssekms_encryption_context: Option, + + ssekms_key_id: Option, + + server_side_encryption: Option, + + storage_class: Option, + + tagging: Option, + + website_redirect_location: Option, + + write_offset_bytes: Option, + + success_action_redirect: Option, + + success_action_status: Option, + + policy: Option, + } + + impl PostObjectInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } + + pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } + + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } + + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } + + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } + + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } + + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } + + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } + + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } + + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } + + pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } + + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } + + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } + + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } + + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } + + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } + + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } + + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } + + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } + + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } + + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } + + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } + + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } + + pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; + self + } + + pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; + self + } + + pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { + self.write_offset_bytes = field; + self + } + + pub fn set_success_action_redirect(&mut self, field: Option) -> &mut Self { + self.success_action_redirect = field; + self + } + + pub fn set_success_action_status(&mut self, field: Option) -> &mut Self { + self.success_action_status = field; + self + } + + pub fn set_policy(&mut self, field: Option) -> &mut Self { + self.policy = field; + self + } + + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } + + #[must_use] + pub fn body(mut self, field: Option) -> Self { + self.body = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } + + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } + + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } + + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } + + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } + + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } + + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } + + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } + + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } + + #[must_use] + pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } + + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } + + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } + + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } + + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } + + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } + + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } + + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } + + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } + + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } + + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } + + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } + + #[must_use] + pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; + self + } + + #[must_use] + pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; + self + } + + #[must_use] + pub fn write_offset_bytes(mut self, field: Option) -> Self { + self.write_offset_bytes = field; + self + } + + #[must_use] + pub fn success_action_redirect(mut self, field: Option) -> Self { + self.success_action_redirect = field; + self + } + + #[must_use] + pub fn success_action_status(mut self, field: Option) -> Self { + self.success_action_status = field; + self + } + + #[must_use] + pub fn policy(mut self, field: Option) -> Self { + self.policy = field; + self + } + + pub fn build(self) -> Result { + let acl = self.acl; + let body = self.body; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_algorithm = self.checksum_algorithm; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_length = self.content_length; + let content_md5 = self.content_md5; + let content_type = self.content_type; + let expected_bucket_owner = self.expected_bucket_owner; + let expires = self.expires; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write_acp = self.grant_write_acp; + let if_match = self.if_match; + let if_none_match = self.if_none_match; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let metadata = self.metadata; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let storage_class = self.storage_class; + let tagging = self.tagging; + let website_redirect_location = self.website_redirect_location; + let write_offset_bytes = self.write_offset_bytes; + let success_action_redirect = self.success_action_redirect; + let success_action_status = self.success_action_status; + let policy = self.policy; + Ok(PostObjectInput { + acl, + body, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_md5, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + if_match, + if_none_match, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + website_redirect_location, + write_offset_bytes, + success_action_redirect, + success_action_status, + policy, + }) + } + } + + /// A builder for [`PutBucketAccelerateConfigurationInput`] + #[derive(Default)] + pub struct PutBucketAccelerateConfigurationInputBuilder { + accelerate_configuration: Option, + + bucket: Option, + + checksum_algorithm: Option, + + expected_bucket_owner: Option, + } + + impl PutBucketAccelerateConfigurationInputBuilder { + pub fn set_accelerate_configuration(&mut self, field: AccelerateConfiguration) -> &mut Self { + self.accelerate_configuration = Some(field); + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn accelerate_configuration(mut self, field: AccelerateConfiguration) -> Self { + self.accelerate_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let accelerate_configuration = self + .accelerate_configuration + .ok_or_else(|| BuildError::missing_field("accelerate_configuration"))?; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(PutBucketAccelerateConfigurationInput { + accelerate_configuration, + bucket, + checksum_algorithm, + expected_bucket_owner, + }) + } + } + + /// A builder for [`PutBucketAclInput`] + #[derive(Default)] + pub struct PutBucketAclInputBuilder { + acl: Option, + + access_control_policy: Option, + + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + grant_full_control: Option, + + grant_read: Option, + + grant_read_acp: Option, + + grant_write: Option, + + grant_write_acp: Option, + } + + impl PutBucketAclInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } + + pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { + self.access_control_policy = field; + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } + + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } + + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } + + pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; + self + } + + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } + + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } + + #[must_use] + pub fn access_control_policy(mut self, field: Option) -> Self { + self.access_control_policy = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } + + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } + + #[must_use] + pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; + self + } + + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } + + pub fn build(self) -> Result { + let acl = self.acl; + let access_control_policy = self.access_control_policy; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write = self.grant_write; + let grant_write_acp = self.grant_write_acp; + Ok(PutBucketAclInput { + acl, + access_control_policy, + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + }) + } + } + + /// A builder for [`PutBucketAnalyticsConfigurationInput`] + #[derive(Default)] + pub struct PutBucketAnalyticsConfigurationInputBuilder { + analytics_configuration: Option, + + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + } + + impl PutBucketAnalyticsConfigurationInputBuilder { + pub fn set_analytics_configuration(&mut self, field: AnalyticsConfiguration) -> &mut Self { + self.analytics_configuration = Some(field); + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn analytics_configuration(mut self, field: AnalyticsConfiguration) -> Self { + self.analytics_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); + self + } + + pub fn build(self) -> Result { + let analytics_configuration = self + .analytics_configuration + .ok_or_else(|| BuildError::missing_field("analytics_configuration"))?; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(PutBucketAnalyticsConfigurationInput { + analytics_configuration, + bucket, + expected_bucket_owner, + id, + }) + } + } + + /// A builder for [`PutBucketCorsInput`] + #[derive(Default)] + pub struct PutBucketCorsInputBuilder { + bucket: Option, + + cors_configuration: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + } + + impl PutBucketCorsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_cors_configuration(&mut self, field: CORSConfiguration) -> &mut Self { + self.cors_configuration = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn cors_configuration(mut self, field: CORSConfiguration) -> Self { + self.cors_configuration = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let cors_configuration = self + .cors_configuration + .ok_or_else(|| BuildError::missing_field("cors_configuration"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(PutBucketCorsInput { + bucket, + cors_configuration, + checksum_algorithm, + content_md5, + expected_bucket_owner, + }) + } + } + + /// A builder for [`PutBucketEncryptionInput`] + #[derive(Default)] + pub struct PutBucketEncryptionInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + server_side_encryption_configuration: Option, + } + + impl PutBucketEncryptionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_server_side_encryption_configuration(&mut self, field: ServerSideEncryptionConfiguration) -> &mut Self { + self.server_side_encryption_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn server_side_encryption_configuration(mut self, field: ServerSideEncryptionConfiguration) -> Self { + self.server_side_encryption_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let server_side_encryption_configuration = self + .server_side_encryption_configuration + .ok_or_else(|| BuildError::missing_field("server_side_encryption_configuration"))?; + Ok(PutBucketEncryptionInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + server_side_encryption_configuration, + }) + } + } + + /// A builder for [`PutBucketIntelligentTieringConfigurationInput`] + #[derive(Default)] + pub struct PutBucketIntelligentTieringConfigurationInputBuilder { + bucket: Option, + + id: Option, + + intelligent_tiering_configuration: Option, + } + + impl PutBucketIntelligentTieringConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); + self + } + + pub fn set_intelligent_tiering_configuration(&mut self, field: IntelligentTieringConfiguration) -> &mut Self { + self.intelligent_tiering_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn intelligent_tiering_configuration(mut self, field: IntelligentTieringConfiguration) -> Self { + self.intelligent_tiering_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + let intelligent_tiering_configuration = self + .intelligent_tiering_configuration + .ok_or_else(|| BuildError::missing_field("intelligent_tiering_configuration"))?; + Ok(PutBucketIntelligentTieringConfigurationInput { + bucket, + id, + intelligent_tiering_configuration, + }) + } + } + + /// A builder for [`PutBucketInventoryConfigurationInput`] + #[derive(Default)] + pub struct PutBucketInventoryConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + + inventory_configuration: Option, + } + + impl PutBucketInventoryConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); + self + } + + pub fn set_inventory_configuration(&mut self, field: InventoryConfiguration) -> &mut Self { + self.inventory_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn inventory_configuration(mut self, field: InventoryConfiguration) -> Self { + self.inventory_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + let inventory_configuration = self + .inventory_configuration + .ok_or_else(|| BuildError::missing_field("inventory_configuration"))?; + Ok(PutBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + inventory_configuration, + }) + } + } + + /// A builder for [`PutBucketLifecycleConfigurationInput`] + #[derive(Default)] + pub struct PutBucketLifecycleConfigurationInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + expected_bucket_owner: Option, + + lifecycle_configuration: Option, + + transition_default_minimum_object_size: Option, + } + + impl PutBucketLifecycleConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_lifecycle_configuration(&mut self, field: Option) -> &mut Self { + self.lifecycle_configuration = field; + self + } + + pub fn set_transition_default_minimum_object_size( + &mut self, + field: Option, + ) -> &mut Self { + self.transition_default_minimum_object_size = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn lifecycle_configuration(mut self, field: Option) -> Self { + self.lifecycle_configuration = field; + self + } + + #[must_use] + pub fn transition_default_minimum_object_size(mut self, field: Option) -> Self { + self.transition_default_minimum_object_size = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let expected_bucket_owner = self.expected_bucket_owner; + let lifecycle_configuration = self.lifecycle_configuration; + let transition_default_minimum_object_size = self.transition_default_minimum_object_size; + Ok(PutBucketLifecycleConfigurationInput { + bucket, + checksum_algorithm, + expected_bucket_owner, + lifecycle_configuration, + transition_default_minimum_object_size, + }) + } + } + + /// A builder for [`PutBucketLoggingInput`] + #[derive(Default)] + pub struct PutBucketLoggingInputBuilder { + bucket: Option, + + bucket_logging_status: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + } + + impl PutBucketLoggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bucket_logging_status(&mut self, field: BucketLoggingStatus) -> &mut Self { + self.bucket_logging_status = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bucket_logging_status(mut self, field: BucketLoggingStatus) -> Self { + self.bucket_logging_status = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_logging_status = self + .bucket_logging_status + .ok_or_else(|| BuildError::missing_field("bucket_logging_status"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(PutBucketLoggingInput { + bucket, + bucket_logging_status, + checksum_algorithm, + content_md5, + expected_bucket_owner, + }) + } + } + + /// A builder for [`PutBucketMetricsConfigurationInput`] + #[derive(Default)] + pub struct PutBucketMetricsConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + id: Option, + + metrics_configuration: Option, + } + + impl PutBucketMetricsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); + self + } + + pub fn set_metrics_configuration(&mut self, field: MetricsConfiguration) -> &mut Self { + self.metrics_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); + self + } + + #[must_use] + pub fn metrics_configuration(mut self, field: MetricsConfiguration) -> Self { + self.metrics_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + let metrics_configuration = self + .metrics_configuration + .ok_or_else(|| BuildError::missing_field("metrics_configuration"))?; + Ok(PutBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + metrics_configuration, + }) + } + } + + /// A builder for [`PutBucketNotificationConfigurationInput`] + #[derive(Default)] + pub struct PutBucketNotificationConfigurationInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + notification_configuration: Option, + + skip_destination_validation: Option, + } + + impl PutBucketNotificationConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_notification_configuration(&mut self, field: NotificationConfiguration) -> &mut Self { + self.notification_configuration = Some(field); + self + } + + pub fn set_skip_destination_validation(&mut self, field: Option) -> &mut Self { + self.skip_destination_validation = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn notification_configuration(mut self, field: NotificationConfiguration) -> Self { + self.notification_configuration = Some(field); + self + } + + #[must_use] + pub fn skip_destination_validation(mut self, field: Option) -> Self { + self.skip_destination_validation = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let notification_configuration = self + .notification_configuration + .ok_or_else(|| BuildError::missing_field("notification_configuration"))?; + let skip_destination_validation = self.skip_destination_validation; + Ok(PutBucketNotificationConfigurationInput { + bucket, + expected_bucket_owner, + notification_configuration, + skip_destination_validation, + }) + } + } + + /// A builder for [`PutBucketOwnershipControlsInput`] + #[derive(Default)] + pub struct PutBucketOwnershipControlsInputBuilder { + bucket: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + ownership_controls: Option, + } + + impl PutBucketOwnershipControlsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_ownership_controls(&mut self, field: OwnershipControls) -> &mut Self { + self.ownership_controls = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn ownership_controls(mut self, field: OwnershipControls) -> Self { + self.ownership_controls = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let ownership_controls = self + .ownership_controls + .ok_or_else(|| BuildError::missing_field("ownership_controls"))?; + Ok(PutBucketOwnershipControlsInput { + bucket, + content_md5, + expected_bucket_owner, + ownership_controls, + }) + } + } + + /// A builder for [`PutBucketPolicyInput`] + #[derive(Default)] + pub struct PutBucketPolicyInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + confirm_remove_self_bucket_access: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + policy: Option, + } + + impl PutBucketPolicyInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_confirm_remove_self_bucket_access(&mut self, field: Option) -> &mut Self { + self.confirm_remove_self_bucket_access = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_policy(&mut self, field: Policy) -> &mut Self { + self.policy = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn confirm_remove_self_bucket_access(mut self, field: Option) -> Self { + self.confirm_remove_self_bucket_access = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn policy(mut self, field: Policy) -> Self { + self.policy = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let confirm_remove_self_bucket_access = self.confirm_remove_self_bucket_access; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let policy = self.policy.ok_or_else(|| BuildError::missing_field("policy"))?; + Ok(PutBucketPolicyInput { + bucket, + checksum_algorithm, + confirm_remove_self_bucket_access, + content_md5, + expected_bucket_owner, + policy, + }) + } + } + + /// A builder for [`PutBucketReplicationInput`] + #[derive(Default)] + pub struct PutBucketReplicationInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + replication_configuration: Option, + + token: Option, + } + + impl PutBucketReplicationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_replication_configuration(&mut self, field: ReplicationConfiguration) -> &mut Self { + self.replication_configuration = Some(field); + self + } + + pub fn set_token(&mut self, field: Option) -> &mut Self { + self.token = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn replication_configuration(mut self, field: ReplicationConfiguration) -> Self { + self.replication_configuration = Some(field); + self + } + + #[must_use] + pub fn token(mut self, field: Option) -> Self { + self.token = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let replication_configuration = self + .replication_configuration + .ok_or_else(|| BuildError::missing_field("replication_configuration"))?; + let token = self.token; + Ok(PutBucketReplicationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + replication_configuration, + token, + }) + } + } + + /// A builder for [`PutBucketRequestPaymentInput`] + #[derive(Default)] + pub struct PutBucketRequestPaymentInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + request_payment_configuration: Option, + } + + impl PutBucketRequestPaymentInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_request_payment_configuration(&mut self, field: RequestPaymentConfiguration) -> &mut Self { + self.request_payment_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn request_payment_configuration(mut self, field: RequestPaymentConfiguration) -> Self { + self.request_payment_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let request_payment_configuration = self + .request_payment_configuration + .ok_or_else(|| BuildError::missing_field("request_payment_configuration"))?; + Ok(PutBucketRequestPaymentInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + request_payment_configuration, + }) + } + } + + /// A builder for [`PutBucketTaggingInput`] + #[derive(Default)] + pub struct PutBucketTaggingInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + tagging: Option, + } + + impl PutBucketTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { + self.tagging = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn tagging(mut self, field: Tagging) -> Self { + self.tagging = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; + Ok(PutBucketTaggingInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + tagging, + }) + } + } + + /// A builder for [`PutBucketVersioningInput`] + #[derive(Default)] + pub struct PutBucketVersioningInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + mfa: Option, + + versioning_configuration: Option, + } + + impl PutBucketVersioningInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; + self + } + + pub fn set_versioning_configuration(&mut self, field: VersioningConfiguration) -> &mut Self { + self.versioning_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; + self + } + + #[must_use] + pub fn versioning_configuration(mut self, field: VersioningConfiguration) -> Self { + self.versioning_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let mfa = self.mfa; + let versioning_configuration = self + .versioning_configuration + .ok_or_else(|| BuildError::missing_field("versioning_configuration"))?; + Ok(PutBucketVersioningInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + mfa, + versioning_configuration, + }) + } + } + + /// A builder for [`PutBucketWebsiteInput`] + #[derive(Default)] + pub struct PutBucketWebsiteInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + website_configuration: Option, + } + + impl PutBucketWebsiteInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_website_configuration(&mut self, field: WebsiteConfiguration) -> &mut Self { + self.website_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn website_configuration(mut self, field: WebsiteConfiguration) -> Self { + self.website_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let website_configuration = self + .website_configuration + .ok_or_else(|| BuildError::missing_field("website_configuration"))?; + Ok(PutBucketWebsiteInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + website_configuration, + }) + } + } + + /// A builder for [`PutObjectInput`] + #[derive(Default)] + pub struct PutObjectInputBuilder { + acl: Option, + + body: Option, + + bucket: Option, + + bucket_key_enabled: Option, + + cache_control: Option, + + checksum_algorithm: Option, + + checksum_crc32: Option, + + checksum_crc32c: Option, + + checksum_crc64nvme: Option, + + checksum_sha1: Option, + + checksum_sha256: Option, + + content_disposition: Option, + + content_encoding: Option, + + content_language: Option, + + content_length: Option, + + content_md5: Option, + + content_type: Option, + + expected_bucket_owner: Option, + + expires: Option, + + grant_full_control: Option, + + grant_read: Option, + + grant_read_acp: Option, + + grant_write_acp: Option, + + if_match: Option, + + if_none_match: Option, + + key: Option, + + metadata: Option, + + object_lock_legal_hold_status: Option, + + object_lock_mode: Option, + + object_lock_retain_until_date: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + ssekms_encryption_context: Option, + + ssekms_key_id: Option, + + server_side_encryption: Option, + + storage_class: Option, + + tagging: Option, + + website_redirect_location: Option, + + write_offset_bytes: Option, + } + + impl PutObjectInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } + + pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } + + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } + + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } + + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } + + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } + + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } + + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } + + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } + + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } + + pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } + + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } + + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } + + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } + + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } + + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } + + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } + + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } + + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } + + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } + + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } + + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } + + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } + + pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; + self + } + + pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; + self + } + + pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { + self.write_offset_bytes = field; + self + } + + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } + + #[must_use] + pub fn body(mut self, field: Option) -> Self { + self.body = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } + + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } + + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } + + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } + + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } + + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } + + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } + + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } + + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } + + #[must_use] + pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } + + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } + + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } + + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } + + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } + + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } + + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } + + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } + + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } + + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } + + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } + + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } + + #[must_use] + pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; + self + } + + #[must_use] + pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; + self + } + + #[must_use] + pub fn write_offset_bytes(mut self, field: Option) -> Self { + self.write_offset_bytes = field; + self + } + + pub fn build(self) -> Result { + let acl = self.acl; + let body = self.body; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_algorithm = self.checksum_algorithm; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_length = self.content_length; + let content_md5 = self.content_md5; + let content_type = self.content_type; + let expected_bucket_owner = self.expected_bucket_owner; + let expires = self.expires; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write_acp = self.grant_write_acp; + let if_match = self.if_match; + let if_none_match = self.if_none_match; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let metadata = self.metadata; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let storage_class = self.storage_class; + let tagging = self.tagging; + let website_redirect_location = self.website_redirect_location; + let write_offset_bytes = self.write_offset_bytes; + Ok(PutObjectInput { + acl, + body, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_md5, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + if_match, + if_none_match, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + website_redirect_location, + write_offset_bytes, + }) + } + } + + /// A builder for [`PutObjectAclInput`] + #[derive(Default)] + pub struct PutObjectAclInputBuilder { + acl: Option, + + access_control_policy: Option, + + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + grant_full_control: Option, + + grant_read: Option, + + grant_read_acp: Option, + + grant_write: Option, + + grant_write_acp: Option, + + key: Option, + + request_payer: Option, + + version_id: Option, + } + + impl PutObjectAclInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } + + pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { + self.access_control_policy = field; + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } + + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } + + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } + + pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; + self + } + + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } + + #[must_use] + pub fn access_control_policy(mut self, field: Option) -> Self { + self.access_control_policy = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } + + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } + + #[must_use] + pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; + self + } + + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let acl = self.acl; + let access_control_policy = self.access_control_policy; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write = self.grant_write; + let grant_write_acp = self.grant_write_acp; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(PutObjectAclInput { + acl, + access_control_policy, + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + key, + request_payer, + version_id, + }) + } + } + + /// A builder for [`PutObjectLegalHoldInput`] + #[derive(Default)] + pub struct PutObjectLegalHoldInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + key: Option, + + legal_hold: Option, + + request_payer: Option, + + version_id: Option, + } + + impl PutObjectLegalHoldInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_legal_hold(&mut self, field: Option) -> &mut Self { + self.legal_hold = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn legal_hold(mut self, field: Option) -> Self { + self.legal_hold = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let legal_hold = self.legal_hold; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(PutObjectLegalHoldInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + legal_hold, + request_payer, + version_id, + }) + } + } + + /// A builder for [`PutObjectLockConfigurationInput`] + #[derive(Default)] + pub struct PutObjectLockConfigurationInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + object_lock_configuration: Option, + + request_payer: Option, + + token: Option, + } + + impl PutObjectLockConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_object_lock_configuration(&mut self, field: Option) -> &mut Self { + self.object_lock_configuration = field; + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_token(&mut self, field: Option) -> &mut Self { + self.token = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn object_lock_configuration(mut self, field: Option) -> Self { + self.object_lock_configuration = field; + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn token(mut self, field: Option) -> Self { + self.token = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let object_lock_configuration = self.object_lock_configuration; + let request_payer = self.request_payer; + let token = self.token; + Ok(PutObjectLockConfigurationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + object_lock_configuration, + request_payer, + token, + }) + } + } + + /// A builder for [`PutObjectRetentionInput`] + #[derive(Default)] + pub struct PutObjectRetentionInputBuilder { + bucket: Option, + + bypass_governance_retention: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + key: Option, + + request_payer: Option, + + retention: Option, + + version_id: Option, + } + + impl PutObjectRetentionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_retention(&mut self, field: Option) -> &mut Self { + self.retention = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn retention(mut self, field: Option) -> Self { + self.retention = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bypass_governance_retention = self.bypass_governance_retention; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let retention = self.retention; + let version_id = self.version_id; + Ok(PutObjectRetentionInput { + bucket, + bypass_governance_retention, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + request_payer, + retention, + version_id, + }) + } + } + + /// A builder for [`PutObjectTaggingInput`] + #[derive(Default)] + pub struct PutObjectTaggingInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + key: Option, + + request_payer: Option, + + tagging: Option, + + version_id: Option, + } + + impl PutObjectTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { + self.tagging = Some(field); + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn tagging(mut self, field: Tagging) -> Self { + self.tagging = Some(field); + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; + let version_id = self.version_id; + Ok(PutObjectTaggingInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + request_payer, + tagging, + version_id, + }) + } + } + + /// A builder for [`PutPublicAccessBlockInput`] + #[derive(Default)] + pub struct PutPublicAccessBlockInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + public_access_block_configuration: Option, + } + + impl PutPublicAccessBlockInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_public_access_block_configuration(&mut self, field: PublicAccessBlockConfiguration) -> &mut Self { + self.public_access_block_configuration = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn public_access_block_configuration(mut self, field: PublicAccessBlockConfiguration) -> Self { + self.public_access_block_configuration = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let public_access_block_configuration = self + .public_access_block_configuration + .ok_or_else(|| BuildError::missing_field("public_access_block_configuration"))?; + Ok(PutPublicAccessBlockInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + public_access_block_configuration, + }) + } + } + + /// A builder for [`RestoreObjectInput`] + #[derive(Default)] + pub struct RestoreObjectInputBuilder { + bucket: Option, + + checksum_algorithm: Option, + + expected_bucket_owner: Option, + + key: Option, + + request_payer: Option, + + restore_request: Option, + + version_id: Option, + } + + impl RestoreObjectInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_restore_request(&mut self, field: Option) -> &mut Self { + self.restore_request = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn restore_request(mut self, field: Option) -> Self { + self.restore_request = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let restore_request = self.restore_request; + let version_id = self.version_id; + Ok(RestoreObjectInput { + bucket, + checksum_algorithm, + expected_bucket_owner, + key, + request_payer, + restore_request, + version_id, + }) + } + } + + /// A builder for [`SelectObjectContentInput`] + #[derive(Default)] + pub struct SelectObjectContentInputBuilder { + bucket: Option, + + expected_bucket_owner: Option, + + key: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + request: Option, + } + + impl SelectObjectContentInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_request(&mut self, field: SelectObjectContentRequest) -> &mut Self { + self.request = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn request(mut self, field: SelectObjectContentRequest) -> Self { + self.request = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let request = self.request.ok_or_else(|| BuildError::missing_field("request"))?; + Ok(SelectObjectContentInput { + bucket, + expected_bucket_owner, + key, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + request, + }) + } + } + + /// A builder for [`UploadPartInput`] + #[derive(Default)] + pub struct UploadPartInputBuilder { + body: Option, + + bucket: Option, + + checksum_algorithm: Option, + + checksum_crc32: Option, + + checksum_crc32c: Option, + + checksum_crc64nvme: Option, + + checksum_sha1: Option, + + checksum_sha256: Option, + + content_length: Option, + + content_md5: Option, + + expected_bucket_owner: Option, + + key: Option, + + part_number: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + upload_id: Option, + } + + impl UploadPartInputBuilder { + pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; + self + } + + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } + + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } + + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } + + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } + + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } + + pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; + self + } + + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { + self.part_number = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } + + #[must_use] + pub fn body(mut self, field: Option) -> Self { + self.body = field; + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } + + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } + + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } + + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } + + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } + + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } + + #[must_use] + pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; + self + } + + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn part_number(mut self, field: PartNumber) -> Self { + self.part_number = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } + + pub fn build(self) -> Result { + let body = self.body; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let content_length = self.content_length; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(UploadPartInput { + body, + bucket, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_length, + content_md5, + expected_bucket_owner, + key, + part_number, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + } + + /// A builder for [`UploadPartCopyInput`] + #[derive(Default)] + pub struct UploadPartCopyInputBuilder { + bucket: Option, + + copy_source: Option, + + copy_source_if_match: Option, + + copy_source_if_modified_since: Option, + + copy_source_if_none_match: Option, + + copy_source_if_unmodified_since: Option, + + copy_source_range: Option, + + copy_source_sse_customer_algorithm: Option, + + copy_source_sse_customer_key: Option, + + copy_source_sse_customer_key_md5: Option, + + expected_bucket_owner: Option, + + expected_source_bucket_owner: Option, + + key: Option, + + part_number: Option, + + request_payer: Option, + + sse_customer_algorithm: Option, + + sse_customer_key: Option, + + sse_customer_key_md5: Option, + + upload_id: Option, + } + + impl UploadPartCopyInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + + pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { + self.copy_source = Some(field); + self + } + + pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_match = field; + self + } + + pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_modified_since = field; + self + } + + pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_none_match = field; + self + } + + pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_unmodified_since = field; + self + } + + pub fn set_copy_source_range(&mut self, field: Option) -> &mut Self { + self.copy_source_range = field; + self + } + + pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_algorithm = field; + self + } + + pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key = field; + self + } + + pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key_md5 = field; + self + } + + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + + pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_source_bucket_owner = field; + self + } + + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + + pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { + self.part_number = Some(field); + self + } + + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } + + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + + #[must_use] + pub fn copy_source(mut self, field: CopySource) -> Self { + self.copy_source = Some(field); + self + } + + #[must_use] + pub fn copy_source_if_match(mut self, field: Option) -> Self { + self.copy_source_if_match = field; + self + } + + #[must_use] + pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { + self.copy_source_if_modified_since = field; + self + } + + #[must_use] + pub fn copy_source_if_none_match(mut self, field: Option) -> Self { + self.copy_source_if_none_match = field; + self + } + + #[must_use] + pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { + self.copy_source_if_unmodified_since = field; + self + } + + #[must_use] + pub fn copy_source_range(mut self, field: Option) -> Self { + self.copy_source_range = field; + self + } + + #[must_use] + pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { + self.copy_source_sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key = field; + self + } + + #[must_use] + pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + + #[must_use] + pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { + self.expected_source_bucket_owner = field; + self + } + + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } + + #[must_use] + pub fn part_number(mut self, field: PartNumber) -> Self { + self.part_number = Some(field); + self + } + + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } + + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; + let copy_source_if_match = self.copy_source_if_match; + let copy_source_if_modified_since = self.copy_source_if_modified_since; + let copy_source_if_none_match = self.copy_source_if_none_match; + let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; + let copy_source_range = self.copy_source_range; + let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; + let copy_source_sse_customer_key = self.copy_source_sse_customer_key; + let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let expected_source_bucket_owner = self.expected_source_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(UploadPartCopyInput { + bucket, + copy_source, + copy_source_if_match, + copy_source_if_modified_since, + copy_source_if_none_match, + copy_source_if_unmodified_since, + copy_source_range, + copy_source_sse_customer_algorithm, + copy_source_sse_customer_key, + copy_source_sse_customer_key_md5, + expected_bucket_owner, + expected_source_bucket_owner, + key, + part_number, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + } + + /// A builder for [`WriteGetObjectResponseInput`] + #[derive(Default)] + pub struct WriteGetObjectResponseInputBuilder { + accept_ranges: Option, + + body: Option, + + bucket_key_enabled: Option, + + cache_control: Option, + + checksum_crc32: Option, + + checksum_crc32c: Option, + + checksum_crc64nvme: Option, + + checksum_sha1: Option, + + checksum_sha256: Option, + + content_disposition: Option, + + content_encoding: Option, + + content_language: Option, + + content_length: Option, + + content_range: Option, + + content_type: Option, + + delete_marker: Option, + + e_tag: Option, + + error_code: Option, + + error_message: Option, + + expiration: Option, + + expires: Option, + + last_modified: Option, + + metadata: Option, + + missing_meta: Option, + + object_lock_legal_hold_status: Option, + + object_lock_mode: Option, + + object_lock_retain_until_date: Option, + + parts_count: Option, + + replication_status: Option, + + request_charged: Option, + + request_route: Option, + + request_token: Option, + + restore: Option, + + sse_customer_algorithm: Option, + + sse_customer_key_md5: Option, + + ssekms_key_id: Option, + + server_side_encryption: Option, + + status_code: Option, + + storage_class: Option, + + tag_count: Option, + + version_id: Option, + } + + impl WriteGetObjectResponseInputBuilder { + pub fn set_accept_ranges(&mut self, field: Option) -> &mut Self { + self.accept_ranges = field; + self + } + + pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; + self + } + + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } + + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } + + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } + + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } + + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } + + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } + + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } + + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } + + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } + + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } + + pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; + self + } + + pub fn set_content_range(&mut self, field: Option) -> &mut Self { + self.content_range = field; + self + } + + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } + + pub fn set_delete_marker(&mut self, field: Option) -> &mut Self { + self.delete_marker = field; + self + } + + pub fn set_e_tag(&mut self, field: Option) -> &mut Self { + self.e_tag = field; + self + } + + pub fn set_error_code(&mut self, field: Option) -> &mut Self { + self.error_code = field; + self + } + + pub fn set_error_message(&mut self, field: Option) -> &mut Self { + self.error_message = field; + self + } + + pub fn set_expiration(&mut self, field: Option) -> &mut Self { + self.expiration = field; + self + } + + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } + + pub fn set_last_modified(&mut self, field: Option) -> &mut Self { + self.last_modified = field; + self + } + + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } + + pub fn set_missing_meta(&mut self, field: Option) -> &mut Self { + self.missing_meta = field; + self + } + + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } + + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } + + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } + + pub fn set_parts_count(&mut self, field: Option) -> &mut Self { + self.parts_count = field; + self + } + + pub fn set_replication_status(&mut self, field: Option) -> &mut Self { + self.replication_status = field; + self + } + + pub fn set_request_charged(&mut self, field: Option) -> &mut Self { + self.request_charged = field; + self + } + + pub fn set_request_route(&mut self, field: RequestRoute) -> &mut Self { + self.request_route = Some(field); + self + } + + pub fn set_request_token(&mut self, field: RequestToken) -> &mut Self { + self.request_token = Some(field); + self + } + + pub fn set_restore(&mut self, field: Option) -> &mut Self { + self.restore = field; + self + } + + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } + + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } + + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } + + pub fn set_status_code(&mut self, field: Option) -> &mut Self { + self.status_code = field; + self + } + + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } + + pub fn set_tag_count(&mut self, field: Option) -> &mut Self { + self.tag_count = field; + self + } + + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + + #[must_use] + pub fn accept_ranges(mut self, field: Option) -> Self { + self.accept_ranges = field; + self + } + + #[must_use] + pub fn body(mut self, field: Option) -> Self { + self.body = field; + self + } + + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } + + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } + + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } + + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } + + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } + + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } + + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } + + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } + + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } + + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } + + #[must_use] + pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; + self + } + + #[must_use] + pub fn content_range(mut self, field: Option) -> Self { + self.content_range = field; + self + } + + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } + + #[must_use] + pub fn delete_marker(mut self, field: Option) -> Self { + self.delete_marker = field; + self + } + + #[must_use] + pub fn e_tag(mut self, field: Option) -> Self { + self.e_tag = field; + self + } + + #[must_use] + pub fn error_code(mut self, field: Option) -> Self { + self.error_code = field; + self + } + + #[must_use] + pub fn error_message(mut self, field: Option) -> Self { + self.error_message = field; + self + } + + #[must_use] + pub fn expiration(mut self, field: Option) -> Self { + self.expiration = field; + self + } + + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } + + #[must_use] + pub fn last_modified(mut self, field: Option) -> Self { + self.last_modified = field; + self + } + + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } + + #[must_use] + pub fn missing_meta(mut self, field: Option) -> Self { + self.missing_meta = field; + self + } + + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } + + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } + + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } + + #[must_use] + pub fn parts_count(mut self, field: Option) -> Self { + self.parts_count = field; + self + } + + #[must_use] + pub fn replication_status(mut self, field: Option) -> Self { + self.replication_status = field; + self + } + + #[must_use] + pub fn request_charged(mut self, field: Option) -> Self { + self.request_charged = field; + self + } + + #[must_use] + pub fn request_route(mut self, field: RequestRoute) -> Self { + self.request_route = Some(field); + self + } + + #[must_use] + pub fn request_token(mut self, field: RequestToken) -> Self { + self.request_token = Some(field); + self + } + + #[must_use] + pub fn restore(mut self, field: Option) -> Self { + self.restore = field; + self + } + + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } + + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } + + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } + + #[must_use] + pub fn status_code(mut self, field: Option) -> Self { + self.status_code = field; + self + } + + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } + + #[must_use] + pub fn tag_count(mut self, field: Option) -> Self { + self.tag_count = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let accept_ranges = self.accept_ranges; + let body = self.body; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_length = self.content_length; + let content_range = self.content_range; + let content_type = self.content_type; + let delete_marker = self.delete_marker; + let e_tag = self.e_tag; + let error_code = self.error_code; + let error_message = self.error_message; + let expiration = self.expiration; + let expires = self.expires; + let last_modified = self.last_modified; + let metadata = self.metadata; + let missing_meta = self.missing_meta; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let parts_count = self.parts_count; + let replication_status = self.replication_status; + let request_charged = self.request_charged; + let request_route = self.request_route.ok_or_else(|| BuildError::missing_field("request_route"))?; + let request_token = self.request_token.ok_or_else(|| BuildError::missing_field("request_token"))?; + let restore = self.restore; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let status_code = self.status_code; + let storage_class = self.storage_class; + let tag_count = self.tag_count; + let version_id = self.version_id; + Ok(WriteGetObjectResponseInput { + accept_ranges, + body, + bucket_key_enabled, + cache_control, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_range, + content_type, + delete_marker, + e_tag, + error_code, + error_message, + expiration, + expires, + last_modified, + metadata, + missing_meta, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + parts_count, + replication_status, + request_charged, + request_route, + request_token, + restore, + sse_customer_algorithm, + sse_customer_key_md5, + ssekms_key_id, + server_side_encryption, + status_code, + storage_class, + tag_count, + version_id, + }) + } + } } +pub trait DtoExt { + /// Modifies all empty string fields from `Some("")` to `None` + fn ignore_empty_strings(&mut self); } +impl DtoExt for AbortIncompleteMultipartUpload { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for ListBucketsOutput { +impl DtoExt for AbortMultipartUploadInput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } -impl DtoExt for ListDirectoryBucketsInput { +impl DtoExt for AbortMultipartUploadOutput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } -impl DtoExt for ListDirectoryBucketsOutput { +impl DtoExt for AccelerateConfiguration { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -} + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } -impl DtoExt for ListMultipartUploadsInput { +impl DtoExt for AccessControlPolicy { fn ignore_empty_strings(&mut self) { -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.key_marker.as_deref() == Some("") { - self.key_marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.upload_id_marker.as_deref() == Some("") { - self.upload_id_marker = None; -} + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + } } +impl DtoExt for AccessControlTranslation { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for ListMultipartUploadsOutput { +impl DtoExt for AnalyticsAndOperator { fn ignore_empty_strings(&mut self) { -if self.bucket.as_deref() == Some("") { - self.bucket = None; -} -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.key_marker.as_deref() == Some("") { - self.key_marker = None; -} -if self.next_key_marker.as_deref() == Some("") { - self.next_key_marker = None; -} -if self.next_upload_id_marker.as_deref() == Some("") { - self.next_upload_id_marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.upload_id_marker.as_deref() == Some("") { - self.upload_id_marker = None; -} -} + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } -impl DtoExt for ListObjectVersionsInput { +impl DtoExt for AnalyticsConfiguration { fn ignore_empty_strings(&mut self) { -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.key_marker.as_deref() == Some("") { - self.key_marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id_marker.as_deref() == Some("") { - self.version_id_marker = None; -} -} + self.storage_class_analysis.ignore_empty_strings(); + } } -impl DtoExt for ListObjectVersionsOutput { +impl DtoExt for AnalyticsExportDestination { fn ignore_empty_strings(&mut self) { -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.key_marker.as_deref() == Some("") { - self.key_marker = None; -} -if self.name.as_deref() == Some("") { - self.name = None; -} -if self.next_key_marker.as_deref() == Some("") { - self.next_key_marker = None; -} -if self.next_version_id_marker.as_deref() == Some("") { - self.next_version_id_marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.version_id_marker.as_deref() == Some("") { - self.version_id_marker = None; -} -} + self.s3_bucket_destination.ignore_empty_strings(); + } } -impl DtoExt for ListObjectsInput { +impl DtoExt for AnalyticsS3BucketDestination { fn ignore_empty_strings(&mut self) { -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; + if self.bucket_account_id.as_deref() == Some("") { + self.bucket_account_id = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; +impl DtoExt for AssumeRoleOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.assumed_role_user { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.credentials { + val.ignore_empty_strings(); + } + if self.source_identity.as_deref() == Some("") { + self.source_identity = None; + } + } } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; +impl DtoExt for AssumedRoleUser { + fn ignore_empty_strings(&mut self) {} } -if self.marker.as_deref() == Some("") { - self.marker = None; +impl DtoExt for Bucket { + fn ignore_empty_strings(&mut self) { + if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; + } + if self.name.as_deref() == Some("") { + self.name = None; + } + } } -if self.prefix.as_deref() == Some("") { - self.prefix = None; +impl DtoExt for BucketInfo { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.data_redundancy + && val.as_str() == "" + { + self.data_redundancy = None; + } + if let Some(ref val) = self.type_ + && val.as_str() == "" + { + self.type_ = None; + } + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; +impl DtoExt for BucketLifecycleConfiguration { + fn ignore_empty_strings(&mut self) {} } +impl DtoExt for BucketLoggingStatus { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.logging_enabled { + val.ignore_empty_strings(); + } + } } +impl DtoExt for CORSConfiguration { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for ListObjectsOutput { +impl DtoExt for CORSRule { fn ignore_empty_strings(&mut self) { -if self.name.as_deref() == Some("") { - self.name = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; + if self.id.as_deref() == Some("") { + self.id = None; + } + } } -if self.marker.as_deref() == Some("") { - self.marker = None; +impl DtoExt for CSVInput { + fn ignore_empty_strings(&mut self) { + if self.comments.as_deref() == Some("") { + self.comments = None; + } + if self.field_delimiter.as_deref() == Some("") { + self.field_delimiter = None; + } + if let Some(ref val) = self.file_header_info + && val.as_str() == "" + { + self.file_header_info = None; + } + if self.quote_character.as_deref() == Some("") { + self.quote_character = None; + } + if self.quote_escape_character.as_deref() == Some("") { + self.quote_escape_character = None; + } + if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; + } + } } -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; +impl DtoExt for CSVOutput { + fn ignore_empty_strings(&mut self) { + if self.field_delimiter.as_deref() == Some("") { + self.field_delimiter = None; + } + if self.quote_character.as_deref() == Some("") { + self.quote_character = None; + } + if self.quote_escape_character.as_deref() == Some("") { + self.quote_escape_character = None; + } + if let Some(ref val) = self.quote_fields + && val.as_str() == "" + { + self.quote_fields = None; + } + if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; + } + } } -if self.next_marker.as_deref() == Some("") { - self.next_marker = None; +impl DtoExt for Checksum { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + } } -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; +impl DtoExt for CommonPrefix { + fn ignore_empty_strings(&mut self) { + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; +impl DtoExt for CompleteMultipartUploadInput { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref mut val) = self.multipart_upload { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + } } +impl DtoExt for CompleteMultipartUploadOutput { + fn ignore_empty_strings(&mut self) { + if self.bucket.as_deref() == Some("") { + self.bucket = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if self.location.as_deref() == Some("") { + self.location = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for CompletedMultipartUpload { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for ListObjectsV2Input { +impl DtoExt for CompletedPart { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + } } -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; +impl DtoExt for Condition { + fn ignore_empty_strings(&mut self) { + if self.http_error_code_returned_equals.as_deref() == Some("") { + self.http_error_code_returned_equals = None; + } + if self.key_prefix_equals.as_deref() == Some("") { + self.key_prefix_equals = None; + } + } } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; +impl DtoExt for CopyObjectInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { + self.copy_source_sse_customer_algorithm = None; + } + if self.copy_source_sse_customer_key.as_deref() == Some("") { + self.copy_source_sse_customer_key = None; + } + if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { + self.copy_source_sse_customer_key_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.expected_source_bucket_owner.as_deref() == Some("") { + self.expected_source_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.metadata_directive + && val.as_str() == "" + { + self.metadata_directive = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.tagging.as_deref() == Some("") { + self.tagging = None; + } + if let Some(ref val) = self.tagging_directive + && val.as_str() == "" + { + self.tagging_directive = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } -if self.prefix.as_deref() == Some("") { - self.prefix = None; +impl DtoExt for CopyObjectOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.copy_object_result { + val.ignore_empty_strings(); + } + if self.copy_source_version_id.as_deref() == Some("") { + self.copy_source_version_id = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; +impl DtoExt for CopyObjectResult { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + } } -if self.start_after.as_deref() == Some("") { - self.start_after = None; +impl DtoExt for CopyPartResult { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + } } +impl DtoExt for CreateBucketConfiguration { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.bucket { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.location { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.location_constraint + && val.as_str() == "" + { + self.location_constraint = None; + } + } } +impl DtoExt for CreateBucketInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if let Some(ref mut val) = self.create_bucket_configuration { + val.ignore_empty_strings(); + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write.as_deref() == Some("") { + self.grant_write = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.object_ownership + && val.as_str() == "" + { + self.object_ownership = None; + } + } } -impl DtoExt for ListObjectsV2Output { +impl DtoExt for CreateBucketMetadataTableConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.name.as_deref() == Some("") { - self.name = None; + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.metadata_table_configuration.ignore_empty_strings(); + } } -if self.prefix.as_deref() == Some("") { - self.prefix = None; +impl DtoExt for CreateBucketOutput { + fn ignore_empty_strings(&mut self) { + if self.location.as_deref() == Some("") { + self.location = None; + } + } } -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; +impl DtoExt for CreateMultipartUploadInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.tagging.as_deref() == Some("") { + self.tagging = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; +impl DtoExt for CreateMultipartUploadOutput { + fn ignore_empty_strings(&mut self) { + if self.abort_rule_id.as_deref() == Some("") { + self.abort_rule_id = None; + } + if self.bucket.as_deref() == Some("") { + self.bucket = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.upload_id.as_deref() == Some("") { + self.upload_id = None; + } + } } -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; +impl DtoExt for CreateSessionInput { + fn ignore_empty_strings(&mut self) { + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.session_mode + && val.as_str() == "" + { + self.session_mode = None; + } + } } -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; +impl DtoExt for CreateSessionOutput { + fn ignore_empty_strings(&mut self) { + self.credentials.ignore_empty_strings(); + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + } } -if self.start_after.as_deref() == Some("") { - self.start_after = None; +impl DtoExt for Credentials { + fn ignore_empty_strings(&mut self) {} } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; +impl DtoExt for DefaultRetention { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.mode + && val.as_str() == "" + { + self.mode = None; + } + } } +impl DtoExt for Delete { + fn ignore_empty_strings(&mut self) {} } +impl DtoExt for DeleteBucketAnalyticsConfigurationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -impl DtoExt for ListPartsInput { +impl DtoExt for DeleteBucketCorsInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; +impl DtoExt for DeleteBucketEncryptionInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; +impl DtoExt for DeleteBucketInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; +impl DtoExt for DeleteBucketIntelligentTieringConfigurationInput { + fn ignore_empty_strings(&mut self) {} } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; +impl DtoExt for DeleteBucketInventoryConfigurationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for DeleteBucketLifecycleInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for DeleteBucketMetadataTableConfigurationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -impl DtoExt for ListPartsOutput { +impl DtoExt for DeleteBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.abort_rule_id.as_deref() == Some("") { - self.abort_rule_id = None; + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if self.bucket.as_deref() == Some("") { - self.bucket = None; +impl DtoExt for DeleteBucketOwnershipControlsInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; +impl DtoExt for DeleteBucketPolicyInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; +impl DtoExt for DeleteBucketReplicationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref mut val) = self.initiator { -val.ignore_empty_strings(); +impl DtoExt for DeleteBucketTaggingInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if self.key.as_deref() == Some("") { - self.key = None; +impl DtoExt for DeleteBucketWebsiteInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); +impl DtoExt for DeleteMarkerEntry { + fn ignore_empty_strings(&mut self) { + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; +impl DtoExt for DeleteMarkerReplication { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; +impl DtoExt for DeleteObjectInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.mfa.as_deref() == Some("") { + self.mfa = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if self.upload_id.as_deref() == Some("") { - self.upload_id = None; +impl DtoExt for DeleteObjectOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for DeleteObjectTaggingInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for DeleteObjectTaggingOutput { + fn ignore_empty_strings(&mut self) { + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -impl DtoExt for LocationInfo { +impl DtoExt for DeleteObjectsInput { fn ignore_empty_strings(&mut self) { -if self.name.as_deref() == Some("") { - self.name = None; + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + self.delete.ignore_empty_strings(); + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.mfa.as_deref() == Some("") { + self.mfa = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } -if let Some(ref val) = self.type_ - && val.as_str() == "" { - self.type_ = None; +impl DtoExt for DeleteObjectsOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } +impl DtoExt for DeletePublicAccessBlockInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for DeletedObject { + fn ignore_empty_strings(&mut self) { + if self.delete_marker_version_id.as_deref() == Some("") { + self.delete_marker_version_id = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -impl DtoExt for LoggingEnabled { +impl DtoExt for Destination { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.target_object_key_format { -val.ignore_empty_strings(); + if let Some(ref mut val) = self.access_control_translation { + val.ignore_empty_strings(); + } + if self.account.as_deref() == Some("") { + self.account = None; + } + if let Some(ref mut val) = self.encryption_configuration { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.metrics { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.replication_time { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } +impl DtoExt for Encryption { + fn ignore_empty_strings(&mut self) { + if self.kms_context.as_deref() == Some("") { + self.kms_context = None; + } + if self.kms_key_id.as_deref() == Some("") { + self.kms_key_id = None; + } + } } +impl DtoExt for EncryptionConfiguration { + fn ignore_empty_strings(&mut self) { + if self.replica_kms_key_id.as_deref() == Some("") { + self.replica_kms_key_id = None; + } + } } -impl DtoExt for MetadataEntry { +impl DtoExt for Error { fn ignore_empty_strings(&mut self) { -if self.name.as_deref() == Some("") { - self.name = None; + if self.code.as_deref() == Some("") { + self.code = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if self.message.as_deref() == Some("") { + self.message = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if self.value.as_deref() == Some("") { - self.value = None; +impl DtoExt for ErrorDetails { + fn ignore_empty_strings(&mut self) { + if self.error_code.as_deref() == Some("") { + self.error_code = None; + } + if self.error_message.as_deref() == Some("") { + self.error_message = None; + } + } } +impl DtoExt for ErrorDocument { + fn ignore_empty_strings(&mut self) {} } +impl DtoExt for ExistingObjectReplication { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for MetadataTableConfiguration { +impl DtoExt for FilterRule { fn ignore_empty_strings(&mut self) { -self.s3_tables_destination.ignore_empty_strings(); -} + if let Some(ref val) = self.name + && val.as_str() == "" + { + self.name = None; + } + if self.value.as_deref() == Some("") { + self.value = None; + } + } } -impl DtoExt for MetadataTableConfigurationResult { +impl DtoExt for GetBucketAccelerateConfigurationInput { fn ignore_empty_strings(&mut self) { -self.s3_tables_destination_result.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } -impl DtoExt for Metrics { +impl DtoExt for GetBucketAccelerateConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.event_threshold { -val.ignore_empty_strings(); + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } +impl DtoExt for GetBucketAclInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketAclOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + } } -impl DtoExt for MetricsAndOperator { +impl DtoExt for GetBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.access_point_arn.as_deref() == Some("") { - self.access_point_arn = None; + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if self.prefix.as_deref() == Some("") { - self.prefix = None; +impl DtoExt for GetBucketAnalyticsConfigurationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.analytics_configuration { + val.ignore_empty_strings(); + } + } } +impl DtoExt for GetBucketCorsInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketCorsOutput { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for MetricsConfiguration { +impl DtoExt for GetBucketEncryptionInput { fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -} -impl DtoExt for MultipartUpload { +impl DtoExt for GetBucketEncryptionOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; + if let Some(ref mut val) = self.server_side_encryption_configuration { + val.ignore_empty_strings(); + } + } } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; +impl DtoExt for GetBucketIntelligentTieringConfigurationInput { + fn ignore_empty_strings(&mut self) {} } -if let Some(ref mut val) = self.initiator { -val.ignore_empty_strings(); +impl DtoExt for GetBucketIntelligentTieringConfigurationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.intelligent_tiering_configuration { + val.ignore_empty_strings(); + } + } } -if self.key.as_deref() == Some("") { - self.key = None; +impl DtoExt for GetBucketInventoryConfigurationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); +impl DtoExt for GetBucketInventoryConfigurationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.inventory_configuration { + val.ignore_empty_strings(); + } + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; +impl DtoExt for GetBucketLifecycleConfigurationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if self.upload_id.as_deref() == Some("") { - self.upload_id = None; +impl DtoExt for GetBucketLifecycleConfigurationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" + { + self.transition_default_minimum_object_size = None; + } + } } +impl DtoExt for GetBucketLocationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketLocationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.location_constraint + && val.as_str() == "" + { + self.location_constraint = None; + } + } } -impl DtoExt for NoncurrentVersionExpiration { +impl DtoExt for GetBucketLoggingInput { fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketLoggingOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.logging_enabled { + val.ignore_empty_strings(); + } + } } -impl DtoExt for NoncurrentVersionTransition { +impl DtoExt for GetBucketMetadataTableConfigurationInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketMetadataTableConfigurationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.get_bucket_metadata_table_configuration_result { + val.ignore_empty_strings(); + } + } } +impl DtoExt for GetBucketMetadataTableConfigurationResult { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.error { + val.ignore_empty_strings(); + } + self.metadata_table_configuration_result.ignore_empty_strings(); + } } -impl DtoExt for NotificationConfiguration { +impl DtoExt for GetBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketMetricsConfigurationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.metrics_configuration { + val.ignore_empty_strings(); + } + } } -impl DtoExt for NotificationConfigurationFilter { +impl DtoExt for GetBucketNotificationConfigurationInput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.key { -val.ignore_empty_strings(); + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } +} +impl DtoExt for GetBucketNotificationConfigurationOutput { + fn ignore_empty_strings(&mut self) {} } +impl DtoExt for GetBucketOwnershipControlsInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketOwnershipControlsOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.ownership_controls { + val.ignore_empty_strings(); + } + } } -impl DtoExt for Object { +impl DtoExt for GetBucketPolicyInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if self.key.as_deref() == Some("") { - self.key = None; +impl DtoExt for GetBucketPolicyOutput { + fn ignore_empty_strings(&mut self) { + if self.policy.as_deref() == Some("") { + self.policy = None; + } + } } -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); +impl DtoExt for GetBucketPolicyStatusInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref mut val) = self.restore_status { -val.ignore_empty_strings(); +impl DtoExt for GetBucketPolicyStatusOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.policy_status { + val.ignore_empty_strings(); + } + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; +impl DtoExt for GetBucketReplicationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketReplicationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.replication_configuration { + val.ignore_empty_strings(); + } + } } +impl DtoExt for GetBucketRequestPaymentInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -impl DtoExt for ObjectIdentifier { +impl DtoExt for GetBucketRequestPaymentOutput { fn ignore_empty_strings(&mut self) { -if self.version_id.as_deref() == Some("") { - self.version_id = None; + if let Some(ref val) = self.payer + && val.as_str() == "" + { + self.payer = None; + } + } } +impl DtoExt for GetBucketTaggingInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketTaggingOutput { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for ObjectLockConfiguration { +impl DtoExt for GetBucketVersioningInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.object_lock_enabled - && val.as_str() == "" { - self.object_lock_enabled = None; + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref mut val) = self.rule { -val.ignore_empty_strings(); +impl DtoExt for GetBucketVersioningOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.mfa_delete + && val.as_str() == "" + { + self.mfa_delete = None; + } + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } +impl DtoExt for GetBucketWebsiteInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for GetBucketWebsiteOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.error_document { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.index_document { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.redirect_all_requests_to { + val.ignore_empty_strings(); + } + } } -impl DtoExt for ObjectLockLegalHold { +impl DtoExt for GetObjectAclInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for GetObjectAclOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } +impl DtoExt for GetObjectAttributesInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -impl DtoExt for ObjectLockRetention { +impl DtoExt for GetObjectAttributesOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.mode - && val.as_str() == "" { - self.mode = None; + if let Some(ref mut val) = self.checksum { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.object_parts { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for GetObjectAttributesParts { + fn ignore_empty_strings(&mut self) {} } +impl DtoExt for GetObjectInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.checksum_mode + && val.as_str() == "" + { + self.checksum_mode = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.response_cache_control.as_deref() == Some("") { + self.response_cache_control = None; + } + if self.response_content_disposition.as_deref() == Some("") { + self.response_content_disposition = None; + } + if self.response_content_encoding.as_deref() == Some("") { + self.response_content_encoding = None; + } + if self.response_content_language.as_deref() == Some("") { + self.response_content_language = None; + } + if self.response_content_type.as_deref() == Some("") { + self.response_content_type = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -impl DtoExt for ObjectLockRule { +impl DtoExt for GetObjectLegalHoldInput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.default_retention { -val.ignore_empty_strings(); + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for GetObjectLegalHoldOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.legal_hold { + val.ignore_empty_strings(); + } + } } +impl DtoExt for GetObjectLockConfigurationInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -impl DtoExt for ObjectPart { +impl DtoExt for GetObjectLockConfigurationOutput { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + if let Some(ref mut val) = self.object_lock_configuration { + val.ignore_empty_strings(); + } + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; +impl DtoExt for GetObjectOutput { + fn ignore_empty_strings(&mut self) { + if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_range.as_deref() == Some("") { + self.content_range = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.replication_status + && val.as_str() == "" + { + self.replication_status = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.restore.as_deref() == Some("") { + self.restore = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; +impl DtoExt for GetObjectRetentionInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; +impl DtoExt for GetObjectRetentionOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.retention { + val.ignore_empty_strings(); + } + } } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; +impl DtoExt for GetObjectTaggingInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for GetObjectTaggingOutput { + fn ignore_empty_strings(&mut self) { + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for GetObjectTorrentInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } -impl DtoExt for ObjectVersion { +impl DtoExt for GetObjectTorrentOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } -if self.key.as_deref() == Some("") { - self.key = None; +impl DtoExt for GetPublicAccessBlockInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); +impl DtoExt for GetPublicAccessBlockOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.public_access_block_configuration { + val.ignore_empty_strings(); + } + } } -if let Some(ref mut val) = self.restore_status { -val.ignore_empty_strings(); +impl DtoExt for GlacierJobParameters { + fn ignore_empty_strings(&mut self) {} } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; +impl DtoExt for Grant { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.grantee { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.permission + && val.as_str() == "" + { + self.permission = None; + } + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; +impl DtoExt for Grantee { + fn ignore_empty_strings(&mut self) { + if self.display_name.as_deref() == Some("") { + self.display_name = None; + } + if self.email_address.as_deref() == Some("") { + self.email_address = None; + } + if self.id.as_deref() == Some("") { + self.id = None; + } + if self.uri.as_deref() == Some("") { + self.uri = None; + } + } } +impl DtoExt for HeadBucketInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for HeadBucketOutput { + fn ignore_empty_strings(&mut self) { + if self.bucket_location_name.as_deref() == Some("") { + self.bucket_location_name = None; + } + if let Some(ref val) = self.bucket_location_type + && val.as_str() == "" + { + self.bucket_location_type = None; + } + if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; + } + } } -impl DtoExt for OutputLocation { +impl DtoExt for HeadObjectInput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.s3 { -val.ignore_empty_strings(); + if let Some(ref val) = self.checksum_mode + && val.as_str() == "" + { + self.checksum_mode = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.response_cache_control.as_deref() == Some("") { + self.response_cache_control = None; + } + if self.response_content_disposition.as_deref() == Some("") { + self.response_content_disposition = None; + } + if self.response_content_encoding.as_deref() == Some("") { + self.response_content_encoding = None; + } + if self.response_content_language.as_deref() == Some("") { + self.response_content_language = None; + } + if self.response_content_type.as_deref() == Some("") { + self.response_content_type = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for HeadObjectOutput { + fn ignore_empty_strings(&mut self) { + if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; + } + if let Some(ref val) = self.archive_status + && val.as_str() == "" + { + self.archive_status = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_range.as_deref() == Some("") { + self.content_range = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.replication_status + && val.as_str() == "" + { + self.replication_status = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.restore.as_deref() == Some("") { + self.restore = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } +impl DtoExt for IndexDocument { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for OutputSerialization { +impl DtoExt for Initiator { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.csv { -val.ignore_empty_strings(); + if self.display_name.as_deref() == Some("") { + self.display_name = None; + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } -if let Some(ref mut val) = self.json { -val.ignore_empty_strings(); +impl DtoExt for InputSerialization { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.csv { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.compression_type + && val.as_str() == "" + { + self.compression_type = None; + } + if let Some(ref mut val) = self.json { + val.ignore_empty_strings(); + } + } } +impl DtoExt for IntelligentTieringAndOperator { + fn ignore_empty_strings(&mut self) { + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } +impl DtoExt for IntelligentTieringConfiguration { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + } } -impl DtoExt for Owner { +impl DtoExt for IntelligentTieringFilter { fn ignore_empty_strings(&mut self) { -if self.display_name.as_deref() == Some("") { - self.display_name = None; + if let Some(ref mut val) = self.and { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref mut val) = self.tag { + val.ignore_empty_strings(); + } + } } -if self.id.as_deref() == Some("") { - self.id = None; +impl DtoExt for InvalidObjectState { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.access_tier + && val.as_str() == "" + { + self.access_tier = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } +impl DtoExt for InventoryConfiguration { + fn ignore_empty_strings(&mut self) { + self.destination.ignore_empty_strings(); + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + self.schedule.ignore_empty_strings(); + } } +impl DtoExt for InventoryDestination { + fn ignore_empty_strings(&mut self) { + self.s3_bucket_destination.ignore_empty_strings(); + } } -impl DtoExt for OwnershipControls { +impl DtoExt for InventoryEncryption { fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.ssekms { + val.ignore_empty_strings(); + } + } } +impl DtoExt for InventoryFilter { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for OwnershipControlsRule { +impl DtoExt for InventoryS3BucketDestination { fn ignore_empty_strings(&mut self) { + if self.account_id.as_deref() == Some("") { + self.account_id = None; + } + if let Some(ref mut val) = self.encryption { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } +impl DtoExt for InventorySchedule { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for Part { +impl DtoExt for JSONInput { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + if let Some(ref val) = self.type_ + && val.as_str() == "" + { + self.type_ = None; + } + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; +impl DtoExt for JSONOutput { + fn ignore_empty_strings(&mut self) { + if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; + } + } } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; +impl DtoExt for LambdaFunctionConfiguration { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; +impl DtoExt for LifecycleExpiration { + fn ignore_empty_strings(&mut self) {} } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; +impl DtoExt for LifecycleRule { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.abort_incomplete_multipart_upload { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.expiration { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + if let Some(ref mut val) = self.noncurrent_version_expiration { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } +impl DtoExt for LifecycleRuleAndOperator { + fn ignore_empty_strings(&mut self) { + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } +impl DtoExt for LifecycleRuleFilter { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.and { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref mut val) = self.tag { + val.ignore_empty_strings(); + } + } } -impl DtoExt for PartitionedPrefix { +impl DtoExt for ListBucketAnalyticsConfigurationsInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.partition_date_source - && val.as_str() == "" { - self.partition_date_source = None; + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } +impl DtoExt for ListBucketAnalyticsConfigurationsOutput { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + } } +impl DtoExt for ListBucketIntelligentTieringConfigurationsInput { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + } } -impl DtoExt for PolicyStatus { +impl DtoExt for ListBucketIntelligentTieringConfigurationsOutput { fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + } } +impl DtoExt for ListBucketInventoryConfigurationsInput { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -impl DtoExt for PostObjectInput { +impl DtoExt for ListBucketInventoryConfigurationsOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + } } -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; +impl DtoExt for ListBucketMetricsConfigurationsInput { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; +impl DtoExt for ListBucketMetricsConfigurationsOutput { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + } } -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; +impl DtoExt for ListBucketsInput { + fn ignore_empty_strings(&mut self) { + if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; + } + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; +impl DtoExt for ListBucketsOutput { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; +impl DtoExt for ListDirectoryBucketsInput { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; +impl DtoExt for ListDirectoryBucketsOutput { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + } } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; +impl DtoExt for ListMultipartUploadsInput { + fn ignore_empty_strings(&mut self) { + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.key_marker.as_deref() == Some("") { + self.key_marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.upload_id_marker.as_deref() == Some("") { + self.upload_id_marker = None; + } + } } -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; +impl DtoExt for ListMultipartUploadsOutput { + fn ignore_empty_strings(&mut self) { + if self.bucket.as_deref() == Some("") { + self.bucket = None; + } + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.key_marker.as_deref() == Some("") { + self.key_marker = None; + } + if self.next_key_marker.as_deref() == Some("") { + self.next_key_marker = None; + } + if self.next_upload_id_marker.as_deref() == Some("") { + self.next_upload_id_marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.upload_id_marker.as_deref() == Some("") { + self.upload_id_marker = None; + } + } } -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; +impl DtoExt for ListObjectVersionsInput { + fn ignore_empty_strings(&mut self) { + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.key_marker.as_deref() == Some("") { + self.key_marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id_marker.as_deref() == Some("") { + self.version_id_marker = None; + } + } } -if self.content_language.as_deref() == Some("") { - self.content_language = None; +impl DtoExt for ListObjectVersionsOutput { + fn ignore_empty_strings(&mut self) { + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.key_marker.as_deref() == Some("") { + self.key_marker = None; + } + if self.name.as_deref() == Some("") { + self.name = None; + } + if self.next_key_marker.as_deref() == Some("") { + self.next_key_marker = None; + } + if self.next_version_id_marker.as_deref() == Some("") { + self.next_version_id_marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.version_id_marker.as_deref() == Some("") { + self.version_id_marker = None; + } + } } -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; +impl DtoExt for ListObjectsInput { + fn ignore_empty_strings(&mut self) { + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.marker.as_deref() == Some("") { + self.marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; +impl DtoExt for ListObjectsOutput { + fn ignore_empty_strings(&mut self) { + if self.name.as_deref() == Some("") { + self.name = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if self.marker.as_deref() == Some("") { + self.marker = None; + } + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if self.next_marker.as_deref() == Some("") { + self.next_marker = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; +impl DtoExt for ListObjectsV2Input { + fn ignore_empty_strings(&mut self) { + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.start_after.as_deref() == Some("") { + self.start_after = None; + } + } } -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; +impl DtoExt for ListObjectsV2Output { + fn ignore_empty_strings(&mut self) { + if self.name.as_deref() == Some("") { + self.name = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.start_after.as_deref() == Some("") { + self.start_after = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; +impl DtoExt for ListPartsInput { + fn ignore_empty_strings(&mut self) { + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + } } -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; +impl DtoExt for ListPartsOutput { + fn ignore_empty_strings(&mut self) { + if self.abort_rule_id.as_deref() == Some("") { + self.abort_rule_id = None; + } + if self.bucket.as_deref() == Some("") { + self.bucket = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if let Some(ref mut val) = self.initiator { + val.ignore_empty_strings(); + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.upload_id.as_deref() == Some("") { + self.upload_id = None; + } + } } -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; +impl DtoExt for LocationInfo { + fn ignore_empty_strings(&mut self) { + if self.name.as_deref() == Some("") { + self.name = None; + } + if let Some(ref val) = self.type_ + && val.as_str() == "" + { + self.type_ = None; + } + } } -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; +impl DtoExt for LoggingEnabled { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.target_object_key_format { + val.ignore_empty_strings(); + } + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; +impl DtoExt for MetadataEntry { + fn ignore_empty_strings(&mut self) { + if self.name.as_deref() == Some("") { + self.name = None; + } + if self.value.as_deref() == Some("") { + self.value = None; + } + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; +impl DtoExt for MetadataTableConfiguration { + fn ignore_empty_strings(&mut self) { + self.s3_tables_destination.ignore_empty_strings(); + } } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; +impl DtoExt for MetadataTableConfigurationResult { + fn ignore_empty_strings(&mut self) { + self.s3_tables_destination_result.ignore_empty_strings(); + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; +impl DtoExt for Metrics { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.event_threshold { + val.ignore_empty_strings(); + } + } } -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; +impl DtoExt for MetricsAndOperator { + fn ignore_empty_strings(&mut self) { + if self.access_point_arn.as_deref() == Some("") { + self.access_point_arn = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; +impl DtoExt for MetricsConfiguration { + fn ignore_empty_strings(&mut self) {} } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; +impl DtoExt for MultipartUpload { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if let Some(ref mut val) = self.initiator { + val.ignore_empty_strings(); + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.upload_id.as_deref() == Some("") { + self.upload_id = None; + } + } } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; +impl DtoExt for NoncurrentVersionExpiration { + fn ignore_empty_strings(&mut self) {} } -if self.tagging.as_deref() == Some("") { - self.tagging = None; +impl DtoExt for NoncurrentVersionTransition { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; +impl DtoExt for NotificationConfiguration { + fn ignore_empty_strings(&mut self) {} } +impl DtoExt for NotificationConfigurationFilter { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.key { + val.ignore_empty_strings(); + } + } } +impl DtoExt for Object { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.restore_status { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } -impl DtoExt for PostObjectOutput { +impl DtoExt for ObjectIdentifier { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; +impl DtoExt for ObjectLockConfiguration { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.object_lock_enabled + && val.as_str() == "" + { + self.object_lock_enabled = None; + } + if let Some(ref mut val) = self.rule { + val.ignore_empty_strings(); + } + } } -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; +impl DtoExt for ObjectLockLegalHold { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; +impl DtoExt for ObjectLockRetention { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.mode + && val.as_str() == "" + { + self.mode = None; + } + } } -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; +impl DtoExt for ObjectLockRule { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.default_retention { + val.ignore_empty_strings(); + } + } } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; +impl DtoExt for ObjectPart { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + } } -if self.expiration.as_deref() == Some("") { - self.expiration = None; +impl DtoExt for ObjectVersion { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.restore_status { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; +impl DtoExt for OutputLocation { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.s3 { + val.ignore_empty_strings(); + } + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; +impl DtoExt for OutputSerialization { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.csv { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.json { + val.ignore_empty_strings(); + } + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; +impl DtoExt for Owner { + fn ignore_empty_strings(&mut self) { + if self.display_name.as_deref() == Some("") { + self.display_name = None; + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; +impl DtoExt for OwnershipControls { + fn ignore_empty_strings(&mut self) {} } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; +impl DtoExt for OwnershipControlsRule { + fn ignore_empty_strings(&mut self) {} } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; +impl DtoExt for Part { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; +impl DtoExt for PartitionedPrefix { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.partition_date_source + && val.as_str() == "" + { + self.partition_date_source = None; + } + } } +impl DtoExt for PolicyStatus { + fn ignore_empty_strings(&mut self) {} } +impl DtoExt for PostObjectInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.tagging.as_deref() == Some("") { + self.tagging = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } -impl DtoExt for Progress { +impl DtoExt for PostObjectOutput { fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for Progress { + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ProgressEvent { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.details { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.details { + val.ignore_empty_strings(); + } + } } impl DtoExt for PublicAccessBlockConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for PutBucketAccelerateConfigurationInput { fn ignore_empty_strings(&mut self) { -self.accelerate_configuration.ignore_empty_strings(); -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + self.accelerate_configuration.ignore_empty_strings(); + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketAclInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if let Some(ref mut val) = self.access_control_policy { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write.as_deref() == Some("") { - self.grant_write = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -} + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if let Some(ref mut val) = self.access_control_policy { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write.as_deref() == Some("") { + self.grant_write = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + } } impl DtoExt for PutBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { -self.analytics_configuration.ignore_empty_strings(); -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + self.analytics_configuration.ignore_empty_strings(); + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketCorsInput { fn ignore_empty_strings(&mut self) { -self.cors_configuration.ignore_empty_strings(); -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + self.cors_configuration.ignore_empty_strings(); + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketEncryptionInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.server_side_encryption_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.server_side_encryption_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketIntelligentTieringConfigurationInput { fn ignore_empty_strings(&mut self) { -self.intelligent_tiering_configuration.ignore_empty_strings(); -} + self.intelligent_tiering_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketInventoryConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.inventory_configuration.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.inventory_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketLifecycleConfigurationInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref mut val) = self.lifecycle_configuration { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" { - self.transition_default_minimum_object_size = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref mut val) = self.lifecycle_configuration { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" + { + self.transition_default_minimum_object_size = None; + } + } } impl DtoExt for PutBucketLifecycleConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" { - self.transition_default_minimum_object_size = None; -} -} + if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" + { + self.transition_default_minimum_object_size = None; + } + } } impl DtoExt for PutBucketLoggingInput { fn ignore_empty_strings(&mut self) { -self.bucket_logging_status.ignore_empty_strings(); -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + self.bucket_logging_status.ignore_empty_strings(); + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.metrics_configuration.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.metrics_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketNotificationConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.notification_configuration.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.notification_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketOwnershipControlsInput { fn ignore_empty_strings(&mut self) { -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.ownership_controls.ignore_empty_strings(); -} + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.ownership_controls.ignore_empty_strings(); + } } impl DtoExt for PutBucketPolicyInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketReplicationInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.replication_configuration.ignore_empty_strings(); -if self.token.as_deref() == Some("") { - self.token = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.replication_configuration.ignore_empty_strings(); + if self.token.as_deref() == Some("") { + self.token = None; + } + } } impl DtoExt for PutBucketRequestPaymentInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.request_payment_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.request_payment_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketTaggingInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.tagging.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.tagging.ignore_empty_strings(); + } } impl DtoExt for PutBucketVersioningInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.mfa.as_deref() == Some("") { - self.mfa = None; -} -self.versioning_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.mfa.as_deref() == Some("") { + self.mfa = None; + } + self.versioning_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketWebsiteInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.website_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.website_configuration.ignore_empty_strings(); + } } impl DtoExt for PutObjectAclInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if let Some(ref mut val) = self.access_control_policy { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write.as_deref() == Some("") { - self.grant_write = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if let Some(ref mut val) = self.access_control_policy { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write.as_deref() == Some("") { + self.grant_write = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectAclOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for PutObjectInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; -} -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.tagging.as_deref() == Some("") { - self.tagging = None; -} -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; -} -} + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.tagging.as_deref() == Some("") { + self.tagging = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } impl DtoExt for PutObjectLegalHoldInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref mut val) = self.legal_hold { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref mut val) = self.legal_hold { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectLegalHoldOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for PutObjectLockConfigurationInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref mut val) = self.object_lock_configuration { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.token.as_deref() == Some("") { - self.token = None; -} -} -} -impl DtoExt for PutObjectLockConfigurationOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} -} -impl DtoExt for PutObjectOutput { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} -} -impl DtoExt for PutObjectRetentionInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if let Some(ref mut val) = self.retention { -val.ignore_empty_strings(); + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref mut val) = self.object_lock_configuration { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.token.as_deref() == Some("") { + self.token = None; + } + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; +impl DtoExt for PutObjectLockConfigurationOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } +impl DtoExt for PutObjectOutput { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } +impl DtoExt for PutObjectRetentionInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if let Some(ref mut val) = self.retention { + val.ignore_empty_strings(); + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectRetentionOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for PutObjectTaggingInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -self.tagging.ignore_empty_strings(); -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + self.tagging.ignore_empty_strings(); + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectTaggingOutput { fn ignore_empty_strings(&mut self) { -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutPublicAccessBlockInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.public_access_block_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.public_access_block_configuration.ignore_empty_strings(); + } } impl DtoExt for QueueConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -if self.id.as_deref() == Some("") { - self.id = None; -} -} + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } impl DtoExt for RecordsEvent { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for Redirect { fn ignore_empty_strings(&mut self) { -if self.host_name.as_deref() == Some("") { - self.host_name = None; -} -if self.http_redirect_code.as_deref() == Some("") { - self.http_redirect_code = None; -} -if let Some(ref val) = self.protocol - && val.as_str() == "" { - self.protocol = None; -} -if self.replace_key_prefix_with.as_deref() == Some("") { - self.replace_key_prefix_with = None; -} -if self.replace_key_with.as_deref() == Some("") { - self.replace_key_with = None; -} -} + if self.host_name.as_deref() == Some("") { + self.host_name = None; + } + if self.http_redirect_code.as_deref() == Some("") { + self.http_redirect_code = None; + } + if let Some(ref val) = self.protocol + && val.as_str() == "" + { + self.protocol = None; + } + if self.replace_key_prefix_with.as_deref() == Some("") { + self.replace_key_prefix_with = None; + } + if self.replace_key_with.as_deref() == Some("") { + self.replace_key_with = None; + } + } } impl DtoExt for RedirectAllRequestsTo { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.protocol - && val.as_str() == "" { - self.protocol = None; -} -} + if let Some(ref val) = self.protocol + && val.as_str() == "" + { + self.protocol = None; + } + } } impl DtoExt for ReplicaModifications { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ReplicationConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ReplicationRule { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.delete_marker_replication { -val.ignore_empty_strings(); -} -self.destination.ignore_empty_strings(); -if let Some(ref mut val) = self.existing_object_replication { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -if self.id.as_deref() == Some("") { - self.id = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref mut val) = self.source_selection_criteria { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.delete_marker_replication { + val.ignore_empty_strings(); + } + self.destination.ignore_empty_strings(); + if let Some(ref mut val) = self.existing_object_replication { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref mut val) = self.source_selection_criteria { + val.ignore_empty_strings(); + } + } } impl DtoExt for ReplicationRuleAndOperator { fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for ReplicationRuleFilter { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.and { -val.ignore_empty_strings(); -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref mut val) = self.tag { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.and { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref mut val) = self.tag { + val.ignore_empty_strings(); + } + } } impl DtoExt for ReplicationTime { fn ignore_empty_strings(&mut self) { -self.time.ignore_empty_strings(); -} + self.time.ignore_empty_strings(); + } } impl DtoExt for ReplicationTimeValue { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for RequestPaymentConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for RequestProgress { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for RestoreObjectInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if let Some(ref mut val) = self.restore_request { -val.ignore_empty_strings(); -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if let Some(ref mut val) = self.restore_request { + val.ignore_empty_strings(); + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for RestoreObjectOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.restore_output_path.as_deref() == Some("") { - self.restore_output_path = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.restore_output_path.as_deref() == Some("") { + self.restore_output_path = None; + } + } } impl DtoExt for RestoreRequest { fn ignore_empty_strings(&mut self) { -if self.description.as_deref() == Some("") { - self.description = None; -} -if let Some(ref mut val) = self.glacier_job_parameters { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.output_location { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.select_parameters { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.tier - && val.as_str() == "" { - self.tier = None; -} -if let Some(ref val) = self.type_ - && val.as_str() == "" { - self.type_ = None; -} -} + if self.description.as_deref() == Some("") { + self.description = None; + } + if let Some(ref mut val) = self.glacier_job_parameters { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.output_location { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.select_parameters { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.tier + && val.as_str() == "" + { + self.tier = None; + } + if let Some(ref val) = self.type_ + && val.as_str() == "" + { + self.type_ = None; + } + } } impl DtoExt for RestoreStatus { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for RoutingRule { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.condition { -val.ignore_empty_strings(); -} -self.redirect.ignore_empty_strings(); -} + if let Some(ref mut val) = self.condition { + val.ignore_empty_strings(); + } + self.redirect.ignore_empty_strings(); + } } impl DtoExt for S3KeyFilter { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for S3Location { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.canned_acl - && val.as_str() == "" { - self.canned_acl = None; -} -if let Some(ref mut val) = self.encryption { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if let Some(ref mut val) = self.tagging { -val.ignore_empty_strings(); -} -} + if let Some(ref val) = self.canned_acl + && val.as_str() == "" + { + self.canned_acl = None; + } + if let Some(ref mut val) = self.encryption { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if let Some(ref mut val) = self.tagging { + val.ignore_empty_strings(); + } + } } impl DtoExt for S3TablesDestination { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for S3TablesDestinationResult { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for SSEKMS { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ScanRange { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for SelectObjectContentInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -self.request.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + self.request.ignore_empty_strings(); + } } impl DtoExt for SelectObjectContentOutput { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for SelectObjectContentRequest { fn ignore_empty_strings(&mut self) { -self.input_serialization.ignore_empty_strings(); -self.output_serialization.ignore_empty_strings(); -if let Some(ref mut val) = self.request_progress { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.scan_range { -val.ignore_empty_strings(); -} -} + self.input_serialization.ignore_empty_strings(); + self.output_serialization.ignore_empty_strings(); + if let Some(ref mut val) = self.request_progress { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.scan_range { + val.ignore_empty_strings(); + } + } } impl DtoExt for SelectParameters { fn ignore_empty_strings(&mut self) { -self.input_serialization.ignore_empty_strings(); -self.output_serialization.ignore_empty_strings(); -} + self.input_serialization.ignore_empty_strings(); + self.output_serialization.ignore_empty_strings(); + } } impl DtoExt for ServerSideEncryptionByDefault { fn ignore_empty_strings(&mut self) { -if self.kms_master_key_id.as_deref() == Some("") { - self.kms_master_key_id = None; -} -} + if self.kms_master_key_id.as_deref() == Some("") { + self.kms_master_key_id = None; + } + } } impl DtoExt for ServerSideEncryptionConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ServerSideEncryptionRule { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.apply_server_side_encryption_by_default { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.apply_server_side_encryption_by_default { + val.ignore_empty_strings(); + } + } } impl DtoExt for SessionCredentials { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for SourceSelectionCriteria { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.replica_modifications { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.sse_kms_encrypted_objects { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.replica_modifications { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.sse_kms_encrypted_objects { + val.ignore_empty_strings(); + } + } } impl DtoExt for SseKmsEncryptedObjects { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for Stats { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for StatsEvent { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.details { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.details { + val.ignore_empty_strings(); + } + } } impl DtoExt for StorageClassAnalysis { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.data_export { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.data_export { + val.ignore_empty_strings(); + } + } } impl DtoExt for StorageClassAnalysisDataExport { fn ignore_empty_strings(&mut self) { -self.destination.ignore_empty_strings(); -} + self.destination.ignore_empty_strings(); + } } impl DtoExt for Tag { fn ignore_empty_strings(&mut self) { -if self.key.as_deref() == Some("") { - self.key = None; -} -if self.value.as_deref() == Some("") { - self.value = None; -} -} + if self.key.as_deref() == Some("") { + self.key = None; + } + if self.value.as_deref() == Some("") { + self.value = None; + } + } } impl DtoExt for Tagging { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for TargetGrant { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.grantee { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.permission - && val.as_str() == "" { - self.permission = None; -} -} + if let Some(ref mut val) = self.grantee { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.permission + && val.as_str() == "" + { + self.permission = None; + } + } } impl DtoExt for TargetObjectKeyFormat { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.partitioned_prefix { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.partitioned_prefix { + val.ignore_empty_strings(); + } + } } impl DtoExt for Tiering { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for TopicConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -if self.id.as_deref() == Some("") { - self.id = None; -} -} + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } impl DtoExt for Transition { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -} + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } impl DtoExt for UploadPartCopyInput { fn ignore_empty_strings(&mut self) { -if self.copy_source_range.as_deref() == Some("") { - self.copy_source_range = None; -} -if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { - self.copy_source_sse_customer_algorithm = None; -} -if self.copy_source_sse_customer_key.as_deref() == Some("") { - self.copy_source_sse_customer_key = None; -} -if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { - self.copy_source_sse_customer_key_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.expected_source_bucket_owner.as_deref() == Some("") { - self.expected_source_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -} + if self.copy_source_range.as_deref() == Some("") { + self.copy_source_range = None; + } + if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { + self.copy_source_sse_customer_algorithm = None; + } + if self.copy_source_sse_customer_key.as_deref() == Some("") { + self.copy_source_sse_customer_key = None; + } + if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { + self.copy_source_sse_customer_key_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.expected_source_bucket_owner.as_deref() == Some("") { + self.expected_source_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + } } impl DtoExt for UploadPartCopyOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.copy_part_result { -val.ignore_empty_strings(); -} -if self.copy_source_version_id.as_deref() == Some("") { - self.copy_source_version_id = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -} + if let Some(ref mut val) = self.copy_part_result { + val.ignore_empty_strings(); + } + if self.copy_source_version_id.as_deref() == Some("") { + self.copy_source_version_id = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + } } impl DtoExt for UploadPartInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + } } impl DtoExt for UploadPartOutput { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -} + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + } } impl DtoExt for VersioningConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.mfa_delete - && val.as_str() == "" { - self.mfa_delete = None; -} -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; -} -} + if let Some(ref val) = self.mfa_delete + && val.as_str() == "" + { + self.mfa_delete = None; + } + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } impl DtoExt for WebsiteConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.error_document { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.index_document { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.redirect_all_requests_to { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.error_document { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.index_document { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.redirect_all_requests_to { + val.ignore_empty_strings(); + } + } } impl DtoExt for WriteGetObjectResponseInput { fn ignore_empty_strings(&mut self) { -if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.content_range.as_deref() == Some("") { - self.content_range = None; -} -if self.error_code.as_deref() == Some("") { - self.error_code = None; -} -if self.error_message.as_deref() == Some("") { - self.error_message = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; -} -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; -} -if let Some(ref val) = self.replication_status - && val.as_str() == "" { - self.replication_status = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.restore.as_deref() == Some("") { - self.restore = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_range.as_deref() == Some("") { + self.content_range = None; + } + if self.error_code.as_deref() == Some("") { + self.error_code = None; + } + if self.error_message.as_deref() == Some("") { + self.error_message = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.replication_status + && val.as_str() == "" + { + self.replication_status = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.restore.as_deref() == Some("") { + self.restore = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } // NOTE: PostObject is a synthetic API in s3s. diff --git a/crates/s3s/src/dto/generated_minio.rs b/crates/s3s/src/dto/generated_minio.rs index 8473402c..a5cf1ea2 100644 --- a/crates/s3s/src/dto/generated_minio.rs +++ b/crates/s3s/src/dto/generated_minio.rs @@ -13,8 +13,8 @@ use std::fmt; use std::str::FromStr; use futures::future::BoxFuture; +use serde::{Deserialize, Serialize}; use stdx::default::default; -use serde::{Serialize, Deserialize}; pub type AbortDate = Timestamp; @@ -24,84 +24,83 @@ pub type AbortDate = Timestamp; /// the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AbortIncompleteMultipartUpload { -///

    Specifies the number of days after which Amazon S3 aborts an incomplete multipart -/// upload.

    + ///

    Specifies the number of days after which Amazon S3 aborts an incomplete multipart + /// upload.

    pub days_after_initiation: Option, } impl fmt::Debug for AbortIncompleteMultipartUpload { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AbortIncompleteMultipartUpload"); -if let Some(ref val) = self.days_after_initiation { -d.field("days_after_initiation", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AbortIncompleteMultipartUpload"); + if let Some(ref val) = self.days_after_initiation { + d.field("days_after_initiation", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct AbortMultipartUploadInput { -///

    The bucket name to which the upload was taking place.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The bucket name to which the upload was taking place.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp. -/// If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. -/// If the initiated timestamp matches or if the multipart upload doesn’t exist, the operation returns a 204 Success (No Content) response. -///

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    + ///

    If present, this header aborts an in progress multipart upload only if it was initiated on the provided timestamp. + /// If the initiated timestamp of the multipart upload does not match the provided value, the operation returns a 412 Precondition Failed error. + /// If the initiated timestamp matches or if the multipart upload doesn’t exist, the operation returns a 204 Success (No Content) response. + ///

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    pub if_match_initiated_time: Option, -///

    Key of the object for which the multipart upload was initiated.

    + ///

    Key of the object for which the multipart upload was initiated.

    pub key: ObjectKey, pub request_payer: Option, -///

    Upload ID that identifies the multipart upload.

    + ///

    Upload ID that identifies the multipart upload.

    pub upload_id: MultipartUploadId, } impl fmt::Debug for AbortMultipartUploadInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AbortMultipartUploadInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match_initiated_time { -d.field("if_match_initiated_time", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AbortMultipartUploadInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match_initiated_time { + d.field("if_match_initiated_time", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } impl AbortMultipartUploadInput { -#[must_use] -pub fn builder() -> builders::AbortMultipartUploadInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::AbortMultipartUploadInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] @@ -110,16 +109,15 @@ pub struct AbortMultipartUploadOutput { } impl fmt::Debug for AbortMultipartUploadOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AbortMultipartUploadOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AbortMultipartUploadOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } - pub type AbortRuleId = String; ///

    Configures the transfer acceleration state for an Amazon S3 bucket. For more information, see @@ -127,63 +125,60 @@ pub type AbortRuleId = String; /// Transfer Acceleration in the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AccelerateConfiguration { -///

    Specifies the transfer acceleration status of the bucket.

    + ///

    Specifies the transfer acceleration status of the bucket.

    pub status: Option, } impl fmt::Debug for AccelerateConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AccelerateConfiguration"); -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AccelerateConfiguration"); + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } - pub type AcceptRanges = String; ///

    Contains the elements that set the ACL permissions for an object per grantee.

    #[derive(Clone, Default, PartialEq)] pub struct AccessControlPolicy { -///

    A list of grants.

    + ///

    A list of grants.

    pub grants: Option, -///

    Container for the bucket owner's display name and ID.

    + ///

    Container for the bucket owner's display name and ID.

    pub owner: Option, } impl fmt::Debug for AccessControlPolicy { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AccessControlPolicy"); -if let Some(ref val) = self.grants { -d.field("grants", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AccessControlPolicy"); + if let Some(ref val) = self.grants { + d.field("grants", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + d.finish_non_exhaustive() + } } - ///

    A container for information about access control for replicas.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AccessControlTranslation { -///

    Specifies the replica ownership. For default and valid values, see PUT bucket -/// replication in the Amazon S3 API Reference.

    + ///

    Specifies the replica ownership. For default and valid values, see PUT bucket + /// replication in the Amazon S3 API Reference.

    pub owner: OwnerOverride, } impl fmt::Debug for AccessControlTranslation { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AccessControlTranslation"); -d.field("owner", &self.owner); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AccessControlTranslation"); + d.field("owner", &self.owner); + d.finish_non_exhaustive() + } } - pub type AccessKeyIdType = String; pub type AccessKeyIdValue = String; @@ -215,83 +210,80 @@ pub type AllowedOrigins = List; /// all of the predicates for the filter to apply.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct AnalyticsAndOperator { -///

    The prefix to use when evaluating an AND predicate: The prefix that an object must have -/// to be included in the metrics results.

    + ///

    The prefix to use when evaluating an AND predicate: The prefix that an object must have + /// to be included in the metrics results.

    pub prefix: Option, -///

    The list of tags to use when evaluating an AND predicate.

    + ///

    The list of tags to use when evaluating an AND predicate.

    pub tags: Option, } impl fmt::Debug for AnalyticsAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AnalyticsAndOperator"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AnalyticsAndOperator"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } - ///

    Specifies the configuration and any analyses for the analytics filter of an Amazon S3 /// bucket.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsConfiguration { -///

    The filter used to describe a set of objects for analyses. A filter must have exactly -/// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, -/// all objects will be considered in any analysis.

    + ///

    The filter used to describe a set of objects for analyses. A filter must have exactly + /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, + /// all objects will be considered in any analysis.

    pub filter: Option, -///

    The ID that identifies the analytics configuration.

    + ///

    The ID that identifies the analytics configuration.

    pub id: AnalyticsId, -///

    Contains data related to access patterns to be collected and made available to analyze -/// the tradeoffs between different storage classes.

    + ///

    Contains data related to access patterns to be collected and made available to analyze + /// the tradeoffs between different storage classes.

    pub storage_class_analysis: StorageClassAnalysis, } impl fmt::Debug for AnalyticsConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AnalyticsConfiguration"); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -d.field("id", &self.id); -d.field("storage_class_analysis", &self.storage_class_analysis); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AnalyticsConfiguration"); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + d.field("id", &self.id); + d.field("storage_class_analysis", &self.storage_class_analysis); + d.finish_non_exhaustive() + } } impl Default for AnalyticsConfiguration { -fn default() -> Self { -Self { -filter: None, -id: default(), -storage_class_analysis: default(), -} -} + fn default() -> Self { + Self { + filter: None, + id: default(), + storage_class_analysis: default(), + } + } } - pub type AnalyticsConfigurationList = List; ///

    Where to publish the analytics results.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsExportDestination { -///

    A destination signifying output to an S3 bucket.

    + ///

    A destination signifying output to an S3 bucket.

    pub s3_bucket_destination: AnalyticsS3BucketDestination, } impl fmt::Debug for AnalyticsExportDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AnalyticsExportDestination"); -d.field("s3_bucket_destination", &self.s3_bucket_destination); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AnalyticsExportDestination"); + d.field("s3_bucket_destination", &self.s3_bucket_destination); + d.finish_non_exhaustive() + } } - ///

    The filter used to describe a set of objects for analyses. A filter must have exactly /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, /// all objects will be considered in any analysis.

    @@ -299,12 +291,12 @@ d.finish_non_exhaustive() #[non_exhaustive] #[serde(rename_all = "PascalCase")] pub enum AnalyticsFilter { -///

    A conjunction (logical AND) of predicates, which is used in evaluating an analytics -/// filter. The operator must have at least two predicates.

    + ///

    A conjunction (logical AND) of predicates, which is used in evaluating an analytics + /// filter. The operator must have at least two predicates.

    And(AnalyticsAndOperator), -///

    The prefix to use when evaluating an analytics filter.

    + ///

    The prefix to use when evaluating an analytics filter.

    Prefix(Prefix), -///

    The tag to use when evaluating an analytics filter.

    + ///

    The tag to use when evaluating an analytics filter.

    Tag(Tag), } @@ -313,111 +305,108 @@ pub type AnalyticsId = String; ///

    Contains information about where to publish the analytics results.

    #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct AnalyticsS3BucketDestination { -///

    The Amazon Resource Name (ARN) of the bucket to which data is exported.

    + ///

    The Amazon Resource Name (ARN) of the bucket to which data is exported.

    pub bucket: BucketName, -///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the -/// owner is not validated before exporting data.

    -/// -///

    Although this value is optional, we strongly recommend that you set it to help -/// prevent problems if the destination bucket ownership changes.

    -///
    + ///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the + /// owner is not validated before exporting data.

    + /// + ///

    Although this value is optional, we strongly recommend that you set it to help + /// prevent problems if the destination bucket ownership changes.

    + ///
    pub bucket_account_id: Option, -///

    Specifies the file format used when exporting data to Amazon S3.

    + ///

    Specifies the file format used when exporting data to Amazon S3.

    pub format: AnalyticsS3ExportFileFormat, -///

    The prefix to use when exporting data. The prefix is prepended to all results.

    + ///

    The prefix to use when exporting data. The prefix is prepended to all results.

    pub prefix: Option, } impl fmt::Debug for AnalyticsS3BucketDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AnalyticsS3BucketDestination"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_account_id { -d.field("bucket_account_id", val); -} -d.field("format", &self.format); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AnalyticsS3BucketDestination"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_account_id { + d.field("bucket_account_id", val); + } + d.field("format", &self.format); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct AnalyticsS3ExportFileFormat(Cow<'static, str>); impl AnalyticsS3ExportFileFormat { -pub const CSV: &'static str = "CSV"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const CSV: &'static str = "CSV"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for AnalyticsS3ExportFileFormat { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: AnalyticsS3ExportFileFormat) -> Self { -s.0 -} + fn from(s: AnalyticsS3ExportFileFormat) -> Self { + s.0 + } } impl FromStr for AnalyticsS3ExportFileFormat { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } #[derive(Debug, Clone, PartialEq, Eq)] pub struct ArchiveStatus(Cow<'static, str>); impl ArchiveStatus { -pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; + pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; -pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for ArchiveStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: ArchiveStatus) -> Self { -s.0 -} + fn from(s: ArchiveStatus) -> Self { + s.0 + } } impl FromStr for ArchiveStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type ArnType = String; @@ -426,226 +415,216 @@ pub type ArnType = String; /// temporary Amazon Web Services credentials that can be used to make Amazon Web Services requests.

    #[derive(Clone, Default, PartialEq)] pub struct AssumeRoleOutput { -///

    The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you -/// can use to refer to the resulting temporary security credentials. For example, you can -/// reference these credentials as a principal in a resource-based policy by using the ARN or -/// assumed role ID. The ARN and ID include the RoleSessionName that you specified -/// when you called AssumeRole.

    + ///

    The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers that you + /// can use to refer to the resulting temporary security credentials. For example, you can + /// reference these credentials as a principal in a resource-based policy by using the ARN or + /// assumed role ID. The ARN and ID include the RoleSessionName that you specified + /// when you called AssumeRole.

    pub assumed_role_user: Option, -///

    The temporary security credentials, which include an access key ID, a secret access key, -/// and a security (or session) token.

    -/// -///

    The size of the security token that STS API operations return is not fixed. We -/// strongly recommend that you make no assumptions about the maximum size.

    -///
    + ///

    The temporary security credentials, which include an access key ID, a secret access key, + /// and a security (or session) token.

    + /// + ///

    The size of the security token that STS API operations return is not fixed. We + /// strongly recommend that you make no assumptions about the maximum size.

    + ///
    pub credentials: Option, -///

    A percentage value that indicates the packed size of the session policies and session -/// tags combined passed in the request. The request fails if the packed size is greater than 100 percent, -/// which means the policies and tags exceeded the allowed space.

    + ///

    A percentage value that indicates the packed size of the session policies and session + /// tags combined passed in the request. The request fails if the packed size is greater than 100 percent, + /// which means the policies and tags exceeded the allowed space.

    pub packed_policy_size: Option, -///

    The source identity specified by the principal that is calling the -/// AssumeRole operation.

    -///

    You can require users to specify a source identity when they assume a role. You do this -/// by using the sts:SourceIdentity condition key in a role trust policy. You can -/// use source identity information in CloudTrail logs to determine who took actions with a role. -/// You can use the aws:SourceIdentity condition key to further control access to -/// Amazon Web Services resources based on the value of source identity. For more information about using -/// source identity, see Monitor and control -/// actions taken with assumed roles in the -/// IAM User Guide.

    -///

    The regex used to validate this parameter is a string of characters consisting of upper- -/// and lower-case alphanumeric characters with no spaces. You can also include underscores or -/// any of the following characters: =,.@-

    + ///

    The source identity specified by the principal that is calling the + /// AssumeRole operation.

    + ///

    You can require users to specify a source identity when they assume a role. You do this + /// by using the sts:SourceIdentity condition key in a role trust policy. You can + /// use source identity information in CloudTrail logs to determine who took actions with a role. + /// You can use the aws:SourceIdentity condition key to further control access to + /// Amazon Web Services resources based on the value of source identity. For more information about using + /// source identity, see Monitor and control + /// actions taken with assumed roles in the + /// IAM User Guide.

    + ///

    The regex used to validate this parameter is a string of characters consisting of upper- + /// and lower-case alphanumeric characters with no spaces. You can also include underscores or + /// any of the following characters: =,.@-

    pub source_identity: Option, } impl fmt::Debug for AssumeRoleOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AssumeRoleOutput"); -if let Some(ref val) = self.assumed_role_user { -d.field("assumed_role_user", val); -} -if let Some(ref val) = self.credentials { -d.field("credentials", val); -} -if let Some(ref val) = self.packed_policy_size { -d.field("packed_policy_size", val); -} -if let Some(ref val) = self.source_identity { -d.field("source_identity", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AssumeRoleOutput"); + if let Some(ref val) = self.assumed_role_user { + d.field("assumed_role_user", val); + } + if let Some(ref val) = self.credentials { + d.field("credentials", val); + } + if let Some(ref val) = self.packed_policy_size { + d.field("packed_policy_size", val); + } + if let Some(ref val) = self.source_identity { + d.field("source_identity", val); + } + d.finish_non_exhaustive() + } } - pub type AssumedRoleIdType = String; ///

    The identifiers for the temporary security credentials that the operation /// returns.

    #[derive(Clone, Default, PartialEq)] pub struct AssumedRoleUser { -///

    The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in -/// policies, see IAM Identifiers in the -/// IAM User Guide.

    + ///

    The ARN of the temporary security credentials that are returned from the AssumeRole action. For more information about ARNs and how to use them in + /// policies, see IAM Identifiers in the + /// IAM User Guide.

    pub arn: ArnType, -///

    A unique identifier that contains the role ID and the role session name of the role that -/// is being assumed. The role ID is generated by Amazon Web Services when the role is created.

    + ///

    A unique identifier that contains the role ID and the role session name of the role that + /// is being assumed. The role ID is generated by Amazon Web Services when the role is created.

    pub assumed_role_id: AssumedRoleIdType, } impl fmt::Debug for AssumedRoleUser { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("AssumedRoleUser"); -d.field("arn", &self.arn); -d.field("assumed_role_id", &self.assumed_role_id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("AssumedRoleUser"); + d.field("arn", &self.arn); + d.field("assumed_role_id", &self.assumed_role_id); + d.finish_non_exhaustive() + } } - - ///

    In terms of implementation, a Bucket is a resource.

    #[derive(Clone, Default, PartialEq)] pub struct Bucket { -///

    -/// BucketRegion indicates the Amazon Web Services region where the bucket is located. If the -/// request contains at least one valid parameter, it is included in the response.

    + ///

    + /// BucketRegion indicates the Amazon Web Services region where the bucket is located. If the + /// request contains at least one valid parameter, it is included in the response.

    pub bucket_region: Option, -///

    Date the bucket was created. This date can change when making changes to your bucket, -/// such as editing its bucket policy.

    + ///

    Date the bucket was created. This date can change when making changes to your bucket, + /// such as editing its bucket policy.

    pub creation_date: Option, -///

    The name of the bucket.

    + ///

    The name of the bucket.

    pub name: Option, } impl fmt::Debug for Bucket { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Bucket"); -if let Some(ref val) = self.bucket_region { -d.field("bucket_region", val); -} -if let Some(ref val) = self.creation_date { -d.field("creation_date", val); -} -if let Some(ref val) = self.name { -d.field("name", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Bucket"); + if let Some(ref val) = self.bucket_region { + d.field("bucket_region", val); + } + if let Some(ref val) = self.creation_date { + d.field("creation_date", val); + } + if let Some(ref val) = self.name { + d.field("name", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketAccelerateStatus(Cow<'static, str>); impl BucketAccelerateStatus { -pub const ENABLED: &'static str = "Enabled"; + pub const ENABLED: &'static str = "Enabled"; -pub const SUSPENDED: &'static str = "Suspended"; + pub const SUSPENDED: &'static str = "Suspended"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketAccelerateStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketAccelerateStatus) -> Self { -s.0 -} + fn from(s: BucketAccelerateStatus) -> Self { + s.0 + } } impl FromStr for BucketAccelerateStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    The requested bucket name is not available. The bucket namespace is shared by all users /// of the system. Select a different name and try again.

    #[derive(Clone, Default, PartialEq)] -pub struct BucketAlreadyExists { -} +pub struct BucketAlreadyExists {} impl fmt::Debug for BucketAlreadyExists { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketAlreadyExists"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketAlreadyExists"); + d.finish_non_exhaustive() + } } - ///

    The bucket you tried to create already exists, and you own it. Amazon S3 returns this error /// in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you /// re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 /// returns 200 OK and resets the bucket access control lists (ACLs).

    #[derive(Clone, Default, PartialEq)] -pub struct BucketAlreadyOwnedByYou { -} +pub struct BucketAlreadyOwnedByYou {} impl fmt::Debug for BucketAlreadyOwnedByYou { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketAlreadyOwnedByYou"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketAlreadyOwnedByYou"); + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq)] pub struct BucketCannedACL(Cow<'static, str>); impl BucketCannedACL { -pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; - -pub const PRIVATE: &'static str = "private"; + pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; -pub const PUBLIC_READ: &'static str = "public-read"; + pub const PRIVATE: &'static str = "private"; -pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; + pub const PUBLIC_READ: &'static str = "public-read"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketCannedACL { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketCannedACL) -> Self { -s.0 -} + fn from(s: BucketCannedACL) -> Self { + s.0 + } } impl FromStr for BucketCannedACL { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    Specifies the information about the bucket that will be created. For more information @@ -655,26 +634,25 @@ Ok(Self::from(s.to_owned())) /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct BucketInfo { -///

    The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

    + ///

    The number of Zone (Availability Zone or Local Zone) that's used for redundancy for the bucket.

    pub data_redundancy: Option, -///

    The type of bucket.

    + ///

    The type of bucket.

    pub type_: Option, } impl fmt::Debug for BucketInfo { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketInfo"); -if let Some(ref val) = self.data_redundancy { -d.field("data_redundancy", val); -} -if let Some(ref val) = self.type_ { -d.field("type_", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketInfo"); + if let Some(ref val) = self.data_redundancy { + d.field("data_redundancy", val); + } + if let Some(ref val) = self.type_ { + d.field("type_", val); + } + d.finish_non_exhaustive() + } } - pub type BucketKeyEnabled = bool; ///

    Specifies the lifecycle configuration for objects in an Amazon S3 bucket. For more @@ -683,121 +661,119 @@ pub type BucketKeyEnabled = bool; #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct BucketLifecycleConfiguration { pub expiry_updated_at: Option, -///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    + ///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    pub rules: LifecycleRules, } impl fmt::Debug for BucketLifecycleConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketLifecycleConfiguration"); -if let Some(ref val) = self.expiry_updated_at { -d.field("expiry_updated_at", val); -} -d.field("rules", &self.rules); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketLifecycleConfiguration"); + if let Some(ref val) = self.expiry_updated_at { + d.field("expiry_updated_at", val); + } + d.field("rules", &self.rules); + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketLocationConstraint(Cow<'static, str>); impl BucketLocationConstraint { -pub const EU: &'static str = "EU"; - -pub const AF_SOUTH_1: &'static str = "af-south-1"; + pub const EU: &'static str = "EU"; -pub const AP_EAST_1: &'static str = "ap-east-1"; + pub const AF_SOUTH_1: &'static str = "af-south-1"; -pub const AP_NORTHEAST_1: &'static str = "ap-northeast-1"; + pub const AP_EAST_1: &'static str = "ap-east-1"; -pub const AP_NORTHEAST_2: &'static str = "ap-northeast-2"; + pub const AP_NORTHEAST_1: &'static str = "ap-northeast-1"; -pub const AP_NORTHEAST_3: &'static str = "ap-northeast-3"; + pub const AP_NORTHEAST_2: &'static str = "ap-northeast-2"; -pub const AP_SOUTH_1: &'static str = "ap-south-1"; + pub const AP_NORTHEAST_3: &'static str = "ap-northeast-3"; -pub const AP_SOUTH_2: &'static str = "ap-south-2"; + pub const AP_SOUTH_1: &'static str = "ap-south-1"; -pub const AP_SOUTHEAST_1: &'static str = "ap-southeast-1"; + pub const AP_SOUTH_2: &'static str = "ap-south-2"; -pub const AP_SOUTHEAST_2: &'static str = "ap-southeast-2"; + pub const AP_SOUTHEAST_1: &'static str = "ap-southeast-1"; -pub const AP_SOUTHEAST_3: &'static str = "ap-southeast-3"; + pub const AP_SOUTHEAST_2: &'static str = "ap-southeast-2"; -pub const AP_SOUTHEAST_4: &'static str = "ap-southeast-4"; + pub const AP_SOUTHEAST_3: &'static str = "ap-southeast-3"; -pub const AP_SOUTHEAST_5: &'static str = "ap-southeast-5"; + pub const AP_SOUTHEAST_4: &'static str = "ap-southeast-4"; -pub const CA_CENTRAL_1: &'static str = "ca-central-1"; + pub const AP_SOUTHEAST_5: &'static str = "ap-southeast-5"; -pub const CN_NORTH_1: &'static str = "cn-north-1"; + pub const CA_CENTRAL_1: &'static str = "ca-central-1"; -pub const CN_NORTHWEST_1: &'static str = "cn-northwest-1"; + pub const CN_NORTH_1: &'static str = "cn-north-1"; -pub const EU_CENTRAL_1: &'static str = "eu-central-1"; + pub const CN_NORTHWEST_1: &'static str = "cn-northwest-1"; -pub const EU_CENTRAL_2: &'static str = "eu-central-2"; + pub const EU_CENTRAL_1: &'static str = "eu-central-1"; -pub const EU_NORTH_1: &'static str = "eu-north-1"; + pub const EU_CENTRAL_2: &'static str = "eu-central-2"; -pub const EU_SOUTH_1: &'static str = "eu-south-1"; + pub const EU_NORTH_1: &'static str = "eu-north-1"; -pub const EU_SOUTH_2: &'static str = "eu-south-2"; + pub const EU_SOUTH_1: &'static str = "eu-south-1"; -pub const EU_WEST_1: &'static str = "eu-west-1"; + pub const EU_SOUTH_2: &'static str = "eu-south-2"; -pub const EU_WEST_2: &'static str = "eu-west-2"; + pub const EU_WEST_1: &'static str = "eu-west-1"; -pub const EU_WEST_3: &'static str = "eu-west-3"; + pub const EU_WEST_2: &'static str = "eu-west-2"; -pub const IL_CENTRAL_1: &'static str = "il-central-1"; + pub const EU_WEST_3: &'static str = "eu-west-3"; -pub const ME_CENTRAL_1: &'static str = "me-central-1"; + pub const IL_CENTRAL_1: &'static str = "il-central-1"; -pub const ME_SOUTH_1: &'static str = "me-south-1"; + pub const ME_CENTRAL_1: &'static str = "me-central-1"; -pub const SA_EAST_1: &'static str = "sa-east-1"; + pub const ME_SOUTH_1: &'static str = "me-south-1"; -pub const US_EAST_2: &'static str = "us-east-2"; + pub const SA_EAST_1: &'static str = "sa-east-1"; -pub const US_GOV_EAST_1: &'static str = "us-gov-east-1"; + pub const US_EAST_2: &'static str = "us-east-2"; -pub const US_GOV_WEST_1: &'static str = "us-gov-west-1"; + pub const US_GOV_EAST_1: &'static str = "us-gov-east-1"; -pub const US_WEST_1: &'static str = "us-west-1"; + pub const US_GOV_WEST_1: &'static str = "us-gov-west-1"; -pub const US_WEST_2: &'static str = "us-west-2"; + pub const US_WEST_1: &'static str = "us-west-1"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const US_WEST_2: &'static str = "us-west-2"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketLocationConstraint { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketLocationConstraint) -> Self { -s.0 -} + fn from(s: BucketLocationConstraint) -> Self { + s.0 + } } impl FromStr for BucketLocationConstraint { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type BucketLocationName = String; @@ -809,55 +785,53 @@ pub struct BucketLoggingStatus { } impl fmt::Debug for BucketLoggingStatus { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("BucketLoggingStatus"); -if let Some(ref val) = self.logging_enabled { -d.field("logging_enabled", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("BucketLoggingStatus"); + if let Some(ref val) = self.logging_enabled { + d.field("logging_enabled", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq)] pub struct BucketLogsPermission(Cow<'static, str>); impl BucketLogsPermission { -pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; - -pub const READ: &'static str = "READ"; + pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; -pub const WRITE: &'static str = "WRITE"; + pub const READ: &'static str = "READ"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const WRITE: &'static str = "WRITE"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketLogsPermission { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketLogsPermission) -> Self { -s.0 -} + fn from(s: BucketLogsPermission) -> Self { + s.0 + } } impl FromStr for BucketLogsPermission { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type BucketName = String; @@ -868,76 +842,74 @@ pub type BucketRegion = String; pub struct BucketType(Cow<'static, str>); impl BucketType { -pub const DIRECTORY: &'static str = "Directory"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const DIRECTORY: &'static str = "Directory"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketType) -> Self { -s.0 -} + fn from(s: BucketType) -> Self { + s.0 + } } impl FromStr for BucketType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct BucketVersioningStatus(Cow<'static, str>); impl BucketVersioningStatus { -pub const ENABLED: &'static str = "Enabled"; - -pub const SUSPENDED: &'static str = "Suspended"; + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const SUSPENDED: &'static str = "Suspended"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for BucketVersioningStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: BucketVersioningStatus) -> Self { -s.0 -} + fn from(s: BucketVersioningStatus) -> Self { + s.0 + } } impl FromStr for BucketVersioningStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type Buckets = List; @@ -956,308 +928,301 @@ pub type BytesScanned = i64; /// Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CORSConfiguration { -///

    A set of origins and methods (cross-origin access that you want to allow). You can add -/// up to 100 rules to the configuration.

    + ///

    A set of origins and methods (cross-origin access that you want to allow). You can add + /// up to 100 rules to the configuration.

    pub cors_rules: CORSRules, } impl fmt::Debug for CORSConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CORSConfiguration"); -d.field("cors_rules", &self.cors_rules); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CORSConfiguration"); + d.field("cors_rules", &self.cors_rules); + d.finish_non_exhaustive() + } } - ///

    Specifies a cross-origin access rule for an Amazon S3 bucket.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CORSRule { -///

    Headers that are specified in the Access-Control-Request-Headers header. -/// These headers are allowed in a preflight OPTIONS request. In response to any preflight -/// OPTIONS request, Amazon S3 returns any requested headers that are allowed.

    + ///

    Headers that are specified in the Access-Control-Request-Headers header. + /// These headers are allowed in a preflight OPTIONS request. In response to any preflight + /// OPTIONS request, Amazon S3 returns any requested headers that are allowed.

    pub allowed_headers: Option, -///

    An HTTP method that you allow the origin to execute. Valid values are GET, -/// PUT, HEAD, POST, and DELETE.

    + ///

    An HTTP method that you allow the origin to execute. Valid values are GET, + /// PUT, HEAD, POST, and DELETE.

    pub allowed_methods: AllowedMethods, -///

    One or more origins you want customers to be able to access the bucket from.

    + ///

    One or more origins you want customers to be able to access the bucket from.

    pub allowed_origins: AllowedOrigins, -///

    One or more headers in the response that you want customers to be able to access from -/// their applications (for example, from a JavaScript XMLHttpRequest -/// object).

    + ///

    One or more headers in the response that you want customers to be able to access from + /// their applications (for example, from a JavaScript XMLHttpRequest + /// object).

    pub expose_headers: Option, -///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    + ///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    pub id: Option, -///

    The time in seconds that your browser is to cache the preflight response for the -/// specified resource.

    + ///

    The time in seconds that your browser is to cache the preflight response for the + /// specified resource.

    pub max_age_seconds: Option, } impl fmt::Debug for CORSRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CORSRule"); -if let Some(ref val) = self.allowed_headers { -d.field("allowed_headers", val); -} -d.field("allowed_methods", &self.allowed_methods); -d.field("allowed_origins", &self.allowed_origins); -if let Some(ref val) = self.expose_headers { -d.field("expose_headers", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -if let Some(ref val) = self.max_age_seconds { -d.field("max_age_seconds", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CORSRule"); + if let Some(ref val) = self.allowed_headers { + d.field("allowed_headers", val); + } + d.field("allowed_methods", &self.allowed_methods); + d.field("allowed_origins", &self.allowed_origins); + if let Some(ref val) = self.expose_headers { + d.field("expose_headers", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + if let Some(ref val) = self.max_age_seconds { + d.field("max_age_seconds", val); + } + d.finish_non_exhaustive() + } } - pub type CORSRules = List; ///

    Describes how an uncompressed comma-separated values (CSV)-formatted input object is /// formatted.

    #[derive(Clone, Default, PartialEq)] pub struct CSVInput { -///

    Specifies that CSV field values may contain quoted record delimiters and such records -/// should be allowed. Default value is FALSE. Setting this value to TRUE may lower -/// performance.

    + ///

    Specifies that CSV field values may contain quoted record delimiters and such records + /// should be allowed. Default value is FALSE. Setting this value to TRUE may lower + /// performance.

    pub allow_quoted_record_delimiter: Option, -///

    A single character used to indicate that a row should be ignored when the character is -/// present at the start of that row. You can specify any character to indicate a comment line. -/// The default character is #.

    -///

    Default: # -///

    + ///

    A single character used to indicate that a row should be ignored when the character is + /// present at the start of that row. You can specify any character to indicate a comment line. + /// The default character is #.

    + ///

    Default: # + ///

    pub comments: Option, -///

    A single character used to separate individual fields in a record. You can specify an -/// arbitrary delimiter.

    + ///

    A single character used to separate individual fields in a record. You can specify an + /// arbitrary delimiter.

    pub field_delimiter: Option, -///

    Describes the first line of input. Valid values are:

    -///
      -///
    • -///

      -/// NONE: First line is not a header.

      -///
    • -///
    • -///

      -/// IGNORE: First line is a header, but you can't use the header values -/// to indicate the column in an expression. You can use column position (such as _1, _2, -/// …) to indicate the column (SELECT s._1 FROM OBJECT s).

      -///
    • -///
    • -///

      -/// Use: First line is a header, and you can use the header value to -/// identify a column in an expression (SELECT "name" FROM OBJECT).

      -///
    • -///
    + ///

    Describes the first line of input. Valid values are:

    + ///
      + ///
    • + ///

      + /// NONE: First line is not a header.

      + ///
    • + ///
    • + ///

      + /// IGNORE: First line is a header, but you can't use the header values + /// to indicate the column in an expression. You can use column position (such as _1, _2, + /// …) to indicate the column (SELECT s._1 FROM OBJECT s).

      + ///
    • + ///
    • + ///

      + /// Use: First line is a header, and you can use the header value to + /// identify a column in an expression (SELECT "name" FROM OBJECT).

      + ///
    • + ///
    pub file_header_info: Option, -///

    A single character used for escaping when the field delimiter is part of the value. For -/// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, -/// as follows: " a , b ".

    -///

    Type: String

    -///

    Default: " -///

    -///

    Ancestors: CSV -///

    + ///

    A single character used for escaping when the field delimiter is part of the value. For + /// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, + /// as follows: " a , b ".

    + ///

    Type: String

    + ///

    Default: " + ///

    + ///

    Ancestors: CSV + ///

    pub quote_character: Option, -///

    A single character used for escaping the quotation mark character inside an already -/// escaped value. For example, the value """ a , b """ is parsed as " a , b -/// ".

    + ///

    A single character used for escaping the quotation mark character inside an already + /// escaped value. For example, the value """ a , b """ is parsed as " a , b + /// ".

    pub quote_escape_character: Option, -///

    A single character used to separate individual records in the input. Instead of the -/// default value, you can specify an arbitrary delimiter.

    + ///

    A single character used to separate individual records in the input. Instead of the + /// default value, you can specify an arbitrary delimiter.

    pub record_delimiter: Option, } impl fmt::Debug for CSVInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CSVInput"); -if let Some(ref val) = self.allow_quoted_record_delimiter { -d.field("allow_quoted_record_delimiter", val); -} -if let Some(ref val) = self.comments { -d.field("comments", val); -} -if let Some(ref val) = self.field_delimiter { -d.field("field_delimiter", val); -} -if let Some(ref val) = self.file_header_info { -d.field("file_header_info", val); -} -if let Some(ref val) = self.quote_character { -d.field("quote_character", val); -} -if let Some(ref val) = self.quote_escape_character { -d.field("quote_escape_character", val); -} -if let Some(ref val) = self.record_delimiter { -d.field("record_delimiter", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CSVInput"); + if let Some(ref val) = self.allow_quoted_record_delimiter { + d.field("allow_quoted_record_delimiter", val); + } + if let Some(ref val) = self.comments { + d.field("comments", val); + } + if let Some(ref val) = self.field_delimiter { + d.field("field_delimiter", val); + } + if let Some(ref val) = self.file_header_info { + d.field("file_header_info", val); + } + if let Some(ref val) = self.quote_character { + d.field("quote_character", val); + } + if let Some(ref val) = self.quote_escape_character { + d.field("quote_escape_character", val); + } + if let Some(ref val) = self.record_delimiter { + d.field("record_delimiter", val); + } + d.finish_non_exhaustive() + } } - ///

    Describes how uncompressed comma-separated values (CSV)-formatted results are /// formatted.

    #[derive(Clone, Default, PartialEq)] pub struct CSVOutput { -///

    The value used to separate individual fields in a record. You can specify an arbitrary -/// delimiter.

    + ///

    The value used to separate individual fields in a record. You can specify an arbitrary + /// delimiter.

    pub field_delimiter: Option, -///

    A single character used for escaping when the field delimiter is part of the value. For -/// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, -/// as follows: " a , b ".

    + ///

    A single character used for escaping when the field delimiter is part of the value. For + /// example, if the value is a, b, Amazon S3 wraps this field value in quotation marks, + /// as follows: " a , b ".

    pub quote_character: Option, -///

    The single character used for escaping the quote character inside an already escaped -/// value.

    + ///

    The single character used for escaping the quote character inside an already escaped + /// value.

    pub quote_escape_character: Option, -///

    Indicates whether to use quotation marks around output fields.

    -///
      -///
    • -///

      -/// ALWAYS: Always use quotation marks for output fields.

      -///
    • -///
    • -///

      -/// ASNEEDED: Use quotation marks for output fields when needed.

      -///
    • -///
    + ///

    Indicates whether to use quotation marks around output fields.

    + ///
      + ///
    • + ///

      + /// ALWAYS: Always use quotation marks for output fields.

      + ///
    • + ///
    • + ///

      + /// ASNEEDED: Use quotation marks for output fields when needed.

      + ///
    • + ///
    pub quote_fields: Option, -///

    A single character used to separate individual records in the output. Instead of the -/// default value, you can specify an arbitrary delimiter.

    + ///

    A single character used to separate individual records in the output. Instead of the + /// default value, you can specify an arbitrary delimiter.

    pub record_delimiter: Option, } impl fmt::Debug for CSVOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CSVOutput"); -if let Some(ref val) = self.field_delimiter { -d.field("field_delimiter", val); -} -if let Some(ref val) = self.quote_character { -d.field("quote_character", val); -} -if let Some(ref val) = self.quote_escape_character { -d.field("quote_escape_character", val); -} -if let Some(ref val) = self.quote_fields { -d.field("quote_fields", val); -} -if let Some(ref val) = self.record_delimiter { -d.field("record_delimiter", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CSVOutput"); + if let Some(ref val) = self.field_delimiter { + d.field("field_delimiter", val); + } + if let Some(ref val) = self.quote_character { + d.field("quote_character", val); + } + if let Some(ref val) = self.quote_escape_character { + d.field("quote_escape_character", val); + } + if let Some(ref val) = self.quote_fields { + d.field("quote_fields", val); + } + if let Some(ref val) = self.record_delimiter { + d.field("record_delimiter", val); + } + d.finish_non_exhaustive() + } } - pub type CacheControl = String; - ///

    Contains all the possible checksum or digest values for an object.

    #[derive(Clone, Default, PartialEq)] pub struct Checksum { -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present -/// if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a -/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present + /// if the object was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a + /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, } impl fmt::Debug for Checksum { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Checksum"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Checksum"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq)] pub struct ChecksumAlgorithm(Cow<'static, str>); impl ChecksumAlgorithm { -pub const CRC32: &'static str = "CRC32"; + pub const CRC32: &'static str = "CRC32"; -pub const CRC32C: &'static str = "CRC32C"; + pub const CRC32C: &'static str = "CRC32C"; -pub const CRC64NVME: &'static str = "CRC64NVME"; + pub const CRC64NVME: &'static str = "CRC64NVME"; -pub const SHA1: &'static str = "SHA1"; + pub const SHA1: &'static str = "SHA1"; -pub const SHA256: &'static str = "SHA256"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const SHA256: &'static str = "SHA256"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for ChecksumAlgorithm { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: ChecksumAlgorithm) -> Self { -s.0 -} + fn from(s: ChecksumAlgorithm) -> Self { + s.0 + } } impl FromStr for ChecksumAlgorithm { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type ChecksumAlgorithmList = List; @@ -1272,37 +1237,36 @@ pub type ChecksumCRC64NVME = String; pub struct ChecksumMode(Cow<'static, str>); impl ChecksumMode { -pub const ENABLED: &'static str = "ENABLED"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const ENABLED: &'static str = "ENABLED"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for ChecksumMode { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: ChecksumMode) -> Self { -s.0 -} + fn from(s: ChecksumMode) -> Self { + s.0 + } } impl FromStr for ChecksumMode { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type ChecksumSHA1 = String; @@ -1313,39 +1277,38 @@ pub type ChecksumSHA256 = String; pub struct ChecksumType(Cow<'static, str>); impl ChecksumType { -pub const COMPOSITE: &'static str = "COMPOSITE"; + pub const COMPOSITE: &'static str = "COMPOSITE"; -pub const FULL_OBJECT: &'static str = "FULL_OBJECT"; + pub const FULL_OBJECT: &'static str = "FULL_OBJECT"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for ChecksumType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: ChecksumType) -> Self { -s.0 -} + fn from(s: ChecksumType) -> Self { + s.0 + } } impl FromStr for ChecksumType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type Code = String; @@ -1358,470 +1321,465 @@ pub type Comments = String; /// is a slash (/) as in notes/summer/july, the common prefix is notes/summer/.

    #[derive(Clone, Default, PartialEq)] pub struct CommonPrefix { -///

    Container for the specified common prefix.

    + ///

    Container for the specified common prefix.

    pub prefix: Option, } impl fmt::Debug for CommonPrefix { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CommonPrefix"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CommonPrefix"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } - pub type CommonPrefixList = List; #[derive(Clone, Default, PartialEq)] pub struct CompleteMultipartUploadInput { -///

    Name of the bucket to which the multipart upload was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    Name of the bucket to which the multipart upload was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the object. The CRC64NVME checksum is -/// always a full object checksum. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the object. The CRC64NVME checksum is + /// always a full object checksum. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    This header specifies the checksum type of the object, which determines how part-level -/// checksums are combined to create an object-level checksum for multipart objects. You can -/// use this header as a data integrity check to verify that the checksum type that is received -/// is the same checksum that was specified. If the checksum type doesn’t match the checksum -/// type that was specified for the object during the CreateMultipartUpload -/// request, it’ll result in a BadDigest error. For more information, see Checking -/// object integrity in the Amazon S3 User Guide.

    + ///

    This header specifies the checksum type of the object, which determines how part-level + /// checksums are combined to create an object-level checksum for multipart objects. You can + /// use this header as a data integrity check to verify that the checksum type that is received + /// is the same checksum that was specified. If the checksum type doesn’t match the checksum + /// type that was specified for the object during the CreateMultipartUpload + /// request, it’ll result in a BadDigest error. For more information, see Checking + /// object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE -/// operation matches the ETag of the object in S3. If the ETag values do not match, the -/// operation returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 -/// ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the -/// multipart upload with CreateMultipartUpload, and re-upload each part.

    -///

    Expects the ETag value as a string.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE + /// operation matches the ETag of the object in S3. If the ETag values do not match, the + /// operation returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 + /// ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag, re-initiate the + /// multipart upload with CreateMultipartUpload, and re-upload each part.

    + ///

    Expects the ETag value as a string.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    pub if_match: Option, -///

    Uploads the object only if the object key name does not already exist in the bucket -/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 -/// ConditionalRequestConflict response. On a 409 failure you should re-initiate the -/// multipart upload with CreateMultipartUpload and re-upload each part.

    -///

    Expects the '*' (asterisk) character.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + ///

    Uploads the object only if the object key name does not already exist in the bucket + /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 + /// ConditionalRequestConflict response. On a 409 failure you should re-initiate the + /// multipart upload with CreateMultipartUpload and re-upload each part.

    + ///

    Expects the '*' (asterisk) character.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    pub if_none_match: Option, -///

    Object key for which the multipart upload was initiated.

    + ///

    Object key for which the multipart upload was initiated.

    pub key: ObjectKey, -///

    The expected total object size of the multipart upload request. If there’s a mismatch -/// between the specified object size value and the actual object size value, it results in an -/// HTTP 400 InvalidRequest error.

    + ///

    The expected total object size of the multipart upload request. If there’s a mismatch + /// between the specified object size value and the actual object size value, it results in an + /// HTTP 400 InvalidRequest error.

    pub mpu_object_size: Option, -///

    The container for the multipart upload request information.

    + ///

    The container for the multipart upload request information.

    pub multipart_upload: Option, pub request_payer: Option, -///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is -/// required only when the object was created using a checksum algorithm or if your bucket -/// policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User -/// Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is + /// required only when the object was created using a checksum algorithm or if your bucket + /// policy requires the use of SSE-C. For more information, see Protecting data using SSE-C keys in the Amazon S3 User + /// Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_algorithm: Option, -///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. -/// For more information, see -/// Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. + /// For more information, see + /// Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key: Option, -///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum -/// algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum + /// algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key_md5: Option, -///

    ID for the initiated multipart upload.

    + ///

    ID for the initiated multipart upload.

    pub upload_id: MultipartUploadId, } impl fmt::Debug for CompleteMultipartUploadInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CompleteMultipartUploadInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.mpu_object_size { -d.field("mpu_object_size", val); -} -if let Some(ref val) = self.multipart_upload { -d.field("multipart_upload", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CompleteMultipartUploadInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.mpu_object_size { + d.field("mpu_object_size", val); + } + if let Some(ref val) = self.multipart_upload { + d.field("multipart_upload", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } impl CompleteMultipartUploadInput { -#[must_use] -pub fn builder() -> builders::CompleteMultipartUploadInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CompleteMultipartUploadInputBuilder { + default() + } } #[derive(Default)] pub struct CompleteMultipartUploadOutput { -///

    The name of the bucket that contains the newly created object. Does not return the access point -/// ARN or access point alias if used.

    -/// -///

    Access points are not supported by directory buckets.

    -///
    + ///

    The name of the bucket that contains the newly created object. Does not return the access point + /// ARN or access point alias if used.

    + /// + ///

    Access points are not supported by directory buckets.

    + ///
    pub bucket: Option, -///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    + ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    pub bucket_key_enabled: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the object. The CRC64NVME checksum is -/// always a full object checksum. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the object. The CRC64NVME checksum is + /// always a full object checksum. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    The checksum type, which determines how part-level checksums are combined to create an -/// object-level checksum for multipart objects. You can use this header as a data integrity -/// check to verify that the checksum type that is received is the same checksum type that was -/// specified during the CreateMultipartUpload request. For more information, see -/// Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    The checksum type, which determines how part-level checksums are combined to create an + /// object-level checksum for multipart objects. You can use this header as a data integrity + /// check to verify that the checksum type that is received is the same checksum type that was + /// specified during the CreateMultipartUpload request. For more information, see + /// Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    Entity tag that identifies the newly created object's data. Objects with different -/// object data will have different entity tags. The entity tag is an opaque string. The entity -/// tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 -/// digest of the object data, it will contain one or more nonhexadecimal characters and/or -/// will consist of less than 32 or more than 32 hexadecimal digits. For more information about -/// how the entity tag is calculated, see Checking object -/// integrity in the Amazon S3 User Guide.

    + ///

    Entity tag that identifies the newly created object's data. Objects with different + /// object data will have different entity tags. The entity tag is an opaque string. The entity + /// tag may or may not be an MD5 digest of the object data. If the entity tag is not an MD5 + /// digest of the object data, it will contain one or more nonhexadecimal characters and/or + /// will consist of less than 32 or more than 32 hexadecimal digits. For more information about + /// how the entity tag is calculated, see Checking object + /// integrity in the Amazon S3 User Guide.

    pub e_tag: Option, -///

    If the object expiration is configured, this will contain the expiration date -/// (expiry-date) and rule ID (rule-id). The value of -/// rule-id is URL-encoded.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If the object expiration is configured, this will contain the expiration date + /// (expiry-date) and rule ID (rule-id). The value of + /// rule-id is URL-encoded.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub expiration: Option, -///

    The object key of the newly created object.

    + ///

    The object key of the newly created object.

    pub key: Option, -///

    The URI that identifies the newly created object.

    + ///

    The URI that identifies the newly created object.

    pub location: Option, pub request_charged: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when storing this object in Amazon S3 (for example, -/// AES256, aws:kms).

    + ///

    The server-side encryption algorithm used when storing this object in Amazon S3 (for example, + /// AES256, aws:kms).

    pub server_side_encryption: Option, -///

    Version ID of the newly created object, in case the bucket has versioning turned -/// on.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Version ID of the newly created object, in case the bucket has versioning turned + /// on.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub version_id: Option, -/// A future that resolves to the upload output or an error. This field is used to implement AWS-like keep-alive behavior. + /// A future that resolves to the upload output or an error. This field is used to implement AWS-like keep-alive behavior. pub future: Option>>, } impl fmt::Debug for CompleteMultipartUploadOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CompleteMultipartUploadOutput"); -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.location { -d.field("location", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -if self.future.is_some() { -d.field("future", &">>"); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CompleteMultipartUploadOutput"); + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.location { + d.field("location", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if self.future.is_some() { + d.field("future", &">>"); + } + d.finish_non_exhaustive() + } } - ///

    The container for the completed multipart upload details.

    #[derive(Clone, Default, PartialEq)] pub struct CompletedMultipartUpload { -///

    Array of CompletedPart data types.

    -///

    If you do not supply a valid Part with your request, the service sends back -/// an HTTP 400 response.

    + ///

    Array of CompletedPart data types.

    + ///

    If you do not supply a valid Part with your request, the service sends back + /// an HTTP 400 response.

    pub parts: Option, } impl fmt::Debug for CompletedMultipartUpload { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CompletedMultipartUpload"); -if let Some(ref val) = self.parts { -d.field("parts", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CompletedMultipartUpload"); + if let Some(ref val) = self.parts { + d.field("parts", val); + } + d.finish_non_exhaustive() + } } - ///

    Details of the parts that were uploaded.

    #[derive(Clone, Default, PartialEq)] pub struct CompletedPart { -///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present -/// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present + /// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present -/// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present + /// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    Entity tag returned when the part was uploaded.

    + ///

    Entity tag returned when the part was uploaded.

    pub e_tag: Option, -///

    Part number that identifies the part. This is a positive integer between 1 and -/// 10,000.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - In -/// CompleteMultipartUpload, when a additional checksum (including -/// x-amz-checksum-crc32, x-amz-checksum-crc32c, -/// x-amz-checksum-sha1, or x-amz-checksum-sha256) is -/// applied to each part, the PartNumber must start at 1 and the part -/// numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad -/// Request status code and an InvalidPartOrder error -/// code.

      -///
    • -///
    • -///

      -/// Directory buckets - In -/// CompleteMultipartUpload, the PartNumber must start at -/// 1 and the part numbers must be consecutive.

      -///
    • -///
    -///
    + ///

    Part number that identifies the part. This is a positive integer between 1 and + /// 10,000.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - In + /// CompleteMultipartUpload, when a additional checksum (including + /// x-amz-checksum-crc32, x-amz-checksum-crc32c, + /// x-amz-checksum-sha1, or x-amz-checksum-sha256) is + /// applied to each part, the PartNumber must start at 1 and the part + /// numbers must be consecutive. Otherwise, Amazon S3 generates an HTTP 400 Bad + /// Request status code and an InvalidPartOrder error + /// code.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - In + /// CompleteMultipartUpload, the PartNumber must start at + /// 1 and the part numbers must be consecutive.

      + ///
    • + ///
    + ///
    pub part_number: Option, } impl fmt::Debug for CompletedPart { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CompletedPart"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CompletedPart"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + d.finish_non_exhaustive() + } } - pub type CompletedPartList = List; #[derive(Debug, Clone, PartialEq, Eq)] pub struct CompressionType(Cow<'static, str>); impl CompressionType { -pub const BZIP2: &'static str = "BZIP2"; + pub const BZIP2: &'static str = "BZIP2"; -pub const GZIP: &'static str = "GZIP"; + pub const GZIP: &'static str = "GZIP"; -pub const NONE: &'static str = "NONE"; + pub const NONE: &'static str = "NONE"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for CompressionType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: CompressionType) -> Self { -s.0 -} + fn from(s: CompressionType) -> Self { + s.0 + } } impl FromStr for CompressionType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    A container for describing a condition that must be met for the specified redirect to @@ -1830,42 +1788,41 @@ Ok(Self::from(s.to_owned())) /// request to another host where you might process the error.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct Condition { -///

    The HTTP error code when the redirect is applied. In the event of an error, if the error -/// code equals this value, then the specified redirect is applied. Required when parent -/// element Condition is specified and sibling KeyPrefixEquals is not -/// specified. If both are specified, then both must be true for the redirect to be -/// applied.

    + ///

    The HTTP error code when the redirect is applied. In the event of an error, if the error + /// code equals this value, then the specified redirect is applied. Required when parent + /// element Condition is specified and sibling KeyPrefixEquals is not + /// specified. If both are specified, then both must be true for the redirect to be + /// applied.

    pub http_error_code_returned_equals: Option, -///

    The object key name prefix when the redirect is applied. For example, to redirect -/// requests for ExamplePage.html, the key prefix will be -/// ExamplePage.html. To redirect request for all pages with the prefix -/// docs/, the key prefix will be /docs, which identifies all -/// objects in the docs/ folder. Required when the parent element -/// Condition is specified and sibling HttpErrorCodeReturnedEquals -/// is not specified. If both conditions are specified, both must be true for the redirect to -/// be applied.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    + ///

    The object key name prefix when the redirect is applied. For example, to redirect + /// requests for ExamplePage.html, the key prefix will be + /// ExamplePage.html. To redirect request for all pages with the prefix + /// docs/, the key prefix will be /docs, which identifies all + /// objects in the docs/ folder. Required when the parent element + /// Condition is specified and sibling HttpErrorCodeReturnedEquals + /// is not specified. If both conditions are specified, both must be true for the redirect to + /// be applied.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    pub key_prefix_equals: Option, } impl fmt::Debug for Condition { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Condition"); -if let Some(ref val) = self.http_error_code_returned_equals { -d.field("http_error_code_returned_equals", val); -} -if let Some(ref val) = self.key_prefix_equals { -d.field("key_prefix_equals", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Condition"); + if let Some(ref val) = self.http_error_code_returned_equals { + d.field("http_error_code_returned_equals", val); + } + if let Some(ref val) = self.key_prefix_equals { + d.field("key_prefix_equals", val); + } + d.finish_non_exhaustive() + } } - pub type ConfirmRemoveSelfBucketAccess = bool; pub type ContentDisposition = String; @@ -1880,955 +1837,948 @@ pub type ContentMD5 = String; pub type ContentRange = String; - ///

    #[derive(Clone, Default, PartialEq)] -pub struct ContinuationEvent { -} +pub struct ContinuationEvent {} impl fmt::Debug for ContinuationEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ContinuationEvent"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ContinuationEvent"); + d.finish_non_exhaustive() + } } - #[derive(Clone, PartialEq)] pub struct CopyObjectInput { -///

    The canned access control list (ACL) to apply to the object.

    -///

    When you copy an object, the ACL metadata is not preserved and is set to -/// private by default. Only the owner has full access control. To override the -/// default ACL setting, specify a new ACL when you generate a copy request. For more -/// information, see Using ACLs.

    -///

    If the destination bucket that you're copying objects to uses the bucket owner enforced -/// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. -/// Buckets that use this setting only accept PUT requests that don't specify an -/// ACL or PUT requests that specify bucket owner full control ACLs, such as the -/// bucket-owner-full-control canned ACL or an equivalent form of this ACL -/// expressed in the XML format. For more information, see Controlling ownership of -/// objects and disabling ACLs in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      If your destination bucket uses the bucket owner enforced setting for Object -/// Ownership, all objects written to the bucket by any account will be owned by the -/// bucket owner.

      -///
    • -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    The canned access control list (ACL) to apply to the object.

    + ///

    When you copy an object, the ACL metadata is not preserved and is set to + /// private by default. Only the owner has full access control. To override the + /// default ACL setting, specify a new ACL when you generate a copy request. For more + /// information, see Using ACLs.

    + ///

    If the destination bucket that you're copying objects to uses the bucket owner enforced + /// setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions. + /// Buckets that use this setting only accept PUT requests that don't specify an + /// ACL or PUT requests that specify bucket owner full control ACLs, such as the + /// bucket-owner-full-control canned ACL or an equivalent form of this ACL + /// expressed in the XML format. For more information, see Controlling ownership of + /// objects and disabling ACLs in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      If your destination bucket uses the bucket owner enforced setting for Object + /// Ownership, all objects written to the bucket by any account will be owned by the + /// bucket owner.

      + ///
    • + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub acl: Option, -///

    The name of the destination bucket.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -/// -///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, -/// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    -///
    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. -/// -/// You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. -/// For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. -/// When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format -/// -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs. -///

    + ///

    The name of the destination bucket.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + /// + ///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, + /// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    + ///
    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must use the Outpost bucket access point ARN or the access point alias for the destination bucket. + /// + /// You can only copy objects within the same Outpost bucket. It's not supported to copy objects across different Amazon Web Services Outposts, between buckets on the same Outposts, or between Outposts buckets and any other bucket types. + /// For more information about S3 on Outposts, see What is S3 on Outposts? in the S3 on Outposts guide. + /// When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname, in the format + /// + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs. + ///

    pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses -/// SSE-KMS, you can enable an S3 Bucket Key for the object.

    -///

    Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object -/// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect -/// bucket-level settings for S3 Bucket Key.

    -///

    For more information, see Amazon S3 Bucket Keys in the -/// Amazon S3 User Guide.

    -/// -///

    -/// Directory buckets - -/// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    -///
    + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS). If a target object uses + /// SSE-KMS, you can enable an S3 Bucket Key for the object.

    + ///

    Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object + /// encryption with SSE-KMS. Specifying this header with a COPY action doesn’t affect + /// bucket-level settings for S3 Bucket Key.

    + ///

    For more information, see Amazon S3 Bucket Keys in the + /// Amazon S3 User Guide.

    + /// + ///

    + /// Directory buckets - + /// S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + ///
    pub bucket_key_enabled: Option, -///

    Specifies the caching behavior along the request/reply chain.

    + ///

    Specifies the caching behavior along the request/reply chain.

    pub cache_control: Option, -///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see -/// Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    When you copy an object, if the source object has a checksum, that checksum value will -/// be copied to the new object by default. If the CopyObject request does not -/// include this x-amz-checksum-algorithm header, the checksum algorithm will be -/// copied from the source object to the destination object (if it's present on the source -/// object). You can optionally specify a different checksum algorithm to use with the -/// x-amz-checksum-algorithm header. Unrecognized or unsupported values will -/// respond with the HTTP status code 400 Bad Request.

    -/// -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    -///
    + ///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see + /// Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    When you copy an object, if the source object has a checksum, that checksum value will + /// be copied to the new object by default. If the CopyObject request does not + /// include this x-amz-checksum-algorithm header, the checksum algorithm will be + /// copied from the source object to the destination object (if it's present on the source + /// object). You can optionally specify a different checksum algorithm to use with the + /// x-amz-checksum-algorithm header. Unrecognized or unsupported values will + /// respond with the HTTP status code 400 Bad Request.

    + /// + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + ///
    pub checksum_algorithm: Option, -///

    Specifies presentational information for the object. Indicates whether an object should -/// be displayed in a web browser or downloaded as a file. It allows specifying the desired -/// filename for the downloaded file.

    + ///

    Specifies presentational information for the object. Indicates whether an object should + /// be displayed in a web browser or downloaded as a file. It allows specifying the desired + /// filename for the downloaded file.

    pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    -/// -///

    For directory buckets, only the aws-chunked value is supported in this header field.

    -///
    + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + /// + ///

    For directory buckets, only the aws-chunked value is supported in this header field.

    + ///
    pub content_encoding: Option, -///

    The language the content is in.

    + ///

    The language the content is in.

    pub content_language: Option, -///

    A standard MIME type that describes the format of the object data.

    + ///

    A standard MIME type that describes the format of the object data.

    pub content_type: Option, -///

    Specifies the source object for the copy operation. The source object can be up to 5 GB. -/// If the source object is an object that was uploaded by using a multipart upload, the object -/// copy will be a single part object after the source object is copied to the destination -/// bucket.

    -///

    You specify the value of the copy source in one of two formats, depending on whether you -/// want to access the source object through an access point:

    -///
      -///
    • -///

      For objects not accessed through an access point, specify the name of the source bucket -/// and the key of the source object, separated by a slash (/). For example, to copy the -/// object reports/january.pdf from the general purpose bucket -/// awsexamplebucket, use -/// awsexamplebucket/reports/january.pdf. The value must be URL-encoded. -/// To copy the object reports/january.pdf from the directory bucket -/// awsexamplebucket--use1-az5--x-s3, use -/// awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must -/// be URL-encoded.

      -///
    • -///
    • -///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      -/// -///
        -///
      • -///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        -///
      • -///
      • -///

        Access points are not supported by directory buckets.

        -///
      • -///
      -///
      -///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      -///
    • -///
    -///

    If your source bucket versioning is enabled, the x-amz-copy-source header -/// by default identifies the current version of an object to copy. If the current version is a -/// delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use -/// the versionId query parameter. Specifically, append -/// ?versionId=<version-id> to the value (for example, -/// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). -/// If you don't specify a version ID, Amazon S3 copies the latest version of the source -/// object.

    -///

    If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID -/// for the copied object. This version ID is different from the version ID of the source -/// object. Amazon S3 returns the version ID of the copied object in the -/// x-amz-version-id response header in the response.

    -///

    If you do not enable versioning or suspend it on the destination bucket, the version ID -/// that Amazon S3 generates in the x-amz-version-id response header is always -/// null.

    -/// -///

    -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets.

    -///
    + ///

    Specifies the source object for the copy operation. The source object can be up to 5 GB. + /// If the source object is an object that was uploaded by using a multipart upload, the object + /// copy will be a single part object after the source object is copied to the destination + /// bucket.

    + ///

    You specify the value of the copy source in one of two formats, depending on whether you + /// want to access the source object through an access point:

    + ///
      + ///
    • + ///

      For objects not accessed through an access point, specify the name of the source bucket + /// and the key of the source object, separated by a slash (/). For example, to copy the + /// object reports/january.pdf from the general purpose bucket + /// awsexamplebucket, use + /// awsexamplebucket/reports/january.pdf. The value must be URL-encoded. + /// To copy the object reports/january.pdf from the directory bucket + /// awsexamplebucket--use1-az5--x-s3, use + /// awsexamplebucket--use1-az5--x-s3/reports/january.pdf. The value must + /// be URL-encoded.

      + ///
    • + ///
    • + ///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      + /// + ///
        + ///
      • + ///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        + ///
      • + ///
      • + ///

        Access points are not supported by directory buckets.

        + ///
      • + ///
      + ///
      + ///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      + ///
    • + ///
    + ///

    If your source bucket versioning is enabled, the x-amz-copy-source header + /// by default identifies the current version of an object to copy. If the current version is a + /// delete marker, Amazon S3 behaves as if the object was deleted. To copy a different version, use + /// the versionId query parameter. Specifically, append + /// ?versionId=<version-id> to the value (for example, + /// awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893). + /// If you don't specify a version ID, Amazon S3 copies the latest version of the source + /// object.

    + ///

    If you enable versioning on the destination bucket, Amazon S3 generates a unique version ID + /// for the copied object. This version ID is different from the version ID of the source + /// object. Amazon S3 returns the version ID of the copied object in the + /// x-amz-version-id response header in the response.

    + ///

    If you do not enable versioning or suspend it on the destination bucket, the version ID + /// that Amazon S3 generates in the x-amz-version-id response header is always + /// null.

    + /// + ///

    + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets.

    + ///
    pub copy_source: CopySource, -///

    Copies the object if its entity tag (ETag) matches the specified tag.

    -///

    If both the x-amz-copy-source-if-match and -/// x-amz-copy-source-if-unmodified-since headers are present in the request -/// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    -///
      -///
    • -///

      -/// x-amz-copy-source-if-match condition evaluates to true

      -///
    • -///
    • -///

      -/// x-amz-copy-source-if-unmodified-since condition evaluates to -/// false

      -///
    • -///
    + ///

    Copies the object if its entity tag (ETag) matches the specified tag.

    + ///

    If both the x-amz-copy-source-if-match and + /// x-amz-copy-source-if-unmodified-since headers are present in the request + /// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    + ///
      + ///
    • + ///

      + /// x-amz-copy-source-if-match condition evaluates to true

      + ///
    • + ///
    • + ///

      + /// x-amz-copy-source-if-unmodified-since condition evaluates to + /// false

      + ///
    • + ///
    pub copy_source_if_match: Option, -///

    Copies the object if it has been modified since the specified time.

    -///

    If both the x-amz-copy-source-if-none-match and -/// x-amz-copy-source-if-modified-since headers are present in the request and -/// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response -/// code:

    -///
      -///
    • -///

      -/// x-amz-copy-source-if-none-match condition evaluates to false

      -///
    • -///
    • -///

      -/// x-amz-copy-source-if-modified-since condition evaluates to -/// true

      -///
    • -///
    + ///

    Copies the object if it has been modified since the specified time.

    + ///

    If both the x-amz-copy-source-if-none-match and + /// x-amz-copy-source-if-modified-since headers are present in the request and + /// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response + /// code:

    + ///
      + ///
    • + ///

      + /// x-amz-copy-source-if-none-match condition evaluates to false

      + ///
    • + ///
    • + ///

      + /// x-amz-copy-source-if-modified-since condition evaluates to + /// true

      + ///
    • + ///
    pub copy_source_if_modified_since: Option, -///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    -///

    If both the x-amz-copy-source-if-none-match and -/// x-amz-copy-source-if-modified-since headers are present in the request and -/// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response -/// code:

    -///
      -///
    • -///

      -/// x-amz-copy-source-if-none-match condition evaluates to false

      -///
    • -///
    • -///

      -/// x-amz-copy-source-if-modified-since condition evaluates to -/// true

      -///
    • -///
    + ///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    + ///

    If both the x-amz-copy-source-if-none-match and + /// x-amz-copy-source-if-modified-since headers are present in the request and + /// evaluate as follows, Amazon S3 returns the 412 Precondition Failed response + /// code:

    + ///
      + ///
    • + ///

      + /// x-amz-copy-source-if-none-match condition evaluates to false

      + ///
    • + ///
    • + ///

      + /// x-amz-copy-source-if-modified-since condition evaluates to + /// true

      + ///
    • + ///
    pub copy_source_if_none_match: Option, -///

    Copies the object if it hasn't been modified since the specified time.

    -///

    If both the x-amz-copy-source-if-match and -/// x-amz-copy-source-if-unmodified-since headers are present in the request -/// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    -///
      -///
    • -///

      -/// x-amz-copy-source-if-match condition evaluates to true

      -///
    • -///
    • -///

      -/// x-amz-copy-source-if-unmodified-since condition evaluates to -/// false

      -///
    • -///
    + ///

    Copies the object if it hasn't been modified since the specified time.

    + ///

    If both the x-amz-copy-source-if-match and + /// x-amz-copy-source-if-unmodified-since headers are present in the request + /// and evaluate as follows, Amazon S3 returns 200 OK and copies the data:

    + ///
      + ///
    • + ///

      + /// x-amz-copy-source-if-match condition evaluates to true

      + ///
    • + ///
    • + ///

      + /// x-amz-copy-source-if-unmodified-since condition evaluates to + /// false

      + ///
    • + ///
    pub copy_source_if_unmodified_since: Option, -///

    Specifies the algorithm to use when decrypting the source object (for example, -/// AES256).

    -///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the -/// necessary encryption information in your request so that Amazon S3 can decrypt the object for -/// copying.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    + ///

    Specifies the algorithm to use when decrypting the source object (for example, + /// AES256).

    + ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the + /// necessary encryption information in your request so that Amazon S3 can decrypt the object for + /// copying.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    pub copy_source_sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source -/// object. The encryption key provided in this header must be the same one that was used when -/// the source object was created.

    -///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the -/// necessary encryption information in your request so that Amazon S3 can decrypt the object for -/// copying.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    + ///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source + /// object. The encryption key provided in this header must be the same one that was used when + /// the source object was created.

    + ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the + /// necessary encryption information in your request so that Amazon S3 can decrypt the object for + /// copying.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    pub copy_source_sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the -/// necessary encryption information in your request so that Amazon S3 can decrypt the object for -/// copying.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + ///

    If the source object for the copy is stored in Amazon S3 using SSE-C, you must provide the + /// necessary encryption information in your request so that Amazon S3 can decrypt the object for + /// copying.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    pub copy_source_sse_customer_key_md5: Option, -///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_source_bucket_owner: Option, -///

    The date and time at which the object is no longer cacheable.

    + ///

    The date and time at which the object is no longer cacheable.

    pub expires: Option, -///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_full_control: Option, -///

    Allows grantee to read the object data and its metadata.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Allows grantee to read the object data and its metadata.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_read: Option, -///

    Allows grantee to read the object ACL.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Allows grantee to read the object ACL.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_read_acp: Option, -///

    Allows grantee to write the ACL for the applicable object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Allows grantee to write the ACL for the applicable object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_write_acp: Option, -///

    The key of the destination object.

    + ///

    The key of the destination object.

    pub key: ObjectKey, -///

    A map of metadata to store with the object in S3.

    + ///

    A map of metadata to store with the object in S3.

    pub metadata: Option, -///

    Specifies whether the metadata is copied from the source object or replaced with -/// metadata that's provided in the request. When copying an object, you can preserve all -/// metadata (the default) or specify new metadata. If this header isn’t specified, -/// COPY is the default behavior.

    -///

    -/// General purpose bucket - For general purpose buckets, when you -/// grant permissions, you can use the s3:x-amz-metadata-directive condition key -/// to enforce certain metadata behavior when objects are uploaded. For more information, see -/// Amazon S3 -/// condition key examples in the Amazon S3 User Guide.

    -/// -///

    -/// x-amz-website-redirect-location is unique to each object and is not -/// copied when using the x-amz-metadata-directive header. To copy the value, -/// you must specify x-amz-website-redirect-location in the request -/// header.

    -///
    + ///

    Specifies whether the metadata is copied from the source object or replaced with + /// metadata that's provided in the request. When copying an object, you can preserve all + /// metadata (the default) or specify new metadata. If this header isn’t specified, + /// COPY is the default behavior.

    + ///

    + /// General purpose bucket - For general purpose buckets, when you + /// grant permissions, you can use the s3:x-amz-metadata-directive condition key + /// to enforce certain metadata behavior when objects are uploaded. For more information, see + /// Amazon S3 + /// condition key examples in the Amazon S3 User Guide.

    + /// + ///

    + /// x-amz-website-redirect-location is unique to each object and is not + /// copied when using the x-amz-metadata-directive header. To copy the value, + /// you must specify x-amz-website-redirect-location in the request + /// header.

    + ///
    pub metadata_directive: Option, -///

    Specifies whether you want to apply a legal hold to the object copy.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies whether you want to apply a legal hold to the object copy.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode that you want to apply to the object copy.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The Object Lock mode that you want to apply to the object copy.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_mode: Option, -///

    The date and time when you want the Object Lock of the object copy to expire.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The date and time when you want the Object Lock of the object copy to expire.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_retain_until_date: Option, pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, -/// AES256).

    -///

    When you perform a CopyObject operation, if you want to use a different -/// type of encryption setting for the target object, you can specify appropriate -/// encryption-related headers to encrypt the target object with an Amazon S3 managed key, a -/// KMS key, or a customer-provided key. If the encryption setting in your request is -/// different from the default encryption configuration of the destination bucket, the -/// encryption setting in your request takes precedence.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    + ///

    Specifies the algorithm to use when encrypting the object (for example, + /// AES256).

    + ///

    When you perform a CopyObject operation, if you want to use a different + /// type of encryption setting for the target object, you can specify appropriate + /// encryption-related headers to encrypt the target object with an Amazon S3 managed key, a + /// KMS key, or a customer-provided key. If the encryption setting in your request is + /// different from the default encryption configuration of the destination bucket, the + /// encryption setting in your request takes precedence.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded. Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded. Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    pub sse_customer_key_md5: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use -/// for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

    -///

    -/// General purpose buckets - This value must be explicitly -/// added to specify encryption context for CopyObject requests if you want an -/// additional encryption context for your destination object. The additional encryption -/// context of the source object won't be copied to the destination object. For more -/// information, see Encryption -/// context in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use + /// for the destination object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs.

    + ///

    + /// General purpose buckets - This value must be explicitly + /// added to specify encryption context for CopyObject requests if you want an + /// additional encryption context for your destination object. The additional encryption + /// context of the source object won't be copied to the destination object. For more + /// information, see Encryption + /// context in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, -///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. -/// All GET and PUT requests for an object protected by KMS will fail if they're not made via -/// SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services -/// SDKs and Amazon Web Services CLI, see Specifying the -/// Signature Version in Request Authentication in the -/// Amazon S3 User Guide.

    -///

    -/// Directory buckets - -/// To encrypt data using SSE-KMS, it's recommended to specify the -/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses -/// the bucket's default KMS customer managed key ID. If you want to explicitly set the -/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -/// -/// Incorrect key specification results in an HTTP 400 Bad Request error.

    + ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. + /// All GET and PUT requests for an object protected by KMS will fail if they're not made via + /// SSL or using SigV4. For information about configuring any of the officially supported Amazon Web Services + /// SDKs and Amazon Web Services CLI, see Specifying the + /// Signature Version in Request Authentication in the + /// Amazon S3 User Guide.

    + ///

    + /// Directory buckets - + /// To encrypt data using SSE-KMS, it's recommended to specify the + /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses + /// the bucket's default KMS customer managed key ID. If you want to explicitly set the + /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + /// + /// Incorrect key specification results in an HTTP 400 Bad Request error.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized -/// or unsupported values won’t write a destination object and will receive a 400 Bad -/// Request response.

    -///

    Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When -/// copying an object, if you don't specify encryption information in your copy request, the -/// encryption setting of the target object is set to the default encryption configuration of -/// the destination bucket. By default, all buckets have a base level of encryption -/// configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the -/// destination bucket has a different default encryption configuration, Amazon S3 uses the -/// corresponding encryption key to encrypt the target object copy.

    -///

    With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in -/// its data centers and decrypts the data when you access it. For more information about -/// server-side encryption, see Using Server-Side Encryption -/// in the Amazon S3 User Guide.

    -///

    -/// General purpose buckets -///

    -///
      -///
    • -///

      For general purpose buckets, there are the following supported options for server-side -/// encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer -/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption -/// with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding -/// KMS key, or a customer-provided key to encrypt the target object copy.

      -///
    • -///
    • -///

      When you perform a CopyObject operation, if you want to use a -/// different type of encryption setting for the target object, you can specify -/// appropriate encryption-related headers to encrypt the target object with an Amazon S3 -/// managed key, a KMS key, or a customer-provided key. If the encryption setting in -/// your request is different from the default encryption configuration of the -/// destination bucket, the encryption setting in your request takes precedence.

      -///
    • -///
    -///

    -/// Directory buckets -///

    -///
      -///
    • -///

      For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///
    • -///
    • -///

      To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you -/// specify SSE-KMS as the directory bucket's default encryption configuration with -/// a KMS key (specifically, a customer managed key). -/// The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS -/// configuration can only support 1 customer managed key per -/// directory bucket for the lifetime of the bucket. After you specify a customer managed key for -/// SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS -/// configuration. Then, when you perform a CopyObject operation and want to -/// specify server-side encryption settings for new object copies with SSE-KMS in the -/// encryption-related request headers, you must ensure the encryption key is the same -/// customer managed key that you specified for the directory bucket's default encryption -/// configuration. -///

      -///
    • -///
    + ///

    The server-side encryption algorithm used when storing this object in Amazon S3. Unrecognized + /// or unsupported values won’t write a destination object and will receive a 400 Bad + /// Request response.

    + ///

    Amazon S3 automatically encrypts all new objects that are copied to an S3 bucket. When + /// copying an object, if you don't specify encryption information in your copy request, the + /// encryption setting of the target object is set to the default encryption configuration of + /// the destination bucket. By default, all buckets have a base level of encryption + /// configuration that uses server-side encryption with Amazon S3 managed keys (SSE-S3). If the + /// destination bucket has a different default encryption configuration, Amazon S3 uses the + /// corresponding encryption key to encrypt the target object copy.

    + ///

    With server-side encryption, Amazon S3 encrypts your data as it writes your data to disks in + /// its data centers and decrypts the data when you access it. For more information about + /// server-side encryption, see Using Server-Side Encryption + /// in the Amazon S3 User Guide.

    + ///

    + /// General purpose buckets + ///

    + ///
      + ///
    • + ///

      For general purpose buckets, there are the following supported options for server-side + /// encryption: server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer + /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), and server-side encryption + /// with customer-provided encryption keys (SSE-C). Amazon S3 uses the corresponding + /// KMS key, or a customer-provided key to encrypt the target object copy.

      + ///
    • + ///
    • + ///

      When you perform a CopyObject operation, if you want to use a + /// different type of encryption setting for the target object, you can specify + /// appropriate encryption-related headers to encrypt the target object with an Amazon S3 + /// managed key, a KMS key, or a customer-provided key. If the encryption setting in + /// your request is different from the default encryption configuration of the + /// destination bucket, the encryption setting in your request takes precedence.

      + ///
    • + ///
    + ///

    + /// Directory buckets + ///

    + ///
      + ///
    • + ///

      For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///
    • + ///
    • + ///

      To encrypt new object copies to a directory bucket with SSE-KMS, we recommend you + /// specify SSE-KMS as the directory bucket's default encryption configuration with + /// a KMS key (specifically, a customer managed key). + /// The Amazon Web Services managed key (aws/s3) isn't supported. Your SSE-KMS + /// configuration can only support 1 customer managed key per + /// directory bucket for the lifetime of the bucket. After you specify a customer managed key for + /// SSE-KMS, you can't override the customer managed key for the bucket's SSE-KMS + /// configuration. Then, when you perform a CopyObject operation and want to + /// specify server-side encryption settings for new object copies with SSE-KMS in the + /// encryption-related request headers, you must ensure the encryption key is the same + /// customer managed key that you specified for the directory bucket's default encryption + /// configuration. + ///

      + ///
    • + ///
    pub server_side_encryption: Option, -///

    If the x-amz-storage-class header is not used, the copied object will be -/// stored in the STANDARD Storage Class by default. The STANDARD -/// storage class provides high durability and high availability. Depending on performance -/// needs, you can specify a different Storage Class.

    -/// -///
      -///
    • -///

      -/// Directory buckets - -/// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. -/// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

      -///
    • -///
    • -///

      -/// Amazon S3 on Outposts - S3 on Outposts only -/// uses the OUTPOSTS Storage Class.

      -///
    • -///
    -///
    -///

    You can use the CopyObject action to change the storage class of an object -/// that is already stored in Amazon S3 by using the x-amz-storage-class header. For -/// more information, see Storage Classes in the -/// Amazon S3 User Guide.

    -///

    Before using an object as a source object for the copy operation, you must restore a -/// copy of it if it meets any of the following conditions:

    -///
      -///
    • -///

      The storage class of the source object is GLACIER or -/// DEEP_ARCHIVE.

      -///
    • -///
    • -///

      The storage class of the source object is INTELLIGENT_TIERING and -/// it's S3 Intelligent-Tiering access tier is Archive Access or -/// Deep Archive Access.

      -///
    • -///
    -///

    For more information, see RestoreObject and Copying -/// Objects in the Amazon S3 User Guide.

    + ///

    If the x-amz-storage-class header is not used, the copied object will be + /// stored in the STANDARD Storage Class by default. The STANDARD + /// storage class provides high durability and high availability. Depending on performance + /// needs, you can specify a different Storage Class.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. + /// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

      + ///
    • + ///
    • + ///

      + /// Amazon S3 on Outposts - S3 on Outposts only + /// uses the OUTPOSTS Storage Class.

      + ///
    • + ///
    + ///
    + ///

    You can use the CopyObject action to change the storage class of an object + /// that is already stored in Amazon S3 by using the x-amz-storage-class header. For + /// more information, see Storage Classes in the + /// Amazon S3 User Guide.

    + ///

    Before using an object as a source object for the copy operation, you must restore a + /// copy of it if it meets any of the following conditions:

    + ///
      + ///
    • + ///

      The storage class of the source object is GLACIER or + /// DEEP_ARCHIVE.

      + ///
    • + ///
    • + ///

      The storage class of the source object is INTELLIGENT_TIERING and + /// it's S3 Intelligent-Tiering access tier is Archive Access or + /// Deep Archive Access.

      + ///
    • + ///
    + ///

    For more information, see RestoreObject and Copying + /// Objects in the Amazon S3 User Guide.

    pub storage_class: Option, -///

    The tag-set for the object copy in the destination bucket. This value must be used in -/// conjunction with the x-amz-tagging-directive if you choose -/// REPLACE for the x-amz-tagging-directive. If you choose -/// COPY for the x-amz-tagging-directive, you don't need to set -/// the x-amz-tagging header, because the tag-set will be copied from the source -/// object directly. The tag-set must be encoded as URL Query parameters.

    -///

    The default value is the empty value.

    -/// -///

    -/// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. -/// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    -///
      -///
    • -///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      -///
    • -///
    • -///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      -///
    • -///
    -///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    -///
      -///
    • -///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      -///
    • -///
    -///
    + ///

    The tag-set for the object copy in the destination bucket. This value must be used in + /// conjunction with the x-amz-tagging-directive if you choose + /// REPLACE for the x-amz-tagging-directive. If you choose + /// COPY for the x-amz-tagging-directive, you don't need to set + /// the x-amz-tagging header, because the tag-set will be copied from the source + /// object directly. The tag-set must be encoded as URL Query parameters.

    + ///

    The default value is the empty value.

    + /// + ///

    + /// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. + /// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    + ///
      + ///
    • + ///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      + ///
    • + ///
    • + ///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      + ///
    • + ///
    + ///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    + ///
      + ///
    • + ///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      + ///
    • + ///
    + ///
    pub tagging: Option, -///

    Specifies whether the object tag-set is copied from the source object or replaced with -/// the tag-set that's provided in the request.

    -///

    The default value is COPY.

    -/// -///

    -/// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. -/// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    -///
      -///
    • -///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      -///
    • -///
    • -///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      -///
    • -///
    -///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    -///
      -///
    • -///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      -///
    • -///
    • -///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      -///
    • -///
    -///
    + ///

    Specifies whether the object tag-set is copied from the source object or replaced with + /// the tag-set that's provided in the request.

    + ///

    The default value is COPY.

    + /// + ///

    + /// Directory buckets - For directory buckets in a CopyObject operation, only the empty tag-set is supported. Any requests that attempt to write non-empty tags into directory buckets will receive a 501 Not Implemented status code. + /// When the destination bucket is a directory bucket, you will receive a 501 Not Implemented response in any of the following situations:

    + ///
      + ///
    • + ///

      When you attempt to COPY the tag-set from an S3 source object that has non-empty tags.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a source object and set a non-empty value to x-amz-tagging.

      + ///
    • + ///
    • + ///

      When you don't set the x-amz-tagging-directive header and the source object has non-empty tags. This is because the default value of x-amz-tagging-directive is COPY.

      + ///
    • + ///
    + ///

    Because only the empty tag-set is supported for directory buckets in a CopyObject operation, the following situations are allowed:

    + ///
      + ///
    • + ///

      When you attempt to COPY the tag-set from a directory bucket source object that has no tags to a general purpose bucket. It copies an empty tag-set to the destination object.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and set the x-amz-tagging value of the directory bucket destination object to empty.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a general purpose bucket source object that has non-empty tags and set the x-amz-tagging value of the directory bucket destination object to empty.

      + ///
    • + ///
    • + ///

      When you attempt to REPLACE the tag-set of a directory bucket source object and don't set the x-amz-tagging value of the directory bucket destination object. This is because the default value of x-amz-tagging is the empty value.

      + ///
    • + ///
    + ///
    pub tagging_directive: Option, pub version_id: Option, -///

    If the destination bucket is configured as a website, redirects requests for this object -/// copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of -/// this header in the object metadata. This value is unique to each object and is not copied -/// when using the x-amz-metadata-directive header. Instead, you may opt to -/// provide this header in combination with the x-amz-metadata-directive -/// header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If the destination bucket is configured as a website, redirects requests for this object + /// copy to another object in the same bucket or to an external URL. Amazon S3 stores the value of + /// this header in the object metadata. This value is unique to each object and is not copied + /// when using the x-amz-metadata-directive header. Instead, you may opt to + /// provide this header in combination with the x-amz-metadata-directive + /// header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub website_redirect_location: Option, } impl fmt::Debug for CopyObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CopyObjectInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -d.field("copy_source", &self.copy_source); -if let Some(ref val) = self.copy_source_if_match { -d.field("copy_source_if_match", val); -} -if let Some(ref val) = self.copy_source_if_modified_since { -d.field("copy_source_if_modified_since", val); -} -if let Some(ref val) = self.copy_source_if_none_match { -d.field("copy_source_if_none_match", val); -} -if let Some(ref val) = self.copy_source_if_unmodified_since { -d.field("copy_source_if_unmodified_since", val); -} -if let Some(ref val) = self.copy_source_sse_customer_algorithm { -d.field("copy_source_sse_customer_algorithm", val); -} -if let Some(ref val) = self.copy_source_sse_customer_key { -d.field("copy_source_sse_customer_key", val); -} -if let Some(ref val) = self.copy_source_sse_customer_key_md5 { -d.field("copy_source_sse_customer_key_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.expected_source_bucket_owner { -d.field("expected_source_bucket_owner", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.metadata_directive { -d.field("metadata_directive", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tagging { -d.field("tagging", val); -} -if let Some(ref val) = self.tagging_directive { -d.field("tagging_directive", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -d.finish_non_exhaustive() -} -} - -impl CopyObjectInput { -#[must_use] -pub fn builder() -> builders::CopyObjectInputBuilder { -default() + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CopyObjectInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + d.field("copy_source", &self.copy_source); + if let Some(ref val) = self.copy_source_if_match { + d.field("copy_source_if_match", val); + } + if let Some(ref val) = self.copy_source_if_modified_since { + d.field("copy_source_if_modified_since", val); + } + if let Some(ref val) = self.copy_source_if_none_match { + d.field("copy_source_if_none_match", val); + } + if let Some(ref val) = self.copy_source_if_unmodified_since { + d.field("copy_source_if_unmodified_since", val); + } + if let Some(ref val) = self.copy_source_sse_customer_algorithm { + d.field("copy_source_sse_customer_algorithm", val); + } + if let Some(ref val) = self.copy_source_sse_customer_key { + d.field("copy_source_sse_customer_key", val); + } + if let Some(ref val) = self.copy_source_sse_customer_key_md5 { + d.field("copy_source_sse_customer_key_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expected_source_bucket_owner { + d.field("expected_source_bucket_owner", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.metadata_directive { + d.field("metadata_directive", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.tagging_directive { + d.field("tagging_directive", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + d.finish_non_exhaustive() + } } + +impl CopyObjectInput { + #[must_use] + pub fn builder() -> builders::CopyObjectInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct CopyObjectOutput { -///

    Indicates whether the copied object uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    + ///

    Indicates whether the copied object uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    pub bucket_key_enabled: Option, -///

    Container for all response elements.

    + ///

    Container for all response elements.

    pub copy_object_result: Option, -///

    Version ID of the source object that was copied.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    + ///

    Version ID of the source object that was copied.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    pub copy_source_version_id: Option, -///

    If the object expiration is configured, the response includes this header.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    + ///

    If the object expiration is configured, the response includes this header.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    pub expiration: Option, pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key_md5: Option, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The -/// value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption -/// context key-value pairs.

    + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The + /// value of this header is a Base64 encoded UTF-8 string holding JSON with the encryption + /// context key-value pairs.

    pub ssekms_encryption_context: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms, aws:kms:dsse).

    + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms, aws:kms:dsse).

    pub server_side_encryption: Option, -///

    Version ID of the newly created copy.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Version ID of the newly created copy.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub version_id: Option, } impl fmt::Debug for CopyObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CopyObjectOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.copy_object_result { -d.field("copy_object_result", val); -} -if let Some(ref val) = self.copy_source_version_id { -d.field("copy_source_version_id", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CopyObjectOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.copy_object_result { + d.field("copy_object_result", val); + } + if let Some(ref val) = self.copy_source_version_id { + d.field("copy_source_version_id", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - ///

    Container for all response elements.

    #[derive(Clone, Default, PartialEq)] pub struct CopyObjectResult { -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present -/// if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a -/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This checksum is present + /// if the object being copied was uploaded with the CRC64NVME checksum algorithm, or if the object was uploaded without a + /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    Returns the ETag of the new object. The ETag reflects only changes to the contents of an -/// object, not its metadata.

    + ///

    Returns the ETag of the new object. The ETag reflects only changes to the contents of an + /// object, not its metadata.

    pub e_tag: Option, -///

    Creation date of the object.

    + ///

    Creation date of the object.

    pub last_modified: Option, } impl fmt::Debug for CopyObjectResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CopyObjectResult"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CopyObjectResult"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + d.finish_non_exhaustive() + } } - ///

    Container for all response elements.

    #[derive(Clone, Default, PartialEq)] pub struct CopyPartResult { -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the part. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the part. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the part. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the part. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC64NVME checksum algorithm to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 checksum of the part. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 checksum of the part. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 checksum of the part. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 checksum of the part. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    pub checksum_sha256: Option, -///

    Entity tag of the object.

    + ///

    Entity tag of the object.

    pub e_tag: Option, -///

    Date and time at which the object was uploaded.

    + ///

    Date and time at which the object was uploaded.

    pub last_modified: Option, } impl fmt::Debug for CopyPartResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CopyPartResult"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CopyPartResult"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + d.finish_non_exhaustive() + } } - - pub type CopySourceIfMatch = ETagCondition; pub type CopySourceIfModifiedSince = Timestamp; @@ -2850,1121 +2800,1113 @@ pub type CopySourceVersionId = String; ///

    The configuration information for the bucket.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct CreateBucketConfiguration { -///

    Specifies the information about the bucket that will be created.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    + ///

    Specifies the information about the bucket that will be created.

    + /// + ///

    This functionality is only supported by directory buckets.

    + ///
    pub bucket: Option, -///

    Specifies the location where the bucket will be created.

    -///

    -/// Directory buckets - The location type is Availability Zone or Local Zone. -/// To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the -/// error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide. -///

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    + ///

    Specifies the location where the bucket will be created.

    + ///

    + /// Directory buckets - The location type is Availability Zone or Local Zone. + /// To use the Local Zone location type, your account must be enabled for Dedicated Local Zones. Otherwise, you get an HTTP 403 Forbidden error with the + /// error code AccessDenied. To learn more, see Enable accounts for Dedicated Local Zones in the Amazon S3 User Guide. + ///

    + /// + ///

    This functionality is only supported by directory buckets.

    + ///
    pub location: Option, -///

    Specifies the Region where the bucket will be created. You might choose a Region to -/// optimize latency, minimize costs, or address regulatory requirements. For example, if you -/// reside in Europe, you will probably find it advantageous to create buckets in the Europe -/// (Ireland) Region.

    -///

    If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region -/// (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

    -///

    For a list of the valid values for all of the Amazon Web Services Regions, see Regions and -/// Endpoints.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the Region where the bucket will be created. You might choose a Region to + /// optimize latency, minimize costs, or address regulatory requirements. For example, if you + /// reside in Europe, you will probably find it advantageous to create buckets in the Europe + /// (Ireland) Region.

    + ///

    If you don't specify a Region, the bucket is created in the US East (N. Virginia) Region + /// (us-east-1) by default. Configurations using the value EU will create a bucket in eu-west-1.

    + ///

    For a list of the valid values for all of the Amazon Web Services Regions, see Regions and + /// Endpoints.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub location_constraint: Option, } impl fmt::Debug for CreateBucketConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketConfiguration"); -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.location { -d.field("location", val); -} -if let Some(ref val) = self.location_constraint { -d.field("location_constraint", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketConfiguration"); + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.location { + d.field("location", val); + } + if let Some(ref val) = self.location_constraint { + d.field("location_constraint", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct CreateBucketInput { -///

    The canned ACL to apply to the bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The canned ACL to apply to the bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub acl: Option, -///

    The name of the bucket to create.

    -///

    -/// General purpose buckets - For information about bucket naming -/// restrictions, see Bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    + ///

    The name of the bucket to create.

    + ///

    + /// General purpose buckets - For information about bucket naming + /// restrictions, see Bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    pub bucket: BucketName, -///

    The configuration information for the bucket.

    + ///

    The configuration information for the bucket.

    pub create_bucket_configuration: Option, -///

    Allows grantee the read, write, read ACP, and write ACP permissions on the -/// bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the + /// bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_full_control: Option, -///

    Allows grantee to list the objects in the bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee to list the objects in the bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_read: Option, -///

    Allows grantee to read the bucket ACL.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee to read the bucket ACL.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_read_acp: Option, -///

    Allows grantee to create new objects in the bucket.

    -///

    For the bucket and object owners of existing objects, also allows deletions and -/// overwrites of those objects.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee to create new objects in the bucket.

    + ///

    For the bucket and object owners of existing objects, also allows deletions and + /// overwrites of those objects.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_write: Option, -///

    Allows grantee to write the ACL for the applicable bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Allows grantee to write the ACL for the applicable bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub grant_write_acp: Option, -///

    Specifies whether you want S3 Object Lock to be enabled for the new bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies whether you want S3 Object Lock to be enabled for the new bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_enabled_for_bucket: Option, pub object_ownership: Option, } impl fmt::Debug for CreateBucketInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.create_bucket_configuration { -d.field("create_bucket_configuration", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write { -d.field("grant_write", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -if let Some(ref val) = self.object_lock_enabled_for_bucket { -d.field("object_lock_enabled_for_bucket", val); -} -if let Some(ref val) = self.object_ownership { -d.field("object_ownership", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.create_bucket_configuration { + d.field("create_bucket_configuration", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write { + d.field("grant_write", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + if let Some(ref val) = self.object_lock_enabled_for_bucket { + d.field("object_lock_enabled_for_bucket", val); + } + if let Some(ref val) = self.object_ownership { + d.field("object_ownership", val); + } + d.finish_non_exhaustive() + } } impl CreateBucketInput { -#[must_use] -pub fn builder() -> builders::CreateBucketInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CreateBucketInputBuilder { + default() + } } #[derive(Clone, PartialEq)] pub struct CreateBucketMetadataTableConfigurationInput { -///

    -/// The general purpose bucket that you want to create the metadata table configuration in. -///

    + ///

    + /// The general purpose bucket that you want to create the metadata table configuration in. + ///

    pub bucket: BucketName, -///

    -/// The checksum algorithm to use with your metadata table configuration. -///

    + ///

    + /// The checksum algorithm to use with your metadata table configuration. + ///

    pub checksum_algorithm: Option, -///

    -/// The Content-MD5 header for the metadata table configuration. -///

    + ///

    + /// The Content-MD5 header for the metadata table configuration. + ///

    pub content_md5: Option, -///

    -/// The expected owner of the general purpose bucket that contains your metadata table configuration. -///

    + ///

    + /// The expected owner of the general purpose bucket that contains your metadata table configuration. + ///

    pub expected_bucket_owner: Option, -///

    -/// The contents of your metadata table configuration. -///

    + ///

    + /// The contents of your metadata table configuration. + ///

    pub metadata_table_configuration: MetadataTableConfiguration, } impl fmt::Debug for CreateBucketMetadataTableConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("metadata_table_configuration", &self.metadata_table_configuration); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("metadata_table_configuration", &self.metadata_table_configuration); + d.finish_non_exhaustive() + } } impl CreateBucketMetadataTableConfigurationInput { -#[must_use] -pub fn builder() -> builders::CreateBucketMetadataTableConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CreateBucketMetadataTableConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct CreateBucketMetadataTableConfigurationOutput { -} +pub struct CreateBucketMetadataTableConfigurationOutput {} impl fmt::Debug for CreateBucketMetadataTableConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketMetadataTableConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct CreateBucketOutput { -///

    A forward slash followed by the name of the bucket.

    + ///

    A forward slash followed by the name of the bucket.

    pub location: Option, } impl fmt::Debug for CreateBucketOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateBucketOutput"); -if let Some(ref val) = self.location { -d.field("location", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateBucketOutput"); + if let Some(ref val) = self.location { + d.field("location", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct CreateMultipartUploadInput { -///

    The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as -/// canned ACLs. Each canned ACL has a predefined set of grantees and -/// permissions. For more information, see Canned ACL in the -/// Amazon S3 User Guide.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to -/// predefined groups defined by Amazon S3. These permissions are then added to the access control -/// list (ACL) on the new object. For more information, see Using ACLs. One way to grant -/// the permissions using the request headers is to specify a canned ACL with the -/// x-amz-acl request header.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    The canned ACL to apply to the object. Amazon S3 supports a set of predefined ACLs, known as + /// canned ACLs. Each canned ACL has a predefined set of grantees and + /// permissions. For more information, see Canned ACL in the + /// Amazon S3 User Guide.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can grant access permissions to individual Amazon Web Services accounts or to + /// predefined groups defined by Amazon S3. These permissions are then added to the access control + /// list (ACL) on the new object. For more information, see Using ACLs. One way to grant + /// the permissions using the request headers is to specify a canned ACL with the + /// x-amz-acl request header.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub acl: Option, -///

    The name of the bucket where the multipart upload is initiated and where the object is -/// uploaded.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The name of the bucket where the multipart upload is initiated and where the object is + /// uploaded.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    -///

    -/// General purpose buckets - Setting this header to -/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with -/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 -/// Bucket Key.

    -///

    -/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    + ///

    + /// General purpose buckets - Setting this header to + /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with + /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 + /// Bucket Key.

    + ///

    + /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    pub bucket_key_enabled: Option, -///

    Specifies caching behavior along the request/reply chain.

    + ///

    Specifies caching behavior along the request/reply chain.

    pub cache_control: Option, -///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see -/// Checking object integrity in -/// the Amazon S3 User Guide.

    + ///

    Indicates the algorithm that you want Amazon S3 to use to create the checksum for the object. For more information, see + /// Checking object integrity in + /// the Amazon S3 User Guide.

    pub checksum_algorithm: Option, -///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s -/// checksum value. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    + ///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s + /// checksum value. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    pub checksum_type: Option, -///

    Specifies presentational information for the object.

    + ///

    Specifies presentational information for the object.

    pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    -/// -///

    For directory buckets, only the aws-chunked value is supported in this header field.

    -///
    + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + /// + ///

    For directory buckets, only the aws-chunked value is supported in this header field.

    + ///
    pub content_encoding: Option, -///

    The language that the content is in.

    + ///

    The language that the content is in.

    pub content_language: Option, -///

    A standard MIME type describing the format of the object data.

    + ///

    A standard MIME type describing the format of the object data.

    pub content_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The date and time at which the object is no longer cacheable.

    + ///

    The date and time at which the object is no longer cacheable.

    pub expires: Option, -///

    Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP -/// permissions on the object.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can use this header to explicitly grant access permissions to -/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 -/// supports in an ACL. For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -///

    You specify each grantee as a type=value pair, where the type is one of the -/// following:

    -///
      -///
    • -///

      -/// id – if the value specified is the canonical user ID of an -/// Amazon Web Services account

      -///
    • -///
    • -///

      -/// uri – if you are granting permissions to a predefined group

      -///
    • -///
    • -///

      -/// emailAddress – if the value specified is the email address of an -/// Amazon Web Services account

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    -///

    -/// x-amz-grant-read: id="11112222333", id="444455556666" -///

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Specify access permissions explicitly to give the grantee READ, READ_ACP, and WRITE_ACP + /// permissions on the object.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can use this header to explicitly grant access permissions to + /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 + /// supports in an ACL. For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + ///

    You specify each grantee as a type=value pair, where the type is one of the + /// following:

    + ///
      + ///
    • + ///

      + /// id – if the value specified is the canonical user ID of an + /// Amazon Web Services account

      + ///
    • + ///
    • + ///

      + /// uri – if you are granting permissions to a predefined group

      + ///
    • + ///
    • + ///

      + /// emailAddress – if the value specified is the email address of an + /// Amazon Web Services account

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    + ///

    + /// x-amz-grant-read: id="11112222333", id="444455556666" + ///

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_full_control: Option, -///

    Specify access permissions explicitly to allow grantee to read the object data and its -/// metadata.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can use this header to explicitly grant access permissions to -/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 -/// supports in an ACL. For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -///

    You specify each grantee as a type=value pair, where the type is one of the -/// following:

    -///
      -///
    • -///

      -/// id – if the value specified is the canonical user ID of an -/// Amazon Web Services account

      -///
    • -///
    • -///

      -/// uri – if you are granting permissions to a predefined group

      -///
    • -///
    • -///

      -/// emailAddress – if the value specified is the email address of an -/// Amazon Web Services account

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    -///

    -/// x-amz-grant-read: id="11112222333", id="444455556666" -///

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Specify access permissions explicitly to allow grantee to read the object data and its + /// metadata.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can use this header to explicitly grant access permissions to + /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 + /// supports in an ACL. For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + ///

    You specify each grantee as a type=value pair, where the type is one of the + /// following:

    + ///
      + ///
    • + ///

      + /// id – if the value specified is the canonical user ID of an + /// Amazon Web Services account

      + ///
    • + ///
    • + ///

      + /// uri – if you are granting permissions to a predefined group

      + ///
    • + ///
    • + ///

      + /// emailAddress – if the value specified is the email address of an + /// Amazon Web Services account

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    + ///

    + /// x-amz-grant-read: id="11112222333", id="444455556666" + ///

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_read: Option, -///

    Specify access permissions explicitly to allows grantee to read the object ACL.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can use this header to explicitly grant access permissions to -/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 -/// supports in an ACL. For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -///

    You specify each grantee as a type=value pair, where the type is one of the -/// following:

    -///
      -///
    • -///

      -/// id – if the value specified is the canonical user ID of an -/// Amazon Web Services account

      -///
    • -///
    • -///

      -/// uri – if you are granting permissions to a predefined group

      -///
    • -///
    • -///

      -/// emailAddress – if the value specified is the email address of an -/// Amazon Web Services account

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    -///

    -/// x-amz-grant-read: id="11112222333", id="444455556666" -///

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Specify access permissions explicitly to allows grantee to read the object ACL.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can use this header to explicitly grant access permissions to + /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 + /// supports in an ACL. For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + ///

    You specify each grantee as a type=value pair, where the type is one of the + /// following:

    + ///
      + ///
    • + ///

      + /// id – if the value specified is the canonical user ID of an + /// Amazon Web Services account

      + ///
    • + ///
    • + ///

      + /// uri – if you are granting permissions to a predefined group

      + ///
    • + ///
    • + ///

      + /// emailAddress – if the value specified is the email address of an + /// Amazon Web Services account

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    + ///

    + /// x-amz-grant-read: id="11112222333", id="444455556666" + ///

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_read_acp: Option, -///

    Specify access permissions explicitly to allows grantee to allow grantee to write the -/// ACL for the applicable object.

    -///

    By default, all objects are private. Only the owner has full access control. When -/// uploading an object, you can use this header to explicitly grant access permissions to -/// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 -/// supports in an ACL. For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -///

    You specify each grantee as a type=value pair, where the type is one of the -/// following:

    -///
      -///
    • -///

      -/// id – if the value specified is the canonical user ID of an -/// Amazon Web Services account

      -///
    • -///
    • -///

      -/// uri – if you are granting permissions to a predefined group

      -///
    • -///
    • -///

      -/// emailAddress – if the value specified is the email address of an -/// Amazon Web Services account

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    -///

    -/// x-amz-grant-read: id="11112222333", id="444455556666" -///

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    + ///

    Specify access permissions explicitly to allows grantee to allow grantee to write the + /// ACL for the applicable object.

    + ///

    By default, all objects are private. Only the owner has full access control. When + /// uploading an object, you can use this header to explicitly grant access permissions to + /// specific Amazon Web Services accounts or groups. This header maps to specific permissions that Amazon S3 + /// supports in an ACL. For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + ///

    You specify each grantee as a type=value pair, where the type is one of the + /// following:

    + ///
      + ///
    • + ///

      + /// id – if the value specified is the canonical user ID of an + /// Amazon Web Services account

      + ///
    • + ///
    • + ///

      + /// uri – if you are granting permissions to a predefined group

      + ///
    • + ///
    • + ///

      + /// emailAddress – if the value specified is the email address of an + /// Amazon Web Services account

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///

    For example, the following x-amz-grant-read header grants the Amazon Web Services accounts identified by account IDs permissions to read object data and its metadata:

    + ///

    + /// x-amz-grant-read: id="11112222333", id="444455556666" + ///

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    pub grant_write_acp: Option, -///

    Object key for which the multipart upload is to be initiated.

    + ///

    Object key for which the multipart upload is to be initiated.

    pub key: ObjectKey, -///

    A map of metadata to store with the object in S3.

    + ///

    A map of metadata to store with the object in S3.

    pub metadata: Option, -///

    Specifies whether you want to apply a legal hold to the uploaded object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies whether you want to apply a legal hold to the uploaded object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_legal_hold_status: Option, -///

    Specifies the Object Lock mode that you want to apply to the uploaded object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the Object Lock mode that you want to apply to the uploaded object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_mode: Option, -///

    Specifies the date and time when you want the Object Lock to expire.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the date and time when you want the Object Lock to expire.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub object_lock_retain_until_date: Option, pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to -/// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption -/// key was transmitted without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to + /// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption + /// key was transmitted without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub sse_customer_key_md5: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + ///

    Specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, -///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same -/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    -///

    -/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS -/// key to use. If you specify -/// x-amz-server-side-encryption:aws:kms or -/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key -/// (aws/s3) to protect the data.

    -///

    -/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the -/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses -/// the bucket's default KMS customer managed key ID. If you want to explicitly set the -/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -/// -/// Incorrect key specification results in an HTTP 400 Bad Request error.

    + ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same + /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    + ///

    + /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS + /// key to use. If you specify + /// x-amz-server-side-encryption:aws:kms or + /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key + /// (aws/s3) to protect the data.

    + ///

    + /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the + /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses + /// the bucket's default KMS customer managed key ID. If you want to explicitly set the + /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + /// + /// Incorrect key specification results in an HTTP 400 Bad Request error.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms).

    -///
      -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. -/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. -/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and -/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. -///

      -/// -///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the -/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. -/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), -/// the encryption request headers must match the default encryption configuration of the directory bucket. -/// -///

      -///
      -///
    • -///
    + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms).

    + ///
      + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. + /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. + /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and + /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. + ///

      + /// + ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the + /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. + /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), + /// the encryption request headers must match the default encryption configuration of the directory bucket. + /// + ///

      + ///
      + ///
    • + ///
    pub server_side_encryption: Option, -///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The -/// STANDARD storage class provides high durability and high availability. Depending on -/// performance needs, you can specify a different Storage Class. For more information, see -/// Storage -/// Classes in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      For directory buckets, only the S3 Express One Zone storage class is supported to store -/// newly created objects.

      -///
    • -///
    • -///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      -///
    • -///
    -///
    + ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The + /// STANDARD storage class provides high durability and high availability. Depending on + /// performance needs, you can specify a different Storage Class. For more information, see + /// Storage + /// Classes in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store + /// newly created objects.

      + ///
    • + ///
    • + ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      + ///
    • + ///
    + ///
    pub storage_class: Option, -///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub tagging: Option, pub version_id: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub website_redirect_location: Option, } impl fmt::Debug for CreateMultipartUploadInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateMultipartUploadInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateMultipartUploadInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); + +impl CreateMultipartUploadInput { + #[must_use] + pub fn builder() -> builders::CreateMultipartUploadInputBuilder { + default() + } } -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tagging { -d.field("tagging", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -d.finish_non_exhaustive() -} -} - -impl CreateMultipartUploadInput { -#[must_use] -pub fn builder() -> builders::CreateMultipartUploadInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct CreateMultipartUploadOutput { -///

    If the bucket has a lifecycle rule configured with an action to abort incomplete -/// multipart uploads and the prefix in the lifecycle rule matches the object name in the -/// request, the response includes this header. The header indicates when the initiated -/// multipart upload becomes eligible for an abort operation. For more information, see -/// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in -/// the Amazon S3 User Guide.

    -///

    The response also includes the x-amz-abort-rule-id header that provides the -/// ID of the lifecycle configuration rule that defines the abort action.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub abort_date: Option, -///

    This header is returned along with the x-amz-abort-date header. It -/// identifies the applicable lifecycle configuration rule that defines the action to abort -/// incomplete multipart uploads.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub abort_rule_id: Option, -///

    The name of the bucket to which the multipart upload was initiated. Does not return the -/// access point ARN or access point alias if used.

    -/// -///

    Access points are not supported by directory buckets.

    -///
    - pub bucket: Option, -///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s -/// checksum value. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Object key for which the multipart upload was initiated.

    - pub key: Option, - pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    - pub ssekms_encryption_context: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms).

    - pub server_side_encryption: Option, -///

    ID for the initiated multipart upload.

    - pub upload_id: Option, + +#[derive(Clone, Default, PartialEq)] +pub struct CreateMultipartUploadOutput { + ///

    If the bucket has a lifecycle rule configured with an action to abort incomplete + /// multipart uploads and the prefix in the lifecycle rule matches the object name in the + /// request, the response includes this header. The header indicates when the initiated + /// multipart upload becomes eligible for an abort operation. For more information, see + /// Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle Configuration in + /// the Amazon S3 User Guide.

    + ///

    The response also includes the x-amz-abort-rule-id header that provides the + /// ID of the lifecycle configuration rule that defines the abort action.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub abort_date: Option, + ///

    This header is returned along with the x-amz-abort-date header. It + /// identifies the applicable lifecycle configuration rule that defines the action to abort + /// incomplete multipart uploads.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub abort_rule_id: Option, + ///

    The name of the bucket to which the multipart upload was initiated. Does not return the + /// access point ARN or access point alias if used.

    + /// + ///

    Access points are not supported by directory buckets.

    + ///
    + pub bucket: Option, + ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    Indicates the checksum type that you want Amazon S3 to use to calculate the object’s + /// checksum value. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Object key for which the multipart upload was initiated.

    + pub key: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs.

    + pub ssekms_encryption_context: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms).

    + pub server_side_encryption: Option, + ///

    ID for the initiated multipart upload.

    + pub upload_id: Option, } impl fmt::Debug for CreateMultipartUploadOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateMultipartUploadOutput"); -if let Some(ref val) = self.abort_date { -d.field("abort_date", val); -} -if let Some(ref val) = self.abort_rule_id { -d.field("abort_rule_id", val); -} -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.upload_id { -d.field("upload_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateMultipartUploadOutput"); + if let Some(ref val) = self.abort_date { + d.field("abort_date", val); + } + if let Some(ref val) = self.abort_rule_id { + d.field("abort_rule_id", val); + } + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.upload_id { + d.field("upload_id", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct CreateSessionInput { -///

    The name of the bucket that you create a session for.

    + ///

    The name of the bucket that you create a session for.

    pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using KMS keys (SSE-KMS).

    -///

    S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using KMS keys (SSE-KMS).

    + ///

    S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    pub bucket_key_enabled: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets passed on -/// to Amazon Web Services KMS for future GetObject operations on -/// this object.

    -///

    -/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets passed on + /// to Amazon Web Services KMS for future GetObject operations on + /// this object.

    + ///

    + /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    pub ssekms_encryption_context: Option, -///

    If you specify x-amz-server-side-encryption with aws:kms, you must specify the -/// x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS -/// symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same -/// account that't issuing the command, you must use the full Key ARN not the Key ID.

    -///

    Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -///

    + ///

    If you specify x-amz-server-side-encryption with aws:kms, you must specify the + /// x-amz-server-side-encryption-aws-kms-key-id header with the ID (Key ID or Key ARN) of the KMS + /// symmetric encryption customer managed key to use. Otherwise, you get an HTTP 400 Bad Request error. Only use the key ID or key ARN. The key alias format of the KMS key isn't supported. Also, if the KMS key doesn't exist in the same + /// account that't issuing the command, you must use the full Key ARN not the Key ID.

    + ///

    Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + ///

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm to use when you store objects in the directory bucket.

    -///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. -/// For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    + ///

    The server-side encryption algorithm to use when you store objects in the directory bucket.

    + ///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). By default, Amazon S3 encrypts data with SSE-S3. + /// For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    pub server_side_encryption: Option, -///

    Specifies the mode of the session that will be created, either ReadWrite or -/// ReadOnly. By default, a ReadWrite session is created. A -/// ReadWrite session is capable of executing all the Zonal endpoint API operations on a -/// directory bucket. A ReadOnly session is constrained to execute the following -/// Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2, -/// GetObjectAttributes, ListParts, and -/// ListMultipartUploads.

    + ///

    Specifies the mode of the session that will be created, either ReadWrite or + /// ReadOnly. By default, a ReadWrite session is created. A + /// ReadWrite session is capable of executing all the Zonal endpoint API operations on a + /// directory bucket. A ReadOnly session is constrained to execute the following + /// Zonal endpoint API operations: GetObject, HeadObject, ListObjectsV2, + /// GetObjectAttributes, ListParts, and + /// ListMultipartUploads.

    pub session_mode: Option, } impl fmt::Debug for CreateSessionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateSessionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.session_mode { -d.field("session_mode", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateSessionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.session_mode { + d.field("session_mode", val); + } + d.finish_non_exhaustive() + } } impl CreateSessionInput { -#[must_use] -pub fn builder() -> builders::CreateSessionInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::CreateSessionInputBuilder { + default() + } } #[derive(Clone, PartialEq)] pub struct CreateSessionOutput { -///

    Indicates whether to use an S3 Bucket Key for server-side encryption -/// with KMS keys (SSE-KMS).

    + ///

    Indicates whether to use an S3 Bucket Key for server-side encryption + /// with KMS keys (SSE-KMS).

    pub bucket_key_enabled: Option, -///

    The established temporary security credentials for the created session.

    + ///

    The established temporary security credentials for the created session.

    pub credentials: SessionCredentials, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets -/// passed on to Amazon Web Services KMS for future GetObject -/// operations on this object.

    + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets + /// passed on to Amazon Web Services KMS for future GetObject + /// operations on this object.

    pub ssekms_encryption_context: Option, -///

    If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS -/// symmetric encryption customer managed key that was used for object encryption.

    + ///

    If you specify x-amz-server-side-encryption with aws:kms, this header indicates the ID of the KMS + /// symmetric encryption customer managed key that was used for object encryption.

    pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store objects in the directory bucket.

    + ///

    The server-side encryption algorithm used when you store objects in the directory bucket.

    pub server_side_encryption: Option, } impl fmt::Debug for CreateSessionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("CreateSessionOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -d.field("credentials", &self.credentials); -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("CreateSessionOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + d.field("credentials", &self.credentials); + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + d.finish_non_exhaustive() + } } impl Default for CreateSessionOutput { -fn default() -> Self { -Self { -bucket_key_enabled: None, -credentials: default(), -ssekms_encryption_context: None, -ssekms_key_id: None, -server_side_encryption: None, -} -} + fn default() -> Self { + Self { + bucket_key_enabled: None, + credentials: default(), + ssekms_encryption_context: None, + ssekms_key_id: None, + server_side_encryption: None, + } + } } - pub type CreationDate = Timestamp; ///

    Amazon Web Services credentials for API authentication.

    #[derive(Clone, PartialEq)] pub struct Credentials { -///

    The access key ID that identifies the temporary security credentials.

    + ///

    The access key ID that identifies the temporary security credentials.

    pub access_key_id: AccessKeyIdType, -///

    The date on which the current credentials expire.

    + ///

    The date on which the current credentials expire.

    pub expiration: DateType, -///

    The secret access key that can be used to sign requests.

    + ///

    The secret access key that can be used to sign requests.

    pub secret_access_key: AccessKeySecretType, -///

    The token that users must pass to the service API to use the temporary -/// credentials.

    + ///

    The token that users must pass to the service API to use the temporary + /// credentials.

    pub session_token: TokenType, } impl fmt::Debug for Credentials { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Credentials"); -d.field("access_key_id", &self.access_key_id); -d.field("expiration", &self.expiration); -d.field("secret_access_key", &self.secret_access_key); -d.field("session_token", &self.session_token); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Credentials"); + d.field("access_key_id", &self.access_key_id); + d.field("expiration", &self.expiration); + d.field("secret_access_key", &self.secret_access_key); + d.field("session_token", &self.session_token); + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DataRedundancy(Cow<'static, str>); impl DataRedundancy { -pub const SINGLE_AVAILABILITY_ZONE: &'static str = "SingleAvailabilityZone"; - -pub const SINGLE_LOCAL_ZONE: &'static str = "SingleLocalZone"; + pub const SINGLE_AVAILABILITY_ZONE: &'static str = "SingleAvailabilityZone"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const SINGLE_LOCAL_ZONE: &'static str = "SingleLocalZone"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for DataRedundancy { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: DataRedundancy) -> Self { -s.0 -} + fn from(s: DataRedundancy) -> Self { + s.0 + } } impl FromStr for DataRedundancy { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type Date = Timestamp; @@ -3992,704 +3934,672 @@ pub type DaysAfterInitiation = i32; /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DefaultRetention { -///

    The number of days that you want to specify for the default retention period. Must be -/// used with Mode.

    + ///

    The number of days that you want to specify for the default retention period. Must be + /// used with Mode.

    pub days: Option, -///

    The default Object Lock retention mode you want to apply to new objects placed in the -/// specified bucket. Must be used with either Days or Years.

    + ///

    The default Object Lock retention mode you want to apply to new objects placed in the + /// specified bucket. Must be used with either Days or Years.

    pub mode: Option, -///

    The number of years that you want to specify for the default retention period. Must be -/// used with Mode.

    + ///

    The number of years that you want to specify for the default retention period. Must be + /// used with Mode.

    pub years: Option, } impl fmt::Debug for DefaultRetention { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DefaultRetention"); -if let Some(ref val) = self.days { -d.field("days", val); -} -if let Some(ref val) = self.mode { -d.field("mode", val); -} -if let Some(ref val) = self.years { -d.field("years", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DefaultRetention"); + if let Some(ref val) = self.days { + d.field("days", val); + } + if let Some(ref val) = self.mode { + d.field("mode", val); + } + if let Some(ref val) = self.years { + d.field("years", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DelMarkerExpiration { pub days: Option, } impl fmt::Debug for DelMarkerExpiration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DelMarkerExpiration"); -if let Some(ref val) = self.days { -d.field("days", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DelMarkerExpiration"); + if let Some(ref val) = self.days { + d.field("days", val); + } + d.finish_non_exhaustive() + } } - ///

    Container for the objects to delete.

    #[derive(Clone, Default, PartialEq)] pub struct Delete { -///

    The object to delete.

    -/// -///

    -/// Directory buckets - For directory buckets, -/// an object that's composed entirely of whitespace characters is not supported by the -/// DeleteObjects API operation. The request will receive a 400 Bad -/// Request error and none of the objects in the request will be deleted.

    -///
    + ///

    The object to delete.

    + /// + ///

    + /// Directory buckets - For directory buckets, + /// an object that's composed entirely of whitespace characters is not supported by the + /// DeleteObjects API operation. The request will receive a 400 Bad + /// Request error and none of the objects in the request will be deleted.

    + ///
    pub objects: ObjectIdentifierList, -///

    Element to enable quiet mode for the request. When you add this element, you must set -/// its value to true.

    + ///

    Element to enable quiet mode for the request. When you add this element, you must set + /// its value to true.

    pub quiet: Option, } impl fmt::Debug for Delete { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Delete"); -d.field("objects", &self.objects); -if let Some(ref val) = self.quiet { -d.field("quiet", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Delete"); + d.field("objects", &self.objects); + if let Some(ref val) = self.quiet { + d.field("quiet", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketAnalyticsConfigurationInput { -///

    The name of the bucket from which an analytics configuration is deleted.

    + ///

    The name of the bucket from which an analytics configuration is deleted.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The ID that identifies the analytics configuration.

    + ///

    The ID that identifies the analytics configuration.

    pub id: AnalyticsId, } impl fmt::Debug for DeleteBucketAnalyticsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } impl DeleteBucketAnalyticsConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketAnalyticsConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketAnalyticsConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketAnalyticsConfigurationOutput { -} +pub struct DeleteBucketAnalyticsConfigurationOutput {} impl fmt::Debug for DeleteBucketAnalyticsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketAnalyticsConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketCorsInput { -///

    Specifies the bucket whose cors configuration is being deleted.

    + ///

    Specifies the bucket whose cors configuration is being deleted.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketCorsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketCorsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketCorsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketCorsInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketCorsInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketCorsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketCorsOutput { -} +pub struct DeleteBucketCorsOutput {} impl fmt::Debug for DeleteBucketCorsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketCorsOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketCorsOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketEncryptionInput { -///

    The name of the bucket containing the server-side encryption configuration to -/// delete.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    + ///

    The name of the bucket containing the server-side encryption configuration to + /// delete.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketEncryptionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketEncryptionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketEncryptionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketEncryptionInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketEncryptionInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketEncryptionInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketEncryptionOutput { -} +pub struct DeleteBucketEncryptionOutput {} impl fmt::Debug for DeleteBucketEncryptionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketEncryptionOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketEncryptionOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketInput { -///

    Specifies the bucket being deleted.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    + ///

    Specifies the bucket being deleted.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    pub expected_bucket_owner: Option, pub force_delete: Option, } impl fmt::Debug for DeleteBucketInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.force_delete { -d.field("force_delete", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.force_delete { + d.field("force_delete", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketIntelligentTieringConfigurationInput { -///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    pub bucket: BucketName, -///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    pub id: IntelligentTieringId, } impl fmt::Debug for DeleteBucketIntelligentTieringConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationInput"); -d.field("bucket", &self.bucket); -d.field("id", &self.id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationInput"); + d.field("bucket", &self.bucket); + d.field("id", &self.id); + d.finish_non_exhaustive() + } } impl DeleteBucketIntelligentTieringConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketIntelligentTieringConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketIntelligentTieringConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketIntelligentTieringConfigurationOutput { -} +pub struct DeleteBucketIntelligentTieringConfigurationOutput {} impl fmt::Debug for DeleteBucketIntelligentTieringConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketIntelligentTieringConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketInventoryConfigurationInput { -///

    The name of the bucket containing the inventory configuration to delete.

    + ///

    The name of the bucket containing the inventory configuration to delete.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The ID used to identify the inventory configuration.

    + ///

    The ID used to identify the inventory configuration.

    pub id: InventoryId, } impl fmt::Debug for DeleteBucketInventoryConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketInventoryConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketInventoryConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } impl DeleteBucketInventoryConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketInventoryConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketInventoryConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketInventoryConfigurationOutput { -} +pub struct DeleteBucketInventoryConfigurationOutput {} impl fmt::Debug for DeleteBucketInventoryConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketInventoryConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketInventoryConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketLifecycleInput { -///

    The bucket name of the lifecycle to delete.

    + ///

    The bucket name of the lifecycle to delete.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketLifecycleInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketLifecycleInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketLifecycleInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketLifecycleInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketLifecycleInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketLifecycleInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketLifecycleOutput { -} +pub struct DeleteBucketLifecycleOutput {} impl fmt::Debug for DeleteBucketLifecycleOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketLifecycleOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketLifecycleOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketMetadataTableConfigurationInput { -///

    -/// The general purpose bucket that you want to remove the metadata table configuration from. -///

    + ///

    + /// The general purpose bucket that you want to remove the metadata table configuration from. + ///

    pub bucket: BucketName, -///

    -/// The expected bucket owner of the general purpose bucket that you want to remove the -/// metadata table configuration from. -///

    + ///

    + /// The expected bucket owner of the general purpose bucket that you want to remove the + /// metadata table configuration from. + ///

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketMetadataTableConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketMetadataTableConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketMetadataTableConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketMetadataTableConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketMetadataTableConfigurationOutput { -} +pub struct DeleteBucketMetadataTableConfigurationOutput {} impl fmt::Debug for DeleteBucketMetadataTableConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketMetadataTableConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketMetricsConfigurationInput { -///

    The name of the bucket containing the metrics configuration to delete.

    + ///

    The name of the bucket containing the metrics configuration to delete.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and -/// can only contain letters, numbers, periods, dashes, and underscores.

    + ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and + /// can only contain letters, numbers, periods, dashes, and underscores.

    pub id: MetricsId, } impl fmt::Debug for DeleteBucketMetricsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketMetricsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketMetricsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } impl DeleteBucketMetricsConfigurationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketMetricsConfigurationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketMetricsConfigurationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketMetricsConfigurationOutput { -} +pub struct DeleteBucketMetricsConfigurationOutput {} impl fmt::Debug for DeleteBucketMetricsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketMetricsConfigurationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketMetricsConfigurationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketOutput { -} +pub struct DeleteBucketOutput {} impl fmt::Debug for DeleteBucketOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketOwnershipControlsInput { -///

    The Amazon S3 bucket whose OwnershipControls you want to delete.

    + ///

    The Amazon S3 bucket whose OwnershipControls you want to delete.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketOwnershipControlsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketOwnershipControlsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketOwnershipControlsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketOwnershipControlsInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketOwnershipControlsInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketOwnershipControlsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketOwnershipControlsOutput { -} +pub struct DeleteBucketOwnershipControlsOutput {} impl fmt::Debug for DeleteBucketOwnershipControlsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketOwnershipControlsOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketOwnershipControlsOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketPolicyInput { -///

    The bucket name.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    + ///

    The bucket name.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketPolicyInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketPolicyInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketPolicyInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketPolicyInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketPolicyInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketPolicyInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketPolicyOutput { -} +pub struct DeleteBucketPolicyOutput {} impl fmt::Debug for DeleteBucketPolicyOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketPolicyOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketPolicyOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketReplicationInput { -///

    The bucket name.

    + ///

    The bucket name.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketReplicationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketReplicationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketReplicationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketReplicationInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketReplicationInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketReplicationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketReplicationOutput { -} +pub struct DeleteBucketReplicationOutput {} impl fmt::Debug for DeleteBucketReplicationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketReplicationOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketReplicationOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketTaggingInput { -///

    The bucket that has the tag set to be removed.

    + ///

    The bucket that has the tag set to be removed.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketTaggingInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketTaggingInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketTaggingInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketTaggingOutput { -} +pub struct DeleteBucketTaggingOutput {} impl fmt::Debug for DeleteBucketTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketTaggingOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketTaggingOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteBucketWebsiteInput { -///

    The bucket name for which you want to remove the website configuration.

    + ///

    The bucket name for which you want to remove the website configuration.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeleteBucketWebsiteInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketWebsiteInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketWebsiteInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeleteBucketWebsiteInput { -#[must_use] -pub fn builder() -> builders::DeleteBucketWebsiteInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteBucketWebsiteInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeleteBucketWebsiteOutput { -} +pub struct DeleteBucketWebsiteOutput {} impl fmt::Debug for DeleteBucketWebsiteOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteBucketWebsiteOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteBucketWebsiteOutput"); + d.finish_non_exhaustive() + } } - pub type DeleteMarker = bool; ///

    Information about the delete marker.

    #[derive(Clone, Default, PartialEq)] pub struct DeleteMarkerEntry { -///

    Specifies whether the object is (true) or is not (false) the latest version of an -/// object.

    + ///

    Specifies whether the object is (true) or is not (false) the latest version of an + /// object.

    pub is_latest: Option, -///

    The object key.

    + ///

    The object key.

    pub key: Option, -///

    Date and time when the object was last modified.

    + ///

    Date and time when the object was last modified.

    pub last_modified: Option, -///

    The account that created the delete marker.

    + ///

    The account that created the delete marker.

    pub owner: Option, -///

    Version ID of an object.

    + ///

    Version ID of an object.

    pub version_id: Option, } impl fmt::Debug for DeleteMarkerEntry { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteMarkerEntry"); -if let Some(ref val) = self.is_latest { -d.field("is_latest", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteMarkerEntry"); + if let Some(ref val) = self.is_latest { + d.field("is_latest", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - ///

    Specifies whether Amazon S3 replicates delete markers. If you specify a Filter /// in your replication configuration, you must also include a /// DeleteMarkerReplication element. If your Filter includes a @@ -4704,61 +4614,59 @@ d.finish_non_exhaustive() /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct DeleteMarkerReplication { -///

    Indicates whether to replicate delete markers.

    -/// -///

    Indicates whether to replicate delete markers.

    -///
    + ///

    Indicates whether to replicate delete markers.

    + /// + ///

    Indicates whether to replicate delete markers.

    + ///
    pub status: Option, } impl fmt::Debug for DeleteMarkerReplication { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteMarkerReplication"); -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteMarkerReplication"); + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeleteMarkerReplicationStatus(Cow<'static, str>); impl DeleteMarkerReplicationStatus { -pub const DISABLED: &'static str = "Disabled"; + pub const DISABLED: &'static str = "Disabled"; -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for DeleteMarkerReplicationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: DeleteMarkerReplicationStatus) -> Self { -s.0 -} + fn from(s: DeleteMarkerReplicationStatus) -> Self { + s.0 + } } impl FromStr for DeleteMarkerReplicationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } pub type DeleteMarkerVersionId = String; @@ -4767,501 +4675,493 @@ pub type DeleteMarkers = List; #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectInput { -///

    The bucket name of the bucket containing the object.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The bucket name of the bucket containing the object.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process -/// this operation. To use this header, you must have the -/// s3:BypassGovernanceRetention permission.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process + /// this operation. To use this header, you must have the + /// s3:BypassGovernanceRetention permission.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub bypass_governance_retention: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns -/// a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No -/// Content) response.

    -///

    For more information about conditional requests, see RFC 7232.

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    + ///

    The If-Match header field makes the request method conditional on ETags. If the ETag value does not match, the operation returns + /// a 412 Precondition Failed error. If the ETag matches or if the object doesn't exist, the operation will return a 204 Success (No + /// Content) response.

    + ///

    For more information about conditional requests, see RFC 7232.

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    pub if_match: Option, -///

    If present, the object is deleted only if its modification times matches the provided -/// Timestamp. If the Timestamp values do not match, the operation -/// returns a 412 Precondition Failed error. If the Timestamp matches -/// or if the object doesn’t exist, the operation returns a 204 Success (No -/// Content) response.

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    + ///

    If present, the object is deleted only if its modification times matches the provided + /// Timestamp. If the Timestamp values do not match, the operation + /// returns a 412 Precondition Failed error. If the Timestamp matches + /// or if the object doesn’t exist, the operation returns a 204 Success (No + /// Content) response.

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    pub if_match_last_modified_time: Option, -///

    If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn’t exist, -/// the operation returns a 204 Success (No Content) response.

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    -/// -///

    You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size -/// conditional headers in conjunction with each-other or individually.

    -///
    + ///

    If present, the object is deleted only if its size matches the provided size in bytes. If the Size value does not match, the operation returns a 412 Precondition Failed error. If the Size matches or if the object doesn’t exist, + /// the operation returns a 204 Success (No Content) response.

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    + /// + ///

    You can use the If-Match, x-amz-if-match-last-modified-time and x-amz-if-match-size + /// conditional headers in conjunction with each-other or individually.

    + ///
    pub if_match_size: Option, -///

    Key name of the object to delete.

    + ///

    Key name of the object to delete.

    pub key: ObjectKey, -///

    The concatenation of the authentication device's serial number, a space, and the value -/// that is displayed on your authentication device. Required to permanently delete a versioned -/// object if versioning is configured with MFA delete enabled.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The concatenation of the authentication device's serial number, a space, and the value + /// that is displayed on your authentication device. Required to permanently delete a versioned + /// object if versioning is configured with MFA delete enabled.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub mfa: Option, pub request_payer: Option, -///

    Version ID used to reference a specific version of the object.

    -/// -///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    -///
    + ///

    Version ID used to reference a specific version of the object.

    + /// + ///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    + ///
    pub version_id: Option, } impl fmt::Debug for DeleteObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bypass_governance_retention { -d.field("bypass_governance_retention", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_match_last_modified_time { -d.field("if_match_last_modified_time", val); -} -if let Some(ref val) = self.if_match_size { -d.field("if_match_size", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.mfa { -d.field("mfa", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bypass_governance_retention { + d.field("bypass_governance_retention", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_match_last_modified_time { + d.field("if_match_last_modified_time", val); + } + if let Some(ref val) = self.if_match_size { + d.field("if_match_size", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.mfa { + d.field("mfa", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } impl DeleteObjectInput { -#[must_use] -pub fn builder() -> builders::DeleteObjectInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteObjectInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectOutput { -///

    Indicates whether the specified object version that was permanently deleted was (true) -/// or was not (false) a delete marker before deletion. In a simple DELETE, this header -/// indicates whether (true) or not (false) the current version of the object is a delete -/// marker. To learn more about delete markers, see Working with delete markers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Indicates whether the specified object version that was permanently deleted was (true) + /// or was not (false) a delete marker before deletion. In a simple DELETE, this header + /// indicates whether (true) or not (false) the current version of the object is a delete + /// marker. To learn more about delete markers, see Working with delete markers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub delete_marker: Option, pub request_charged: Option, -///

    Returns the version ID of the delete marker created as a result of the DELETE -/// operation.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Returns the version ID of the delete marker created as a result of the DELETE + /// operation.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub version_id: Option, } impl fmt::Debug for DeleteObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectOutput"); -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectOutput"); + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectTaggingInput { -///

    The bucket name containing the objects from which to remove the tags.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The bucket name containing the objects from which to remove the tags.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The key that identifies the object in the bucket from which to remove all tags.

    + ///

    The key that identifies the object in the bucket from which to remove all tags.

    pub key: ObjectKey, -///

    The versionId of the object that the tag-set will be removed from.

    + ///

    The versionId of the object that the tag-set will be removed from.

    pub version_id: Option, } impl fmt::Debug for DeleteObjectTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } impl DeleteObjectTaggingInput { -#[must_use] -pub fn builder() -> builders::DeleteObjectTaggingInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteObjectTaggingInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectTaggingOutput { -///

    The versionId of the object the tag-set was removed from.

    + ///

    The versionId of the object the tag-set was removed from.

    pub version_id: Option, } impl fmt::Debug for DeleteObjectTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectTaggingOutput"); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectTaggingOutput"); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, PartialEq)] pub struct DeleteObjectsInput { -///

    The bucket name containing the objects to delete.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + ///

    The bucket name containing the objects to delete.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Specifies whether you want to delete this object even if it has a Governance-type Object -/// Lock in place. To use this header, you must have the -/// s3:BypassGovernanceRetention permission.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Specifies whether you want to delete this object even if it has a Governance-type Object + /// Lock in place. To use this header, you must have the + /// s3:BypassGovernanceRetention permission.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub bypass_governance_retention: Option, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm -/// or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    -///

    For the x-amz-checksum-algorithm -/// header, replace -/// algorithm -/// with the supported algorithm from the following list:

    -///
      -///
    • -///

      -/// CRC32 -///

      -///
    • -///
    • -///

      -/// CRC32C -///

      -///
    • -///
    • -///

      -/// CRC64NVME -///

      -///
    • -///
    • -///

      -/// SHA1 -///

      -///
    • -///
    • -///

      -/// SHA256 -///

      -///
    • -///
    -///

    For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If the individual checksum value you provide through x-amz-checksum-algorithm -/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    + ///

    For the x-amz-checksum-algorithm + /// header, replace + /// algorithm + /// with the supported algorithm from the following list:

    + ///
      + ///
    • + ///

      + /// CRC32 + ///

      + ///
    • + ///
    • + ///

      + /// CRC32C + ///

      + ///
    • + ///
    • + ///

      + /// CRC64NVME + ///

      + ///
    • + ///
    • + ///

      + /// SHA1 + ///

      + ///
    • + ///
    • + ///

      + /// SHA256 + ///

      + ///
    • + ///
    + ///

    For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    pub checksum_algorithm: Option, -///

    Container for the request.

    + ///

    Container for the request.

    pub delete: Delete, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The concatenation of the authentication device's serial number, a space, and the value -/// that is displayed on your authentication device. Required to permanently delete a versioned -/// object if versioning is configured with MFA delete enabled.

    -///

    When performing the DeleteObjects operation on an MFA delete enabled -/// bucket, which attempts to delete the specified versioned objects, you must include an MFA -/// token. If you don't provide an MFA token, the entire request will fail, even if there are -/// non-versioned objects that you are trying to delete. If you provide an invalid token, -/// whether there are versioned object keys in the request or not, the entire Multi-Object -/// Delete request will fail. For information about MFA Delete, see MFA -/// Delete in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The concatenation of the authentication device's serial number, a space, and the value + /// that is displayed on your authentication device. Required to permanently delete a versioned + /// object if versioning is configured with MFA delete enabled.

    + ///

    When performing the DeleteObjects operation on an MFA delete enabled + /// bucket, which attempts to delete the specified versioned objects, you must include an MFA + /// token. If you don't provide an MFA token, the entire request will fail, even if there are + /// non-versioned objects that you are trying to delete. If you provide an invalid token, + /// whether there are versioned object keys in the request or not, the entire Multi-Object + /// Delete request will fail. For information about MFA Delete, see MFA + /// Delete in the Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub mfa: Option, pub request_payer: Option, } impl fmt::Debug for DeleteObjectsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bypass_governance_retention { -d.field("bypass_governance_retention", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -d.field("delete", &self.delete); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.mfa { -d.field("mfa", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bypass_governance_retention { + d.field("bypass_governance_retention", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + d.field("delete", &self.delete); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.mfa { + d.field("mfa", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.finish_non_exhaustive() + } } impl DeleteObjectsInput { -#[must_use] -pub fn builder() -> builders::DeleteObjectsInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeleteObjectsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] pub struct DeleteObjectsOutput { -///

    Container element for a successful delete. It identifies the object that was -/// successfully deleted.

    + ///

    Container element for a successful delete. It identifies the object that was + /// successfully deleted.

    pub deleted: Option, -///

    Container for a failed delete action that describes the object that Amazon S3 attempted to -/// delete and the error it encountered.

    + ///

    Container for a failed delete action that describes the object that Amazon S3 attempted to + /// delete and the error it encountered.

    pub errors: Option, pub request_charged: Option, } impl fmt::Debug for DeleteObjectsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteObjectsOutput"); -if let Some(ref val) = self.deleted { -d.field("deleted", val); -} -if let Some(ref val) = self.errors { -d.field("errors", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteObjectsOutput"); + if let Some(ref val) = self.deleted { + d.field("deleted", val); + } + if let Some(ref val) = self.errors { + d.field("errors", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] pub struct DeletePublicAccessBlockInput { -///

    The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. -///

    + ///

    The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete. + ///

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } impl fmt::Debug for DeletePublicAccessBlockInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeletePublicAccessBlockInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeletePublicAccessBlockInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } impl DeletePublicAccessBlockInput { -#[must_use] -pub fn builder() -> builders::DeletePublicAccessBlockInputBuilder { -default() -} + #[must_use] + pub fn builder() -> builders::DeletePublicAccessBlockInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct DeletePublicAccessBlockOutput { -} +pub struct DeletePublicAccessBlockOutput {} impl fmt::Debug for DeletePublicAccessBlockOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeletePublicAccessBlockOutput"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeletePublicAccessBlockOutput"); + d.finish_non_exhaustive() + } } - #[derive(Clone, PartialEq, Serialize, Deserialize)] pub struct DeleteReplication { pub status: DeleteReplicationStatus, } impl fmt::Debug for DeleteReplication { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeleteReplication"); -d.field("status", &self.status); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeleteReplication"); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct DeleteReplicationStatus(Cow<'static, str>); impl DeleteReplicationStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; + pub const DISABLED: &'static str = "Disabled"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for DeleteReplicationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: DeleteReplicationStatus) -> Self { -s.0 -} + fn from(s: DeleteReplicationStatus) -> Self { + s.0 + } } impl FromStr for DeleteReplicationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    Information about the deleted object.

    #[derive(Clone, Default, PartialEq)] pub struct DeletedObject { -///

    Indicates whether the specified object version that was permanently deleted was (true) -/// or was not (false) a delete marker before deletion. In a simple DELETE, this header -/// indicates whether (true) or not (false) the current version of the object is a delete -/// marker. To learn more about delete markers, see Working with delete markers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    Indicates whether the specified object version that was permanently deleted was (true) + /// or was not (false) a delete marker before deletion. In a simple DELETE, this header + /// indicates whether (true) or not (false) the current version of the object is a delete + /// marker. To learn more about delete markers, see Working with delete markers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub delete_marker: Option, -///

    The version ID of the delete marker created as a result of the DELETE operation. If you -/// delete a specific object version, the value returned by this header is the version ID of -/// the object version deleted.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The version ID of the delete marker created as a result of the DELETE operation. If you + /// delete a specific object version, the value returned by this header is the version ID of + /// the object version deleted.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub delete_marker_version_id: Option, -///

    The name of the deleted object.

    + ///

    The name of the deleted object.

    pub key: Option, -///

    The version ID of the deleted object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    + ///

    The version ID of the deleted object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub version_id: Option, } impl fmt::Debug for DeletedObject { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("DeletedObject"); -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.delete_marker_version_id { -d.field("delete_marker_version_id", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("DeletedObject"); + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.delete_marker_version_id { + d.field("delete_marker_version_id", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - pub type DeletedObjects = List; pub type Delimiter = String; @@ -5272,72 +5172,70 @@ pub type Description = String; /// Amazon S3 bucket and S3 Replication Time Control (S3 RTC).

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct Destination { -///

    Specify this only in a cross-account scenario (where source and destination bucket -/// owners are not the same), and you want to change replica ownership to the Amazon Web Services account -/// that owns the destination bucket. If this is not specified in the replication -/// configuration, the replicas are owned by same Amazon Web Services account that owns the source -/// object.

    + ///

    Specify this only in a cross-account scenario (where source and destination bucket + /// owners are not the same), and you want to change replica ownership to the Amazon Web Services account + /// that owns the destination bucket. If this is not specified in the replication + /// configuration, the replicas are owned by same Amazon Web Services account that owns the source + /// object.

    pub access_control_translation: Option, -///

    Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to -/// change replica ownership to the Amazon Web Services account that owns the destination bucket by -/// specifying the AccessControlTranslation property, this is the account ID of -/// the destination bucket owner. For more information, see Replication Additional -/// Configuration: Changing the Replica Owner in the -/// Amazon S3 User Guide.

    + ///

    Destination bucket owner account ID. In a cross-account scenario, if you direct Amazon S3 to + /// change replica ownership to the Amazon Web Services account that owns the destination bucket by + /// specifying the AccessControlTranslation property, this is the account ID of + /// the destination bucket owner. For more information, see Replication Additional + /// Configuration: Changing the Replica Owner in the + /// Amazon S3 User Guide.

    pub account: Option, -///

    The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the -/// results.

    + ///

    The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to store the + /// results.

    pub bucket: BucketName, -///

    A container that provides information about encryption. If -/// SourceSelectionCriteria is specified, you must specify this element.

    + ///

    A container that provides information about encryption. If + /// SourceSelectionCriteria is specified, you must specify this element.

    pub encryption_configuration: Option, -///

    A container specifying replication metrics-related settings enabling replication -/// metrics and events.

    + ///

    A container specifying replication metrics-related settings enabling replication + /// metrics and events.

    pub metrics: Option, -///

    A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time -/// when all objects and operations on objects must be replicated. Must be specified together -/// with a Metrics block.

    + ///

    A container specifying S3 Replication Time Control (S3 RTC), including whether S3 RTC is enabled and the time + /// when all objects and operations on objects must be replicated. Must be specified together + /// with a Metrics block.

    pub replication_time: Option, -///

    The storage class to use when replicating objects, such as S3 Standard or reduced -/// redundancy. By default, Amazon S3 uses the storage class of the source object to create the -/// object replica.

    -///

    For valid values, see the StorageClass element of the PUT Bucket -/// replication action in the Amazon S3 API Reference.

    + ///

    The storage class to use when replicating objects, such as S3 Standard or reduced + /// redundancy. By default, Amazon S3 uses the storage class of the source object to create the + /// object replica.

    + ///

    For valid values, see the StorageClass element of the PUT Bucket + /// replication action in the Amazon S3 API Reference.

    pub storage_class: Option, } impl fmt::Debug for Destination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Destination"); -if let Some(ref val) = self.access_control_translation { -d.field("access_control_translation", val); -} -if let Some(ref val) = self.account { -d.field("account", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.encryption_configuration { -d.field("encryption_configuration", val); -} -if let Some(ref val) = self.metrics { -d.field("metrics", val); -} -if let Some(ref val) = self.replication_time { -d.field("replication_time", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Destination"); + if let Some(ref val) = self.access_control_translation { + d.field("access_control_translation", val); + } + if let Some(ref val) = self.account { + d.field("account", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.encryption_configuration { + d.field("encryption_configuration", val); + } + if let Some(ref val) = self.metrics { + d.field("metrics", val); + } + if let Some(ref val) = self.replication_time { + d.field("replication_time", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } - pub type DirectoryBucketToken = String; pub type DisplayName = String; - pub type EmailAddress = String; pub type EnableRequestProgress = bool; @@ -5359,70 +5257,68 @@ pub type EnableRequestProgress = bool; pub struct EncodingType(Cow<'static, str>); impl EncodingType { -pub const URL: &'static str = "url"; + pub const URL: &'static str = "url"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } impl From for EncodingType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } impl From for Cow<'static, str> { -fn from(s: EncodingType) -> Self { -s.0 -} + fn from(s: EncodingType) -> Self { + s.0 + } } impl FromStr for EncodingType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } ///

    Contains the type of server-side encryption used.

    #[derive(Clone, PartialEq)] pub struct Encryption { -///

    The server-side encryption algorithm used when storing job results in Amazon S3 (for example, -/// AES256, aws:kms).

    + ///

    The server-side encryption algorithm used when storing job results in Amazon S3 (for example, + /// AES256, aws:kms).

    pub encryption_type: ServerSideEncryption, -///

    If the encryption type is aws:kms, this optional value can be used to -/// specify the encryption context for the restore results.

    + ///

    If the encryption type is aws:kms, this optional value can be used to + /// specify the encryption context for the restore results.

    pub kms_context: Option, -///

    If the encryption type is aws:kms, this optional value specifies the ID of -/// the symmetric encryption customer managed key to use for encryption of job results. Amazon S3 only -/// supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service -/// Developer Guide.

    + ///

    If the encryption type is aws:kms, this optional value specifies the ID of + /// the symmetric encryption customer managed key to use for encryption of job results. Amazon S3 only + /// supports symmetric encryption KMS keys. For more information, see Asymmetric keys in KMS in the Amazon Web Services Key Management Service + /// Developer Guide.

    pub kms_key_id: Option, } impl fmt::Debug for Encryption { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Encryption"); -d.field("encryption_type", &self.encryption_type); -if let Some(ref val) = self.kms_context { -d.field("kms_context", val); -} -if let Some(ref val) = self.kms_key_id { -d.field("kms_key_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Encryption"); + d.field("encryption_type", &self.encryption_type); + if let Some(ref val) = self.kms_context { + d.field("kms_context", val); + } + if let Some(ref val) = self.kms_key_id { + d.field("kms_key_id", val); + } + d.finish_non_exhaustive() + } } - ///

    Specifies encryption-related information for an Amazon S3 bucket that is a destination for /// replicated objects.

    /// @@ -5433,33270 +5329,32877 @@ d.finish_non_exhaustive() /// #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] pub struct EncryptionConfiguration { -///

    Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in -/// Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to -/// encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more -/// information, see Asymmetric keys in Amazon Web Services -/// KMS in the Amazon Web Services Key Management Service Developer -/// Guide.

    + ///

    Specifies the ID (Key ARN or Alias ARN) of the customer managed Amazon Web Services KMS key stored in + /// Amazon Web Services Key Management Service (KMS) for the destination bucket. Amazon S3 uses this key to + /// encrypt replica objects. Amazon S3 only supports symmetric encryption KMS keys. For more + /// information, see Asymmetric keys in Amazon Web Services + /// KMS in the Amazon Web Services Key Management Service Developer + /// Guide.

    pub replica_kms_key_id: Option, } impl fmt::Debug for EncryptionConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("EncryptionConfiguration"); -if let Some(ref val) = self.replica_kms_key_id { -d.field("replica_kms_key_id", val); -} -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("EncryptionConfiguration"); + if let Some(ref val) = self.replica_kms_key_id { + d.field("replica_kms_key_id", val); + } + d.finish_non_exhaustive() + } } - ///

    -/// The existing object was created with a different encryption type. -/// Subsequent write requests must include the appropriate encryption +/// The existing object was created with a different encryption type. +/// Subsequent write requests must include the appropriate encryption /// parameters in the request or while creating the session. ///

    #[derive(Clone, Default, PartialEq)] -pub struct EncryptionTypeMismatch { -} +pub struct EncryptionTypeMismatch {} impl fmt::Debug for EncryptionTypeMismatch { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("EncryptionTypeMismatch"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("EncryptionTypeMismatch"); + d.finish_non_exhaustive() + } } - pub type End = i64; ///

    A message that indicates the request is complete and no more messages will be sent. You /// should not assume that the request is complete until the client receives an /// EndEvent.

    #[derive(Clone, Default, PartialEq)] -pub struct EndEvent { -} +pub struct EndEvent {} impl fmt::Debug for EndEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("EndEvent"); -d.finish_non_exhaustive() -} + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("EndEvent"); + d.finish_non_exhaustive() + } } - ///

    Container for all error elements.

    #[derive(Clone, Default, PartialEq)] pub struct Error { -///

    The error code is a string that uniquely identifies an error condition. It is meant to -/// be read and understood by programs that detect and handle errors by type. The following is -/// a list of Amazon S3 error codes. For more information, see Error responses.

    -///
      -///
    • -///
        -///
      • -///

        -/// Code: AccessDenied

        -///
      • -///
      • -///

        -/// Description: Access Denied

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: AccountProblem

        -///
      • -///
      • -///

        -/// Description: There is a problem with your Amazon Web Services account -/// that prevents the action from completing successfully. Contact Amazon Web Services Support -/// for further assistance.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: AllAccessDisabled

        -///
      • -///
      • -///

        -/// Description: All access to this Amazon S3 resource has been -/// disabled. Contact Amazon Web Services Support for further assistance.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: AmbiguousGrantByEmailAddress

        -///
      • -///
      • -///

        -/// Description: The email address you provided is -/// associated with more than one account.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: AuthorizationHeaderMalformed

        -///
      • -///
      • -///

        -/// Description: The authorization header you provided is -/// invalid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// HTTP Status Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: BadDigest

        -///
      • -///
      • -///

        -/// Description: The Content-MD5 you specified did not -/// match what we received.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: BucketAlreadyExists

        -///
      • -///
      • -///

        -/// Description: The requested bucket name is not -/// available. The bucket namespace is shared by all users of the system. Please -/// select a different name and try again.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: BucketAlreadyOwnedByYou

        -///
      • -///
      • -///

        -/// Description: The bucket you tried to create already -/// exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in -/// the North Virginia Region. For legacy compatibility, if you re-create an -/// existing bucket that you already own in the North Virginia Region, Amazon S3 returns -/// 200 OK and resets the bucket access control lists (ACLs).

        -///
      • -///
      • -///

        -/// Code: 409 Conflict (in all Regions except the North -/// Virginia Region)

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: BucketNotEmpty

        -///
      • -///
      • -///

        -/// Description: The bucket you tried to delete is not -/// empty.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: CredentialsNotSupported

        -///
      • -///
      • -///

        -/// Description: This request does not support -/// credentials.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: CrossLocationLoggingProhibited

        -///
      • -///
      • -///

        -/// Description: Cross-location logging not allowed. -/// Buckets in one geographic location cannot log information to a bucket in -/// another location.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • + ///

        The error code is a string that uniquely identifies an error condition. It is meant to + /// be read and understood by programs that detect and handle errors by type. The following is + /// a list of Amazon S3 error codes. For more information, see Error responses.

        + ///
          + ///
        • + ///
            + ///
          • + ///

            + /// Code: AccessDenied

            + ///
          • + ///
          • + ///

            + /// Description: Access Denied

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: AccountProblem

            + ///
          • + ///
          • + ///

            + /// Description: There is a problem with your Amazon Web Services account + /// that prevents the action from completing successfully. Contact Amazon Web Services Support + /// for further assistance.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: AllAccessDisabled

            + ///
          • + ///
          • + ///

            + /// Description: All access to this Amazon S3 resource has been + /// disabled. Contact Amazon Web Services Support for further assistance.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: AmbiguousGrantByEmailAddress

            + ///
          • + ///
          • + ///

            + /// Description: The email address you provided is + /// associated with more than one account.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: AuthorizationHeaderMalformed

            + ///
          • + ///
          • + ///

            + /// Description: The authorization header you provided is + /// invalid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: BadDigest

            + ///
          • + ///
          • + ///

            + /// Description: The Content-MD5 you specified did not + /// match what we received.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: BucketAlreadyExists

            + ///
          • + ///
          • + ///

            + /// Description: The requested bucket name is not + /// available. The bucket namespace is shared by all users of the system. Please + /// select a different name and try again.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: BucketAlreadyOwnedByYou

            + ///
          • + ///
          • + ///

            + /// Description: The bucket you tried to create already + /// exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in + /// the North Virginia Region. For legacy compatibility, if you re-create an + /// existing bucket that you already own in the North Virginia Region, Amazon S3 returns + /// 200 OK and resets the bucket access control lists (ACLs).

            + ///
          • + ///
          • + ///

            + /// Code: 409 Conflict (in all Regions except the North + /// Virginia Region)

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: BucketNotEmpty

            + ///
          • + ///
          • + ///

            + /// Description: The bucket you tried to delete is not + /// empty.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: CredentialsNotSupported

            + ///
          • + ///
          • + ///

            + /// Description: This request does not support + /// credentials.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: CrossLocationLoggingProhibited

            + ///
          • + ///
          • + ///

            + /// Description: Cross-location logging not allowed. + /// Buckets in one geographic location cannot log information to a bucket in + /// another location.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: EntityTooSmall

            + ///
          • + ///
          • + ///

            + /// Description: Your proposed upload is smaller than the + /// minimum allowed object size.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: EntityTooLarge

            + ///
          • + ///
          • + ///

            + /// Description: Your proposed upload exceeds the maximum + /// allowed object size.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: ExpiredToken

            + ///
          • + ///
          • + ///

            + /// Description: The provided token has expired.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: IllegalVersioningConfigurationException

            + ///
          • + ///
          • + ///

            + /// Description: Indicates that the versioning + /// configuration specified in the request is invalid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: IncompleteBody

            + ///
          • + ///
          • + ///

            + /// Description: You did not provide the number of bytes + /// specified by the Content-Length HTTP header

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: IncorrectNumberOfFilesInPostRequest

            + ///
          • + ///
          • + ///

            + /// Description: POST requires exactly one file upload per + /// request.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InlineDataTooLarge

            + ///
          • + ///
          • + ///

            + /// Description: Inline data exceeds the maximum allowed + /// size.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InternalError

            + ///
          • + ///
          • + ///

            + /// Description: We encountered an internal error. Please + /// try again.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 500 Internal Server Error

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Server

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidAccessKeyId

            + ///
          • + ///
          • + ///

            + /// Description: The Amazon Web Services access key ID you provided does + /// not exist in our records.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidAddressingHeader

            + ///
          • + ///
          • + ///

            + /// Description: You must specify the Anonymous + /// role.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: N/A

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidArgument

            + ///
          • + ///
          • + ///

            + /// Description: Invalid Argument

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidBucketName

            + ///
          • + ///
          • + ///

            + /// Description: The specified bucket is not valid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidBucketState

            + ///
          • + ///
          • + ///

            + /// Description: The request is not valid with the current + /// state of the bucket.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidDigest

            + ///
          • + ///
          • + ///

            + /// Description: The Content-MD5 you specified is not + /// valid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidEncryptionAlgorithmError

            + ///
          • + ///
          • + ///

            + /// Description: The encryption request you specified is + /// not valid. The valid value is AES256.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidLocationConstraint

            + ///
          • + ///
          • + ///

            + /// Description: The specified location constraint is not + /// valid. For more information about Regions, see How to Select + /// a Region for Your Buckets.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidObjectState

            + ///
          • + ///
          • + ///

            + /// Description: The action is not valid for the current + /// state of the object.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidPart

            + ///
          • + ///
          • + ///

            + /// Description: One or more of the specified parts could + /// not be found. The part might not have been uploaded, or the specified entity + /// tag might not have matched the part's entity tag.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidPartOrder

            + ///
          • + ///
          • + ///

            + /// Description: The list of parts was not in ascending + /// order. Parts list must be specified in order by part number.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidPayer

            + ///
          • + ///
          • + ///

            + /// Description: All access to this object has been + /// disabled. Please contact Amazon Web Services Support for further assistance.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidPolicyDocument

            + ///
          • + ///
          • + ///

            + /// Description: The content of the form does not meet the + /// conditions specified in the policy document.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRange

            + ///
          • + ///
          • + ///

            + /// Description: The requested range cannot be + /// satisfied.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 416 Requested Range Not + /// Satisfiable

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Please use + /// AWS4-HMAC-SHA256.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: SOAP requests must be made over an HTTPS + /// connection.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Acceleration is not + /// supported for buckets with non-DNS compliant names.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Acceleration is not + /// supported for buckets with periods (.) in their names.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Accelerate endpoint only + /// supports virtual style requests.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Accelerate is not configured + /// on this bucket.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Accelerate is disabled on + /// this bucket.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Acceleration is not + /// supported on this bucket. Contact Amazon Web Services Support for more information.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidRequest

            + ///
          • + ///
          • + ///

            + /// Description: Amazon S3 Transfer Acceleration cannot be + /// enabled on this bucket. Contact Amazon Web Services Support for more information.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// Code: N/A

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidSecurity

            + ///
          • + ///
          • + ///

            + /// Description: The provided security credentials are not + /// valid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidSOAPRequest

            + ///
          • + ///
          • + ///

            + /// Description: The SOAP request body is invalid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidStorageClass

            + ///
          • + ///
          • + ///

            + /// Description: The storage class you specified is not + /// valid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidTargetBucketForLogging

            + ///
          • + ///
          • + ///

            + /// Description: The target bucket for logging does not + /// exist, is not owned by you, or does not have the appropriate grants for the + /// log-delivery group.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidToken

            + ///
          • + ///
          • + ///

            + /// Description: The provided token is malformed or + /// otherwise invalid.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: InvalidURI

            + ///
          • + ///
          • + ///

            + /// Description: Couldn't parse the specified URI.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: KeyTooLongError

            + ///
          • + ///
          • + ///

            + /// Description: Your key is too long.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MalformedACLError

            + ///
          • + ///
          • + ///

            + /// Description: The XML you provided was not well-formed + /// or did not validate against our published schema.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MalformedPOSTRequest

            + ///
          • + ///
          • + ///

            + /// Description: The body of your POST request is not + /// well-formed multipart/form-data.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MalformedXML

            + ///
          • + ///
          • + ///

            + /// Description: This happens when the user sends malformed + /// XML (XML that doesn't conform to the published XSD) for the configuration. The + /// error message is, "The XML you provided was not well-formed or did not validate + /// against our published schema."

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MaxMessageLengthExceeded

            + ///
          • + ///
          • + ///

            + /// Description: Your request was too big.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MaxPostPreDataLengthExceededError

            + ///
          • + ///
          • + ///

            + /// Description: Your POST request fields preceding the + /// upload file were too large.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MetadataTooLarge

            + ///
          • + ///
          • + ///

            + /// Description: Your metadata headers exceed the maximum + /// allowed metadata size.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MethodNotAllowed

            + ///
          • + ///
          • + ///

            + /// Description: The specified method is not allowed + /// against this resource.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 405 Method Not Allowed

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingAttachment

            + ///
          • + ///
          • + ///

            + /// Description: A SOAP attachment was expected, but none + /// were found.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: N/A

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingContentLength

            + ///
          • + ///
          • + ///

            + /// Description: You must provide the Content-Length HTTP + /// header.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 411 Length Required

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingRequestBodyError

            + ///
          • + ///
          • + ///

            + /// Description: This happens when the user sends an empty + /// XML document as a request. The error message is, "Request body is empty." + ///

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingSecurityElement

            + ///
          • + ///
          • + ///

            + /// Description: The SOAP 1.1 request is missing a security + /// element.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: MissingSecurityHeader

            + ///
          • + ///
          • + ///

            + /// Description: Your request is missing a required + /// header.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoLoggingStatusForKey

            + ///
          • + ///
          • + ///

            + /// Description: There is no such thing as a logging status + /// subresource for a key.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchBucket

            + ///
          • + ///
          • + ///

            + /// Description: The specified bucket does not + /// exist.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchBucketPolicy

            + ///
          • + ///
          • + ///

            + /// Description: The specified bucket does not have a + /// bucket policy.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchKey

            + ///
          • + ///
          • + ///

            + /// Description: The specified key does not exist.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchLifecycleConfiguration

            + ///
          • + ///
          • + ///

            + /// Description: The lifecycle configuration does not + /// exist.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchUpload

            + ///
          • + ///
          • + ///

            + /// Description: The specified multipart upload does not + /// exist. The upload ID might be invalid, or the multipart upload might have been + /// aborted or completed.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NoSuchVersion

            + ///
          • + ///
          • + ///

            + /// Description: Indicates that the version ID specified in + /// the request does not match an existing version.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 404 Not Found

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NotImplemented

            + ///
          • + ///
          • + ///

            + /// Description: A header you provided implies + /// functionality that is not implemented.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 501 Not Implemented

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Server

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: NotSignedUp

            + ///
          • + ///
          • + ///

            + /// Description: Your account is not signed up for the Amazon S3 + /// service. You must sign up before you can use Amazon S3. You can sign up at the + /// following URL: Amazon S3 + ///

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: OperationAborted

            + ///
          • + ///
          • + ///

            + /// Description: A conflicting conditional action is + /// currently in progress against this resource. Try again.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: PermanentRedirect

            + ///
          • + ///
          • + ///

            + /// Description: The bucket you are attempting to access + /// must be addressed using the specified endpoint. Send all future requests to + /// this endpoint.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 301 Moved Permanently

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: PreconditionFailed

            + ///
          • + ///
          • + ///

            + /// Description: At least one of the preconditions you + /// specified did not hold.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 412 Precondition Failed

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: Redirect

            + ///
          • + ///
          • + ///

            + /// Description: Temporary redirect.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 307 Moved Temporarily

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RestoreAlreadyInProgress

            + ///
          • + ///
          • + ///

            + /// Description: Object restore is already in + /// progress.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 409 Conflict

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RequestIsNotMultiPartContent

            + ///
          • + ///
          • + ///

            + /// Description: Bucket POST must be of the enclosure-type + /// multipart/form-data.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RequestTimeout

            + ///
          • + ///
          • + ///

            + /// Description: Your socket connection to the server was + /// not read from or written to within the timeout period.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RequestTimeTooSkewed

            + ///
          • + ///
          • + ///

            + /// Description: The difference between the request time + /// and the server's time is too large.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: RequestTorrentOfBucketError

            + ///
          • + ///
          • + ///

            + /// Description: Requesting the torrent file of a bucket is + /// not permitted.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: SignatureDoesNotMatch

            + ///
          • + ///
          • + ///

            + /// Description: The request signature we calculated does + /// not match the signature you provided. Check your Amazon Web Services secret access key and + /// signing method. For more information, see REST + /// Authentication and SOAP + /// Authentication for details.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 403 Forbidden

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: ServiceUnavailable

            + ///
          • + ///
          • + ///

            + /// Description: Service is unable to handle + /// request.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 503 Service Unavailable

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Server

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: SlowDown

            + ///
          • + ///
          • + ///

            + /// Description: Reduce your request rate.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 503 Slow Down

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Server

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: TemporaryRedirect

            + ///
          • + ///
          • + ///

            + /// Description: You are being redirected to the bucket + /// while DNS updates.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 307 Moved Temporarily

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: TokenRefreshRequired

            + ///
          • + ///
          • + ///

            + /// Description: The provided token must be + /// refreshed.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: TooManyBuckets

            + ///
          • + ///
          • + ///

            + /// Description: You have attempted to create more buckets + /// than allowed.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: UnexpectedContent

            + ///
          • + ///
          • + ///

            + /// Description: This request does not support + /// content.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: UnresolvableGrantByEmailAddress

            + ///
          • + ///
          • + ///

            + /// Description: The email address you provided does not + /// match any account on record.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        • + ///
            + ///
          • + ///

            + /// Code: UserKeyMustBeSpecified

            + ///
          • + ///
          • + ///

            + /// Description: The bucket POST must contain the specified + /// field name. If it is specified, check the order of the fields.

            + ///
          • + ///
          • + ///

            + /// HTTP Status Code: 400 Bad Request

            + ///
          • + ///
          • + ///

            + /// SOAP Fault Code Prefix: Client

            + ///
          • + ///
          + ///
        • + ///
        + ///

        + pub code: Option, + ///

        The error key.

        + pub key: Option, + ///

        The error message contains a generic description of the error condition in English. It + /// is intended for a human audience. Simple programs display the message directly to the end + /// user if they encounter an error condition they don't know how or don't care to handle. + /// Sophisticated programs with more exhaustive error handling and proper internationalization + /// are more likely to ignore the error message.

        + pub message: Option, + ///

        The version ID of the error.

        + /// + ///

        This functionality is not supported for directory buckets.

        + ///
        + pub version_id: Option, +} + +impl fmt::Debug for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Error"); + if let Some(ref val) = self.code { + d.field("code", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.message { + d.field("message", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } +} + +pub type ErrorCode = String; + ///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: EntityTooSmall

        -///
      • -///
      • -///

        -/// Description: Your proposed upload is smaller than the -/// minimum allowed object size.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: EntityTooLarge

        -///
      • -///
      • -///

        -/// Description: Your proposed upload exceeds the maximum -/// allowed object size.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: ExpiredToken

        -///
      • -///
      • -///

        -/// Description: The provided token has expired.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: IllegalVersioningConfigurationException

        -///
      • -///
      • -///

        -/// Description: Indicates that the versioning -/// configuration specified in the request is invalid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: IncompleteBody

        -///
      • -///
      • -///

        -/// Description: You did not provide the number of bytes -/// specified by the Content-Length HTTP header

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: IncorrectNumberOfFilesInPostRequest

        -///
      • -///
      • -///

        -/// Description: POST requires exactly one file upload per -/// request.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InlineDataTooLarge

        -///
      • -///
      • -///

        -/// Description: Inline data exceeds the maximum allowed -/// size.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InternalError

        -///
      • -///
      • -///

        -/// Description: We encountered an internal error. Please -/// try again.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 500 Internal Server Error

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Server

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidAccessKeyId

        -///
      • -///
      • -///

        -/// Description: The Amazon Web Services access key ID you provided does -/// not exist in our records.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidAddressingHeader

        -///
      • -///
      • -///

        -/// Description: You must specify the Anonymous -/// role.

        -///
      • -///
      • -///

        -/// HTTP Status Code: N/A

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidArgument

        -///
      • -///
      • -///

        -/// Description: Invalid Argument

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidBucketName

        -///
      • -///
      • -///

        -/// Description: The specified bucket is not valid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidBucketState

        -///
      • -///
      • -///

        -/// Description: The request is not valid with the current -/// state of the bucket.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidDigest

        -///
      • -///
      • -///

        -/// Description: The Content-MD5 you specified is not -/// valid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidEncryptionAlgorithmError

        -///
      • -///
      • -///

        -/// Description: The encryption request you specified is -/// not valid. The valid value is AES256.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidLocationConstraint

        -///
      • -///
      • -///

        -/// Description: The specified location constraint is not -/// valid. For more information about Regions, see How to Select -/// a Region for Your Buckets.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidObjectState

        -///
      • -///
      • -///

        -/// Description: The action is not valid for the current -/// state of the object.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidPart

        -///
      • -///
      • -///

        -/// Description: One or more of the specified parts could -/// not be found. The part might not have been uploaded, or the specified entity -/// tag might not have matched the part's entity tag.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidPartOrder

        -///
      • -///
      • -///

        -/// Description: The list of parts was not in ascending -/// order. Parts list must be specified in order by part number.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidPayer

        -///
      • -///
      • -///

        -/// Description: All access to this object has been -/// disabled. Please contact Amazon Web Services Support for further assistance.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidPolicyDocument

        -///
      • -///
      • -///

        -/// Description: The content of the form does not meet the -/// conditions specified in the policy document.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRange

        -///
      • -///
      • -///

        -/// Description: The requested range cannot be -/// satisfied.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 416 Requested Range Not -/// Satisfiable

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Please use -/// AWS4-HMAC-SHA256.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: SOAP requests must be made over an HTTPS -/// connection.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Acceleration is not -/// supported for buckets with non-DNS compliant names.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Acceleration is not -/// supported for buckets with periods (.) in their names.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Accelerate endpoint only -/// supports virtual style requests.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Accelerate is not configured -/// on this bucket.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Accelerate is disabled on -/// this bucket.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Acceleration is not -/// supported on this bucket. Contact Amazon Web Services Support for more information.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidRequest

        -///
      • -///
      • -///

        -/// Description: Amazon S3 Transfer Acceleration cannot be -/// enabled on this bucket. Contact Amazon Web Services Support for more information.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// Code: N/A

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidSecurity

        -///
      • -///
      • -///

        -/// Description: The provided security credentials are not -/// valid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidSOAPRequest

        -///
      • -///
      • -///

        -/// Description: The SOAP request body is invalid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidStorageClass

        -///
      • -///
      • -///

        -/// Description: The storage class you specified is not -/// valid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidTargetBucketForLogging

        -///
      • -///
      • -///

        -/// Description: The target bucket for logging does not -/// exist, is not owned by you, or does not have the appropriate grants for the -/// log-delivery group.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidToken

        -///
      • -///
      • -///

        -/// Description: The provided token is malformed or -/// otherwise invalid.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: InvalidURI

        -///
      • -///
      • -///

        -/// Description: Couldn't parse the specified URI.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: KeyTooLongError

        -///
      • -///
      • -///

        -/// Description: Your key is too long.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MalformedACLError

        -///
      • -///
      • -///

        -/// Description: The XML you provided was not well-formed -/// or did not validate against our published schema.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MalformedPOSTRequest

        -///
      • -///
      • -///

        -/// Description: The body of your POST request is not -/// well-formed multipart/form-data.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MalformedXML

        -///
      • -///
      • -///

        -/// Description: This happens when the user sends malformed -/// XML (XML that doesn't conform to the published XSD) for the configuration. The -/// error message is, "The XML you provided was not well-formed or did not validate -/// against our published schema."

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MaxMessageLengthExceeded

        -///
      • -///
      • -///

        -/// Description: Your request was too big.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MaxPostPreDataLengthExceededError

        -///
      • -///
      • -///

        -/// Description: Your POST request fields preceding the -/// upload file were too large.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MetadataTooLarge

        -///
      • -///
      • -///

        -/// Description: Your metadata headers exceed the maximum -/// allowed metadata size.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MethodNotAllowed

        -///
      • -///
      • -///

        -/// Description: The specified method is not allowed -/// against this resource.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 405 Method Not Allowed

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingAttachment

        -///
      • -///
      • -///

        -/// Description: A SOAP attachment was expected, but none -/// were found.

        -///
      • -///
      • -///

        -/// HTTP Status Code: N/A

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingContentLength

        -///
      • -///
      • -///

        -/// Description: You must provide the Content-Length HTTP -/// header.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 411 Length Required

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingRequestBodyError

        -///
      • -///
      • -///

        -/// Description: This happens when the user sends an empty -/// XML document as a request. The error message is, "Request body is empty." -///

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingSecurityElement

        -///
      • -///
      • -///

        -/// Description: The SOAP 1.1 request is missing a security -/// element.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: MissingSecurityHeader

        -///
      • -///
      • -///

        -/// Description: Your request is missing a required -/// header.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoLoggingStatusForKey

        -///
      • -///
      • -///

        -/// Description: There is no such thing as a logging status -/// subresource for a key.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchBucket

        -///
      • -///
      • -///

        -/// Description: The specified bucket does not -/// exist.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchBucketPolicy

        -///
      • -///
      • -///

        -/// Description: The specified bucket does not have a -/// bucket policy.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchKey

        -///
      • -///
      • -///

        -/// Description: The specified key does not exist.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchLifecycleConfiguration

        -///
      • -///
      • -///

        -/// Description: The lifecycle configuration does not -/// exist.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchUpload

        -///
      • -///
      • -///

        -/// Description: The specified multipart upload does not -/// exist. The upload ID might be invalid, or the multipart upload might have been -/// aborted or completed.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NoSuchVersion

        -///
      • -///
      • -///

        -/// Description: Indicates that the version ID specified in -/// the request does not match an existing version.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NotImplemented

        -///
      • -///
      • -///

        -/// Description: A header you provided implies -/// functionality that is not implemented.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 501 Not Implemented

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Server

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: NotSignedUp

        -///
      • -///
      • -///

        -/// Description: Your account is not signed up for the Amazon S3 -/// service. You must sign up before you can use Amazon S3. You can sign up at the -/// following URL: Amazon S3 -///

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: OperationAborted

        -///
      • -///
      • -///

        -/// Description: A conflicting conditional action is -/// currently in progress against this resource. Try again.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: PermanentRedirect

        -///
      • -///
      • -///

        -/// Description: The bucket you are attempting to access -/// must be addressed using the specified endpoint. Send all future requests to -/// this endpoint.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 301 Moved Permanently

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: PreconditionFailed

        -///
      • -///
      • -///

        -/// Description: At least one of the preconditions you -/// specified did not hold.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 412 Precondition Failed

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: Redirect

        -///
      • -///
      • -///

        -/// Description: Temporary redirect.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 307 Moved Temporarily

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RestoreAlreadyInProgress

        -///
      • -///
      • -///

        -/// Description: Object restore is already in -/// progress.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RequestIsNotMultiPartContent

        -///
      • -///
      • -///

        -/// Description: Bucket POST must be of the enclosure-type -/// multipart/form-data.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RequestTimeout

        -///
      • -///
      • -///

        -/// Description: Your socket connection to the server was -/// not read from or written to within the timeout period.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RequestTimeTooSkewed

        -///
      • -///
      • -///

        -/// Description: The difference between the request time -/// and the server's time is too large.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: RequestTorrentOfBucketError

        -///
      • -///
      • -///

        -/// Description: Requesting the torrent file of a bucket is -/// not permitted.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: SignatureDoesNotMatch

        -///
      • -///
      • -///

        -/// Description: The request signature we calculated does -/// not match the signature you provided. Check your Amazon Web Services secret access key and -/// signing method. For more information, see REST -/// Authentication and SOAP -/// Authentication for details.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 403 Forbidden

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: ServiceUnavailable

        -///
      • -///
      • -///

        -/// Description: Service is unable to handle -/// request.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 503 Service Unavailable

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Server

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: SlowDown

        -///
      • -///
      • -///

        -/// Description: Reduce your request rate.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 503 Slow Down

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Server

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: TemporaryRedirect

        -///
      • -///
      • -///

        -/// Description: You are being redirected to the bucket -/// while DNS updates.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 307 Moved Temporarily

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: TokenRefreshRequired

        -///
      • -///
      • -///

        -/// Description: The provided token must be -/// refreshed.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: TooManyBuckets

        -///
      • -///
      • -///

        -/// Description: You have attempted to create more buckets -/// than allowed.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: UnexpectedContent

        -///
      • -///
      • -///

        -/// Description: This request does not support -/// content.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: UnresolvableGrantByEmailAddress

        -///
      • -///
      • -///

        -/// Description: The email address you provided does not -/// match any account on record.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: UserKeyMustBeSpecified

        -///
      • -///
      • -///

        -/// Description: The bucket POST must contain the specified -/// field name. If it is specified, check the order of the fields.

        -///
      • -///
      • -///

        -/// HTTP Status Code: 400 Bad Request

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    -///

    - pub code: Option, -///

    The error key.

    - pub key: Option, -///

    The error message contains a generic description of the error condition in English. It -/// is intended for a human audience. Simple programs display the message directly to the end -/// user if they encounter an error condition they don't know how or don't care to handle. -/// Sophisticated programs with more exhaustive error handling and proper internationalization -/// are more likely to ignore the error message.

    - pub message: Option, -///

    The version ID of the error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for Error { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Error"); -if let Some(ref val) = self.code { -d.field("code", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.message { -d.field("message", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ErrorCode = String; - -///

    -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error code and error message. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct ErrorDetails { -///

    -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error code. The possible error codes and -/// error messages are as follows: -///

    -///
      -///
    • -///

      -/// AccessDeniedCreatingResources - You don't have sufficient permissions to -/// create the required resources. Make sure that you have s3tables:CreateNamespace, -/// s3tables:CreateTable, s3tables:GetTable and -/// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata -/// table, you must delete the metadata configuration for this bucket, and then create a new -/// metadata configuration. -///

      -///
    • -///
    • -///

      -/// AccessDeniedWritingToTable - Unable to write to the metadata table because of -/// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new -/// metadata table. To create a new metadata table, you must delete the metadata configuration for -/// this bucket, and then create a new metadata configuration.

      -///
    • -///
    • -///

      -/// DestinationTableNotFound - The destination table doesn't exist. To create a -/// new metadata table, you must delete the metadata configuration for this bucket, and then -/// create a new metadata configuration.

      -///
    • -///
    • -///

      -/// ServerInternalError - An internal error has occurred. To create a new metadata -/// table, you must delete the metadata configuration for this bucket, and then create a new -/// metadata configuration.

      -///
    • -///
    • -///

      -/// TableAlreadyExists - The table that you specified already exists in the table -/// bucket's namespace. Specify a different table name. To create a new metadata table, you must -/// delete the metadata configuration for this bucket, and then create a new metadata -/// configuration.

      -///
    • -///
    • -///

      -/// TableBucketNotFound - The table bucket that you specified doesn't exist in -/// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new -/// metadata table, you must delete the metadata configuration for this bucket, and then create -/// a new metadata configuration.

      -///
    • -///
    - pub error_code: Option, -///

    -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error message. The possible error codes and -/// error messages are as follows: -///

    -///
      -///
    • -///

      -/// AccessDeniedCreatingResources - You don't have sufficient permissions to -/// create the required resources. Make sure that you have s3tables:CreateNamespace, -/// s3tables:CreateTable, s3tables:GetTable and -/// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata -/// table, you must delete the metadata configuration for this bucket, and then create a new -/// metadata configuration. -///

      -///
    • -///
    • -///

      -/// AccessDeniedWritingToTable - Unable to write to the metadata table because of -/// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new -/// metadata table. To create a new metadata table, you must delete the metadata configuration for -/// this bucket, and then create a new metadata configuration.

      -///
    • -///
    • -///

      -/// DestinationTableNotFound - The destination table doesn't exist. To create a -/// new metadata table, you must delete the metadata configuration for this bucket, and then -/// create a new metadata configuration.

      -///
    • -///
    • -///

      -/// ServerInternalError - An internal error has occurred. To create a new metadata -/// table, you must delete the metadata configuration for this bucket, and then create a new -/// metadata configuration.

      -///
    • -///
    • -///

      -/// TableAlreadyExists - The table that you specified already exists in the table -/// bucket's namespace. Specify a different table name. To create a new metadata table, you must -/// delete the metadata configuration for this bucket, and then create a new metadata -/// configuration.

      -///
    • -///
    • -///

      -/// TableBucketNotFound - The table bucket that you specified doesn't exist in -/// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new -/// metadata table, you must delete the metadata configuration for this bucket, and then create -/// a new metadata configuration.

      -///
    • -///
    - pub error_message: Option, -} - -impl fmt::Debug for ErrorDetails { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ErrorDetails"); -if let Some(ref val) = self.error_code { -d.field("error_code", val); -} -if let Some(ref val) = self.error_message { -d.field("error_message", val); -} -d.finish_non_exhaustive() -} -} - - -///

    The error information.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ErrorDocument { -///

    The object key name to use when a 4XX class error occurs.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub key: ObjectKey, -} - -impl fmt::Debug for ErrorDocument { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ErrorDocument"); -d.field("key", &self.key); -d.finish_non_exhaustive() -} -} - - -pub type ErrorMessage = String; - -pub type Errors = List; - - -///

    A container for specifying the configuration for Amazon EventBridge.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct EventBridgeConfiguration { -} - -impl fmt::Debug for EventBridgeConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("EventBridgeConfiguration"); -d.finish_non_exhaustive() -} -} - - -pub type EventList = List; - -pub type ExcludeFolders = bool; - -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ExcludedPrefix { - pub prefix: Option, -} - -impl fmt::Debug for ExcludedPrefix { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ExcludedPrefix"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ExcludedPrefixes = List; - -///

    Optional configuration to replicate existing source bucket objects.

    -/// -///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the -/// Amazon S3 User Guide.

    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ExistingObjectReplication { -///

    Specifies whether Amazon S3 replicates existing source bucket objects.

    - pub status: ExistingObjectReplicationStatus, -} - -impl fmt::Debug for ExistingObjectReplication { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ExistingObjectReplication"); -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ExistingObjectReplicationStatus(Cow<'static, str>); - -impl ExistingObjectReplicationStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ExistingObjectReplicationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ExistingObjectReplicationStatus) -> Self { -s.0 -} -} - -impl FromStr for ExistingObjectReplicationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Expiration = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ExpirationStatus(Cow<'static, str>); - -impl ExpirationStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ExpirationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ExpirationStatus) -> Self { -s.0 -} -} - -impl FromStr for ExpirationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ExpiredObjectAllVersions = bool; - -pub type ExpiredObjectDeleteMarker = bool; - -pub type Expires = Timestamp; - -pub type ExposeHeader = String; - -pub type ExposeHeaders = List; - -pub type Expression = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ExpressionType(Cow<'static, str>); - -impl ExpressionType { -pub const SQL: &'static str = "SQL"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ExpressionType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ExpressionType) -> Self { -s.0 -} -} - -impl FromStr for ExpressionType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type FetchOwner = bool; - -pub type FieldDelimiter = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct FileHeaderInfo(Cow<'static, str>); - -impl FileHeaderInfo { -pub const IGNORE: &'static str = "IGNORE"; - -pub const NONE: &'static str = "NONE"; - -pub const USE: &'static str = "USE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for FileHeaderInfo { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: FileHeaderInfo) -> Self { -s.0 -} -} - -impl FromStr for FileHeaderInfo { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned -/// to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of -/// the object key name. A prefix is a specific string of characters at the beginning of an -/// object key name, which you can use to organize objects. For example, you can start the key -/// names of related objects with a prefix, such as 2023- or -/// engineering/. Then, you can use FilterRule to find objects in -/// a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it -/// is at the end of the object key name instead of at the beginning.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct FilterRule { -///

    The object key name prefix or suffix identifying one or more objects to which the -/// filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and -/// suffixes are not supported. For more information, see Configuring Event Notifications -/// in the Amazon S3 User Guide.

    - pub name: Option, -///

    The value that the filter searches for in object key names.

    - pub value: Option, -} - -impl fmt::Debug for FilterRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("FilterRule"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.value { -d.field("value", val); -} -d.finish_non_exhaustive() -} -} - - -///

    A list of containers for the key-value pair that defines the criteria for the filter -/// rule.

    -pub type FilterRuleList = List; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct FilterRuleName(Cow<'static, str>); - -impl FilterRuleName { -pub const PREFIX: &'static str = "prefix"; - -pub const SUFFIX: &'static str = "suffix"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for FilterRuleName { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: FilterRuleName) -> Self { -s.0 -} -} - -impl FromStr for FilterRuleName { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type FilterRuleValue = String; - -pub type ForceDelete = bool; - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAccelerateConfigurationInput { -///

    The name of the bucket for which the accelerate configuration is retrieved.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub request_payer: Option, -} - -impl fmt::Debug for GetBucketAccelerateConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAccelerateConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketAccelerateConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketAccelerateConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAccelerateConfigurationOutput { - pub request_charged: Option, -///

    The accelerate configuration of the bucket.

    - pub status: Option, -} - -impl fmt::Debug for GetBucketAccelerateConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAccelerateConfigurationOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAclInput { -///

    Specifies the S3 bucket whose ACL is being requested.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketAclInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAclInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketAclInput { -#[must_use] -pub fn builder() -> builders::GetBucketAclInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAclOutput { -///

    A list of grants.

    - pub grants: Option, -///

    Container for the bucket owner's display name and ID.

    - pub owner: Option, -} - -impl fmt::Debug for GetBucketAclOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAclOutput"); -if let Some(ref val) = self.grants { -d.field("grants", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAnalyticsConfigurationInput { -///

    The name of the bucket from which an analytics configuration is retrieved.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID that identifies the analytics configuration.

    - pub id: AnalyticsId, -} - -impl fmt::Debug for GetBucketAnalyticsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAnalyticsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl GetBucketAnalyticsConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketAnalyticsConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketAnalyticsConfigurationOutput { -///

    The configuration and any analyses for the analytics filter.

    - pub analytics_configuration: Option, -} - -impl fmt::Debug for GetBucketAnalyticsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketAnalyticsConfigurationOutput"); -if let Some(ref val) = self.analytics_configuration { -d.field("analytics_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketCorsInput { -///

    The bucket name for which to get the cors configuration.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketCorsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketCorsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketCorsInput { -#[must_use] -pub fn builder() -> builders::GetBucketCorsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketCorsOutput { -///

    A set of origins and methods (cross-origin access that you want to allow). You can add -/// up to 100 rules to the configuration.

    - pub cors_rules: Option, -} - -impl fmt::Debug for GetBucketCorsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketCorsOutput"); -if let Some(ref val) = self.cors_rules { -d.field("cors_rules", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketEncryptionInput { -///

    The name of the bucket from which the server-side encryption configuration is -/// retrieved.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketEncryptionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketEncryptionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketEncryptionInput { -#[must_use] -pub fn builder() -> builders::GetBucketEncryptionInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketEncryptionOutput { - pub server_side_encryption_configuration: Option, -} - -impl fmt::Debug for GetBucketEncryptionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketEncryptionOutput"); -if let Some(ref val) = self.server_side_encryption_configuration { -d.field("server_side_encryption_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketIntelligentTieringConfigurationInput { -///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, -///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, -} - -impl fmt::Debug for GetBucketIntelligentTieringConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationInput"); -d.field("bucket", &self.bucket); -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl GetBucketIntelligentTieringConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketIntelligentTieringConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketIntelligentTieringConfigurationOutput { -///

    Container for S3 Intelligent-Tiering configuration.

    - pub intelligent_tiering_configuration: Option, -} - -impl fmt::Debug for GetBucketIntelligentTieringConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationOutput"); -if let Some(ref val) = self.intelligent_tiering_configuration { -d.field("intelligent_tiering_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketInventoryConfigurationInput { -///

    The name of the bucket containing the inventory configuration to retrieve.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, -} - -impl fmt::Debug for GetBucketInventoryConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketInventoryConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl GetBucketInventoryConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketInventoryConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketInventoryConfigurationOutput { -///

    Specifies the inventory configuration.

    - pub inventory_configuration: Option, -} - -impl fmt::Debug for GetBucketInventoryConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketInventoryConfigurationOutput"); -if let Some(ref val) = self.inventory_configuration { -d.field("inventory_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLifecycleConfigurationInput { -///

    The name of the bucket for which to get the lifecycle information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketLifecycleConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLifecycleConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketLifecycleConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketLifecycleConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLifecycleConfigurationOutput { -///

    Container for a lifecycle rule.

    - pub rules: Option, -///

    Indicates which default minimum object size behavior is applied to the lifecycle -/// configuration.

    -/// -///

    This parameter applies to general purpose buckets only. It isn't supported for -/// directory bucket lifecycle configurations.

    -///
    -///
      -///
    • -///

      -/// all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

      -///
    • -///
    • -///

      -/// varies_by_storage_class - Objects smaller than 128 KB will -/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By -/// default, all other storage classes will prevent transitions smaller than 128 KB. -///

      -///
    • -///
    -///

    To customize the minimum object size for any transition you can add a filter that -/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in -/// the body of your transition rule. Custom filters always take precedence over the default -/// transition behavior.

    - pub transition_default_minimum_object_size: Option, -} - -impl fmt::Debug for GetBucketLifecycleConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLifecycleConfigurationOutput"); -if let Some(ref val) = self.rules { -d.field("rules", val); -} -if let Some(ref val) = self.transition_default_minimum_object_size { -d.field("transition_default_minimum_object_size", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLocationInput { -///

    The name of the bucket for which to get the location.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketLocationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLocationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketLocationInput { -#[must_use] -pub fn builder() -> builders::GetBucketLocationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLocationOutput { -///

    Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported -/// location constraints by Region, see Regions and Endpoints.

    -///

    Buckets in Region us-east-1 have a LocationConstraint of -/// null. Buckets with a LocationConstraint of EU reside in eu-west-1.

    - pub location_constraint: Option, -} - -impl fmt::Debug for GetBucketLocationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLocationOutput"); -if let Some(ref val) = self.location_constraint { -d.field("location_constraint", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLoggingInput { -///

    The bucket name for which to get the logging information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketLoggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLoggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketLoggingInput { -#[must_use] -pub fn builder() -> builders::GetBucketLoggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketLoggingOutput { - pub logging_enabled: Option, -} - -impl fmt::Debug for GetBucketLoggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketLoggingOutput"); -if let Some(ref val) = self.logging_enabled { -d.field("logging_enabled", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetadataTableConfigurationInput { -///

    -/// The general purpose bucket that contains the metadata table configuration that you want to retrieve. -///

    - pub bucket: BucketName, -///

    -/// The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. -///

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketMetadataTableConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetadataTableConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketMetadataTableConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketMetadataTableConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetadataTableConfigurationOutput { -///

    -/// The metadata table configuration for the general purpose bucket. -///

    - pub get_bucket_metadata_table_configuration_result: Option, -} - -impl fmt::Debug for GetBucketMetadataTableConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetadataTableConfigurationOutput"); -if let Some(ref val) = self.get_bucket_metadata_table_configuration_result { -d.field("get_bucket_metadata_table_configuration_result", val); -} -d.finish_non_exhaustive() -} -} - - -///

    -/// The metadata table configuration for a general purpose bucket. -///

    -#[derive(Clone, PartialEq)] -pub struct GetBucketMetadataTableConfigurationResult { -///

    -/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was -/// unable to create the table, this structure contains the error code and error message. -///

    - pub error: Option, -///

    -/// The metadata table configuration for a general purpose bucket. -///

    - pub metadata_table_configuration_result: MetadataTableConfigurationResult, -///

    -/// The status of the metadata table. The status values are: -///

    -///
      -///
    • -///

      -/// CREATING - The metadata table is in the process of being created in the -/// specified table bucket.

      -///
    • -///
    • -///

      -/// ACTIVE - The metadata table has been created successfully and records -/// are being delivered to the table. -///

      -///
    • -///
    • -///

      -/// FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver -/// records. See ErrorDetails for details.

      -///
    • -///
    - pub status: MetadataTableStatus, -} - -impl fmt::Debug for GetBucketMetadataTableConfigurationResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetadataTableConfigurationResult"); -if let Some(ref val) = self.error { -d.field("error", val); -} -d.field("metadata_table_configuration_result", &self.metadata_table_configuration_result); -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetricsConfigurationInput { -///

    The name of the bucket containing the metrics configuration to retrieve.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and -/// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, -} - -impl fmt::Debug for GetBucketMetricsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetricsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - -impl GetBucketMetricsConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketMetricsConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketMetricsConfigurationOutput { -///

    Specifies the metrics configuration.

    - pub metrics_configuration: Option, -} - -impl fmt::Debug for GetBucketMetricsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketMetricsConfigurationOutput"); -if let Some(ref val) = self.metrics_configuration { -d.field("metrics_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketNotificationConfigurationInput { -///

    The name of the bucket for which to get the notification configuration.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketNotificationConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketNotificationConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketNotificationConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetBucketNotificationConfigurationInputBuilder { -default() -} -} - -///

    A container for specifying the notification configuration of the bucket. If this element -/// is empty, notifications are turned off for the bucket.

    -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketNotificationConfigurationOutput { -///

    Enables delivery of events to Amazon EventBridge.

    - pub event_bridge_configuration: Option, -///

    Describes the Lambda functions to invoke and the events for which to invoke -/// them.

    - pub lambda_function_configurations: Option, -///

    The Amazon Simple Queue Service queues to publish messages to and the events for which -/// to publish messages.

    - pub queue_configurations: Option, -///

    The topic to which notifications are sent and the events for which notifications are -/// generated.

    - pub topic_configurations: Option, -} - -impl fmt::Debug for GetBucketNotificationConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketNotificationConfigurationOutput"); -if let Some(ref val) = self.event_bridge_configuration { -d.field("event_bridge_configuration", val); -} -if let Some(ref val) = self.lambda_function_configurations { -d.field("lambda_function_configurations", val); -} -if let Some(ref val) = self.queue_configurations { -d.field("queue_configurations", val); -} -if let Some(ref val) = self.topic_configurations { -d.field("topic_configurations", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketOwnershipControlsInput { -///

    The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. -///

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketOwnershipControlsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketOwnershipControlsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketOwnershipControlsInput { -#[must_use] -pub fn builder() -> builders::GetBucketOwnershipControlsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketOwnershipControlsOutput { -///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or -/// ObjectWriter) currently in effect for this Amazon S3 bucket.

    - pub ownership_controls: Option, -} - -impl fmt::Debug for GetBucketOwnershipControlsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketOwnershipControlsOutput"); -if let Some(ref val) = self.ownership_controls { -d.field("ownership_controls", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyInput { -///

    The bucket name to get the bucket policy for.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    -///

    -/// Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    -/// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketPolicyInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketPolicyInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketPolicyInput { -#[must_use] -pub fn builder() -> builders::GetBucketPolicyInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyOutput { -///

    The bucket policy as a JSON document.

    - pub policy: Option, -} - -impl fmt::Debug for GetBucketPolicyOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketPolicyOutput"); -if let Some(ref val) = self.policy { -d.field("policy", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyStatusInput { -///

    The name of the Amazon S3 bucket whose policy status you want to retrieve.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketPolicyStatusInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketPolicyStatusInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketPolicyStatusInput { -#[must_use] -pub fn builder() -> builders::GetBucketPolicyStatusInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketPolicyStatusOutput { -///

    The policy status for the specified bucket.

    - pub policy_status: Option, -} - -impl fmt::Debug for GetBucketPolicyStatusOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketPolicyStatusOutput"); -if let Some(ref val) = self.policy_status { -d.field("policy_status", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketReplicationInput { -///

    The bucket name for which to get the replication information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketReplicationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketReplicationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketReplicationInput { -#[must_use] -pub fn builder() -> builders::GetBucketReplicationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketReplicationOutput { - pub replication_configuration: Option, -} - -impl fmt::Debug for GetBucketReplicationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketReplicationOutput"); -if let Some(ref val) = self.replication_configuration { -d.field("replication_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketRequestPaymentInput { -///

    The name of the bucket for which to get the payment request configuration

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketRequestPaymentInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketRequestPaymentInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketRequestPaymentInput { -#[must_use] -pub fn builder() -> builders::GetBucketRequestPaymentInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketRequestPaymentOutput { -///

    Specifies who pays for the download and request fees.

    - pub payer: Option, -} - -impl fmt::Debug for GetBucketRequestPaymentOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketRequestPaymentOutput"); -if let Some(ref val) = self.payer { -d.field("payer", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketTaggingInput { -///

    The name of the bucket for which to get the tagging information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketTaggingInput { -#[must_use] -pub fn builder() -> builders::GetBucketTaggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketTaggingOutput { -///

    Contains the tag set.

    - pub tag_set: TagSet, -} - -impl fmt::Debug for GetBucketTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketTaggingOutput"); -d.field("tag_set", &self.tag_set); -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketVersioningInput { -///

    The name of the bucket for which to get the versioning information.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketVersioningInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketVersioningInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketVersioningInput { -#[must_use] -pub fn builder() -> builders::GetBucketVersioningInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketVersioningOutput { -///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This -/// element is only returned if the bucket has been configured with MFA delete. If the bucket -/// has never been so configured, this element is not returned.

    - pub mfa_delete: Option, -///

    The versioning state of the bucket.

    - pub status: Option, -} - -impl fmt::Debug for GetBucketVersioningOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketVersioningOutput"); -if let Some(ref val) = self.mfa_delete { -d.field("mfa_delete", val); -} -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketWebsiteInput { -///

    The bucket name for which to get the website configuration.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetBucketWebsiteInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketWebsiteInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetBucketWebsiteInput { -#[must_use] -pub fn builder() -> builders::GetBucketWebsiteInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetBucketWebsiteOutput { -///

    The object key name of the website error document to use for 4XX class errors.

    - pub error_document: Option, -///

    The name of the index document for the website (for example -/// index.html).

    - pub index_document: Option, -///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 -/// bucket.

    - pub redirect_all_requests_to: Option, -///

    Rules that define when a redirect is applied and the redirect behavior.

    - pub routing_rules: Option, -} - -impl fmt::Debug for GetBucketWebsiteOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetBucketWebsiteOutput"); -if let Some(ref val) = self.error_document { -d.field("error_document", val); -} -if let Some(ref val) = self.index_document { -d.field("index_document", val); -} -if let Some(ref val) = self.redirect_all_requests_to { -d.field("redirect_all_requests_to", val); -} -if let Some(ref val) = self.routing_rules { -d.field("routing_rules", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAclInput { -///

    The bucket name that contains the object for which to get the ACL information.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The key of the object for which to get the ACL information.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    Version ID used to reference a specific version of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectAclInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAclInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectAclInput { -#[must_use] -pub fn builder() -> builders::GetObjectAclInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAclOutput { -///

    A list of grants.

    - pub grants: Option, -///

    Container for the bucket owner's display name and ID.

    - pub owner: Option, - pub request_charged: Option, -} - -impl fmt::Debug for GetObjectAclOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAclOutput"); -if let Some(ref val) = self.grants { -d.field("grants", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesInput { -///

    The name of the bucket that contains the object.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The object key.

    - pub key: ObjectKey, -///

    Sets the maximum number of parts to return.

    - pub max_parts: Option, -///

    Specifies the fields at the root level that you want returned in the response. Fields -/// that you do not specify are not returned.

    - pub object_attributes: ObjectAttributesList, -///

    Specifies the part after which listing should begin. Only parts with higher part numbers -/// will be listed.

    - pub part_number_marker: Option, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    The version ID used to reference a specific version of the object.

    -/// -///

    S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the -/// versionId query parameter in the request.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectAttributesInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAttributesInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.max_parts { -d.field("max_parts", val); -} -d.field("object_attributes", &self.object_attributes); -if let Some(ref val) = self.part_number_marker { -d.field("part_number_marker", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectAttributesInput { -#[must_use] -pub fn builder() -> builders::GetObjectAttributesInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesOutput { -///

    The checksum or digest of the object.

    - pub checksum: Option, -///

    Specifies whether the object retrieved was (true) or was not -/// (false) a delete marker. If false, this response header does -/// not appear in the response. To learn more about delete markers, see Working with delete markers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub delete_marker: Option, -///

    An ETag is an opaque identifier assigned by a web server to a specific version of a -/// resource found at a URL.

    - pub e_tag: Option, -///

    Date and time when the object was last modified.

    - pub last_modified: Option, -///

    A collection of parts associated with a multipart upload.

    - pub object_parts: Option, -///

    The size of the object in bytes.

    - pub object_size: Option, - pub request_charged: Option, -///

    Provides the storage class information of the object. Amazon S3 returns this header for all -/// objects except for S3 Standard storage class objects.

    -///

    For more information, see Storage Classes.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    The version ID of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectAttributesOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAttributesOutput"); -if let Some(ref val) = self.checksum { -d.field("checksum", val); -} -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.object_parts { -d.field("object_parts", val); -} -if let Some(ref val) = self.object_size { -d.field("object_size", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -///

    A collection of parts associated with a multipart upload.

    -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectAttributesParts { -///

    Indicates whether the returned list of parts is truncated. A value of true -/// indicates that the list was truncated. A list can be truncated if the number of parts -/// exceeds the limit returned in the MaxParts element.

    - pub is_truncated: Option, -///

    The maximum number of parts allowed in the response.

    - pub max_parts: Option, -///

    When a list is truncated, this element specifies the last part in the list, as well as -/// the value to use for the PartNumberMarker request parameter in a subsequent -/// request.

    - pub next_part_number_marker: Option, -///

    The marker for the current part.

    - pub part_number_marker: Option, -///

    A container for elements related to a particular part. A response can contain zero or -/// more Parts elements.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - For -/// GetObjectAttributes, if a additional checksum (including -/// x-amz-checksum-crc32, x-amz-checksum-crc32c, -/// x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't -/// applied to the object specified in the request, the response doesn't return -/// Part.

      -///
    • -///
    • -///

      -/// Directory buckets - For -/// GetObjectAttributes, no matter whether a additional checksum is -/// applied to the object specified in the request, the response returns -/// Part.

      -///
    • -///
    -///
    - pub parts: Option, -///

    The total number of parts.

    - pub total_parts_count: Option, -} - -impl fmt::Debug for GetObjectAttributesParts { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectAttributesParts"); -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.max_parts { -d.field("max_parts", val); -} -if let Some(ref val) = self.next_part_number_marker { -d.field("next_part_number_marker", val); -} -if let Some(ref val) = self.part_number_marker { -d.field("part_number_marker", val); -} -if let Some(ref val) = self.parts { -d.field("parts", val); -} -if let Some(ref val) = self.total_parts_count { -d.field("total_parts_count", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectInput { -///

    The bucket name containing the object.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    To retrieve the checksum, this mode must be enabled.

    - pub checksum_mode: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Return the object only if its entity tag (ETag) is the same as the one specified in this -/// header; otherwise, return a 412 Precondition Failed error.

    -///

    If both of the If-Match and If-Unmodified-Since headers are -/// present in the request as follows: If-Match condition evaluates to -/// true, and; If-Unmodified-Since condition evaluates to -/// false; then, S3 returns 200 OK and the data requested.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_match: Option, -///

    Return the object only if it has been modified since the specified time; otherwise, -/// return a 304 Not Modified error.

    -///

    If both of the If-None-Match and If-Modified-Since headers are -/// present in the request as follows: If-None-Match condition evaluates to -/// false, and; If-Modified-Since condition evaluates to -/// true; then, S3 returns 304 Not Modified status code.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_modified_since: Option, -///

    Return the object only if its entity tag (ETag) is different from the one specified in -/// this header; otherwise, return a 304 Not Modified error.

    -///

    If both of the If-None-Match and If-Modified-Since headers are -/// present in the request as follows: If-None-Match condition evaluates to -/// false, and; If-Modified-Since condition evaluates to -/// true; then, S3 returns 304 Not Modified HTTP status -/// code.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_none_match: Option, -///

    Return the object only if it has not been modified since the specified time; otherwise, -/// return a 412 Precondition Failed error.

    -///

    If both of the If-Match and If-Unmodified-Since headers are -/// present in the request as follows: If-Match condition evaluates to -/// true, and; If-Unmodified-Since condition evaluates to -/// false; then, S3 returns 200 OK and the data requested.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_unmodified_since: Option, -///

    Key of the object to get.

    - pub key: ObjectKey, -///

    Part number of the object being read. This is a positive integer between 1 and 10,000. -/// Effectively performs a 'ranged' GET request for the part specified. Useful for downloading -/// just a part of an object.

    - pub part_number: Option, -///

    Downloads the specified byte range of an object. For more information about the HTTP -/// Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

    -/// -///

    Amazon S3 doesn't support retrieving multiple ranges of data per GET -/// request.

    -///
    - pub range: Option, - pub request_payer: Option, -///

    Sets the Cache-Control header of the response.

    - pub response_cache_control: Option, -///

    Sets the Content-Disposition header of the response.

    - pub response_content_disposition: Option, -///

    Sets the Content-Encoding header of the response.

    - pub response_content_encoding: Option, -///

    Sets the Content-Language header of the response.

    - pub response_content_language: Option, -///

    Sets the Content-Type header of the response.

    - pub response_content_type: Option, -///

    Sets the Expires header of the response.

    - pub response_expires: Option, -///

    Specifies the algorithm to use when decrypting the object (for example, -/// AES256).

    -///

    If you encrypt an object by using server-side encryption with customer-provided -/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, -/// you must use the following headers:

    -///
      -///
    • -///

      -/// x-amz-server-side-encryption-customer-algorithm -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key-MD5 -///

      -///
    • -///
    -///

    For more information about SSE-C, see Server-Side Encryption -/// (Using Customer-Provided Encryption Keys) in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key that you originally provided for Amazon S3 to -/// encrypt the data before storing it. This value is used to decrypt the object when -/// recovering it and must match the one used when storing the data. The key must be -/// appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -///

    If you encrypt an object by using server-side encryption with customer-provided -/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, -/// you must use the following headers:

    -///
      -///
    • -///

      -/// x-amz-server-side-encryption-customer-algorithm -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key-MD5 -///

      -///
    • -///
    -///

    For more information about SSE-C, see Server-Side Encryption -/// (Using Customer-Provided Encryption Keys) in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to -/// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption -/// key was transmitted without error.

    -///

    If you encrypt an object by using server-side encryption with customer-provided -/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, -/// you must use the following headers:

    -///
      -///
    • -///

      -/// x-amz-server-side-encryption-customer-algorithm -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key-MD5 -///

      -///
    • -///
    -///

    For more information about SSE-C, see Server-Side Encryption -/// (Using Customer-Provided Encryption Keys) in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Version ID used to reference a specific version of the object.

    -///

    By default, the GetObject operation returns the current version of an -/// object. To return a different version, use the versionId subresource.

    -/// -///
      -///
    • -///

      If you include a versionId in your request header, you must have -/// the s3:GetObjectVersion permission to access a specific version of an -/// object. The s3:GetObject permission is not required in this -/// scenario.

      -///
    • -///
    • -///

      If you request the current version of an object without a specific -/// versionId in the request header, only the -/// s3:GetObject permission is required. The -/// s3:GetObjectVersion permission is not required in this -/// scenario.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the -/// versionId query parameter in the request.

      -///
    • -///
    -///
    -///

    For more information about versioning, see PutBucketVersioning.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_mode { -d.field("checksum_mode", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_modified_since { -d.field("if_modified_since", val); -} -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); -} -if let Some(ref val) = self.if_unmodified_since { -d.field("if_unmodified_since", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -if let Some(ref val) = self.range { -d.field("range", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.response_cache_control { -d.field("response_cache_control", val); -} -if let Some(ref val) = self.response_content_disposition { -d.field("response_content_disposition", val); -} -if let Some(ref val) = self.response_content_encoding { -d.field("response_content_encoding", val); -} -if let Some(ref val) = self.response_content_language { -d.field("response_content_language", val); -} -if let Some(ref val) = self.response_content_type { -d.field("response_content_type", val); -} -if let Some(ref val) = self.response_expires { -d.field("response_expires", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectInput { -#[must_use] -pub fn builder() -> builders::GetObjectInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLegalHoldInput { -///

    The bucket name containing the object whose legal hold status you want to retrieve.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The key name for the object whose legal hold status you want to retrieve.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    The version ID of the object whose legal hold status you want to retrieve.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectLegalHoldInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectLegalHoldInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectLegalHoldInput { -#[must_use] -pub fn builder() -> builders::GetObjectLegalHoldInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLegalHoldOutput { -///

    The current legal hold status for the specified object.

    - pub legal_hold: Option, -} - -impl fmt::Debug for GetObjectLegalHoldOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectLegalHoldOutput"); -if let Some(ref val) = self.legal_hold { -d.field("legal_hold", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLockConfigurationInput { -///

    The bucket whose Object Lock configuration you want to retrieve.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetObjectLockConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectLockConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectLockConfigurationInput { -#[must_use] -pub fn builder() -> builders::GetObjectLockConfigurationInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectLockConfigurationOutput { -///

    The specified bucket's Object Lock configuration.

    - pub object_lock_configuration: Option, -} - -impl fmt::Debug for GetObjectLockConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectLockConfigurationOutput"); -if let Some(ref val) = self.object_lock_configuration { -d.field("object_lock_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Default)] -pub struct GetObjectOutput { -///

    Indicates that a range of bytes was specified in the request.

    - pub accept_ranges: Option, -///

    Object data.

    - pub body: Option, -///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with -/// Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more -/// information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. For more information, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    The checksum type, which determines how part-level checksums are combined to create an -/// object-level checksum for multipart objects. You can use this header response to verify -/// that the checksum type that is received is the same checksum type that was specified in the -/// CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Specifies presentational information for the object.

    - pub content_disposition: Option, -///

    Indicates what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    Size of the body in bytes.

    - pub content_length: Option, -///

    The portion of the object returned in the response.

    - pub content_range: Option, -///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, -///

    Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If -/// false, this response header does not appear in the response.

    -/// -///
      -///
    • -///

      If the current version of the object is a delete marker, Amazon S3 behaves as if the -/// object was deleted and includes x-amz-delete-marker: true in the -/// response.

      -///
    • -///
    • -///

      If the specified version in the request is a delete marker, the response -/// returns a 405 Method Not Allowed error and the Last-Modified: -/// timestamp response header.

      -///
    • -///
    -///
    - pub delete_marker: Option, -///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific -/// version of a resource found at a URL.

    - pub e_tag: Option, -///

    If the object expiration is configured (see -/// PutBucketLifecycleConfiguration -/// ), the response includes this -/// header. It includes the expiry-date and rule-id key-value pairs -/// providing object expiration information. The value of the rule-id is -/// URL-encoded.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    - pub expiration: Option, -///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, -///

    Date and time when the object was last modified.

    -///

    -/// General purpose buckets - When you specify a -/// versionId of the object in your request, if the specified version in the -/// request is a delete marker, the response returns a 405 Method Not Allowed -/// error and the Last-Modified: timestamp response header.

    - pub last_modified: Option, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    This is set to the number of metadata entries not returned in the headers that are -/// prefixed with x-amz-meta-. This can happen if you create metadata using an API -/// like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, -/// you can create metadata whose values are not legal HTTP headers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub missing_meta: Option, -///

    Indicates whether this object has an active legal hold. This field is only returned if -/// you have permission to view an object's legal hold status.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode that's currently in place for this object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_mode: Option, -///

    The date and time when this object's Object Lock will expire.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_retain_until_date: Option, -///

    The count of parts this object has. This value is only returned if you specify -/// partNumber in your request and the object was uploaded as a multipart -/// upload.

    - pub parts_count: Option, -///

    Amazon S3 can return this if your request involves a bucket that is either a source or -/// destination in a replication rule.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub replication_status: Option, - pub request_charged: Option, -///

    Provides information about object restoration action and expiration time of the restored -/// object copy.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub restore: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, -///

    Provides storage class information of the object. Amazon S3 returns this header for all -/// objects except for S3 Standard storage class objects.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    The number of tags, if any, on the object, when you have the relevant permission to read -/// object tags.

    -///

    You can use GetObjectTagging to retrieve -/// the tag set associated with an object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub tag_count: Option, -///

    Version ID of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub website_redirect_location: Option, -} - -impl fmt::Debug for GetObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectOutput"); -if let Some(ref val) = self.accept_ranges { -d.field("accept_ranges", val); -} -if let Some(ref val) = self.body { -d.field("body", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_length { -d.field("content_length", val); -} -if let Some(ref val) = self.content_range { -d.field("content_range", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.missing_meta { -d.field("missing_meta", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.parts_count { -d.field("parts_count", val); -} -if let Some(ref val) = self.replication_status { -d.field("replication_status", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.restore { -d.field("restore", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.tag_count { -d.field("tag_count", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -d.finish_non_exhaustive() -} -} - - -pub type GetObjectResponseStatusCode = i32; - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectRetentionInput { -///

    The bucket name containing the object whose retention settings you want to retrieve.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The key name for the object whose retention settings you want to retrieve.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    The version ID for the object whose retention settings you want to retrieve.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectRetentionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectRetentionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectRetentionInput { -#[must_use] -pub fn builder() -> builders::GetObjectRetentionInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectRetentionOutput { -///

    The container element for an object's retention settings.

    - pub retention: Option, -} - -impl fmt::Debug for GetObjectRetentionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectRetentionOutput"); -if let Some(ref val) = self.retention { -d.field("retention", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTaggingInput { -///

    The bucket name containing the object for which to get the tagging information.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Object key for which to get the tagging information.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    The versionId of the object for which to get the tagging information.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectTaggingInput { -#[must_use] -pub fn builder() -> builders::GetObjectTaggingInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTaggingOutput { -///

    Contains the tag set.

    - pub tag_set: TagSet, -///

    The versionId of the object for which you got the tagging information.

    - pub version_id: Option, -} - -impl fmt::Debug for GetObjectTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectTaggingOutput"); -d.field("tag_set", &self.tag_set); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetObjectTorrentInput { -///

    The name of the bucket containing the object for which to get the torrent files.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The object key for which to get the information.

    - pub key: ObjectKey, - pub request_payer: Option, -} - -impl fmt::Debug for GetObjectTorrentInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectTorrentInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.finish_non_exhaustive() -} -} - -impl GetObjectTorrentInput { -#[must_use] -pub fn builder() -> builders::GetObjectTorrentInputBuilder { -default() -} -} - -#[derive(Default)] -pub struct GetObjectTorrentOutput { -///

    A Bencoded dictionary as defined by the BitTorrent specification

    - pub body: Option, - pub request_charged: Option, -} - -impl fmt::Debug for GetObjectTorrentOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetObjectTorrentOutput"); -if let Some(ref val) = self.body { -d.field("body", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct GetPublicAccessBlockInput { -///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want -/// to retrieve.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for GetPublicAccessBlockInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetPublicAccessBlockInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl GetPublicAccessBlockInput { -#[must_use] -pub fn builder() -> builders::GetPublicAccessBlockInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct GetPublicAccessBlockOutput { -///

    The PublicAccessBlock configuration currently in effect for this Amazon S3 -/// bucket.

    - pub public_access_block_configuration: Option, -} - -impl fmt::Debug for GetPublicAccessBlockOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GetPublicAccessBlockOutput"); -if let Some(ref val) = self.public_access_block_configuration { -d.field("public_access_block_configuration", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Container for S3 Glacier job parameters.

    -#[derive(Clone, PartialEq)] -pub struct GlacierJobParameters { -///

    Retrieval tier at which the restore will be processed.

    - pub tier: Tier, -} - -impl fmt::Debug for GlacierJobParameters { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("GlacierJobParameters"); -d.field("tier", &self.tier); -d.finish_non_exhaustive() -} -} - - -///

    Container for grant information.

    -#[derive(Clone, Default, PartialEq)] -pub struct Grant { -///

    The person being granted permissions.

    - pub grantee: Option, -///

    Specifies the permission given to the grantee.

    - pub permission: Option, -} - -impl fmt::Debug for Grant { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Grant"); -if let Some(ref val) = self.grantee { -d.field("grantee", val); -} -if let Some(ref val) = self.permission { -d.field("permission", val); -} -d.finish_non_exhaustive() -} -} - - -pub type GrantFullControl = String; - -pub type GrantRead = String; - -pub type GrantReadACP = String; - -pub type GrantWrite = String; - -pub type GrantWriteACP = String; - -///

    Container for the person being granted permissions.

    -#[derive(Clone, PartialEq)] -pub struct Grantee { -///

    Screen name of the grantee.

    - pub display_name: Option, -///

    Email address of the grantee.

    -/// -///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    -///
      -///
    • -///

      US East (N. Virginia)

      -///
    • -///
    • -///

      US West (N. California)

      -///
    • -///
    • -///

      US West (Oregon)

      -///
    • -///
    • -///

      Asia Pacific (Singapore)

      -///
    • -///
    • -///

      Asia Pacific (Sydney)

      -///
    • -///
    • -///

      Asia Pacific (Tokyo)

      -///
    • -///
    • -///

      Europe (Ireland)

      -///
    • -///
    • -///

      South America (São Paulo)

      -///
    • -///
    -///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    -///
    - pub email_address: Option, -///

    The canonical user ID of the grantee.

    - pub id: Option, -///

    Type of grantee

    - pub type_: Type, -///

    URI of the grantee group.

    - pub uri: Option, -} - -impl fmt::Debug for Grantee { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Grantee"); -if let Some(ref val) = self.display_name { -d.field("display_name", val); -} -if let Some(ref val) = self.email_address { -d.field("email_address", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.field("type_", &self.type_); -if let Some(ref val) = self.uri { -d.field("uri", val); -} -d.finish_non_exhaustive() -} -} - - -pub type Grants = List; - -#[derive(Clone, Default, PartialEq)] -pub struct HeadBucketInput { -///

    The bucket name.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for HeadBucketInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("HeadBucketInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl HeadBucketInput { -#[must_use] -pub fn builder() -> builders::HeadBucketInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct HeadBucketOutput { -///

    Indicates whether the bucket name used in the request is an access point alias.

    -/// -///

    For directory buckets, the value of this field is false.

    -///
    - pub access_point_alias: Option, -///

    The name of the location where the bucket will be created.

    -///

    For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    - pub bucket_location_name: Option, -///

    The type of location where the bucket is created.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    - pub bucket_location_type: Option, -///

    The Region that the bucket is located.

    - pub bucket_region: Option, -} - -impl fmt::Debug for HeadBucketOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("HeadBucketOutput"); -if let Some(ref val) = self.access_point_alias { -d.field("access_point_alias", val); -} -if let Some(ref val) = self.bucket_location_name { -d.field("bucket_location_name", val); -} -if let Some(ref val) = self.bucket_location_type { -d.field("bucket_location_type", val); -} -if let Some(ref val) = self.bucket_region { -d.field("bucket_region", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct HeadObjectInput { -///

    The name of the bucket that contains the object.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    To retrieve the checksum, this parameter must be enabled.

    -///

    -/// General purpose buckets - -/// If you enable checksum mode and the object is uploaded with a -/// checksum -/// and encrypted with an Key Management Service (KMS) key, you must have permission to use the -/// kms:Decrypt action to retrieve the checksum.

    -///

    -/// Directory buckets - If you enable -/// ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service -/// (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and -/// kms:Decrypt permissions in IAM identity-based policies and KMS key -/// policies for the KMS key to retrieve the checksum of the object.

    - pub checksum_mode: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Return the object only if its entity tag (ETag) is the same as the one specified; -/// otherwise, return a 412 (precondition failed) error.

    -///

    If both of the If-Match and If-Unmodified-Since headers are -/// present in the request as follows:

    -///
      -///
    • -///

      -/// If-Match condition evaluates to true, and;

      -///
    • -///
    • -///

      -/// If-Unmodified-Since condition evaluates to false;

      -///
    • -///
    -///

    Then Amazon S3 returns 200 OK and the data requested.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_match: Option, -///

    Return the object only if it has been modified since the specified time; otherwise, -/// return a 304 (not modified) error.

    -///

    If both of the If-None-Match and If-Modified-Since headers are -/// present in the request as follows:

    -///
      -///
    • -///

      -/// If-None-Match condition evaluates to false, and;

      -///
    • -///
    • -///

      -/// If-Modified-Since condition evaluates to true;

      -///
    • -///
    -///

    Then Amazon S3 returns the 304 Not Modified response code.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_modified_since: Option, -///

    Return the object only if its entity tag (ETag) is different from the one specified; -/// otherwise, return a 304 (not modified) error.

    -///

    If both of the If-None-Match and If-Modified-Since headers are -/// present in the request as follows:

    -///
      -///
    • -///

      -/// If-None-Match condition evaluates to false, and;

      -///
    • -///
    • -///

      -/// If-Modified-Since condition evaluates to true;

      -///
    • -///
    -///

    Then Amazon S3 returns the 304 Not Modified response code.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_none_match: Option, -///

    Return the object only if it has not been modified since the specified time; otherwise, -/// return a 412 (precondition failed) error.

    -///

    If both of the If-Match and If-Unmodified-Since headers are -/// present in the request as follows:

    -///
      -///
    • -///

      -/// If-Match condition evaluates to true, and;

      -///
    • -///
    • -///

      -/// If-Unmodified-Since condition evaluates to false;

      -///
    • -///
    -///

    Then Amazon S3 returns 200 OK and the data requested.

    -///

    For more information about conditional requests, see RFC 7232.

    - pub if_unmodified_since: Option, -///

    The object key.

    - pub key: ObjectKey, -///

    Part number of the object being read. This is a positive integer between 1 and 10,000. -/// Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about -/// the size of the part and the number of parts in this object.

    - pub part_number: Option, -///

    HeadObject returns only the metadata for an object. If the Range is satisfiable, only -/// the ContentLength is affected in the response. If the Range is not -/// satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

    - pub range: Option, - pub request_payer: Option, -///

    Sets the Cache-Control header of the response.

    - pub response_cache_control: Option, -///

    Sets the Content-Disposition header of the response.

    - pub response_content_disposition: Option, -///

    Sets the Content-Encoding header of the response.

    - pub response_content_encoding: Option, -///

    Sets the Content-Language header of the response.

    - pub response_content_language: Option, -///

    Sets the Content-Type header of the response.

    - pub response_content_type: Option, -///

    Sets the Expires header of the response.

    - pub response_expires: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Version ID used to reference a specific version of the object.

    -/// -///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for HeadObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("HeadObjectInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_mode { -d.field("checksum_mode", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.if_match { -d.field("if_match", val); -} -if let Some(ref val) = self.if_modified_since { -d.field("if_modified_since", val); -} -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); -} -if let Some(ref val) = self.if_unmodified_since { -d.field("if_unmodified_since", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -if let Some(ref val) = self.range { -d.field("range", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.response_cache_control { -d.field("response_cache_control", val); -} -if let Some(ref val) = self.response_content_disposition { -d.field("response_content_disposition", val); -} -if let Some(ref val) = self.response_content_encoding { -d.field("response_content_encoding", val); -} -if let Some(ref val) = self.response_content_language { -d.field("response_content_language", val); -} -if let Some(ref val) = self.response_content_type { -d.field("response_content_type", val); -} -if let Some(ref val) = self.response_expires { -d.field("response_expires", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - -impl HeadObjectInput { -#[must_use] -pub fn builder() -> builders::HeadObjectInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct HeadObjectOutput { -///

    Indicates that a range of bytes was specified.

    - pub accept_ranges: Option, -///

    The archive state of the head object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub archive_status: Option, -///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with -/// Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more -/// information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    The checksum type, which determines how part-level checksums are combined to create an -/// object-level checksum for multipart objects. You can use this header response to verify -/// that the checksum type that is received is the same checksum type that was specified in -/// CreateMultipartUpload request. For more -/// information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Specifies presentational information for the object.

    - pub content_disposition: Option, -///

    Indicates what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    Size of the body in bytes.

    - pub content_length: Option, -///

    The portion of the object returned in the response for a GET request.

    - pub content_range: Option, -///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, -///

    Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If -/// false, this response header does not appear in the response.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub delete_marker: Option, -///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific -/// version of a resource found at a URL.

    - pub e_tag: Option, -///

    If the object expiration is configured (see -/// PutBucketLifecycleConfiguration -/// ), the response includes this -/// header. It includes the expiry-date and rule-id key-value pairs -/// providing object expiration information. The value of the rule-id is -/// URL-encoded.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    - pub expiration: Option, -///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, -///

    Date and time when the object was last modified.

    - pub last_modified: Option, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    This is set to the number of metadata entries not returned in x-amz-meta -/// headers. This can happen if you create metadata using an API like SOAP that supports more -/// flexible metadata than the REST API. For example, using SOAP, you can create metadata whose -/// values are not legal HTTP headers.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub missing_meta: Option, -///

    Specifies whether a legal hold is in effect for this object. This header is only -/// returned if the requester has the s3:GetObjectLegalHold permission. This -/// header is not returned if the specified version of this object has never had a legal hold -/// applied. For more information about S3 Object Lock, see Object Lock.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode, if any, that's in effect for this object. This header is only -/// returned if the requester has the s3:GetObjectRetention permission. For more -/// information about S3 Object Lock, see Object Lock.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_mode: Option, -///

    The date and time when the Object Lock retention period expires. This header is only -/// returned if the requester has the s3:GetObjectRetention permission.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_retain_until_date: Option, -///

    The count of parts this object has. This value is only returned if you specify -/// partNumber in your request and the object was uploaded as a multipart -/// upload.

    - pub parts_count: Option, -///

    Amazon S3 can return this header if your request involves a bucket that is either a source or -/// a destination in a replication rule.

    -///

    In replication, you have a source bucket on which you configure replication and -/// destination bucket or buckets where Amazon S3 stores object replicas. When you request an object -/// (GetObject) or object metadata (HeadObject) from these -/// buckets, Amazon S3 will return the x-amz-replication-status header in the response -/// as follows:

    -///
      -///
    • -///

      -/// If requesting an object from the source bucket, -/// Amazon S3 will return the x-amz-replication-status header if the object in -/// your request is eligible for replication.

      -///

      For example, suppose that in your replication configuration, you specify object -/// prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix -/// TaxDocs. Any objects you upload with this key name prefix, for -/// example TaxDocs/document1.pdf, are eligible for replication. For any -/// object request with this key name prefix, Amazon S3 will return the -/// x-amz-replication-status header with value PENDING, COMPLETED or -/// FAILED indicating object replication status.

      -///
    • -///
    • -///

      -/// If requesting an object from a destination -/// bucket, Amazon S3 will return the x-amz-replication-status header -/// with value REPLICA if the object in your request is a replica that Amazon S3 created and -/// there is no replica modification replication in progress.

      -///
    • -///
    • -///

      -/// When replicating objects to multiple destination -/// buckets, the x-amz-replication-status header acts -/// differently. The header of the source object will only return a value of COMPLETED -/// when replication is successful to all destinations. The header will remain at value -/// PENDING until replication has completed for all destinations. If one or more -/// destinations fails replication the header will return FAILED.

      -///
    • -///
    -///

    For more information, see Replication.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub replication_status: Option, - pub request_charged: Option, -///

    If the object is an archived object (an object whose storage class is GLACIER), the -/// response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

    -///

    If an archive copy is already restored, the header value indicates when Amazon S3 is -/// scheduled to delete the object copy. For example:

    -///

    -/// x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 -/// GMT" -///

    -///

    If the object restoration is in progress, the header returns the value -/// ongoing-request="true".

    -///

    For more information about archiving objects, see Transitioning Objects: General Considerations.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub restore: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms, aws:kms:dsse).

    - pub server_side_encryption: Option, -///

    Provides storage class information of the object. Amazon S3 returns this header for all -/// objects except for S3 Standard storage class objects.

    -///

    For more information, see Storage Classes.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    Version ID of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub website_redirect_location: Option, -} - -impl fmt::Debug for HeadObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("HeadObjectOutput"); -if let Some(ref val) = self.accept_ranges { -d.field("accept_ranges", val); -} -if let Some(ref val) = self.archive_status { -d.field("archive_status", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); -} -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); -} -if let Some(ref val) = self.content_language { -d.field("content_language", val); -} -if let Some(ref val) = self.content_length { -d.field("content_length", val); -} -if let Some(ref val) = self.content_range { -d.field("content_range", val); -} -if let Some(ref val) = self.content_type { -d.field("content_type", val); -} -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.expires { -d.field("expires", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.metadata { -d.field("metadata", val); -} -if let Some(ref val) = self.missing_meta { -d.field("missing_meta", val); -} -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); -} -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); -} -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); -} -if let Some(ref val) = self.parts_count { -d.field("parts_count", val); -} -if let Some(ref val) = self.replication_status { -d.field("replication_status", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.restore { -d.field("restore", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); -} -d.finish_non_exhaustive() -} -} - - -pub type HostName = String; - -pub type HttpErrorCodeReturnedEquals = String; - -pub type HttpRedirectCode = String; - -pub type ID = String; - -pub type IfMatch = ETagCondition; - -pub type IfMatchInitiatedTime = Timestamp; - -pub type IfMatchLastModifiedTime = Timestamp; - -pub type IfMatchSize = i64; - -pub type IfModifiedSince = Timestamp; - -pub type IfNoneMatch = ETagCondition; - -pub type IfUnmodifiedSince = Timestamp; - -///

    Container for the Suffix element.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IndexDocument { -///

    A suffix that is appended to a request that is for a directory on the website endpoint. -/// (For example, if the suffix is index.html and you make a request to -/// samplebucket/images/, the data that is returned will be for the object with -/// the key name images/index.html.) The suffix must not be empty and must not -/// include a slash character.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub suffix: Suffix, -} - -impl fmt::Debug for IndexDocument { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("IndexDocument"); -d.field("suffix", &self.suffix); -d.finish_non_exhaustive() -} -} - - -pub type Initiated = Timestamp; - -///

    Container element that identifies who initiated the multipart upload.

    -#[derive(Clone, Default, PartialEq)] -pub struct Initiator { -///

    Name of the Principal.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub display_name: Option, -///

    If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the -/// principal is an IAM User, it provides a user ARN value.

    -/// -///

    -/// Directory buckets - If the principal is an -/// Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it -/// provides a user ARN value.

    -///
    - pub id: Option, -} - -impl fmt::Debug for Initiator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Initiator"); -if let Some(ref val) = self.display_name { -d.field("display_name", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Describes the serialization format of the object.

    -#[derive(Clone, Default, PartialEq)] -pub struct InputSerialization { -///

    Describes the serialization of a CSV-encoded object.

    - pub csv: Option, -///

    Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: -/// NONE.

    - pub compression_type: Option, -///

    Specifies JSON as object's input serialization format.

    - pub json: Option, -///

    Specifies Parquet as object's input serialization format.

    - pub parquet: Option, -} - -impl fmt::Debug for InputSerialization { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InputSerialization"); -if let Some(ref val) = self.csv { -d.field("csv", val); -} -if let Some(ref val) = self.compression_type { -d.field("compression_type", val); -} -if let Some(ref val) = self.json { -d.field("json", val); -} -if let Some(ref val) = self.parquet { -d.field("parquet", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct IntelligentTieringAccessTier(Cow<'static, str>); - -impl IntelligentTieringAccessTier { -pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; - -pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for IntelligentTieringAccessTier { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: IntelligentTieringAccessTier) -> Self { -s.0 -} -} - -impl FromStr for IntelligentTieringAccessTier { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A container for specifying S3 Intelligent-Tiering filters. The filters determine the -/// subset of objects to which the rule applies.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringAndOperator { -///

    An object key name prefix that identifies the subset of objects to which the -/// configuration applies.

    - pub prefix: Option, -///

    All of these tags must exist in the object's tag set in order for the configuration to -/// apply.

    - pub tags: Option, -} - -impl fmt::Debug for IntelligentTieringAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("IntelligentTieringAndOperator"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

    -///

    For information about the S3 Intelligent-Tiering storage class, see Storage class -/// for automatically optimizing frequently and infrequently accessed -/// objects.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringConfiguration { -///

    Specifies a bucket filter. The configuration only includes objects that meet the -/// filter's criteria.

    - pub filter: Option, -///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, -///

    Specifies the status of the configuration.

    - pub status: IntelligentTieringStatus, -///

    Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

    - pub tierings: TieringList, -} - -impl fmt::Debug for IntelligentTieringConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("IntelligentTieringConfiguration"); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -d.field("id", &self.id); -d.field("status", &self.status); -d.field("tierings", &self.tierings); -d.finish_non_exhaustive() -} -} - -impl Default for IntelligentTieringConfiguration { -fn default() -> Self { -Self { -filter: None, -id: default(), -status: String::new().into(), -tierings: default(), -} -} -} - - -pub type IntelligentTieringConfigurationList = List; - -pub type IntelligentTieringDays = i32; - -///

    The Filter is used to identify objects that the S3 Intelligent-Tiering -/// configuration applies to.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct IntelligentTieringFilter { -///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. -/// The operator must have at least two predicates, and an object must match all of the -/// predicates in order for the filter to apply.

    - pub and: Option, -///

    An object key name prefix that identifies the subset of objects to which the rule -/// applies.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, - pub tag: Option, -} - -impl fmt::Debug for IntelligentTieringFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("IntelligentTieringFilter"); -if let Some(ref val) = self.and { -d.field("and", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tag { -d.field("tag", val); -} -d.finish_non_exhaustive() -} -} - - -pub type IntelligentTieringId = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct IntelligentTieringStatus(Cow<'static, str>); - -impl IntelligentTieringStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for IntelligentTieringStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: IntelligentTieringStatus) -> Self { -s.0 -} -} - -impl FromStr for IntelligentTieringStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Object is archived and inaccessible until restored.

    -///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage -/// class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access -/// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you -/// must first restore a copy using RestoreObject. Otherwise, this -/// operation returns an InvalidObjectState error. For information about restoring -/// archived objects, see Restoring Archived Objects in -/// the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidObjectState { - pub access_tier: Option, - pub storage_class: Option, -} - -impl fmt::Debug for InvalidObjectState { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InvalidObjectState"); -if let Some(ref val) = self.access_tier { -d.field("access_tier", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} -} - - -///

    You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

    -///
      -///
    • -///

      Cannot specify both a write offset value and user-defined object metadata for existing objects.

      -///
    • -///
    • -///

      Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

      -///
    • -///
    • -///

      Request body cannot be empty when 'write offset' is specified.

      -///
    • -///
    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidRequest { -} - -impl fmt::Debug for InvalidRequest { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InvalidRequest"); -d.finish_non_exhaustive() -} -} - - -///

    -/// The write offset value that you specified does not match the current object size. -///

    -#[derive(Clone, Default, PartialEq)] -pub struct InvalidWriteOffset { -} - -impl fmt::Debug for InvalidWriteOffset { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InvalidWriteOffset"); -d.finish_non_exhaustive() -} -} - - -///

    Specifies the inventory configuration for an Amazon S3 bucket. For more information, see -/// GET Bucket inventory in the Amazon S3 API Reference.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryConfiguration { -///

    Contains information about where to publish the inventory results.

    - pub destination: InventoryDestination, -///

    Specifies an inventory filter. The inventory only includes objects that meet the -/// filter's criteria.

    - pub filter: Option, -///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, -///

    Object versions to include in the inventory list. If set to All, the list -/// includes all the object versions, which adds the version-related fields -/// VersionId, IsLatest, and DeleteMarker to the -/// list. If set to Current, the list does not contain these version-related -/// fields.

    - pub included_object_versions: InventoryIncludedObjectVersions, -///

    Specifies whether the inventory is enabled or disabled. If set to True, an -/// inventory list is generated. If set to False, no inventory list is -/// generated.

    - pub is_enabled: IsEnabled, -///

    Contains the optional fields that are included in the inventory results.

    - pub optional_fields: Option, -///

    Specifies the schedule for generating inventory results.

    - pub schedule: InventorySchedule, -} - -impl fmt::Debug for InventoryConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryConfiguration"); -d.field("destination", &self.destination); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -d.field("id", &self.id); -d.field("included_object_versions", &self.included_object_versions); -d.field("is_enabled", &self.is_enabled); -if let Some(ref val) = self.optional_fields { -d.field("optional_fields", val); -} -d.field("schedule", &self.schedule); -d.finish_non_exhaustive() -} -} - -impl Default for InventoryConfiguration { -fn default() -> Self { -Self { -destination: default(), -filter: None, -id: default(), -included_object_versions: String::new().into(), -is_enabled: default(), -optional_fields: None, -schedule: default(), -} -} -} - - -pub type InventoryConfigurationList = List; - -///

    Specifies the inventory configuration for an Amazon S3 bucket.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryDestination { -///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) -/// where inventory results are published.

    - pub s3_bucket_destination: InventoryS3BucketDestination, -} - -impl fmt::Debug for InventoryDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryDestination"); -d.field("s3_bucket_destination", &self.s3_bucket_destination); -d.finish_non_exhaustive() -} -} - -impl Default for InventoryDestination { -fn default() -> Self { -Self { -s3_bucket_destination: default(), -} -} -} - - -///

    Contains the type of server-side encryption used to encrypt the inventory -/// results.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct InventoryEncryption { -///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    - pub ssekms: Option, -///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    - pub sses3: Option, -} - -impl fmt::Debug for InventoryEncryption { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryEncryption"); -if let Some(ref val) = self.ssekms { -d.field("ssekms", val); -} -if let Some(ref val) = self.sses3 { -d.field("sses3", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies an inventory filter. The inventory only includes objects that meet the -/// filter's criteria.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct InventoryFilter { -///

    The prefix that an object must have to be included in the inventory results.

    - pub prefix: Prefix, -} - -impl fmt::Debug for InventoryFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryFilter"); -d.field("prefix", &self.prefix); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryFormat(Cow<'static, str>); - -impl InventoryFormat { -pub const CSV: &'static str = "CSV"; - -pub const ORC: &'static str = "ORC"; - -pub const PARQUET: &'static str = "Parquet"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for InventoryFormat { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: InventoryFormat) -> Self { -s.0 -} -} - -impl FromStr for InventoryFormat { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryFrequency(Cow<'static, str>); - -impl InventoryFrequency { -pub const DAILY: &'static str = "Daily"; - -pub const WEEKLY: &'static str = "Weekly"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for InventoryFrequency { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: InventoryFrequency) -> Self { -s.0 -} -} - -impl FromStr for InventoryFrequency { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type InventoryId = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryIncludedObjectVersions(Cow<'static, str>); - -impl InventoryIncludedObjectVersions { -pub const ALL: &'static str = "All"; - -pub const CURRENT: &'static str = "Current"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for InventoryIncludedObjectVersions { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: InventoryIncludedObjectVersions) -> Self { -s.0 -} -} - -impl FromStr for InventoryIncludedObjectVersions { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct InventoryOptionalField(Cow<'static, str>); - -impl InventoryOptionalField { -pub const BUCKET_KEY_STATUS: &'static str = "BucketKeyStatus"; - -pub const CHECKSUM_ALGORITHM: &'static str = "ChecksumAlgorithm"; - -pub const E_TAG: &'static str = "ETag"; - -pub const ENCRYPTION_STATUS: &'static str = "EncryptionStatus"; - -pub const INTELLIGENT_TIERING_ACCESS_TIER: &'static str = "IntelligentTieringAccessTier"; - -pub const IS_MULTIPART_UPLOADED: &'static str = "IsMultipartUploaded"; - -pub const LAST_MODIFIED_DATE: &'static str = "LastModifiedDate"; - -pub const OBJECT_ACCESS_CONTROL_LIST: &'static str = "ObjectAccessControlList"; - -pub const OBJECT_LOCK_LEGAL_HOLD_STATUS: &'static str = "ObjectLockLegalHoldStatus"; - -pub const OBJECT_LOCK_MODE: &'static str = "ObjectLockMode"; - -pub const OBJECT_LOCK_RETAIN_UNTIL_DATE: &'static str = "ObjectLockRetainUntilDate"; - -pub const OBJECT_OWNER: &'static str = "ObjectOwner"; - -pub const REPLICATION_STATUS: &'static str = "ReplicationStatus"; - -pub const SIZE: &'static str = "Size"; - -pub const STORAGE_CLASS: &'static str = "StorageClass"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for InventoryOptionalField { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: InventoryOptionalField) -> Self { -s.0 -} -} - -impl FromStr for InventoryOptionalField { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type InventoryOptionalFields = List; - -///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) -/// where inventory results are published.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventoryS3BucketDestination { -///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the -/// owner is not validated before exporting data.

    -/// -///

    Although this value is optional, we strongly recommend that you set it to help -/// prevent problems if the destination bucket ownership changes.

    -///
    - pub account_id: Option, -///

    The Amazon Resource Name (ARN) of the bucket where inventory results will be -/// published.

    - pub bucket: BucketName, -///

    Contains the type of server-side encryption used to encrypt the inventory -/// results.

    - pub encryption: Option, -///

    Specifies the output format of the inventory results.

    - pub format: InventoryFormat, -///

    The prefix that is prepended to all inventory results.

    - pub prefix: Option, -} - -impl fmt::Debug for InventoryS3BucketDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventoryS3BucketDestination"); -if let Some(ref val) = self.account_id { -d.field("account_id", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.encryption { -d.field("encryption", val); -} -d.field("format", &self.format); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} -} - -impl Default for InventoryS3BucketDestination { -fn default() -> Self { -Self { -account_id: None, -bucket: default(), -encryption: None, -format: String::new().into(), -prefix: None, -} -} -} - - -///

    Specifies the schedule for generating inventory results.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct InventorySchedule { -///

    Specifies how frequently inventory results are produced.

    - pub frequency: InventoryFrequency, -} - -impl fmt::Debug for InventorySchedule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("InventorySchedule"); -d.field("frequency", &self.frequency); -d.finish_non_exhaustive() -} -} - -impl Default for InventorySchedule { -fn default() -> Self { -Self { -frequency: String::new().into(), -} -} -} - - -pub type IsEnabled = bool; - -pub type IsLatest = bool; - -pub type IsPublic = bool; - -pub type IsRestoreInProgress = bool; - -pub type IsTruncated = bool; - -///

    Specifies JSON as object's input serialization format.

    -#[derive(Clone, Default, PartialEq)] -pub struct JSONInput { -///

    The type of JSON. Valid values: Document, Lines.

    - pub type_: Option, -} - -impl fmt::Debug for JSONInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("JSONInput"); -if let Some(ref val) = self.type_ { -d.field("type_", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies JSON as request's output serialization format.

    -#[derive(Clone, Default, PartialEq)] -pub struct JSONOutput { -///

    The value used to separate individual records in the output. If no value is specified, -/// Amazon S3 uses a newline character ('\n').

    - pub record_delimiter: Option, -} - -impl fmt::Debug for JSONOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("JSONOutput"); -if let Some(ref val) = self.record_delimiter { -d.field("record_delimiter", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct JSONType(Cow<'static, str>); - -impl JSONType { -pub const DOCUMENT: &'static str = "DOCUMENT"; - -pub const LINES: &'static str = "LINES"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for JSONType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: JSONType) -> Self { -s.0 -} -} - -impl FromStr for JSONType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type KMSContext = String; - -pub type KeyCount = i32; - -pub type KeyMarker = String; - -pub type KeyPrefixEquals = String; - -pub type LambdaFunctionArn = String; - -///

    A container for specifying the configuration for Lambda notifications.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LambdaFunctionConfiguration { -///

    The Amazon S3 bucket event for which to invoke the Lambda function. For more information, -/// see Supported -/// Event Types in the Amazon S3 User Guide.

    - pub events: EventList, - pub filter: Option, - pub id: Option, -///

    The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the -/// specified event type occurs.

    - pub lambda_function_arn: LambdaFunctionArn, -} - -impl fmt::Debug for LambdaFunctionConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LambdaFunctionConfiguration"); -d.field("events", &self.events); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.field("lambda_function_arn", &self.lambda_function_arn); -d.finish_non_exhaustive() -} -} - - -pub type LambdaFunctionConfigurationList = List; - -pub type LastModified = Timestamp; - -pub type LastModifiedTime = Timestamp; - -///

    Container for the expiration for the lifecycle of the object.

    -///

    For more information see, Managing your storage -/// lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleExpiration { -///

    Indicates at what date the object is to be moved or deleted. The date value must conform -/// to the ISO 8601 format. The time is always midnight UTC.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub date: Option, -///

    Indicates the lifetime, in days, of the objects that are subject to the rule. The value -/// must be a non-zero positive integer.

    - pub days: Option, - pub expired_object_all_versions: Option, -///

    Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set -/// to true, the delete marker will be expired; if set to false the policy takes no action. -/// This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub expired_object_delete_marker: Option, -} - -impl fmt::Debug for LifecycleExpiration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LifecycleExpiration"); -if let Some(ref val) = self.date { -d.field("date", val); -} -if let Some(ref val) = self.days { -d.field("days", val); -} -if let Some(ref val) = self.expired_object_all_versions { -d.field("expired_object_all_versions", val); -} -if let Some(ref val) = self.expired_object_delete_marker { -d.field("expired_object_delete_marker", val); -} -d.finish_non_exhaustive() -} -} - - -///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    -///

    For more information see, Managing your storage -/// lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRule { - pub abort_incomplete_multipart_upload: Option, - pub del_marker_expiration: Option, -///

    Specifies the expiration for the lifecycle of the object in the form of date, days and, -/// whether the object has a delete marker.

    - pub expiration: Option, -///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A -/// Filter must have exactly one of Prefix, Tag, or -/// And specified. Filter is required if the -/// LifecycleRule does not contain a Prefix element.

    -/// -///

    -/// Tag filters are not supported for directory buckets.

    -///
    - pub filter: Option, -///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    - pub id: Option, - pub noncurrent_version_expiration: Option, -///

    Specifies the transition rule for the lifecycle rule that describes when noncurrent -/// objects transition to a specific storage class. If your bucket is versioning-enabled (or -/// versioning is suspended), you can set this action to request that Amazon S3 transition -/// noncurrent object versions to a specific storage class at a set period in the object's -/// lifetime.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub noncurrent_version_transitions: Option, -///

    Prefix identifying one or more objects to which the rule applies. This is -/// no longer used; use Filter instead.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, -///

    If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not -/// currently being applied.

    - pub status: ExpirationStatus, -///

    Specifies when an Amazon S3 object transitions to a specified storage class.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub transitions: Option, -} - -impl fmt::Debug for LifecycleRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LifecycleRule"); -if let Some(ref val) = self.abort_incomplete_multipart_upload { -d.field("abort_incomplete_multipart_upload", val); -} -if let Some(ref val) = self.del_marker_expiration { -d.field("del_marker_expiration", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -if let Some(ref val) = self.noncurrent_version_expiration { -d.field("noncurrent_version_expiration", val); -} -if let Some(ref val) = self.noncurrent_version_transitions { -d.field("noncurrent_version_transitions", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.field("status", &self.status); -if let Some(ref val) = self.transitions { -d.field("transitions", val); -} -d.finish_non_exhaustive() -} -} - - -///

    This is used in a Lifecycle Rule Filter to apply a logical AND to two or more -/// predicates. The Lifecycle Rule will apply to any object matching all of the predicates -/// configured inside the And operator.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LifecycleRuleAndOperator { -///

    Minimum object size to which the rule applies.

    - pub object_size_greater_than: Option, -///

    Maximum object size to which the rule applies.

    - pub object_size_less_than: Option, -///

    Prefix identifying one or more objects to which the rule applies.

    - pub prefix: Option, -///

    All of these tags must exist in the object's tag set in order for the rule to -/// apply.

    - pub tags: Option, -} - -impl fmt::Debug for LifecycleRuleAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LifecycleRuleAndOperator"); -if let Some(ref val) = self.object_size_greater_than { -d.field("object_size_greater_than", val); -} -if let Some(ref val) = self.object_size_less_than { -d.field("object_size_less_than", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} -} - - -///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A -/// Filter can have exactly one of Prefix, Tag, -/// ObjectSizeGreaterThan, ObjectSizeLessThan, or And -/// specified. If the Filter element is left empty, the Lifecycle Rule applies to -/// all objects in the bucket.

    -#[derive(Default, Serialize, Deserialize)] -pub struct LifecycleRuleFilter { - pub and: Option, - pub cached_tags: CachedTags, -///

    Minimum object size to which the rule applies.

    - pub object_size_greater_than: Option, -///

    Maximum object size to which the rule applies.

    - pub object_size_less_than: Option, -///

    Prefix identifying one or more objects to which the rule applies.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, -///

    This tag must exist in the object's tag set in order for the rule to apply.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub tag: Option, -} - -impl fmt::Debug for LifecycleRuleFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LifecycleRuleFilter"); -if let Some(ref val) = self.and { -d.field("and", val); -} -d.field("cached_tags", &self.cached_tags); -if let Some(ref val) = self.object_size_greater_than { -d.field("object_size_greater_than", val); -} -if let Some(ref val) = self.object_size_less_than { -d.field("object_size_less_than", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tag { -d.field("tag", val); -} -d.finish_non_exhaustive() -} -} - -#[allow(clippy::clone_on_copy)] -impl Clone for LifecycleRuleFilter { -fn clone(&self) -> Self { -Self { -and: self.and.clone(), -cached_tags: default(), -object_size_greater_than: self.object_size_greater_than.clone(), -object_size_less_than: self.object_size_less_than.clone(), -prefix: self.prefix.clone(), -tag: self.tag.clone(), -} -} -} -impl PartialEq for LifecycleRuleFilter { -fn eq(&self, other: &Self) -> bool { -if self.and != other.and { -return false; -} -if self.object_size_greater_than != other.object_size_greater_than { -return false; -} -if self.object_size_less_than != other.object_size_less_than { -return false; -} -if self.prefix != other.prefix { -return false; -} -if self.tag != other.tag { -return false; -} -true -} -} - -pub type LifecycleRules = List; - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketAnalyticsConfigurationsInput { -///

    The name of the bucket from which analytics configurations are retrieved.

    - pub bucket: BucketName, -///

    The ContinuationToken that represents a placeholder from where this request -/// should begin.

    - pub continuation_token: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for ListBucketAnalyticsConfigurationsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketAnalyticsConfigurationsInput { -#[must_use] -pub fn builder() -> builders::ListBucketAnalyticsConfigurationsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketAnalyticsConfigurationsOutput { -///

    The list of analytics configurations for a bucket.

    - pub analytics_configuration_list: Option, -///

    The marker that is used as a starting point for this analytics configuration list -/// response. This value is present if it was sent in the request.

    - pub continuation_token: Option, -///

    Indicates whether the returned list of analytics configurations is complete. A value of -/// true indicates that the list is not complete and the NextContinuationToken will be provided -/// for a subsequent request.

    - pub is_truncated: Option, -///

    -/// NextContinuationToken is sent when isTruncated is true, which -/// indicates that there are more analytics configurations to list. The next request must -/// include this NextContinuationToken. The token is obfuscated and is not a -/// usable value.

    - pub next_continuation_token: Option, -} - -impl fmt::Debug for ListBucketAnalyticsConfigurationsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsOutput"); -if let Some(ref val) = self.analytics_configuration_list { -d.field("analytics_configuration_list", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketIntelligentTieringConfigurationsInput { -///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    - pub bucket: BucketName, -///

    The ContinuationToken that represents a placeholder from where this request -/// should begin.

    - pub continuation_token: Option, -} - -impl fmt::Debug for ListBucketIntelligentTieringConfigurationsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketIntelligentTieringConfigurationsInput { -#[must_use] -pub fn builder() -> builders::ListBucketIntelligentTieringConfigurationsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketIntelligentTieringConfigurationsOutput { -///

    The ContinuationToken that represents a placeholder from where this request -/// should begin.

    - pub continuation_token: Option, -///

    The list of S3 Intelligent-Tiering configurations for a bucket.

    - pub intelligent_tiering_configuration_list: Option, -///

    Indicates whether the returned list of analytics configurations is complete. A value of -/// true indicates that the list is not complete and the -/// NextContinuationToken will be provided for a subsequent request.

    - pub is_truncated: Option, -///

    The marker used to continue this inventory configuration listing. Use the -/// NextContinuationToken from this response to continue the listing in a -/// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    - pub next_continuation_token: Option, -} - -impl fmt::Debug for ListBucketIntelligentTieringConfigurationsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsOutput"); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.intelligent_tiering_configuration_list { -d.field("intelligent_tiering_configuration_list", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketInventoryConfigurationsInput { -///

    The name of the bucket containing the inventory configurations to retrieve.

    - pub bucket: BucketName, -///

    The marker used to continue an inventory configuration listing that has been truncated. -/// Use the NextContinuationToken from a previously truncated list response to -/// continue the listing. The continuation token is an opaque value that Amazon S3 -/// understands.

    - pub continuation_token: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for ListBucketInventoryConfigurationsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketInventoryConfigurationsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketInventoryConfigurationsInput { -#[must_use] -pub fn builder() -> builders::ListBucketInventoryConfigurationsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketInventoryConfigurationsOutput { -///

    If sent in the request, the marker that is used as a starting point for this inventory -/// configuration list response.

    - pub continuation_token: Option, -///

    The list of inventory configurations for a bucket.

    - pub inventory_configuration_list: Option, -///

    Tells whether the returned list of inventory configurations is complete. A value of true -/// indicates that the list is not complete and the NextContinuationToken is provided for a -/// subsequent request.

    - pub is_truncated: Option, -///

    The marker used to continue this inventory configuration listing. Use the -/// NextContinuationToken from this response to continue the listing in a -/// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    - pub next_continuation_token: Option, -} - -impl fmt::Debug for ListBucketInventoryConfigurationsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketInventoryConfigurationsOutput"); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.inventory_configuration_list { -d.field("inventory_configuration_list", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketMetricsConfigurationsInput { -///

    The name of the bucket containing the metrics configurations to retrieve.

    - pub bucket: BucketName, -///

    The marker that is used to continue a metrics configuration listing that has been -/// truncated. Use the NextContinuationToken from a previously truncated list -/// response to continue the listing. The continuation token is an opaque value that Amazon S3 -/// understands.

    - pub continuation_token: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -} - -impl fmt::Debug for ListBucketMetricsConfigurationsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketMetricsConfigurationsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketMetricsConfigurationsInput { -#[must_use] -pub fn builder() -> builders::ListBucketMetricsConfigurationsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketMetricsConfigurationsOutput { -///

    The marker that is used as a starting point for this metrics configuration list -/// response. This value is present if it was sent in the request.

    - pub continuation_token: Option, -///

    Indicates whether the returned list of metrics configurations is complete. A value of -/// true indicates that the list is not complete and the NextContinuationToken will be provided -/// for a subsequent request.

    - pub is_truncated: Option, -///

    The list of metrics configurations for a bucket.

    - pub metrics_configuration_list: Option, -///

    The marker used to continue a metrics configuration listing that has been truncated. Use -/// the NextContinuationToken from a previously truncated list response to -/// continue the listing. The continuation token is an opaque value that Amazon S3 -/// understands.

    - pub next_continuation_token: Option, -} - -impl fmt::Debug for ListBucketMetricsConfigurationsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketMetricsConfigurationsOutput"); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.metrics_configuration_list { -d.field("metrics_configuration_list", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketsInput { -///

    Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services -/// Region must be expressed according to the Amazon Web Services Region code, such as us-west-2 -/// for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services -/// Regions, see Regions and Endpoints.

    -/// -///

    Requests made to a Regional endpoint that is different from the -/// bucket-region parameter are not supported. For example, if you want to -/// limit the response to your buckets in Region us-west-2, the request must be -/// made to an endpoint in Region us-west-2.

    -///
    - pub bucket_region: Option, -///

    -/// ContinuationToken indicates to Amazon S3 that the list is being continued on -/// this bucket with a token. ContinuationToken is obfuscated and is not a real -/// key. You can use this ContinuationToken for pagination of the list results.

    -///

    Length Constraints: Minimum length of 0. Maximum length of 1024.

    -///

    Required: No.

    -/// -///

    If you specify the bucket-region, prefix, or continuation-token -/// query parameters without using max-buckets to set the maximum number of buckets returned in the response, -/// Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

    -///
    - pub continuation_token: Option, -///

    Maximum number of buckets to be returned in response. When the number is more than the -/// count of buckets that are owned by an Amazon Web Services account, return all the buckets in -/// response.

    - pub max_buckets: Option, -///

    Limits the response to bucket names that begin with the specified bucket name -/// prefix.

    - pub prefix: Option, -} - -impl fmt::Debug for ListBucketsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketsInput"); -if let Some(ref val) = self.bucket_region { -d.field("bucket_region", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.max_buckets { -d.field("max_buckets", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} -} - -impl ListBucketsInput { -#[must_use] -pub fn builder() -> builders::ListBucketsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListBucketsOutput { -///

    The list of buckets owned by the requester.

    - pub buckets: Option, -///

    -/// ContinuationToken is included in the response when there are more buckets -/// that can be listed with pagination. The next ListBuckets request to Amazon S3 can -/// be continued with this ContinuationToken. ContinuationToken is -/// obfuscated and is not a real bucket.

    - pub continuation_token: Option, -///

    The owner of the buckets listed.

    - pub owner: Option, -///

    If Prefix was sent with the request, it is included in the response.

    -///

    All bucket names in the response begin with the specified bucket name prefix.

    - pub prefix: Option, -} - -impl fmt::Debug for ListBucketsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListBucketsOutput"); -if let Some(ref val) = self.buckets { -d.field("buckets", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListDirectoryBucketsInput { -///

    -/// ContinuationToken indicates to Amazon S3 that the list is being continued on -/// buckets in this account with a token. ContinuationToken is obfuscated and is -/// not a real bucket name. You can use this ContinuationToken for the pagination -/// of the list results.

    - pub continuation_token: Option, -///

    Maximum number of buckets to be returned in response. When the number is more than the -/// count of buckets that are owned by an Amazon Web Services account, return all the buckets in -/// response.

    - pub max_directory_buckets: Option, -} - -impl fmt::Debug for ListDirectoryBucketsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListDirectoryBucketsInput"); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.max_directory_buckets { -d.field("max_directory_buckets", val); -} -d.finish_non_exhaustive() -} -} - -impl ListDirectoryBucketsInput { -#[must_use] -pub fn builder() -> builders::ListDirectoryBucketsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListDirectoryBucketsOutput { -///

    The list of buckets owned by the requester.

    - pub buckets: Option, -///

    If ContinuationToken was sent with the request, it is included in the -/// response. You can use the returned ContinuationToken for pagination of the -/// list response.

    - pub continuation_token: Option, -} - -impl fmt::Debug for ListDirectoryBucketsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListDirectoryBucketsOutput"); -if let Some(ref val) = self.buckets { -d.field("buckets", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListMultipartUploadsInput { -///

    The name of the bucket to which the multipart upload was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Character you use to group keys.

    -///

    All keys that contain the same string between the prefix, if specified, and the first -/// occurrence of the delimiter after the prefix are grouped under a single result element, -/// CommonPrefixes. If you don't specify the prefix parameter, then the -/// substring starts at the beginning of the key. The keys that are grouped under -/// CommonPrefixes result element are not returned elsewhere in the -/// response.

    -/// -///

    -/// Directory buckets - For directory buckets, / is the only supported delimiter.

    -///
    - pub delimiter: Option, - pub encoding_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Specifies the multipart upload after which listing should begin.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - For -/// general purpose buckets, key-marker is an object key. Together with -/// upload-id-marker, this parameter specifies the multipart upload -/// after which listing should begin.

      -///

      If upload-id-marker is not specified, only the keys -/// lexicographically greater than the specified key-marker will be -/// included in the list.

      -///

      If upload-id-marker is specified, any multipart uploads for a key -/// equal to the key-marker might also be included, provided those -/// multipart uploads have upload IDs lexicographically greater than the specified -/// upload-id-marker.

      -///
    • -///
    • -///

      -/// Directory buckets - For -/// directory buckets, key-marker is obfuscated and isn't a real object -/// key. The upload-id-marker parameter isn't supported by -/// directory buckets. To list the additional multipart uploads, you only need to set -/// the value of key-marker to the NextKeyMarker value from -/// the previous response.

      -///

      In the ListMultipartUploads response, the multipart uploads aren't -/// sorted lexicographically based on the object keys. -/// -///

      -///
    • -///
    -///
    - pub key_marker: Option, -///

    Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response -/// body. 1,000 is the maximum number of uploads that can be returned in a response.

    - pub max_uploads: Option, -///

    Lists in-progress uploads only for those keys that begin with the specified prefix. You -/// can use prefixes to separate a bucket into different grouping of keys. (You can think of -/// using prefix to make groups in the same way that you'd use a folder in a file -/// system.)

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub prefix: Option, - pub request_payer: Option, -///

    Together with key-marker, specifies the multipart upload after which listing should -/// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. -/// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the -/// list only if they have an upload ID lexicographically greater than the specified -/// upload-id-marker.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub upload_id_marker: Option, -} - -impl fmt::Debug for ListMultipartUploadsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListMultipartUploadsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.key_marker { -d.field("key_marker", val); -} -if let Some(ref val) = self.max_uploads { -d.field("max_uploads", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.upload_id_marker { -d.field("upload_id_marker", val); -} -d.finish_non_exhaustive() -} -} - -impl ListMultipartUploadsInput { -#[must_use] -pub fn builder() -> builders::ListMultipartUploadsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListMultipartUploadsOutput { -///

    The name of the bucket to which the multipart upload was initiated. Does not return the -/// access point ARN or access point alias if used.

    - pub bucket: Option, -///

    If you specify a delimiter in the request, then the result returns each distinct key -/// prefix containing the delimiter in a CommonPrefixes element. The distinct key -/// prefixes are returned in the Prefix child element.

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub common_prefixes: Option, -///

    Contains the delimiter you specified in the request. If you don't specify a delimiter in -/// your request, this element is absent from the response.

    -/// -///

    -/// Directory buckets - For directory buckets, / is the only supported delimiter.

    -///
    - pub delimiter: Option, -///

    Encoding type used by Amazon S3 to encode object keys in the response.

    -///

    If you specify the encoding-type request parameter, Amazon S3 includes this -/// element in the response, and returns encoded key name values in the following response -/// elements:

    -///

    -/// Delimiter, KeyMarker, Prefix, -/// NextKeyMarker, Key.

    - pub encoding_type: Option, -///

    Indicates whether the returned list of multipart uploads is truncated. A value of true -/// indicates that the list was truncated. The list can be truncated if the number of multipart -/// uploads exceeds the limit allowed or specified by max uploads.

    - pub is_truncated: Option, -///

    The key at or after which the listing began.

    - pub key_marker: Option, -///

    Maximum number of multipart uploads that could have been included in the -/// response.

    - pub max_uploads: Option, -///

    When a list is truncated, this element specifies the value that should be used for the -/// key-marker request parameter in a subsequent request.

    - pub next_key_marker: Option, -///

    When a list is truncated, this element specifies the value that should be used for the -/// upload-id-marker request parameter in a subsequent request.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub next_upload_id_marker: Option, -///

    When a prefix is provided in the request, this field contains the specified prefix. The -/// result contains only keys starting with the specified prefix.

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub prefix: Option, - pub request_charged: Option, -///

    Together with key-marker, specifies the multipart upload after which listing should -/// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. -/// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the -/// list only if they have an upload ID lexicographically greater than the specified -/// upload-id-marker.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub upload_id_marker: Option, -///

    Container for elements related to a particular multipart upload. A response can contain -/// zero or more Upload elements.

    - pub uploads: Option, -} - -impl fmt::Debug for ListMultipartUploadsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListMultipartUploadsOutput"); -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.common_prefixes { -d.field("common_prefixes", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.key_marker { -d.field("key_marker", val); -} -if let Some(ref val) = self.max_uploads { -d.field("max_uploads", val); -} -if let Some(ref val) = self.next_key_marker { -d.field("next_key_marker", val); -} -if let Some(ref val) = self.next_upload_id_marker { -d.field("next_upload_id_marker", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.upload_id_marker { -d.field("upload_id_marker", val); -} -if let Some(ref val) = self.uploads { -d.field("uploads", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectVersionsInput { -///

    The bucket name that contains the objects.

    - pub bucket: BucketName, -///

    A delimiter is a character that you specify to group keys. All keys that contain the -/// same string between the prefix and the first occurrence of the delimiter are -/// grouped under a single result element in CommonPrefixes. These groups are -/// counted as one result against the max-keys limitation. These keys are not -/// returned elsewhere in the response.

    - pub delimiter: Option, - pub encoding_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Specifies the key to start with when listing objects in a bucket.

    - pub key_marker: Option, -///

    Sets the maximum number of keys returned in the response. By default, the action returns -/// up to 1,000 key names. The response might contain fewer keys but will never contain more. -/// If additional keys satisfy the search criteria, but were not returned because -/// max-keys was exceeded, the response contains -/// true. To return the additional keys, -/// see key-marker and version-id-marker.

    - pub max_keys: Option, -///

    Specifies the optional fields that you want returned in the response. Fields that you do -/// not specify are not returned.

    - pub optional_object_attributes: Option, -///

    Use this parameter to select only those keys that begin with the specified prefix. You -/// can use prefixes to separate a bucket into different groupings of keys. (You can think of -/// using prefix to make groups in the same way that you'd use a folder in a file -/// system.) You can use prefix with delimiter to roll up numerous -/// objects into a single result under CommonPrefixes.

    - pub prefix: Option, - pub request_payer: Option, -///

    Specifies the object version you want to start listing from.

    - pub version_id_marker: Option, -} - -impl fmt::Debug for ListObjectVersionsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectVersionsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.key_marker { -d.field("key_marker", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.optional_object_attributes { -d.field("optional_object_attributes", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id_marker { -d.field("version_id_marker", val); -} -d.finish_non_exhaustive() -} -} - -impl ListObjectVersionsInput { -#[must_use] -pub fn builder() -> builders::ListObjectVersionsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectVersionsOutput { -///

    All of the keys rolled up into a common prefix count as a single return when calculating -/// the number of returns.

    - pub common_prefixes: Option, -///

    Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

    - pub delete_markers: Option, -///

    The delimiter grouping the included keys. A delimiter is a character that you specify to -/// group keys. All keys that contain the same string between the prefix and the first -/// occurrence of the delimiter are grouped under a single result element in -/// CommonPrefixes. These groups are counted as one result against the -/// max-keys limitation. These keys are not returned elsewhere in the -/// response.

    - pub delimiter: Option, -///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    -///

    If you specify the encoding-type request parameter, Amazon S3 includes this -/// element in the response, and returns encoded key name values in the following response -/// elements:

    -///

    -/// KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

    - pub encoding_type: Option, -///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search -/// criteria. If your results were truncated, you can make a follow-up paginated request by -/// using the NextKeyMarker and NextVersionIdMarker response -/// parameters as a starting place in another request to return the rest of the results.

    - pub is_truncated: Option, -///

    Marks the last key returned in a truncated response.

    - pub key_marker: Option, -///

    Specifies the maximum number of objects to return.

    - pub max_keys: Option, -///

    The bucket name.

    - pub name: Option, -///

    When the number of responses exceeds the value of MaxKeys, -/// NextKeyMarker specifies the first key not returned that satisfies the -/// search criteria. Use this value for the key-marker request parameter in a subsequent -/// request.

    - pub next_key_marker: Option, -///

    When the number of responses exceeds the value of MaxKeys, -/// NextVersionIdMarker specifies the first object version not returned that -/// satisfies the search criteria. Use this value for the version-id-marker -/// request parameter in a subsequent request.

    - pub next_version_id_marker: Option, -///

    Selects objects that start with the value supplied by this parameter.

    - pub prefix: Option, - pub request_charged: Option, -///

    Marks the last version of the key returned in a truncated response.

    - pub version_id_marker: Option, -///

    Container for version information.

    - pub versions: Option, -} - -impl fmt::Debug for ListObjectVersionsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectVersionsOutput"); -if let Some(ref val) = self.common_prefixes { -d.field("common_prefixes", val); -} -if let Some(ref val) = self.delete_markers { -d.field("delete_markers", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.key_marker { -d.field("key_marker", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.next_key_marker { -d.field("next_key_marker", val); -} -if let Some(ref val) = self.next_version_id_marker { -d.field("next_version_id_marker", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.version_id_marker { -d.field("version_id_marker", val); -} -if let Some(ref val) = self.versions { -d.field("versions", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsInput { -///

    The name of the bucket containing the objects.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    A delimiter is a character that you use to group keys.

    - pub delimiter: Option, - pub encoding_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this -/// specified key. Marker can be any key in the bucket.

    - pub marker: Option, -///

    Sets the maximum number of keys returned in the response. By default, the action returns -/// up to 1,000 key names. The response might contain fewer keys but will never contain more. -///

    - pub max_keys: Option, -///

    Specifies the optional fields that you want returned in the response. Fields that you do -/// not specify are not returned.

    - pub optional_object_attributes: Option, -///

    Limits the response to keys that begin with the specified prefix.

    - pub prefix: Option, -///

    Confirms that the requester knows that she or he will be charged for the list objects -/// request. Bucket owners need not specify this parameter in their requests.

    - pub request_payer: Option, -} - -impl fmt::Debug for ListObjectsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.marker { -d.field("marker", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.optional_object_attributes { -d.field("optional_object_attributes", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.finish_non_exhaustive() -} -} - -impl ListObjectsInput { -#[must_use] -pub fn builder() -> builders::ListObjectsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsOutput { -///

    The bucket name.

    - pub name: Option, -///

    Keys that begin with the indicated prefix.

    - pub prefix: Option, -///

    Indicates where in the bucket listing begins. Marker is included in the response if it -/// was sent with the request.

    - pub marker: Option, -///

    The maximum number of keys returned in the response body.

    - pub max_keys: Option, -///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search -/// criteria.

    - pub is_truncated: Option, -///

    Metadata about each object returned.

    - pub contents: Option, -///

    All of the keys (up to 1,000) rolled up in a common prefix count as a single return when -/// calculating the number of returns.

    -///

    A response can contain CommonPrefixes only if you specify a -/// delimiter.

    -///

    -/// CommonPrefixes contains all (if there are any) keys between -/// Prefix and the next occurrence of the string specified by the -/// delimiter.

    -///

    -/// CommonPrefixes lists keys that act like subdirectories in the directory -/// specified by Prefix.

    -///

    For example, if the prefix is notes/ and the delimiter is a slash -/// (/), as in notes/summer/july, the common prefix is -/// notes/summer/. All of the keys that roll up into a common prefix count as a -/// single return when calculating the number of returns.

    - pub common_prefixes: Option, -///

    Causes keys that contain the same string between the prefix and the first occurrence of -/// the delimiter to be rolled up into a single result element in the -/// CommonPrefixes collection. These rolled-up keys are not returned elsewhere -/// in the response. Each rolled-up result counts as only one return against the -/// MaxKeys value.

    - pub delimiter: Option, -///

    When the response is truncated (the IsTruncated element value in the -/// response is true), you can use the key name in this field as the -/// marker parameter in the subsequent request to get the next set of objects. -/// Amazon S3 lists objects in alphabetical order.

    -/// -///

    This element is returned only if you have the delimiter request -/// parameter specified. If the response does not include the NextMarker -/// element and it is truncated, you can use the value of the last Key element -/// in the response as the marker parameter in the subsequent request to get -/// the next set of object keys.

    -///
    - pub next_marker: Option, -///

    Encoding type used by Amazon S3 to encode the object keys in the response. -/// Responses are encoded only in UTF-8. An object key can contain any Unicode character. -/// However, the XML 1.0 parser can't parse certain characters, such as characters with an -/// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this -/// parameter to request that Amazon S3 encode the keys in the response. For more information about -/// characters to avoid in object key names, see Object key naming -/// guidelines.

    -/// -///

    When using the URL encoding type, non-ASCII characters that are used in an object's -/// key name will be percent-encoded according to UTF-8 code values. For example, the object -/// test_file(3).png will appear as -/// test_file%283%29.png.

    -///
    - pub encoding_type: Option, - pub request_charged: Option, -} - -impl fmt::Debug for ListObjectsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectsOutput"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.marker { -d.field("marker", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.contents { -d.field("contents", val); -} -if let Some(ref val) = self.common_prefixes { -d.field("common_prefixes", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.next_marker { -d.field("next_marker", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsV2Input { -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    -/// ContinuationToken indicates to Amazon S3 that the list is being continued on -/// this bucket with a token. ContinuationToken is obfuscated and is not a real -/// key. You can use this ContinuationToken for pagination of the list results. -///

    - pub continuation_token: Option, -///

    A delimiter is a character that you use to group keys.

    -/// -///
      -///
    • -///

      -/// Directory buckets - For directory buckets, / is the only supported delimiter.

      -///
    • -///
    • -///

      -/// Directory buckets - When you query -/// ListObjectsV2 with a delimiter during in-progress multipart -/// uploads, the CommonPrefixes response parameter contains the prefixes -/// that are associated with the in-progress multipart uploads. For more information -/// about multipart uploads, see Multipart Upload Overview in -/// the Amazon S3 User Guide.

      -///
    • -///
    -///
    - pub delimiter: Option, -///

    Encoding type used by Amazon S3 to encode the object keys in the response. -/// Responses are encoded only in UTF-8. An object key can contain any Unicode character. -/// However, the XML 1.0 parser can't parse certain characters, such as characters with an -/// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this -/// parameter to request that Amazon S3 encode the keys in the response. For more information about -/// characters to avoid in object key names, see Object key naming -/// guidelines.

    -/// -///

    When using the URL encoding type, non-ASCII characters that are used in an object's -/// key name will be percent-encoded according to UTF-8 code values. For example, the object -/// test_file(3).png will appear as -/// test_file%283%29.png.

    -///
    - pub encoding_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The owner field is not present in ListObjectsV2 by default. If you want to -/// return the owner field with each key in the result, then set the FetchOwner -/// field to true.

    -/// -///

    -/// Directory buckets - For directory buckets, -/// the bucket owner is returned as the object owner for all objects.

    -///
    - pub fetch_owner: Option, -///

    Sets the maximum number of keys returned in the response. By default, the action returns -/// up to 1,000 key names. The response might contain fewer keys but will never contain -/// more.

    - pub max_keys: Option, -///

    Specifies the optional fields that you want returned in the response. Fields that you do -/// not specify are not returned.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub optional_object_attributes: Option, -///

    Limits the response to keys that begin with the specified prefix.

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub prefix: Option, -///

    Confirms that the requester knows that she or he will be charged for the list objects -/// request in V2 style. Bucket owners need not specify this parameter in their -/// requests.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub request_payer: Option, -///

    StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this -/// specified key. StartAfter can be any key in the bucket.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub start_after: Option, -} - -impl fmt::Debug for ListObjectsV2Input { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectsV2Input"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.fetch_owner { -d.field("fetch_owner", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.optional_object_attributes { -d.field("optional_object_attributes", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.start_after { -d.field("start_after", val); -} -d.finish_non_exhaustive() -} -} - -impl ListObjectsV2Input { -#[must_use] -pub fn builder() -> builders::ListObjectsV2InputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListObjectsV2Output { -///

    The bucket name.

    - pub name: Option, -///

    Keys that begin with the indicated prefix.

    -/// -///

    -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    -///
    - pub prefix: Option, -///

    Sets the maximum number of keys returned in the response. By default, the action returns -/// up to 1,000 key names. The response might contain fewer keys but will never contain -/// more.

    - pub max_keys: Option, -///

    -/// KeyCount is the number of keys returned with this request. -/// KeyCount will always be less than or equal to the MaxKeys -/// field. For example, if you ask for 50 keys, your result will include 50 keys or -/// fewer.

    - pub key_count: Option, -///

    If ContinuationToken was sent with the request, it is included in the -/// response. You can use the returned ContinuationToken for pagination of the -/// list response. You can use this ContinuationToken for pagination of the list -/// results.

    - pub continuation_token: Option, -///

    Set to false if all of the results were returned. Set to true -/// if more keys are available to return. If the number of results exceeds that specified by -/// MaxKeys, all of the results might not be returned.

    - pub is_truncated: Option, -///

    -/// NextContinuationToken is sent when isTruncated is true, which -/// means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 -/// can be continued with this NextContinuationToken. -/// NextContinuationToken is obfuscated and is not a real key

    - pub next_continuation_token: Option, -///

    Metadata about each object returned.

    - pub contents: Option, -///

    All of the keys (up to 1,000) that share the same prefix are grouped together. When -/// counting the total numbers of returns by this API operation, this group of keys is -/// considered as one item.

    -///

    A response can contain CommonPrefixes only if you specify a -/// delimiter.

    -///

    -/// CommonPrefixes contains all (if there are any) keys between -/// Prefix and the next occurrence of the string specified by a -/// delimiter.

    -///

    -/// CommonPrefixes lists keys that act like subdirectories in the directory -/// specified by Prefix.

    -///

    For example, if the prefix is notes/ and the delimiter is a slash -/// (/) as in notes/summer/july, the common prefix is -/// notes/summer/. All of the keys that roll up into a common prefix count as a -/// single return when calculating the number of returns.

    -/// -///
      -///
    • -///

      -/// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

      -///
    • -///
    • -///

      -/// Directory buckets - When you query -/// ListObjectsV2 with a delimiter during in-progress multipart -/// uploads, the CommonPrefixes response parameter contains the prefixes -/// that are associated with the in-progress multipart uploads. For more information -/// about multipart uploads, see Multipart Upload Overview in -/// the Amazon S3 User Guide.

      -///
    • -///
    -///
    - pub common_prefixes: Option, -///

    Causes keys that contain the same string between the prefix and the first -/// occurrence of the delimiter to be rolled up into a single result element in the -/// CommonPrefixes collection. These rolled-up keys are not returned elsewhere -/// in the response. Each rolled-up result counts as only one return against the -/// MaxKeys value.

    -/// -///

    -/// Directory buckets - For directory buckets, / is the only supported delimiter.

    -///
    - pub delimiter: Option, -///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    -///

    If you specify the encoding-type request parameter, Amazon S3 includes this -/// element in the response, and returns encoded key name values in the following response -/// elements:

    -///

    -/// Delimiter, Prefix, Key, and StartAfter.

    - pub encoding_type: Option, -///

    If StartAfter was sent with the request, it is included in the response.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub start_after: Option, - pub request_charged: Option, -} - -impl fmt::Debug for ListObjectsV2Output { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListObjectsV2Output"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.max_keys { -d.field("max_keys", val); -} -if let Some(ref val) = self.key_count { -d.field("key_count", val); -} -if let Some(ref val) = self.continuation_token { -d.field("continuation_token", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.next_continuation_token { -d.field("next_continuation_token", val); -} -if let Some(ref val) = self.contents { -d.field("contents", val); -} -if let Some(ref val) = self.common_prefixes { -d.field("common_prefixes", val); -} -if let Some(ref val) = self.delimiter { -d.field("delimiter", val); -} -if let Some(ref val) = self.encoding_type { -d.field("encoding_type", val); -} -if let Some(ref val) = self.start_after { -d.field("start_after", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, Default, PartialEq)] -pub struct ListPartsInput { -///

    The name of the bucket to which the parts are being uploaded.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, -///

    Sets the maximum number of parts to return.

    - pub max_parts: Option, -///

    Specifies the part after which listing should begin. Only parts with higher part numbers -/// will be listed.

    - pub part_number_marker: Option, - pub request_payer: Option, -///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created -/// using a checksum algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. -/// For more information, see -/// Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum -/// algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Upload ID identifying the multipart upload whose parts are being listed.

    - pub upload_id: MultipartUploadId, -} - -impl fmt::Debug for ListPartsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListPartsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.max_parts { -d.field("max_parts", val); -} -if let Some(ref val) = self.part_number_marker { -d.field("part_number_marker", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} -} - -impl ListPartsInput { -#[must_use] -pub fn builder() -> builders::ListPartsInputBuilder { -default() -} -} - -#[derive(Clone, Default, PartialEq)] -pub struct ListPartsOutput { -///

    If the bucket has a lifecycle rule configured with an action to abort incomplete -/// multipart uploads and the prefix in the lifecycle rule matches the object name in the -/// request, then the response includes this header indicating when the initiated multipart -/// upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle -/// Configuration.

    -///

    The response will also include the x-amz-abort-rule-id header that will -/// provide the ID of the lifecycle configuration rule that defines this action.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub abort_date: Option, -///

    This header is returned along with the x-amz-abort-date header. It -/// identifies applicable lifecycle configuration rule that defines the action to abort -/// incomplete multipart uploads.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub abort_rule_id: Option, -///

    The name of the bucket to which the multipart upload was initiated. Does not return the -/// access point ARN or access point alias if used.

    - pub bucket: Option, -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    The checksum type, which determines how part-level checksums are combined to create an -/// object-level checksum for multipart objects. You can use this header response to verify -/// that the checksum type that is received is the same checksum type that was specified in -/// CreateMultipartUpload request. For more -/// information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Container element that identifies who initiated the multipart upload. If the initiator -/// is an Amazon Web Services account, this element provides the same information as the Owner -/// element. If the initiator is an IAM User, this element provides the user ARN and display -/// name.

    - pub initiator: Option, -///

    Indicates whether the returned list of parts is truncated. A true value indicates that -/// the list was truncated. A list can be truncated if the number of parts exceeds the limit -/// returned in the MaxParts element.

    - pub is_truncated: Option, -///

    Object key for which the multipart upload was initiated.

    - pub key: Option, -///

    Maximum number of parts that were allowed in the response.

    - pub max_parts: Option, -///

    When a list is truncated, this element specifies the last part in the list, as well as -/// the value to use for the part-number-marker request parameter in a subsequent -/// request.

    - pub next_part_number_marker: Option, -///

    Container element that identifies the object owner, after the object is created. If -/// multipart upload is initiated by an IAM user, this element provides the parent account ID -/// and display name.

    -/// -///

    -/// Directory buckets - The bucket owner is -/// returned as the object owner for all the parts.

    -///
    - pub owner: Option, -///

    Specifies the part after which listing should begin. Only parts with higher part numbers -/// will be listed.

    - pub part_number_marker: Option, -///

    Container for elements related to a particular part. A response can contain zero or more -/// Part elements.

    - pub parts: Option, - pub request_charged: Option, -///

    The class of storage used to store the uploaded object.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    Upload ID identifying the multipart upload whose parts are being listed.

    - pub upload_id: Option, -} - -impl fmt::Debug for ListPartsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ListPartsOutput"); -if let Some(ref val) = self.abort_date { -d.field("abort_date", val); -} -if let Some(ref val) = self.abort_rule_id { -d.field("abort_rule_id", val); -} -if let Some(ref val) = self.bucket { -d.field("bucket", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.initiator { -d.field("initiator", val); -} -if let Some(ref val) = self.is_truncated { -d.field("is_truncated", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.max_parts { -d.field("max_parts", val); -} -if let Some(ref val) = self.next_part_number_marker { -d.field("next_part_number_marker", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.part_number_marker { -d.field("part_number_marker", val); -} -if let Some(ref val) = self.parts { -d.field("parts", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.upload_id { -d.field("upload_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type Location = String; - -///

    Specifies the location where the bucket will be created.

    -///

    For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see -/// Working with directory buckets in the Amazon S3 User Guide.

    -/// -///

    This functionality is only supported by directory buckets.

    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct LocationInfo { -///

    The name of the location where the bucket will be created.

    -///

    For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

    - pub name: Option, -///

    The type of location where the bucket will be created.

    - pub type_: Option, -} - -impl fmt::Debug for LocationInfo { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LocationInfo"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.type_ { -d.field("type_", val); -} -d.finish_non_exhaustive() -} -} - - -pub type LocationNameAsString = String; - -pub type LocationPrefix = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct LocationType(Cow<'static, str>); - -impl LocationType { -pub const AVAILABILITY_ZONE: &'static str = "AvailabilityZone"; - -pub const LOCAL_ZONE: &'static str = "LocalZone"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for LocationType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: LocationType) -> Self { -s.0 -} -} - -impl FromStr for LocationType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys -/// for a bucket. For more information, see PUT Bucket logging in the -/// Amazon S3 API Reference.

    -#[derive(Clone, Default, PartialEq)] -pub struct LoggingEnabled { -///

    Specifies the bucket where you want Amazon S3 to store server access logs. You can have your -/// logs delivered to any bucket that you own, including the same bucket that is being logged. -/// You can also configure multiple buckets to deliver their logs to the same target bucket. In -/// this case, you should choose a different TargetPrefix for each source bucket -/// so that the delivered log files can be distinguished by key.

    - pub target_bucket: TargetBucket, -///

    Container for granting information.

    -///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support -/// target grants. For more information, see Permissions for server access log delivery in the -/// Amazon S3 User Guide.

    - pub target_grants: Option, -///

    Amazon S3 key format for log objects.

    - pub target_object_key_format: Option, -///

    A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a -/// single bucket, you can use a prefix to distinguish which log files came from which -/// bucket.

    - pub target_prefix: TargetPrefix, -} - -impl fmt::Debug for LoggingEnabled { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("LoggingEnabled"); -d.field("target_bucket", &self.target_bucket); -if let Some(ref val) = self.target_grants { -d.field("target_grants", val); -} -if let Some(ref val) = self.target_object_key_format { -d.field("target_object_key_format", val); -} -d.field("target_prefix", &self.target_prefix); -d.finish_non_exhaustive() -} -} - - -pub type MFA = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct MFADelete(Cow<'static, str>); - -impl MFADelete { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for MFADelete { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: MFADelete) -> Self { -s.0 -} -} - -impl FromStr for MFADelete { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct MFADeleteStatus(Cow<'static, str>); - -impl MFADeleteStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for MFADeleteStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: MFADeleteStatus) -> Self { -s.0 -} -} - -impl FromStr for MFADeleteStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Marker = String; - -pub type MaxAgeSeconds = i32; - -pub type MaxBuckets = i32; - -pub type MaxDirectoryBuckets = i32; - -pub type MaxKeys = i32; - -pub type MaxParts = i32; - -pub type MaxUploads = i32; - -pub type Message = String; - -pub type Metadata = Map; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct MetadataDirective(Cow<'static, str>); - -impl MetadataDirective { -pub const COPY: &'static str = "COPY"; - -pub const REPLACE: &'static str = "REPLACE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for MetadataDirective { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: MetadataDirective) -> Self { -s.0 -} -} - -impl FromStr for MetadataDirective { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A metadata key-value pair to store with an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct MetadataEntry { -///

    Name of the object.

    - pub name: Option, -///

    Value of the object.

    - pub value: Option, -} - -impl fmt::Debug for MetadataEntry { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetadataEntry"); -if let Some(ref val) = self.name { -d.field("name", val); -} -if let Some(ref val) = self.value { -d.field("value", val); -} -d.finish_non_exhaustive() -} -} - - -pub type MetadataKey = String; - -///

    -/// The metadata table configuration for a general purpose bucket. -///

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct MetadataTableConfiguration { -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    - pub s3_tables_destination: S3TablesDestination, -} - -impl fmt::Debug for MetadataTableConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetadataTableConfiguration"); -d.field("s3_tables_destination", &self.s3_tables_destination); -d.finish_non_exhaustive() -} -} - -impl Default for MetadataTableConfiguration { -fn default() -> Self { -Self { -s3_tables_destination: default(), -} -} -} - - -///

    -/// The metadata table configuration for a general purpose bucket. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, PartialEq)] -pub struct MetadataTableConfigurationResult { -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    - pub s3_tables_destination_result: S3TablesDestinationResult, -} - -impl fmt::Debug for MetadataTableConfigurationResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetadataTableConfigurationResult"); -d.field("s3_tables_destination_result", &self.s3_tables_destination_result); -d.finish_non_exhaustive() -} -} - - -pub type MetadataTableStatus = String; - -pub type MetadataValue = String; - -///

    A container specifying replication metrics-related settings enabling replication -/// metrics and events.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct Metrics { -///

    A container specifying the time threshold for emitting the -/// s3:Replication:OperationMissedThreshold event.

    - pub event_threshold: Option, -///

    Specifies whether the replication metrics are enabled.

    - pub status: MetricsStatus, -} - -impl fmt::Debug for Metrics { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Metrics"); -if let Some(ref val) = self.event_threshold { -d.field("event_threshold", val); -} -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} - - -///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. -/// The operator must have at least two predicates, and an object must match all of the -/// predicates in order for the filter to apply.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct MetricsAndOperator { -///

    The access point ARN used when evaluating an AND predicate.

    - pub access_point_arn: Option, -///

    The prefix used when evaluating an AND predicate.

    - pub prefix: Option, -///

    The list of tags used when evaluating an AND predicate.

    - pub tags: Option, -} - -impl fmt::Debug for MetricsAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetricsAndOperator"); -if let Some(ref val) = self.access_point_arn { -d.field("access_point_arn", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies a metrics configuration for the CloudWatch request metrics (specified by the -/// metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics -/// configuration, note that this is a full replacement of the existing metrics configuration. -/// If you don't include the elements you want to keep, they are erased. For more information, -/// see PutBucketMetricsConfiguration.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct MetricsConfiguration { -///

    Specifies a metrics configuration filter. The metrics configuration will only include -/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an -/// access point ARN, or a conjunction (MetricsAndOperator).

    - pub filter: Option, -///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and -/// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, -} - -impl fmt::Debug for MetricsConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MetricsConfiguration"); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} -} - - -pub type MetricsConfigurationList = List; - -///

    Specifies a metrics configuration filter. The metrics configuration only includes -/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an -/// access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

    -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -#[non_exhaustive] -#[serde(rename_all = "PascalCase")] -pub enum MetricsFilter { -///

    The access point ARN used when evaluating a metrics filter.

    - AccessPointArn(AccessPointArn), -///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. -/// The operator must have at least two predicates, and an object must match all of the -/// predicates in order for the filter to apply.

    - And(MetricsAndOperator), -///

    The prefix used when evaluating a metrics filter.

    - Prefix(Prefix), -///

    The tag used when evaluating a metrics filter.

    - Tag(Tag), -} - -pub type MetricsId = String; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct MetricsStatus(Cow<'static, str>); - -impl MetricsStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for MetricsStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: MetricsStatus) -> Self { -s.0 -} -} - -impl FromStr for MetricsStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type Minutes = i32; - -pub type MissingMeta = i32; - -pub type MpuObjectSize = i64; - -///

    Container for the MultipartUpload for the Amazon S3 object.

    -#[derive(Clone, Default, PartialEq)] -pub struct MultipartUpload { -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Date and time at which the multipart upload was initiated.

    - pub initiated: Option, -///

    Identifies who initiated the multipart upload.

    - pub initiator: Option, -///

    Key of the object for which the multipart upload was initiated.

    - pub key: Option, -///

    Specifies the owner of the object that is part of the multipart upload.

    -/// -///

    -/// Directory buckets - The bucket owner is -/// returned as the object owner for all the objects.

    -///
    - pub owner: Option, -///

    The class of storage used to store the object.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -///

    Upload ID that identifies the multipart upload.

    - pub upload_id: Option, -} - -impl fmt::Debug for MultipartUpload { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("MultipartUpload"); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.initiated { -d.field("initiated", val); -} -if let Some(ref val) = self.initiator { -d.field("initiator", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.upload_id { -d.field("upload_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type MultipartUploadId = String; - -pub type MultipartUploadList = List; - -pub type NextKeyMarker = String; - -pub type NextMarker = String; - -pub type NextPartNumberMarker = i32; - -pub type NextToken = String; - -pub type NextUploadIdMarker = String; - -pub type NextVersionIdMarker = String; - -///

    The specified bucket does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchBucket { -} - -impl fmt::Debug for NoSuchBucket { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoSuchBucket"); -d.finish_non_exhaustive() -} -} - - -///

    The specified key does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchKey { -} - -impl fmt::Debug for NoSuchKey { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoSuchKey"); -d.finish_non_exhaustive() -} -} - - -///

    The specified multipart upload does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NoSuchUpload { -} - -impl fmt::Debug for NoSuchUpload { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoSuchUpload"); -d.finish_non_exhaustive() -} -} - - -pub type NonNegativeIntegerType = i32; - -///

    Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently -/// deletes the noncurrent object versions. You set this lifecycle configuration action on a -/// bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent -/// object versions at a specific period in the object's lifetime.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NoncurrentVersionExpiration { -///

    Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100 -/// noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent -/// versions beyond the specified number to retain. For more information about noncurrent -/// versions, see Lifecycle configuration -/// elements in the Amazon S3 User Guide.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub newer_noncurrent_versions: Option, -///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the -/// associated action. The value must be a non-zero positive integer. For information about the -/// noncurrent days calculations, see How -/// Amazon S3 Calculates When an Object Became Noncurrent in the -/// Amazon S3 User Guide.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    - pub noncurrent_days: Option, -} - -impl fmt::Debug for NoncurrentVersionExpiration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoncurrentVersionExpiration"); -if let Some(ref val) = self.newer_noncurrent_versions { -d.field("newer_noncurrent_versions", val); -} -if let Some(ref val) = self.noncurrent_days { -d.field("noncurrent_days", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Container for the transition rule that describes when noncurrent objects transition to -/// the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage -/// class. If your bucket is versioning-enabled (or versioning is suspended), you can set this -/// action to request that Amazon S3 transition noncurrent object versions to the -/// STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage -/// class at a specific period in the object's lifetime.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NoncurrentVersionTransition { -///

    Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before -/// transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will -/// transition any additional noncurrent versions beyond the specified number to retain. For -/// more information about noncurrent versions, see Lifecycle configuration -/// elements in the Amazon S3 User Guide.

    - pub newer_noncurrent_versions: Option, -///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the -/// associated action. For information about the noncurrent days calculations, see How -/// Amazon S3 Calculates How Long an Object Has Been Noncurrent in the -/// Amazon S3 User Guide.

    - pub noncurrent_days: Option, -///

    The class of storage used to store the object.

    - pub storage_class: Option, -} - -impl fmt::Debug for NoncurrentVersionTransition { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NoncurrentVersionTransition"); -if let Some(ref val) = self.newer_noncurrent_versions { -d.field("newer_noncurrent_versions", val); -} -if let Some(ref val) = self.noncurrent_days { -d.field("noncurrent_days", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} -} - - -pub type NoncurrentVersionTransitionList = List; - -///

    The specified content does not exist.

    -#[derive(Clone, Default, PartialEq)] -pub struct NotFound { -} - -impl fmt::Debug for NotFound { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NotFound"); -d.finish_non_exhaustive() -} -} - - -///

    A container for specifying the notification configuration of the bucket. If this element -/// is empty, notifications are turned off for the bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NotificationConfiguration { -///

    Enables delivery of events to Amazon EventBridge.

    - pub event_bridge_configuration: Option, -///

    Describes the Lambda functions to invoke and the events for which to invoke -/// them.

    - pub lambda_function_configurations: Option, -///

    The Amazon Simple Queue Service queues to publish messages to and the events for which -/// to publish messages.

    - pub queue_configurations: Option, -///

    The topic to which notifications are sent and the events for which notifications are -/// generated.

    - pub topic_configurations: Option, -} - -impl fmt::Debug for NotificationConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NotificationConfiguration"); -if let Some(ref val) = self.event_bridge_configuration { -d.field("event_bridge_configuration", val); -} -if let Some(ref val) = self.lambda_function_configurations { -d.field("lambda_function_configurations", val); -} -if let Some(ref val) = self.queue_configurations { -d.field("queue_configurations", val); -} -if let Some(ref val) = self.topic_configurations { -d.field("topic_configurations", val); -} -d.finish_non_exhaustive() -} -} - - -///

    Specifies object key name filtering rules. For information about key name filtering, see -/// Configuring event -/// notifications using object key name filtering in the -/// Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct NotificationConfigurationFilter { - pub key: Option, -} - -impl fmt::Debug for NotificationConfigurationFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("NotificationConfigurationFilter"); -if let Some(ref val) = self.key { -d.field("key", val); -} -d.finish_non_exhaustive() -} -} - - -///

    An optional unique identifier for configurations in a notification configuration. If you -/// don't provide one, Amazon S3 will assign an ID.

    -pub type NotificationId = String; - -///

    An object consists of data and its descriptive metadata.

    -#[derive(Clone, Default, PartialEq)] -pub struct Object { -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    The entity tag is a hash of the object. The ETag reflects changes only to the contents -/// of an object, not its metadata. The ETag may or may not be an MD5 digest of the object -/// data. Whether or not it is depends on how the object was created and how it is encrypted as -/// described below:

    -///
      -///
    • -///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the -/// Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that -/// are an MD5 digest of their object data.

      -///
    • -///
    • -///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the -/// Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are -/// not an MD5 digest of their object data.

      -///
    • -///
    • -///

      If an object is created by either the Multipart Upload or Part Copy operation, the -/// ETag is not an MD5 digest, regardless of the method of encryption. If an object is -/// larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a -/// Multipart Upload, and therefore the ETag will not be an MD5 digest.

      -///
    • -///
    -/// -///

    -/// Directory buckets - MD5 is not supported by directory buckets.

    -///
    - pub e_tag: Option, -///

    The name that you assign to an object. You use the object key to retrieve the -/// object.

    - pub key: Option, -///

    Creation date of the object.

    - pub last_modified: Option, -///

    The owner of the object

    -/// -///

    -/// Directory buckets - The bucket owner is -/// returned as the object owner.

    -///
    - pub owner: Option, -///

    Specifies the restoration status of an object. Objects in certain storage classes must -/// be restored before they can be retrieved. For more information about these storage classes -/// and how to work with archived objects, see Working with archived -/// objects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub restore_status: Option, -///

    Size in bytes of the object

    - pub size: Option, -///

    The class of storage used to store the object.

    -/// -///

    -/// Directory buckets - -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    - pub storage_class: Option, -} - -impl fmt::Debug for Object { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Object"); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.restore_status { -d.field("restore_status", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} -} - - -///

    This action is not allowed against this storage tier.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectAlreadyInActiveTierError { -} - -impl fmt::Debug for ObjectAlreadyInActiveTierError { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectAlreadyInActiveTierError"); -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectAttributes(Cow<'static, str>); - -impl ObjectAttributes { -pub const CHECKSUM: &'static str = "Checksum"; - -pub const ETAG: &'static str = "ETag"; - -pub const OBJECT_PARTS: &'static str = "ObjectParts"; - -pub const OBJECT_SIZE: &'static str = "ObjectSize"; - -pub const STORAGE_CLASS: &'static str = "StorageClass"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectAttributes { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectAttributes) -> Self { -s.0 -} -} - -impl FromStr for ObjectAttributes { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ObjectAttributesList = List; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectCannedACL(Cow<'static, str>); - -impl ObjectCannedACL { -pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; - -pub const AWS_EXEC_READ: &'static str = "aws-exec-read"; - -pub const BUCKET_OWNER_FULL_CONTROL: &'static str = "bucket-owner-full-control"; - -pub const BUCKET_OWNER_READ: &'static str = "bucket-owner-read"; - -pub const PRIVATE: &'static str = "private"; - -pub const PUBLIC_READ: &'static str = "public-read"; - -pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectCannedACL { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectCannedACL) -> Self { -s.0 -} -} - -impl FromStr for ObjectCannedACL { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    Object Identifier is unique value to identify objects.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectIdentifier { -///

    An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. -/// This header field makes the request method conditional on ETags.

    -/// -///

    Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

    -///
    - pub e_tag: Option, -///

    Key name of the object.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub key: ObjectKey, -///

    If present, the objects are deleted only if its modification times matches the provided Timestamp. -///

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    - pub last_modified_time: Option, -///

    If present, the objects are deleted only if its size matches the provided size in bytes.

    -/// -///

    This functionality is only supported for directory buckets.

    -///
    - pub size: Option, -///

    Version ID for the specific version of the object to delete.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} - -impl fmt::Debug for ObjectIdentifier { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectIdentifier"); -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.last_modified_time { -d.field("last_modified_time", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ObjectIdentifierList = List; - -pub type ObjectKey = String; - -pub type ObjectList = List; - -///

    The container element for Object Lock configuration parameters.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ObjectLockConfiguration { -///

    Indicates whether this bucket has an Object Lock configuration enabled. Enable -/// ObjectLockEnabled when you apply ObjectLockConfiguration to a -/// bucket.

    - pub object_lock_enabled: Option, -///

    Specifies the Object Lock rule for the specified object. Enable the this rule when you -/// apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode -/// and a period. The period can be either Days or Years but you must -/// select one. You cannot specify Days and Years at the same -/// time.

    - pub rule: Option, -} - -impl fmt::Debug for ObjectLockConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectLockConfiguration"); -if let Some(ref val) = self.object_lock_enabled { -d.field("object_lock_enabled", val); -} -if let Some(ref val) = self.rule { -d.field("rule", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ObjectLockEnabled(Cow<'static, str>); - -impl ObjectLockEnabled { -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectLockEnabled { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectLockEnabled) -> Self { -s.0 -} -} - -impl FromStr for ObjectLockEnabled { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ObjectLockEnabledForBucket = bool; - -///

    A legal hold configuration for an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectLockLegalHold { -///

    Indicates whether the specified object has a legal hold in place.

    - pub status: Option, -} - -impl fmt::Debug for ObjectLockLegalHold { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectLockLegalHold"); -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectLockLegalHoldStatus(Cow<'static, str>); - -impl ObjectLockLegalHoldStatus { -pub const OFF: &'static str = "OFF"; - -pub const ON: &'static str = "ON"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectLockLegalHoldStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectLockLegalHoldStatus) -> Self { -s.0 -} -} - -impl FromStr for ObjectLockLegalHoldStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectLockMode(Cow<'static, str>); - -impl ObjectLockMode { -pub const COMPLIANCE: &'static str = "COMPLIANCE"; - -pub const GOVERNANCE: &'static str = "GOVERNANCE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectLockMode { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectLockMode) -> Self { -s.0 -} -} - -impl FromStr for ObjectLockMode { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -pub type ObjectLockRetainUntilDate = Timestamp; - -///

    A Retention configuration for an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectLockRetention { -///

    Indicates the Retention mode for the specified object.

    - pub mode: Option, -///

    The date on which this Object Lock Retention will expire.

    - pub retain_until_date: Option, -} - -impl fmt::Debug for ObjectLockRetention { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectLockRetention"); -if let Some(ref val) = self.mode { -d.field("mode", val); -} -if let Some(ref val) = self.retain_until_date { -d.field("retain_until_date", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ObjectLockRetentionMode(Cow<'static, str>); - -impl ObjectLockRetentionMode { -pub const COMPLIANCE: &'static str = "COMPLIANCE"; - -pub const GOVERNANCE: &'static str = "GOVERNANCE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectLockRetentionMode { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectLockRetentionMode) -> Self { -s.0 -} -} - -impl FromStr for ObjectLockRetentionMode { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    The container element for an Object Lock rule.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ObjectLockRule { -///

    The default Object Lock retention mode and period that you want to apply to new objects -/// placed in the specified bucket. Bucket settings require both a mode and a period. The -/// period can be either Days or Years but you must select one. You -/// cannot specify Days and Years at the same time.

    - pub default_retention: Option, -} - -impl fmt::Debug for ObjectLockRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectLockRule"); -if let Some(ref val) = self.default_retention { -d.field("default_retention", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ObjectLockToken = String; - -///

    The source object of the COPY action is not in the active tier and is only stored in -/// Amazon S3 Glacier.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectNotInActiveTierError { -} - -impl fmt::Debug for ObjectNotInActiveTierError { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectNotInActiveTierError"); -d.finish_non_exhaustive() -} -} - - -///

    The container element for object ownership for a bucket's ownership controls.

    -///

    -/// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to -/// the bucket owner if the objects are uploaded with the -/// bucket-owner-full-control canned ACL.

    -///

    -/// ObjectWriter - The uploading account will own the object if the object is -/// uploaded with the bucket-owner-full-control canned ACL.

    -///

    -/// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no -/// longer affect permissions. The bucket owner automatically owns and has full control over -/// every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL -/// or specify bucket owner full control ACLs (such as the predefined -/// bucket-owner-full-control canned ACL or a custom ACL in XML format that -/// grants the same permissions).

    -///

    By default, ObjectOwnership is set to BucketOwnerEnforced and -/// ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where -/// you must control access for each object individually. For more information about S3 Object -/// Ownership, see Controlling ownership of -/// objects and disabling ACLs for your bucket in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectOwnership(Cow<'static, str>); - -impl ObjectOwnership { -pub const BUCKET_OWNER_ENFORCED: &'static str = "BucketOwnerEnforced"; - -pub const BUCKET_OWNER_PREFERRED: &'static str = "BucketOwnerPreferred"; - -pub const OBJECT_WRITER: &'static str = "ObjectWriter"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectOwnership { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectOwnership) -> Self { -s.0 -} -} - -impl FromStr for ObjectOwnership { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    A container for elements related to an individual part.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectPart { -///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a -/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present -/// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present -/// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    The part number identifying the part. This value is a positive integer between 1 and -/// 10,000.

    - pub part_number: Option, -///

    The size of the uploaded part in bytes.

    - pub size: Option, -} - -impl fmt::Debug for ObjectPart { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectPart"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ObjectSize = i64; - -pub type ObjectSizeGreaterThanBytes = i64; - -pub type ObjectSizeLessThanBytes = i64; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectStorageClass(Cow<'static, str>); - -impl ObjectStorageClass { -pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; - -pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; - -pub const GLACIER: &'static str = "GLACIER"; - -pub const GLACIER_IR: &'static str = "GLACIER_IR"; - -pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; - -pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; - -pub const OUTPOSTS: &'static str = "OUTPOSTS"; - -pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; - -pub const SNOW: &'static str = "SNOW"; - -pub const STANDARD: &'static str = "STANDARD"; - -pub const STANDARD_IA: &'static str = "STANDARD_IA"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectStorageClass { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectStorageClass) -> Self { -s.0 -} -} - -impl FromStr for ObjectStorageClass { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    The version of an object.

    -#[derive(Clone, Default, PartialEq)] -pub struct ObjectVersion { -///

    The algorithm that was used to create a checksum of the object.

    - pub checksum_algorithm: Option, -///

    The checksum type that is used to calculate the object’s -/// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    The entity tag is an MD5 hash of that version of the object.

    - pub e_tag: Option, -///

    Specifies whether the object is (true) or is not (false) the latest version of an -/// object.

    - pub is_latest: Option, -///

    The object key.

    - pub key: Option, -///

    Date and time when the object was last modified.

    - pub last_modified: Option, -///

    Specifies the owner of the object.

    - pub owner: Option, -///

    Specifies the restoration status of an object. Objects in certain storage classes must -/// be restored before they can be retrieved. For more information about these storage classes -/// and how to work with archived objects, see Working with archived -/// objects in the Amazon S3 User Guide.

    - pub restore_status: Option, -///

    Size in bytes of the object.

    - pub size: Option, -///

    The class of storage used to store the object.

    - pub storage_class: Option, -///

    Version ID of an object.

    - pub version_id: Option, -} - -impl fmt::Debug for ObjectVersion { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ObjectVersion"); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.is_latest { -d.field("is_latest", val); -} -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.owner { -d.field("owner", val); -} -if let Some(ref val) = self.restore_status { -d.field("restore_status", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} -} - - -pub type ObjectVersionId = String; - -pub type ObjectVersionList = List; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ObjectVersionStorageClass(Cow<'static, str>); - -impl ObjectVersionStorageClass { -pub const STANDARD: &'static str = "STANDARD"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for ObjectVersionStorageClass { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: ObjectVersionStorageClass) -> Self { -s.0 -} -} - -impl FromStr for ObjectVersionStorageClass { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct OptionalObjectAttributes(Cow<'static, str>); - -impl OptionalObjectAttributes { -pub const RESTORE_STATUS: &'static str = "RestoreStatus"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +/// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was +/// unable to create the table, this structure contains the error code and error message. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct ErrorDetails { + ///

    + /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + /// unable to create the table, this structure contains the error code. The possible error codes and + /// error messages are as follows: + ///

    + ///
      + ///
    • + ///

      + /// AccessDeniedCreatingResources - You don't have sufficient permissions to + /// create the required resources. Make sure that you have s3tables:CreateNamespace, + /// s3tables:CreateTable, s3tables:GetTable and + /// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata + /// table, you must delete the metadata configuration for this bucket, and then create a new + /// metadata configuration. + ///

      + ///
    • + ///
    • + ///

      + /// AccessDeniedWritingToTable - Unable to write to the metadata table because of + /// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new + /// metadata table. To create a new metadata table, you must delete the metadata configuration for + /// this bucket, and then create a new metadata configuration.

      + ///
    • + ///
    • + ///

      + /// DestinationTableNotFound - The destination table doesn't exist. To create a + /// new metadata table, you must delete the metadata configuration for this bucket, and then + /// create a new metadata configuration.

      + ///
    • + ///
    • + ///

      + /// ServerInternalError - An internal error has occurred. To create a new metadata + /// table, you must delete the metadata configuration for this bucket, and then create a new + /// metadata configuration.

      + ///
    • + ///
    • + ///

      + /// TableAlreadyExists - The table that you specified already exists in the table + /// bucket's namespace. Specify a different table name. To create a new metadata table, you must + /// delete the metadata configuration for this bucket, and then create a new metadata + /// configuration.

      + ///
    • + ///
    • + ///

      + /// TableBucketNotFound - The table bucket that you specified doesn't exist in + /// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new + /// metadata table, you must delete the metadata configuration for this bucket, and then create + /// a new metadata configuration.

      + ///
    • + ///
    + pub error_code: Option, + ///

    + /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + /// unable to create the table, this structure contains the error message. The possible error codes and + /// error messages are as follows: + ///

    + ///
      + ///
    • + ///

      + /// AccessDeniedCreatingResources - You don't have sufficient permissions to + /// create the required resources. Make sure that you have s3tables:CreateNamespace, + /// s3tables:CreateTable, s3tables:GetTable and + /// s3tables:PutTablePolicy permissions, and then try again. To create a new metadata + /// table, you must delete the metadata configuration for this bucket, and then create a new + /// metadata configuration. + ///

      + ///
    • + ///
    • + ///

      + /// AccessDeniedWritingToTable - Unable to write to the metadata table because of + /// missing resource permissions. To fix the resource policy, Amazon S3 needs to create a new + /// metadata table. To create a new metadata table, you must delete the metadata configuration for + /// this bucket, and then create a new metadata configuration.

      + ///
    • + ///
    • + ///

      + /// DestinationTableNotFound - The destination table doesn't exist. To create a + /// new metadata table, you must delete the metadata configuration for this bucket, and then + /// create a new metadata configuration.

      + ///
    • + ///
    • + ///

      + /// ServerInternalError - An internal error has occurred. To create a new metadata + /// table, you must delete the metadata configuration for this bucket, and then create a new + /// metadata configuration.

      + ///
    • + ///
    • + ///

      + /// TableAlreadyExists - The table that you specified already exists in the table + /// bucket's namespace. Specify a different table name. To create a new metadata table, you must + /// delete the metadata configuration for this bucket, and then create a new metadata + /// configuration.

      + ///
    • + ///
    • + ///

      + /// TableBucketNotFound - The table bucket that you specified doesn't exist in + /// this Amazon Web Services Region and account. Create or choose a different table bucket. To create a new + /// metadata table, you must delete the metadata configuration for this bucket, and then create + /// a new metadata configuration.

      + ///
    • + ///
    + pub error_message: Option, } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl fmt::Debug for ErrorDetails { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ErrorDetails"); + if let Some(ref val) = self.error_code { + d.field("error_code", val); + } + if let Some(ref val) = self.error_message { + d.field("error_message", val); + } + d.finish_non_exhaustive() + } } +///

    The error information.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ErrorDocument { + ///

    The object key name to use when a 4XX class error occurs.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub key: ObjectKey, } -impl From for OptionalObjectAttributes { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl fmt::Debug for ErrorDocument { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ErrorDocument"); + d.field("key", &self.key); + d.finish_non_exhaustive() + } } -impl From for Cow<'static, str> { -fn from(s: OptionalObjectAttributes) -> Self { -s.0 -} -} +pub type ErrorMessage = String; -impl FromStr for OptionalObjectAttributes { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} +pub type Errors = List; -pub type OptionalObjectAttributesList = List; +///

    A container for specifying the configuration for Amazon EventBridge.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct EventBridgeConfiguration {} -///

    Describes the location where the restore job's output is stored.

    -#[derive(Clone, Default, PartialEq)] -pub struct OutputLocation { -///

    Describes an S3 location that will receive the results of the restore request.

    - pub s3: Option, +impl fmt::Debug for EventBridgeConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("EventBridgeConfiguration"); + d.finish_non_exhaustive() + } } -impl fmt::Debug for OutputLocation { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("OutputLocation"); -if let Some(ref val) = self.s3 { -d.field("s3", val); -} -d.finish_non_exhaustive() -} -} +pub type EventList = List; +pub type ExcludeFolders = bool; -///

    Describes how results of the Select job are serialized.

    -#[derive(Clone, Default, PartialEq)] -pub struct OutputSerialization { -///

    Describes the serialization of CSV-encoded Select results.

    - pub csv: Option, -///

    Specifies JSON as request's output serialization format.

    - pub json: Option, +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ExcludedPrefix { + pub prefix: Option, } -impl fmt::Debug for OutputSerialization { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("OutputSerialization"); -if let Some(ref val) = self.csv { -d.field("csv", val); -} -if let Some(ref val) = self.json { -d.field("json", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ExcludedPrefix { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ExcludedPrefix"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } +pub type ExcludedPrefixes = List; -///

    Container for the owner's display name and ID.

    -#[derive(Clone, Default, PartialEq)] -pub struct Owner { -///

    Container for the display name of the owner. This value is only supported in the -/// following Amazon Web Services Regions:

    -///
      -///
    • -///

      US East (N. Virginia)

      -///
    • -///
    • -///

      US West (N. California)

      -///
    • -///
    • -///

      US West (Oregon)

      -///
    • -///
    • -///

      Asia Pacific (Singapore)

      -///
    • -///
    • -///

      Asia Pacific (Sydney)

      -///
    • -///
    • -///

      Asia Pacific (Tokyo)

      -///
    • -///
    • -///

      Europe (Ireland)

      -///
    • -///
    • -///

      South America (São Paulo)

      -///
    • -///
    +///

    Optional configuration to replicate existing source bucket objects.

    /// -///

    This functionality is not supported for directory buckets.

    +///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the +/// Amazon S3 User Guide.

    ///
    - pub display_name: Option, -///

    Container for the ID of the owner.

    - pub id: Option, +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ExistingObjectReplication { + ///

    Specifies whether Amazon S3 replicates existing source bucket objects.

    + pub status: ExistingObjectReplicationStatus, } -impl fmt::Debug for Owner { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Owner"); -if let Some(ref val) = self.display_name { -d.field("display_name", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ExistingObjectReplication { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ExistingObjectReplication"); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } - #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct OwnerOverride(Cow<'static, str>); - -impl OwnerOverride { -pub const DESTINATION: &'static str = "Destination"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} - -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} - -} - -impl From for OwnerOverride { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} - -impl From for Cow<'static, str> { -fn from(s: OwnerOverride) -> Self { -s.0 -} -} - -impl FromStr for OwnerOverride { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} - -///

    The container element for a bucket's ownership controls.

    -#[derive(Clone, Default, PartialEq)] -pub struct OwnershipControls { -///

    The container element for an ownership control rule.

    - pub rules: OwnershipControlsRules, -} - -impl fmt::Debug for OwnershipControls { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("OwnershipControls"); -d.field("rules", &self.rules); -d.finish_non_exhaustive() -} -} - - -///

    The container element for an ownership control rule.

    -#[derive(Clone, PartialEq)] -pub struct OwnershipControlsRule { - pub object_ownership: ObjectOwnership, -} +pub struct ExistingObjectReplicationStatus(Cow<'static, str>); -impl fmt::Debug for OwnershipControlsRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("OwnershipControlsRule"); -d.field("object_ownership", &self.object_ownership); -d.finish_non_exhaustive() -} -} +impl ExistingObjectReplicationStatus { + pub const DISABLED: &'static str = "Disabled"; + pub const ENABLED: &'static str = "Enabled"; -pub type OwnershipControlsRules = List; + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -///

    Container for Parquet.

    -#[derive(Clone, Default, PartialEq)] -pub struct ParquetInput { + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for ParquetInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ParquetInput"); -d.finish_non_exhaustive() -} +impl From for ExistingObjectReplicationStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } - -///

    Container for elements related to a part.

    -#[derive(Clone, Default, PartialEq)] -pub struct Part { -///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present -/// if the object was uploaded with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present -/// if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present -/// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a -/// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present -/// if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present -/// if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Entity tag returned when the part was uploaded.

    - pub e_tag: Option, -///

    Date and time at which the part was uploaded.

    - pub last_modified: Option, -///

    Part number identifying the part. This is a positive integer between 1 and -/// 10,000.

    - pub part_number: Option, -///

    Size in bytes of the uploaded part data.

    - pub size: Option, +impl From for Cow<'static, str> { + fn from(s: ExistingObjectReplicationStatus) -> Self { + s.0 + } } -impl fmt::Debug for Part { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Part"); -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); -} -if let Some(ref val) = self.part_number { -d.field("part_number", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -d.finish_non_exhaustive() -} +impl FromStr for ExistingObjectReplicationStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +pub type Expiration = String; -pub type PartNumber = i32; - -pub type PartNumberMarker = i32; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct PartitionDateSource(Cow<'static, str>); - -impl PartitionDateSource { -pub const DELIVERY_TIME: &'static str = "DeliveryTime"; - -pub const EVENT_TIME: &'static str = "EventTime"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ExpirationStatus(Cow<'static, str>); -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} +impl ExpirationStatus { + pub const DISABLED: &'static str = "Disabled"; -} + pub const ENABLED: &'static str = "Enabled"; -impl From for PartitionDateSource { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -impl From for Cow<'static, str> { -fn from(s: PartitionDateSource) -> Self { -s.0 -} + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl FromStr for PartitionDateSource { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl From for ExpirationStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -///

    Amazon S3 keys for log objects are partitioned in the following format:

    -///

    -/// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -///

    -///

    PartitionedPrefix defaults to EventTime delivery when server access logs are -/// delivered.

    -#[derive(Clone, Default, PartialEq)] -pub struct PartitionedPrefix { -///

    Specifies the partition date source for the partitioned prefix. -/// PartitionDateSource can be EventTime or -/// DeliveryTime.

    -///

    For DeliveryTime, the time in the log file names corresponds to the -/// delivery time for the log files.

    -///

    For EventTime, The logs delivered are for a specific day only. The year, -/// month, and day correspond to the day on which the event occurred, and the hour, minutes and -/// seconds are set to 00 in the key.

    - pub partition_date_source: Option, +impl From for Cow<'static, str> { + fn from(s: ExpirationStatus) -> Self { + s.0 + } } -impl fmt::Debug for PartitionedPrefix { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PartitionedPrefix"); -if let Some(ref val) = self.partition_date_source { -d.field("partition_date_source", val); -} -d.finish_non_exhaustive() -} +impl FromStr for ExpirationStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +pub type ExpiredObjectAllVersions = bool; -pub type Parts = List; +pub type ExpiredObjectDeleteMarker = bool; -pub type PartsCount = i32; +pub type Expires = Timestamp; -pub type PartsList = List; +pub type ExposeHeader = String; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Payer(Cow<'static, str>); +pub type ExposeHeaders = List; -impl Payer { -pub const BUCKET_OWNER: &'static str = "BucketOwner"; +pub type Expression = String; -pub const REQUESTER: &'static str = "Requester"; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ExpressionType(Cow<'static, str>); -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} +impl ExpressionType { + pub const SQL: &'static str = "SQL"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl From for Payer { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl From for ExpressionType { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl From for Cow<'static, str> { -fn from(s: Payer) -> Self { -s.0 -} +impl From for Cow<'static, str> { + fn from(s: ExpressionType) -> Self { + s.0 + } } -impl FromStr for Payer { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl FromStr for ExpressionType { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Permission(Cow<'static, str>); +pub type FetchOwner = bool; -impl Permission { -pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; +pub type FieldDelimiter = String; -pub const READ: &'static str = "READ"; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct FileHeaderInfo(Cow<'static, str>); -pub const READ_ACP: &'static str = "READ_ACP"; +impl FileHeaderInfo { + pub const IGNORE: &'static str = "IGNORE"; -pub const WRITE: &'static str = "WRITE"; + pub const NONE: &'static str = "NONE"; -pub const WRITE_ACP: &'static str = "WRITE_ACP"; + pub const USE: &'static str = "USE"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } +impl From for FileHeaderInfo { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl From for Permission { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl From for Cow<'static, str> { + fn from(s: FileHeaderInfo) -> Self { + s.0 + } } -impl From for Cow<'static, str> { -fn from(s: Permission) -> Self { -s.0 -} +impl FromStr for FileHeaderInfo { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl FromStr for Permission { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) +///

    Specifies the Amazon S3 object key name to filter on. An object key name is the name assigned +/// to an object in your Amazon S3 bucket. You specify whether to filter on the suffix or prefix of +/// the object key name. A prefix is a specific string of characters at the beginning of an +/// object key name, which you can use to organize objects. For example, you can start the key +/// names of related objects with a prefix, such as 2023- or +/// engineering/. Then, you can use FilterRule to find objects in +/// a bucket with key names that have the same prefix. A suffix is similar to a prefix, but it +/// is at the end of the object key name instead of at the beginning.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct FilterRule { + ///

    The object key name prefix or suffix identifying one or more objects to which the + /// filtering rule applies. The maximum length is 1,024 characters. Overlapping prefixes and + /// suffixes are not supported. For more information, see Configuring Event Notifications + /// in the Amazon S3 User Guide.

    + pub name: Option, + ///

    The value that the filter searches for in object key names.

    + pub value: Option, } + +impl fmt::Debug for FilterRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("FilterRule"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.value { + d.field("value", val); + } + d.finish_non_exhaustive() + } } -pub type Policy = String; +///

    A list of containers for the key-value pair that defines the criteria for the filter +/// rule.

    +pub type FilterRuleList = List; -///

    The container element for a bucket's policy status.

    -#[derive(Clone, Default, PartialEq)] -pub struct PolicyStatus { -///

    The policy status for this bucket. TRUE indicates that this bucket is -/// public. FALSE indicates that the bucket is not public.

    - pub is_public: Option, -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct FilterRuleName(Cow<'static, str>); -impl fmt::Debug for PolicyStatus { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PolicyStatus"); -if let Some(ref val) = self.is_public { -d.field("is_public", val); -} -d.finish_non_exhaustive() -} -} +impl FilterRuleName { + pub const PREFIX: &'static str = "prefix"; + pub const SUFFIX: &'static str = "suffix"; -#[derive(Default)] -pub struct PostObjectInput { -///

    The canned ACL to apply to the object. For more information, see Canned -/// ACL in the Amazon S3 User Guide.

    -///

    When adding a new object, you can use headers to grant ACL-based permissions to -/// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are -/// then added to the ACL on the object. By default, all objects are private. Only the owner -/// has full access control. For more information, see Access Control List (ACL) Overview -/// and Managing -/// ACLs Using the REST API in the Amazon S3 User Guide.

    -///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting -/// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that -/// use this setting only accept PUT requests that don't specify an ACL or PUT requests that -/// specify bucket owner full control ACLs, such as the bucket-owner-full-control -/// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that -/// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a -/// 400 error with the error code AccessControlListNotSupported. -/// For more information, see Controlling ownership of -/// objects and disabling ACLs in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub acl: Option, -///

    Object data.

    - pub body: Option, -///

    The bucket name to which the PUT action was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    -///

    -/// General purpose buckets - Setting this header to -/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with -/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 -/// Bucket Key.

    -///

    -/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - pub bucket_key_enabled: Option, -///

    Can be used to specify caching behavior along the request/reply chain. For more -/// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    - pub cache_control: Option, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm -/// or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    -///

    For the x-amz-checksum-algorithm -/// header, replace -/// algorithm -/// with the supported algorithm from the following list:

    -///
      -///
    • -///

      -/// CRC32 -///

      -///
    • -///
    • -///

      -/// CRC32C -///

      -///
    • -///
    • -///

      -/// CRC64NVME -///

      -///
    • -///
    • -///

      -/// SHA1 -///

      -///
    • -///
    • -///

      -/// SHA256 -///

      -///
    • -///
    -///

    For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If the individual checksum value you provide through x-amz-checksum-algorithm -/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    -/// -///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is -/// required for any request to upload an object with a retention period configured using -/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the -/// Amazon S3 User Guide.

    -///
    -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - pub checksum_algorithm: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the object. The CRC64NVME checksum is -/// always a full object checksum. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    - pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be -/// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    - pub content_length: Option, -///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to -/// RFC 1864. This header can be used as a message integrity check to verify that the data is -/// the same data that was originally sent. Although it is optional, we recommend using the -/// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST -/// request authentication, see REST Authentication.

    -/// -///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is -/// required for any request to upload an object with a retention period configured using -/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the -/// Amazon S3 User Guide.

    -///
    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    A standard MIME type describing the format of the contents. For more information, see -/// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    - pub content_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The date and time at which the object is no longer cacheable. For more information, see -/// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    - pub expires: Option, -///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_full_control: Option, -///

    Allows grantee to read the object data and its metadata.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_read: Option, -///

    Allows grantee to read the object ACL.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_read_acp: Option, -///

    Allows grantee to write the ACL for the applicable object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_write_acp: Option, -///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE -/// operation matches the ETag of the object in S3. If the ETag values do not match, the -/// operation returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    -///

    Expects the ETag value as a string.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_match: Option, -///

    Uploads the object only if the object key name does not already exist in the bucket -/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 -/// ConditionalRequestConflict response. On a 409 failure you should retry the -/// upload.

    -///

    Expects the '*' (asterisk) character.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_none_match: Option, -///

    Object key for which the PUT action was initiated.

    - pub key: ObjectKey, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    Specifies whether a legal hold will be applied to this object. For more information -/// about S3 Object Lock, see Object Lock in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode that you want to apply to this object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_mode: Option, -///

    The date and time when you want this object's Object Lock to expire. Must be formatted -/// as a timestamp parameter.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_retain_until_date: Option, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, -/// AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets passed on -/// to Amazon Web Services KMS for future GetObject operations on -/// this object.

    -///

    -/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    - pub ssekms_encryption_context: Option, -///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same -/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    -///

    -/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS -/// key to use. If you specify -/// x-amz-server-side-encryption:aws:kms or -/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key -/// (aws/s3) to protect the data.

    -///

    -/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the -/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses -/// the bucket's default KMS customer managed key ID. If you want to explicitly set the -/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -/// -/// Incorrect key specification results in an HTTP 400 Bad Request error.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 -/// (for example, AES256, aws:kms, aws:kms:dsse).

    -///
      -///
    • -///

      -/// General purpose buckets - You have four mutually -/// exclusive options to protect data using server-side encryption in Amazon S3, depending on -/// how you choose to manage the encryption keys. Specifically, the encryption key -/// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and -/// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by -/// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt -/// data at rest by using server-side encryption with other key options. For more -/// information, see Using Server-Side -/// Encryption in the Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. -/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. -/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and -/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. -///

      -/// -///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the -/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. -/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), -/// the encryption request headers must match the default encryption configuration of the directory bucket. -/// -///

      -///
      -///
    • -///
    - pub server_side_encryption: Option, -///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The -/// STANDARD storage class provides high durability and high availability. Depending on -/// performance needs, you can specify a different Storage Class. For more information, see -/// Storage -/// Classes in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      For directory buckets, only the S3 Express One Zone storage class is supported to store -/// newly created objects.

      -///
    • -///
    • -///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      -///
    • -///
    -///
    - pub storage_class: Option, -///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For -/// example, "Key1=Value1")

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub tagging: Option, - pub version_id: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata. For information about object metadata, see Object Key and Metadata in the -/// Amazon S3 User Guide.

    -///

    In the following example, the request header sets the redirect to an object -/// (anotherPage.html) in the same bucket:

    -///

    -/// x-amz-website-redirect-location: /anotherPage.html -///

    -///

    In the following example, the request header sets the object redirect to another -/// website:

    -///

    -/// x-amz-website-redirect-location: http://www.example.com/ -///

    -///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and -/// How to -/// Configure Website Page Redirects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub website_redirect_location: Option, -///

    -/// Specifies the offset for appending data to existing objects in bytes. -/// The offset must be equal to the size of the existing object being appended to. -/// If no object exists, setting this header to 0 will create a new object. -///

    -/// -///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    -///
    - pub write_offset_bytes: Option, -/// The URL to which the client is redirected upon successful upload. - pub success_action_redirect: Option, -/// The status code returned to the client upon successful upload. Valid values are 200, 201, and 204. - pub success_action_status: Option, -/// The POST policy document that was included in the request. - pub policy: Option, + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } +} + +impl From for FilterRuleName { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for PostObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PostObjectInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -if let Some(ref val) = self.body { -d.field("body", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); +impl From for Cow<'static, str> { + fn from(s: FilterRuleName) -> Self { + s.0 + } } -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); + +impl FromStr for FilterRuleName { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); + +pub type FilterRuleValue = String; + +pub type ForceDelete = bool; + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAccelerateConfigurationInput { + ///

    The name of the bucket for which the accelerate configuration is retrieved.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub request_payer: Option, } -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); + +impl fmt::Debug for GetBucketAccelerateConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAccelerateConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); + +impl GetBucketAccelerateConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketAccelerateConfigurationInputBuilder { + default() + } } -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAccelerateConfigurationOutput { + pub request_charged: Option, + ///

    The accelerate configuration of the bucket.

    + pub status: Option, } -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); + +impl fmt::Debug for GetBucketAccelerateConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAccelerateConfigurationOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAclInput { + ///

    Specifies the S3 bucket whose ACL is being requested.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); + +impl fmt::Debug for GetBucketAclInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAclInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); + +impl GetBucketAclInput { + #[must_use] + pub fn builder() -> builders::GetBucketAclInputBuilder { + default() + } } -if let Some(ref val) = self.content_language { -d.field("content_language", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAclOutput { + ///

    A list of grants.

    + pub grants: Option, + ///

    Container for the bucket owner's display name and ID.

    + pub owner: Option, } -if let Some(ref val) = self.content_length { -d.field("content_length", val); + +impl fmt::Debug for GetBucketAclOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAclOutput"); + if let Some(ref val) = self.grants { + d.field("grants", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAnalyticsConfigurationInput { + ///

    The name of the bucket from which an analytics configuration is retrieved.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID that identifies the analytics configuration.

    + pub id: AnalyticsId, } -if let Some(ref val) = self.content_type { -d.field("content_type", val); + +impl fmt::Debug for GetBucketAnalyticsConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAnalyticsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); + +impl GetBucketAnalyticsConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketAnalyticsConfigurationInputBuilder { + default() + } } -if let Some(ref val) = self.expires { -d.field("expires", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketAnalyticsConfigurationOutput { + ///

    The configuration and any analyses for the analytics filter.

    + pub analytics_configuration: Option, } -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); + +impl fmt::Debug for GetBucketAnalyticsConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketAnalyticsConfigurationOutput"); + if let Some(ref val) = self.analytics_configuration { + d.field("analytics_configuration", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketCorsInput { + ///

    The bucket name for which to get the cors configuration.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); + +impl fmt::Debug for GetBucketCorsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketCorsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); + +impl GetBucketCorsInput { + #[must_use] + pub fn builder() -> builders::GetBucketCorsInputBuilder { + default() + } } -if let Some(ref val) = self.if_match { -d.field("if_match", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketCorsOutput { + ///

    A set of origins and methods (cross-origin access that you want to allow). You can add + /// up to 100 rules to the configuration.

    + pub cors_rules: Option, } -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); + +impl fmt::Debug for GetBucketCorsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketCorsOutput"); + if let Some(ref val) = self.cors_rules { + d.field("cors_rules", val); + } + d.finish_non_exhaustive() + } } -d.field("key", &self.key); -if let Some(ref val) = self.metadata { -d.field("metadata", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketEncryptionInput { + ///

    The name of the bucket from which the server-side encryption configuration is + /// retrieved.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); + +impl fmt::Debug for GetBucketEncryptionInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketEncryptionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); + +impl GetBucketEncryptionInput { + #[must_use] + pub fn builder() -> builders::GetBucketEncryptionInputBuilder { + default() + } } -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketEncryptionOutput { + pub server_side_encryption_configuration: Option, } -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); + +impl fmt::Debug for GetBucketEncryptionOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketEncryptionOutput"); + if let Some(ref val) = self.server_side_encryption_configuration { + d.field("server_side_encryption_configuration", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketIntelligentTieringConfigurationInput { + ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, + ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, } -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); + +impl fmt::Debug for GetBucketIntelligentTieringConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationInput"); + d.field("bucket", &self.bucket); + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); + +impl GetBucketIntelligentTieringConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketIntelligentTieringConfigurationInputBuilder { + default() + } } -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketIntelligentTieringConfigurationOutput { + ///

    Container for S3 Intelligent-Tiering configuration.

    + pub intelligent_tiering_configuration: Option, } -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); + +impl fmt::Debug for GetBucketIntelligentTieringConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketIntelligentTieringConfigurationOutput"); + if let Some(ref val) = self.intelligent_tiering_configuration { + d.field("intelligent_tiering_configuration", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketInventoryConfigurationInput { + ///

    The name of the bucket containing the inventory configuration to retrieve.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, } -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); + +impl fmt::Debug for GetBucketInventoryConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketInventoryConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.tagging { -d.field("tagging", val); + +impl GetBucketInventoryConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketInventoryConfigurationInputBuilder { + default() + } } -if let Some(ref val) = self.version_id { -d.field("version_id", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketInventoryConfigurationOutput { + ///

    Specifies the inventory configuration.

    + pub inventory_configuration: Option, } -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); + +impl fmt::Debug for GetBucketInventoryConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketInventoryConfigurationOutput"); + if let Some(ref val) = self.inventory_configuration { + d.field("inventory_configuration", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.write_offset_bytes { -d.field("write_offset_bytes", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLifecycleConfigurationInput { + ///

    The name of the bucket for which to get the lifecycle information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.success_action_redirect { -d.field("success_action_redirect", val); + +impl fmt::Debug for GetBucketLifecycleConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLifecycleConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.success_action_status { -d.field("success_action_status", val); + +impl GetBucketLifecycleConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketLifecycleConfigurationInputBuilder { + default() + } } -if let Some(ref val) = self.policy { -d.field("policy", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLifecycleConfigurationOutput { + ///

    Container for a lifecycle rule.

    + pub rules: Option, + ///

    Indicates which default minimum object size behavior is applied to the lifecycle + /// configuration.

    + /// + ///

    This parameter applies to general purpose buckets only. It isn't supported for + /// directory bucket lifecycle configurations.

    + ///
    + ///
      + ///
    • + ///

      + /// all_storage_classes_128K - Objects smaller than 128 KB will not transition to any storage class by default.

      + ///
    • + ///
    • + ///

      + /// varies_by_storage_class - Objects smaller than 128 KB will + /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By + /// default, all other storage classes will prevent transitions smaller than 128 KB. + ///

      + ///
    • + ///
    + ///

    To customize the minimum object size for any transition you can add a filter that + /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in + /// the body of your transition rule. Custom filters always take precedence over the default + /// transition behavior.

    + pub transition_default_minimum_object_size: Option, } -d.finish_non_exhaustive() + +impl fmt::Debug for GetBucketLifecycleConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLifecycleConfigurationOutput"); + if let Some(ref val) = self.rules { + d.field("rules", val); + } + if let Some(ref val) = self.transition_default_minimum_object_size { + d.field("transition_default_minimum_object_size", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLocationInput { + ///

    The name of the bucket for which to get the location.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl PostObjectInput { -#[must_use] -pub fn builder() -> builders::PostObjectInputBuilder { -default() +impl fmt::Debug for GetBucketLocationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLocationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } + +impl GetBucketLocationInput { + #[must_use] + pub fn builder() -> builders::GetBucketLocationInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PostObjectOutput { -///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header -/// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it -/// was uploaded without a checksum (and Amazon S3 added the default checksum, -/// CRC64NVME, to the uploaded object). For more information about how -/// checksums are calculated with multipart uploads, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    This header specifies the checksum type of the object, which determines how part-level -/// checksums are combined to create an object-level checksum for multipart objects. For -/// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a -/// data integrity check to verify that the checksum type that is received is the same checksum -/// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Entity tag for the uploaded object.

    -///

    -/// General purpose buckets - To ensure that data is not -/// corrupted traversing the network, for objects where the ETag is the MD5 digest of the -/// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned -/// ETag to the calculated MD5 value.

    -///

    -/// Directory buckets - The ETag for the object in -/// a directory bucket isn't the MD5 digest of the object.

    - pub e_tag: Option, -///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, -/// the response includes this header. It includes the expiry-date and -/// rule-id key-value pairs that provide information about object expiration. -/// The value of the rule-id is URL-encoded.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    - pub expiration: Option, - pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets -/// passed on to Amazon Web Services KMS for future GetObject -/// operations on this object.

    - pub ssekms_encryption_context: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, -///

    -/// The size of the object in bytes. This value is only be present if you append to an object. -///

    -/// -///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    -///
    - pub size: Option, -///

    Version ID of the object.

    -///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID -/// for the object being stored. Amazon S3 returns this ID in the response. When you enable -/// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object -/// simultaneously, it stores all of the objects. For more information about versioning, see -/// Adding Objects to -/// Versioning-Enabled Buckets in the Amazon S3 User Guide. For -/// information about returning the versioning state of a bucket, see GetBucketVersioning.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, +pub struct GetBucketLocationOutput { + ///

    Specifies the Region where the bucket resides. For a list of all the Amazon S3 supported + /// location constraints by Region, see Regions and Endpoints.

    + ///

    Buckets in Region us-east-1 have a LocationConstraint of + /// null. Buckets with a LocationConstraint of EU reside in eu-west-1.

    + pub location_constraint: Option, } -impl fmt::Debug for PostObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PostObjectOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); +impl fmt::Debug for GetBucketLocationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLocationOutput"); + if let Some(ref val) = self.location_constraint { + d.field("location_constraint", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLoggingInput { + ///

    The bucket name for which to get the logging information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); + +impl fmt::Debug for GetBucketLoggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLoggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); + +impl GetBucketLoggingInput { + #[must_use] + pub fn builder() -> builders::GetBucketLoggingInputBuilder { + default() + } } -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketLoggingOutput { + pub logging_enabled: Option, } -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); + +impl fmt::Debug for GetBucketLoggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketLoggingOutput"); + if let Some(ref val) = self.logging_enabled { + d.field("logging_enabled", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetadataTableConfigurationInput { + ///

    + /// The general purpose bucket that contains the metadata table configuration that you want to retrieve. + ///

    + pub bucket: BucketName, + ///

    + /// The expected owner of the general purpose bucket that you want to retrieve the metadata table configuration from. + ///

    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.expiration { -d.field("expiration", val); + +impl fmt::Debug for GetBucketMetadataTableConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetadataTableConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); + +impl GetBucketMetadataTableConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketMetadataTableConfigurationInputBuilder { + default() + } } -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetadataTableConfigurationOutput { + ///

    + /// The metadata table configuration for the general purpose bucket. + ///

    + pub get_bucket_metadata_table_configuration_result: Option, } -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); + +impl fmt::Debug for GetBucketMetadataTableConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetadataTableConfigurationOutput"); + if let Some(ref val) = self.get_bucket_metadata_table_configuration_result { + d.field("get_bucket_metadata_table_configuration_result", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); + +///

    +/// The metadata table configuration for a general purpose bucket. +///

    +#[derive(Clone, PartialEq)] +pub struct GetBucketMetadataTableConfigurationResult { + ///

    + /// If the CreateBucketMetadataTableConfiguration request succeeds, but S3 Metadata was + /// unable to create the table, this structure contains the error code and error message. + ///

    + pub error: Option, + ///

    + /// The metadata table configuration for a general purpose bucket. + ///

    + pub metadata_table_configuration_result: MetadataTableConfigurationResult, + ///

    + /// The status of the metadata table. The status values are: + ///

    + ///
      + ///
    • + ///

      + /// CREATING - The metadata table is in the process of being created in the + /// specified table bucket.

      + ///
    • + ///
    • + ///

      + /// ACTIVE - The metadata table has been created successfully and records + /// are being delivered to the table. + ///

      + ///
    • + ///
    • + ///

      + /// FAILED - Amazon S3 is unable to create the metadata table, or Amazon S3 is unable to deliver + /// records. See ErrorDetails for details.

      + ///
    • + ///
    + pub status: MetadataTableStatus, } -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); + +impl fmt::Debug for GetBucketMetadataTableConfigurationResult { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetadataTableConfigurationResult"); + if let Some(ref val) = self.error { + d.field("error", val); + } + d.field("metadata_table_configuration_result", &self.metadata_table_configuration_result); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetricsConfigurationInput { + ///

    The name of the bucket containing the metrics configuration to retrieve.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and + /// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, } -if let Some(ref val) = self.size { -d.field("size", val); + +impl fmt::Debug for GetBucketMetricsConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetricsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.version_id { -d.field("version_id", val); + +impl GetBucketMetricsConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketMetricsConfigurationInputBuilder { + default() + } } -d.finish_non_exhaustive() + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketMetricsConfigurationOutput { + ///

    Specifies the metrics configuration.

    + pub metrics_configuration: Option, } + +impl fmt::Debug for GetBucketMetricsConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketMetricsConfigurationOutput"); + if let Some(ref val) = self.metrics_configuration { + d.field("metrics_configuration", val); + } + d.finish_non_exhaustive() + } } +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketNotificationConfigurationInput { + ///

    The name of the bucket for which to get the notification configuration.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} -pub type Prefix = String; +impl fmt::Debug for GetBucketNotificationConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketNotificationConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } +} -pub type Priority = i32; +impl GetBucketNotificationConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetBucketNotificationConfigurationInputBuilder { + default() + } +} -///

    This data type contains information about progress of an operation.

    +///

    A container for specifying the notification configuration of the bucket. If this element +/// is empty, notifications are turned off for the bucket.

    #[derive(Clone, Default, PartialEq)] -pub struct Progress { -///

    The current number of uncompressed object bytes processed.

    - pub bytes_processed: Option, -///

    The current number of bytes of records payload data returned.

    - pub bytes_returned: Option, -///

    The current number of object bytes scanned.

    - pub bytes_scanned: Option, +pub struct GetBucketNotificationConfigurationOutput { + ///

    Enables delivery of events to Amazon EventBridge.

    + pub event_bridge_configuration: Option, + ///

    Describes the Lambda functions to invoke and the events for which to invoke + /// them.

    + pub lambda_function_configurations: Option, + ///

    The Amazon Simple Queue Service queues to publish messages to and the events for which + /// to publish messages.

    + pub queue_configurations: Option, + ///

    The topic to which notifications are sent and the events for which notifications are + /// generated.

    + pub topic_configurations: Option, } -impl fmt::Debug for Progress { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Progress"); -if let Some(ref val) = self.bytes_processed { -d.field("bytes_processed", val); +impl fmt::Debug for GetBucketNotificationConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketNotificationConfigurationOutput"); + if let Some(ref val) = self.event_bridge_configuration { + d.field("event_bridge_configuration", val); + } + if let Some(ref val) = self.lambda_function_configurations { + d.field("lambda_function_configurations", val); + } + if let Some(ref val) = self.queue_configurations { + d.field("queue_configurations", val); + } + if let Some(ref val) = self.topic_configurations { + d.field("topic_configurations", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.bytes_returned { -d.field("bytes_returned", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketOwnershipControlsInput { + ///

    The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve. + ///

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.bytes_scanned { -d.field("bytes_scanned", val); + +impl fmt::Debug for GetBucketOwnershipControlsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketOwnershipControlsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -d.finish_non_exhaustive() + +impl GetBucketOwnershipControlsInput { + #[must_use] + pub fn builder() -> builders::GetBucketOwnershipControlsInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketOwnershipControlsOutput { + ///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or + /// ObjectWriter) currently in effect for this Amazon S3 bucket.

    + pub ownership_controls: Option, } +impl fmt::Debug for GetBucketOwnershipControlsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketOwnershipControlsOutput"); + if let Some(ref val) = self.ownership_controls { + d.field("ownership_controls", val); + } + d.finish_non_exhaustive() + } +} -///

    This data type contains information about the progress event of an operation.

    #[derive(Clone, Default, PartialEq)] -pub struct ProgressEvent { -///

    The Progress event details.

    - pub details: Option, +pub struct GetBucketPolicyInput { + ///

    The bucket name to get the bucket policy for.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    + ///

    + /// Access points - When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    + /// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    + pub expected_bucket_owner: Option, } -impl fmt::Debug for ProgressEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ProgressEvent"); -if let Some(ref val) = self.details { -d.field("details", val); +impl fmt::Debug for GetBucketPolicyInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketPolicyInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -d.finish_non_exhaustive() + +impl GetBucketPolicyInput { + #[must_use] + pub fn builder() -> builders::GetBucketPolicyInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyOutput { + ///

    The bucket policy as a JSON document.

    + pub policy: Option, } +impl fmt::Debug for GetBucketPolicyOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketPolicyOutput"); + if let Some(ref val) = self.policy { + d.field("policy", val); + } + d.finish_non_exhaustive() + } +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct Protocol(Cow<'static, str>); +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyStatusInput { + ///

    The name of the Amazon S3 bucket whose policy status you want to retrieve.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, +} -impl Protocol { -pub const HTTP: &'static str = "http"; +impl fmt::Debug for GetBucketPolicyStatusInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketPolicyStatusInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } +} -pub const HTTPS: &'static str = "https"; +impl GetBucketPolicyStatusInput { + #[must_use] + pub fn builder() -> builders::GetBucketPolicyStatusInputBuilder { + default() + } +} -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketPolicyStatusOutput { + ///

    The policy status for the specified bucket.

    + pub policy_status: Option, } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl fmt::Debug for GetBucketPolicyStatusOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketPolicyStatusOutput"); + if let Some(ref val) = self.policy_status { + d.field("policy_status", val); + } + d.finish_non_exhaustive() + } } +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketReplicationInput { + ///

    The bucket name for which to get the replication information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl From for Protocol { -fn from(s: String) -> Self { -Self(Cow::from(s)) +impl fmt::Debug for GetBucketReplicationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketReplicationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } + +impl GetBucketReplicationInput { + #[must_use] + pub fn builder() -> builders::GetBucketReplicationInputBuilder { + default() + } } -impl From for Cow<'static, str> { -fn from(s: Protocol) -> Self { -s.0 +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketReplicationOutput { + pub replication_configuration: Option, } + +impl fmt::Debug for GetBucketReplicationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketReplicationOutput"); + if let Some(ref val) = self.replication_configuration { + d.field("replication_configuration", val); + } + d.finish_non_exhaustive() + } } -impl FromStr for Protocol { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketRequestPaymentInput { + ///

    The name of the bucket for which to get the payment request configuration

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } + +impl fmt::Debug for GetBucketRequestPaymentInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketRequestPaymentInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can -/// enable the configuration options in any combination. For more information about when Amazon S3 -/// considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct PublicAccessBlockConfiguration { -///

    Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket -/// and objects in this bucket. Setting this element to TRUE causes the following -/// behavior:

    -///
      -///
    • -///

      PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is -/// public.

      -///
    • -///
    • -///

      PUT Object calls fail if the request includes a public ACL.

      -///
    • -///
    • -///

      PUT Bucket calls fail if the request includes a public ACL.

      -///
    • -///
    -///

    Enabling this setting doesn't affect existing policies or ACLs.

    - pub block_public_acls: Option, -///

    Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this -/// element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the -/// specified bucket policy allows public access.

    -///

    Enabling this setting doesn't affect existing bucket policies.

    - pub block_public_policy: Option, -///

    Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this -/// bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on -/// this bucket and objects in this bucket.

    -///

    Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't -/// prevent new public ACLs from being set.

    - pub ignore_public_acls: Option, -///

    Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting -/// this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has -/// a public policy.

    -///

    Enabling this setting doesn't affect previously stored bucket policies, except that -/// public and cross-account access within any public bucket policy, including non-public -/// delegation to specific accounts, is blocked.

    - pub restrict_public_buckets: Option, +impl GetBucketRequestPaymentInput { + #[must_use] + pub fn builder() -> builders::GetBucketRequestPaymentInputBuilder { + default() + } } -impl fmt::Debug for PublicAccessBlockConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PublicAccessBlockConfiguration"); -if let Some(ref val) = self.block_public_acls { -d.field("block_public_acls", val); +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketRequestPaymentOutput { + ///

    Specifies who pays for the download and request fees.

    + pub payer: Option, } -if let Some(ref val) = self.block_public_policy { -d.field("block_public_policy", val); + +impl fmt::Debug for GetBucketRequestPaymentOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketRequestPaymentOutput"); + if let Some(ref val) = self.payer { + d.field("payer", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.ignore_public_acls { -d.field("ignore_public_acls", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketTaggingInput { + ///

    The name of the bucket for which to get the tagging information.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.restrict_public_buckets { -d.field("restrict_public_buckets", val); + +impl fmt::Debug for GetBucketTaggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -d.finish_non_exhaustive() + +impl GetBucketTaggingInput { + #[must_use] + pub fn builder() -> builders::GetBucketTaggingInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketTaggingOutput { + ///

    Contains the tag set.

    + pub tag_set: TagSet, } +impl fmt::Debug for GetBucketTaggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketTaggingOutput"); + d.field("tag_set", &self.tag_set); + d.finish_non_exhaustive() + } +} -#[derive(Clone, PartialEq)] -pub struct PutBucketAccelerateConfigurationInput { -///

    Container for setting the transfer acceleration state.

    - pub accelerate_configuration: AccelerateConfiguration, -///

    The name of the bucket for which the accelerate configuration is set.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketVersioningInput { + ///

    The name of the bucket for which to get the versioning information.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } -impl fmt::Debug for PutBucketAccelerateConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAccelerateConfigurationInput"); -d.field("accelerate_configuration", &self.accelerate_configuration); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); +impl fmt::Debug for GetBucketVersioningInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketVersioningInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } +} + +impl GetBucketVersioningInput { + #[must_use] + pub fn builder() -> builders::GetBucketVersioningInputBuilder { + default() + } } -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketVersioningOutput { + ///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This + /// element is only returned if the bucket has been configured with MFA delete. If the bucket + /// has never been so configured, this element is not returned.

    + pub mfa_delete: Option, + ///

    The versioning state of the bucket.

    + pub status: Option, } -d.finish_non_exhaustive() + +impl fmt::Debug for GetBucketVersioningOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketVersioningOutput"); + if let Some(ref val) = self.mfa_delete { + d.field("mfa_delete", val); + } + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetBucketWebsiteInput { + ///

    The bucket name for which to get the website configuration.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl PutBucketAccelerateConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketAccelerateConfigurationInputBuilder { -default() +impl fmt::Debug for GetBucketWebsiteInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketWebsiteInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } + +impl GetBucketWebsiteInput { + #[must_use] + pub fn builder() -> builders::GetBucketWebsiteInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutBucketAccelerateConfigurationOutput { +pub struct GetBucketWebsiteOutput { + ///

    The object key name of the website error document to use for 4XX class errors.

    + pub error_document: Option, + ///

    The name of the index document for the website (for example + /// index.html).

    + pub index_document: Option, + ///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 + /// bucket.

    + pub redirect_all_requests_to: Option, + ///

    Rules that define when a redirect is applied and the redirect behavior.

    + pub routing_rules: Option, } -impl fmt::Debug for PutBucketAccelerateConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAccelerateConfigurationOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetBucketWebsiteOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetBucketWebsiteOutput"); + if let Some(ref val) = self.error_document { + d.field("error_document", val); + } + if let Some(ref val) = self.index_document { + d.field("index_document", val); + } + if let Some(ref val) = self.redirect_all_requests_to { + d.field("redirect_all_requests_to", val); + } + if let Some(ref val) = self.routing_rules { + d.field("routing_rules", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] -pub struct PutBucketAclInput { -///

    The canned ACL to apply to the bucket.

    - pub acl: Option, -///

    Contains the elements that set the ACL permissions for an object per grantee.

    - pub access_control_policy: Option, -///

    The bucket to which to apply the ACL.

    +pub struct GetObjectAclInput { + ///

    The bucket name that contains the object for which to get the ACL information.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, go to RFC -/// 1864. -///

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    Allows grantee the read, write, read ACP, and write ACP permissions on the -/// bucket.

    - pub grant_full_control: Option, -///

    Allows grantee to list the objects in the bucket.

    - pub grant_read: Option, -///

    Allows grantee to read the bucket ACL.

    - pub grant_read_acp: Option, -///

    Allows grantee to create new objects in the bucket.

    -///

    For the bucket and object owners of existing objects, also allows deletions and -/// overwrites of those objects.

    - pub grant_write: Option, -///

    Allows grantee to write the ACL for the applicable bucket.

    - pub grant_write_acp: Option, + ///

    The key of the object for which to get the ACL information.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    Version ID used to reference a specific version of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } -impl fmt::Debug for PutBucketAclInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAclInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -if let Some(ref val) = self.access_control_policy { -d.field("access_control_policy", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write { -d.field("grant_write", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectAclInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAclInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketAclInput { -#[must_use] -pub fn builder() -> builders::PutBucketAclInputBuilder { -default() -} +impl GetObjectAclInput { + #[must_use] + pub fn builder() -> builders::GetObjectAclInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutBucketAclOutput { +pub struct GetObjectAclOutput { + ///

    A list of grants.

    + pub grants: Option, + ///

    Container for the bucket owner's display name and ID.

    + pub owner: Option, + pub request_charged: Option, } -impl fmt::Debug for PutBucketAclOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAclOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectAclOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAclOutput"); + if let Some(ref val) = self.grants { + d.field("grants", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } - -#[derive(Clone, PartialEq)] -pub struct PutBucketAnalyticsConfigurationInput { -///

    The configuration and any analyses for the analytics filter.

    - pub analytics_configuration: AnalyticsConfiguration, -///

    The name of the bucket to which an analytics configuration is stored.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesInput { + ///

    The name of the bucket that contains the object.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The ID that identifies the analytics configuration.

    - pub id: AnalyticsId, + ///

    The object key.

    + pub key: ObjectKey, + ///

    Sets the maximum number of parts to return.

    + pub max_parts: Option, + ///

    Specifies the fields at the root level that you want returned in the response. Fields + /// that you do not specify are not returned.

    + pub object_attributes: ObjectAttributesList, + ///

    Specifies the part after which listing should begin. Only parts with higher part numbers + /// will be listed.

    + pub part_number_marker: Option, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    The version ID used to reference a specific version of the object.

    + /// + ///

    S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the + /// versionId query parameter in the request.

    + ///
    + pub version_id: Option, } -impl fmt::Debug for PutBucketAnalyticsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAnalyticsConfigurationInput"); -d.field("analytics_configuration", &self.analytics_configuration); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectAttributesInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAttributesInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.max_parts { + d.field("max_parts", val); + } + d.field("object_attributes", &self.object_attributes); + if let Some(ref val) = self.part_number_marker { + d.field("part_number_marker", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketAnalyticsConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketAnalyticsConfigurationInputBuilder { -default() -} +impl GetObjectAttributesInput { + #[must_use] + pub fn builder() -> builders::GetObjectAttributesInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutBucketAnalyticsConfigurationOutput { +pub struct GetObjectAttributesOutput { + ///

    The checksum or digest of the object.

    + pub checksum: Option, + ///

    Specifies whether the object retrieved was (true) or was not + /// (false) a delete marker. If false, this response header does + /// not appear in the response. To learn more about delete markers, see Working with delete markers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub delete_marker: Option, + ///

    An ETag is an opaque identifier assigned by a web server to a specific version of a + /// resource found at a URL.

    + pub e_tag: Option, + ///

    Date and time when the object was last modified.

    + pub last_modified: Option, + ///

    A collection of parts associated with a multipart upload.

    + pub object_parts: Option, + ///

    The size of the object in bytes.

    + pub object_size: Option, + pub request_charged: Option, + ///

    Provides the storage class information of the object. Amazon S3 returns this header for all + /// objects except for S3 Standard storage class objects.

    + ///

    For more information, see Storage Classes.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    The version ID of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } -impl fmt::Debug for PutBucketAnalyticsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketAnalyticsConfigurationOutput"); -d.finish_non_exhaustive() +impl fmt::Debug for GetObjectAttributesOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAttributesOutput"); + if let Some(ref val) = self.checksum { + d.field("checksum", val); + } + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.object_parts { + d.field("object_parts", val); + } + if let Some(ref val) = self.object_size { + d.field("object_size", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +///

    A collection of parts associated with a multipart upload.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectAttributesParts { + ///

    Indicates whether the returned list of parts is truncated. A value of true + /// indicates that the list was truncated. A list can be truncated if the number of parts + /// exceeds the limit returned in the MaxParts element.

    + pub is_truncated: Option, + ///

    The maximum number of parts allowed in the response.

    + pub max_parts: Option, + ///

    When a list is truncated, this element specifies the last part in the list, as well as + /// the value to use for the PartNumberMarker request parameter in a subsequent + /// request.

    + pub next_part_number_marker: Option, + ///

    The marker for the current part.

    + pub part_number_marker: Option, + ///

    A container for elements related to a particular part. A response can contain zero or + /// more Parts elements.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - For + /// GetObjectAttributes, if a additional checksum (including + /// x-amz-checksum-crc32, x-amz-checksum-crc32c, + /// x-amz-checksum-sha1, or x-amz-checksum-sha256) isn't + /// applied to the object specified in the request, the response doesn't return + /// Part.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - For + /// GetObjectAttributes, no matter whether a additional checksum is + /// applied to the object specified in the request, the response returns + /// Part.

      + ///
    • + ///
    + ///
    + pub parts: Option, + ///

    The total number of parts.

    + pub total_parts_count: Option, } +impl fmt::Debug for GetObjectAttributesParts { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectAttributesParts"); + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.max_parts { + d.field("max_parts", val); + } + if let Some(ref val) = self.next_part_number_marker { + d.field("next_part_number_marker", val); + } + if let Some(ref val) = self.part_number_marker { + d.field("part_number_marker", val); + } + if let Some(ref val) = self.parts { + d.field("parts", val); + } + if let Some(ref val) = self.total_parts_count { + d.field("total_parts_count", val); + } + d.finish_non_exhaustive() + } +} -#[derive(Clone, PartialEq)] -pub struct PutBucketCorsInput { -///

    Specifies the bucket impacted by the corsconfiguration.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectInput { + ///

    The bucket name containing the object.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// Object Lambda access points - When you use this action with an Object Lambda access point, you must direct requests to the Object Lambda access point hostname. The Object Lambda access point hostname takes the form AccessPointName-AccountId.s3-object-lambda.Region.amazonaws.com.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more -/// information, see Enabling -/// Cross-Origin Resource Sharing in the -/// Amazon S3 User Guide.

    - pub cors_configuration: CORSConfiguration, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, go to RFC -/// 1864. -///

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    To retrieve the checksum, this mode must be enabled.

    + pub checksum_mode: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, + ///

    Return the object only if its entity tag (ETag) is the same as the one specified in this + /// header; otherwise, return a 412 Precondition Failed error.

    + ///

    If both of the If-Match and If-Unmodified-Since headers are + /// present in the request as follows: If-Match condition evaluates to + /// true, and; If-Unmodified-Since condition evaluates to + /// false; then, S3 returns 200 OK and the data requested.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_match: Option, + ///

    Return the object only if it has been modified since the specified time; otherwise, + /// return a 304 Not Modified error.

    + ///

    If both of the If-None-Match and If-Modified-Since headers are + /// present in the request as follows: If-None-Match condition evaluates to + /// false, and; If-Modified-Since condition evaluates to + /// true; then, S3 returns 304 Not Modified status code.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_modified_since: Option, + ///

    Return the object only if its entity tag (ETag) is different from the one specified in + /// this header; otherwise, return a 304 Not Modified error.

    + ///

    If both of the If-None-Match and If-Modified-Since headers are + /// present in the request as follows: If-None-Match condition evaluates to + /// false, and; If-Modified-Since condition evaluates to + /// true; then, S3 returns 304 Not Modified HTTP status + /// code.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_none_match: Option, + ///

    Return the object only if it has not been modified since the specified time; otherwise, + /// return a 412 Precondition Failed error.

    + ///

    If both of the If-Match and If-Unmodified-Since headers are + /// present in the request as follows: If-Match condition evaluates to + /// true, and; If-Unmodified-Since condition evaluates to + /// false; then, S3 returns 200 OK and the data requested.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_unmodified_since: Option, + ///

    Key of the object to get.

    + pub key: ObjectKey, + ///

    Part number of the object being read. This is a positive integer between 1 and 10,000. + /// Effectively performs a 'ranged' GET request for the part specified. Useful for downloading + /// just a part of an object.

    + pub part_number: Option, + ///

    Downloads the specified byte range of an object. For more information about the HTTP + /// Range header, see https://www.rfc-editor.org/rfc/rfc9110.html#name-range.

    + /// + ///

    Amazon S3 doesn't support retrieving multiple ranges of data per GET + /// request.

    + ///
    + pub range: Option, + pub request_payer: Option, + ///

    Sets the Cache-Control header of the response.

    + pub response_cache_control: Option, + ///

    Sets the Content-Disposition header of the response.

    + pub response_content_disposition: Option, + ///

    Sets the Content-Encoding header of the response.

    + pub response_content_encoding: Option, + ///

    Sets the Content-Language header of the response.

    + pub response_content_language: Option, + ///

    Sets the Content-Type header of the response.

    + pub response_content_type: Option, + ///

    Sets the Expires header of the response.

    + pub response_expires: Option, + ///

    Specifies the algorithm to use when decrypting the object (for example, + /// AES256).

    + ///

    If you encrypt an object by using server-side encryption with customer-provided + /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, + /// you must use the following headers:

    + ///
      + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-algorithm + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key-MD5 + ///

      + ///
    • + ///
    + ///

    For more information about SSE-C, see Server-Side Encryption + /// (Using Customer-Provided Encryption Keys) in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key that you originally provided for Amazon S3 to + /// encrypt the data before storing it. This value is used to decrypt the object when + /// recovering it and must match the one used when storing the data. The key must be + /// appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + ///

    If you encrypt an object by using server-side encryption with customer-provided + /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, + /// you must use the following headers:

    + ///
      + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-algorithm + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key-MD5 + ///

      + ///
    • + ///
    + ///

    For more information about SSE-C, see Server-Side Encryption + /// (Using Customer-Provided Encryption Keys) in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the customer-provided encryption key according to + /// RFC 1321. Amazon S3 uses this header for a message integrity check to ensure that the encryption + /// key was transmitted without error.

    + ///

    If you encrypt an object by using server-side encryption with customer-provided + /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, + /// you must use the following headers:

    + ///
      + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-algorithm + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key-MD5 + ///

      + ///
    • + ///
    + ///

    For more information about SSE-C, see Server-Side Encryption + /// (Using Customer-Provided Encryption Keys) in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Version ID used to reference a specific version of the object.

    + ///

    By default, the GetObject operation returns the current version of an + /// object. To return a different version, use the versionId subresource.

    + /// + ///
      + ///
    • + ///

      If you include a versionId in your request header, you must have + /// the s3:GetObjectVersion permission to access a specific version of an + /// object. The s3:GetObject permission is not required in this + /// scenario.

      + ///
    • + ///
    • + ///

      If you request the current version of an object without a specific + /// versionId in the request header, only the + /// s3:GetObject permission is required. The + /// s3:GetObjectVersion permission is not required in this + /// scenario.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the + /// versionId query parameter in the request.

      + ///
    • + ///
    + ///
    + ///

    For more information about versioning, see PutBucketVersioning.

    + pub version_id: Option, } -impl fmt::Debug for PutBucketCorsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketCorsInput"); -d.field("bucket", &self.bucket); -d.field("cors_configuration", &self.cors_configuration); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); +impl fmt::Debug for GetObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_mode { + d.field("checksum_mode", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_modified_since { + d.field("if_modified_since", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + if let Some(ref val) = self.if_unmodified_since { + d.field("if_unmodified_since", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + if let Some(ref val) = self.range { + d.field("range", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.response_cache_control { + d.field("response_cache_control", val); + } + if let Some(ref val) = self.response_content_disposition { + d.field("response_content_disposition", val); + } + if let Some(ref val) = self.response_content_encoding { + d.field("response_content_encoding", val); + } + if let Some(ref val) = self.response_content_language { + d.field("response_content_language", val); + } + if let Some(ref val) = self.response_content_type { + d.field("response_content_type", val); + } + if let Some(ref val) = self.response_expires { + d.field("response_expires", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -d.finish_non_exhaustive() + +impl GetObjectInput { + #[must_use] + pub fn builder() -> builders::GetObjectInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLegalHoldInput { + ///

    The bucket name containing the object whose legal hold status you want to retrieve.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The key name for the object whose legal hold status you want to retrieve.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    The version ID of the object whose legal hold status you want to retrieve.

    + pub version_id: Option, } -impl PutBucketCorsInput { -#[must_use] -pub fn builder() -> builders::PutBucketCorsInputBuilder { -default() +impl fmt::Debug for GetObjectLegalHoldInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectLegalHoldInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +impl GetObjectLegalHoldInput { + #[must_use] + pub fn builder() -> builders::GetObjectLegalHoldInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutBucketCorsOutput { +pub struct GetObjectLegalHoldOutput { + ///

    The current legal hold status for the specified object.

    + pub legal_hold: Option, } -impl fmt::Debug for PutBucketCorsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketCorsOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectLegalHoldOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectLegalHoldOutput"); + if let Some(ref val) = self.legal_hold { + d.field("legal_hold", val); + } + d.finish_non_exhaustive() + } } - -#[derive(Clone, PartialEq)] -pub struct PutBucketEncryptionInput { -///

    Specifies default encryption for a bucket using server-side encryption with different -/// key options.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLockConfigurationInput { + ///

    The bucket whose Object Lock configuration you want to retrieve.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    -/// -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    -///
    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the server-side encryption -/// configuration.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, - pub server_side_encryption_configuration: ServerSideEncryptionConfiguration, } -impl fmt::Debug for PutBucketEncryptionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketEncryptionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("server_side_encryption_configuration", &self.server_side_encryption_configuration); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectLockConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectLockConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketEncryptionInput { -#[must_use] -pub fn builder() -> builders::PutBucketEncryptionInputBuilder { -default() +impl GetObjectLockConfigurationInput { + #[must_use] + pub fn builder() -> builders::GetObjectLockConfigurationInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectLockConfigurationOutput { + ///

    The specified bucket's Object Lock configuration.

    + pub object_lock_configuration: Option, } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketEncryptionOutput { +impl fmt::Debug for GetObjectLockConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectLockConfigurationOutput"); + if let Some(ref val) = self.object_lock_configuration { + d.field("object_lock_configuration", val); + } + d.finish_non_exhaustive() + } } -impl fmt::Debug for PutBucketEncryptionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketEncryptionOutput"); -d.finish_non_exhaustive() +#[derive(Default)] +pub struct GetObjectOutput { + ///

    Indicates that a range of bytes was specified in the request.

    + pub accept_ranges: Option, + ///

    Object data.

    + pub body: Option, + ///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with + /// Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more + /// information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. For more information, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    The checksum type, which determines how part-level checksums are combined to create an + /// object-level checksum for multipart objects. You can use this header response to verify + /// that the checksum type that is received is the same checksum type that was specified in the + /// CreateMultipartUpload request. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Specifies presentational information for the object.

    + pub content_disposition: Option, + ///

    Indicates what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    Size of the body in bytes.

    + pub content_length: Option, + ///

    The portion of the object returned in the response.

    + pub content_range: Option, + ///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, + ///

    Indicates whether the object retrieved was (true) or was not (false) a Delete Marker. If + /// false, this response header does not appear in the response.

    + /// + ///
      + ///
    • + ///

      If the current version of the object is a delete marker, Amazon S3 behaves as if the + /// object was deleted and includes x-amz-delete-marker: true in the + /// response.

      + ///
    • + ///
    • + ///

      If the specified version in the request is a delete marker, the response + /// returns a 405 Method Not Allowed error and the Last-Modified: + /// timestamp response header.

      + ///
    • + ///
    + ///
    + pub delete_marker: Option, + ///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific + /// version of a resource found at a URL.

    + pub e_tag: Option, + ///

    If the object expiration is configured (see + /// PutBucketLifecycleConfiguration + /// ), the response includes this + /// header. It includes the expiry-date and rule-id key-value pairs + /// providing object expiration information. The value of the rule-id is + /// URL-encoded.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    + pub expiration: Option, + ///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, + ///

    Date and time when the object was last modified.

    + ///

    + /// General purpose buckets - When you specify a + /// versionId of the object in your request, if the specified version in the + /// request is a delete marker, the response returns a 405 Method Not Allowed + /// error and the Last-Modified: timestamp response header.

    + pub last_modified: Option, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    This is set to the number of metadata entries not returned in the headers that are + /// prefixed with x-amz-meta-. This can happen if you create metadata using an API + /// like SOAP that supports more flexible metadata than the REST API. For example, using SOAP, + /// you can create metadata whose values are not legal HTTP headers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub missing_meta: Option, + ///

    Indicates whether this object has an active legal hold. This field is only returned if + /// you have permission to view an object's legal hold status.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_legal_hold_status: Option, + ///

    The Object Lock mode that's currently in place for this object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_mode: Option, + ///

    The date and time when this object's Object Lock will expire.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_retain_until_date: Option, + ///

    The count of parts this object has. This value is only returned if you specify + /// partNumber in your request and the object was uploaded as a multipart + /// upload.

    + pub parts_count: Option, + ///

    Amazon S3 can return this if your request involves a bucket that is either a source or + /// destination in a replication rule.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub replication_status: Option, + pub request_charged: Option, + ///

    Provides information about object restoration action and expiration time of the restored + /// object copy.

    + /// + ///

    This functionality is not supported for directory buckets. + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub restore: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, + ///

    Provides storage class information of the object. Amazon S3 returns this header for all + /// objects except for S3 Standard storage class objects.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    The number of tags, if any, on the object, when you have the relevant permission to read + /// object tags.

    + ///

    You can use GetObjectTagging to retrieve + /// the tag set associated with an object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub tag_count: Option, + ///

    Version ID of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub website_redirect_location: Option, } + +impl fmt::Debug for GetObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectOutput"); + if let Some(ref val) = self.accept_ranges { + d.field("accept_ranges", val); + } + if let Some(ref val) = self.body { + d.field("body", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_range { + d.field("content_range", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.missing_meta { + d.field("missing_meta", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.parts_count { + d.field("parts_count", val); + } + if let Some(ref val) = self.replication_status { + d.field("replication_status", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.restore { + d.field("restore", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tag_count { + d.field("tag_count", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + d.finish_non_exhaustive() + } } +pub type GetObjectResponseStatusCode = i32; -#[derive(Clone, PartialEq)] -pub struct PutBucketIntelligentTieringConfigurationInput { -///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectRetentionInput { + ///

    The bucket name containing the object whose retention settings you want to retrieve.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    - pub id: IntelligentTieringId, -///

    Container for S3 Intelligent-Tiering configuration.

    - pub intelligent_tiering_configuration: IntelligentTieringConfiguration, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The key name for the object whose retention settings you want to retrieve.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    The version ID for the object whose retention settings you want to retrieve.

    + pub version_id: Option, } -impl fmt::Debug for PutBucketIntelligentTieringConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationInput"); -d.field("bucket", &self.bucket); -d.field("id", &self.id); -d.field("intelligent_tiering_configuration", &self.intelligent_tiering_configuration); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectRetentionInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectRetentionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketIntelligentTieringConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketIntelligentTieringConfigurationInputBuilder { -default() -} +impl GetObjectRetentionInput { + #[must_use] + pub fn builder() -> builders::GetObjectRetentionInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutBucketIntelligentTieringConfigurationOutput { +pub struct GetObjectRetentionOutput { + ///

    The container element for an object's retention settings.

    + pub retention: Option, } -impl fmt::Debug for PutBucketIntelligentTieringConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectRetentionOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectRetentionOutput"); + if let Some(ref val) = self.retention { + d.field("retention", val); + } + d.finish_non_exhaustive() + } } - -#[derive(Clone, PartialEq)] -pub struct PutBucketInventoryConfigurationInput { -///

    The name of the bucket where the inventory configuration will be stored.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetObjectTaggingInput { + ///

    The bucket name containing the object for which to get the tagging information.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The ID used to identify the inventory configuration.

    - pub id: InventoryId, -///

    Specifies the inventory configuration.

    - pub inventory_configuration: InventoryConfiguration, + ///

    Object key for which to get the tagging information.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    The versionId of the object for which to get the tagging information.

    + pub version_id: Option, } -impl fmt::Debug for PutBucketInventoryConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketInventoryConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.field("inventory_configuration", &self.inventory_configuration); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectTaggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketInventoryConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketInventoryConfigurationInputBuilder { -default() -} +impl GetObjectTaggingInput { + #[must_use] + pub fn builder() -> builders::GetObjectTaggingInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutBucketInventoryConfigurationOutput { +pub struct GetObjectTaggingOutput { + ///

    Contains the tag set.

    + pub tag_set: TagSet, + ///

    The versionId of the object for which you got the tagging information.

    + pub version_id: Option, } -impl fmt::Debug for PutBucketInventoryConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketInventoryConfigurationOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectTaggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectTaggingOutput"); + d.field("tag_set", &self.tag_set); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] -pub struct PutBucketLifecycleConfigurationInput { -///

    The name of the bucket for which to set the configuration.

    +pub struct GetObjectTorrentInput { + ///

    The name of the bucket containing the object for which to get the torrent files.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    Container for lifecycle rules. You can add as many as 1,000 rules.

    - pub lifecycle_configuration: Option, -///

    Indicates which default minimum object size behavior is applied to the lifecycle -/// configuration.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    -///
      -///
    • -///

      -/// all_storage_classes_128K - Objects smaller than 128 KB will not -/// transition to any storage class by default.

      -///
    • -///
    • -///

      -/// varies_by_storage_class - Objects smaller than 128 KB will -/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By -/// default, all other storage classes will prevent transitions smaller than 128 KB. -///

      -///
    • -///
    -///

    To customize the minimum object size for any transition you can add a filter that -/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in -/// the body of your transition rule. Custom filters always take precedence over the default -/// transition behavior.

    - pub transition_default_minimum_object_size: Option, + ///

    The object key for which to get the information.

    + pub key: ObjectKey, + pub request_payer: Option, } -impl fmt::Debug for PutBucketLifecycleConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketLifecycleConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.lifecycle_configuration { -d.field("lifecycle_configuration", val); -} -if let Some(ref val) = self.transition_default_minimum_object_size { -d.field("transition_default_minimum_object_size", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectTorrentInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectTorrentInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketLifecycleConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketLifecycleConfigurationInputBuilder { -default() -} +impl GetObjectTorrentInput { + #[must_use] + pub fn builder() -> builders::GetObjectTorrentInputBuilder { + default() + } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketLifecycleConfigurationOutput { -///

    Indicates which default minimum object size behavior is applied to the lifecycle -/// configuration.

    -/// -///

    This parameter applies to general purpose buckets only. It is not supported for -/// directory bucket lifecycle configurations.

    -///
    -///
      -///
    • -///

      -/// all_storage_classes_128K - Objects smaller than 128 KB will not -/// transition to any storage class by default.

      -///
    • -///
    • -///

      -/// varies_by_storage_class - Objects smaller than 128 KB will -/// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By -/// default, all other storage classes will prevent transitions smaller than 128 KB. -///

      -///
    • -///
    -///

    To customize the minimum object size for any transition you can add a filter that -/// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in -/// the body of your transition rule. Custom filters always take precedence over the default -/// transition behavior.

    - pub transition_default_minimum_object_size: Option, +#[derive(Default)] +pub struct GetObjectTorrentOutput { + ///

    A Bencoded dictionary as defined by the BitTorrent specification

    + pub body: Option, + pub request_charged: Option, } -impl fmt::Debug for PutBucketLifecycleConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketLifecycleConfigurationOutput"); -if let Some(ref val) = self.transition_default_minimum_object_size { -d.field("transition_default_minimum_object_size", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for GetObjectTorrentOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetObjectTorrentOutput"); + if let Some(ref val) = self.body { + d.field("body", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } - -#[derive(Clone, PartialEq)] -pub struct PutBucketLoggingInput { -///

    The name of the bucket for which to set the logging parameters.

    +#[derive(Clone, Default, PartialEq)] +pub struct GetPublicAccessBlockInput { + ///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want + /// to retrieve.

    pub bucket: BucketName, -///

    Container for logging status information.

    - pub bucket_logging_status: BucketLoggingStatus, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash of the PutBucketLogging request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, } -impl fmt::Debug for PutBucketLoggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketLoggingInput"); -d.field("bucket", &self.bucket); -d.field("bucket_logging_status", &self.bucket_logging_status); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for GetPublicAccessBlockInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetPublicAccessBlockInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketLoggingInput { -#[must_use] -pub fn builder() -> builders::PutBucketLoggingInputBuilder { -default() -} +impl GetPublicAccessBlockInput { + #[must_use] + pub fn builder() -> builders::GetPublicAccessBlockInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutBucketLoggingOutput { +pub struct GetPublicAccessBlockOutput { + ///

    The PublicAccessBlock configuration currently in effect for this Amazon S3 + /// bucket.

    + pub public_access_block_configuration: Option, } -impl fmt::Debug for PutBucketLoggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketLoggingOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for GetPublicAccessBlockOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GetPublicAccessBlockOutput"); + if let Some(ref val) = self.public_access_block_configuration { + d.field("public_access_block_configuration", val); + } + d.finish_non_exhaustive() + } } - +///

    Container for S3 Glacier job parameters.

    #[derive(Clone, PartialEq)] -pub struct PutBucketMetricsConfigurationInput { -///

    The name of the bucket for which the metrics configuration is set.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and -/// can only contain letters, numbers, periods, dashes, and underscores.

    - pub id: MetricsId, -///

    Specifies the metrics configuration.

    - pub metrics_configuration: MetricsConfiguration, -} - -impl fmt::Debug for PutBucketMetricsConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketMetricsConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("id", &self.id); -d.field("metrics_configuration", &self.metrics_configuration); -d.finish_non_exhaustive() -} +pub struct GlacierJobParameters { + ///

    Retrieval tier at which the restore will be processed.

    + pub tier: Tier, } -impl PutBucketMetricsConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketMetricsConfigurationInputBuilder { -default() -} +impl fmt::Debug for GlacierJobParameters { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("GlacierJobParameters"); + d.field("tier", &self.tier); + d.finish_non_exhaustive() + } } +///

    Container for grant information.

    #[derive(Clone, Default, PartialEq)] -pub struct PutBucketMetricsConfigurationOutput { +pub struct Grant { + ///

    The person being granted permissions.

    + pub grantee: Option, + ///

    Specifies the permission given to the grantee.

    + pub permission: Option, } -impl fmt::Debug for PutBucketMetricsConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketMetricsConfigurationOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for Grant { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Grant"); + if let Some(ref val) = self.grantee { + d.field("grantee", val); + } + if let Some(ref val) = self.permission { + d.field("permission", val); + } + d.finish_non_exhaustive() + } } +pub type GrantFullControl = String; -#[derive(Clone, PartialEq)] -pub struct PutBucketNotificationConfigurationInput { -///

    The name of the bucket.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub notification_configuration: NotificationConfiguration, -///

    Skips validation of Amazon SQS, Amazon SNS, and Lambda -/// destinations. True or false value.

    - pub skip_destination_validation: Option, -} +pub type GrantRead = String; -impl fmt::Debug for PutBucketNotificationConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketNotificationConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("notification_configuration", &self.notification_configuration); -if let Some(ref val) = self.skip_destination_validation { -d.field("skip_destination_validation", val); -} -d.finish_non_exhaustive() -} -} +pub type GrantReadACP = String; -impl PutBucketNotificationConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutBucketNotificationConfigurationInputBuilder { -default() -} -} +pub type GrantWrite = String; -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketNotificationConfigurationOutput { -} +pub type GrantWriteACP = String; -impl fmt::Debug for PutBucketNotificationConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketNotificationConfigurationOutput"); -d.finish_non_exhaustive() +///

    Container for the person being granted permissions.

    +#[derive(Clone, PartialEq)] +pub struct Grantee { + ///

    Screen name of the grantee.

    + pub display_name: Option, + ///

    Email address of the grantee.

    + /// + ///

    Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

    + ///
      + ///
    • + ///

      US East (N. Virginia)

      + ///
    • + ///
    • + ///

      US West (N. California)

      + ///
    • + ///
    • + ///

      US West (Oregon)

      + ///
    • + ///
    • + ///

      Asia Pacific (Singapore)

      + ///
    • + ///
    • + ///

      Asia Pacific (Sydney)

      + ///
    • + ///
    • + ///

      Asia Pacific (Tokyo)

      + ///
    • + ///
    • + ///

      Europe (Ireland)

      + ///
    • + ///
    • + ///

      South America (São Paulo)

      + ///
    • + ///
    + ///

    For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

    + ///
    + pub email_address: Option, + ///

    The canonical user ID of the grantee.

    + pub id: Option, + ///

    Type of grantee

    + pub type_: Type, + ///

    URI of the grantee group.

    + pub uri: Option, } + +impl fmt::Debug for Grantee { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Grantee"); + if let Some(ref val) = self.display_name { + d.field("display_name", val); + } + if let Some(ref val) = self.email_address { + d.field("email_address", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.field("type_", &self.type_); + if let Some(ref val) = self.uri { + d.field("uri", val); + } + d.finish_non_exhaustive() + } } +pub type Grants = List; -#[derive(Clone, PartialEq)] -pub struct PutBucketOwnershipControlsInput { -///

    The name of the Amazon S3 bucket whose OwnershipControls you want to set.

    +#[derive(Clone, Default, PartialEq)] +pub struct HeadBucketInput { + ///

    The bucket name.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// Object Lambda access points - When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    The MD5 hash of the OwnershipControls request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or -/// ObjectWriter) that you want to apply to this Amazon S3 bucket.

    - pub ownership_controls: OwnershipControls, } -impl fmt::Debug for PutBucketOwnershipControlsInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketOwnershipControlsInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("ownership_controls", &self.ownership_controls); -d.finish_non_exhaustive() -} +impl fmt::Debug for HeadBucketInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("HeadBucketInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketOwnershipControlsInput { -#[must_use] -pub fn builder() -> builders::PutBucketOwnershipControlsInputBuilder { -default() -} +impl HeadBucketInput { + #[must_use] + pub fn builder() -> builders::HeadBucketInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutBucketOwnershipControlsOutput { +pub struct HeadBucketOutput { + ///

    Indicates whether the bucket name used in the request is an access point alias.

    + /// + ///

    For directory buckets, the value of this field is false.

    + ///
    + pub access_point_alias: Option, + ///

    The name of the location where the bucket will be created.

    + ///

    For directory buckets, the Zone ID of the Availability Zone or the Local Zone where the bucket is created. An example Zone ID value for an Availability Zone is usw2-az1.

    + /// + ///

    This functionality is only supported by directory buckets.

    + ///
    + pub bucket_location_name: Option, + ///

    The type of location where the bucket is created.

    + /// + ///

    This functionality is only supported by directory buckets.

    + ///
    + pub bucket_location_type: Option, + ///

    The Region that the bucket is located.

    + pub bucket_region: Option, } -impl fmt::Debug for PutBucketOwnershipControlsOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketOwnershipControlsOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for HeadBucketOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("HeadBucketOutput"); + if let Some(ref val) = self.access_point_alias { + d.field("access_point_alias", val); + } + if let Some(ref val) = self.bucket_location_name { + d.field("bucket_location_name", val); + } + if let Some(ref val) = self.bucket_location_type { + d.field("bucket_location_type", val); + } + if let Some(ref val) = self.bucket_region { + d.field("bucket_region", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] -pub struct PutBucketPolicyInput { -///

    The name of the bucket.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide -///

    +pub struct HeadObjectInput { + ///

    The name of the bucket that contains the object.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm -/// or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    -///

    For the x-amz-checksum-algorithm -/// header, replace -/// algorithm -/// with the supported algorithm from the following list:

    -///
      -///
    • -///

      -/// CRC32 -///

      -///
    • -///
    • -///

      -/// CRC32C -///

      -///
    • -///
    • -///

      -/// CRC64NVME -///

      -///
    • -///
    • -///

      -/// SHA1 -///

      -///
    • -///
    • -///

      -/// SHA256 -///

      -///
    • -///
    -///

    For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If the individual checksum value you provide through x-amz-checksum-algorithm -/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    -/// -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    -///
    - pub checksum_algorithm: Option, -///

    Set this parameter to true to confirm that you want to remove your permissions to change -/// this bucket policy in the future.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub confirm_remove_self_bucket_access: Option, -///

    The MD5 hash of the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    -/// -///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code -/// 501 Not Implemented.

    -///
    + ///

    To retrieve the checksum, this parameter must be enabled.

    + ///

    + /// General purpose buckets - + /// If you enable checksum mode and the object is uploaded with a + /// checksum + /// and encrypted with an Key Management Service (KMS) key, you must have permission to use the + /// kms:Decrypt action to retrieve the checksum.

    + ///

    + /// Directory buckets - If you enable + /// ChecksumMode and the object is encrypted with Amazon Web Services Key Management Service + /// (Amazon Web Services KMS), you must also have the kms:GenerateDataKey and + /// kms:Decrypt permissions in IAM identity-based policies and KMS key + /// policies for the KMS key to retrieve the checksum of the object.

    + pub checksum_mode: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The bucket policy as a JSON document.

    -///

    For directory buckets, the only IAM action supported in the bucket policy is -/// s3express:CreateSession.

    - pub policy: Policy, + ///

    Return the object only if its entity tag (ETag) is the same as the one specified; + /// otherwise, return a 412 (precondition failed) error.

    + ///

    If both of the If-Match and If-Unmodified-Since headers are + /// present in the request as follows:

    + ///
      + ///
    • + ///

      + /// If-Match condition evaluates to true, and;

      + ///
    • + ///
    • + ///

      + /// If-Unmodified-Since condition evaluates to false;

      + ///
    • + ///
    + ///

    Then Amazon S3 returns 200 OK and the data requested.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_match: Option, + ///

    Return the object only if it has been modified since the specified time; otherwise, + /// return a 304 (not modified) error.

    + ///

    If both of the If-None-Match and If-Modified-Since headers are + /// present in the request as follows:

    + ///
      + ///
    • + ///

      + /// If-None-Match condition evaluates to false, and;

      + ///
    • + ///
    • + ///

      + /// If-Modified-Since condition evaluates to true;

      + ///
    • + ///
    + ///

    Then Amazon S3 returns the 304 Not Modified response code.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_modified_since: Option, + ///

    Return the object only if its entity tag (ETag) is different from the one specified; + /// otherwise, return a 304 (not modified) error.

    + ///

    If both of the If-None-Match and If-Modified-Since headers are + /// present in the request as follows:

    + ///
      + ///
    • + ///

      + /// If-None-Match condition evaluates to false, and;

      + ///
    • + ///
    • + ///

      + /// If-Modified-Since condition evaluates to true;

      + ///
    • + ///
    + ///

    Then Amazon S3 returns the 304 Not Modified response code.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_none_match: Option, + ///

    Return the object only if it has not been modified since the specified time; otherwise, + /// return a 412 (precondition failed) error.

    + ///

    If both of the If-Match and If-Unmodified-Since headers are + /// present in the request as follows:

    + ///
      + ///
    • + ///

      + /// If-Match condition evaluates to true, and;

      + ///
    • + ///
    • + ///

      + /// If-Unmodified-Since condition evaluates to false;

      + ///
    • + ///
    + ///

    Then Amazon S3 returns 200 OK and the data requested.

    + ///

    For more information about conditional requests, see RFC 7232.

    + pub if_unmodified_since: Option, + ///

    The object key.

    + pub key: ObjectKey, + ///

    Part number of the object being read. This is a positive integer between 1 and 10,000. + /// Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about + /// the size of the part and the number of parts in this object.

    + pub part_number: Option, + ///

    HeadObject returns only the metadata for an object. If the Range is satisfiable, only + /// the ContentLength is affected in the response. If the Range is not + /// satisfiable, S3 returns a 416 - Requested Range Not Satisfiable error.

    + pub range: Option, + pub request_payer: Option, + ///

    Sets the Cache-Control header of the response.

    + pub response_cache_control: Option, + ///

    Sets the Content-Disposition header of the response.

    + pub response_content_disposition: Option, + ///

    Sets the Content-Encoding header of the response.

    + pub response_content_encoding: Option, + ///

    Sets the Content-Language header of the response.

    + pub response_content_language: Option, + ///

    Sets the Content-Type header of the response.

    + pub response_content_type: Option, + ///

    Sets the Expires header of the response.

    + pub response_expires: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Version ID used to reference a specific version of the object.

    + /// + ///

    For directory buckets in this API operation, only the null value of the version ID is supported.

    + ///
    + pub version_id: Option, } -impl fmt::Debug for PutBucketPolicyInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketPolicyInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.confirm_remove_self_bucket_access { -d.field("confirm_remove_self_bucket_access", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("policy", &self.policy); -d.finish_non_exhaustive() +impl fmt::Debug for HeadObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("HeadObjectInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_mode { + d.field("checksum_mode", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_modified_since { + d.field("if_modified_since", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + if let Some(ref val) = self.if_unmodified_since { + d.field("if_unmodified_since", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + if let Some(ref val) = self.range { + d.field("range", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.response_cache_control { + d.field("response_cache_control", val); + } + if let Some(ref val) = self.response_content_disposition { + d.field("response_content_disposition", val); + } + if let Some(ref val) = self.response_content_encoding { + d.field("response_content_encoding", val); + } + if let Some(ref val) = self.response_content_language { + d.field("response_content_language", val); + } + if let Some(ref val) = self.response_content_type { + d.field("response_content_type", val); + } + if let Some(ref val) = self.response_expires { + d.field("response_expires", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } + +impl HeadObjectInput { + #[must_use] + pub fn builder() -> builders::HeadObjectInputBuilder { + default() + } } -impl PutBucketPolicyInput { -#[must_use] -pub fn builder() -> builders::PutBucketPolicyInputBuilder { -default() +#[derive(Clone, Default, PartialEq)] +pub struct HeadObjectOutput { + ///

    Indicates that a range of bytes was specified.

    + pub accept_ranges: Option, + ///

    The archive state of the head object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub archive_status: Option, + ///

    Indicates whether the object uses an S3 Bucket Key for server-side encryption with + /// Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. For more + /// information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    The checksum type, which determines how part-level checksums are combined to create an + /// object-level checksum for multipart objects. You can use this header response to verify + /// that the checksum type that is received is the same checksum type that was specified in + /// CreateMultipartUpload request. For more + /// information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Specifies presentational information for the object.

    + pub content_disposition: Option, + ///

    Indicates what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    Size of the body in bytes.

    + pub content_length: Option, + ///

    The portion of the object returned in the response for a GET request.

    + pub content_range: Option, + ///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, + ///

    Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If + /// false, this response header does not appear in the response.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub delete_marker: Option, + ///

    An entity tag (ETag) is an opaque identifier assigned by a web server to a specific + /// version of a resource found at a URL.

    + pub e_tag: Option, + ///

    If the object expiration is configured (see + /// PutBucketLifecycleConfiguration + /// ), the response includes this + /// header. It includes the expiry-date and rule-id key-value pairs + /// providing object expiration information. The value of the rule-id is + /// URL-encoded.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    + pub expiration: Option, + ///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, + ///

    Date and time when the object was last modified.

    + pub last_modified: Option, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    This is set to the number of metadata entries not returned in x-amz-meta + /// headers. This can happen if you create metadata using an API like SOAP that supports more + /// flexible metadata than the REST API. For example, using SOAP, you can create metadata whose + /// values are not legal HTTP headers.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub missing_meta: Option, + ///

    Specifies whether a legal hold is in effect for this object. This header is only + /// returned if the requester has the s3:GetObjectLegalHold permission. This + /// header is not returned if the specified version of this object has never had a legal hold + /// applied. For more information about S3 Object Lock, see Object Lock.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_legal_hold_status: Option, + ///

    The Object Lock mode, if any, that's in effect for this object. This header is only + /// returned if the requester has the s3:GetObjectRetention permission. For more + /// information about S3 Object Lock, see Object Lock.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_mode: Option, + ///

    The date and time when the Object Lock retention period expires. This header is only + /// returned if the requester has the s3:GetObjectRetention permission.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_retain_until_date: Option, + ///

    The count of parts this object has. This value is only returned if you specify + /// partNumber in your request and the object was uploaded as a multipart + /// upload.

    + pub parts_count: Option, + ///

    Amazon S3 can return this header if your request involves a bucket that is either a source or + /// a destination in a replication rule.

    + ///

    In replication, you have a source bucket on which you configure replication and + /// destination bucket or buckets where Amazon S3 stores object replicas. When you request an object + /// (GetObject) or object metadata (HeadObject) from these + /// buckets, Amazon S3 will return the x-amz-replication-status header in the response + /// as follows:

    + ///
      + ///
    • + ///

      + /// If requesting an object from the source bucket, + /// Amazon S3 will return the x-amz-replication-status header if the object in + /// your request is eligible for replication.

      + ///

      For example, suppose that in your replication configuration, you specify object + /// prefix TaxDocs requesting Amazon S3 to replicate objects with key prefix + /// TaxDocs. Any objects you upload with this key name prefix, for + /// example TaxDocs/document1.pdf, are eligible for replication. For any + /// object request with this key name prefix, Amazon S3 will return the + /// x-amz-replication-status header with value PENDING, COMPLETED or + /// FAILED indicating object replication status.

      + ///
    • + ///
    • + ///

      + /// If requesting an object from a destination + /// bucket, Amazon S3 will return the x-amz-replication-status header + /// with value REPLICA if the object in your request is a replica that Amazon S3 created and + /// there is no replica modification replication in progress.

      + ///
    • + ///
    • + ///

      + /// When replicating objects to multiple destination + /// buckets, the x-amz-replication-status header acts + /// differently. The header of the source object will only return a value of COMPLETED + /// when replication is successful to all destinations. The header will remain at value + /// PENDING until replication has completed for all destinations. If one or more + /// destinations fails replication the header will return FAILED.

      + ///
    • + ///
    + ///

    For more information, see Replication.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub replication_status: Option, + pub request_charged: Option, + ///

    If the object is an archived object (an object whose storage class is GLACIER), the + /// response includes this header if either the archive restoration is in progress (see RestoreObject or an archive copy is already restored.

    + ///

    If an archive copy is already restored, the header value indicates when Amazon S3 is + /// scheduled to delete the object copy. For example:

    + ///

    + /// x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00 + /// GMT" + ///

    + ///

    If the object restoration is in progress, the header returns the value + /// ongoing-request="true".

    + ///

    For more information about archiving objects, see Transitioning Objects: General Considerations.

    + /// + ///

    This functionality is not supported for directory buckets. + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub restore: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms, aws:kms:dsse).

    + pub server_side_encryption: Option, + ///

    Provides storage class information of the object. Amazon S3 returns this header for all + /// objects except for S3 Standard storage class objects.

    + ///

    For more information, see Storage Classes.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    Version ID of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub website_redirect_location: Option, } + +impl fmt::Debug for HeadObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("HeadObjectOutput"); + if let Some(ref val) = self.accept_ranges { + d.field("accept_ranges", val); + } + if let Some(ref val) = self.archive_status { + d.field("archive_status", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_range { + d.field("content_range", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.missing_meta { + d.field("missing_meta", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.parts_count { + d.field("parts_count", val); + } + if let Some(ref val) = self.replication_status { + d.field("replication_status", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.restore { + d.field("restore", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + d.finish_non_exhaustive() + } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketPolicyOutput { -} +pub type HostName = String; + +pub type HttpErrorCodeReturnedEquals = String; + +pub type HttpRedirectCode = String; -impl fmt::Debug for PutBucketPolicyOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketPolicyOutput"); -d.finish_non_exhaustive() -} -} +pub type ID = String; +pub type IfMatch = ETagCondition; -#[derive(Clone, PartialEq)] -pub struct PutBucketReplicationInput { -///

    The name of the bucket

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, see RFC 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, - pub replication_configuration: ReplicationConfiguration, -///

    A token to allow Object Lock to be enabled for an existing bucket.

    - pub token: Option, -} +pub type IfMatchInitiatedTime = Timestamp; -impl fmt::Debug for PutBucketReplicationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketReplicationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("replication_configuration", &self.replication_configuration); -if let Some(ref val) = self.token { -d.field("token", val); -} -d.finish_non_exhaustive() -} -} +pub type IfMatchLastModifiedTime = Timestamp; -impl PutBucketReplicationInput { -#[must_use] -pub fn builder() -> builders::PutBucketReplicationInputBuilder { -default() -} -} +pub type IfMatchSize = i64; -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketReplicationOutput { -} +pub type IfModifiedSince = Timestamp; -impl fmt::Debug for PutBucketReplicationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketReplicationOutput"); -d.finish_non_exhaustive() -} -} +pub type IfNoneMatch = ETagCondition; +pub type IfUnmodifiedSince = Timestamp; -#[derive(Clone, PartialEq)] -pub struct PutBucketRequestPaymentInput { -///

    The bucket name.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, see RFC 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Container for Payer.

    - pub request_payment_configuration: RequestPaymentConfiguration, +///

    Container for the Suffix element.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IndexDocument { + ///

    A suffix that is appended to a request that is for a directory on the website endpoint. + /// (For example, if the suffix is index.html and you make a request to + /// samplebucket/images/, the data that is returned will be for the object with + /// the key name images/index.html.) The suffix must not be empty and must not + /// include a slash character.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub suffix: Suffix, } -impl fmt::Debug for PutBucketRequestPaymentInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketRequestPaymentInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("request_payment_configuration", &self.request_payment_configuration); -d.finish_non_exhaustive() -} +impl fmt::Debug for IndexDocument { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("IndexDocument"); + d.field("suffix", &self.suffix); + d.finish_non_exhaustive() + } } -impl PutBucketRequestPaymentInput { -#[must_use] -pub fn builder() -> builders::PutBucketRequestPaymentInputBuilder { -default() -} -} +pub type Initiated = Timestamp; +///

    Container element that identifies who initiated the multipart upload.

    #[derive(Clone, Default, PartialEq)] -pub struct PutBucketRequestPaymentOutput { +pub struct Initiator { + ///

    Name of the Principal.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub display_name: Option, + ///

    If the principal is an Amazon Web Services account, it provides the Canonical User ID. If the + /// principal is an IAM User, it provides a user ARN value.

    + /// + ///

    + /// Directory buckets - If the principal is an + /// Amazon Web Services account, it provides the Amazon Web Services account ID. If the principal is an IAM User, it + /// provides a user ARN value.

    + ///
    + pub id: Option, } -impl fmt::Debug for PutBucketRequestPaymentOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketRequestPaymentOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for Initiator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Initiator"); + if let Some(ref val) = self.display_name { + d.field("display_name", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.finish_non_exhaustive() + } } - -#[derive(Clone, PartialEq)] -pub struct PutBucketTaggingInput { -///

    The bucket name.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, see RFC 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Container for the TagSet and Tag elements.

    - pub tagging: Tagging, +///

    Describes the serialization format of the object.

    +#[derive(Clone, Default, PartialEq)] +pub struct InputSerialization { + ///

    Describes the serialization of a CSV-encoded object.

    + pub csv: Option, + ///

    Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default Value: + /// NONE.

    + pub compression_type: Option, + ///

    Specifies JSON as object's input serialization format.

    + pub json: Option, + ///

    Specifies Parquet as object's input serialization format.

    + pub parquet: Option, } -impl fmt::Debug for PutBucketTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("tagging", &self.tagging); -d.finish_non_exhaustive() -} +impl fmt::Debug for InputSerialization { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InputSerialization"); + if let Some(ref val) = self.csv { + d.field("csv", val); + } + if let Some(ref val) = self.compression_type { + d.field("compression_type", val); + } + if let Some(ref val) = self.json { + d.field("json", val); + } + if let Some(ref val) = self.parquet { + d.field("parquet", val); + } + d.finish_non_exhaustive() + } } -impl PutBucketTaggingInput { -#[must_use] -pub fn builder() -> builders::PutBucketTaggingInputBuilder { -default() -} -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct IntelligentTieringAccessTier(Cow<'static, str>); -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketTaggingOutput { -} +impl IntelligentTieringAccessTier { + pub const ARCHIVE_ACCESS: &'static str = "ARCHIVE_ACCESS"; -impl fmt::Debug for PutBucketTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketTaggingOutput"); -d.finish_non_exhaustive() -} -} + pub const DEEP_ARCHIVE_ACCESS: &'static str = "DEEP_ARCHIVE_ACCESS"; + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[derive(Clone, PartialEq)] -pub struct PutBucketVersioningInput { -///

    The bucket name.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a -/// message integrity check to verify that the request body was not corrupted in transit. For -/// more information, see RFC -/// 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The concatenation of the authentication device's serial number, a space, and the value -/// that is displayed on your authentication device.

    - pub mfa: Option, -///

    Container for setting the versioning state.

    - pub versioning_configuration: VersioningConfiguration, + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for PutBucketVersioningInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketVersioningInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.mfa { -d.field("mfa", val); +impl From for IntelligentTieringAccessTier { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.field("versioning_configuration", &self.versioning_configuration); -d.finish_non_exhaustive() + +impl From for Cow<'static, str> { + fn from(s: IntelligentTieringAccessTier) -> Self { + s.0 + } } + +impl FromStr for IntelligentTieringAccessTier { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl PutBucketVersioningInput { -#[must_use] -pub fn builder() -> builders::PutBucketVersioningInputBuilder { -default() +///

    A container for specifying S3 Intelligent-Tiering filters. The filters determine the +/// subset of objects to which the rule applies.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringAndOperator { + ///

    An object key name prefix that identifies the subset of objects to which the + /// configuration applies.

    + pub prefix: Option, + ///

    All of these tags must exist in the object's tag set in order for the configuration to + /// apply.

    + pub tags: Option, } + +impl fmt::Debug for IntelligentTieringAndOperator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("IntelligentTieringAndOperator"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketVersioningOutput { +///

    Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.

    +///

    For information about the S3 Intelligent-Tiering storage class, see Storage class +/// for automatically optimizing frequently and infrequently accessed +/// objects.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringConfiguration { + ///

    Specifies a bucket filter. The configuration only includes objects that meet the + /// filter's criteria.

    + pub filter: Option, + ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, + ///

    Specifies the status of the configuration.

    + pub status: IntelligentTieringStatus, + ///

    Specifies the S3 Intelligent-Tiering storage class tier of the configuration.

    + pub tierings: TieringList, } -impl fmt::Debug for PutBucketVersioningOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketVersioningOutput"); -d.finish_non_exhaustive() +impl fmt::Debug for IntelligentTieringConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("IntelligentTieringConfiguration"); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + d.field("id", &self.id); + d.field("status", &self.status); + d.field("tierings", &self.tierings); + d.finish_non_exhaustive() + } } + +impl Default for IntelligentTieringConfiguration { + fn default() -> Self { + Self { + filter: None, + id: default(), + status: String::new().into(), + tierings: default(), + } + } } +pub type IntelligentTieringConfigurationList = List; -#[derive(Clone, PartialEq)] -pub struct PutBucketWebsiteInput { -///

    The bucket name.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, see RFC 1864.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Container for the request.

    - pub website_configuration: WebsiteConfiguration, -} +pub type IntelligentTieringDays = i32; -impl fmt::Debug for PutBucketWebsiteInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketWebsiteInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("website_configuration", &self.website_configuration); -d.finish_non_exhaustive() -} +///

    The Filter is used to identify objects that the S3 Intelligent-Tiering +/// configuration applies to.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct IntelligentTieringFilter { + ///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. + /// The operator must have at least two predicates, and an object must match all of the + /// predicates in order for the filter to apply.

    + pub and: Option, + ///

    An object key name prefix that identifies the subset of objects to which the rule + /// applies.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + pub tag: Option, } -impl PutBucketWebsiteInput { -#[must_use] -pub fn builder() -> builders::PutBucketWebsiteInputBuilder { -default() -} +impl fmt::Debug for IntelligentTieringFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("IntelligentTieringFilter"); + if let Some(ref val) = self.and { + d.field("and", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tag { + d.field("tag", val); + } + d.finish_non_exhaustive() + } } -#[derive(Clone, Default, PartialEq)] -pub struct PutBucketWebsiteOutput { -} +pub type IntelligentTieringId = String; -impl fmt::Debug for PutBucketWebsiteOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutBucketWebsiteOutput"); -d.finish_non_exhaustive() -} -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct IntelligentTieringStatus(Cow<'static, str>); +impl IntelligentTieringStatus { + pub const DISABLED: &'static str = "Disabled"; -#[derive(Clone, Default, PartialEq)] -pub struct PutObjectAclInput { -///

    The canned ACL to apply to the object. For more information, see Canned -/// ACL.

    - pub acl: Option, -///

    Contains the elements that set the ACL permissions for an object per grantee.

    - pub access_control_policy: Option, -///

    The bucket name that contains the object to which you want to attach the ACL.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message -/// integrity check to verify that the request body was not corrupted in transit. For more -/// information, go to RFC -/// 1864.> -///

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Allows grantee the read, write, read ACP, and write ACP permissions on the -/// bucket.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_full_control: Option, -///

    Allows grantee to list the objects in the bucket.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_read: Option, -///

    Allows grantee to read the bucket ACL.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_read_acp: Option, -///

    Allows grantee to create new objects in the bucket.

    -///

    For the bucket and object owners of existing objects, also allows deletions and -/// overwrites of those objects.

    - pub grant_write: Option, -///

    Allows grantee to write the ACL for the applicable bucket.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    - pub grant_write_acp: Option, -///

    Key for which the PUT action was initiated.

    - pub key: ObjectKey, - pub request_payer: Option, -///

    Version ID used to reference a specific version of the object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, -} + pub const ENABLED: &'static str = "Enabled"; -impl fmt::Debug for PutObjectAclInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectAclInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); -} -if let Some(ref val) = self.access_control_policy { -d.field("access_control_policy", val); -} -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); -} -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); -} -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); -} -if let Some(ref val) = self.grant_write { -d.field("grant_write", val); -} -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } + +impl From for IntelligentTieringStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl PutObjectAclInput { -#[must_use] -pub fn builder() -> builders::PutObjectAclInputBuilder { -default() +impl From for Cow<'static, str> { + fn from(s: IntelligentTieringStatus) -> Self { + s.0 + } } + +impl FromStr for IntelligentTieringStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +///

    Object is archived and inaccessible until restored.

    +///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval storage +/// class, the S3 Glacier Deep Archive storage class, the S3 Intelligent-Tiering Archive Access +/// tier, or the S3 Intelligent-Tiering Deep Archive Access tier, before you can retrieve the object you +/// must first restore a copy using RestoreObject. Otherwise, this +/// operation returns an InvalidObjectState error. For information about restoring +/// archived objects, see Restoring Archived Objects in +/// the Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq)] -pub struct PutObjectAclOutput { - pub request_charged: Option, +pub struct InvalidObjectState { + pub access_tier: Option, + pub storage_class: Option, } -impl fmt::Debug for PutObjectAclOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectAclOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for InvalidObjectState { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InvalidObjectState"); + if let Some(ref val) = self.access_tier { + d.field("access_tier", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } - -#[derive(Default)] -pub struct PutObjectInput { -///

    The canned ACL to apply to the object. For more information, see Canned -/// ACL in the Amazon S3 User Guide.

    -///

    When adding a new object, you can use headers to grant ACL-based permissions to -/// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are -/// then added to the ACL on the object. By default, all objects are private. Only the owner -/// has full access control. For more information, see Access Control List (ACL) Overview -/// and Managing -/// ACLs Using the REST API in the Amazon S3 User Guide.

    -///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting -/// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that -/// use this setting only accept PUT requests that don't specify an ACL or PUT requests that -/// specify bucket owner full control ACLs, such as the bucket-owner-full-control -/// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that -/// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a -/// 400 error with the error code AccessControlListNotSupported. -/// For more information, see Controlling ownership of -/// objects and disabling ACLs in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub acl: Option, -///

    Object data.

    - pub body: Option, -///

    The bucket name to which the PUT action was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with -/// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    -///

    -/// General purpose buckets - Setting this header to -/// true causes Amazon S3 to use an S3 Bucket Key for object encryption with -/// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 -/// Bucket Key.

    -///

    -/// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    - pub bucket_key_enabled: Option, -///

    Can be used to specify caching behavior along the request/reply chain. For more -/// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    - pub cache_control: Option, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm -/// or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    -///

    For the x-amz-checksum-algorithm -/// header, replace -/// algorithm -/// with the supported algorithm from the following list:

    -///
      -///
    • -///

      -/// CRC32 -///

      -///
    • -///
    • -///

      -/// CRC32C -///

      -///
    • -///
    • -///

      -/// CRC64NVME -///

      -///
    • -///
    • -///

      -/// SHA1 -///

      -///
    • -///
    • -///

      -/// SHA256 -///

      -///
    • -///
    -///

    For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If the individual checksum value you provide through x-amz-checksum-algorithm -/// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    -/// -///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is -/// required for any request to upload an object with a retention period configured using -/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the -/// Amazon S3 User Guide.

    -///
    -///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    - pub checksum_algorithm: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the object. The CRC64NVME checksum is -/// always a full object checksum. For more information, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    - pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be -/// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    - pub content_length: Option, -///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to -/// RFC 1864. This header can be used as a message integrity check to verify that the data is -/// the same data that was originally sent. Although it is optional, we recommend using the -/// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST -/// request authentication, see REST Authentication.

    -/// -///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is -/// required for any request to upload an object with a retention period configured using -/// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the -/// Amazon S3 User Guide.

    -///
    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    A standard MIME type describing the format of the contents. For more information, see -/// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    - pub content_type: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The date and time at which the object is no longer cacheable. For more information, see -/// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    - pub expires: Option, -///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_full_control: Option, -///

    Allows grantee to read the object data and its metadata.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_read: Option, -///

    Allows grantee to read the object ACL.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_read_acp: Option, -///

    Allows grantee to write the ACL for the applicable object.

    -/// -///
      -///
    • -///

      This functionality is not supported for directory buckets.

      -///
    • -///
    • -///

      This functionality is not supported for Amazon S3 on Outposts.

      -///
    • -///
    -///
    - pub grant_write_acp: Option, -///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE -/// operation matches the ETag of the object in S3. If the ETag values do not match, the -/// operation returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    -///

    Expects the ETag value as a string.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_match: Option, -///

    Uploads the object only if the object key name does not already exist in the bucket -/// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    -///

    If a conflicting operation occurs during the upload S3 returns a 409 -/// ConditionalRequestConflict response. On a 409 failure you should retry the -/// upload.

    -///

    Expects the '*' (asterisk) character.

    -///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    - pub if_none_match: Option, -///

    Object key for which the PUT action was initiated.

    - pub key: ObjectKey, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    Specifies whether a legal hold will be applied to this object. For more information -/// about S3 Object Lock, see Object Lock in the -/// Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_legal_hold_status: Option, -///

    The Object Lock mode that you want to apply to this object.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_mode: Option, -///

    The date and time when you want this object's Object Lock to expire. Must be formatted -/// as a timestamp parameter.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub object_lock_retain_until_date: Option, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, -/// AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets passed on -/// to Amazon Web Services KMS for future GetObject operations on -/// this object.

    -///

    -/// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    - pub ssekms_encryption_context: Option, -///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same -/// account that's issuing the command, you must use the full Key ARN not the Key ID.

    -///

    -/// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS -/// key to use. If you specify -/// x-amz-server-side-encryption:aws:kms or -/// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key -/// (aws/s3) to protect the data.

    -///

    -/// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the -/// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses -/// the bucket's default KMS customer managed key ID. If you want to explicitly set the -/// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -/// -/// Incorrect key specification results in an HTTP 400 Bad Request error.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 -/// (for example, AES256, aws:kms, aws:kms:dsse).

    +///

    You may receive this error in multiple cases. Depending on the reason for the error, you may receive one of the messages below:

    ///
      ///
    • -///

      -/// General purpose buckets - You have four mutually -/// exclusive options to protect data using server-side encryption in Amazon S3, depending on -/// how you choose to manage the encryption keys. Specifically, the encryption key -/// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and -/// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by -/// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt -/// data at rest by using server-side encryption with other key options. For more -/// information, see Using Server-Side -/// Encryption in the Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. -/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. -/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and -/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. -///

      -/// -///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the -/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. -/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), -/// the encryption request headers must match the default encryption configuration of the directory bucket. -/// -///

      -///
      +///

      Cannot specify both a write offset value and user-defined object metadata for existing objects.

      ///
    • -///
    - pub server_side_encryption: Option, -///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The -/// STANDARD storage class provides high durability and high availability. Depending on -/// performance needs, you can specify a different Storage Class. For more information, see -/// Storage -/// Classes in the Amazon S3 User Guide.

    -/// -///
      ///
    • -///

      For directory buckets, only the S3 Express One Zone storage class is supported to store -/// newly created objects.

      +///

      Checksum Type mismatch occurred, expected checksum Type: sha1, actual checksum Type: crc32c.

      ///
    • ///
    • -///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      +///

      Request body cannot be empty when 'write offset' is specified.

      ///
    • ///
    -///
    - pub storage_class: Option, -///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For -/// example, "Key1=Value1")

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub tagging: Option, - pub version_id: Option, -///

    If the bucket is configured as a website, redirects requests for this object to another -/// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in -/// the object metadata. For information about object metadata, see Object Key and Metadata in the -/// Amazon S3 User Guide.

    -///

    In the following example, the request header sets the redirect to an object -/// (anotherPage.html) in the same bucket:

    -///

    -/// x-amz-website-redirect-location: /anotherPage.html -///

    -///

    In the following example, the request header sets the object redirect to another -/// website:

    -///

    -/// x-amz-website-redirect-location: http://www.example.com/ -///

    -///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and -/// How to -/// Configure Website Page Redirects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub website_redirect_location: Option, +#[derive(Clone, Default, PartialEq)] +pub struct InvalidRequest {} + +impl fmt::Debug for InvalidRequest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InvalidRequest"); + d.finish_non_exhaustive() + } +} + ///

    -/// Specifies the offset for appending data to existing objects in bytes. -/// The offset must be equal to the size of the existing object being appended to. -/// If no object exists, setting this header to 0 will create a new object. +/// The write offset value that you specified does not match the current object size. ///

    -/// -///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    -///
    - pub write_offset_bytes: Option, +#[derive(Clone, Default, PartialEq)] +pub struct InvalidWriteOffset {} + +impl fmt::Debug for InvalidWriteOffset { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InvalidWriteOffset"); + d.finish_non_exhaustive() + } +} + +///

    Specifies the inventory configuration for an Amazon S3 bucket. For more information, see +/// GET Bucket inventory in the Amazon S3 API Reference.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryConfiguration { + ///

    Contains information about where to publish the inventory results.

    + pub destination: InventoryDestination, + ///

    Specifies an inventory filter. The inventory only includes objects that meet the + /// filter's criteria.

    + pub filter: Option, + ///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, + ///

    Object versions to include in the inventory list. If set to All, the list + /// includes all the object versions, which adds the version-related fields + /// VersionId, IsLatest, and DeleteMarker to the + /// list. If set to Current, the list does not contain these version-related + /// fields.

    + pub included_object_versions: InventoryIncludedObjectVersions, + ///

    Specifies whether the inventory is enabled or disabled. If set to True, an + /// inventory list is generated. If set to False, no inventory list is + /// generated.

    + pub is_enabled: IsEnabled, + ///

    Contains the optional fields that are included in the inventory results.

    + pub optional_fields: Option, + ///

    Specifies the schedule for generating inventory results.

    + pub schedule: InventorySchedule, +} + +impl fmt::Debug for InventoryConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryConfiguration"); + d.field("destination", &self.destination); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + d.field("id", &self.id); + d.field("included_object_versions", &self.included_object_versions); + d.field("is_enabled", &self.is_enabled); + if let Some(ref val) = self.optional_fields { + d.field("optional_fields", val); + } + d.field("schedule", &self.schedule); + d.finish_non_exhaustive() + } +} + +impl Default for InventoryConfiguration { + fn default() -> Self { + Self { + destination: default(), + filter: None, + id: default(), + included_object_versions: String::new().into(), + is_enabled: default(), + optional_fields: None, + schedule: default(), + } + } +} + +pub type InventoryConfigurationList = List; + +///

    Specifies the inventory configuration for an Amazon S3 bucket.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryDestination { + ///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) + /// where inventory results are published.

    + pub s3_bucket_destination: InventoryS3BucketDestination, +} + +impl fmt::Debug for InventoryDestination { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryDestination"); + d.field("s3_bucket_destination", &self.s3_bucket_destination); + d.finish_non_exhaustive() + } +} + +impl Default for InventoryDestination { + fn default() -> Self { + Self { + s3_bucket_destination: default(), + } + } } -impl fmt::Debug for PutObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectInput"); -if let Some(ref val) = self.acl { -d.field("acl", val); +///

    Contains the type of server-side encryption used to encrypt the inventory +/// results.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct InventoryEncryption { + ///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    + pub ssekms: Option, + ///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    + pub sses3: Option, +} + +impl fmt::Debug for InventoryEncryption { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryEncryption"); + if let Some(ref val) = self.ssekms { + d.field("ssekms", val); + } + if let Some(ref val) = self.sses3 { + d.field("sses3", val); + } + d.finish_non_exhaustive() + } +} + +///

    Specifies an inventory filter. The inventory only includes objects that meet the +/// filter's criteria.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct InventoryFilter { + ///

    The prefix that an object must have to be included in the inventory results.

    + pub prefix: Prefix, +} + +impl fmt::Debug for InventoryFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryFilter"); + d.field("prefix", &self.prefix); + d.finish_non_exhaustive() + } +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryFormat(Cow<'static, str>); + +impl InventoryFormat { + pub const CSV: &'static str = "CSV"; + + pub const ORC: &'static str = "ORC"; + + pub const PARQUET: &'static str = "Parquet"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } +} + +impl From for InventoryFormat { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } +} + +impl From for Cow<'static, str> { + fn from(s: InventoryFormat) -> Self { + s.0 + } +} + +impl FromStr for InventoryFormat { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryFrequency(Cow<'static, str>); + +impl InventoryFrequency { + pub const DAILY: &'static str = "Daily"; + + pub const WEEKLY: &'static str = "Weekly"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } +} + +impl From for InventoryFrequency { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } +} + +impl From for Cow<'static, str> { + fn from(s: InventoryFrequency) -> Self { + s.0 + } +} + +impl FromStr for InventoryFrequency { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } +} + +pub type InventoryId = String; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryIncludedObjectVersions(Cow<'static, str>); + +impl InventoryIncludedObjectVersions { + pub const ALL: &'static str = "All"; + + pub const CURRENT: &'static str = "Current"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } +} + +impl From for InventoryIncludedObjectVersions { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } +} + +impl From for Cow<'static, str> { + fn from(s: InventoryIncludedObjectVersions) -> Self { + s.0 + } +} + +impl FromStr for InventoryIncludedObjectVersions { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } +} + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct InventoryOptionalField(Cow<'static, str>); + +impl InventoryOptionalField { + pub const BUCKET_KEY_STATUS: &'static str = "BucketKeyStatus"; + + pub const CHECKSUM_ALGORITHM: &'static str = "ChecksumAlgorithm"; + + pub const E_TAG: &'static str = "ETag"; + + pub const ENCRYPTION_STATUS: &'static str = "EncryptionStatus"; + + pub const INTELLIGENT_TIERING_ACCESS_TIER: &'static str = "IntelligentTieringAccessTier"; + + pub const IS_MULTIPART_UPLOADED: &'static str = "IsMultipartUploaded"; + + pub const LAST_MODIFIED_DATE: &'static str = "LastModifiedDate"; + + pub const OBJECT_ACCESS_CONTROL_LIST: &'static str = "ObjectAccessControlList"; + + pub const OBJECT_LOCK_LEGAL_HOLD_STATUS: &'static str = "ObjectLockLegalHoldStatus"; + + pub const OBJECT_LOCK_MODE: &'static str = "ObjectLockMode"; + + pub const OBJECT_LOCK_RETAIN_UNTIL_DATE: &'static str = "ObjectLockRetainUntilDate"; + + pub const OBJECT_OWNER: &'static str = "ObjectOwner"; + + pub const REPLICATION_STATUS: &'static str = "ReplicationStatus"; + + pub const SIZE: &'static str = "Size"; + + pub const STORAGE_CLASS: &'static str = "StorageClass"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } +} + +impl From for InventoryOptionalField { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.body { -d.field("body", val); + +impl From for Cow<'static, str> { + fn from(s: InventoryOptionalField) -> Self { + s.0 + } } -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); + +impl FromStr for InventoryOptionalField { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); + +pub type InventoryOptionalFields = List; + +///

    Contains the bucket name, file format, bucket owner (optional), and prefix (optional) +/// where inventory results are published.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventoryS3BucketDestination { + ///

    The account ID that owns the destination S3 bucket. If no account ID is provided, the + /// owner is not validated before exporting data.

    + /// + ///

    Although this value is optional, we strongly recommend that you set it to help + /// prevent problems if the destination bucket ownership changes.

    + ///
    + pub account_id: Option, + ///

    The Amazon Resource Name (ARN) of the bucket where inventory results will be + /// published.

    + pub bucket: BucketName, + ///

    Contains the type of server-side encryption used to encrypt the inventory + /// results.

    + pub encryption: Option, + ///

    Specifies the output format of the inventory results.

    + pub format: InventoryFormat, + ///

    The prefix that is prepended to all inventory results.

    + pub prefix: Option, } -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); + +impl fmt::Debug for InventoryS3BucketDestination { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventoryS3BucketDestination"); + if let Some(ref val) = self.account_id { + d.field("account_id", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.encryption { + d.field("encryption", val); + } + d.field("format", &self.format); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); + +impl Default for InventoryS3BucketDestination { + fn default() -> Self { + Self { + account_id: None, + bucket: default(), + encryption: None, + format: String::new().into(), + prefix: None, + } + } } -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); + +///

    Specifies the schedule for generating inventory results.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct InventorySchedule { + ///

    Specifies how frequently inventory results are produced.

    + pub frequency: InventoryFrequency, } -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); + +impl fmt::Debug for InventorySchedule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("InventorySchedule"); + d.field("frequency", &self.frequency); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); + +impl Default for InventorySchedule { + fn default() -> Self { + Self { + frequency: String::new().into(), + } + } } -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); + +pub type IsEnabled = bool; + +pub type IsLatest = bool; + +pub type IsPublic = bool; + +pub type IsRestoreInProgress = bool; + +pub type IsTruncated = bool; + +///

    Specifies JSON as object's input serialization format.

    +#[derive(Clone, Default, PartialEq)] +pub struct JSONInput { + ///

    The type of JSON. Valid values: Document, Lines.

    + pub type_: Option, } -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); + +impl fmt::Debug for JSONInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("JSONInput"); + if let Some(ref val) = self.type_ { + d.field("type_", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); + +///

    Specifies JSON as request's output serialization format.

    +#[derive(Clone, Default, PartialEq)] +pub struct JSONOutput { + ///

    The value used to separate individual records in the output. If no value is specified, + /// Amazon S3 uses a newline character ('\n').

    + pub record_delimiter: Option, } -if let Some(ref val) = self.content_language { -d.field("content_language", val); + +impl fmt::Debug for JSONOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("JSONOutput"); + if let Some(ref val) = self.record_delimiter { + d.field("record_delimiter", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.content_length { -d.field("content_length", val); + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct JSONType(Cow<'static, str>); + +impl JSONType { + pub const DOCUMENT: &'static str = "DOCUMENT"; + + pub const LINES: &'static str = "LINES"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); + +impl From for JSONType { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.content_type { -d.field("content_type", val); + +impl From for Cow<'static, str> { + fn from(s: JSONType) -> Self { + s.0 + } } -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); + +impl FromStr for JSONType { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.expires { -d.field("expires", val); + +pub type KMSContext = String; + +pub type KeyCount = i32; + +pub type KeyMarker = String; + +pub type KeyPrefixEquals = String; + +pub type LambdaFunctionArn = String; + +///

    A container for specifying the configuration for Lambda notifications.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LambdaFunctionConfiguration { + ///

    The Amazon S3 bucket event for which to invoke the Lambda function. For more information, + /// see Supported + /// Event Types in the Amazon S3 User Guide.

    + pub events: EventList, + pub filter: Option, + pub id: Option, + ///

    The Amazon Resource Name (ARN) of the Lambda function that Amazon S3 invokes when the + /// specified event type occurs.

    + pub lambda_function_arn: LambdaFunctionArn, } -if let Some(ref val) = self.grant_full_control { -d.field("grant_full_control", val); + +impl fmt::Debug for LambdaFunctionConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LambdaFunctionConfiguration"); + d.field("events", &self.events); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.field("lambda_function_arn", &self.lambda_function_arn); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.grant_read { -d.field("grant_read", val); + +pub type LambdaFunctionConfigurationList = List; + +pub type LastModified = Timestamp; + +pub type LastModifiedTime = Timestamp; + +///

    Container for the expiration for the lifecycle of the object.

    +///

    For more information see, Managing your storage +/// lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleExpiration { + ///

    Indicates at what date the object is to be moved or deleted. The date value must conform + /// to the ISO 8601 format. The time is always midnight UTC.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub date: Option, + ///

    Indicates the lifetime, in days, of the objects that are subject to the rule. The value + /// must be a non-zero positive integer.

    + pub days: Option, + pub expired_object_all_versions: Option, + ///

    Indicates whether Amazon S3 will remove a delete marker with no noncurrent versions. If set + /// to true, the delete marker will be expired; if set to false the policy takes no action. + /// This cannot be specified with Days or Date in a Lifecycle Expiration Policy.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub expired_object_delete_marker: Option, } -if let Some(ref val) = self.grant_read_acp { -d.field("grant_read_acp", val); + +impl fmt::Debug for LifecycleExpiration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LifecycleExpiration"); + if let Some(ref val) = self.date { + d.field("date", val); + } + if let Some(ref val) = self.days { + d.field("days", val); + } + if let Some(ref val) = self.expired_object_all_versions { + d.field("expired_object_all_versions", val); + } + if let Some(ref val) = self.expired_object_delete_marker { + d.field("expired_object_delete_marker", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.grant_write_acp { -d.field("grant_write_acp", val); + +///

    A lifecycle rule for individual objects in an Amazon S3 bucket.

    +///

    For more information see, Managing your storage +/// lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRule { + pub abort_incomplete_multipart_upload: Option, + pub del_marker_expiration: Option, + ///

    Specifies the expiration for the lifecycle of the object in the form of date, days and, + /// whether the object has a delete marker.

    + pub expiration: Option, + ///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A + /// Filter must have exactly one of Prefix, Tag, or + /// And specified. Filter is required if the + /// LifecycleRule does not contain a Prefix element.

    + /// + ///

    + /// Tag filters are not supported for directory buckets.

    + ///
    + pub filter: Option, + ///

    Unique identifier for the rule. The value cannot be longer than 255 characters.

    + pub id: Option, + pub noncurrent_version_expiration: Option, + ///

    Specifies the transition rule for the lifecycle rule that describes when noncurrent + /// objects transition to a specific storage class. If your bucket is versioning-enabled (or + /// versioning is suspended), you can set this action to request that Amazon S3 transition + /// noncurrent object versions to a specific storage class at a set period in the object's + /// lifetime.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub noncurrent_version_transitions: Option, + ///

    Prefix identifying one or more objects to which the rule applies. This is + /// no longer used; use Filter instead.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + ///

    If 'Enabled', the rule is currently being applied. If 'Disabled', the rule is not + /// currently being applied.

    + pub status: ExpirationStatus, + ///

    Specifies when an Amazon S3 object transitions to a specified storage class.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub transitions: Option, } -if let Some(ref val) = self.if_match { -d.field("if_match", val); + +impl fmt::Debug for LifecycleRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LifecycleRule"); + if let Some(ref val) = self.abort_incomplete_multipart_upload { + d.field("abort_incomplete_multipart_upload", val); + } + if let Some(ref val) = self.del_marker_expiration { + d.field("del_marker_expiration", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + if let Some(ref val) = self.noncurrent_version_expiration { + d.field("noncurrent_version_expiration", val); + } + if let Some(ref val) = self.noncurrent_version_transitions { + d.field("noncurrent_version_transitions", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.field("status", &self.status); + if let Some(ref val) = self.transitions { + d.field("transitions", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.if_none_match { -d.field("if_none_match", val); + +///

    This is used in a Lifecycle Rule Filter to apply a logical AND to two or more +/// predicates. The Lifecycle Rule will apply to any object matching all of the predicates +/// configured inside the And operator.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct LifecycleRuleAndOperator { + ///

    Minimum object size to which the rule applies.

    + pub object_size_greater_than: Option, + ///

    Maximum object size to which the rule applies.

    + pub object_size_less_than: Option, + ///

    Prefix identifying one or more objects to which the rule applies.

    + pub prefix: Option, + ///

    All of these tags must exist in the object's tag set in order for the rule to + /// apply.

    + pub tags: Option, } -d.field("key", &self.key); -if let Some(ref val) = self.metadata { -d.field("metadata", val); + +impl fmt::Debug for LifecycleRuleAndOperator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LifecycleRuleAndOperator"); + if let Some(ref val) = self.object_size_greater_than { + d.field("object_size_greater_than", val); + } + if let Some(ref val) = self.object_size_less_than { + d.field("object_size_less_than", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); + +///

    The Filter is used to identify objects that a Lifecycle Rule applies to. A +/// Filter can have exactly one of Prefix, Tag, +/// ObjectSizeGreaterThan, ObjectSizeLessThan, or And +/// specified. If the Filter element is left empty, the Lifecycle Rule applies to +/// all objects in the bucket.

    +#[derive(Default, Serialize, Deserialize)] +pub struct LifecycleRuleFilter { + pub and: Option, + pub cached_tags: CachedTags, + ///

    Minimum object size to which the rule applies.

    + pub object_size_greater_than: Option, + ///

    Maximum object size to which the rule applies.

    + pub object_size_less_than: Option, + ///

    Prefix identifying one or more objects to which the rule applies.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + ///

    This tag must exist in the object's tag set in order for the rule to apply.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub tag: Option, } -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); + +impl fmt::Debug for LifecycleRuleFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LifecycleRuleFilter"); + if let Some(ref val) = self.and { + d.field("and", val); + } + d.field("cached_tags", &self.cached_tags); + if let Some(ref val) = self.object_size_greater_than { + d.field("object_size_greater_than", val); + } + if let Some(ref val) = self.object_size_less_than { + d.field("object_size_less_than", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tag { + d.field("tag", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); + +#[allow(clippy::clone_on_copy)] +impl Clone for LifecycleRuleFilter { + fn clone(&self) -> Self { + Self { + and: self.and.clone(), + cached_tags: default(), + object_size_greater_than: self.object_size_greater_than.clone(), + object_size_less_than: self.object_size_less_than.clone(), + prefix: self.prefix.clone(), + tag: self.tag.clone(), + } + } } -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); +impl PartialEq for LifecycleRuleFilter { + fn eq(&self, other: &Self) -> bool { + if self.and != other.and { + return false; + } + if self.object_size_greater_than != other.object_size_greater_than { + return false; + } + if self.object_size_less_than != other.object_size_less_than { + return false; + } + if self.prefix != other.prefix { + return false; + } + if self.tag != other.tag { + return false; + } + true + } } -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); + +pub type LifecycleRules = List; + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketAnalyticsConfigurationsInput { + ///

    The name of the bucket from which analytics configurations are retrieved.

    + pub bucket: BucketName, + ///

    The ContinuationToken that represents a placeholder from where this request + /// should begin.

    + pub continuation_token: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); + +impl fmt::Debug for ListBucketAnalyticsConfigurationsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); + +impl ListBucketAnalyticsConfigurationsInput { + #[must_use] + pub fn builder() -> builders::ListBucketAnalyticsConfigurationsInputBuilder { + default() + } } -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketAnalyticsConfigurationsOutput { + ///

    The list of analytics configurations for a bucket.

    + pub analytics_configuration_list: Option, + ///

    The marker that is used as a starting point for this analytics configuration list + /// response. This value is present if it was sent in the request.

    + pub continuation_token: Option, + ///

    Indicates whether the returned list of analytics configurations is complete. A value of + /// true indicates that the list is not complete and the NextContinuationToken will be provided + /// for a subsequent request.

    + pub is_truncated: Option, + ///

    + /// NextContinuationToken is sent when isTruncated is true, which + /// indicates that there are more analytics configurations to list. The next request must + /// include this NextContinuationToken. The token is obfuscated and is not a + /// usable value.

    + pub next_continuation_token: Option, } -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); + +impl fmt::Debug for ListBucketAnalyticsConfigurationsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketAnalyticsConfigurationsOutput"); + if let Some(ref val) = self.analytics_configuration_list { + d.field("analytics_configuration_list", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketIntelligentTieringConfigurationsInput { + ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, + ///

    The ContinuationToken that represents a placeholder from where this request + /// should begin.

    + pub continuation_token: Option, } -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); + +impl fmt::Debug for ListBucketIntelligentTieringConfigurationsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.tagging { -d.field("tagging", val); + +impl ListBucketIntelligentTieringConfigurationsInput { + #[must_use] + pub fn builder() -> builders::ListBucketIntelligentTieringConfigurationsInputBuilder { + default() + } } -if let Some(ref val) = self.version_id { -d.field("version_id", val); + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketIntelligentTieringConfigurationsOutput { + ///

    The ContinuationToken that represents a placeholder from where this request + /// should begin.

    + pub continuation_token: Option, + ///

    The list of S3 Intelligent-Tiering configurations for a bucket.

    + pub intelligent_tiering_configuration_list: Option, + ///

    Indicates whether the returned list of analytics configurations is complete. A value of + /// true indicates that the list is not complete and the + /// NextContinuationToken will be provided for a subsequent request.

    + pub is_truncated: Option, + ///

    The marker used to continue this inventory configuration listing. Use the + /// NextContinuationToken from this response to continue the listing in a + /// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    + pub next_continuation_token: Option, } -if let Some(ref val) = self.website_redirect_location { -d.field("website_redirect_location", val); + +impl fmt::Debug for ListBucketIntelligentTieringConfigurationsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketIntelligentTieringConfigurationsOutput"); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.intelligent_tiering_configuration_list { + d.field("intelligent_tiering_configuration_list", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.write_offset_bytes { -d.field("write_offset_bytes", val); + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketInventoryConfigurationsInput { + ///

    The name of the bucket containing the inventory configurations to retrieve.

    + pub bucket: BucketName, + ///

    The marker used to continue an inventory configuration listing that has been truncated. + /// Use the NextContinuationToken from a previously truncated list response to + /// continue the listing. The continuation token is an opaque value that Amazon S3 + /// understands.

    + pub continuation_token: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -d.finish_non_exhaustive() + +impl fmt::Debug for ListBucketInventoryConfigurationsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketInventoryConfigurationsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } + +impl ListBucketInventoryConfigurationsInput { + #[must_use] + pub fn builder() -> builders::ListBucketInventoryConfigurationsInputBuilder { + default() + } } -impl PutObjectInput { -#[must_use] -pub fn builder() -> builders::PutObjectInputBuilder { -default() +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketInventoryConfigurationsOutput { + ///

    If sent in the request, the marker that is used as a starting point for this inventory + /// configuration list response.

    + pub continuation_token: Option, + ///

    The list of inventory configurations for a bucket.

    + pub inventory_configuration_list: Option, + ///

    Tells whether the returned list of inventory configurations is complete. A value of true + /// indicates that the list is not complete and the NextContinuationToken is provided for a + /// subsequent request.

    + pub is_truncated: Option, + ///

    The marker used to continue this inventory configuration listing. Use the + /// NextContinuationToken from this response to continue the listing in a + /// subsequent request. The continuation token is an opaque value that Amazon S3 understands.

    + pub next_continuation_token: Option, } + +impl fmt::Debug for ListBucketInventoryConfigurationsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketInventoryConfigurationsOutput"); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.inventory_configuration_list { + d.field("inventory_configuration_list", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + d.finish_non_exhaustive() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutObjectLegalHoldInput { -///

    The bucket name containing the object that you want to place a legal hold on.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +pub struct ListBucketMetricsConfigurationsInput { + ///

    The name of the bucket containing the metrics configurations to retrieve.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash for the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The marker that is used to continue a metrics configuration listing that has been + /// truncated. Use the NextContinuationToken from a previously truncated list + /// response to continue the listing. The continuation token is an opaque value that Amazon S3 + /// understands.

    + pub continuation_token: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The key name for the object that you want to place a legal hold on.

    - pub key: ObjectKey, -///

    Container element for the legal hold configuration you want to apply to the specified -/// object.

    - pub legal_hold: Option, - pub request_payer: Option, -///

    The version ID of the object that you want to place a legal hold on.

    - pub version_id: Option, } -impl fmt::Debug for PutObjectLegalHoldInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectLegalHoldInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); +impl fmt::Debug for ListBucketMetricsConfigurationsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketMetricsConfigurationsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); + +impl ListBucketMetricsConfigurationsInput { + #[must_use] + pub fn builder() -> builders::ListBucketMetricsConfigurationsInputBuilder { + default() + } } -d.field("key", &self.key); -if let Some(ref val) = self.legal_hold { -d.field("legal_hold", val); + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketMetricsConfigurationsOutput { + ///

    The marker that is used as a starting point for this metrics configuration list + /// response. This value is present if it was sent in the request.

    + pub continuation_token: Option, + ///

    Indicates whether the returned list of metrics configurations is complete. A value of + /// true indicates that the list is not complete and the NextContinuationToken will be provided + /// for a subsequent request.

    + pub is_truncated: Option, + ///

    The list of metrics configurations for a bucket.

    + pub metrics_configuration_list: Option, + ///

    The marker used to continue a metrics configuration listing that has been truncated. Use + /// the NextContinuationToken from a previously truncated list response to + /// continue the listing. The continuation token is an opaque value that Amazon S3 + /// understands.

    + pub next_continuation_token: Option, } -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); + +impl fmt::Debug for ListBucketMetricsConfigurationsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketMetricsConfigurationsOutput"); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.metrics_configuration_list { + d.field("metrics_configuration_list", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.version_id { -d.field("version_id", val); + +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketsInput { + ///

    Limits the response to buckets that are located in the specified Amazon Web Services Region. The Amazon Web Services + /// Region must be expressed according to the Amazon Web Services Region code, such as us-west-2 + /// for the US West (Oregon) Region. For a list of the valid values for all of the Amazon Web Services + /// Regions, see Regions and Endpoints.

    + /// + ///

    Requests made to a Regional endpoint that is different from the + /// bucket-region parameter are not supported. For example, if you want to + /// limit the response to your buckets in Region us-west-2, the request must be + /// made to an endpoint in Region us-west-2.

    + ///
    + pub bucket_region: Option, + ///

    + /// ContinuationToken indicates to Amazon S3 that the list is being continued on + /// this bucket with a token. ContinuationToken is obfuscated and is not a real + /// key. You can use this ContinuationToken for pagination of the list results.

    + ///

    Length Constraints: Minimum length of 0. Maximum length of 1024.

    + ///

    Required: No.

    + /// + ///

    If you specify the bucket-region, prefix, or continuation-token + /// query parameters without using max-buckets to set the maximum number of buckets returned in the response, + /// Amazon S3 applies a default page size of 10,000 and provides a continuation token if there are more buckets.

    + ///
    + pub continuation_token: Option, + ///

    Maximum number of buckets to be returned in response. When the number is more than the + /// count of buckets that are owned by an Amazon Web Services account, return all the buckets in + /// response.

    + pub max_buckets: Option, + ///

    Limits the response to bucket names that begin with the specified bucket name + /// prefix.

    + pub prefix: Option, } -d.finish_non_exhaustive() + +impl fmt::Debug for ListBucketsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketsInput"); + if let Some(ref val) = self.bucket_region { + d.field("bucket_region", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.max_buckets { + d.field("max_buckets", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } + +impl ListBucketsInput { + #[must_use] + pub fn builder() -> builders::ListBucketsInputBuilder { + default() + } } -impl PutObjectLegalHoldInput { -#[must_use] -pub fn builder() -> builders::PutObjectLegalHoldInputBuilder { -default() +#[derive(Clone, Default, PartialEq)] +pub struct ListBucketsOutput { + ///

    The list of buckets owned by the requester.

    + pub buckets: Option, + ///

    + /// ContinuationToken is included in the response when there are more buckets + /// that can be listed with pagination. The next ListBuckets request to Amazon S3 can + /// be continued with this ContinuationToken. ContinuationToken is + /// obfuscated and is not a real bucket.

    + pub continuation_token: Option, + ///

    The owner of the buckets listed.

    + pub owner: Option, + ///

    If Prefix was sent with the request, it is included in the response.

    + ///

    All bucket names in the response begin with the specified bucket name prefix.

    + pub prefix: Option, } + +impl fmt::Debug for ListBucketsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListBucketsOutput"); + if let Some(ref val) = self.buckets { + d.field("buckets", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + d.finish_non_exhaustive() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutObjectLegalHoldOutput { - pub request_charged: Option, +pub struct ListDirectoryBucketsInput { + ///

    + /// ContinuationToken indicates to Amazon S3 that the list is being continued on + /// buckets in this account with a token. ContinuationToken is obfuscated and is + /// not a real bucket name. You can use this ContinuationToken for the pagination + /// of the list results.

    + pub continuation_token: Option, + ///

    Maximum number of buckets to be returned in response. When the number is more than the + /// count of buckets that are owned by an Amazon Web Services account, return all the buckets in + /// response.

    + pub max_directory_buckets: Option, } -impl fmt::Debug for PutObjectLegalHoldOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectLegalHoldOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); +impl fmt::Debug for ListDirectoryBucketsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListDirectoryBucketsInput"); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.max_directory_buckets { + d.field("max_directory_buckets", val); + } + d.finish_non_exhaustive() + } } -d.finish_non_exhaustive() + +impl ListDirectoryBucketsInput { + #[must_use] + pub fn builder() -> builders::ListDirectoryBucketsInputBuilder { + default() + } } + +#[derive(Clone, Default, PartialEq)] +pub struct ListDirectoryBucketsOutput { + ///

    The list of buckets owned by the requester.

    + pub buckets: Option, + ///

    If ContinuationToken was sent with the request, it is included in the + /// response. You can use the returned ContinuationToken for pagination of the + /// list response.

    + pub continuation_token: Option, } +impl fmt::Debug for ListDirectoryBucketsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListDirectoryBucketsOutput"); + if let Some(ref val) = self.buckets { + d.field("buckets", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + d.finish_non_exhaustive() + } +} #[derive(Clone, Default, PartialEq)] -pub struct PutObjectLockConfigurationInput { -///

    The bucket whose Object Lock configuration you want to create or replace.

    +pub struct ListMultipartUploadsInput { + ///

    The name of the bucket to which the multipart upload was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash for the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    Character you use to group keys.

    + ///

    All keys that contain the same string between the prefix, if specified, and the first + /// occurrence of the delimiter after the prefix are grouped under a single result element, + /// CommonPrefixes. If you don't specify the prefix parameter, then the + /// substring starts at the beginning of the key. The keys that are grouped under + /// CommonPrefixes result element are not returned elsewhere in the + /// response.

    + /// + ///

    + /// Directory buckets - For directory buckets, / is the only supported delimiter.

    + ///
    + pub delimiter: Option, + pub encoding_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The Object Lock configuration that you want to apply to the specified bucket.

    - pub object_lock_configuration: Option, + ///

    Specifies the multipart upload after which listing should begin.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - For + /// general purpose buckets, key-marker is an object key. Together with + /// upload-id-marker, this parameter specifies the multipart upload + /// after which listing should begin.

      + ///

      If upload-id-marker is not specified, only the keys + /// lexicographically greater than the specified key-marker will be + /// included in the list.

      + ///

      If upload-id-marker is specified, any multipart uploads for a key + /// equal to the key-marker might also be included, provided those + /// multipart uploads have upload IDs lexicographically greater than the specified + /// upload-id-marker.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - For + /// directory buckets, key-marker is obfuscated and isn't a real object + /// key. The upload-id-marker parameter isn't supported by + /// directory buckets. To list the additional multipart uploads, you only need to set + /// the value of key-marker to the NextKeyMarker value from + /// the previous response.

      + ///

      In the ListMultipartUploads response, the multipart uploads aren't + /// sorted lexicographically based on the object keys. + /// + ///

      + ///
    • + ///
    + ///
    + pub key_marker: Option, + ///

    Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response + /// body. 1,000 is the maximum number of uploads that can be returned in a response.

    + pub max_uploads: Option, + ///

    Lists in-progress uploads only for those keys that begin with the specified prefix. You + /// can use prefixes to separate a bucket into different grouping of keys. (You can think of + /// using prefix to make groups in the same way that you'd use a folder in a file + /// system.)

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub prefix: Option, pub request_payer: Option, -///

    A token to allow Object Lock to be enabled for an existing bucket.

    - pub token: Option, + ///

    Together with key-marker, specifies the multipart upload after which listing should + /// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. + /// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the + /// list only if they have an upload ID lexicographically greater than the specified + /// upload-id-marker.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub upload_id_marker: Option, } -impl fmt::Debug for PutObjectLockConfigurationInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectLockConfigurationInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.object_lock_configuration { -d.field("object_lock_configuration", val); -} -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.token { -d.field("token", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ListMultipartUploadsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListMultipartUploadsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.key_marker { + d.field("key_marker", val); + } + if let Some(ref val) = self.max_uploads { + d.field("max_uploads", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.upload_id_marker { + d.field("upload_id_marker", val); + } + d.finish_non_exhaustive() + } } -impl PutObjectLockConfigurationInput { -#[must_use] -pub fn builder() -> builders::PutObjectLockConfigurationInputBuilder { -default() -} +impl ListMultipartUploadsInput { + #[must_use] + pub fn builder() -> builders::ListMultipartUploadsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutObjectLockConfigurationOutput { +pub struct ListMultipartUploadsOutput { + ///

    The name of the bucket to which the multipart upload was initiated. Does not return the + /// access point ARN or access point alias if used.

    + pub bucket: Option, + ///

    If you specify a delimiter in the request, then the result returns each distinct key + /// prefix containing the delimiter in a CommonPrefixes element. The distinct key + /// prefixes are returned in the Prefix child element.

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub common_prefixes: Option, + ///

    Contains the delimiter you specified in the request. If you don't specify a delimiter in + /// your request, this element is absent from the response.

    + /// + ///

    + /// Directory buckets - For directory buckets, / is the only supported delimiter.

    + ///
    + pub delimiter: Option, + ///

    Encoding type used by Amazon S3 to encode object keys in the response.

    + ///

    If you specify the encoding-type request parameter, Amazon S3 includes this + /// element in the response, and returns encoded key name values in the following response + /// elements:

    + ///

    + /// Delimiter, KeyMarker, Prefix, + /// NextKeyMarker, Key.

    + pub encoding_type: Option, + ///

    Indicates whether the returned list of multipart uploads is truncated. A value of true + /// indicates that the list was truncated. The list can be truncated if the number of multipart + /// uploads exceeds the limit allowed or specified by max uploads.

    + pub is_truncated: Option, + ///

    The key at or after which the listing began.

    + pub key_marker: Option, + ///

    Maximum number of multipart uploads that could have been included in the + /// response.

    + pub max_uploads: Option, + ///

    When a list is truncated, this element specifies the value that should be used for the + /// key-marker request parameter in a subsequent request.

    + pub next_key_marker: Option, + ///

    When a list is truncated, this element specifies the value that should be used for the + /// upload-id-marker request parameter in a subsequent request.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub next_upload_id_marker: Option, + ///

    When a prefix is provided in the request, this field contains the specified prefix. The + /// result contains only keys starting with the specified prefix.

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub prefix: Option, pub request_charged: Option, + ///

    Together with key-marker, specifies the multipart upload after which listing should + /// begin. If key-marker is not specified, the upload-id-marker parameter is ignored. + /// Otherwise, any multipart uploads for a key equal to the key-marker might be included in the + /// list only if they have an upload ID lexicographically greater than the specified + /// upload-id-marker.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub upload_id_marker: Option, + ///

    Container for elements related to a particular multipart upload. A response can contain + /// zero or more Upload elements.

    + pub uploads: Option, } -impl fmt::Debug for PutObjectLockConfigurationOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectLockConfigurationOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); +impl fmt::Debug for ListMultipartUploadsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListMultipartUploadsOutput"); + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.common_prefixes { + d.field("common_prefixes", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.key_marker { + d.field("key_marker", val); + } + if let Some(ref val) = self.max_uploads { + d.field("max_uploads", val); + } + if let Some(ref val) = self.next_key_marker { + d.field("next_key_marker", val); + } + if let Some(ref val) = self.next_upload_id_marker { + d.field("next_upload_id_marker", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.upload_id_marker { + d.field("upload_id_marker", val); + } + if let Some(ref val) = self.uploads { + d.field("uploads", val); + } + d.finish_non_exhaustive() + } } -d.finish_non_exhaustive() + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectVersionsInput { + ///

    The bucket name that contains the objects.

    + pub bucket: BucketName, + ///

    A delimiter is a character that you specify to group keys. All keys that contain the + /// same string between the prefix and the first occurrence of the delimiter are + /// grouped under a single result element in CommonPrefixes. These groups are + /// counted as one result against the max-keys limitation. These keys are not + /// returned elsewhere in the response.

    + pub delimiter: Option, + pub encoding_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Specifies the key to start with when listing objects in a bucket.

    + pub key_marker: Option, + ///

    Sets the maximum number of keys returned in the response. By default, the action returns + /// up to 1,000 key names. The response might contain fewer keys but will never contain more. + /// If additional keys satisfy the search criteria, but were not returned because + /// max-keys was exceeded, the response contains + /// true. To return the additional keys, + /// see key-marker and version-id-marker.

    + pub max_keys: Option, + ///

    Specifies the optional fields that you want returned in the response. Fields that you do + /// not specify are not returned.

    + pub optional_object_attributes: Option, + ///

    Use this parameter to select only those keys that begin with the specified prefix. You + /// can use prefixes to separate a bucket into different groupings of keys. (You can think of + /// using prefix to make groups in the same way that you'd use a folder in a file + /// system.) You can use prefix with delimiter to roll up numerous + /// objects into a single result under CommonPrefixes.

    + pub prefix: Option, + pub request_payer: Option, + ///

    Specifies the object version you want to start listing from.

    + pub version_id_marker: Option, } + +impl fmt::Debug for ListObjectVersionsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectVersionsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.key_marker { + d.field("key_marker", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.optional_object_attributes { + d.field("optional_object_attributes", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id_marker { + d.field("version_id_marker", val); + } + d.finish_non_exhaustive() + } } +impl ListObjectVersionsInput { + #[must_use] + pub fn builder() -> builders::ListObjectVersionsInputBuilder { + default() + } +} #[derive(Clone, Default, PartialEq)] -pub struct PutObjectOutput { -///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header -/// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it -/// was uploaded without a checksum (and Amazon S3 added the default checksum, -/// CRC64NVME, to the uploaded object). For more information about how -/// checksums are calculated with multipart uploads, see Checking object integrity -/// in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    This header specifies the checksum type of the object, which determines how part-level -/// checksums are combined to create an object-level checksum for multipart objects. For -/// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a -/// data integrity check to verify that the checksum type that is received is the same checksum -/// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_type: Option, -///

    Entity tag for the uploaded object.

    -///

    -/// General purpose buckets - To ensure that data is not -/// corrupted traversing the network, for objects where the ETag is the MD5 digest of the -/// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned -/// ETag to the calculated MD5 value.

    -///

    -/// Directory buckets - The ETag for the object in -/// a directory bucket isn't the MD5 digest of the object.

    - pub e_tag: Option, -///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, -/// the response includes this header. It includes the expiry-date and -/// rule-id key-value pairs that provide information about object expiration. -/// The value of the rule-id is URL-encoded.

    -/// -///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    -///
    - pub expiration: Option, +pub struct ListObjectVersionsOutput { + ///

    All of the keys rolled up into a common prefix count as a single return when calculating + /// the number of returns.

    + pub common_prefixes: Option, + ///

    Container for an object that is a delete marker. To learn more about delete markers, see Working with delete markers.

    + pub delete_markers: Option, + ///

    The delimiter grouping the included keys. A delimiter is a character that you specify to + /// group keys. All keys that contain the same string between the prefix and the first + /// occurrence of the delimiter are grouped under a single result element in + /// CommonPrefixes. These groups are counted as one result against the + /// max-keys limitation. These keys are not returned elsewhere in the + /// response.

    + pub delimiter: Option, + ///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    + ///

    If you specify the encoding-type request parameter, Amazon S3 includes this + /// element in the response, and returns encoded key name values in the following response + /// elements:

    + ///

    + /// KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.

    + pub encoding_type: Option, + ///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search + /// criteria. If your results were truncated, you can make a follow-up paginated request by + /// using the NextKeyMarker and NextVersionIdMarker response + /// parameters as a starting place in another request to return the rest of the results.

    + pub is_truncated: Option, + ///

    Marks the last key returned in a truncated response.

    + pub key_marker: Option, + ///

    Specifies the maximum number of objects to return.

    + pub max_keys: Option, + ///

    The bucket name.

    + pub name: Option, + ///

    When the number of responses exceeds the value of MaxKeys, + /// NextKeyMarker specifies the first key not returned that satisfies the + /// search criteria. Use this value for the key-marker request parameter in a subsequent + /// request.

    + pub next_key_marker: Option, + ///

    When the number of responses exceeds the value of MaxKeys, + /// NextVersionIdMarker specifies the first object version not returned that + /// satisfies the search criteria. Use this value for the version-id-marker + /// request parameter in a subsequent request.

    + pub next_version_id_marker: Option, + ///

    Selects objects that start with the value supplied by this parameter.

    + pub prefix: Option, pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of -/// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. -/// This value is stored as object metadata and automatically gets -/// passed on to Amazon Web Services KMS for future GetObject -/// operations on this object.

    - pub ssekms_encryption_context: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    - pub server_side_encryption: Option, -///

    -/// The size of the object in bytes. This value is only be present if you append to an object. -///

    -/// -///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    -///
    - pub size: Option, -///

    Version ID of the object.

    -///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID -/// for the object being stored. Amazon S3 returns this ID in the response. When you enable -/// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object -/// simultaneously, it stores all of the objects. For more information about versioning, see -/// Adding Objects to -/// Versioning-Enabled Buckets in the Amazon S3 User Guide. For -/// information about returning the versioning state of a bucket, see GetBucketVersioning.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub version_id: Option, + ///

    Marks the last version of the key returned in a truncated response.

    + pub version_id_marker: Option, + ///

    Container for version information.

    + pub versions: Option, } -impl fmt::Debug for PutObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); -} -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); -} -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); -} -if let Some(ref val) = self.checksum_type { -d.field("checksum_type", val); -} -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); -} -if let Some(ref val) = self.expiration { -d.field("expiration", val); -} -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -if let Some(ref val) = self.ssekms_encryption_context { -d.field("ssekms_encryption_context", val); -} -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); -} -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); -} -if let Some(ref val) = self.size { -d.field("size", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ListObjectVersionsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectVersionsOutput"); + if let Some(ref val) = self.common_prefixes { + d.field("common_prefixes", val); + } + if let Some(ref val) = self.delete_markers { + d.field("delete_markers", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.key_marker { + d.field("key_marker", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.next_key_marker { + d.field("next_key_marker", val); + } + if let Some(ref val) = self.next_version_id_marker { + d.field("next_version_id_marker", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.version_id_marker { + d.field("version_id_marker", val); + } + if let Some(ref val) = self.versions { + d.field("versions", val); + } + d.finish_non_exhaustive() + } } - #[derive(Clone, Default, PartialEq)] -pub struct PutObjectRetentionInput { -///

    The bucket name that contains the object you want to apply this Object Retention -/// configuration to.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    +pub struct ListObjectsInput { + ///

    The name of the bucket containing the objects.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates whether this action should bypass Governance-mode restrictions.

    - pub bypass_governance_retention: Option, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash for the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    A delimiter is a character that you use to group keys.

    + pub delimiter: Option, + pub encoding_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The key name for the object that you want to apply this Object Retention configuration -/// to.

    - pub key: ObjectKey, + ///

    Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this + /// specified key. Marker can be any key in the bucket.

    + pub marker: Option, + ///

    Sets the maximum number of keys returned in the response. By default, the action returns + /// up to 1,000 key names. The response might contain fewer keys but will never contain more. + ///

    + pub max_keys: Option, + ///

    Specifies the optional fields that you want returned in the response. Fields that you do + /// not specify are not returned.

    + pub optional_object_attributes: Option, + ///

    Limits the response to keys that begin with the specified prefix.

    + pub prefix: Option, + ///

    Confirms that the requester knows that she or he will be charged for the list objects + /// request. Bucket owners need not specify this parameter in their requests.

    pub request_payer: Option, -///

    The container element for the Object Retention configuration.

    - pub retention: Option, -///

    The version ID for the object that you want to apply this Object Retention configuration -/// to.

    - pub version_id: Option, } -impl fmt::Debug for PutObjectRetentionInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectRetentionInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.bypass_governance_retention { -d.field("bypass_governance_retention", val); -} -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.retention { -d.field("retention", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ListObjectsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.marker { + d.field("marker", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.optional_object_attributes { + d.field("optional_object_attributes", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.finish_non_exhaustive() + } } -impl PutObjectRetentionInput { -#[must_use] -pub fn builder() -> builders::PutObjectRetentionInputBuilder { -default() -} +impl ListObjectsInput { + #[must_use] + pub fn builder() -> builders::ListObjectsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutObjectRetentionOutput { +pub struct ListObjectsOutput { + ///

    The bucket name.

    + pub name: Option, + ///

    Keys that begin with the indicated prefix.

    + pub prefix: Option, + ///

    Indicates where in the bucket listing begins. Marker is included in the response if it + /// was sent with the request.

    + pub marker: Option, + ///

    The maximum number of keys returned in the response body.

    + pub max_keys: Option, + ///

    A flag that indicates whether Amazon S3 returned all of the results that satisfied the search + /// criteria.

    + pub is_truncated: Option, + ///

    Metadata about each object returned.

    + pub contents: Option, + ///

    All of the keys (up to 1,000) rolled up in a common prefix count as a single return when + /// calculating the number of returns.

    + ///

    A response can contain CommonPrefixes only if you specify a + /// delimiter.

    + ///

    + /// CommonPrefixes contains all (if there are any) keys between + /// Prefix and the next occurrence of the string specified by the + /// delimiter.

    + ///

    + /// CommonPrefixes lists keys that act like subdirectories in the directory + /// specified by Prefix.

    + ///

    For example, if the prefix is notes/ and the delimiter is a slash + /// (/), as in notes/summer/july, the common prefix is + /// notes/summer/. All of the keys that roll up into a common prefix count as a + /// single return when calculating the number of returns.

    + pub common_prefixes: Option, + ///

    Causes keys that contain the same string between the prefix and the first occurrence of + /// the delimiter to be rolled up into a single result element in the + /// CommonPrefixes collection. These rolled-up keys are not returned elsewhere + /// in the response. Each rolled-up result counts as only one return against the + /// MaxKeys value.

    + pub delimiter: Option, + ///

    When the response is truncated (the IsTruncated element value in the + /// response is true), you can use the key name in this field as the + /// marker parameter in the subsequent request to get the next set of objects. + /// Amazon S3 lists objects in alphabetical order.

    + /// + ///

    This element is returned only if you have the delimiter request + /// parameter specified. If the response does not include the NextMarker + /// element and it is truncated, you can use the value of the last Key element + /// in the response as the marker parameter in the subsequent request to get + /// the next set of object keys.

    + ///
    + pub next_marker: Option, + ///

    Encoding type used by Amazon S3 to encode the object keys in the response. + /// Responses are encoded only in UTF-8. An object key can contain any Unicode character. + /// However, the XML 1.0 parser can't parse certain characters, such as characters with an + /// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this + /// parameter to request that Amazon S3 encode the keys in the response. For more information about + /// characters to avoid in object key names, see Object key naming + /// guidelines.

    + /// + ///

    When using the URL encoding type, non-ASCII characters that are used in an object's + /// key name will be percent-encoded according to UTF-8 code values. For example, the object + /// test_file(3).png will appear as + /// test_file%283%29.png.

    + ///
    + pub encoding_type: Option, pub request_charged: Option, } -impl fmt::Debug for PutObjectRetentionOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectRetentionOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -d.finish_non_exhaustive() -} -} - - -#[derive(Clone, PartialEq)] -pub struct PutObjectTaggingInput { -///

    The bucket name containing the object.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +impl fmt::Debug for ListObjectsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectsOutput"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.marker { + d.field("marker", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.contents { + d.field("contents", val); + } + if let Some(ref val) = self.common_prefixes { + d.field("common_prefixes", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.next_marker { + d.field("next_marker", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } +} + +#[derive(Clone, Default, PartialEq)] +pub struct ListObjectsV2Input { + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash for the request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    + /// ContinuationToken indicates to Amazon S3 that the list is being continued on + /// this bucket with a token. ContinuationToken is obfuscated and is not a real + /// key. You can use this ContinuationToken for pagination of the list results. + ///

    + pub continuation_token: Option, + ///

    A delimiter is a character that you use to group keys.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - For directory buckets, / is the only supported delimiter.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - When you query + /// ListObjectsV2 with a delimiter during in-progress multipart + /// uploads, the CommonPrefixes response parameter contains the prefixes + /// that are associated with the in-progress multipart uploads. For more information + /// about multipart uploads, see Multipart Upload Overview in + /// the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + pub delimiter: Option, + ///

    Encoding type used by Amazon S3 to encode the object keys in the response. + /// Responses are encoded only in UTF-8. An object key can contain any Unicode character. + /// However, the XML 1.0 parser can't parse certain characters, such as characters with an + /// ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this + /// parameter to request that Amazon S3 encode the keys in the response. For more information about + /// characters to avoid in object key names, see Object key naming + /// guidelines.

    + /// + ///

    When using the URL encoding type, non-ASCII characters that are used in an object's + /// key name will be percent-encoded according to UTF-8 code values. For example, the object + /// test_file(3).png will appear as + /// test_file%283%29.png.

    + ///
    + pub encoding_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    Name of the object key.

    - pub key: ObjectKey, + ///

    The owner field is not present in ListObjectsV2 by default. If you want to + /// return the owner field with each key in the result, then set the FetchOwner + /// field to true.

    + /// + ///

    + /// Directory buckets - For directory buckets, + /// the bucket owner is returned as the object owner for all objects.

    + ///
    + pub fetch_owner: Option, + ///

    Sets the maximum number of keys returned in the response. By default, the action returns + /// up to 1,000 key names. The response might contain fewer keys but will never contain + /// more.

    + pub max_keys: Option, + ///

    Specifies the optional fields that you want returned in the response. Fields that you do + /// not specify are not returned.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub optional_object_attributes: Option, + ///

    Limits the response to keys that begin with the specified prefix.

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub prefix: Option, + ///

    Confirms that the requester knows that she or he will be charged for the list objects + /// request in V2 style. Bucket owners need not specify this parameter in their + /// requests.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    pub request_payer: Option, -///

    Container for the TagSet and Tag elements

    - pub tagging: Tagging, -///

    The versionId of the object that the tag-set will be added to.

    - pub version_id: Option, + ///

    StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this + /// specified key. StartAfter can be any key in the bucket.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub start_after: Option, } -impl fmt::Debug for PutObjectTaggingInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectTaggingInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -d.field("tagging", &self.tagging); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ListObjectsV2Input { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectsV2Input"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.fetch_owner { + d.field("fetch_owner", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.optional_object_attributes { + d.field("optional_object_attributes", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.start_after { + d.field("start_after", val); + } + d.finish_non_exhaustive() + } } -impl PutObjectTaggingInput { -#[must_use] -pub fn builder() -> builders::PutObjectTaggingInputBuilder { -default() -} +impl ListObjectsV2Input { + #[must_use] + pub fn builder() -> builders::ListObjectsV2InputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutObjectTaggingOutput { -///

    The versionId of the object the tag-set was added to.

    - pub version_id: Option, +pub struct ListObjectsV2Output { + ///

    The bucket name.

    + pub name: Option, + ///

    Keys that begin with the indicated prefix.

    + /// + ///

    + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

    + ///
    + pub prefix: Option, + ///

    Sets the maximum number of keys returned in the response. By default, the action returns + /// up to 1,000 key names. The response might contain fewer keys but will never contain + /// more.

    + pub max_keys: Option, + ///

    + /// KeyCount is the number of keys returned with this request. + /// KeyCount will always be less than or equal to the MaxKeys + /// field. For example, if you ask for 50 keys, your result will include 50 keys or + /// fewer.

    + pub key_count: Option, + ///

    If ContinuationToken was sent with the request, it is included in the + /// response. You can use the returned ContinuationToken for pagination of the + /// list response. You can use this ContinuationToken for pagination of the list + /// results.

    + pub continuation_token: Option, + ///

    Set to false if all of the results were returned. Set to true + /// if more keys are available to return. If the number of results exceeds that specified by + /// MaxKeys, all of the results might not be returned.

    + pub is_truncated: Option, + ///

    + /// NextContinuationToken is sent when isTruncated is true, which + /// means there are more keys in the bucket that can be listed. The next list requests to Amazon S3 + /// can be continued with this NextContinuationToken. + /// NextContinuationToken is obfuscated and is not a real key

    + pub next_continuation_token: Option, + ///

    Metadata about each object returned.

    + pub contents: Option, + ///

    All of the keys (up to 1,000) that share the same prefix are grouped together. When + /// counting the total numbers of returns by this API operation, this group of keys is + /// considered as one item.

    + ///

    A response can contain CommonPrefixes only if you specify a + /// delimiter.

    + ///

    + /// CommonPrefixes contains all (if there are any) keys between + /// Prefix and the next occurrence of the string specified by a + /// delimiter.

    + ///

    + /// CommonPrefixes lists keys that act like subdirectories in the directory + /// specified by Prefix.

    + ///

    For example, if the prefix is notes/ and the delimiter is a slash + /// (/) as in notes/summer/july, the common prefix is + /// notes/summer/. All of the keys that roll up into a common prefix count as a + /// single return when calculating the number of returns.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - For directory buckets, only prefixes that end in a delimiter (/) are supported.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - When you query + /// ListObjectsV2 with a delimiter during in-progress multipart + /// uploads, the CommonPrefixes response parameter contains the prefixes + /// that are associated with the in-progress multipart uploads. For more information + /// about multipart uploads, see Multipart Upload Overview in + /// the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + pub common_prefixes: Option, + ///

    Causes keys that contain the same string between the prefix and the first + /// occurrence of the delimiter to be rolled up into a single result element in the + /// CommonPrefixes collection. These rolled-up keys are not returned elsewhere + /// in the response. Each rolled-up result counts as only one return against the + /// MaxKeys value.

    + /// + ///

    + /// Directory buckets - For directory buckets, / is the only supported delimiter.

    + ///
    + pub delimiter: Option, + ///

    Encoding type used by Amazon S3 to encode object key names in the XML response.

    + ///

    If you specify the encoding-type request parameter, Amazon S3 includes this + /// element in the response, and returns encoded key name values in the following response + /// elements:

    + ///

    + /// Delimiter, Prefix, Key, and StartAfter.

    + pub encoding_type: Option, + ///

    If StartAfter was sent with the request, it is included in the response.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub start_after: Option, + pub request_charged: Option, } -impl fmt::Debug for PutObjectTaggingOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutObjectTaggingOutput"); -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ListObjectsV2Output { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListObjectsV2Output"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.max_keys { + d.field("max_keys", val); + } + if let Some(ref val) = self.key_count { + d.field("key_count", val); + } + if let Some(ref val) = self.continuation_token { + d.field("continuation_token", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.next_continuation_token { + d.field("next_continuation_token", val); + } + if let Some(ref val) = self.contents { + d.field("contents", val); + } + if let Some(ref val) = self.common_prefixes { + d.field("common_prefixes", val); + } + if let Some(ref val) = self.delimiter { + d.field("delimiter", val); + } + if let Some(ref val) = self.encoding_type { + d.field("encoding_type", val); + } + if let Some(ref val) = self.start_after { + d.field("start_after", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } - -#[derive(Clone, PartialEq)] -pub struct PutPublicAccessBlockInput { -///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want -/// to set.

    +#[derive(Clone, Default, PartialEq)] +pub struct ListPartsInput { + ///

    The name of the bucket to which the parts are being uploaded.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The MD5 hash of the PutPublicAccessBlock request body.

    -///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 -/// bucket. You can enable the configuration options in any combination. For more information -/// about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    - pub public_access_block_configuration: PublicAccessBlockConfiguration, + ///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, + ///

    Sets the maximum number of parts to return.

    + pub max_parts: Option, + ///

    Specifies the part after which listing should begin. Only parts with higher part numbers + /// will be listed.

    + pub part_number_marker: Option, + pub request_payer: Option, + ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created + /// using a checksum algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. + /// For more information, see + /// Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum + /// algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Upload ID identifying the multipart upload whose parts are being listed.

    + pub upload_id: MultipartUploadId, } -impl fmt::Debug for PutPublicAccessBlockInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutPublicAccessBlockInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("public_access_block_configuration", &self.public_access_block_configuration); -d.finish_non_exhaustive() -} +impl fmt::Debug for ListPartsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListPartsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.max_parts { + d.field("max_parts", val); + } + if let Some(ref val) = self.part_number_marker { + d.field("part_number_marker", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } -impl PutPublicAccessBlockInput { -#[must_use] -pub fn builder() -> builders::PutPublicAccessBlockInputBuilder { -default() -} +impl ListPartsInput { + #[must_use] + pub fn builder() -> builders::ListPartsInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct PutPublicAccessBlockOutput { +pub struct ListPartsOutput { + ///

    If the bucket has a lifecycle rule configured with an action to abort incomplete + /// multipart uploads and the prefix in the lifecycle rule matches the object name in the + /// request, then the response includes this header indicating when the initiated multipart + /// upload will become eligible for abort operation. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle + /// Configuration.

    + ///

    The response will also include the x-amz-abort-rule-id header that will + /// provide the ID of the lifecycle configuration rule that defines this action.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub abort_date: Option, + ///

    This header is returned along with the x-amz-abort-date header. It + /// identifies applicable lifecycle configuration rule that defines the action to abort + /// incomplete multipart uploads.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub abort_rule_id: Option, + ///

    The name of the bucket to which the multipart upload was initiated. Does not return the + /// access point ARN or access point alias if used.

    + pub bucket: Option, + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    The checksum type, which determines how part-level checksums are combined to create an + /// object-level checksum for multipart objects. You can use this header response to verify + /// that the checksum type that is received is the same checksum type that was specified in + /// CreateMultipartUpload request. For more + /// information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Container element that identifies who initiated the multipart upload. If the initiator + /// is an Amazon Web Services account, this element provides the same information as the Owner + /// element. If the initiator is an IAM User, this element provides the user ARN and display + /// name.

    + pub initiator: Option, + ///

    Indicates whether the returned list of parts is truncated. A true value indicates that + /// the list was truncated. A list can be truncated if the number of parts exceeds the limit + /// returned in the MaxParts element.

    + pub is_truncated: Option, + ///

    Object key for which the multipart upload was initiated.

    + pub key: Option, + ///

    Maximum number of parts that were allowed in the response.

    + pub max_parts: Option, + ///

    When a list is truncated, this element specifies the last part in the list, as well as + /// the value to use for the part-number-marker request parameter in a subsequent + /// request.

    + pub next_part_number_marker: Option, + ///

    Container element that identifies the object owner, after the object is created. If + /// multipart upload is initiated by an IAM user, this element provides the parent account ID + /// and display name.

    + /// + ///

    + /// Directory buckets - The bucket owner is + /// returned as the object owner for all the parts.

    + ///
    + pub owner: Option, + ///

    Specifies the part after which listing should begin. Only parts with higher part numbers + /// will be listed.

    + pub part_number_marker: Option, + ///

    Container for elements related to a particular part. A response can contain zero or more + /// Part elements.

    + pub parts: Option, + pub request_charged: Option, + ///

    The class of storage used to store the uploaded object.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    Upload ID identifying the multipart upload whose parts are being listed.

    + pub upload_id: Option, } -impl fmt::Debug for PutPublicAccessBlockOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("PutPublicAccessBlockOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for ListPartsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ListPartsOutput"); + if let Some(ref val) = self.abort_date { + d.field("abort_date", val); + } + if let Some(ref val) = self.abort_rule_id { + d.field("abort_rule_id", val); + } + if let Some(ref val) = self.bucket { + d.field("bucket", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.initiator { + d.field("initiator", val); + } + if let Some(ref val) = self.is_truncated { + d.field("is_truncated", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.max_parts { + d.field("max_parts", val); + } + if let Some(ref val) = self.next_part_number_marker { + d.field("next_part_number_marker", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.part_number_marker { + d.field("part_number_marker", val); + } + if let Some(ref val) = self.parts { + d.field("parts", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.upload_id { + d.field("upload_id", val); + } + d.finish_non_exhaustive() + } } +pub type Location = String; -pub type QueueArn = String; - -///

    Specifies the configuration for publishing messages to an Amazon Simple Queue Service -/// (Amazon SQS) queue when Amazon S3 detects specified events.

    +///

    Specifies the location where the bucket will be created.

    +///

    For directory buckets, the location type is Availability Zone or Local Zone. For more information about directory buckets, see +/// Working with directory buckets in the Amazon S3 User Guide.

    +/// +///

    This functionality is only supported by directory buckets.

    +///
    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct QueueConfiguration { -///

    A collection of bucket events for which to send notifications

    - pub events: EventList, - pub filter: Option, - pub id: Option, -///

    The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message -/// when it detects events of the specified type.

    - pub queue_arn: QueueArn, +pub struct LocationInfo { + ///

    The name of the location where the bucket will be created.

    + ///

    For directory buckets, the name of the location is the Zone ID of the Availability Zone (AZ) or Local Zone (LZ) where the bucket will be created. An example AZ ID value is usw2-az1.

    + pub name: Option, + ///

    The type of location where the bucket will be created.

    + pub type_: Option, } -impl fmt::Debug for QueueConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("QueueConfiguration"); -d.field("events", &self.events); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.field("queue_arn", &self.queue_arn); -d.finish_non_exhaustive() -} +impl fmt::Debug for LocationInfo { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LocationInfo"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.type_ { + d.field("type_", val); + } + d.finish_non_exhaustive() + } } +pub type LocationNameAsString = String; -pub type QueueConfigurationList = List; - -pub type Quiet = bool; - -pub type QuoteCharacter = String; +pub type LocationPrefix = String; -pub type QuoteEscapeCharacter = String; +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct LocationType(Cow<'static, str>); -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct QuoteFields(Cow<'static, str>); +impl LocationType { + pub const AVAILABILITY_ZONE: &'static str = "AvailabilityZone"; -impl QuoteFields { -pub const ALWAYS: &'static str = "ALWAYS"; + pub const LOCAL_ZONE: &'static str = "LocalZone"; -pub const ASNEEDED: &'static str = "ASNEEDED"; + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl From for LocationType { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } +impl From for Cow<'static, str> { + fn from(s: LocationType) -> Self { + s.0 + } } -impl From for QuoteFields { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl FromStr for LocationType { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl From for Cow<'static, str> { -fn from(s: QuoteFields) -> Self { -s.0 -} +///

    Describes where logs are stored and the prefix that Amazon S3 assigns to all log object keys +/// for a bucket. For more information, see PUT Bucket logging in the +/// Amazon S3 API Reference.

    +#[derive(Clone, Default, PartialEq)] +pub struct LoggingEnabled { + ///

    Specifies the bucket where you want Amazon S3 to store server access logs. You can have your + /// logs delivered to any bucket that you own, including the same bucket that is being logged. + /// You can also configure multiple buckets to deliver their logs to the same target bucket. In + /// this case, you should choose a different TargetPrefix for each source bucket + /// so that the delivered log files can be distinguished by key.

    + pub target_bucket: TargetBucket, + ///

    Container for granting information.

    + ///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support + /// target grants. For more information, see Permissions for server access log delivery in the + /// Amazon S3 User Guide.

    + pub target_grants: Option, + ///

    Amazon S3 key format for log objects.

    + pub target_object_key_format: Option, + ///

    A prefix for all log object keys. If you store log files from multiple Amazon S3 buckets in a + /// single bucket, you can use a prefix to distinguish which log files came from which + /// bucket.

    + pub target_prefix: TargetPrefix, } -impl FromStr for QuoteFields { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl fmt::Debug for LoggingEnabled { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("LoggingEnabled"); + d.field("target_bucket", &self.target_bucket); + if let Some(ref val) = self.target_grants { + d.field("target_grants", val); + } + if let Some(ref val) = self.target_object_key_format { + d.field("target_object_key_format", val); + } + d.field("target_prefix", &self.target_prefix); + d.finish_non_exhaustive() + } } +pub type MFA = String; -pub type RecordDelimiter = String; +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct MFADelete(Cow<'static, str>); -///

    The container for the records event.

    -#[derive(Clone, Default, PartialEq)] -pub struct RecordsEvent { -///

    The byte array of partial, one or more result records. S3 Select doesn't guarantee that -/// a record will be self-contained in one record frame. To ensure continuous streaming of -/// data, S3 Select might split the same record across multiple record frames instead of -/// aggregating the results in memory. Some S3 clients (for example, the SDK for Java) handle this behavior by creating a ByteStream out of the response by -/// default. Other clients might not handle this behavior by default. In those cases, you must -/// aggregate the results on the client side and parse the response.

    - pub payload: Option, -} +impl MFADelete { + pub const DISABLED: &'static str = "Disabled"; -impl fmt::Debug for RecordsEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RecordsEvent"); -if let Some(ref val) = self.payload { -d.field("payload", val); -} -d.finish_non_exhaustive() -} -} + pub const ENABLED: &'static str = "Enabled"; + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -///

    Specifies how requests are redirected. In the event of an error, you can specify a -/// different error code to return.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Redirect { -///

    The host name to use in the redirect request.

    - pub host_name: Option, -///

    The HTTP redirect code to use on the response. Not required if one of the siblings is -/// present.

    - pub http_redirect_code: Option, -///

    Protocol to use when redirecting requests. The default is the protocol that is used in -/// the original request.

    - pub protocol: Option, -///

    The object key prefix to use in the redirect request. For example, to redirect requests -/// for all pages with prefix docs/ (objects in the docs/ folder) to -/// documents/, you can set a condition block with KeyPrefixEquals -/// set to docs/ and in the Redirect set ReplaceKeyPrefixWith to -/// /documents. Not required if one of the siblings is present. Can be present -/// only if ReplaceKeyWith is not provided.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub replace_key_prefix_with: Option, -///

    The specific object key to use in the redirect request. For example, redirect request to -/// error.html. Not required if one of the siblings is present. Can be present -/// only if ReplaceKeyPrefixWith is not provided.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub replace_key_with: Option, + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for Redirect { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Redirect"); -if let Some(ref val) = self.host_name { -d.field("host_name", val); -} -if let Some(ref val) = self.http_redirect_code { -d.field("http_redirect_code", val); -} -if let Some(ref val) = self.protocol { -d.field("protocol", val); -} -if let Some(ref val) = self.replace_key_prefix_with { -d.field("replace_key_prefix_with", val); -} -if let Some(ref val) = self.replace_key_with { -d.field("replace_key_with", val); +impl From for MFADelete { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.finish_non_exhaustive() + +impl From for Cow<'static, str> { + fn from(s: MFADelete) -> Self { + s.0 + } } + +impl FromStr for MFADelete { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MFADeleteStatus(Cow<'static, str>); -///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 -/// bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct RedirectAllRequestsTo { -///

    Name of the host where requests are redirected.

    - pub host_name: HostName, -///

    Protocol to use when redirecting requests. The default is the protocol that is used in -/// the original request.

    - pub protocol: Option, +impl MFADeleteStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for RedirectAllRequestsTo { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RedirectAllRequestsTo"); -d.field("host_name", &self.host_name); -if let Some(ref val) = self.protocol { -d.field("protocol", val); +impl From for MFADeleteStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.finish_non_exhaustive() + +impl From for Cow<'static, str> { + fn from(s: MFADeleteStatus) -> Self { + s.0 + } } + +impl FromStr for MFADeleteStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +pub type Marker = String; -pub type Region = String; +pub type MaxAgeSeconds = i32; -pub type ReplaceKeyPrefixWith = String; +pub type MaxBuckets = i32; -pub type ReplaceKeyWith = String; +pub type MaxDirectoryBuckets = i32; -pub type ReplicaKmsKeyID = String; +pub type MaxKeys = i32; -///

    A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't -/// replicate replica modifications by default. In the latest version of replication -/// configuration (when Filter is specified), you can specify this element and set -/// the status to Enabled to replicate modifications on replicas.

    -/// -///

    If you don't specify the Filter element, Amazon S3 assumes that the -/// replication configuration is the earlier version, V1. In the earlier version, this -/// element is not allowed.

    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicaModifications { -///

    Specifies whether Amazon S3 replicates modifications on replicas.

    - pub status: ReplicaModificationsStatus, -} +pub type MaxParts = i32; -impl fmt::Debug for ReplicaModifications { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicaModifications"); -d.field("status", &self.status); -d.finish_non_exhaustive() -} -} +pub type MaxUploads = i32; +pub type Message = String; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicaModificationsStatus(Cow<'static, str>); +pub type Metadata = Map; -impl ReplicaModificationsStatus { -pub const DISABLED: &'static str = "Disabled"; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct MetadataDirective(Cow<'static, str>); -pub const ENABLED: &'static str = "Enabled"; +impl MetadataDirective { + pub const COPY: &'static str = "COPY"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const REPLACE: &'static str = "REPLACE"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl From for ReplicaModificationsStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl From for MetadataDirective { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl From for Cow<'static, str> { -fn from(s: ReplicaModificationsStatus) -> Self { -s.0 -} +impl From for Cow<'static, str> { + fn from(s: MetadataDirective) -> Self { + s.0 + } } -impl FromStr for ReplicaModificationsStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl FromStr for MetadataDirective { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -///

    A container for replication rules. You can add up to 1,000 rules. The maximum size of a -/// replication configuration is 2 MB.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationConfiguration { -///

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when -/// replicating objects. For more information, see How to Set Up Replication -/// in the Amazon S3 User Guide.

    - pub role: Role, -///

    A container for one or more replication rules. A replication configuration must have at -/// least one rule and can contain a maximum of 1,000 rules.

    - pub rules: ReplicationRules, +///

    A metadata key-value pair to store with an object.

    +#[derive(Clone, Default, PartialEq)] +pub struct MetadataEntry { + ///

    Name of the object.

    + pub name: Option, + ///

    Value of the object.

    + pub value: Option, } -impl fmt::Debug for ReplicationConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationConfiguration"); -d.field("role", &self.role); -d.field("rules", &self.rules); -d.finish_non_exhaustive() -} +impl fmt::Debug for MetadataEntry { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetadataEntry"); + if let Some(ref val) = self.name { + d.field("name", val); + } + if let Some(ref val) = self.value { + d.field("value", val); + } + d.finish_non_exhaustive() + } } +pub type MetadataKey = String; -///

    Specifies which Amazon S3 objects to replicate and where to store the replicas.

    +///

    +/// The metadata table configuration for a general purpose bucket. +///

    #[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRule { - pub delete_marker_replication: Option, - pub delete_replication: Option, -///

    A container for information about the replication destination and its configurations -/// including enabling the S3 Replication Time Control (S3 RTC).

    - pub destination: Destination, -///

    Optional configuration to replicate existing source bucket objects.

    -/// -///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the -/// Amazon S3 User Guide.

    -///
    - pub existing_object_replication: Option, - pub filter: Option, -///

    A unique identifier for the rule. The maximum value is 255 characters.

    - pub id: Option, -///

    An object key name prefix that identifies the object or objects to which the rule -/// applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, -/// specify an empty string.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, -///

    The priority indicates which rule has precedence whenever two or more replication rules -/// conflict. Amazon S3 will attempt to replicate objects according to all replication rules. -/// However, if there are two or more rules with the same destination bucket, then objects will -/// be replicated according to the rule with the highest priority. The higher the number, the -/// higher the priority.

    -///

    For more information, see Replication in the -/// Amazon S3 User Guide.

    - pub priority: Option, -///

    A container that describes additional filters for identifying the source objects that -/// you want to replicate. You can choose to enable or disable the replication of these -/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created -/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service -/// (SSE-KMS).

    - pub source_selection_criteria: Option, -///

    Specifies whether the rule is enabled.

    - pub status: ReplicationRuleStatus, +pub struct MetadataTableConfiguration { + ///

    + /// The destination information for the metadata table configuration. The destination table bucket + /// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + /// table name must be unique within the aws_s3_metadata namespace in the destination + /// table bucket. + ///

    + pub s3_tables_destination: S3TablesDestination, } -impl fmt::Debug for ReplicationRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationRule"); -if let Some(ref val) = self.delete_marker_replication { -d.field("delete_marker_replication", val); -} -if let Some(ref val) = self.delete_replication { -d.field("delete_replication", val); -} -d.field("destination", &self.destination); -if let Some(ref val) = self.existing_object_replication { -d.field("existing_object_replication", val); -} -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -if let Some(ref val) = self.prefix { -d.field("prefix", val); +impl fmt::Debug for MetadataTableConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetadataTableConfiguration"); + d.field("s3_tables_destination", &self.s3_tables_destination); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.priority { -d.field("priority", val); + +impl Default for MetadataTableConfiguration { + fn default() -> Self { + Self { + s3_tables_destination: default(), + } + } } -if let Some(ref val) = self.source_selection_criteria { -d.field("source_selection_criteria", val); + +///

    +/// The metadata table configuration for a general purpose bucket. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, PartialEq)] +pub struct MetadataTableConfigurationResult { + ///

    + /// The destination information for the metadata table configuration. The destination table bucket + /// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata + /// table name must be unique within the aws_s3_metadata namespace in the destination + /// table bucket. + ///

    + pub s3_tables_destination_result: S3TablesDestinationResult, } -d.field("status", &self.status); -d.finish_non_exhaustive() + +impl fmt::Debug for MetadataTableConfigurationResult { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetadataTableConfigurationResult"); + d.field("s3_tables_destination_result", &self.s3_tables_destination_result); + d.finish_non_exhaustive() + } } + +pub type MetadataTableStatus = String; + +pub type MetadataValue = String; + +///

    A container specifying replication metrics-related settings enabling replication +/// metrics and events.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct Metrics { + ///

    A container specifying the time threshold for emitting the + /// s3:Replication:OperationMissedThreshold event.

    + pub event_threshold: Option, + ///

    Specifies whether the replication metrics are enabled.

    + pub status: MetricsStatus, } +impl fmt::Debug for Metrics { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Metrics"); + if let Some(ref val) = self.event_threshold { + d.field("event_threshold", val); + } + d.field("status", &self.status); + d.finish_non_exhaustive() + } +} -///

    A container for specifying rule filters. The filters determine the subset of objects to -/// which the rule applies. This element is required only if you specify more than one filter.

    -///

    For example:

    -///
      -///
    • -///

      If you specify both a Prefix and a Tag filter, wrap -/// these filters in an And tag.

      -///
    • -///
    • -///

      If you specify a filter based on multiple tags, wrap the Tag elements -/// in an And tag.

      -///
    • -///
    +///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. +/// The operator must have at least two predicates, and an object must match all of the +/// predicates in order for the filter to apply.

    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationRuleAndOperator { -///

    An object key name prefix that identifies the subset of objects to which the rule -/// applies.

    +pub struct MetricsAndOperator { + ///

    The access point ARN used when evaluating an AND predicate.

    + pub access_point_arn: Option, + ///

    The prefix used when evaluating an AND predicate.

    pub prefix: Option, -///

    An array of tags containing key and value pairs.

    + ///

    The list of tags used when evaluating an AND predicate.

    pub tags: Option, } -impl fmt::Debug for ReplicationRuleAndOperator { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationRuleAndOperator"); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tags { -d.field("tags", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for MetricsAndOperator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetricsAndOperator"); + if let Some(ref val) = self.access_point_arn { + d.field("access_point_arn", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } - -///

    A filter that identifies the subset of objects to which the replication rule applies. A -/// Filter must specify exactly one Prefix, Tag, or -/// an And child element.

    -#[derive(Default, Serialize, Deserialize)] -pub struct ReplicationRuleFilter { -///

    A container for specifying rule filters. The filters determine the subset of objects to -/// which the rule applies. This element is required only if you specify more than one filter. -/// For example:

    -///
      -///
    • -///

      If you specify both a Prefix and a Tag filter, wrap -/// these filters in an And tag.

      -///
    • -///
    • -///

      If you specify a filter based on multiple tags, wrap the Tag elements -/// in an And tag.

      -///
    • -///
    - pub and: Option, - pub cached_tags: CachedTags, -///

    An object key name prefix that identifies the subset of objects to which the rule -/// applies.

    -/// -///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using -/// XML requests. For more information, see -/// XML related object key constraints.

    -///
    - pub prefix: Option, -///

    A container for specifying a tag key and value.

    -///

    The rule applies only to objects that have the tag in their tag set.

    - pub tag: Option, +///

    Specifies a metrics configuration for the CloudWatch request metrics (specified by the +/// metrics configuration ID) from an Amazon S3 bucket. If you're updating an existing metrics +/// configuration, note that this is a full replacement of the existing metrics configuration. +/// If you don't include the elements you want to keep, they are erased. For more information, +/// see PutBucketMetricsConfiguration.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct MetricsConfiguration { + ///

    Specifies a metrics configuration filter. The metrics configuration will only include + /// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an + /// access point ARN, or a conjunction (MetricsAndOperator).

    + pub filter: Option, + ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and + /// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, } -impl fmt::Debug for ReplicationRuleFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationRuleFilter"); -if let Some(ref val) = self.and { -d.field("and", val); -} -d.field("cached_tags", &self.cached_tags); -if let Some(ref val) = self.prefix { -d.field("prefix", val); -} -if let Some(ref val) = self.tag { -d.field("tag", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for MetricsConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MetricsConfiguration"); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -#[allow(clippy::clone_on_copy)] -impl Clone for ReplicationRuleFilter { -fn clone(&self) -> Self { -Self { -and: self.and.clone(), -cached_tags: default(), -prefix: self.prefix.clone(), -tag: self.tag.clone(), -} -} -} -impl PartialEq for ReplicationRuleFilter { -fn eq(&self, other: &Self) -> bool { -if self.and != other.and { -return false; -} -if self.prefix != other.prefix { -return false; -} -if self.tag != other.tag { -return false; -} -true -} +pub type MetricsConfigurationList = List; + +///

    Specifies a metrics configuration filter. The metrics configuration only includes +/// objects that meet the filter's criteria. A filter must be a prefix, an object tag, an +/// access point ARN, or a conjunction (MetricsAndOperator). For more information, see PutBucketMetricsConfiguration.

    +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[non_exhaustive] +#[serde(rename_all = "PascalCase")] +pub enum MetricsFilter { + ///

    The access point ARN used when evaluating a metrics filter.

    + AccessPointArn(AccessPointArn), + ///

    A conjunction (logical AND) of predicates, which is used in evaluating a metrics filter. + /// The operator must have at least two predicates, and an object must match all of the + /// predicates in order for the filter to apply.

    + And(MetricsAndOperator), + ///

    The prefix used when evaluating a metrics filter.

    + Prefix(Prefix), + ///

    The tag used when evaluating a metrics filter.

    + Tag(Tag), } -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicationRuleStatus(Cow<'static, str>); +pub type MetricsId = String; -impl ReplicationRuleStatus { -pub const DISABLED: &'static str = "Disabled"; +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct MetricsStatus(Cow<'static, str>); -pub const ENABLED: &'static str = "Enabled"; +impl MetricsStatus { + pub const DISABLED: &'static str = "Disabled"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl From for ReplicationRuleStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl From for MetricsStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl From for Cow<'static, str> { -fn from(s: ReplicationRuleStatus) -> Self { -s.0 -} +impl From for Cow<'static, str> { + fn from(s: MetricsStatus) -> Self { + s.0 + } } -impl FromStr for ReplicationRuleStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl FromStr for MetricsStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub type ReplicationRules = List; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct ReplicationStatus(Cow<'static, str>); - -impl ReplicationStatus { -pub const COMPLETE: &'static str = "COMPLETE"; - -pub const COMPLETED: &'static str = "COMPLETED"; - -pub const FAILED: &'static str = "FAILED"; - -pub const PENDING: &'static str = "PENDING"; +pub type Minutes = i32; -pub const REPLICA: &'static str = "REPLICA"; +pub type MissingMeta = i32; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} +pub type MpuObjectSize = i64; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +///

    Container for the MultipartUpload for the Amazon S3 object.

    +#[derive(Clone, Default, PartialEq)] +pub struct MultipartUpload { + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Date and time at which the multipart upload was initiated.

    + pub initiated: Option, + ///

    Identifies who initiated the multipart upload.

    + pub initiator: Option, + ///

    Key of the object for which the multipart upload was initiated.

    + pub key: Option, + ///

    Specifies the owner of the object that is part of the multipart upload.

    + /// + ///

    + /// Directory buckets - The bucket owner is + /// returned as the object owner for all the objects.

    + ///
    + pub owner: Option, + ///

    The class of storage used to store the object.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, + ///

    Upload ID that identifies the multipart upload.

    + pub upload_id: Option, } +impl fmt::Debug for MultipartUpload { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("MultipartUpload"); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.initiated { + d.field("initiated", val); + } + if let Some(ref val) = self.initiator { + d.field("initiator", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.upload_id { + d.field("upload_id", val); + } + d.finish_non_exhaustive() + } } -impl From for ReplicationStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} +pub type MultipartUploadId = String; -impl From for Cow<'static, str> { -fn from(s: ReplicationStatus) -> Self { -s.0 -} -} +pub type MultipartUploadList = List; -impl FromStr for ReplicationStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} +pub type NextKeyMarker = String; -///

    A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is -/// enabled and the time when all objects and operations on objects must be replicated. Must be -/// specified together with a Metrics block.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ReplicationTime { -///

    Specifies whether the replication time is enabled.

    - pub status: ReplicationTimeStatus, -///

    A container specifying the time by which replication should be complete for all objects -/// and operations on objects.

    - pub time: ReplicationTimeValue, -} +pub type NextMarker = String; -impl fmt::Debug for ReplicationTime { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationTime"); -d.field("status", &self.status); -d.field("time", &self.time); -d.finish_non_exhaustive() -} -} +pub type NextPartNumberMarker = i32; +pub type NextToken = String; -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ReplicationTimeStatus(Cow<'static, str>); +pub type NextUploadIdMarker = String; -impl ReplicationTimeStatus { -pub const DISABLED: &'static str = "Disabled"; +pub type NextVersionIdMarker = String; -pub const ENABLED: &'static str = "Enabled"; +///

    The specified bucket does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchBucket {} -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +impl fmt::Debug for NoSuchBucket { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoSuchBucket"); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} +///

    The specified key does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchKey {} +impl fmt::Debug for NoSuchKey { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoSuchKey"); + d.finish_non_exhaustive() + } } -impl From for ReplicationTimeStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} +///

    The specified multipart upload does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NoSuchUpload {} -impl From for Cow<'static, str> { -fn from(s: ReplicationTimeStatus) -> Self { -s.0 -} +impl fmt::Debug for NoSuchUpload { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoSuchUpload"); + d.finish_non_exhaustive() + } } -impl FromStr for ReplicationTimeStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} +pub type NonNegativeIntegerType = i32; -///

    A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics -/// EventThreshold.

    +///

    Specifies when noncurrent object versions expire. Upon expiration, Amazon S3 permanently +/// deletes the noncurrent object versions. You set this lifecycle configuration action on a +/// bucket that has versioning enabled (or suspended) to request that Amazon S3 delete noncurrent +/// object versions at a specific period in the object's lifetime.

    +/// +///

    This parameter applies to general purpose buckets only. It is not supported for +/// directory bucket lifecycle configurations.

    +///
    #[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ReplicationTimeValue { -///

    Contains an integer specifying time in minutes.

    -///

    Valid value: 15

    - pub minutes: Option, +pub struct NoncurrentVersionExpiration { + ///

    Specifies how many noncurrent versions Amazon S3 will retain. You can specify up to 100 + /// noncurrent versions to retain. Amazon S3 will permanently delete any additional noncurrent + /// versions beyond the specified number to retain. For more information about noncurrent + /// versions, see Lifecycle configuration + /// elements in the Amazon S3 User Guide.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub newer_noncurrent_versions: Option, + ///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the + /// associated action. The value must be a non-zero positive integer. For information about the + /// noncurrent days calculations, see How + /// Amazon S3 Calculates When an Object Became Noncurrent in the + /// Amazon S3 User Guide.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub noncurrent_days: Option, } -impl fmt::Debug for ReplicationTimeValue { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ReplicationTimeValue"); -if let Some(ref val) = self.minutes { -d.field("minutes", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for NoncurrentVersionExpiration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoncurrentVersionExpiration"); + if let Some(ref val) = self.newer_noncurrent_versions { + d.field("newer_noncurrent_versions", val); + } + if let Some(ref val) = self.noncurrent_days { + d.field("noncurrent_days", val); + } + d.finish_non_exhaustive() + } } +///

    Container for the transition rule that describes when noncurrent objects transition to +/// the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage +/// class. If your bucket is versioning-enabled (or versioning is suspended), you can set this +/// action to request that Amazon S3 transition noncurrent object versions to the +/// STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, +/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE storage +/// class at a specific period in the object's lifetime.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NoncurrentVersionTransition { + ///

    Specifies how many noncurrent versions Amazon S3 will retain in the same storage class before + /// transitioning objects. You can specify up to 100 noncurrent versions to retain. Amazon S3 will + /// transition any additional noncurrent versions beyond the specified number to retain. For + /// more information about noncurrent versions, see Lifecycle configuration + /// elements in the Amazon S3 User Guide.

    + pub newer_noncurrent_versions: Option, + ///

    Specifies the number of days an object is noncurrent before Amazon S3 can perform the + /// associated action. For information about the noncurrent days calculations, see How + /// Amazon S3 Calculates How Long an Object Has Been Noncurrent in the + /// Amazon S3 User Guide.

    + pub noncurrent_days: Option, + ///

    The class of storage used to store the object.

    + pub storage_class: Option, +} -///

    If present, indicates that the requester was successfully charged for the -/// request.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RequestCharged(Cow<'static, str>); +impl fmt::Debug for NoncurrentVersionTransition { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NoncurrentVersionTransition"); + if let Some(ref val) = self.newer_noncurrent_versions { + d.field("newer_noncurrent_versions", val); + } + if let Some(ref val) = self.noncurrent_days { + d.field("noncurrent_days", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } +} -impl RequestCharged { -pub const REQUESTER: &'static str = "requester"; +pub type NoncurrentVersionTransitionList = List; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} +///

    The specified content does not exist.

    +#[derive(Clone, Default, PartialEq)] +pub struct NotFound {} -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl fmt::Debug for NotFound { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NotFound"); + d.finish_non_exhaustive() + } } +///

    A container for specifying the notification configuration of the bucket. If this element +/// is empty, notifications are turned off for the bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NotificationConfiguration { + ///

    Enables delivery of events to Amazon EventBridge.

    + pub event_bridge_configuration: Option, + ///

    Describes the Lambda functions to invoke and the events for which to invoke + /// them.

    + pub lambda_function_configurations: Option, + ///

    The Amazon Simple Queue Service queues to publish messages to and the events for which + /// to publish messages.

    + pub queue_configurations: Option, + ///

    The topic to which notifications are sent and the events for which notifications are + /// generated.

    + pub topic_configurations: Option, } -impl From for RequestCharged { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl fmt::Debug for NotificationConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NotificationConfiguration"); + if let Some(ref val) = self.event_bridge_configuration { + d.field("event_bridge_configuration", val); + } + if let Some(ref val) = self.lambda_function_configurations { + d.field("lambda_function_configurations", val); + } + if let Some(ref val) = self.queue_configurations { + d.field("queue_configurations", val); + } + if let Some(ref val) = self.topic_configurations { + d.field("topic_configurations", val); + } + d.finish_non_exhaustive() + } } -impl From for Cow<'static, str> { -fn from(s: RequestCharged) -> Self { -s.0 -} +///

    Specifies object key name filtering rules. For information about key name filtering, see +/// Configuring event +/// notifications using object key name filtering in the +/// Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct NotificationConfigurationFilter { + pub key: Option, } -impl FromStr for RequestCharged { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl fmt::Debug for NotificationConfigurationFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("NotificationConfigurationFilter"); + if let Some(ref val) = self.key { + d.field("key", val); + } + d.finish_non_exhaustive() + } } -///

    Confirms that the requester knows that they will be charged for the request. Bucket -/// owners need not specify this parameter in their requests. If either the source or -/// destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding -/// charges to copy the object. For information about downloading objects from Requester Pays -/// buckets, see Downloading Objects in -/// Requester Pays Buckets in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RequestPayer(Cow<'static, str>); - -impl RequestPayer { -pub const REQUESTER: &'static str = "requester"; +///

    An optional unique identifier for configurations in a notification configuration. If you +/// don't provide one, Amazon S3 will assign an ID.

    +pub type NotificationId = String; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +///

    An object consists of data and its descriptive metadata.

    +#[derive(Clone, Default, PartialEq)] +pub struct Object { + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    The entity tag is a hash of the object. The ETag reflects changes only to the contents + /// of an object, not its metadata. The ETag may or may not be an MD5 digest of the object + /// data. Whether or not it is depends on how the object was created and how it is encrypted as + /// described below:

    + ///
      + ///
    • + ///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the + /// Amazon Web Services Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that + /// are an MD5 digest of their object data.

      + ///
    • + ///
    • + ///

      Objects created by the PUT Object, POST Object, or Copy operation, or through the + /// Amazon Web Services Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are + /// not an MD5 digest of their object data.

      + ///
    • + ///
    • + ///

      If an object is created by either the Multipart Upload or Part Copy operation, the + /// ETag is not an MD5 digest, regardless of the method of encryption. If an object is + /// larger than 16 MB, the Amazon Web Services Management Console will upload or copy that object as a + /// Multipart Upload, and therefore the ETag will not be an MD5 digest.

      + ///
    • + ///
    + /// + ///

    + /// Directory buckets - MD5 is not supported by directory buckets.

    + ///
    + pub e_tag: Option, + ///

    The name that you assign to an object. You use the object key to retrieve the + /// object.

    + pub key: Option, + ///

    Creation date of the object.

    + pub last_modified: Option, + ///

    The owner of the object

    + /// + ///

    + /// Directory buckets - The bucket owner is + /// returned as the object owner.

    + ///
    + pub owner: Option, + ///

    Specifies the restoration status of an object. Objects in certain storage classes must + /// be restored before they can be retrieved. For more information about these storage classes + /// and how to work with archived objects, see Working with archived + /// objects in the Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets. + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub restore_status: Option, + ///

    Size in bytes of the object

    + pub size: Option, + ///

    The class of storage used to store the object.

    + /// + ///

    + /// Directory buckets - + /// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    + ///
    + pub storage_class: Option, } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl fmt::Debug for Object { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Object"); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.restore_status { + d.field("restore_status", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } -} +///

    This action is not allowed against this storage tier.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectAlreadyInActiveTierError {} -impl From for RequestPayer { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl fmt::Debug for ObjectAlreadyInActiveTierError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectAlreadyInActiveTierError"); + d.finish_non_exhaustive() + } } -impl From for Cow<'static, str> { -fn from(s: RequestPayer) -> Self { -s.0 -} -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectAttributes(Cow<'static, str>); -impl FromStr for RequestPayer { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} +impl ObjectAttributes { + pub const CHECKSUM: &'static str = "Checksum"; -///

    Container for Payer.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct RequestPaymentConfiguration { -///

    Specifies who pays for the download and request fees.

    - pub payer: Payer, -} + pub const ETAG: &'static str = "ETag"; -impl fmt::Debug for RequestPaymentConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RequestPaymentConfiguration"); -d.field("payer", &self.payer); -d.finish_non_exhaustive() -} -} + pub const OBJECT_PARTS: &'static str = "ObjectParts"; -impl Default for RequestPaymentConfiguration { -fn default() -> Self { -Self { -payer: String::new().into(), -} -} -} + pub const OBJECT_SIZE: &'static str = "ObjectSize"; + pub const STORAGE_CLASS: &'static str = "StorageClass"; -///

    Container for specifying if periodic QueryProgress messages should be -/// sent.

    -#[derive(Clone, Default, PartialEq)] -pub struct RequestProgress { -///

    Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, -/// FALSE. Default value: FALSE.

    - pub enabled: Option, -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -impl fmt::Debug for RequestProgress { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RequestProgress"); -if let Some(ref val) = self.enabled { -d.field("enabled", val); + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -d.finish_non_exhaustive() + +impl From for ObjectAttributes { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: ObjectAttributes) -> Self { + s.0 + } } +impl FromStr for ObjectAttributes { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } +} -pub type RequestRoute = String; +pub type ObjectAttributesList = List; -pub type RequestToken = String; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectCannedACL(Cow<'static, str>); -pub type ResponseCacheControl = String; +impl ObjectCannedACL { + pub const AUTHENTICATED_READ: &'static str = "authenticated-read"; -pub type ResponseContentDisposition = String; + pub const AWS_EXEC_READ: &'static str = "aws-exec-read"; -pub type ResponseContentEncoding = String; + pub const BUCKET_OWNER_FULL_CONTROL: &'static str = "bucket-owner-full-control"; -pub type ResponseContentLanguage = String; + pub const BUCKET_OWNER_READ: &'static str = "bucket-owner-read"; -pub type ResponseContentType = String; + pub const PRIVATE: &'static str = "private"; -pub type ResponseExpires = Timestamp; + pub const PUBLIC_READ: &'static str = "public-read"; -pub type Restore = String; + pub const PUBLIC_READ_WRITE: &'static str = "public-read-write"; -pub type RestoreExpiryDate = Timestamp; + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[derive(Clone, Default, PartialEq)] -pub struct RestoreObjectInput { -///

    The bucket name containing the object to restore.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    - pub checksum_algorithm: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Object key for which the action was initiated.

    - pub key: ObjectKey, - pub request_payer: Option, - pub restore_request: Option, -///

    VersionId used to reference a specific version of the object.

    - pub version_id: Option, + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for RestoreObjectInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RestoreObjectInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -d.field("key", &self.key); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.restore_request { -d.field("restore_request", val); -} -if let Some(ref val) = self.version_id { -d.field("version_id", val); -} -d.finish_non_exhaustive() -} +impl From for ObjectCannedACL { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl RestoreObjectInput { -#[must_use] -pub fn builder() -> builders::RestoreObjectInputBuilder { -default() +impl From for Cow<'static, str> { + fn from(s: ObjectCannedACL) -> Self { + s.0 + } } + +impl FromStr for ObjectCannedACL { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +///

    Object Identifier is unique value to identify objects.

    #[derive(Clone, Default, PartialEq)] -pub struct RestoreObjectOutput { - pub request_charged: Option, -///

    Indicates the path in the provided S3 output location where Select results will be -/// restored to.

    - pub restore_output_path: Option, +pub struct ObjectIdentifier { + ///

    An entity tag (ETag) is an identifier assigned by a web server to a specific version of a resource found at a URL. + /// This header field makes the request method conditional on ETags.

    + /// + ///

    Entity tags (ETags) for S3 Express One Zone are random alphanumeric strings unique to the object.

    + ///
    + pub e_tag: Option, + ///

    Key name of the object.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub key: ObjectKey, + ///

    If present, the objects are deleted only if its modification times matches the provided Timestamp. + ///

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    + pub last_modified_time: Option, + ///

    If present, the objects are deleted only if its size matches the provided size in bytes.

    + /// + ///

    This functionality is only supported for directory buckets.

    + ///
    + pub size: Option, + ///

    Version ID for the specific version of the object to delete.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } -impl fmt::Debug for RestoreObjectOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RestoreObjectOutput"); -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); -} -if let Some(ref val) = self.restore_output_path { -d.field("restore_output_path", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ObjectIdentifier { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectIdentifier"); + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.last_modified_time { + d.field("last_modified_time", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } +pub type ObjectIdentifierList = List; -pub type RestoreOutputPath = String; +pub type ObjectKey = String; -///

    Container for restore job parameters.

    -#[derive(Clone, Default, PartialEq)] -pub struct RestoreRequest { -///

    Lifetime of the active copy in days. Do not use with restores that specify -/// OutputLocation.

    -///

    The Days element is required for regular restores, and must not be provided for select -/// requests.

    - pub days: Option, -///

    The optional description for the job.

    - pub description: Option, -///

    S3 Glacier related parameters pertaining to this job. Do not use with restores that -/// specify OutputLocation.

    - pub glacier_job_parameters: Option, -///

    Describes the location where the restore job's output is stored.

    - pub output_location: Option, -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Describes the parameters for Select job types.

    - pub select_parameters: Option, -///

    Retrieval tier at which the restore will be processed.

    - pub tier: Option, -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Type of restore request.

    - pub type_: Option, -} +pub type ObjectList = List; -impl fmt::Debug for RestoreRequest { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RestoreRequest"); -if let Some(ref val) = self.days { -d.field("days", val); -} -if let Some(ref val) = self.description { -d.field("description", val); -} -if let Some(ref val) = self.glacier_job_parameters { -d.field("glacier_job_parameters", val); -} -if let Some(ref val) = self.output_location { -d.field("output_location", val); -} -if let Some(ref val) = self.select_parameters { -d.field("select_parameters", val); -} -if let Some(ref val) = self.tier { -d.field("tier", val); -} -if let Some(ref val) = self.type_ { -d.field("type_", val); -} -d.finish_non_exhaustive() -} +///

    The container element for Object Lock configuration parameters.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ObjectLockConfiguration { + ///

    Indicates whether this bucket has an Object Lock configuration enabled. Enable + /// ObjectLockEnabled when you apply ObjectLockConfiguration to a + /// bucket.

    + pub object_lock_enabled: Option, + ///

    Specifies the Object Lock rule for the specified object. Enable the this rule when you + /// apply ObjectLockConfiguration to a bucket. Bucket settings require both a mode + /// and a period. The period can be either Days or Years but you must + /// select one. You cannot specify Days and Years at the same + /// time.

    + pub rule: Option, } +impl fmt::Debug for ObjectLockConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectLockConfiguration"); + if let Some(ref val) = self.object_lock_enabled { + d.field("object_lock_enabled", val); + } + if let Some(ref val) = self.rule { + d.field("rule", val); + } + d.finish_non_exhaustive() + } +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct RestoreRequestType(Cow<'static, str>); +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ObjectLockEnabled(Cow<'static, str>); -impl RestoreRequestType { -pub const SELECT: &'static str = "SELECT"; +impl ObjectLockEnabled { + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } +impl From for ObjectLockEnabled { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl From for RestoreRequestType { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl From for Cow<'static, str> { + fn from(s: ObjectLockEnabled) -> Self { + s.0 + } } -impl From for Cow<'static, str> { -fn from(s: RestoreRequestType) -> Self { -s.0 -} +impl FromStr for ObjectLockEnabled { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl FromStr for RestoreRequestType { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} -} +pub type ObjectLockEnabledForBucket = bool; -///

    Specifies the restoration status of an object. Objects in certain storage classes must -/// be restored before they can be retrieved. For more information about these storage classes -/// and how to work with archived objects, see Working with archived -/// objects in the Amazon S3 User Guide.

    -/// -///

    This functionality is not supported for directory buckets. -/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    -///
    +///

    A legal hold configuration for an object.

    #[derive(Clone, Default, PartialEq)] -pub struct RestoreStatus { -///

    Specifies whether the object is currently being restored. If the object restoration is -/// in progress, the header returns the value TRUE. For example:

    -///

    -/// x-amz-optional-object-attributes: IsRestoreInProgress="true" -///

    -///

    If the object restoration has completed, the header returns the value -/// FALSE. For example:

    -///

    -/// x-amz-optional-object-attributes: IsRestoreInProgress="false", -/// RestoreExpiryDate="2012-12-21T00:00:00.000Z" -///

    -///

    If the object hasn't been restored, there is no header response.

    - pub is_restore_in_progress: Option, -///

    Indicates when the restored copy will expire. This value is populated only if the object -/// has already been restored. For example:

    -///

    -/// x-amz-optional-object-attributes: IsRestoreInProgress="false", -/// RestoreExpiryDate="2012-12-21T00:00:00.000Z" -///

    - pub restore_expiry_date: Option, +pub struct ObjectLockLegalHold { + ///

    Indicates whether the specified object has a legal hold in place.

    + pub status: Option, } -impl fmt::Debug for RestoreStatus { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RestoreStatus"); -if let Some(ref val) = self.is_restore_in_progress { -d.field("is_restore_in_progress", val); -} -if let Some(ref val) = self.restore_expiry_date { -d.field("restore_expiry_date", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ObjectLockLegalHold { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectLockLegalHold"); + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectLockLegalHoldStatus(Cow<'static, str>); -pub type Role = String; +impl ObjectLockLegalHoldStatus { + pub const OFF: &'static str = "OFF"; -///

    Specifies the redirect behavior and when a redirect is applied. For more information -/// about routing rules, see Configuring advanced conditional redirects in the -/// Amazon S3 User Guide.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct RoutingRule { -///

    A container for describing a condition that must be met for the specified redirect to -/// apply. For example, 1. If request is for pages in the /docs folder, redirect -/// to the /documents folder. 2. If request results in HTTP error 4xx, redirect -/// request to another host where you might process the error.

    - pub condition: Option, -///

    Container for redirect information. You can redirect requests to another host, to -/// another page, or with another protocol. In the event of an error, you can specify a -/// different error code to return.

    - pub redirect: Redirect, + pub const ON: &'static str = "ON"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for RoutingRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("RoutingRule"); -if let Some(ref val) = self.condition { -d.field("condition", val); +impl From for ObjectLockLegalHoldStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.field("redirect", &self.redirect); -d.finish_non_exhaustive() + +impl From for Cow<'static, str> { + fn from(s: ObjectLockLegalHoldStatus) -> Self { + s.0 + } } + +impl FromStr for ObjectLockLegalHoldStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectLockMode(Cow<'static, str>); -pub type RoutingRules = List; +impl ObjectLockMode { + pub const COMPLIANCE: &'static str = "COMPLIANCE"; -///

    A container for object key name prefix and suffix filtering rules.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct S3KeyFilter { - pub filter_rules: Option, + pub const GOVERNANCE: &'static str = "GOVERNANCE"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for S3KeyFilter { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("S3KeyFilter"); -if let Some(ref val) = self.filter_rules { -d.field("filter_rules", val); +impl From for ObjectLockMode { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.finish_non_exhaustive() + +impl From for Cow<'static, str> { + fn from(s: ObjectLockMode) -> Self { + s.0 + } } + +impl FromStr for ObjectLockMode { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +pub type ObjectLockRetainUntilDate = Timestamp; -///

    Describes an Amazon S3 location that will receive the results of the restore request.

    +///

    A Retention configuration for an object.

    #[derive(Clone, Default, PartialEq)] -pub struct S3Location { -///

    A list of grants that control access to the staged results.

    - pub access_control_list: Option, -///

    The name of the bucket where the restore results will be placed.

    - pub bucket_name: BucketName, -///

    The canned ACL to apply to the restore results.

    - pub canned_acl: Option, - pub encryption: Option, -///

    The prefix that is prepended to the restore results for this request.

    - pub prefix: LocationPrefix, -///

    The class of storage used to store the restore results.

    - pub storage_class: Option, -///

    The tag-set that is applied to the restore results.

    - pub tagging: Option, -///

    A list of metadata to store with the restore results in S3.

    - pub user_metadata: Option, +pub struct ObjectLockRetention { + ///

    Indicates the Retention mode for the specified object.

    + pub mode: Option, + ///

    The date on which this Object Lock Retention will expire.

    + pub retain_until_date: Option, +} + +impl fmt::Debug for ObjectLockRetention { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectLockRetention"); + if let Some(ref val) = self.mode { + d.field("mode", val); + } + if let Some(ref val) = self.retain_until_date { + d.field("retain_until_date", val); + } + d.finish_non_exhaustive() + } } -impl fmt::Debug for S3Location { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("S3Location"); -if let Some(ref val) = self.access_control_list { -d.field("access_control_list", val); -} -d.field("bucket_name", &self.bucket_name); -if let Some(ref val) = self.canned_acl { -d.field("canned_acl", val); -} -if let Some(ref val) = self.encryption { -d.field("encryption", val); +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ObjectLockRetentionMode(Cow<'static, str>); + +impl ObjectLockRetentionMode { + pub const COMPLIANCE: &'static str = "COMPLIANCE"; + + pub const GOVERNANCE: &'static str = "GOVERNANCE"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -d.field("prefix", &self.prefix); -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); + +impl From for ObjectLockRetentionMode { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.tagging { -d.field("tagging", val); + +impl From for Cow<'static, str> { + fn from(s: ObjectLockRetentionMode) -> Self { + s.0 + } } -if let Some(ref val) = self.user_metadata { -d.field("user_metadata", val); + +impl FromStr for ObjectLockRetentionMode { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -d.finish_non_exhaustive() + +///

    The container element for an Object Lock rule.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ObjectLockRule { + ///

    The default Object Lock retention mode and period that you want to apply to new objects + /// placed in the specified bucket. Bucket settings require both a mode and a period. The + /// period can be either Days or Years but you must select one. You + /// cannot specify Days and Years at the same time.

    + pub default_retention: Option, } + +impl fmt::Debug for ObjectLockRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectLockRule"); + if let Some(ref val) = self.default_retention { + d.field("default_retention", val); + } + d.finish_non_exhaustive() + } } +pub type ObjectLockToken = String; -pub type S3TablesArn = String; +///

    The source object of the COPY action is not in the active tier and is only stored in +/// Amazon S3 Glacier.

    +#[derive(Clone, Default, PartialEq)] +pub struct ObjectNotInActiveTierError {} -pub type S3TablesBucketArn = String; +impl fmt::Debug for ObjectNotInActiveTierError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectNotInActiveTierError"); + d.finish_non_exhaustive() + } +} +///

    The container element for object ownership for a bucket's ownership controls.

    ///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct S3TablesDestination { +/// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to +/// the bucket owner if the objects are uploaded with the +/// bucket-owner-full-control canned ACL.

    ///

    -/// The Amazon Resource Name (ARN) for the table bucket that's specified as the -/// destination in the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. -///

    - pub table_bucket_arn: S3TablesBucketArn, +/// ObjectWriter - The uploading account will own the object if the object is +/// uploaded with the bucket-owner-full-control canned ACL.

    ///

    -/// The name for the metadata table in your metadata table configuration. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    - pub table_name: S3TablesName, +/// BucketOwnerEnforced - Access control lists (ACLs) are disabled and no +/// longer affect permissions. The bucket owner automatically owns and has full control over +/// every object in the bucket. The bucket only accepts PUT requests that don't specify an ACL +/// or specify bucket owner full control ACLs (such as the predefined +/// bucket-owner-full-control canned ACL or a custom ACL in XML format that +/// grants the same permissions).

    +///

    By default, ObjectOwnership is set to BucketOwnerEnforced and +/// ACLs are disabled. We recommend keeping ACLs disabled, except in uncommon use cases where +/// you must control access for each object individually. For more information about S3 Object +/// Ownership, see Controlling ownership of +/// objects and disabling ACLs for your bucket in the +/// Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets. Directory buckets use the bucket owner enforced setting for S3 Object Ownership.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectOwnership(Cow<'static, str>); + +impl ObjectOwnership { + pub const BUCKET_OWNER_ENFORCED: &'static str = "BucketOwnerEnforced"; + + pub const BUCKET_OWNER_PREFERRED: &'static str = "BucketOwnerPreferred"; + + pub const OBJECT_WRITER: &'static str = "ObjectWriter"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for S3TablesDestination { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("S3TablesDestination"); -d.field("table_bucket_arn", &self.table_bucket_arn); -d.field("table_name", &self.table_name); -d.finish_non_exhaustive() +impl From for ObjectOwnership { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: ObjectOwnership) -> Self { + s.0 + } } +impl FromStr for ObjectOwnership { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } +} -///

    -/// The destination information for the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    +///

    A container for elements related to an individual part.

    #[derive(Clone, Default, PartialEq)] -pub struct S3TablesDestinationResult { -///

    -/// The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The -/// specified metadata table name must be unique within the aws_s3_metadata namespace -/// in the destination table bucket. -///

    - pub table_arn: S3TablesArn, -///

    -/// The Amazon Resource Name (ARN) for the table bucket that's specified as the -/// destination in the metadata table configuration. The destination table bucket -/// must be in the same Region and Amazon Web Services account as the general purpose bucket. -///

    - pub table_bucket_arn: S3TablesBucketArn, -///

    -/// The name for the metadata table in your metadata table configuration. The specified metadata -/// table name must be unique within the aws_s3_metadata namespace in the destination -/// table bucket. -///

    - pub table_name: S3TablesName, -///

    -/// The table bucket namespace for the metadata table in your metadata table configuration. This value -/// is always aws_s3_metadata. -///

    - pub table_namespace: S3TablesNamespace, +pub struct ObjectPart { + ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a + /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present + /// if the multipart upload request was created with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present + /// if the multipart upload request was created with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    The part number identifying the part. This value is a positive integer between 1 and + /// 10,000.

    + pub part_number: Option, + ///

    The size of the uploaded part in bytes.

    + pub size: Option, } -impl fmt::Debug for S3TablesDestinationResult { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("S3TablesDestinationResult"); -d.field("table_arn", &self.table_arn); -d.field("table_bucket_arn", &self.table_bucket_arn); -d.field("table_name", &self.table_name); -d.field("table_namespace", &self.table_namespace); -d.finish_non_exhaustive() -} +impl fmt::Debug for ObjectPart { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectPart"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + d.finish_non_exhaustive() + } } +pub type ObjectSize = i64; -pub type S3TablesName = String; +pub type ObjectSizeGreaterThanBytes = i64; -pub type S3TablesNamespace = String; +pub type ObjectSizeLessThanBytes = i64; -pub type SSECustomerAlgorithm = String; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectStorageClass(Cow<'static, str>); -pub type SSECustomerKey = String; +impl ObjectStorageClass { + pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; -pub type SSECustomerKeyMD5 = String; + pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; -///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SSEKMS { -///

    Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for -/// encrypting inventory reports.

    - pub key_id: SSEKMSKeyId, -} + pub const GLACIER: &'static str = "GLACIER"; -impl fmt::Debug for SSEKMS { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SSEKMS"); -d.field("key_id", &self.key_id); -d.finish_non_exhaustive() -} -} + pub const GLACIER_IR: &'static str = "GLACIER_IR"; + pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; -pub type SSEKMSEncryptionContext = String; + pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; -pub type SSEKMSKeyId = String; + pub const OUTPOSTS: &'static str = "OUTPOSTS"; -///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SSES3 { + pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; + + pub const SNOW: &'static str = "SNOW"; + + pub const STANDARD: &'static str = "STANDARD"; + + pub const STANDARD_IA: &'static str = "STANDARD_IA"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for SSES3 { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SSES3"); -d.finish_non_exhaustive() +impl From for ObjectStorageClass { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } + +impl From for Cow<'static, str> { + fn from(s: ObjectStorageClass) -> Self { + s.0 + } } +impl FromStr for ObjectStorageClass { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } +} -///

    Specifies the byte range of the object to get the records from. A record is processed -/// when its first byte is contained by the range. This parameter is optional, but when -/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the -/// start and end of the range.

    +///

    The version of an object.

    #[derive(Clone, Default, PartialEq)] -pub struct ScanRange { -///

    Specifies the end of the byte range. This parameter is optional. Valid values: -/// non-negative integers. The default value is one less than the size of the object being -/// queried. If only the End parameter is supplied, it is interpreted to mean scan the last N -/// bytes of the file. For example, -/// 50 means scan the -/// last 50 bytes.

    - pub end: Option, -///

    Specifies the start of the byte range. This parameter is optional. Valid values: -/// non-negative integers. The default value is 0. If only start is supplied, it -/// means scan from that point to the end of the file. For example, -/// 50 means scan -/// from byte 50 until the end of the file.

    - pub start: Option, +pub struct ObjectVersion { + ///

    The algorithm that was used to create a checksum of the object.

    + pub checksum_algorithm: Option, + ///

    The checksum type that is used to calculate the object’s + /// checksum value. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    The entity tag is an MD5 hash of that version of the object.

    + pub e_tag: Option, + ///

    Specifies whether the object is (true) or is not (false) the latest version of an + /// object.

    + pub is_latest: Option, + ///

    The object key.

    + pub key: Option, + ///

    Date and time when the object was last modified.

    + pub last_modified: Option, + ///

    Specifies the owner of the object.

    + pub owner: Option, + ///

    Specifies the restoration status of an object. Objects in certain storage classes must + /// be restored before they can be retrieved. For more information about these storage classes + /// and how to work with archived objects, see Working with archived + /// objects in the Amazon S3 User Guide.

    + pub restore_status: Option, + ///

    Size in bytes of the object.

    + pub size: Option, + ///

    The class of storage used to store the object.

    + pub storage_class: Option, + ///

    Version ID of an object.

    + pub version_id: Option, } -impl fmt::Debug for ScanRange { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ScanRange"); -if let Some(ref val) = self.end { -d.field("end", val); -} -if let Some(ref val) = self.start { -d.field("start", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for ObjectVersion { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ObjectVersion"); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.is_latest { + d.field("is_latest", val); + } + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.owner { + d.field("owner", val); + } + if let Some(ref val) = self.restore_status { + d.field("restore_status", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } +pub type ObjectVersionId = String; -///

    The container for selecting objects from a content event stream.

    -#[derive(Debug, Clone, PartialEq)] -#[non_exhaustive] -pub enum SelectObjectContentEvent { -///

    The Continuation Event.

    - Cont(ContinuationEvent), -///

    The End Event.

    - End(EndEvent), -///

    The Progress Event.

    - Progress(ProgressEvent), -///

    The Records Event.

    - Records(RecordsEvent), -///

    The Stats Event.

    - Stats(StatsEvent), +pub type ObjectVersionList = List; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ObjectVersionStorageClass(Cow<'static, str>); + +impl ObjectVersionStorageClass { + pub const STANDARD: &'static str = "STANDARD"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -/// -///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query -/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a -/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data -/// into records. It returns only records that match the specified SQL expression. You must -/// also specify the data serialization format for the response. For more information, see -/// S3Select API Documentation.

    -#[derive(Clone, PartialEq)] -pub struct SelectObjectContentInput { -///

    The S3 bucket.

    - pub bucket: BucketName, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    The object key.

    - pub key: ObjectKey, -///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created -/// using a checksum algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    - pub sse_customer_algorithm: Option, -///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. -/// For more information, see -/// Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    - pub sse_customer_key: Option, -///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum -/// algorithm. For more information, -/// see Protecting data using SSE-C keys in the -/// Amazon S3 User Guide.

    - pub sse_customer_key_md5: Option, - pub request: SelectObjectContentRequest, +impl From for ObjectVersionStorageClass { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for SelectObjectContentInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SelectObjectContentInput"); -d.field("bucket", &self.bucket); -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); +impl From for Cow<'static, str> { + fn from(s: ObjectVersionStorageClass) -> Self { + s.0 + } } -d.field("key", &self.key); -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); + +impl FromStr for ObjectVersionStorageClass { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct OptionalObjectAttributes(Cow<'static, str>); + +impl OptionalObjectAttributes { + pub const RESTORE_STATUS: &'static str = "RestoreStatus"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); + +impl From for OptionalObjectAttributes { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.field("request", &self.request); -d.finish_non_exhaustive() + +impl From for Cow<'static, str> { + fn from(s: OptionalObjectAttributes) -> Self { + s.0 + } } + +impl FromStr for OptionalObjectAttributes { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl SelectObjectContentInput { -#[must_use] -pub fn builder() -> builders::SelectObjectContentInputBuilder { -default() +pub type OptionalObjectAttributesList = List; + +///

    Describes the location where the restore job's output is stored.

    +#[derive(Clone, Default, PartialEq)] +pub struct OutputLocation { + ///

    Describes an S3 location that will receive the results of the restore request.

    + pub s3: Option, } + +impl fmt::Debug for OutputLocation { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("OutputLocation"); + if let Some(ref val) = self.s3 { + d.field("s3", val); + } + d.finish_non_exhaustive() + } } -#[derive(Default)] -pub struct SelectObjectContentOutput { -///

    The array of results.

    - pub payload: Option, +///

    Describes how results of the Select job are serialized.

    +#[derive(Clone, Default, PartialEq)] +pub struct OutputSerialization { + ///

    Describes the serialization of CSV-encoded Select results.

    + pub csv: Option, + ///

    Specifies JSON as request's output serialization format.

    + pub json: Option, } -impl fmt::Debug for SelectObjectContentOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SelectObjectContentOutput"); -if let Some(ref val) = self.payload { -d.field("payload", val); +impl fmt::Debug for OutputSerialization { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("OutputSerialization"); + if let Some(ref val) = self.csv { + d.field("csv", val); + } + if let Some(ref val) = self.json { + d.field("json", val); + } + d.finish_non_exhaustive() + } } -d.finish_non_exhaustive() + +///

    Container for the owner's display name and ID.

    +#[derive(Clone, Default, PartialEq)] +pub struct Owner { + ///

    Container for the display name of the owner. This value is only supported in the + /// following Amazon Web Services Regions:

    + ///
      + ///
    • + ///

      US East (N. Virginia)

      + ///
    • + ///
    • + ///

      US West (N. California)

      + ///
    • + ///
    • + ///

      US West (Oregon)

      + ///
    • + ///
    • + ///

      Asia Pacific (Singapore)

      + ///
    • + ///
    • + ///

      Asia Pacific (Sydney)

      + ///
    • + ///
    • + ///

      Asia Pacific (Tokyo)

      + ///
    • + ///
    • + ///

      Europe (Ireland)

      + ///
    • + ///
    • + ///

      South America (São Paulo)

      + ///
    • + ///
    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub display_name: Option, + ///

    Container for the ID of the owner.

    + pub id: Option, } + +impl fmt::Debug for Owner { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Owner"); + if let Some(ref val) = self.display_name { + d.field("display_name", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.finish_non_exhaustive() + } } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct OwnerOverride(Cow<'static, str>); -/// -///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query -/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a -/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data -/// into records. It returns only records that match the specified SQL expression. You must -/// also specify the data serialization format for the response. For more information, see -/// S3Select API Documentation.

    -#[derive(Clone, PartialEq)] -pub struct SelectObjectContentRequest { -///

    The expression that is used to query the object.

    - pub expression: Expression, -///

    The type of the provided expression (for example, SQL).

    - pub expression_type: ExpressionType, -///

    Describes the format of the data in the object that is being queried.

    - pub input_serialization: InputSerialization, -///

    Describes the format of the data that you want Amazon S3 to return in response.

    - pub output_serialization: OutputSerialization, -///

    Specifies if periodic request progress information should be enabled.

    - pub request_progress: Option, -///

    Specifies the byte range of the object to get the records from. A record is processed -/// when its first byte is contained by the range. This parameter is optional, but when -/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the -/// start and end of the range.

    -///

    -/// ScanRangemay be used in the following ways:

    -///
      -///
    • -///

      -/// 50100 -/// - process only the records starting between the bytes 50 and 100 (inclusive, counting -/// from zero)

      -///
    • -///
    • -///

      -/// 50 - -/// process only the records starting after the byte 50

      -///
    • -///
    • -///

      -/// 50 - -/// process only the records within the last 50 bytes of the file.

      -///
    • -///
    - pub scan_range: Option, +impl OwnerOverride { + pub const DESTINATION: &'static str = "Destination"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for SelectObjectContentRequest { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SelectObjectContentRequest"); -d.field("expression", &self.expression); -d.field("expression_type", &self.expression_type); -d.field("input_serialization", &self.input_serialization); -d.field("output_serialization", &self.output_serialization); -if let Some(ref val) = self.request_progress { -d.field("request_progress", val); +impl From for OwnerOverride { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.scan_range { -d.field("scan_range", val); + +impl From for Cow<'static, str> { + fn from(s: OwnerOverride) -> Self { + s.0 + } } -d.finish_non_exhaustive() + +impl FromStr for OwnerOverride { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +///

    The container element for a bucket's ownership controls.

    +#[derive(Clone, Default, PartialEq)] +pub struct OwnershipControls { + ///

    The container element for an ownership control rule.

    + pub rules: OwnershipControlsRules, } +impl fmt::Debug for OwnershipControls { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("OwnershipControls"); + d.field("rules", &self.rules); + d.finish_non_exhaustive() + } +} -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    Describes the parameters for Select job types.

    -///

    Learn How to optimize querying your data in Amazon S3 using -/// Amazon Athena, S3 Object Lambda, or client-side filtering.

    +///

    The container element for an ownership control rule.

    #[derive(Clone, PartialEq)] -pub struct SelectParameters { -/// -///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more -///

    -///
    -///

    The expression that is used to query the object.

    - pub expression: Expression, -///

    The type of the provided expression (for example, SQL).

    - pub expression_type: ExpressionType, -///

    Describes the serialization format of the object.

    - pub input_serialization: InputSerialization, -///

    Describes how the results of the Select job are serialized.

    - pub output_serialization: OutputSerialization, +pub struct OwnershipControlsRule { + pub object_ownership: ObjectOwnership, } -impl fmt::Debug for SelectParameters { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SelectParameters"); -d.field("expression", &self.expression); -d.field("expression_type", &self.expression_type); -d.field("input_serialization", &self.input_serialization); -d.field("output_serialization", &self.output_serialization); -d.finish_non_exhaustive() +impl fmt::Debug for OwnershipControlsRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("OwnershipControlsRule"); + d.field("object_ownership", &self.object_ownership); + d.finish_non_exhaustive() + } +} + +pub type OwnershipControlsRules = List; + +///

    Container for Parquet.

    +#[derive(Clone, Default, PartialEq)] +pub struct ParquetInput {} + +impl fmt::Debug for ParquetInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ParquetInput"); + d.finish_non_exhaustive() + } } + +///

    Container for elements related to a part.

    +#[derive(Clone, Default, PartialEq)] +pub struct Part { + ///

    The Base64 encoded, 32-bit CRC32 checksum of the part. This checksum is present + /// if the object was uploaded with the CRC32 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the part. This checksum is present + /// if the object was uploaded with the CRC32C checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the part. This checksum is present + /// if the multipart upload request was created with the CRC64NVME checksum algorithm, or if the object was uploaded without a + /// checksum (and Amazon S3 added the default checksum, CRC64NVME, to the uploaded object). For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 checksum of the part. This checksum is present + /// if the object was uploaded with the SHA1 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 checksum of the part. This checksum is present + /// if the object was uploaded with the SHA256 checksum algorithm. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Entity tag returned when the part was uploaded.

    + pub e_tag: Option, + ///

    Date and time at which the part was uploaded.

    + pub last_modified: Option, + ///

    Part number identifying the part. This is a positive integer between 1 and + /// 10,000.

    + pub part_number: Option, + ///

    Size in bytes of the uploaded part data.

    + pub size: Option, } +impl fmt::Debug for Part { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Part"); + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.part_number { + d.field("part_number", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + d.finish_non_exhaustive() + } +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct ServerSideEncryption(Cow<'static, str>); +pub type PartNumber = i32; -impl ServerSideEncryption { -pub const AES256: &'static str = "AES256"; +pub type PartNumberMarker = i32; -pub const AWS_KMS: &'static str = "aws:kms"; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct PartitionDateSource(Cow<'static, str>); -pub const AWS_KMS_DSSE: &'static str = "aws:kms:dsse"; +impl PartitionDateSource { + pub const DELIVERY_TIME: &'static str = "DeliveryTime"; -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 -} + pub const EVENT_TIME: &'static str = "EventTime"; -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl From for ServerSideEncryption { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl From for PartitionDateSource { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -impl From for Cow<'static, str> { -fn from(s: ServerSideEncryption) -> Self { -s.0 -} +impl From for Cow<'static, str> { + fn from(s: PartitionDateSource) -> Self { + s.0 + } } -impl FromStr for ServerSideEncryption { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl FromStr for PartitionDateSource { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -///

    Describes the default server-side encryption to apply to new objects in the bucket. If a -/// PUT Object request doesn't specify any server-side encryption, this default encryption will -/// be applied. For more information, see PutBucketEncryption.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you don't specify -/// a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key -/// (aws/s3) in your Amazon Web Services account the first time that you add an -/// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key -/// for SSE-KMS.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -///

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

      -///
    • -///
    -///
    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionByDefault { -///

    Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default -/// encryption.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - This parameter is -/// allowed if and only if SSEAlgorithm is set to aws:kms or -/// aws:kms:dsse.

      -///
    • -///
    • +///

      Amazon S3 keys for log objects are partitioned in the following format:

      ///

      -/// Directory buckets - This parameter is -/// allowed if and only if SSEAlgorithm is set to -/// aws:kms.

      -///
    • -///
    -///
    -///

    You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS -/// key.

    -///
      -///
    • -///

      Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab -///

      -///
    • -///
    • -///

      Key ARN: -/// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab -///

      -///
    • -///
    • -///

      Key Alias: alias/alias-name +/// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] ///

      -///
    • -///
    -///

    If you are using encryption with cross-account or Amazon Web Services service operations, you must use -/// a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you're specifying -/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. -/// If you use a KMS key alias instead, then KMS resolves the key within the -/// requester’s account. This behavior can result in data that's encrypted with a -/// KMS key that belongs to the requester, and not the bucket owner. Also, if you -/// use a key ID, you can run into a LogDestination undeliverable error when creating -/// a VPC flow log.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      -///
    • -///
    -///
    -/// -///

    Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service -/// Developer Guide.

    -///
    - pub kms_master_key_id: Option, -///

    Server-side encryption algorithm to use for the default encryption.

    -/// -///

    For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

    -///
    - pub sse_algorithm: ServerSideEncryption, +///

    PartitionedPrefix defaults to EventTime delivery when server access logs are +/// delivered.

    +#[derive(Clone, Default, PartialEq)] +pub struct PartitionedPrefix { + ///

    Specifies the partition date source for the partitioned prefix. + /// PartitionDateSource can be EventTime or + /// DeliveryTime.

    + ///

    For DeliveryTime, the time in the log file names corresponds to the + /// delivery time for the log files.

    + ///

    For EventTime, The logs delivered are for a specific day only. The year, + /// month, and day correspond to the day on which the event occurred, and the hour, minutes and + /// seconds are set to 00 in the key.

    + pub partition_date_source: Option, } -impl fmt::Debug for ServerSideEncryptionByDefault { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ServerSideEncryptionByDefault"); -if let Some(ref val) = self.kms_master_key_id { -d.field("kms_master_key_id", val); -} -d.field("sse_algorithm", &self.sse_algorithm); -d.finish_non_exhaustive() +impl fmt::Debug for PartitionedPrefix { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PartitionedPrefix"); + if let Some(ref val) = self.partition_date_source { + d.field("partition_date_source", val); + } + d.finish_non_exhaustive() + } } + +pub type Parts = List; + +pub type PartsCount = i32; + +pub type PartsList = List; + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Payer(Cow<'static, str>); + +impl Payer { + pub const BUCKET_OWNER: &'static str = "BucketOwner"; + + pub const REQUESTER: &'static str = "Requester"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } +impl From for Payer { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } +} -///

    Specifies the default server-side-encryption configuration.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionConfiguration { -///

    Container for information about a particular server-side encryption configuration -/// rule.

    - pub rules: ServerSideEncryptionRules, +impl From for Cow<'static, str> { + fn from(s: Payer) -> Self { + s.0 + } } -impl fmt::Debug for ServerSideEncryptionConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ServerSideEncryptionConfiguration"); -d.field("rules", &self.rules); -d.finish_non_exhaustive() +impl FromStr for Payer { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Permission(Cow<'static, str>); + +impl Permission { + pub const FULL_CONTROL: &'static str = "FULL_CONTROL"; + + pub const READ: &'static str = "READ"; + + pub const READ_ACP: &'static str = "READ_ACP"; + + pub const WRITE: &'static str = "WRITE"; + + pub const WRITE_ACP: &'static str = "WRITE_ACP"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } +impl From for Permission { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } +} -///

    Specifies the default server-side encryption configuration.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you're specifying -/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. -/// If you use a KMS key alias instead, then KMS resolves the key within the -/// requester’s account. This behavior can result in data that's encrypted with a -/// KMS key that belongs to the requester, and not the bucket owner.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      -///
    • -///
    -///
    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct ServerSideEncryptionRule { -///

    Specifies the default server-side encryption to apply to new objects in the bucket. If a -/// PUT Object request doesn't specify any server-side encryption, this default encryption will -/// be applied.

    - pub apply_server_side_encryption_by_default: Option, -///

    Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS -/// (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the -/// BucketKeyEnabled element to true causes Amazon S3 to use an S3 -/// Bucket Key.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - By default, S3 -/// Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      -///
    • -///
    -///
    - pub bucket_key_enabled: Option, +impl From for Cow<'static, str> { + fn from(s: Permission) -> Self { + s.0 + } } -impl fmt::Debug for ServerSideEncryptionRule { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("ServerSideEncryptionRule"); -if let Some(ref val) = self.apply_server_side_encryption_by_default { -d.field("apply_server_side_encryption_by_default", val); +impl FromStr for Permission { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); + +pub type Policy = String; + +///

    The container element for a bucket's policy status.

    +#[derive(Clone, Default, PartialEq)] +pub struct PolicyStatus { + ///

    The policy status for this bucket. TRUE indicates that this bucket is + /// public. FALSE indicates that the bucket is not public.

    + pub is_public: Option, } -d.finish_non_exhaustive() + +impl fmt::Debug for PolicyStatus { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PolicyStatus"); + if let Some(ref val) = self.is_public { + d.field("is_public", val); + } + d.finish_non_exhaustive() + } } + +#[derive(Default)] +pub struct PostObjectInput { + ///

    The canned ACL to apply to the object. For more information, see Canned + /// ACL in the Amazon S3 User Guide.

    + ///

    When adding a new object, you can use headers to grant ACL-based permissions to + /// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are + /// then added to the ACL on the object. By default, all objects are private. Only the owner + /// has full access control. For more information, see Access Control List (ACL) Overview + /// and Managing + /// ACLs Using the REST API in the Amazon S3 User Guide.

    + ///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting + /// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that + /// use this setting only accept PUT requests that don't specify an ACL or PUT requests that + /// specify bucket owner full control ACLs, such as the bucket-owner-full-control + /// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that + /// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a + /// 400 error with the error code AccessControlListNotSupported. + /// For more information, see Controlling ownership of + /// objects and disabling ACLs in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub acl: Option, + ///

    Object data.

    + pub body: Option, + ///

    The bucket name to which the PUT action was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    + ///

    + /// General purpose buckets - Setting this header to + /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with + /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 + /// Bucket Key.

    + ///

    + /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + pub bucket_key_enabled: Option, + ///

    Can be used to specify caching behavior along the request/reply chain. For more + /// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    + pub cache_control: Option, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    + ///

    For the x-amz-checksum-algorithm + /// header, replace + /// algorithm + /// with the supported algorithm from the following list:

    + ///
      + ///
    • + ///

      + /// CRC32 + ///

      + ///
    • + ///
    • + ///

      + /// CRC32C + ///

      + ///
    • + ///
    • + ///

      + /// CRC64NVME + ///

      + ///
    • + ///
    • + ///

      + /// SHA1 + ///

      + ///
    • + ///
    • + ///

      + /// SHA256 + ///

      + ///
    • + ///
    + ///

    For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    + /// + ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is + /// required for any request to upload an object with a retention period configured using + /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the + /// Amazon S3 User Guide.

    + ///
    + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + pub checksum_algorithm: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the object. The CRC64NVME checksum is + /// always a full object checksum. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    + pub content_disposition: Option, + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be + /// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    + pub content_length: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to + /// RFC 1864. This header can be used as a message integrity check to verify that the data is + /// the same data that was originally sent. Although it is optional, we recommend using the + /// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST + /// request authentication, see REST Authentication.

    + /// + ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is + /// required for any request to upload an object with a retention period configured using + /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the + /// Amazon S3 User Guide.

    + ///
    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    A standard MIME type describing the format of the contents. For more information, see + /// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    + pub content_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The date and time at which the object is no longer cacheable. For more information, see + /// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    + pub expires: Option, + ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_full_control: Option, + ///

    Allows grantee to read the object data and its metadata.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_read: Option, + ///

    Allows grantee to read the object ACL.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_read_acp: Option, + ///

    Allows grantee to write the ACL for the applicable object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_write_acp: Option, + ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE + /// operation matches the ETag of the object in S3. If the ETag values do not match, the + /// operation returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    + ///

    Expects the ETag value as a string.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_match: Option, + ///

    Uploads the object only if the object key name does not already exist in the bucket + /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 + /// ConditionalRequestConflict response. On a 409 failure you should retry the + /// upload.

    + ///

    Expects the '*' (asterisk) character.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_none_match: Option, + ///

    Object key for which the PUT action was initiated.

    + pub key: ObjectKey, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    Specifies whether a legal hold will be applied to this object. For more information + /// about S3 Object Lock, see Object Lock in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_legal_hold_status: Option, + ///

    The Object Lock mode that you want to apply to this object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_mode: Option, + ///

    The date and time when you want this object's Object Lock to expire. Must be formatted + /// as a timestamp parameter.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_retain_until_date: Option, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, + /// AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets passed on + /// to Amazon Web Services KMS for future GetObject operations on + /// this object.

    + ///

    + /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + pub ssekms_encryption_context: Option, + ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same + /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    + ///

    + /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS + /// key to use. If you specify + /// x-amz-server-side-encryption:aws:kms or + /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key + /// (aws/s3) to protect the data.

    + ///

    + /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the + /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses + /// the bucket's default KMS customer managed key ID. If you want to explicitly set the + /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + /// + /// Incorrect key specification results in an HTTP 400 Bad Request error.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 + /// (for example, AES256, aws:kms, aws:kms:dsse).

    + ///
      + ///
    • + ///

      + /// General purpose buckets - You have four mutually + /// exclusive options to protect data using server-side encryption in Amazon S3, depending on + /// how you choose to manage the encryption keys. Specifically, the encryption key + /// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and + /// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by + /// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt + /// data at rest by using server-side encryption with other key options. For more + /// information, see Using Server-Side + /// Encryption in the Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. + /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. + /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and + /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. + ///

      + /// + ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the + /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. + /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), + /// the encryption request headers must match the default encryption configuration of the directory bucket. + /// + ///

      + ///
      + ///
    • + ///
    + pub server_side_encryption: Option, + ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The + /// STANDARD storage class provides high durability and high availability. Depending on + /// performance needs, you can specify a different Storage Class. For more information, see + /// Storage + /// Classes in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store + /// newly created objects.

      + ///
    • + ///
    • + ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      + ///
    • + ///
    + ///
    + pub storage_class: Option, + ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For + /// example, "Key1=Value1")

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub tagging: Option, + pub version_id: Option, + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata. For information about object metadata, see Object Key and Metadata in the + /// Amazon S3 User Guide.

    + ///

    In the following example, the request header sets the redirect to an object + /// (anotherPage.html) in the same bucket:

    + ///

    + /// x-amz-website-redirect-location: /anotherPage.html + ///

    + ///

    In the following example, the request header sets the object redirect to another + /// website:

    + ///

    + /// x-amz-website-redirect-location: http://www.example.com/ + ///

    + ///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and + /// How to + /// Configure Website Page Redirects in the Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub website_redirect_location: Option, + ///

    + /// Specifies the offset for appending data to existing objects in bytes. + /// The offset must be equal to the size of the existing object being appended to. + /// If no object exists, setting this header to 0 will create a new object. + ///

    + /// + ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    + ///
    + pub write_offset_bytes: Option, + /// The URL to which the client is redirected upon successful upload. + pub success_action_redirect: Option, + /// The status code returned to the client upon successful upload. Valid values are 200, 201, and 204. + pub success_action_status: Option, + /// The POST policy document that was included in the request. + pub policy: Option, } +impl fmt::Debug for PostObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PostObjectInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + if let Some(ref val) = self.body { + d.field("body", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + if let Some(ref val) = self.write_offset_bytes { + d.field("write_offset_bytes", val); + } + if let Some(ref val) = self.success_action_redirect { + d.field("success_action_redirect", val); + } + if let Some(ref val) = self.success_action_status { + d.field("success_action_status", val); + } + if let Some(ref val) = self.policy { + d.field("policy", val); + } + d.finish_non_exhaustive() + } +} -pub type ServerSideEncryptionRules = List; +impl PostObjectInput { + #[must_use] + pub fn builder() -> builders::PostObjectInputBuilder { + default() + } +} -pub type SessionCredentialValue = String; +#[derive(Clone, Default, PartialEq)] +pub struct PostObjectOutput { + ///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header + /// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it + /// was uploaded without a checksum (and Amazon S3 added the default checksum, + /// CRC64NVME, to the uploaded object). For more information about how + /// checksums are calculated with multipart uploads, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    This header specifies the checksum type of the object, which determines how part-level + /// checksums are combined to create an object-level checksum for multipart objects. For + /// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a + /// data integrity check to verify that the checksum type that is received is the same checksum + /// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Entity tag for the uploaded object.

    + ///

    + /// General purpose buckets - To ensure that data is not + /// corrupted traversing the network, for objects where the ETag is the MD5 digest of the + /// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned + /// ETag to the calculated MD5 value.

    + ///

    + /// Directory buckets - The ETag for the object in + /// a directory bucket isn't the MD5 digest of the object.

    + pub e_tag: Option, + ///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, + /// the response includes this header. It includes the expiry-date and + /// rule-id key-value pairs that provide information about object expiration. + /// The value of the rule-id is URL-encoded.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    + pub expiration: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets + /// passed on to Amazon Web Services KMS for future GetObject + /// operations on this object.

    + pub ssekms_encryption_context: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, + ///

    + /// The size of the object in bytes. This value is only be present if you append to an object. + ///

    + /// + ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    + ///
    + pub size: Option, + ///

    Version ID of the object.

    + ///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID + /// for the object being stored. Amazon S3 returns this ID in the response. When you enable + /// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object + /// simultaneously, it stores all of the objects. For more information about versioning, see + /// Adding Objects to + /// Versioning-Enabled Buckets in the Amazon S3 User Guide. For + /// information about returning the versioning state of a bucket, see GetBucketVersioning.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, +} -///

    The established temporary security credentials of the session.

    -/// -///

    -/// Directory buckets - These session -/// credentials are only supported for the authentication and authorization of Zonal endpoint API operations -/// on directory buckets.

    -///
    -#[derive(Clone, PartialEq)] -pub struct SessionCredentials { -///

    A unique identifier that's associated with a secret access key. The access key ID and -/// the secret access key are used together to sign programmatic Amazon Web Services requests -/// cryptographically.

    - pub access_key_id: AccessKeyIdValue, -///

    Temporary security credentials expire after a specified interval. After temporary -/// credentials expire, any calls that you make with those credentials will fail. So you must -/// generate a new set of temporary credentials. Temporary credentials cannot be extended or -/// refreshed beyond the original specified interval.

    - pub expiration: SessionExpiration, -///

    A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services -/// requests. Signing a request identifies the sender and prevents the request from being -/// altered.

    - pub secret_access_key: SessionCredentialValue, -///

    A part of the temporary security credentials. The session token is used to validate the -/// temporary security credentials. -/// -///

    - pub session_token: SessionCredentialValue, +impl fmt::Debug for PostObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PostObjectOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl fmt::Debug for SessionCredentials { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SessionCredentials"); -d.field("access_key_id", &self.access_key_id); -d.field("expiration", &self.expiration); -d.field("secret_access_key", &self.secret_access_key); -d.field("session_token", &self.session_token); -d.finish_non_exhaustive() -} -} +pub type Prefix = String; -impl Default for SessionCredentials { -fn default() -> Self { -Self { -access_key_id: default(), -expiration: default(), -secret_access_key: default(), -session_token: default(), +pub type Priority = i32; + +///

    This data type contains information about progress of an operation.

    +#[derive(Clone, Default, PartialEq)] +pub struct Progress { + ///

    The current number of uncompressed object bytes processed.

    + pub bytes_processed: Option, + ///

    The current number of bytes of records payload data returned.

    + pub bytes_returned: Option, + ///

    The current number of object bytes scanned.

    + pub bytes_scanned: Option, } + +impl fmt::Debug for Progress { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Progress"); + if let Some(ref val) = self.bytes_processed { + d.field("bytes_processed", val); + } + if let Some(ref val) = self.bytes_returned { + d.field("bytes_returned", val); + } + if let Some(ref val) = self.bytes_scanned { + d.field("bytes_scanned", val); + } + d.finish_non_exhaustive() + } } + +///

    This data type contains information about the progress event of an operation.

    +#[derive(Clone, Default, PartialEq)] +pub struct ProgressEvent { + ///

    The Progress event details.

    + pub details: Option, } +impl fmt::Debug for ProgressEvent { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ProgressEvent"); + if let Some(ref val) = self.details { + d.field("details", val); + } + d.finish_non_exhaustive() + } +} -pub type SessionExpiration = Timestamp; +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct Protocol(Cow<'static, str>); -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct SessionMode(Cow<'static, str>); +impl Protocol { + pub const HTTP: &'static str = "http"; -impl SessionMode { -pub const READ_ONLY: &'static str = "ReadOnly"; + pub const HTTPS: &'static str = "https"; -pub const READ_WRITE: &'static str = "ReadWrite"; + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl From for Protocol { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } +impl From for Cow<'static, str> { + fn from(s: Protocol) -> Self { + s.0 + } } -impl From for SessionMode { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl FromStr for Protocol { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl From for Cow<'static, str> { -fn from(s: SessionMode) -> Self { -s.0 -} +///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket. You can +/// enable the configuration options in any combination. For more information about when Amazon S3 +/// considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct PublicAccessBlockConfiguration { + ///

    Specifies whether Amazon S3 should block public access control lists (ACLs) for this bucket + /// and objects in this bucket. Setting this element to TRUE causes the following + /// behavior:

    + ///
      + ///
    • + ///

      PUT Bucket ACL and PUT Object ACL calls fail if the specified ACL is + /// public.

      + ///
    • + ///
    • + ///

      PUT Object calls fail if the request includes a public ACL.

      + ///
    • + ///
    • + ///

      PUT Bucket calls fail if the request includes a public ACL.

      + ///
    • + ///
    + ///

    Enabling this setting doesn't affect existing policies or ACLs.

    + pub block_public_acls: Option, + ///

    Specifies whether Amazon S3 should block public bucket policies for this bucket. Setting this + /// element to TRUE causes Amazon S3 to reject calls to PUT Bucket policy if the + /// specified bucket policy allows public access.

    + ///

    Enabling this setting doesn't affect existing bucket policies.

    + pub block_public_policy: Option, + ///

    Specifies whether Amazon S3 should ignore public ACLs for this bucket and objects in this + /// bucket. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs on + /// this bucket and objects in this bucket.

    + ///

    Enabling this setting doesn't affect the persistence of any existing ACLs and doesn't + /// prevent new public ACLs from being set.

    + pub ignore_public_acls: Option, + ///

    Specifies whether Amazon S3 should restrict public bucket policies for this bucket. Setting + /// this element to TRUE restricts access to this bucket to only Amazon Web Services service principals and authorized users within this account if the bucket has + /// a public policy.

    + ///

    Enabling this setting doesn't affect previously stored bucket policies, except that + /// public and cross-account access within any public bucket policy, including non-public + /// delegation to specific accounts, is blocked.

    + pub restrict_public_buckets: Option, } -impl FromStr for SessionMode { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl fmt::Debug for PublicAccessBlockConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PublicAccessBlockConfiguration"); + if let Some(ref val) = self.block_public_acls { + d.field("block_public_acls", val); + } + if let Some(ref val) = self.block_public_policy { + d.field("block_public_policy", val); + } + if let Some(ref val) = self.ignore_public_acls { + d.field("ignore_public_acls", val); + } + if let Some(ref val) = self.restrict_public_buckets { + d.field("restrict_public_buckets", val); + } + d.finish_non_exhaustive() + } } -pub type Setting = bool; - -///

    To use simple format for S3 keys for log objects, set SimplePrefix to an empty -/// object.

    -///

    -/// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] -///

    -#[derive(Clone, Default, PartialEq)] -pub struct SimplePrefix { +#[derive(Clone, PartialEq)] +pub struct PutBucketAccelerateConfigurationInput { + ///

    Container for setting the transfer acceleration state.

    + pub accelerate_configuration: AccelerateConfiguration, + ///

    The name of the bucket for which the accelerate configuration is set.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl fmt::Debug for SimplePrefix { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SimplePrefix"); -d.finish_non_exhaustive() -} +impl fmt::Debug for PutBucketAccelerateConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAccelerateConfigurationInput"); + d.field("accelerate_configuration", &self.accelerate_configuration); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } +impl PutBucketAccelerateConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketAccelerateConfigurationInputBuilder { + default() + } +} -pub type Size = i64; - -pub type SkipValidation = bool; - -pub type SourceIdentityType = String; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAccelerateConfigurationOutput {} -///

    A container that describes additional filters for identifying the source objects that -/// you want to replicate. You can choose to enable or disable the replication of these -/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created -/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service -/// (SSE-KMS).

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct SourceSelectionCriteria { -///

    A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't -/// replicate replica modifications by default. In the latest version of replication -/// configuration (when Filter is specified), you can specify this element and set -/// the status to Enabled to replicate modifications on replicas.

    -/// -///

    If you don't specify the Filter element, Amazon S3 assumes that the -/// replication configuration is the earlier version, V1. In the earlier version, this -/// element is not allowed

    -///
    - pub replica_modifications: Option, -///

    A container for filter information for the selection of Amazon S3 objects encrypted with -/// Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication -/// configuration, this element is required.

    - pub sse_kms_encrypted_objects: Option, +impl fmt::Debug for PutBucketAccelerateConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAccelerateConfigurationOutput"); + d.finish_non_exhaustive() + } } -impl fmt::Debug for SourceSelectionCriteria { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SourceSelectionCriteria"); -if let Some(ref val) = self.replica_modifications { -d.field("replica_modifications", val); -} -if let Some(ref val) = self.sse_kms_encrypted_objects { -d.field("sse_kms_encrypted_objects", val); -} -d.finish_non_exhaustive() -} +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAclInput { + ///

    The canned ACL to apply to the bucket.

    + pub acl: Option, + ///

    Contains the elements that set the ACL permissions for an object per grantee.

    + pub access_control_policy: Option, + ///

    The bucket to which to apply the ACL.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, go to RFC + /// 1864. + ///

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the + /// bucket.

    + pub grant_full_control: Option, + ///

    Allows grantee to list the objects in the bucket.

    + pub grant_read: Option, + ///

    Allows grantee to read the bucket ACL.

    + pub grant_read_acp: Option, + ///

    Allows grantee to create new objects in the bucket.

    + ///

    For the bucket and object owners of existing objects, also allows deletions and + /// overwrites of those objects.

    + pub grant_write: Option, + ///

    Allows grantee to write the ACL for the applicable bucket.

    + pub grant_write_acp: Option, } - -///

    A container for filter information for the selection of S3 objects encrypted with Amazon Web Services -/// KMS.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct SseKmsEncryptedObjects { -///

    Specifies whether Amazon S3 replicates objects created with server-side encryption using an -/// Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

    - pub status: SseKmsEncryptedObjectsStatus, +impl fmt::Debug for PutBucketAclInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAclInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + if let Some(ref val) = self.access_control_policy { + d.field("access_control_policy", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write { + d.field("grant_write", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + d.finish_non_exhaustive() + } } -impl fmt::Debug for SseKmsEncryptedObjects { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("SseKmsEncryptedObjects"); -d.field("status", &self.status); -d.finish_non_exhaustive() -} +impl PutBucketAclInput { + #[must_use] + pub fn builder() -> builders::PutBucketAclInputBuilder { + default() + } } +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAclOutput {} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct SseKmsEncryptedObjectsStatus(Cow<'static, str>); - -impl SseKmsEncryptedObjectsStatus { -pub const DISABLED: &'static str = "Disabled"; - -pub const ENABLED: &'static str = "Enabled"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +impl fmt::Debug for PutBucketAclOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAclOutput"); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +#[derive(Clone, PartialEq)] +pub struct PutBucketAnalyticsConfigurationInput { + ///

    The configuration and any analyses for the analytics filter.

    + pub analytics_configuration: AnalyticsConfiguration, + ///

    The name of the bucket to which an analytics configuration is stored.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID that identifies the analytics configuration.

    + pub id: AnalyticsId, } +impl fmt::Debug for PutBucketAnalyticsConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAnalyticsConfigurationInput"); + d.field("analytics_configuration", &self.analytics_configuration); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.finish_non_exhaustive() + } } -impl From for SseKmsEncryptedObjectsStatus { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl PutBucketAnalyticsConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketAnalyticsConfigurationInputBuilder { + default() + } } -impl From for Cow<'static, str> { -fn from(s: SseKmsEncryptedObjectsStatus) -> Self { -s.0 -} -} +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketAnalyticsConfigurationOutput {} -impl FromStr for SseKmsEncryptedObjectsStatus { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl fmt::Debug for PutBucketAnalyticsConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketAnalyticsConfigurationOutput"); + d.finish_non_exhaustive() + } } -pub type Start = i64; - -pub type StartAfter = String; - -///

    Container for the stats details.

    -#[derive(Clone, Default, PartialEq)] -pub struct Stats { -///

    The total number of uncompressed object bytes processed.

    - pub bytes_processed: Option, -///

    The total number of bytes of records payload data returned.

    - pub bytes_returned: Option, -///

    The total number of object bytes scanned.

    - pub bytes_scanned: Option, +#[derive(Clone, PartialEq)] +pub struct PutBucketCorsInput { + ///

    Specifies the bucket impacted by the corsconfiguration.

    + pub bucket: BucketName, + ///

    Describes the cross-origin access configuration for objects in an Amazon S3 bucket. For more + /// information, see Enabling + /// Cross-Origin Resource Sharing in the + /// Amazon S3 User Guide.

    + pub cors_configuration: CORSConfiguration, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, go to RFC + /// 1864. + ///

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl fmt::Debug for Stats { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Stats"); -if let Some(ref val) = self.bytes_processed { -d.field("bytes_processed", val); -} -if let Some(ref val) = self.bytes_returned { -d.field("bytes_returned", val); -} -if let Some(ref val) = self.bytes_scanned { -d.field("bytes_scanned", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for PutBucketCorsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketCorsInput"); + d.field("bucket", &self.bucket); + d.field("cors_configuration", &self.cors_configuration); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } +impl PutBucketCorsInput { + #[must_use] + pub fn builder() -> builders::PutBucketCorsInputBuilder { + default() + } +} -///

    Container for the Stats Event.

    #[derive(Clone, Default, PartialEq)] -pub struct StatsEvent { -///

    The Stats event details.

    - pub details: Option, -} +pub struct PutBucketCorsOutput {} -impl fmt::Debug for StatsEvent { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("StatsEvent"); -if let Some(ref val) = self.details { -d.field("details", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for PutBucketCorsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketCorsOutput"); + d.finish_non_exhaustive() + } } +#[derive(Clone, PartialEq)] +pub struct PutBucketEncryptionInput { + ///

    Specifies default encryption for a bucket using server-side encryption with different + /// key options.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + /// + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + ///
    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the server-side encryption + /// configuration.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    + pub expected_bucket_owner: Option, + pub server_side_encryption_configuration: ServerSideEncryptionConfiguration, +} -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StorageClass(Cow<'static, str>); - -impl StorageClass { -pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; - -pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; - -pub const GLACIER: &'static str = "GLACIER"; - -pub const GLACIER_IR: &'static str = "GLACIER_IR"; - -pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; - -pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; - -pub const OUTPOSTS: &'static str = "OUTPOSTS"; - -pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; +impl fmt::Debug for PutBucketEncryptionInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketEncryptionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("server_side_encryption_configuration", &self.server_side_encryption_configuration); + d.finish_non_exhaustive() + } +} -pub const SNOW: &'static str = "SNOW"; +impl PutBucketEncryptionInput { + #[must_use] + pub fn builder() -> builders::PutBucketEncryptionInputBuilder { + default() + } +} -pub const STANDARD: &'static str = "STANDARD"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketEncryptionOutput {} -pub const STANDARD_IA: &'static str = "STANDARD_IA"; +impl fmt::Debug for PutBucketEncryptionOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketEncryptionOutput"); + d.finish_non_exhaustive() + } +} -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +#[derive(Clone, PartialEq)] +pub struct PutBucketIntelligentTieringConfigurationInput { + ///

    The name of the Amazon S3 bucket whose configuration you want to modify or retrieve.

    + pub bucket: BucketName, + ///

    The ID used to identify the S3 Intelligent-Tiering configuration.

    + pub id: IntelligentTieringId, + ///

    Container for S3 Intelligent-Tiering configuration.

    + pub intelligent_tiering_configuration: IntelligentTieringConfiguration, } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl fmt::Debug for PutBucketIntelligentTieringConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationInput"); + d.field("bucket", &self.bucket); + d.field("id", &self.id); + d.field("intelligent_tiering_configuration", &self.intelligent_tiering_configuration); + d.finish_non_exhaustive() + } } +impl PutBucketIntelligentTieringConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketIntelligentTieringConfigurationInputBuilder { + default() + } } -impl From for StorageClass { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketIntelligentTieringConfigurationOutput {} -impl From for Cow<'static, str> { -fn from(s: StorageClass) -> Self { -s.0 -} +impl fmt::Debug for PutBucketIntelligentTieringConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketIntelligentTieringConfigurationOutput"); + d.finish_non_exhaustive() + } } -impl FromStr for StorageClass { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +#[derive(Clone, PartialEq)] +pub struct PutBucketInventoryConfigurationInput { + ///

    The name of the bucket where the inventory configuration will be stored.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID used to identify the inventory configuration.

    + pub id: InventoryId, + ///

    Specifies the inventory configuration.

    + pub inventory_configuration: InventoryConfiguration, } -///

    Specifies data related to access patterns to be collected and made available to analyze -/// the tradeoffs between different storage classes for an Amazon S3 bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct StorageClassAnalysis { -///

    Specifies how data related to the storage class analysis for an Amazon S3 bucket should be -/// exported.

    - pub data_export: Option, +impl fmt::Debug for PutBucketInventoryConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketInventoryConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.field("inventory_configuration", &self.inventory_configuration); + d.finish_non_exhaustive() + } } -impl fmt::Debug for StorageClassAnalysis { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("StorageClassAnalysis"); -if let Some(ref val) = self.data_export { -d.field("data_export", val); -} -d.finish_non_exhaustive() -} +impl PutBucketInventoryConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketInventoryConfigurationInputBuilder { + default() + } } +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketInventoryConfigurationOutput {} -///

    Container for data related to the storage class analysis for an Amazon S3 bucket for -/// export.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct StorageClassAnalysisDataExport { -///

    The place to store the data for an analysis.

    - pub destination: AnalyticsExportDestination, -///

    The version of the output schema to use when exporting data. Must be -/// V_1.

    - pub output_schema_version: StorageClassAnalysisSchemaVersion, +impl fmt::Debug for PutBucketInventoryConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketInventoryConfigurationOutput"); + d.finish_non_exhaustive() + } } -impl fmt::Debug for StorageClassAnalysisDataExport { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("StorageClassAnalysisDataExport"); -d.field("destination", &self.destination); -d.field("output_schema_version", &self.output_schema_version); -d.finish_non_exhaustive() -} +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLifecycleConfigurationInput { + ///

    The name of the bucket for which to set the configuration.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + pub expected_bucket_owner: Option, + ///

    Container for lifecycle rules. You can add as many as 1,000 rules.

    + pub lifecycle_configuration: Option, + ///

    Indicates which default minimum object size behavior is applied to the lifecycle + /// configuration.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + ///
      + ///
    • + ///

      + /// all_storage_classes_128K - Objects smaller than 128 KB will not + /// transition to any storage class by default.

      + ///
    • + ///
    • + ///

      + /// varies_by_storage_class - Objects smaller than 128 KB will + /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By + /// default, all other storage classes will prevent transitions smaller than 128 KB. + ///

      + ///
    • + ///
    + ///

    To customize the minimum object size for any transition you can add a filter that + /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in + /// the body of your transition rule. Custom filters always take precedence over the default + /// transition behavior.

    + pub transition_default_minimum_object_size: Option, } - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct StorageClassAnalysisSchemaVersion(Cow<'static, str>); - -impl StorageClassAnalysisSchemaVersion { -pub const V_1: &'static str = "V_1"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +impl fmt::Debug for PutBucketLifecycleConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketLifecycleConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.lifecycle_configuration { + d.field("lifecycle_configuration", val); + } + if let Some(ref val) = self.transition_default_minimum_object_size { + d.field("transition_default_minimum_object_size", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl PutBucketLifecycleConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketLifecycleConfigurationInputBuilder { + default() + } } +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLifecycleConfigurationOutput { + ///

    Indicates which default minimum object size behavior is applied to the lifecycle + /// configuration.

    + /// + ///

    This parameter applies to general purpose buckets only. It is not supported for + /// directory bucket lifecycle configurations.

    + ///
    + ///
      + ///
    • + ///

      + /// all_storage_classes_128K - Objects smaller than 128 KB will not + /// transition to any storage class by default.

      + ///
    • + ///
    • + ///

      + /// varies_by_storage_class - Objects smaller than 128 KB will + /// transition to Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By + /// default, all other storage classes will prevent transitions smaller than 128 KB. + ///

      + ///
    • + ///
    + ///

    To customize the minimum object size for any transition you can add a filter that + /// specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in + /// the body of your transition rule. Custom filters always take precedence over the default + /// transition behavior.

    + pub transition_default_minimum_object_size: Option, } -impl From for StorageClassAnalysisSchemaVersion { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl fmt::Debug for PutBucketLifecycleConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketLifecycleConfigurationOutput"); + if let Some(ref val) = self.transition_default_minimum_object_size { + d.field("transition_default_minimum_object_size", val); + } + d.finish_non_exhaustive() + } } -impl From for Cow<'static, str> { -fn from(s: StorageClassAnalysisSchemaVersion) -> Self { -s.0 -} +#[derive(Clone, PartialEq)] +pub struct PutBucketLoggingInput { + ///

    The name of the bucket for which to set the logging parameters.

    + pub bucket: BucketName, + ///

    Container for logging status information.

    + pub bucket_logging_status: BucketLoggingStatus, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash of the PutBucketLogging request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, } -impl FromStr for StorageClassAnalysisSchemaVersion { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl fmt::Debug for PutBucketLoggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketLoggingInput"); + d.field("bucket", &self.bucket); + d.field("bucket_logging_status", &self.bucket_logging_status); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.finish_non_exhaustive() + } } +impl PutBucketLoggingInput { + #[must_use] + pub fn builder() -> builders::PutBucketLoggingInputBuilder { + default() + } +} -pub type Suffix = String; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketLoggingOutput {} -///

    A container of a key value name pair.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Tag { -///

    Name of the object key.

    - pub key: Option, -///

    Value of the tag.

    - pub value: Option, +impl fmt::Debug for PutBucketLoggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketLoggingOutput"); + d.finish_non_exhaustive() + } } -impl fmt::Debug for Tag { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Tag"); -if let Some(ref val) = self.key { -d.field("key", val); -} -if let Some(ref val) = self.value { -d.field("value", val); -} -d.finish_non_exhaustive() -} +#[derive(Clone, PartialEq)] +pub struct PutBucketMetricsConfigurationInput { + ///

    The name of the bucket for which the metrics configuration is set.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The ID used to identify the metrics configuration. The ID has a 64 character limit and + /// can only contain letters, numbers, periods, dashes, and underscores.

    + pub id: MetricsId, + ///

    Specifies the metrics configuration.

    + pub metrics_configuration: MetricsConfiguration, } - -pub type TagCount = i32; - -pub type TagSet = List; - -///

    Container for TagSet elements.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Tagging { -///

    A collection for a set of tags

    - pub tag_set: TagSet, +impl fmt::Debug for PutBucketMetricsConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketMetricsConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("id", &self.id); + d.field("metrics_configuration", &self.metrics_configuration); + d.finish_non_exhaustive() + } } -impl fmt::Debug for Tagging { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Tagging"); -d.field("tag_set", &self.tag_set); -d.finish_non_exhaustive() -} +impl PutBucketMetricsConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketMetricsConfigurationInputBuilder { + default() + } } +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketMetricsConfigurationOutput {} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct TaggingDirective(Cow<'static, str>); - -impl TaggingDirective { -pub const COPY: &'static str = "COPY"; - -pub const REPLACE: &'static str = "REPLACE"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +impl fmt::Debug for PutBucketMetricsConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketMetricsConfigurationOutput"); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +#[derive(Clone, PartialEq)] +pub struct PutBucketNotificationConfigurationInput { + ///

    The name of the bucket.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub notification_configuration: NotificationConfiguration, + ///

    Skips validation of Amazon SQS, Amazon SNS, and Lambda + /// destinations. True or false value.

    + pub skip_destination_validation: Option, } +impl fmt::Debug for PutBucketNotificationConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketNotificationConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("notification_configuration", &self.notification_configuration); + if let Some(ref val) = self.skip_destination_validation { + d.field("skip_destination_validation", val); + } + d.finish_non_exhaustive() + } } -impl From for TaggingDirective { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl PutBucketNotificationConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutBucketNotificationConfigurationInputBuilder { + default() + } } -impl From for Cow<'static, str> { -fn from(s: TaggingDirective) -> Self { -s.0 +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketNotificationConfigurationOutput {} + +impl fmt::Debug for PutBucketNotificationConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketNotificationConfigurationOutput"); + d.finish_non_exhaustive() + } } + +#[derive(Clone, PartialEq)] +pub struct PutBucketOwnershipControlsInput { + ///

    The name of the Amazon S3 bucket whose OwnershipControls you want to set.

    + pub bucket: BucketName, + ///

    The MD5 hash of the OwnershipControls request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The OwnershipControls (BucketOwnerEnforced, BucketOwnerPreferred, or + /// ObjectWriter) that you want to apply to this Amazon S3 bucket.

    + pub ownership_controls: OwnershipControls, } -impl FromStr for TaggingDirective { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) +impl fmt::Debug for PutBucketOwnershipControlsInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketOwnershipControlsInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("ownership_controls", &self.ownership_controls); + d.finish_non_exhaustive() + } } + +impl PutBucketOwnershipControlsInput { + #[must_use] + pub fn builder() -> builders::PutBucketOwnershipControlsInputBuilder { + default() + } } -pub type TaggingHeader = String; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketOwnershipControlsOutput {} -pub type TargetBucket = String; +impl fmt::Debug for PutBucketOwnershipControlsOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketOwnershipControlsOutput"); + d.finish_non_exhaustive() + } +} -///

    Container for granting information.

    -///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support -/// target grants. For more information, see Permissions server access log delivery in the -/// Amazon S3 User Guide.

    #[derive(Clone, Default, PartialEq)] -pub struct TargetGrant { -///

    Container for the person being granted permissions.

    - pub grantee: Option, -///

    Logging permissions assigned to the grantee for the bucket.

    - pub permission: Option, +pub struct PutBucketPolicyInput { + ///

    The name of the bucket.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must also follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// DOC-EXAMPLE-BUCKET--usw2-az1--x-s3). For information about bucket naming restrictions, see Directory bucket naming rules in the Amazon S3 User Guide + ///

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    + ///

    For the x-amz-checksum-algorithm + /// header, replace + /// algorithm + /// with the supported algorithm from the following list:

    + ///
      + ///
    • + ///

      + /// CRC32 + ///

      + ///
    • + ///
    • + ///

      + /// CRC32C + ///

      + ///
    • + ///
    • + ///

      + /// CRC64NVME + ///

      + ///
    • + ///
    • + ///

      + /// SHA1 + ///

      + ///
    • + ///
    • + ///

      + /// SHA256 + ///

      + ///
    • + ///
    + ///

    For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    + /// + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + ///
    + pub checksum_algorithm: Option, + ///

    Set this parameter to true to confirm that you want to remove your permissions to change + /// this bucket policy in the future.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub confirm_remove_self_bucket_access: Option, + ///

    The MD5 hash of the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + /// + ///

    For directory buckets, this header is not supported in this API operation. If you specify this header, the request fails with the HTTP status code + /// 501 Not Implemented.

    + ///
    + pub expected_bucket_owner: Option, + ///

    The bucket policy as a JSON document.

    + ///

    For directory buckets, the only IAM action supported in the bucket policy is + /// s3express:CreateSession.

    + pub policy: Policy, } -impl fmt::Debug for TargetGrant { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("TargetGrant"); -if let Some(ref val) = self.grantee { -d.field("grantee", val); -} -if let Some(ref val) = self.permission { -d.field("permission", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for PutBucketPolicyInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketPolicyInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.confirm_remove_self_bucket_access { + d.field("confirm_remove_self_bucket_access", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("policy", &self.policy); + d.finish_non_exhaustive() + } } +impl PutBucketPolicyInput { + #[must_use] + pub fn builder() -> builders::PutBucketPolicyInputBuilder { + default() + } +} -pub type TargetGrants = List; - -///

    Amazon S3 key format for log objects. Only one format, PartitionedPrefix or -/// SimplePrefix, is allowed.

    #[derive(Clone, Default, PartialEq)] -pub struct TargetObjectKeyFormat { -///

    Partitioned S3 key for log objects.

    - pub partitioned_prefix: Option, -///

    To use the simple format for S3 keys for log objects. To specify SimplePrefix format, -/// set SimplePrefix to {}.

    - pub simple_prefix: Option, -} +pub struct PutBucketPolicyOutput {} -impl fmt::Debug for TargetObjectKeyFormat { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("TargetObjectKeyFormat"); -if let Some(ref val) = self.partitioned_prefix { -d.field("partitioned_prefix", val); -} -if let Some(ref val) = self.simple_prefix { -d.field("simple_prefix", val); -} -d.finish_non_exhaustive() -} +impl fmt::Debug for PutBucketPolicyOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketPolicyOutput"); + d.finish_non_exhaustive() + } } +#[derive(Clone, PartialEq)] +pub struct PutBucketReplicationInput { + ///

    The name of the bucket

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, see RFC 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + pub replication_configuration: ReplicationConfiguration, + ///

    A token to allow Object Lock to be enabled for an existing bucket.

    + pub token: Option, +} -pub type TargetPrefix = String; - -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Tier(Cow<'static, str>); +impl fmt::Debug for PutBucketReplicationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketReplicationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("replication_configuration", &self.replication_configuration); + if let Some(ref val) = self.token { + d.field("token", val); + } + d.finish_non_exhaustive() + } +} -impl Tier { -pub const BULK: &'static str = "Bulk"; +impl PutBucketReplicationInput { + #[must_use] + pub fn builder() -> builders::PutBucketReplicationInputBuilder { + default() + } +} -pub const EXPEDITED: &'static str = "Expedited"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketReplicationOutput {} -pub const STANDARD: &'static str = "Standard"; +impl fmt::Debug for PutBucketReplicationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketReplicationOutput"); + d.finish_non_exhaustive() + } +} -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +#[derive(Clone, PartialEq)] +pub struct PutBucketRequestPaymentInput { + ///

    The bucket name.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, see RFC 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Container for Payer.

    + pub request_payment_configuration: RequestPaymentConfiguration, } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl fmt::Debug for PutBucketRequestPaymentInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketRequestPaymentInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("request_payment_configuration", &self.request_payment_configuration); + d.finish_non_exhaustive() + } } +impl PutBucketRequestPaymentInput { + #[must_use] + pub fn builder() -> builders::PutBucketRequestPaymentInputBuilder { + default() + } } -impl From for Tier { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} -} +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketRequestPaymentOutput {} -impl From for Cow<'static, str> { -fn from(s: Tier) -> Self { -s.0 -} +impl fmt::Debug for PutBucketRequestPaymentOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketRequestPaymentOutput"); + d.finish_non_exhaustive() + } } -impl FromStr for Tier { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +#[derive(Clone, PartialEq)] +pub struct PutBucketTaggingInput { + ///

    The bucket name.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, see RFC 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Container for the TagSet and Tag elements.

    + pub tagging: Tagging, } -///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by -/// automatically moving data to the most cost-effective storage access tier, without -/// additional operational overhead.

    -#[derive(Clone, PartialEq, Serialize, Deserialize)] -pub struct Tiering { -///

    S3 Intelligent-Tiering access tier. See Storage class -/// for automatically optimizing frequently and infrequently accessed objects for a -/// list of access tiers in the S3 Intelligent-Tiering storage class.

    - pub access_tier: IntelligentTieringAccessTier, -///

    The number of consecutive days of no access after which an object will be eligible to be -/// transitioned to the corresponding tier. The minimum number of days specified for -/// Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least -/// 180 days. The maximum can be up to 2 years (730 days).

    - pub days: IntelligentTieringDays, +impl fmt::Debug for PutBucketTaggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("tagging", &self.tagging); + d.finish_non_exhaustive() + } } -impl fmt::Debug for Tiering { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Tiering"); -d.field("access_tier", &self.access_tier); -d.field("days", &self.days); -d.finish_non_exhaustive() -} +impl PutBucketTaggingInput { + #[must_use] + pub fn builder() -> builders::PutBucketTaggingInputBuilder { + default() + } } - -pub type TieringList = List; - -pub type Token = String; - -pub type TokenType = String; - -///

    -/// You have attempted to add more parts than the maximum of 10000 -/// that are allowed for this object. You can use the CopyObject operation -/// to copy this object to another and then add more data to the newly copied object. -///

    #[derive(Clone, Default, PartialEq)] -pub struct TooManyParts { -} +pub struct PutBucketTaggingOutput {} -impl fmt::Debug for TooManyParts { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("TooManyParts"); -d.finish_non_exhaustive() -} +impl fmt::Debug for PutBucketTaggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketTaggingOutput"); + d.finish_non_exhaustive() + } } - -pub type TopicArn = String; - -///

    A container for specifying the configuration for publication of messages to an Amazon -/// Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct TopicConfiguration { -///

    The Amazon S3 bucket event about which to send notifications. For more information, see -/// Supported -/// Event Types in the Amazon S3 User Guide.

    - pub events: EventList, - pub filter: Option, - pub id: Option, -///

    The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message -/// when it detects events of the specified type.

    - pub topic_arn: TopicArn, +#[derive(Clone, PartialEq)] +pub struct PutBucketVersioningInput { + ///

    The bucket name.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    >The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a + /// message integrity check to verify that the request body was not corrupted in transit. For + /// more information, see RFC + /// 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The concatenation of the authentication device's serial number, a space, and the value + /// that is displayed on your authentication device.

    + pub mfa: Option, + ///

    Container for setting the versioning state.

    + pub versioning_configuration: VersioningConfiguration, } -impl fmt::Debug for TopicConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("TopicConfiguration"); -d.field("events", &self.events); -if let Some(ref val) = self.filter { -d.field("filter", val); -} -if let Some(ref val) = self.id { -d.field("id", val); -} -d.field("topic_arn", &self.topic_arn); -d.finish_non_exhaustive() -} +impl fmt::Debug for PutBucketVersioningInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketVersioningInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.mfa { + d.field("mfa", val); + } + d.field("versioning_configuration", &self.versioning_configuration); + d.finish_non_exhaustive() + } } +impl PutBucketVersioningInput { + #[must_use] + pub fn builder() -> builders::PutBucketVersioningInputBuilder { + default() + } +} -pub type TopicConfigurationList = List; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketVersioningOutput {} -///

    Specifies when an object transitions to a specified storage class. For more information -/// about Amazon S3 lifecycle configuration rules, see Transitioning -/// Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct Transition { -///

    Indicates when objects are transitioned to the specified storage class. The date value -/// must be in ISO 8601 format. The time is always midnight UTC.

    - pub date: Option, -///

    Indicates the number of days after creation when objects are transitioned to the -/// specified storage class. If the specified storage class is INTELLIGENT_TIERING, -/// GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are -/// 0 or positive integers. If the specified storage class is STANDARD_IA -/// or ONEZONE_IA, valid values are positive integers greater than 30. Be -/// aware that some storage classes have a minimum storage duration and that you're charged for -/// transitioning objects before their minimum storage duration. For more information, see -/// -/// Constraints and considerations for transitions in the -/// Amazon S3 User Guide.

    - pub days: Option, -///

    The storage class to which you want the object to transition.

    - pub storage_class: Option, +impl fmt::Debug for PutBucketVersioningOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketVersioningOutput"); + d.finish_non_exhaustive() + } } -impl fmt::Debug for Transition { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("Transition"); -if let Some(ref val) = self.date { -d.field("date", val); -} -if let Some(ref val) = self.days { -d.field("days", val); -} -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); -} -d.finish_non_exhaustive() -} +#[derive(Clone, PartialEq)] +pub struct PutBucketWebsiteInput { + ///

    The bucket name.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the request when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. You must use this header as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, see RFC 1864.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Container for the request.

    + pub website_configuration: WebsiteConfiguration, } +impl fmt::Debug for PutBucketWebsiteInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketWebsiteInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("website_configuration", &self.website_configuration); + d.finish_non_exhaustive() + } +} -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct TransitionDefaultMinimumObjectSize(Cow<'static, str>); - -impl TransitionDefaultMinimumObjectSize { -pub const ALL_STORAGE_CLASSES_128K: &'static str = "all_storage_classes_128K"; +impl PutBucketWebsiteInput { + #[must_use] + pub fn builder() -> builders::PutBucketWebsiteInputBuilder { + default() + } +} -pub const VARIES_BY_STORAGE_CLASS: &'static str = "varies_by_storage_class"; +#[derive(Clone, Default, PartialEq)] +pub struct PutBucketWebsiteOutput {} -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +impl fmt::Debug for PutBucketWebsiteOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutBucketWebsiteOutput"); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectAclInput { + ///

    The canned ACL to apply to the object. For more information, see Canned + /// ACL.

    + pub acl: Option, + ///

    Contains the elements that set the ACL permissions for an object per grantee.

    + pub access_control_policy: Option, + ///

    The bucket name that contains the object to which you want to attach the ACL.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the data. This header must be used as a message + /// integrity check to verify that the request body was not corrupted in transit. For more + /// information, go to RFC + /// 1864.> + ///

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Allows grantee the read, write, read ACP, and write ACP permissions on the + /// bucket.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_full_control: Option, + ///

    Allows grantee to list the objects in the bucket.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_read: Option, + ///

    Allows grantee to read the bucket ACL.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_read_acp: Option, + ///

    Allows grantee to create new objects in the bucket.

    + ///

    For the bucket and object owners of existing objects, also allows deletions and + /// overwrites of those objects.

    + pub grant_write: Option, + ///

    Allows grantee to write the ACL for the applicable bucket.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + pub grant_write_acp: Option, + ///

    Key for which the PUT action was initiated.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    Version ID used to reference a specific version of the object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, } +impl fmt::Debug for PutObjectAclInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectAclInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + if let Some(ref val) = self.access_control_policy { + d.field("access_control_policy", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write { + d.field("grant_write", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl From for TransitionDefaultMinimumObjectSize { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl PutObjectAclInput { + #[must_use] + pub fn builder() -> builders::PutObjectAclInputBuilder { + default() + } } -impl From for Cow<'static, str> { -fn from(s: TransitionDefaultMinimumObjectSize) -> Self { -s.0 -} +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectAclOutput { + pub request_charged: Option, } -impl FromStr for TransitionDefaultMinimumObjectSize { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl fmt::Debug for PutObjectAclOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectAclOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } -pub type TransitionList = List; - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -pub struct TransitionStorageClass(Cow<'static, str>); - -impl TransitionStorageClass { -pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; - -pub const GLACIER: &'static str = "GLACIER"; - -pub const GLACIER_IR: &'static str = "GLACIER_IR"; - -pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; - -pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; - -pub const STANDARD_IA: &'static str = "STANDARD_IA"; +#[derive(Default)] +pub struct PutObjectInput { + ///

    The canned ACL to apply to the object. For more information, see Canned + /// ACL in the Amazon S3 User Guide.

    + ///

    When adding a new object, you can use headers to grant ACL-based permissions to + /// individual Amazon Web Services accounts or to predefined groups defined by Amazon S3. These permissions are + /// then added to the ACL on the object. By default, all objects are private. Only the owner + /// has full access control. For more information, see Access Control List (ACL) Overview + /// and Managing + /// ACLs Using the REST API in the Amazon S3 User Guide.

    + ///

    If the bucket that you're uploading objects to uses the bucket owner enforced setting + /// for S3 Object Ownership, ACLs are disabled and no longer affect permissions. Buckets that + /// use this setting only accept PUT requests that don't specify an ACL or PUT requests that + /// specify bucket owner full control ACLs, such as the bucket-owner-full-control + /// canned ACL or an equivalent form of this ACL expressed in the XML format. PUT requests that + /// contain other ACLs (for example, custom grants to certain Amazon Web Services accounts) fail and return a + /// 400 error with the error code AccessControlListNotSupported. + /// For more information, see Controlling ownership of + /// objects and disabling ACLs in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub acl: Option, + ///

    Object data.

    + pub body: Option, + ///

    The bucket name to which the PUT action was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with + /// server-side encryption using Key Management Service (KMS) keys (SSE-KMS).

    + ///

    + /// General purpose buckets - Setting this header to + /// true causes Amazon S3 to use an S3 Bucket Key for object encryption with + /// SSE-KMS. Also, specifying this header with a PUT action doesn't affect bucket-level settings for S3 + /// Bucket Key.

    + ///

    + /// Directory buckets - S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

    + pub bucket_key_enabled: Option, + ///

    Can be used to specify caching behavior along the request/reply chain. For more + /// information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.

    + pub cache_control: Option, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum-algorithm + /// or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request.

    + ///

    For the x-amz-checksum-algorithm + /// header, replace + /// algorithm + /// with the supported algorithm from the following list:

    + ///
      + ///
    • + ///

      + /// CRC32 + ///

      + ///
    • + ///
    • + ///

      + /// CRC32C + ///

      + ///
    • + ///
    • + ///

      + /// CRC64NVME + ///

      + ///
    • + ///
    • + ///

      + /// SHA1 + ///

      + ///
    • + ///
    • + ///

      + /// SHA256 + ///

      + ///
    • + ///
    + ///

    For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If the individual checksum value you provide through x-amz-checksum-algorithm + /// doesn't match the checksum algorithm you set through x-amz-sdk-checksum-algorithm, Amazon S3 fails the request with a BadDigest error.

    + /// + ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is + /// required for any request to upload an object with a retention period configured using + /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the + /// Amazon S3 User Guide.

    + ///
    + ///

    For directory buckets, when you use Amazon Web Services SDKs, CRC32 is the default checksum algorithm that's used for performance.

    + pub checksum_algorithm: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the object. The CRC64NVME checksum is + /// always a full object checksum. For more information, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Specifies presentational information for the object. For more information, see https://www.rfc-editor.org/rfc/rfc6266#section-4.

    + pub content_disposition: Option, + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#field.content-encoding.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be + /// determined automatically. For more information, see https://www.rfc-editor.org/rfc/rfc9110.html#name-content-length.

    + pub content_length: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the message (without the headers) according to + /// RFC 1864. This header can be used as a message integrity check to verify that the data is + /// the same data that was originally sent. Although it is optional, we recommend using the + /// Content-MD5 mechanism as an end-to-end integrity check. For more information about REST + /// request authentication, see REST Authentication.

    + /// + ///

    The Content-MD5 or x-amz-sdk-checksum-algorithm header is + /// required for any request to upload an object with a retention period configured using + /// Amazon S3 Object Lock. For more information, see Uploading objects to an Object Lock enabled bucket in the + /// Amazon S3 User Guide.

    + ///
    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    A standard MIME type describing the format of the contents. For more information, see + /// https://www.rfc-editor.org/rfc/rfc9110.html#name-content-type.

    + pub content_type: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The date and time at which the object is no longer cacheable. For more information, see + /// https://www.rfc-editor.org/rfc/rfc7234#section-5.3.

    + pub expires: Option, + ///

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_full_control: Option, + ///

    Allows grantee to read the object data and its metadata.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_read: Option, + ///

    Allows grantee to read the object ACL.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_read_acp: Option, + ///

    Allows grantee to write the ACL for the applicable object.

    + /// + ///
      + ///
    • + ///

      This functionality is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      This functionality is not supported for Amazon S3 on Outposts.

      + ///
    • + ///
    + ///
    + pub grant_write_acp: Option, + ///

    Uploads the object only if the ETag (entity tag) value provided during the WRITE + /// operation matches the ETag of the object in S3. If the ETag values do not match, the + /// operation returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should fetch the object's ETag and retry the upload.

    + ///

    Expects the ETag value as a string.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_match: Option, + ///

    Uploads the object only if the object key name does not already exist in the bucket + /// specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

    + ///

    If a conflicting operation occurs during the upload S3 returns a 409 + /// ConditionalRequestConflict response. On a 409 failure you should retry the + /// upload.

    + ///

    Expects the '*' (asterisk) character.

    + ///

    For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.

    + pub if_none_match: Option, + ///

    Object key for which the PUT action was initiated.

    + pub key: ObjectKey, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    Specifies whether a legal hold will be applied to this object. For more information + /// about S3 Object Lock, see Object Lock in the + /// Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_legal_hold_status: Option, + ///

    The Object Lock mode that you want to apply to this object.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_mode: Option, + ///

    The date and time when you want this object's Object Lock to expire. Must be formatted + /// as a timestamp parameter.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub object_lock_retain_until_date: Option, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, + /// AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Specifies the Amazon Web Services KMS Encryption Context as an additional encryption context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets passed on + /// to Amazon Web Services KMS for future GetObject operations on + /// this object.

    + ///

    + /// General purpose buckets - This value must be explicitly added during CopyObject operations if you want an additional encryption context for your object. For more information, see Encryption context in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - You can optionally provide an explicit encryption context value. The value must match the default encryption context - the bucket Amazon Resource Name (ARN). An additional encryption context value is not supported.

    + pub ssekms_encryption_context: Option, + ///

    Specifies the KMS key ID (Key ID, Key ARN, or Key Alias) to use for object encryption. If the KMS key doesn't exist in the same + /// account that's issuing the command, you must use the full Key ARN not the Key ID.

    + ///

    + /// General purpose buckets - If you specify x-amz-server-side-encryption with aws:kms or aws:kms:dsse, this header specifies the ID (Key ID, Key ARN, or Key Alias) of the KMS + /// key to use. If you specify + /// x-amz-server-side-encryption:aws:kms or + /// x-amz-server-side-encryption:aws:kms:dsse, but do not provide x-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the Amazon Web Services managed key + /// (aws/s3) to protect the data.

    + ///

    + /// Directory buckets - To encrypt data using SSE-KMS, it's recommended to specify the + /// x-amz-server-side-encryption header to aws:kms. Then, the x-amz-server-side-encryption-aws-kms-key-id header implicitly uses + /// the bucket's default KMS customer managed key ID. If you want to explicitly set the + /// x-amz-server-side-encryption-aws-kms-key-id header, it must match the bucket's default customer managed key (using key ID or ARN, not alias). Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + /// + /// Incorrect key specification results in an HTTP 400 Bad Request error.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm that was used when you store this object in Amazon S3 + /// (for example, AES256, aws:kms, aws:kms:dsse).

    + ///
      + ///
    • + ///

      + /// General purpose buckets - You have four mutually + /// exclusive options to protect data using server-side encryption in Amazon S3, depending on + /// how you choose to manage the encryption keys. Specifically, the encryption key + /// options are Amazon S3 managed keys (SSE-S3), Amazon Web Services KMS keys (SSE-KMS or DSSE-KMS), and + /// customer-provided keys (SSE-C). Amazon S3 encrypts data with server-side encryption by + /// using Amazon S3 managed keys (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt + /// data at rest by using server-side encryption with other key options. For more + /// information, see Using Server-Side + /// Encryption in the Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. + /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. + /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and + /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. + ///

      + /// + ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the + /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. + /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), + /// the encryption request headers must match the default encryption configuration of the directory bucket. + /// + ///

      + ///
      + ///
    • + ///
    + pub server_side_encryption: Option, + ///

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects. The + /// STANDARD storage class provides high durability and high availability. Depending on + /// performance needs, you can specify a different Storage Class. For more information, see + /// Storage + /// Classes in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      For directory buckets, only the S3 Express One Zone storage class is supported to store + /// newly created objects.

      + ///
    • + ///
    • + ///

      Amazon S3 on Outposts only uses the OUTPOSTS Storage Class.

      + ///
    • + ///
    + ///
    + pub storage_class: Option, + ///

    The tag-set for the object. The tag-set must be encoded as URL Query parameters. (For + /// example, "Key1=Value1")

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub tagging: Option, + pub version_id: Option, + ///

    If the bucket is configured as a website, redirects requests for this object to another + /// object in the same bucket or to an external URL. Amazon S3 stores the value of this header in + /// the object metadata. For information about object metadata, see Object Key and Metadata in the + /// Amazon S3 User Guide.

    + ///

    In the following example, the request header sets the redirect to an object + /// (anotherPage.html) in the same bucket:

    + ///

    + /// x-amz-website-redirect-location: /anotherPage.html + ///

    + ///

    In the following example, the request header sets the object redirect to another + /// website:

    + ///

    + /// x-amz-website-redirect-location: http://www.example.com/ + ///

    + ///

    For more information about website hosting in Amazon S3, see Hosting Websites on Amazon S3 and + /// How to + /// Configure Website Page Redirects in the Amazon S3 User Guide.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub website_redirect_location: Option, + ///

    + /// Specifies the offset for appending data to existing objects in bytes. + /// The offset must be equal to the size of the existing object being appended to. + /// If no object exists, setting this header to 0 will create a new object. + ///

    + /// + ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    + ///
    + pub write_offset_bytes: Option, +} -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +impl fmt::Debug for PutObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectInput"); + if let Some(ref val) = self.acl { + d.field("acl", val); + } + if let Some(ref val) = self.body { + d.field("body", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.grant_full_control { + d.field("grant_full_control", val); + } + if let Some(ref val) = self.grant_read { + d.field("grant_read", val); + } + if let Some(ref val) = self.grant_read_acp { + d.field("grant_read_acp", val); + } + if let Some(ref val) = self.grant_write_acp { + d.field("grant_write_acp", val); + } + if let Some(ref val) = self.if_match { + d.field("if_match", val); + } + if let Some(ref val) = self.if_none_match { + d.field("if_none_match", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + if let Some(ref val) = self.website_redirect_location { + d.field("website_redirect_location", val); + } + if let Some(ref val) = self.write_offset_bytes { + d.field("write_offset_bytes", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +impl PutObjectInput { + #[must_use] + pub fn builder() -> builders::PutObjectInputBuilder { + default() + } } +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLegalHoldInput { + ///

    The bucket name containing the object that you want to place a legal hold on.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash for the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The key name for the object that you want to place a legal hold on.

    + pub key: ObjectKey, + ///

    Container element for the legal hold configuration you want to apply to the specified + /// object.

    + pub legal_hold: Option, + pub request_payer: Option, + ///

    The version ID of the object that you want to place a legal hold on.

    + pub version_id: Option, } -impl From for TransitionStorageClass { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl fmt::Debug for PutObjectLegalHoldInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectLegalHoldInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.legal_hold { + d.field("legal_hold", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl From for Cow<'static, str> { -fn from(s: TransitionStorageClass) -> Self { -s.0 -} +impl PutObjectLegalHoldInput { + #[must_use] + pub fn builder() -> builders::PutObjectLegalHoldInputBuilder { + default() + } } -impl FromStr for TransitionStorageClass { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLegalHoldOutput { + pub request_charged: Option, } -#[derive(Debug, Clone, PartialEq, Eq)] -pub struct Type(Cow<'static, str>); - -impl Type { -pub const AMAZON_CUSTOMER_BY_EMAIL: &'static str = "AmazonCustomerByEmail"; - -pub const CANONICAL_USER: &'static str = "CanonicalUser"; - -pub const GROUP: &'static str = "Group"; - -#[must_use] -pub fn as_str(&self) -> &str { -&self.0 +impl fmt::Debug for PutObjectLegalHoldOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectLegalHoldOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn from_static(s: &'static str) -> Self { -Self(Cow::from(s)) +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLockConfigurationInput { + ///

    The bucket whose Object Lock configuration you want to create or replace.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash for the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The Object Lock configuration that you want to apply to the specified bucket.

    + pub object_lock_configuration: Option, + pub request_payer: Option, + ///

    A token to allow Object Lock to be enabled for an existing bucket.

    + pub token: Option, } +impl fmt::Debug for PutObjectLockConfigurationInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectLockConfigurationInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.object_lock_configuration { + d.field("object_lock_configuration", val); + } + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.token { + d.field("token", val); + } + d.finish_non_exhaustive() + } } -impl From for Type { -fn from(s: String) -> Self { -Self(Cow::from(s)) -} +impl PutObjectLockConfigurationInput { + #[must_use] + pub fn builder() -> builders::PutObjectLockConfigurationInputBuilder { + default() + } } -impl From for Cow<'static, str> { -fn from(s: Type) -> Self { -s.0 -} +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectLockConfigurationOutput { + pub request_charged: Option, } -impl FromStr for Type { -type Err = Infallible; -fn from_str(s: &str) -> Result { -Ok(Self::from(s.to_owned())) -} +impl fmt::Debug for PutObjectLockConfigurationOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectLockConfigurationOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } } -pub type URI = String; +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectOutput { + ///

    Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    The Base64 encoded, 64-bit CRC64NVME checksum of the object. This header + /// is present if the object was uploaded with the CRC64NVME checksum algorithm, or if it + /// was uploaded without a checksum (and Amazon S3 added the default checksum, + /// CRC64NVME, to the uploaded object). For more information about how + /// checksums are calculated with multipart uploads, see Checking object integrity + /// in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    This header specifies the checksum type of the object, which determines how part-level + /// checksums are combined to create an object-level checksum for multipart objects. For + /// PutObject uploads, the checksum type is always FULL_OBJECT. You can use this header as a + /// data integrity check to verify that the checksum type that is received is the same checksum + /// that was specified. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_type: Option, + ///

    Entity tag for the uploaded object.

    + ///

    + /// General purpose buckets - To ensure that data is not + /// corrupted traversing the network, for objects where the ETag is the MD5 digest of the + /// object, you can calculate the MD5 while putting an object to Amazon S3 and compare the returned + /// ETag to the calculated MD5 value.

    + ///

    + /// Directory buckets - The ETag for the object in + /// a directory bucket isn't the MD5 digest of the object.

    + pub e_tag: Option, + ///

    If the expiration is configured for the object (see PutBucketLifecycleConfiguration) in the Amazon S3 User Guide, + /// the response includes this header. It includes the expiry-date and + /// rule-id key-value pairs that provide information about object expiration. + /// The value of the rule-id is URL-encoded.

    + /// + ///

    Object expiration information is not returned in directory buckets and this header returns the value "NotImplemented" in all responses for directory buckets.

    + ///
    + pub expiration: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the Amazon Web Services KMS Encryption Context to use for object encryption. The value of + /// this header is a Base64 encoded string of a UTF-8 encoded JSON, which contains the encryption context as key-value pairs. + /// This value is stored as object metadata and automatically gets + /// passed on to Amazon Web Services KMS for future GetObject + /// operations on this object.

    + pub ssekms_encryption_context: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3.

    + pub server_side_encryption: Option, + ///

    + /// The size of the object in bytes. This value is only be present if you append to an object. + ///

    + /// + ///

    This functionality is only supported for objects in the Amazon S3 Express One Zone storage class in directory buckets.

    + ///
    + pub size: Option, + ///

    Version ID of the object.

    + ///

    If you enable versioning for a bucket, Amazon S3 automatically generates a unique version ID + /// for the object being stored. Amazon S3 returns this ID in the response. When you enable + /// versioning for a bucket, if Amazon S3 receives multiple write requests for the same object + /// simultaneously, it stores all of the objects. For more information about versioning, see + /// Adding Objects to + /// Versioning-Enabled Buckets in the Amazon S3 User Guide. For + /// information about returning the versioning state of a bucket, see GetBucketVersioning.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub version_id: Option, +} -pub type UploadIdMarker = String; +impl fmt::Debug for PutObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.checksum_type { + d.field("checksum_type", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_encryption_context { + d.field("ssekms_encryption_context", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.size { + d.field("size", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } +} -#[derive(Clone, PartialEq)] -pub struct UploadPartCopyInput { -///

    The bucket name.

    -///

    -/// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -/// -///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, -/// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    -///
    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectRetentionInput { + ///

    The bucket name that contains the object you want to apply this Object Retention + /// configuration to.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    pub bucket: BucketName, -///

    Specifies the source object for the copy operation. You specify the value in one of two -/// formats, depending on whether you want to access the source object through an access point:

    -///
      -///
    • -///

      For objects not accessed through an access point, specify the name of the source bucket -/// and key of the source object, separated by a slash (/). For example, to copy the -/// object reports/january.pdf from the bucket -/// awsexamplebucket, use awsexamplebucket/reports/january.pdf. -/// The value must be URL-encoded.

      -///
    • -///
    • -///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      -/// -///
        -///
      • -///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        -///
      • -///
      • -///

        Access points are not supported by directory buckets.

        -///
      • -///
      -///
      -///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      -///
    • -///
    -///

    If your bucket has versioning enabled, you could have multiple versions of the same -/// object. By default, x-amz-copy-source identifies the current version of the -/// source object to copy. To copy a specific version of the source object to copy, append -/// ?versionId=<version-id> to the x-amz-copy-source request -/// header (for example, x-amz-copy-source: -/// /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

    -///

    If the current version is a delete marker and you don't specify a versionId in the -/// x-amz-copy-source request header, Amazon S3 returns a 404 Not Found -/// error, because the object does not exist. If you specify versionId in the -/// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an -/// HTTP 400 Bad Request error, because you are not allowed to specify a delete -/// marker as a version for the x-amz-copy-source.

    -/// -///

    -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets.

    -///
    - pub copy_source: CopySource, -///

    Copies the object if its entity tag (ETag) matches the specified tag.

    -///

    If both of the x-amz-copy-source-if-match and -/// x-amz-copy-source-if-unmodified-since headers are present in the request as -/// follows:

    -///

    -/// x-amz-copy-source-if-match condition evaluates to true, -/// and;

    -///

    -/// x-amz-copy-source-if-unmodified-since condition evaluates to -/// false;

    -///

    Amazon S3 returns 200 OK and copies the data. -///

    - pub copy_source_if_match: Option, -///

    Copies the object if it has been modified since the specified time.

    -///

    If both of the x-amz-copy-source-if-none-match and -/// x-amz-copy-source-if-modified-since headers are present in the request as -/// follows:

    -///

    -/// x-amz-copy-source-if-none-match condition evaluates to false, -/// and;

    -///

    -/// x-amz-copy-source-if-modified-since condition evaluates to -/// true;

    -///

    Amazon S3 returns 412 Precondition Failed response code. -///

    - pub copy_source_if_modified_since: Option, -///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    -///

    If both of the x-amz-copy-source-if-none-match and -/// x-amz-copy-source-if-modified-since headers are present in the request as -/// follows:

    -///

    -/// x-amz-copy-source-if-none-match condition evaluates to false, -/// and;

    -///

    -/// x-amz-copy-source-if-modified-since condition evaluates to -/// true;

    -///

    Amazon S3 returns 412 Precondition Failed response code. -///

    - pub copy_source_if_none_match: Option, -///

    Copies the object if it hasn't been modified since the specified time.

    -///

    If both of the x-amz-copy-source-if-match and -/// x-amz-copy-source-if-unmodified-since headers are present in the request as -/// follows:

    -///

    -/// x-amz-copy-source-if-match condition evaluates to true, -/// and;

    -///

    -/// x-amz-copy-source-if-unmodified-since condition evaluates to -/// false;

    -///

    Amazon S3 returns 200 OK and copies the data. -///

    - pub copy_source_if_unmodified_since: Option, -///

    The range of bytes to copy from the source object. The range value must use the form -/// bytes=first-last, where the first and last are the zero-based byte offsets to copy. For -/// example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You -/// can copy a range only if the source object is greater than 5 MB.

    - pub copy_source_range: Option, -///

    Specifies the algorithm to use when decrypting the source object (for example, -/// AES256).

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    - pub copy_source_sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source -/// object. The encryption key provided in this header must be one that was used when the -/// source object was created.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    - pub copy_source_sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    - pub copy_source_sse_customer_key_md5: Option, -///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + ///

    Indicates whether this action should bypass Governance-mode restrictions.

    + pub bypass_governance_retention: Option, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash for the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    pub expected_bucket_owner: Option, -///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_source_bucket_owner: Option, -///

    Object key for which the multipart upload was initiated.

    + ///

    The key name for the object that you want to apply this Object Retention configuration + /// to.

    pub key: ObjectKey, -///

    Part number of part being copied. This is a positive integer between 1 and -/// 10,000.

    - pub part_number: PartNumber, pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header. This must be the -/// same encryption key specified in the initiate multipart upload request.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported when the destination bucket is a directory bucket.

    -///
    - pub sse_customer_key_md5: Option, -///

    Upload ID identifying the multipart upload whose part is being copied.

    - pub upload_id: MultipartUploadId, + ///

    The container element for the Object Retention configuration.

    + pub retention: Option, + ///

    The version ID for the object that you want to apply this Object Retention configuration + /// to.

    + pub version_id: Option, } -impl fmt::Debug for UploadPartCopyInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("UploadPartCopyInput"); -d.field("bucket", &self.bucket); -d.field("copy_source", &self.copy_source); -if let Some(ref val) = self.copy_source_if_match { -d.field("copy_source_if_match", val); -} -if let Some(ref val) = self.copy_source_if_modified_since { -d.field("copy_source_if_modified_since", val); -} -if let Some(ref val) = self.copy_source_if_none_match { -d.field("copy_source_if_none_match", val); -} -if let Some(ref val) = self.copy_source_if_unmodified_since { -d.field("copy_source_if_unmodified_since", val); -} -if let Some(ref val) = self.copy_source_range { -d.field("copy_source_range", val); -} -if let Some(ref val) = self.copy_source_sse_customer_algorithm { -d.field("copy_source_sse_customer_algorithm", val); -} -if let Some(ref val) = self.copy_source_sse_customer_key { -d.field("copy_source_sse_customer_key", val); -} -if let Some(ref val) = self.copy_source_sse_customer_key_md5 { -d.field("copy_source_sse_customer_key_md5", val); -} -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); -} -if let Some(ref val) = self.expected_source_bucket_owner { -d.field("expected_source_bucket_owner", val); -} -d.field("key", &self.key); -d.field("part_number", &self.part_number); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); -} -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); -} -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); -} -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); -} -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() -} +impl fmt::Debug for PutObjectRetentionInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectRetentionInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.bypass_governance_retention { + d.field("bypass_governance_retention", val); + } + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.retention { + d.field("retention", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -impl UploadPartCopyInput { -#[must_use] -pub fn builder() -> builders::UploadPartCopyInputBuilder { -default() -} +impl PutObjectRetentionInput { + #[must_use] + pub fn builder() -> builders::PutObjectRetentionInputBuilder { + default() + } } #[derive(Clone, Default, PartialEq)] -pub struct UploadPartCopyOutput { -///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    Container for all response elements.

    - pub copy_part_result: Option, -///

    The version of the source object that was copied, if you have enabled versioning on the -/// source bucket.

    -/// -///

    This functionality is not supported when the source object is in a directory bucket.

    -///
    - pub copy_source_version_id: Option, +pub struct PutObjectRetentionOutput { pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms).

    - pub server_side_encryption: Option, } -impl fmt::Debug for UploadPartCopyOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("UploadPartCopyOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); +impl fmt::Debug for PutObjectRetentionOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectRetentionOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.finish_non_exhaustive() + } +} + +#[derive(Clone, PartialEq)] +pub struct PutObjectTaggingInput { + ///

    The bucket name containing the object.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash for the request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Name of the object key.

    + pub key: ObjectKey, + pub request_payer: Option, + ///

    Container for the TagSet and Tag elements

    + pub tagging: Tagging, + ///

    The versionId of the object that the tag-set will be added to.

    + pub version_id: Option, +} + +impl fmt::Debug for PutObjectTaggingInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectTaggingInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + d.field("tagging", &self.tagging); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.copy_part_result { -d.field("copy_part_result", val); + +impl PutObjectTaggingInput { + #[must_use] + pub fn builder() -> builders::PutObjectTaggingInputBuilder { + default() + } } -if let Some(ref val) = self.copy_source_version_id { -d.field("copy_source_version_id", val); + +#[derive(Clone, Default, PartialEq)] +pub struct PutObjectTaggingOutput { + ///

    The versionId of the object the tag-set was added to.

    + pub version_id: Option, } -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); + +impl fmt::Debug for PutObjectTaggingOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutObjectTaggingOutput"); + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); + +#[derive(Clone, PartialEq)] +pub struct PutPublicAccessBlockInput { + ///

    The name of the Amazon S3 bucket whose PublicAccessBlock configuration you want + /// to set.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The MD5 hash of the PutPublicAccessBlock request body.

    + ///

    For requests made using the Amazon Web Services Command Line Interface (CLI) or Amazon Web Services SDKs, this field is calculated automatically.

    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The PublicAccessBlock configuration that you want to apply to this Amazon S3 + /// bucket. You can enable the configuration options in any combination. For more information + /// about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide.

    + pub public_access_block_configuration: PublicAccessBlockConfiguration, } -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); + +impl fmt::Debug for PutPublicAccessBlockInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutPublicAccessBlockInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("public_access_block_configuration", &self.public_access_block_configuration); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); + +impl PutPublicAccessBlockInput { + #[must_use] + pub fn builder() -> builders::PutPublicAccessBlockInputBuilder { + default() + } } -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); + +#[derive(Clone, Default, PartialEq)] +pub struct PutPublicAccessBlockOutput {} + +impl fmt::Debug for PutPublicAccessBlockOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("PutPublicAccessBlockOutput"); + d.finish_non_exhaustive() + } } -d.finish_non_exhaustive() + +pub type QueueArn = String; + +///

    Specifies the configuration for publishing messages to an Amazon Simple Queue Service +/// (Amazon SQS) queue when Amazon S3 detects specified events.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct QueueConfiguration { + ///

    A collection of bucket events for which to send notifications

    + pub events: EventList, + pub filter: Option, + pub id: Option, + ///

    The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3 publishes a message + /// when it detects events of the specified type.

    + pub queue_arn: QueueArn, } + +impl fmt::Debug for QueueConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("QueueConfiguration"); + d.field("events", &self.events); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.field("queue_arn", &self.queue_arn); + d.finish_non_exhaustive() + } } +pub type QueueConfigurationList = List; + +pub type Quiet = bool; -#[derive(Default)] -pub struct UploadPartInput { -///

    Object data.

    - pub body: Option, -///

    The name of the bucket to which the multipart upload was initiated.

    -///

    -/// Directory buckets - -/// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format -/// bucket-base-name--zone-id--x-s3 (for example, -/// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming -/// restrictions, see Directory bucket naming -/// rules in the Amazon S3 User Guide.

    -///

    -/// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    -/// -///

    Access points and Object Lambda access points are not supported by directory buckets.

    -///
    -///

    -/// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    - pub bucket: BucketName, -///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any -/// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or -/// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more -/// information, see Checking object integrity in -/// the Amazon S3 User Guide.

    -///

    If you provide an individual checksum, Amazon S3 ignores any provided -/// ChecksumAlgorithm parameter.

    -///

    This checksum algorithm must be the same for all parts and it match the checksum value -/// supplied in the CreateMultipartUpload request.

    - pub checksum_algorithm: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. -/// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see -/// Checking object integrity in the -/// Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be -/// determined automatically.

    - pub content_length: Option, -///

    The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated -/// when using the command from the CLI. This parameter is required if object lock parameters -/// are specified.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub content_md5: Option, -///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    - pub expected_bucket_owner: Option, -///

    Object key for which the multipart upload was initiated.

    - pub key: ObjectKey, -///

    Part number of part being uploaded. This is a positive integer between 1 and -/// 10,000.

    - pub part_number: PartNumber, - pub request_payer: Option, -///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This -/// value is used to store the object and then it is discarded; Amazon S3 does not store the -/// encryption key. The key must be appropriate for use with the algorithm specified in the -/// x-amz-server-side-encryption-customer-algorithm header. This must be the -/// same encryption key specified in the initiate multipart upload request.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key: Option, -///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses -/// this header for a message integrity check to ensure that the encryption key was transmitted -/// without error.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    Upload ID identifying the multipart upload whose part is being uploaded.

    - pub upload_id: MultipartUploadId, -} +pub type QuoteCharacter = String; -impl fmt::Debug for UploadPartInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("UploadPartInput"); -if let Some(ref val) = self.body { -d.field("body", val); +pub type QuoteEscapeCharacter = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct QuoteFields(Cow<'static, str>); + +impl QuoteFields { + pub const ALWAYS: &'static str = "ALWAYS"; + + pub const ASNEEDED: &'static str = "ASNEEDED"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -d.field("bucket", &self.bucket); -if let Some(ref val) = self.checksum_algorithm { -d.field("checksum_algorithm", val); + +impl From for QuoteFields { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); + +impl From for Cow<'static, str> { + fn from(s: QuoteFields) -> Self { + s.0 + } } -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); + +impl FromStr for QuoteFields { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); + +pub type RecordDelimiter = String; + +///

    The container for the records event.

    +#[derive(Clone, Default, PartialEq)] +pub struct RecordsEvent { + ///

    The byte array of partial, one or more result records. S3 Select doesn't guarantee that + /// a record will be self-contained in one record frame. To ensure continuous streaming of + /// data, S3 Select might split the same record across multiple record frames instead of + /// aggregating the results in memory. Some S3 clients (for example, the SDK for Java) handle this behavior by creating a ByteStream out of the response by + /// default. Other clients might not handle this behavior by default. In those cases, you must + /// aggregate the results on the client side and parse the response.

    + pub payload: Option, } -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); + +impl fmt::Debug for RecordsEvent { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RecordsEvent"); + if let Some(ref val) = self.payload { + d.field("payload", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); + +///

    Specifies how requests are redirected. In the event of an error, you can specify a +/// different error code to return.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Redirect { + ///

    The host name to use in the redirect request.

    + pub host_name: Option, + ///

    The HTTP redirect code to use on the response. Not required if one of the siblings is + /// present.

    + pub http_redirect_code: Option, + ///

    Protocol to use when redirecting requests. The default is the protocol that is used in + /// the original request.

    + pub protocol: Option, + ///

    The object key prefix to use in the redirect request. For example, to redirect requests + /// for all pages with prefix docs/ (objects in the docs/ folder) to + /// documents/, you can set a condition block with KeyPrefixEquals + /// set to docs/ and in the Redirect set ReplaceKeyPrefixWith to + /// /documents. Not required if one of the siblings is present. Can be present + /// only if ReplaceKeyWith is not provided.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub replace_key_prefix_with: Option, + ///

    The specific object key to use in the redirect request. For example, redirect request to + /// error.html. Not required if one of the siblings is present. Can be present + /// only if ReplaceKeyPrefixWith is not provided.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub replace_key_with: Option, } -if let Some(ref val) = self.content_length { -d.field("content_length", val); + +impl fmt::Debug for Redirect { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Redirect"); + if let Some(ref val) = self.host_name { + d.field("host_name", val); + } + if let Some(ref val) = self.http_redirect_code { + d.field("http_redirect_code", val); + } + if let Some(ref val) = self.protocol { + d.field("protocol", val); + } + if let Some(ref val) = self.replace_key_prefix_with { + d.field("replace_key_prefix_with", val); + } + if let Some(ref val) = self.replace_key_with { + d.field("replace_key_with", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.content_md5 { -d.field("content_md5", val); + +///

    Specifies the redirect behavior of all requests to a website endpoint of an Amazon S3 +/// bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct RedirectAllRequestsTo { + ///

    Name of the host where requests are redirected.

    + pub host_name: HostName, + ///

    Protocol to use when redirecting requests. The default is the protocol that is used in + /// the original request.

    + pub protocol: Option, } -if let Some(ref val) = self.expected_bucket_owner { -d.field("expected_bucket_owner", val); + +impl fmt::Debug for RedirectAllRequestsTo { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RedirectAllRequestsTo"); + d.field("host_name", &self.host_name); + if let Some(ref val) = self.protocol { + d.field("protocol", val); + } + d.finish_non_exhaustive() + } } -d.field("key", &self.key); -d.field("part_number", &self.part_number); -if let Some(ref val) = self.request_payer { -d.field("request_payer", val); + +pub type Region = String; + +pub type ReplaceKeyPrefixWith = String; + +pub type ReplaceKeyWith = String; + +pub type ReplicaKmsKeyID = String; + +///

    A filter that you can specify for selection for modifications on replicas. Amazon S3 doesn't +/// replicate replica modifications by default. In the latest version of replication +/// configuration (when Filter is specified), you can specify this element and set +/// the status to Enabled to replicate modifications on replicas.

    +/// +///

    If you don't specify the Filter element, Amazon S3 assumes that the +/// replication configuration is the earlier version, V1. In the earlier version, this +/// element is not allowed.

    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicaModifications { + ///

    Specifies whether Amazon S3 replicates modifications on replicas.

    + pub status: ReplicaModificationsStatus, } -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); + +impl fmt::Debug for ReplicaModifications { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicaModifications"); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.sse_customer_key { -d.field("sse_customer_key", val); + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicaModificationsStatus(Cow<'static, str>); + +impl ReplicaModificationsStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); + +impl From for ReplicaModificationsStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.field("upload_id", &self.upload_id); -d.finish_non_exhaustive() + +impl From for Cow<'static, str> { + fn from(s: ReplicaModificationsStatus) -> Self { + s.0 + } } + +impl FromStr for ReplicaModificationsStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -impl UploadPartInput { -#[must_use] -pub fn builder() -> builders::UploadPartInputBuilder { -default() +///

    A container for replication rules. You can add up to 1,000 rules. The maximum size of a +/// replication configuration is 2 MB.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationConfiguration { + ///

    The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that Amazon S3 assumes when + /// replicating objects. For more information, see How to Set Up Replication + /// in the Amazon S3 User Guide.

    + pub role: Role, + ///

    A container for one or more replication rules. A replication configuration must have at + /// least one rule and can contain a maximum of 1,000 rules.

    + pub rules: ReplicationRules, } + +impl fmt::Debug for ReplicationConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationConfiguration"); + d.field("role", &self.role); + d.field("rules", &self.rules); + d.finish_non_exhaustive() + } } -#[derive(Clone, Default, PartialEq)] -pub struct UploadPartOutput { -///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption -/// with Key Management Service (KMS) keys (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32: Option, -///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha1: Option, -///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded -/// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated -/// with multipart uploads, see -/// Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_sha256: Option, -///

    Entity tag for the uploaded object.

    - pub e_tag: Option, - pub request_charged: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to confirm the encryption algorithm that's used.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_algorithm: Option, -///

    If server-side encryption with a customer-provided encryption key was requested, the -/// response will include this header to provide the round-trip message integrity verification -/// of the customer-provided encryption key.

    -/// -///

    This functionality is not supported for directory buckets.

    -///
    - pub sse_customer_key_md5: Option, -///

    If present, indicates the ID of the KMS key that was used for object encryption.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for -/// example, AES256, aws:kms).

    - pub server_side_encryption: Option, +///

    Specifies which Amazon S3 objects to replicate and where to store the replicas.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicationRule { + pub delete_marker_replication: Option, + pub delete_replication: Option, + ///

    A container for information about the replication destination and its configurations + /// including enabling the S3 Replication Time Control (S3 RTC).

    + pub destination: Destination, + ///

    Optional configuration to replicate existing source bucket objects.

    + /// + ///

    This parameter is no longer supported. To replicate existing objects, see Replicating existing objects with S3 Batch Replication in the + /// Amazon S3 User Guide.

    + ///
    + pub existing_object_replication: Option, + pub filter: Option, + ///

    A unique identifier for the rule. The maximum value is 255 characters.

    + pub id: Option, + ///

    An object key name prefix that identifies the object or objects to which the rule + /// applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, + /// specify an empty string.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + ///

    The priority indicates which rule has precedence whenever two or more replication rules + /// conflict. Amazon S3 will attempt to replicate objects according to all replication rules. + /// However, if there are two or more rules with the same destination bucket, then objects will + /// be replicated according to the rule with the highest priority. The higher the number, the + /// higher the priority.

    + ///

    For more information, see Replication in the + /// Amazon S3 User Guide.

    + pub priority: Option, + ///

    A container that describes additional filters for identifying the source objects that + /// you want to replicate. You can choose to enable or disable the replication of these + /// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created + /// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service + /// (SSE-KMS).

    + pub source_selection_criteria: Option, + ///

    Specifies whether the rule is enabled.

    + pub status: ReplicationRuleStatus, } -impl fmt::Debug for UploadPartOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("UploadPartOutput"); -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); -} -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); -} -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); -} -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); +impl fmt::Debug for ReplicationRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationRule"); + if let Some(ref val) = self.delete_marker_replication { + d.field("delete_marker_replication", val); + } + if let Some(ref val) = self.delete_replication { + d.field("delete_replication", val); + } + d.field("destination", &self.destination); + if let Some(ref val) = self.existing_object_replication { + d.field("existing_object_replication", val); + } + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.priority { + d.field("priority", val); + } + if let Some(ref val) = self.source_selection_criteria { + d.field("source_selection_criteria", val); + } + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); + +///

    A container for specifying rule filters. The filters determine the subset of objects to +/// which the rule applies. This element is required only if you specify more than one filter.

    +///

    For example:

    +///
      +///
    • +///

      If you specify both a Prefix and a Tag filter, wrap +/// these filters in an And tag.

      +///
    • +///
    • +///

      If you specify a filter based on multiple tags, wrap the Tag elements +/// in an And tag.

      +///
    • +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationRuleAndOperator { + ///

    An object key name prefix that identifies the subset of objects to which the rule + /// applies.

    + pub prefix: Option, + ///

    An array of tags containing key and value pairs.

    + pub tags: Option, } -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); + +impl fmt::Debug for ReplicationRuleAndOperator { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationRuleAndOperator"); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tags { + d.field("tags", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); + +///

    A filter that identifies the subset of objects to which the replication rule applies. A +/// Filter must specify exactly one Prefix, Tag, or +/// an And child element.

    +#[derive(Default, Serialize, Deserialize)] +pub struct ReplicationRuleFilter { + ///

    A container for specifying rule filters. The filters determine the subset of objects to + /// which the rule applies. This element is required only if you specify more than one filter. + /// For example:

    + ///
      + ///
    • + ///

      If you specify both a Prefix and a Tag filter, wrap + /// these filters in an And tag.

      + ///
    • + ///
    • + ///

      If you specify a filter based on multiple tags, wrap the Tag elements + /// in an And tag.

      + ///
    • + ///
    + pub and: Option, + pub cached_tags: CachedTags, + ///

    An object key name prefix that identifies the subset of objects to which the rule + /// applies.

    + /// + ///

    Replacement must be made for object keys containing special characters (such as carriage returns) when using + /// XML requests. For more information, see + /// XML related object key constraints.

    + ///
    + pub prefix: Option, + ///

    A container for specifying a tag key and value.

    + ///

    The rule applies only to objects that have the tag in their tag set.

    + pub tag: Option, } -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); + +impl fmt::Debug for ReplicationRuleFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationRuleFilter"); + if let Some(ref val) = self.and { + d.field("and", val); + } + d.field("cached_tags", &self.cached_tags); + if let Some(ref val) = self.prefix { + d.field("prefix", val); + } + if let Some(ref val) = self.tag { + d.field("tag", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); + +#[allow(clippy::clone_on_copy)] +impl Clone for ReplicationRuleFilter { + fn clone(&self) -> Self { + Self { + and: self.and.clone(), + cached_tags: default(), + prefix: self.prefix.clone(), + tag: self.tag.clone(), + } + } } -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); +impl PartialEq for ReplicationRuleFilter { + fn eq(&self, other: &Self) -> bool { + if self.and != other.and { + return false; + } + if self.prefix != other.prefix { + return false; + } + if self.tag != other.tag { + return false; + } + true + } } -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); + +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicationRuleStatus(Cow<'static, str>); + +impl ReplicationRuleStatus { + pub const DISABLED: &'static str = "Disabled"; + + pub const ENABLED: &'static str = "Enabled"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); + +impl From for ReplicationRuleStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.finish_non_exhaustive() + +impl From for Cow<'static, str> { + fn from(s: ReplicationRuleStatus) -> Self { + s.0 + } } + +impl FromStr for ReplicationRuleStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } +pub type ReplicationRules = List; -pub type UserMetadata = List; +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ReplicationStatus(Cow<'static, str>); -pub type Value = String; +impl ReplicationStatus { + pub const COMPLETE: &'static str = "COMPLETE"; -pub type VersionCount = i32; + pub const COMPLETED: &'static str = "COMPLETED"; -pub type VersionIdMarker = String; + pub const FAILED: &'static str = "FAILED"; -///

    Describes the versioning state of an Amazon S3 bucket. For more information, see PUT -/// Bucket versioning in the Amazon S3 API Reference.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct VersioningConfiguration { - pub exclude_folders: Option, - pub excluded_prefixes: Option, -///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This -/// element is only returned if the bucket has been configured with MFA delete. If the bucket -/// has never been so configured, this element is not returned.

    - pub mfa_delete: Option, -///

    The versioning state of the bucket.

    - pub status: Option, -} + pub const PENDING: &'static str = "PENDING"; -impl fmt::Debug for VersioningConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("VersioningConfiguration"); -if let Some(ref val) = self.exclude_folders { -d.field("exclude_folders", val); -} -if let Some(ref val) = self.excluded_prefixes { -d.field("excluded_prefixes", val); -} -if let Some(ref val) = self.mfa_delete { -d.field("mfa_delete", val); -} -if let Some(ref val) = self.status { -d.field("status", val); -} -d.finish_non_exhaustive() -} -} + pub const REPLICA: &'static str = "REPLICA"; + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -///

    Specifies website configuration parameters for an Amazon S3 bucket.

    -#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] -pub struct WebsiteConfiguration { -///

    The name of the error document for the website.

    - pub error_document: Option, -///

    The name of the index document for the website.

    - pub index_document: Option, -///

    The redirect behavior for every request to this bucket's website endpoint.

    -/// -///

    If you specify this property, you can't specify any other property.

    -///
    - pub redirect_all_requests_to: Option, -///

    Rules that define when a redirect is applied and the redirect behavior.

    - pub routing_rules: Option, + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl fmt::Debug for WebsiteConfiguration { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("WebsiteConfiguration"); -if let Some(ref val) = self.error_document { -d.field("error_document", val); -} -if let Some(ref val) = self.index_document { -d.field("index_document", val); +impl From for ReplicationStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.redirect_all_requests_to { -d.field("redirect_all_requests_to", val); + +impl From for Cow<'static, str> { + fn from(s: ReplicationStatus) -> Self { + s.0 + } } -if let Some(ref val) = self.routing_rules { -d.field("routing_rules", val); + +impl FromStr for ReplicationStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -d.finish_non_exhaustive() + +///

    A container specifying S3 Replication Time Control (S3 RTC) related information, including whether S3 RTC is +/// enabled and the time when all objects and operations on objects must be replicated. Must be +/// specified together with a Metrics block.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ReplicationTime { + ///

    Specifies whether the replication time is enabled.

    + pub status: ReplicationTimeStatus, + ///

    A container specifying the time by which replication should be complete for all objects + /// and operations on objects.

    + pub time: ReplicationTimeValue, } + +impl fmt::Debug for ReplicationTime { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationTime"); + d.field("status", &self.status); + d.field("time", &self.time); + d.finish_non_exhaustive() + } } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ReplicationTimeStatus(Cow<'static, str>); -pub type WebsiteRedirectLocation = String; +impl ReplicationTimeStatus { + pub const DISABLED: &'static str = "Disabled"; -#[derive(Default)] -pub struct WriteGetObjectResponseInput { -///

    Indicates that a range of bytes was specified.

    - pub accept_ranges: Option, -///

    The object data.

    - pub body: Option, -///

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side -/// encryption with Amazon Web Services KMS (SSE-KMS).

    - pub bucket_key_enabled: Option, -///

    Specifies caching behavior along the request/reply chain.

    - pub cache_control: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 -/// checksum of the object returned by the Object Lambda function. This may not match the -/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values -/// only when the original GetObject request required checksum validation. For -/// more information about checksums, see Checking object -/// integrity in the Amazon S3 User Guide.

    -///

    Only one checksum header can be specified at a time. If you supply multiple checksum -/// headers, this request will fail.

    -///

    - pub checksum_crc32: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C -/// checksum of the object returned by the Object Lambda function. This may not match the -/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values -/// only when the original GetObject request required checksum validation. For -/// more information about checksums, see Checking object -/// integrity in the Amazon S3 User Guide.

    -///

    Only one checksum header can be specified at a time. If you supply multiple checksum -/// headers, this request will fail.

    - pub checksum_crc32c: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit -/// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    - pub checksum_crc64nvme: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 -/// digest of the object returned by the Object Lambda function. This may not match the -/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values -/// only when the original GetObject request required checksum validation. For -/// more information about checksums, see Checking object -/// integrity in the Amazon S3 User Guide.

    -///

    Only one checksum header can be specified at a time. If you supply multiple checksum -/// headers, this request will fail.

    - pub checksum_sha1: Option, -///

    This header can be used as a data integrity check to verify that the data received is -/// the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 -/// digest of the object returned by the Object Lambda function. This may not match the -/// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values -/// only when the original GetObject request required checksum validation. For -/// more information about checksums, see Checking object -/// integrity in the Amazon S3 User Guide.

    -///

    Only one checksum header can be specified at a time. If you supply multiple checksum -/// headers, this request will fail.

    - pub checksum_sha256: Option, -///

    Specifies presentational information for the object.

    - pub content_disposition: Option, -///

    Specifies what content encodings have been applied to the object and thus what decoding -/// mechanisms must be applied to obtain the media-type referenced by the Content-Type header -/// field.

    - pub content_encoding: Option, -///

    The language the content is in.

    - pub content_language: Option, -///

    The size of the content body in bytes.

    - pub content_length: Option, -///

    The portion of the object returned in the response.

    - pub content_range: Option, -///

    A standard MIME type describing the format of the object data.

    - pub content_type: Option, -///

    Specifies whether an object stored in Amazon S3 is (true) or is not -/// (false) a delete marker. To learn more about delete markers, see Working with delete markers.

    - pub delete_marker: Option, -///

    An opaque identifier assigned by a web server to a specific version of a resource found -/// at a URL.

    - pub e_tag: Option, -///

    A string that uniquely identifies an error condition. Returned in the <Code> tag -/// of the error XML response for a corresponding GetObject call. Cannot be used -/// with a successful StatusCode header or when the transformed object is provided -/// in the body. All error codes from S3 are sentence-cased. The regular expression (regex) -/// value is "^[A-Z][a-zA-Z]+$".

    - pub error_code: Option, -///

    Contains a generic description of the error condition. Returned in the <Message> -/// tag of the error XML response for a corresponding GetObject call. Cannot be -/// used with a successful StatusCode header or when the transformed object is -/// provided in body.

    - pub error_message: Option, -///

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes -/// this header. It includes the expiry-date and rule-id key-value -/// pairs that provide the object expiration information. The value of the rule-id -/// is URL-encoded.

    - pub expiration: Option, -///

    The date and time at which the object is no longer cacheable.

    - pub expires: Option, -///

    The date and time that the object was last modified.

    - pub last_modified: Option, -///

    A map of metadata to store with the object in S3.

    - pub metadata: Option, -///

    Set to the number of metadata entries not returned in x-amz-meta headers. -/// This can happen if you create metadata using an API like SOAP that supports more flexible -/// metadata than the REST API. For example, using SOAP, you can create metadata whose values -/// are not legal HTTP headers.

    - pub missing_meta: Option, -///

    Indicates whether an object stored in Amazon S3 has an active legal hold.

    - pub object_lock_legal_hold_status: Option, -///

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information -/// about S3 Object Lock, see Object Lock.

    - pub object_lock_mode: Option, -///

    The date and time when Object Lock is configured to expire.

    - pub object_lock_retain_until_date: Option, -///

    The count of parts this object has.

    - pub parts_count: Option, -///

    Indicates if request involves bucket that is either a source or destination in a -/// Replication rule. For more information about S3 Replication, see Replication.

    - pub replication_status: Option, - pub request_charged: Option, -///

    Route prefix to the HTTP URL generated.

    - pub request_route: RequestRoute, -///

    A single use encrypted token that maps WriteGetObjectResponse to the end -/// user GetObject request.

    - pub request_token: RequestToken, -///

    Provides information about object restoration operation and expiration time of the -/// restored object copy.

    - pub restore: Option, -///

    Encryption algorithm used if server-side encryption with a customer-provided encryption -/// key was specified for object stored in Amazon S3.

    - pub sse_customer_algorithm: Option, -///

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data -/// stored in S3. For more information, see Protecting data -/// using server-side encryption with customer-provided encryption keys -/// (SSE-C).

    - pub sse_customer_key_md5: Option, -///

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key -/// Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in -/// Amazon S3 object.

    - pub ssekms_key_id: Option, -///

    The server-side encryption algorithm used when storing requested object in Amazon S3 (for -/// example, AES256, aws:kms).

    - pub server_side_encryption: Option, -///

    The integer status code for an HTTP response of a corresponding GetObject -/// request. The following is a list of status codes.

    -///
      -///
    • -///

      -/// 200 - OK -///

      -///
    • -///
    • -///

      -/// 206 - Partial Content -///

      -///
    • -///
    • -///

      -/// 304 - Not Modified -///

      -///
    • -///
    • -///

      -/// 400 - Bad Request -///

      -///
    • -///
    • -///

      -/// 401 - Unauthorized -///

      -///
    • -///
    • -///

      -/// 403 - Forbidden -///

      -///
    • -///
    • -///

      -/// 404 - Not Found -///

      -///
    • -///
    • -///

      -/// 405 - Method Not Allowed -///

      -///
    • -///
    • -///

      -/// 409 - Conflict -///

      -///
    • -///
    • -///

      -/// 411 - Length Required -///

      -///
    • -///
    • -///

      -/// 412 - Precondition Failed -///

      -///
    • -///
    • -///

      -/// 416 - Range Not Satisfiable -///

      -///
    • -///
    • -///

      -/// 500 - Internal Server Error -///

      -///
    • -///
    • -///

      -/// 503 - Service Unavailable -///

      -///
    • -///
    - pub status_code: Option, -///

    Provides storage class information of the object. Amazon S3 returns this header for all -/// objects except for S3 Standard storage class objects.

    -///

    For more information, see Storage Classes.

    - pub storage_class: Option, -///

    The number of tags, if any, on the object.

    - pub tag_count: Option, -///

    An ID used to reference a specific version of the object.

    - pub version_id: Option, -} + pub const ENABLED: &'static str = "Enabled"; -impl fmt::Debug for WriteGetObjectResponseInput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("WriteGetObjectResponseInput"); -if let Some(ref val) = self.accept_ranges { -d.field("accept_ranges", val); -} -if let Some(ref val) = self.body { -d.field("body", val); -} -if let Some(ref val) = self.bucket_key_enabled { -d.field("bucket_key_enabled", val); + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.cache_control { -d.field("cache_control", val); + +impl From for ReplicationTimeStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.checksum_crc32 { -d.field("checksum_crc32", val); + +impl From for Cow<'static, str> { + fn from(s: ReplicationTimeStatus) -> Self { + s.0 + } } -if let Some(ref val) = self.checksum_crc32c { -d.field("checksum_crc32c", val); + +impl FromStr for ReplicationTimeStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.checksum_crc64nvme { -d.field("checksum_crc64nvme", val); + +///

    A container specifying the time value for S3 Replication Time Control (S3 RTC) and replication metrics +/// EventThreshold.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ReplicationTimeValue { + ///

    Contains an integer specifying time in minutes.

    + ///

    Valid value: 15

    + pub minutes: Option, } -if let Some(ref val) = self.checksum_sha1 { -d.field("checksum_sha1", val); + +impl fmt::Debug for ReplicationTimeValue { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ReplicationTimeValue"); + if let Some(ref val) = self.minutes { + d.field("minutes", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.checksum_sha256 { -d.field("checksum_sha256", val); + +///

    If present, indicates that the requester was successfully charged for the +/// request.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RequestCharged(Cow<'static, str>); + +impl RequestCharged { + pub const REQUESTER: &'static str = "requester"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.content_disposition { -d.field("content_disposition", val); + +impl From for RequestCharged { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.content_encoding { -d.field("content_encoding", val); + +impl From for Cow<'static, str> { + fn from(s: RequestCharged) -> Self { + s.0 + } } -if let Some(ref val) = self.content_language { -d.field("content_language", val); + +impl FromStr for RequestCharged { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.content_length { -d.field("content_length", val); + +///

    Confirms that the requester knows that they will be charged for the request. Bucket +/// owners need not specify this parameter in their requests. If either the source or +/// destination S3 bucket has Requester Pays enabled, the requester will pay for corresponding +/// charges to copy the object. For information about downloading objects from Requester Pays +/// buckets, see Downloading Objects in +/// Requester Pays Buckets in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets.

    +///
    +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RequestPayer(Cow<'static, str>); + +impl RequestPayer { + pub const REQUESTER: &'static str = "requester"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.content_range { -d.field("content_range", val); + +impl From for RequestPayer { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.content_type { -d.field("content_type", val); + +impl From for Cow<'static, str> { + fn from(s: RequestPayer) -> Self { + s.0 + } } -if let Some(ref val) = self.delete_marker { -d.field("delete_marker", val); + +impl FromStr for RequestPayer { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.e_tag { -d.field("e_tag", val); + +///

    Container for Payer.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct RequestPaymentConfiguration { + ///

    Specifies who pays for the download and request fees.

    + pub payer: Payer, } -if let Some(ref val) = self.error_code { -d.field("error_code", val); + +impl fmt::Debug for RequestPaymentConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RequestPaymentConfiguration"); + d.field("payer", &self.payer); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.error_message { -d.field("error_message", val); + +impl Default for RequestPaymentConfiguration { + fn default() -> Self { + Self { + payer: String::new().into(), + } + } } -if let Some(ref val) = self.expiration { -d.field("expiration", val); + +///

    Container for specifying if periodic QueryProgress messages should be +/// sent.

    +#[derive(Clone, Default, PartialEq)] +pub struct RequestProgress { + ///

    Specifies whether periodic QueryProgress frames should be sent. Valid values: TRUE, + /// FALSE. Default value: FALSE.

    + pub enabled: Option, } -if let Some(ref val) = self.expires { -d.field("expires", val); + +impl fmt::Debug for RequestProgress { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RequestProgress"); + if let Some(ref val) = self.enabled { + d.field("enabled", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.last_modified { -d.field("last_modified", val); + +pub type RequestRoute = String; + +pub type RequestToken = String; + +pub type ResponseCacheControl = String; + +pub type ResponseContentDisposition = String; + +pub type ResponseContentEncoding = String; + +pub type ResponseContentLanguage = String; + +pub type ResponseContentType = String; + +pub type ResponseExpires = Timestamp; + +pub type Restore = String; + +pub type RestoreExpiryDate = Timestamp; + +#[derive(Clone, Default, PartialEq)] +pub struct RestoreObjectInput { + ///

    The bucket name containing the object to restore.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + pub checksum_algorithm: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Object key for which the action was initiated.

    + pub key: ObjectKey, + pub request_payer: Option, + pub restore_request: Option, + ///

    VersionId used to reference a specific version of the object.

    + pub version_id: Option, } -if let Some(ref val) = self.metadata { -d.field("metadata", val); + +impl fmt::Debug for RestoreObjectInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RestoreObjectInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.restore_request { + d.field("restore_request", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.missing_meta { -d.field("missing_meta", val); + +impl RestoreObjectInput { + #[must_use] + pub fn builder() -> builders::RestoreObjectInputBuilder { + default() + } } -if let Some(ref val) = self.object_lock_legal_hold_status { -d.field("object_lock_legal_hold_status", val); + +#[derive(Clone, Default, PartialEq)] +pub struct RestoreObjectOutput { + pub request_charged: Option, + ///

    Indicates the path in the provided S3 output location where Select results will be + /// restored to.

    + pub restore_output_path: Option, } -if let Some(ref val) = self.object_lock_mode { -d.field("object_lock_mode", val); + +impl fmt::Debug for RestoreObjectOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RestoreObjectOutput"); + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.restore_output_path { + d.field("restore_output_path", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.object_lock_retain_until_date { -d.field("object_lock_retain_until_date", val); + +pub type RestoreOutputPath = String; + +///

    Container for restore job parameters.

    +#[derive(Clone, Default, PartialEq)] +pub struct RestoreRequest { + ///

    Lifetime of the active copy in days. Do not use with restores that specify + /// OutputLocation.

    + ///

    The Days element is required for regular restores, and must not be provided for select + /// requests.

    + pub days: Option, + ///

    The optional description for the job.

    + pub description: Option, + ///

    S3 Glacier related parameters pertaining to this job. Do not use with restores that + /// specify OutputLocation.

    + pub glacier_job_parameters: Option, + ///

    Describes the location where the restore job's output is stored.

    + pub output_location: Option, + /// + ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more + ///

    + ///
    + ///

    Describes the parameters for Select job types.

    + pub select_parameters: Option, + ///

    Retrieval tier at which the restore will be processed.

    + pub tier: Option, + /// + ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more + ///

    + ///
    + ///

    Type of restore request.

    + pub type_: Option, } -if let Some(ref val) = self.parts_count { -d.field("parts_count", val); + +impl fmt::Debug for RestoreRequest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RestoreRequest"); + if let Some(ref val) = self.days { + d.field("days", val); + } + if let Some(ref val) = self.description { + d.field("description", val); + } + if let Some(ref val) = self.glacier_job_parameters { + d.field("glacier_job_parameters", val); + } + if let Some(ref val) = self.output_location { + d.field("output_location", val); + } + if let Some(ref val) = self.select_parameters { + d.field("select_parameters", val); + } + if let Some(ref val) = self.tier { + d.field("tier", val); + } + if let Some(ref val) = self.type_ { + d.field("type_", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.replication_status { -d.field("replication_status", val); + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RestoreRequestType(Cow<'static, str>); + +impl RestoreRequestType { + pub const SELECT: &'static str = "SELECT"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -if let Some(ref val) = self.request_charged { -d.field("request_charged", val); + +impl From for RestoreRequestType { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -d.field("request_route", &self.request_route); -d.field("request_token", &self.request_token); -if let Some(ref val) = self.restore { -d.field("restore", val); + +impl From for Cow<'static, str> { + fn from(s: RestoreRequestType) -> Self { + s.0 + } } -if let Some(ref val) = self.sse_customer_algorithm { -d.field("sse_customer_algorithm", val); + +impl FromStr for RestoreRequestType { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -if let Some(ref val) = self.sse_customer_key_md5 { -d.field("sse_customer_key_md5", val); + +///

    Specifies the restoration status of an object. Objects in certain storage classes must +/// be restored before they can be retrieved. For more information about these storage classes +/// and how to work with archived objects, see Working with archived +/// objects in the Amazon S3 User Guide.

    +/// +///

    This functionality is not supported for directory buckets. +/// Only the S3 Express One Zone storage class is supported by directory buckets to store objects.

    +///
    +#[derive(Clone, Default, PartialEq)] +pub struct RestoreStatus { + ///

    Specifies whether the object is currently being restored. If the object restoration is + /// in progress, the header returns the value TRUE. For example:

    + ///

    + /// x-amz-optional-object-attributes: IsRestoreInProgress="true" + ///

    + ///

    If the object restoration has completed, the header returns the value + /// FALSE. For example:

    + ///

    + /// x-amz-optional-object-attributes: IsRestoreInProgress="false", + /// RestoreExpiryDate="2012-12-21T00:00:00.000Z" + ///

    + ///

    If the object hasn't been restored, there is no header response.

    + pub is_restore_in_progress: Option, + ///

    Indicates when the restored copy will expire. This value is populated only if the object + /// has already been restored. For example:

    + ///

    + /// x-amz-optional-object-attributes: IsRestoreInProgress="false", + /// RestoreExpiryDate="2012-12-21T00:00:00.000Z" + ///

    + pub restore_expiry_date: Option, } -if let Some(ref val) = self.ssekms_key_id { -d.field("ssekms_key_id", val); + +impl fmt::Debug for RestoreStatus { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RestoreStatus"); + if let Some(ref val) = self.is_restore_in_progress { + d.field("is_restore_in_progress", val); + } + if let Some(ref val) = self.restore_expiry_date { + d.field("restore_expiry_date", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.server_side_encryption { -d.field("server_side_encryption", val); + +pub type Role = String; + +///

    Specifies the redirect behavior and when a redirect is applied. For more information +/// about routing rules, see Configuring advanced conditional redirects in the +/// Amazon S3 User Guide.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct RoutingRule { + ///

    A container for describing a condition that must be met for the specified redirect to + /// apply. For example, 1. If request is for pages in the /docs folder, redirect + /// to the /documents folder. 2. If request results in HTTP error 4xx, redirect + /// request to another host where you might process the error.

    + pub condition: Option, + ///

    Container for redirect information. You can redirect requests to another host, to + /// another page, or with another protocol. In the event of an error, you can specify a + /// different error code to return.

    + pub redirect: Redirect, } -if let Some(ref val) = self.status_code { -d.field("status_code", val); + +impl fmt::Debug for RoutingRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("RoutingRule"); + if let Some(ref val) = self.condition { + d.field("condition", val); + } + d.field("redirect", &self.redirect); + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.storage_class { -d.field("storage_class", val); + +pub type RoutingRules = List; + +///

    A container for object key name prefix and suffix filtering rules.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct S3KeyFilter { + pub filter_rules: Option, } -if let Some(ref val) = self.tag_count { -d.field("tag_count", val); + +impl fmt::Debug for S3KeyFilter { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("S3KeyFilter"); + if let Some(ref val) = self.filter_rules { + d.field("filter_rules", val); + } + d.finish_non_exhaustive() + } } -if let Some(ref val) = self.version_id { -d.field("version_id", val); + +///

    Describes an Amazon S3 location that will receive the results of the restore request.

    +#[derive(Clone, Default, PartialEq)] +pub struct S3Location { + ///

    A list of grants that control access to the staged results.

    + pub access_control_list: Option, + ///

    The name of the bucket where the restore results will be placed.

    + pub bucket_name: BucketName, + ///

    The canned ACL to apply to the restore results.

    + pub canned_acl: Option, + pub encryption: Option, + ///

    The prefix that is prepended to the restore results for this request.

    + pub prefix: LocationPrefix, + ///

    The class of storage used to store the restore results.

    + pub storage_class: Option, + ///

    The tag-set that is applied to the restore results.

    + pub tagging: Option, + ///

    A list of metadata to store with the restore results in S3.

    + pub user_metadata: Option, } -d.finish_non_exhaustive() + +impl fmt::Debug for S3Location { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("S3Location"); + if let Some(ref val) = self.access_control_list { + d.field("access_control_list", val); + } + d.field("bucket_name", &self.bucket_name); + if let Some(ref val) = self.canned_acl { + d.field("canned_acl", val); + } + if let Some(ref val) = self.encryption { + d.field("encryption", val); + } + d.field("prefix", &self.prefix); + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tagging { + d.field("tagging", val); + } + if let Some(ref val) = self.user_metadata { + d.field("user_metadata", val); + } + d.finish_non_exhaustive() + } } + +pub type S3TablesArn = String; + +pub type S3TablesBucketArn = String; + +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct S3TablesDestination { + ///

    + /// The Amazon Resource Name (ARN) for the table bucket that's specified as the + /// destination in the metadata table configuration. The destination table bucket + /// must be in the same Region and Amazon Web Services account as the general purpose bucket. + ///

    + pub table_bucket_arn: S3TablesBucketArn, + ///

    + /// The name for the metadata table in your metadata table configuration. The specified metadata + /// table name must be unique within the aws_s3_metadata namespace in the destination + /// table bucket. + ///

    + pub table_name: S3TablesName, } -impl WriteGetObjectResponseInput { -#[must_use] -pub fn builder() -> builders::WriteGetObjectResponseInputBuilder { -default() -} +impl fmt::Debug for S3TablesDestination { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("S3TablesDestination"); + d.field("table_bucket_arn", &self.table_bucket_arn); + d.field("table_name", &self.table_name); + d.finish_non_exhaustive() + } } +///

    +/// The destination information for the metadata table configuration. The destination table bucket +/// must be in the same Region and Amazon Web Services account as the general purpose bucket. The specified metadata +/// table name must be unique within the aws_s3_metadata namespace in the destination +/// table bucket. +///

    #[derive(Clone, Default, PartialEq)] -pub struct WriteGetObjectResponseOutput { +pub struct S3TablesDestinationResult { + ///

    + /// The Amazon Resource Name (ARN) for the metadata table in the metadata table configuration. The + /// specified metadata table name must be unique within the aws_s3_metadata namespace + /// in the destination table bucket. + ///

    + pub table_arn: S3TablesArn, + ///

    + /// The Amazon Resource Name (ARN) for the table bucket that's specified as the + /// destination in the metadata table configuration. The destination table bucket + /// must be in the same Region and Amazon Web Services account as the general purpose bucket. + ///

    + pub table_bucket_arn: S3TablesBucketArn, + ///

    + /// The name for the metadata table in your metadata table configuration. The specified metadata + /// table name must be unique within the aws_s3_metadata namespace in the destination + /// table bucket. + ///

    + pub table_name: S3TablesName, + ///

    + /// The table bucket namespace for the metadata table in your metadata table configuration. This value + /// is always aws_s3_metadata. + ///

    + pub table_namespace: S3TablesNamespace, } -impl fmt::Debug for WriteGetObjectResponseOutput { -fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -let mut d = f.debug_struct("WriteGetObjectResponseOutput"); -d.finish_non_exhaustive() -} +impl fmt::Debug for S3TablesDestinationResult { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("S3TablesDestinationResult"); + d.field("table_arn", &self.table_arn); + d.field("table_bucket_arn", &self.table_bucket_arn); + d.field("table_name", &self.table_name); + d.field("table_namespace", &self.table_namespace); + d.finish_non_exhaustive() + } } +pub type S3TablesName = String; -pub type WriteOffsetBytes = i64; - -pub type Years = i32; - -#[cfg(test)] -mod tests { -use super::*; - -fn require_default() {} -fn require_clone() {} - -#[test] -fn test_default() { -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -require_default::(); -} -#[test] -fn test_clone() { -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -require_clone::(); -} -} -pub mod builders { -#![allow(clippy::missing_errors_doc)] - -use super::*; -pub use super::build_error::BuildError; +pub type S3TablesNamespace = String; -/// A builder for [`AbortMultipartUploadInput`] -#[derive(Default)] -pub struct AbortMultipartUploadInputBuilder { -bucket: Option, +pub type SSECustomerAlgorithm = String; -expected_bucket_owner: Option, +pub type SSECustomerKey = String; -if_match_initiated_time: Option, +pub type SSECustomerKeyMD5 = String; -key: Option, +///

    Specifies the use of SSE-KMS to encrypt delivered inventory reports.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SSEKMS { + ///

    Specifies the ID of the Key Management Service (KMS) symmetric encryption customer managed key to use for + /// encrypting inventory reports.

    + pub key_id: SSEKMSKeyId, +} -request_payer: Option, +impl fmt::Debug for SSEKMS { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SSEKMS"); + d.field("key_id", &self.key_id); + d.finish_non_exhaustive() + } +} -upload_id: Option, +pub type SSEKMSEncryptionContext = String; -} +pub type SSEKMSKeyId = String; -impl AbortMultipartUploadInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} +///

    Specifies the use of SSE-S3 to encrypt delivered inventory reports.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SSES3 {} -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self +impl fmt::Debug for SSES3 { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SSES3"); + d.finish_non_exhaustive() + } } -pub fn set_if_match_initiated_time(&mut self, field: Option) -> &mut Self { - self.if_match_initiated_time = field; -self +///

    Specifies the byte range of the object to get the records from. A record is processed +/// when its first byte is contained by the range. This parameter is optional, but when +/// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the +/// start and end of the range.

    +#[derive(Clone, Default, PartialEq)] +pub struct ScanRange { + ///

    Specifies the end of the byte range. This parameter is optional. Valid values: + /// non-negative integers. The default value is one less than the size of the object being + /// queried. If only the End parameter is supplied, it is interpreted to mean scan the last N + /// bytes of the file. For example, + /// 50 means scan the + /// last 50 bytes.

    + pub end: Option, + ///

    Specifies the start of the byte range. This parameter is optional. Valid values: + /// non-negative integers. The default value is 0. If only start is supplied, it + /// means scan from that point to the end of the file. For example, + /// 50 means scan + /// from byte 50 until the end of the file.

    + pub start: Option, } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self +impl fmt::Debug for ScanRange { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ScanRange"); + if let Some(ref val) = self.end { + d.field("end", val); + } + if let Some(ref val) = self.start { + d.field("start", val); + } + d.finish_non_exhaustive() + } } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self +///

    The container for selecting objects from a content event stream.

    +#[derive(Debug, Clone, PartialEq)] +#[non_exhaustive] +pub enum SelectObjectContentEvent { + ///

    The Continuation Event.

    + Cont(ContinuationEvent), + ///

    The End Event.

    + End(EndEvent), + ///

    The Progress Event.

    + Progress(ProgressEvent), + ///

    The Records Event.

    + Records(RecordsEvent), + ///

    The Stats Event.

    + Stats(StatsEvent), } -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self +/// +///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query +/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a +/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data +/// into records. It returns only records that match the specified SQL expression. You must +/// also specify the data serialization format for the response. For more information, see +/// S3Select API Documentation.

    +#[derive(Clone, PartialEq)] +pub struct SelectObjectContentInput { + ///

    The S3 bucket.

    + pub bucket: BucketName, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The object key.

    + pub key: ObjectKey, + ///

    The server-side encryption (SSE) algorithm used to encrypt the object. This parameter is needed only when the object was created + /// using a checksum algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + pub sse_customer_algorithm: Option, + ///

    The server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum algorithm. + /// For more information, see + /// Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + pub sse_customer_key: Option, + ///

    The MD5 server-side encryption (SSE) customer managed key. This parameter is needed only when the object was created using a checksum + /// algorithm. For more information, + /// see Protecting data using SSE-C keys in the + /// Amazon S3 User Guide.

    + pub sse_customer_key_md5: Option, + pub request: SelectObjectContentRequest, } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self +impl fmt::Debug for SelectObjectContentInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SelectObjectContentInput"); + d.field("bucket", &self.bucket); + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("request", &self.request); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self +impl SelectObjectContentInput { + #[must_use] + pub fn builder() -> builders::SelectObjectContentInputBuilder { + default() + } } -#[must_use] -pub fn if_match_initiated_time(mut self, field: Option) -> Self { - self.if_match_initiated_time = field; -self +#[derive(Default)] +pub struct SelectObjectContentOutput { + ///

    The array of results.

    + pub payload: Option, } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self +impl fmt::Debug for SelectObjectContentOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SelectObjectContentOutput"); + if let Some(ref val) = self.payload { + d.field("payload", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self +/// +///

    Learn Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Request to filter the contents of an Amazon S3 object based on a simple Structured Query +/// Language (SQL) statement. In the request, along with the SQL expression, you must specify a +/// data serialization format (JSON or CSV) of the object. Amazon S3 uses this to parse object data +/// into records. It returns only records that match the specified SQL expression. You must +/// also specify the data serialization format for the response. For more information, see +/// S3Select API Documentation.

    +#[derive(Clone, PartialEq)] +pub struct SelectObjectContentRequest { + ///

    The expression that is used to query the object.

    + pub expression: Expression, + ///

    The type of the provided expression (for example, SQL).

    + pub expression_type: ExpressionType, + ///

    Describes the format of the data in the object that is being queried.

    + pub input_serialization: InputSerialization, + ///

    Describes the format of the data that you want Amazon S3 to return in response.

    + pub output_serialization: OutputSerialization, + ///

    Specifies if periodic request progress information should be enabled.

    + pub request_progress: Option, + ///

    Specifies the byte range of the object to get the records from. A record is processed + /// when its first byte is contained by the range. This parameter is optional, but when + /// specified, it must not be empty. See RFC 2616, Section 14.35.1 about how to specify the + /// start and end of the range.

    + ///

    + /// ScanRangemay be used in the following ways:

    + ///
      + ///
    • + ///

      + /// 50100 + /// - process only the records starting between the bytes 50 and 100 (inclusive, counting + /// from zero)

      + ///
    • + ///
    • + ///

      + /// 50 - + /// process only the records starting after the byte 50

      + ///
    • + ///
    • + ///

      + /// 50 - + /// process only the records within the last 50 bytes of the file.

      + ///
    • + ///
    + pub scan_range: Option, } -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self +impl fmt::Debug for SelectObjectContentRequest { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SelectObjectContentRequest"); + d.field("expression", &self.expression); + d.field("expression_type", &self.expression_type); + d.field("input_serialization", &self.input_serialization); + d.field("output_serialization", &self.output_serialization); + if let Some(ref val) = self.request_progress { + d.field("request_progress", val); + } + if let Some(ref val) = self.scan_range { + d.field("scan_range", val); + } + d.finish_non_exhaustive() + } } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match_initiated_time = self.if_match_initiated_time; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(AbortMultipartUploadInput { -bucket, -expected_bucket_owner, -if_match_initiated_time, -key, -request_payer, -upload_id, -}) +/// +///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more +///

    +///
    +///

    Describes the parameters for Select job types.

    +///

    Learn How to optimize querying your data in Amazon S3 using +/// Amazon Athena, S3 Object Lambda, or client-side filtering.

    +#[derive(Clone, PartialEq)] +pub struct SelectParameters { + /// + ///

    Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more + ///

    + ///
    + ///

    The expression that is used to query the object.

    + pub expression: Expression, + ///

    The type of the provided expression (for example, SQL).

    + pub expression_type: ExpressionType, + ///

    Describes the serialization format of the object.

    + pub input_serialization: InputSerialization, + ///

    Describes how the results of the Select job are serialized.

    + pub output_serialization: OutputSerialization, } +impl fmt::Debug for SelectParameters { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SelectParameters"); + d.field("expression", &self.expression); + d.field("expression_type", &self.expression_type); + d.field("input_serialization", &self.input_serialization); + d.field("output_serialization", &self.output_serialization); + d.finish_non_exhaustive() + } } +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct ServerSideEncryption(Cow<'static, str>); -/// A builder for [`CompleteMultipartUploadInput`] -#[derive(Default)] -pub struct CompleteMultipartUploadInputBuilder { -bucket: Option, - -checksum_crc32: Option, - -checksum_crc32c: Option, - -checksum_crc64nvme: Option, - -checksum_sha1: Option, - -checksum_sha256: Option, - -checksum_type: Option, +impl ServerSideEncryption { + pub const AES256: &'static str = "AES256"; -expected_bucket_owner: Option, + pub const AWS_KMS: &'static str = "aws:kms"; -if_match: Option, + pub const AWS_KMS_DSSE: &'static str = "aws:kms:dsse"; -if_none_match: Option, + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -key: Option, + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } +} -mpu_object_size: Option, +impl From for ServerSideEncryption { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } +} -multipart_upload: Option, +impl From for Cow<'static, str> { + fn from(s: ServerSideEncryption) -> Self { + s.0 + } +} -request_payer: Option, +impl FromStr for ServerSideEncryption { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } +} -sse_customer_algorithm: Option, +///

    Describes the default server-side encryption to apply to new objects in the bucket. If a +/// PUT Object request doesn't specify any server-side encryption, this default encryption will +/// be applied. For more information, see PutBucketEncryption.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you don't specify +/// a customer managed key at configuration, Amazon S3 automatically creates an Amazon Web Services KMS key +/// (aws/s3) in your Amazon Web Services account the first time that you add an +/// object encrypted with SSE-KMS to a bucket. By default, Amazon S3 uses this KMS key +/// for SSE-KMS.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. +/// The Amazon Web Services managed key (aws/s3) isn't supported. +///

      +///
    • +///
    • +///

      +/// Directory buckets - +/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS.

      +///
    • +///
    +///
    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionByDefault { + ///

    Amazon Web Services Key Management Service (KMS) customer managed key ID to use for the default + /// encryption.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - This parameter is + /// allowed if and only if SSEAlgorithm is set to aws:kms or + /// aws:kms:dsse.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - This parameter is + /// allowed if and only if SSEAlgorithm is set to + /// aws:kms.

      + ///
    • + ///
    + ///
    + ///

    You can specify the key ID, key alias, or the Amazon Resource Name (ARN) of the KMS + /// key.

    + ///
      + ///
    • + ///

      Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + ///

      + ///
    • + ///
    • + ///

      Key ARN: + /// arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + ///

      + ///
    • + ///
    • + ///

      Key Alias: alias/alias-name + ///

      + ///
    • + ///
    + ///

    If you are using encryption with cross-account or Amazon Web Services service operations, you must use + /// a fully qualified KMS key ARN. For more information, see Using encryption for cross-account operations.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - If you're specifying + /// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. + /// If you use a KMS key alias instead, then KMS resolves the key within the + /// requester’s account. This behavior can result in data that's encrypted with a + /// KMS key that belongs to the requester, and not the bucket owner. Also, if you + /// use a key ID, you can run into a LogDestination undeliverable error when creating + /// a VPC flow log.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      + ///
    • + ///
    + ///
    + /// + ///

    Amazon S3 only supports symmetric encryption KMS keys. For more information, see Asymmetric keys in Amazon Web Services KMS in the Amazon Web Services Key Management Service + /// Developer Guide.

    + ///
    + pub kms_master_key_id: Option, + ///

    Server-side encryption algorithm to use for the default encryption.

    + /// + ///

    For directory buckets, there are only two supported values for server-side encryption: AES256 and aws:kms.

    + ///
    + pub sse_algorithm: ServerSideEncryption, +} -sse_customer_key: Option, +impl fmt::Debug for ServerSideEncryptionByDefault { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ServerSideEncryptionByDefault"); + if let Some(ref val) = self.kms_master_key_id { + d.field("kms_master_key_id", val); + } + d.field("sse_algorithm", &self.sse_algorithm); + d.finish_non_exhaustive() + } +} -sse_customer_key_md5: Option, +///

    Specifies the default server-side-encryption configuration.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionConfiguration { + ///

    Container for information about a particular server-side encryption configuration + /// rule.

    + pub rules: ServerSideEncryptionRules, +} -upload_id: Option, +impl fmt::Debug for ServerSideEncryptionConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ServerSideEncryptionConfiguration"); + d.field("rules", &self.rules); + d.finish_non_exhaustive() + } +} +///

    Specifies the default server-side encryption configuration.

    +/// +///
      +///
    • +///

      +/// General purpose buckets - If you're specifying +/// a customer managed KMS key, we recommend using a fully qualified KMS key ARN. +/// If you use a KMS key alias instead, then KMS resolves the key within the +/// requester’s account. This behavior can result in data that's encrypted with a +/// KMS key that belongs to the requester, and not the bucket owner.

      +///
    • +///
    • +///

      +/// Directory buckets - +/// When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

      +///
    • +///
    +///
    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct ServerSideEncryptionRule { + ///

    Specifies the default server-side encryption to apply to new objects in the bucket. If a + /// PUT Object request doesn't specify any server-side encryption, this default encryption will + /// be applied.

    + pub apply_server_side_encryption_by_default: Option, + ///

    Specifies whether Amazon S3 should use an S3 Bucket Key with server-side encryption using KMS + /// (SSE-KMS) for new objects in the bucket. Existing objects are not affected. Setting the + /// BucketKeyEnabled element to true causes Amazon S3 to use an S3 + /// Bucket Key.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - By default, S3 + /// Bucket Key is not enabled. For more information, see Amazon S3 Bucket Keys in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      + ///
    • + ///
    + ///
    + pub bucket_key_enabled: Option, } -impl CompleteMultipartUploadInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self +impl fmt::Debug for ServerSideEncryptionRule { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("ServerSideEncryptionRule"); + if let Some(ref val) = self.apply_server_side_encryption_by_default { + d.field("apply_server_side_encryption_by_default", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + d.finish_non_exhaustive() + } } -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self +pub type ServerSideEncryptionRules = List; + +pub type SessionCredentialValue = String; + +///

    The established temporary security credentials of the session.

    +/// +///

    +/// Directory buckets - These session +/// credentials are only supported for the authentication and authorization of Zonal endpoint API operations +/// on directory buckets.

    +///
    +#[derive(Clone, PartialEq)] +pub struct SessionCredentials { + ///

    A unique identifier that's associated with a secret access key. The access key ID and + /// the secret access key are used together to sign programmatic Amazon Web Services requests + /// cryptographically.

    + pub access_key_id: AccessKeyIdValue, + ///

    Temporary security credentials expire after a specified interval. After temporary + /// credentials expire, any calls that you make with those credentials will fail. So you must + /// generate a new set of temporary credentials. Temporary credentials cannot be extended or + /// refreshed beyond the original specified interval.

    + pub expiration: SessionExpiration, + ///

    A key that's used with the access key ID to cryptographically sign programmatic Amazon Web Services + /// requests. Signing a request identifies the sender and prevents the request from being + /// altered.

    + pub secret_access_key: SessionCredentialValue, + ///

    A part of the temporary security credentials. The session token is used to validate the + /// temporary security credentials. + /// + ///

    + pub session_token: SessionCredentialValue, } -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self +impl fmt::Debug for SessionCredentials { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SessionCredentials"); + d.field("access_key_id", &self.access_key_id); + d.field("expiration", &self.expiration); + d.field("secret_access_key", &self.secret_access_key); + d.field("session_token", &self.session_token); + d.finish_non_exhaustive() + } } -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self +impl Default for SessionCredentials { + fn default() -> Self { + Self { + access_key_id: default(), + expiration: default(), + secret_access_key: default(), + session_token: default(), + } + } } -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} +pub type SessionExpiration = Timestamp; -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct SessionMode(Cow<'static, str>); -pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { - self.checksum_type = field; -self -} +impl SessionMode { + pub const READ_ONLY: &'static str = "ReadOnly"; -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub const READ_WRITE: &'static str = "ReadWrite"; -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self +impl From for SessionMode { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -pub fn set_mpu_object_size(&mut self, field: Option) -> &mut Self { - self.mpu_object_size = field; -self +impl From for Cow<'static, str> { + fn from(s: SessionMode) -> Self { + s.0 + } } -pub fn set_multipart_upload(&mut self, field: Option) -> &mut Self { - self.multipart_upload = field; -self +impl FromStr for SessionMode { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} +pub type Setting = bool; -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} +///

    To use simple format for S3 keys for log objects, set SimplePrefix to an empty +/// object.

    +///

    +/// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +///

    +#[derive(Clone, Default, PartialEq)] +pub struct SimplePrefix {} -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self +impl fmt::Debug for SimplePrefix { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SimplePrefix"); + d.finish_non_exhaustive() + } } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} +pub type Size = i64; -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} +pub type SkipValidation = bool; -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} +pub type SourceIdentityType = String; -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self +///

    A container that describes additional filters for identifying the source objects that +/// you want to replicate. You can choose to enable or disable the replication of these +/// objects. Currently, Amazon S3 supports only the filter that you can specify for objects created +/// with server-side encryption using a customer managed key stored in Amazon Web Services Key Management Service +/// (SSE-KMS).

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct SourceSelectionCriteria { + ///

    A filter that you can specify for selections for modifications on replicas. Amazon S3 doesn't + /// replicate replica modifications by default. In the latest version of replication + /// configuration (when Filter is specified), you can specify this element and set + /// the status to Enabled to replicate modifications on replicas.

    + /// + ///

    If you don't specify the Filter element, Amazon S3 assumes that the + /// replication configuration is the earlier version, V1. In the earlier version, this + /// element is not allowed

    + ///
    + pub replica_modifications: Option, + ///

    A container for filter information for the selection of Amazon S3 objects encrypted with + /// Amazon Web Services KMS. If you include SourceSelectionCriteria in the replication + /// configuration, this element is required.

    + pub sse_kms_encrypted_objects: Option, } -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self +impl fmt::Debug for SourceSelectionCriteria { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SourceSelectionCriteria"); + if let Some(ref val) = self.replica_modifications { + d.field("replica_modifications", val); + } + if let Some(ref val) = self.sse_kms_encrypted_objects { + d.field("sse_kms_encrypted_objects", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self +///

    A container for filter information for the selection of S3 objects encrypted with Amazon Web Services +/// KMS.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct SseKmsEncryptedObjects { + ///

    Specifies whether Amazon S3 replicates objects created with server-side encryption using an + /// Amazon Web Services KMS key stored in Amazon Web Services Key Management Service.

    + pub status: SseKmsEncryptedObjectsStatus, } -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self +impl fmt::Debug for SseKmsEncryptedObjects { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("SseKmsEncryptedObjects"); + d.field("status", &self.status); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct SseKmsEncryptedObjectsStatus(Cow<'static, str>); -#[must_use] -pub fn checksum_type(mut self, field: Option) -> Self { - self.checksum_type = field; -self -} +impl SseKmsEncryptedObjectsStatus { + pub const DISABLED: &'static str = "Disabled"; -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub const ENABLED: &'static str = "Enabled"; -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self +impl From for SseKmsEncryptedObjectsStatus { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn mpu_object_size(mut self, field: Option) -> Self { - self.mpu_object_size = field; -self +impl From for Cow<'static, str> { + fn from(s: SseKmsEncryptedObjectsStatus) -> Self { + s.0 + } } -#[must_use] -pub fn multipart_upload(mut self, field: Option) -> Self { - self.multipart_upload = field; -self +impl FromStr for SseKmsEncryptedObjectsStatus { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} +pub type Start = i64; -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} +pub type StartAfter = String; -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self +///

    Container for the stats details.

    +#[derive(Clone, Default, PartialEq)] +pub struct Stats { + ///

    The total number of uncompressed object bytes processed.

    + pub bytes_processed: Option, + ///

    The total number of bytes of records payload data returned.

    + pub bytes_returned: Option, + ///

    The total number of object bytes scanned.

    + pub bytes_scanned: Option, } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self +impl fmt::Debug for Stats { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Stats"); + if let Some(ref val) = self.bytes_processed { + d.field("bytes_processed", val); + } + if let Some(ref val) = self.bytes_returned { + d.field("bytes_returned", val); + } + if let Some(ref val) = self.bytes_scanned { + d.field("bytes_scanned", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self +///

    Container for the Stats Event.

    +#[derive(Clone, Default, PartialEq)] +pub struct StatsEvent { + ///

    The Stats event details.

    + pub details: Option, } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let checksum_type = self.checksum_type; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match = self.if_match; -let if_none_match = self.if_none_match; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let mpu_object_size = self.mpu_object_size; -let multipart_upload = self.multipart_upload; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(CompleteMultipartUploadInput { -bucket, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -checksum_type, -expected_bucket_owner, -if_match, -if_none_match, -key, -mpu_object_size, -multipart_upload, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) +impl fmt::Debug for StatsEvent { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("StatsEvent"); + if let Some(ref val) = self.details { + d.field("details", val); + } + d.finish_non_exhaustive() + } } -} - - -/// A builder for [`CopyObjectInput`] -#[derive(Default)] -pub struct CopyObjectInputBuilder { -acl: Option, - -bucket: Option, - -bucket_key_enabled: Option, - -cache_control: Option, - -checksum_algorithm: Option, - -content_disposition: Option, - -content_encoding: Option, - -content_language: Option, - -content_type: Option, - -copy_source: Option, - -copy_source_if_match: Option, - -copy_source_if_modified_since: Option, - -copy_source_if_none_match: Option, - -copy_source_if_unmodified_since: Option, - -copy_source_sse_customer_algorithm: Option, - -copy_source_sse_customer_key: Option, - -copy_source_sse_customer_key_md5: Option, - -expected_bucket_owner: Option, - -expected_source_bucket_owner: Option, - -expires: Option, - -grant_full_control: Option, - -grant_read: Option, - -grant_read_acp: Option, - -grant_write_acp: Option, - -key: Option, - -metadata: Option, - -metadata_directive: Option, - -object_lock_legal_hold_status: Option, - -object_lock_mode: Option, - -object_lock_retain_until_date: Option, +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct StorageClass(Cow<'static, str>); -request_payer: Option, +impl StorageClass { + pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; -sse_customer_algorithm: Option, + pub const EXPRESS_ONEZONE: &'static str = "EXPRESS_ONEZONE"; -sse_customer_key: Option, + pub const GLACIER: &'static str = "GLACIER"; -sse_customer_key_md5: Option, + pub const GLACIER_IR: &'static str = "GLACIER_IR"; -ssekms_encryption_context: Option, + pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; -ssekms_key_id: Option, + pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; -server_side_encryption: Option, + pub const OUTPOSTS: &'static str = "OUTPOSTS"; -storage_class: Option, + pub const REDUCED_REDUNDANCY: &'static str = "REDUCED_REDUNDANCY"; -tagging: Option, + pub const SNOW: &'static str = "SNOW"; -tagging_directive: Option, + pub const STANDARD: &'static str = "STANDARD"; -version_id: Option, + pub const STANDARD_IA: &'static str = "STANDARD_IA"; -website_redirect_location: Option, + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -impl CopyObjectInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self +impl From for StorageClass { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self +impl From for Cow<'static, str> { + fn from(s: StorageClass) -> Self { + s.0 + } } -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self +impl FromStr for StorageClass { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self +///

    Specifies data related to access patterns to be collected and made available to analyze +/// the tradeoffs between different storage classes for an Amazon S3 bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct StorageClassAnalysis { + ///

    Specifies how data related to the storage class analysis for an Amazon S3 bucket should be + /// exported.

    + pub data_export: Option, } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self +impl fmt::Debug for StorageClassAnalysis { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("StorageClassAnalysis"); + if let Some(ref val) = self.data_export { + d.field("data_export", val); + } + d.finish_non_exhaustive() + } } -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self +///

    Container for data related to the storage class analysis for an Amazon S3 bucket for +/// export.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct StorageClassAnalysisDataExport { + ///

    The place to store the data for an analysis.

    + pub destination: AnalyticsExportDestination, + ///

    The version of the output schema to use when exporting data. Must be + /// V_1.

    + pub output_schema_version: StorageClassAnalysisSchemaVersion, } -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self +impl fmt::Debug for StorageClassAnalysisDataExport { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("StorageClassAnalysisDataExport"); + d.field("destination", &self.destination); + d.field("output_schema_version", &self.output_schema_version); + d.finish_non_exhaustive() + } } -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct StorageClassAnalysisSchemaVersion(Cow<'static, str>); -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} +impl StorageClassAnalysisSchemaVersion { + pub const V_1: &'static str = "V_1"; -pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { - self.copy_source = Some(field); -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_match = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_modified_since = field; -self +impl From for StorageClassAnalysisSchemaVersion { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_none_match = field; -self +impl From for Cow<'static, str> { + fn from(s: StorageClassAnalysisSchemaVersion) -> Self { + s.0 + } } -pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_unmodified_since = field; -self +impl FromStr for StorageClassAnalysisSchemaVersion { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_algorithm = field; -self -} +pub type Suffix = String; -pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key = field; -self +///

    A container of a key value name pair.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Tag { + ///

    Name of the object key.

    + pub key: Option, + ///

    Value of the tag.

    + pub value: Option, } -pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key_md5 = field; -self +impl fmt::Debug for Tag { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Tag"); + if let Some(ref val) = self.key { + d.field("key", val); + } + if let Some(ref val) = self.value { + d.field("value", val); + } + d.finish_non_exhaustive() + } } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} +pub type TagCount = i32; -pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_source_bucket_owner = field; -self -} +pub type TagSet = List; -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self +///

    Container for TagSet elements.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Tagging { + ///

    A collection for a set of tags

    + pub tag_set: TagSet, } -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self +impl fmt::Debug for Tagging { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Tagging"); + d.field("tag_set", &self.tag_set); + d.finish_non_exhaustive() + } } -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TaggingDirective(Cow<'static, str>); -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} +impl TaggingDirective { + pub const COPY: &'static str = "COPY"; -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} + pub const REPLACE: &'static str = "REPLACE"; -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -pub fn set_metadata_directive(&mut self, field: Option) -> &mut Self { - self.metadata_directive = field; -self +impl From for TaggingDirective { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self +impl From for Cow<'static, str> { + fn from(s: TaggingDirective) -> Self { + s.0 + } } -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self +impl FromStr for TaggingDirective { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} +pub type TaggingHeader = String; -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} +pub type TargetBucket = String; -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self +///

    Container for granting information.

    +///

    Buckets that use the bucket owner enforced setting for Object Ownership don't support +/// target grants. For more information, see Permissions server access log delivery in the +/// Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq)] +pub struct TargetGrant { + ///

    Container for the person being granted permissions.

    + pub grantee: Option, + ///

    Logging permissions assigned to the grantee for the bucket.

    + pub permission: Option, } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self +impl fmt::Debug for TargetGrant { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("TargetGrant"); + if let Some(ref val) = self.grantee { + d.field("grantee", val); + } + if let Some(ref val) = self.permission { + d.field("permission", val); + } + d.finish_non_exhaustive() + } } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} +pub type TargetGrants = List; -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self +///

    Amazon S3 key format for log objects. Only one format, PartitionedPrefix or +/// SimplePrefix, is allowed.

    +#[derive(Clone, Default, PartialEq)] +pub struct TargetObjectKeyFormat { + ///

    Partitioned S3 key for log objects.

    + pub partitioned_prefix: Option, + ///

    To use the simple format for S3 keys for log objects. To specify SimplePrefix format, + /// set SimplePrefix to {}.

    + pub simple_prefix: Option, } -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self +impl fmt::Debug for TargetObjectKeyFormat { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("TargetObjectKeyFormat"); + if let Some(ref val) = self.partitioned_prefix { + d.field("partitioned_prefix", val); + } + if let Some(ref val) = self.simple_prefix { + d.field("simple_prefix", val); + } + d.finish_non_exhaustive() + } } -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} +pub type TargetPrefix = String; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Tier(Cow<'static, str>); + +impl Tier { + pub const BULK: &'static str = "Bulk"; + + pub const EXPEDITED: &'static str = "Expedited"; + + pub const STANDARD: &'static str = "Standard"; + + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; -self +impl From for Tier { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -pub fn set_tagging_directive(&mut self, field: Option) -> &mut Self { - self.tagging_directive = field; -self +impl From for Cow<'static, str> { + fn from(s: Tier) -> Self { + s.0 + } } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self +impl FromStr for Tier { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; -self +///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by +/// automatically moving data to the most cost-effective storage access tier, without +/// additional operational overhead.

    +#[derive(Clone, PartialEq, Serialize, Deserialize)] +pub struct Tiering { + ///

    S3 Intelligent-Tiering access tier. See Storage class + /// for automatically optimizing frequently and infrequently accessed objects for a + /// list of access tiers in the S3 Intelligent-Tiering storage class.

    + pub access_tier: IntelligentTieringAccessTier, + ///

    The number of consecutive days of no access after which an object will be eligible to be + /// transitioned to the corresponding tier. The minimum number of days specified for + /// Archive Access tier must be at least 90 days and Deep Archive Access tier must be at least + /// 180 days. The maximum can be up to 2 years (730 days).

    + pub days: IntelligentTieringDays, } -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self +impl fmt::Debug for Tiering { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Tiering"); + d.field("access_tier", &self.access_tier); + d.field("days", &self.days); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} +pub type TieringList = List; -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} +pub type Token = String; -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} +pub type TokenType = String; -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} +///

    +/// You have attempted to add more parts than the maximum of 10000 +/// that are allowed for this object. You can use the CopyObject operation +/// to copy this object to another and then add more data to the newly copied object. +///

    +#[derive(Clone, Default, PartialEq)] +pub struct TooManyParts {} -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self +impl fmt::Debug for TooManyParts { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("TooManyParts"); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} +pub type TopicArn = String; -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self +///

    A container for specifying the configuration for publication of messages to an Amazon +/// Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct TopicConfiguration { + ///

    The Amazon S3 bucket event about which to send notifications. For more information, see + /// Supported + /// Event Types in the Amazon S3 User Guide.

    + pub events: EventList, + pub filter: Option, + pub id: Option, + ///

    The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message + /// when it detects events of the specified type.

    + pub topic_arn: TopicArn, } -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self +impl fmt::Debug for TopicConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("TopicConfiguration"); + d.field("events", &self.events); + if let Some(ref val) = self.filter { + d.field("filter", val); + } + if let Some(ref val) = self.id { + d.field("id", val); + } + d.field("topic_arn", &self.topic_arn); + d.finish_non_exhaustive() + } } -#[must_use] -pub fn copy_source(mut self, field: CopySource) -> Self { - self.copy_source = Some(field); -self -} +pub type TopicConfigurationList = List; -#[must_use] -pub fn copy_source_if_match(mut self, field: Option) -> Self { - self.copy_source_if_match = field; -self +///

    Specifies when an object transitions to a specified storage class. For more information +/// about Amazon S3 lifecycle configuration rules, see Transitioning +/// Objects Using Amazon S3 Lifecycle in the Amazon S3 User Guide.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct Transition { + ///

    Indicates when objects are transitioned to the specified storage class. The date value + /// must be in ISO 8601 format. The time is always midnight UTC.

    + pub date: Option, + ///

    Indicates the number of days after creation when objects are transitioned to the + /// specified storage class. If the specified storage class is INTELLIGENT_TIERING, + /// GLACIER_IR, GLACIER, or DEEP_ARCHIVE, valid values are + /// 0 or positive integers. If the specified storage class is STANDARD_IA + /// or ONEZONE_IA, valid values are positive integers greater than 30. Be + /// aware that some storage classes have a minimum storage duration and that you're charged for + /// transitioning objects before their minimum storage duration. For more information, see + /// + /// Constraints and considerations for transitions in the + /// Amazon S3 User Guide.

    + pub days: Option, + ///

    The storage class to which you want the object to transition.

    + pub storage_class: Option, } -#[must_use] -pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { - self.copy_source_if_modified_since = field; -self +impl fmt::Debug for Transition { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("Transition"); + if let Some(ref val) = self.date { + d.field("date", val); + } + if let Some(ref val) = self.days { + d.field("days", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn copy_source_if_none_match(mut self, field: Option) -> Self { - self.copy_source_if_none_match = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TransitionDefaultMinimumObjectSize(Cow<'static, str>); -#[must_use] -pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { - self.copy_source_if_unmodified_since = field; -self -} +impl TransitionDefaultMinimumObjectSize { + pub const ALL_STORAGE_CLASSES_128K: &'static str = "all_storage_classes_128K"; -#[must_use] -pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { - self.copy_source_sse_customer_algorithm = field; -self -} + pub const VARIES_BY_STORAGE_CLASS: &'static str = "varies_by_storage_class"; -#[must_use] -pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key = field; -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key_md5 = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self +impl From for TransitionDefaultMinimumObjectSize { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { - self.expected_source_bucket_owner = field; -self +impl From for Cow<'static, str> { + fn from(s: TransitionDefaultMinimumObjectSize) -> Self { + s.0 + } } -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self +impl FromStr for TransitionDefaultMinimumObjectSize { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} +pub type TransitionList = List; -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] +pub struct TransitionStorageClass(Cow<'static, str>); -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} +impl TransitionStorageClass { + pub const DEEP_ARCHIVE: &'static str = "DEEP_ARCHIVE"; -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} + pub const GLACIER: &'static str = "GLACIER"; -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub const GLACIER_IR: &'static str = "GLACIER_IR"; -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} + pub const INTELLIGENT_TIERING: &'static str = "INTELLIGENT_TIERING"; -#[must_use] -pub fn metadata_directive(mut self, field: Option) -> Self { - self.metadata_directive = field; -self -} + pub const ONEZONE_IA: &'static str = "ONEZONE_IA"; -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} + pub const STANDARD_IA: &'static str = "STANDARD_IA"; -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self +impl From for TransitionStorageClass { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self +impl From for Cow<'static, str> { + fn from(s: TransitionStorageClass) -> Self { + s.0 + } } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self +impl FromStr for TransitionStorageClass { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Type(Cow<'static, str>); -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; -self -} - -#[must_use] -pub fn tagging_directive(mut self, field: Option) -> Self { - self.tagging_directive = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -#[must_use] -pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_algorithm = self.checksum_algorithm; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_type = self.content_type; -let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; -let copy_source_if_match = self.copy_source_if_match; -let copy_source_if_modified_since = self.copy_source_if_modified_since; -let copy_source_if_none_match = self.copy_source_if_none_match; -let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; -let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; -let copy_source_sse_customer_key = self.copy_source_sse_customer_key; -let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let expected_source_bucket_owner = self.expected_source_bucket_owner; -let expires = self.expires; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write_acp = self.grant_write_acp; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let metadata = self.metadata; -let metadata_directive = self.metadata_directive; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let storage_class = self.storage_class; -let tagging = self.tagging; -let tagging_directive = self.tagging_directive; -let version_id = self.version_id; -let website_redirect_location = self.website_redirect_location; -Ok(CopyObjectInput { -acl, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -content_disposition, -content_encoding, -content_language, -content_type, -copy_source, -copy_source_if_match, -copy_source_if_modified_since, -copy_source_if_none_match, -copy_source_if_unmodified_since, -copy_source_sse_customer_algorithm, -copy_source_sse_customer_key, -copy_source_sse_customer_key_md5, -expected_bucket_owner, -expected_source_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -key, -metadata, -metadata_directive, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -tagging_directive, -version_id, -website_redirect_location, -}) -} - -} - - -/// A builder for [`CreateBucketInput`] -#[derive(Default)] -pub struct CreateBucketInputBuilder { -acl: Option, +impl Type { + pub const AMAZON_CUSTOMER_BY_EMAIL: &'static str = "AmazonCustomerByEmail"; -bucket: Option, + pub const CANONICAL_USER: &'static str = "CanonicalUser"; -create_bucket_configuration: Option, + pub const GROUP: &'static str = "Group"; -grant_full_control: Option, + #[must_use] + pub fn as_str(&self) -> &str { + &self.0 + } -grant_read: Option, + #[must_use] + pub fn from_static(s: &'static str) -> Self { + Self(Cow::from(s)) + } +} -grant_read_acp: Option, +impl From for Type { + fn from(s: String) -> Self { + Self(Cow::from(s)) + } +} -grant_write: Option, +impl From for Cow<'static, str> { + fn from(s: Type) -> Self { + s.0 + } +} -grant_write_acp: Option, +impl FromStr for Type { + type Err = Infallible; + fn from_str(s: &str) -> Result { + Ok(Self::from(s.to_owned())) + } +} -object_lock_enabled_for_bucket: Option, +pub type URI = String; -object_ownership: Option, +pub type UploadIdMarker = String; +#[derive(Clone, PartialEq)] +pub struct UploadPartCopyInput { + ///

    The bucket name.

    + ///

    + /// Directory buckets - When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + /// + ///

    Copying objects across different Amazon Web Services Regions isn't supported when the source or destination bucket is in Amazon Web Services Local Zones. The source and destination buckets must have the same parent Amazon Web Services Region. Otherwise, + /// you get an HTTP 400 Bad Request error with the error code InvalidRequest.

    + ///
    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Specifies the source object for the copy operation. You specify the value in one of two + /// formats, depending on whether you want to access the source object through an access point:

    + ///
      + ///
    • + ///

      For objects not accessed through an access point, specify the name of the source bucket + /// and key of the source object, separated by a slash (/). For example, to copy the + /// object reports/january.pdf from the bucket + /// awsexamplebucket, use awsexamplebucket/reports/january.pdf. + /// The value must be URL-encoded.

      + ///
    • + ///
    • + ///

      For objects accessed through access points, specify the Amazon Resource Name (ARN) of the object as accessed through the access point, in the format arn:aws:s3:<Region>:<account-id>:accesspoint/<access-point-name>/object/<key>. For example, to copy the object reports/january.pdf through access point my-access-point owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf. The value must be URL encoded.

      + /// + ///
        + ///
      • + ///

        Amazon S3 supports copy operations using Access points only when the source and destination buckets are in the same Amazon Web Services Region.

        + ///
      • + ///
      • + ///

        Access points are not supported by directory buckets.

        + ///
      • + ///
      + ///
      + ///

      Alternatively, for objects accessed through Amazon S3 on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:<Region>:<account-id>:outpost/<outpost-id>/object/<key>. For example, to copy the object reports/january.pdf through outpost my-outpost owned by account 123456789012 in Region us-west-2, use the URL encoding of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf. The value must be URL-encoded.

      + ///
    • + ///
    + ///

    If your bucket has versioning enabled, you could have multiple versions of the same + /// object. By default, x-amz-copy-source identifies the current version of the + /// source object to copy. To copy a specific version of the source object to copy, append + /// ?versionId=<version-id> to the x-amz-copy-source request + /// header (for example, x-amz-copy-source: + /// /awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).

    + ///

    If the current version is a delete marker and you don't specify a versionId in the + /// x-amz-copy-source request header, Amazon S3 returns a 404 Not Found + /// error, because the object does not exist. If you specify versionId in the + /// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns an + /// HTTP 400 Bad Request error, because you are not allowed to specify a delete + /// marker as a version for the x-amz-copy-source.

    + /// + ///

    + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets.

    + ///
    + pub copy_source: CopySource, + ///

    Copies the object if its entity tag (ETag) matches the specified tag.

    + ///

    If both of the x-amz-copy-source-if-match and + /// x-amz-copy-source-if-unmodified-since headers are present in the request as + /// follows:

    + ///

    + /// x-amz-copy-source-if-match condition evaluates to true, + /// and;

    + ///

    + /// x-amz-copy-source-if-unmodified-since condition evaluates to + /// false;

    + ///

    Amazon S3 returns 200 OK and copies the data. + ///

    + pub copy_source_if_match: Option, + ///

    Copies the object if it has been modified since the specified time.

    + ///

    If both of the x-amz-copy-source-if-none-match and + /// x-amz-copy-source-if-modified-since headers are present in the request as + /// follows:

    + ///

    + /// x-amz-copy-source-if-none-match condition evaluates to false, + /// and;

    + ///

    + /// x-amz-copy-source-if-modified-since condition evaluates to + /// true;

    + ///

    Amazon S3 returns 412 Precondition Failed response code. + ///

    + pub copy_source_if_modified_since: Option, + ///

    Copies the object if its entity tag (ETag) is different than the specified ETag.

    + ///

    If both of the x-amz-copy-source-if-none-match and + /// x-amz-copy-source-if-modified-since headers are present in the request as + /// follows:

    + ///

    + /// x-amz-copy-source-if-none-match condition evaluates to false, + /// and;

    + ///

    + /// x-amz-copy-source-if-modified-since condition evaluates to + /// true;

    + ///

    Amazon S3 returns 412 Precondition Failed response code. + ///

    + pub copy_source_if_none_match: Option, + ///

    Copies the object if it hasn't been modified since the specified time.

    + ///

    If both of the x-amz-copy-source-if-match and + /// x-amz-copy-source-if-unmodified-since headers are present in the request as + /// follows:

    + ///

    + /// x-amz-copy-source-if-match condition evaluates to true, + /// and;

    + ///

    + /// x-amz-copy-source-if-unmodified-since condition evaluates to + /// false;

    + ///

    Amazon S3 returns 200 OK and copies the data. + ///

    + pub copy_source_if_unmodified_since: Option, + ///

    The range of bytes to copy from the source object. The range value must use the form + /// bytes=first-last, where the first and last are the zero-based byte offsets to copy. For + /// example, bytes=0-9 indicates that you want to copy the first 10 bytes of the source. You + /// can copy a range only if the source object is greater than 5 MB.

    + pub copy_source_range: Option, + ///

    Specifies the algorithm to use when decrypting the source object (for example, + /// AES256).

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    + pub copy_source_sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source + /// object. The encryption key provided in this header must be one that was used when the + /// source object was created.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    + pub copy_source_sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    + pub copy_source_sse_customer_key_md5: Option, + ///

    The account ID of the expected destination bucket owner. If the account ID that you provide does not match the actual owner of the destination bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    The account ID of the expected source bucket owner. If the account ID that you provide does not match the actual owner of the source bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_source_bucket_owner: Option, + ///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, + ///

    Part number of part being copied. This is a positive integer between 1 and + /// 10,000.

    + pub part_number: PartNumber, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header. This must be the + /// same encryption key specified in the initiate multipart upload request.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported when the destination bucket is a directory bucket.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Upload ID identifying the multipart upload whose part is being copied.

    + pub upload_id: MultipartUploadId, } -impl CreateBucketInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self +impl fmt::Debug for UploadPartCopyInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("UploadPartCopyInput"); + d.field("bucket", &self.bucket); + d.field("copy_source", &self.copy_source); + if let Some(ref val) = self.copy_source_if_match { + d.field("copy_source_if_match", val); + } + if let Some(ref val) = self.copy_source_if_modified_since { + d.field("copy_source_if_modified_since", val); + } + if let Some(ref val) = self.copy_source_if_none_match { + d.field("copy_source_if_none_match", val); + } + if let Some(ref val) = self.copy_source_if_unmodified_since { + d.field("copy_source_if_unmodified_since", val); + } + if let Some(ref val) = self.copy_source_range { + d.field("copy_source_range", val); + } + if let Some(ref val) = self.copy_source_sse_customer_algorithm { + d.field("copy_source_sse_customer_algorithm", val); + } + if let Some(ref val) = self.copy_source_sse_customer_key { + d.field("copy_source_sse_customer_key", val); + } + if let Some(ref val) = self.copy_source_sse_customer_key_md5 { + d.field("copy_source_sse_customer_key_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + if let Some(ref val) = self.expected_source_bucket_owner { + d.field("expected_source_bucket_owner", val); + } + d.field("key", &self.key); + d.field("part_number", &self.part_number); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self +impl UploadPartCopyInput { + #[must_use] + pub fn builder() -> builders::UploadPartCopyInputBuilder { + default() + } } -pub fn set_create_bucket_configuration(&mut self, field: Option) -> &mut Self { - self.create_bucket_configuration = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct UploadPartCopyOutput { + ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    Container for all response elements.

    + pub copy_part_result: Option, + ///

    The version of the source object that was copied, if you have enabled versioning on the + /// source bucket.

    + /// + ///

    This functionality is not supported when the source object is in a directory bucket.

    + ///
    + pub copy_source_version_id: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms).

    + pub server_side_encryption: Option, } -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self +impl fmt::Debug for UploadPartCopyOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("UploadPartCopyOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.copy_part_result { + d.field("copy_part_result", val); + } + if let Some(ref val) = self.copy_source_version_id { + d.field("copy_source_version_id", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + d.finish_non_exhaustive() + } } -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self +#[derive(Default)] +pub struct UploadPartInput { + ///

    Object data.

    + pub body: Option, + ///

    The name of the bucket to which the multipart upload was initiated.

    + ///

    + /// Directory buckets - + /// When you use this operation with a directory bucket, you must use virtual-hosted-style requests in the format + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. Directory bucket names must be unique in the chosen Zone (Availability Zone or Local Zone). Bucket names must follow the format + /// bucket-base-name--zone-id--x-s3 (for example, + /// amzn-s3-demo-bucket--usw2-az1--x-s3). For information about bucket naming + /// restrictions, see Directory bucket naming + /// rules in the Amazon S3 User Guide.

    + ///

    + /// Access points - When you use this action with an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using this action with an access point through the Amazon Web Services SDKs, you provide the access point ARN in place of the bucket name. For more information about access point ARNs, see Using access points in the Amazon S3 User Guide.

    + /// + ///

    Access points and Object Lambda access points are not supported by directory buckets.

    + ///
    + ///

    + /// S3 on Outposts - When you use this action with S3 on Outposts, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When you use this action with S3 on Outposts, the destination bucket must be the Outposts access point ARN or the access point alias. For more information about S3 on Outposts, see What is S3 on Outposts? in the Amazon S3 User Guide.

    + pub bucket: BucketName, + ///

    Indicates the algorithm used to create the checksum for the object when you use the SDK. This header will not provide any + /// additional functionality if you don't use the SDK. When you send this header, there must be a corresponding x-amz-checksum or + /// x-amz-trailer header sent. Otherwise, Amazon S3 fails the request with the HTTP status code 400 Bad Request. For more + /// information, see Checking object integrity in + /// the Amazon S3 User Guide.

    + ///

    If you provide an individual checksum, Amazon S3 ignores any provided + /// ChecksumAlgorithm parameter.

    + ///

    This checksum algorithm must be the same for all parts and it match the checksum value + /// supplied in the CreateMultipartUpload request.

    + pub checksum_algorithm: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32 checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 32-bit CRC32C checksum of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 160-bit SHA1 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    This header can be used as a data integrity check to verify that the data received is the same data that was originally sent. + /// This header specifies the Base64 encoded, 256-bit SHA256 digest of the object. For more information, see + /// Checking object integrity in the + /// Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Size of the body in bytes. This parameter is useful when the size of the body cannot be + /// determined automatically.

    + pub content_length: Option, + ///

    The Base64 encoded 128-bit MD5 digest of the part data. This parameter is auto-populated + /// when using the command from the CLI. This parameter is required if object lock parameters + /// are specified.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub content_md5: Option, + ///

    The account ID of the expected bucket owner. If the account ID that you provide does not match the actual owner of the bucket, the request fails with the HTTP status code 403 Forbidden (access denied).

    + pub expected_bucket_owner: Option, + ///

    Object key for which the multipart upload was initiated.

    + pub key: ObjectKey, + ///

    Part number of part being uploaded. This is a positive integer between 1 and + /// 10,000.

    + pub part_number: PartNumber, + pub request_payer: Option, + ///

    Specifies the algorithm to use when encrypting the object (for example, AES256).

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This + /// value is used to store the object and then it is discarded; Amazon S3 does not store the + /// encryption key. The key must be appropriate for use with the algorithm specified in the + /// x-amz-server-side-encryption-customer-algorithm header. This must be the + /// same encryption key specified in the initiate multipart upload request.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key: Option, + ///

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. Amazon S3 uses + /// this header for a message integrity check to ensure that the encryption key was transmitted + /// without error.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    Upload ID identifying the multipart upload whose part is being uploaded.

    + pub upload_id: MultipartUploadId, } -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self +impl fmt::Debug for UploadPartInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("UploadPartInput"); + if let Some(ref val) = self.body { + d.field("body", val); + } + d.field("bucket", &self.bucket); + if let Some(ref val) = self.checksum_algorithm { + d.field("checksum_algorithm", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_md5 { + d.field("content_md5", val); + } + if let Some(ref val) = self.expected_bucket_owner { + d.field("expected_bucket_owner", val); + } + d.field("key", &self.key); + d.field("part_number", &self.part_number); + if let Some(ref val) = self.request_payer { + d.field("request_payer", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key { + d.field("sse_customer_key", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + d.field("upload_id", &self.upload_id); + d.finish_non_exhaustive() + } } -pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; -self +impl UploadPartInput { + #[must_use] + pub fn builder() -> builders::UploadPartInputBuilder { + default() + } } -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self +#[derive(Clone, Default, PartialEq)] +pub struct UploadPartOutput { + ///

    Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption + /// with Key Management Service (KMS) keys (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    The Base64 encoded, 32-bit CRC32 checksum of the object. This checksum is only be present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32: Option, + ///

    The Base64 encoded, 32-bit CRC32C checksum of the object. This checksum is only present if the checksum was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    The Base64 encoded, 160-bit SHA1 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use the API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha1: Option, + ///

    The Base64 encoded, 256-bit SHA256 digest of the object. This will only be present if the object was uploaded + /// with the object. When you use an API operation on an object that was uploaded using multipart uploads, this value may not be a direct checksum value of the full object. Instead, it's a calculation based on the checksum values of each individual part. For more information about how checksums are calculated + /// with multipart uploads, see + /// Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_sha256: Option, + ///

    Entity tag for the uploaded object.

    + pub e_tag: Option, + pub request_charged: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to confirm the encryption algorithm that's used.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_algorithm: Option, + ///

    If server-side encryption with a customer-provided encryption key was requested, the + /// response will include this header to provide the round-trip message integrity verification + /// of the customer-provided encryption key.

    + /// + ///

    This functionality is not supported for directory buckets.

    + ///
    + pub sse_customer_key_md5: Option, + ///

    If present, indicates the ID of the KMS key that was used for object encryption.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when you store this object in Amazon S3 (for + /// example, AES256, aws:kms).

    + pub server_side_encryption: Option, } -pub fn set_object_lock_enabled_for_bucket(&mut self, field: Option) -> &mut Self { - self.object_lock_enabled_for_bucket = field; -self +impl fmt::Debug for UploadPartOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("UploadPartOutput"); + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + d.finish_non_exhaustive() + } } -pub fn set_object_ownership(&mut self, field: Option) -> &mut Self { - self.object_ownership = field; -self -} +pub type UserMetadata = List; -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} +pub type Value = String; -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} +pub type VersionCount = i32; + +pub type VersionIdMarker = String; -#[must_use] -pub fn create_bucket_configuration(mut self, field: Option) -> Self { - self.create_bucket_configuration = field; -self +///

    Describes the versioning state of an Amazon S3 bucket. For more information, see PUT +/// Bucket versioning in the Amazon S3 API Reference.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct VersioningConfiguration { + pub exclude_folders: Option, + pub excluded_prefixes: Option, + ///

    Specifies whether MFA delete is enabled in the bucket versioning configuration. This + /// element is only returned if the bucket has been configured with MFA delete. If the bucket + /// has never been so configured, this element is not returned.

    + pub mfa_delete: Option, + ///

    The versioning state of the bucket.

    + pub status: Option, } -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self +impl fmt::Debug for VersioningConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("VersioningConfiguration"); + if let Some(ref val) = self.exclude_folders { + d.field("exclude_folders", val); + } + if let Some(ref val) = self.excluded_prefixes { + d.field("excluded_prefixes", val); + } + if let Some(ref val) = self.mfa_delete { + d.field("mfa_delete", val); + } + if let Some(ref val) = self.status { + d.field("status", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self +///

    Specifies website configuration parameters for an Amazon S3 bucket.

    +#[derive(Clone, Default, PartialEq, Serialize, Deserialize)] +pub struct WebsiteConfiguration { + ///

    The name of the error document for the website.

    + pub error_document: Option, + ///

    The name of the index document for the website.

    + pub index_document: Option, + ///

    The redirect behavior for every request to this bucket's website endpoint.

    + /// + ///

    If you specify this property, you can't specify any other property.

    + ///
    + pub redirect_all_requests_to: Option, + ///

    Rules that define when a redirect is applied and the redirect behavior.

    + pub routing_rules: Option, } -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self +impl fmt::Debug for WebsiteConfiguration { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("WebsiteConfiguration"); + if let Some(ref val) = self.error_document { + d.field("error_document", val); + } + if let Some(ref val) = self.index_document { + d.field("index_document", val); + } + if let Some(ref val) = self.redirect_all_requests_to { + d.field("redirect_all_requests_to", val); + } + if let Some(ref val) = self.routing_rules { + d.field("routing_rules", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; -self -} +pub type WebsiteRedirectLocation = String; -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self +#[derive(Default)] +pub struct WriteGetObjectResponseInput { + ///

    Indicates that a range of bytes was specified.

    + pub accept_ranges: Option, + ///

    The object data.

    + pub body: Option, + ///

    Indicates whether the object stored in Amazon S3 uses an S3 bucket key for server-side + /// encryption with Amazon Web Services KMS (SSE-KMS).

    + pub bucket_key_enabled: Option, + ///

    Specifies caching behavior along the request/reply chain.

    + pub cache_control: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32 + /// checksum of the object returned by the Object Lambda function. This may not match the + /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values + /// only when the original GetObject request required checksum validation. For + /// more information about checksums, see Checking object + /// integrity in the Amazon S3 User Guide.

    + ///

    Only one checksum header can be specified at a time. If you supply multiple checksum + /// headers, this request will fail.

    + ///

    + pub checksum_crc32: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This specifies the Base64 encoded, 32-bit CRC32C + /// checksum of the object returned by the Object Lambda function. This may not match the + /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values + /// only when the original GetObject request required checksum validation. For + /// more information about checksums, see Checking object + /// integrity in the Amazon S3 User Guide.

    + ///

    Only one checksum header can be specified at a time. If you supply multiple checksum + /// headers, this request will fail.

    + pub checksum_crc32c: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This header specifies the Base64 encoded, 64-bit + /// CRC64NVME checksum of the part. For more information, see Checking object integrity in the Amazon S3 User Guide.

    + pub checksum_crc64nvme: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This specifies the Base64 encoded, 160-bit SHA1 + /// digest of the object returned by the Object Lambda function. This may not match the + /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values + /// only when the original GetObject request required checksum validation. For + /// more information about checksums, see Checking object + /// integrity in the Amazon S3 User Guide.

    + ///

    Only one checksum header can be specified at a time. If you supply multiple checksum + /// headers, this request will fail.

    + pub checksum_sha1: Option, + ///

    This header can be used as a data integrity check to verify that the data received is + /// the same data that was originally sent. This specifies the Base64 encoded, 256-bit SHA256 + /// digest of the object returned by the Object Lambda function. This may not match the + /// checksum for the object stored in Amazon S3. Amazon S3 will perform validation of the checksum values + /// only when the original GetObject request required checksum validation. For + /// more information about checksums, see Checking object + /// integrity in the Amazon S3 User Guide.

    + ///

    Only one checksum header can be specified at a time. If you supply multiple checksum + /// headers, this request will fail.

    + pub checksum_sha256: Option, + ///

    Specifies presentational information for the object.

    + pub content_disposition: Option, + ///

    Specifies what content encodings have been applied to the object and thus what decoding + /// mechanisms must be applied to obtain the media-type referenced by the Content-Type header + /// field.

    + pub content_encoding: Option, + ///

    The language the content is in.

    + pub content_language: Option, + ///

    The size of the content body in bytes.

    + pub content_length: Option, + ///

    The portion of the object returned in the response.

    + pub content_range: Option, + ///

    A standard MIME type describing the format of the object data.

    + pub content_type: Option, + ///

    Specifies whether an object stored in Amazon S3 is (true) or is not + /// (false) a delete marker. To learn more about delete markers, see Working with delete markers.

    + pub delete_marker: Option, + ///

    An opaque identifier assigned by a web server to a specific version of a resource found + /// at a URL.

    + pub e_tag: Option, + ///

    A string that uniquely identifies an error condition. Returned in the <Code> tag + /// of the error XML response for a corresponding GetObject call. Cannot be used + /// with a successful StatusCode header or when the transformed object is provided + /// in the body. All error codes from S3 are sentence-cased. The regular expression (regex) + /// value is "^[A-Z][a-zA-Z]+$".

    + pub error_code: Option, + ///

    Contains a generic description of the error condition. Returned in the <Message> + /// tag of the error XML response for a corresponding GetObject call. Cannot be + /// used with a successful StatusCode header or when the transformed object is + /// provided in body.

    + pub error_message: Option, + ///

    If the object expiration is configured (see PUT Bucket lifecycle), the response includes + /// this header. It includes the expiry-date and rule-id key-value + /// pairs that provide the object expiration information. The value of the rule-id + /// is URL-encoded.

    + pub expiration: Option, + ///

    The date and time at which the object is no longer cacheable.

    + pub expires: Option, + ///

    The date and time that the object was last modified.

    + pub last_modified: Option, + ///

    A map of metadata to store with the object in S3.

    + pub metadata: Option, + ///

    Set to the number of metadata entries not returned in x-amz-meta headers. + /// This can happen if you create metadata using an API like SOAP that supports more flexible + /// metadata than the REST API. For example, using SOAP, you can create metadata whose values + /// are not legal HTTP headers.

    + pub missing_meta: Option, + ///

    Indicates whether an object stored in Amazon S3 has an active legal hold.

    + pub object_lock_legal_hold_status: Option, + ///

    Indicates whether an object stored in Amazon S3 has Object Lock enabled. For more information + /// about S3 Object Lock, see Object Lock.

    + pub object_lock_mode: Option, + ///

    The date and time when Object Lock is configured to expire.

    + pub object_lock_retain_until_date: Option, + ///

    The count of parts this object has.

    + pub parts_count: Option, + ///

    Indicates if request involves bucket that is either a source or destination in a + /// Replication rule. For more information about S3 Replication, see Replication.

    + pub replication_status: Option, + pub request_charged: Option, + ///

    Route prefix to the HTTP URL generated.

    + pub request_route: RequestRoute, + ///

    A single use encrypted token that maps WriteGetObjectResponse to the end + /// user GetObject request.

    + pub request_token: RequestToken, + ///

    Provides information about object restoration operation and expiration time of the + /// restored object copy.

    + pub restore: Option, + ///

    Encryption algorithm used if server-side encryption with a customer-provided encryption + /// key was specified for object stored in Amazon S3.

    + pub sse_customer_algorithm: Option, + ///

    128-bit MD5 digest of customer-provided encryption key used in Amazon S3 to encrypt data + /// stored in S3. For more information, see Protecting data + /// using server-side encryption with customer-provided encryption keys + /// (SSE-C).

    + pub sse_customer_key_md5: Option, + ///

    If present, specifies the ID (Key ID, Key ARN, or Key Alias) of the Amazon Web Services Key + /// Management Service (Amazon Web Services KMS) symmetric encryption customer managed key that was used for stored in + /// Amazon S3 object.

    + pub ssekms_key_id: Option, + ///

    The server-side encryption algorithm used when storing requested object in Amazon S3 (for + /// example, AES256, aws:kms).

    + pub server_side_encryption: Option, + ///

    The integer status code for an HTTP response of a corresponding GetObject + /// request. The following is a list of status codes.

    + ///
      + ///
    • + ///

      + /// 200 - OK + ///

      + ///
    • + ///
    • + ///

      + /// 206 - Partial Content + ///

      + ///
    • + ///
    • + ///

      + /// 304 - Not Modified + ///

      + ///
    • + ///
    • + ///

      + /// 400 - Bad Request + ///

      + ///
    • + ///
    • + ///

      + /// 401 - Unauthorized + ///

      + ///
    • + ///
    • + ///

      + /// 403 - Forbidden + ///

      + ///
    • + ///
    • + ///

      + /// 404 - Not Found + ///

      + ///
    • + ///
    • + ///

      + /// 405 - Method Not Allowed + ///

      + ///
    • + ///
    • + ///

      + /// 409 - Conflict + ///

      + ///
    • + ///
    • + ///

      + /// 411 - Length Required + ///

      + ///
    • + ///
    • + ///

      + /// 412 - Precondition Failed + ///

      + ///
    • + ///
    • + ///

      + /// 416 - Range Not Satisfiable + ///

      + ///
    • + ///
    • + ///

      + /// 500 - Internal Server Error + ///

      + ///
    • + ///
    • + ///

      + /// 503 - Service Unavailable + ///

      + ///
    • + ///
    + pub status_code: Option, + ///

    Provides storage class information of the object. Amazon S3 returns this header for all + /// objects except for S3 Standard storage class objects.

    + ///

    For more information, see Storage Classes.

    + pub storage_class: Option, + ///

    The number of tags, if any, on the object.

    + pub tag_count: Option, + ///

    An ID used to reference a specific version of the object.

    + pub version_id: Option, } -#[must_use] -pub fn object_lock_enabled_for_bucket(mut self, field: Option) -> Self { - self.object_lock_enabled_for_bucket = field; -self +impl fmt::Debug for WriteGetObjectResponseInput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("WriteGetObjectResponseInput"); + if let Some(ref val) = self.accept_ranges { + d.field("accept_ranges", val); + } + if let Some(ref val) = self.body { + d.field("body", val); + } + if let Some(ref val) = self.bucket_key_enabled { + d.field("bucket_key_enabled", val); + } + if let Some(ref val) = self.cache_control { + d.field("cache_control", val); + } + if let Some(ref val) = self.checksum_crc32 { + d.field("checksum_crc32", val); + } + if let Some(ref val) = self.checksum_crc32c { + d.field("checksum_crc32c", val); + } + if let Some(ref val) = self.checksum_crc64nvme { + d.field("checksum_crc64nvme", val); + } + if let Some(ref val) = self.checksum_sha1 { + d.field("checksum_sha1", val); + } + if let Some(ref val) = self.checksum_sha256 { + d.field("checksum_sha256", val); + } + if let Some(ref val) = self.content_disposition { + d.field("content_disposition", val); + } + if let Some(ref val) = self.content_encoding { + d.field("content_encoding", val); + } + if let Some(ref val) = self.content_language { + d.field("content_language", val); + } + if let Some(ref val) = self.content_length { + d.field("content_length", val); + } + if let Some(ref val) = self.content_range { + d.field("content_range", val); + } + if let Some(ref val) = self.content_type { + d.field("content_type", val); + } + if let Some(ref val) = self.delete_marker { + d.field("delete_marker", val); + } + if let Some(ref val) = self.e_tag { + d.field("e_tag", val); + } + if let Some(ref val) = self.error_code { + d.field("error_code", val); + } + if let Some(ref val) = self.error_message { + d.field("error_message", val); + } + if let Some(ref val) = self.expiration { + d.field("expiration", val); + } + if let Some(ref val) = self.expires { + d.field("expires", val); + } + if let Some(ref val) = self.last_modified { + d.field("last_modified", val); + } + if let Some(ref val) = self.metadata { + d.field("metadata", val); + } + if let Some(ref val) = self.missing_meta { + d.field("missing_meta", val); + } + if let Some(ref val) = self.object_lock_legal_hold_status { + d.field("object_lock_legal_hold_status", val); + } + if let Some(ref val) = self.object_lock_mode { + d.field("object_lock_mode", val); + } + if let Some(ref val) = self.object_lock_retain_until_date { + d.field("object_lock_retain_until_date", val); + } + if let Some(ref val) = self.parts_count { + d.field("parts_count", val); + } + if let Some(ref val) = self.replication_status { + d.field("replication_status", val); + } + if let Some(ref val) = self.request_charged { + d.field("request_charged", val); + } + d.field("request_route", &self.request_route); + d.field("request_token", &self.request_token); + if let Some(ref val) = self.restore { + d.field("restore", val); + } + if let Some(ref val) = self.sse_customer_algorithm { + d.field("sse_customer_algorithm", val); + } + if let Some(ref val) = self.sse_customer_key_md5 { + d.field("sse_customer_key_md5", val); + } + if let Some(ref val) = self.ssekms_key_id { + d.field("ssekms_key_id", val); + } + if let Some(ref val) = self.server_side_encryption { + d.field("server_side_encryption", val); + } + if let Some(ref val) = self.status_code { + d.field("status_code", val); + } + if let Some(ref val) = self.storage_class { + d.field("storage_class", val); + } + if let Some(ref val) = self.tag_count { + d.field("tag_count", val); + } + if let Some(ref val) = self.version_id { + d.field("version_id", val); + } + d.finish_non_exhaustive() + } } -#[must_use] -pub fn object_ownership(mut self, field: Option) -> Self { - self.object_ownership = field; -self +impl WriteGetObjectResponseInput { + #[must_use] + pub fn builder() -> builders::WriteGetObjectResponseInputBuilder { + default() + } } -pub fn build(self) -> Result { -let acl = self.acl; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let create_bucket_configuration = self.create_bucket_configuration; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write = self.grant_write; -let grant_write_acp = self.grant_write_acp; -let object_lock_enabled_for_bucket = self.object_lock_enabled_for_bucket; -let object_ownership = self.object_ownership; -Ok(CreateBucketInput { -acl, -bucket, -create_bucket_configuration, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -object_lock_enabled_for_bucket, -object_ownership, -}) -} +#[derive(Clone, Default, PartialEq)] +pub struct WriteGetObjectResponseOutput {} +impl fmt::Debug for WriteGetObjectResponseOutput { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut d = f.debug_struct("WriteGetObjectResponseOutput"); + d.finish_non_exhaustive() + } } +pub type WriteOffsetBytes = i64; -/// A builder for [`CreateBucketMetadataTableConfigurationInput`] -#[derive(Default)] -pub struct CreateBucketMetadataTableConfigurationInputBuilder { -bucket: Option, - -checksum_algorithm: Option, - -content_md5: Option, +pub type Years = i32; -expected_bucket_owner: Option, +#[cfg(test)] +mod tests { + use super::*; -metadata_table_configuration: Option, + fn require_default() {} + fn require_clone() {} + #[test] + fn test_default() { + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + require_default::(); + } + #[test] + fn test_clone() { + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + require_clone::(); + } } +pub mod builders { + #![allow(clippy::missing_errors_doc)] -impl CreateBucketMetadataTableConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub use super::build_error::BuildError; + use super::*; -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + /// A builder for [`AbortMultipartUploadInput`] + #[derive(Default)] + pub struct AbortMultipartUploadInputBuilder { + bucket: Option, -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + expected_bucket_owner: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + if_match_initiated_time: Option, -pub fn set_metadata_table_configuration(&mut self, field: MetadataTableConfiguration) -> &mut Self { - self.metadata_table_configuration = Some(field); -self -} + key: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + request_payer: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + upload_id: Option, + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + impl AbortMultipartUploadInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn metadata_table_configuration(mut self, field: MetadataTableConfiguration) -> Self { - self.metadata_table_configuration = Some(field); -self -} + pub fn set_if_match_initiated_time(&mut self, field: Option) -> &mut Self { + self.if_match_initiated_time = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let metadata_table_configuration = self.metadata_table_configuration.ok_or_else(|| BuildError::missing_field("metadata_table_configuration"))?; -Ok(CreateBucketMetadataTableConfigurationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -metadata_table_configuration, -}) -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } -/// A builder for [`CreateMultipartUploadInput`] -#[derive(Default)] -pub struct CreateMultipartUploadInputBuilder { -acl: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -bucket: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -bucket_key_enabled: Option, + #[must_use] + pub fn if_match_initiated_time(mut self, field: Option) -> Self { + self.if_match_initiated_time = field; + self + } -cache_control: Option, + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -checksum_algorithm: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -checksum_type: Option, + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } -content_disposition: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match_initiated_time = self.if_match_initiated_time; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(AbortMultipartUploadInput { + bucket, + expected_bucket_owner, + if_match_initiated_time, + key, + request_payer, + upload_id, + }) + } + } -content_encoding: Option, + /// A builder for [`CompleteMultipartUploadInput`] + #[derive(Default)] + pub struct CompleteMultipartUploadInputBuilder { + bucket: Option, -content_language: Option, + checksum_crc32: Option, -content_type: Option, + checksum_crc32c: Option, -expected_bucket_owner: Option, + checksum_crc64nvme: Option, -expires: Option, + checksum_sha1: Option, -grant_full_control: Option, + checksum_sha256: Option, -grant_read: Option, + checksum_type: Option, -grant_read_acp: Option, + expected_bucket_owner: Option, -grant_write_acp: Option, + if_match: Option, -key: Option, + if_none_match: Option, -metadata: Option, + key: Option, -object_lock_legal_hold_status: Option, + mpu_object_size: Option, -object_lock_mode: Option, + multipart_upload: Option, -object_lock_retain_until_date: Option, + request_payer: Option, -request_payer: Option, + sse_customer_algorithm: Option, -sse_customer_algorithm: Option, + sse_customer_key: Option, -sse_customer_key: Option, + sse_customer_key_md5: Option, -sse_customer_key_md5: Option, + upload_id: Option, + } -ssekms_encryption_context: Option, + impl CompleteMultipartUploadInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -ssekms_key_id: Option, + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } -server_side_encryption: Option, + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } -storage_class: Option, + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } -tagging: Option, + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } -version_id: Option, + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } -website_redirect_location: Option, + pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { + self.checksum_type = field; + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -impl CreateMultipartUploadInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} + pub fn set_mpu_object_size(&mut self, field: Option) -> &mut Self { + self.mpu_object_size = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + pub fn set_multipart_upload(&mut self, field: Option) -> &mut Self { + self.multipart_upload = field; + self + } -pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { - self.checksum_type = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + #[must_use] + pub fn checksum_type(mut self, field: Option) -> Self { + self.checksum_type = field; + self + } -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self -} + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self -} + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + #[must_use] + pub fn mpu_object_size(mut self, field: Option) -> Self { + self.mpu_object_size = field; + self + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + #[must_use] + pub fn multipart_upload(mut self, field: Option) -> Self { + self.multipart_upload = field; + self + } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let checksum_type = self.checksum_type; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match = self.if_match; + let if_none_match = self.if_none_match; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let mpu_object_size = self.mpu_object_size; + let multipart_upload = self.multipart_upload; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(CompleteMultipartUploadInput { + bucket, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + checksum_type, + expected_bucket_owner, + if_match, + if_none_match, + key, + mpu_object_size, + multipart_upload, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + } -pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; -self -} + /// A builder for [`CopyObjectInput`] + #[derive(Default)] + pub struct CopyObjectInputBuilder { + acl: Option, -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + bucket: Option, -pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; -self -} + bucket_key_enabled: Option, -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} + cache_control: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + checksum_algorithm: Option, -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} + content_disposition: Option, -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} + content_encoding: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + content_language: Option, -#[must_use] -pub fn checksum_type(mut self, field: Option) -> Self { - self.checksum_type = field; -self -} + content_type: Option, -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self -} + copy_source: Option, -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} + copy_source_if_match: Option, -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self -} + copy_source_if_modified_since: Option, -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self -} + copy_source_if_none_match: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + copy_source_if_unmodified_since: Option, -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self -} + copy_source_sse_customer_algorithm: Option, -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} + copy_source_sse_customer_key: Option, -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} + copy_source_sse_customer_key_md5: Option, -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} + expected_source_bucket_owner: Option, -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + expires: Option, -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} + grant_full_control: Option, -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} + grant_read: Option, -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} + grant_read_acp: Option, -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self -} + grant_write_acp: Option, -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + key: Option, -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + metadata: Option, -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + metadata_directive: Option, -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -#[must_use] -pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_algorithm = self.checksum_algorithm; -let checksum_type = self.checksum_type; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_type = self.content_type; -let expected_bucket_owner = self.expected_bucket_owner; -let expires = self.expires; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write_acp = self.grant_write_acp; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let metadata = self.metadata; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let storage_class = self.storage_class; -let tagging = self.tagging; -let version_id = self.version_id; -let website_redirect_location = self.website_redirect_location; -Ok(CreateMultipartUploadInput { -acl, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_type, -content_disposition, -content_encoding, -content_language, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -version_id, -website_redirect_location, -}) -} - -} - - -/// A builder for [`CreateSessionInput`] -#[derive(Default)] -pub struct CreateSessionInputBuilder { -bucket: Option, + object_lock_legal_hold_status: Option, -bucket_key_enabled: Option, + object_lock_mode: Option, -ssekms_encryption_context: Option, + object_lock_retain_until_date: Option, -ssekms_key_id: Option, + request_payer: Option, -server_side_encryption: Option, + sse_customer_algorithm: Option, -session_mode: Option, + sse_customer_key: Option, -} + sse_customer_key_md5: Option, -impl CreateSessionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + ssekms_encryption_context: Option, -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} + ssekms_key_id: Option, -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} + server_side_encryption: Option, -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} + storage_class: Option, -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} + tagging: Option, -pub fn set_session_mode(&mut self, field: Option) -> &mut Self { - self.session_mode = field; -self -} + tagging_directive: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + version_id: Option, -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} + website_redirect_location: Option, + } -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} + impl CopyObjectInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } -#[must_use] -pub fn session_mode(mut self, field: Option) -> Self { - self.session_mode = field; -self -} + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } + + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let session_mode = self.session_mode; -Ok(CreateSessionInput { -bucket, -bucket_key_enabled, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -session_mode, -}) -} + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } -} + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } -/// A builder for [`DeleteBucketInput`] -#[derive(Default)] -pub struct DeleteBucketInputBuilder { -bucket: Option, + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } -expected_bucket_owner: Option, + pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { + self.copy_source = Some(field); + self + } -force_delete: Option, + pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_match = field; + self + } -} + pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_modified_since = field; + self + } -impl DeleteBucketInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_none_match = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_unmodified_since = field; + self + } -pub fn set_force_delete(&mut self, field: Option) -> &mut Self { - self.force_delete = field; -self -} + pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_algorithm = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn force_delete(mut self, field: Option) -> Self { - self.force_delete = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let force_delete = self.force_delete; -Ok(DeleteBucketInput { -bucket, -expected_bucket_owner, -force_delete, -}) -} + pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_source_bucket_owner = field; + self + } -} + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } -/// A builder for [`DeleteBucketAnalyticsConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketAnalyticsConfigurationInputBuilder { -bucket: Option, + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } -expected_bucket_owner: Option, + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } -id: Option, + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -impl DeleteBucketAnalyticsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_metadata_directive(&mut self, field: Option) -> &mut Self { + self.metadata_directive = field; + self + } -pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); -self -} + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } -#[must_use] -pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(DeleteBucketAnalyticsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -/// A builder for [`DeleteBucketCorsInput`] -#[derive(Default)] -pub struct DeleteBucketCorsInputBuilder { -bucket: Option, + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } -expected_bucket_owner: Option, + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } -} + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } -impl DeleteBucketCorsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_tagging_directive(&mut self, field: Option) -> &mut Self { + self.tagging_directive = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketCorsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; + self + } -} + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -/// A builder for [`DeleteBucketEncryptionInput`] -#[derive(Default)] -pub struct DeleteBucketEncryptionInputBuilder { -bucket: Option, + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -impl DeleteBucketEncryptionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketEncryptionInput { -bucket, -expected_bucket_owner, -}) -} + #[must_use] + pub fn copy_source(mut self, field: CopySource) -> Self { + self.copy_source = Some(field); + self + } -} + #[must_use] + pub fn copy_source_if_match(mut self, field: Option) -> Self { + self.copy_source_if_match = field; + self + } + #[must_use] + pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { + self.copy_source_if_modified_since = field; + self + } -/// A builder for [`DeleteBucketIntelligentTieringConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketIntelligentTieringConfigurationInputBuilder { -bucket: Option, + #[must_use] + pub fn copy_source_if_none_match(mut self, field: Option) -> Self { + self.copy_source_if_none_match = field; + self + } -id: Option, + #[must_use] + pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { + self.copy_source_if_unmodified_since = field; + self + } -} + #[must_use] + pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { + self.copy_source_sse_customer_algorithm = field; + self + } -impl DeleteBucketIntelligentTieringConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key = field; + self + } -pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); -self -} + #[must_use] + pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); -self -} + #[must_use] + pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { + self.expected_source_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(DeleteBucketIntelligentTieringConfigurationInput { -bucket, -id, -}) -} + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } -} + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } -/// A builder for [`DeleteBucketInventoryConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketInventoryConfigurationInputBuilder { -bucket: Option, + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } -id: Option, + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -} + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } -impl DeleteBucketInventoryConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn metadata_directive(mut self, field: Option) -> Self { + self.metadata_directive = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } -pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); -self -} + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -#[must_use] -pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(DeleteBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } -/// A builder for [`DeleteBucketLifecycleInput`] -#[derive(Default)] -pub struct DeleteBucketLifecycleInputBuilder { -bucket: Option, + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } -} + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } -impl DeleteBucketLifecycleInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn tagging_directive(mut self, field: Option) -> Self { + self.tagging_directive = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketLifecycleInput { -bucket, -expected_bucket_owner, -}) -} + pub fn build(self) -> Result { + let acl = self.acl; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_algorithm = self.checksum_algorithm; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_type = self.content_type; + let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; + let copy_source_if_match = self.copy_source_if_match; + let copy_source_if_modified_since = self.copy_source_if_modified_since; + let copy_source_if_none_match = self.copy_source_if_none_match; + let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; + let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; + let copy_source_sse_customer_key = self.copy_source_sse_customer_key; + let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let expected_source_bucket_owner = self.expected_source_bucket_owner; + let expires = self.expires; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write_acp = self.grant_write_acp; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let metadata = self.metadata; + let metadata_directive = self.metadata_directive; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let storage_class = self.storage_class; + let tagging = self.tagging; + let tagging_directive = self.tagging_directive; + let version_id = self.version_id; + let website_redirect_location = self.website_redirect_location; + Ok(CopyObjectInput { + acl, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + content_disposition, + content_encoding, + content_language, + content_type, + copy_source, + copy_source_if_match, + copy_source_if_modified_since, + copy_source_if_none_match, + copy_source_if_unmodified_since, + copy_source_sse_customer_algorithm, + copy_source_sse_customer_key, + copy_source_sse_customer_key_md5, + expected_bucket_owner, + expected_source_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + key, + metadata, + metadata_directive, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + tagging_directive, + version_id, + website_redirect_location, + }) + } + } -} + /// A builder for [`CreateBucketInput`] + #[derive(Default)] + pub struct CreateBucketInputBuilder { + acl: Option, + bucket: Option, -/// A builder for [`DeleteBucketMetadataTableConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketMetadataTableConfigurationInputBuilder { -bucket: Option, + create_bucket_configuration: Option, -expected_bucket_owner: Option, + grant_full_control: Option, -} + grant_read: Option, -impl DeleteBucketMetadataTableConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + grant_read_acp: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + grant_write: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + grant_write_acp: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + object_lock_enabled_for_bucket: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketMetadataTableConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + object_ownership: Option, + } -} + impl CreateBucketInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -/// A builder for [`DeleteBucketMetricsConfigurationInput`] -#[derive(Default)] -pub struct DeleteBucketMetricsConfigurationInputBuilder { -bucket: Option, + pub fn set_create_bucket_configuration(&mut self, field: Option) -> &mut Self { + self.create_bucket_configuration = field; + self + } -expected_bucket_owner: Option, + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } -id: Option, + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } -} + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } -impl DeleteBucketMetricsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } -pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); -self -} + pub fn set_object_lock_enabled_for_bucket(&mut self, field: Option) -> &mut Self { + self.object_lock_enabled_for_bucket = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_object_ownership(&mut self, field: Option) -> &mut Self { + self.object_ownership = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } -#[must_use] -pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(DeleteBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + #[must_use] + pub fn create_bucket_configuration(mut self, field: Option) -> Self { + self.create_bucket_configuration = field; + self + } -} + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } -/// A builder for [`DeleteBucketOwnershipControlsInput`] -#[derive(Default)] -pub struct DeleteBucketOwnershipControlsInputBuilder { -bucket: Option, + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; + self + } -} + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } -impl DeleteBucketOwnershipControlsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn object_lock_enabled_for_bucket(mut self, field: Option) -> Self { + self.object_lock_enabled_for_bucket = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn object_ownership(mut self, field: Option) -> Self { + self.object_ownership = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn build(self) -> Result { + let acl = self.acl; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let create_bucket_configuration = self.create_bucket_configuration; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write = self.grant_write; + let grant_write_acp = self.grant_write_acp; + let object_lock_enabled_for_bucket = self.object_lock_enabled_for_bucket; + let object_ownership = self.object_ownership; + Ok(CreateBucketInput { + acl, + bucket, + create_bucket_configuration, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + object_lock_enabled_for_bucket, + object_ownership, + }) + } + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`CreateBucketMetadataTableConfigurationInput`] + #[derive(Default)] + pub struct CreateBucketMetadataTableConfigurationInputBuilder { + bucket: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketOwnershipControlsInput { -bucket, -expected_bucket_owner, -}) -} + checksum_algorithm: Option, -} + content_md5: Option, + expected_bucket_owner: Option, -/// A builder for [`DeleteBucketPolicyInput`] -#[derive(Default)] -pub struct DeleteBucketPolicyInputBuilder { -bucket: Option, + metadata_table_configuration: Option, + } -expected_bucket_owner: Option, + impl CreateBucketMetadataTableConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -impl DeleteBucketPolicyInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_metadata_table_configuration(&mut self, field: MetadataTableConfiguration) -> &mut Self { + self.metadata_table_configuration = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketPolicyInput { -bucket, -expected_bucket_owner, -}) -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -/// A builder for [`DeleteBucketReplicationInput`] -#[derive(Default)] -pub struct DeleteBucketReplicationInputBuilder { -bucket: Option, + #[must_use] + pub fn metadata_table_configuration(mut self, field: MetadataTableConfiguration) -> Self { + self.metadata_table_configuration = Some(field); + self + } -expected_bucket_owner: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let metadata_table_configuration = self + .metadata_table_configuration + .ok_or_else(|| BuildError::missing_field("metadata_table_configuration"))?; + Ok(CreateBucketMetadataTableConfigurationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + metadata_table_configuration, + }) + } + } -} + /// A builder for [`CreateMultipartUploadInput`] + #[derive(Default)] + pub struct CreateMultipartUploadInputBuilder { + acl: Option, -impl DeleteBucketReplicationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + bucket: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + bucket_key_enabled: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + cache_control: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + checksum_algorithm: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketReplicationInput { -bucket, -expected_bucket_owner, -}) -} + checksum_type: Option, -} + content_disposition: Option, + content_encoding: Option, -/// A builder for [`DeleteBucketTaggingInput`] -#[derive(Default)] -pub struct DeleteBucketTaggingInputBuilder { -bucket: Option, + content_language: Option, -expected_bucket_owner: Option, + content_type: Option, -} + expected_bucket_owner: Option, -impl DeleteBucketTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + expires: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + grant_full_control: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + grant_read: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + grant_read_acp: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketTaggingInput { -bucket, -expected_bucket_owner, -}) -} + grant_write_acp: Option, -} + key: Option, + metadata: Option, -/// A builder for [`DeleteBucketWebsiteInput`] -#[derive(Default)] -pub struct DeleteBucketWebsiteInputBuilder { -bucket: Option, + object_lock_legal_hold_status: Option, -expected_bucket_owner: Option, + object_lock_mode: Option, -} + object_lock_retain_until_date: Option, -impl DeleteBucketWebsiteInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + request_payer: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + sse_customer_algorithm: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + sse_customer_key: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + sse_customer_key_md5: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeleteBucketWebsiteInput { -bucket, -expected_bucket_owner, -}) -} + ssekms_encryption_context: Option, -} + ssekms_key_id: Option, + server_side_encryption: Option, -/// A builder for [`DeleteObjectInput`] -#[derive(Default)] -pub struct DeleteObjectInputBuilder { -bucket: Option, + storage_class: Option, -bypass_governance_retention: Option, + tagging: Option, -expected_bucket_owner: Option, + version_id: Option, -if_match: Option, + website_redirect_location: Option, + } -if_match_last_modified_time: Option, + impl CreateMultipartUploadInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } -if_match_size: Option, + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -key: Option, + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } -mfa: Option, + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } -request_payer: Option, + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -version_id: Option, + pub fn set_checksum_type(&mut self, field: Option) -> &mut Self { + self.checksum_type = field; + self + } -} + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } -impl DeleteObjectInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } -pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; -self -} + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_if_match_last_modified_time(&mut self, field: Option) -> &mut Self { - self.if_match_last_modified_time = field; -self -} + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } -pub fn set_if_match_size(&mut self, field: Option) -> &mut Self { - self.if_match_size = field; -self -} + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } -pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; -self -} + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } -#[must_use] -pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; -self -} + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } -#[must_use] -pub fn if_match_last_modified_time(mut self, field: Option) -> Self { - self.if_match_last_modified_time = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn if_match_size(mut self, field: Option) -> Self { - self.if_match_size = field; -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -#[must_use] -pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bypass_governance_retention = self.bypass_governance_retention; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match = self.if_match; -let if_match_last_modified_time = self.if_match_last_modified_time; -let if_match_size = self.if_match_size; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let mfa = self.mfa; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(DeleteObjectInput { -bucket, -bypass_governance_retention, -expected_bucket_owner, -if_match, -if_match_last_modified_time, -if_match_size, -key, -mfa, -request_payer, -version_id, -}) -} + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } -} + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } + pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; + self + } -/// A builder for [`DeleteObjectTaggingInput`] -#[derive(Default)] -pub struct DeleteObjectTaggingInputBuilder { -bucket: Option, + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -expected_bucket_owner: Option, + pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; + self + } -key: Option, + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } -version_id: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -} + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } -impl DeleteObjectTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + #[must_use] + pub fn checksum_type(mut self, field: Option) -> Self { + self.checksum_type = field; + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let version_id = self.version_id; -Ok(DeleteObjectTaggingInput { -bucket, -expected_bucket_owner, -key, -version_id, -}) -} + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } -} + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } -/// A builder for [`DeleteObjectsInput`] -#[derive(Default)] -pub struct DeleteObjectsInputBuilder { -bucket: Option, + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } -bypass_governance_retention: Option, + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } -checksum_algorithm: Option, + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -delete: Option, + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } -mfa: Option, + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } -request_payer: Option, + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -impl DeleteObjectsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; -self -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_delete(&mut self, field: Delete) -> &mut Self { - self.delete = Some(field); -self -} + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } -pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; -self -} + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; + self + } -#[must_use] -pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; + self + } -#[must_use] -pub fn delete(mut self, field: Delete) -> Self { - self.delete = Some(field); -self -} + pub fn build(self) -> Result { + let acl = self.acl; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_algorithm = self.checksum_algorithm; + let checksum_type = self.checksum_type; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_type = self.content_type; + let expected_bucket_owner = self.expected_bucket_owner; + let expires = self.expires; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write_acp = self.grant_write_acp; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let metadata = self.metadata; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let storage_class = self.storage_class; + let tagging = self.tagging; + let version_id = self.version_id; + let website_redirect_location = self.website_redirect_location; + Ok(CreateMultipartUploadInput { + acl, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_type, + content_disposition, + content_encoding, + content_language, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + version_id, + website_redirect_location, + }) + } + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`CreateSessionInput`] + #[derive(Default)] + pub struct CreateSessionInputBuilder { + bucket: Option, -#[must_use] -pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; -self -} + bucket_key_enabled: Option, -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + ssekms_encryption_context: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bypass_governance_retention = self.bypass_governance_retention; -let checksum_algorithm = self.checksum_algorithm; -let delete = self.delete.ok_or_else(|| BuildError::missing_field("delete"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let mfa = self.mfa; -let request_payer = self.request_payer; -Ok(DeleteObjectsInput { -bucket, -bypass_governance_retention, -checksum_algorithm, -delete, -expected_bucket_owner, -mfa, -request_payer, -}) -} + ssekms_key_id: Option, -} + server_side_encryption: Option, + session_mode: Option, + } -/// A builder for [`DeletePublicAccessBlockInput`] -#[derive(Default)] -pub struct DeletePublicAccessBlockInputBuilder { -bucket: Option, + impl CreateSessionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } -} + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } -impl DeletePublicAccessBlockInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_session_mode(&mut self, field: Option) -> &mut Self { + self.session_mode = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(DeletePublicAccessBlockInput { -bucket, -expected_bucket_owner, -}) -} + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } -} + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } -/// A builder for [`GetBucketAccelerateConfigurationInput`] -#[derive(Default)] -pub struct GetBucketAccelerateConfigurationInputBuilder { -bucket: Option, + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn session_mode(mut self, field: Option) -> Self { + self.session_mode = field; + self + } -request_payer: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let session_mode = self.session_mode; + Ok(CreateSessionInput { + bucket, + bucket_key_enabled, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + session_mode, + }) + } + } -} + /// A builder for [`DeleteBucketInput`] + #[derive(Default)] + pub struct DeleteBucketInputBuilder { + bucket: Option, -impl GetBucketAccelerateConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + expected_bucket_owner: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + force_delete: Option, + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + impl DeleteBucketInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_force_delete(&mut self, field: Option) -> &mut Self { + self.force_delete = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let request_payer = self.request_payer; -Ok(GetBucketAccelerateConfigurationInput { -bucket, -expected_bucket_owner, -request_payer, -}) -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn force_delete(mut self, field: Option) -> Self { + self.force_delete = field; + self + } + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let force_delete = self.force_delete; + Ok(DeleteBucketInput { + bucket, + expected_bucket_owner, + force_delete, + }) + } + } -/// A builder for [`GetBucketAclInput`] -#[derive(Default)] -pub struct GetBucketAclInputBuilder { -bucket: Option, + /// A builder for [`DeleteBucketAnalyticsConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketAnalyticsConfigurationInputBuilder { + bucket: Option, -expected_bucket_owner: Option, + expected_bucket_owner: Option, -} + id: Option, + } -impl GetBucketAclInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + impl DeleteBucketAnalyticsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketAclInput { -bucket, -expected_bucket_owner, -}) -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); + self + } + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(DeleteBucketAnalyticsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } -/// A builder for [`GetBucketAnalyticsConfigurationInput`] -#[derive(Default)] -pub struct GetBucketAnalyticsConfigurationInputBuilder { -bucket: Option, + /// A builder for [`DeleteBucketCorsInput`] + #[derive(Default)] + pub struct DeleteBucketCorsInputBuilder { + bucket: Option, -expected_bucket_owner: Option, + expected_bucket_owner: Option, + } -id: Option, + impl DeleteBucketCorsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -impl GetBucketAnalyticsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketCorsInput { + bucket, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + /// A builder for [`DeleteBucketEncryptionInput`] + #[derive(Default)] + pub struct DeleteBucketEncryptionInputBuilder { + bucket: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + expected_bucket_owner: Option, + } -#[must_use] -pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); -self -} + impl DeleteBucketEncryptionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(GetBucketAnalyticsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -/// A builder for [`GetBucketCorsInput`] -#[derive(Default)] -pub struct GetBucketCorsInputBuilder { -bucket: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketEncryptionInput { + bucket, + expected_bucket_owner, + }) + } + } -expected_bucket_owner: Option, + /// A builder for [`DeleteBucketIntelligentTieringConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketIntelligentTieringConfigurationInputBuilder { + bucket: Option, -} + id: Option, + } -impl GetBucketCorsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + impl DeleteBucketIntelligentTieringConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketCorsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(DeleteBucketIntelligentTieringConfigurationInput { bucket, id }) + } + } -} + /// A builder for [`DeleteBucketInventoryConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketInventoryConfigurationInputBuilder { + bucket: Option, + expected_bucket_owner: Option, -/// A builder for [`GetBucketEncryptionInput`] -#[derive(Default)] -pub struct GetBucketEncryptionInputBuilder { -bucket: Option, + id: Option, + } -expected_bucket_owner: Option, + impl DeleteBucketInventoryConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -impl GetBucketEncryptionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketEncryptionInput { -bucket, -expected_bucket_owner, -}) -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(DeleteBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } -} + /// A builder for [`DeleteBucketLifecycleInput`] + #[derive(Default)] + pub struct DeleteBucketLifecycleInputBuilder { + bucket: Option, + expected_bucket_owner: Option, + } -/// A builder for [`GetBucketIntelligentTieringConfigurationInput`] -#[derive(Default)] -pub struct GetBucketIntelligentTieringConfigurationInputBuilder { -bucket: Option, + impl DeleteBucketLifecycleInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -id: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -impl GetBucketIntelligentTieringConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketLifecycleInput { + bucket, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + /// A builder for [`DeleteBucketMetadataTableConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketMetadataTableConfigurationInputBuilder { + bucket: Option, -#[must_use] -pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); -self -} + expected_bucket_owner: Option, + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(GetBucketIntelligentTieringConfigurationInput { -bucket, -id, -}) -} + impl DeleteBucketMetadataTableConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -/// A builder for [`GetBucketInventoryConfigurationInput`] -#[derive(Default)] -pub struct GetBucketInventoryConfigurationInputBuilder { -bucket: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -expected_bucket_owner: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketMetadataTableConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } -id: Option, + /// A builder for [`DeleteBucketMetricsConfigurationInput`] + #[derive(Default)] + pub struct DeleteBucketMetricsConfigurationInputBuilder { + bucket: Option, -} + expected_bucket_owner: Option, -impl GetBucketInventoryConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + id: Option, + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + impl DeleteBucketMetricsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(GetBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + #[must_use] + pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); + self + } -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(DeleteBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } + /// A builder for [`DeleteBucketOwnershipControlsInput`] + #[derive(Default)] + pub struct DeleteBucketOwnershipControlsInputBuilder { + bucket: Option, -/// A builder for [`GetBucketLifecycleConfigurationInput`] -#[derive(Default)] -pub struct GetBucketLifecycleConfigurationInputBuilder { -bucket: Option, + expected_bucket_owner: Option, + } -expected_bucket_owner: Option, + impl DeleteBucketOwnershipControlsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -impl GetBucketLifecycleConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketOwnershipControlsInput { + bucket, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`DeleteBucketPolicyInput`] + #[derive(Default)] + pub struct DeleteBucketPolicyInputBuilder { + bucket: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketLifecycleConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + expected_bucket_owner: Option, + } -} + impl DeleteBucketPolicyInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -/// A builder for [`GetBucketLocationInput`] -#[derive(Default)] -pub struct GetBucketLocationInputBuilder { -bucket: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketPolicyInput { + bucket, + expected_bucket_owner, + }) + } + } -impl GetBucketLocationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + /// A builder for [`DeleteBucketReplicationInput`] + #[derive(Default)] + pub struct DeleteBucketReplicationInputBuilder { + bucket: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + expected_bucket_owner: Option, + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + impl DeleteBucketReplicationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketLocationInput { -bucket, -expected_bucket_owner, -}) -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketReplicationInput { + bucket, + expected_bucket_owner, + }) + } + } -/// A builder for [`GetBucketLoggingInput`] -#[derive(Default)] -pub struct GetBucketLoggingInputBuilder { -bucket: Option, + /// A builder for [`DeleteBucketTaggingInput`] + #[derive(Default)] + pub struct DeleteBucketTaggingInputBuilder { + bucket: Option, -expected_bucket_owner: Option, + expected_bucket_owner: Option, + } -} + impl DeleteBucketTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -impl GetBucketLoggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketTaggingInput { + bucket, + expected_bucket_owner, + }) + } + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketLoggingInput { -bucket, -expected_bucket_owner, -}) -} + /// A builder for [`DeleteBucketWebsiteInput`] + #[derive(Default)] + pub struct DeleteBucketWebsiteInputBuilder { + bucket: Option, -} + expected_bucket_owner: Option, + } + impl DeleteBucketWebsiteInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -/// A builder for [`GetBucketMetadataTableConfigurationInput`] -#[derive(Default)] -pub struct GetBucketMetadataTableConfigurationInputBuilder { -bucket: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -impl GetBucketMetadataTableConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeleteBucketWebsiteInput { + bucket, + expected_bucket_owner, + }) + } + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`DeleteObjectInput`] + #[derive(Default)] + pub struct DeleteObjectInputBuilder { + bucket: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + bypass_governance_retention: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + expected_bucket_owner: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketMetadataTableConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + if_match: Option, -} + if_match_last_modified_time: Option, + if_match_size: Option, -/// A builder for [`GetBucketMetricsConfigurationInput`] -#[derive(Default)] -pub struct GetBucketMetricsConfigurationInputBuilder { -bucket: Option, + key: Option, -expected_bucket_owner: Option, + mfa: Option, -id: Option, + request_payer: Option, -} + version_id: Option, + } -impl GetBucketMetricsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + impl DeleteObjectInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; + self + } -pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_if_match_last_modified_time(&mut self, field: Option) -> &mut Self { + self.if_match_last_modified_time = field; + self + } -#[must_use] -pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); -self -} + pub fn set_if_match_size(&mut self, field: Option) -> &mut Self { + self.if_match_size = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(GetBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -} + pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; + self + } + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -/// A builder for [`GetBucketNotificationConfigurationInput`] -#[derive(Default)] -pub struct GetBucketNotificationConfigurationInputBuilder { -bucket: Option, + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -} + #[must_use] + pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; + self + } -impl GetBucketNotificationConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn if_match_last_modified_time(mut self, field: Option) -> Self { + self.if_match_last_modified_time = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn if_match_size(mut self, field: Option) -> Self { + self.if_match_size = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketNotificationConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -} + #[must_use] + pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; + self + } + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -/// A builder for [`GetBucketOwnershipControlsInput`] -#[derive(Default)] -pub struct GetBucketOwnershipControlsInputBuilder { -bucket: Option, + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -expected_bucket_owner: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bypass_governance_retention = self.bypass_governance_retention; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match = self.if_match; + let if_match_last_modified_time = self.if_match_last_modified_time; + let if_match_size = self.if_match_size; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let mfa = self.mfa; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(DeleteObjectInput { + bucket, + bypass_governance_retention, + expected_bucket_owner, + if_match, + if_match_last_modified_time, + if_match_size, + key, + mfa, + request_payer, + version_id, + }) + } + } -} + /// A builder for [`DeleteObjectTaggingInput`] + #[derive(Default)] + pub struct DeleteObjectTaggingInputBuilder { + bucket: Option, -impl GetBucketOwnershipControlsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + expected_bucket_owner: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + key: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + version_id: Option, + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + impl DeleteObjectTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketOwnershipControlsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -/// A builder for [`GetBucketPolicyInput`] -#[derive(Default)] -pub struct GetBucketPolicyInputBuilder { -bucket: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -impl GetBucketPolicyInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let version_id = self.version_id; + Ok(DeleteObjectTaggingInput { + bucket, + expected_bucket_owner, + key, + version_id, + }) + } + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + /// A builder for [`DeleteObjectsInput`] + #[derive(Default)] + pub struct DeleteObjectsInputBuilder { + bucket: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + bypass_governance_retention: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketPolicyInput { -bucket, -expected_bucket_owner, -}) -} + checksum_algorithm: Option, -} + delete: Option, + expected_bucket_owner: Option, -/// A builder for [`GetBucketPolicyStatusInput`] -#[derive(Default)] -pub struct GetBucketPolicyStatusInputBuilder { -bucket: Option, + mfa: Option, -expected_bucket_owner: Option, + request_payer: Option, + } -} + impl DeleteObjectsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -impl GetBucketPolicyStatusInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_delete(&mut self, field: Delete) -> &mut Self { + self.delete = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketPolicyStatusInput { -bucket, -expected_bucket_owner, -}) -} + pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; + self + } -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -/// A builder for [`GetBucketReplicationInput`] -#[derive(Default)] -pub struct GetBucketReplicationInputBuilder { -bucket: Option, + #[must_use] + pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -} + #[must_use] + pub fn delete(mut self, field: Delete) -> Self { + self.delete = Some(field); + self + } -impl GetBucketReplicationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bypass_governance_retention = self.bypass_governance_retention; + let checksum_algorithm = self.checksum_algorithm; + let delete = self.delete.ok_or_else(|| BuildError::missing_field("delete"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let mfa = self.mfa; + let request_payer = self.request_payer; + Ok(DeleteObjectsInput { + bucket, + bypass_governance_retention, + checksum_algorithm, + delete, + expected_bucket_owner, + mfa, + request_payer, + }) + } + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketReplicationInput { -bucket, -expected_bucket_owner, -}) -} + /// A builder for [`DeletePublicAccessBlockInput`] + #[derive(Default)] + pub struct DeletePublicAccessBlockInputBuilder { + bucket: Option, -} + expected_bucket_owner: Option, + } + impl DeletePublicAccessBlockInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -/// A builder for [`GetBucketRequestPaymentInput`] -#[derive(Default)] -pub struct GetBucketRequestPaymentInputBuilder { -bucket: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -impl GetBucketRequestPaymentInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(DeletePublicAccessBlockInput { + bucket, + expected_bucket_owner, + }) + } + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`GetBucketAccelerateConfigurationInput`] + #[derive(Default)] + pub struct GetBucketAccelerateConfigurationInputBuilder { + bucket: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + request_payer: Option, + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketRequestPaymentInput { -bucket, -expected_bucket_owner, -}) -} + impl GetBucketAccelerateConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -/// A builder for [`GetBucketTaggingInput`] -#[derive(Default)] -pub struct GetBucketTaggingInputBuilder { -bucket: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -impl GetBucketTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let request_payer = self.request_payer; + Ok(GetBucketAccelerateConfigurationInput { + bucket, + expected_bucket_owner, + request_payer, + }) + } + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`GetBucketAclInput`] + #[derive(Default)] + pub struct GetBucketAclInputBuilder { + bucket: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + expected_bucket_owner: Option, + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + impl GetBucketAclInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketTaggingInput { -bucket, -expected_bucket_owner, -}) -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -/// A builder for [`GetBucketVersioningInput`] -#[derive(Default)] -pub struct GetBucketVersioningInputBuilder { -bucket: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketAclInput { + bucket, + expected_bucket_owner, + }) + } + } -expected_bucket_owner: Option, + /// A builder for [`GetBucketAnalyticsConfigurationInput`] + #[derive(Default)] + pub struct GetBucketAnalyticsConfigurationInputBuilder { + bucket: Option, -} + expected_bucket_owner: Option, -impl GetBucketVersioningInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + id: Option, + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + impl GetBucketAnalyticsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketVersioningInput { -bucket, -expected_bucket_owner, -}) -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + #[must_use] + pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); + self + } -/// A builder for [`GetBucketWebsiteInput`] -#[derive(Default)] -pub struct GetBucketWebsiteInputBuilder { -bucket: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(GetBucketAnalyticsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } -expected_bucket_owner: Option, + /// A builder for [`GetBucketCorsInput`] + #[derive(Default)] + pub struct GetBucketCorsInputBuilder { + bucket: Option, -} + expected_bucket_owner: Option, + } -impl GetBucketWebsiteInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + impl GetBucketCorsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetBucketWebsiteInput { -bucket, -expected_bucket_owner, -}) -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketCorsInput { + bucket, + expected_bucket_owner, + }) + } + } -} + /// A builder for [`GetBucketEncryptionInput`] + #[derive(Default)] + pub struct GetBucketEncryptionInputBuilder { + bucket: Option, + expected_bucket_owner: Option, + } -/// A builder for [`GetObjectInput`] -#[derive(Default)] -pub struct GetObjectInputBuilder { -bucket: Option, + impl GetBucketEncryptionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -checksum_mode: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -if_match: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -if_modified_since: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketEncryptionInput { + bucket, + expected_bucket_owner, + }) + } + } -if_none_match: Option, + /// A builder for [`GetBucketIntelligentTieringConfigurationInput`] + #[derive(Default)] + pub struct GetBucketIntelligentTieringConfigurationInputBuilder { + bucket: Option, -if_unmodified_since: Option, + id: Option, + } -key: Option, + impl GetBucketIntelligentTieringConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -part_number: Option, + pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); + self + } -range: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -request_payer: Option, + #[must_use] + pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); + self + } -response_cache_control: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(GetBucketIntelligentTieringConfigurationInput { bucket, id }) + } + } -response_content_disposition: Option, + /// A builder for [`GetBucketInventoryConfigurationInput`] + #[derive(Default)] + pub struct GetBucketInventoryConfigurationInputBuilder { + bucket: Option, -response_content_encoding: Option, + expected_bucket_owner: Option, -response_content_language: Option, + id: Option, + } -response_content_type: Option, + impl GetBucketInventoryConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -response_expires: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -sse_customer_algorithm: Option, + pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); + self + } -sse_customer_key: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -sse_customer_key_md5: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -version_id: Option, + #[must_use] + pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); + self + } -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(GetBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } -impl GetObjectInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + /// A builder for [`GetBucketLifecycleConfigurationInput`] + #[derive(Default)] + pub struct GetBucketLifecycleConfigurationInputBuilder { + bucket: Option, -pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { - self.checksum_mode = field; -self -} + expected_bucket_owner: Option, + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + impl GetBucketLifecycleConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { - self.if_modified_since = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.if_unmodified_since = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketLifecycleConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + /// A builder for [`GetBucketLocationInput`] + #[derive(Default)] + pub struct GetBucketLocationInputBuilder { + bucket: Option, -pub fn set_part_number(&mut self, field: Option) -> &mut Self { - self.part_number = field; -self -} + expected_bucket_owner: Option, + } -pub fn set_range(&mut self, field: Option) -> &mut Self { - self.range = field; -self -} + impl GetBucketLocationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { - self.response_cache_control = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { - self.response_content_disposition = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { - self.response_content_encoding = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketLocationInput { + bucket, + expected_bucket_owner, + }) + } + } -pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { - self.response_content_language = field; -self -} + /// A builder for [`GetBucketLoggingInput`] + #[derive(Default)] + pub struct GetBucketLoggingInputBuilder { + bucket: Option, -pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { - self.response_content_type = field; -self -} + expected_bucket_owner: Option, + } -pub fn set_response_expires(&mut self, field: Option) -> &mut Self { - self.response_expires = field; -self -} + impl GetBucketLoggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketLoggingInput { + bucket, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + /// A builder for [`GetBucketMetadataTableConfigurationInput`] + #[derive(Default)] + pub struct GetBucketMetadataTableConfigurationInputBuilder { + bucket: Option, -#[must_use] -pub fn checksum_mode(mut self, field: Option) -> Self { - self.checksum_mode = field; -self -} + expected_bucket_owner: Option, + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + impl GetBucketMetadataTableConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn if_modified_since(mut self, field: Option) -> Self { - self.if_modified_since = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn if_unmodified_since(mut self, field: Option) -> Self { - self.if_unmodified_since = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketMetadataTableConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + /// A builder for [`GetBucketMetricsConfigurationInput`] + #[derive(Default)] + pub struct GetBucketMetricsConfigurationInputBuilder { + bucket: Option, -#[must_use] -pub fn part_number(mut self, field: Option) -> Self { - self.part_number = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn range(mut self, field: Option) -> Self { - self.range = field; -self -} + id: Option, + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + impl GetBucketMetricsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn response_cache_control(mut self, field: Option) -> Self { - self.response_cache_control = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn response_content_disposition(mut self, field: Option) -> Self { - self.response_content_disposition = field; -self -} + pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); + self + } -#[must_use] -pub fn response_content_encoding(mut self, field: Option) -> Self { - self.response_content_encoding = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn response_content_language(mut self, field: Option) -> Self { - self.response_content_language = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn response_content_type(mut self, field: Option) -> Self { - self.response_content_type = field; -self -} + #[must_use] + pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); + self + } -#[must_use] -pub fn response_expires(mut self, field: Option) -> Self { - self.response_expires = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(GetBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + /// A builder for [`GetBucketNotificationConfigurationInput`] + #[derive(Default)] + pub struct GetBucketNotificationConfigurationInputBuilder { + bucket: Option, -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + expected_bucket_owner: Option, + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + impl GetBucketNotificationConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_mode = self.checksum_mode; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match = self.if_match; -let if_modified_since = self.if_modified_since; -let if_none_match = self.if_none_match; -let if_unmodified_since = self.if_unmodified_since; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let part_number = self.part_number; -let range = self.range; -let request_payer = self.request_payer; -let response_cache_control = self.response_cache_control; -let response_content_disposition = self.response_content_disposition; -let response_content_encoding = self.response_content_encoding; -let response_content_language = self.response_content_language; -let response_content_type = self.response_content_type; -let response_expires = self.response_expires; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let version_id = self.version_id; -Ok(GetObjectInput { -bucket, -checksum_mode, -expected_bucket_owner, -if_match, -if_modified_since, -if_none_match, -if_unmodified_since, -key, -part_number, -range, -request_payer, -response_cache_control, -response_content_disposition, -response_content_encoding, -response_content_language, -response_content_type, -response_expires, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} - -} - - -/// A builder for [`GetObjectAclInput`] -#[derive(Default)] -pub struct GetObjectAclInputBuilder { -bucket: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -key: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketNotificationConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } -request_payer: Option, + /// A builder for [`GetBucketOwnershipControlsInput`] + #[derive(Default)] + pub struct GetBucketOwnershipControlsInputBuilder { + bucket: Option, -version_id: Option, + expected_bucket_owner: Option, + } -} + impl GetBucketOwnershipControlsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -impl GetObjectAclInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketOwnershipControlsInput { + bucket, + expected_bucket_owner, + }) + } + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + /// A builder for [`GetBucketPolicyInput`] + #[derive(Default)] + pub struct GetBucketPolicyInputBuilder { + bucket: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + expected_bucket_owner: Option, + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + impl GetBucketPolicyInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(GetObjectAclInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketPolicyInput { + bucket, + expected_bucket_owner, + }) + } + } -} + /// A builder for [`GetBucketPolicyStatusInput`] + #[derive(Default)] + pub struct GetBucketPolicyStatusInputBuilder { + bucket: Option, + expected_bucket_owner: Option, + } -/// A builder for [`GetObjectAttributesInput`] -#[derive(Default)] -pub struct GetObjectAttributesInputBuilder { -bucket: Option, + impl GetBucketPolicyStatusInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -key: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -max_parts: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -object_attributes: ObjectAttributesList, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketPolicyStatusInput { + bucket, + expected_bucket_owner, + }) + } + } -part_number_marker: Option, + /// A builder for [`GetBucketReplicationInput`] + #[derive(Default)] + pub struct GetBucketReplicationInputBuilder { + bucket: Option, -request_payer: Option, + expected_bucket_owner: Option, + } -sse_customer_algorithm: Option, + impl GetBucketReplicationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -sse_customer_key: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -sse_customer_key_md5: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -version_id: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketReplicationInput { + bucket, + expected_bucket_owner, + }) + } + } -impl GetObjectAttributesInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + /// A builder for [`GetBucketRequestPaymentInput`] + #[derive(Default)] + pub struct GetBucketRequestPaymentInputBuilder { + bucket: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + expected_bucket_owner: Option, + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + impl GetBucketRequestPaymentInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_max_parts(&mut self, field: Option) -> &mut Self { - self.max_parts = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_object_attributes(&mut self, field: ObjectAttributesList) -> &mut Self { - self.object_attributes = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { - self.part_number_marker = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketRequestPaymentInput { + bucket, + expected_bucket_owner, + }) + } + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + /// A builder for [`GetBucketTaggingInput`] + #[derive(Default)] + pub struct GetBucketTaggingInputBuilder { + bucket: Option, -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + expected_bucket_owner: Option, + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + impl GetBucketTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketTaggingInput { + bucket, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn max_parts(mut self, field: Option) -> Self { - self.max_parts = field; -self -} + /// A builder for [`GetBucketVersioningInput`] + #[derive(Default)] + pub struct GetBucketVersioningInputBuilder { + bucket: Option, -#[must_use] -pub fn object_attributes(mut self, field: ObjectAttributesList) -> Self { - self.object_attributes = field; -self -} + expected_bucket_owner: Option, + } -#[must_use] -pub fn part_number_marker(mut self, field: Option) -> Self { - self.part_number_marker = field; -self -} + impl GetBucketVersioningInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketVersioningInput { + bucket, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + /// A builder for [`GetBucketWebsiteInput`] + #[derive(Default)] + pub struct GetBucketWebsiteInputBuilder { + bucket: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let max_parts = self.max_parts; -let object_attributes = self.object_attributes; -let part_number_marker = self.part_number_marker; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let version_id = self.version_id; -Ok(GetObjectAttributesInput { -bucket, -expected_bucket_owner, -key, -max_parts, -object_attributes, -part_number_marker, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} + expected_bucket_owner: Option, + } -} + impl GetBucketWebsiteInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -/// A builder for [`GetObjectLegalHoldInput`] -#[derive(Default)] -pub struct GetObjectLegalHoldInputBuilder { -bucket: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -key: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetBucketWebsiteInput { + bucket, + expected_bucket_owner, + }) + } + } -request_payer: Option, + /// A builder for [`GetObjectInput`] + #[derive(Default)] + pub struct GetObjectInputBuilder { + bucket: Option, -version_id: Option, + checksum_mode: Option, -} + expected_bucket_owner: Option, -impl GetObjectLegalHoldInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + if_match: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + if_modified_since: Option, -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + if_none_match: Option, -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + if_unmodified_since: Option, -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + key: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + part_number: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + range: Option, -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + request_payer: Option, -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + response_cache_control: Option, -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + response_content_disposition: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(GetObjectLegalHoldInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} + response_content_encoding: Option, -} + response_content_language: Option, + response_content_type: Option, -/// A builder for [`GetObjectLockConfigurationInput`] -#[derive(Default)] -pub struct GetObjectLockConfigurationInputBuilder { -bucket: Option, + response_expires: Option, -expected_bucket_owner: Option, + sse_customer_algorithm: Option, -} + sse_customer_key: Option, -impl GetObjectLockConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + sse_customer_key_md5: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + version_id: Option, + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + impl GetObjectInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { + self.checksum_mode = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetObjectLockConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } + pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { + self.if_modified_since = field; + self + } -/// A builder for [`GetObjectRetentionInput`] -#[derive(Default)] -pub struct GetObjectRetentionInputBuilder { -bucket: Option, + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } -expected_bucket_owner: Option, + pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.if_unmodified_since = field; + self + } -key: Option, + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -request_payer: Option, + pub fn set_part_number(&mut self, field: Option) -> &mut Self { + self.part_number = field; + self + } -version_id: Option, + pub fn set_range(&mut self, field: Option) -> &mut Self { + self.range = field; + self + } -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -impl GetObjectRetentionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { + self.response_cache_control = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { + self.response_content_disposition = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { + self.response_content_encoding = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { + self.response_content_language = field; + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { + self.response_content_type = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_response_expires(&mut self, field: Option) -> &mut Self { + self.response_expires = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(GetObjectRetentionInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -} + #[must_use] + pub fn checksum_mode(mut self, field: Option) -> Self { + self.checksum_mode = field; + self + } + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -/// A builder for [`GetObjectTaggingInput`] -#[derive(Default)] -pub struct GetObjectTaggingInputBuilder { -bucket: Option, + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn if_modified_since(mut self, field: Option) -> Self { + self.if_modified_since = field; + self + } -key: Option, + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } -request_payer: Option, + #[must_use] + pub fn if_unmodified_since(mut self, field: Option) -> Self { + self.if_unmodified_since = field; + self + } -version_id: Option, + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -} + #[must_use] + pub fn part_number(mut self, field: Option) -> Self { + self.part_number = field; + self + } -impl GetObjectTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn range(mut self, field: Option) -> Self { + self.range = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + #[must_use] + pub fn response_cache_control(mut self, field: Option) -> Self { + self.response_cache_control = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + #[must_use] + pub fn response_content_disposition(mut self, field: Option) -> Self { + self.response_content_disposition = field; + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + #[must_use] + pub fn response_content_encoding(mut self, field: Option) -> Self { + self.response_content_encoding = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn response_content_language(mut self, field: Option) -> Self { + self.response_content_language = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn response_content_type(mut self, field: Option) -> Self { + self.response_content_type = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + #[must_use] + pub fn response_expires(mut self, field: Option) -> Self { + self.response_expires = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(GetObjectTaggingInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_mode = self.checksum_mode; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match = self.if_match; + let if_modified_since = self.if_modified_since; + let if_none_match = self.if_none_match; + let if_unmodified_since = self.if_unmodified_since; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let part_number = self.part_number; + let range = self.range; + let request_payer = self.request_payer; + let response_cache_control = self.response_cache_control; + let response_content_disposition = self.response_content_disposition; + let response_content_encoding = self.response_content_encoding; + let response_content_language = self.response_content_language; + let response_content_type = self.response_content_type; + let response_expires = self.response_expires; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let version_id = self.version_id; + Ok(GetObjectInput { + bucket, + checksum_mode, + expected_bucket_owner, + if_match, + if_modified_since, + if_none_match, + if_unmodified_since, + key, + part_number, + range, + request_payer, + response_cache_control, + response_content_disposition, + response_content_encoding, + response_content_language, + response_content_type, + response_expires, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + } -/// A builder for [`GetObjectTorrentInput`] -#[derive(Default)] -pub struct GetObjectTorrentInputBuilder { -bucket: Option, + /// A builder for [`GetObjectAclInput`] + #[derive(Default)] + pub struct GetObjectAclInputBuilder { + bucket: Option, -expected_bucket_owner: Option, + expected_bucket_owner: Option, -key: Option, + key: Option, -request_payer: Option, + request_payer: Option, -} + version_id: Option, + } -impl GetObjectTorrentInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + impl GetObjectAclInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -Ok(GetObjectTorrentInput { -bucket, -expected_bucket_owner, -key, -request_payer, -}) -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(GetObjectAclInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + } -/// A builder for [`GetPublicAccessBlockInput`] -#[derive(Default)] -pub struct GetPublicAccessBlockInputBuilder { -bucket: Option, + /// A builder for [`GetObjectAttributesInput`] + #[derive(Default)] + pub struct GetObjectAttributesInputBuilder { + bucket: Option, -expected_bucket_owner: Option, + expected_bucket_owner: Option, -} + key: Option, -impl GetPublicAccessBlockInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + max_parts: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + object_attributes: ObjectAttributesList, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + part_number_marker: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + request_payer: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(GetPublicAccessBlockInput { -bucket, -expected_bucket_owner, -}) -} + sse_customer_algorithm: Option, -} + sse_customer_key: Option, + sse_customer_key_md5: Option, -/// A builder for [`HeadBucketInput`] -#[derive(Default)] -pub struct HeadBucketInputBuilder { -bucket: Option, + version_id: Option, + } -expected_bucket_owner: Option, + impl GetObjectAttributesInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -impl HeadBucketInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_max_parts(&mut self, field: Option) -> &mut Self { + self.max_parts = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_object_attributes(&mut self, field: ObjectAttributesList) -> &mut Self { + self.object_attributes = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { + self.part_number_marker = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(HeadBucketInput { -bucket, -expected_bucket_owner, -}) -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -/// A builder for [`HeadObjectInput`] -#[derive(Default)] -pub struct HeadObjectInputBuilder { -bucket: Option, + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -checksum_mode: Option, + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -if_match: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -if_modified_since: Option, + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -if_none_match: Option, + #[must_use] + pub fn max_parts(mut self, field: Option) -> Self { + self.max_parts = field; + self + } -if_unmodified_since: Option, + #[must_use] + pub fn object_attributes(mut self, field: ObjectAttributesList) -> Self { + self.object_attributes = field; + self + } -key: Option, + #[must_use] + pub fn part_number_marker(mut self, field: Option) -> Self { + self.part_number_marker = field; + self + } -part_number: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -range: Option, + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -request_payer: Option, + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -response_cache_control: Option, + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -response_content_disposition: Option, + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -response_content_encoding: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let max_parts = self.max_parts; + let object_attributes = self.object_attributes; + let part_number_marker = self.part_number_marker; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let version_id = self.version_id; + Ok(GetObjectAttributesInput { + bucket, + expected_bucket_owner, + key, + max_parts, + object_attributes, + part_number_marker, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + } -response_content_language: Option, + /// A builder for [`GetObjectLegalHoldInput`] + #[derive(Default)] + pub struct GetObjectLegalHoldInputBuilder { + bucket: Option, -response_content_type: Option, + expected_bucket_owner: Option, -response_expires: Option, + key: Option, -sse_customer_algorithm: Option, + request_payer: Option, -sse_customer_key: Option, + version_id: Option, + } -sse_customer_key_md5: Option, + impl GetObjectLegalHoldInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -version_id: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -impl HeadObjectInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { - self.checksum_mode = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { - self.if_modified_since = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.if_unmodified_since = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(GetObjectLegalHoldInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + } -pub fn set_part_number(&mut self, field: Option) -> &mut Self { - self.part_number = field; -self -} + /// A builder for [`GetObjectLockConfigurationInput`] + #[derive(Default)] + pub struct GetObjectLockConfigurationInputBuilder { + bucket: Option, -pub fn set_range(&mut self, field: Option) -> &mut Self { - self.range = field; -self -} + expected_bucket_owner: Option, + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + impl GetObjectLockConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { - self.response_cache_control = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { - self.response_content_disposition = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { - self.response_content_encoding = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { - self.response_content_language = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetObjectLockConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + } -pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { - self.response_content_type = field; -self -} + /// A builder for [`GetObjectRetentionInput`] + #[derive(Default)] + pub struct GetObjectRetentionInputBuilder { + bucket: Option, -pub fn set_response_expires(&mut self, field: Option) -> &mut Self { - self.response_expires = field; -self -} + expected_bucket_owner: Option, -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + key: Option, -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + request_payer: Option, -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + version_id: Option, + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + impl GetObjectRetentionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn checksum_mode(mut self, field: Option) -> Self { - self.checksum_mode = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -#[must_use] -pub fn if_modified_since(mut self, field: Option) -> Self { - self.if_modified_since = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn if_unmodified_since(mut self, field: Option) -> Self { - self.if_unmodified_since = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -#[must_use] -pub fn part_number(mut self, field: Option) -> Self { - self.part_number = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -#[must_use] -pub fn range(mut self, field: Option) -> Self { - self.range = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(GetObjectRetentionInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + /// A builder for [`GetObjectTaggingInput`] + #[derive(Default)] + pub struct GetObjectTaggingInputBuilder { + bucket: Option, -#[must_use] -pub fn response_cache_control(mut self, field: Option) -> Self { - self.response_cache_control = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn response_content_disposition(mut self, field: Option) -> Self { - self.response_content_disposition = field; -self -} + key: Option, -#[must_use] -pub fn response_content_encoding(mut self, field: Option) -> Self { - self.response_content_encoding = field; -self -} + request_payer: Option, -#[must_use] -pub fn response_content_language(mut self, field: Option) -> Self { - self.response_content_language = field; -self -} + version_id: Option, + } -#[must_use] -pub fn response_content_type(mut self, field: Option) -> Self { - self.response_content_type = field; -self -} + impl GetObjectTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn response_expires(mut self, field: Option) -> Self { - self.response_expires = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_mode = self.checksum_mode; -let expected_bucket_owner = self.expected_bucket_owner; -let if_match = self.if_match; -let if_modified_since = self.if_modified_since; -let if_none_match = self.if_none_match; -let if_unmodified_since = self.if_unmodified_since; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let part_number = self.part_number; -let range = self.range; -let request_payer = self.request_payer; -let response_cache_control = self.response_cache_control; -let response_content_disposition = self.response_content_disposition; -let response_content_encoding = self.response_content_encoding; -let response_content_language = self.response_content_language; -let response_content_type = self.response_content_type; -let response_expires = self.response_expires; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let version_id = self.version_id; -Ok(HeadObjectInput { -bucket, -checksum_mode, -expected_bucket_owner, -if_match, -if_modified_since, -if_none_match, -if_unmodified_since, -key, -part_number, -range, -request_payer, -response_cache_control, -response_content_disposition, -response_content_encoding, -response_content_language, -response_content_type, -response_expires, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} - -} - - -/// A builder for [`ListBucketAnalyticsConfigurationsInput`] -#[derive(Default)] -pub struct ListBucketAnalyticsConfigurationsInputBuilder { -bucket: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -continuation_token: Option, + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -impl ListBucketAnalyticsConfigurationsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(GetObjectTaggingInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + } -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} + /// A builder for [`GetObjectTorrentInput`] + #[derive(Default)] + pub struct GetObjectTorrentInputBuilder { + bucket: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + key: Option, -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} + request_payer: Option, + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + impl GetObjectTorrentInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(ListBucketAnalyticsConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -/// A builder for [`ListBucketIntelligentTieringConfigurationsInput`] -#[derive(Default)] -pub struct ListBucketIntelligentTieringConfigurationsInputBuilder { -bucket: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -continuation_token: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -impl ListBucketIntelligentTieringConfigurationsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + Ok(GetObjectTorrentInput { + bucket, + expected_bucket_owner, + key, + request_payer, + }) + } + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + /// A builder for [`GetPublicAccessBlockInput`] + #[derive(Default)] + pub struct GetPublicAccessBlockInputBuilder { + bucket: Option, -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} + expected_bucket_owner: Option, + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -Ok(ListBucketIntelligentTieringConfigurationsInput { -bucket, -continuation_token, -}) -} + impl GetPublicAccessBlockInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -/// A builder for [`ListBucketInventoryConfigurationsInput`] -#[derive(Default)] -pub struct ListBucketInventoryConfigurationsInputBuilder { -bucket: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -continuation_token: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(GetPublicAccessBlockInput { + bucket, + expected_bucket_owner, + }) + } + } -expected_bucket_owner: Option, + /// A builder for [`HeadBucketInput`] + #[derive(Default)] + pub struct HeadBucketInputBuilder { + bucket: Option, -} + expected_bucket_owner: Option, + } -impl ListBucketInventoryConfigurationsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + impl HeadBucketInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(HeadBucketInput { + bucket, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`HeadObjectInput`] + #[derive(Default)] + pub struct HeadObjectInputBuilder { + bucket: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(ListBucketInventoryConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + checksum_mode: Option, -} + expected_bucket_owner: Option, + if_match: Option, -/// A builder for [`ListBucketMetricsConfigurationsInput`] -#[derive(Default)] -pub struct ListBucketMetricsConfigurationsInputBuilder { -bucket: Option, + if_modified_since: Option, -continuation_token: Option, + if_none_match: Option, -expected_bucket_owner: Option, + if_unmodified_since: Option, -} + key: Option, -impl ListBucketMetricsConfigurationsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + part_number: Option, -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} + range: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + request_payer: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + response_cache_control: Option, -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} + response_content_disposition: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + response_content_encoding: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(ListBucketMetricsConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + response_content_language: Option, -} + response_content_type: Option, + response_expires: Option, -/// A builder for [`ListBucketsInput`] -#[derive(Default)] -pub struct ListBucketsInputBuilder { -bucket_region: Option, + sse_customer_algorithm: Option, -continuation_token: Option, + sse_customer_key: Option, -max_buckets: Option, + sse_customer_key_md5: Option, -prefix: Option, + version_id: Option, + } -} + impl HeadObjectInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -impl ListBucketsInputBuilder { -pub fn set_bucket_region(&mut self, field: Option) -> &mut Self { - self.bucket_region = field; -self -} + pub fn set_checksum_mode(&mut self, field: Option) -> &mut Self { + self.checksum_mode = field; + self + } -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_max_buckets(&mut self, field: Option) -> &mut Self { - self.max_buckets = field; -self -} + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} + pub fn set_if_modified_since(&mut self, field: Option) -> &mut Self { + self.if_modified_since = field; + self + } -#[must_use] -pub fn bucket_region(mut self, field: Option) -> Self { - self.bucket_region = field; -self -} + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} + pub fn set_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.if_unmodified_since = field; + self + } -#[must_use] -pub fn max_buckets(mut self, field: Option) -> Self { - self.max_buckets = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} + pub fn set_part_number(&mut self, field: Option) -> &mut Self { + self.part_number = field; + self + } -pub fn build(self) -> Result { -let bucket_region = self.bucket_region; -let continuation_token = self.continuation_token; -let max_buckets = self.max_buckets; -let prefix = self.prefix; -Ok(ListBucketsInput { -bucket_region, -continuation_token, -max_buckets, -prefix, -}) -} + pub fn set_range(&mut self, field: Option) -> &mut Self { + self.range = field; + self + } -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + pub fn set_response_cache_control(&mut self, field: Option) -> &mut Self { + self.response_cache_control = field; + self + } -/// A builder for [`ListDirectoryBucketsInput`] -#[derive(Default)] -pub struct ListDirectoryBucketsInputBuilder { -continuation_token: Option, + pub fn set_response_content_disposition(&mut self, field: Option) -> &mut Self { + self.response_content_disposition = field; + self + } -max_directory_buckets: Option, + pub fn set_response_content_encoding(&mut self, field: Option) -> &mut Self { + self.response_content_encoding = field; + self + } -} + pub fn set_response_content_language(&mut self, field: Option) -> &mut Self { + self.response_content_language = field; + self + } -impl ListDirectoryBucketsInputBuilder { -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} + pub fn set_response_content_type(&mut self, field: Option) -> &mut Self { + self.response_content_type = field; + self + } -pub fn set_max_directory_buckets(&mut self, field: Option) -> &mut Self { - self.max_directory_buckets = field; -self -} + pub fn set_response_expires(&mut self, field: Option) -> &mut Self { + self.response_expires = field; + self + } -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn max_directory_buckets(mut self, field: Option) -> Self { - self.max_directory_buckets = field; -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -pub fn build(self) -> Result { -let continuation_token = self.continuation_token; -let max_directory_buckets = self.max_directory_buckets; -Ok(ListDirectoryBucketsInput { -continuation_token, -max_directory_buckets, -}) -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -/// A builder for [`ListMultipartUploadsInput`] -#[derive(Default)] -pub struct ListMultipartUploadsInputBuilder { -bucket: Option, + #[must_use] + pub fn checksum_mode(mut self, field: Option) -> Self { + self.checksum_mode = field; + self + } -delimiter: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -encoding_type: Option, + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn if_modified_since(mut self, field: Option) -> Self { + self.if_modified_since = field; + self + } -key_marker: Option, + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } -max_uploads: Option, + #[must_use] + pub fn if_unmodified_since(mut self, field: Option) -> Self { + self.if_unmodified_since = field; + self + } -prefix: Option, + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -request_payer: Option, + #[must_use] + pub fn part_number(mut self, field: Option) -> Self { + self.part_number = field; + self + } -upload_id_marker: Option, + #[must_use] + pub fn range(mut self, field: Option) -> Self { + self.range = field; + self + } -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -impl ListMultipartUploadsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn response_cache_control(mut self, field: Option) -> Self { + self.response_cache_control = field; + self + } -pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; -self -} + #[must_use] + pub fn response_content_disposition(mut self, field: Option) -> Self { + self.response_content_disposition = field; + self + } -pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; -self -} + #[must_use] + pub fn response_content_encoding(mut self, field: Option) -> Self { + self.response_content_encoding = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn response_content_language(mut self, field: Option) -> Self { + self.response_content_language = field; + self + } -pub fn set_key_marker(&mut self, field: Option) -> &mut Self { - self.key_marker = field; -self -} + #[must_use] + pub fn response_content_type(mut self, field: Option) -> Self { + self.response_content_type = field; + self + } -pub fn set_max_uploads(&mut self, field: Option) -> &mut Self { - self.max_uploads = field; -self -} + #[must_use] + pub fn response_expires(mut self, field: Option) -> Self { + self.response_expires = field; + self + } -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -pub fn set_upload_id_marker(&mut self, field: Option) -> &mut Self { - self.upload_id_marker = field; -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -#[must_use] -pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_mode = self.checksum_mode; + let expected_bucket_owner = self.expected_bucket_owner; + let if_match = self.if_match; + let if_modified_since = self.if_modified_since; + let if_none_match = self.if_none_match; + let if_unmodified_since = self.if_unmodified_since; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let part_number = self.part_number; + let range = self.range; + let request_payer = self.request_payer; + let response_cache_control = self.response_cache_control; + let response_content_disposition = self.response_content_disposition; + let response_content_encoding = self.response_content_encoding; + let response_content_language = self.response_content_language; + let response_content_type = self.response_content_type; + let response_expires = self.response_expires; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let version_id = self.version_id; + Ok(HeadObjectInput { + bucket, + checksum_mode, + expected_bucket_owner, + if_match, + if_modified_since, + if_none_match, + if_unmodified_since, + key, + part_number, + range, + request_payer, + response_cache_control, + response_content_disposition, + response_content_encoding, + response_content_language, + response_content_type, + response_expires, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + } -#[must_use] -pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; -self -} + /// A builder for [`ListBucketAnalyticsConfigurationsInput`] + #[derive(Default)] + pub struct ListBucketAnalyticsConfigurationsInputBuilder { + bucket: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + continuation_token: Option, -#[must_use] -pub fn key_marker(mut self, field: Option) -> Self { - self.key_marker = field; -self -} + expected_bucket_owner: Option, + } -#[must_use] -pub fn max_uploads(mut self, field: Option) -> Self { - self.max_uploads = field; -self -} + impl ListBucketAnalyticsConfigurationsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn upload_id_marker(mut self, field: Option) -> Self { - self.upload_id_marker = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let delimiter = self.delimiter; -let encoding_type = self.encoding_type; -let expected_bucket_owner = self.expected_bucket_owner; -let key_marker = self.key_marker; -let max_uploads = self.max_uploads; -let prefix = self.prefix; -let request_payer = self.request_payer; -let upload_id_marker = self.upload_id_marker; -Ok(ListMultipartUploadsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -key_marker, -max_uploads, -prefix, -request_payer, -upload_id_marker, -}) -} + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(ListBucketAnalyticsConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + } -/// A builder for [`ListObjectVersionsInput`] -#[derive(Default)] -pub struct ListObjectVersionsInputBuilder { -bucket: Option, + /// A builder for [`ListBucketIntelligentTieringConfigurationsInput`] + #[derive(Default)] + pub struct ListBucketIntelligentTieringConfigurationsInputBuilder { + bucket: Option, -delimiter: Option, + continuation_token: Option, + } -encoding_type: Option, + impl ListBucketIntelligentTieringConfigurationsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } -key_marker: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -max_keys: Option, + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } -optional_object_attributes: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + Ok(ListBucketIntelligentTieringConfigurationsInput { + bucket, + continuation_token, + }) + } + } -prefix: Option, + /// A builder for [`ListBucketInventoryConfigurationsInput`] + #[derive(Default)] + pub struct ListBucketInventoryConfigurationsInputBuilder { + bucket: Option, -request_payer: Option, + continuation_token: Option, -version_id_marker: Option, + expected_bucket_owner: Option, + } -} + impl ListBucketInventoryConfigurationsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -impl ListObjectVersionsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } -pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } -pub fn set_key_marker(&mut self, field: Option) -> &mut Self { - self.key_marker = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(ListBucketInventoryConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + } -pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; -self -} + /// A builder for [`ListBucketMetricsConfigurationsInput`] + #[derive(Default)] + pub struct ListBucketMetricsConfigurationsInputBuilder { + bucket: Option, -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} + continuation_token: Option, -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + expected_bucket_owner: Option, + } -pub fn set_version_id_marker(&mut self, field: Option) -> &mut Self { - self.version_id_marker = field; -self -} + impl ListBucketMetricsConfigurationsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } -#[must_use] -pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } -#[must_use] -pub fn key_marker(mut self, field: Option) -> Self { - self.key_marker = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(ListBucketMetricsConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; -self -} + /// A builder for [`ListBucketsInput`] + #[derive(Default)] + pub struct ListBucketsInputBuilder { + bucket_region: Option, -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} + continuation_token: Option, -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + max_buckets: Option, -#[must_use] -pub fn version_id_marker(mut self, field: Option) -> Self { - self.version_id_marker = field; -self -} + prefix: Option, + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let delimiter = self.delimiter; -let encoding_type = self.encoding_type; -let expected_bucket_owner = self.expected_bucket_owner; -let key_marker = self.key_marker; -let max_keys = self.max_keys; -let optional_object_attributes = self.optional_object_attributes; -let prefix = self.prefix; -let request_payer = self.request_payer; -let version_id_marker = self.version_id_marker; -Ok(ListObjectVersionsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -key_marker, -max_keys, -optional_object_attributes, -prefix, -request_payer, -version_id_marker, -}) -} + impl ListBucketsInputBuilder { + pub fn set_bucket_region(&mut self, field: Option) -> &mut Self { + self.bucket_region = field; + self + } -} + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } + pub fn set_max_buckets(&mut self, field: Option) -> &mut Self { + self.max_buckets = field; + self + } -/// A builder for [`ListObjectsInput`] -#[derive(Default)] -pub struct ListObjectsInputBuilder { -bucket: Option, + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } -delimiter: Option, + #[must_use] + pub fn bucket_region(mut self, field: Option) -> Self { + self.bucket_region = field; + self + } -encoding_type: Option, + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn max_buckets(mut self, field: Option) -> Self { + self.max_buckets = field; + self + } -marker: Option, + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } -max_keys: Option, + pub fn build(self) -> Result { + let bucket_region = self.bucket_region; + let continuation_token = self.continuation_token; + let max_buckets = self.max_buckets; + let prefix = self.prefix; + Ok(ListBucketsInput { + bucket_region, + continuation_token, + max_buckets, + prefix, + }) + } + } -optional_object_attributes: Option, + /// A builder for [`ListDirectoryBucketsInput`] + #[derive(Default)] + pub struct ListDirectoryBucketsInputBuilder { + continuation_token: Option, -prefix: Option, + max_directory_buckets: Option, + } -request_payer: Option, + impl ListDirectoryBucketsInputBuilder { + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } -} + pub fn set_max_directory_buckets(&mut self, field: Option) -> &mut Self { + self.max_directory_buckets = field; + self + } -impl ListObjectsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } -pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; -self -} + #[must_use] + pub fn max_directory_buckets(mut self, field: Option) -> Self { + self.max_directory_buckets = field; + self + } -pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; -self -} + pub fn build(self) -> Result { + let continuation_token = self.continuation_token; + let max_directory_buckets = self.max_directory_buckets; + Ok(ListDirectoryBucketsInput { + continuation_token, + max_directory_buckets, + }) + } + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`ListMultipartUploadsInput`] + #[derive(Default)] + pub struct ListMultipartUploadsInputBuilder { + bucket: Option, -pub fn set_marker(&mut self, field: Option) -> &mut Self { - self.marker = field; -self -} + delimiter: Option, -pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; -self -} + encoding_type: Option, -pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; -self -} + expected_bucket_owner: Option, -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} + key_marker: Option, -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + max_uploads: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + prefix: Option, -#[must_use] -pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; -self -} + request_payer: Option, -#[must_use] -pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; -self -} + upload_id_marker: Option, + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + impl ListMultipartUploadsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn marker(mut self, field: Option) -> Self { - self.marker = field; -self -} + pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; + self + } -#[must_use] -pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; -self -} + pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; + self + } -#[must_use] -pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} + pub fn set_key_marker(&mut self, field: Option) -> &mut Self { + self.key_marker = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_max_uploads(&mut self, field: Option) -> &mut Self { + self.max_uploads = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let delimiter = self.delimiter; -let encoding_type = self.encoding_type; -let expected_bucket_owner = self.expected_bucket_owner; -let marker = self.marker; -let max_keys = self.max_keys; -let optional_object_attributes = self.optional_object_attributes; -let prefix = self.prefix; -let request_payer = self.request_payer; -Ok(ListObjectsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -marker, -max_keys, -optional_object_attributes, -prefix, -request_payer, -}) -} + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + pub fn set_upload_id_marker(&mut self, field: Option) -> &mut Self { + self.upload_id_marker = field; + self + } -/// A builder for [`ListObjectsV2Input`] -#[derive(Default)] -pub struct ListObjectsV2InputBuilder { -bucket: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -continuation_token: Option, + #[must_use] + pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; + self + } -delimiter: Option, + #[must_use] + pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; + self + } -encoding_type: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn key_marker(mut self, field: Option) -> Self { + self.key_marker = field; + self + } -fetch_owner: Option, + #[must_use] + pub fn max_uploads(mut self, field: Option) -> Self { + self.max_uploads = field; + self + } -max_keys: Option, + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } -optional_object_attributes: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -prefix: Option, + #[must_use] + pub fn upload_id_marker(mut self, field: Option) -> Self { + self.upload_id_marker = field; + self + } -request_payer: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let delimiter = self.delimiter; + let encoding_type = self.encoding_type; + let expected_bucket_owner = self.expected_bucket_owner; + let key_marker = self.key_marker; + let max_uploads = self.max_uploads; + let prefix = self.prefix; + let request_payer = self.request_payer; + let upload_id_marker = self.upload_id_marker; + Ok(ListMultipartUploadsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + key_marker, + max_uploads, + prefix, + request_payer, + upload_id_marker, + }) + } + } -start_after: Option, + /// A builder for [`ListObjectVersionsInput`] + #[derive(Default)] + pub struct ListObjectVersionsInputBuilder { + bucket: Option, -} + delimiter: Option, -impl ListObjectsV2InputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + encoding_type: Option, -pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { - self.continuation_token = field; -self -} + expected_bucket_owner: Option, -pub fn set_delimiter(&mut self, field: Option) -> &mut Self { - self.delimiter = field; -self -} + key_marker: Option, -pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { - self.encoding_type = field; -self -} + max_keys: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + optional_object_attributes: Option, -pub fn set_fetch_owner(&mut self, field: Option) -> &mut Self { - self.fetch_owner = field; -self -} + prefix: Option, -pub fn set_max_keys(&mut self, field: Option) -> &mut Self { - self.max_keys = field; -self -} + request_payer: Option, -pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { - self.optional_object_attributes = field; -self -} + version_id_marker: Option, + } -pub fn set_prefix(&mut self, field: Option) -> &mut Self { - self.prefix = field; -self -} + impl ListObjectVersionsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; + self + } -pub fn set_start_after(&mut self, field: Option) -> &mut Self { - self.start_after = field; -self -} + pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn continuation_token(mut self, field: Option) -> Self { - self.continuation_token = field; -self -} + pub fn set_key_marker(&mut self, field: Option) -> &mut Self { + self.key_marker = field; + self + } -#[must_use] -pub fn delimiter(mut self, field: Option) -> Self { - self.delimiter = field; -self -} + pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; + self + } -#[must_use] -pub fn encoding_type(mut self, field: Option) -> Self { - self.encoding_type = field; -self -} + pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } -#[must_use] -pub fn fetch_owner(mut self, field: Option) -> Self { - self.fetch_owner = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn max_keys(mut self, field: Option) -> Self { - self.max_keys = field; -self -} + pub fn set_version_id_marker(&mut self, field: Option) -> &mut Self { + self.version_id_marker = field; + self + } -#[must_use] -pub fn optional_object_attributes(mut self, field: Option) -> Self { - self.optional_object_attributes = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn prefix(mut self, field: Option) -> Self { - self.prefix = field; -self -} + #[must_use] + pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; + self + } -#[must_use] -pub fn start_after(mut self, field: Option) -> Self { - self.start_after = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let continuation_token = self.continuation_token; -let delimiter = self.delimiter; -let encoding_type = self.encoding_type; -let expected_bucket_owner = self.expected_bucket_owner; -let fetch_owner = self.fetch_owner; -let max_keys = self.max_keys; -let optional_object_attributes = self.optional_object_attributes; -let prefix = self.prefix; -let request_payer = self.request_payer; -let start_after = self.start_after; -Ok(ListObjectsV2Input { -bucket, -continuation_token, -delimiter, -encoding_type, -expected_bucket_owner, -fetch_owner, -max_keys, -optional_object_attributes, -prefix, -request_payer, -start_after, -}) -} + #[must_use] + pub fn key_marker(mut self, field: Option) -> Self { + self.key_marker = field; + self + } -} + #[must_use] + pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; + self + } + #[must_use] + pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; + self + } -/// A builder for [`ListPartsInput`] -#[derive(Default)] -pub struct ListPartsInputBuilder { -bucket: Option, + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -key: Option, + #[must_use] + pub fn version_id_marker(mut self, field: Option) -> Self { + self.version_id_marker = field; + self + } -max_parts: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let delimiter = self.delimiter; + let encoding_type = self.encoding_type; + let expected_bucket_owner = self.expected_bucket_owner; + let key_marker = self.key_marker; + let max_keys = self.max_keys; + let optional_object_attributes = self.optional_object_attributes; + let prefix = self.prefix; + let request_payer = self.request_payer; + let version_id_marker = self.version_id_marker; + Ok(ListObjectVersionsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + key_marker, + max_keys, + optional_object_attributes, + prefix, + request_payer, + version_id_marker, + }) + } + } -part_number_marker: Option, + /// A builder for [`ListObjectsInput`] + #[derive(Default)] + pub struct ListObjectsInputBuilder { + bucket: Option, -request_payer: Option, + delimiter: Option, -sse_customer_algorithm: Option, + encoding_type: Option, -sse_customer_key: Option, + expected_bucket_owner: Option, -sse_customer_key_md5: Option, + marker: Option, -upload_id: Option, + max_keys: Option, -} + optional_object_attributes: Option, -impl ListPartsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + prefix: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + request_payer: Option, + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + impl ListObjectsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_max_parts(&mut self, field: Option) -> &mut Self { - self.max_parts = field; -self -} + pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; + self + } -pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { - self.part_number_marker = field; -self -} + pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + pub fn set_marker(&mut self, field: Option) -> &mut Self { + self.marker = field; + self + } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; + self + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; + self + } -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + #[must_use] + pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; + self + } -#[must_use] -pub fn max_parts(mut self, field: Option) -> Self { - self.max_parts = field; -self -} + #[must_use] + pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; + self + } -#[must_use] -pub fn part_number_marker(mut self, field: Option) -> Self { - self.part_number_marker = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn marker(mut self, field: Option) -> Self { + self.marker = field; + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + #[must_use] + pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; + self + } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + #[must_use] + pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; + self + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let max_parts = self.max_parts; -let part_number_marker = self.part_number_marker; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(ListPartsInput { -bucket, -expected_bucket_owner, -key, -max_parts, -part_number_marker, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let delimiter = self.delimiter; + let encoding_type = self.encoding_type; + let expected_bucket_owner = self.expected_bucket_owner; + let marker = self.marker; + let max_keys = self.max_keys; + let optional_object_attributes = self.optional_object_attributes; + let prefix = self.prefix; + let request_payer = self.request_payer; + Ok(ListObjectsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + marker, + max_keys, + optional_object_attributes, + prefix, + request_payer, + }) + } + } -} + /// A builder for [`ListObjectsV2Input`] + #[derive(Default)] + pub struct ListObjectsV2InputBuilder { + bucket: Option, + continuation_token: Option, -/// A builder for [`PostObjectInput`] -#[derive(Default)] -pub struct PostObjectInputBuilder { -acl: Option, + delimiter: Option, -body: Option, + encoding_type: Option, -bucket: Option, + expected_bucket_owner: Option, -bucket_key_enabled: Option, + fetch_owner: Option, -cache_control: Option, + max_keys: Option, -checksum_algorithm: Option, + optional_object_attributes: Option, -checksum_crc32: Option, + prefix: Option, -checksum_crc32c: Option, + request_payer: Option, -checksum_crc64nvme: Option, + start_after: Option, + } -checksum_sha1: Option, + impl ListObjectsV2InputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -checksum_sha256: Option, + pub fn set_continuation_token(&mut self, field: Option) -> &mut Self { + self.continuation_token = field; + self + } -content_disposition: Option, + pub fn set_delimiter(&mut self, field: Option) -> &mut Self { + self.delimiter = field; + self + } -content_encoding: Option, + pub fn set_encoding_type(&mut self, field: Option) -> &mut Self { + self.encoding_type = field; + self + } -content_language: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -content_length: Option, + pub fn set_fetch_owner(&mut self, field: Option) -> &mut Self { + self.fetch_owner = field; + self + } -content_md5: Option, + pub fn set_max_keys(&mut self, field: Option) -> &mut Self { + self.max_keys = field; + self + } -content_type: Option, + pub fn set_optional_object_attributes(&mut self, field: Option) -> &mut Self { + self.optional_object_attributes = field; + self + } -expected_bucket_owner: Option, + pub fn set_prefix(&mut self, field: Option) -> &mut Self { + self.prefix = field; + self + } -expires: Option, + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -grant_full_control: Option, + pub fn set_start_after(&mut self, field: Option) -> &mut Self { + self.start_after = field; + self + } -grant_read: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -grant_read_acp: Option, + #[must_use] + pub fn continuation_token(mut self, field: Option) -> Self { + self.continuation_token = field; + self + } -grant_write_acp: Option, + #[must_use] + pub fn delimiter(mut self, field: Option) -> Self { + self.delimiter = field; + self + } -if_match: Option, + #[must_use] + pub fn encoding_type(mut self, field: Option) -> Self { + self.encoding_type = field; + self + } -if_none_match: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -key: Option, + #[must_use] + pub fn fetch_owner(mut self, field: Option) -> Self { + self.fetch_owner = field; + self + } -metadata: Option, + #[must_use] + pub fn max_keys(mut self, field: Option) -> Self { + self.max_keys = field; + self + } -object_lock_legal_hold_status: Option, + #[must_use] + pub fn optional_object_attributes(mut self, field: Option) -> Self { + self.optional_object_attributes = field; + self + } -object_lock_mode: Option, + #[must_use] + pub fn prefix(mut self, field: Option) -> Self { + self.prefix = field; + self + } -object_lock_retain_until_date: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -request_payer: Option, + #[must_use] + pub fn start_after(mut self, field: Option) -> Self { + self.start_after = field; + self + } -sse_customer_algorithm: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let continuation_token = self.continuation_token; + let delimiter = self.delimiter; + let encoding_type = self.encoding_type; + let expected_bucket_owner = self.expected_bucket_owner; + let fetch_owner = self.fetch_owner; + let max_keys = self.max_keys; + let optional_object_attributes = self.optional_object_attributes; + let prefix = self.prefix; + let request_payer = self.request_payer; + let start_after = self.start_after; + Ok(ListObjectsV2Input { + bucket, + continuation_token, + delimiter, + encoding_type, + expected_bucket_owner, + fetch_owner, + max_keys, + optional_object_attributes, + prefix, + request_payer, + start_after, + }) + } + } -sse_customer_key: Option, + /// A builder for [`ListPartsInput`] + #[derive(Default)] + pub struct ListPartsInputBuilder { + bucket: Option, -sse_customer_key_md5: Option, + expected_bucket_owner: Option, -ssekms_encryption_context: Option, + key: Option, -ssekms_key_id: Option, + max_parts: Option, -server_side_encryption: Option, + part_number_marker: Option, -storage_class: Option, + request_payer: Option, -tagging: Option, + sse_customer_algorithm: Option, -version_id: Option, + sse_customer_key: Option, -website_redirect_location: Option, + sse_customer_key_md5: Option, -write_offset_bytes: Option, + upload_id: Option, + } -success_action_redirect: Option, + impl ListPartsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -success_action_status: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -policy: Option, + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -} + pub fn set_max_parts(&mut self, field: Option) -> &mut Self { + self.max_parts = field; + self + } -impl PostObjectInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} + pub fn set_part_number_marker(&mut self, field: Option) -> &mut Self { + self.part_number_marker = field; + self + } -pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} + #[must_use] + pub fn max_parts(mut self, field: Option) -> Self { + self.max_parts = field; + self + } -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} + #[must_use] + pub fn part_number_marker(mut self, field: Option) -> Self { + self.part_number_marker = field; + self + } -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let max_parts = self.max_parts; + let part_number_marker = self.part_number_marker; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(ListPartsInput { + bucket, + expected_bucket_owner, + key, + max_parts, + part_number_marker, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`PostObjectInput`] + #[derive(Default)] + pub struct PostObjectInputBuilder { + acl: Option, -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} + body: Option, -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} + bucket: Option, -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} + bucket_key_enabled: Option, -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} + cache_control: Option, -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} + checksum_algorithm: Option, -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} + checksum_crc32: Option, -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} + checksum_crc32c: Option, -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + checksum_crc64nvme: Option, -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self -} + checksum_sha1: Option, -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self -} + checksum_sha256: Option, -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self -} + content_disposition: Option, -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} + content_encoding: Option, -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + content_language: Option, -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + content_length: Option, -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + content_md5: Option, -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + content_type: Option, -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} + expected_bucket_owner: Option, -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} + expires: Option, -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} + grant_full_control: Option, -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self -} + grant_read: Option, -pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; -self -} + grant_read_acp: Option, -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + grant_write_acp: Option, -pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; -self -} + if_match: Option, -pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { - self.write_offset_bytes = field; -self -} + if_none_match: Option, -pub fn set_success_action_redirect(&mut self, field: Option) -> &mut Self { - self.success_action_redirect = field; -self -} + key: Option, -pub fn set_success_action_status(&mut self, field: Option) -> &mut Self { - self.success_action_status = field; -self -} + metadata: Option, -pub fn set_policy(&mut self, field: Option) -> &mut Self { - self.policy = field; -self -} + object_lock_legal_hold_status: Option, -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} + object_lock_mode: Option, -#[must_use] -pub fn body(mut self, field: Option) -> Self { - self.body = field; -self -} + object_lock_retain_until_date: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + request_payer: Option, -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} + sse_customer_algorithm: Option, -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} + sse_customer_key: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + sse_customer_key_md5: Option, -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self -} + ssekms_encryption_context: Option, -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self -} + ssekms_key_id: Option, -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self -} + server_side_encryption: Option, -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self -} + storage_class: Option, -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} + tagging: Option, -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self -} + version_id: Option, -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} + website_redirect_location: Option, -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self -} + write_offset_bytes: Option, -#[must_use] -pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; -self -} + success_action_redirect: Option, -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + success_action_status: Option, -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self -} + policy: Option, + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + impl PostObjectInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self -} + pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; + self + } -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self -} + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; + self + } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -#[must_use] -pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; -self -} - -#[must_use] -pub fn write_offset_bytes(mut self, field: Option) -> Self { - self.write_offset_bytes = field; -self -} - -#[must_use] -pub fn success_action_redirect(mut self, field: Option) -> Self { - self.success_action_redirect = field; -self -} - -#[must_use] -pub fn success_action_status(mut self, field: Option) -> Self { - self.success_action_status = field; -self -} - -#[must_use] -pub fn policy(mut self, field: Option) -> Self { - self.policy = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let body = self.body; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_algorithm = self.checksum_algorithm; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_length = self.content_length; -let content_md5 = self.content_md5; -let content_type = self.content_type; -let expected_bucket_owner = self.expected_bucket_owner; -let expires = self.expires; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write_acp = self.grant_write_acp; -let if_match = self.if_match; -let if_none_match = self.if_none_match; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let metadata = self.metadata; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let storage_class = self.storage_class; -let tagging = self.tagging; -let version_id = self.version_id; -let website_redirect_location = self.website_redirect_location; -let write_offset_bytes = self.write_offset_bytes; -let success_action_redirect = self.success_action_redirect; -let success_action_status = self.success_action_status; -let policy = self.policy; -Ok(PostObjectInput { -acl, -body, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_md5, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -if_match, -if_none_match, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -version_id, -website_redirect_location, -write_offset_bytes, -success_action_redirect, -success_action_status, -policy, -}) -} - -} - - -/// A builder for [`PutBucketAccelerateConfigurationInput`] -#[derive(Default)] -pub struct PutBucketAccelerateConfigurationInputBuilder { -accelerate_configuration: Option, + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } -bucket: Option, + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } -checksum_algorithm: Option, + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } -expected_bucket_owner: Option, + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } -} + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } -impl PutBucketAccelerateConfigurationInputBuilder { -pub fn set_accelerate_configuration(&mut self, field: AccelerateConfiguration) -> &mut Self { - self.accelerate_configuration = Some(field); -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } -#[must_use] -pub fn accelerate_configuration(mut self, field: AccelerateConfiguration) -> Self { - self.accelerate_configuration = Some(field); -self -} + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -pub fn build(self) -> Result { -let accelerate_configuration = self.accelerate_configuration.ok_or_else(|| BuildError::missing_field("accelerate_configuration"))?; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(PutBucketAccelerateConfigurationInput { -accelerate_configuration, -bucket, -checksum_algorithm, -expected_bucket_owner, -}) -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -} + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } -/// A builder for [`PutBucketAclInput`] -#[derive(Default)] -pub struct PutBucketAclInputBuilder { -acl: Option, + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } -access_control_policy: Option, + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } -bucket: Option, + pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; + self + } -checksum_algorithm: Option, + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -content_md5: Option, + pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; + self + } -expected_bucket_owner: Option, + pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { + self.write_offset_bytes = field; + self + } -grant_full_control: Option, + pub fn set_success_action_redirect(&mut self, field: Option) -> &mut Self { + self.success_action_redirect = field; + self + } -grant_read: Option, + pub fn set_success_action_status(&mut self, field: Option) -> &mut Self { + self.success_action_status = field; + self + } -grant_read_acp: Option, + pub fn set_policy(&mut self, field: Option) -> &mut Self { + self.policy = field; + self + } -grant_write: Option, + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } -grant_write_acp: Option, + #[must_use] + pub fn body(mut self, field: Option) -> Self { + self.body = field; + self + } -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -impl PutBucketAclInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } -pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { - self.access_control_policy = field; -self -} + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } -pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; -self -} + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} + #[must_use] + pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; + self + } -#[must_use] -pub fn access_control_policy(mut self, field: Option) -> Self { - self.access_control_policy = field; -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } -#[must_use] -pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; -self -} + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } -pub fn build(self) -> Result { -let acl = self.acl; -let access_control_policy = self.access_control_policy; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write = self.grant_write; -let grant_write_acp = self.grant_write_acp; -Ok(PutBucketAclInput { -acl, -access_control_policy, -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -}) -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -} + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } -/// A builder for [`PutBucketAnalyticsConfigurationInput`] -#[derive(Default)] -pub struct PutBucketAnalyticsConfigurationInputBuilder { -analytics_configuration: Option, + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } -bucket: Option, + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -id: Option, + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -impl PutBucketAnalyticsConfigurationInputBuilder { -pub fn set_analytics_configuration(&mut self, field: AnalyticsConfiguration) -> &mut Self { - self.analytics_configuration = Some(field); -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } -pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { - self.id = Some(field); -self -} + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } -#[must_use] -pub fn analytics_configuration(mut self, field: AnalyticsConfiguration) -> Self { - self.analytics_configuration = Some(field); -self -} + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -#[must_use] -pub fn id(mut self, field: AnalyticsId) -> Self { - self.id = Some(field); -self -} + #[must_use] + pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; + self + } -pub fn build(self) -> Result { -let analytics_configuration = self.analytics_configuration.ok_or_else(|| BuildError::missing_field("analytics_configuration"))?; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -Ok(PutBucketAnalyticsConfigurationInput { -analytics_configuration, -bucket, -expected_bucket_owner, -id, -}) -} + #[must_use] + pub fn write_offset_bytes(mut self, field: Option) -> Self { + self.write_offset_bytes = field; + self + } -} + #[must_use] + pub fn success_action_redirect(mut self, field: Option) -> Self { + self.success_action_redirect = field; + self + } + #[must_use] + pub fn success_action_status(mut self, field: Option) -> Self { + self.success_action_status = field; + self + } -/// A builder for [`PutBucketCorsInput`] -#[derive(Default)] -pub struct PutBucketCorsInputBuilder { -bucket: Option, + #[must_use] + pub fn policy(mut self, field: Option) -> Self { + self.policy = field; + self + } -cors_configuration: Option, + pub fn build(self) -> Result { + let acl = self.acl; + let body = self.body; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_algorithm = self.checksum_algorithm; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_length = self.content_length; + let content_md5 = self.content_md5; + let content_type = self.content_type; + let expected_bucket_owner = self.expected_bucket_owner; + let expires = self.expires; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write_acp = self.grant_write_acp; + let if_match = self.if_match; + let if_none_match = self.if_none_match; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let metadata = self.metadata; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let storage_class = self.storage_class; + let tagging = self.tagging; + let version_id = self.version_id; + let website_redirect_location = self.website_redirect_location; + let write_offset_bytes = self.write_offset_bytes; + let success_action_redirect = self.success_action_redirect; + let success_action_status = self.success_action_status; + let policy = self.policy; + Ok(PostObjectInput { + acl, + body, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_md5, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + if_match, + if_none_match, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + version_id, + website_redirect_location, + write_offset_bytes, + success_action_redirect, + success_action_status, + policy, + }) + } + } -checksum_algorithm: Option, + /// A builder for [`PutBucketAccelerateConfigurationInput`] + #[derive(Default)] + pub struct PutBucketAccelerateConfigurationInputBuilder { + accelerate_configuration: Option, -content_md5: Option, + bucket: Option, -expected_bucket_owner: Option, + checksum_algorithm: Option, -} + expected_bucket_owner: Option, + } -impl PutBucketCorsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + impl PutBucketAccelerateConfigurationInputBuilder { + pub fn set_accelerate_configuration(&mut self, field: AccelerateConfiguration) -> &mut Self { + self.accelerate_configuration = Some(field); + self + } -pub fn set_cors_configuration(&mut self, field: CORSConfiguration) -> &mut Self { - self.cors_configuration = Some(field); -self -} + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn accelerate_configuration(mut self, field: AccelerateConfiguration) -> Self { + self.accelerate_configuration = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn cors_configuration(mut self, field: CORSConfiguration) -> Self { - self.cors_configuration = Some(field); -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + pub fn build(self) -> Result { + let accelerate_configuration = self + .accelerate_configuration + .ok_or_else(|| BuildError::missing_field("accelerate_configuration"))?; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(PutBucketAccelerateConfigurationInput { + accelerate_configuration, + bucket, + checksum_algorithm, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + /// A builder for [`PutBucketAclInput`] + #[derive(Default)] + pub struct PutBucketAclInputBuilder { + acl: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let cors_configuration = self.cors_configuration.ok_or_else(|| BuildError::missing_field("cors_configuration"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(PutBucketCorsInput { -bucket, -cors_configuration, -checksum_algorithm, -content_md5, -expected_bucket_owner, -}) -} + access_control_policy: Option, -} + bucket: Option, + checksum_algorithm: Option, -/// A builder for [`PutBucketEncryptionInput`] -#[derive(Default)] -pub struct PutBucketEncryptionInputBuilder { -bucket: Option, + content_md5: Option, -checksum_algorithm: Option, + expected_bucket_owner: Option, -content_md5: Option, + grant_full_control: Option, -expected_bucket_owner: Option, + grant_read: Option, -server_side_encryption_configuration: Option, + grant_read_acp: Option, -} + grant_write: Option, -impl PutBucketEncryptionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + grant_write_acp: Option, + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + impl PutBucketAclInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { + self.access_control_policy = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_server_side_encryption_configuration(&mut self, field: ServerSideEncryptionConfiguration) -> &mut Self { - self.server_side_encryption_configuration = Some(field); -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } -#[must_use] -pub fn server_side_encryption_configuration(mut self, field: ServerSideEncryptionConfiguration) -> Self { - self.server_side_encryption_configuration = Some(field); -self -} + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let server_side_encryption_configuration = self.server_side_encryption_configuration.ok_or_else(|| BuildError::missing_field("server_side_encryption_configuration"))?; -Ok(PutBucketEncryptionInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -server_side_encryption_configuration, -}) -} + pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; + self + } -} + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } -/// A builder for [`PutBucketIntelligentTieringConfigurationInput`] -#[derive(Default)] -pub struct PutBucketIntelligentTieringConfigurationInputBuilder { -bucket: Option, + #[must_use] + pub fn access_control_policy(mut self, field: Option) -> Self { + self.access_control_policy = field; + self + } -id: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -intelligent_tiering_configuration: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -impl PutBucketIntelligentTieringConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { - self.id = Some(field); -self -} + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } -pub fn set_intelligent_tiering_configuration(&mut self, field: IntelligentTieringConfiguration) -> &mut Self { - self.intelligent_tiering_configuration = Some(field); -self -} + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } -#[must_use] -pub fn id(mut self, field: IntelligentTieringId) -> Self { - self.id = Some(field); -self -} + #[must_use] + pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; + self + } -#[must_use] -pub fn intelligent_tiering_configuration(mut self, field: IntelligentTieringConfiguration) -> Self { - self.intelligent_tiering_configuration = Some(field); -self -} + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -let intelligent_tiering_configuration = self.intelligent_tiering_configuration.ok_or_else(|| BuildError::missing_field("intelligent_tiering_configuration"))?; -Ok(PutBucketIntelligentTieringConfigurationInput { -bucket, -id, -intelligent_tiering_configuration, -}) -} + pub fn build(self) -> Result { + let acl = self.acl; + let access_control_policy = self.access_control_policy; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write = self.grant_write; + let grant_write_acp = self.grant_write_acp; + Ok(PutBucketAclInput { + acl, + access_control_policy, + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + }) + } + } -} + /// A builder for [`PutBucketAnalyticsConfigurationInput`] + #[derive(Default)] + pub struct PutBucketAnalyticsConfigurationInputBuilder { + analytics_configuration: Option, + bucket: Option, -/// A builder for [`PutBucketInventoryConfigurationInput`] -#[derive(Default)] -pub struct PutBucketInventoryConfigurationInputBuilder { -bucket: Option, + expected_bucket_owner: Option, -expected_bucket_owner: Option, + id: Option, + } -id: Option, + impl PutBucketAnalyticsConfigurationInputBuilder { + pub fn set_analytics_configuration(&mut self, field: AnalyticsConfiguration) -> &mut Self { + self.analytics_configuration = Some(field); + self + } -inventory_configuration: Option, + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -impl PutBucketInventoryConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_id(&mut self, field: AnalyticsId) -> &mut Self { + self.id = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn analytics_configuration(mut self, field: AnalyticsConfiguration) -> Self { + self.analytics_configuration = Some(field); + self + } -pub fn set_id(&mut self, field: InventoryId) -> &mut Self { - self.id = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_inventory_configuration(&mut self, field: InventoryConfiguration) -> &mut Self { - self.inventory_configuration = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn id(mut self, field: AnalyticsId) -> Self { + self.id = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let analytics_configuration = self + .analytics_configuration + .ok_or_else(|| BuildError::missing_field("analytics_configuration"))?; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + Ok(PutBucketAnalyticsConfigurationInput { + analytics_configuration, + bucket, + expected_bucket_owner, + id, + }) + } + } -#[must_use] -pub fn id(mut self, field: InventoryId) -> Self { - self.id = Some(field); -self -} + /// A builder for [`PutBucketCorsInput`] + #[derive(Default)] + pub struct PutBucketCorsInputBuilder { + bucket: Option, -#[must_use] -pub fn inventory_configuration(mut self, field: InventoryConfiguration) -> Self { - self.inventory_configuration = Some(field); -self -} + cors_configuration: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -let inventory_configuration = self.inventory_configuration.ok_or_else(|| BuildError::missing_field("inventory_configuration"))?; -Ok(PutBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -inventory_configuration, -}) -} + checksum_algorithm: Option, -} + content_md5: Option, + expected_bucket_owner: Option, + } -/// A builder for [`PutBucketLifecycleConfigurationInput`] -#[derive(Default)] -pub struct PutBucketLifecycleConfigurationInputBuilder { -bucket: Option, + impl PutBucketCorsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -checksum_algorithm: Option, + pub fn set_cors_configuration(&mut self, field: CORSConfiguration) -> &mut Self { + self.cors_configuration = Some(field); + self + } -expected_bucket_owner: Option, + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -lifecycle_configuration: Option, + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -transition_default_minimum_object_size: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -impl PutBucketLifecycleConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn cors_configuration(mut self, field: CORSConfiguration) -> Self { + self.cors_configuration = Some(field); + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -pub fn set_lifecycle_configuration(&mut self, field: Option) -> &mut Self { - self.lifecycle_configuration = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_transition_default_minimum_object_size(&mut self, field: Option) -> &mut Self { - self.transition_default_minimum_object_size = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let cors_configuration = self + .cors_configuration + .ok_or_else(|| BuildError::missing_field("cors_configuration"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(PutBucketCorsInput { + bucket, + cors_configuration, + checksum_algorithm, + content_md5, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + /// A builder for [`PutBucketEncryptionInput`] + #[derive(Default)] + pub struct PutBucketEncryptionInputBuilder { + bucket: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + checksum_algorithm: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + content_md5: Option, -#[must_use] -pub fn lifecycle_configuration(mut self, field: Option) -> Self { - self.lifecycle_configuration = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn transition_default_minimum_object_size(mut self, field: Option) -> Self { - self.transition_default_minimum_object_size = field; -self -} + server_side_encryption_configuration: Option, + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let expected_bucket_owner = self.expected_bucket_owner; -let lifecycle_configuration = self.lifecycle_configuration; -let transition_default_minimum_object_size = self.transition_default_minimum_object_size; -Ok(PutBucketLifecycleConfigurationInput { -bucket, -checksum_algorithm, -expected_bucket_owner, -lifecycle_configuration, -transition_default_minimum_object_size, -}) -} + impl PutBucketEncryptionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -/// A builder for [`PutBucketLoggingInput`] -#[derive(Default)] -pub struct PutBucketLoggingInputBuilder { -bucket: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -bucket_logging_status: Option, + pub fn set_server_side_encryption_configuration(&mut self, field: ServerSideEncryptionConfiguration) -> &mut Self { + self.server_side_encryption_configuration = Some(field); + self + } -checksum_algorithm: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -content_md5: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -impl PutBucketLoggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn server_side_encryption_configuration(mut self, field: ServerSideEncryptionConfiguration) -> Self { + self.server_side_encryption_configuration = Some(field); + self + } -pub fn set_bucket_logging_status(&mut self, field: BucketLoggingStatus) -> &mut Self { - self.bucket_logging_status = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let server_side_encryption_configuration = self + .server_side_encryption_configuration + .ok_or_else(|| BuildError::missing_field("server_side_encryption_configuration"))?; + Ok(PutBucketEncryptionInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + server_side_encryption_configuration, + }) + } + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + /// A builder for [`PutBucketIntelligentTieringConfigurationInput`] + #[derive(Default)] + pub struct PutBucketIntelligentTieringConfigurationInputBuilder { + bucket: Option, -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + id: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + intelligent_tiering_configuration: Option, + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + impl PutBucketIntelligentTieringConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket_logging_status(mut self, field: BucketLoggingStatus) -> Self { - self.bucket_logging_status = Some(field); -self -} + pub fn set_id(&mut self, field: IntelligentTieringId) -> &mut Self { + self.id = Some(field); + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + pub fn set_intelligent_tiering_configuration(&mut self, field: IntelligentTieringConfiguration) -> &mut Self { + self.intelligent_tiering_configuration = Some(field); + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn id(mut self, field: IntelligentTieringId) -> Self { + self.id = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_logging_status = self.bucket_logging_status.ok_or_else(|| BuildError::missing_field("bucket_logging_status"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -Ok(PutBucketLoggingInput { -bucket, -bucket_logging_status, -checksum_algorithm, -content_md5, -expected_bucket_owner, -}) -} + #[must_use] + pub fn intelligent_tiering_configuration(mut self, field: IntelligentTieringConfiguration) -> Self { + self.intelligent_tiering_configuration = Some(field); + self + } -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + let intelligent_tiering_configuration = self + .intelligent_tiering_configuration + .ok_or_else(|| BuildError::missing_field("intelligent_tiering_configuration"))?; + Ok(PutBucketIntelligentTieringConfigurationInput { + bucket, + id, + intelligent_tiering_configuration, + }) + } + } + /// A builder for [`PutBucketInventoryConfigurationInput`] + #[derive(Default)] + pub struct PutBucketInventoryConfigurationInputBuilder { + bucket: Option, -/// A builder for [`PutBucketMetricsConfigurationInput`] -#[derive(Default)] -pub struct PutBucketMetricsConfigurationInputBuilder { -bucket: Option, + expected_bucket_owner: Option, -expected_bucket_owner: Option, + id: Option, -id: Option, + inventory_configuration: Option, + } -metrics_configuration: Option, + impl PutBucketInventoryConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -impl PutBucketMetricsConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_id(&mut self, field: InventoryId) -> &mut Self { + self.id = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_inventory_configuration(&mut self, field: InventoryConfiguration) -> &mut Self { + self.inventory_configuration = Some(field); + self + } -pub fn set_id(&mut self, field: MetricsId) -> &mut Self { - self.id = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_metrics_configuration(&mut self, field: MetricsConfiguration) -> &mut Self { - self.metrics_configuration = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn id(mut self, field: InventoryId) -> Self { + self.id = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn inventory_configuration(mut self, field: InventoryConfiguration) -> Self { + self.inventory_configuration = Some(field); + self + } -#[must_use] -pub fn id(mut self, field: MetricsId) -> Self { - self.id = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + let inventory_configuration = self + .inventory_configuration + .ok_or_else(|| BuildError::missing_field("inventory_configuration"))?; + Ok(PutBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + inventory_configuration, + }) + } + } -#[must_use] -pub fn metrics_configuration(mut self, field: MetricsConfiguration) -> Self { - self.metrics_configuration = Some(field); -self -} + /// A builder for [`PutBucketLifecycleConfigurationInput`] + #[derive(Default)] + pub struct PutBucketLifecycleConfigurationInputBuilder { + bucket: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; -let metrics_configuration = self.metrics_configuration.ok_or_else(|| BuildError::missing_field("metrics_configuration"))?; -Ok(PutBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -metrics_configuration, -}) -} + checksum_algorithm: Option, -} + expected_bucket_owner: Option, + lifecycle_configuration: Option, -/// A builder for [`PutBucketNotificationConfigurationInput`] -#[derive(Default)] -pub struct PutBucketNotificationConfigurationInputBuilder { -bucket: Option, + transition_default_minimum_object_size: Option, + } -expected_bucket_owner: Option, + impl PutBucketLifecycleConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -notification_configuration: Option, + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -skip_destination_validation: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -} + pub fn set_lifecycle_configuration(&mut self, field: Option) -> &mut Self { + self.lifecycle_configuration = field; + self + } -impl PutBucketNotificationConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_transition_default_minimum_object_size( + &mut self, + field: Option, + ) -> &mut Self { + self.transition_default_minimum_object_size = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_notification_configuration(&mut self, field: NotificationConfiguration) -> &mut Self { - self.notification_configuration = Some(field); -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -pub fn set_skip_destination_validation(&mut self, field: Option) -> &mut Self { - self.skip_destination_validation = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn lifecycle_configuration(mut self, field: Option) -> Self { + self.lifecycle_configuration = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn transition_default_minimum_object_size(mut self, field: Option) -> Self { + self.transition_default_minimum_object_size = field; + self + } -#[must_use] -pub fn notification_configuration(mut self, field: NotificationConfiguration) -> Self { - self.notification_configuration = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let expected_bucket_owner = self.expected_bucket_owner; + let lifecycle_configuration = self.lifecycle_configuration; + let transition_default_minimum_object_size = self.transition_default_minimum_object_size; + Ok(PutBucketLifecycleConfigurationInput { + bucket, + checksum_algorithm, + expected_bucket_owner, + lifecycle_configuration, + transition_default_minimum_object_size, + }) + } + } -#[must_use] -pub fn skip_destination_validation(mut self, field: Option) -> Self { - self.skip_destination_validation = field; -self -} + /// A builder for [`PutBucketLoggingInput`] + #[derive(Default)] + pub struct PutBucketLoggingInputBuilder { + bucket: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let notification_configuration = self.notification_configuration.ok_or_else(|| BuildError::missing_field("notification_configuration"))?; -let skip_destination_validation = self.skip_destination_validation; -Ok(PutBucketNotificationConfigurationInput { -bucket, -expected_bucket_owner, -notification_configuration, -skip_destination_validation, -}) -} + bucket_logging_status: Option, -} + checksum_algorithm: Option, + content_md5: Option, -/// A builder for [`PutBucketOwnershipControlsInput`] -#[derive(Default)] -pub struct PutBucketOwnershipControlsInputBuilder { -bucket: Option, + expected_bucket_owner: Option, + } -content_md5: Option, + impl PutBucketLoggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + pub fn set_bucket_logging_status(&mut self, field: BucketLoggingStatus) -> &mut Self { + self.bucket_logging_status = Some(field); + self + } -ownership_controls: Option, + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -impl PutBucketOwnershipControlsInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket_logging_status(mut self, field: BucketLoggingStatus) -> Self { + self.bucket_logging_status = Some(field); + self + } -pub fn set_ownership_controls(&mut self, field: OwnershipControls) -> &mut Self { - self.ownership_controls = Some(field); -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_logging_status = self + .bucket_logging_status + .ok_or_else(|| BuildError::missing_field("bucket_logging_status"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + Ok(PutBucketLoggingInput { + bucket, + bucket_logging_status, + checksum_algorithm, + content_md5, + expected_bucket_owner, + }) + } + } -#[must_use] -pub fn ownership_controls(mut self, field: OwnershipControls) -> Self { - self.ownership_controls = Some(field); -self -} + /// A builder for [`PutBucketMetricsConfigurationInput`] + #[derive(Default)] + pub struct PutBucketMetricsConfigurationInputBuilder { + bucket: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let ownership_controls = self.ownership_controls.ok_or_else(|| BuildError::missing_field("ownership_controls"))?; -Ok(PutBucketOwnershipControlsInput { -bucket, -content_md5, -expected_bucket_owner, -ownership_controls, -}) -} + expected_bucket_owner: Option, -} + id: Option, + metrics_configuration: Option, + } -/// A builder for [`PutBucketPolicyInput`] -#[derive(Default)] -pub struct PutBucketPolicyInputBuilder { -bucket: Option, + impl PutBucketMetricsConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -checksum_algorithm: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -confirm_remove_self_bucket_access: Option, + pub fn set_id(&mut self, field: MetricsId) -> &mut Self { + self.id = Some(field); + self + } -content_md5: Option, + pub fn set_metrics_configuration(&mut self, field: MetricsConfiguration) -> &mut Self { + self.metrics_configuration = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -policy: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn id(mut self, field: MetricsId) -> Self { + self.id = Some(field); + self + } -impl PutBucketPolicyInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn metrics_configuration(mut self, field: MetricsConfiguration) -> Self { + self.metrics_configuration = Some(field); + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let id = self.id.ok_or_else(|| BuildError::missing_field("id"))?; + let metrics_configuration = self + .metrics_configuration + .ok_or_else(|| BuildError::missing_field("metrics_configuration"))?; + Ok(PutBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + metrics_configuration, + }) + } + } -pub fn set_confirm_remove_self_bucket_access(&mut self, field: Option) -> &mut Self { - self.confirm_remove_self_bucket_access = field; -self -} + /// A builder for [`PutBucketNotificationConfigurationInput`] + #[derive(Default)] + pub struct PutBucketNotificationConfigurationInputBuilder { + bucket: Option, -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + expected_bucket_owner: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + notification_configuration: Option, -pub fn set_policy(&mut self, field: Policy) -> &mut Self { - self.policy = Some(field); -self -} + skip_destination_validation: Option, + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + impl PutBucketNotificationConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn confirm_remove_self_bucket_access(mut self, field: Option) -> Self { - self.confirm_remove_self_bucket_access = field; -self -} + pub fn set_notification_configuration(&mut self, field: NotificationConfiguration) -> &mut Self { + self.notification_configuration = Some(field); + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + pub fn set_skip_destination_validation(&mut self, field: Option) -> &mut Self { + self.skip_destination_validation = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn policy(mut self, field: Policy) -> Self { - self.policy = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let confirm_remove_self_bucket_access = self.confirm_remove_self_bucket_access; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let policy = self.policy.ok_or_else(|| BuildError::missing_field("policy"))?; -Ok(PutBucketPolicyInput { -bucket, -checksum_algorithm, -confirm_remove_self_bucket_access, -content_md5, -expected_bucket_owner, -policy, -}) -} + #[must_use] + pub fn notification_configuration(mut self, field: NotificationConfiguration) -> Self { + self.notification_configuration = Some(field); + self + } -} + #[must_use] + pub fn skip_destination_validation(mut self, field: Option) -> Self { + self.skip_destination_validation = field; + self + } + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let notification_configuration = self + .notification_configuration + .ok_or_else(|| BuildError::missing_field("notification_configuration"))?; + let skip_destination_validation = self.skip_destination_validation; + Ok(PutBucketNotificationConfigurationInput { + bucket, + expected_bucket_owner, + notification_configuration, + skip_destination_validation, + }) + } + } -/// A builder for [`PutBucketReplicationInput`] -#[derive(Default)] -pub struct PutBucketReplicationInputBuilder { -bucket: Option, + /// A builder for [`PutBucketOwnershipControlsInput`] + #[derive(Default)] + pub struct PutBucketOwnershipControlsInputBuilder { + bucket: Option, -checksum_algorithm: Option, + content_md5: Option, -content_md5: Option, + expected_bucket_owner: Option, -expected_bucket_owner: Option, + ownership_controls: Option, + } -replication_configuration: Option, + impl PutBucketOwnershipControlsInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -token: Option, + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -impl PutBucketReplicationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_ownership_controls(&mut self, field: OwnershipControls) -> &mut Self { + self.ownership_controls = Some(field); + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_replication_configuration(&mut self, field: ReplicationConfiguration) -> &mut Self { - self.replication_configuration = Some(field); -self -} + #[must_use] + pub fn ownership_controls(mut self, field: OwnershipControls) -> Self { + self.ownership_controls = Some(field); + self + } -pub fn set_token(&mut self, field: Option) -> &mut Self { - self.token = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let ownership_controls = self + .ownership_controls + .ok_or_else(|| BuildError::missing_field("ownership_controls"))?; + Ok(PutBucketOwnershipControlsInput { + bucket, + content_md5, + expected_bucket_owner, + ownership_controls, + }) + } + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + /// A builder for [`PutBucketPolicyInput`] + #[derive(Default)] + pub struct PutBucketPolicyInputBuilder { + bucket: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + checksum_algorithm: Option, -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + confirm_remove_self_bucket_access: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + content_md5: Option, -#[must_use] -pub fn replication_configuration(mut self, field: ReplicationConfiguration) -> Self { - self.replication_configuration = Some(field); -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn token(mut self, field: Option) -> Self { - self.token = field; -self -} + policy: Option, + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let replication_configuration = self.replication_configuration.ok_or_else(|| BuildError::missing_field("replication_configuration"))?; -let token = self.token; -Ok(PutBucketReplicationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -replication_configuration, -token, -}) -} + impl PutBucketPolicyInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + pub fn set_confirm_remove_self_bucket_access(&mut self, field: Option) -> &mut Self { + self.confirm_remove_self_bucket_access = field; + self + } -/// A builder for [`PutBucketRequestPaymentInput`] -#[derive(Default)] -pub struct PutBucketRequestPaymentInputBuilder { -bucket: Option, + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -checksum_algorithm: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -content_md5: Option, + pub fn set_policy(&mut self, field: Policy) -> &mut Self { + self.policy = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -request_payment_configuration: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -} + #[must_use] + pub fn confirm_remove_self_bucket_access(mut self, field: Option) -> Self { + self.confirm_remove_self_bucket_access = field; + self + } -impl PutBucketRequestPaymentInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn policy(mut self, field: Policy) -> Self { + self.policy = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let confirm_remove_self_bucket_access = self.confirm_remove_self_bucket_access; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let policy = self.policy.ok_or_else(|| BuildError::missing_field("policy"))?; + Ok(PutBucketPolicyInput { + bucket, + checksum_algorithm, + confirm_remove_self_bucket_access, + content_md5, + expected_bucket_owner, + policy, + }) + } + } -pub fn set_request_payment_configuration(&mut self, field: RequestPaymentConfiguration) -> &mut Self { - self.request_payment_configuration = Some(field); -self -} + /// A builder for [`PutBucketReplicationInput`] + #[derive(Default)] + pub struct PutBucketReplicationInputBuilder { + bucket: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + checksum_algorithm: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + content_md5: Option, -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + replication_configuration: Option, -#[must_use] -pub fn request_payment_configuration(mut self, field: RequestPaymentConfiguration) -> Self { - self.request_payment_configuration = Some(field); -self -} + token: Option, + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let request_payment_configuration = self.request_payment_configuration.ok_or_else(|| BuildError::missing_field("request_payment_configuration"))?; -Ok(PutBucketRequestPaymentInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -request_payment_configuration, -}) -} + impl PutBucketReplicationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -/// A builder for [`PutBucketTaggingInput`] -#[derive(Default)] -pub struct PutBucketTaggingInputBuilder { -bucket: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -checksum_algorithm: Option, + pub fn set_replication_configuration(&mut self, field: ReplicationConfiguration) -> &mut Self { + self.replication_configuration = Some(field); + self + } -content_md5: Option, + pub fn set_token(&mut self, field: Option) -> &mut Self { + self.token = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -tagging: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -impl PutBucketTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn replication_configuration(mut self, field: ReplicationConfiguration) -> Self { + self.replication_configuration = Some(field); + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn token(mut self, field: Option) -> Self { + self.token = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let replication_configuration = self + .replication_configuration + .ok_or_else(|| BuildError::missing_field("replication_configuration"))?; + let token = self.token; + Ok(PutBucketReplicationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + replication_configuration, + token, + }) + } + } -pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { - self.tagging = Some(field); -self -} + /// A builder for [`PutBucketRequestPaymentInput`] + #[derive(Default)] + pub struct PutBucketRequestPaymentInputBuilder { + bucket: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + checksum_algorithm: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + content_md5: Option, -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + request_payment_configuration: Option, + } -#[must_use] -pub fn tagging(mut self, field: Tagging) -> Self { - self.tagging = Some(field); -self -} + impl PutBucketRequestPaymentInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; -Ok(PutBucketTaggingInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -tagging, -}) -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -/// A builder for [`PutBucketVersioningInput`] -#[derive(Default)] -pub struct PutBucketVersioningInputBuilder { -bucket: Option, + pub fn set_request_payment_configuration(&mut self, field: RequestPaymentConfiguration) -> &mut Self { + self.request_payment_configuration = Some(field); + self + } -checksum_algorithm: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -content_md5: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -mfa: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -versioning_configuration: Option, + #[must_use] + pub fn request_payment_configuration(mut self, field: RequestPaymentConfiguration) -> Self { + self.request_payment_configuration = Some(field); + self + } -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let request_payment_configuration = self + .request_payment_configuration + .ok_or_else(|| BuildError::missing_field("request_payment_configuration"))?; + Ok(PutBucketRequestPaymentInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + request_payment_configuration, + }) + } + } -impl PutBucketVersioningInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + /// A builder for [`PutBucketTaggingInput`] + #[derive(Default)] + pub struct PutBucketTaggingInputBuilder { + bucket: Option, -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + checksum_algorithm: Option, -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + content_md5: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + expected_bucket_owner: Option, -pub fn set_mfa(&mut self, field: Option) -> &mut Self { - self.mfa = field; -self -} + tagging: Option, + } -pub fn set_versioning_configuration(&mut self, field: VersioningConfiguration) -> &mut Self { - self.versioning_configuration = Some(field); -self -} + impl PutBucketTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { + self.tagging = Some(field); + self + } -#[must_use] -pub fn mfa(mut self, field: Option) -> Self { - self.mfa = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn versioning_configuration(mut self, field: VersioningConfiguration) -> Self { - self.versioning_configuration = Some(field); -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let mfa = self.mfa; -let versioning_configuration = self.versioning_configuration.ok_or_else(|| BuildError::missing_field("versioning_configuration"))?; -Ok(PutBucketVersioningInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -mfa, -versioning_configuration, -}) -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + #[must_use] + pub fn tagging(mut self, field: Tagging) -> Self { + self.tagging = Some(field); + self + } -/// A builder for [`PutBucketWebsiteInput`] -#[derive(Default)] -pub struct PutBucketWebsiteInputBuilder { -bucket: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; + Ok(PutBucketTaggingInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + tagging, + }) + } + } -checksum_algorithm: Option, + /// A builder for [`PutBucketVersioningInput`] + #[derive(Default)] + pub struct PutBucketVersioningInputBuilder { + bucket: Option, -content_md5: Option, + checksum_algorithm: Option, -expected_bucket_owner: Option, + content_md5: Option, -website_configuration: Option, + expected_bucket_owner: Option, -} + mfa: Option, -impl PutBucketWebsiteInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + versioning_configuration: Option, + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + impl PutBucketVersioningInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -pub fn set_website_configuration(&mut self, field: WebsiteConfiguration) -> &mut Self { - self.website_configuration = Some(field); -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_mfa(&mut self, field: Option) -> &mut Self { + self.mfa = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + pub fn set_versioning_configuration(&mut self, field: VersioningConfiguration) -> &mut Self { + self.versioning_configuration = Some(field); + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn website_configuration(mut self, field: WebsiteConfiguration) -> Self { - self.website_configuration = Some(field); -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let website_configuration = self.website_configuration.ok_or_else(|| BuildError::missing_field("website_configuration"))?; -Ok(PutBucketWebsiteInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -website_configuration, -}) -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn mfa(mut self, field: Option) -> Self { + self.mfa = field; + self + } + #[must_use] + pub fn versioning_configuration(mut self, field: VersioningConfiguration) -> Self { + self.versioning_configuration = Some(field); + self + } -/// A builder for [`PutObjectInput`] -#[derive(Default)] -pub struct PutObjectInputBuilder { -acl: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let mfa = self.mfa; + let versioning_configuration = self + .versioning_configuration + .ok_or_else(|| BuildError::missing_field("versioning_configuration"))?; + Ok(PutBucketVersioningInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + mfa, + versioning_configuration, + }) + } + } -body: Option, + /// A builder for [`PutBucketWebsiteInput`] + #[derive(Default)] + pub struct PutBucketWebsiteInputBuilder { + bucket: Option, -bucket: Option, + checksum_algorithm: Option, -bucket_key_enabled: Option, + content_md5: Option, -cache_control: Option, + expected_bucket_owner: Option, -checksum_algorithm: Option, + website_configuration: Option, + } -checksum_crc32: Option, + impl PutBucketWebsiteInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -checksum_crc32c: Option, + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -checksum_crc64nvme: Option, + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -checksum_sha1: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -checksum_sha256: Option, + pub fn set_website_configuration(&mut self, field: WebsiteConfiguration) -> &mut Self { + self.website_configuration = Some(field); + self + } -content_disposition: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -content_encoding: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -content_language: Option, + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -content_length: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -content_md5: Option, + #[must_use] + pub fn website_configuration(mut self, field: WebsiteConfiguration) -> Self { + self.website_configuration = Some(field); + self + } -content_type: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let website_configuration = self + .website_configuration + .ok_or_else(|| BuildError::missing_field("website_configuration"))?; + Ok(PutBucketWebsiteInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + website_configuration, + }) + } + } -expected_bucket_owner: Option, + /// A builder for [`PutObjectInput`] + #[derive(Default)] + pub struct PutObjectInputBuilder { + acl: Option, -expires: Option, + body: Option, -grant_full_control: Option, + bucket: Option, -grant_read: Option, + bucket_key_enabled: Option, -grant_read_acp: Option, + cache_control: Option, -grant_write_acp: Option, + checksum_algorithm: Option, -if_match: Option, + checksum_crc32: Option, -if_none_match: Option, + checksum_crc32c: Option, -key: Option, + checksum_crc64nvme: Option, -metadata: Option, + checksum_sha1: Option, -object_lock_legal_hold_status: Option, + checksum_sha256: Option, -object_lock_mode: Option, + content_disposition: Option, -object_lock_retain_until_date: Option, + content_encoding: Option, -request_payer: Option, + content_language: Option, -sse_customer_algorithm: Option, + content_length: Option, -sse_customer_key: Option, + content_md5: Option, -sse_customer_key_md5: Option, + content_type: Option, -ssekms_encryption_context: Option, + expected_bucket_owner: Option, -ssekms_key_id: Option, + expires: Option, -server_side_encryption: Option, + grant_full_control: Option, -storage_class: Option, + grant_read: Option, -tagging: Option, + grant_read_acp: Option, -version_id: Option, + grant_write_acp: Option, -website_redirect_location: Option, + if_match: Option, -write_offset_bytes: Option, + if_none_match: Option, -} + key: Option, -impl PutObjectInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} + metadata: Option, -pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; -self -} + object_lock_legal_hold_status: Option, -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + object_lock_mode: Option, -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} + object_lock_retain_until_date: Option, -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} + request_payer: Option, -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + sse_customer_algorithm: Option, -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} + sse_customer_key: Option, -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self -} + sse_customer_key_md5: Option, -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self -} + ssekms_encryption_context: Option, -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} + ssekms_key_id: Option, -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} + server_side_encryption: Option, -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self -} + storage_class: Option, -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self -} + tagging: Option, -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} + version_id: Option, -pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; -self -} + website_redirect_location: Option, -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + write_offset_bytes: Option, + } -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} + impl PutObjectInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; + self + } -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } -pub fn set_if_match(&mut self, field: Option) -> &mut Self { - self.if_match = field; -self -} + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } -pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { - self.if_none_match = field; -self -} + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self -} + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self -} + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self -} + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; + self + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { - self.ssekms_encryption_context = field; -self -} + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self -} + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } -pub fn set_tagging(&mut self, field: Option) -> &mut Self { - self.tagging = field; -self -} + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + pub fn set_if_match(&mut self, field: Option) -> &mut Self { + self.if_match = field; + self + } -pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { - self.website_redirect_location = field; -self -} + pub fn set_if_none_match(&mut self, field: Option) -> &mut Self { + self.if_none_match = field; + self + } -pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { - self.write_offset_bytes = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } -#[must_use] -pub fn body(mut self, field: Option) -> Self { - self.body = field; -self -} + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self -} + pub fn set_ssekms_encryption_context(&mut self, field: Option) -> &mut Self { + self.ssekms_encryption_context = field; + self + } -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self -} + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self -} + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} + pub fn set_tagging(&mut self, field: Option) -> &mut Self { + self.tagging = field; + self + } -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -#[must_use] -pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; -self -} + pub fn set_website_redirect_location(&mut self, field: Option) -> &mut Self { + self.website_redirect_location = field; + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + pub fn set_write_offset_bytes(&mut self, field: Option) -> &mut Self { + self.write_offset_bytes = field; + self + } -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self -} + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn body(mut self, field: Option) -> Self { + self.body = field; + self + } -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } -#[must_use] -pub fn if_match(mut self, field: Option) -> Self { - self.if_match = field; -self -} + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } -#[must_use] -pub fn if_none_match(mut self, field: Option) -> Self { - self.if_none_match = field; -self -} + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self -} + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn ssekms_encryption_context(mut self, field: Option) -> Self { - self.ssekms_encryption_context = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tagging(mut self, field: Option) -> Self { - self.tagging = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -#[must_use] -pub fn website_redirect_location(mut self, field: Option) -> Self { - self.website_redirect_location = field; -self -} - -#[must_use] -pub fn write_offset_bytes(mut self, field: Option) -> Self { - self.write_offset_bytes = field; -self -} - -pub fn build(self) -> Result { -let acl = self.acl; -let body = self.body; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_algorithm = self.checksum_algorithm; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_length = self.content_length; -let content_md5 = self.content_md5; -let content_type = self.content_type; -let expected_bucket_owner = self.expected_bucket_owner; -let expires = self.expires; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write_acp = self.grant_write_acp; -let if_match = self.if_match; -let if_none_match = self.if_none_match; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let metadata = self.metadata; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_encryption_context = self.ssekms_encryption_context; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let storage_class = self.storage_class; -let tagging = self.tagging; -let version_id = self.version_id; -let website_redirect_location = self.website_redirect_location; -let write_offset_bytes = self.write_offset_bytes; -Ok(PutObjectInput { -acl, -body, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_md5, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -if_match, -if_none_match, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -version_id, -website_redirect_location, -write_offset_bytes, -}) -} - -} - - -/// A builder for [`PutObjectAclInput`] -#[derive(Default)] -pub struct PutObjectAclInputBuilder { -acl: Option, + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } -access_control_policy: Option, + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } -bucket: Option, + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } -checksum_algorithm: Option, + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } -content_md5: Option, + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn if_match(mut self, field: Option) -> Self { + self.if_match = field; + self + } -grant_full_control: Option, + #[must_use] + pub fn if_none_match(mut self, field: Option) -> Self { + self.if_none_match = field; + self + } -grant_read: Option, + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -grant_read_acp: Option, + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } -grant_write: Option, + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } -grant_write_acp: Option, + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } -key: Option, + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } -request_payer: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -version_id: Option, + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -impl PutObjectAclInputBuilder { -pub fn set_acl(&mut self, field: Option) -> &mut Self { - self.acl = field; -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { - self.access_control_policy = field; -self -} + #[must_use] + pub fn ssekms_encryption_context(mut self, field: Option) -> Self { + self.ssekms_encryption_context = field; + self + } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn tagging(mut self, field: Option) -> Self { + self.tagging = field; + self + } -pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { - self.grant_full_control = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -pub fn set_grant_read(&mut self, field: Option) -> &mut Self { - self.grant_read = field; -self -} + #[must_use] + pub fn website_redirect_location(mut self, field: Option) -> Self { + self.website_redirect_location = field; + self + } -pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { - self.grant_read_acp = field; -self -} + #[must_use] + pub fn write_offset_bytes(mut self, field: Option) -> Self { + self.write_offset_bytes = field; + self + } -pub fn set_grant_write(&mut self, field: Option) -> &mut Self { - self.grant_write = field; -self -} + pub fn build(self) -> Result { + let acl = self.acl; + let body = self.body; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_algorithm = self.checksum_algorithm; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_length = self.content_length; + let content_md5 = self.content_md5; + let content_type = self.content_type; + let expected_bucket_owner = self.expected_bucket_owner; + let expires = self.expires; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write_acp = self.grant_write_acp; + let if_match = self.if_match; + let if_none_match = self.if_none_match; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let metadata = self.metadata; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_encryption_context = self.ssekms_encryption_context; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let storage_class = self.storage_class; + let tagging = self.tagging; + let version_id = self.version_id; + let website_redirect_location = self.website_redirect_location; + let write_offset_bytes = self.write_offset_bytes; + Ok(PutObjectInput { + acl, + body, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_md5, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + if_match, + if_none_match, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + version_id, + website_redirect_location, + write_offset_bytes, + }) + } + } -pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { - self.grant_write_acp = field; -self -} + /// A builder for [`PutObjectAclInput`] + #[derive(Default)] + pub struct PutObjectAclInputBuilder { + acl: Option, -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + access_control_policy: Option, -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + bucket: Option, -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + checksum_algorithm: Option, -#[must_use] -pub fn acl(mut self, field: Option) -> Self { - self.acl = field; -self -} + content_md5: Option, -#[must_use] -pub fn access_control_policy(mut self, field: Option) -> Self { - self.access_control_policy = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + grant_full_control: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + grant_read: Option, -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + grant_read_acp: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + grant_write: Option, -#[must_use] -pub fn grant_full_control(mut self, field: Option) -> Self { - self.grant_full_control = field; -self -} + grant_write_acp: Option, -#[must_use] -pub fn grant_read(mut self, field: Option) -> Self { - self.grant_read = field; -self -} + key: Option, -#[must_use] -pub fn grant_read_acp(mut self, field: Option) -> Self { - self.grant_read_acp = field; -self -} + request_payer: Option, -#[must_use] -pub fn grant_write(mut self, field: Option) -> Self { - self.grant_write = field; -self -} + version_id: Option, + } -#[must_use] -pub fn grant_write_acp(mut self, field: Option) -> Self { - self.grant_write_acp = field; -self -} + impl PutObjectAclInputBuilder { + pub fn set_acl(&mut self, field: Option) -> &mut Self { + self.acl = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn set_access_control_policy(&mut self, field: Option) -> &mut Self { + self.access_control_policy = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -pub fn build(self) -> Result { -let acl = self.acl; -let access_control_policy = self.access_control_policy; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let grant_full_control = self.grant_full_control; -let grant_read = self.grant_read; -let grant_read_acp = self.grant_read_acp; -let grant_write = self.grant_write; -let grant_write_acp = self.grant_write_acp; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(PutObjectAclInput { -acl, -access_control_policy, -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -key, -request_payer, -version_id, -}) -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + pub fn set_grant_full_control(&mut self, field: Option) -> &mut Self { + self.grant_full_control = field; + self + } -/// A builder for [`PutObjectLegalHoldInput`] -#[derive(Default)] -pub struct PutObjectLegalHoldInputBuilder { -bucket: Option, + pub fn set_grant_read(&mut self, field: Option) -> &mut Self { + self.grant_read = field; + self + } -checksum_algorithm: Option, + pub fn set_grant_read_acp(&mut self, field: Option) -> &mut Self { + self.grant_read_acp = field; + self + } -content_md5: Option, + pub fn set_grant_write(&mut self, field: Option) -> &mut Self { + self.grant_write = field; + self + } -expected_bucket_owner: Option, + pub fn set_grant_write_acp(&mut self, field: Option) -> &mut Self { + self.grant_write_acp = field; + self + } -key: Option, + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -legal_hold: Option, + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -request_payer: Option, + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -version_id: Option, + #[must_use] + pub fn acl(mut self, field: Option) -> Self { + self.acl = field; + self + } -} + #[must_use] + pub fn access_control_policy(mut self, field: Option) -> Self { + self.access_control_policy = field; + self + } -impl PutObjectLegalHoldInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + #[must_use] + pub fn grant_full_control(mut self, field: Option) -> Self { + self.grant_full_control = field; + self + } -pub fn set_legal_hold(&mut self, field: Option) -> &mut Self { - self.legal_hold = field; -self -} + #[must_use] + pub fn grant_read(mut self, field: Option) -> Self { + self.grant_read = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + #[must_use] + pub fn grant_read_acp(mut self, field: Option) -> Self { + self.grant_read_acp = field; + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + #[must_use] + pub fn grant_write(mut self, field: Option) -> Self { + self.grant_write = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn grant_write_acp(mut self, field: Option) -> Self { + self.grant_write_acp = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn build(self) -> Result { + let acl = self.acl; + let access_control_policy = self.access_control_policy; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let grant_full_control = self.grant_full_control; + let grant_read = self.grant_read; + let grant_read_acp = self.grant_read_acp; + let grant_write = self.grant_write; + let grant_write_acp = self.grant_write_acp; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(PutObjectAclInput { + acl, + access_control_policy, + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + key, + request_payer, + version_id, + }) + } + } -#[must_use] -pub fn legal_hold(mut self, field: Option) -> Self { - self.legal_hold = field; -self -} + /// A builder for [`PutObjectLegalHoldInput`] + #[derive(Default)] + pub struct PutObjectLegalHoldInputBuilder { + bucket: Option, -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + checksum_algorithm: Option, -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + content_md5: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let legal_hold = self.legal_hold; -let request_payer = self.request_payer; -let version_id = self.version_id; -Ok(PutObjectLegalHoldInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -legal_hold, -request_payer, -version_id, -}) -} + expected_bucket_owner: Option, -} + key: Option, + legal_hold: Option, -/// A builder for [`PutObjectLockConfigurationInput`] -#[derive(Default)] -pub struct PutObjectLockConfigurationInputBuilder { -bucket: Option, + request_payer: Option, -checksum_algorithm: Option, + version_id: Option, + } -content_md5: Option, + impl PutObjectLegalHoldInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -object_lock_configuration: Option, + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -request_payer: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -token: Option, + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -} + pub fn set_legal_hold(&mut self, field: Option) -> &mut Self { + self.legal_hold = field; + self + } -impl PutObjectLockConfigurationInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -pub fn set_object_lock_configuration(&mut self, field: Option) -> &mut Self { - self.object_lock_configuration = field; -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_token(&mut self, field: Option) -> &mut Self { - self.token = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn legal_hold(mut self, field: Option) -> Self { + self.legal_hold = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let legal_hold = self.legal_hold; + let request_payer = self.request_payer; + let version_id = self.version_id; + Ok(PutObjectLegalHoldInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + legal_hold, + request_payer, + version_id, + }) + } + } -#[must_use] -pub fn object_lock_configuration(mut self, field: Option) -> Self { - self.object_lock_configuration = field; -self -} + /// A builder for [`PutObjectLockConfigurationInput`] + #[derive(Default)] + pub struct PutObjectLockConfigurationInputBuilder { + bucket: Option, -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + checksum_algorithm: Option, -#[must_use] -pub fn token(mut self, field: Option) -> Self { - self.token = field; -self -} + content_md5: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let object_lock_configuration = self.object_lock_configuration; -let request_payer = self.request_payer; -let token = self.token; -Ok(PutObjectLockConfigurationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -object_lock_configuration, -request_payer, -token, -}) -} + expected_bucket_owner: Option, -} + object_lock_configuration: Option, + request_payer: Option, -/// A builder for [`PutObjectRetentionInput`] -#[derive(Default)] -pub struct PutObjectRetentionInputBuilder { -bucket: Option, + token: Option, + } -bypass_governance_retention: Option, + impl PutObjectLockConfigurationInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -checksum_algorithm: Option, + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -content_md5: Option, + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -expected_bucket_owner: Option, + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -key: Option, + pub fn set_object_lock_configuration(&mut self, field: Option) -> &mut Self { + self.object_lock_configuration = field; + self + } -request_payer: Option, + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -retention: Option, + pub fn set_token(&mut self, field: Option) -> &mut Self { + self.token = field; + self + } -version_id: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -impl PutObjectRetentionInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { - self.bypass_governance_retention = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn object_lock_configuration(mut self, field: Option) -> Self { + self.object_lock_configuration = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn token(mut self, field: Option) -> Self { + self.token = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let object_lock_configuration = self.object_lock_configuration; + let request_payer = self.request_payer; + let token = self.token; + Ok(PutObjectLockConfigurationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + object_lock_configuration, + request_payer, + token, + }) + } + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + /// A builder for [`PutObjectRetentionInput`] + #[derive(Default)] + pub struct PutObjectRetentionInputBuilder { + bucket: Option, -pub fn set_retention(&mut self, field: Option) -> &mut Self { - self.retention = field; -self -} + bypass_governance_retention: Option, -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + checksum_algorithm: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + content_md5: Option, -#[must_use] -pub fn bypass_governance_retention(mut self, field: Option) -> Self { - self.bypass_governance_retention = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + key: Option, -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + request_payer: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + retention: Option, -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + version_id: Option, + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + impl PutObjectRetentionInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn retention(mut self, field: Option) -> Self { - self.retention = field; -self -} + pub fn set_bypass_governance_retention(&mut self, field: Option) -> &mut Self { + self.bypass_governance_retention = field; + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let bypass_governance_retention = self.bypass_governance_retention; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let retention = self.retention; -let version_id = self.version_id; -Ok(PutObjectRetentionInput { -bucket, -bypass_governance_retention, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -request_payer, -retention, -version_id, -}) -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -/// A builder for [`PutObjectTaggingInput`] -#[derive(Default)] -pub struct PutObjectTaggingInputBuilder { -bucket: Option, + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -checksum_algorithm: Option, + pub fn set_retention(&mut self, field: Option) -> &mut Self { + self.retention = field; + self + } -content_md5: Option, + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -key: Option, + #[must_use] + pub fn bypass_governance_retention(mut self, field: Option) -> Self { + self.bypass_governance_retention = field; + self + } -request_payer: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -tagging: Option, + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -version_id: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -impl PutObjectTaggingInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn retention(mut self, field: Option) -> Self { + self.retention = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let bypass_governance_retention = self.bypass_governance_retention; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let retention = self.retention; + let version_id = self.version_id; + Ok(PutObjectRetentionInput { + bucket, + bypass_governance_retention, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + request_payer, + retention, + version_id, + }) + } + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + /// A builder for [`PutObjectTaggingInput`] + #[derive(Default)] + pub struct PutObjectTaggingInputBuilder { + bucket: Option, -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + checksum_algorithm: Option, -pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { - self.tagging = Some(field); -self -} + content_md5: Option, -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + key: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + request_payer: Option, -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + tagging: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + version_id: Option, + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + impl PutObjectTaggingInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn tagging(mut self, field: Tagging) -> Self { - self.tagging = Some(field); -self -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; -let version_id = self.version_id; -Ok(PutObjectTaggingInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -request_payer, -tagging, -version_id, -}) -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } + pub fn set_tagging(&mut self, field: Tagging) -> &mut Self { + self.tagging = Some(field); + self + } -/// A builder for [`PutPublicAccessBlockInput`] -#[derive(Default)] -pub struct PutPublicAccessBlockInputBuilder { -bucket: Option, + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -checksum_algorithm: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -content_md5: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -public_access_block_configuration: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -impl PutPublicAccessBlockInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn tagging(mut self, field: Tagging) -> Self { + self.tagging = Some(field); + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let tagging = self.tagging.ok_or_else(|| BuildError::missing_field("tagging"))?; + let version_id = self.version_id; + Ok(PutObjectTaggingInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + request_payer, + tagging, + version_id, + }) + } + } -pub fn set_public_access_block_configuration(&mut self, field: PublicAccessBlockConfiguration) -> &mut Self { - self.public_access_block_configuration = Some(field); -self -} + /// A builder for [`PutPublicAccessBlockInput`] + #[derive(Default)] + pub struct PutPublicAccessBlockInputBuilder { + bucket: Option, -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + checksum_algorithm: Option, -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + content_md5: Option, -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + expected_bucket_owner: Option, -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + public_access_block_configuration: Option, + } -#[must_use] -pub fn public_access_block_configuration(mut self, field: PublicAccessBlockConfiguration) -> Self { - self.public_access_block_configuration = Some(field); -self -} + impl PutPublicAccessBlockInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let public_access_block_configuration = self.public_access_block_configuration.ok_or_else(|| BuildError::missing_field("public_access_block_configuration"))?; -Ok(PutPublicAccessBlockInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -public_access_block_configuration, -}) -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -/// A builder for [`RestoreObjectInput`] -#[derive(Default)] -pub struct RestoreObjectInputBuilder { -bucket: Option, + pub fn set_public_access_block_configuration(&mut self, field: PublicAccessBlockConfiguration) -> &mut Self { + self.public_access_block_configuration = Some(field); + self + } -checksum_algorithm: Option, + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -key: Option, + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -request_payer: Option, + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -restore_request: Option, + #[must_use] + pub fn public_access_block_configuration(mut self, field: PublicAccessBlockConfiguration) -> Self { + self.public_access_block_configuration = Some(field); + self + } -version_id: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let public_access_block_configuration = self + .public_access_block_configuration + .ok_or_else(|| BuildError::missing_field("public_access_block_configuration"))?; + Ok(PutPublicAccessBlockInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + public_access_block_configuration, + }) + } + } -} + /// A builder for [`RestoreObjectInput`] + #[derive(Default)] + pub struct RestoreObjectInputBuilder { + bucket: Option, -impl RestoreObjectInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + checksum_algorithm: Option, -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + expected_bucket_owner: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + key: Option, -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + request_payer: Option, -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + restore_request: Option, -pub fn set_restore_request(&mut self, field: Option) -> &mut Self { - self.restore_request = field; -self -} + version_id: Option, + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + impl RestoreObjectInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + pub fn set_restore_request(&mut self, field: Option) -> &mut Self { + self.restore_request = field; + self + } -#[must_use] -pub fn restore_request(mut self, field: Option) -> Self { - self.restore_request = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let request_payer = self.request_payer; -let restore_request = self.restore_request; -let version_id = self.version_id; -Ok(RestoreObjectInput { -bucket, -checksum_algorithm, -expected_bucket_owner, -key, -request_payer, -restore_request, -version_id, -}) -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -/// A builder for [`SelectObjectContentInput`] -#[derive(Default)] -pub struct SelectObjectContentInputBuilder { -bucket: Option, + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -expected_bucket_owner: Option, + #[must_use] + pub fn restore_request(mut self, field: Option) -> Self { + self.restore_request = field; + self + } -key: Option, + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } -sse_customer_algorithm: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let request_payer = self.request_payer; + let restore_request = self.restore_request; + let version_id = self.version_id; + Ok(RestoreObjectInput { + bucket, + checksum_algorithm, + expected_bucket_owner, + key, + request_payer, + restore_request, + version_id, + }) + } + } -sse_customer_key: Option, + /// A builder for [`SelectObjectContentInput`] + #[derive(Default)] + pub struct SelectObjectContentInputBuilder { + bucket: Option, -sse_customer_key_md5: Option, + expected_bucket_owner: Option, -request: Option, + key: Option, -} + sse_customer_algorithm: Option, -impl SelectObjectContentInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + sse_customer_key: Option, -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + sse_customer_key_md5: Option, -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + request: Option, + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + impl SelectObjectContentInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -pub fn set_request(&mut self, field: SelectObjectContentRequest) -> &mut Self { - self.request = Some(field); -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + pub fn set_request(&mut self, field: SelectObjectContentRequest) -> &mut Self { + self.request = Some(field); + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -#[must_use] -pub fn request(mut self, field: SelectObjectContentRequest) -> Self { - self.request = Some(field); -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let request = self.request.ok_or_else(|| BuildError::missing_field("request"))?; -Ok(SelectObjectContentInput { -bucket, -expected_bucket_owner, -key, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -request, -}) -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } + #[must_use] + pub fn request(mut self, field: SelectObjectContentRequest) -> Self { + self.request = Some(field); + self + } -/// A builder for [`UploadPartInput`] -#[derive(Default)] -pub struct UploadPartInputBuilder { -body: Option, + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let request = self.request.ok_or_else(|| BuildError::missing_field("request"))?; + Ok(SelectObjectContentInput { + bucket, + expected_bucket_owner, + key, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + request, + }) + } + } -bucket: Option, + /// A builder for [`UploadPartInput`] + #[derive(Default)] + pub struct UploadPartInputBuilder { + body: Option, -checksum_algorithm: Option, + bucket: Option, -checksum_crc32: Option, + checksum_algorithm: Option, -checksum_crc32c: Option, + checksum_crc32: Option, -checksum_crc64nvme: Option, + checksum_crc32c: Option, -checksum_sha1: Option, + checksum_crc64nvme: Option, -checksum_sha256: Option, + checksum_sha1: Option, -content_length: Option, + checksum_sha256: Option, -content_md5: Option, + content_length: Option, -expected_bucket_owner: Option, + content_md5: Option, -key: Option, + expected_bucket_owner: Option, -part_number: Option, + key: Option, -request_payer: Option, + part_number: Option, -sse_customer_algorithm: Option, + request_payer: Option, -sse_customer_key: Option, + sse_customer_algorithm: Option, -sse_customer_key_md5: Option, + sse_customer_key: Option, -upload_id: Option, + sse_customer_key_md5: Option, -} + upload_id: Option, + } -impl UploadPartInputBuilder { -pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; -self -} + impl UploadPartInputBuilder { + pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; + self + } -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { - self.checksum_algorithm = field; -self -} + pub fn set_checksum_algorithm(&mut self, field: Option) -> &mut Self { + self.checksum_algorithm = field; + self + } -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self -} + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self -} + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } -pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; -self -} + pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; + self + } -pub fn set_content_md5(&mut self, field: Option) -> &mut Self { - self.content_md5 = field; -self -} + pub fn set_content_md5(&mut self, field: Option) -> &mut Self { + self.content_md5 = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { - self.part_number = Some(field); -self -} + pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { + self.part_number = Some(field); + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } -#[must_use] -pub fn body(mut self, field: Option) -> Self { - self.body = field; -self -} + #[must_use] + pub fn body(mut self, field: Option) -> Self { + self.body = field; + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -#[must_use] -pub fn checksum_algorithm(mut self, field: Option) -> Self { - self.checksum_algorithm = field; -self -} + #[must_use] + pub fn checksum_algorithm(mut self, field: Option) -> Self { + self.checksum_algorithm = field; + self + } -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self -} + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self -} + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self -} + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self -} + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } -#[must_use] -pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; -self -} + #[must_use] + pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; + self + } -#[must_use] -pub fn content_md5(mut self, field: Option) -> Self { - self.content_md5 = field; -self -} + #[must_use] + pub fn content_md5(mut self, field: Option) -> Self { + self.content_md5 = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -#[must_use] -pub fn part_number(mut self, field: PartNumber) -> Self { - self.part_number = Some(field); -self -} + #[must_use] + pub fn part_number(mut self, field: PartNumber) -> Self { + self.part_number = Some(field); + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self -} + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } -pub fn build(self) -> Result { -let body = self.body; -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let checksum_algorithm = self.checksum_algorithm; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let content_length = self.content_length; -let content_md5 = self.content_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(UploadPartInput { -body, -bucket, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_length, -content_md5, -expected_bucket_owner, -key, -part_number, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - -} + pub fn build(self) -> Result { + let body = self.body; + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let checksum_algorithm = self.checksum_algorithm; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let content_length = self.content_length; + let content_md5 = self.content_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(UploadPartInput { + body, + bucket, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_length, + content_md5, + expected_bucket_owner, + key, + part_number, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + } + /// A builder for [`UploadPartCopyInput`] + #[derive(Default)] + pub struct UploadPartCopyInputBuilder { + bucket: Option, -/// A builder for [`UploadPartCopyInput`] -#[derive(Default)] -pub struct UploadPartCopyInputBuilder { -bucket: Option, + copy_source: Option, -copy_source: Option, + copy_source_if_match: Option, -copy_source_if_match: Option, + copy_source_if_modified_since: Option, -copy_source_if_modified_since: Option, + copy_source_if_none_match: Option, -copy_source_if_none_match: Option, + copy_source_if_unmodified_since: Option, -copy_source_if_unmodified_since: Option, + copy_source_range: Option, -copy_source_range: Option, + copy_source_sse_customer_algorithm: Option, -copy_source_sse_customer_algorithm: Option, + copy_source_sse_customer_key: Option, -copy_source_sse_customer_key: Option, + copy_source_sse_customer_key_md5: Option, -copy_source_sse_customer_key_md5: Option, + expected_bucket_owner: Option, -expected_bucket_owner: Option, + expected_source_bucket_owner: Option, -expected_source_bucket_owner: Option, + key: Option, -key: Option, + part_number: Option, -part_number: Option, + request_payer: Option, -request_payer: Option, + sse_customer_algorithm: Option, -sse_customer_algorithm: Option, + sse_customer_key: Option, -sse_customer_key: Option, + sse_customer_key_md5: Option, -sse_customer_key_md5: Option, + upload_id: Option, + } -upload_id: Option, + impl UploadPartCopyInputBuilder { + pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { + self.bucket = Some(field); + self + } -} + pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { + self.copy_source = Some(field); + self + } -impl UploadPartCopyInputBuilder { -pub fn set_bucket(&mut self, field: BucketName) -> &mut Self { - self.bucket = Some(field); -self -} + pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_match = field; + self + } -pub fn set_copy_source(&mut self, field: CopySource) -> &mut Self { - self.copy_source = Some(field); -self -} + pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_modified_since = field; + self + } -pub fn set_copy_source_if_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_match = field; -self -} + pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { + self.copy_source_if_none_match = field; + self + } -pub fn set_copy_source_if_modified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_modified_since = field; -self -} + pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { + self.copy_source_if_unmodified_since = field; + self + } -pub fn set_copy_source_if_none_match(&mut self, field: Option) -> &mut Self { - self.copy_source_if_none_match = field; -self -} + pub fn set_copy_source_range(&mut self, field: Option) -> &mut Self { + self.copy_source_range = field; + self + } -pub fn set_copy_source_if_unmodified_since(&mut self, field: Option) -> &mut Self { - self.copy_source_if_unmodified_since = field; -self -} + pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_algorithm = field; + self + } -pub fn set_copy_source_range(&mut self, field: Option) -> &mut Self { - self.copy_source_range = field; -self -} + pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key = field; + self + } -pub fn set_copy_source_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_algorithm = field; -self -} + pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.copy_source_sse_customer_key_md5 = field; + self + } -pub fn set_copy_source_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key = field; -self -} + pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_bucket_owner = field; + self + } -pub fn set_copy_source_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.copy_source_sse_customer_key_md5 = field; -self -} + pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { + self.expected_source_bucket_owner = field; + self + } -pub fn set_expected_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_bucket_owner = field; -self -} + pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { + self.key = Some(field); + self + } -pub fn set_expected_source_bucket_owner(&mut self, field: Option) -> &mut Self { - self.expected_source_bucket_owner = field; -self -} + pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { + self.part_number = Some(field); + self + } -pub fn set_key(&mut self, field: ObjectKey) -> &mut Self { - self.key = Some(field); -self -} + pub fn set_request_payer(&mut self, field: Option) -> &mut Self { + self.request_payer = field; + self + } -pub fn set_part_number(&mut self, field: PartNumber) -> &mut Self { - self.part_number = Some(field); -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_request_payer(&mut self, field: Option) -> &mut Self { - self.request_payer = field; -self -} + pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { + self.sse_customer_key = field; + self + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_sse_customer_key(&mut self, field: Option) -> &mut Self { - self.sse_customer_key = field; -self -} + pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { + self.upload_id = Some(field); + self + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + #[must_use] + pub fn bucket(mut self, field: BucketName) -> Self { + self.bucket = Some(field); + self + } -pub fn set_upload_id(&mut self, field: MultipartUploadId) -> &mut Self { - self.upload_id = Some(field); -self -} + #[must_use] + pub fn copy_source(mut self, field: CopySource) -> Self { + self.copy_source = Some(field); + self + } -#[must_use] -pub fn bucket(mut self, field: BucketName) -> Self { - self.bucket = Some(field); -self -} + #[must_use] + pub fn copy_source_if_match(mut self, field: Option) -> Self { + self.copy_source_if_match = field; + self + } -#[must_use] -pub fn copy_source(mut self, field: CopySource) -> Self { - self.copy_source = Some(field); -self -} + #[must_use] + pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { + self.copy_source_if_modified_since = field; + self + } -#[must_use] -pub fn copy_source_if_match(mut self, field: Option) -> Self { - self.copy_source_if_match = field; -self -} + #[must_use] + pub fn copy_source_if_none_match(mut self, field: Option) -> Self { + self.copy_source_if_none_match = field; + self + } -#[must_use] -pub fn copy_source_if_modified_since(mut self, field: Option) -> Self { - self.copy_source_if_modified_since = field; -self -} + #[must_use] + pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { + self.copy_source_if_unmodified_since = field; + self + } -#[must_use] -pub fn copy_source_if_none_match(mut self, field: Option) -> Self { - self.copy_source_if_none_match = field; -self -} + #[must_use] + pub fn copy_source_range(mut self, field: Option) -> Self { + self.copy_source_range = field; + self + } -#[must_use] -pub fn copy_source_if_unmodified_since(mut self, field: Option) -> Self { - self.copy_source_if_unmodified_since = field; -self -} + #[must_use] + pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { + self.copy_source_sse_customer_algorithm = field; + self + } -#[must_use] -pub fn copy_source_range(mut self, field: Option) -> Self { - self.copy_source_range = field; -self -} + #[must_use] + pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key = field; + self + } -#[must_use] -pub fn copy_source_sse_customer_algorithm(mut self, field: Option) -> Self { - self.copy_source_sse_customer_algorithm = field; -self -} + #[must_use] + pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { + self.copy_source_sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn copy_source_sse_customer_key(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key = field; -self -} + #[must_use] + pub fn expected_bucket_owner(mut self, field: Option) -> Self { + self.expected_bucket_owner = field; + self + } -#[must_use] -pub fn copy_source_sse_customer_key_md5(mut self, field: Option) -> Self { - self.copy_source_sse_customer_key_md5 = field; -self -} + #[must_use] + pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { + self.expected_source_bucket_owner = field; + self + } -#[must_use] -pub fn expected_bucket_owner(mut self, field: Option) -> Self { - self.expected_bucket_owner = field; -self -} + #[must_use] + pub fn key(mut self, field: ObjectKey) -> Self { + self.key = Some(field); + self + } -#[must_use] -pub fn expected_source_bucket_owner(mut self, field: Option) -> Self { - self.expected_source_bucket_owner = field; -self -} + #[must_use] + pub fn part_number(mut self, field: PartNumber) -> Self { + self.part_number = Some(field); + self + } -#[must_use] -pub fn key(mut self, field: ObjectKey) -> Self { - self.key = Some(field); -self -} + #[must_use] + pub fn request_payer(mut self, field: Option) -> Self { + self.request_payer = field; + self + } -#[must_use] -pub fn part_number(mut self, field: PartNumber) -> Self { - self.part_number = Some(field); -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn request_payer(mut self, field: Option) -> Self { - self.request_payer = field; -self -} + #[must_use] + pub fn sse_customer_key(mut self, field: Option) -> Self { + self.sse_customer_key = field; + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn sse_customer_key(mut self, field: Option) -> Self { - self.sse_customer_key = field; -self -} + #[must_use] + pub fn upload_id(mut self, field: MultipartUploadId) -> Self { + self.upload_id = Some(field); + self + } -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} + pub fn build(self) -> Result { + let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; + let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; + let copy_source_if_match = self.copy_source_if_match; + let copy_source_if_modified_since = self.copy_source_if_modified_since; + let copy_source_if_none_match = self.copy_source_if_none_match; + let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; + let copy_source_range = self.copy_source_range; + let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; + let copy_source_sse_customer_key = self.copy_source_sse_customer_key; + let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; + let expected_bucket_owner = self.expected_bucket_owner; + let expected_source_bucket_owner = self.expected_source_bucket_owner; + let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; + let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; + let request_payer = self.request_payer; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key = self.sse_customer_key; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; + Ok(UploadPartCopyInput { + bucket, + copy_source, + copy_source_if_match, + copy_source_if_modified_since, + copy_source_if_none_match, + copy_source_if_unmodified_since, + copy_source_range, + copy_source_sse_customer_algorithm, + copy_source_sse_customer_key, + copy_source_sse_customer_key_md5, + expected_bucket_owner, + expected_source_bucket_owner, + key, + part_number, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + } -#[must_use] -pub fn upload_id(mut self, field: MultipartUploadId) -> Self { - self.upload_id = Some(field); -self -} + /// A builder for [`WriteGetObjectResponseInput`] + #[derive(Default)] + pub struct WriteGetObjectResponseInputBuilder { + accept_ranges: Option, -pub fn build(self) -> Result { -let bucket = self.bucket.ok_or_else(|| BuildError::missing_field("bucket"))?; -let copy_source = self.copy_source.ok_or_else(|| BuildError::missing_field("copy_source"))?; -let copy_source_if_match = self.copy_source_if_match; -let copy_source_if_modified_since = self.copy_source_if_modified_since; -let copy_source_if_none_match = self.copy_source_if_none_match; -let copy_source_if_unmodified_since = self.copy_source_if_unmodified_since; -let copy_source_range = self.copy_source_range; -let copy_source_sse_customer_algorithm = self.copy_source_sse_customer_algorithm; -let copy_source_sse_customer_key = self.copy_source_sse_customer_key; -let copy_source_sse_customer_key_md5 = self.copy_source_sse_customer_key_md5; -let expected_bucket_owner = self.expected_bucket_owner; -let expected_source_bucket_owner = self.expected_source_bucket_owner; -let key = self.key.ok_or_else(|| BuildError::missing_field("key"))?; -let part_number = self.part_number.ok_or_else(|| BuildError::missing_field("part_number"))?; -let request_payer = self.request_payer; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key = self.sse_customer_key; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let upload_id = self.upload_id.ok_or_else(|| BuildError::missing_field("upload_id"))?; -Ok(UploadPartCopyInput { -bucket, -copy_source, -copy_source_if_match, -copy_source_if_modified_since, -copy_source_if_none_match, -copy_source_if_unmodified_since, -copy_source_range, -copy_source_sse_customer_algorithm, -copy_source_sse_customer_key, -copy_source_sse_customer_key_md5, -expected_bucket_owner, -expected_source_bucket_owner, -key, -part_number, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - -} + body: Option, + bucket_key_enabled: Option, -/// A builder for [`WriteGetObjectResponseInput`] -#[derive(Default)] -pub struct WriteGetObjectResponseInputBuilder { -accept_ranges: Option, - -body: Option, + cache_control: Option, -bucket_key_enabled: Option, + checksum_crc32: Option, -cache_control: Option, + checksum_crc32c: Option, -checksum_crc32: Option, + checksum_crc64nvme: Option, -checksum_crc32c: Option, + checksum_sha1: Option, -checksum_crc64nvme: Option, + checksum_sha256: Option, -checksum_sha1: Option, + content_disposition: Option, -checksum_sha256: Option, + content_encoding: Option, -content_disposition: Option, + content_language: Option, -content_encoding: Option, + content_length: Option, -content_language: Option, + content_range: Option, -content_length: Option, + content_type: Option, -content_range: Option, + delete_marker: Option, -content_type: Option, + e_tag: Option, -delete_marker: Option, + error_code: Option, -e_tag: Option, + error_message: Option, -error_code: Option, + expiration: Option, -error_message: Option, + expires: Option, -expiration: Option, + last_modified: Option, -expires: Option, + metadata: Option, -last_modified: Option, + missing_meta: Option, -metadata: Option, + object_lock_legal_hold_status: Option, -missing_meta: Option, + object_lock_mode: Option, -object_lock_legal_hold_status: Option, + object_lock_retain_until_date: Option, -object_lock_mode: Option, + parts_count: Option, -object_lock_retain_until_date: Option, + replication_status: Option, -parts_count: Option, + request_charged: Option, -replication_status: Option, + request_route: Option, -request_charged: Option, + request_token: Option, -request_route: Option, + restore: Option, -request_token: Option, + sse_customer_algorithm: Option, -restore: Option, + sse_customer_key_md5: Option, -sse_customer_algorithm: Option, + ssekms_key_id: Option, -sse_customer_key_md5: Option, + server_side_encryption: Option, -ssekms_key_id: Option, + status_code: Option, -server_side_encryption: Option, + storage_class: Option, -status_code: Option, + tag_count: Option, -storage_class: Option, + version_id: Option, + } -tag_count: Option, + impl WriteGetObjectResponseInputBuilder { + pub fn set_accept_ranges(&mut self, field: Option) -> &mut Self { + self.accept_ranges = field; + self + } -version_id: Option, + pub fn set_body(&mut self, field: Option) -> &mut Self { + self.body = field; + self + } -} + pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { + self.bucket_key_enabled = field; + self + } -impl WriteGetObjectResponseInputBuilder { -pub fn set_accept_ranges(&mut self, field: Option) -> &mut Self { - self.accept_ranges = field; -self -} + pub fn set_cache_control(&mut self, field: Option) -> &mut Self { + self.cache_control = field; + self + } -pub fn set_body(&mut self, field: Option) -> &mut Self { - self.body = field; -self -} + pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { + self.checksum_crc32 = field; + self + } -pub fn set_bucket_key_enabled(&mut self, field: Option) -> &mut Self { - self.bucket_key_enabled = field; -self -} + pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { + self.checksum_crc32c = field; + self + } -pub fn set_cache_control(&mut self, field: Option) -> &mut Self { - self.cache_control = field; -self -} + pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { + self.checksum_crc64nvme = field; + self + } -pub fn set_checksum_crc32(&mut self, field: Option) -> &mut Self { - self.checksum_crc32 = field; -self -} + pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { + self.checksum_sha1 = field; + self + } -pub fn set_checksum_crc32c(&mut self, field: Option) -> &mut Self { - self.checksum_crc32c = field; -self -} + pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { + self.checksum_sha256 = field; + self + } -pub fn set_checksum_crc64nvme(&mut self, field: Option) -> &mut Self { - self.checksum_crc64nvme = field; -self -} + pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { + self.content_disposition = field; + self + } -pub fn set_checksum_sha1(&mut self, field: Option) -> &mut Self { - self.checksum_sha1 = field; -self -} + pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { + self.content_encoding = field; + self + } -pub fn set_checksum_sha256(&mut self, field: Option) -> &mut Self { - self.checksum_sha256 = field; -self -} + pub fn set_content_language(&mut self, field: Option) -> &mut Self { + self.content_language = field; + self + } -pub fn set_content_disposition(&mut self, field: Option) -> &mut Self { - self.content_disposition = field; -self -} + pub fn set_content_length(&mut self, field: Option) -> &mut Self { + self.content_length = field; + self + } -pub fn set_content_encoding(&mut self, field: Option) -> &mut Self { - self.content_encoding = field; -self -} + pub fn set_content_range(&mut self, field: Option) -> &mut Self { + self.content_range = field; + self + } -pub fn set_content_language(&mut self, field: Option) -> &mut Self { - self.content_language = field; -self -} + pub fn set_content_type(&mut self, field: Option) -> &mut Self { + self.content_type = field; + self + } -pub fn set_content_length(&mut self, field: Option) -> &mut Self { - self.content_length = field; -self -} + pub fn set_delete_marker(&mut self, field: Option) -> &mut Self { + self.delete_marker = field; + self + } -pub fn set_content_range(&mut self, field: Option) -> &mut Self { - self.content_range = field; -self -} + pub fn set_e_tag(&mut self, field: Option) -> &mut Self { + self.e_tag = field; + self + } -pub fn set_content_type(&mut self, field: Option) -> &mut Self { - self.content_type = field; -self -} + pub fn set_error_code(&mut self, field: Option) -> &mut Self { + self.error_code = field; + self + } -pub fn set_delete_marker(&mut self, field: Option) -> &mut Self { - self.delete_marker = field; -self -} + pub fn set_error_message(&mut self, field: Option) -> &mut Self { + self.error_message = field; + self + } -pub fn set_e_tag(&mut self, field: Option) -> &mut Self { - self.e_tag = field; -self -} + pub fn set_expiration(&mut self, field: Option) -> &mut Self { + self.expiration = field; + self + } -pub fn set_error_code(&mut self, field: Option) -> &mut Self { - self.error_code = field; -self -} + pub fn set_expires(&mut self, field: Option) -> &mut Self { + self.expires = field; + self + } -pub fn set_error_message(&mut self, field: Option) -> &mut Self { - self.error_message = field; -self -} + pub fn set_last_modified(&mut self, field: Option) -> &mut Self { + self.last_modified = field; + self + } -pub fn set_expiration(&mut self, field: Option) -> &mut Self { - self.expiration = field; -self -} + pub fn set_metadata(&mut self, field: Option) -> &mut Self { + self.metadata = field; + self + } -pub fn set_expires(&mut self, field: Option) -> &mut Self { - self.expires = field; -self -} + pub fn set_missing_meta(&mut self, field: Option) -> &mut Self { + self.missing_meta = field; + self + } -pub fn set_last_modified(&mut self, field: Option) -> &mut Self { - self.last_modified = field; -self -} + pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { + self.object_lock_legal_hold_status = field; + self + } -pub fn set_metadata(&mut self, field: Option) -> &mut Self { - self.metadata = field; -self -} + pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { + self.object_lock_mode = field; + self + } -pub fn set_missing_meta(&mut self, field: Option) -> &mut Self { - self.missing_meta = field; -self -} + pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { + self.object_lock_retain_until_date = field; + self + } -pub fn set_object_lock_legal_hold_status(&mut self, field: Option) -> &mut Self { - self.object_lock_legal_hold_status = field; -self -} + pub fn set_parts_count(&mut self, field: Option) -> &mut Self { + self.parts_count = field; + self + } -pub fn set_object_lock_mode(&mut self, field: Option) -> &mut Self { - self.object_lock_mode = field; -self -} + pub fn set_replication_status(&mut self, field: Option) -> &mut Self { + self.replication_status = field; + self + } -pub fn set_object_lock_retain_until_date(&mut self, field: Option) -> &mut Self { - self.object_lock_retain_until_date = field; -self -} + pub fn set_request_charged(&mut self, field: Option) -> &mut Self { + self.request_charged = field; + self + } -pub fn set_parts_count(&mut self, field: Option) -> &mut Self { - self.parts_count = field; -self -} + pub fn set_request_route(&mut self, field: RequestRoute) -> &mut Self { + self.request_route = Some(field); + self + } -pub fn set_replication_status(&mut self, field: Option) -> &mut Self { - self.replication_status = field; -self -} + pub fn set_request_token(&mut self, field: RequestToken) -> &mut Self { + self.request_token = Some(field); + self + } -pub fn set_request_charged(&mut self, field: Option) -> &mut Self { - self.request_charged = field; -self -} + pub fn set_restore(&mut self, field: Option) -> &mut Self { + self.restore = field; + self + } -pub fn set_request_route(&mut self, field: RequestRoute) -> &mut Self { - self.request_route = Some(field); -self -} + pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { + self.sse_customer_algorithm = field; + self + } -pub fn set_request_token(&mut self, field: RequestToken) -> &mut Self { - self.request_token = Some(field); -self -} + pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { + self.sse_customer_key_md5 = field; + self + } -pub fn set_restore(&mut self, field: Option) -> &mut Self { - self.restore = field; -self -} + pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { + self.ssekms_key_id = field; + self + } -pub fn set_sse_customer_algorithm(&mut self, field: Option) -> &mut Self { - self.sse_customer_algorithm = field; -self -} + pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { + self.server_side_encryption = field; + self + } -pub fn set_sse_customer_key_md5(&mut self, field: Option) -> &mut Self { - self.sse_customer_key_md5 = field; -self -} + pub fn set_status_code(&mut self, field: Option) -> &mut Self { + self.status_code = field; + self + } -pub fn set_ssekms_key_id(&mut self, field: Option) -> &mut Self { - self.ssekms_key_id = field; -self -} + pub fn set_storage_class(&mut self, field: Option) -> &mut Self { + self.storage_class = field; + self + } -pub fn set_server_side_encryption(&mut self, field: Option) -> &mut Self { - self.server_side_encryption = field; -self -} + pub fn set_tag_count(&mut self, field: Option) -> &mut Self { + self.tag_count = field; + self + } -pub fn set_status_code(&mut self, field: Option) -> &mut Self { - self.status_code = field; -self -} + pub fn set_version_id(&mut self, field: Option) -> &mut Self { + self.version_id = field; + self + } -pub fn set_storage_class(&mut self, field: Option) -> &mut Self { - self.storage_class = field; -self -} + #[must_use] + pub fn accept_ranges(mut self, field: Option) -> Self { + self.accept_ranges = field; + self + } -pub fn set_tag_count(&mut self, field: Option) -> &mut Self { - self.tag_count = field; -self -} + #[must_use] + pub fn body(mut self, field: Option) -> Self { + self.body = field; + self + } -pub fn set_version_id(&mut self, field: Option) -> &mut Self { - self.version_id = field; -self -} + #[must_use] + pub fn bucket_key_enabled(mut self, field: Option) -> Self { + self.bucket_key_enabled = field; + self + } -#[must_use] -pub fn accept_ranges(mut self, field: Option) -> Self { - self.accept_ranges = field; -self -} + #[must_use] + pub fn cache_control(mut self, field: Option) -> Self { + self.cache_control = field; + self + } -#[must_use] -pub fn body(mut self, field: Option) -> Self { - self.body = field; -self -} + #[must_use] + pub fn checksum_crc32(mut self, field: Option) -> Self { + self.checksum_crc32 = field; + self + } -#[must_use] -pub fn bucket_key_enabled(mut self, field: Option) -> Self { - self.bucket_key_enabled = field; -self -} + #[must_use] + pub fn checksum_crc32c(mut self, field: Option) -> Self { + self.checksum_crc32c = field; + self + } -#[must_use] -pub fn cache_control(mut self, field: Option) -> Self { - self.cache_control = field; -self -} + #[must_use] + pub fn checksum_crc64nvme(mut self, field: Option) -> Self { + self.checksum_crc64nvme = field; + self + } -#[must_use] -pub fn checksum_crc32(mut self, field: Option) -> Self { - self.checksum_crc32 = field; -self -} + #[must_use] + pub fn checksum_sha1(mut self, field: Option) -> Self { + self.checksum_sha1 = field; + self + } -#[must_use] -pub fn checksum_crc32c(mut self, field: Option) -> Self { - self.checksum_crc32c = field; -self -} + #[must_use] + pub fn checksum_sha256(mut self, field: Option) -> Self { + self.checksum_sha256 = field; + self + } -#[must_use] -pub fn checksum_crc64nvme(mut self, field: Option) -> Self { - self.checksum_crc64nvme = field; -self -} + #[must_use] + pub fn content_disposition(mut self, field: Option) -> Self { + self.content_disposition = field; + self + } -#[must_use] -pub fn checksum_sha1(mut self, field: Option) -> Self { - self.checksum_sha1 = field; -self -} + #[must_use] + pub fn content_encoding(mut self, field: Option) -> Self { + self.content_encoding = field; + self + } -#[must_use] -pub fn checksum_sha256(mut self, field: Option) -> Self { - self.checksum_sha256 = field; -self -} + #[must_use] + pub fn content_language(mut self, field: Option) -> Self { + self.content_language = field; + self + } -#[must_use] -pub fn content_disposition(mut self, field: Option) -> Self { - self.content_disposition = field; -self -} + #[must_use] + pub fn content_length(mut self, field: Option) -> Self { + self.content_length = field; + self + } -#[must_use] -pub fn content_encoding(mut self, field: Option) -> Self { - self.content_encoding = field; -self -} + #[must_use] + pub fn content_range(mut self, field: Option) -> Self { + self.content_range = field; + self + } -#[must_use] -pub fn content_language(mut self, field: Option) -> Self { - self.content_language = field; -self -} + #[must_use] + pub fn content_type(mut self, field: Option) -> Self { + self.content_type = field; + self + } -#[must_use] -pub fn content_length(mut self, field: Option) -> Self { - self.content_length = field; -self -} + #[must_use] + pub fn delete_marker(mut self, field: Option) -> Self { + self.delete_marker = field; + self + } -#[must_use] -pub fn content_range(mut self, field: Option) -> Self { - self.content_range = field; -self -} + #[must_use] + pub fn e_tag(mut self, field: Option) -> Self { + self.e_tag = field; + self + } -#[must_use] -pub fn content_type(mut self, field: Option) -> Self { - self.content_type = field; -self -} + #[must_use] + pub fn error_code(mut self, field: Option) -> Self { + self.error_code = field; + self + } -#[must_use] -pub fn delete_marker(mut self, field: Option) -> Self { - self.delete_marker = field; -self -} + #[must_use] + pub fn error_message(mut self, field: Option) -> Self { + self.error_message = field; + self + } -#[must_use] -pub fn e_tag(mut self, field: Option) -> Self { - self.e_tag = field; -self -} + #[must_use] + pub fn expiration(mut self, field: Option) -> Self { + self.expiration = field; + self + } -#[must_use] -pub fn error_code(mut self, field: Option) -> Self { - self.error_code = field; -self -} + #[must_use] + pub fn expires(mut self, field: Option) -> Self { + self.expires = field; + self + } -#[must_use] -pub fn error_message(mut self, field: Option) -> Self { - self.error_message = field; -self -} + #[must_use] + pub fn last_modified(mut self, field: Option) -> Self { + self.last_modified = field; + self + } -#[must_use] -pub fn expiration(mut self, field: Option) -> Self { - self.expiration = field; -self -} + #[must_use] + pub fn metadata(mut self, field: Option) -> Self { + self.metadata = field; + self + } -#[must_use] -pub fn expires(mut self, field: Option) -> Self { - self.expires = field; -self -} + #[must_use] + pub fn missing_meta(mut self, field: Option) -> Self { + self.missing_meta = field; + self + } -#[must_use] -pub fn last_modified(mut self, field: Option) -> Self { - self.last_modified = field; -self -} + #[must_use] + pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { + self.object_lock_legal_hold_status = field; + self + } -#[must_use] -pub fn metadata(mut self, field: Option) -> Self { - self.metadata = field; -self -} + #[must_use] + pub fn object_lock_mode(mut self, field: Option) -> Self { + self.object_lock_mode = field; + self + } -#[must_use] -pub fn missing_meta(mut self, field: Option) -> Self { - self.missing_meta = field; -self -} + #[must_use] + pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { + self.object_lock_retain_until_date = field; + self + } -#[must_use] -pub fn object_lock_legal_hold_status(mut self, field: Option) -> Self { - self.object_lock_legal_hold_status = field; -self -} + #[must_use] + pub fn parts_count(mut self, field: Option) -> Self { + self.parts_count = field; + self + } -#[must_use] -pub fn object_lock_mode(mut self, field: Option) -> Self { - self.object_lock_mode = field; -self -} + #[must_use] + pub fn replication_status(mut self, field: Option) -> Self { + self.replication_status = field; + self + } -#[must_use] -pub fn object_lock_retain_until_date(mut self, field: Option) -> Self { - self.object_lock_retain_until_date = field; -self -} + #[must_use] + pub fn request_charged(mut self, field: Option) -> Self { + self.request_charged = field; + self + } -#[must_use] -pub fn parts_count(mut self, field: Option) -> Self { - self.parts_count = field; -self -} + #[must_use] + pub fn request_route(mut self, field: RequestRoute) -> Self { + self.request_route = Some(field); + self + } -#[must_use] -pub fn replication_status(mut self, field: Option) -> Self { - self.replication_status = field; -self -} + #[must_use] + pub fn request_token(mut self, field: RequestToken) -> Self { + self.request_token = Some(field); + self + } -#[must_use] -pub fn request_charged(mut self, field: Option) -> Self { - self.request_charged = field; -self -} + #[must_use] + pub fn restore(mut self, field: Option) -> Self { + self.restore = field; + self + } -#[must_use] -pub fn request_route(mut self, field: RequestRoute) -> Self { - self.request_route = Some(field); -self -} + #[must_use] + pub fn sse_customer_algorithm(mut self, field: Option) -> Self { + self.sse_customer_algorithm = field; + self + } -#[must_use] -pub fn request_token(mut self, field: RequestToken) -> Self { - self.request_token = Some(field); -self -} + #[must_use] + pub fn sse_customer_key_md5(mut self, field: Option) -> Self { + self.sse_customer_key_md5 = field; + self + } -#[must_use] -pub fn restore(mut self, field: Option) -> Self { - self.restore = field; -self -} + #[must_use] + pub fn ssekms_key_id(mut self, field: Option) -> Self { + self.ssekms_key_id = field; + self + } -#[must_use] -pub fn sse_customer_algorithm(mut self, field: Option) -> Self { - self.sse_customer_algorithm = field; -self -} - -#[must_use] -pub fn sse_customer_key_md5(mut self, field: Option) -> Self { - self.sse_customer_key_md5 = field; -self -} - -#[must_use] -pub fn ssekms_key_id(mut self, field: Option) -> Self { - self.ssekms_key_id = field; -self -} - -#[must_use] -pub fn server_side_encryption(mut self, field: Option) -> Self { - self.server_side_encryption = field; -self -} - -#[must_use] -pub fn status_code(mut self, field: Option) -> Self { - self.status_code = field; -self -} - -#[must_use] -pub fn storage_class(mut self, field: Option) -> Self { - self.storage_class = field; -self -} - -#[must_use] -pub fn tag_count(mut self, field: Option) -> Self { - self.tag_count = field; -self -} - -#[must_use] -pub fn version_id(mut self, field: Option) -> Self { - self.version_id = field; -self -} - -pub fn build(self) -> Result { -let accept_ranges = self.accept_ranges; -let body = self.body; -let bucket_key_enabled = self.bucket_key_enabled; -let cache_control = self.cache_control; -let checksum_crc32 = self.checksum_crc32; -let checksum_crc32c = self.checksum_crc32c; -let checksum_crc64nvme = self.checksum_crc64nvme; -let checksum_sha1 = self.checksum_sha1; -let checksum_sha256 = self.checksum_sha256; -let content_disposition = self.content_disposition; -let content_encoding = self.content_encoding; -let content_language = self.content_language; -let content_length = self.content_length; -let content_range = self.content_range; -let content_type = self.content_type; -let delete_marker = self.delete_marker; -let e_tag = self.e_tag; -let error_code = self.error_code; -let error_message = self.error_message; -let expiration = self.expiration; -let expires = self.expires; -let last_modified = self.last_modified; -let metadata = self.metadata; -let missing_meta = self.missing_meta; -let object_lock_legal_hold_status = self.object_lock_legal_hold_status; -let object_lock_mode = self.object_lock_mode; -let object_lock_retain_until_date = self.object_lock_retain_until_date; -let parts_count = self.parts_count; -let replication_status = self.replication_status; -let request_charged = self.request_charged; -let request_route = self.request_route.ok_or_else(|| BuildError::missing_field("request_route"))?; -let request_token = self.request_token.ok_or_else(|| BuildError::missing_field("request_token"))?; -let restore = self.restore; -let sse_customer_algorithm = self.sse_customer_algorithm; -let sse_customer_key_md5 = self.sse_customer_key_md5; -let ssekms_key_id = self.ssekms_key_id; -let server_side_encryption = self.server_side_encryption; -let status_code = self.status_code; -let storage_class = self.storage_class; -let tag_count = self.tag_count; -let version_id = self.version_id; -Ok(WriteGetObjectResponseInput { -accept_ranges, -body, -bucket_key_enabled, -cache_control, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_range, -content_type, -delete_marker, -e_tag, -error_code, -error_message, -expiration, -expires, -last_modified, -metadata, -missing_meta, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -parts_count, -replication_status, -request_charged, -request_route, -request_token, -restore, -sse_customer_algorithm, -sse_customer_key_md5, -ssekms_key_id, -server_side_encryption, -status_code, -storage_class, -tag_count, -version_id, -}) -} + #[must_use] + pub fn server_side_encryption(mut self, field: Option) -> Self { + self.server_side_encryption = field; + self + } -} + #[must_use] + pub fn status_code(mut self, field: Option) -> Self { + self.status_code = field; + self + } + #[must_use] + pub fn storage_class(mut self, field: Option) -> Self { + self.storage_class = field; + self + } + #[must_use] + pub fn tag_count(mut self, field: Option) -> Self { + self.tag_count = field; + self + } + + #[must_use] + pub fn version_id(mut self, field: Option) -> Self { + self.version_id = field; + self + } + + pub fn build(self) -> Result { + let accept_ranges = self.accept_ranges; + let body = self.body; + let bucket_key_enabled = self.bucket_key_enabled; + let cache_control = self.cache_control; + let checksum_crc32 = self.checksum_crc32; + let checksum_crc32c = self.checksum_crc32c; + let checksum_crc64nvme = self.checksum_crc64nvme; + let checksum_sha1 = self.checksum_sha1; + let checksum_sha256 = self.checksum_sha256; + let content_disposition = self.content_disposition; + let content_encoding = self.content_encoding; + let content_language = self.content_language; + let content_length = self.content_length; + let content_range = self.content_range; + let content_type = self.content_type; + let delete_marker = self.delete_marker; + let e_tag = self.e_tag; + let error_code = self.error_code; + let error_message = self.error_message; + let expiration = self.expiration; + let expires = self.expires; + let last_modified = self.last_modified; + let metadata = self.metadata; + let missing_meta = self.missing_meta; + let object_lock_legal_hold_status = self.object_lock_legal_hold_status; + let object_lock_mode = self.object_lock_mode; + let object_lock_retain_until_date = self.object_lock_retain_until_date; + let parts_count = self.parts_count; + let replication_status = self.replication_status; + let request_charged = self.request_charged; + let request_route = self.request_route.ok_or_else(|| BuildError::missing_field("request_route"))?; + let request_token = self.request_token.ok_or_else(|| BuildError::missing_field("request_token"))?; + let restore = self.restore; + let sse_customer_algorithm = self.sse_customer_algorithm; + let sse_customer_key_md5 = self.sse_customer_key_md5; + let ssekms_key_id = self.ssekms_key_id; + let server_side_encryption = self.server_side_encryption; + let status_code = self.status_code; + let storage_class = self.storage_class; + let tag_count = self.tag_count; + let version_id = self.version_id; + Ok(WriteGetObjectResponseInput { + accept_ranges, + body, + bucket_key_enabled, + cache_control, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_range, + content_type, + delete_marker, + e_tag, + error_code, + error_message, + expiration, + expires, + last_modified, + metadata, + missing_meta, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + parts_count, + replication_status, + request_charged, + request_route, + request_token, + restore, + sse_customer_algorithm, + sse_customer_key_md5, + ssekms_key_id, + server_side_encryption, + status_code, + storage_class, + tag_count, + version_id, + }) + } + } } -pub trait DtoExt { - /// Modifies all empty string fields from `Some("")` to `None` - fn ignore_empty_strings(&mut self); -} -impl DtoExt for AbortIncompleteMultipartUpload { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for AbortMultipartUploadInput { - fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -} -} -impl DtoExt for AbortMultipartUploadOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} -} -impl DtoExt for AccelerateConfiguration { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; -} -} -} -impl DtoExt for AccessControlPolicy { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -} -} -impl DtoExt for AccessControlTranslation { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for AnalyticsAndOperator { - fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} -} -impl DtoExt for AnalyticsConfiguration { - fn ignore_empty_strings(&mut self) { -self.storage_class_analysis.ignore_empty_strings(); -} -} -impl DtoExt for AnalyticsExportDestination { - fn ignore_empty_strings(&mut self) { -self.s3_bucket_destination.ignore_empty_strings(); -} -} -impl DtoExt for AnalyticsS3BucketDestination { - fn ignore_empty_strings(&mut self) { -if self.bucket_account_id.as_deref() == Some("") { - self.bucket_account_id = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} -} -impl DtoExt for AssumeRoleOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.assumed_role_user { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.credentials { -val.ignore_empty_strings(); -} -if self.source_identity.as_deref() == Some("") { - self.source_identity = None; -} -} -} -impl DtoExt for AssumedRoleUser { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for Bucket { - fn ignore_empty_strings(&mut self) { -if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; -} -if self.name.as_deref() == Some("") { - self.name = None; -} -} -} -impl DtoExt for BucketInfo { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.data_redundancy - && val.as_str() == "" { - self.data_redundancy = None; -} -if let Some(ref val) = self.type_ - && val.as_str() == "" { - self.type_ = None; -} -} -} -impl DtoExt for BucketLifecycleConfiguration { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for BucketLoggingStatus { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.logging_enabled { -val.ignore_empty_strings(); -} -} -} -impl DtoExt for CORSConfiguration { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for CORSRule { - fn ignore_empty_strings(&mut self) { -if self.id.as_deref() == Some("") { - self.id = None; -} -} -} -impl DtoExt for CSVInput { - fn ignore_empty_strings(&mut self) { -if self.comments.as_deref() == Some("") { - self.comments = None; -} -if self.field_delimiter.as_deref() == Some("") { - self.field_delimiter = None; -} -if let Some(ref val) = self.file_header_info - && val.as_str() == "" { - self.file_header_info = None; -} -if self.quote_character.as_deref() == Some("") { - self.quote_character = None; -} -if self.quote_escape_character.as_deref() == Some("") { - self.quote_escape_character = None; -} -if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; -} -} -} -impl DtoExt for CSVOutput { - fn ignore_empty_strings(&mut self) { -if self.field_delimiter.as_deref() == Some("") { - self.field_delimiter = None; -} -if self.quote_character.as_deref() == Some("") { - self.quote_character = None; -} -if self.quote_escape_character.as_deref() == Some("") { - self.quote_escape_character = None; -} -if let Some(ref val) = self.quote_fields - && val.as_str() == "" { - self.quote_fields = None; -} -if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; -} -} -} -impl DtoExt for Checksum { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -} -} -impl DtoExt for CommonPrefix { - fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} -} -impl DtoExt for CompleteMultipartUploadInput { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref mut val) = self.multipart_upload { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -} -} -impl DtoExt for CompleteMultipartUploadOutput { - fn ignore_empty_strings(&mut self) { -if self.bucket.as_deref() == Some("") { - self.bucket = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if self.key.as_deref() == Some("") { - self.key = None; -} -if self.location.as_deref() == Some("") { - self.location = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} -} -impl DtoExt for CompletedMultipartUpload { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for CompletedPart { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -} -} -impl DtoExt for Condition { - fn ignore_empty_strings(&mut self) { -if self.http_error_code_returned_equals.as_deref() == Some("") { - self.http_error_code_returned_equals = None; -} -if self.key_prefix_equals.as_deref() == Some("") { - self.key_prefix_equals = None; -} -} -} -impl DtoExt for CopyObjectInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { - self.copy_source_sse_customer_algorithm = None; -} -if self.copy_source_sse_customer_key.as_deref() == Some("") { - self.copy_source_sse_customer_key = None; -} -if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { - self.copy_source_sse_customer_key_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.expected_source_bucket_owner.as_deref() == Some("") { - self.expected_source_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -if let Some(ref val) = self.metadata_directive - && val.as_str() == "" { - self.metadata_directive = None; -} -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; -} -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.tagging.as_deref() == Some("") { - self.tagging = None; -} -if let Some(ref val) = self.tagging_directive - && val.as_str() == "" { - self.tagging_directive = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; -} -} -} -impl DtoExt for CopyObjectOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.copy_object_result { -val.ignore_empty_strings(); -} -if self.copy_source_version_id.as_deref() == Some("") { - self.copy_source_version_id = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} -} -impl DtoExt for CopyObjectResult { - fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} +pub trait DtoExt { + /// Modifies all empty string fields from `Some("")` to `None` + fn ignore_empty_strings(&mut self); } +impl DtoExt for AbortIncompleteMultipartUpload { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for CopyPartResult { +impl DtoExt for AbortMultipartUploadInput { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } -impl DtoExt for CreateBucketConfiguration { +impl DtoExt for AbortMultipartUploadOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.bucket { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.location { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.location_constraint - && val.as_str() == "" { - self.location_constraint = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } -impl DtoExt for CreateBucketInput { +impl DtoExt for AccelerateConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if let Some(ref mut val) = self.create_bucket_configuration { -val.ignore_empty_strings(); -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write.as_deref() == Some("") { - self.grant_write = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -if let Some(ref val) = self.object_ownership - && val.as_str() == "" { - self.object_ownership = None; -} -} + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } -impl DtoExt for CreateBucketMetadataTableConfigurationInput { +impl DtoExt for AccessControlPolicy { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.metadata_table_configuration.ignore_empty_strings(); + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + } } +impl DtoExt for AccessControlTranslation { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for CreateBucketOutput { +impl DtoExt for AnalyticsAndOperator { fn ignore_empty_strings(&mut self) { -if self.location.as_deref() == Some("") { - self.location = None; -} -} + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } -impl DtoExt for CreateMultipartUploadInput { +impl DtoExt for AnalyticsConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; + self.storage_class_analysis.ignore_empty_strings(); + } } -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; +impl DtoExt for AnalyticsExportDestination { + fn ignore_empty_strings(&mut self) { + self.s3_bucket_destination.ignore_empty_strings(); + } } -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; +impl DtoExt for AnalyticsS3BucketDestination { + fn ignore_empty_strings(&mut self) { + if self.bucket_account_id.as_deref() == Some("") { + self.bucket_account_id = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; +impl DtoExt for AssumeRoleOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.assumed_role_user { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.credentials { + val.ignore_empty_strings(); + } + if self.source_identity.as_deref() == Some("") { + self.source_identity = None; + } + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; +impl DtoExt for AssumedRoleUser { + fn ignore_empty_strings(&mut self) {} } -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; +impl DtoExt for Bucket { + fn ignore_empty_strings(&mut self) { + if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; + } + if self.name.as_deref() == Some("") { + self.name = None; + } + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; +impl DtoExt for BucketInfo { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.data_redundancy + && val.as_str() == "" + { + self.data_redundancy = None; + } + if let Some(ref val) = self.type_ + && val.as_str() == "" + { + self.type_ = None; + } + } } -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; +impl DtoExt for BucketLifecycleConfiguration { + fn ignore_empty_strings(&mut self) {} } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; +impl DtoExt for BucketLoggingStatus { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.logging_enabled { + val.ignore_empty_strings(); + } + } } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; +impl DtoExt for CORSConfiguration { + fn ignore_empty_strings(&mut self) {} } -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; +impl DtoExt for CORSRule { + fn ignore_empty_strings(&mut self) { + if self.id.as_deref() == Some("") { + self.id = None; + } + } } -if self.tagging.as_deref() == Some("") { - self.tagging = None; +impl DtoExt for CSVInput { + fn ignore_empty_strings(&mut self) { + if self.comments.as_deref() == Some("") { + self.comments = None; + } + if self.field_delimiter.as_deref() == Some("") { + self.field_delimiter = None; + } + if let Some(ref val) = self.file_header_info + && val.as_str() == "" + { + self.file_header_info = None; + } + if self.quote_character.as_deref() == Some("") { + self.quote_character = None; + } + if self.quote_escape_character.as_deref() == Some("") { + self.quote_escape_character = None; + } + if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; + } + } } -if self.version_id.as_deref() == Some("") { - self.version_id = None; +impl DtoExt for CSVOutput { + fn ignore_empty_strings(&mut self) { + if self.field_delimiter.as_deref() == Some("") { + self.field_delimiter = None; + } + if self.quote_character.as_deref() == Some("") { + self.quote_character = None; + } + if self.quote_escape_character.as_deref() == Some("") { + self.quote_escape_character = None; + } + if let Some(ref val) = self.quote_fields + && val.as_str() == "" + { + self.quote_fields = None; + } + if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; + } + } } -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; +impl DtoExt for Checksum { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + } } +impl DtoExt for CommonPrefix { + fn ignore_empty_strings(&mut self) { + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } +impl DtoExt for CompleteMultipartUploadInput { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref mut val) = self.multipart_upload { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + } } -impl DtoExt for CreateMultipartUploadOutput { +impl DtoExt for CompleteMultipartUploadOutput { fn ignore_empty_strings(&mut self) { -if self.abort_rule_id.as_deref() == Some("") { - self.abort_rule_id = None; + if self.bucket.as_deref() == Some("") { + self.bucket = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if self.location.as_deref() == Some("") { + self.location = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if self.bucket.as_deref() == Some("") { - self.bucket = None; +impl DtoExt for CompletedMultipartUpload { + fn ignore_empty_strings(&mut self) {} } -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; +impl DtoExt for CompletedPart { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + } } -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; +impl DtoExt for Condition { + fn ignore_empty_strings(&mut self) { + if self.http_error_code_returned_equals.as_deref() == Some("") { + self.http_error_code_returned_equals = None; + } + if self.key_prefix_equals.as_deref() == Some("") { + self.key_prefix_equals = None; + } + } } -if self.key.as_deref() == Some("") { - self.key = None; +impl DtoExt for CopyObjectInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { + self.copy_source_sse_customer_algorithm = None; + } + if self.copy_source_sse_customer_key.as_deref() == Some("") { + self.copy_source_sse_customer_key = None; + } + if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { + self.copy_source_sse_customer_key_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.expected_source_bucket_owner.as_deref() == Some("") { + self.expected_source_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.metadata_directive + && val.as_str() == "" + { + self.metadata_directive = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.tagging.as_deref() == Some("") { + self.tagging = None; + } + if let Some(ref val) = self.tagging_directive + && val.as_str() == "" + { + self.tagging_directive = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; +impl DtoExt for CopyObjectOutput { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.copy_object_result { + val.ignore_empty_strings(); + } + if self.copy_source_version_id.as_deref() == Some("") { + self.copy_source_version_id = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; +impl DtoExt for CopyObjectResult { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + } } -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; +impl DtoExt for CopyPartResult { + fn ignore_empty_strings(&mut self) { + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + } } -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; +impl DtoExt for CreateBucketConfiguration { + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.bucket { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.location { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.location_constraint + && val.as_str() == "" + { + self.location_constraint = None; + } + } } -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; +impl DtoExt for CreateBucketInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if let Some(ref mut val) = self.create_bucket_configuration { + val.ignore_empty_strings(); + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write.as_deref() == Some("") { + self.grant_write = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.object_ownership + && val.as_str() == "" + { + self.object_ownership = None; + } + } } -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; +impl DtoExt for CreateBucketMetadataTableConfigurationInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.metadata_table_configuration.ignore_empty_strings(); + } } -if self.upload_id.as_deref() == Some("") { - self.upload_id = None; +impl DtoExt for CreateBucketOutput { + fn ignore_empty_strings(&mut self) { + if self.location.as_deref() == Some("") { + self.location = None; + } + } } +impl DtoExt for CreateMultipartUploadInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.tagging.as_deref() == Some("") { + self.tagging = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } +impl DtoExt for CreateMultipartUploadOutput { + fn ignore_empty_strings(&mut self) { + if self.abort_rule_id.as_deref() == Some("") { + self.abort_rule_id = None; + } + if self.bucket.as_deref() == Some("") { + self.bucket = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.upload_id.as_deref() == Some("") { + self.upload_id = None; + } + } } impl DtoExt for CreateSessionInput { fn ignore_empty_strings(&mut self) { -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.session_mode - && val.as_str() == "" { - self.session_mode = None; -} -} + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.session_mode + && val.as_str() == "" + { + self.session_mode = None; + } + } } impl DtoExt for CreateSessionOutput { fn ignore_empty_strings(&mut self) { -self.credentials.ignore_empty_strings(); -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -} + self.credentials.ignore_empty_strings(); + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + } } impl DtoExt for Credentials { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for DefaultRetention { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.mode - && val.as_str() == "" { - self.mode = None; -} -} + if let Some(ref val) = self.mode + && val.as_str() == "" + { + self.mode = None; + } + } } impl DtoExt for DelMarkerExpiration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for Delete { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for DeleteBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketCorsInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketEncryptionInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketIntelligentTieringConfigurationInput { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for DeleteBucketInventoryConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketLifecycleInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketMetadataTableConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketOwnershipControlsInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketPolicyInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketReplicationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketTaggingInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteBucketWebsiteInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteMarkerEntry { fn ignore_empty_strings(&mut self) { -if self.key.as_deref() == Some("") { - self.key = None; -} -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for DeleteMarkerReplication { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; -} -} + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } impl DtoExt for DeleteObjectInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.mfa.as_deref() == Some("") { - self.mfa = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.mfa.as_deref() == Some("") { + self.mfa = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for DeleteObjectOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for DeleteObjectTaggingInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for DeleteObjectTaggingOutput { fn ignore_empty_strings(&mut self) { -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for DeleteObjectsInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -self.delete.ignore_empty_strings(); -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.mfa.as_deref() == Some("") { - self.mfa = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + self.delete.ignore_empty_strings(); + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.mfa.as_deref() == Some("") { + self.mfa = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } impl DtoExt for DeleteObjectsOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for DeletePublicAccessBlockInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for DeleteReplication { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for DeletedObject { fn ignore_empty_strings(&mut self) { -if self.delete_marker_version_id.as_deref() == Some("") { - self.delete_marker_version_id = None; -} -if self.key.as_deref() == Some("") { - self.key = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.delete_marker_version_id.as_deref() == Some("") { + self.delete_marker_version_id = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for Destination { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.access_control_translation { -val.ignore_empty_strings(); -} -if self.account.as_deref() == Some("") { - self.account = None; -} -if let Some(ref mut val) = self.encryption_configuration { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.metrics { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.replication_time { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -} + if let Some(ref mut val) = self.access_control_translation { + val.ignore_empty_strings(); + } + if self.account.as_deref() == Some("") { + self.account = None; + } + if let Some(ref mut val) = self.encryption_configuration { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.metrics { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.replication_time { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } impl DtoExt for Encryption { fn ignore_empty_strings(&mut self) { -if self.kms_context.as_deref() == Some("") { - self.kms_context = None; -} -if self.kms_key_id.as_deref() == Some("") { - self.kms_key_id = None; -} -} + if self.kms_context.as_deref() == Some("") { + self.kms_context = None; + } + if self.kms_key_id.as_deref() == Some("") { + self.kms_key_id = None; + } + } } impl DtoExt for EncryptionConfiguration { fn ignore_empty_strings(&mut self) { -if self.replica_kms_key_id.as_deref() == Some("") { - self.replica_kms_key_id = None; -} -} + if self.replica_kms_key_id.as_deref() == Some("") { + self.replica_kms_key_id = None; + } + } } impl DtoExt for Error { fn ignore_empty_strings(&mut self) { -if self.code.as_deref() == Some("") { - self.code = None; -} -if self.key.as_deref() == Some("") { - self.key = None; -} -if self.message.as_deref() == Some("") { - self.message = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.code.as_deref() == Some("") { + self.code = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if self.message.as_deref() == Some("") { + self.message = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for ErrorDetails { fn ignore_empty_strings(&mut self) { -if self.error_code.as_deref() == Some("") { - self.error_code = None; -} -if self.error_message.as_deref() == Some("") { - self.error_message = None; -} -} + if self.error_code.as_deref() == Some("") { + self.error_code = None; + } + if self.error_message.as_deref() == Some("") { + self.error_message = None; + } + } } impl DtoExt for ErrorDocument { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ExcludedPrefix { fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for ExistingObjectReplication { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for FilterRule { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.name - && val.as_str() == "" { - self.name = None; -} -if self.value.as_deref() == Some("") { - self.value = None; -} -} + if let Some(ref val) = self.name + && val.as_str() == "" + { + self.name = None; + } + if self.value.as_deref() == Some("") { + self.value = None; + } + } } impl DtoExt for GetBucketAccelerateConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } impl DtoExt for GetBucketAccelerateConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } impl DtoExt for GetBucketAclInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketAclOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketAnalyticsConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.analytics_configuration { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.analytics_configuration { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketCorsInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketCorsOutput { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for GetBucketEncryptionInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketEncryptionOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.server_side_encryption_configuration { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.server_side_encryption_configuration { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketIntelligentTieringConfigurationInput { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for GetBucketIntelligentTieringConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.intelligent_tiering_configuration { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.intelligent_tiering_configuration { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketInventoryConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketInventoryConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.inventory_configuration { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.inventory_configuration { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketLifecycleConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketLifecycleConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" { - self.transition_default_minimum_object_size = None; -} -} + if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" + { + self.transition_default_minimum_object_size = None; + } + } } impl DtoExt for GetBucketLocationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketLocationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.location_constraint - && val.as_str() == "" { - self.location_constraint = None; -} -} + if let Some(ref val) = self.location_constraint + && val.as_str() == "" + { + self.location_constraint = None; + } + } } impl DtoExt for GetBucketLoggingInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketLoggingOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.logging_enabled { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.logging_enabled { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketMetadataTableConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketMetadataTableConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.get_bucket_metadata_table_configuration_result { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.get_bucket_metadata_table_configuration_result { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketMetadataTableConfigurationResult { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.error { -val.ignore_empty_strings(); -} -self.metadata_table_configuration_result.ignore_empty_strings(); -} + if let Some(ref mut val) = self.error { + val.ignore_empty_strings(); + } + self.metadata_table_configuration_result.ignore_empty_strings(); + } } impl DtoExt for GetBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketMetricsConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.metrics_configuration { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.metrics_configuration { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketNotificationConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketNotificationConfigurationOutput { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for GetBucketOwnershipControlsInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketOwnershipControlsOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.ownership_controls { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.ownership_controls { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketPolicyInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketPolicyOutput { fn ignore_empty_strings(&mut self) { -if self.policy.as_deref() == Some("") { - self.policy = None; -} -} + if self.policy.as_deref() == Some("") { + self.policy = None; + } + } } impl DtoExt for GetBucketPolicyStatusInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketPolicyStatusOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.policy_status { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.policy_status { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketReplicationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketReplicationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.replication_configuration { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.replication_configuration { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetBucketRequestPaymentInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketRequestPaymentOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.payer - && val.as_str() == "" { - self.payer = None; -} -} + if let Some(ref val) = self.payer + && val.as_str() == "" + { + self.payer = None; + } + } } impl DtoExt for GetBucketTaggingInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketTaggingOutput { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for GetBucketVersioningInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketVersioningOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.mfa_delete - && val.as_str() == "" { - self.mfa_delete = None; -} -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; -} -} + if let Some(ref val) = self.mfa_delete + && val.as_str() == "" + { + self.mfa_delete = None; + } + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } impl DtoExt for GetBucketWebsiteInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetBucketWebsiteOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.error_document { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.index_document { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.redirect_all_requests_to { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.error_document { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.index_document { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.redirect_all_requests_to { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetObjectAclInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for GetObjectAclOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for GetObjectAttributesInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for GetObjectAttributesOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.checksum { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.object_parts { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref mut val) = self.checksum { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.object_parts { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for GetObjectAttributesParts { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for GetObjectInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_mode - && val.as_str() == "" { - self.checksum_mode = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.response_cache_control.as_deref() == Some("") { - self.response_cache_control = None; -} -if self.response_content_disposition.as_deref() == Some("") { - self.response_content_disposition = None; -} -if self.response_content_encoding.as_deref() == Some("") { - self.response_content_encoding = None; -} -if self.response_content_language.as_deref() == Some("") { - self.response_content_language = None; -} -if self.response_content_type.as_deref() == Some("") { - self.response_content_type = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_mode + && val.as_str() == "" + { + self.checksum_mode = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.response_cache_control.as_deref() == Some("") { + self.response_cache_control = None; + } + if self.response_content_disposition.as_deref() == Some("") { + self.response_content_disposition = None; + } + if self.response_content_encoding.as_deref() == Some("") { + self.response_content_encoding = None; + } + if self.response_content_language.as_deref() == Some("") { + self.response_content_language = None; + } + if self.response_content_type.as_deref() == Some("") { + self.response_content_type = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for GetObjectLegalHoldInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for GetObjectLegalHoldOutput { - fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.legal_hold { -val.ignore_empty_strings(); -} -} + fn ignore_empty_strings(&mut self) { + if let Some(ref mut val) = self.legal_hold { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetObjectLockConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetObjectLockConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.object_lock_configuration { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.object_lock_configuration { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetObjectOutput { fn ignore_empty_strings(&mut self) { -if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.content_range.as_deref() == Some("") { - self.content_range = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; -} -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; -} -if let Some(ref val) = self.replication_status - && val.as_str() == "" { - self.replication_status = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.restore.as_deref() == Some("") { - self.restore = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; -} -} + if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_range.as_deref() == Some("") { + self.content_range = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.replication_status + && val.as_str() == "" + { + self.replication_status = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.restore.as_deref() == Some("") { + self.restore = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } impl DtoExt for GetObjectRetentionInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for GetObjectRetentionOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.retention { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.retention { + val.ignore_empty_strings(); + } + } } impl DtoExt for GetObjectTaggingInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for GetObjectTaggingOutput { fn ignore_empty_strings(&mut self) { -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for GetObjectTorrentInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } impl DtoExt for GetObjectTorrentOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for GetPublicAccessBlockInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for GetPublicAccessBlockOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.public_access_block_configuration { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.public_access_block_configuration { + val.ignore_empty_strings(); + } + } } impl DtoExt for GlacierJobParameters { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for Grant { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.grantee { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.permission - && val.as_str() == "" { - self.permission = None; -} -} + if let Some(ref mut val) = self.grantee { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.permission + && val.as_str() == "" + { + self.permission = None; + } + } } impl DtoExt for Grantee { fn ignore_empty_strings(&mut self) { -if self.display_name.as_deref() == Some("") { - self.display_name = None; -} -if self.email_address.as_deref() == Some("") { - self.email_address = None; -} -if self.id.as_deref() == Some("") { - self.id = None; -} -if self.uri.as_deref() == Some("") { - self.uri = None; -} -} + if self.display_name.as_deref() == Some("") { + self.display_name = None; + } + if self.email_address.as_deref() == Some("") { + self.email_address = None; + } + if self.id.as_deref() == Some("") { + self.id = None; + } + if self.uri.as_deref() == Some("") { + self.uri = None; + } + } } impl DtoExt for HeadBucketInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for HeadBucketOutput { fn ignore_empty_strings(&mut self) { -if self.bucket_location_name.as_deref() == Some("") { - self.bucket_location_name = None; -} -if let Some(ref val) = self.bucket_location_type - && val.as_str() == "" { - self.bucket_location_type = None; -} -if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; -} -} + if self.bucket_location_name.as_deref() == Some("") { + self.bucket_location_name = None; + } + if let Some(ref val) = self.bucket_location_type + && val.as_str() == "" + { + self.bucket_location_type = None; + } + if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; + } + } } impl DtoExt for HeadObjectInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_mode - && val.as_str() == "" { - self.checksum_mode = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.response_cache_control.as_deref() == Some("") { - self.response_cache_control = None; -} -if self.response_content_disposition.as_deref() == Some("") { - self.response_content_disposition = None; -} -if self.response_content_encoding.as_deref() == Some("") { - self.response_content_encoding = None; -} -if self.response_content_language.as_deref() == Some("") { - self.response_content_language = None; -} -if self.response_content_type.as_deref() == Some("") { - self.response_content_type = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_mode + && val.as_str() == "" + { + self.checksum_mode = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.response_cache_control.as_deref() == Some("") { + self.response_cache_control = None; + } + if self.response_content_disposition.as_deref() == Some("") { + self.response_content_disposition = None; + } + if self.response_content_encoding.as_deref() == Some("") { + self.response_content_encoding = None; + } + if self.response_content_language.as_deref() == Some("") { + self.response_content_language = None; + } + if self.response_content_type.as_deref() == Some("") { + self.response_content_type = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for HeadObjectOutput { fn ignore_empty_strings(&mut self) { -if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; -} -if let Some(ref val) = self.archive_status - && val.as_str() == "" { - self.archive_status = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.content_range.as_deref() == Some("") { - self.content_range = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; -} -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; -} -if let Some(ref val) = self.replication_status - && val.as_str() == "" { - self.replication_status = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.restore.as_deref() == Some("") { - self.restore = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; -} -} + if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; + } + if let Some(ref val) = self.archive_status + && val.as_str() == "" + { + self.archive_status = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_range.as_deref() == Some("") { + self.content_range = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.replication_status + && val.as_str() == "" + { + self.replication_status = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.restore.as_deref() == Some("") { + self.restore = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } impl DtoExt for IndexDocument { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for Initiator { fn ignore_empty_strings(&mut self) { -if self.display_name.as_deref() == Some("") { - self.display_name = None; -} -if self.id.as_deref() == Some("") { - self.id = None; -} -} + if self.display_name.as_deref() == Some("") { + self.display_name = None; + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } impl DtoExt for InputSerialization { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.csv { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.compression_type - && val.as_str() == "" { - self.compression_type = None; -} -if let Some(ref mut val) = self.json { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.csv { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.compression_type + && val.as_str() == "" + { + self.compression_type = None; + } + if let Some(ref mut val) = self.json { + val.ignore_empty_strings(); + } + } } impl DtoExt for IntelligentTieringAndOperator { fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for IntelligentTieringConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + } } impl DtoExt for IntelligentTieringFilter { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.and { -val.ignore_empty_strings(); -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref mut val) = self.tag { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.and { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref mut val) = self.tag { + val.ignore_empty_strings(); + } + } } impl DtoExt for InvalidObjectState { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.access_tier - && val.as_str() == "" { - self.access_tier = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -} + if let Some(ref val) = self.access_tier + && val.as_str() == "" + { + self.access_tier = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } impl DtoExt for InventoryConfiguration { fn ignore_empty_strings(&mut self) { -self.destination.ignore_empty_strings(); -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -self.schedule.ignore_empty_strings(); -} + self.destination.ignore_empty_strings(); + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + self.schedule.ignore_empty_strings(); + } } impl DtoExt for InventoryDestination { fn ignore_empty_strings(&mut self) { -self.s3_bucket_destination.ignore_empty_strings(); -} + self.s3_bucket_destination.ignore_empty_strings(); + } } impl DtoExt for InventoryEncryption { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.ssekms { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.ssekms { + val.ignore_empty_strings(); + } + } } impl DtoExt for InventoryFilter { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for InventoryS3BucketDestination { fn ignore_empty_strings(&mut self) { -if self.account_id.as_deref() == Some("") { - self.account_id = None; -} -if let Some(ref mut val) = self.encryption { -val.ignore_empty_strings(); -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.account_id.as_deref() == Some("") { + self.account_id = None; + } + if let Some(ref mut val) = self.encryption { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for InventorySchedule { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for JSONInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.type_ - && val.as_str() == "" { - self.type_ = None; -} -} + if let Some(ref val) = self.type_ + && val.as_str() == "" + { + self.type_ = None; + } + } } impl DtoExt for JSONOutput { fn ignore_empty_strings(&mut self) { -if self.record_delimiter.as_deref() == Some("") { - self.record_delimiter = None; -} -} + if self.record_delimiter.as_deref() == Some("") { + self.record_delimiter = None; + } + } } impl DtoExt for LambdaFunctionConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -if self.id.as_deref() == Some("") { - self.id = None; -} -} + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } impl DtoExt for LifecycleExpiration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for LifecycleRule { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.abort_incomplete_multipart_upload { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.del_marker_expiration { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.expiration { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -if self.id.as_deref() == Some("") { - self.id = None; -} -if let Some(ref mut val) = self.noncurrent_version_expiration { -val.ignore_empty_strings(); -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if let Some(ref mut val) = self.abort_incomplete_multipart_upload { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.del_marker_expiration { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.expiration { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + if let Some(ref mut val) = self.noncurrent_version_expiration { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for LifecycleRuleAndOperator { fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for LifecycleRuleFilter { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.and { -val.ignore_empty_strings(); -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref mut val) = self.tag { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.and { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref mut val) = self.tag { + val.ignore_empty_strings(); + } + } } impl DtoExt for ListBucketAnalyticsConfigurationsInput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for ListBucketAnalyticsConfigurationsOutput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + } } impl DtoExt for ListBucketIntelligentTieringConfigurationsInput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + } } impl DtoExt for ListBucketIntelligentTieringConfigurationsOutput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + } } impl DtoExt for ListBucketInventoryConfigurationsInput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for ListBucketInventoryConfigurationsOutput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + } } impl DtoExt for ListBucketMetricsConfigurationsInput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for ListBucketMetricsConfigurationsOutput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + } } impl DtoExt for ListBucketsInput { fn ignore_empty_strings(&mut self) { -if self.bucket_region.as_deref() == Some("") { - self.bucket_region = None; -} -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.bucket_region.as_deref() == Some("") { + self.bucket_region = None; + } + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for ListBucketsOutput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for ListDirectoryBucketsInput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + } } impl DtoExt for ListDirectoryBucketsOutput { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + } } impl DtoExt for ListMultipartUploadsInput { fn ignore_empty_strings(&mut self) { -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.key_marker.as_deref() == Some("") { - self.key_marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.upload_id_marker.as_deref() == Some("") { - self.upload_id_marker = None; -} -} + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.key_marker.as_deref() == Some("") { + self.key_marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.upload_id_marker.as_deref() == Some("") { + self.upload_id_marker = None; + } + } } impl DtoExt for ListMultipartUploadsOutput { fn ignore_empty_strings(&mut self) { -if self.bucket.as_deref() == Some("") { - self.bucket = None; -} -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.key_marker.as_deref() == Some("") { - self.key_marker = None; -} -if self.next_key_marker.as_deref() == Some("") { - self.next_key_marker = None; -} -if self.next_upload_id_marker.as_deref() == Some("") { - self.next_upload_id_marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.upload_id_marker.as_deref() == Some("") { - self.upload_id_marker = None; -} -} + if self.bucket.as_deref() == Some("") { + self.bucket = None; + } + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.key_marker.as_deref() == Some("") { + self.key_marker = None; + } + if self.next_key_marker.as_deref() == Some("") { + self.next_key_marker = None; + } + if self.next_upload_id_marker.as_deref() == Some("") { + self.next_upload_id_marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.upload_id_marker.as_deref() == Some("") { + self.upload_id_marker = None; + } + } } impl DtoExt for ListObjectVersionsInput { fn ignore_empty_strings(&mut self) { -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.key_marker.as_deref() == Some("") { - self.key_marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id_marker.as_deref() == Some("") { - self.version_id_marker = None; -} -} + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.key_marker.as_deref() == Some("") { + self.key_marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id_marker.as_deref() == Some("") { + self.version_id_marker = None; + } + } } impl DtoExt for ListObjectVersionsOutput { fn ignore_empty_strings(&mut self) { -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.key_marker.as_deref() == Some("") { - self.key_marker = None; -} -if self.name.as_deref() == Some("") { - self.name = None; -} -if self.next_key_marker.as_deref() == Some("") { - self.next_key_marker = None; -} -if self.next_version_id_marker.as_deref() == Some("") { - self.next_version_id_marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.version_id_marker.as_deref() == Some("") { - self.version_id_marker = None; -} -} + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.key_marker.as_deref() == Some("") { + self.key_marker = None; + } + if self.name.as_deref() == Some("") { + self.name = None; + } + if self.next_key_marker.as_deref() == Some("") { + self.next_key_marker = None; + } + if self.next_version_id_marker.as_deref() == Some("") { + self.next_version_id_marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.version_id_marker.as_deref() == Some("") { + self.version_id_marker = None; + } + } } impl DtoExt for ListObjectsInput { fn ignore_empty_strings(&mut self) { -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.marker.as_deref() == Some("") { - self.marker = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -} + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.marker.as_deref() == Some("") { + self.marker = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + } } impl DtoExt for ListObjectsOutput { fn ignore_empty_strings(&mut self) { -if self.name.as_deref() == Some("") { - self.name = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if self.marker.as_deref() == Some("") { - self.marker = None; -} -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if self.next_marker.as_deref() == Some("") { - self.next_marker = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if self.name.as_deref() == Some("") { + self.name = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if self.marker.as_deref() == Some("") { + self.marker = None; + } + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if self.next_marker.as_deref() == Some("") { + self.next_marker = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for ListObjectsV2Input { fn ignore_empty_strings(&mut self) { -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.start_after.as_deref() == Some("") { - self.start_after = None; -} -} -} -impl DtoExt for ListObjectsV2Output { - fn ignore_empty_strings(&mut self) { -if self.name.as_deref() == Some("") { - self.name = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if self.continuation_token.as_deref() == Some("") { - self.continuation_token = None; -} -if self.next_continuation_token.as_deref() == Some("") { - self.next_continuation_token = None; -} -if self.delimiter.as_deref() == Some("") { - self.delimiter = None; -} -if let Some(ref val) = self.encoding_type - && val.as_str() == "" { - self.encoding_type = None; -} -if self.start_after.as_deref() == Some("") { - self.start_after = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.start_after.as_deref() == Some("") { + self.start_after = None; + } + } } +impl DtoExt for ListObjectsV2Output { + fn ignore_empty_strings(&mut self) { + if self.name.as_deref() == Some("") { + self.name = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if self.continuation_token.as_deref() == Some("") { + self.continuation_token = None; + } + if self.next_continuation_token.as_deref() == Some("") { + self.next_continuation_token = None; + } + if self.delimiter.as_deref() == Some("") { + self.delimiter = None; + } + if let Some(ref val) = self.encoding_type + && val.as_str() == "" + { + self.encoding_type = None; + } + if self.start_after.as_deref() == Some("") { + self.start_after = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for ListPartsInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + } } impl DtoExt for ListPartsOutput { fn ignore_empty_strings(&mut self) { -if self.abort_rule_id.as_deref() == Some("") { - self.abort_rule_id = None; -} -if self.bucket.as_deref() == Some("") { - self.bucket = None; -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if let Some(ref mut val) = self.initiator { -val.ignore_empty_strings(); -} -if self.key.as_deref() == Some("") { - self.key = None; -} -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.upload_id.as_deref() == Some("") { - self.upload_id = None; -} -} + if self.abort_rule_id.as_deref() == Some("") { + self.abort_rule_id = None; + } + if self.bucket.as_deref() == Some("") { + self.bucket = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if let Some(ref mut val) = self.initiator { + val.ignore_empty_strings(); + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.upload_id.as_deref() == Some("") { + self.upload_id = None; + } + } } impl DtoExt for LocationInfo { fn ignore_empty_strings(&mut self) { -if self.name.as_deref() == Some("") { - self.name = None; -} -if let Some(ref val) = self.type_ - && val.as_str() == "" { - self.type_ = None; -} -} + if self.name.as_deref() == Some("") { + self.name = None; + } + if let Some(ref val) = self.type_ + && val.as_str() == "" + { + self.type_ = None; + } + } } impl DtoExt for LoggingEnabled { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.target_object_key_format { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.target_object_key_format { + val.ignore_empty_strings(); + } + } } impl DtoExt for MetadataEntry { fn ignore_empty_strings(&mut self) { -if self.name.as_deref() == Some("") { - self.name = None; -} -if self.value.as_deref() == Some("") { - self.value = None; -} -} + if self.name.as_deref() == Some("") { + self.name = None; + } + if self.value.as_deref() == Some("") { + self.value = None; + } + } } impl DtoExt for MetadataTableConfiguration { fn ignore_empty_strings(&mut self) { -self.s3_tables_destination.ignore_empty_strings(); -} + self.s3_tables_destination.ignore_empty_strings(); + } } impl DtoExt for MetadataTableConfigurationResult { fn ignore_empty_strings(&mut self) { -self.s3_tables_destination_result.ignore_empty_strings(); -} + self.s3_tables_destination_result.ignore_empty_strings(); + } } impl DtoExt for Metrics { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.event_threshold { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.event_threshold { + val.ignore_empty_strings(); + } + } } impl DtoExt for MetricsAndOperator { fn ignore_empty_strings(&mut self) { -if self.access_point_arn.as_deref() == Some("") { - self.access_point_arn = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.access_point_arn.as_deref() == Some("") { + self.access_point_arn = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for MetricsConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for MultipartUpload { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if let Some(ref mut val) = self.initiator { -val.ignore_empty_strings(); -} -if self.key.as_deref() == Some("") { - self.key = None; -} -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.upload_id.as_deref() == Some("") { - self.upload_id = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if let Some(ref mut val) = self.initiator { + val.ignore_empty_strings(); + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.upload_id.as_deref() == Some("") { + self.upload_id = None; + } + } } impl DtoExt for NoncurrentVersionExpiration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for NoncurrentVersionTransition { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -} + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } impl DtoExt for NotificationConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for NotificationConfigurationFilter { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.key { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.key { + val.ignore_empty_strings(); + } + } } impl DtoExt for Object { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.key.as_deref() == Some("") { - self.key = None; -} -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.restore_status { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -} + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.restore_status { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } impl DtoExt for ObjectIdentifier { fn ignore_empty_strings(&mut self) { -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for ObjectLockConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.object_lock_enabled - && val.as_str() == "" { - self.object_lock_enabled = None; -} -if let Some(ref mut val) = self.rule { -val.ignore_empty_strings(); -} -} + if let Some(ref val) = self.object_lock_enabled + && val.as_str() == "" + { + self.object_lock_enabled = None; + } + if let Some(ref mut val) = self.rule { + val.ignore_empty_strings(); + } + } } impl DtoExt for ObjectLockLegalHold { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; -} -} + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } impl DtoExt for ObjectLockRetention { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.mode - && val.as_str() == "" { - self.mode = None; -} -} + if let Some(ref val) = self.mode + && val.as_str() == "" + { + self.mode = None; + } + } } impl DtoExt for ObjectLockRule { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.default_retention { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.default_retention { + val.ignore_empty_strings(); + } + } } impl DtoExt for ObjectPart { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -} + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + } } impl DtoExt for ObjectVersion { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.key.as_deref() == Some("") { - self.key = None; -} -if let Some(ref mut val) = self.owner { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.restore_status { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.key.as_deref() == Some("") { + self.key = None; + } + if let Some(ref mut val) = self.owner { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.restore_status { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for OutputLocation { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.s3 { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.s3 { + val.ignore_empty_strings(); + } + } } impl DtoExt for OutputSerialization { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.csv { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.json { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.csv { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.json { + val.ignore_empty_strings(); + } + } } impl DtoExt for Owner { fn ignore_empty_strings(&mut self) { -if self.display_name.as_deref() == Some("") { - self.display_name = None; -} -if self.id.as_deref() == Some("") { - self.id = None; -} -} + if self.display_name.as_deref() == Some("") { + self.display_name = None; + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } impl DtoExt for OwnershipControls { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for OwnershipControlsRule { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for Part { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -} + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + } } impl DtoExt for PartitionedPrefix { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.partition_date_source - && val.as_str() == "" { - self.partition_date_source = None; -} -} + if let Some(ref val) = self.partition_date_source + && val.as_str() == "" + { + self.partition_date_source = None; + } + } } impl DtoExt for PolicyStatus { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for PostObjectInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; -} -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.tagging.as_deref() == Some("") { - self.tagging = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; -} -} + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.tagging.as_deref() == Some("") { + self.tagging = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } impl DtoExt for PostObjectOutput { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for Progress { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ProgressEvent { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.details { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.details { + val.ignore_empty_strings(); + } + } } impl DtoExt for PublicAccessBlockConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for PutBucketAccelerateConfigurationInput { fn ignore_empty_strings(&mut self) { -self.accelerate_configuration.ignore_empty_strings(); -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + self.accelerate_configuration.ignore_empty_strings(); + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketAclInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if let Some(ref mut val) = self.access_control_policy { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write.as_deref() == Some("") { - self.grant_write = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -} + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if let Some(ref mut val) = self.access_control_policy { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write.as_deref() == Some("") { + self.grant_write = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + } } impl DtoExt for PutBucketAnalyticsConfigurationInput { fn ignore_empty_strings(&mut self) { -self.analytics_configuration.ignore_empty_strings(); -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + self.analytics_configuration.ignore_empty_strings(); + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketCorsInput { fn ignore_empty_strings(&mut self) { -self.cors_configuration.ignore_empty_strings(); -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + self.cors_configuration.ignore_empty_strings(); + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketEncryptionInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.server_side_encryption_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.server_side_encryption_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketIntelligentTieringConfigurationInput { fn ignore_empty_strings(&mut self) { -self.intelligent_tiering_configuration.ignore_empty_strings(); -} + self.intelligent_tiering_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketInventoryConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.inventory_configuration.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.inventory_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketLifecycleConfigurationInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref mut val) = self.lifecycle_configuration { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" { - self.transition_default_minimum_object_size = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref mut val) = self.lifecycle_configuration { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" + { + self.transition_default_minimum_object_size = None; + } + } } impl DtoExt for PutBucketLifecycleConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.transition_default_minimum_object_size - && val.as_str() == "" { - self.transition_default_minimum_object_size = None; -} -} + if let Some(ref val) = self.transition_default_minimum_object_size + && val.as_str() == "" + { + self.transition_default_minimum_object_size = None; + } + } } impl DtoExt for PutBucketLoggingInput { fn ignore_empty_strings(&mut self) { -self.bucket_logging_status.ignore_empty_strings(); -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + self.bucket_logging_status.ignore_empty_strings(); + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketMetricsConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.metrics_configuration.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.metrics_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketNotificationConfigurationInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.notification_configuration.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.notification_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketOwnershipControlsInput { fn ignore_empty_strings(&mut self) { -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.ownership_controls.ignore_empty_strings(); -} + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.ownership_controls.ignore_empty_strings(); + } } impl DtoExt for PutBucketPolicyInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + } } impl DtoExt for PutBucketReplicationInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.replication_configuration.ignore_empty_strings(); -if self.token.as_deref() == Some("") { - self.token = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.replication_configuration.ignore_empty_strings(); + if self.token.as_deref() == Some("") { + self.token = None; + } + } } impl DtoExt for PutBucketRequestPaymentInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.request_payment_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.request_payment_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketTaggingInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.tagging.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.tagging.ignore_empty_strings(); + } } impl DtoExt for PutBucketVersioningInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.mfa.as_deref() == Some("") { - self.mfa = None; -} -self.versioning_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.mfa.as_deref() == Some("") { + self.mfa = None; + } + self.versioning_configuration.ignore_empty_strings(); + } } impl DtoExt for PutBucketWebsiteInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.website_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.website_configuration.ignore_empty_strings(); + } } impl DtoExt for PutObjectAclInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if let Some(ref mut val) = self.access_control_policy { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write.as_deref() == Some("") { - self.grant_write = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if let Some(ref mut val) = self.access_control_policy { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write.as_deref() == Some("") { + self.grant_write = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectAclOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} -} -impl DtoExt for PutObjectInput { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.acl - && val.as_str() == "" { - self.acl = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.grant_full_control.as_deref() == Some("") { - self.grant_full_control = None; -} -if self.grant_read.as_deref() == Some("") { - self.grant_read = None; -} -if self.grant_read_acp.as_deref() == Some("") { - self.grant_read_acp = None; -} -if self.grant_write_acp.as_deref() == Some("") { - self.grant_write_acp = None; -} -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; -} -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.tagging.as_deref() == Some("") { - self.tagging = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -if self.website_redirect_location.as_deref() == Some("") { - self.website_redirect_location = None; -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } +impl DtoExt for PutObjectInput { + fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.acl + && val.as_str() == "" + { + self.acl = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.grant_full_control.as_deref() == Some("") { + self.grant_full_control = None; + } + if self.grant_read.as_deref() == Some("") { + self.grant_read = None; + } + if self.grant_read_acp.as_deref() == Some("") { + self.grant_read_acp = None; + } + if self.grant_write_acp.as_deref() == Some("") { + self.grant_write_acp = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.tagging.as_deref() == Some("") { + self.tagging = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + if self.website_redirect_location.as_deref() == Some("") { + self.website_redirect_location = None; + } + } } impl DtoExt for PutObjectLegalHoldInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref mut val) = self.legal_hold { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref mut val) = self.legal_hold { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectLegalHoldOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for PutObjectLockConfigurationInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref mut val) = self.object_lock_configuration { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.token.as_deref() == Some("") { - self.token = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref mut val) = self.object_lock_configuration { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.token.as_deref() == Some("") { + self.token = None; + } + } } impl DtoExt for PutObjectLockConfigurationOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for PutObjectOutput { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.checksum_type - && val.as_str() == "" { - self.checksum_type = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_encryption_context.as_deref() == Some("") { - self.ssekms_encryption_context = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.checksum_type + && val.as_str() == "" + { + self.checksum_type = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_encryption_context.as_deref() == Some("") { + self.ssekms_encryption_context = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectRetentionInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if let Some(ref mut val) = self.retention { -val.ignore_empty_strings(); -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if let Some(ref mut val) = self.retention { + val.ignore_empty_strings(); + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectRetentionOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + } } impl DtoExt for PutObjectTaggingInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -self.tagging.ignore_empty_strings(); -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + self.tagging.ignore_empty_strings(); + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutObjectTaggingOutput { fn ignore_empty_strings(&mut self) { -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for PutPublicAccessBlockInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -self.public_access_block_configuration.ignore_empty_strings(); -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + self.public_access_block_configuration.ignore_empty_strings(); + } } impl DtoExt for QueueConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -if self.id.as_deref() == Some("") { - self.id = None; -} -} + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } impl DtoExt for RecordsEvent { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for Redirect { fn ignore_empty_strings(&mut self) { -if self.host_name.as_deref() == Some("") { - self.host_name = None; -} -if self.http_redirect_code.as_deref() == Some("") { - self.http_redirect_code = None; -} -if let Some(ref val) = self.protocol - && val.as_str() == "" { - self.protocol = None; -} -if self.replace_key_prefix_with.as_deref() == Some("") { - self.replace_key_prefix_with = None; -} -if self.replace_key_with.as_deref() == Some("") { - self.replace_key_with = None; -} -} + if self.host_name.as_deref() == Some("") { + self.host_name = None; + } + if self.http_redirect_code.as_deref() == Some("") { + self.http_redirect_code = None; + } + if let Some(ref val) = self.protocol + && val.as_str() == "" + { + self.protocol = None; + } + if self.replace_key_prefix_with.as_deref() == Some("") { + self.replace_key_prefix_with = None; + } + if self.replace_key_with.as_deref() == Some("") { + self.replace_key_with = None; + } + } } impl DtoExt for RedirectAllRequestsTo { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.protocol - && val.as_str() == "" { - self.protocol = None; -} -} + if let Some(ref val) = self.protocol + && val.as_str() == "" + { + self.protocol = None; + } + } } impl DtoExt for ReplicaModifications { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ReplicationConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ReplicationRule { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.delete_marker_replication { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.delete_replication { -val.ignore_empty_strings(); -} -self.destination.ignore_empty_strings(); -if let Some(ref mut val) = self.existing_object_replication { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -if self.id.as_deref() == Some("") { - self.id = None; -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref mut val) = self.source_selection_criteria { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.delete_marker_replication { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.delete_replication { + val.ignore_empty_strings(); + } + self.destination.ignore_empty_strings(); + if let Some(ref mut val) = self.existing_object_replication { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref mut val) = self.source_selection_criteria { + val.ignore_empty_strings(); + } + } } impl DtoExt for ReplicationRuleAndOperator { fn ignore_empty_strings(&mut self) { -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -} + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + } } impl DtoExt for ReplicationRuleFilter { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.and { -val.ignore_empty_strings(); -} -if self.prefix.as_deref() == Some("") { - self.prefix = None; -} -if let Some(ref mut val) = self.tag { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.and { + val.ignore_empty_strings(); + } + if self.prefix.as_deref() == Some("") { + self.prefix = None; + } + if let Some(ref mut val) = self.tag { + val.ignore_empty_strings(); + } + } } impl DtoExt for ReplicationTime { fn ignore_empty_strings(&mut self) { -self.time.ignore_empty_strings(); -} + self.time.ignore_empty_strings(); + } } impl DtoExt for ReplicationTimeValue { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for RequestPaymentConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for RequestProgress { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for RestoreObjectInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if let Some(ref mut val) = self.restore_request { -val.ignore_empty_strings(); -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if let Some(ref mut val) = self.restore_request { + val.ignore_empty_strings(); + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } impl DtoExt for RestoreObjectOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.restore_output_path.as_deref() == Some("") { - self.restore_output_path = None; -} -} + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.restore_output_path.as_deref() == Some("") { + self.restore_output_path = None; + } + } } impl DtoExt for RestoreRequest { fn ignore_empty_strings(&mut self) { -if self.description.as_deref() == Some("") { - self.description = None; -} -if let Some(ref mut val) = self.glacier_job_parameters { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.output_location { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.select_parameters { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.tier - && val.as_str() == "" { - self.tier = None; -} -if let Some(ref val) = self.type_ - && val.as_str() == "" { - self.type_ = None; -} -} + if self.description.as_deref() == Some("") { + self.description = None; + } + if let Some(ref mut val) = self.glacier_job_parameters { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.output_location { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.select_parameters { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.tier + && val.as_str() == "" + { + self.tier = None; + } + if let Some(ref val) = self.type_ + && val.as_str() == "" + { + self.type_ = None; + } + } } impl DtoExt for RestoreStatus { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for RoutingRule { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.condition { -val.ignore_empty_strings(); -} -self.redirect.ignore_empty_strings(); -} -} -impl DtoExt for S3KeyFilter { - fn ignore_empty_strings(&mut self) { -} -} -impl DtoExt for S3Location { - fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.canned_acl - && val.as_str() == "" { - self.canned_acl = None; -} -if let Some(ref mut val) = self.encryption { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if let Some(ref mut val) = self.tagging { -val.ignore_empty_strings(); -} + if let Some(ref mut val) = self.condition { + val.ignore_empty_strings(); + } + self.redirect.ignore_empty_strings(); + } } +impl DtoExt for S3KeyFilter { + fn ignore_empty_strings(&mut self) {} } -impl DtoExt for S3TablesDestination { +impl DtoExt for S3Location { fn ignore_empty_strings(&mut self) { + if let Some(ref val) = self.canned_acl + && val.as_str() == "" + { + self.canned_acl = None; + } + if let Some(ref mut val) = self.encryption { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if let Some(ref mut val) = self.tagging { + val.ignore_empty_strings(); + } + } } +impl DtoExt for S3TablesDestination { + fn ignore_empty_strings(&mut self) {} } impl DtoExt for S3TablesDestinationResult { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for SSEKMS { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ScanRange { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for SelectObjectContentInput { fn ignore_empty_strings(&mut self) { -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -self.request.ignore_empty_strings(); -} + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + self.request.ignore_empty_strings(); + } } impl DtoExt for SelectObjectContentOutput { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for SelectObjectContentRequest { fn ignore_empty_strings(&mut self) { -self.input_serialization.ignore_empty_strings(); -self.output_serialization.ignore_empty_strings(); -if let Some(ref mut val) = self.request_progress { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.scan_range { -val.ignore_empty_strings(); -} -} + self.input_serialization.ignore_empty_strings(); + self.output_serialization.ignore_empty_strings(); + if let Some(ref mut val) = self.request_progress { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.scan_range { + val.ignore_empty_strings(); + } + } } impl DtoExt for SelectParameters { fn ignore_empty_strings(&mut self) { -self.input_serialization.ignore_empty_strings(); -self.output_serialization.ignore_empty_strings(); -} + self.input_serialization.ignore_empty_strings(); + self.output_serialization.ignore_empty_strings(); + } } impl DtoExt for ServerSideEncryptionByDefault { fn ignore_empty_strings(&mut self) { -if self.kms_master_key_id.as_deref() == Some("") { - self.kms_master_key_id = None; -} -} + if self.kms_master_key_id.as_deref() == Some("") { + self.kms_master_key_id = None; + } + } } impl DtoExt for ServerSideEncryptionConfiguration { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for ServerSideEncryptionRule { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.apply_server_side_encryption_by_default { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.apply_server_side_encryption_by_default { + val.ignore_empty_strings(); + } + } } impl DtoExt for SessionCredentials { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for SourceSelectionCriteria { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.replica_modifications { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.sse_kms_encrypted_objects { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.replica_modifications { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.sse_kms_encrypted_objects { + val.ignore_empty_strings(); + } + } } impl DtoExt for SseKmsEncryptedObjects { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for Stats { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for StatsEvent { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.details { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.details { + val.ignore_empty_strings(); + } + } } impl DtoExt for StorageClassAnalysis { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.data_export { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.data_export { + val.ignore_empty_strings(); + } + } } impl DtoExt for StorageClassAnalysisDataExport { fn ignore_empty_strings(&mut self) { -self.destination.ignore_empty_strings(); -} + self.destination.ignore_empty_strings(); + } } impl DtoExt for Tag { fn ignore_empty_strings(&mut self) { -if self.key.as_deref() == Some("") { - self.key = None; -} -if self.value.as_deref() == Some("") { - self.value = None; -} -} + if self.key.as_deref() == Some("") { + self.key = None; + } + if self.value.as_deref() == Some("") { + self.value = None; + } + } } impl DtoExt for Tagging { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for TargetGrant { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.grantee { -val.ignore_empty_strings(); -} -if let Some(ref val) = self.permission - && val.as_str() == "" { - self.permission = None; -} -} + if let Some(ref mut val) = self.grantee { + val.ignore_empty_strings(); + } + if let Some(ref val) = self.permission + && val.as_str() == "" + { + self.permission = None; + } + } } impl DtoExt for TargetObjectKeyFormat { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.partitioned_prefix { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.partitioned_prefix { + val.ignore_empty_strings(); + } + } } impl DtoExt for Tiering { - fn ignore_empty_strings(&mut self) { -} + fn ignore_empty_strings(&mut self) {} } impl DtoExt for TopicConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.filter { -val.ignore_empty_strings(); -} -if self.id.as_deref() == Some("") { - self.id = None; -} -} + if let Some(ref mut val) = self.filter { + val.ignore_empty_strings(); + } + if self.id.as_deref() == Some("") { + self.id = None; + } + } } impl DtoExt for Transition { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -} + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + } } impl DtoExt for UploadPartCopyInput { fn ignore_empty_strings(&mut self) { -if self.copy_source_range.as_deref() == Some("") { - self.copy_source_range = None; -} -if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { - self.copy_source_sse_customer_algorithm = None; -} -if self.copy_source_sse_customer_key.as_deref() == Some("") { - self.copy_source_sse_customer_key = None; -} -if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { - self.copy_source_sse_customer_key_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if self.expected_source_bucket_owner.as_deref() == Some("") { - self.expected_source_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -} + if self.copy_source_range.as_deref() == Some("") { + self.copy_source_range = None; + } + if self.copy_source_sse_customer_algorithm.as_deref() == Some("") { + self.copy_source_sse_customer_algorithm = None; + } + if self.copy_source_sse_customer_key.as_deref() == Some("") { + self.copy_source_sse_customer_key = None; + } + if self.copy_source_sse_customer_key_md5.as_deref() == Some("") { + self.copy_source_sse_customer_key_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if self.expected_source_bucket_owner.as_deref() == Some("") { + self.expected_source_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + } } impl DtoExt for UploadPartCopyOutput { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.copy_part_result { -val.ignore_empty_strings(); -} -if self.copy_source_version_id.as_deref() == Some("") { - self.copy_source_version_id = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -} + if let Some(ref mut val) = self.copy_part_result { + val.ignore_empty_strings(); + } + if self.copy_source_version_id.as_deref() == Some("") { + self.copy_source_version_id = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + } } impl DtoExt for UploadPartInput { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.checksum_algorithm - && val.as_str() == "" { - self.checksum_algorithm = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if self.content_md5.as_deref() == Some("") { - self.content_md5 = None; -} -if self.expected_bucket_owner.as_deref() == Some("") { - self.expected_bucket_owner = None; -} -if let Some(ref val) = self.request_payer - && val.as_str() == "" { - self.request_payer = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key.as_deref() == Some("") { - self.sse_customer_key = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -} + if let Some(ref val) = self.checksum_algorithm + && val.as_str() == "" + { + self.checksum_algorithm = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if self.content_md5.as_deref() == Some("") { + self.content_md5 = None; + } + if self.expected_bucket_owner.as_deref() == Some("") { + self.expected_bucket_owner = None; + } + if let Some(ref val) = self.request_payer + && val.as_str() == "" + { + self.request_payer = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key.as_deref() == Some("") { + self.sse_customer_key = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + } } impl DtoExt for UploadPartOutput { fn ignore_empty_strings(&mut self) { -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -} + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + } } impl DtoExt for VersioningConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref val) = self.mfa_delete - && val.as_str() == "" { - self.mfa_delete = None; -} -if let Some(ref val) = self.status - && val.as_str() == "" { - self.status = None; -} -} + if let Some(ref val) = self.mfa_delete + && val.as_str() == "" + { + self.mfa_delete = None; + } + if let Some(ref val) = self.status + && val.as_str() == "" + { + self.status = None; + } + } } impl DtoExt for WebsiteConfiguration { fn ignore_empty_strings(&mut self) { -if let Some(ref mut val) = self.error_document { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.index_document { -val.ignore_empty_strings(); -} -if let Some(ref mut val) = self.redirect_all_requests_to { -val.ignore_empty_strings(); -} -} + if let Some(ref mut val) = self.error_document { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.index_document { + val.ignore_empty_strings(); + } + if let Some(ref mut val) = self.redirect_all_requests_to { + val.ignore_empty_strings(); + } + } } impl DtoExt for WriteGetObjectResponseInput { fn ignore_empty_strings(&mut self) { -if self.accept_ranges.as_deref() == Some("") { - self.accept_ranges = None; -} -if self.cache_control.as_deref() == Some("") { - self.cache_control = None; -} -if self.checksum_crc32.as_deref() == Some("") { - self.checksum_crc32 = None; -} -if self.checksum_crc32c.as_deref() == Some("") { - self.checksum_crc32c = None; -} -if self.checksum_crc64nvme.as_deref() == Some("") { - self.checksum_crc64nvme = None; -} -if self.checksum_sha1.as_deref() == Some("") { - self.checksum_sha1 = None; -} -if self.checksum_sha256.as_deref() == Some("") { - self.checksum_sha256 = None; -} -if self.content_disposition.as_deref() == Some("") { - self.content_disposition = None; -} -if self.content_encoding.as_deref() == Some("") { - self.content_encoding = None; -} -if self.content_language.as_deref() == Some("") { - self.content_language = None; -} -if self.content_range.as_deref() == Some("") { - self.content_range = None; -} -if self.error_code.as_deref() == Some("") { - self.error_code = None; -} -if self.error_message.as_deref() == Some("") { - self.error_message = None; -} -if self.expiration.as_deref() == Some("") { - self.expiration = None; -} -if let Some(ref val) = self.object_lock_legal_hold_status - && val.as_str() == "" { - self.object_lock_legal_hold_status = None; -} -if let Some(ref val) = self.object_lock_mode - && val.as_str() == "" { - self.object_lock_mode = None; -} -if let Some(ref val) = self.replication_status - && val.as_str() == "" { - self.replication_status = None; -} -if let Some(ref val) = self.request_charged - && val.as_str() == "" { - self.request_charged = None; -} -if self.restore.as_deref() == Some("") { - self.restore = None; -} -if self.sse_customer_algorithm.as_deref() == Some("") { - self.sse_customer_algorithm = None; -} -if self.sse_customer_key_md5.as_deref() == Some("") { - self.sse_customer_key_md5 = None; -} -if self.ssekms_key_id.as_deref() == Some("") { - self.ssekms_key_id = None; -} -if let Some(ref val) = self.server_side_encryption - && val.as_str() == "" { - self.server_side_encryption = None; -} -if let Some(ref val) = self.storage_class - && val.as_str() == "" { - self.storage_class = None; -} -if self.version_id.as_deref() == Some("") { - self.version_id = None; -} -} + if self.accept_ranges.as_deref() == Some("") { + self.accept_ranges = None; + } + if self.cache_control.as_deref() == Some("") { + self.cache_control = None; + } + if self.checksum_crc32.as_deref() == Some("") { + self.checksum_crc32 = None; + } + if self.checksum_crc32c.as_deref() == Some("") { + self.checksum_crc32c = None; + } + if self.checksum_crc64nvme.as_deref() == Some("") { + self.checksum_crc64nvme = None; + } + if self.checksum_sha1.as_deref() == Some("") { + self.checksum_sha1 = None; + } + if self.checksum_sha256.as_deref() == Some("") { + self.checksum_sha256 = None; + } + if self.content_disposition.as_deref() == Some("") { + self.content_disposition = None; + } + if self.content_encoding.as_deref() == Some("") { + self.content_encoding = None; + } + if self.content_language.as_deref() == Some("") { + self.content_language = None; + } + if self.content_range.as_deref() == Some("") { + self.content_range = None; + } + if self.error_code.as_deref() == Some("") { + self.error_code = None; + } + if self.error_message.as_deref() == Some("") { + self.error_message = None; + } + if self.expiration.as_deref() == Some("") { + self.expiration = None; + } + if let Some(ref val) = self.object_lock_legal_hold_status + && val.as_str() == "" + { + self.object_lock_legal_hold_status = None; + } + if let Some(ref val) = self.object_lock_mode + && val.as_str() == "" + { + self.object_lock_mode = None; + } + if let Some(ref val) = self.replication_status + && val.as_str() == "" + { + self.replication_status = None; + } + if let Some(ref val) = self.request_charged + && val.as_str() == "" + { + self.request_charged = None; + } + if self.restore.as_deref() == Some("") { + self.restore = None; + } + if self.sse_customer_algorithm.as_deref() == Some("") { + self.sse_customer_algorithm = None; + } + if self.sse_customer_key_md5.as_deref() == Some("") { + self.sse_customer_key_md5 = None; + } + if self.ssekms_key_id.as_deref() == Some("") { + self.ssekms_key_id = None; + } + if let Some(ref val) = self.server_side_encryption + && val.as_str() == "" + { + self.server_side_encryption = None; + } + if let Some(ref val) = self.storage_class + && val.as_str() == "" + { + self.storage_class = None; + } + if self.version_id.as_deref() == Some("") { + self.version_id = None; + } + } } // NOTE: PostObject is a synthetic API in s3s. @@ -38840,7 +38343,6 @@ pub(crate) fn post_object_output_into_put_object_output(x: PostObjectOutput) -> } } - #[derive(Debug, Default)] pub struct CachedTags(std::sync::OnceLock>); @@ -38876,16 +38378,16 @@ impl<'de> serde::Deserialize<'de> for CachedTags { D: serde::Deserializer<'de>, { // Deserialize and ignore the data, return default (empty cache) - use serde::de::{Visitor, MapAccess}; + use serde::de::{MapAccess, Visitor}; struct CachedTagsVisitor; - + impl<'de> Visitor<'de> for CachedTagsVisitor { type Value = CachedTags; - + fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { formatter.write_str("a map") } - + fn visit_map(self, mut access: M) -> Result where M: MapAccess<'de>, @@ -38895,7 +38397,7 @@ impl<'de> serde::Deserialize<'de> for CachedTags { Ok(CachedTags::default()) } } - + deserializer.deserialize_map(CachedTagsVisitor) } } @@ -38916,7 +38418,7 @@ impl CachedTags { if let Some(tags) = get_and_tags() { for tag in tags { - let (Some(k), Some(v)) = (&tag.key, &tag.value) else {continue}; + let (Some(k), Some(v)) = (&tag.key, &tag.value) else { continue }; if !k.is_empty() { map.insert(k.clone(), v.clone()); } @@ -39024,5 +38526,3 @@ mod minio_tests { assert!(filter.test_tags(&object_tags).not()); } } - - diff --git a/crates/s3s/src/error/generated.rs b/crates/s3s/src/error/generated.rs index 1408804d..8dad05e7 100644 --- a/crates/s3s/src/error/generated.rs +++ b/crates/s3s/src/error/generated.rs @@ -249,2435 +249,2438 @@ use hyper::StatusCode; #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] pub enum S3ErrorCode { -/// The bucket does not allow ACLs. -/// -/// HTTP Status Code: 400 Bad Request -/// -AccessControlListNotSupported, - -/// Access Denied -/// -/// HTTP Status Code: 403 Forbidden -/// -AccessDenied, - -/// An access point with an identical name already exists in your account. -/// -/// HTTP Status Code: 409 Conflict -/// -AccessPointAlreadyOwnedByYou, - -/// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance. -/// -/// HTTP Status Code: 403 Forbidden -/// -AccountProblem, - -/// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance. -/// -/// HTTP Status Code: 403 Forbidden -/// -AllAccessDisabled, - -/// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -AmbiguousFieldName, - -/// The email address you provided is associated with more than one account. -/// -/// HTTP Status Code: 400 Bad Request -/// -AmbiguousGrantByEmailAddress, - -/// The authorization header you provided is invalid. -/// -/// HTTP Status Code: 400 Bad Request -/// -AuthorizationHeaderMalformed, - -/// The authorization query parameters that you provided are not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -AuthorizationQueryParametersError, - -/// The Content-MD5 you specified did not match what we received. -/// -/// HTTP Status Code: 400 Bad Request -/// -BadDigest, - -/// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. -/// -/// HTTP Status Code: 409 Conflict -/// -BucketAlreadyExists, - -/// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). -/// -/// HTTP Status Code: 409 Conflict -/// -BucketAlreadyOwnedByYou, - -/// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket. -/// -/// HTTP Status Code: 400 Bad Request -/// -BucketHasAccessPointsAttached, - -/// The bucket you tried to delete is not empty. -/// -/// HTTP Status Code: 409 Conflict -/// -BucketNotEmpty, - -/// The service is unavailable. Try again later. -/// -/// HTTP Status Code: 503 Service Unavailable -/// -Busy, - -/// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. -/// -/// HTTP Status Code: 400 Bad Request -/// -CSVEscapingRecordDelimiter, - -/// An error occurred while parsing the CSV file. Check the file and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -CSVParsingError, - -/// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. -/// -/// HTTP Status Code: 400 Bad Request -/// -CSVUnescapedQuote, - -/// An attempt to convert from one data type to another using CAST failed in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -CastFailed, - -/// Your Multi-Region Access Point idempotency token was already used for a different request. -/// -/// HTTP Status Code: 409 Conflict -/// -ClientTokenConflict, - -/// The length of a column in the result is greater than maxCharsPerColumn of 1 MB. -/// -/// HTTP Status Code: 400 Bad Request -/// -ColumnTooLong, - -/// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part. -/// -/// HTTP Status Code: 409 Conflict -/// -ConditionalRequestConflict, - -/// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. -/// -/// HTTP Status Code: 400 Bad Request -/// -ConnectionClosedByRequester, - -/// This request does not support credentials. -/// -/// HTTP Status Code: 400 Bad Request -/// -CredentialsNotSupported, - -/// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. -/// -/// HTTP Status Code: 403 Forbidden -/// -CrossLocationLoggingProhibited, - -/// The device is not currently active. -/// -/// HTTP Status Code: 400 Bad Request -/// -DeviceNotActiveError, - -/// The request body cannot be empty. -/// -/// HTTP Status Code: 400 Bad Request -/// -EmptyRequestBody, - -/// Direct requests to the correct endpoint. -/// -/// HTTP Status Code: 400 Bad Request -/// -EndpointNotFound, - -/// Your proposed upload exceeds the maximum allowed object size. -/// -/// HTTP Status Code: 400 Bad Request -/// -EntityTooLarge, - -/// Your proposed upload is smaller than the minimum allowed object size. -/// -/// HTTP Status Code: 400 Bad Request -/// -EntityTooSmall, - -/// A column name or a path provided does not exist in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorBindingDoesNotExist, - -/// There is an incorrect number of arguments in the function call in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidArguments, - -/// The timestamp format string in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidTimestampFormatPattern, - -/// The timestamp format pattern contains a symbol in the SQL expression that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidTimestampFormatPatternSymbol, - -/// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidTimestampFormatPatternSymbolForParsing, - -/// The timestamp format pattern contains a token in the SQL expression that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidTimestampFormatPatternToken, - -/// An argument given to the LIKE expression was not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorLikePatternInvalidEscapeSequence, - -/// LIMIT must not be negative. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorNegativeLimit, - -/// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorTimestampFormatPatternDuplicateFields, - -/// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorTimestampFormatPatternHourClockAmPmMismatch, - -/// The timestamp format pattern contains an unterminated token in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorUnterminatedTimestampFormatPatternToken, - -/// The provided token has expired. -/// -/// HTTP Status Code: 400 Bad Request -/// -ExpiredToken, - -/// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB. -/// -/// HTTP Status Code: 400 Bad Request -/// -ExpressionTooLong, - -/// The query cannot be evaluated. Check the file and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -ExternalEvalException, - -/// This error might occur for the following reasons: -/// -/// -/// You are trying to access a bucket from a different Region than where the bucket exists. -/// -/// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to. -/// -/// HTTP Status Code: 400 Bad Request -/// -IllegalLocationConstraintException, - -/// An illegal argument was used in the SQL function. -/// -/// HTTP Status Code: 400 Bad Request -/// -IllegalSqlFunctionArgument, - -/// Indicates that the versioning configuration specified in the request is invalid. -/// -/// HTTP Status Code: 400 Bad Request -/// -IllegalVersioningConfigurationException, - -/// You did not provide the number of bytes specified by the Content-Length HTTP header -/// -/// HTTP Status Code: 400 Bad Request -/// -IncompleteBody, - -/// The specified bucket exists in another Region. Direct requests to the correct endpoint. -/// -/// HTTP Status Code: 400 Bad Request -/// -IncorrectEndpoint, - -/// POST requires exactly one file upload per request. -/// -/// HTTP Status Code: 400 Bad Request -/// -IncorrectNumberOfFilesInPostRequest, - -/// An incorrect argument type was specified in a function call in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -IncorrectSqlFunctionArgumentType, - -/// Inline data exceeds the maximum allowed size. -/// -/// HTTP Status Code: 400 Bad Request -/// -InlineDataTooLarge, - -/// An integer overflow or underflow occurred in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -IntegerOverflow, - -/// We encountered an internal error. Please try again. -/// -/// HTTP Status Code: 500 Internal Server Error -/// -InternalError, - -/// The Amazon Web Services access key ID you provided does not exist in our records. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidAccessKeyId, - -/// The specified access point name or account is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidAccessPoint, - -/// The specified access point alias name is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidAccessPointAliasError, - -/// You must specify the Anonymous role. -/// -InvalidAddressingHeader, - -/// Invalid Argument -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidArgument, - -/// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidBucketAclWithObjectOwnership, - -/// The specified bucket is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidBucketName, - -/// The value of the expected bucket owner parameter must be an AWS account ID. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidBucketOwnerAWSAccountID, - -/// The request is not valid with the current state of the bucket. -/// -/// HTTP Status Code: 409 Conflict -/// -InvalidBucketState, - -/// An attempt to convert from one data type to another using CAST failed in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidCast, - -/// The column index in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidColumnIndex, - -/// The file is not in a supported compression format. Only GZIP and BZIP2 are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidCompressionFormat, - -/// The data source type is not valid. Only CSV, JSON, and Parquet are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidDataSource, - -/// The SQL expression contains a data type that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidDataType, - -/// The Content-MD5 you specified is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidDigest, - -/// The encryption request you specified is not valid. The valid value is AES256. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidEncryptionAlgorithmError, - -/// The ExpressionType value is not valid. Only SQL expressions are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidExpressionType, - -/// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidFileHeaderInfo, - -/// The host headers provided in the request used the incorrect style addressing. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidHostHeader, - -/// The request is made using an unexpected HTTP method. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidHttpMethod, - -/// The JsonType value is not valid. Only DOCUMENT and LINES are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidJsonType, - -/// The key path in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidKeyPath, - -/// The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidLocationConstraint, - -/// The action is not valid for the current state of the object. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidObjectState, - -/// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidPart, - -/// The list of parts was not in ascending order. Parts list must be specified in order by part number. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidPartOrder, - -/// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidPayer, - -/// The content of the form does not meet the conditions specified in the policy document. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidPolicyDocument, - -/// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidQuoteFields, - -/// The requested range cannot be satisfied. -/// -/// HTTP Status Code: 416 Requested Range NotSatisfiable -/// -InvalidRange, - -/// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidRegion, - -/// + Please use AWS4-HMAC-SHA256. -/// + SOAP requests must be made over an HTTPS connection. -/// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names. -/// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names. -/// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests. -/// + Amazon S3 Transfer Accelerate is not configured on this bucket. -/// + Amazon S3 Transfer Accelerate is disabled on this bucket. -/// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information. -/// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information. -/// -/// HTTP Status Code: 400 Bad Request -InvalidRequest, - -/// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidRequestParameter, - -/// The SOAP request body is invalid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidSOAPRequest, - -/// The provided scan range is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidScanRange, - -/// The provided security credentials are not valid. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidSecurity, - -/// Returned if the session doesn't exist anymore because it timed out or expired. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidSessionException, - -/// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidSignature, - -/// The storage class you specified is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidStorageClass, - -/// The SQL expression contains a table alias that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidTableAlias, - -/// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidTag, - -/// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidTargetBucketForLogging, - -/// The encoding type is not valid. Only UTF-8 encoding is supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidTextEncoding, - -/// The provided token is malformed or otherwise invalid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidToken, - -/// Couldn't parse the specified URI. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidURI, - -/// An error occurred while parsing the JSON file. Check the file and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -JSONParsingError, - -/// Your key is too long. -/// -/// HTTP Status Code: 400 Bad Request -/// -KeyTooLongError, - -/// The SQL expression contains a character that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LexerInvalidChar, - -/// The SQL expression contains an operator that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LexerInvalidIONLiteral, - -/// The SQL expression contains an operator that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LexerInvalidLiteral, - -/// The SQL expression contains a literal that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LexerInvalidOperator, - -/// The argument given to the LIKE clause in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LikeInvalidInputs, - -/// The XML you provided was not well-formed or did not validate against our published schema. -/// -/// HTTP Status Code: 400 Bad Request -/// -MalformedACLError, - -/// The body of your POST request is not well-formed multipart/form-data. -/// -/// HTTP Status Code: 400 Bad Request -/// -MalformedPOSTRequest, - -/// Your policy contains a principal that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -MalformedPolicy, - -/// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." -/// -/// HTTP Status Code: 400 Bad Request -/// -MalformedXML, - -/// Your request was too big. -/// -/// HTTP Status Code: 400 Bad Request -/// -MaxMessageLengthExceeded, - -/// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used. -/// -/// HTTP Status Code: 400 Bad Request -/// -MaxOperatorsExceeded, - -/// Your POST request fields preceding the upload file were too large. -/// -/// HTTP Status Code: 400 Bad Request -/// -MaxPostPreDataLengthExceededError, - -/// Your metadata headers exceed the maximum allowed metadata size. -/// -/// HTTP Status Code: 400 Bad Request -/// -MetadataTooLarge, - -/// The specified method is not allowed against this resource. -/// -/// HTTP Status Code: 405 Method Not Allowed -/// -MethodNotAllowed, - -/// A SOAP attachment was expected, but none were found. -/// -MissingAttachment, - -/// The request was not signed. -/// -/// HTTP Status Code: 403 Forbidden -/// -MissingAuthenticationToken, - -/// You must provide the Content-Length HTTP header. -/// -/// HTTP Status Code: 411 Length Required -/// -MissingContentLength, - -/// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty." -/// -/// HTTP Status Code: 400 Bad Request -/// -MissingRequestBodyError, - -/// The SelectRequest entity is missing a required parameter. Check the service documentation and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -MissingRequiredParameter, - -/// The SOAP 1.1 request is missing a security element. -/// -/// HTTP Status Code: 400 Bad Request -/// -MissingSecurityElement, - -/// Your request is missing a required header. -/// -/// HTTP Status Code: 400 Bad Request -/// -MissingSecurityHeader, - -/// Multiple data sources are not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -MultipleDataSourcesUnsupported, - -/// There is no such thing as a logging status subresource for a key. -/// -/// HTTP Status Code: 400 Bad Request -/// -NoLoggingStatusForKey, - -/// The specified access point does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchAccessPoint, - -/// The specified request was not found. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchAsyncRequest, - -/// The specified bucket does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchBucket, - -/// The specified bucket does not have a bucket policy. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchBucketPolicy, - -/// The specified bucket does not have a CORS configuration. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchCORSConfiguration, - -/// The specified key does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchKey, - -/// The lifecycle configuration does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchLifecycleConfiguration, - -/// The specified Multi-Region Access Point does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchMultiRegionAccessPoint, - -/// The specified object does not have an ObjectLock configuration. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchObjectLockConfiguration, - -/// The specified resource doesn't exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchResource, - -/// The specified tag does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchTagSet, - -/// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchUpload, - -/// Indicates that the version ID specified in the request does not match an existing version. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchVersion, - -/// The specified bucket does not have a website configuration. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchWebsiteConfiguration, - -/// No transformation found for this Object Lambda Access Point. -/// -/// HTTP Status Code: 404 Not Found -/// -NoTransformationDefined, - -/// The device that generated the token is not owned by the authenticated user. -/// -/// HTTP Status Code: 400 Bad Request -/// -NotDeviceOwnerError, - -/// A header you provided implies functionality that is not implemented. -/// -/// HTTP Status Code: 501 Not Implemented -/// -NotImplemented, - -/// The resource was not changed. -/// -/// HTTP Status Code: 304 Not Modified -/// -NotModified, - -/// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 -/// -/// HTTP Status Code: 403 Forbidden -/// -NotSignedUp, - -/// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers. -/// -/// HTTP Status Code: 400 Bad Request -/// -NumberFormatError, - -/// The Object Lock configuration does not exist for this bucket. -/// -/// HTTP Status Code: 404 Not Found -/// -ObjectLockConfigurationNotFoundError, - -/// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each. -/// -/// HTTP Status Code: 400 Bad Request -/// -ObjectSerializationConflict, - -/// A conflicting conditional action is currently in progress against this resource. Try again. -/// -/// HTTP Status Code: 409 Conflict -/// -OperationAborted, - -/// The number of columns in the result is greater than the maximum allowable number of columns. -/// -/// HTTP Status Code: 400 Bad Request -/// -OverMaxColumn, - -/// The Parquet file is above the max row group size. -/// -/// HTTP Status Code: 400 Bad Request -/// -OverMaxParquetBlockSize, - -/// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB. -/// -/// HTTP Status Code: 400 Bad Request -/// -OverMaxRecordSize, - -/// The bucket ownership controls were not found. -/// -/// HTTP Status Code: 404 Not Found -/// -OwnershipControlsNotFoundError, - -/// An error occurred while parsing the Parquet file. Check the file and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParquetParsingError, - -/// The specified Parquet compression codec is not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParquetUnsupportedCompressionCodec, - -/// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseAsteriskIsNotAloneInSelectList, - -/// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseCannotMixSqbAndWildcardInSelectList, - -/// The SQL expression CAST has incorrect arity. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseCastArity, - -/// The SQL expression contains an empty SELECT clause. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseEmptySelect, - -/// The expected token in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpected2TokenTypes, - -/// The expected argument delimiter in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedArgumentDelimiter, - -/// The expected date part in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedDatePart, - -/// The expected SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedExpression, - -/// The expected identifier for the alias in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedIdentForAlias, - -/// The expected identifier for AT name in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedIdentForAt, - -/// GROUP is not supported in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedIdentForGroupName, - -/// The expected keyword in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedKeyword, - -/// The expected left parenthesis after CAST in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedLeftParenAfterCast, - -/// The expected left parenthesis in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedLeftParenBuiltinFunctionCall, - -/// The expected left parenthesis in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedLeftParenValueConstructor, - -/// The SQL expression contains an unsupported use of MEMBER. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedMember, - -/// The expected number in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedNumber, - -/// The expected right parenthesis character in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedRightParenBuiltinFunctionCall, - -/// The expected token in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedTokenType, - -/// The expected type name in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedTypeName, - -/// The expected WHEN clause in the SQL expression was not found. CASE is not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedWhenClause, - -/// The use of * in the SELECT list in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseInvalidContextForWildcardInSelectList, - -/// The SQL expression contains a path component that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseInvalidPathComponent, - -/// The SQL expression contains a parameter value that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseInvalidTypeParam, - -/// JOIN is not supported in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseMalformedJoin, - -/// The expected identifier after the @ symbol in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseMissingIdentAfterAt, - -/// Only one argument is supported for aggregate functions in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseNonUnaryAgregateFunctionCall, - -/// The SQL expression contains a missing FROM after the SELECT list. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseSelectMissingFrom, - -/// The SQL expression contains an unexpected keyword. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnExpectedKeyword, - -/// The SQL expression contains an unexpected operator. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnexpectedOperator, - -/// The SQL expression contains an unexpected term. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnexpectedTerm, - -/// The SQL expression contains an unexpected token. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnexpectedToken, - -/// The SQL expression contains an operator that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnknownOperator, - -/// The SQL expression contains an unsupported use of ALIAS. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedAlias, - -/// Only COUNT with (*) as a parameter is supported in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedCallWithStar, - -/// The SQL expression contains an unsupported use of CASE. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedCase, - -/// The SQL expression contains an unsupported use of CASE. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedCaseClause, - -/// The SQL expression contains an unsupported use of GROUP BY. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedLiteralsGroupBy, - -/// The SQL expression contains an unsupported use of SELECT. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedSelect, - -/// The SQL expression contains unsupported syntax. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedSyntax, - -/// The SQL expression contains an unsupported token. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedToken, - -/// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. -/// -/// HTTP Status Code: 301 Moved Permanently -/// -PermanentRedirect, - -/// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. -/// -/// HTTP Status Code: 301 Moved Permanently -/// -PermanentRedirectControlError, - -/// At least one of the preconditions you specified did not hold. -/// -/// HTTP Status Code: 412 Precondition Failed -/// -PreconditionFailed, - -/// Temporary redirect. -/// -/// HTTP Status Code: 307 Moved Temporarily -/// -Redirect, - -/// There is no replication configuration for this bucket. -/// -/// HTTP Status Code: 404 Not Found -/// -ReplicationConfigurationNotFoundError, - -/// The request header and query parameters used to make the request exceed the maximum allowed size. -/// -/// HTTP Status Code: 400 Bad Request -/// -RequestHeaderSectionTooLarge, - -/// Bucket POST must be of the enclosure-type multipart/form-data. -/// -/// HTTP Status Code: 400 Bad Request -/// -RequestIsNotMultiPartContent, - -/// The difference between the request time and the server's time is too large. -/// -/// HTTP Status Code: 403 Forbidden -/// -RequestTimeTooSkewed, - -/// Your socket connection to the server was not read from or written to within the timeout period. -/// -/// HTTP Status Code: 400 Bad Request -/// -RequestTimeout, - -/// Requesting the torrent file of a bucket is not permitted. -/// -/// HTTP Status Code: 400 Bad Request -/// -RequestTorrentOfBucketError, - -/// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. -/// -/// HTTP Status Code: 400 Bad Request -/// -ResponseInterrupted, - -/// Object restore is already in progress. -/// -/// HTTP Status Code: 409 Conflict -/// -RestoreAlreadyInProgress, - -/// The server-side encryption configuration was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ServerSideEncryptionConfigurationNotFoundError, - -/// Service is unable to handle request. -/// -/// HTTP Status Code: 503 Service Unavailable -/// -ServiceUnavailable, - -/// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details. -/// -/// HTTP Status Code: 403 Forbidden -/// -SignatureDoesNotMatch, - -/// Reduce your request rate. -/// -/// HTTP Status Code: 503 Slow Down -/// -SlowDown, - -/// The tag policy does not allow the specified value for the following tag key. -/// -/// HTTP Status Code: 400 Bad Request -/// -TagPolicyException, - -/// You are being redirected to the bucket while DNS updates. -/// -/// HTTP Status Code: 307 Moved Temporarily -/// -TemporaryRedirect, - -/// The serial number and/or token code you provided is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -TokenCodeInvalidError, - -/// The provided token must be refreshed. -/// -/// HTTP Status Code: 400 Bad Request -/// -TokenRefreshRequired, - -/// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyAccessPoints, - -/// You have attempted to create more buckets than allowed. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyBuckets, - -/// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyMultiRegionAccessPointregionsError, - -/// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyMultiRegionAccessPoints, - -/// The number of tags exceeds the limit of 50 tags. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyTags, - -/// Object decompression failed. Check that the object is properly compressed using the format specified in the request. -/// -/// HTTP Status Code: 400 Bad Request -/// -TruncatedInput, - -/// You are not authorized to perform this operation. -/// -/// HTTP Status Code: 401 Unauthorized -/// -UnauthorizedAccess, - -/// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal. -/// -/// HTTP Status Code: 403 Forbidden -/// -UnauthorizedAccessError, - -/// This request does not support content. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnexpectedContent, - -/// Applicable in China Regions only. This request was rejected because the IP was unexpected. -/// -/// HTTP Status Code: 403 Forbidden -/// -UnexpectedIPError, - -/// We encountered a record type that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnrecognizedFormatException, - -/// The email address you provided does not match any account on record. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnresolvableGrantByEmailAddress, - -/// The request contained an unsupported argument. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedArgument, - -/// We encountered an unsupported SQL function. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedFunction, - -/// The specified Parquet type is not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedParquetType, - -/// A range header is not supported for this operation. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedRangeHeader, - -/// Scan range queries are not supported on this type of object. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedScanRangeInput, - -/// The provided request is signed with an unsupported STS Token version or the signature version is not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedSignature, - -/// We encountered an unsupported SQL operation. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedSqlOperation, - -/// We encountered an unsupported SQL structure. Check the SQL Reference. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedSqlStructure, - -/// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedStorageClass, - -/// We encountered syntax that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedSyntax, - -/// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0). -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedTypeForQuerying, - -/// The bucket POST must contain the specified field name. If it is specified, check the order of the fields. -/// -/// HTTP Status Code: 400 Bad Request -/// -UserKeyMustBeSpecified, - -/// A timestamp parse failure occurred in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ValueParseFailure, - -Custom(ByteString), + /// The bucket does not allow ACLs. + /// + /// HTTP Status Code: 400 Bad Request + /// + AccessControlListNotSupported, + + /// Access Denied + /// + /// HTTP Status Code: 403 Forbidden + /// + AccessDenied, + + /// An access point with an identical name already exists in your account. + /// + /// HTTP Status Code: 409 Conflict + /// + AccessPointAlreadyOwnedByYou, + + /// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance. + /// + /// HTTP Status Code: 403 Forbidden + /// + AccountProblem, + + /// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance. + /// + /// HTTP Status Code: 403 Forbidden + /// + AllAccessDisabled, + + /// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + AmbiguousFieldName, + + /// The email address you provided is associated with more than one account. + /// + /// HTTP Status Code: 400 Bad Request + /// + AmbiguousGrantByEmailAddress, + + /// The authorization header you provided is invalid. + /// + /// HTTP Status Code: 400 Bad Request + /// + AuthorizationHeaderMalformed, + + /// The authorization query parameters that you provided are not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + AuthorizationQueryParametersError, + + /// The Content-MD5 you specified did not match what we received. + /// + /// HTTP Status Code: 400 Bad Request + /// + BadDigest, + + /// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. + /// + /// HTTP Status Code: 409 Conflict + /// + BucketAlreadyExists, + + /// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). + /// + /// HTTP Status Code: 409 Conflict + /// + BucketAlreadyOwnedByYou, + + /// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket. + /// + /// HTTP Status Code: 400 Bad Request + /// + BucketHasAccessPointsAttached, + + /// The bucket you tried to delete is not empty. + /// + /// HTTP Status Code: 409 Conflict + /// + BucketNotEmpty, + + /// The service is unavailable. Try again later. + /// + /// HTTP Status Code: 503 Service Unavailable + /// + Busy, + + /// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. + /// + /// HTTP Status Code: 400 Bad Request + /// + CSVEscapingRecordDelimiter, + + /// An error occurred while parsing the CSV file. Check the file and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + CSVParsingError, + + /// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. + /// + /// HTTP Status Code: 400 Bad Request + /// + CSVUnescapedQuote, + + /// An attempt to convert from one data type to another using CAST failed in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + CastFailed, + + /// Your Multi-Region Access Point idempotency token was already used for a different request. + /// + /// HTTP Status Code: 409 Conflict + /// + ClientTokenConflict, + + /// The length of a column in the result is greater than maxCharsPerColumn of 1 MB. + /// + /// HTTP Status Code: 400 Bad Request + /// + ColumnTooLong, + + /// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part. + /// + /// HTTP Status Code: 409 Conflict + /// + ConditionalRequestConflict, + + /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. + /// + /// HTTP Status Code: 400 Bad Request + /// + ConnectionClosedByRequester, + + /// This request does not support credentials. + /// + /// HTTP Status Code: 400 Bad Request + /// + CredentialsNotSupported, + + /// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. + /// + /// HTTP Status Code: 403 Forbidden + /// + CrossLocationLoggingProhibited, + + /// The device is not currently active. + /// + /// HTTP Status Code: 400 Bad Request + /// + DeviceNotActiveError, + + /// The request body cannot be empty. + /// + /// HTTP Status Code: 400 Bad Request + /// + EmptyRequestBody, + + /// Direct requests to the correct endpoint. + /// + /// HTTP Status Code: 400 Bad Request + /// + EndpointNotFound, + + /// Your proposed upload exceeds the maximum allowed object size. + /// + /// HTTP Status Code: 400 Bad Request + /// + EntityTooLarge, + + /// Your proposed upload is smaller than the minimum allowed object size. + /// + /// HTTP Status Code: 400 Bad Request + /// + EntityTooSmall, + + /// A column name or a path provided does not exist in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorBindingDoesNotExist, + + /// There is an incorrect number of arguments in the function call in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidArguments, + + /// The timestamp format string in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidTimestampFormatPattern, + + /// The timestamp format pattern contains a symbol in the SQL expression that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidTimestampFormatPatternSymbol, + + /// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidTimestampFormatPatternSymbolForParsing, + + /// The timestamp format pattern contains a token in the SQL expression that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidTimestampFormatPatternToken, + + /// An argument given to the LIKE expression was not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorLikePatternInvalidEscapeSequence, + + /// LIMIT must not be negative. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorNegativeLimit, + + /// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorTimestampFormatPatternDuplicateFields, + + /// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorTimestampFormatPatternHourClockAmPmMismatch, + + /// The timestamp format pattern contains an unterminated token in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorUnterminatedTimestampFormatPatternToken, + + /// The provided token has expired. + /// + /// HTTP Status Code: 400 Bad Request + /// + ExpiredToken, + + /// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB. + /// + /// HTTP Status Code: 400 Bad Request + /// + ExpressionTooLong, + + /// The query cannot be evaluated. Check the file and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + ExternalEvalException, + + /// This error might occur for the following reasons: + /// + /// + /// You are trying to access a bucket from a different Region than where the bucket exists. + /// + /// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to. + /// + /// HTTP Status Code: 400 Bad Request + /// + IllegalLocationConstraintException, + + /// An illegal argument was used in the SQL function. + /// + /// HTTP Status Code: 400 Bad Request + /// + IllegalSqlFunctionArgument, + + /// Indicates that the versioning configuration specified in the request is invalid. + /// + /// HTTP Status Code: 400 Bad Request + /// + IllegalVersioningConfigurationException, + + /// You did not provide the number of bytes specified by the Content-Length HTTP header + /// + /// HTTP Status Code: 400 Bad Request + /// + IncompleteBody, + + /// The specified bucket exists in another Region. Direct requests to the correct endpoint. + /// + /// HTTP Status Code: 400 Bad Request + /// + IncorrectEndpoint, + + /// POST requires exactly one file upload per request. + /// + /// HTTP Status Code: 400 Bad Request + /// + IncorrectNumberOfFilesInPostRequest, + + /// An incorrect argument type was specified in a function call in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + IncorrectSqlFunctionArgumentType, + + /// Inline data exceeds the maximum allowed size. + /// + /// HTTP Status Code: 400 Bad Request + /// + InlineDataTooLarge, + + /// An integer overflow or underflow occurred in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + IntegerOverflow, + + /// We encountered an internal error. Please try again. + /// + /// HTTP Status Code: 500 Internal Server Error + /// + InternalError, + + /// The Amazon Web Services access key ID you provided does not exist in our records. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidAccessKeyId, + + /// The specified access point name or account is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidAccessPoint, + + /// The specified access point alias name is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidAccessPointAliasError, + + /// You must specify the Anonymous role. + /// + InvalidAddressingHeader, + + /// Invalid Argument + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidArgument, + + /// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidBucketAclWithObjectOwnership, + + /// The specified bucket is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidBucketName, + + /// The value of the expected bucket owner parameter must be an AWS account ID. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidBucketOwnerAWSAccountID, + + /// The request is not valid with the current state of the bucket. + /// + /// HTTP Status Code: 409 Conflict + /// + InvalidBucketState, + + /// An attempt to convert from one data type to another using CAST failed in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidCast, + + /// The column index in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidColumnIndex, + + /// The file is not in a supported compression format. Only GZIP and BZIP2 are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidCompressionFormat, + + /// The data source type is not valid. Only CSV, JSON, and Parquet are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidDataSource, + + /// The SQL expression contains a data type that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidDataType, + + /// The Content-MD5 you specified is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidDigest, + + /// The encryption request you specified is not valid. The valid value is AES256. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidEncryptionAlgorithmError, + + /// The ExpressionType value is not valid. Only SQL expressions are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidExpressionType, + + /// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidFileHeaderInfo, + + /// The host headers provided in the request used the incorrect style addressing. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidHostHeader, + + /// The request is made using an unexpected HTTP method. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidHttpMethod, + + /// The JsonType value is not valid. Only DOCUMENT and LINES are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidJsonType, + + /// The key path in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidKeyPath, + + /// The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidLocationConstraint, + + /// The action is not valid for the current state of the object. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidObjectState, + + /// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidPart, + + /// The list of parts was not in ascending order. Parts list must be specified in order by part number. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidPartOrder, + + /// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidPayer, + + /// The content of the form does not meet the conditions specified in the policy document. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidPolicyDocument, + + /// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidQuoteFields, + + /// The requested range cannot be satisfied. + /// + /// HTTP Status Code: 416 Requested Range NotSatisfiable + /// + InvalidRange, + + /// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidRegion, + + /// + Please use AWS4-HMAC-SHA256. + /// + SOAP requests must be made over an HTTPS connection. + /// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names. + /// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names. + /// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests. + /// + Amazon S3 Transfer Accelerate is not configured on this bucket. + /// + Amazon S3 Transfer Accelerate is disabled on this bucket. + /// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information. + /// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information. + /// + /// HTTP Status Code: 400 Bad Request + InvalidRequest, + + /// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidRequestParameter, + + /// The SOAP request body is invalid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidSOAPRequest, + + /// The provided scan range is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidScanRange, + + /// The provided security credentials are not valid. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidSecurity, + + /// Returned if the session doesn't exist anymore because it timed out or expired. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidSessionException, + + /// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidSignature, + + /// The storage class you specified is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidStorageClass, + + /// The SQL expression contains a table alias that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidTableAlias, + + /// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidTag, + + /// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidTargetBucketForLogging, + + /// The encoding type is not valid. Only UTF-8 encoding is supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidTextEncoding, + + /// The provided token is malformed or otherwise invalid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidToken, + + /// Couldn't parse the specified URI. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidURI, + + /// An error occurred while parsing the JSON file. Check the file and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + JSONParsingError, + + /// Your key is too long. + /// + /// HTTP Status Code: 400 Bad Request + /// + KeyTooLongError, + + /// The SQL expression contains a character that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LexerInvalidChar, + + /// The SQL expression contains an operator that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LexerInvalidIONLiteral, + + /// The SQL expression contains an operator that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LexerInvalidLiteral, + + /// The SQL expression contains a literal that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LexerInvalidOperator, + + /// The argument given to the LIKE clause in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LikeInvalidInputs, + + /// The XML you provided was not well-formed or did not validate against our published schema. + /// + /// HTTP Status Code: 400 Bad Request + /// + MalformedACLError, + + /// The body of your POST request is not well-formed multipart/form-data. + /// + /// HTTP Status Code: 400 Bad Request + /// + MalformedPOSTRequest, + + /// Your policy contains a principal that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + MalformedPolicy, + + /// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." + /// + /// HTTP Status Code: 400 Bad Request + /// + MalformedXML, + + /// Your request was too big. + /// + /// HTTP Status Code: 400 Bad Request + /// + MaxMessageLengthExceeded, + + /// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used. + /// + /// HTTP Status Code: 400 Bad Request + /// + MaxOperatorsExceeded, + + /// Your POST request fields preceding the upload file were too large. + /// + /// HTTP Status Code: 400 Bad Request + /// + MaxPostPreDataLengthExceededError, + + /// Your metadata headers exceed the maximum allowed metadata size. + /// + /// HTTP Status Code: 400 Bad Request + /// + MetadataTooLarge, + + /// The specified method is not allowed against this resource. + /// + /// HTTP Status Code: 405 Method Not Allowed + /// + MethodNotAllowed, + + /// A SOAP attachment was expected, but none were found. + /// + MissingAttachment, + + /// The request was not signed. + /// + /// HTTP Status Code: 403 Forbidden + /// + MissingAuthenticationToken, + + /// You must provide the Content-Length HTTP header. + /// + /// HTTP Status Code: 411 Length Required + /// + MissingContentLength, + + /// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty." + /// + /// HTTP Status Code: 400 Bad Request + /// + MissingRequestBodyError, + + /// The SelectRequest entity is missing a required parameter. Check the service documentation and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + MissingRequiredParameter, + + /// The SOAP 1.1 request is missing a security element. + /// + /// HTTP Status Code: 400 Bad Request + /// + MissingSecurityElement, + + /// Your request is missing a required header. + /// + /// HTTP Status Code: 400 Bad Request + /// + MissingSecurityHeader, + + /// Multiple data sources are not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + MultipleDataSourcesUnsupported, + + /// There is no such thing as a logging status subresource for a key. + /// + /// HTTP Status Code: 400 Bad Request + /// + NoLoggingStatusForKey, + + /// The specified access point does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchAccessPoint, + + /// The specified request was not found. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchAsyncRequest, + + /// The specified bucket does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchBucket, + + /// The specified bucket does not have a bucket policy. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchBucketPolicy, + + /// The specified bucket does not have a CORS configuration. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchCORSConfiguration, + + /// The specified key does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchKey, + + /// The lifecycle configuration does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchLifecycleConfiguration, + + /// The specified Multi-Region Access Point does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchMultiRegionAccessPoint, + + /// The specified object does not have an ObjectLock configuration. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchObjectLockConfiguration, + + /// The specified resource doesn't exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchResource, + + /// The specified tag does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchTagSet, + + /// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchUpload, + + /// Indicates that the version ID specified in the request does not match an existing version. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchVersion, + + /// The specified bucket does not have a website configuration. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchWebsiteConfiguration, + + /// No transformation found for this Object Lambda Access Point. + /// + /// HTTP Status Code: 404 Not Found + /// + NoTransformationDefined, + + /// The device that generated the token is not owned by the authenticated user. + /// + /// HTTP Status Code: 400 Bad Request + /// + NotDeviceOwnerError, + + /// A header you provided implies functionality that is not implemented. + /// + /// HTTP Status Code: 501 Not Implemented + /// + NotImplemented, + + /// The resource was not changed. + /// + /// HTTP Status Code: 304 Not Modified + /// + NotModified, + + /// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 + /// + /// HTTP Status Code: 403 Forbidden + /// + NotSignedUp, + + /// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers. + /// + /// HTTP Status Code: 400 Bad Request + /// + NumberFormatError, + + /// The Object Lock configuration does not exist for this bucket. + /// + /// HTTP Status Code: 404 Not Found + /// + ObjectLockConfigurationNotFoundError, + + /// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each. + /// + /// HTTP Status Code: 400 Bad Request + /// + ObjectSerializationConflict, + + /// A conflicting conditional action is currently in progress against this resource. Try again. + /// + /// HTTP Status Code: 409 Conflict + /// + OperationAborted, + + /// The number of columns in the result is greater than the maximum allowable number of columns. + /// + /// HTTP Status Code: 400 Bad Request + /// + OverMaxColumn, + + /// The Parquet file is above the max row group size. + /// + /// HTTP Status Code: 400 Bad Request + /// + OverMaxParquetBlockSize, + + /// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB. + /// + /// HTTP Status Code: 400 Bad Request + /// + OverMaxRecordSize, + + /// The bucket ownership controls were not found. + /// + /// HTTP Status Code: 404 Not Found + /// + OwnershipControlsNotFoundError, + + /// An error occurred while parsing the Parquet file. Check the file and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParquetParsingError, + + /// The specified Parquet compression codec is not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParquetUnsupportedCompressionCodec, + + /// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseAsteriskIsNotAloneInSelectList, + + /// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseCannotMixSqbAndWildcardInSelectList, + + /// The SQL expression CAST has incorrect arity. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseCastArity, + + /// The SQL expression contains an empty SELECT clause. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseEmptySelect, + + /// The expected token in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpected2TokenTypes, + + /// The expected argument delimiter in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedArgumentDelimiter, + + /// The expected date part in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedDatePart, + + /// The expected SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedExpression, + + /// The expected identifier for the alias in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedIdentForAlias, + + /// The expected identifier for AT name in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedIdentForAt, + + /// GROUP is not supported in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedIdentForGroupName, + + /// The expected keyword in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedKeyword, + + /// The expected left parenthesis after CAST in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedLeftParenAfterCast, + + /// The expected left parenthesis in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedLeftParenBuiltinFunctionCall, + + /// The expected left parenthesis in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedLeftParenValueConstructor, + + /// The SQL expression contains an unsupported use of MEMBER. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedMember, + + /// The expected number in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedNumber, + + /// The expected right parenthesis character in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedRightParenBuiltinFunctionCall, + + /// The expected token in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedTokenType, + + /// The expected type name in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedTypeName, + + /// The expected WHEN clause in the SQL expression was not found. CASE is not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedWhenClause, + + /// The use of * in the SELECT list in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseInvalidContextForWildcardInSelectList, + + /// The SQL expression contains a path component that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseInvalidPathComponent, + + /// The SQL expression contains a parameter value that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseInvalidTypeParam, + + /// JOIN is not supported in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseMalformedJoin, + + /// The expected identifier after the @ symbol in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseMissingIdentAfterAt, + + /// Only one argument is supported for aggregate functions in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseNonUnaryAgregateFunctionCall, + + /// The SQL expression contains a missing FROM after the SELECT list. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseSelectMissingFrom, + + /// The SQL expression contains an unexpected keyword. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnExpectedKeyword, + + /// The SQL expression contains an unexpected operator. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnexpectedOperator, + + /// The SQL expression contains an unexpected term. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnexpectedTerm, + + /// The SQL expression contains an unexpected token. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnexpectedToken, + + /// The SQL expression contains an operator that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnknownOperator, + + /// The SQL expression contains an unsupported use of ALIAS. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedAlias, + + /// Only COUNT with (*) as a parameter is supported in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedCallWithStar, + + /// The SQL expression contains an unsupported use of CASE. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedCase, + + /// The SQL expression contains an unsupported use of CASE. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedCaseClause, + + /// The SQL expression contains an unsupported use of GROUP BY. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedLiteralsGroupBy, + + /// The SQL expression contains an unsupported use of SELECT. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedSelect, + + /// The SQL expression contains unsupported syntax. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedSyntax, + + /// The SQL expression contains an unsupported token. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedToken, + + /// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. + /// + /// HTTP Status Code: 301 Moved Permanently + /// + PermanentRedirect, + + /// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. + /// + /// HTTP Status Code: 301 Moved Permanently + /// + PermanentRedirectControlError, + + /// At least one of the preconditions you specified did not hold. + /// + /// HTTP Status Code: 412 Precondition Failed + /// + PreconditionFailed, + + /// Temporary redirect. + /// + /// HTTP Status Code: 307 Moved Temporarily + /// + Redirect, + + /// There is no replication configuration for this bucket. + /// + /// HTTP Status Code: 404 Not Found + /// + ReplicationConfigurationNotFoundError, + + /// The request header and query parameters used to make the request exceed the maximum allowed size. + /// + /// HTTP Status Code: 400 Bad Request + /// + RequestHeaderSectionTooLarge, + + /// Bucket POST must be of the enclosure-type multipart/form-data. + /// + /// HTTP Status Code: 400 Bad Request + /// + RequestIsNotMultiPartContent, + + /// The difference between the request time and the server's time is too large. + /// + /// HTTP Status Code: 403 Forbidden + /// + RequestTimeTooSkewed, + + /// Your socket connection to the server was not read from or written to within the timeout period. + /// + /// HTTP Status Code: 400 Bad Request + /// + RequestTimeout, + + /// Requesting the torrent file of a bucket is not permitted. + /// + /// HTTP Status Code: 400 Bad Request + /// + RequestTorrentOfBucketError, + + /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. + /// + /// HTTP Status Code: 400 Bad Request + /// + ResponseInterrupted, + + /// Object restore is already in progress. + /// + /// HTTP Status Code: 409 Conflict + /// + RestoreAlreadyInProgress, + + /// The server-side encryption configuration was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ServerSideEncryptionConfigurationNotFoundError, + + /// Service is unable to handle request. + /// + /// HTTP Status Code: 503 Service Unavailable + /// + ServiceUnavailable, + + /// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details. + /// + /// HTTP Status Code: 403 Forbidden + /// + SignatureDoesNotMatch, + + /// Reduce your request rate. + /// + /// HTTP Status Code: 503 Slow Down + /// + SlowDown, + + /// The tag policy does not allow the specified value for the following tag key. + /// + /// HTTP Status Code: 400 Bad Request + /// + TagPolicyException, + + /// You are being redirected to the bucket while DNS updates. + /// + /// HTTP Status Code: 307 Moved Temporarily + /// + TemporaryRedirect, + + /// The serial number and/or token code you provided is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + TokenCodeInvalidError, + + /// The provided token must be refreshed. + /// + /// HTTP Status Code: 400 Bad Request + /// + TokenRefreshRequired, + + /// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyAccessPoints, + + /// You have attempted to create more buckets than allowed. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyBuckets, + + /// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyMultiRegionAccessPointregionsError, + + /// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyMultiRegionAccessPoints, + + /// The number of tags exceeds the limit of 50 tags. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyTags, + + /// Object decompression failed. Check that the object is properly compressed using the format specified in the request. + /// + /// HTTP Status Code: 400 Bad Request + /// + TruncatedInput, + + /// You are not authorized to perform this operation. + /// + /// HTTP Status Code: 401 Unauthorized + /// + UnauthorizedAccess, + + /// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal. + /// + /// HTTP Status Code: 403 Forbidden + /// + UnauthorizedAccessError, + + /// This request does not support content. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnexpectedContent, + + /// Applicable in China Regions only. This request was rejected because the IP was unexpected. + /// + /// HTTP Status Code: 403 Forbidden + /// + UnexpectedIPError, + + /// We encountered a record type that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnrecognizedFormatException, + + /// The email address you provided does not match any account on record. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnresolvableGrantByEmailAddress, + + /// The request contained an unsupported argument. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedArgument, + + /// We encountered an unsupported SQL function. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedFunction, + + /// The specified Parquet type is not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedParquetType, + + /// A range header is not supported for this operation. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedRangeHeader, + + /// Scan range queries are not supported on this type of object. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedScanRangeInput, + + /// The provided request is signed with an unsupported STS Token version or the signature version is not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedSignature, + + /// We encountered an unsupported SQL operation. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedSqlOperation, + + /// We encountered an unsupported SQL structure. Check the SQL Reference. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedSqlStructure, + + /// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedStorageClass, + + /// We encountered syntax that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedSyntax, + + /// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0). + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedTypeForQuerying, + + /// The bucket POST must contain the specified field name. If it is specified, check the order of the fields. + /// + /// HTTP Status Code: 400 Bad Request + /// + UserKeyMustBeSpecified, + + /// A timestamp parse failure occurred in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ValueParseFailure, + + Custom(ByteString), } impl S3ErrorCode { -const STATIC_CODE_LIST: &'static [&'static str] = &[ -"AccessControlListNotSupported", -"AccessDenied", -"AccessPointAlreadyOwnedByYou", -"AccountProblem", -"AllAccessDisabled", -"AmbiguousFieldName", -"AmbiguousGrantByEmailAddress", -"AuthorizationHeaderMalformed", -"AuthorizationQueryParametersError", -"BadDigest", -"BucketAlreadyExists", -"BucketAlreadyOwnedByYou", -"BucketHasAccessPointsAttached", -"BucketNotEmpty", -"Busy", -"CSVEscapingRecordDelimiter", -"CSVParsingError", -"CSVUnescapedQuote", -"CastFailed", -"ClientTokenConflict", -"ColumnTooLong", -"ConditionalRequestConflict", -"ConnectionClosedByRequester", -"CredentialsNotSupported", -"CrossLocationLoggingProhibited", -"DeviceNotActiveError", -"EmptyRequestBody", -"EndpointNotFound", -"EntityTooLarge", -"EntityTooSmall", -"EvaluatorBindingDoesNotExist", -"EvaluatorInvalidArguments", -"EvaluatorInvalidTimestampFormatPattern", -"EvaluatorInvalidTimestampFormatPatternSymbol", -"EvaluatorInvalidTimestampFormatPatternSymbolForParsing", -"EvaluatorInvalidTimestampFormatPatternToken", -"EvaluatorLikePatternInvalidEscapeSequence", -"EvaluatorNegativeLimit", -"EvaluatorTimestampFormatPatternDuplicateFields", -"EvaluatorTimestampFormatPatternHourClockAmPmMismatch", -"EvaluatorUnterminatedTimestampFormatPatternToken", -"ExpiredToken", -"ExpressionTooLong", -"ExternalEvalException", -"IllegalLocationConstraintException", -"IllegalSqlFunctionArgument", -"IllegalVersioningConfigurationException", -"IncompleteBody", -"IncorrectEndpoint", -"IncorrectNumberOfFilesInPostRequest", -"IncorrectSqlFunctionArgumentType", -"InlineDataTooLarge", -"IntegerOverflow", -"InternalError", -"InvalidAccessKeyId", -"InvalidAccessPoint", -"InvalidAccessPointAliasError", -"InvalidAddressingHeader", -"InvalidArgument", -"InvalidBucketAclWithObjectOwnership", -"InvalidBucketName", -"InvalidBucketOwnerAWSAccountID", -"InvalidBucketState", -"InvalidCast", -"InvalidColumnIndex", -"InvalidCompressionFormat", -"InvalidDataSource", -"InvalidDataType", -"InvalidDigest", -"InvalidEncryptionAlgorithmError", -"InvalidExpressionType", -"InvalidFileHeaderInfo", -"InvalidHostHeader", -"InvalidHttpMethod", -"InvalidJsonType", -"InvalidKeyPath", -"InvalidLocationConstraint", -"InvalidObjectState", -"InvalidPart", -"InvalidPartOrder", -"InvalidPayer", -"InvalidPolicyDocument", -"InvalidQuoteFields", -"InvalidRange", -"InvalidRegion", -"InvalidRequest", -"InvalidRequestParameter", -"InvalidSOAPRequest", -"InvalidScanRange", -"InvalidSecurity", -"InvalidSessionException", -"InvalidSignature", -"InvalidStorageClass", -"InvalidTableAlias", -"InvalidTag", -"InvalidTargetBucketForLogging", -"InvalidTextEncoding", -"InvalidToken", -"InvalidURI", -"JSONParsingError", -"KeyTooLongError", -"LexerInvalidChar", -"LexerInvalidIONLiteral", -"LexerInvalidLiteral", -"LexerInvalidOperator", -"LikeInvalidInputs", -"MalformedACLError", -"MalformedPOSTRequest", -"MalformedPolicy", -"MalformedXML", -"MaxMessageLengthExceeded", -"MaxOperatorsExceeded", -"MaxPostPreDataLengthExceededError", -"MetadataTooLarge", -"MethodNotAllowed", -"MissingAttachment", -"MissingAuthenticationToken", -"MissingContentLength", -"MissingRequestBodyError", -"MissingRequiredParameter", -"MissingSecurityElement", -"MissingSecurityHeader", -"MultipleDataSourcesUnsupported", -"NoLoggingStatusForKey", -"NoSuchAccessPoint", -"NoSuchAsyncRequest", -"NoSuchBucket", -"NoSuchBucketPolicy", -"NoSuchCORSConfiguration", -"NoSuchKey", -"NoSuchLifecycleConfiguration", -"NoSuchMultiRegionAccessPoint", -"NoSuchObjectLockConfiguration", -"NoSuchResource", -"NoSuchTagSet", -"NoSuchUpload", -"NoSuchVersion", -"NoSuchWebsiteConfiguration", -"NoTransformationDefined", -"NotDeviceOwnerError", -"NotImplemented", -"NotModified", -"NotSignedUp", -"NumberFormatError", -"ObjectLockConfigurationNotFoundError", -"ObjectSerializationConflict", -"OperationAborted", -"OverMaxColumn", -"OverMaxParquetBlockSize", -"OverMaxRecordSize", -"OwnershipControlsNotFoundError", -"ParquetParsingError", -"ParquetUnsupportedCompressionCodec", -"ParseAsteriskIsNotAloneInSelectList", -"ParseCannotMixSqbAndWildcardInSelectList", -"ParseCastArity", -"ParseEmptySelect", -"ParseExpected2TokenTypes", -"ParseExpectedArgumentDelimiter", -"ParseExpectedDatePart", -"ParseExpectedExpression", -"ParseExpectedIdentForAlias", -"ParseExpectedIdentForAt", -"ParseExpectedIdentForGroupName", -"ParseExpectedKeyword", -"ParseExpectedLeftParenAfterCast", -"ParseExpectedLeftParenBuiltinFunctionCall", -"ParseExpectedLeftParenValueConstructor", -"ParseExpectedMember", -"ParseExpectedNumber", -"ParseExpectedRightParenBuiltinFunctionCall", -"ParseExpectedTokenType", -"ParseExpectedTypeName", -"ParseExpectedWhenClause", -"ParseInvalidContextForWildcardInSelectList", -"ParseInvalidPathComponent", -"ParseInvalidTypeParam", -"ParseMalformedJoin", -"ParseMissingIdentAfterAt", -"ParseNonUnaryAgregateFunctionCall", -"ParseSelectMissingFrom", -"ParseUnExpectedKeyword", -"ParseUnexpectedOperator", -"ParseUnexpectedTerm", -"ParseUnexpectedToken", -"ParseUnknownOperator", -"ParseUnsupportedAlias", -"ParseUnsupportedCallWithStar", -"ParseUnsupportedCase", -"ParseUnsupportedCaseClause", -"ParseUnsupportedLiteralsGroupBy", -"ParseUnsupportedSelect", -"ParseUnsupportedSyntax", -"ParseUnsupportedToken", -"PermanentRedirect", -"PermanentRedirectControlError", -"PreconditionFailed", -"Redirect", -"ReplicationConfigurationNotFoundError", -"RequestHeaderSectionTooLarge", -"RequestIsNotMultiPartContent", -"RequestTimeTooSkewed", -"RequestTimeout", -"RequestTorrentOfBucketError", -"ResponseInterrupted", -"RestoreAlreadyInProgress", -"ServerSideEncryptionConfigurationNotFoundError", -"ServiceUnavailable", -"SignatureDoesNotMatch", -"SlowDown", -"TagPolicyException", -"TemporaryRedirect", -"TokenCodeInvalidError", -"TokenRefreshRequired", -"TooManyAccessPoints", -"TooManyBuckets", -"TooManyMultiRegionAccessPointregionsError", -"TooManyMultiRegionAccessPoints", -"TooManyTags", -"TruncatedInput", -"UnauthorizedAccess", -"UnauthorizedAccessError", -"UnexpectedContent", -"UnexpectedIPError", -"UnrecognizedFormatException", -"UnresolvableGrantByEmailAddress", -"UnsupportedArgument", -"UnsupportedFunction", -"UnsupportedParquetType", -"UnsupportedRangeHeader", -"UnsupportedScanRangeInput", -"UnsupportedSignature", -"UnsupportedSqlOperation", -"UnsupportedSqlStructure", -"UnsupportedStorageClass", -"UnsupportedSyntax", -"UnsupportedTypeForQuerying", -"UserKeyMustBeSpecified", -"ValueParseFailure", -]; - -#[must_use] -fn as_enum_tag(&self) -> usize { -match self { -Self::AccessControlListNotSupported => 0, -Self::AccessDenied => 1, -Self::AccessPointAlreadyOwnedByYou => 2, -Self::AccountProblem => 3, -Self::AllAccessDisabled => 4, -Self::AmbiguousFieldName => 5, -Self::AmbiguousGrantByEmailAddress => 6, -Self::AuthorizationHeaderMalformed => 7, -Self::AuthorizationQueryParametersError => 8, -Self::BadDigest => 9, -Self::BucketAlreadyExists => 10, -Self::BucketAlreadyOwnedByYou => 11, -Self::BucketHasAccessPointsAttached => 12, -Self::BucketNotEmpty => 13, -Self::Busy => 14, -Self::CSVEscapingRecordDelimiter => 15, -Self::CSVParsingError => 16, -Self::CSVUnescapedQuote => 17, -Self::CastFailed => 18, -Self::ClientTokenConflict => 19, -Self::ColumnTooLong => 20, -Self::ConditionalRequestConflict => 21, -Self::ConnectionClosedByRequester => 22, -Self::CredentialsNotSupported => 23, -Self::CrossLocationLoggingProhibited => 24, -Self::DeviceNotActiveError => 25, -Self::EmptyRequestBody => 26, -Self::EndpointNotFound => 27, -Self::EntityTooLarge => 28, -Self::EntityTooSmall => 29, -Self::EvaluatorBindingDoesNotExist => 30, -Self::EvaluatorInvalidArguments => 31, -Self::EvaluatorInvalidTimestampFormatPattern => 32, -Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33, -Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34, -Self::EvaluatorInvalidTimestampFormatPatternToken => 35, -Self::EvaluatorLikePatternInvalidEscapeSequence => 36, -Self::EvaluatorNegativeLimit => 37, -Self::EvaluatorTimestampFormatPatternDuplicateFields => 38, -Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39, -Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40, -Self::ExpiredToken => 41, -Self::ExpressionTooLong => 42, -Self::ExternalEvalException => 43, -Self::IllegalLocationConstraintException => 44, -Self::IllegalSqlFunctionArgument => 45, -Self::IllegalVersioningConfigurationException => 46, -Self::IncompleteBody => 47, -Self::IncorrectEndpoint => 48, -Self::IncorrectNumberOfFilesInPostRequest => 49, -Self::IncorrectSqlFunctionArgumentType => 50, -Self::InlineDataTooLarge => 51, -Self::IntegerOverflow => 52, -Self::InternalError => 53, -Self::InvalidAccessKeyId => 54, -Self::InvalidAccessPoint => 55, -Self::InvalidAccessPointAliasError => 56, -Self::InvalidAddressingHeader => 57, -Self::InvalidArgument => 58, -Self::InvalidBucketAclWithObjectOwnership => 59, -Self::InvalidBucketName => 60, -Self::InvalidBucketOwnerAWSAccountID => 61, -Self::InvalidBucketState => 62, -Self::InvalidCast => 63, -Self::InvalidColumnIndex => 64, -Self::InvalidCompressionFormat => 65, -Self::InvalidDataSource => 66, -Self::InvalidDataType => 67, -Self::InvalidDigest => 68, -Self::InvalidEncryptionAlgorithmError => 69, -Self::InvalidExpressionType => 70, -Self::InvalidFileHeaderInfo => 71, -Self::InvalidHostHeader => 72, -Self::InvalidHttpMethod => 73, -Self::InvalidJsonType => 74, -Self::InvalidKeyPath => 75, -Self::InvalidLocationConstraint => 76, -Self::InvalidObjectState => 77, -Self::InvalidPart => 78, -Self::InvalidPartOrder => 79, -Self::InvalidPayer => 80, -Self::InvalidPolicyDocument => 81, -Self::InvalidQuoteFields => 82, -Self::InvalidRange => 83, -Self::InvalidRegion => 84, -Self::InvalidRequest => 85, -Self::InvalidRequestParameter => 86, -Self::InvalidSOAPRequest => 87, -Self::InvalidScanRange => 88, -Self::InvalidSecurity => 89, -Self::InvalidSessionException => 90, -Self::InvalidSignature => 91, -Self::InvalidStorageClass => 92, -Self::InvalidTableAlias => 93, -Self::InvalidTag => 94, -Self::InvalidTargetBucketForLogging => 95, -Self::InvalidTextEncoding => 96, -Self::InvalidToken => 97, -Self::InvalidURI => 98, -Self::JSONParsingError => 99, -Self::KeyTooLongError => 100, -Self::LexerInvalidChar => 101, -Self::LexerInvalidIONLiteral => 102, -Self::LexerInvalidLiteral => 103, -Self::LexerInvalidOperator => 104, -Self::LikeInvalidInputs => 105, -Self::MalformedACLError => 106, -Self::MalformedPOSTRequest => 107, -Self::MalformedPolicy => 108, -Self::MalformedXML => 109, -Self::MaxMessageLengthExceeded => 110, -Self::MaxOperatorsExceeded => 111, -Self::MaxPostPreDataLengthExceededError => 112, -Self::MetadataTooLarge => 113, -Self::MethodNotAllowed => 114, -Self::MissingAttachment => 115, -Self::MissingAuthenticationToken => 116, -Self::MissingContentLength => 117, -Self::MissingRequestBodyError => 118, -Self::MissingRequiredParameter => 119, -Self::MissingSecurityElement => 120, -Self::MissingSecurityHeader => 121, -Self::MultipleDataSourcesUnsupported => 122, -Self::NoLoggingStatusForKey => 123, -Self::NoSuchAccessPoint => 124, -Self::NoSuchAsyncRequest => 125, -Self::NoSuchBucket => 126, -Self::NoSuchBucketPolicy => 127, -Self::NoSuchCORSConfiguration => 128, -Self::NoSuchKey => 129, -Self::NoSuchLifecycleConfiguration => 130, -Self::NoSuchMultiRegionAccessPoint => 131, -Self::NoSuchObjectLockConfiguration => 132, -Self::NoSuchResource => 133, -Self::NoSuchTagSet => 134, -Self::NoSuchUpload => 135, -Self::NoSuchVersion => 136, -Self::NoSuchWebsiteConfiguration => 137, -Self::NoTransformationDefined => 138, -Self::NotDeviceOwnerError => 139, -Self::NotImplemented => 140, -Self::NotModified => 141, -Self::NotSignedUp => 142, -Self::NumberFormatError => 143, -Self::ObjectLockConfigurationNotFoundError => 144, -Self::ObjectSerializationConflict => 145, -Self::OperationAborted => 146, -Self::OverMaxColumn => 147, -Self::OverMaxParquetBlockSize => 148, -Self::OverMaxRecordSize => 149, -Self::OwnershipControlsNotFoundError => 150, -Self::ParquetParsingError => 151, -Self::ParquetUnsupportedCompressionCodec => 152, -Self::ParseAsteriskIsNotAloneInSelectList => 153, -Self::ParseCannotMixSqbAndWildcardInSelectList => 154, -Self::ParseCastArity => 155, -Self::ParseEmptySelect => 156, -Self::ParseExpected2TokenTypes => 157, -Self::ParseExpectedArgumentDelimiter => 158, -Self::ParseExpectedDatePart => 159, -Self::ParseExpectedExpression => 160, -Self::ParseExpectedIdentForAlias => 161, -Self::ParseExpectedIdentForAt => 162, -Self::ParseExpectedIdentForGroupName => 163, -Self::ParseExpectedKeyword => 164, -Self::ParseExpectedLeftParenAfterCast => 165, -Self::ParseExpectedLeftParenBuiltinFunctionCall => 166, -Self::ParseExpectedLeftParenValueConstructor => 167, -Self::ParseExpectedMember => 168, -Self::ParseExpectedNumber => 169, -Self::ParseExpectedRightParenBuiltinFunctionCall => 170, -Self::ParseExpectedTokenType => 171, -Self::ParseExpectedTypeName => 172, -Self::ParseExpectedWhenClause => 173, -Self::ParseInvalidContextForWildcardInSelectList => 174, -Self::ParseInvalidPathComponent => 175, -Self::ParseInvalidTypeParam => 176, -Self::ParseMalformedJoin => 177, -Self::ParseMissingIdentAfterAt => 178, -Self::ParseNonUnaryAgregateFunctionCall => 179, -Self::ParseSelectMissingFrom => 180, -Self::ParseUnExpectedKeyword => 181, -Self::ParseUnexpectedOperator => 182, -Self::ParseUnexpectedTerm => 183, -Self::ParseUnexpectedToken => 184, -Self::ParseUnknownOperator => 185, -Self::ParseUnsupportedAlias => 186, -Self::ParseUnsupportedCallWithStar => 187, -Self::ParseUnsupportedCase => 188, -Self::ParseUnsupportedCaseClause => 189, -Self::ParseUnsupportedLiteralsGroupBy => 190, -Self::ParseUnsupportedSelect => 191, -Self::ParseUnsupportedSyntax => 192, -Self::ParseUnsupportedToken => 193, -Self::PermanentRedirect => 194, -Self::PermanentRedirectControlError => 195, -Self::PreconditionFailed => 196, -Self::Redirect => 197, -Self::ReplicationConfigurationNotFoundError => 198, -Self::RequestHeaderSectionTooLarge => 199, -Self::RequestIsNotMultiPartContent => 200, -Self::RequestTimeTooSkewed => 201, -Self::RequestTimeout => 202, -Self::RequestTorrentOfBucketError => 203, -Self::ResponseInterrupted => 204, -Self::RestoreAlreadyInProgress => 205, -Self::ServerSideEncryptionConfigurationNotFoundError => 206, -Self::ServiceUnavailable => 207, -Self::SignatureDoesNotMatch => 208, -Self::SlowDown => 209, -Self::TagPolicyException => 210, -Self::TemporaryRedirect => 211, -Self::TokenCodeInvalidError => 212, -Self::TokenRefreshRequired => 213, -Self::TooManyAccessPoints => 214, -Self::TooManyBuckets => 215, -Self::TooManyMultiRegionAccessPointregionsError => 216, -Self::TooManyMultiRegionAccessPoints => 217, -Self::TooManyTags => 218, -Self::TruncatedInput => 219, -Self::UnauthorizedAccess => 220, -Self::UnauthorizedAccessError => 221, -Self::UnexpectedContent => 222, -Self::UnexpectedIPError => 223, -Self::UnrecognizedFormatException => 224, -Self::UnresolvableGrantByEmailAddress => 225, -Self::UnsupportedArgument => 226, -Self::UnsupportedFunction => 227, -Self::UnsupportedParquetType => 228, -Self::UnsupportedRangeHeader => 229, -Self::UnsupportedScanRangeInput => 230, -Self::UnsupportedSignature => 231, -Self::UnsupportedSqlOperation => 232, -Self::UnsupportedSqlStructure => 233, -Self::UnsupportedStorageClass => 234, -Self::UnsupportedSyntax => 235, -Self::UnsupportedTypeForQuerying => 236, -Self::UserKeyMustBeSpecified => 237, -Self::ValueParseFailure => 238, -Self::Custom(_) => usize::MAX, -} -} - -pub(crate) fn as_static_str(&self) -> Option<&'static str> { - Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied() -} - -#[must_use] -pub fn from_bytes(s: &[u8]) -> Option { -match s { -b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported), -b"AccessDenied" => Some(Self::AccessDenied), -b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou), -b"AccountProblem" => Some(Self::AccountProblem), -b"AllAccessDisabled" => Some(Self::AllAccessDisabled), -b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName), -b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress), -b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed), -b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError), -b"BadDigest" => Some(Self::BadDigest), -b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists), -b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou), -b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached), -b"BucketNotEmpty" => Some(Self::BucketNotEmpty), -b"Busy" => Some(Self::Busy), -b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter), -b"CSVParsingError" => Some(Self::CSVParsingError), -b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote), -b"CastFailed" => Some(Self::CastFailed), -b"ClientTokenConflict" => Some(Self::ClientTokenConflict), -b"ColumnTooLong" => Some(Self::ColumnTooLong), -b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict), -b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester), -b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported), -b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited), -b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError), -b"EmptyRequestBody" => Some(Self::EmptyRequestBody), -b"EndpointNotFound" => Some(Self::EndpointNotFound), -b"EntityTooLarge" => Some(Self::EntityTooLarge), -b"EntityTooSmall" => Some(Self::EntityTooSmall), -b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist), -b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments), -b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern), -b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol), -b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing), -b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken), -b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence), -b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit), -b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields), -b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch), -b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken), -b"ExpiredToken" => Some(Self::ExpiredToken), -b"ExpressionTooLong" => Some(Self::ExpressionTooLong), -b"ExternalEvalException" => Some(Self::ExternalEvalException), -b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException), -b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument), -b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException), -b"IncompleteBody" => Some(Self::IncompleteBody), -b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint), -b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest), -b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType), -b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge), -b"IntegerOverflow" => Some(Self::IntegerOverflow), -b"InternalError" => Some(Self::InternalError), -b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId), -b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint), -b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError), -b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader), -b"InvalidArgument" => Some(Self::InvalidArgument), -b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership), -b"InvalidBucketName" => Some(Self::InvalidBucketName), -b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID), -b"InvalidBucketState" => Some(Self::InvalidBucketState), -b"InvalidCast" => Some(Self::InvalidCast), -b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex), -b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat), -b"InvalidDataSource" => Some(Self::InvalidDataSource), -b"InvalidDataType" => Some(Self::InvalidDataType), -b"InvalidDigest" => Some(Self::InvalidDigest), -b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError), -b"InvalidExpressionType" => Some(Self::InvalidExpressionType), -b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo), -b"InvalidHostHeader" => Some(Self::InvalidHostHeader), -b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod), -b"InvalidJsonType" => Some(Self::InvalidJsonType), -b"InvalidKeyPath" => Some(Self::InvalidKeyPath), -b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint), -b"InvalidObjectState" => Some(Self::InvalidObjectState), -b"InvalidPart" => Some(Self::InvalidPart), -b"InvalidPartOrder" => Some(Self::InvalidPartOrder), -b"InvalidPayer" => Some(Self::InvalidPayer), -b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument), -b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields), -b"InvalidRange" => Some(Self::InvalidRange), -b"InvalidRegion" => Some(Self::InvalidRegion), -b"InvalidRequest" => Some(Self::InvalidRequest), -b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter), -b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest), -b"InvalidScanRange" => Some(Self::InvalidScanRange), -b"InvalidSecurity" => Some(Self::InvalidSecurity), -b"InvalidSessionException" => Some(Self::InvalidSessionException), -b"InvalidSignature" => Some(Self::InvalidSignature), -b"InvalidStorageClass" => Some(Self::InvalidStorageClass), -b"InvalidTableAlias" => Some(Self::InvalidTableAlias), -b"InvalidTag" => Some(Self::InvalidTag), -b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging), -b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding), -b"InvalidToken" => Some(Self::InvalidToken), -b"InvalidURI" => Some(Self::InvalidURI), -b"JSONParsingError" => Some(Self::JSONParsingError), -b"KeyTooLongError" => Some(Self::KeyTooLongError), -b"LexerInvalidChar" => Some(Self::LexerInvalidChar), -b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral), -b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral), -b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator), -b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs), -b"MalformedACLError" => Some(Self::MalformedACLError), -b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest), -b"MalformedPolicy" => Some(Self::MalformedPolicy), -b"MalformedXML" => Some(Self::MalformedXML), -b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded), -b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded), -b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError), -b"MetadataTooLarge" => Some(Self::MetadataTooLarge), -b"MethodNotAllowed" => Some(Self::MethodNotAllowed), -b"MissingAttachment" => Some(Self::MissingAttachment), -b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken), -b"MissingContentLength" => Some(Self::MissingContentLength), -b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError), -b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter), -b"MissingSecurityElement" => Some(Self::MissingSecurityElement), -b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader), -b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported), -b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey), -b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint), -b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest), -b"NoSuchBucket" => Some(Self::NoSuchBucket), -b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy), -b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration), -b"NoSuchKey" => Some(Self::NoSuchKey), -b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration), -b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint), -b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration), -b"NoSuchResource" => Some(Self::NoSuchResource), -b"NoSuchTagSet" => Some(Self::NoSuchTagSet), -b"NoSuchUpload" => Some(Self::NoSuchUpload), -b"NoSuchVersion" => Some(Self::NoSuchVersion), -b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration), -b"NoTransformationDefined" => Some(Self::NoTransformationDefined), -b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError), -b"NotImplemented" => Some(Self::NotImplemented), -b"NotModified" => Some(Self::NotModified), -b"NotSignedUp" => Some(Self::NotSignedUp), -b"NumberFormatError" => Some(Self::NumberFormatError), -b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError), -b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict), -b"OperationAborted" => Some(Self::OperationAborted), -b"OverMaxColumn" => Some(Self::OverMaxColumn), -b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize), -b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize), -b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError), -b"ParquetParsingError" => Some(Self::ParquetParsingError), -b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec), -b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList), -b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList), -b"ParseCastArity" => Some(Self::ParseCastArity), -b"ParseEmptySelect" => Some(Self::ParseEmptySelect), -b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes), -b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter), -b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart), -b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression), -b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias), -b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt), -b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName), -b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword), -b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast), -b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall), -b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor), -b"ParseExpectedMember" => Some(Self::ParseExpectedMember), -b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber), -b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall), -b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType), -b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName), -b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause), -b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList), -b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent), -b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam), -b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin), -b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt), -b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall), -b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom), -b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword), -b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator), -b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm), -b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken), -b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator), -b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias), -b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar), -b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase), -b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause), -b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy), -b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect), -b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax), -b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken), -b"PermanentRedirect" => Some(Self::PermanentRedirect), -b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError), -b"PreconditionFailed" => Some(Self::PreconditionFailed), -b"Redirect" => Some(Self::Redirect), -b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError), -b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge), -b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent), -b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed), -b"RequestTimeout" => Some(Self::RequestTimeout), -b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError), -b"ResponseInterrupted" => Some(Self::ResponseInterrupted), -b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress), -b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError), -b"ServiceUnavailable" => Some(Self::ServiceUnavailable), -b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch), -b"SlowDown" => Some(Self::SlowDown), -b"TagPolicyException" => Some(Self::TagPolicyException), -b"TemporaryRedirect" => Some(Self::TemporaryRedirect), -b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError), -b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired), -b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints), -b"TooManyBuckets" => Some(Self::TooManyBuckets), -b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError), -b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints), -b"TooManyTags" => Some(Self::TooManyTags), -b"TruncatedInput" => Some(Self::TruncatedInput), -b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess), -b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError), -b"UnexpectedContent" => Some(Self::UnexpectedContent), -b"UnexpectedIPError" => Some(Self::UnexpectedIPError), -b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException), -b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress), -b"UnsupportedArgument" => Some(Self::UnsupportedArgument), -b"UnsupportedFunction" => Some(Self::UnsupportedFunction), -b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType), -b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader), -b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput), -b"UnsupportedSignature" => Some(Self::UnsupportedSignature), -b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation), -b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure), -b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass), -b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax), -b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying), -b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified), -b"ValueParseFailure" => Some(Self::ValueParseFailure), -_ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())) -} -} - -#[allow(clippy::match_same_arms)] -#[must_use] -pub fn status_code(&self) -> Option { -match self { -Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST), -Self::AccessDenied => Some(StatusCode::FORBIDDEN), -Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT), -Self::AccountProblem => Some(StatusCode::FORBIDDEN), -Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN), -Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST), -Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), -Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST), -Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST), -Self::BadDigest => Some(StatusCode::BAD_REQUEST), -Self::BucketAlreadyExists => Some(StatusCode::CONFLICT), -Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT), -Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST), -Self::BucketNotEmpty => Some(StatusCode::CONFLICT), -Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE), -Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST), -Self::CSVParsingError => Some(StatusCode::BAD_REQUEST), -Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST), -Self::CastFailed => Some(StatusCode::BAD_REQUEST), -Self::ClientTokenConflict => Some(StatusCode::CONFLICT), -Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST), -Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT), -Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST), -Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST), -Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN), -Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST), -Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST), -Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST), -Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST), -Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), -Self::ExpiredToken => Some(StatusCode::BAD_REQUEST), -Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST), -Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST), -Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST), -Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST), -Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST), -Self::IncompleteBody => Some(StatusCode::BAD_REQUEST), -Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST), -Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST), -Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST), -Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST), -Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST), -Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR), -Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN), -Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST), -Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST), -Self::InvalidAddressingHeader => None, -Self::InvalidArgument => Some(StatusCode::BAD_REQUEST), -Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST), -Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST), -Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST), -Self::InvalidBucketState => Some(StatusCode::CONFLICT), -Self::InvalidCast => Some(StatusCode::BAD_REQUEST), -Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST), -Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST), -Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST), -Self::InvalidDataType => Some(StatusCode::BAD_REQUEST), -Self::InvalidDigest => Some(StatusCode::BAD_REQUEST), -Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST), -Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST), -Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST), -Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST), -Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST), -Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST), -Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST), -Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST), -Self::InvalidObjectState => Some(StatusCode::FORBIDDEN), -Self::InvalidPart => Some(StatusCode::BAD_REQUEST), -Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST), -Self::InvalidPayer => Some(StatusCode::FORBIDDEN), -Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST), -Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST), -Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE), -Self::InvalidRegion => Some(StatusCode::FORBIDDEN), -Self::InvalidRequest => Some(StatusCode::BAD_REQUEST), -Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST), -Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST), -Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST), -Self::InvalidSecurity => Some(StatusCode::FORBIDDEN), -Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST), -Self::InvalidSignature => Some(StatusCode::BAD_REQUEST), -Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST), -Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST), -Self::InvalidTag => Some(StatusCode::BAD_REQUEST), -Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST), -Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST), -Self::InvalidToken => Some(StatusCode::BAD_REQUEST), -Self::InvalidURI => Some(StatusCode::BAD_REQUEST), -Self::JSONParsingError => Some(StatusCode::BAD_REQUEST), -Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST), -Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST), -Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST), -Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST), -Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST), -Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST), -Self::MalformedACLError => Some(StatusCode::BAD_REQUEST), -Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST), -Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST), -Self::MalformedXML => Some(StatusCode::BAD_REQUEST), -Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST), -Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST), -Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST), -Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST), -Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED), -Self::MissingAttachment => None, -Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN), -Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED), -Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST), -Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST), -Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST), -Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST), -Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST), -Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST), -Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND), -Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND), -Self::NoSuchBucket => Some(StatusCode::NOT_FOUND), -Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND), -Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND), -Self::NoSuchKey => Some(StatusCode::NOT_FOUND), -Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND), -Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND), -Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND), -Self::NoSuchResource => Some(StatusCode::NOT_FOUND), -Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND), -Self::NoSuchUpload => Some(StatusCode::NOT_FOUND), -Self::NoSuchVersion => Some(StatusCode::NOT_FOUND), -Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND), -Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND), -Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST), -Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED), -Self::NotModified => Some(StatusCode::NOT_MODIFIED), -Self::NotSignedUp => Some(StatusCode::FORBIDDEN), -Self::NumberFormatError => Some(StatusCode::BAD_REQUEST), -Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), -Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST), -Self::OperationAborted => Some(StatusCode::CONFLICT), -Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST), -Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST), -Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST), -Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND), -Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST), -Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST), -Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST), -Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST), -Self::ParseCastArity => Some(StatusCode::BAD_REQUEST), -Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST), -Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST), -Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST), -Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST), -Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST), -Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST), -Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST), -Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST), -Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST), -Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST), -Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST), -Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST), -Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST), -Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST), -Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY), -Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY), -Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED), -Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT), -Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), -Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST), -Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST), -Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN), -Self::RequestTimeout => Some(StatusCode::BAD_REQUEST), -Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST), -Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST), -Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT), -Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST), -Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE), -Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN), -Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE), -Self::TagPolicyException => Some(StatusCode::BAD_REQUEST), -Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT), -Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST), -Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST), -Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST), -Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST), -Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST), -Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST), -Self::TooManyTags => Some(StatusCode::BAD_REQUEST), -Self::TruncatedInput => Some(StatusCode::BAD_REQUEST), -Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED), -Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN), -Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST), -Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN), -Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST), -Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST), -Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST), -Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST), -Self::Custom(_) => None, -} -} - + const STATIC_CODE_LIST: &'static [&'static str] = &[ + "AccessControlListNotSupported", + "AccessDenied", + "AccessPointAlreadyOwnedByYou", + "AccountProblem", + "AllAccessDisabled", + "AmbiguousFieldName", + "AmbiguousGrantByEmailAddress", + "AuthorizationHeaderMalformed", + "AuthorizationQueryParametersError", + "BadDigest", + "BucketAlreadyExists", + "BucketAlreadyOwnedByYou", + "BucketHasAccessPointsAttached", + "BucketNotEmpty", + "Busy", + "CSVEscapingRecordDelimiter", + "CSVParsingError", + "CSVUnescapedQuote", + "CastFailed", + "ClientTokenConflict", + "ColumnTooLong", + "ConditionalRequestConflict", + "ConnectionClosedByRequester", + "CredentialsNotSupported", + "CrossLocationLoggingProhibited", + "DeviceNotActiveError", + "EmptyRequestBody", + "EndpointNotFound", + "EntityTooLarge", + "EntityTooSmall", + "EvaluatorBindingDoesNotExist", + "EvaluatorInvalidArguments", + "EvaluatorInvalidTimestampFormatPattern", + "EvaluatorInvalidTimestampFormatPatternSymbol", + "EvaluatorInvalidTimestampFormatPatternSymbolForParsing", + "EvaluatorInvalidTimestampFormatPatternToken", + "EvaluatorLikePatternInvalidEscapeSequence", + "EvaluatorNegativeLimit", + "EvaluatorTimestampFormatPatternDuplicateFields", + "EvaluatorTimestampFormatPatternHourClockAmPmMismatch", + "EvaluatorUnterminatedTimestampFormatPatternToken", + "ExpiredToken", + "ExpressionTooLong", + "ExternalEvalException", + "IllegalLocationConstraintException", + "IllegalSqlFunctionArgument", + "IllegalVersioningConfigurationException", + "IncompleteBody", + "IncorrectEndpoint", + "IncorrectNumberOfFilesInPostRequest", + "IncorrectSqlFunctionArgumentType", + "InlineDataTooLarge", + "IntegerOverflow", + "InternalError", + "InvalidAccessKeyId", + "InvalidAccessPoint", + "InvalidAccessPointAliasError", + "InvalidAddressingHeader", + "InvalidArgument", + "InvalidBucketAclWithObjectOwnership", + "InvalidBucketName", + "InvalidBucketOwnerAWSAccountID", + "InvalidBucketState", + "InvalidCast", + "InvalidColumnIndex", + "InvalidCompressionFormat", + "InvalidDataSource", + "InvalidDataType", + "InvalidDigest", + "InvalidEncryptionAlgorithmError", + "InvalidExpressionType", + "InvalidFileHeaderInfo", + "InvalidHostHeader", + "InvalidHttpMethod", + "InvalidJsonType", + "InvalidKeyPath", + "InvalidLocationConstraint", + "InvalidObjectState", + "InvalidPart", + "InvalidPartOrder", + "InvalidPayer", + "InvalidPolicyDocument", + "InvalidQuoteFields", + "InvalidRange", + "InvalidRegion", + "InvalidRequest", + "InvalidRequestParameter", + "InvalidSOAPRequest", + "InvalidScanRange", + "InvalidSecurity", + "InvalidSessionException", + "InvalidSignature", + "InvalidStorageClass", + "InvalidTableAlias", + "InvalidTag", + "InvalidTargetBucketForLogging", + "InvalidTextEncoding", + "InvalidToken", + "InvalidURI", + "JSONParsingError", + "KeyTooLongError", + "LexerInvalidChar", + "LexerInvalidIONLiteral", + "LexerInvalidLiteral", + "LexerInvalidOperator", + "LikeInvalidInputs", + "MalformedACLError", + "MalformedPOSTRequest", + "MalformedPolicy", + "MalformedXML", + "MaxMessageLengthExceeded", + "MaxOperatorsExceeded", + "MaxPostPreDataLengthExceededError", + "MetadataTooLarge", + "MethodNotAllowed", + "MissingAttachment", + "MissingAuthenticationToken", + "MissingContentLength", + "MissingRequestBodyError", + "MissingRequiredParameter", + "MissingSecurityElement", + "MissingSecurityHeader", + "MultipleDataSourcesUnsupported", + "NoLoggingStatusForKey", + "NoSuchAccessPoint", + "NoSuchAsyncRequest", + "NoSuchBucket", + "NoSuchBucketPolicy", + "NoSuchCORSConfiguration", + "NoSuchKey", + "NoSuchLifecycleConfiguration", + "NoSuchMultiRegionAccessPoint", + "NoSuchObjectLockConfiguration", + "NoSuchResource", + "NoSuchTagSet", + "NoSuchUpload", + "NoSuchVersion", + "NoSuchWebsiteConfiguration", + "NoTransformationDefined", + "NotDeviceOwnerError", + "NotImplemented", + "NotModified", + "NotSignedUp", + "NumberFormatError", + "ObjectLockConfigurationNotFoundError", + "ObjectSerializationConflict", + "OperationAborted", + "OverMaxColumn", + "OverMaxParquetBlockSize", + "OverMaxRecordSize", + "OwnershipControlsNotFoundError", + "ParquetParsingError", + "ParquetUnsupportedCompressionCodec", + "ParseAsteriskIsNotAloneInSelectList", + "ParseCannotMixSqbAndWildcardInSelectList", + "ParseCastArity", + "ParseEmptySelect", + "ParseExpected2TokenTypes", + "ParseExpectedArgumentDelimiter", + "ParseExpectedDatePart", + "ParseExpectedExpression", + "ParseExpectedIdentForAlias", + "ParseExpectedIdentForAt", + "ParseExpectedIdentForGroupName", + "ParseExpectedKeyword", + "ParseExpectedLeftParenAfterCast", + "ParseExpectedLeftParenBuiltinFunctionCall", + "ParseExpectedLeftParenValueConstructor", + "ParseExpectedMember", + "ParseExpectedNumber", + "ParseExpectedRightParenBuiltinFunctionCall", + "ParseExpectedTokenType", + "ParseExpectedTypeName", + "ParseExpectedWhenClause", + "ParseInvalidContextForWildcardInSelectList", + "ParseInvalidPathComponent", + "ParseInvalidTypeParam", + "ParseMalformedJoin", + "ParseMissingIdentAfterAt", + "ParseNonUnaryAgregateFunctionCall", + "ParseSelectMissingFrom", + "ParseUnExpectedKeyword", + "ParseUnexpectedOperator", + "ParseUnexpectedTerm", + "ParseUnexpectedToken", + "ParseUnknownOperator", + "ParseUnsupportedAlias", + "ParseUnsupportedCallWithStar", + "ParseUnsupportedCase", + "ParseUnsupportedCaseClause", + "ParseUnsupportedLiteralsGroupBy", + "ParseUnsupportedSelect", + "ParseUnsupportedSyntax", + "ParseUnsupportedToken", + "PermanentRedirect", + "PermanentRedirectControlError", + "PreconditionFailed", + "Redirect", + "ReplicationConfigurationNotFoundError", + "RequestHeaderSectionTooLarge", + "RequestIsNotMultiPartContent", + "RequestTimeTooSkewed", + "RequestTimeout", + "RequestTorrentOfBucketError", + "ResponseInterrupted", + "RestoreAlreadyInProgress", + "ServerSideEncryptionConfigurationNotFoundError", + "ServiceUnavailable", + "SignatureDoesNotMatch", + "SlowDown", + "TagPolicyException", + "TemporaryRedirect", + "TokenCodeInvalidError", + "TokenRefreshRequired", + "TooManyAccessPoints", + "TooManyBuckets", + "TooManyMultiRegionAccessPointregionsError", + "TooManyMultiRegionAccessPoints", + "TooManyTags", + "TruncatedInput", + "UnauthorizedAccess", + "UnauthorizedAccessError", + "UnexpectedContent", + "UnexpectedIPError", + "UnrecognizedFormatException", + "UnresolvableGrantByEmailAddress", + "UnsupportedArgument", + "UnsupportedFunction", + "UnsupportedParquetType", + "UnsupportedRangeHeader", + "UnsupportedScanRangeInput", + "UnsupportedSignature", + "UnsupportedSqlOperation", + "UnsupportedSqlStructure", + "UnsupportedStorageClass", + "UnsupportedSyntax", + "UnsupportedTypeForQuerying", + "UserKeyMustBeSpecified", + "ValueParseFailure", + ]; + + #[must_use] + fn as_enum_tag(&self) -> usize { + match self { + Self::AccessControlListNotSupported => 0, + Self::AccessDenied => 1, + Self::AccessPointAlreadyOwnedByYou => 2, + Self::AccountProblem => 3, + Self::AllAccessDisabled => 4, + Self::AmbiguousFieldName => 5, + Self::AmbiguousGrantByEmailAddress => 6, + Self::AuthorizationHeaderMalformed => 7, + Self::AuthorizationQueryParametersError => 8, + Self::BadDigest => 9, + Self::BucketAlreadyExists => 10, + Self::BucketAlreadyOwnedByYou => 11, + Self::BucketHasAccessPointsAttached => 12, + Self::BucketNotEmpty => 13, + Self::Busy => 14, + Self::CSVEscapingRecordDelimiter => 15, + Self::CSVParsingError => 16, + Self::CSVUnescapedQuote => 17, + Self::CastFailed => 18, + Self::ClientTokenConflict => 19, + Self::ColumnTooLong => 20, + Self::ConditionalRequestConflict => 21, + Self::ConnectionClosedByRequester => 22, + Self::CredentialsNotSupported => 23, + Self::CrossLocationLoggingProhibited => 24, + Self::DeviceNotActiveError => 25, + Self::EmptyRequestBody => 26, + Self::EndpointNotFound => 27, + Self::EntityTooLarge => 28, + Self::EntityTooSmall => 29, + Self::EvaluatorBindingDoesNotExist => 30, + Self::EvaluatorInvalidArguments => 31, + Self::EvaluatorInvalidTimestampFormatPattern => 32, + Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33, + Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34, + Self::EvaluatorInvalidTimestampFormatPatternToken => 35, + Self::EvaluatorLikePatternInvalidEscapeSequence => 36, + Self::EvaluatorNegativeLimit => 37, + Self::EvaluatorTimestampFormatPatternDuplicateFields => 38, + Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39, + Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40, + Self::ExpiredToken => 41, + Self::ExpressionTooLong => 42, + Self::ExternalEvalException => 43, + Self::IllegalLocationConstraintException => 44, + Self::IllegalSqlFunctionArgument => 45, + Self::IllegalVersioningConfigurationException => 46, + Self::IncompleteBody => 47, + Self::IncorrectEndpoint => 48, + Self::IncorrectNumberOfFilesInPostRequest => 49, + Self::IncorrectSqlFunctionArgumentType => 50, + Self::InlineDataTooLarge => 51, + Self::IntegerOverflow => 52, + Self::InternalError => 53, + Self::InvalidAccessKeyId => 54, + Self::InvalidAccessPoint => 55, + Self::InvalidAccessPointAliasError => 56, + Self::InvalidAddressingHeader => 57, + Self::InvalidArgument => 58, + Self::InvalidBucketAclWithObjectOwnership => 59, + Self::InvalidBucketName => 60, + Self::InvalidBucketOwnerAWSAccountID => 61, + Self::InvalidBucketState => 62, + Self::InvalidCast => 63, + Self::InvalidColumnIndex => 64, + Self::InvalidCompressionFormat => 65, + Self::InvalidDataSource => 66, + Self::InvalidDataType => 67, + Self::InvalidDigest => 68, + Self::InvalidEncryptionAlgorithmError => 69, + Self::InvalidExpressionType => 70, + Self::InvalidFileHeaderInfo => 71, + Self::InvalidHostHeader => 72, + Self::InvalidHttpMethod => 73, + Self::InvalidJsonType => 74, + Self::InvalidKeyPath => 75, + Self::InvalidLocationConstraint => 76, + Self::InvalidObjectState => 77, + Self::InvalidPart => 78, + Self::InvalidPartOrder => 79, + Self::InvalidPayer => 80, + Self::InvalidPolicyDocument => 81, + Self::InvalidQuoteFields => 82, + Self::InvalidRange => 83, + Self::InvalidRegion => 84, + Self::InvalidRequest => 85, + Self::InvalidRequestParameter => 86, + Self::InvalidSOAPRequest => 87, + Self::InvalidScanRange => 88, + Self::InvalidSecurity => 89, + Self::InvalidSessionException => 90, + Self::InvalidSignature => 91, + Self::InvalidStorageClass => 92, + Self::InvalidTableAlias => 93, + Self::InvalidTag => 94, + Self::InvalidTargetBucketForLogging => 95, + Self::InvalidTextEncoding => 96, + Self::InvalidToken => 97, + Self::InvalidURI => 98, + Self::JSONParsingError => 99, + Self::KeyTooLongError => 100, + Self::LexerInvalidChar => 101, + Self::LexerInvalidIONLiteral => 102, + Self::LexerInvalidLiteral => 103, + Self::LexerInvalidOperator => 104, + Self::LikeInvalidInputs => 105, + Self::MalformedACLError => 106, + Self::MalformedPOSTRequest => 107, + Self::MalformedPolicy => 108, + Self::MalformedXML => 109, + Self::MaxMessageLengthExceeded => 110, + Self::MaxOperatorsExceeded => 111, + Self::MaxPostPreDataLengthExceededError => 112, + Self::MetadataTooLarge => 113, + Self::MethodNotAllowed => 114, + Self::MissingAttachment => 115, + Self::MissingAuthenticationToken => 116, + Self::MissingContentLength => 117, + Self::MissingRequestBodyError => 118, + Self::MissingRequiredParameter => 119, + Self::MissingSecurityElement => 120, + Self::MissingSecurityHeader => 121, + Self::MultipleDataSourcesUnsupported => 122, + Self::NoLoggingStatusForKey => 123, + Self::NoSuchAccessPoint => 124, + Self::NoSuchAsyncRequest => 125, + Self::NoSuchBucket => 126, + Self::NoSuchBucketPolicy => 127, + Self::NoSuchCORSConfiguration => 128, + Self::NoSuchKey => 129, + Self::NoSuchLifecycleConfiguration => 130, + Self::NoSuchMultiRegionAccessPoint => 131, + Self::NoSuchObjectLockConfiguration => 132, + Self::NoSuchResource => 133, + Self::NoSuchTagSet => 134, + Self::NoSuchUpload => 135, + Self::NoSuchVersion => 136, + Self::NoSuchWebsiteConfiguration => 137, + Self::NoTransformationDefined => 138, + Self::NotDeviceOwnerError => 139, + Self::NotImplemented => 140, + Self::NotModified => 141, + Self::NotSignedUp => 142, + Self::NumberFormatError => 143, + Self::ObjectLockConfigurationNotFoundError => 144, + Self::ObjectSerializationConflict => 145, + Self::OperationAborted => 146, + Self::OverMaxColumn => 147, + Self::OverMaxParquetBlockSize => 148, + Self::OverMaxRecordSize => 149, + Self::OwnershipControlsNotFoundError => 150, + Self::ParquetParsingError => 151, + Self::ParquetUnsupportedCompressionCodec => 152, + Self::ParseAsteriskIsNotAloneInSelectList => 153, + Self::ParseCannotMixSqbAndWildcardInSelectList => 154, + Self::ParseCastArity => 155, + Self::ParseEmptySelect => 156, + Self::ParseExpected2TokenTypes => 157, + Self::ParseExpectedArgumentDelimiter => 158, + Self::ParseExpectedDatePart => 159, + Self::ParseExpectedExpression => 160, + Self::ParseExpectedIdentForAlias => 161, + Self::ParseExpectedIdentForAt => 162, + Self::ParseExpectedIdentForGroupName => 163, + Self::ParseExpectedKeyword => 164, + Self::ParseExpectedLeftParenAfterCast => 165, + Self::ParseExpectedLeftParenBuiltinFunctionCall => 166, + Self::ParseExpectedLeftParenValueConstructor => 167, + Self::ParseExpectedMember => 168, + Self::ParseExpectedNumber => 169, + Self::ParseExpectedRightParenBuiltinFunctionCall => 170, + Self::ParseExpectedTokenType => 171, + Self::ParseExpectedTypeName => 172, + Self::ParseExpectedWhenClause => 173, + Self::ParseInvalidContextForWildcardInSelectList => 174, + Self::ParseInvalidPathComponent => 175, + Self::ParseInvalidTypeParam => 176, + Self::ParseMalformedJoin => 177, + Self::ParseMissingIdentAfterAt => 178, + Self::ParseNonUnaryAgregateFunctionCall => 179, + Self::ParseSelectMissingFrom => 180, + Self::ParseUnExpectedKeyword => 181, + Self::ParseUnexpectedOperator => 182, + Self::ParseUnexpectedTerm => 183, + Self::ParseUnexpectedToken => 184, + Self::ParseUnknownOperator => 185, + Self::ParseUnsupportedAlias => 186, + Self::ParseUnsupportedCallWithStar => 187, + Self::ParseUnsupportedCase => 188, + Self::ParseUnsupportedCaseClause => 189, + Self::ParseUnsupportedLiteralsGroupBy => 190, + Self::ParseUnsupportedSelect => 191, + Self::ParseUnsupportedSyntax => 192, + Self::ParseUnsupportedToken => 193, + Self::PermanentRedirect => 194, + Self::PermanentRedirectControlError => 195, + Self::PreconditionFailed => 196, + Self::Redirect => 197, + Self::ReplicationConfigurationNotFoundError => 198, + Self::RequestHeaderSectionTooLarge => 199, + Self::RequestIsNotMultiPartContent => 200, + Self::RequestTimeTooSkewed => 201, + Self::RequestTimeout => 202, + Self::RequestTorrentOfBucketError => 203, + Self::ResponseInterrupted => 204, + Self::RestoreAlreadyInProgress => 205, + Self::ServerSideEncryptionConfigurationNotFoundError => 206, + Self::ServiceUnavailable => 207, + Self::SignatureDoesNotMatch => 208, + Self::SlowDown => 209, + Self::TagPolicyException => 210, + Self::TemporaryRedirect => 211, + Self::TokenCodeInvalidError => 212, + Self::TokenRefreshRequired => 213, + Self::TooManyAccessPoints => 214, + Self::TooManyBuckets => 215, + Self::TooManyMultiRegionAccessPointregionsError => 216, + Self::TooManyMultiRegionAccessPoints => 217, + Self::TooManyTags => 218, + Self::TruncatedInput => 219, + Self::UnauthorizedAccess => 220, + Self::UnauthorizedAccessError => 221, + Self::UnexpectedContent => 222, + Self::UnexpectedIPError => 223, + Self::UnrecognizedFormatException => 224, + Self::UnresolvableGrantByEmailAddress => 225, + Self::UnsupportedArgument => 226, + Self::UnsupportedFunction => 227, + Self::UnsupportedParquetType => 228, + Self::UnsupportedRangeHeader => 229, + Self::UnsupportedScanRangeInput => 230, + Self::UnsupportedSignature => 231, + Self::UnsupportedSqlOperation => 232, + Self::UnsupportedSqlStructure => 233, + Self::UnsupportedStorageClass => 234, + Self::UnsupportedSyntax => 235, + Self::UnsupportedTypeForQuerying => 236, + Self::UserKeyMustBeSpecified => 237, + Self::ValueParseFailure => 238, + Self::Custom(_) => usize::MAX, + } + } + + pub(crate) fn as_static_str(&self) -> Option<&'static str> { + Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied() + } + + #[must_use] + pub fn from_bytes(s: &[u8]) -> Option { + match s { + b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported), + b"AccessDenied" => Some(Self::AccessDenied), + b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou), + b"AccountProblem" => Some(Self::AccountProblem), + b"AllAccessDisabled" => Some(Self::AllAccessDisabled), + b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName), + b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress), + b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed), + b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError), + b"BadDigest" => Some(Self::BadDigest), + b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists), + b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou), + b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached), + b"BucketNotEmpty" => Some(Self::BucketNotEmpty), + b"Busy" => Some(Self::Busy), + b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter), + b"CSVParsingError" => Some(Self::CSVParsingError), + b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote), + b"CastFailed" => Some(Self::CastFailed), + b"ClientTokenConflict" => Some(Self::ClientTokenConflict), + b"ColumnTooLong" => Some(Self::ColumnTooLong), + b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict), + b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester), + b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported), + b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited), + b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError), + b"EmptyRequestBody" => Some(Self::EmptyRequestBody), + b"EndpointNotFound" => Some(Self::EndpointNotFound), + b"EntityTooLarge" => Some(Self::EntityTooLarge), + b"EntityTooSmall" => Some(Self::EntityTooSmall), + b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist), + b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments), + b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern), + b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol), + b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => { + Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing) + } + b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken), + b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence), + b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit), + b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields), + b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => { + Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch) + } + b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken), + b"ExpiredToken" => Some(Self::ExpiredToken), + b"ExpressionTooLong" => Some(Self::ExpressionTooLong), + b"ExternalEvalException" => Some(Self::ExternalEvalException), + b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException), + b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument), + b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException), + b"IncompleteBody" => Some(Self::IncompleteBody), + b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint), + b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest), + b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType), + b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge), + b"IntegerOverflow" => Some(Self::IntegerOverflow), + b"InternalError" => Some(Self::InternalError), + b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId), + b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint), + b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError), + b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader), + b"InvalidArgument" => Some(Self::InvalidArgument), + b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership), + b"InvalidBucketName" => Some(Self::InvalidBucketName), + b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID), + b"InvalidBucketState" => Some(Self::InvalidBucketState), + b"InvalidCast" => Some(Self::InvalidCast), + b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex), + b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat), + b"InvalidDataSource" => Some(Self::InvalidDataSource), + b"InvalidDataType" => Some(Self::InvalidDataType), + b"InvalidDigest" => Some(Self::InvalidDigest), + b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError), + b"InvalidExpressionType" => Some(Self::InvalidExpressionType), + b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo), + b"InvalidHostHeader" => Some(Self::InvalidHostHeader), + b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod), + b"InvalidJsonType" => Some(Self::InvalidJsonType), + b"InvalidKeyPath" => Some(Self::InvalidKeyPath), + b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint), + b"InvalidObjectState" => Some(Self::InvalidObjectState), + b"InvalidPart" => Some(Self::InvalidPart), + b"InvalidPartOrder" => Some(Self::InvalidPartOrder), + b"InvalidPayer" => Some(Self::InvalidPayer), + b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument), + b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields), + b"InvalidRange" => Some(Self::InvalidRange), + b"InvalidRegion" => Some(Self::InvalidRegion), + b"InvalidRequest" => Some(Self::InvalidRequest), + b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter), + b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest), + b"InvalidScanRange" => Some(Self::InvalidScanRange), + b"InvalidSecurity" => Some(Self::InvalidSecurity), + b"InvalidSessionException" => Some(Self::InvalidSessionException), + b"InvalidSignature" => Some(Self::InvalidSignature), + b"InvalidStorageClass" => Some(Self::InvalidStorageClass), + b"InvalidTableAlias" => Some(Self::InvalidTableAlias), + b"InvalidTag" => Some(Self::InvalidTag), + b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging), + b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding), + b"InvalidToken" => Some(Self::InvalidToken), + b"InvalidURI" => Some(Self::InvalidURI), + b"JSONParsingError" => Some(Self::JSONParsingError), + b"KeyTooLongError" => Some(Self::KeyTooLongError), + b"LexerInvalidChar" => Some(Self::LexerInvalidChar), + b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral), + b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral), + b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator), + b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs), + b"MalformedACLError" => Some(Self::MalformedACLError), + b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest), + b"MalformedPolicy" => Some(Self::MalformedPolicy), + b"MalformedXML" => Some(Self::MalformedXML), + b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded), + b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded), + b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError), + b"MetadataTooLarge" => Some(Self::MetadataTooLarge), + b"MethodNotAllowed" => Some(Self::MethodNotAllowed), + b"MissingAttachment" => Some(Self::MissingAttachment), + b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken), + b"MissingContentLength" => Some(Self::MissingContentLength), + b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError), + b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter), + b"MissingSecurityElement" => Some(Self::MissingSecurityElement), + b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader), + b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported), + b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey), + b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint), + b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest), + b"NoSuchBucket" => Some(Self::NoSuchBucket), + b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy), + b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration), + b"NoSuchKey" => Some(Self::NoSuchKey), + b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration), + b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint), + b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration), + b"NoSuchResource" => Some(Self::NoSuchResource), + b"NoSuchTagSet" => Some(Self::NoSuchTagSet), + b"NoSuchUpload" => Some(Self::NoSuchUpload), + b"NoSuchVersion" => Some(Self::NoSuchVersion), + b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration), + b"NoTransformationDefined" => Some(Self::NoTransformationDefined), + b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError), + b"NotImplemented" => Some(Self::NotImplemented), + b"NotModified" => Some(Self::NotModified), + b"NotSignedUp" => Some(Self::NotSignedUp), + b"NumberFormatError" => Some(Self::NumberFormatError), + b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError), + b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict), + b"OperationAborted" => Some(Self::OperationAborted), + b"OverMaxColumn" => Some(Self::OverMaxColumn), + b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize), + b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize), + b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError), + b"ParquetParsingError" => Some(Self::ParquetParsingError), + b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec), + b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList), + b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList), + b"ParseCastArity" => Some(Self::ParseCastArity), + b"ParseEmptySelect" => Some(Self::ParseEmptySelect), + b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes), + b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter), + b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart), + b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression), + b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias), + b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt), + b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName), + b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword), + b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast), + b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall), + b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor), + b"ParseExpectedMember" => Some(Self::ParseExpectedMember), + b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber), + b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall), + b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType), + b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName), + b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause), + b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList), + b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent), + b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam), + b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin), + b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt), + b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall), + b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom), + b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword), + b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator), + b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm), + b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken), + b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator), + b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias), + b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar), + b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase), + b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause), + b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy), + b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect), + b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax), + b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken), + b"PermanentRedirect" => Some(Self::PermanentRedirect), + b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError), + b"PreconditionFailed" => Some(Self::PreconditionFailed), + b"Redirect" => Some(Self::Redirect), + b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError), + b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge), + b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent), + b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed), + b"RequestTimeout" => Some(Self::RequestTimeout), + b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError), + b"ResponseInterrupted" => Some(Self::ResponseInterrupted), + b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress), + b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError), + b"ServiceUnavailable" => Some(Self::ServiceUnavailable), + b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch), + b"SlowDown" => Some(Self::SlowDown), + b"TagPolicyException" => Some(Self::TagPolicyException), + b"TemporaryRedirect" => Some(Self::TemporaryRedirect), + b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError), + b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired), + b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints), + b"TooManyBuckets" => Some(Self::TooManyBuckets), + b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError), + b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints), + b"TooManyTags" => Some(Self::TooManyTags), + b"TruncatedInput" => Some(Self::TruncatedInput), + b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess), + b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError), + b"UnexpectedContent" => Some(Self::UnexpectedContent), + b"UnexpectedIPError" => Some(Self::UnexpectedIPError), + b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException), + b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress), + b"UnsupportedArgument" => Some(Self::UnsupportedArgument), + b"UnsupportedFunction" => Some(Self::UnsupportedFunction), + b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType), + b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader), + b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput), + b"UnsupportedSignature" => Some(Self::UnsupportedSignature), + b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation), + b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure), + b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass), + b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax), + b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying), + b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified), + b"ValueParseFailure" => Some(Self::ValueParseFailure), + _ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())), + } + } + + #[allow(clippy::match_same_arms)] + #[must_use] + pub fn status_code(&self) -> Option { + match self { + Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST), + Self::AccessDenied => Some(StatusCode::FORBIDDEN), + Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT), + Self::AccountProblem => Some(StatusCode::FORBIDDEN), + Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN), + Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST), + Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), + Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST), + Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST), + Self::BadDigest => Some(StatusCode::BAD_REQUEST), + Self::BucketAlreadyExists => Some(StatusCode::CONFLICT), + Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT), + Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST), + Self::BucketNotEmpty => Some(StatusCode::CONFLICT), + Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE), + Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST), + Self::CSVParsingError => Some(StatusCode::BAD_REQUEST), + Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST), + Self::CastFailed => Some(StatusCode::BAD_REQUEST), + Self::ClientTokenConflict => Some(StatusCode::CONFLICT), + Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST), + Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT), + Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST), + Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST), + Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN), + Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST), + Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST), + Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST), + Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST), + Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), + Self::ExpiredToken => Some(StatusCode::BAD_REQUEST), + Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST), + Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST), + Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST), + Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST), + Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST), + Self::IncompleteBody => Some(StatusCode::BAD_REQUEST), + Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST), + Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST), + Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST), + Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST), + Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST), + Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR), + Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN), + Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST), + Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST), + Self::InvalidAddressingHeader => None, + Self::InvalidArgument => Some(StatusCode::BAD_REQUEST), + Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST), + Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST), + Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST), + Self::InvalidBucketState => Some(StatusCode::CONFLICT), + Self::InvalidCast => Some(StatusCode::BAD_REQUEST), + Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST), + Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST), + Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST), + Self::InvalidDataType => Some(StatusCode::BAD_REQUEST), + Self::InvalidDigest => Some(StatusCode::BAD_REQUEST), + Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST), + Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST), + Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST), + Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST), + Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST), + Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST), + Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST), + Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST), + Self::InvalidObjectState => Some(StatusCode::FORBIDDEN), + Self::InvalidPart => Some(StatusCode::BAD_REQUEST), + Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST), + Self::InvalidPayer => Some(StatusCode::FORBIDDEN), + Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST), + Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST), + Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE), + Self::InvalidRegion => Some(StatusCode::FORBIDDEN), + Self::InvalidRequest => Some(StatusCode::BAD_REQUEST), + Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST), + Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST), + Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST), + Self::InvalidSecurity => Some(StatusCode::FORBIDDEN), + Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST), + Self::InvalidSignature => Some(StatusCode::BAD_REQUEST), + Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST), + Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST), + Self::InvalidTag => Some(StatusCode::BAD_REQUEST), + Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST), + Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST), + Self::InvalidToken => Some(StatusCode::BAD_REQUEST), + Self::InvalidURI => Some(StatusCode::BAD_REQUEST), + Self::JSONParsingError => Some(StatusCode::BAD_REQUEST), + Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST), + Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST), + Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST), + Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST), + Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST), + Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST), + Self::MalformedACLError => Some(StatusCode::BAD_REQUEST), + Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST), + Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST), + Self::MalformedXML => Some(StatusCode::BAD_REQUEST), + Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST), + Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST), + Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST), + Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST), + Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED), + Self::MissingAttachment => None, + Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN), + Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED), + Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST), + Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST), + Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST), + Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST), + Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST), + Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST), + Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND), + Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND), + Self::NoSuchBucket => Some(StatusCode::NOT_FOUND), + Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND), + Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND), + Self::NoSuchKey => Some(StatusCode::NOT_FOUND), + Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND), + Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND), + Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND), + Self::NoSuchResource => Some(StatusCode::NOT_FOUND), + Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND), + Self::NoSuchUpload => Some(StatusCode::NOT_FOUND), + Self::NoSuchVersion => Some(StatusCode::NOT_FOUND), + Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND), + Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND), + Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST), + Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED), + Self::NotModified => Some(StatusCode::NOT_MODIFIED), + Self::NotSignedUp => Some(StatusCode::FORBIDDEN), + Self::NumberFormatError => Some(StatusCode::BAD_REQUEST), + Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), + Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST), + Self::OperationAborted => Some(StatusCode::CONFLICT), + Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST), + Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST), + Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST), + Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND), + Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST), + Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST), + Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST), + Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST), + Self::ParseCastArity => Some(StatusCode::BAD_REQUEST), + Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST), + Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST), + Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST), + Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST), + Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST), + Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST), + Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST), + Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST), + Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST), + Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST), + Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST), + Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST), + Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST), + Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST), + Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY), + Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY), + Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED), + Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT), + Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), + Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST), + Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST), + Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN), + Self::RequestTimeout => Some(StatusCode::BAD_REQUEST), + Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST), + Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST), + Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT), + Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST), + Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE), + Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN), + Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE), + Self::TagPolicyException => Some(StatusCode::BAD_REQUEST), + Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT), + Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST), + Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST), + Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST), + Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST), + Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST), + Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST), + Self::TooManyTags => Some(StatusCode::BAD_REQUEST), + Self::TruncatedInput => Some(StatusCode::BAD_REQUEST), + Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED), + Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN), + Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST), + Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN), + Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST), + Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST), + Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST), + Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST), + Self::Custom(_) => None, + } + } } diff --git a/crates/s3s/src/error/generated_minio.rs b/crates/s3s/src/error/generated_minio.rs index 1408804d..8dad05e7 100644 --- a/crates/s3s/src/error/generated_minio.rs +++ b/crates/s3s/src/error/generated_minio.rs @@ -249,2435 +249,2438 @@ use hyper::StatusCode; #[derive(Debug, Clone, PartialEq, Eq)] #[non_exhaustive] pub enum S3ErrorCode { -/// The bucket does not allow ACLs. -/// -/// HTTP Status Code: 400 Bad Request -/// -AccessControlListNotSupported, - -/// Access Denied -/// -/// HTTP Status Code: 403 Forbidden -/// -AccessDenied, - -/// An access point with an identical name already exists in your account. -/// -/// HTTP Status Code: 409 Conflict -/// -AccessPointAlreadyOwnedByYou, - -/// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance. -/// -/// HTTP Status Code: 403 Forbidden -/// -AccountProblem, - -/// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance. -/// -/// HTTP Status Code: 403 Forbidden -/// -AllAccessDisabled, - -/// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -AmbiguousFieldName, - -/// The email address you provided is associated with more than one account. -/// -/// HTTP Status Code: 400 Bad Request -/// -AmbiguousGrantByEmailAddress, - -/// The authorization header you provided is invalid. -/// -/// HTTP Status Code: 400 Bad Request -/// -AuthorizationHeaderMalformed, - -/// The authorization query parameters that you provided are not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -AuthorizationQueryParametersError, - -/// The Content-MD5 you specified did not match what we received. -/// -/// HTTP Status Code: 400 Bad Request -/// -BadDigest, - -/// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. -/// -/// HTTP Status Code: 409 Conflict -/// -BucketAlreadyExists, - -/// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). -/// -/// HTTP Status Code: 409 Conflict -/// -BucketAlreadyOwnedByYou, - -/// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket. -/// -/// HTTP Status Code: 400 Bad Request -/// -BucketHasAccessPointsAttached, - -/// The bucket you tried to delete is not empty. -/// -/// HTTP Status Code: 409 Conflict -/// -BucketNotEmpty, - -/// The service is unavailable. Try again later. -/// -/// HTTP Status Code: 503 Service Unavailable -/// -Busy, - -/// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. -/// -/// HTTP Status Code: 400 Bad Request -/// -CSVEscapingRecordDelimiter, - -/// An error occurred while parsing the CSV file. Check the file and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -CSVParsingError, - -/// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. -/// -/// HTTP Status Code: 400 Bad Request -/// -CSVUnescapedQuote, - -/// An attempt to convert from one data type to another using CAST failed in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -CastFailed, - -/// Your Multi-Region Access Point idempotency token was already used for a different request. -/// -/// HTTP Status Code: 409 Conflict -/// -ClientTokenConflict, - -/// The length of a column in the result is greater than maxCharsPerColumn of 1 MB. -/// -/// HTTP Status Code: 400 Bad Request -/// -ColumnTooLong, - -/// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part. -/// -/// HTTP Status Code: 409 Conflict -/// -ConditionalRequestConflict, - -/// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. -/// -/// HTTP Status Code: 400 Bad Request -/// -ConnectionClosedByRequester, - -/// This request does not support credentials. -/// -/// HTTP Status Code: 400 Bad Request -/// -CredentialsNotSupported, - -/// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. -/// -/// HTTP Status Code: 403 Forbidden -/// -CrossLocationLoggingProhibited, - -/// The device is not currently active. -/// -/// HTTP Status Code: 400 Bad Request -/// -DeviceNotActiveError, - -/// The request body cannot be empty. -/// -/// HTTP Status Code: 400 Bad Request -/// -EmptyRequestBody, - -/// Direct requests to the correct endpoint. -/// -/// HTTP Status Code: 400 Bad Request -/// -EndpointNotFound, - -/// Your proposed upload exceeds the maximum allowed object size. -/// -/// HTTP Status Code: 400 Bad Request -/// -EntityTooLarge, - -/// Your proposed upload is smaller than the minimum allowed object size. -/// -/// HTTP Status Code: 400 Bad Request -/// -EntityTooSmall, - -/// A column name or a path provided does not exist in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorBindingDoesNotExist, - -/// There is an incorrect number of arguments in the function call in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidArguments, - -/// The timestamp format string in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidTimestampFormatPattern, - -/// The timestamp format pattern contains a symbol in the SQL expression that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidTimestampFormatPatternSymbol, - -/// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidTimestampFormatPatternSymbolForParsing, - -/// The timestamp format pattern contains a token in the SQL expression that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorInvalidTimestampFormatPatternToken, - -/// An argument given to the LIKE expression was not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorLikePatternInvalidEscapeSequence, - -/// LIMIT must not be negative. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorNegativeLimit, - -/// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorTimestampFormatPatternDuplicateFields, - -/// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorTimestampFormatPatternHourClockAmPmMismatch, - -/// The timestamp format pattern contains an unterminated token in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -EvaluatorUnterminatedTimestampFormatPatternToken, - -/// The provided token has expired. -/// -/// HTTP Status Code: 400 Bad Request -/// -ExpiredToken, - -/// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB. -/// -/// HTTP Status Code: 400 Bad Request -/// -ExpressionTooLong, - -/// The query cannot be evaluated. Check the file and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -ExternalEvalException, - -/// This error might occur for the following reasons: -/// -/// -/// You are trying to access a bucket from a different Region than where the bucket exists. -/// -/// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to. -/// -/// HTTP Status Code: 400 Bad Request -/// -IllegalLocationConstraintException, - -/// An illegal argument was used in the SQL function. -/// -/// HTTP Status Code: 400 Bad Request -/// -IllegalSqlFunctionArgument, - -/// Indicates that the versioning configuration specified in the request is invalid. -/// -/// HTTP Status Code: 400 Bad Request -/// -IllegalVersioningConfigurationException, - -/// You did not provide the number of bytes specified by the Content-Length HTTP header -/// -/// HTTP Status Code: 400 Bad Request -/// -IncompleteBody, - -/// The specified bucket exists in another Region. Direct requests to the correct endpoint. -/// -/// HTTP Status Code: 400 Bad Request -/// -IncorrectEndpoint, - -/// POST requires exactly one file upload per request. -/// -/// HTTP Status Code: 400 Bad Request -/// -IncorrectNumberOfFilesInPostRequest, - -/// An incorrect argument type was specified in a function call in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -IncorrectSqlFunctionArgumentType, - -/// Inline data exceeds the maximum allowed size. -/// -/// HTTP Status Code: 400 Bad Request -/// -InlineDataTooLarge, - -/// An integer overflow or underflow occurred in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -IntegerOverflow, - -/// We encountered an internal error. Please try again. -/// -/// HTTP Status Code: 500 Internal Server Error -/// -InternalError, - -/// The Amazon Web Services access key ID you provided does not exist in our records. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidAccessKeyId, - -/// The specified access point name or account is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidAccessPoint, - -/// The specified access point alias name is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidAccessPointAliasError, - -/// You must specify the Anonymous role. -/// -InvalidAddressingHeader, - -/// Invalid Argument -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidArgument, - -/// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidBucketAclWithObjectOwnership, - -/// The specified bucket is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidBucketName, - -/// The value of the expected bucket owner parameter must be an AWS account ID. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidBucketOwnerAWSAccountID, - -/// The request is not valid with the current state of the bucket. -/// -/// HTTP Status Code: 409 Conflict -/// -InvalidBucketState, - -/// An attempt to convert from one data type to another using CAST failed in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidCast, - -/// The column index in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidColumnIndex, - -/// The file is not in a supported compression format. Only GZIP and BZIP2 are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidCompressionFormat, - -/// The data source type is not valid. Only CSV, JSON, and Parquet are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidDataSource, - -/// The SQL expression contains a data type that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidDataType, - -/// The Content-MD5 you specified is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidDigest, - -/// The encryption request you specified is not valid. The valid value is AES256. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidEncryptionAlgorithmError, - -/// The ExpressionType value is not valid. Only SQL expressions are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidExpressionType, - -/// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidFileHeaderInfo, - -/// The host headers provided in the request used the incorrect style addressing. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidHostHeader, - -/// The request is made using an unexpected HTTP method. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidHttpMethod, - -/// The JsonType value is not valid. Only DOCUMENT and LINES are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidJsonType, - -/// The key path in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidKeyPath, - -/// The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidLocationConstraint, - -/// The action is not valid for the current state of the object. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidObjectState, - -/// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidPart, - -/// The list of parts was not in ascending order. Parts list must be specified in order by part number. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidPartOrder, - -/// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidPayer, - -/// The content of the form does not meet the conditions specified in the policy document. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidPolicyDocument, - -/// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidQuoteFields, - -/// The requested range cannot be satisfied. -/// -/// HTTP Status Code: 416 Requested Range NotSatisfiable -/// -InvalidRange, - -/// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidRegion, - -/// + Please use AWS4-HMAC-SHA256. -/// + SOAP requests must be made over an HTTPS connection. -/// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names. -/// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names. -/// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests. -/// + Amazon S3 Transfer Accelerate is not configured on this bucket. -/// + Amazon S3 Transfer Accelerate is disabled on this bucket. -/// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information. -/// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information. -/// -/// HTTP Status Code: 400 Bad Request -InvalidRequest, - -/// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidRequestParameter, - -/// The SOAP request body is invalid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidSOAPRequest, - -/// The provided scan range is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidScanRange, - -/// The provided security credentials are not valid. -/// -/// HTTP Status Code: 403 Forbidden -/// -InvalidSecurity, - -/// Returned if the session doesn't exist anymore because it timed out or expired. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidSessionException, - -/// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidSignature, - -/// The storage class you specified is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidStorageClass, - -/// The SQL expression contains a table alias that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidTableAlias, - -/// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidTag, - -/// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidTargetBucketForLogging, - -/// The encoding type is not valid. Only UTF-8 encoding is supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidTextEncoding, - -/// The provided token is malformed or otherwise invalid. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidToken, - -/// Couldn't parse the specified URI. -/// -/// HTTP Status Code: 400 Bad Request -/// -InvalidURI, - -/// An error occurred while parsing the JSON file. Check the file and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -JSONParsingError, - -/// Your key is too long. -/// -/// HTTP Status Code: 400 Bad Request -/// -KeyTooLongError, - -/// The SQL expression contains a character that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LexerInvalidChar, - -/// The SQL expression contains an operator that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LexerInvalidIONLiteral, - -/// The SQL expression contains an operator that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LexerInvalidLiteral, - -/// The SQL expression contains a literal that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LexerInvalidOperator, - -/// The argument given to the LIKE clause in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -LikeInvalidInputs, - -/// The XML you provided was not well-formed or did not validate against our published schema. -/// -/// HTTP Status Code: 400 Bad Request -/// -MalformedACLError, - -/// The body of your POST request is not well-formed multipart/form-data. -/// -/// HTTP Status Code: 400 Bad Request -/// -MalformedPOSTRequest, - -/// Your policy contains a principal that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -MalformedPolicy, - -/// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." -/// -/// HTTP Status Code: 400 Bad Request -/// -MalformedXML, - -/// Your request was too big. -/// -/// HTTP Status Code: 400 Bad Request -/// -MaxMessageLengthExceeded, - -/// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used. -/// -/// HTTP Status Code: 400 Bad Request -/// -MaxOperatorsExceeded, - -/// Your POST request fields preceding the upload file were too large. -/// -/// HTTP Status Code: 400 Bad Request -/// -MaxPostPreDataLengthExceededError, - -/// Your metadata headers exceed the maximum allowed metadata size. -/// -/// HTTP Status Code: 400 Bad Request -/// -MetadataTooLarge, - -/// The specified method is not allowed against this resource. -/// -/// HTTP Status Code: 405 Method Not Allowed -/// -MethodNotAllowed, - -/// A SOAP attachment was expected, but none were found. -/// -MissingAttachment, - -/// The request was not signed. -/// -/// HTTP Status Code: 403 Forbidden -/// -MissingAuthenticationToken, - -/// You must provide the Content-Length HTTP header. -/// -/// HTTP Status Code: 411 Length Required -/// -MissingContentLength, - -/// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty." -/// -/// HTTP Status Code: 400 Bad Request -/// -MissingRequestBodyError, - -/// The SelectRequest entity is missing a required parameter. Check the service documentation and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -MissingRequiredParameter, - -/// The SOAP 1.1 request is missing a security element. -/// -/// HTTP Status Code: 400 Bad Request -/// -MissingSecurityElement, - -/// Your request is missing a required header. -/// -/// HTTP Status Code: 400 Bad Request -/// -MissingSecurityHeader, - -/// Multiple data sources are not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -MultipleDataSourcesUnsupported, - -/// There is no such thing as a logging status subresource for a key. -/// -/// HTTP Status Code: 400 Bad Request -/// -NoLoggingStatusForKey, - -/// The specified access point does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchAccessPoint, - -/// The specified request was not found. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchAsyncRequest, - -/// The specified bucket does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchBucket, - -/// The specified bucket does not have a bucket policy. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchBucketPolicy, - -/// The specified bucket does not have a CORS configuration. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchCORSConfiguration, - -/// The specified key does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchKey, - -/// The lifecycle configuration does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchLifecycleConfiguration, - -/// The specified Multi-Region Access Point does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchMultiRegionAccessPoint, - -/// The specified object does not have an ObjectLock configuration. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchObjectLockConfiguration, - -/// The specified resource doesn't exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchResource, - -/// The specified tag does not exist. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchTagSet, - -/// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchUpload, - -/// Indicates that the version ID specified in the request does not match an existing version. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchVersion, - -/// The specified bucket does not have a website configuration. -/// -/// HTTP Status Code: 404 Not Found -/// -NoSuchWebsiteConfiguration, - -/// No transformation found for this Object Lambda Access Point. -/// -/// HTTP Status Code: 404 Not Found -/// -NoTransformationDefined, - -/// The device that generated the token is not owned by the authenticated user. -/// -/// HTTP Status Code: 400 Bad Request -/// -NotDeviceOwnerError, - -/// A header you provided implies functionality that is not implemented. -/// -/// HTTP Status Code: 501 Not Implemented -/// -NotImplemented, - -/// The resource was not changed. -/// -/// HTTP Status Code: 304 Not Modified -/// -NotModified, - -/// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 -/// -/// HTTP Status Code: 403 Forbidden -/// -NotSignedUp, - -/// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers. -/// -/// HTTP Status Code: 400 Bad Request -/// -NumberFormatError, - -/// The Object Lock configuration does not exist for this bucket. -/// -/// HTTP Status Code: 404 Not Found -/// -ObjectLockConfigurationNotFoundError, - -/// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each. -/// -/// HTTP Status Code: 400 Bad Request -/// -ObjectSerializationConflict, - -/// A conflicting conditional action is currently in progress against this resource. Try again. -/// -/// HTTP Status Code: 409 Conflict -/// -OperationAborted, - -/// The number of columns in the result is greater than the maximum allowable number of columns. -/// -/// HTTP Status Code: 400 Bad Request -/// -OverMaxColumn, - -/// The Parquet file is above the max row group size. -/// -/// HTTP Status Code: 400 Bad Request -/// -OverMaxParquetBlockSize, - -/// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB. -/// -/// HTTP Status Code: 400 Bad Request -/// -OverMaxRecordSize, - -/// The bucket ownership controls were not found. -/// -/// HTTP Status Code: 404 Not Found -/// -OwnershipControlsNotFoundError, - -/// An error occurred while parsing the Parquet file. Check the file and try again. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParquetParsingError, - -/// The specified Parquet compression codec is not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParquetUnsupportedCompressionCodec, - -/// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseAsteriskIsNotAloneInSelectList, - -/// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseCannotMixSqbAndWildcardInSelectList, - -/// The SQL expression CAST has incorrect arity. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseCastArity, - -/// The SQL expression contains an empty SELECT clause. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseEmptySelect, - -/// The expected token in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpected2TokenTypes, - -/// The expected argument delimiter in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedArgumentDelimiter, - -/// The expected date part in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedDatePart, - -/// The expected SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedExpression, - -/// The expected identifier for the alias in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedIdentForAlias, - -/// The expected identifier for AT name in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedIdentForAt, - -/// GROUP is not supported in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedIdentForGroupName, - -/// The expected keyword in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedKeyword, - -/// The expected left parenthesis after CAST in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedLeftParenAfterCast, - -/// The expected left parenthesis in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedLeftParenBuiltinFunctionCall, - -/// The expected left parenthesis in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedLeftParenValueConstructor, - -/// The SQL expression contains an unsupported use of MEMBER. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedMember, - -/// The expected number in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedNumber, - -/// The expected right parenthesis character in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedRightParenBuiltinFunctionCall, - -/// The expected token in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedTokenType, - -/// The expected type name in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedTypeName, - -/// The expected WHEN clause in the SQL expression was not found. CASE is not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseExpectedWhenClause, - -/// The use of * in the SELECT list in the SQL expression is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseInvalidContextForWildcardInSelectList, - -/// The SQL expression contains a path component that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseInvalidPathComponent, - -/// The SQL expression contains a parameter value that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseInvalidTypeParam, - -/// JOIN is not supported in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseMalformedJoin, - -/// The expected identifier after the @ symbol in the SQL expression was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseMissingIdentAfterAt, - -/// Only one argument is supported for aggregate functions in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseNonUnaryAgregateFunctionCall, - -/// The SQL expression contains a missing FROM after the SELECT list. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseSelectMissingFrom, - -/// The SQL expression contains an unexpected keyword. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnExpectedKeyword, - -/// The SQL expression contains an unexpected operator. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnexpectedOperator, - -/// The SQL expression contains an unexpected term. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnexpectedTerm, - -/// The SQL expression contains an unexpected token. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnexpectedToken, - -/// The SQL expression contains an operator that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnknownOperator, - -/// The SQL expression contains an unsupported use of ALIAS. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedAlias, - -/// Only COUNT with (*) as a parameter is supported in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedCallWithStar, - -/// The SQL expression contains an unsupported use of CASE. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedCase, - -/// The SQL expression contains an unsupported use of CASE. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedCaseClause, - -/// The SQL expression contains an unsupported use of GROUP BY. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedLiteralsGroupBy, - -/// The SQL expression contains an unsupported use of SELECT. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedSelect, - -/// The SQL expression contains unsupported syntax. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedSyntax, - -/// The SQL expression contains an unsupported token. -/// -/// HTTP Status Code: 400 Bad Request -/// -ParseUnsupportedToken, - -/// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. -/// -/// HTTP Status Code: 301 Moved Permanently -/// -PermanentRedirect, - -/// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. -/// -/// HTTP Status Code: 301 Moved Permanently -/// -PermanentRedirectControlError, - -/// At least one of the preconditions you specified did not hold. -/// -/// HTTP Status Code: 412 Precondition Failed -/// -PreconditionFailed, - -/// Temporary redirect. -/// -/// HTTP Status Code: 307 Moved Temporarily -/// -Redirect, - -/// There is no replication configuration for this bucket. -/// -/// HTTP Status Code: 404 Not Found -/// -ReplicationConfigurationNotFoundError, - -/// The request header and query parameters used to make the request exceed the maximum allowed size. -/// -/// HTTP Status Code: 400 Bad Request -/// -RequestHeaderSectionTooLarge, - -/// Bucket POST must be of the enclosure-type multipart/form-data. -/// -/// HTTP Status Code: 400 Bad Request -/// -RequestIsNotMultiPartContent, - -/// The difference between the request time and the server's time is too large. -/// -/// HTTP Status Code: 403 Forbidden -/// -RequestTimeTooSkewed, - -/// Your socket connection to the server was not read from or written to within the timeout period. -/// -/// HTTP Status Code: 400 Bad Request -/// -RequestTimeout, - -/// Requesting the torrent file of a bucket is not permitted. -/// -/// HTTP Status Code: 400 Bad Request -/// -RequestTorrentOfBucketError, - -/// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. -/// -/// HTTP Status Code: 400 Bad Request -/// -ResponseInterrupted, - -/// Object restore is already in progress. -/// -/// HTTP Status Code: 409 Conflict -/// -RestoreAlreadyInProgress, - -/// The server-side encryption configuration was not found. -/// -/// HTTP Status Code: 400 Bad Request -/// -ServerSideEncryptionConfigurationNotFoundError, - -/// Service is unable to handle request. -/// -/// HTTP Status Code: 503 Service Unavailable -/// -ServiceUnavailable, - -/// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details. -/// -/// HTTP Status Code: 403 Forbidden -/// -SignatureDoesNotMatch, - -/// Reduce your request rate. -/// -/// HTTP Status Code: 503 Slow Down -/// -SlowDown, - -/// The tag policy does not allow the specified value for the following tag key. -/// -/// HTTP Status Code: 400 Bad Request -/// -TagPolicyException, - -/// You are being redirected to the bucket while DNS updates. -/// -/// HTTP Status Code: 307 Moved Temporarily -/// -TemporaryRedirect, - -/// The serial number and/or token code you provided is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -TokenCodeInvalidError, - -/// The provided token must be refreshed. -/// -/// HTTP Status Code: 400 Bad Request -/// -TokenRefreshRequired, - -/// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyAccessPoints, - -/// You have attempted to create more buckets than allowed. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyBuckets, - -/// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyMultiRegionAccessPointregionsError, - -/// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyMultiRegionAccessPoints, - -/// The number of tags exceeds the limit of 50 tags. -/// -/// HTTP Status Code: 400 Bad Request -/// -TooManyTags, - -/// Object decompression failed. Check that the object is properly compressed using the format specified in the request. -/// -/// HTTP Status Code: 400 Bad Request -/// -TruncatedInput, - -/// You are not authorized to perform this operation. -/// -/// HTTP Status Code: 401 Unauthorized -/// -UnauthorizedAccess, - -/// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal. -/// -/// HTTP Status Code: 403 Forbidden -/// -UnauthorizedAccessError, - -/// This request does not support content. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnexpectedContent, - -/// Applicable in China Regions only. This request was rejected because the IP was unexpected. -/// -/// HTTP Status Code: 403 Forbidden -/// -UnexpectedIPError, - -/// We encountered a record type that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnrecognizedFormatException, - -/// The email address you provided does not match any account on record. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnresolvableGrantByEmailAddress, - -/// The request contained an unsupported argument. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedArgument, - -/// We encountered an unsupported SQL function. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedFunction, - -/// The specified Parquet type is not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedParquetType, - -/// A range header is not supported for this operation. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedRangeHeader, - -/// Scan range queries are not supported on this type of object. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedScanRangeInput, - -/// The provided request is signed with an unsupported STS Token version or the signature version is not supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedSignature, - -/// We encountered an unsupported SQL operation. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedSqlOperation, - -/// We encountered an unsupported SQL structure. Check the SQL Reference. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedSqlStructure, - -/// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedStorageClass, - -/// We encountered syntax that is not valid. -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedSyntax, - -/// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0). -/// -/// HTTP Status Code: 400 Bad Request -/// -UnsupportedTypeForQuerying, - -/// The bucket POST must contain the specified field name. If it is specified, check the order of the fields. -/// -/// HTTP Status Code: 400 Bad Request -/// -UserKeyMustBeSpecified, - -/// A timestamp parse failure occurred in the SQL expression. -/// -/// HTTP Status Code: 400 Bad Request -/// -ValueParseFailure, - -Custom(ByteString), + /// The bucket does not allow ACLs. + /// + /// HTTP Status Code: 400 Bad Request + /// + AccessControlListNotSupported, + + /// Access Denied + /// + /// HTTP Status Code: 403 Forbidden + /// + AccessDenied, + + /// An access point with an identical name already exists in your account. + /// + /// HTTP Status Code: 409 Conflict + /// + AccessPointAlreadyOwnedByYou, + + /// There is a problem with your Amazon Web Services account that prevents the action from completing successfully. Contact Amazon Web Services Support for further assistance. + /// + /// HTTP Status Code: 403 Forbidden + /// + AccountProblem, + + /// All access to this Amazon S3 resource has been disabled. Contact Amazon Web Services Support for further assistance. + /// + /// HTTP Status Code: 403 Forbidden + /// + AllAccessDisabled, + + /// The field name matches to multiple fields in the file. Check the SQL expression and the file, and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + AmbiguousFieldName, + + /// The email address you provided is associated with more than one account. + /// + /// HTTP Status Code: 400 Bad Request + /// + AmbiguousGrantByEmailAddress, + + /// The authorization header you provided is invalid. + /// + /// HTTP Status Code: 400 Bad Request + /// + AuthorizationHeaderMalformed, + + /// The authorization query parameters that you provided are not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + AuthorizationQueryParametersError, + + /// The Content-MD5 you specified did not match what we received. + /// + /// HTTP Status Code: 400 Bad Request + /// + BadDigest, + + /// The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. + /// + /// HTTP Status Code: 409 Conflict + /// + BucketAlreadyExists, + + /// The bucket you tried to create already exists, and you own it. Amazon S3 returns this error in all Amazon Web Services Regions except in the North Virginia Region. For legacy compatibility, if you re-create an existing bucket that you already own in the North Virginia Region, Amazon S3 returns 200 OK and resets the bucket access control lists (ACLs). + /// + /// HTTP Status Code: 409 Conflict + /// + BucketAlreadyOwnedByYou, + + /// The bucket you tried to delete has access points attached. Delete your access points before deleting your bucket. + /// + /// HTTP Status Code: 400 Bad Request + /// + BucketHasAccessPointsAttached, + + /// The bucket you tried to delete is not empty. + /// + /// HTTP Status Code: 409 Conflict + /// + BucketNotEmpty, + + /// The service is unavailable. Try again later. + /// + /// HTTP Status Code: 503 Service Unavailable + /// + Busy, + + /// A quoted record delimiter was found in the file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. + /// + /// HTTP Status Code: 400 Bad Request + /// + CSVEscapingRecordDelimiter, + + /// An error occurred while parsing the CSV file. Check the file and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + CSVParsingError, + + /// An unescaped quote was found while parsing the CSV file. To allow quoted record delimiters, set AllowQuotedRecordDelimiter to 'TRUE'. + /// + /// HTTP Status Code: 400 Bad Request + /// + CSVUnescapedQuote, + + /// An attempt to convert from one data type to another using CAST failed in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + CastFailed, + + /// Your Multi-Region Access Point idempotency token was already used for a different request. + /// + /// HTTP Status Code: 409 Conflict + /// + ClientTokenConflict, + + /// The length of a column in the result is greater than maxCharsPerColumn of 1 MB. + /// + /// HTTP Status Code: 400 Bad Request + /// + ColumnTooLong, + + /// A conflicting operation occurred. If using PutObject you can retry the request. If using multipart upload you should initiate another CreateMultipartUpload request and re-upload each part. + /// + /// HTTP Status Code: 409 Conflict + /// + ConditionalRequestConflict, + + /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. + /// + /// HTTP Status Code: 400 Bad Request + /// + ConnectionClosedByRequester, + + /// This request does not support credentials. + /// + /// HTTP Status Code: 400 Bad Request + /// + CredentialsNotSupported, + + /// Cross-location logging not allowed. Buckets in one geographic location cannot log information to a bucket in another location. + /// + /// HTTP Status Code: 403 Forbidden + /// + CrossLocationLoggingProhibited, + + /// The device is not currently active. + /// + /// HTTP Status Code: 400 Bad Request + /// + DeviceNotActiveError, + + /// The request body cannot be empty. + /// + /// HTTP Status Code: 400 Bad Request + /// + EmptyRequestBody, + + /// Direct requests to the correct endpoint. + /// + /// HTTP Status Code: 400 Bad Request + /// + EndpointNotFound, + + /// Your proposed upload exceeds the maximum allowed object size. + /// + /// HTTP Status Code: 400 Bad Request + /// + EntityTooLarge, + + /// Your proposed upload is smaller than the minimum allowed object size. + /// + /// HTTP Status Code: 400 Bad Request + /// + EntityTooSmall, + + /// A column name or a path provided does not exist in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorBindingDoesNotExist, + + /// There is an incorrect number of arguments in the function call in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidArguments, + + /// The timestamp format string in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidTimestampFormatPattern, + + /// The timestamp format pattern contains a symbol in the SQL expression that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidTimestampFormatPatternSymbol, + + /// The timestamp format pattern contains a valid format symbol that cannot be applied to timestamp parsing in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidTimestampFormatPatternSymbolForParsing, + + /// The timestamp format pattern contains a token in the SQL expression that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorInvalidTimestampFormatPatternToken, + + /// An argument given to the LIKE expression was not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorLikePatternInvalidEscapeSequence, + + /// LIMIT must not be negative. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorNegativeLimit, + + /// The timestamp format pattern contains multiple format specifiers representing the timestamp field in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorTimestampFormatPatternDuplicateFields, + + /// The timestamp format pattern contains a 12-hour hour of day format symbol but doesn't also contain an AM/PM field, or it contains a 24-hour hour of day format specifier and contains an AM/PM field in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorTimestampFormatPatternHourClockAmPmMismatch, + + /// The timestamp format pattern contains an unterminated token in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + EvaluatorUnterminatedTimestampFormatPatternToken, + + /// The provided token has expired. + /// + /// HTTP Status Code: 400 Bad Request + /// + ExpiredToken, + + /// The SQL expression is too long. The maximum byte-length for an SQL expression is 256 KB. + /// + /// HTTP Status Code: 400 Bad Request + /// + ExpressionTooLong, + + /// The query cannot be evaluated. Check the file and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + ExternalEvalException, + + /// This error might occur for the following reasons: + /// + /// + /// You are trying to access a bucket from a different Region than where the bucket exists. + /// + /// You attempt to create a bucket with a location constraint that corresponds to a different region than the regional endpoint the request was sent to. + /// + /// HTTP Status Code: 400 Bad Request + /// + IllegalLocationConstraintException, + + /// An illegal argument was used in the SQL function. + /// + /// HTTP Status Code: 400 Bad Request + /// + IllegalSqlFunctionArgument, + + /// Indicates that the versioning configuration specified in the request is invalid. + /// + /// HTTP Status Code: 400 Bad Request + /// + IllegalVersioningConfigurationException, + + /// You did not provide the number of bytes specified by the Content-Length HTTP header + /// + /// HTTP Status Code: 400 Bad Request + /// + IncompleteBody, + + /// The specified bucket exists in another Region. Direct requests to the correct endpoint. + /// + /// HTTP Status Code: 400 Bad Request + /// + IncorrectEndpoint, + + /// POST requires exactly one file upload per request. + /// + /// HTTP Status Code: 400 Bad Request + /// + IncorrectNumberOfFilesInPostRequest, + + /// An incorrect argument type was specified in a function call in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + IncorrectSqlFunctionArgumentType, + + /// Inline data exceeds the maximum allowed size. + /// + /// HTTP Status Code: 400 Bad Request + /// + InlineDataTooLarge, + + /// An integer overflow or underflow occurred in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + IntegerOverflow, + + /// We encountered an internal error. Please try again. + /// + /// HTTP Status Code: 500 Internal Server Error + /// + InternalError, + + /// The Amazon Web Services access key ID you provided does not exist in our records. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidAccessKeyId, + + /// The specified access point name or account is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidAccessPoint, + + /// The specified access point alias name is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidAccessPointAliasError, + + /// You must specify the Anonymous role. + /// + InvalidAddressingHeader, + + /// Invalid Argument + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidArgument, + + /// Bucket cannot have ACLs set with ObjectOwnership's BucketOwnerEnforced setting. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidBucketAclWithObjectOwnership, + + /// The specified bucket is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidBucketName, + + /// The value of the expected bucket owner parameter must be an AWS account ID. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidBucketOwnerAWSAccountID, + + /// The request is not valid with the current state of the bucket. + /// + /// HTTP Status Code: 409 Conflict + /// + InvalidBucketState, + + /// An attempt to convert from one data type to another using CAST failed in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidCast, + + /// The column index in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidColumnIndex, + + /// The file is not in a supported compression format. Only GZIP and BZIP2 are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidCompressionFormat, + + /// The data source type is not valid. Only CSV, JSON, and Parquet are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidDataSource, + + /// The SQL expression contains a data type that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidDataType, + + /// The Content-MD5 you specified is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidDigest, + + /// The encryption request you specified is not valid. The valid value is AES256. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidEncryptionAlgorithmError, + + /// The ExpressionType value is not valid. Only SQL expressions are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidExpressionType, + + /// The FileHeaderInfo value is not valid. Only NONE, USE, and IGNORE are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidFileHeaderInfo, + + /// The host headers provided in the request used the incorrect style addressing. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidHostHeader, + + /// The request is made using an unexpected HTTP method. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidHttpMethod, + + /// The JsonType value is not valid. Only DOCUMENT and LINES are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidJsonType, + + /// The key path in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidKeyPath, + + /// The specified location constraint is not valid. For more information about Regions, see How to Select a Region for Your Buckets. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidLocationConstraint, + + /// The action is not valid for the current state of the object. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidObjectState, + + /// One or more of the specified parts could not be found. The part might not have been uploaded, or the specified entity tag might not have matched the part's entity tag. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidPart, + + /// The list of parts was not in ascending order. Parts list must be specified in order by part number. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidPartOrder, + + /// All access to this object has been disabled. Please contact Amazon Web Services Support for further assistance. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidPayer, + + /// The content of the form does not meet the conditions specified in the policy document. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidPolicyDocument, + + /// The QuoteFields value is not valid. Only ALWAYS and ASNEEDED are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidQuoteFields, + + /// The requested range cannot be satisfied. + /// + /// HTTP Status Code: 416 Requested Range NotSatisfiable + /// + InvalidRange, + + /// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidRegion, + + /// + Please use AWS4-HMAC-SHA256. + /// + SOAP requests must be made over an HTTPS connection. + /// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names. + /// + Amazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names. + /// + Amazon S3 Transfer Accelerate endpoint only supports virtual style requests. + /// + Amazon S3 Transfer Accelerate is not configured on this bucket. + /// + Amazon S3 Transfer Accelerate is disabled on this bucket. + /// + Amazon S3 Transfer Acceleration is not supported on this bucket. Contact Amazon Web Services Support for more information. + /// + Amazon S3 Transfer Acceleration cannot be enabled on this bucket. Contact Amazon Web Services Support for more information. + /// + /// HTTP Status Code: 400 Bad Request + InvalidRequest, + + /// The value of a parameter in the SelectRequest element is not valid. Check the service API documentation and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidRequestParameter, + + /// The SOAP request body is invalid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidSOAPRequest, + + /// The provided scan range is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidScanRange, + + /// The provided security credentials are not valid. + /// + /// HTTP Status Code: 403 Forbidden + /// + InvalidSecurity, + + /// Returned if the session doesn't exist anymore because it timed out or expired. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidSessionException, + + /// The request signature that the server calculated does not match the signature that you provided. Check your AWS secret access key and signing method. For more information, see Signing and authenticating REST requests. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidSignature, + + /// The storage class you specified is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidStorageClass, + + /// The SQL expression contains a table alias that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidTableAlias, + + /// Your request contains tag input that is not valid. For example, your request might contain duplicate keys, keys or values that are too long, or system tags. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidTag, + + /// The target bucket for logging does not exist, is not owned by you, or does not have the appropriate grants for the log-delivery group. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidTargetBucketForLogging, + + /// The encoding type is not valid. Only UTF-8 encoding is supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidTextEncoding, + + /// The provided token is malformed or otherwise invalid. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidToken, + + /// Couldn't parse the specified URI. + /// + /// HTTP Status Code: 400 Bad Request + /// + InvalidURI, + + /// An error occurred while parsing the JSON file. Check the file and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + JSONParsingError, + + /// Your key is too long. + /// + /// HTTP Status Code: 400 Bad Request + /// + KeyTooLongError, + + /// The SQL expression contains a character that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LexerInvalidChar, + + /// The SQL expression contains an operator that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LexerInvalidIONLiteral, + + /// The SQL expression contains an operator that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LexerInvalidLiteral, + + /// The SQL expression contains a literal that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LexerInvalidOperator, + + /// The argument given to the LIKE clause in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + LikeInvalidInputs, + + /// The XML you provided was not well-formed or did not validate against our published schema. + /// + /// HTTP Status Code: 400 Bad Request + /// + MalformedACLError, + + /// The body of your POST request is not well-formed multipart/form-data. + /// + /// HTTP Status Code: 400 Bad Request + /// + MalformedPOSTRequest, + + /// Your policy contains a principal that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + MalformedPolicy, + + /// This happens when the user sends malformed XML (XML that doesn't conform to the published XSD) for the configuration. The error message is, "The XML you provided was not well-formed or did not validate against our published schema." + /// + /// HTTP Status Code: 400 Bad Request + /// + MalformedXML, + + /// Your request was too big. + /// + /// HTTP Status Code: 400 Bad Request + /// + MaxMessageLengthExceeded, + + /// Failed to parse SQL expression, try reducing complexity. For example, reduce number of operators used. + /// + /// HTTP Status Code: 400 Bad Request + /// + MaxOperatorsExceeded, + + /// Your POST request fields preceding the upload file were too large. + /// + /// HTTP Status Code: 400 Bad Request + /// + MaxPostPreDataLengthExceededError, + + /// Your metadata headers exceed the maximum allowed metadata size. + /// + /// HTTP Status Code: 400 Bad Request + /// + MetadataTooLarge, + + /// The specified method is not allowed against this resource. + /// + /// HTTP Status Code: 405 Method Not Allowed + /// + MethodNotAllowed, + + /// A SOAP attachment was expected, but none were found. + /// + MissingAttachment, + + /// The request was not signed. + /// + /// HTTP Status Code: 403 Forbidden + /// + MissingAuthenticationToken, + + /// You must provide the Content-Length HTTP header. + /// + /// HTTP Status Code: 411 Length Required + /// + MissingContentLength, + + /// This happens when the user sends an empty XML document as a request. The error message is, "Request body is empty." + /// + /// HTTP Status Code: 400 Bad Request + /// + MissingRequestBodyError, + + /// The SelectRequest entity is missing a required parameter. Check the service documentation and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + MissingRequiredParameter, + + /// The SOAP 1.1 request is missing a security element. + /// + /// HTTP Status Code: 400 Bad Request + /// + MissingSecurityElement, + + /// Your request is missing a required header. + /// + /// HTTP Status Code: 400 Bad Request + /// + MissingSecurityHeader, + + /// Multiple data sources are not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + MultipleDataSourcesUnsupported, + + /// There is no such thing as a logging status subresource for a key. + /// + /// HTTP Status Code: 400 Bad Request + /// + NoLoggingStatusForKey, + + /// The specified access point does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchAccessPoint, + + /// The specified request was not found. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchAsyncRequest, + + /// The specified bucket does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchBucket, + + /// The specified bucket does not have a bucket policy. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchBucketPolicy, + + /// The specified bucket does not have a CORS configuration. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchCORSConfiguration, + + /// The specified key does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchKey, + + /// The lifecycle configuration does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchLifecycleConfiguration, + + /// The specified Multi-Region Access Point does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchMultiRegionAccessPoint, + + /// The specified object does not have an ObjectLock configuration. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchObjectLockConfiguration, + + /// The specified resource doesn't exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchResource, + + /// The specified tag does not exist. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchTagSet, + + /// The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchUpload, + + /// Indicates that the version ID specified in the request does not match an existing version. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchVersion, + + /// The specified bucket does not have a website configuration. + /// + /// HTTP Status Code: 404 Not Found + /// + NoSuchWebsiteConfiguration, + + /// No transformation found for this Object Lambda Access Point. + /// + /// HTTP Status Code: 404 Not Found + /// + NoTransformationDefined, + + /// The device that generated the token is not owned by the authenticated user. + /// + /// HTTP Status Code: 400 Bad Request + /// + NotDeviceOwnerError, + + /// A header you provided implies functionality that is not implemented. + /// + /// HTTP Status Code: 501 Not Implemented + /// + NotImplemented, + + /// The resource was not changed. + /// + /// HTTP Status Code: 304 Not Modified + /// + NotModified, + + /// Your account is not signed up for the Amazon S3 service. You must sign up before you can use Amazon S3. You can sign up at the following URL: Amazon S3 + /// + /// HTTP Status Code: 403 Forbidden + /// + NotSignedUp, + + /// An error occurred while parsing a number. This error can be caused by underflow or overflow of integers. + /// + /// HTTP Status Code: 400 Bad Request + /// + NumberFormatError, + + /// The Object Lock configuration does not exist for this bucket. + /// + /// HTTP Status Code: 404 Not Found + /// + ObjectLockConfigurationNotFoundError, + + /// InputSerialization specifies more than one format (CSV, JSON, or Parquet), or OutputSerialization specifies more than one format (CSV or JSON). For InputSerialization and OutputSerialization, you can specify only one format for each. + /// + /// HTTP Status Code: 400 Bad Request + /// + ObjectSerializationConflict, + + /// A conflicting conditional action is currently in progress against this resource. Try again. + /// + /// HTTP Status Code: 409 Conflict + /// + OperationAborted, + + /// The number of columns in the result is greater than the maximum allowable number of columns. + /// + /// HTTP Status Code: 400 Bad Request + /// + OverMaxColumn, + + /// The Parquet file is above the max row group size. + /// + /// HTTP Status Code: 400 Bad Request + /// + OverMaxParquetBlockSize, + + /// The length of a record in the input or result is greater than the maxCharsPerRecord limit of 1 MB. + /// + /// HTTP Status Code: 400 Bad Request + /// + OverMaxRecordSize, + + /// The bucket ownership controls were not found. + /// + /// HTTP Status Code: 404 Not Found + /// + OwnershipControlsNotFoundError, + + /// An error occurred while parsing the Parquet file. Check the file and try again. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParquetParsingError, + + /// The specified Parquet compression codec is not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParquetUnsupportedCompressionCodec, + + /// Other expressions are not allowed in the SELECT list when * is used without dot notation in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseAsteriskIsNotAloneInSelectList, + + /// Cannot mix [] and * in the same expression in a SELECT list in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseCannotMixSqbAndWildcardInSelectList, + + /// The SQL expression CAST has incorrect arity. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseCastArity, + + /// The SQL expression contains an empty SELECT clause. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseEmptySelect, + + /// The expected token in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpected2TokenTypes, + + /// The expected argument delimiter in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedArgumentDelimiter, + + /// The expected date part in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedDatePart, + + /// The expected SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedExpression, + + /// The expected identifier for the alias in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedIdentForAlias, + + /// The expected identifier for AT name in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedIdentForAt, + + /// GROUP is not supported in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedIdentForGroupName, + + /// The expected keyword in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedKeyword, + + /// The expected left parenthesis after CAST in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedLeftParenAfterCast, + + /// The expected left parenthesis in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedLeftParenBuiltinFunctionCall, + + /// The expected left parenthesis in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedLeftParenValueConstructor, + + /// The SQL expression contains an unsupported use of MEMBER. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedMember, + + /// The expected number in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedNumber, + + /// The expected right parenthesis character in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedRightParenBuiltinFunctionCall, + + /// The expected token in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedTokenType, + + /// The expected type name in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedTypeName, + + /// The expected WHEN clause in the SQL expression was not found. CASE is not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseExpectedWhenClause, + + /// The use of * in the SELECT list in the SQL expression is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseInvalidContextForWildcardInSelectList, + + /// The SQL expression contains a path component that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseInvalidPathComponent, + + /// The SQL expression contains a parameter value that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseInvalidTypeParam, + + /// JOIN is not supported in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseMalformedJoin, + + /// The expected identifier after the @ symbol in the SQL expression was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseMissingIdentAfterAt, + + /// Only one argument is supported for aggregate functions in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseNonUnaryAgregateFunctionCall, + + /// The SQL expression contains a missing FROM after the SELECT list. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseSelectMissingFrom, + + /// The SQL expression contains an unexpected keyword. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnExpectedKeyword, + + /// The SQL expression contains an unexpected operator. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnexpectedOperator, + + /// The SQL expression contains an unexpected term. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnexpectedTerm, + + /// The SQL expression contains an unexpected token. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnexpectedToken, + + /// The SQL expression contains an operator that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnknownOperator, + + /// The SQL expression contains an unsupported use of ALIAS. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedAlias, + + /// Only COUNT with (*) as a parameter is supported in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedCallWithStar, + + /// The SQL expression contains an unsupported use of CASE. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedCase, + + /// The SQL expression contains an unsupported use of CASE. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedCaseClause, + + /// The SQL expression contains an unsupported use of GROUP BY. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedLiteralsGroupBy, + + /// The SQL expression contains an unsupported use of SELECT. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedSelect, + + /// The SQL expression contains unsupported syntax. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedSyntax, + + /// The SQL expression contains an unsupported token. + /// + /// HTTP Status Code: 400 Bad Request + /// + ParseUnsupportedToken, + + /// The bucket you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. + /// + /// HTTP Status Code: 301 Moved Permanently + /// + PermanentRedirect, + + /// The API operation you are attempting to access must be addressed using the specified endpoint. Send all future requests to this endpoint. + /// + /// HTTP Status Code: 301 Moved Permanently + /// + PermanentRedirectControlError, + + /// At least one of the preconditions you specified did not hold. + /// + /// HTTP Status Code: 412 Precondition Failed + /// + PreconditionFailed, + + /// Temporary redirect. + /// + /// HTTP Status Code: 307 Moved Temporarily + /// + Redirect, + + /// There is no replication configuration for this bucket. + /// + /// HTTP Status Code: 404 Not Found + /// + ReplicationConfigurationNotFoundError, + + /// The request header and query parameters used to make the request exceed the maximum allowed size. + /// + /// HTTP Status Code: 400 Bad Request + /// + RequestHeaderSectionTooLarge, + + /// Bucket POST must be of the enclosure-type multipart/form-data. + /// + /// HTTP Status Code: 400 Bad Request + /// + RequestIsNotMultiPartContent, + + /// The difference between the request time and the server's time is too large. + /// + /// HTTP Status Code: 403 Forbidden + /// + RequestTimeTooSkewed, + + /// Your socket connection to the server was not read from or written to within the timeout period. + /// + /// HTTP Status Code: 400 Bad Request + /// + RequestTimeout, + + /// Requesting the torrent file of a bucket is not permitted. + /// + /// HTTP Status Code: 400 Bad Request + /// + RequestTorrentOfBucketError, + + /// Returned to the original caller when an error is encountered while reading the WriteGetObjectResponse body. + /// + /// HTTP Status Code: 400 Bad Request + /// + ResponseInterrupted, + + /// Object restore is already in progress. + /// + /// HTTP Status Code: 409 Conflict + /// + RestoreAlreadyInProgress, + + /// The server-side encryption configuration was not found. + /// + /// HTTP Status Code: 400 Bad Request + /// + ServerSideEncryptionConfigurationNotFoundError, + + /// Service is unable to handle request. + /// + /// HTTP Status Code: 503 Service Unavailable + /// + ServiceUnavailable, + + /// The request signature we calculated does not match the signature you provided. Check your Amazon Web Services secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details. + /// + /// HTTP Status Code: 403 Forbidden + /// + SignatureDoesNotMatch, + + /// Reduce your request rate. + /// + /// HTTP Status Code: 503 Slow Down + /// + SlowDown, + + /// The tag policy does not allow the specified value for the following tag key. + /// + /// HTTP Status Code: 400 Bad Request + /// + TagPolicyException, + + /// You are being redirected to the bucket while DNS updates. + /// + /// HTTP Status Code: 307 Moved Temporarily + /// + TemporaryRedirect, + + /// The serial number and/or token code you provided is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + TokenCodeInvalidError, + + /// The provided token must be refreshed. + /// + /// HTTP Status Code: 400 Bad Request + /// + TokenRefreshRequired, + + /// You have attempted to create more access points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyAccessPoints, + + /// You have attempted to create more buckets than allowed. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyBuckets, + + /// You have attempted to create a Multi-Region Access Point with more Regions than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyMultiRegionAccessPointregionsError, + + /// You have attempted to create more Multi-Region Access Points than are allowed for an account. For more information, see Amazon Simple Storage Service endpoints and quotas in the AWS General Reference. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyMultiRegionAccessPoints, + + /// The number of tags exceeds the limit of 50 tags. + /// + /// HTTP Status Code: 400 Bad Request + /// + TooManyTags, + + /// Object decompression failed. Check that the object is properly compressed using the format specified in the request. + /// + /// HTTP Status Code: 400 Bad Request + /// + TruncatedInput, + + /// You are not authorized to perform this operation. + /// + /// HTTP Status Code: 401 Unauthorized + /// + UnauthorizedAccess, + + /// Applicable in China Regions only. Returned when a request is made to a bucket that doesn't have an ICP license. For more information, see ICP Recordal. + /// + /// HTTP Status Code: 403 Forbidden + /// + UnauthorizedAccessError, + + /// This request does not support content. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnexpectedContent, + + /// Applicable in China Regions only. This request was rejected because the IP was unexpected. + /// + /// HTTP Status Code: 403 Forbidden + /// + UnexpectedIPError, + + /// We encountered a record type that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnrecognizedFormatException, + + /// The email address you provided does not match any account on record. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnresolvableGrantByEmailAddress, + + /// The request contained an unsupported argument. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedArgument, + + /// We encountered an unsupported SQL function. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedFunction, + + /// The specified Parquet type is not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedParquetType, + + /// A range header is not supported for this operation. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedRangeHeader, + + /// Scan range queries are not supported on this type of object. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedScanRangeInput, + + /// The provided request is signed with an unsupported STS Token version or the signature version is not supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedSignature, + + /// We encountered an unsupported SQL operation. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedSqlOperation, + + /// We encountered an unsupported SQL structure. Check the SQL Reference. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedSqlStructure, + + /// We encountered a storage class that is not supported. Only STANDARD, STANDARD_IA, and ONEZONE_IA storage classes are supported. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedStorageClass, + + /// We encountered syntax that is not valid. + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedSyntax, + + /// Your query contains an unsupported type for comparison (e.g. verifying that a Parquet INT96 column type is greater than 0). + /// + /// HTTP Status Code: 400 Bad Request + /// + UnsupportedTypeForQuerying, + + /// The bucket POST must contain the specified field name. If it is specified, check the order of the fields. + /// + /// HTTP Status Code: 400 Bad Request + /// + UserKeyMustBeSpecified, + + /// A timestamp parse failure occurred in the SQL expression. + /// + /// HTTP Status Code: 400 Bad Request + /// + ValueParseFailure, + + Custom(ByteString), } impl S3ErrorCode { -const STATIC_CODE_LIST: &'static [&'static str] = &[ -"AccessControlListNotSupported", -"AccessDenied", -"AccessPointAlreadyOwnedByYou", -"AccountProblem", -"AllAccessDisabled", -"AmbiguousFieldName", -"AmbiguousGrantByEmailAddress", -"AuthorizationHeaderMalformed", -"AuthorizationQueryParametersError", -"BadDigest", -"BucketAlreadyExists", -"BucketAlreadyOwnedByYou", -"BucketHasAccessPointsAttached", -"BucketNotEmpty", -"Busy", -"CSVEscapingRecordDelimiter", -"CSVParsingError", -"CSVUnescapedQuote", -"CastFailed", -"ClientTokenConflict", -"ColumnTooLong", -"ConditionalRequestConflict", -"ConnectionClosedByRequester", -"CredentialsNotSupported", -"CrossLocationLoggingProhibited", -"DeviceNotActiveError", -"EmptyRequestBody", -"EndpointNotFound", -"EntityTooLarge", -"EntityTooSmall", -"EvaluatorBindingDoesNotExist", -"EvaluatorInvalidArguments", -"EvaluatorInvalidTimestampFormatPattern", -"EvaluatorInvalidTimestampFormatPatternSymbol", -"EvaluatorInvalidTimestampFormatPatternSymbolForParsing", -"EvaluatorInvalidTimestampFormatPatternToken", -"EvaluatorLikePatternInvalidEscapeSequence", -"EvaluatorNegativeLimit", -"EvaluatorTimestampFormatPatternDuplicateFields", -"EvaluatorTimestampFormatPatternHourClockAmPmMismatch", -"EvaluatorUnterminatedTimestampFormatPatternToken", -"ExpiredToken", -"ExpressionTooLong", -"ExternalEvalException", -"IllegalLocationConstraintException", -"IllegalSqlFunctionArgument", -"IllegalVersioningConfigurationException", -"IncompleteBody", -"IncorrectEndpoint", -"IncorrectNumberOfFilesInPostRequest", -"IncorrectSqlFunctionArgumentType", -"InlineDataTooLarge", -"IntegerOverflow", -"InternalError", -"InvalidAccessKeyId", -"InvalidAccessPoint", -"InvalidAccessPointAliasError", -"InvalidAddressingHeader", -"InvalidArgument", -"InvalidBucketAclWithObjectOwnership", -"InvalidBucketName", -"InvalidBucketOwnerAWSAccountID", -"InvalidBucketState", -"InvalidCast", -"InvalidColumnIndex", -"InvalidCompressionFormat", -"InvalidDataSource", -"InvalidDataType", -"InvalidDigest", -"InvalidEncryptionAlgorithmError", -"InvalidExpressionType", -"InvalidFileHeaderInfo", -"InvalidHostHeader", -"InvalidHttpMethod", -"InvalidJsonType", -"InvalidKeyPath", -"InvalidLocationConstraint", -"InvalidObjectState", -"InvalidPart", -"InvalidPartOrder", -"InvalidPayer", -"InvalidPolicyDocument", -"InvalidQuoteFields", -"InvalidRange", -"InvalidRegion", -"InvalidRequest", -"InvalidRequestParameter", -"InvalidSOAPRequest", -"InvalidScanRange", -"InvalidSecurity", -"InvalidSessionException", -"InvalidSignature", -"InvalidStorageClass", -"InvalidTableAlias", -"InvalidTag", -"InvalidTargetBucketForLogging", -"InvalidTextEncoding", -"InvalidToken", -"InvalidURI", -"JSONParsingError", -"KeyTooLongError", -"LexerInvalidChar", -"LexerInvalidIONLiteral", -"LexerInvalidLiteral", -"LexerInvalidOperator", -"LikeInvalidInputs", -"MalformedACLError", -"MalformedPOSTRequest", -"MalformedPolicy", -"MalformedXML", -"MaxMessageLengthExceeded", -"MaxOperatorsExceeded", -"MaxPostPreDataLengthExceededError", -"MetadataTooLarge", -"MethodNotAllowed", -"MissingAttachment", -"MissingAuthenticationToken", -"MissingContentLength", -"MissingRequestBodyError", -"MissingRequiredParameter", -"MissingSecurityElement", -"MissingSecurityHeader", -"MultipleDataSourcesUnsupported", -"NoLoggingStatusForKey", -"NoSuchAccessPoint", -"NoSuchAsyncRequest", -"NoSuchBucket", -"NoSuchBucketPolicy", -"NoSuchCORSConfiguration", -"NoSuchKey", -"NoSuchLifecycleConfiguration", -"NoSuchMultiRegionAccessPoint", -"NoSuchObjectLockConfiguration", -"NoSuchResource", -"NoSuchTagSet", -"NoSuchUpload", -"NoSuchVersion", -"NoSuchWebsiteConfiguration", -"NoTransformationDefined", -"NotDeviceOwnerError", -"NotImplemented", -"NotModified", -"NotSignedUp", -"NumberFormatError", -"ObjectLockConfigurationNotFoundError", -"ObjectSerializationConflict", -"OperationAborted", -"OverMaxColumn", -"OverMaxParquetBlockSize", -"OverMaxRecordSize", -"OwnershipControlsNotFoundError", -"ParquetParsingError", -"ParquetUnsupportedCompressionCodec", -"ParseAsteriskIsNotAloneInSelectList", -"ParseCannotMixSqbAndWildcardInSelectList", -"ParseCastArity", -"ParseEmptySelect", -"ParseExpected2TokenTypes", -"ParseExpectedArgumentDelimiter", -"ParseExpectedDatePart", -"ParseExpectedExpression", -"ParseExpectedIdentForAlias", -"ParseExpectedIdentForAt", -"ParseExpectedIdentForGroupName", -"ParseExpectedKeyword", -"ParseExpectedLeftParenAfterCast", -"ParseExpectedLeftParenBuiltinFunctionCall", -"ParseExpectedLeftParenValueConstructor", -"ParseExpectedMember", -"ParseExpectedNumber", -"ParseExpectedRightParenBuiltinFunctionCall", -"ParseExpectedTokenType", -"ParseExpectedTypeName", -"ParseExpectedWhenClause", -"ParseInvalidContextForWildcardInSelectList", -"ParseInvalidPathComponent", -"ParseInvalidTypeParam", -"ParseMalformedJoin", -"ParseMissingIdentAfterAt", -"ParseNonUnaryAgregateFunctionCall", -"ParseSelectMissingFrom", -"ParseUnExpectedKeyword", -"ParseUnexpectedOperator", -"ParseUnexpectedTerm", -"ParseUnexpectedToken", -"ParseUnknownOperator", -"ParseUnsupportedAlias", -"ParseUnsupportedCallWithStar", -"ParseUnsupportedCase", -"ParseUnsupportedCaseClause", -"ParseUnsupportedLiteralsGroupBy", -"ParseUnsupportedSelect", -"ParseUnsupportedSyntax", -"ParseUnsupportedToken", -"PermanentRedirect", -"PermanentRedirectControlError", -"PreconditionFailed", -"Redirect", -"ReplicationConfigurationNotFoundError", -"RequestHeaderSectionTooLarge", -"RequestIsNotMultiPartContent", -"RequestTimeTooSkewed", -"RequestTimeout", -"RequestTorrentOfBucketError", -"ResponseInterrupted", -"RestoreAlreadyInProgress", -"ServerSideEncryptionConfigurationNotFoundError", -"ServiceUnavailable", -"SignatureDoesNotMatch", -"SlowDown", -"TagPolicyException", -"TemporaryRedirect", -"TokenCodeInvalidError", -"TokenRefreshRequired", -"TooManyAccessPoints", -"TooManyBuckets", -"TooManyMultiRegionAccessPointregionsError", -"TooManyMultiRegionAccessPoints", -"TooManyTags", -"TruncatedInput", -"UnauthorizedAccess", -"UnauthorizedAccessError", -"UnexpectedContent", -"UnexpectedIPError", -"UnrecognizedFormatException", -"UnresolvableGrantByEmailAddress", -"UnsupportedArgument", -"UnsupportedFunction", -"UnsupportedParquetType", -"UnsupportedRangeHeader", -"UnsupportedScanRangeInput", -"UnsupportedSignature", -"UnsupportedSqlOperation", -"UnsupportedSqlStructure", -"UnsupportedStorageClass", -"UnsupportedSyntax", -"UnsupportedTypeForQuerying", -"UserKeyMustBeSpecified", -"ValueParseFailure", -]; - -#[must_use] -fn as_enum_tag(&self) -> usize { -match self { -Self::AccessControlListNotSupported => 0, -Self::AccessDenied => 1, -Self::AccessPointAlreadyOwnedByYou => 2, -Self::AccountProblem => 3, -Self::AllAccessDisabled => 4, -Self::AmbiguousFieldName => 5, -Self::AmbiguousGrantByEmailAddress => 6, -Self::AuthorizationHeaderMalformed => 7, -Self::AuthorizationQueryParametersError => 8, -Self::BadDigest => 9, -Self::BucketAlreadyExists => 10, -Self::BucketAlreadyOwnedByYou => 11, -Self::BucketHasAccessPointsAttached => 12, -Self::BucketNotEmpty => 13, -Self::Busy => 14, -Self::CSVEscapingRecordDelimiter => 15, -Self::CSVParsingError => 16, -Self::CSVUnescapedQuote => 17, -Self::CastFailed => 18, -Self::ClientTokenConflict => 19, -Self::ColumnTooLong => 20, -Self::ConditionalRequestConflict => 21, -Self::ConnectionClosedByRequester => 22, -Self::CredentialsNotSupported => 23, -Self::CrossLocationLoggingProhibited => 24, -Self::DeviceNotActiveError => 25, -Self::EmptyRequestBody => 26, -Self::EndpointNotFound => 27, -Self::EntityTooLarge => 28, -Self::EntityTooSmall => 29, -Self::EvaluatorBindingDoesNotExist => 30, -Self::EvaluatorInvalidArguments => 31, -Self::EvaluatorInvalidTimestampFormatPattern => 32, -Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33, -Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34, -Self::EvaluatorInvalidTimestampFormatPatternToken => 35, -Self::EvaluatorLikePatternInvalidEscapeSequence => 36, -Self::EvaluatorNegativeLimit => 37, -Self::EvaluatorTimestampFormatPatternDuplicateFields => 38, -Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39, -Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40, -Self::ExpiredToken => 41, -Self::ExpressionTooLong => 42, -Self::ExternalEvalException => 43, -Self::IllegalLocationConstraintException => 44, -Self::IllegalSqlFunctionArgument => 45, -Self::IllegalVersioningConfigurationException => 46, -Self::IncompleteBody => 47, -Self::IncorrectEndpoint => 48, -Self::IncorrectNumberOfFilesInPostRequest => 49, -Self::IncorrectSqlFunctionArgumentType => 50, -Self::InlineDataTooLarge => 51, -Self::IntegerOverflow => 52, -Self::InternalError => 53, -Self::InvalidAccessKeyId => 54, -Self::InvalidAccessPoint => 55, -Self::InvalidAccessPointAliasError => 56, -Self::InvalidAddressingHeader => 57, -Self::InvalidArgument => 58, -Self::InvalidBucketAclWithObjectOwnership => 59, -Self::InvalidBucketName => 60, -Self::InvalidBucketOwnerAWSAccountID => 61, -Self::InvalidBucketState => 62, -Self::InvalidCast => 63, -Self::InvalidColumnIndex => 64, -Self::InvalidCompressionFormat => 65, -Self::InvalidDataSource => 66, -Self::InvalidDataType => 67, -Self::InvalidDigest => 68, -Self::InvalidEncryptionAlgorithmError => 69, -Self::InvalidExpressionType => 70, -Self::InvalidFileHeaderInfo => 71, -Self::InvalidHostHeader => 72, -Self::InvalidHttpMethod => 73, -Self::InvalidJsonType => 74, -Self::InvalidKeyPath => 75, -Self::InvalidLocationConstraint => 76, -Self::InvalidObjectState => 77, -Self::InvalidPart => 78, -Self::InvalidPartOrder => 79, -Self::InvalidPayer => 80, -Self::InvalidPolicyDocument => 81, -Self::InvalidQuoteFields => 82, -Self::InvalidRange => 83, -Self::InvalidRegion => 84, -Self::InvalidRequest => 85, -Self::InvalidRequestParameter => 86, -Self::InvalidSOAPRequest => 87, -Self::InvalidScanRange => 88, -Self::InvalidSecurity => 89, -Self::InvalidSessionException => 90, -Self::InvalidSignature => 91, -Self::InvalidStorageClass => 92, -Self::InvalidTableAlias => 93, -Self::InvalidTag => 94, -Self::InvalidTargetBucketForLogging => 95, -Self::InvalidTextEncoding => 96, -Self::InvalidToken => 97, -Self::InvalidURI => 98, -Self::JSONParsingError => 99, -Self::KeyTooLongError => 100, -Self::LexerInvalidChar => 101, -Self::LexerInvalidIONLiteral => 102, -Self::LexerInvalidLiteral => 103, -Self::LexerInvalidOperator => 104, -Self::LikeInvalidInputs => 105, -Self::MalformedACLError => 106, -Self::MalformedPOSTRequest => 107, -Self::MalformedPolicy => 108, -Self::MalformedXML => 109, -Self::MaxMessageLengthExceeded => 110, -Self::MaxOperatorsExceeded => 111, -Self::MaxPostPreDataLengthExceededError => 112, -Self::MetadataTooLarge => 113, -Self::MethodNotAllowed => 114, -Self::MissingAttachment => 115, -Self::MissingAuthenticationToken => 116, -Self::MissingContentLength => 117, -Self::MissingRequestBodyError => 118, -Self::MissingRequiredParameter => 119, -Self::MissingSecurityElement => 120, -Self::MissingSecurityHeader => 121, -Self::MultipleDataSourcesUnsupported => 122, -Self::NoLoggingStatusForKey => 123, -Self::NoSuchAccessPoint => 124, -Self::NoSuchAsyncRequest => 125, -Self::NoSuchBucket => 126, -Self::NoSuchBucketPolicy => 127, -Self::NoSuchCORSConfiguration => 128, -Self::NoSuchKey => 129, -Self::NoSuchLifecycleConfiguration => 130, -Self::NoSuchMultiRegionAccessPoint => 131, -Self::NoSuchObjectLockConfiguration => 132, -Self::NoSuchResource => 133, -Self::NoSuchTagSet => 134, -Self::NoSuchUpload => 135, -Self::NoSuchVersion => 136, -Self::NoSuchWebsiteConfiguration => 137, -Self::NoTransformationDefined => 138, -Self::NotDeviceOwnerError => 139, -Self::NotImplemented => 140, -Self::NotModified => 141, -Self::NotSignedUp => 142, -Self::NumberFormatError => 143, -Self::ObjectLockConfigurationNotFoundError => 144, -Self::ObjectSerializationConflict => 145, -Self::OperationAborted => 146, -Self::OverMaxColumn => 147, -Self::OverMaxParquetBlockSize => 148, -Self::OverMaxRecordSize => 149, -Self::OwnershipControlsNotFoundError => 150, -Self::ParquetParsingError => 151, -Self::ParquetUnsupportedCompressionCodec => 152, -Self::ParseAsteriskIsNotAloneInSelectList => 153, -Self::ParseCannotMixSqbAndWildcardInSelectList => 154, -Self::ParseCastArity => 155, -Self::ParseEmptySelect => 156, -Self::ParseExpected2TokenTypes => 157, -Self::ParseExpectedArgumentDelimiter => 158, -Self::ParseExpectedDatePart => 159, -Self::ParseExpectedExpression => 160, -Self::ParseExpectedIdentForAlias => 161, -Self::ParseExpectedIdentForAt => 162, -Self::ParseExpectedIdentForGroupName => 163, -Self::ParseExpectedKeyword => 164, -Self::ParseExpectedLeftParenAfterCast => 165, -Self::ParseExpectedLeftParenBuiltinFunctionCall => 166, -Self::ParseExpectedLeftParenValueConstructor => 167, -Self::ParseExpectedMember => 168, -Self::ParseExpectedNumber => 169, -Self::ParseExpectedRightParenBuiltinFunctionCall => 170, -Self::ParseExpectedTokenType => 171, -Self::ParseExpectedTypeName => 172, -Self::ParseExpectedWhenClause => 173, -Self::ParseInvalidContextForWildcardInSelectList => 174, -Self::ParseInvalidPathComponent => 175, -Self::ParseInvalidTypeParam => 176, -Self::ParseMalformedJoin => 177, -Self::ParseMissingIdentAfterAt => 178, -Self::ParseNonUnaryAgregateFunctionCall => 179, -Self::ParseSelectMissingFrom => 180, -Self::ParseUnExpectedKeyword => 181, -Self::ParseUnexpectedOperator => 182, -Self::ParseUnexpectedTerm => 183, -Self::ParseUnexpectedToken => 184, -Self::ParseUnknownOperator => 185, -Self::ParseUnsupportedAlias => 186, -Self::ParseUnsupportedCallWithStar => 187, -Self::ParseUnsupportedCase => 188, -Self::ParseUnsupportedCaseClause => 189, -Self::ParseUnsupportedLiteralsGroupBy => 190, -Self::ParseUnsupportedSelect => 191, -Self::ParseUnsupportedSyntax => 192, -Self::ParseUnsupportedToken => 193, -Self::PermanentRedirect => 194, -Self::PermanentRedirectControlError => 195, -Self::PreconditionFailed => 196, -Self::Redirect => 197, -Self::ReplicationConfigurationNotFoundError => 198, -Self::RequestHeaderSectionTooLarge => 199, -Self::RequestIsNotMultiPartContent => 200, -Self::RequestTimeTooSkewed => 201, -Self::RequestTimeout => 202, -Self::RequestTorrentOfBucketError => 203, -Self::ResponseInterrupted => 204, -Self::RestoreAlreadyInProgress => 205, -Self::ServerSideEncryptionConfigurationNotFoundError => 206, -Self::ServiceUnavailable => 207, -Self::SignatureDoesNotMatch => 208, -Self::SlowDown => 209, -Self::TagPolicyException => 210, -Self::TemporaryRedirect => 211, -Self::TokenCodeInvalidError => 212, -Self::TokenRefreshRequired => 213, -Self::TooManyAccessPoints => 214, -Self::TooManyBuckets => 215, -Self::TooManyMultiRegionAccessPointregionsError => 216, -Self::TooManyMultiRegionAccessPoints => 217, -Self::TooManyTags => 218, -Self::TruncatedInput => 219, -Self::UnauthorizedAccess => 220, -Self::UnauthorizedAccessError => 221, -Self::UnexpectedContent => 222, -Self::UnexpectedIPError => 223, -Self::UnrecognizedFormatException => 224, -Self::UnresolvableGrantByEmailAddress => 225, -Self::UnsupportedArgument => 226, -Self::UnsupportedFunction => 227, -Self::UnsupportedParquetType => 228, -Self::UnsupportedRangeHeader => 229, -Self::UnsupportedScanRangeInput => 230, -Self::UnsupportedSignature => 231, -Self::UnsupportedSqlOperation => 232, -Self::UnsupportedSqlStructure => 233, -Self::UnsupportedStorageClass => 234, -Self::UnsupportedSyntax => 235, -Self::UnsupportedTypeForQuerying => 236, -Self::UserKeyMustBeSpecified => 237, -Self::ValueParseFailure => 238, -Self::Custom(_) => usize::MAX, -} -} - -pub(crate) fn as_static_str(&self) -> Option<&'static str> { - Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied() -} - -#[must_use] -pub fn from_bytes(s: &[u8]) -> Option { -match s { -b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported), -b"AccessDenied" => Some(Self::AccessDenied), -b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou), -b"AccountProblem" => Some(Self::AccountProblem), -b"AllAccessDisabled" => Some(Self::AllAccessDisabled), -b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName), -b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress), -b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed), -b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError), -b"BadDigest" => Some(Self::BadDigest), -b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists), -b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou), -b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached), -b"BucketNotEmpty" => Some(Self::BucketNotEmpty), -b"Busy" => Some(Self::Busy), -b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter), -b"CSVParsingError" => Some(Self::CSVParsingError), -b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote), -b"CastFailed" => Some(Self::CastFailed), -b"ClientTokenConflict" => Some(Self::ClientTokenConflict), -b"ColumnTooLong" => Some(Self::ColumnTooLong), -b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict), -b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester), -b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported), -b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited), -b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError), -b"EmptyRequestBody" => Some(Self::EmptyRequestBody), -b"EndpointNotFound" => Some(Self::EndpointNotFound), -b"EntityTooLarge" => Some(Self::EntityTooLarge), -b"EntityTooSmall" => Some(Self::EntityTooSmall), -b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist), -b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments), -b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern), -b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol), -b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing), -b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken), -b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence), -b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit), -b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields), -b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch), -b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken), -b"ExpiredToken" => Some(Self::ExpiredToken), -b"ExpressionTooLong" => Some(Self::ExpressionTooLong), -b"ExternalEvalException" => Some(Self::ExternalEvalException), -b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException), -b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument), -b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException), -b"IncompleteBody" => Some(Self::IncompleteBody), -b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint), -b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest), -b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType), -b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge), -b"IntegerOverflow" => Some(Self::IntegerOverflow), -b"InternalError" => Some(Self::InternalError), -b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId), -b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint), -b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError), -b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader), -b"InvalidArgument" => Some(Self::InvalidArgument), -b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership), -b"InvalidBucketName" => Some(Self::InvalidBucketName), -b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID), -b"InvalidBucketState" => Some(Self::InvalidBucketState), -b"InvalidCast" => Some(Self::InvalidCast), -b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex), -b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat), -b"InvalidDataSource" => Some(Self::InvalidDataSource), -b"InvalidDataType" => Some(Self::InvalidDataType), -b"InvalidDigest" => Some(Self::InvalidDigest), -b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError), -b"InvalidExpressionType" => Some(Self::InvalidExpressionType), -b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo), -b"InvalidHostHeader" => Some(Self::InvalidHostHeader), -b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod), -b"InvalidJsonType" => Some(Self::InvalidJsonType), -b"InvalidKeyPath" => Some(Self::InvalidKeyPath), -b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint), -b"InvalidObjectState" => Some(Self::InvalidObjectState), -b"InvalidPart" => Some(Self::InvalidPart), -b"InvalidPartOrder" => Some(Self::InvalidPartOrder), -b"InvalidPayer" => Some(Self::InvalidPayer), -b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument), -b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields), -b"InvalidRange" => Some(Self::InvalidRange), -b"InvalidRegion" => Some(Self::InvalidRegion), -b"InvalidRequest" => Some(Self::InvalidRequest), -b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter), -b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest), -b"InvalidScanRange" => Some(Self::InvalidScanRange), -b"InvalidSecurity" => Some(Self::InvalidSecurity), -b"InvalidSessionException" => Some(Self::InvalidSessionException), -b"InvalidSignature" => Some(Self::InvalidSignature), -b"InvalidStorageClass" => Some(Self::InvalidStorageClass), -b"InvalidTableAlias" => Some(Self::InvalidTableAlias), -b"InvalidTag" => Some(Self::InvalidTag), -b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging), -b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding), -b"InvalidToken" => Some(Self::InvalidToken), -b"InvalidURI" => Some(Self::InvalidURI), -b"JSONParsingError" => Some(Self::JSONParsingError), -b"KeyTooLongError" => Some(Self::KeyTooLongError), -b"LexerInvalidChar" => Some(Self::LexerInvalidChar), -b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral), -b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral), -b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator), -b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs), -b"MalformedACLError" => Some(Self::MalformedACLError), -b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest), -b"MalformedPolicy" => Some(Self::MalformedPolicy), -b"MalformedXML" => Some(Self::MalformedXML), -b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded), -b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded), -b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError), -b"MetadataTooLarge" => Some(Self::MetadataTooLarge), -b"MethodNotAllowed" => Some(Self::MethodNotAllowed), -b"MissingAttachment" => Some(Self::MissingAttachment), -b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken), -b"MissingContentLength" => Some(Self::MissingContentLength), -b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError), -b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter), -b"MissingSecurityElement" => Some(Self::MissingSecurityElement), -b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader), -b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported), -b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey), -b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint), -b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest), -b"NoSuchBucket" => Some(Self::NoSuchBucket), -b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy), -b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration), -b"NoSuchKey" => Some(Self::NoSuchKey), -b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration), -b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint), -b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration), -b"NoSuchResource" => Some(Self::NoSuchResource), -b"NoSuchTagSet" => Some(Self::NoSuchTagSet), -b"NoSuchUpload" => Some(Self::NoSuchUpload), -b"NoSuchVersion" => Some(Self::NoSuchVersion), -b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration), -b"NoTransformationDefined" => Some(Self::NoTransformationDefined), -b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError), -b"NotImplemented" => Some(Self::NotImplemented), -b"NotModified" => Some(Self::NotModified), -b"NotSignedUp" => Some(Self::NotSignedUp), -b"NumberFormatError" => Some(Self::NumberFormatError), -b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError), -b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict), -b"OperationAborted" => Some(Self::OperationAborted), -b"OverMaxColumn" => Some(Self::OverMaxColumn), -b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize), -b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize), -b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError), -b"ParquetParsingError" => Some(Self::ParquetParsingError), -b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec), -b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList), -b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList), -b"ParseCastArity" => Some(Self::ParseCastArity), -b"ParseEmptySelect" => Some(Self::ParseEmptySelect), -b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes), -b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter), -b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart), -b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression), -b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias), -b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt), -b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName), -b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword), -b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast), -b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall), -b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor), -b"ParseExpectedMember" => Some(Self::ParseExpectedMember), -b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber), -b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall), -b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType), -b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName), -b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause), -b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList), -b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent), -b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam), -b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin), -b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt), -b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall), -b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom), -b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword), -b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator), -b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm), -b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken), -b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator), -b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias), -b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar), -b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase), -b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause), -b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy), -b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect), -b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax), -b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken), -b"PermanentRedirect" => Some(Self::PermanentRedirect), -b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError), -b"PreconditionFailed" => Some(Self::PreconditionFailed), -b"Redirect" => Some(Self::Redirect), -b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError), -b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge), -b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent), -b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed), -b"RequestTimeout" => Some(Self::RequestTimeout), -b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError), -b"ResponseInterrupted" => Some(Self::ResponseInterrupted), -b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress), -b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError), -b"ServiceUnavailable" => Some(Self::ServiceUnavailable), -b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch), -b"SlowDown" => Some(Self::SlowDown), -b"TagPolicyException" => Some(Self::TagPolicyException), -b"TemporaryRedirect" => Some(Self::TemporaryRedirect), -b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError), -b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired), -b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints), -b"TooManyBuckets" => Some(Self::TooManyBuckets), -b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError), -b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints), -b"TooManyTags" => Some(Self::TooManyTags), -b"TruncatedInput" => Some(Self::TruncatedInput), -b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess), -b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError), -b"UnexpectedContent" => Some(Self::UnexpectedContent), -b"UnexpectedIPError" => Some(Self::UnexpectedIPError), -b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException), -b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress), -b"UnsupportedArgument" => Some(Self::UnsupportedArgument), -b"UnsupportedFunction" => Some(Self::UnsupportedFunction), -b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType), -b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader), -b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput), -b"UnsupportedSignature" => Some(Self::UnsupportedSignature), -b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation), -b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure), -b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass), -b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax), -b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying), -b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified), -b"ValueParseFailure" => Some(Self::ValueParseFailure), -_ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())) -} -} - -#[allow(clippy::match_same_arms)] -#[must_use] -pub fn status_code(&self) -> Option { -match self { -Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST), -Self::AccessDenied => Some(StatusCode::FORBIDDEN), -Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT), -Self::AccountProblem => Some(StatusCode::FORBIDDEN), -Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN), -Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST), -Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), -Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST), -Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST), -Self::BadDigest => Some(StatusCode::BAD_REQUEST), -Self::BucketAlreadyExists => Some(StatusCode::CONFLICT), -Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT), -Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST), -Self::BucketNotEmpty => Some(StatusCode::CONFLICT), -Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE), -Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST), -Self::CSVParsingError => Some(StatusCode::BAD_REQUEST), -Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST), -Self::CastFailed => Some(StatusCode::BAD_REQUEST), -Self::ClientTokenConflict => Some(StatusCode::CONFLICT), -Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST), -Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT), -Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST), -Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST), -Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN), -Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST), -Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST), -Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST), -Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST), -Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST), -Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), -Self::ExpiredToken => Some(StatusCode::BAD_REQUEST), -Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST), -Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST), -Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST), -Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST), -Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST), -Self::IncompleteBody => Some(StatusCode::BAD_REQUEST), -Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST), -Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST), -Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST), -Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST), -Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST), -Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR), -Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN), -Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST), -Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST), -Self::InvalidAddressingHeader => None, -Self::InvalidArgument => Some(StatusCode::BAD_REQUEST), -Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST), -Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST), -Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST), -Self::InvalidBucketState => Some(StatusCode::CONFLICT), -Self::InvalidCast => Some(StatusCode::BAD_REQUEST), -Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST), -Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST), -Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST), -Self::InvalidDataType => Some(StatusCode::BAD_REQUEST), -Self::InvalidDigest => Some(StatusCode::BAD_REQUEST), -Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST), -Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST), -Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST), -Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST), -Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST), -Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST), -Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST), -Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST), -Self::InvalidObjectState => Some(StatusCode::FORBIDDEN), -Self::InvalidPart => Some(StatusCode::BAD_REQUEST), -Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST), -Self::InvalidPayer => Some(StatusCode::FORBIDDEN), -Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST), -Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST), -Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE), -Self::InvalidRegion => Some(StatusCode::FORBIDDEN), -Self::InvalidRequest => Some(StatusCode::BAD_REQUEST), -Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST), -Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST), -Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST), -Self::InvalidSecurity => Some(StatusCode::FORBIDDEN), -Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST), -Self::InvalidSignature => Some(StatusCode::BAD_REQUEST), -Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST), -Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST), -Self::InvalidTag => Some(StatusCode::BAD_REQUEST), -Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST), -Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST), -Self::InvalidToken => Some(StatusCode::BAD_REQUEST), -Self::InvalidURI => Some(StatusCode::BAD_REQUEST), -Self::JSONParsingError => Some(StatusCode::BAD_REQUEST), -Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST), -Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST), -Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST), -Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST), -Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST), -Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST), -Self::MalformedACLError => Some(StatusCode::BAD_REQUEST), -Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST), -Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST), -Self::MalformedXML => Some(StatusCode::BAD_REQUEST), -Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST), -Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST), -Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST), -Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST), -Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED), -Self::MissingAttachment => None, -Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN), -Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED), -Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST), -Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST), -Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST), -Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST), -Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST), -Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST), -Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND), -Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND), -Self::NoSuchBucket => Some(StatusCode::NOT_FOUND), -Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND), -Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND), -Self::NoSuchKey => Some(StatusCode::NOT_FOUND), -Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND), -Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND), -Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND), -Self::NoSuchResource => Some(StatusCode::NOT_FOUND), -Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND), -Self::NoSuchUpload => Some(StatusCode::NOT_FOUND), -Self::NoSuchVersion => Some(StatusCode::NOT_FOUND), -Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND), -Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND), -Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST), -Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED), -Self::NotModified => Some(StatusCode::NOT_MODIFIED), -Self::NotSignedUp => Some(StatusCode::FORBIDDEN), -Self::NumberFormatError => Some(StatusCode::BAD_REQUEST), -Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), -Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST), -Self::OperationAborted => Some(StatusCode::CONFLICT), -Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST), -Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST), -Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST), -Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND), -Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST), -Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST), -Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST), -Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST), -Self::ParseCastArity => Some(StatusCode::BAD_REQUEST), -Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST), -Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST), -Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST), -Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST), -Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST), -Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST), -Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST), -Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST), -Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST), -Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST), -Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST), -Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST), -Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST), -Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST), -Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST), -Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST), -Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY), -Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY), -Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED), -Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT), -Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), -Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST), -Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST), -Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN), -Self::RequestTimeout => Some(StatusCode::BAD_REQUEST), -Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST), -Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST), -Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT), -Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST), -Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE), -Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN), -Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE), -Self::TagPolicyException => Some(StatusCode::BAD_REQUEST), -Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT), -Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST), -Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST), -Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST), -Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST), -Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST), -Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST), -Self::TooManyTags => Some(StatusCode::BAD_REQUEST), -Self::TruncatedInput => Some(StatusCode::BAD_REQUEST), -Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED), -Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN), -Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST), -Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN), -Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST), -Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST), -Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST), -Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST), -Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST), -Self::Custom(_) => None, -} -} - + const STATIC_CODE_LIST: &'static [&'static str] = &[ + "AccessControlListNotSupported", + "AccessDenied", + "AccessPointAlreadyOwnedByYou", + "AccountProblem", + "AllAccessDisabled", + "AmbiguousFieldName", + "AmbiguousGrantByEmailAddress", + "AuthorizationHeaderMalformed", + "AuthorizationQueryParametersError", + "BadDigest", + "BucketAlreadyExists", + "BucketAlreadyOwnedByYou", + "BucketHasAccessPointsAttached", + "BucketNotEmpty", + "Busy", + "CSVEscapingRecordDelimiter", + "CSVParsingError", + "CSVUnescapedQuote", + "CastFailed", + "ClientTokenConflict", + "ColumnTooLong", + "ConditionalRequestConflict", + "ConnectionClosedByRequester", + "CredentialsNotSupported", + "CrossLocationLoggingProhibited", + "DeviceNotActiveError", + "EmptyRequestBody", + "EndpointNotFound", + "EntityTooLarge", + "EntityTooSmall", + "EvaluatorBindingDoesNotExist", + "EvaluatorInvalidArguments", + "EvaluatorInvalidTimestampFormatPattern", + "EvaluatorInvalidTimestampFormatPatternSymbol", + "EvaluatorInvalidTimestampFormatPatternSymbolForParsing", + "EvaluatorInvalidTimestampFormatPatternToken", + "EvaluatorLikePatternInvalidEscapeSequence", + "EvaluatorNegativeLimit", + "EvaluatorTimestampFormatPatternDuplicateFields", + "EvaluatorTimestampFormatPatternHourClockAmPmMismatch", + "EvaluatorUnterminatedTimestampFormatPatternToken", + "ExpiredToken", + "ExpressionTooLong", + "ExternalEvalException", + "IllegalLocationConstraintException", + "IllegalSqlFunctionArgument", + "IllegalVersioningConfigurationException", + "IncompleteBody", + "IncorrectEndpoint", + "IncorrectNumberOfFilesInPostRequest", + "IncorrectSqlFunctionArgumentType", + "InlineDataTooLarge", + "IntegerOverflow", + "InternalError", + "InvalidAccessKeyId", + "InvalidAccessPoint", + "InvalidAccessPointAliasError", + "InvalidAddressingHeader", + "InvalidArgument", + "InvalidBucketAclWithObjectOwnership", + "InvalidBucketName", + "InvalidBucketOwnerAWSAccountID", + "InvalidBucketState", + "InvalidCast", + "InvalidColumnIndex", + "InvalidCompressionFormat", + "InvalidDataSource", + "InvalidDataType", + "InvalidDigest", + "InvalidEncryptionAlgorithmError", + "InvalidExpressionType", + "InvalidFileHeaderInfo", + "InvalidHostHeader", + "InvalidHttpMethod", + "InvalidJsonType", + "InvalidKeyPath", + "InvalidLocationConstraint", + "InvalidObjectState", + "InvalidPart", + "InvalidPartOrder", + "InvalidPayer", + "InvalidPolicyDocument", + "InvalidQuoteFields", + "InvalidRange", + "InvalidRegion", + "InvalidRequest", + "InvalidRequestParameter", + "InvalidSOAPRequest", + "InvalidScanRange", + "InvalidSecurity", + "InvalidSessionException", + "InvalidSignature", + "InvalidStorageClass", + "InvalidTableAlias", + "InvalidTag", + "InvalidTargetBucketForLogging", + "InvalidTextEncoding", + "InvalidToken", + "InvalidURI", + "JSONParsingError", + "KeyTooLongError", + "LexerInvalidChar", + "LexerInvalidIONLiteral", + "LexerInvalidLiteral", + "LexerInvalidOperator", + "LikeInvalidInputs", + "MalformedACLError", + "MalformedPOSTRequest", + "MalformedPolicy", + "MalformedXML", + "MaxMessageLengthExceeded", + "MaxOperatorsExceeded", + "MaxPostPreDataLengthExceededError", + "MetadataTooLarge", + "MethodNotAllowed", + "MissingAttachment", + "MissingAuthenticationToken", + "MissingContentLength", + "MissingRequestBodyError", + "MissingRequiredParameter", + "MissingSecurityElement", + "MissingSecurityHeader", + "MultipleDataSourcesUnsupported", + "NoLoggingStatusForKey", + "NoSuchAccessPoint", + "NoSuchAsyncRequest", + "NoSuchBucket", + "NoSuchBucketPolicy", + "NoSuchCORSConfiguration", + "NoSuchKey", + "NoSuchLifecycleConfiguration", + "NoSuchMultiRegionAccessPoint", + "NoSuchObjectLockConfiguration", + "NoSuchResource", + "NoSuchTagSet", + "NoSuchUpload", + "NoSuchVersion", + "NoSuchWebsiteConfiguration", + "NoTransformationDefined", + "NotDeviceOwnerError", + "NotImplemented", + "NotModified", + "NotSignedUp", + "NumberFormatError", + "ObjectLockConfigurationNotFoundError", + "ObjectSerializationConflict", + "OperationAborted", + "OverMaxColumn", + "OverMaxParquetBlockSize", + "OverMaxRecordSize", + "OwnershipControlsNotFoundError", + "ParquetParsingError", + "ParquetUnsupportedCompressionCodec", + "ParseAsteriskIsNotAloneInSelectList", + "ParseCannotMixSqbAndWildcardInSelectList", + "ParseCastArity", + "ParseEmptySelect", + "ParseExpected2TokenTypes", + "ParseExpectedArgumentDelimiter", + "ParseExpectedDatePart", + "ParseExpectedExpression", + "ParseExpectedIdentForAlias", + "ParseExpectedIdentForAt", + "ParseExpectedIdentForGroupName", + "ParseExpectedKeyword", + "ParseExpectedLeftParenAfterCast", + "ParseExpectedLeftParenBuiltinFunctionCall", + "ParseExpectedLeftParenValueConstructor", + "ParseExpectedMember", + "ParseExpectedNumber", + "ParseExpectedRightParenBuiltinFunctionCall", + "ParseExpectedTokenType", + "ParseExpectedTypeName", + "ParseExpectedWhenClause", + "ParseInvalidContextForWildcardInSelectList", + "ParseInvalidPathComponent", + "ParseInvalidTypeParam", + "ParseMalformedJoin", + "ParseMissingIdentAfterAt", + "ParseNonUnaryAgregateFunctionCall", + "ParseSelectMissingFrom", + "ParseUnExpectedKeyword", + "ParseUnexpectedOperator", + "ParseUnexpectedTerm", + "ParseUnexpectedToken", + "ParseUnknownOperator", + "ParseUnsupportedAlias", + "ParseUnsupportedCallWithStar", + "ParseUnsupportedCase", + "ParseUnsupportedCaseClause", + "ParseUnsupportedLiteralsGroupBy", + "ParseUnsupportedSelect", + "ParseUnsupportedSyntax", + "ParseUnsupportedToken", + "PermanentRedirect", + "PermanentRedirectControlError", + "PreconditionFailed", + "Redirect", + "ReplicationConfigurationNotFoundError", + "RequestHeaderSectionTooLarge", + "RequestIsNotMultiPartContent", + "RequestTimeTooSkewed", + "RequestTimeout", + "RequestTorrentOfBucketError", + "ResponseInterrupted", + "RestoreAlreadyInProgress", + "ServerSideEncryptionConfigurationNotFoundError", + "ServiceUnavailable", + "SignatureDoesNotMatch", + "SlowDown", + "TagPolicyException", + "TemporaryRedirect", + "TokenCodeInvalidError", + "TokenRefreshRequired", + "TooManyAccessPoints", + "TooManyBuckets", + "TooManyMultiRegionAccessPointregionsError", + "TooManyMultiRegionAccessPoints", + "TooManyTags", + "TruncatedInput", + "UnauthorizedAccess", + "UnauthorizedAccessError", + "UnexpectedContent", + "UnexpectedIPError", + "UnrecognizedFormatException", + "UnresolvableGrantByEmailAddress", + "UnsupportedArgument", + "UnsupportedFunction", + "UnsupportedParquetType", + "UnsupportedRangeHeader", + "UnsupportedScanRangeInput", + "UnsupportedSignature", + "UnsupportedSqlOperation", + "UnsupportedSqlStructure", + "UnsupportedStorageClass", + "UnsupportedSyntax", + "UnsupportedTypeForQuerying", + "UserKeyMustBeSpecified", + "ValueParseFailure", + ]; + + #[must_use] + fn as_enum_tag(&self) -> usize { + match self { + Self::AccessControlListNotSupported => 0, + Self::AccessDenied => 1, + Self::AccessPointAlreadyOwnedByYou => 2, + Self::AccountProblem => 3, + Self::AllAccessDisabled => 4, + Self::AmbiguousFieldName => 5, + Self::AmbiguousGrantByEmailAddress => 6, + Self::AuthorizationHeaderMalformed => 7, + Self::AuthorizationQueryParametersError => 8, + Self::BadDigest => 9, + Self::BucketAlreadyExists => 10, + Self::BucketAlreadyOwnedByYou => 11, + Self::BucketHasAccessPointsAttached => 12, + Self::BucketNotEmpty => 13, + Self::Busy => 14, + Self::CSVEscapingRecordDelimiter => 15, + Self::CSVParsingError => 16, + Self::CSVUnescapedQuote => 17, + Self::CastFailed => 18, + Self::ClientTokenConflict => 19, + Self::ColumnTooLong => 20, + Self::ConditionalRequestConflict => 21, + Self::ConnectionClosedByRequester => 22, + Self::CredentialsNotSupported => 23, + Self::CrossLocationLoggingProhibited => 24, + Self::DeviceNotActiveError => 25, + Self::EmptyRequestBody => 26, + Self::EndpointNotFound => 27, + Self::EntityTooLarge => 28, + Self::EntityTooSmall => 29, + Self::EvaluatorBindingDoesNotExist => 30, + Self::EvaluatorInvalidArguments => 31, + Self::EvaluatorInvalidTimestampFormatPattern => 32, + Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33, + Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34, + Self::EvaluatorInvalidTimestampFormatPatternToken => 35, + Self::EvaluatorLikePatternInvalidEscapeSequence => 36, + Self::EvaluatorNegativeLimit => 37, + Self::EvaluatorTimestampFormatPatternDuplicateFields => 38, + Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39, + Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40, + Self::ExpiredToken => 41, + Self::ExpressionTooLong => 42, + Self::ExternalEvalException => 43, + Self::IllegalLocationConstraintException => 44, + Self::IllegalSqlFunctionArgument => 45, + Self::IllegalVersioningConfigurationException => 46, + Self::IncompleteBody => 47, + Self::IncorrectEndpoint => 48, + Self::IncorrectNumberOfFilesInPostRequest => 49, + Self::IncorrectSqlFunctionArgumentType => 50, + Self::InlineDataTooLarge => 51, + Self::IntegerOverflow => 52, + Self::InternalError => 53, + Self::InvalidAccessKeyId => 54, + Self::InvalidAccessPoint => 55, + Self::InvalidAccessPointAliasError => 56, + Self::InvalidAddressingHeader => 57, + Self::InvalidArgument => 58, + Self::InvalidBucketAclWithObjectOwnership => 59, + Self::InvalidBucketName => 60, + Self::InvalidBucketOwnerAWSAccountID => 61, + Self::InvalidBucketState => 62, + Self::InvalidCast => 63, + Self::InvalidColumnIndex => 64, + Self::InvalidCompressionFormat => 65, + Self::InvalidDataSource => 66, + Self::InvalidDataType => 67, + Self::InvalidDigest => 68, + Self::InvalidEncryptionAlgorithmError => 69, + Self::InvalidExpressionType => 70, + Self::InvalidFileHeaderInfo => 71, + Self::InvalidHostHeader => 72, + Self::InvalidHttpMethod => 73, + Self::InvalidJsonType => 74, + Self::InvalidKeyPath => 75, + Self::InvalidLocationConstraint => 76, + Self::InvalidObjectState => 77, + Self::InvalidPart => 78, + Self::InvalidPartOrder => 79, + Self::InvalidPayer => 80, + Self::InvalidPolicyDocument => 81, + Self::InvalidQuoteFields => 82, + Self::InvalidRange => 83, + Self::InvalidRegion => 84, + Self::InvalidRequest => 85, + Self::InvalidRequestParameter => 86, + Self::InvalidSOAPRequest => 87, + Self::InvalidScanRange => 88, + Self::InvalidSecurity => 89, + Self::InvalidSessionException => 90, + Self::InvalidSignature => 91, + Self::InvalidStorageClass => 92, + Self::InvalidTableAlias => 93, + Self::InvalidTag => 94, + Self::InvalidTargetBucketForLogging => 95, + Self::InvalidTextEncoding => 96, + Self::InvalidToken => 97, + Self::InvalidURI => 98, + Self::JSONParsingError => 99, + Self::KeyTooLongError => 100, + Self::LexerInvalidChar => 101, + Self::LexerInvalidIONLiteral => 102, + Self::LexerInvalidLiteral => 103, + Self::LexerInvalidOperator => 104, + Self::LikeInvalidInputs => 105, + Self::MalformedACLError => 106, + Self::MalformedPOSTRequest => 107, + Self::MalformedPolicy => 108, + Self::MalformedXML => 109, + Self::MaxMessageLengthExceeded => 110, + Self::MaxOperatorsExceeded => 111, + Self::MaxPostPreDataLengthExceededError => 112, + Self::MetadataTooLarge => 113, + Self::MethodNotAllowed => 114, + Self::MissingAttachment => 115, + Self::MissingAuthenticationToken => 116, + Self::MissingContentLength => 117, + Self::MissingRequestBodyError => 118, + Self::MissingRequiredParameter => 119, + Self::MissingSecurityElement => 120, + Self::MissingSecurityHeader => 121, + Self::MultipleDataSourcesUnsupported => 122, + Self::NoLoggingStatusForKey => 123, + Self::NoSuchAccessPoint => 124, + Self::NoSuchAsyncRequest => 125, + Self::NoSuchBucket => 126, + Self::NoSuchBucketPolicy => 127, + Self::NoSuchCORSConfiguration => 128, + Self::NoSuchKey => 129, + Self::NoSuchLifecycleConfiguration => 130, + Self::NoSuchMultiRegionAccessPoint => 131, + Self::NoSuchObjectLockConfiguration => 132, + Self::NoSuchResource => 133, + Self::NoSuchTagSet => 134, + Self::NoSuchUpload => 135, + Self::NoSuchVersion => 136, + Self::NoSuchWebsiteConfiguration => 137, + Self::NoTransformationDefined => 138, + Self::NotDeviceOwnerError => 139, + Self::NotImplemented => 140, + Self::NotModified => 141, + Self::NotSignedUp => 142, + Self::NumberFormatError => 143, + Self::ObjectLockConfigurationNotFoundError => 144, + Self::ObjectSerializationConflict => 145, + Self::OperationAborted => 146, + Self::OverMaxColumn => 147, + Self::OverMaxParquetBlockSize => 148, + Self::OverMaxRecordSize => 149, + Self::OwnershipControlsNotFoundError => 150, + Self::ParquetParsingError => 151, + Self::ParquetUnsupportedCompressionCodec => 152, + Self::ParseAsteriskIsNotAloneInSelectList => 153, + Self::ParseCannotMixSqbAndWildcardInSelectList => 154, + Self::ParseCastArity => 155, + Self::ParseEmptySelect => 156, + Self::ParseExpected2TokenTypes => 157, + Self::ParseExpectedArgumentDelimiter => 158, + Self::ParseExpectedDatePart => 159, + Self::ParseExpectedExpression => 160, + Self::ParseExpectedIdentForAlias => 161, + Self::ParseExpectedIdentForAt => 162, + Self::ParseExpectedIdentForGroupName => 163, + Self::ParseExpectedKeyword => 164, + Self::ParseExpectedLeftParenAfterCast => 165, + Self::ParseExpectedLeftParenBuiltinFunctionCall => 166, + Self::ParseExpectedLeftParenValueConstructor => 167, + Self::ParseExpectedMember => 168, + Self::ParseExpectedNumber => 169, + Self::ParseExpectedRightParenBuiltinFunctionCall => 170, + Self::ParseExpectedTokenType => 171, + Self::ParseExpectedTypeName => 172, + Self::ParseExpectedWhenClause => 173, + Self::ParseInvalidContextForWildcardInSelectList => 174, + Self::ParseInvalidPathComponent => 175, + Self::ParseInvalidTypeParam => 176, + Self::ParseMalformedJoin => 177, + Self::ParseMissingIdentAfterAt => 178, + Self::ParseNonUnaryAgregateFunctionCall => 179, + Self::ParseSelectMissingFrom => 180, + Self::ParseUnExpectedKeyword => 181, + Self::ParseUnexpectedOperator => 182, + Self::ParseUnexpectedTerm => 183, + Self::ParseUnexpectedToken => 184, + Self::ParseUnknownOperator => 185, + Self::ParseUnsupportedAlias => 186, + Self::ParseUnsupportedCallWithStar => 187, + Self::ParseUnsupportedCase => 188, + Self::ParseUnsupportedCaseClause => 189, + Self::ParseUnsupportedLiteralsGroupBy => 190, + Self::ParseUnsupportedSelect => 191, + Self::ParseUnsupportedSyntax => 192, + Self::ParseUnsupportedToken => 193, + Self::PermanentRedirect => 194, + Self::PermanentRedirectControlError => 195, + Self::PreconditionFailed => 196, + Self::Redirect => 197, + Self::ReplicationConfigurationNotFoundError => 198, + Self::RequestHeaderSectionTooLarge => 199, + Self::RequestIsNotMultiPartContent => 200, + Self::RequestTimeTooSkewed => 201, + Self::RequestTimeout => 202, + Self::RequestTorrentOfBucketError => 203, + Self::ResponseInterrupted => 204, + Self::RestoreAlreadyInProgress => 205, + Self::ServerSideEncryptionConfigurationNotFoundError => 206, + Self::ServiceUnavailable => 207, + Self::SignatureDoesNotMatch => 208, + Self::SlowDown => 209, + Self::TagPolicyException => 210, + Self::TemporaryRedirect => 211, + Self::TokenCodeInvalidError => 212, + Self::TokenRefreshRequired => 213, + Self::TooManyAccessPoints => 214, + Self::TooManyBuckets => 215, + Self::TooManyMultiRegionAccessPointregionsError => 216, + Self::TooManyMultiRegionAccessPoints => 217, + Self::TooManyTags => 218, + Self::TruncatedInput => 219, + Self::UnauthorizedAccess => 220, + Self::UnauthorizedAccessError => 221, + Self::UnexpectedContent => 222, + Self::UnexpectedIPError => 223, + Self::UnrecognizedFormatException => 224, + Self::UnresolvableGrantByEmailAddress => 225, + Self::UnsupportedArgument => 226, + Self::UnsupportedFunction => 227, + Self::UnsupportedParquetType => 228, + Self::UnsupportedRangeHeader => 229, + Self::UnsupportedScanRangeInput => 230, + Self::UnsupportedSignature => 231, + Self::UnsupportedSqlOperation => 232, + Self::UnsupportedSqlStructure => 233, + Self::UnsupportedStorageClass => 234, + Self::UnsupportedSyntax => 235, + Self::UnsupportedTypeForQuerying => 236, + Self::UserKeyMustBeSpecified => 237, + Self::ValueParseFailure => 238, + Self::Custom(_) => usize::MAX, + } + } + + pub(crate) fn as_static_str(&self) -> Option<&'static str> { + Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied() + } + + #[must_use] + pub fn from_bytes(s: &[u8]) -> Option { + match s { + b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported), + b"AccessDenied" => Some(Self::AccessDenied), + b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou), + b"AccountProblem" => Some(Self::AccountProblem), + b"AllAccessDisabled" => Some(Self::AllAccessDisabled), + b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName), + b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress), + b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed), + b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError), + b"BadDigest" => Some(Self::BadDigest), + b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists), + b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou), + b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached), + b"BucketNotEmpty" => Some(Self::BucketNotEmpty), + b"Busy" => Some(Self::Busy), + b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter), + b"CSVParsingError" => Some(Self::CSVParsingError), + b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote), + b"CastFailed" => Some(Self::CastFailed), + b"ClientTokenConflict" => Some(Self::ClientTokenConflict), + b"ColumnTooLong" => Some(Self::ColumnTooLong), + b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict), + b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester), + b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported), + b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited), + b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError), + b"EmptyRequestBody" => Some(Self::EmptyRequestBody), + b"EndpointNotFound" => Some(Self::EndpointNotFound), + b"EntityTooLarge" => Some(Self::EntityTooLarge), + b"EntityTooSmall" => Some(Self::EntityTooSmall), + b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist), + b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments), + b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern), + b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol), + b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => { + Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing) + } + b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken), + b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence), + b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit), + b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields), + b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => { + Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch) + } + b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken), + b"ExpiredToken" => Some(Self::ExpiredToken), + b"ExpressionTooLong" => Some(Self::ExpressionTooLong), + b"ExternalEvalException" => Some(Self::ExternalEvalException), + b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException), + b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument), + b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException), + b"IncompleteBody" => Some(Self::IncompleteBody), + b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint), + b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest), + b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType), + b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge), + b"IntegerOverflow" => Some(Self::IntegerOverflow), + b"InternalError" => Some(Self::InternalError), + b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId), + b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint), + b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError), + b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader), + b"InvalidArgument" => Some(Self::InvalidArgument), + b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership), + b"InvalidBucketName" => Some(Self::InvalidBucketName), + b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID), + b"InvalidBucketState" => Some(Self::InvalidBucketState), + b"InvalidCast" => Some(Self::InvalidCast), + b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex), + b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat), + b"InvalidDataSource" => Some(Self::InvalidDataSource), + b"InvalidDataType" => Some(Self::InvalidDataType), + b"InvalidDigest" => Some(Self::InvalidDigest), + b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError), + b"InvalidExpressionType" => Some(Self::InvalidExpressionType), + b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo), + b"InvalidHostHeader" => Some(Self::InvalidHostHeader), + b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod), + b"InvalidJsonType" => Some(Self::InvalidJsonType), + b"InvalidKeyPath" => Some(Self::InvalidKeyPath), + b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint), + b"InvalidObjectState" => Some(Self::InvalidObjectState), + b"InvalidPart" => Some(Self::InvalidPart), + b"InvalidPartOrder" => Some(Self::InvalidPartOrder), + b"InvalidPayer" => Some(Self::InvalidPayer), + b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument), + b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields), + b"InvalidRange" => Some(Self::InvalidRange), + b"InvalidRegion" => Some(Self::InvalidRegion), + b"InvalidRequest" => Some(Self::InvalidRequest), + b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter), + b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest), + b"InvalidScanRange" => Some(Self::InvalidScanRange), + b"InvalidSecurity" => Some(Self::InvalidSecurity), + b"InvalidSessionException" => Some(Self::InvalidSessionException), + b"InvalidSignature" => Some(Self::InvalidSignature), + b"InvalidStorageClass" => Some(Self::InvalidStorageClass), + b"InvalidTableAlias" => Some(Self::InvalidTableAlias), + b"InvalidTag" => Some(Self::InvalidTag), + b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging), + b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding), + b"InvalidToken" => Some(Self::InvalidToken), + b"InvalidURI" => Some(Self::InvalidURI), + b"JSONParsingError" => Some(Self::JSONParsingError), + b"KeyTooLongError" => Some(Self::KeyTooLongError), + b"LexerInvalidChar" => Some(Self::LexerInvalidChar), + b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral), + b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral), + b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator), + b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs), + b"MalformedACLError" => Some(Self::MalformedACLError), + b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest), + b"MalformedPolicy" => Some(Self::MalformedPolicy), + b"MalformedXML" => Some(Self::MalformedXML), + b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded), + b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded), + b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError), + b"MetadataTooLarge" => Some(Self::MetadataTooLarge), + b"MethodNotAllowed" => Some(Self::MethodNotAllowed), + b"MissingAttachment" => Some(Self::MissingAttachment), + b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken), + b"MissingContentLength" => Some(Self::MissingContentLength), + b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError), + b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter), + b"MissingSecurityElement" => Some(Self::MissingSecurityElement), + b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader), + b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported), + b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey), + b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint), + b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest), + b"NoSuchBucket" => Some(Self::NoSuchBucket), + b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy), + b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration), + b"NoSuchKey" => Some(Self::NoSuchKey), + b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration), + b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint), + b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration), + b"NoSuchResource" => Some(Self::NoSuchResource), + b"NoSuchTagSet" => Some(Self::NoSuchTagSet), + b"NoSuchUpload" => Some(Self::NoSuchUpload), + b"NoSuchVersion" => Some(Self::NoSuchVersion), + b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration), + b"NoTransformationDefined" => Some(Self::NoTransformationDefined), + b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError), + b"NotImplemented" => Some(Self::NotImplemented), + b"NotModified" => Some(Self::NotModified), + b"NotSignedUp" => Some(Self::NotSignedUp), + b"NumberFormatError" => Some(Self::NumberFormatError), + b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError), + b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict), + b"OperationAborted" => Some(Self::OperationAborted), + b"OverMaxColumn" => Some(Self::OverMaxColumn), + b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize), + b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize), + b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError), + b"ParquetParsingError" => Some(Self::ParquetParsingError), + b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec), + b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList), + b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList), + b"ParseCastArity" => Some(Self::ParseCastArity), + b"ParseEmptySelect" => Some(Self::ParseEmptySelect), + b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes), + b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter), + b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart), + b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression), + b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias), + b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt), + b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName), + b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword), + b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast), + b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall), + b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor), + b"ParseExpectedMember" => Some(Self::ParseExpectedMember), + b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber), + b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall), + b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType), + b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName), + b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause), + b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList), + b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent), + b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam), + b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin), + b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt), + b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall), + b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom), + b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword), + b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator), + b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm), + b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken), + b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator), + b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias), + b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar), + b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase), + b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause), + b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy), + b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect), + b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax), + b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken), + b"PermanentRedirect" => Some(Self::PermanentRedirect), + b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError), + b"PreconditionFailed" => Some(Self::PreconditionFailed), + b"Redirect" => Some(Self::Redirect), + b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError), + b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge), + b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent), + b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed), + b"RequestTimeout" => Some(Self::RequestTimeout), + b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError), + b"ResponseInterrupted" => Some(Self::ResponseInterrupted), + b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress), + b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError), + b"ServiceUnavailable" => Some(Self::ServiceUnavailable), + b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch), + b"SlowDown" => Some(Self::SlowDown), + b"TagPolicyException" => Some(Self::TagPolicyException), + b"TemporaryRedirect" => Some(Self::TemporaryRedirect), + b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError), + b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired), + b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints), + b"TooManyBuckets" => Some(Self::TooManyBuckets), + b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError), + b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints), + b"TooManyTags" => Some(Self::TooManyTags), + b"TruncatedInput" => Some(Self::TruncatedInput), + b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess), + b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError), + b"UnexpectedContent" => Some(Self::UnexpectedContent), + b"UnexpectedIPError" => Some(Self::UnexpectedIPError), + b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException), + b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress), + b"UnsupportedArgument" => Some(Self::UnsupportedArgument), + b"UnsupportedFunction" => Some(Self::UnsupportedFunction), + b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType), + b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader), + b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput), + b"UnsupportedSignature" => Some(Self::UnsupportedSignature), + b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation), + b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure), + b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass), + b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax), + b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying), + b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified), + b"ValueParseFailure" => Some(Self::ValueParseFailure), + _ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())), + } + } + + #[allow(clippy::match_same_arms)] + #[must_use] + pub fn status_code(&self) -> Option { + match self { + Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST), + Self::AccessDenied => Some(StatusCode::FORBIDDEN), + Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT), + Self::AccountProblem => Some(StatusCode::FORBIDDEN), + Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN), + Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST), + Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), + Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST), + Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST), + Self::BadDigest => Some(StatusCode::BAD_REQUEST), + Self::BucketAlreadyExists => Some(StatusCode::CONFLICT), + Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT), + Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST), + Self::BucketNotEmpty => Some(StatusCode::CONFLICT), + Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE), + Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST), + Self::CSVParsingError => Some(StatusCode::BAD_REQUEST), + Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST), + Self::CastFailed => Some(StatusCode::BAD_REQUEST), + Self::ClientTokenConflict => Some(StatusCode::CONFLICT), + Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST), + Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT), + Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST), + Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST), + Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN), + Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST), + Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST), + Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST), + Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST), + Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST), + Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST), + Self::ExpiredToken => Some(StatusCode::BAD_REQUEST), + Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST), + Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST), + Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST), + Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST), + Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST), + Self::IncompleteBody => Some(StatusCode::BAD_REQUEST), + Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST), + Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST), + Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST), + Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST), + Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST), + Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR), + Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN), + Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST), + Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST), + Self::InvalidAddressingHeader => None, + Self::InvalidArgument => Some(StatusCode::BAD_REQUEST), + Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST), + Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST), + Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST), + Self::InvalidBucketState => Some(StatusCode::CONFLICT), + Self::InvalidCast => Some(StatusCode::BAD_REQUEST), + Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST), + Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST), + Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST), + Self::InvalidDataType => Some(StatusCode::BAD_REQUEST), + Self::InvalidDigest => Some(StatusCode::BAD_REQUEST), + Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST), + Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST), + Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST), + Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST), + Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST), + Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST), + Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST), + Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST), + Self::InvalidObjectState => Some(StatusCode::FORBIDDEN), + Self::InvalidPart => Some(StatusCode::BAD_REQUEST), + Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST), + Self::InvalidPayer => Some(StatusCode::FORBIDDEN), + Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST), + Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST), + Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE), + Self::InvalidRegion => Some(StatusCode::FORBIDDEN), + Self::InvalidRequest => Some(StatusCode::BAD_REQUEST), + Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST), + Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST), + Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST), + Self::InvalidSecurity => Some(StatusCode::FORBIDDEN), + Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST), + Self::InvalidSignature => Some(StatusCode::BAD_REQUEST), + Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST), + Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST), + Self::InvalidTag => Some(StatusCode::BAD_REQUEST), + Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST), + Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST), + Self::InvalidToken => Some(StatusCode::BAD_REQUEST), + Self::InvalidURI => Some(StatusCode::BAD_REQUEST), + Self::JSONParsingError => Some(StatusCode::BAD_REQUEST), + Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST), + Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST), + Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST), + Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST), + Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST), + Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST), + Self::MalformedACLError => Some(StatusCode::BAD_REQUEST), + Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST), + Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST), + Self::MalformedXML => Some(StatusCode::BAD_REQUEST), + Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST), + Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST), + Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST), + Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST), + Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED), + Self::MissingAttachment => None, + Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN), + Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED), + Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST), + Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST), + Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST), + Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST), + Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST), + Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST), + Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND), + Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND), + Self::NoSuchBucket => Some(StatusCode::NOT_FOUND), + Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND), + Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND), + Self::NoSuchKey => Some(StatusCode::NOT_FOUND), + Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND), + Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND), + Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND), + Self::NoSuchResource => Some(StatusCode::NOT_FOUND), + Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND), + Self::NoSuchUpload => Some(StatusCode::NOT_FOUND), + Self::NoSuchVersion => Some(StatusCode::NOT_FOUND), + Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND), + Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND), + Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST), + Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED), + Self::NotModified => Some(StatusCode::NOT_MODIFIED), + Self::NotSignedUp => Some(StatusCode::FORBIDDEN), + Self::NumberFormatError => Some(StatusCode::BAD_REQUEST), + Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), + Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST), + Self::OperationAborted => Some(StatusCode::CONFLICT), + Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST), + Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST), + Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST), + Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND), + Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST), + Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST), + Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST), + Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST), + Self::ParseCastArity => Some(StatusCode::BAD_REQUEST), + Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST), + Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST), + Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST), + Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST), + Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST), + Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST), + Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST), + Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST), + Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST), + Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST), + Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST), + Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST), + Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST), + Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST), + Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST), + Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST), + Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY), + Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY), + Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED), + Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT), + Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND), + Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST), + Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST), + Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN), + Self::RequestTimeout => Some(StatusCode::BAD_REQUEST), + Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST), + Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST), + Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT), + Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST), + Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE), + Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN), + Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE), + Self::TagPolicyException => Some(StatusCode::BAD_REQUEST), + Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT), + Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST), + Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST), + Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST), + Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST), + Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST), + Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST), + Self::TooManyTags => Some(StatusCode::BAD_REQUEST), + Self::TruncatedInput => Some(StatusCode::BAD_REQUEST), + Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED), + Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN), + Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST), + Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN), + Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST), + Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST), + Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST), + Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST), + Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST), + Self::Custom(_) => None, + } + } } diff --git a/crates/s3s/src/header/generated.rs b/crates/s3s/src/header/generated.rs index 7521e294..bb971eeb 100644 --- a/crates/s3s/src/header/generated.rs +++ b/crates/s3s/src/header/generated.rs @@ -82,7 +82,8 @@ pub const X_AMZ_CHECKSUM_SHA256: HeaderName = HeaderName::from_static("x-amz-che pub const X_AMZ_CHECKSUM_TYPE: HeaderName = HeaderName::from_static("x-amz-checksum-type"); -pub const X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS: HeaderName = HeaderName::from_static("x-amz-confirm-remove-self-bucket-access"); +pub const X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS: HeaderName = + HeaderName::from_static("x-amz-confirm-remove-self-bucket-access"); pub const X_AMZ_CONTENT_SHA256: HeaderName = HeaderName::from_static("x-amz-content-sha256"); @@ -98,11 +99,14 @@ pub const X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE: HeaderName = HeaderName::from_s pub const X_AMZ_COPY_SOURCE_RANGE: HeaderName = HeaderName::from_static("x-amz-copy-source-range"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-algorithm"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = + HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-algorithm"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = + HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key-md5"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = + HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key-md5"); pub const X_AMZ_COPY_SOURCE_VERSION_ID: HeaderName = HeaderName::from_static("x-amz-copy-source-version-id"); @@ -146,7 +150,8 @@ pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32: HeaderName = HeaderName::from_s pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc32c"); -pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc64nvme"); +pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc64nvme"); pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-sha1"); @@ -160,27 +165,36 @@ pub const X_AMZ_FWD_HEADER_X_AMZ_MISSING_META: HeaderName = HeaderName::from_sta pub const X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-mp-parts-count"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-legal-hold"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-legal-hold"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-mode"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-mode"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-retain-until-date"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-retain-until-date"); -pub const X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-replication-status"); +pub const X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-replication-status"); pub const X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-request-charged"); pub const X_AMZ_FWD_HEADER_X_AMZ_RESTORE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-restore"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"); pub const X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-storage-class"); @@ -256,17 +270,22 @@ pub const X_AMZ_SDK_CHECKSUM_ALGORITHM: HeaderName = HeaderName::from_static("x- pub const X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = HeaderName::from_static("x-amz-server-side-encryption"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-aws-kms-key-id"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-aws-kms-key-id"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-bucket-key-enabled"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-bucket-key-enabled"); pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-context"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-key"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-customer-key"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-key-md5"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-customer-key-md5"); pub const X_AMZ_SKIP_DESTINATION_VALIDATION: HeaderName = HeaderName::from_static("x-amz-skip-destination-validation"); @@ -280,11 +299,11 @@ pub const X_AMZ_TAGGING_COUNT: HeaderName = HeaderName::from_static("x-amz-taggi pub const X_AMZ_TAGGING_DIRECTIVE: HeaderName = HeaderName::from_static("x-amz-tagging-directive"); -pub const X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: HeaderName = HeaderName::from_static("x-amz-transition-default-minimum-object-size"); +pub const X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: HeaderName = + HeaderName::from_static("x-amz-transition-default-minimum-object-size"); pub const X_AMZ_VERSION_ID: HeaderName = HeaderName::from_static("x-amz-version-id"); pub const X_AMZ_WEBSITE_REDIRECT_LOCATION: HeaderName = HeaderName::from_static("x-amz-website-redirect-location"); pub const X_AMZ_WRITE_OFFSET_BYTES: HeaderName = HeaderName::from_static("x-amz-write-offset-bytes"); - diff --git a/crates/s3s/src/header/generated_minio.rs b/crates/s3s/src/header/generated_minio.rs index d932df97..d626f30d 100644 --- a/crates/s3s/src/header/generated_minio.rs +++ b/crates/s3s/src/header/generated_minio.rs @@ -82,7 +82,8 @@ pub const X_AMZ_CHECKSUM_SHA256: HeaderName = HeaderName::from_static("x-amz-che pub const X_AMZ_CHECKSUM_TYPE: HeaderName = HeaderName::from_static("x-amz-checksum-type"); -pub const X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS: HeaderName = HeaderName::from_static("x-amz-confirm-remove-self-bucket-access"); +pub const X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS: HeaderName = + HeaderName::from_static("x-amz-confirm-remove-self-bucket-access"); pub const X_AMZ_CONTENT_SHA256: HeaderName = HeaderName::from_static("x-amz-content-sha256"); @@ -98,11 +99,14 @@ pub const X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE: HeaderName = HeaderName::from_s pub const X_AMZ_COPY_SOURCE_RANGE: HeaderName = HeaderName::from_static("x-amz-copy-source-range"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-algorithm"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = + HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-algorithm"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = + HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key"); -pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key-md5"); +pub const X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = + HeaderName::from_static("x-amz-copy-source-server-side-encryption-customer-key-md5"); pub const X_AMZ_COPY_SOURCE_VERSION_ID: HeaderName = HeaderName::from_static("x-amz-copy-source-version-id"); @@ -146,7 +150,8 @@ pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32: HeaderName = HeaderName::from_s pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc32c"); -pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc64nvme"); +pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-crc64nvme"); pub const X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-checksum-sha1"); @@ -160,27 +165,36 @@ pub const X_AMZ_FWD_HEADER_X_AMZ_MISSING_META: HeaderName = HeaderName::from_sta pub const X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-mp-parts-count"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-legal-hold"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-legal-hold"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-mode"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-mode"); -pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-retain-until-date"); +pub const X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-object-lock-retain-until-date"); -pub const X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-replication-status"); +pub const X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-replication-status"); pub const X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-request-charged"); pub const X_AMZ_FWD_HEADER_X_AMZ_RESTORE: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-restore"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"); -pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"); +pub const X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = + HeaderName::from_static("x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"); pub const X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS: HeaderName = HeaderName::from_static("x-amz-fwd-header-x-amz-storage-class"); @@ -256,17 +270,22 @@ pub const X_AMZ_SDK_CHECKSUM_ALGORITHM: HeaderName = HeaderName::from_static("x- pub const X_AMZ_SERVER_SIDE_ENCRYPTION: HeaderName = HeaderName::from_static("x-amz-server-side-encryption"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-aws-kms-key-id"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-aws-kms-key-id"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-bucket-key-enabled"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-bucket-key-enabled"); pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-context"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-customer-algorithm"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-key"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-customer-key"); -pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = HeaderName::from_static("x-amz-server-side-encryption-customer-key-md5"); +pub const X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5: HeaderName = + HeaderName::from_static("x-amz-server-side-encryption-customer-key-md5"); pub const X_AMZ_SKIP_DESTINATION_VALIDATION: HeaderName = HeaderName::from_static("x-amz-skip-destination-validation"); @@ -280,7 +299,8 @@ pub const X_AMZ_TAGGING_COUNT: HeaderName = HeaderName::from_static("x-amz-taggi pub const X_AMZ_TAGGING_DIRECTIVE: HeaderName = HeaderName::from_static("x-amz-tagging-directive"); -pub const X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: HeaderName = HeaderName::from_static("x-amz-transition-default-minimum-object-size"); +pub const X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE: HeaderName = + HeaderName::from_static("x-amz-transition-default-minimum-object-size"); pub const X_AMZ_VERSION_ID: HeaderName = HeaderName::from_static("x-amz-version-id"); @@ -289,4 +309,3 @@ pub const X_AMZ_WEBSITE_REDIRECT_LOCATION: HeaderName = HeaderName::from_static( pub const X_AMZ_WRITE_OFFSET_BYTES: HeaderName = HeaderName::from_static("x-amz-write-offset-bytes"); pub const X_MINIO_FORCE_DELETE: HeaderName = HeaderName::from_static("x-minio-force-delete"); - diff --git a/crates/s3s/src/ops/generated.rs b/crates/s3s/src/ops/generated.rs index 92149787..9880c654 100644 --- a/crates/s3s/src/ops/generated.rs +++ b/crates/s3s/src/ops/generated.rs @@ -108,6786 +108,6575 @@ #![allow(clippy::unnecessary_wraps)] use crate::dto::*; +use crate::error::*; use crate::header::*; use crate::http; -use crate::error::*; -use crate::path::S3Path; use crate::ops::CallContext; +use crate::path::S3Path; use std::borrow::Cow; impl http::TryIntoHeaderValue for ArchiveStatus { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for BucketCannedACL { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ChecksumAlgorithm { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ChecksumMode { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ChecksumType { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for LocationType { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for MetadataDirective { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectAttributes { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectCannedACL { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectLockLegalHoldStatus { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectLockMode { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectOwnership { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for OptionalObjectAttributes { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ReplicationStatus { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for RequestCharged { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for RequestPayer { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ServerSideEncryption { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for SessionMode { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for StorageClass { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for TaggingDirective { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for TransitionDefaultMinimumObjectSize { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryFromHeaderValue for ArchiveStatus { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for BucketCannedACL { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ChecksumAlgorithm { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ChecksumMode { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ChecksumType { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for LocationType { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for MetadataDirective { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectAttributes { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectCannedACL { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectLockLegalHoldStatus { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectLockMode { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectOwnership { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for OptionalObjectAttributes { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ReplicationStatus { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for RequestCharged { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for RequestPayer { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ServerSideEncryption { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for SessionMode { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for StorageClass { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for TaggingDirective { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for TransitionDefaultMinimumObjectSize { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } pub struct AbortMultipartUpload; impl AbortMultipartUpload { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let if_match_initiated_time: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_INITIATED_TIME, TimestampFormat::HttpDate)?; -let if_match_initiated_time: Option = http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_INITIATED_TIME, TimestampFormat::HttpDate)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - -Ok(AbortMultipartUploadInput { -bucket, -expected_bucket_owner, -if_match_initiated_time, -key, -request_payer, -upload_id, -}) -} - - -pub fn serialize_http(x: AbortMultipartUploadOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(AbortMultipartUploadInput { + bucket, + expected_bucket_owner, + if_match_initiated_time, + key, + request_payer, + upload_id, + }) + } + pub fn serialize_http(x: AbortMultipartUploadOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for AbortMultipartUpload { -fn name(&self) -> &'static str { -"AbortMultipartUpload" -} + fn name(&self) -> &'static str { + "AbortMultipartUpload" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.abort_multipart_upload(&mut s3_req).await?; -} -let result = s3.abort_multipart_upload(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.abort_multipart_upload(&mut s3_req).await?; + } + let result = s3.abort_multipart_upload(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CompleteMultipartUpload; impl CompleteMultipartUpload { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; + let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; -let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; + let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; -let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; + let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; -let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; + let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; -let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; + let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; -let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; + let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; -let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + let mpu_object_size: Option = http::parse_opt_header(req, &X_AMZ_MP_OBJECT_SIZE)?; -let mpu_object_size: Option = http::parse_opt_header(req, &X_AMZ_MP_OBJECT_SIZE)?; + let multipart_upload: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); + } + Err(e) => return Err(e), + }; -let multipart_upload: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + + Ok(CompleteMultipartUploadInput { + bucket, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + checksum_type, + expected_bucket_owner, + if_match, + if_none_match, + key, + mpu_object_size, + multipart_upload, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) } - Err(e) => return Err(e), -}; - -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - -Ok(CompleteMultipartUploadInput { -bucket, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -checksum_type, -expected_bucket_owner, -if_match, -if_none_match, -key, -mpu_object_size, -multipart_upload, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - - } #[async_trait::async_trait] impl super::Operation for CompleteMultipartUpload { -fn name(&self) -> &'static str { -"CompleteMultipartUpload" -} + fn name(&self) -> &'static str { + "CompleteMultipartUpload" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.complete_multipart_upload(&mut s3_req).await?; -} -let result = s3.complete_multipart_upload(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.complete_multipart_upload(&mut s3_req).await?; + } + let result = s3.complete_multipart_upload(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CopyObject; impl CopyObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; -let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; + let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; -let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; + let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; -let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; + let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; -let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; + let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; -let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; + let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; -let copy_source_if_modified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; -let copy_source_if_none_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; + let copy_source_if_modified_since: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; -let copy_source_if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; + let copy_source_if_none_match: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; -let copy_source_sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let copy_source_if_unmodified_since: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; -let copy_source_sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let copy_source_sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let copy_source_sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let copy_source_sse_customer_key: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let copy_source_sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; + let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -let metadata: Option = http::parse_opt_metadata(req)?; + let metadata: Option = http::parse_opt_metadata(req)?; -let metadata_directive: Option = http::parse_opt_header(req, &X_AMZ_METADATA_DIRECTIVE)?; + let metadata_directive: Option = http::parse_opt_header(req, &X_AMZ_METADATA_DIRECTIVE)?; -let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; + let object_lock_legal_hold_status: Option = + http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; -let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; + let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; -let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let object_lock_retain_until_date: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; + let ssekms_encryption_context: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; -let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; + let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; -let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; + let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; -let tagging_directive: Option = http::parse_opt_header(req, &X_AMZ_TAGGING_DIRECTIVE)?; + let tagging_directive: Option = http::parse_opt_header(req, &X_AMZ_TAGGING_DIRECTIVE)?; -let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; + let website_redirect_location: Option = + http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; -Ok(CopyObjectInput { -acl, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -content_disposition, -content_encoding, -content_language, -content_type, -copy_source, -copy_source_if_match, -copy_source_if_modified_since, -copy_source_if_none_match, -copy_source_if_unmodified_since, -copy_source_sse_customer_algorithm, -copy_source_sse_customer_key, -copy_source_sse_customer_key_md5, -expected_bucket_owner, -expected_source_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -key, -metadata, -metadata_directive, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -tagging_directive, -website_redirect_location, -}) -} - - -pub fn serialize_http(x: CopyObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.copy_object_result { - http::set_xml_body(&mut res, val)?; -} -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; -http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(CopyObjectInput { + acl, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + content_disposition, + content_encoding, + content_language, + content_type, + copy_source, + copy_source_if_match, + copy_source_if_modified_since, + copy_source_if_none_match, + copy_source_if_unmodified_since, + copy_source_sse_customer_algorithm, + copy_source_sse_customer_key, + copy_source_sse_customer_key_md5, + expected_bucket_owner, + expected_source_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + key, + metadata, + metadata_directive, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + tagging_directive, + website_redirect_location, + }) + } + pub fn serialize_http(x: CopyObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.copy_object_result { + http::set_xml_body(&mut res, val)?; + } + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; + http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for CopyObject { -fn name(&self) -> &'static str { -"CopyObject" -} + fn name(&self) -> &'static str { + "CopyObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.copy_object(&mut s3_req).await?; -} -let result = s3.copy_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.copy_object(&mut s3_req).await?; + } + let result = s3.copy_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CreateBucket; impl CreateBucket { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - - -let create_bucket_configuration: Option = http::take_opt_xml_body(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let create_bucket_configuration: Option = http::take_opt_xml_body(req)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -let object_lock_enabled_for_bucket: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_ENABLED)?; + let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; -let object_ownership: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_OWNERSHIP)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -Ok(CreateBucketInput { -acl, -bucket, -create_bucket_configuration, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -object_lock_enabled_for_bucket, -object_ownership, -}) -} + let object_lock_enabled_for_bucket: Option = + http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_ENABLED)?; + let object_ownership: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_OWNERSHIP)?; -pub fn serialize_http(x: CreateBucketOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, LOCATION, x.location)?; -Ok(res) -} + Ok(CreateBucketInput { + acl, + bucket, + create_bucket_configuration, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + object_lock_enabled_for_bucket, + object_ownership, + }) + } + pub fn serialize_http(x: CreateBucketOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, LOCATION, x.location)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for CreateBucket { -fn name(&self) -> &'static str { -"CreateBucket" -} + fn name(&self) -> &'static str { + "CreateBucket" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.create_bucket(&mut s3_req).await?; -} -let result = s3.create_bucket(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.create_bucket(&mut s3_req).await?; + } + let result = s3.create_bucket(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CreateBucketMetadataTableConfiguration; impl CreateBucketMetadataTableConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let metadata_table_configuration: MetadataTableConfiguration = http::take_xml_body(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -Ok(CreateBucketMetadataTableConfigurationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -metadata_table_configuration, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let metadata_table_configuration: MetadataTableConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: CreateBucketMetadataTableConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(CreateBucketMetadataTableConfigurationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + metadata_table_configuration, + }) + } + pub fn serialize_http(_: CreateBucketMetadataTableConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for CreateBucketMetadataTableConfiguration { -fn name(&self) -> &'static str { -"CreateBucketMetadataTableConfiguration" -} + fn name(&self) -> &'static str { + "CreateBucketMetadataTableConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.create_bucket_metadata_table_configuration(&mut s3_req).await?; -} -let result = s3.create_bucket_metadata_table_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.create_bucket_metadata_table_configuration(&mut s3_req).await?; + } + let result = s3.create_bucket_metadata_table_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CreateMultipartUpload; impl CreateMultipartUpload { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - - -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; + let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; -let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; + let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; -let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; + let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; -let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; + let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; -let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; + let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -let metadata: Option = http::parse_opt_metadata(req)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; + let metadata: Option = http::parse_opt_metadata(req)?; -let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; + let object_lock_legal_hold_status: Option = + http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; -let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let object_lock_retain_until_date: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + let ssekms_encryption_context: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; -let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; + let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; -let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; + let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; -let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; - -Ok(CreateMultipartUploadInput { -acl, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_type, -content_disposition, -content_encoding, -content_language, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -website_redirect_location, -}) -} + let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; + let website_redirect_location: Option = + http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; -pub fn serialize_http(x: CreateMultipartUploadOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; -http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_ALGORITHM, x.checksum_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -Ok(res) -} + Ok(CreateMultipartUploadInput { + acl, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_type, + content_disposition, + content_encoding, + content_language, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + website_redirect_location, + }) + } + pub fn serialize_http(x: CreateMultipartUploadOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; + http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_ALGORITHM, x.checksum_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for CreateMultipartUpload { -fn name(&self) -> &'static str { -"CreateMultipartUpload" -} + fn name(&self) -> &'static str { + "CreateMultipartUpload" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.create_multipart_upload(&mut s3_req).await?; -} -let result = s3.create_multipart_upload(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.create_multipart_upload(&mut s3_req).await?; + } + let result = s3.create_multipart_upload(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CreateSession; impl CreateSession { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + let ssekms_encryption_context: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; -let session_mode: Option = http::parse_opt_header(req, &X_AMZ_CREATE_SESSION_MODE)?; - -Ok(CreateSessionInput { -bucket, -bucket_key_enabled, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -session_mode, -}) -} + let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let session_mode: Option = http::parse_opt_header(req, &X_AMZ_CREATE_SESSION_MODE)?; -pub fn serialize_http(x: CreateSessionOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -Ok(res) -} + Ok(CreateSessionInput { + bucket, + bucket_key_enabled, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + session_mode, + }) + } + pub fn serialize_http(x: CreateSessionOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for CreateSession { -fn name(&self) -> &'static str { -"CreateSession" -} - -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.create_session(&mut s3_req).await?; -} -let result = s3.create_session(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} + fn name(&self) -> &'static str { + "CreateSession" + } + + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.create_session(&mut s3_req).await?; + } + let result = s3.create_session(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } +} pub struct DeleteBucket; impl DeleteBucket { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucket { -fn name(&self) -> &'static str { -"DeleteBucket" -} + fn name(&self) -> &'static str { + "DeleteBucket" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket(&mut s3_req).await?; -} -let result = s3.delete_bucket(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket(&mut s3_req).await?; + } + let result = s3.delete_bucket(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketAnalyticsConfiguration; impl DeleteBucketAnalyticsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: AnalyticsId = http::parse_query(req, "id")?; - -Ok(DeleteBucketAnalyticsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: AnalyticsId = http::parse_query(req, "id")?; -pub fn serialize_http(_: DeleteBucketAnalyticsConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketAnalyticsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(_: DeleteBucketAnalyticsConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketAnalyticsConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketAnalyticsConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketAnalyticsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_analytics_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_analytics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_analytics_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_analytics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketCors; impl DeleteBucketCors { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketCorsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketCorsOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketCorsInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketCorsOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketCors { -fn name(&self) -> &'static str { -"DeleteBucketCors" -} + fn name(&self) -> &'static str { + "DeleteBucketCors" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_cors(&mut s3_req).await?; -} -let result = s3.delete_bucket_cors(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_cors(&mut s3_req).await?; + } + let result = s3.delete_bucket_cors(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketEncryption; impl DeleteBucketEncryption { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketEncryptionInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketEncryptionOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketEncryptionInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketEncryptionOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketEncryption { -fn name(&self) -> &'static str { -"DeleteBucketEncryption" -} + fn name(&self) -> &'static str { + "DeleteBucketEncryption" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_encryption(&mut s3_req).await?; -} -let result = s3.delete_bucket_encryption(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_encryption(&mut s3_req).await?; + } + let result = s3.delete_bucket_encryption(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketIntelligentTieringConfiguration; impl DeleteBucketIntelligentTieringConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let id: IntelligentTieringId = http::parse_query(req, "id")?; - -Ok(DeleteBucketIntelligentTieringConfigurationInput { -bucket, -id, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let id: IntelligentTieringId = http::parse_query(req, "id")?; -pub fn serialize_http(_: DeleteBucketIntelligentTieringConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketIntelligentTieringConfigurationInput { bucket, id }) + } + pub fn serialize_http(_: DeleteBucketIntelligentTieringConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketIntelligentTieringConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketIntelligentTieringConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketIntelligentTieringConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_intelligent_tiering_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_intelligent_tiering_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_intelligent_tiering_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_intelligent_tiering_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketInventoryConfiguration; impl DeleteBucketInventoryConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: InventoryId = http::parse_query(req, "id")?; - -Ok(DeleteBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: InventoryId = http::parse_query(req, "id")?; -pub fn serialize_http(_: DeleteBucketInventoryConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(_: DeleteBucketInventoryConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketInventoryConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketInventoryConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketInventoryConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_inventory_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_inventory_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_inventory_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_inventory_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketLifecycle; impl DeleteBucketLifecycle { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketLifecycleInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketLifecycleOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketLifecycleInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketLifecycleOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketLifecycle { -fn name(&self) -> &'static str { -"DeleteBucketLifecycle" -} + fn name(&self) -> &'static str { + "DeleteBucketLifecycle" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_lifecycle(&mut s3_req).await?; -} -let result = s3.delete_bucket_lifecycle(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_lifecycle(&mut s3_req).await?; + } + let result = s3.delete_bucket_lifecycle(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketMetadataTableConfiguration; impl DeleteBucketMetadataTableConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketMetadataTableConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketMetadataTableConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketMetadataTableConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketMetadataTableConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketMetadataTableConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketMetadataTableConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketMetadataTableConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_metadata_table_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_metadata_table_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_metadata_table_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_metadata_table_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketMetricsConfiguration; impl DeleteBucketMetricsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: MetricsId = http::parse_query(req, "id")?; - -Ok(DeleteBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: MetricsId = http::parse_query(req, "id")?; -pub fn serialize_http(_: DeleteBucketMetricsConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(_: DeleteBucketMetricsConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketMetricsConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketMetricsConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketMetricsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_metrics_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_metrics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_metrics_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_metrics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketOwnershipControls; impl DeleteBucketOwnershipControls { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketOwnershipControlsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketOwnershipControlsOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketOwnershipControlsInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketOwnershipControlsOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketOwnershipControls { -fn name(&self) -> &'static str { -"DeleteBucketOwnershipControls" -} + fn name(&self) -> &'static str { + "DeleteBucketOwnershipControls" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_ownership_controls(&mut s3_req).await?; -} -let result = s3.delete_bucket_ownership_controls(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_ownership_controls(&mut s3_req).await?; + } + let result = s3.delete_bucket_ownership_controls(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketPolicy; impl DeleteBucketPolicy { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketPolicyInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(_: DeleteBucketPolicyOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketPolicyInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketPolicyOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketPolicy { -fn name(&self) -> &'static str { -"DeleteBucketPolicy" -} + fn name(&self) -> &'static str { + "DeleteBucketPolicy" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_policy(&mut s3_req).await?; -} -let result = s3.delete_bucket_policy(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_policy(&mut s3_req).await?; + } + let result = s3.delete_bucket_policy(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketReplication; impl DeleteBucketReplication { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketReplicationInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketReplicationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketReplicationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketReplicationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketReplication { -fn name(&self) -> &'static str { -"DeleteBucketReplication" -} + fn name(&self) -> &'static str { + "DeleteBucketReplication" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_replication(&mut s3_req).await?; -} -let result = s3.delete_bucket_replication(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_replication(&mut s3_req).await?; + } + let result = s3.delete_bucket_replication(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketTagging; impl DeleteBucketTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketTaggingInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketTaggingOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketTaggingInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketTaggingOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketTagging { -fn name(&self) -> &'static str { -"DeleteBucketTagging" -} + fn name(&self) -> &'static str { + "DeleteBucketTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_tagging(&mut s3_req).await?; -} -let result = s3.delete_bucket_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_tagging(&mut s3_req).await?; + } + let result = s3.delete_bucket_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketWebsite; impl DeleteBucketWebsite { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketWebsiteInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketWebsiteOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketWebsiteInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketWebsiteOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketWebsite { -fn name(&self) -> &'static str { -"DeleteBucketWebsite" -} + fn name(&self) -> &'static str { + "DeleteBucketWebsite" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_website(&mut s3_req).await?; -} -let result = s3.delete_bucket_website(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_website(&mut s3_req).await?; + } + let result = s3.delete_bucket_website(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteObject; impl DeleteObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let bypass_governance_retention: Option = + http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let if_match_last_modified_time: Option = http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_LAST_MODIFIED_TIME, TimestampFormat::HttpDate)?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; -let if_match_size: Option = http::parse_opt_header(req, &X_AMZ_IF_MATCH_SIZE)?; + let if_match_last_modified_time: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_LAST_MODIFIED_TIME, TimestampFormat::HttpDate)?; + let if_match_size: Option = http::parse_opt_header(req, &X_AMZ_IF_MATCH_SIZE)?; -let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; + let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -Ok(DeleteObjectInput { -bucket, -bypass_governance_retention, -expected_bucket_owner, -if_match, -if_match_last_modified_time, -if_match_size, -key, -mfa, -request_payer, -version_id, -}) -} - - -pub fn serialize_http(x: DeleteObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); -http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(DeleteObjectInput { + bucket, + bypass_governance_retention, + expected_bucket_owner, + if_match, + if_match_last_modified_time, + if_match_size, + key, + mfa, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: DeleteObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); + http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for DeleteObject { -fn name(&self) -> &'static str { -"DeleteObject" -} + fn name(&self) -> &'static str { + "DeleteObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_object(&mut s3_req).await?; -} -let result = s3.delete_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_object(&mut s3_req).await?; + } + let result = s3.delete_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteObjectTagging; impl DeleteObjectTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(DeleteObjectTaggingInput { -bucket, -expected_bucket_owner, -key, -version_id, -}) -} - - -pub fn serialize_http(x: DeleteObjectTaggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(DeleteObjectTaggingInput { + bucket, + expected_bucket_owner, + key, + version_id, + }) + } + pub fn serialize_http(x: DeleteObjectTaggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for DeleteObjectTagging { -fn name(&self) -> &'static str { -"DeleteObjectTagging" -} + fn name(&self) -> &'static str { + "DeleteObjectTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_object_tagging(&mut s3_req).await?; -} -let result = s3.delete_object_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_object_tagging(&mut s3_req).await?; + } + let result = s3.delete_object_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteObjects; impl DeleteObjects { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let bypass_governance_retention: Option = + http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; -let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let delete: Delete = http::take_xml_body(req)?; -let delete: Delete = http::take_xml_body(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; -let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -Ok(DeleteObjectsInput { -bucket, -bypass_governance_retention, -checksum_algorithm, -delete, -expected_bucket_owner, -mfa, -request_payer, -}) -} - - -pub fn serialize_http(x: DeleteObjectsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(DeleteObjectsInput { + bucket, + bypass_governance_retention, + checksum_algorithm, + delete, + expected_bucket_owner, + mfa, + request_payer, + }) + } + pub fn serialize_http(x: DeleteObjectsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for DeleteObjects { -fn name(&self) -> &'static str { -"DeleteObjects" -} + fn name(&self) -> &'static str { + "DeleteObjects" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_objects(&mut s3_req).await?; -} -let result = s3.delete_objects(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_objects(&mut s3_req).await?; + } + let result = s3.delete_objects(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeletePublicAccessBlock; impl DeletePublicAccessBlock { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeletePublicAccessBlockInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(_: DeletePublicAccessBlockOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeletePublicAccessBlockInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeletePublicAccessBlockOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeletePublicAccessBlock { -fn name(&self) -> &'static str { -"DeletePublicAccessBlock" -} + fn name(&self) -> &'static str { + "DeletePublicAccessBlock" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_public_access_block(&mut s3_req).await?; -} -let result = s3.delete_public_access_block(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_public_access_block(&mut s3_req).await?; + } + let result = s3.delete_public_access_block(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketAccelerateConfiguration; impl GetBucketAccelerateConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -Ok(GetBucketAccelerateConfigurationInput { -bucket, -expected_bucket_owner, -request_payer, -}) -} - - -pub fn serialize_http(x: GetBucketAccelerateConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(GetBucketAccelerateConfigurationInput { + bucket, + expected_bucket_owner, + request_payer, + }) + } + pub fn serialize_http(x: GetBucketAccelerateConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketAccelerateConfiguration { -fn name(&self) -> &'static str { -"GetBucketAccelerateConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketAccelerateConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_accelerate_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_accelerate_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_accelerate_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_accelerate_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketAcl; impl GetBucketAcl { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketAclInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketAclOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketAclInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketAclOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketAcl { -fn name(&self) -> &'static str { -"GetBucketAcl" -} + fn name(&self) -> &'static str { + "GetBucketAcl" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_acl(&mut s3_req).await?; -} -let result = s3.get_bucket_acl(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_acl(&mut s3_req).await?; + } + let result = s3.get_bucket_acl(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketAnalyticsConfiguration; impl GetBucketAnalyticsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: AnalyticsId = http::parse_query(req, "id")?; -let id: AnalyticsId = http::parse_query(req, "id")?; - -Ok(GetBucketAnalyticsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - - -pub fn serialize_http(x: GetBucketAnalyticsConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.analytics_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketAnalyticsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(x: GetBucketAnalyticsConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.analytics_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketAnalyticsConfiguration { -fn name(&self) -> &'static str { -"GetBucketAnalyticsConfiguration" -} - -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_analytics_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_analytics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} + fn name(&self) -> &'static str { + "GetBucketAnalyticsConfiguration" + } + + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_analytics_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_analytics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } +} pub struct GetBucketCors; impl GetBucketCors { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketCorsInput { -bucket, -expected_bucket_owner, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + Ok(GetBucketCorsInput { + bucket, + expected_bucket_owner, + }) + } -pub fn serialize_http(x: GetBucketCorsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} - + pub fn serialize_http(x: GetBucketCorsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketCors { -fn name(&self) -> &'static str { -"GetBucketCors" -} + fn name(&self) -> &'static str { + "GetBucketCors" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_cors(&mut s3_req).await?; -} -let result = s3.get_bucket_cors(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_cors(&mut s3_req).await?; + } + let result = s3.get_bucket_cors(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketEncryption; impl GetBucketEncryption { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketEncryptionInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketEncryptionOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.server_side_encryption_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketEncryptionInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketEncryptionOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.server_side_encryption_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketEncryption { -fn name(&self) -> &'static str { -"GetBucketEncryption" -} + fn name(&self) -> &'static str { + "GetBucketEncryption" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_encryption(&mut s3_req).await?; -} -let result = s3.get_bucket_encryption(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_encryption(&mut s3_req).await?; + } + let result = s3.get_bucket_encryption(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketIntelligentTieringConfiguration; impl GetBucketIntelligentTieringConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let id: IntelligentTieringId = http::parse_query(req, "id")?; -let id: IntelligentTieringId = http::parse_query(req, "id")?; - -Ok(GetBucketIntelligentTieringConfigurationInput { -bucket, -id, -}) -} - - -pub fn serialize_http(x: GetBucketIntelligentTieringConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.intelligent_tiering_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketIntelligentTieringConfigurationInput { bucket, id }) + } + pub fn serialize_http(x: GetBucketIntelligentTieringConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.intelligent_tiering_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketIntelligentTieringConfiguration { -fn name(&self) -> &'static str { -"GetBucketIntelligentTieringConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketIntelligentTieringConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_intelligent_tiering_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_intelligent_tiering_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_intelligent_tiering_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_intelligent_tiering_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketInventoryConfiguration; impl GetBucketInventoryConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: InventoryId = http::parse_query(req, "id")?; -let id: InventoryId = http::parse_query(req, "id")?; - -Ok(GetBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - - -pub fn serialize_http(x: GetBucketInventoryConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.inventory_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(x: GetBucketInventoryConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.inventory_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketInventoryConfiguration { -fn name(&self) -> &'static str { -"GetBucketInventoryConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketInventoryConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_inventory_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_inventory_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_inventory_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_inventory_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketLifecycleConfiguration; impl GetBucketLifecycleConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketLifecycleConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + Ok(GetBucketLifecycleConfigurationInput { + bucket, + expected_bucket_owner, + }) + } -pub fn serialize_http(x: GetBucketLifecycleConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, x.transition_default_minimum_object_size)?; -Ok(res) -} - + pub fn serialize_http(x: GetBucketLifecycleConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header( + &mut res, + X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, + x.transition_default_minimum_object_size, + )?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketLifecycleConfiguration { -fn name(&self) -> &'static str { -"GetBucketLifecycleConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketLifecycleConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_lifecycle_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_lifecycle_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_lifecycle_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_lifecycle_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketLocation; impl GetBucketLocation { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketLocationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketLocationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketLocationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketLocationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketLocation { -fn name(&self) -> &'static str { -"GetBucketLocation" -} + fn name(&self) -> &'static str { + "GetBucketLocation" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_location(&mut s3_req).await?; -} -let result = s3.get_bucket_location(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_location(&mut s3_req).await?; + } + let result = s3.get_bucket_location(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketLogging; impl GetBucketLogging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketLoggingInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketLoggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketLoggingInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketLoggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketLogging { -fn name(&self) -> &'static str { -"GetBucketLogging" -} + fn name(&self) -> &'static str { + "GetBucketLogging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_logging(&mut s3_req).await?; -} -let result = s3.get_bucket_logging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_logging(&mut s3_req).await?; + } + let result = s3.get_bucket_logging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketMetadataTableConfiguration; impl GetBucketMetadataTableConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketMetadataTableConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketMetadataTableConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.get_bucket_metadata_table_configuration_result { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketMetadataTableConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketMetadataTableConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.get_bucket_metadata_table_configuration_result { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketMetadataTableConfiguration { -fn name(&self) -> &'static str { -"GetBucketMetadataTableConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketMetadataTableConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_metadata_table_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_metadata_table_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_metadata_table_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_metadata_table_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketMetricsConfiguration; impl GetBucketMetricsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: MetricsId = http::parse_query(req, "id")?; - -Ok(GetBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: MetricsId = http::parse_query(req, "id")?; -pub fn serialize_http(x: GetBucketMetricsConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.metrics_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(x: GetBucketMetricsConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.metrics_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketMetricsConfiguration { -fn name(&self) -> &'static str { -"GetBucketMetricsConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketMetricsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_metrics_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_metrics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_metrics_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_metrics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketNotificationConfiguration; impl GetBucketNotificationConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketNotificationConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketNotificationConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketNotificationConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketNotificationConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketNotificationConfiguration { -fn name(&self) -> &'static str { -"GetBucketNotificationConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketNotificationConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_notification_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_notification_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_notification_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_notification_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketOwnershipControls; impl GetBucketOwnershipControls { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketOwnershipControlsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetBucketOwnershipControlsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.ownership_controls { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketOwnershipControlsInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketOwnershipControlsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.ownership_controls { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketOwnershipControls { -fn name(&self) -> &'static str { -"GetBucketOwnershipControls" -} + fn name(&self) -> &'static str { + "GetBucketOwnershipControls" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_ownership_controls(&mut s3_req).await?; -} -let result = s3.get_bucket_ownership_controls(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_ownership_controls(&mut s3_req).await?; + } + let result = s3.get_bucket_ownership_controls(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketPolicy; impl GetBucketPolicy { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketPolicyInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketPolicyOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(val) = x.policy { -res.body = http::Body::from(val); -} -Ok(res) -} + Ok(GetBucketPolicyInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketPolicyOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(val) = x.policy { + res.body = http::Body::from(val); + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketPolicy { -fn name(&self) -> &'static str { -"GetBucketPolicy" -} + fn name(&self) -> &'static str { + "GetBucketPolicy" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_policy(&mut s3_req).await?; -} -let result = s3.get_bucket_policy(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_policy(&mut s3_req).await?; + } + let result = s3.get_bucket_policy(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketPolicyStatus; impl GetBucketPolicyStatus { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketPolicyStatusInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetBucketPolicyStatusOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.policy_status { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketPolicyStatusInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketPolicyStatusOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.policy_status { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketPolicyStatus { -fn name(&self) -> &'static str { -"GetBucketPolicyStatus" -} + fn name(&self) -> &'static str { + "GetBucketPolicyStatus" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_policy_status(&mut s3_req).await?; -} -let result = s3.get_bucket_policy_status(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_policy_status(&mut s3_req).await?; + } + let result = s3.get_bucket_policy_status(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketReplication; impl GetBucketReplication { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketReplicationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketReplicationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.replication_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketReplicationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketReplicationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.replication_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketReplication { -fn name(&self) -> &'static str { -"GetBucketReplication" -} + fn name(&self) -> &'static str { + "GetBucketReplication" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_replication(&mut s3_req).await?; -} -let result = s3.get_bucket_replication(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_replication(&mut s3_req).await?; + } + let result = s3.get_bucket_replication(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketRequestPayment; impl GetBucketRequestPayment { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketRequestPaymentInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketRequestPaymentOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketRequestPaymentInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketRequestPaymentOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketRequestPayment { -fn name(&self) -> &'static str { -"GetBucketRequestPayment" -} + fn name(&self) -> &'static str { + "GetBucketRequestPayment" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_request_payment(&mut s3_req).await?; -} -let result = s3.get_bucket_request_payment(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_request_payment(&mut s3_req).await?; + } + let result = s3.get_bucket_request_payment(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketTagging; impl GetBucketTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketTaggingInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketTaggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketTaggingInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketTaggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketTagging { -fn name(&self) -> &'static str { -"GetBucketTagging" -} + fn name(&self) -> &'static str { + "GetBucketTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_tagging(&mut s3_req).await?; -} -let result = s3.get_bucket_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_tagging(&mut s3_req).await?; + } + let result = s3.get_bucket_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketVersioning; impl GetBucketVersioning { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketVersioningInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetBucketVersioningOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketVersioningInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketVersioningOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketVersioning { -fn name(&self) -> &'static str { -"GetBucketVersioning" -} + fn name(&self) -> &'static str { + "GetBucketVersioning" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_versioning(&mut s3_req).await?; -} -let result = s3.get_bucket_versioning(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_versioning(&mut s3_req).await?; + } + let result = s3.get_bucket_versioning(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketWebsite; impl GetBucketWebsite { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketWebsiteInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetBucketWebsiteOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketWebsiteInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketWebsiteOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketWebsite { -fn name(&self) -> &'static str { -"GetBucketWebsite" -} + fn name(&self) -> &'static str { + "GetBucketWebsite" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_website(&mut s3_req).await?; -} -let result = s3.get_bucket_website(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_website(&mut s3_req).await?; + } + let result = s3.get_bucket_website(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObject; impl GetObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; -let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - -let if_modified_since: Option = http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - -let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - -let if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; + let if_modified_since: Option = + http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; -let part_number: Option = http::parse_opt_query(req, "partNumber")?; + let if_unmodified_since: Option = + http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; -let range: Option = http::parse_opt_header(req, &RANGE)?; + let part_number: Option = http::parse_opt_query(req, "partNumber")?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let range: Option = http::parse_opt_header(req, &RANGE)?; -let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let response_content_disposition: Option = http::parse_opt_query(req, "response-content-disposition")?; + let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; -let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; + let response_content_disposition: Option = + http::parse_opt_query(req, "response-content-disposition")?; -let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; + let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; -let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; + let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; -let response_expires: Option = http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; + let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let response_expires: Option = + http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(GetObjectInput { -bucket, -checksum_mode, -expected_bucket_owner, -if_match, -if_modified_since, -if_none_match, -if_unmodified_since, -key, -part_number, -range, -request_payer, -response_cache_control, -response_content_disposition, -response_content_encoding, -response_content_language, -response_content_type, -response_expires, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectOutput) -> S3Result { -let mut res = http::Response::default(); -if x.content_range.is_some() { - res.status = http::StatusCode::PARTIAL_CONTENT; -} -if let Some(val) = x.body { -http::set_stream_body(&mut res, val); -} -http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; -http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; -http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; -http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; -http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; -http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; -http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; -http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; -http::add_opt_header(&mut res, ETAG, x.e_tag)?; -http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; -http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; -http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; -http::add_opt_metadata(&mut res, x.metadata)?; -http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; -http::add_opt_header_timestamp(&mut res, X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, x.object_lock_retain_until_date, TimestampFormat::DateTime)?; -http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; -http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; -http::add_opt_header(&mut res, X_AMZ_TAGGING_COUNT, x.tag_count)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; -Ok(res) -} + Ok(GetObjectInput { + bucket, + checksum_mode, + expected_bucket_owner, + if_match, + if_modified_since, + if_none_match, + if_unmodified_since, + key, + part_number, + range, + request_payer, + response_cache_control, + response_content_disposition, + response_content_encoding, + response_content_language, + response_content_type, + response_expires, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + pub fn serialize_http(x: GetObjectOutput) -> S3Result { + let mut res = http::Response::default(); + if x.content_range.is_some() { + res.status = http::StatusCode::PARTIAL_CONTENT; + } + if let Some(val) = x.body { + http::set_stream_body(&mut res, val); + } + http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; + http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; + http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; + http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; + http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; + http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; + http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; + http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; + http::add_opt_header(&mut res, ETAG, x.e_tag)?; + http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; + http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; + http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; + http::add_opt_metadata(&mut res, x.metadata)?; + http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; + http::add_opt_header_timestamp( + &mut res, + X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, + x.object_lock_retain_until_date, + TimestampFormat::DateTime, + )?; + http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; + http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; + http::add_opt_header(&mut res, X_AMZ_TAGGING_COUNT, x.tag_count)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObject { -fn name(&self) -> &'static str { -"GetObject" -} + fn name(&self) -> &'static str { + "GetObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object(&mut s3_req).await?; -} -let overridden_headers = super::get_object::extract_overridden_response_headers(&s3_req)?; -let result = s3.get_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(overridden_headers); -super::get_object::merge_custom_headers(&mut resp, s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object(&mut s3_req).await?; + } + let overridden_headers = super::get_object::extract_overridden_response_headers(&s3_req)?; + let result = s3.get_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(overridden_headers); + super::get_object::merge_custom_headers(&mut resp, s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectAcl; impl GetObjectAcl { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - - -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetObjectAclInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectAclOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(GetObjectAclInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: GetObjectAclOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectAcl { -fn name(&self) -> &'static str { -"GetObjectAcl" -} + fn name(&self) -> &'static str { + "GetObjectAcl" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_acl(&mut s3_req).await?; -} -let result = s3.get_object_acl(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_acl(&mut s3_req).await?; + } + let result = s3.get_object_acl(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectAttributes; impl GetObjectAttributes { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let max_parts: Option = http::parse_opt_header(req, &X_AMZ_MAX_PARTS)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let object_attributes: ObjectAttributesList = http::parse_list_header(req, &X_AMZ_OBJECT_ATTRIBUTES)?; + let max_parts: Option = http::parse_opt_header(req, &X_AMZ_MAX_PARTS)?; -let part_number_marker: Option = http::parse_opt_header(req, &X_AMZ_PART_NUMBER_MARKER)?; + let object_attributes: ObjectAttributesList = http::parse_list_header(req, &X_AMZ_OBJECT_ATTRIBUTES)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let part_number_marker: Option = http::parse_opt_header(req, &X_AMZ_PART_NUMBER_MARKER)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(GetObjectAttributesInput { -bucket, -expected_bucket_owner, -key, -max_parts, -object_attributes, -part_number_marker, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectAttributesOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; -http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(GetObjectAttributesInput { + bucket, + expected_bucket_owner, + key, + max_parts, + object_attributes, + part_number_marker, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + pub fn serialize_http(x: GetObjectAttributesOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; + http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectAttributes { -fn name(&self) -> &'static str { -"GetObjectAttributes" -} + fn name(&self) -> &'static str { + "GetObjectAttributes" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_attributes(&mut s3_req).await?; -} -let result = s3.get_object_attributes(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_attributes(&mut s3_req).await?; + } + let result = s3.get_object_attributes(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectLegalHold; impl GetObjectLegalHold { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -Ok(GetObjectLegalHoldInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - - -pub fn serialize_http(x: GetObjectLegalHoldOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.legal_hold { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetObjectLegalHoldInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: GetObjectLegalHoldOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.legal_hold { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectLegalHold { -fn name(&self) -> &'static str { -"GetObjectLegalHold" -} + fn name(&self) -> &'static str { + "GetObjectLegalHold" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_legal_hold(&mut s3_req).await?; -} -let result = s3.get_object_legal_hold(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_legal_hold(&mut s3_req).await?; + } + let result = s3.get_object_legal_hold(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectLockConfiguration; impl GetObjectLockConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetObjectLockConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetObjectLockConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.object_lock_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetObjectLockConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetObjectLockConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.object_lock_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectLockConfiguration { -fn name(&self) -> &'static str { -"GetObjectLockConfiguration" -} + fn name(&self) -> &'static str { + "GetObjectLockConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_lock_configuration(&mut s3_req).await?; -} -let result = s3.get_object_lock_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_lock_configuration(&mut s3_req).await?; + } + let result = s3.get_object_lock_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectRetention; impl GetObjectRetention { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(GetObjectRetentionInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectRetentionOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.retention { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetObjectRetentionInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: GetObjectRetentionOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.retention { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectRetention { -fn name(&self) -> &'static str { -"GetObjectRetention" -} + fn name(&self) -> &'static str { + "GetObjectRetention" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_retention(&mut s3_req).await?; -} -let result = s3.get_object_retention(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_retention(&mut s3_req).await?; + } + let result = s3.get_object_retention(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectTagging; impl GetObjectTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -Ok(GetObjectTaggingInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - - -pub fn serialize_http(x: GetObjectTaggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(GetObjectTaggingInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: GetObjectTaggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectTagging { -fn name(&self) -> &'static str { -"GetObjectTagging" -} + fn name(&self) -> &'static str { + "GetObjectTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_tagging(&mut s3_req).await?; -} -let result = s3.get_object_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_tagging(&mut s3_req).await?; + } + let result = s3.get_object_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectTorrent; impl GetObjectTorrent { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -Ok(GetObjectTorrentInput { -bucket, -expected_bucket_owner, -key, -request_payer, -}) -} - - -pub fn serialize_http(x: GetObjectTorrentOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(val) = x.body { -http::set_stream_body(&mut res, val); -} -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(GetObjectTorrentInput { + bucket, + expected_bucket_owner, + key, + request_payer, + }) + } + pub fn serialize_http(x: GetObjectTorrentOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(val) = x.body { + http::set_stream_body(&mut res, val); + } + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectTorrent { -fn name(&self) -> &'static str { -"GetObjectTorrent" -} + fn name(&self) -> &'static str { + "GetObjectTorrent" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_torrent(&mut s3_req).await?; -} -let result = s3.get_object_torrent(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_torrent(&mut s3_req).await?; + } + let result = s3.get_object_torrent(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetPublicAccessBlock; impl GetPublicAccessBlock { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetPublicAccessBlockInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetPublicAccessBlockOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.public_access_block_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetPublicAccessBlockInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetPublicAccessBlockOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.public_access_block_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetPublicAccessBlock { -fn name(&self) -> &'static str { -"GetPublicAccessBlock" -} + fn name(&self) -> &'static str { + "GetPublicAccessBlock" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_public_access_block(&mut s3_req).await?; -} -let result = s3.get_public_access_block(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_public_access_block(&mut s3_req).await?; + } + let result = s3.get_public_access_block(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct HeadBucket; impl HeadBucket { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(HeadBucketInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: HeadBucketOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_ACCESS_POINT_ALIAS, x.access_point_alias)?; -http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_NAME, x.bucket_location_name)?; -http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_TYPE, x.bucket_location_type)?; -http::add_opt_header(&mut res, X_AMZ_BUCKET_REGION, x.bucket_region)?; -Ok(res) -} + Ok(HeadBucketInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: HeadBucketOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_ACCESS_POINT_ALIAS, x.access_point_alias)?; + http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_NAME, x.bucket_location_name)?; + http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_TYPE, x.bucket_location_type)?; + http::add_opt_header(&mut res, X_AMZ_BUCKET_REGION, x.bucket_region)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for HeadBucket { -fn name(&self) -> &'static str { -"HeadBucket" -} + fn name(&self) -> &'static str { + "HeadBucket" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.head_bucket(&mut s3_req).await?; -} -let result = s3.head_bucket(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.head_bucket(&mut s3_req).await?; + } + let result = s3.head_bucket(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct HeadObject; impl HeadObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; -let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - -let if_modified_since: Option = http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - -let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let if_modified_since: Option = + http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; -let part_number: Option = http::parse_opt_query(req, "partNumber")?; + let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; -let range: Option = http::parse_opt_header(req, &RANGE)?; + let if_unmodified_since: Option = + http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let part_number: Option = http::parse_opt_query(req, "partNumber")?; -let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; + let range: Option = http::parse_opt_header(req, &RANGE)?; -let response_content_disposition: Option = http::parse_opt_query(req, "response-content-disposition")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; + let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; -let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; + let response_content_disposition: Option = + http::parse_opt_query(req, "response-content-disposition")?; -let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; + let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; -let response_expires: Option = http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; + let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let response_expires: Option = + http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -Ok(HeadObjectInput { -bucket, -checksum_mode, -expected_bucket_owner, -if_match, -if_modified_since, -if_none_match, -if_unmodified_since, -key, -part_number, -range, -request_payer, -response_cache_control, -response_content_disposition, -response_content_encoding, -response_content_language, -response_content_type, -response_expires, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: HeadObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; -http::add_opt_header(&mut res, X_AMZ_ARCHIVE_STATUS, x.archive_status)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; -http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; -http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; -http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; -http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; -http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; -http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; -http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; -http::add_opt_header(&mut res, ETAG, x.e_tag)?; -http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; -http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; -http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; -http::add_opt_metadata(&mut res, x.metadata)?; -http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; -http::add_opt_header_timestamp(&mut res, X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, x.object_lock_retain_until_date, TimestampFormat::DateTime)?; -http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; -http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; -Ok(res) -} + Ok(HeadObjectInput { + bucket, + checksum_mode, + expected_bucket_owner, + if_match, + if_modified_since, + if_none_match, + if_unmodified_since, + key, + part_number, + range, + request_payer, + response_cache_control, + response_content_disposition, + response_content_encoding, + response_content_language, + response_content_type, + response_expires, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + pub fn serialize_http(x: HeadObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; + http::add_opt_header(&mut res, X_AMZ_ARCHIVE_STATUS, x.archive_status)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; + http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; + http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; + http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; + http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; + http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; + http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; + http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; + http::add_opt_header(&mut res, ETAG, x.e_tag)?; + http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; + http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; + http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; + http::add_opt_metadata(&mut res, x.metadata)?; + http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; + http::add_opt_header_timestamp( + &mut res, + X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, + x.object_lock_retain_until_date, + TimestampFormat::DateTime, + )?; + http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; + http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for HeadObject { -fn name(&self) -> &'static str { -"HeadObject" -} + fn name(&self) -> &'static str { + "HeadObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.head_object(&mut s3_req).await?; -} -let result = s3.head_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.head_object(&mut s3_req).await?; + } + let result = s3.head_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBucketAnalyticsConfigurations; impl ListBucketAnalyticsConfigurations { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(ListBucketAnalyticsConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: ListBucketAnalyticsConfigurationsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketAnalyticsConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: ListBucketAnalyticsConfigurationsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBucketAnalyticsConfigurations { -fn name(&self) -> &'static str { -"ListBucketAnalyticsConfigurations" -} + fn name(&self) -> &'static str { + "ListBucketAnalyticsConfigurations" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_bucket_analytics_configurations(&mut s3_req).await?; -} -let result = s3.list_bucket_analytics_configurations(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_bucket_analytics_configurations(&mut s3_req).await?; + } + let result = s3.list_bucket_analytics_configurations(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBucketIntelligentTieringConfigurations; impl ListBucketIntelligentTieringConfigurations { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - -Ok(ListBucketIntelligentTieringConfigurationsInput { -bucket, -continuation_token, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; -pub fn serialize_http(x: ListBucketIntelligentTieringConfigurationsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketIntelligentTieringConfigurationsInput { + bucket, + continuation_token, + }) + } + pub fn serialize_http(x: ListBucketIntelligentTieringConfigurationsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBucketIntelligentTieringConfigurations { -fn name(&self) -> &'static str { -"ListBucketIntelligentTieringConfigurations" -} + fn name(&self) -> &'static str { + "ListBucketIntelligentTieringConfigurations" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_bucket_intelligent_tiering_configurations(&mut s3_req).await?; -} -let result = s3.list_bucket_intelligent_tiering_configurations(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_bucket_intelligent_tiering_configurations(&mut s3_req).await?; + } + let result = s3.list_bucket_intelligent_tiering_configurations(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBucketInventoryConfigurations; impl ListBucketInventoryConfigurations { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(ListBucketInventoryConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: ListBucketInventoryConfigurationsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketInventoryConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: ListBucketInventoryConfigurationsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBucketInventoryConfigurations { -fn name(&self) -> &'static str { -"ListBucketInventoryConfigurations" -} + fn name(&self) -> &'static str { + "ListBucketInventoryConfigurations" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_bucket_inventory_configurations(&mut s3_req).await?; -} -let result = s3.list_bucket_inventory_configurations(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_bucket_inventory_configurations(&mut s3_req).await?; + } + let result = s3.list_bucket_inventory_configurations(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBucketMetricsConfigurations; impl ListBucketMetricsConfigurations { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(ListBucketMetricsConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: ListBucketMetricsConfigurationsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketMetricsConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: ListBucketMetricsConfigurationsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBucketMetricsConfigurations { -fn name(&self) -> &'static str { -"ListBucketMetricsConfigurations" -} + fn name(&self) -> &'static str { + "ListBucketMetricsConfigurations" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_bucket_metrics_configurations(&mut s3_req).await?; -} -let result = s3.list_bucket_metrics_configurations(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_bucket_metrics_configurations(&mut s3_req).await?; + } + let result = s3.list_bucket_metrics_configurations(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBuckets; impl ListBuckets { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket_region: Option = http::parse_opt_query(req, "bucket-region")?; - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - -let max_buckets: Option = http::parse_opt_query(req, "max-buckets")?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket_region: Option = http::parse_opt_query(req, "bucket-region")?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; -Ok(ListBucketsInput { -bucket_region, -continuation_token, -max_buckets, -prefix, -}) -} + let max_buckets: Option = http::parse_opt_query(req, "max-buckets")?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -pub fn serialize_http(x: ListBucketsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketsInput { + bucket_region, + continuation_token, + max_buckets, + prefix, + }) + } + pub fn serialize_http(x: ListBucketsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBuckets { -fn name(&self) -> &'static str { -"ListBuckets" -} + fn name(&self) -> &'static str { + "ListBuckets" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_buckets(&mut s3_req).await?; -} -let result = s3.list_buckets(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_buckets(&mut s3_req).await?; + } + let result = s3.list_buckets(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListDirectoryBuckets; impl ListDirectoryBuckets { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - -let max_directory_buckets: Option = http::parse_opt_query(req, "max-directory-buckets")?; - -Ok(ListDirectoryBucketsInput { -continuation_token, -max_directory_buckets, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let max_directory_buckets: Option = http::parse_opt_query(req, "max-directory-buckets")?; -pub fn serialize_http(x: ListDirectoryBucketsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListDirectoryBucketsInput { + continuation_token, + max_directory_buckets, + }) + } + pub fn serialize_http(x: ListDirectoryBucketsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListDirectoryBuckets { -fn name(&self) -> &'static str { -"ListDirectoryBuckets" -} + fn name(&self) -> &'static str { + "ListDirectoryBuckets" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_directory_buckets(&mut s3_req).await?; -} -let result = s3.list_directory_buckets(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_directory_buckets(&mut s3_req).await?; + } + let result = s3.list_directory_buckets(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListMultipartUploads; impl ListMultipartUploads { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let delimiter: Option = http::parse_opt_query(req, "delimiter")?; -let delimiter: Option = http::parse_opt_query(req, "delimiter")?; + let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; -let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let key_marker: Option = http::parse_opt_query(req, "key-marker")?; -let key_marker: Option = http::parse_opt_query(req, "key-marker")?; + let max_uploads: Option = http::parse_opt_query(req, "max-uploads")?; -let max_uploads: Option = http::parse_opt_query(req, "max-uploads")?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let upload_id_marker: Option = http::parse_opt_query(req, "upload-id-marker")?; -let upload_id_marker: Option = http::parse_opt_query(req, "upload-id-marker")?; - -Ok(ListMultipartUploadsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -key_marker, -max_uploads, -prefix, -request_payer, -upload_id_marker, -}) -} - - -pub fn serialize_http(x: ListMultipartUploadsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListMultipartUploadsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + key_marker, + max_uploads, + prefix, + request_payer, + upload_id_marker, + }) + } + pub fn serialize_http(x: ListMultipartUploadsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListMultipartUploads { -fn name(&self) -> &'static str { -"ListMultipartUploads" -} + fn name(&self) -> &'static str { + "ListMultipartUploads" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_multipart_uploads(&mut s3_req).await?; -} -let result = s3.list_multipart_uploads(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_multipart_uploads(&mut s3_req).await?; + } + let result = s3.list_multipart_uploads(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListObjectVersions; impl ListObjectVersions { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let delimiter: Option = http::parse_opt_query(req, "delimiter")?; -let delimiter: Option = http::parse_opt_query(req, "delimiter")?; + let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; -let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let key_marker: Option = http::parse_opt_query(req, "key-marker")?; -let key_marker: Option = http::parse_opt_query(req, "key-marker")?; + let max_keys: Option = http::parse_opt_query(req, "max-keys")?; -let max_keys: Option = http::parse_opt_query(req, "max-keys")?; + let optional_object_attributes: Option = + http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; -let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id_marker: Option = http::parse_opt_query(req, "version-id-marker")?; -let version_id_marker: Option = http::parse_opt_query(req, "version-id-marker")?; - -Ok(ListObjectVersionsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -key_marker, -max_keys, -optional_object_attributes, -prefix, -request_payer, -version_id_marker, -}) -} - - -pub fn serialize_http(x: ListObjectVersionsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListObjectVersionsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + key_marker, + max_keys, + optional_object_attributes, + prefix, + request_payer, + version_id_marker, + }) + } + pub fn serialize_http(x: ListObjectVersionsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListObjectVersions { -fn name(&self) -> &'static str { -"ListObjectVersions" -} + fn name(&self) -> &'static str { + "ListObjectVersions" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_object_versions(&mut s3_req).await?; -} -let result = s3.list_object_versions(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_object_versions(&mut s3_req).await?; + } + let result = s3.list_object_versions(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListObjects; impl ListObjects { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let delimiter: Option = http::parse_opt_query(req, "delimiter")?; -let delimiter: Option = http::parse_opt_query(req, "delimiter")?; + let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; -let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let marker: Option = http::parse_opt_query(req, "marker")?; -let marker: Option = http::parse_opt_query(req, "marker")?; + let max_keys: Option = http::parse_opt_query(req, "max-keys")?; -let max_keys: Option = http::parse_opt_query(req, "max-keys")?; + let optional_object_attributes: Option = + http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; -let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -Ok(ListObjectsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -marker, -max_keys, -optional_object_attributes, -prefix, -request_payer, -}) -} - - -pub fn serialize_http(x: ListObjectsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListObjectsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + marker, + max_keys, + optional_object_attributes, + prefix, + request_payer, + }) + } + pub fn serialize_http(x: ListObjectsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListObjects { -fn name(&self) -> &'static str { -"ListObjects" -} + fn name(&self) -> &'static str { + "ListObjects" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_objects(&mut s3_req).await?; -} -let result = s3.list_objects(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_objects(&mut s3_req).await?; + } + let result = s3.list_objects(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListObjectsV2; impl ListObjectsV2 { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let delimiter: Option = http::parse_opt_query(req, "delimiter")?; -let delimiter: Option = http::parse_opt_query(req, "delimiter")?; + let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; -let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let fetch_owner: Option = http::parse_opt_query(req, "fetch-owner")?; -let fetch_owner: Option = http::parse_opt_query(req, "fetch-owner")?; + let max_keys: Option = http::parse_opt_query(req, "max-keys")?; -let max_keys: Option = http::parse_opt_query(req, "max-keys")?; + let optional_object_attributes: Option = + http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; -let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let start_after: Option = http::parse_opt_query(req, "start-after")?; -let start_after: Option = http::parse_opt_query(req, "start-after")?; - -Ok(ListObjectsV2Input { -bucket, -continuation_token, -delimiter, -encoding_type, -expected_bucket_owner, -fetch_owner, -max_keys, -optional_object_attributes, -prefix, -request_payer, -start_after, -}) -} - - -pub fn serialize_http(x: ListObjectsV2Output) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListObjectsV2Input { + bucket, + continuation_token, + delimiter, + encoding_type, + expected_bucket_owner, + fetch_owner, + max_keys, + optional_object_attributes, + prefix, + request_payer, + start_after, + }) + } + pub fn serialize_http(x: ListObjectsV2Output) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListObjectsV2 { -fn name(&self) -> &'static str { -"ListObjectsV2" -} + fn name(&self) -> &'static str { + "ListObjectsV2" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_objects_v2(&mut s3_req).await?; -} -let result = s3.list_objects_v2(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_objects_v2(&mut s3_req).await?; + } + let result = s3.list_objects_v2(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListParts; impl ListParts { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let max_parts: Option = http::parse_opt_query(req, "max-parts")?; + let part_number_marker: Option = http::parse_opt_query(req, "part-number-marker")?; -let max_parts: Option = http::parse_opt_query(req, "max-parts")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let part_number_marker: Option = http::parse_opt_query(req, "part-number-marker")?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - -Ok(ListPartsInput { -bucket, -expected_bucket_owner, -key, -max_parts, -part_number_marker, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - - -pub fn serialize_http(x: ListPartsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; -http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListPartsInput { + bucket, + expected_bucket_owner, + key, + max_parts, + part_number_marker, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + pub fn serialize_http(x: ListPartsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; + http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListParts { -fn name(&self) -> &'static str { -"ListParts" -} + fn name(&self) -> &'static str { + "ListParts" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_parts(&mut s3_req).await?; -} -let result = s3.list_parts(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_parts(&mut s3_req).await?; + } + let result = s3.list_parts(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketAccelerateConfiguration; impl PutBucketAccelerateConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - -let accelerate_configuration: AccelerateConfiguration = http::take_xml_body(req)?; - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let accelerate_configuration: AccelerateConfiguration = http::take_xml_body(req)?; -Ok(PutBucketAccelerateConfigurationInput { -accelerate_configuration, -bucket, -checksum_algorithm, -expected_bucket_owner, -}) -} + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: PutBucketAccelerateConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketAccelerateConfigurationInput { + accelerate_configuration, + bucket, + checksum_algorithm, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: PutBucketAccelerateConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketAccelerateConfiguration { -fn name(&self) -> &'static str { -"PutBucketAccelerateConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketAccelerateConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_accelerate_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_accelerate_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_accelerate_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_accelerate_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketAcl; impl PutBucketAcl { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - -let access_control_policy: Option = http::take_opt_xml_body(req)?; - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let access_control_policy: Option = http::take_opt_xml_body(req)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -Ok(PutBucketAclInput { -acl, -access_control_policy, -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -}) -} + let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -pub fn serialize_http(_: PutBucketAclOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketAclInput { + acl, + access_control_policy, + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + }) + } + pub fn serialize_http(_: PutBucketAclOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketAcl { -fn name(&self) -> &'static str { -"PutBucketAcl" -} + fn name(&self) -> &'static str { + "PutBucketAcl" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_acl(&mut s3_req).await?; -} -let result = s3.put_bucket_acl(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_acl(&mut s3_req).await?; + } + let result = s3.put_bucket_acl(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketAnalyticsConfiguration; impl PutBucketAnalyticsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - -let analytics_configuration: AnalyticsConfiguration = http::take_xml_body(req)?; - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: AnalyticsId = http::parse_query(req, "id")?; + let analytics_configuration: AnalyticsConfiguration = http::take_xml_body(req)?; -Ok(PutBucketAnalyticsConfigurationInput { -analytics_configuration, -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: AnalyticsId = http::parse_query(req, "id")?; -pub fn serialize_http(_: PutBucketAnalyticsConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketAnalyticsConfigurationInput { + analytics_configuration, + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(_: PutBucketAnalyticsConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketAnalyticsConfiguration { -fn name(&self) -> &'static str { -"PutBucketAnalyticsConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketAnalyticsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_analytics_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_analytics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_analytics_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_analytics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketCors; impl PutBucketCors { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let cors_configuration: CORSConfiguration = http::take_xml_body(req)?; - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let cors_configuration: CORSConfiguration = http::take_xml_body(req)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -Ok(PutBucketCorsInput { -bucket, -cors_configuration, -checksum_algorithm, -content_md5, -expected_bucket_owner, -}) -} + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: PutBucketCorsOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketCorsInput { + bucket, + cors_configuration, + checksum_algorithm, + content_md5, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: PutBucketCorsOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketCors { -fn name(&self) -> &'static str { -"PutBucketCors" -} + fn name(&self) -> &'static str { + "PutBucketCors" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_cors(&mut s3_req).await?; -} -let result = s3.put_bucket_cors(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_cors(&mut s3_req).await?; + } + let result = s3.put_bucket_cors(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketEncryption; impl PutBucketEncryption { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let server_side_encryption_configuration: ServerSideEncryptionConfiguration = http::take_xml_body(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -Ok(PutBucketEncryptionInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -server_side_encryption_configuration, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let server_side_encryption_configuration: ServerSideEncryptionConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketEncryptionOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketEncryptionInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + server_side_encryption_configuration, + }) + } + pub fn serialize_http(_: PutBucketEncryptionOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketEncryption { -fn name(&self) -> &'static str { -"PutBucketEncryption" -} + fn name(&self) -> &'static str { + "PutBucketEncryption" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_encryption(&mut s3_req).await?; -} -let result = s3.put_bucket_encryption(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_encryption(&mut s3_req).await?; + } + let result = s3.put_bucket_encryption(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketIntelligentTieringConfiguration; impl PutBucketIntelligentTieringConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let id: IntelligentTieringId = http::parse_query(req, "id")?; - -let intelligent_tiering_configuration: IntelligentTieringConfiguration = http::take_xml_body(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -Ok(PutBucketIntelligentTieringConfigurationInput { -bucket, -id, -intelligent_tiering_configuration, -}) -} + let id: IntelligentTieringId = http::parse_query(req, "id")?; + let intelligent_tiering_configuration: IntelligentTieringConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketIntelligentTieringConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketIntelligentTieringConfigurationInput { + bucket, + id, + intelligent_tiering_configuration, + }) + } + pub fn serialize_http(_: PutBucketIntelligentTieringConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketIntelligentTieringConfiguration { -fn name(&self) -> &'static str { -"PutBucketIntelligentTieringConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketIntelligentTieringConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_intelligent_tiering_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_intelligent_tiering_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_intelligent_tiering_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_intelligent_tiering_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketInventoryConfiguration; impl PutBucketInventoryConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let id: InventoryId = http::parse_query(req, "id")?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let inventory_configuration: InventoryConfiguration = http::take_xml_body(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(PutBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -inventory_configuration, -}) -} + let id: InventoryId = http::parse_query(req, "id")?; + let inventory_configuration: InventoryConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketInventoryConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + inventory_configuration, + }) + } + pub fn serialize_http(_: PutBucketInventoryConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketInventoryConfiguration { -fn name(&self) -> &'static str { -"PutBucketInventoryConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketInventoryConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_inventory_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_inventory_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_inventory_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_inventory_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketLifecycleConfiguration; impl PutBucketLifecycleConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let lifecycle_configuration: Option = http::take_opt_xml_body(req)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let transition_default_minimum_object_size: Option = http::parse_opt_header(req, &X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(PutBucketLifecycleConfigurationInput { -bucket, -checksum_algorithm, -expected_bucket_owner, -lifecycle_configuration, -transition_default_minimum_object_size, -}) -} + let lifecycle_configuration: Option = http::take_opt_xml_body(req)?; + let transition_default_minimum_object_size: Option = + http::parse_opt_header(req, &X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE)?; -pub fn serialize_http(x: PutBucketLifecycleConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, x.transition_default_minimum_object_size)?; -Ok(res) -} + Ok(PutBucketLifecycleConfigurationInput { + bucket, + checksum_algorithm, + expected_bucket_owner, + lifecycle_configuration, + transition_default_minimum_object_size, + }) + } + pub fn serialize_http(x: PutBucketLifecycleConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header( + &mut res, + X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, + x.transition_default_minimum_object_size, + )?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutBucketLifecycleConfiguration { -fn name(&self) -> &'static str { -"PutBucketLifecycleConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketLifecycleConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_lifecycle_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_lifecycle_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_lifecycle_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_lifecycle_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketLogging; impl PutBucketLogging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let bucket_logging_status: BucketLoggingStatus = http::take_xml_body(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let bucket_logging_status: BucketLoggingStatus = http::take_xml_body(req)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(PutBucketLoggingInput { -bucket, -bucket_logging_status, -checksum_algorithm, -content_md5, -expected_bucket_owner, -}) -} + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: PutBucketLoggingOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketLoggingInput { + bucket, + bucket_logging_status, + checksum_algorithm, + content_md5, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: PutBucketLoggingOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketLogging { -fn name(&self) -> &'static str { -"PutBucketLogging" -} + fn name(&self) -> &'static str { + "PutBucketLogging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_logging(&mut s3_req).await?; -} -let result = s3.put_bucket_logging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_logging(&mut s3_req).await?; + } + let result = s3.put_bucket_logging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketMetricsConfiguration; impl PutBucketMetricsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: MetricsId = http::parse_query(req, "id")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let metrics_configuration: MetricsConfiguration = http::take_xml_body(req)?; - -Ok(PutBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -metrics_configuration, -}) -} + let id: MetricsId = http::parse_query(req, "id")?; + let metrics_configuration: MetricsConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketMetricsConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + metrics_configuration, + }) + } + pub fn serialize_http(_: PutBucketMetricsConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketMetricsConfiguration { -fn name(&self) -> &'static str { -"PutBucketMetricsConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketMetricsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_metrics_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_metrics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_metrics_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_metrics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketNotificationConfiguration; impl PutBucketNotificationConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let notification_configuration: NotificationConfiguration = http::take_xml_body(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let skip_destination_validation: Option = http::parse_opt_header(req, &X_AMZ_SKIP_DESTINATION_VALIDATION)?; - -Ok(PutBucketNotificationConfigurationInput { -bucket, -expected_bucket_owner, -notification_configuration, -skip_destination_validation, -}) -} + let notification_configuration: NotificationConfiguration = http::take_xml_body(req)?; + let skip_destination_validation: Option = + http::parse_opt_header(req, &X_AMZ_SKIP_DESTINATION_VALIDATION)?; -pub fn serialize_http(_: PutBucketNotificationConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketNotificationConfigurationInput { + bucket, + expected_bucket_owner, + notification_configuration, + skip_destination_validation, + }) + } + pub fn serialize_http(_: PutBucketNotificationConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketNotificationConfiguration { -fn name(&self) -> &'static str { -"PutBucketNotificationConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketNotificationConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_notification_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_notification_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_notification_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_notification_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketOwnershipControls; impl PutBucketOwnershipControls { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let ownership_controls: OwnershipControls = http::take_xml_body(req)?; - -Ok(PutBucketOwnershipControlsInput { -bucket, -content_md5, -expected_bucket_owner, -ownership_controls, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let ownership_controls: OwnershipControls = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketOwnershipControlsOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketOwnershipControlsInput { + bucket, + content_md5, + expected_bucket_owner, + ownership_controls, + }) + } + pub fn serialize_http(_: PutBucketOwnershipControlsOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketOwnershipControls { -fn name(&self) -> &'static str { -"PutBucketOwnershipControls" -} + fn name(&self) -> &'static str { + "PutBucketOwnershipControls" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_ownership_controls(&mut s3_req).await?; -} -let result = s3.put_bucket_ownership_controls(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_ownership_controls(&mut s3_req).await?; + } + let result = s3.put_bucket_ownership_controls(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketPolicy; impl PutBucketPolicy { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let confirm_remove_self_bucket_access: Option = http::parse_opt_header(req, &X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let confirm_remove_self_bucket_access: Option = + http::parse_opt_header(req, &X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let policy: Policy = http::take_string_body(req)?; - -Ok(PutBucketPolicyInput { -bucket, -checksum_algorithm, -confirm_remove_self_bucket_access, -content_md5, -expected_bucket_owner, -policy, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let policy: Policy = http::take_string_body(req)?; -pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(PutBucketPolicyInput { + bucket, + checksum_algorithm, + confirm_remove_self_bucket_access, + content_md5, + expected_bucket_owner, + policy, + }) + } + pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketPolicy { -fn name(&self) -> &'static str { -"PutBucketPolicy" -} + fn name(&self) -> &'static str { + "PutBucketPolicy" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_policy(&mut s3_req).await?; -} -let result = s3.put_bucket_policy(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_policy(&mut s3_req).await?; + } + let result = s3.put_bucket_policy(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketReplication; impl PutBucketReplication { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let replication_configuration: ReplicationConfiguration = http::take_xml_body(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; - -Ok(PutBucketReplicationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -replication_configuration, -token, -}) -} + let replication_configuration: ReplicationConfiguration = http::take_xml_body(req)?; + let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; -pub fn serialize_http(_: PutBucketReplicationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketReplicationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + replication_configuration, + token, + }) + } + pub fn serialize_http(_: PutBucketReplicationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketReplication { -fn name(&self) -> &'static str { -"PutBucketReplication" -} + fn name(&self) -> &'static str { + "PutBucketReplication" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_replication(&mut s3_req).await?; -} -let result = s3.put_bucket_replication(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_replication(&mut s3_req).await?; + } + let result = s3.put_bucket_replication(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketRequestPayment; impl PutBucketRequestPayment { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let request_payment_configuration: RequestPaymentConfiguration = http::take_xml_body(req)?; - -Ok(PutBucketRequestPaymentInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -request_payment_configuration, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payment_configuration: RequestPaymentConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketRequestPaymentOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketRequestPaymentInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + request_payment_configuration, + }) + } + pub fn serialize_http(_: PutBucketRequestPaymentOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketRequestPayment { -fn name(&self) -> &'static str { -"PutBucketRequestPayment" -} + fn name(&self) -> &'static str { + "PutBucketRequestPayment" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_request_payment(&mut s3_req).await?; -} -let result = s3.put_bucket_request_payment(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_request_payment(&mut s3_req).await?; + } + let result = s3.put_bucket_request_payment(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketTagging; impl PutBucketTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let tagging: Tagging = http::take_xml_body(req)?; - -Ok(PutBucketTaggingInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -tagging, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let tagging: Tagging = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketTaggingOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketTaggingInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + tagging, + }) + } + pub fn serialize_http(_: PutBucketTaggingOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketTagging { -fn name(&self) -> &'static str { -"PutBucketTagging" -} - -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_tagging(&mut s3_req).await?; -} -let result = s3.put_bucket_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} - -pub struct PutBucketVersioning; - -impl PutBucketVersioning { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; - -let versioning_configuration: VersioningConfiguration = http::take_xml_body(req)?; - -Ok(PutBucketVersioningInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -mfa, -versioning_configuration, -}) -} - - -pub fn serialize_http(_: PutBucketVersioningOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} - -} - -#[async_trait::async_trait] -impl super::Operation for PutBucketVersioning { -fn name(&self) -> &'static str { -"PutBucketVersioning" -} - -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_versioning(&mut s3_req).await?; -} -let result = s3.put_bucket_versioning(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} - -pub struct PutBucketWebsite; - -impl PutBucketWebsite { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let website_configuration: WebsiteConfiguration = http::take_xml_body(req)?; - -Ok(PutBucketWebsiteInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -website_configuration, -}) -} - - -pub fn serialize_http(_: PutBucketWebsiteOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} - -} + fn name(&self) -> &'static str { + "PutBucketTagging" + } -#[async_trait::async_trait] -impl super::Operation for PutBucketWebsite { -fn name(&self) -> &'static str { -"PutBucketWebsite" + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_tagging(&mut s3_req).await?; + } + let result = s3.put_bucket_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_website(&mut s3_req).await?; -} -let result = s3.put_bucket_website(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} +pub struct PutBucketVersioning; -pub struct PutObject; +impl PutBucketVersioning { + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -impl PutObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -if let Some(m) = req.s3ext.multipart.take() { - return Self::deserialize_http_multipart(req, m); -} + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let (bucket, key) = http::unwrap_object(req); + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let body: Option = Some(http::take_stream_body(req)); + let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; + let versioning_configuration: VersioningConfiguration = http::take_xml_body(req)?; -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; + Ok(PutBucketVersioningInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + mfa, + versioning_configuration, + }) + } -let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; + pub fn serialize_http(_: PutBucketVersioningOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } +} -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; +#[async_trait::async_trait] +impl super::Operation for PutBucketVersioning { + fn name(&self) -> &'static str { + "PutBucketVersioning" + } -let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_versioning(&mut s3_req).await?; + } + let result = s3.put_bucket_versioning(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } +} -let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; +pub struct PutBucketWebsite; -let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; +impl PutBucketWebsite { + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; + let website_configuration: WebsiteConfiguration = http::take_xml_body(req)?; -let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; + Ok(PutBucketWebsiteInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + website_configuration, + }) + } -let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; + pub fn serialize_http(_: PutBucketWebsiteOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } +} -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; +#[async_trait::async_trait] +impl super::Operation for PutBucketWebsite { + fn name(&self) -> &'static str { + "PutBucketWebsite" + } -let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_website(&mut s3_req).await?; + } + let result = s3.put_bucket_website(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } +} -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; +pub struct PutObject; -let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; +impl PutObject { + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + if let Some(m) = req.s3ext.multipart.take() { + return Self::deserialize_http_multipart(req, m); + } -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let (bucket, key) = http::unwrap_object(req); -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let body: Option = Some(http::take_stream_body(req)); -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; -let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; -let metadata: Option = http::parse_opt_metadata(req)?; + let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; -let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; + let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; -let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; + let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; -let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; -let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; + let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; -let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let write_offset_bytes: Option = http::parse_opt_header(req, &X_AMZ_WRITE_OFFSET_BYTES)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -Ok(PutObjectInput { -acl, -body, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_md5, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -if_match, -if_none_match, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -website_redirect_location, -write_offset_bytes, -}) -} + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -pub fn deserialize_http_multipart(req: &mut http::Request, m: http::Multipart) -> S3Result { -let bucket = http::unwrap_bucket(req); -let key = http::parse_field_value(&m, "key")?.ok_or_else(|| invalid_request!("missing key"))?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; -let vec_stream = req.s3ext.vec_stream.take().expect("missing vec stream"); + let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; -let content_length = i64::try_from(vec_stream.exact_remaining_length()) - .map_err(|e| s3_error!(e, InvalidArgument, "content-length overflow"))?; -let content_length = (content_length != 0).then_some(content_length); + let metadata: Option = http::parse_opt_metadata(req)?; -let body: Option = Some(StreamingBlob::new(vec_stream)); + let object_lock_legal_hold_status: Option = + http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; -let acl: Option = http::parse_field_value(&m, "x-amz-acl")?; + let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; + let object_lock_retain_until_date: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let bucket_key_enabled: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-bucket-key-enabled")?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let cache_control: Option = http::parse_field_value(&m, "cache-control")?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let checksum_algorithm: Option = http::parse_field_value(&m, "x-amz-sdk-checksum-algorithm")?; + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let checksum_crc32: Option = http::parse_field_value(&m, "x-amz-checksum-crc32")?; + let ssekms_encryption_context: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; -let checksum_crc32c: Option = http::parse_field_value(&m, "x-amz-checksum-crc32c")?; + let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; -let checksum_crc64nvme: Option = http::parse_field_value(&m, "x-amz-checksum-crc64nvme")?; + let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; -let checksum_sha1: Option = http::parse_field_value(&m, "x-amz-checksum-sha1")?; + let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; -let checksum_sha256: Option = http::parse_field_value(&m, "x-amz-checksum-sha256")?; + let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; -let content_disposition: Option = http::parse_field_value(&m, "content-disposition")?; + let website_redirect_location: Option = + http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; -let content_encoding: Option = http::parse_field_value(&m, "content-encoding")?; + let write_offset_bytes: Option = http::parse_opt_header(req, &X_AMZ_WRITE_OFFSET_BYTES)?; -let content_language: Option = http::parse_field_value(&m, "content-language")?; + Ok(PutObjectInput { + acl, + body, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_md5, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + if_match, + if_none_match, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + website_redirect_location, + write_offset_bytes, + }) + } -let content_md5: Option = http::parse_field_value(&m, "content-md5")?; + pub fn deserialize_http_multipart(req: &mut http::Request, m: http::Multipart) -> S3Result { + let bucket = http::unwrap_bucket(req); + let key = http::parse_field_value(&m, "key")?.ok_or_else(|| invalid_request!("missing key"))?; -let content_type: Option = http::parse_field_value(&m, "content-type")?; + let vec_stream = req.s3ext.vec_stream.take().expect("missing vec stream"); -let expected_bucket_owner: Option = http::parse_field_value(&m, "x-amz-expected-bucket-owner")?; + let content_length = i64::try_from(vec_stream.exact_remaining_length()) + .map_err(|e| s3_error!(e, InvalidArgument, "content-length overflow"))?; + let content_length = (content_length != 0).then_some(content_length); -let expires: Option = http::parse_field_value_timestamp(&m, "expires", TimestampFormat::HttpDate)?; + let body: Option = Some(StreamingBlob::new(vec_stream)); -let grant_full_control: Option = http::parse_field_value(&m, "x-amz-grant-full-control")?; + let acl: Option = http::parse_field_value(&m, "x-amz-acl")?; -let grant_read: Option = http::parse_field_value(&m, "x-amz-grant-read")?; + let bucket_key_enabled: Option = + http::parse_field_value(&m, "x-amz-server-side-encryption-bucket-key-enabled")?; -let grant_read_acp: Option = http::parse_field_value(&m, "x-amz-grant-read-acp")?; + let cache_control: Option = http::parse_field_value(&m, "cache-control")?; -let grant_write_acp: Option = http::parse_field_value(&m, "x-amz-grant-write-acp")?; + let checksum_algorithm: Option = http::parse_field_value(&m, "x-amz-sdk-checksum-algorithm")?; -let if_match: Option = http::parse_field_value(&m, "if-match")?; + let checksum_crc32: Option = http::parse_field_value(&m, "x-amz-checksum-crc32")?; -let if_none_match: Option = http::parse_field_value(&m, "if-none-match")?; + let checksum_crc32c: Option = http::parse_field_value(&m, "x-amz-checksum-crc32c")?; + let checksum_crc64nvme: Option = http::parse_field_value(&m, "x-amz-checksum-crc64nvme")?; -let metadata: Option = { - let mut metadata = Metadata::default(); - for (name, value) in m.fields() { - if let Some(key) = name.strip_prefix("x-amz-meta-") { - if key.is_empty() { continue; } - metadata.insert(key.to_owned(), value.clone()); - } - } - if metadata.is_empty() { None } else { Some(metadata) } -}; + let checksum_sha1: Option = http::parse_field_value(&m, "x-amz-checksum-sha1")?; -let object_lock_legal_hold_status: Option = http::parse_field_value(&m, "x-amz-object-lock-legal-hold")?; + let checksum_sha256: Option = http::parse_field_value(&m, "x-amz-checksum-sha256")?; -let object_lock_mode: Option = http::parse_field_value(&m, "x-amz-object-lock-mode")?; + let content_disposition: Option = http::parse_field_value(&m, "content-disposition")?; -let object_lock_retain_until_date: Option = http::parse_field_value_timestamp(&m, "x-amz-object-lock-retain-until-date", TimestampFormat::DateTime)?; + let content_encoding: Option = http::parse_field_value(&m, "content-encoding")?; -let request_payer: Option = http::parse_field_value(&m, "x-amz-request-payer")?; + let content_language: Option = http::parse_field_value(&m, "content-language")?; -let sse_customer_algorithm: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-algorithm")?; + let content_md5: Option = http::parse_field_value(&m, "content-md5")?; -let sse_customer_key: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key")?; + let content_type: Option = http::parse_field_value(&m, "content-type")?; -let sse_customer_key_md5: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key-md5")?; + let expected_bucket_owner: Option = http::parse_field_value(&m, "x-amz-expected-bucket-owner")?; -let ssekms_encryption_context: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-context")?; + let expires: Option = http::parse_field_value_timestamp(&m, "expires", TimestampFormat::HttpDate)?; -let ssekms_key_id: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-aws-kms-key-id")?; + let grant_full_control: Option = http::parse_field_value(&m, "x-amz-grant-full-control")?; -let server_side_encryption: Option = http::parse_field_value(&m, "x-amz-server-side-encryption")?; + let grant_read: Option = http::parse_field_value(&m, "x-amz-grant-read")?; -let storage_class: Option = http::parse_field_value(&m, "x-amz-storage-class")?; + let grant_read_acp: Option = http::parse_field_value(&m, "x-amz-grant-read-acp")?; -let tagging: Option = http::parse_field_value(&m, "x-amz-tagging")?; + let grant_write_acp: Option = http::parse_field_value(&m, "x-amz-grant-write-acp")?; -let website_redirect_location: Option = http::parse_field_value(&m, "x-amz-website-redirect-location")?; + let if_match: Option = http::parse_field_value(&m, "if-match")?; -let write_offset_bytes: Option = http::parse_field_value(&m, "x-amz-write-offset-bytes")?; + let if_none_match: Option = http::parse_field_value(&m, "if-none-match")?; -Ok(PutObjectInput { -acl, -body, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_md5, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -if_match, -if_none_match, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -website_redirect_location, -write_offset_bytes, -}) -} + let metadata: Option = { + let mut metadata = Metadata::default(); + for (name, value) in m.fields() { + if let Some(key) = name.strip_prefix("x-amz-meta-") { + if key.is_empty() { + continue; + } + metadata.insert(key.to_owned(), value.clone()); + } + } + if metadata.is_empty() { None } else { Some(metadata) } + }; -pub fn serialize_http(x: PutObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; -http::add_opt_header(&mut res, ETAG, x.e_tag)?; -http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_SIZE, x.size)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + let object_lock_legal_hold_status: Option = + http::parse_field_value(&m, "x-amz-object-lock-legal-hold")?; + + let object_lock_mode: Option = http::parse_field_value(&m, "x-amz-object-lock-mode")?; + + let object_lock_retain_until_date: Option = + http::parse_field_value_timestamp(&m, "x-amz-object-lock-retain-until-date", TimestampFormat::DateTime)?; + + let request_payer: Option = http::parse_field_value(&m, "x-amz-request-payer")?; + + let sse_customer_algorithm: Option = + http::parse_field_value(&m, "x-amz-server-side-encryption-customer-algorithm")?; + + let sse_customer_key: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key")?; + + let sse_customer_key_md5: Option = + http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key-md5")?; + + let ssekms_encryption_context: Option = + http::parse_field_value(&m, "x-amz-server-side-encryption-context")?; + + let ssekms_key_id: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-aws-kms-key-id")?; + + let server_side_encryption: Option = http::parse_field_value(&m, "x-amz-server-side-encryption")?; + + let storage_class: Option = http::parse_field_value(&m, "x-amz-storage-class")?; + + let tagging: Option = http::parse_field_value(&m, "x-amz-tagging")?; + + let website_redirect_location: Option = + http::parse_field_value(&m, "x-amz-website-redirect-location")?; + + let write_offset_bytes: Option = http::parse_field_value(&m, "x-amz-write-offset-bytes")?; + + Ok(PutObjectInput { + acl, + body, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_md5, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + if_match, + if_none_match, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + website_redirect_location, + write_offset_bytes, + }) + } + pub fn serialize_http(x: PutObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; + http::add_opt_header(&mut res, ETAG, x.e_tag)?; + http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_SIZE, x.size)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObject { -fn name(&self) -> &'static str { -"PutObject" -} + fn name(&self) -> &'static str { + "PutObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object(&mut s3_req).await?; -} -let result = s3.put_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object(&mut s3_req).await?; + } + let result = s3.put_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectAcl; impl PutObjectAcl { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let access_control_policy: Option = http::take_opt_xml_body(req)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; + let access_control_policy: Option = http::take_opt_xml_body(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; + let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(PutObjectAclInput { -acl, -access_control_policy, -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -key, -request_payer, -version_id, -}) -} - - -pub fn serialize_http(x: PutObjectAclOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(PutObjectAclInput { + acl, + access_control_policy, + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: PutObjectAclOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectAcl { -fn name(&self) -> &'static str { -"PutObjectAcl" -} + fn name(&self) -> &'static str { + "PutObjectAcl" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_acl(&mut s3_req).await?; -} -let result = s3.put_object_acl(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_acl(&mut s3_req).await?; + } + let result = s3.put_object_acl(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectLegalHold; impl PutObjectLegalHold { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - - -let legal_hold: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); - } - Err(e) => return Err(e), -}; - -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let legal_hold: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); + } + Err(e) => return Err(e), + }; -Ok(PutObjectLegalHoldInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -legal_hold, -request_payer, -version_id, -}) -} + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: PutObjectLegalHoldOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(PutObjectLegalHoldInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + legal_hold, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: PutObjectLegalHoldOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectLegalHold { -fn name(&self) -> &'static str { -"PutObjectLegalHold" -} + fn name(&self) -> &'static str { + "PutObjectLegalHold" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_legal_hold(&mut s3_req).await?; -} -let result = s3.put_object_legal_hold(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_legal_hold(&mut s3_req).await?; + } + let result = s3.put_object_legal_hold(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectLockConfiguration; impl PutObjectLockConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let object_lock_configuration: Option = http::take_opt_xml_body(req)?; -let object_lock_configuration: Option = http::take_opt_xml_body(req)?; - -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; - -Ok(PutObjectLockConfigurationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -object_lock_configuration, -request_payer, -token, -}) -} + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; -pub fn serialize_http(x: PutObjectLockConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(PutObjectLockConfigurationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + object_lock_configuration, + request_payer, + token, + }) + } + pub fn serialize_http(x: PutObjectLockConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectLockConfiguration { -fn name(&self) -> &'static str { -"PutObjectLockConfiguration" -} + fn name(&self) -> &'static str { + "PutObjectLockConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_lock_configuration(&mut s3_req).await?; -} -let result = s3.put_object_lock_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_lock_configuration(&mut s3_req).await?; + } + let result = s3.put_object_lock_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectRetention; impl PutObjectRetention { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let bypass_governance_retention: Option = + http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; -let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let retention: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); + } + Err(e) => return Err(e), + }; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let retention: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); + let version_id: Option = http::parse_opt_query(req, "versionId")?; + + Ok(PutObjectRetentionInput { + bucket, + bypass_governance_retention, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + request_payer, + retention, + version_id, + }) } - Err(e) => return Err(e), -}; - -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(PutObjectRetentionInput { -bucket, -bypass_governance_retention, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -request_payer, -retention, -version_id, -}) -} - - -pub fn serialize_http(x: PutObjectRetentionOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + pub fn serialize_http(x: PutObjectRetentionOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectRetention { -fn name(&self) -> &'static str { -"PutObjectRetention" -} + fn name(&self) -> &'static str { + "PutObjectRetention" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_retention(&mut s3_req).await?; -} -let result = s3.put_object_retention(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_retention(&mut s3_req).await?; + } + let result = s3.put_object_retention(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectTagging; impl PutObjectTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let tagging: Tagging = http::take_xml_body(req)?; -let tagging: Tagging = http::take_xml_body(req)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(PutObjectTaggingInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -request_payer, -tagging, -version_id, -}) -} - - -pub fn serialize_http(x: PutObjectTaggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(PutObjectTaggingInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + request_payer, + tagging, + version_id, + }) + } + pub fn serialize_http(x: PutObjectTaggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectTagging { -fn name(&self) -> &'static str { -"PutObjectTagging" -} + fn name(&self) -> &'static str { + "PutObjectTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_tagging(&mut s3_req).await?; -} -let result = s3.put_object_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_tagging(&mut s3_req).await?; + } + let result = s3.put_object_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutPublicAccessBlock; impl PutPublicAccessBlock { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let public_access_block_configuration: PublicAccessBlockConfiguration = http::take_xml_body(req)?; -let public_access_block_configuration: PublicAccessBlockConfiguration = http::take_xml_body(req)?; - -Ok(PutPublicAccessBlockInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -public_access_block_configuration, -}) -} - - -pub fn serialize_http(_: PutPublicAccessBlockOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutPublicAccessBlockInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + public_access_block_configuration, + }) + } + pub fn serialize_http(_: PutPublicAccessBlockOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutPublicAccessBlock { -fn name(&self) -> &'static str { -"PutPublicAccessBlock" -} + fn name(&self) -> &'static str { + "PutPublicAccessBlock" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_public_access_block(&mut s3_req).await?; -} -let result = s3.put_public_access_block(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_public_access_block(&mut s3_req).await?; + } + let result = s3.put_public_access_block(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct RestoreObject; impl RestoreObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let restore_request: Option = http::take_opt_xml_body(req)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let restore_request: Option = http::take_opt_xml_body(req)?; - -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(RestoreObjectInput { -bucket, -checksum_algorithm, -expected_bucket_owner, -key, -request_payer, -restore_request, -version_id, -}) -} - - -pub fn serialize_http(x: RestoreObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_RESTORE_OUTPUT_PATH, x.restore_output_path)?; -Ok(res) -} + Ok(RestoreObjectInput { + bucket, + checksum_algorithm, + expected_bucket_owner, + key, + request_payer, + restore_request, + version_id, + }) + } + pub fn serialize_http(x: RestoreObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_RESTORE_OUTPUT_PATH, x.restore_output_path)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for RestoreObject { -fn name(&self) -> &'static str { -"RestoreObject" -} + fn name(&self) -> &'static str { + "RestoreObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.restore_object(&mut s3_req).await?; -} -let result = s3.restore_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.restore_object(&mut s3_req).await?; + } + let result = s3.restore_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct SelectObjectContent; impl SelectObjectContent { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let request: SelectObjectContentRequest = http::take_xml_body(req)?; - -Ok(SelectObjectContentInput { -bucket, -expected_bucket_owner, -key, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -request, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let request: SelectObjectContentRequest = http::take_xml_body(req)?; -pub fn serialize_http(x: SelectObjectContentOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(val) = x.payload { -http::set_event_stream_body(&mut res, val); -} -Ok(res) -} + Ok(SelectObjectContentInput { + bucket, + expected_bucket_owner, + key, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + request, + }) + } + pub fn serialize_http(x: SelectObjectContentOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(val) = x.payload { + http::set_event_stream_body(&mut res, val); + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for SelectObjectContent { -fn name(&self) -> &'static str { -"SelectObjectContent" -} + fn name(&self) -> &'static str { + "SelectObjectContent" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.select_object_content(&mut s3_req).await?; -} -let result = s3.select_object_content(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.select_object_content(&mut s3_req).await?; + } + let result = s3.select_object_content(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct UploadPart; impl UploadPart { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - -let body: Option = Some(http::take_stream_body(req)); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; + let body: Option = Some(http::take_stream_body(req)); -let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; + let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; -let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; + let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; -let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; + let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; + let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; -let part_number: PartNumber = http::parse_query(req, "partNumber")?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let part_number: PartNumber = http::parse_query(req, "partNumber")?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -Ok(UploadPartInput { -body, -bucket, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_length, -content_md5, -expected_bucket_owner, -key, -part_number, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; -pub fn serialize_http(x: UploadPartOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; -http::add_opt_header(&mut res, ETAG, x.e_tag)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -Ok(res) -} + Ok(UploadPartInput { + body, + bucket, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_length, + content_md5, + expected_bucket_owner, + key, + part_number, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + pub fn serialize_http(x: UploadPartOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; + http::add_opt_header(&mut res, ETAG, x.e_tag)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for UploadPart { -fn name(&self) -> &'static str { -"UploadPart" -} + fn name(&self) -> &'static str { + "UploadPart" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.upload_part(&mut s3_req).await?; -} -let result = s3.upload_part(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.upload_part(&mut s3_req).await?; + } + let result = s3.upload_part(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct UploadPartCopy; impl UploadPartCopy { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; - -let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let copy_source_if_modified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; -let copy_source_if_none_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; + let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; -let copy_source_if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; + let copy_source_if_modified_since: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; -let copy_source_range: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_RANGE)?; + let copy_source_if_none_match: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; -let copy_source_sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let copy_source_if_unmodified_since: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; -let copy_source_sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let copy_source_range: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_RANGE)?; -let copy_source_sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let copy_source_sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let copy_source_sse_customer_key: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; + let copy_source_sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let part_number: PartNumber = http::parse_query(req, "partNumber")?; + let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let part_number: PartNumber = http::parse_query(req, "partNumber")?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - -Ok(UploadPartCopyInput { -bucket, -copy_source, -copy_source_if_match, -copy_source_if_modified_since, -copy_source_if_none_match, -copy_source_if_unmodified_since, -copy_source_range, -copy_source_sse_customer_algorithm, -copy_source_sse_customer_key, -copy_source_sse_customer_key_md5, -expected_bucket_owner, -expected_source_bucket_owner, -key, -part_number, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; -pub fn serialize_http(x: UploadPartCopyOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.copy_part_result { - http::set_xml_body(&mut res, val)?; -} -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -Ok(res) -} + Ok(UploadPartCopyInput { + bucket, + copy_source, + copy_source_if_match, + copy_source_if_modified_since, + copy_source_if_none_match, + copy_source_if_unmodified_since, + copy_source_range, + copy_source_sse_customer_algorithm, + copy_source_sse_customer_key, + copy_source_sse_customer_key_md5, + expected_bucket_owner, + expected_source_bucket_owner, + key, + part_number, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + pub fn serialize_http(x: UploadPartCopyOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.copy_part_result { + http::set_xml_body(&mut res, val)?; + } + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for UploadPartCopy { -fn name(&self) -> &'static str { -"UploadPartCopy" -} + fn name(&self) -> &'static str { + "UploadPartCopy" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.upload_part_copy(&mut s3_req).await?; -} -let result = s3.upload_part_copy(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.upload_part_copy(&mut s3_req).await?; + } + let result = s3.upload_part_copy(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct WriteGetObjectResponse; impl WriteGetObjectResponse { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let accept_ranges: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_ACCEPT_RANGES)?; - -let body: Option = Some(http::take_stream_body(req)); - -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - -let cache_control: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CACHE_CONTROL)?; - -let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32)?; - -let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C)?; - -let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME)?; - -let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1)?; - -let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA256)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let accept_ranges: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_ACCEPT_RANGES)?; -let content_disposition: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_DISPOSITION)?; + let body: Option = Some(http::take_stream_body(req)); -let content_encoding: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_ENCODING)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let content_language: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_LANGUAGE)?; + let cache_control: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CACHE_CONTROL)?; -let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; + let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32)?; -let content_range: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_RANGE)?; + let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C)?; -let content_type: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_TYPE)?; + let checksum_crc64nvme: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME)?; -let delete_marker: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_DELETE_MARKER)?; + let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1)?; -let e_tag: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_E_TAG)?; + let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA256)?; -let error_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_CODE)?; + let content_disposition: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_DISPOSITION)?; -let error_message: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_MESSAGE)?; + let content_encoding: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_ENCODING)?; -let expiration: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_EXPIRATION)?; + let content_language: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_LANGUAGE)?; -let expires: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_EXPIRES, TimestampFormat::HttpDate)?; + let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; -let last_modified: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_LAST_MODIFIED, TimestampFormat::HttpDate)?; + let content_range: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_RANGE)?; -let metadata: Option = http::parse_opt_metadata(req)?; + let content_type: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_TYPE)?; -let missing_meta: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MISSING_META)?; + let delete_marker: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_DELETE_MARKER)?; -let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; + let e_tag: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_E_TAG)?; -let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE)?; + let error_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_CODE)?; -let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let error_message: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_MESSAGE)?; -let parts_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT)?; + let expiration: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_EXPIRATION)?; -let replication_status: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS)?; + let expires: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_EXPIRES, TimestampFormat::HttpDate)?; -let request_charged: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED)?; + let last_modified: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_LAST_MODIFIED, TimestampFormat::HttpDate)?; -let request_route: RequestRoute = http::parse_header(req, &X_AMZ_REQUEST_ROUTE)?; + let metadata: Option = http::parse_opt_metadata(req)?; -let request_token: RequestToken = http::parse_header(req, &X_AMZ_REQUEST_TOKEN)?; + let missing_meta: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MISSING_META)?; -let restore: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_RESTORE)?; + let object_lock_legal_hold_status: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION)?; - -let status_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_STATUS)?; - -let storage_class: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS)?; - -let tag_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_TAGGING_COUNT)?; - -let version_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_VERSION_ID)?; - -Ok(WriteGetObjectResponseInput { -accept_ranges, -body, -bucket_key_enabled, -cache_control, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_range, -content_type, -delete_marker, -e_tag, -error_code, -error_message, -expiration, -expires, -last_modified, -metadata, -missing_meta, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -parts_count, -replication_status, -request_charged, -request_route, -request_token, -restore, -sse_customer_algorithm, -sse_customer_key_md5, -ssekms_key_id, -server_side_encryption, -status_code, -storage_class, -tag_count, -version_id, -}) -} + let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE)?; + let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp( + req, + &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, + TimestampFormat::DateTime, + )?; -pub fn serialize_http(_: WriteGetObjectResponseOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + let parts_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT)?; + + let replication_status: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS)?; + + let request_charged: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED)?; + + let request_route: RequestRoute = http::parse_header(req, &X_AMZ_REQUEST_ROUTE)?; + + let request_token: RequestToken = http::parse_header(req, &X_AMZ_REQUEST_TOKEN)?; + + let restore: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_RESTORE)?; + + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + + let ssekms_key_id: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + + let server_side_encryption: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION)?; + + let status_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_STATUS)?; + + let storage_class: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS)?; + + let tag_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_TAGGING_COUNT)?; + + let version_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_VERSION_ID)?; + + Ok(WriteGetObjectResponseInput { + accept_ranges, + body, + bucket_key_enabled, + cache_control, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_range, + content_type, + delete_marker, + e_tag, + error_code, + error_message, + expiration, + expires, + last_modified, + metadata, + missing_meta, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + parts_count, + replication_status, + request_charged, + request_route, + request_token, + restore, + sse_customer_algorithm, + sse_customer_key_md5, + ssekms_key_id, + server_side_encryption, + status_code, + storage_class, + tag_count, + version_id, + }) + } + pub fn serialize_http(_: WriteGetObjectResponseOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for WriteGetObjectResponse { -fn name(&self) -> &'static str { -"WriteGetObjectResponse" -} + fn name(&self) -> &'static str { + "WriteGetObjectResponse" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.write_get_object_response(&mut s3_req).await?; -} -let result = s3.write_get_object_response(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.write_get_object_response(&mut s3_req).await?; + } + let result = s3.write_get_object_response(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PostObject; @@ -6942,10 +6731,8 @@ impl PostObject { .append_pair("etag", etag_str); let mut res = http::Response::with_status(http::StatusCode::SEE_OTHER); - res.headers.insert( - hyper::header::LOCATION, - url.as_str().parse().map_err(|e| s3_error!(e, InternalError))? - ); + res.headers + .insert(hyper::header::LOCATION, url.as_str().parse().map_err(|e| s3_error!(e, InternalError))?); return Ok(res); } @@ -7011,366 +6798,361 @@ impl super::Operation for PostObject { Err(err) => return super::serialize_error(err, false), }; // Serialize with POST-specific response behavior - let mut resp = Self::serialize_http( - &bucket, - &key, - success_action_redirect.as_deref(), - success_action_status, - &s3_resp.output, - )?; + let mut resp = + Self::serialize_http(&bucket, &key, success_action_redirect.as_deref(), success_action_status, &s3_resp.output)?; resp.headers.extend(s3_resp.headers); resp.extensions.extend(s3_resp.extensions); Ok(resp) } } -pub fn resolve_route(req: &http::Request, s3_path: &S3Path, qs: Option<&http::OrderedQs>)-> S3Result<(&'static dyn super::Operation, bool)> { -match req.method { -hyper::Method::HEAD => match s3_path { -S3Path::Root => { -Err(super::unknown_operation()) -} -S3Path::Bucket{ .. } => { -Ok((&HeadBucket as &'static dyn super::Operation, false)) -} -S3Path::Object{ .. } => { -Ok((&HeadObject as &'static dyn super::Operation, false)) -} -} -hyper::Method::GET => match s3_path { -S3Path::Root => { -if let Some(qs) = qs { -if super::check_query_pattern(qs, "x-id","ListDirectoryBuckets") { -return Ok((&ListDirectoryBuckets as &'static dyn super::Operation, false)); -} -} -Ok((&ListBuckets as &'static dyn super::Operation, false)) -} -S3Path::Bucket{ .. } => { -if let Some(qs) = qs { -if qs.has("analytics") && qs.has("id") { -return Ok((&GetBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("intelligent-tiering") && qs.has("id") { -return Ok((&GetBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("inventory") && qs.has("id") { -return Ok((&GetBucketInventoryConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("metrics") && qs.has("id") { -return Ok((&GetBucketMetricsConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("session") { -return Ok((&CreateSession as &'static dyn super::Operation, false)); -} -if qs.has("accelerate") { -return Ok((&GetBucketAccelerateConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("acl") { -return Ok((&GetBucketAcl as &'static dyn super::Operation, false)); -} -if qs.has("cors") { -return Ok((&GetBucketCors as &'static dyn super::Operation, false)); -} -if qs.has("encryption") { -return Ok((&GetBucketEncryption as &'static dyn super::Operation, false)); -} -if qs.has("lifecycle") { -return Ok((&GetBucketLifecycleConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("location") { -return Ok((&GetBucketLocation as &'static dyn super::Operation, false)); -} -if qs.has("logging") { -return Ok((&GetBucketLogging as &'static dyn super::Operation, false)); -} -if qs.has("metadataTable") { -return Ok((&GetBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("notification") { -return Ok((&GetBucketNotificationConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("ownershipControls") { -return Ok((&GetBucketOwnershipControls as &'static dyn super::Operation, false)); -} -if qs.has("policy") { -return Ok((&GetBucketPolicy as &'static dyn super::Operation, false)); -} -if qs.has("policyStatus") { -return Ok((&GetBucketPolicyStatus as &'static dyn super::Operation, false)); -} -if qs.has("replication") { -return Ok((&GetBucketReplication as &'static dyn super::Operation, false)); -} -if qs.has("requestPayment") { -return Ok((&GetBucketRequestPayment as &'static dyn super::Operation, false)); -} -if qs.has("tagging") { -return Ok((&GetBucketTagging as &'static dyn super::Operation, false)); -} -if qs.has("versioning") { -return Ok((&GetBucketVersioning as &'static dyn super::Operation, false)); -} -if qs.has("website") { -return Ok((&GetBucketWebsite as &'static dyn super::Operation, false)); -} -if qs.has("object-lock") { -return Ok((&GetObjectLockConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("publicAccessBlock") { -return Ok((&GetPublicAccessBlock as &'static dyn super::Operation, false)); -} -if qs.has("analytics") && !qs.has("id") { -return Ok((&ListBucketAnalyticsConfigurations as &'static dyn super::Operation, false)); -} -if qs.has("intelligent-tiering") && !qs.has("id") { -return Ok((&ListBucketIntelligentTieringConfigurations as &'static dyn super::Operation, false)); -} -if qs.has("inventory") && !qs.has("id") { -return Ok((&ListBucketInventoryConfigurations as &'static dyn super::Operation, false)); -} -if qs.has("metrics") && !qs.has("id") { -return Ok((&ListBucketMetricsConfigurations as &'static dyn super::Operation, false)); -} -if qs.has("uploads") { -return Ok((&ListMultipartUploads as &'static dyn super::Operation, false)); -} -if qs.has("versions") { -return Ok((&ListObjectVersions as &'static dyn super::Operation, false)); -} -if super::check_query_pattern(qs, "list-type","2") { -return Ok((&ListObjectsV2 as &'static dyn super::Operation, false)); -} -} -Ok((&ListObjects as &'static dyn super::Operation, false)) -} -S3Path::Object{ .. } => { -if let Some(qs) = qs { -if qs.has("attributes") { -return Ok((&GetObjectAttributes as &'static dyn super::Operation, false)); -} -if qs.has("acl") { -return Ok((&GetObjectAcl as &'static dyn super::Operation, false)); -} -if qs.has("legal-hold") { -return Ok((&GetObjectLegalHold as &'static dyn super::Operation, false)); -} -if qs.has("retention") { -return Ok((&GetObjectRetention as &'static dyn super::Operation, false)); -} -if qs.has("tagging") { -return Ok((&GetObjectTagging as &'static dyn super::Operation, false)); -} -if qs.has("torrent") { -return Ok((&GetObjectTorrent as &'static dyn super::Operation, false)); -} -} -if let Some(qs) = qs - && qs.has("uploadId") { -return Ok((&ListParts as &'static dyn super::Operation, false)); -} -Ok((&GetObject as &'static dyn super::Operation, false)) -} -} -hyper::Method::POST => match s3_path { -S3Path::Root => { -Err(super::unknown_operation()) -} -S3Path::Bucket{ .. } => { -if let Some(qs) = qs { -if qs.has("metadataTable") { -return Ok((&CreateBucketMetadataTableConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("delete") { -return Ok((&DeleteObjects as &'static dyn super::Operation, true)); -} -} -if req.headers.contains_key("x-amz-request-route") && req.headers.contains_key("x-amz-request-token") { -return Ok((&WriteGetObjectResponse as &'static dyn super::Operation, false)); -} -Err(super::unknown_operation()) -} -S3Path::Object{ .. } => { -if let Some(qs) = qs { -if qs.has("select") && super::check_query_pattern(qs, "select-type","2") { -return Ok((&SelectObjectContent as &'static dyn super::Operation, true)); -} -if qs.has("uploads") { -return Ok((&CreateMultipartUpload as &'static dyn super::Operation, false)); -} -if qs.has("restore") { -return Ok((&RestoreObject as &'static dyn super::Operation, true)); -} -} -if let Some(qs) = qs - && qs.has("uploadId") { -return Ok((&CompleteMultipartUpload as &'static dyn super::Operation, true)); -} -Err(super::unknown_operation()) -} -} -hyper::Method::PUT => match s3_path { -S3Path::Root => { -Err(super::unknown_operation()) -} -S3Path::Bucket{ .. } => { -if let Some(qs) = qs { -if qs.has("analytics") { -return Ok((&PutBucketAnalyticsConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("intelligent-tiering") { -return Ok((&PutBucketIntelligentTieringConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("inventory") { -return Ok((&PutBucketInventoryConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("metrics") { -return Ok((&PutBucketMetricsConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("accelerate") { -return Ok((&PutBucketAccelerateConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("acl") { -return Ok((&PutBucketAcl as &'static dyn super::Operation, true)); -} -if qs.has("cors") { -return Ok((&PutBucketCors as &'static dyn super::Operation, true)); -} -if qs.has("encryption") { -return Ok((&PutBucketEncryption as &'static dyn super::Operation, true)); -} -if qs.has("lifecycle") { -return Ok((&PutBucketLifecycleConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("logging") { -return Ok((&PutBucketLogging as &'static dyn super::Operation, true)); -} -if qs.has("notification") { -return Ok((&PutBucketNotificationConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("ownershipControls") { -return Ok((&PutBucketOwnershipControls as &'static dyn super::Operation, true)); -} -if qs.has("policy") { -return Ok((&PutBucketPolicy as &'static dyn super::Operation, true)); -} -if qs.has("replication") { -return Ok((&PutBucketReplication as &'static dyn super::Operation, true)); -} -if qs.has("requestPayment") { -return Ok((&PutBucketRequestPayment as &'static dyn super::Operation, true)); -} -if qs.has("tagging") { -return Ok((&PutBucketTagging as &'static dyn super::Operation, true)); -} -if qs.has("versioning") { -return Ok((&PutBucketVersioning as &'static dyn super::Operation, true)); -} -if qs.has("website") { -return Ok((&PutBucketWebsite as &'static dyn super::Operation, true)); -} -if qs.has("object-lock") { -return Ok((&PutObjectLockConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("publicAccessBlock") { -return Ok((&PutPublicAccessBlock as &'static dyn super::Operation, true)); -} -} -Ok((&CreateBucket as &'static dyn super::Operation, true)) -} -S3Path::Object{ .. } => { -if let Some(qs) = qs { -if qs.has("acl") { -return Ok((&PutObjectAcl as &'static dyn super::Operation, true)); -} -if qs.has("legal-hold") { -return Ok((&PutObjectLegalHold as &'static dyn super::Operation, true)); -} -if qs.has("retention") { -return Ok((&PutObjectRetention as &'static dyn super::Operation, true)); -} -if qs.has("tagging") { -return Ok((&PutObjectTagging as &'static dyn super::Operation, true)); -} -} -if let Some(qs) = qs - && qs.has("partNumber") && qs.has("uploadId") && req.headers.contains_key("x-amz-copy-source") { -return Ok((&UploadPartCopy as &'static dyn super::Operation, false)); -} -if let Some(qs) = qs - && qs.has("partNumber") && qs.has("uploadId") { -return Ok((&UploadPart as &'static dyn super::Operation, false)); -} -if req.headers.contains_key("x-amz-copy-source") { -return Ok((&CopyObject as &'static dyn super::Operation, false)); -} -Ok((&PutObject as &'static dyn super::Operation, false)) -} -} -hyper::Method::DELETE => match s3_path { -S3Path::Root => { -Err(super::unknown_operation()) -} -S3Path::Bucket{ .. } => { -if let Some(qs) = qs { -if qs.has("analytics") { -return Ok((&DeleteBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("intelligent-tiering") { -return Ok((&DeleteBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("inventory") { -return Ok((&DeleteBucketInventoryConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("metrics") { -return Ok((&DeleteBucketMetricsConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("cors") { -return Ok((&DeleteBucketCors as &'static dyn super::Operation, false)); -} -if qs.has("encryption") { -return Ok((&DeleteBucketEncryption as &'static dyn super::Operation, false)); -} -if qs.has("lifecycle") { -return Ok((&DeleteBucketLifecycle as &'static dyn super::Operation, false)); -} -if qs.has("metadataTable") { -return Ok((&DeleteBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("ownershipControls") { -return Ok((&DeleteBucketOwnershipControls as &'static dyn super::Operation, false)); -} -if qs.has("policy") { -return Ok((&DeleteBucketPolicy as &'static dyn super::Operation, false)); -} -if qs.has("replication") { -return Ok((&DeleteBucketReplication as &'static dyn super::Operation, false)); -} -if qs.has("tagging") { -return Ok((&DeleteBucketTagging as &'static dyn super::Operation, false)); -} -if qs.has("website") { -return Ok((&DeleteBucketWebsite as &'static dyn super::Operation, false)); -} -if qs.has("publicAccessBlock") { -return Ok((&DeletePublicAccessBlock as &'static dyn super::Operation, false)); -} -} -Ok((&DeleteBucket as &'static dyn super::Operation, false)) -} -S3Path::Object{ .. } => { -if let Some(qs) = qs { -if qs.has("tagging") { -return Ok((&DeleteObjectTagging as &'static dyn super::Operation, false)); -} -} -if let Some(qs) = qs - && qs.has("uploadId") { -return Ok((&AbortMultipartUpload as &'static dyn super::Operation, false)); -} -Ok((&DeleteObject as &'static dyn super::Operation, false)) -} -} -_ => Err(super::unknown_operation()) -} +pub fn resolve_route( + req: &http::Request, + s3_path: &S3Path, + qs: Option<&http::OrderedQs>, +) -> S3Result<(&'static dyn super::Operation, bool)> { + match req.method { + hyper::Method::HEAD => match s3_path { + S3Path::Root => Err(super::unknown_operation()), + S3Path::Bucket { .. } => Ok((&HeadBucket as &'static dyn super::Operation, false)), + S3Path::Object { .. } => Ok((&HeadObject as &'static dyn super::Operation, false)), + }, + hyper::Method::GET => match s3_path { + S3Path::Root => { + if let Some(qs) = qs { + if super::check_query_pattern(qs, "x-id", "ListDirectoryBuckets") { + return Ok((&ListDirectoryBuckets as &'static dyn super::Operation, false)); + } + } + Ok((&ListBuckets as &'static dyn super::Operation, false)) + } + S3Path::Bucket { .. } => { + if let Some(qs) = qs { + if qs.has("analytics") && qs.has("id") { + return Ok((&GetBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("intelligent-tiering") && qs.has("id") { + return Ok((&GetBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("inventory") && qs.has("id") { + return Ok((&GetBucketInventoryConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("metrics") && qs.has("id") { + return Ok((&GetBucketMetricsConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("session") { + return Ok((&CreateSession as &'static dyn super::Operation, false)); + } + if qs.has("accelerate") { + return Ok((&GetBucketAccelerateConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("acl") { + return Ok((&GetBucketAcl as &'static dyn super::Operation, false)); + } + if qs.has("cors") { + return Ok((&GetBucketCors as &'static dyn super::Operation, false)); + } + if qs.has("encryption") { + return Ok((&GetBucketEncryption as &'static dyn super::Operation, false)); + } + if qs.has("lifecycle") { + return Ok((&GetBucketLifecycleConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("location") { + return Ok((&GetBucketLocation as &'static dyn super::Operation, false)); + } + if qs.has("logging") { + return Ok((&GetBucketLogging as &'static dyn super::Operation, false)); + } + if qs.has("metadataTable") { + return Ok((&GetBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("notification") { + return Ok((&GetBucketNotificationConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("ownershipControls") { + return Ok((&GetBucketOwnershipControls as &'static dyn super::Operation, false)); + } + if qs.has("policy") { + return Ok((&GetBucketPolicy as &'static dyn super::Operation, false)); + } + if qs.has("policyStatus") { + return Ok((&GetBucketPolicyStatus as &'static dyn super::Operation, false)); + } + if qs.has("replication") { + return Ok((&GetBucketReplication as &'static dyn super::Operation, false)); + } + if qs.has("requestPayment") { + return Ok((&GetBucketRequestPayment as &'static dyn super::Operation, false)); + } + if qs.has("tagging") { + return Ok((&GetBucketTagging as &'static dyn super::Operation, false)); + } + if qs.has("versioning") { + return Ok((&GetBucketVersioning as &'static dyn super::Operation, false)); + } + if qs.has("website") { + return Ok((&GetBucketWebsite as &'static dyn super::Operation, false)); + } + if qs.has("object-lock") { + return Ok((&GetObjectLockConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("publicAccessBlock") { + return Ok((&GetPublicAccessBlock as &'static dyn super::Operation, false)); + } + if qs.has("analytics") && !qs.has("id") { + return Ok((&ListBucketAnalyticsConfigurations as &'static dyn super::Operation, false)); + } + if qs.has("intelligent-tiering") && !qs.has("id") { + return Ok((&ListBucketIntelligentTieringConfigurations as &'static dyn super::Operation, false)); + } + if qs.has("inventory") && !qs.has("id") { + return Ok((&ListBucketInventoryConfigurations as &'static dyn super::Operation, false)); + } + if qs.has("metrics") && !qs.has("id") { + return Ok((&ListBucketMetricsConfigurations as &'static dyn super::Operation, false)); + } + if qs.has("uploads") { + return Ok((&ListMultipartUploads as &'static dyn super::Operation, false)); + } + if qs.has("versions") { + return Ok((&ListObjectVersions as &'static dyn super::Operation, false)); + } + if super::check_query_pattern(qs, "list-type", "2") { + return Ok((&ListObjectsV2 as &'static dyn super::Operation, false)); + } + } + Ok((&ListObjects as &'static dyn super::Operation, false)) + } + S3Path::Object { .. } => { + if let Some(qs) = qs { + if qs.has("attributes") { + return Ok((&GetObjectAttributes as &'static dyn super::Operation, false)); + } + if qs.has("acl") { + return Ok((&GetObjectAcl as &'static dyn super::Operation, false)); + } + if qs.has("legal-hold") { + return Ok((&GetObjectLegalHold as &'static dyn super::Operation, false)); + } + if qs.has("retention") { + return Ok((&GetObjectRetention as &'static dyn super::Operation, false)); + } + if qs.has("tagging") { + return Ok((&GetObjectTagging as &'static dyn super::Operation, false)); + } + if qs.has("torrent") { + return Ok((&GetObjectTorrent as &'static dyn super::Operation, false)); + } + } + if let Some(qs) = qs + && qs.has("uploadId") + { + return Ok((&ListParts as &'static dyn super::Operation, false)); + } + Ok((&GetObject as &'static dyn super::Operation, false)) + } + }, + hyper::Method::POST => match s3_path { + S3Path::Root => Err(super::unknown_operation()), + S3Path::Bucket { .. } => { + if let Some(qs) = qs { + if qs.has("metadataTable") { + return Ok((&CreateBucketMetadataTableConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("delete") { + return Ok((&DeleteObjects as &'static dyn super::Operation, true)); + } + } + if req.headers.contains_key("x-amz-request-route") && req.headers.contains_key("x-amz-request-token") { + return Ok((&WriteGetObjectResponse as &'static dyn super::Operation, false)); + } + Err(super::unknown_operation()) + } + S3Path::Object { .. } => { + if let Some(qs) = qs { + if qs.has("select") && super::check_query_pattern(qs, "select-type", "2") { + return Ok((&SelectObjectContent as &'static dyn super::Operation, true)); + } + if qs.has("uploads") { + return Ok((&CreateMultipartUpload as &'static dyn super::Operation, false)); + } + if qs.has("restore") { + return Ok((&RestoreObject as &'static dyn super::Operation, true)); + } + } + if let Some(qs) = qs + && qs.has("uploadId") + { + return Ok((&CompleteMultipartUpload as &'static dyn super::Operation, true)); + } + Err(super::unknown_operation()) + } + }, + hyper::Method::PUT => match s3_path { + S3Path::Root => Err(super::unknown_operation()), + S3Path::Bucket { .. } => { + if let Some(qs) = qs { + if qs.has("analytics") { + return Ok((&PutBucketAnalyticsConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("intelligent-tiering") { + return Ok((&PutBucketIntelligentTieringConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("inventory") { + return Ok((&PutBucketInventoryConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("metrics") { + return Ok((&PutBucketMetricsConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("accelerate") { + return Ok((&PutBucketAccelerateConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("acl") { + return Ok((&PutBucketAcl as &'static dyn super::Operation, true)); + } + if qs.has("cors") { + return Ok((&PutBucketCors as &'static dyn super::Operation, true)); + } + if qs.has("encryption") { + return Ok((&PutBucketEncryption as &'static dyn super::Operation, true)); + } + if qs.has("lifecycle") { + return Ok((&PutBucketLifecycleConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("logging") { + return Ok((&PutBucketLogging as &'static dyn super::Operation, true)); + } + if qs.has("notification") { + return Ok((&PutBucketNotificationConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("ownershipControls") { + return Ok((&PutBucketOwnershipControls as &'static dyn super::Operation, true)); + } + if qs.has("policy") { + return Ok((&PutBucketPolicy as &'static dyn super::Operation, true)); + } + if qs.has("replication") { + return Ok((&PutBucketReplication as &'static dyn super::Operation, true)); + } + if qs.has("requestPayment") { + return Ok((&PutBucketRequestPayment as &'static dyn super::Operation, true)); + } + if qs.has("tagging") { + return Ok((&PutBucketTagging as &'static dyn super::Operation, true)); + } + if qs.has("versioning") { + return Ok((&PutBucketVersioning as &'static dyn super::Operation, true)); + } + if qs.has("website") { + return Ok((&PutBucketWebsite as &'static dyn super::Operation, true)); + } + if qs.has("object-lock") { + return Ok((&PutObjectLockConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("publicAccessBlock") { + return Ok((&PutPublicAccessBlock as &'static dyn super::Operation, true)); + } + } + Ok((&CreateBucket as &'static dyn super::Operation, true)) + } + S3Path::Object { .. } => { + if let Some(qs) = qs { + if qs.has("acl") { + return Ok((&PutObjectAcl as &'static dyn super::Operation, true)); + } + if qs.has("legal-hold") { + return Ok((&PutObjectLegalHold as &'static dyn super::Operation, true)); + } + if qs.has("retention") { + return Ok((&PutObjectRetention as &'static dyn super::Operation, true)); + } + if qs.has("tagging") { + return Ok((&PutObjectTagging as &'static dyn super::Operation, true)); + } + } + if let Some(qs) = qs + && qs.has("partNumber") + && qs.has("uploadId") + && req.headers.contains_key("x-amz-copy-source") + { + return Ok((&UploadPartCopy as &'static dyn super::Operation, false)); + } + if let Some(qs) = qs + && qs.has("partNumber") + && qs.has("uploadId") + { + return Ok((&UploadPart as &'static dyn super::Operation, false)); + } + if req.headers.contains_key("x-amz-copy-source") { + return Ok((&CopyObject as &'static dyn super::Operation, false)); + } + Ok((&PutObject as &'static dyn super::Operation, false)) + } + }, + hyper::Method::DELETE => match s3_path { + S3Path::Root => Err(super::unknown_operation()), + S3Path::Bucket { .. } => { + if let Some(qs) = qs { + if qs.has("analytics") { + return Ok((&DeleteBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("intelligent-tiering") { + return Ok((&DeleteBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("inventory") { + return Ok((&DeleteBucketInventoryConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("metrics") { + return Ok((&DeleteBucketMetricsConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("cors") { + return Ok((&DeleteBucketCors as &'static dyn super::Operation, false)); + } + if qs.has("encryption") { + return Ok((&DeleteBucketEncryption as &'static dyn super::Operation, false)); + } + if qs.has("lifecycle") { + return Ok((&DeleteBucketLifecycle as &'static dyn super::Operation, false)); + } + if qs.has("metadataTable") { + return Ok((&DeleteBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("ownershipControls") { + return Ok((&DeleteBucketOwnershipControls as &'static dyn super::Operation, false)); + } + if qs.has("policy") { + return Ok((&DeleteBucketPolicy as &'static dyn super::Operation, false)); + } + if qs.has("replication") { + return Ok((&DeleteBucketReplication as &'static dyn super::Operation, false)); + } + if qs.has("tagging") { + return Ok((&DeleteBucketTagging as &'static dyn super::Operation, false)); + } + if qs.has("website") { + return Ok((&DeleteBucketWebsite as &'static dyn super::Operation, false)); + } + if qs.has("publicAccessBlock") { + return Ok((&DeletePublicAccessBlock as &'static dyn super::Operation, false)); + } + } + Ok((&DeleteBucket as &'static dyn super::Operation, false)) + } + S3Path::Object { .. } => { + if let Some(qs) = qs { + if qs.has("tagging") { + return Ok((&DeleteObjectTagging as &'static dyn super::Operation, false)); + } + } + if let Some(qs) = qs + && qs.has("uploadId") + { + return Ok((&AbortMultipartUpload as &'static dyn super::Operation, false)); + } + Ok((&DeleteObject as &'static dyn super::Operation, false)) + } + }, + _ => Err(super::unknown_operation()), + } } diff --git a/crates/s3s/src/ops/generated_minio.rs b/crates/s3s/src/ops/generated_minio.rs index 63325dba..e0f6ab1f 100644 --- a/crates/s3s/src/ops/generated_minio.rs +++ b/crates/s3s/src/ops/generated_minio.rs @@ -108,6801 +108,6590 @@ #![allow(clippy::unnecessary_wraps)] use crate::dto::*; +use crate::error::*; use crate::header::*; use crate::http; -use crate::error::*; -use crate::path::S3Path; use crate::ops::CallContext; +use crate::path::S3Path; use std::borrow::Cow; impl http::TryIntoHeaderValue for ArchiveStatus { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for BucketCannedACL { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ChecksumAlgorithm { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ChecksumMode { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ChecksumType { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for LocationType { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for MetadataDirective { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectAttributes { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectCannedACL { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectLockLegalHoldStatus { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectLockMode { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ObjectOwnership { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for OptionalObjectAttributes { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ReplicationStatus { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for RequestCharged { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for RequestPayer { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for ServerSideEncryption { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for SessionMode { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for StorageClass { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for TaggingDirective { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryIntoHeaderValue for TransitionDefaultMinimumObjectSize { -type Error = http::InvalidHeaderValue; -fn try_into_header_value(self) -> Result { - match Cow::from(self) { - Cow::Borrowed(s) => http::HeaderValue::try_from(s), - Cow::Owned(s) => http::HeaderValue::try_from(s), + type Error = http::InvalidHeaderValue; + fn try_into_header_value(self) -> Result { + match Cow::from(self) { + Cow::Borrowed(s) => http::HeaderValue::try_from(s), + Cow::Owned(s) => http::HeaderValue::try_from(s), + } } } -} impl http::TryFromHeaderValue for ArchiveStatus { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for BucketCannedACL { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ChecksumAlgorithm { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ChecksumMode { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ChecksumType { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for LocationType { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for MetadataDirective { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectAttributes { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectCannedACL { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectLockLegalHoldStatus { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectLockMode { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ObjectOwnership { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for OptionalObjectAttributes { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ReplicationStatus { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for RequestCharged { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for RequestPayer { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for ServerSideEncryption { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for SessionMode { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for StorageClass { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for TaggingDirective { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } impl http::TryFromHeaderValue for TransitionDefaultMinimumObjectSize { -type Error = http::ParseHeaderError; -fn try_from_header_value(val: &http::HeaderValue) -> Result { - let val = val.to_str().map_err(|_|http::ParseHeaderError::Enum)?; - Ok(Self::from(val.to_owned())) -} + type Error = http::ParseHeaderError; + fn try_from_header_value(val: &http::HeaderValue) -> Result { + let val = val.to_str().map_err(|_| http::ParseHeaderError::Enum)?; + Ok(Self::from(val.to_owned())) + } } pub struct AbortMultipartUpload; impl AbortMultipartUpload { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let if_match_initiated_time: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_INITIATED_TIME, TimestampFormat::HttpDate)?; -let if_match_initiated_time: Option = http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_INITIATED_TIME, TimestampFormat::HttpDate)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - -Ok(AbortMultipartUploadInput { -bucket, -expected_bucket_owner, -if_match_initiated_time, -key, -request_payer, -upload_id, -}) -} - - -pub fn serialize_http(x: AbortMultipartUploadOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(AbortMultipartUploadInput { + bucket, + expected_bucket_owner, + if_match_initiated_time, + key, + request_payer, + upload_id, + }) + } + pub fn serialize_http(x: AbortMultipartUploadOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for AbortMultipartUpload { -fn name(&self) -> &'static str { -"AbortMultipartUpload" -} + fn name(&self) -> &'static str { + "AbortMultipartUpload" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.abort_multipart_upload(&mut s3_req).await?; -} -let result = s3.abort_multipart_upload(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.abort_multipart_upload(&mut s3_req).await?; + } + let result = s3.abort_multipart_upload(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CompleteMultipartUpload; impl CompleteMultipartUpload { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; + let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; -let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; + let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; -let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; + let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; -let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; + let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; -let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; + let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; -let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; + let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; -let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + let mpu_object_size: Option = http::parse_opt_header(req, &X_AMZ_MP_OBJECT_SIZE)?; -let mpu_object_size: Option = http::parse_opt_header(req, &X_AMZ_MP_OBJECT_SIZE)?; + let multipart_upload: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); + } + Err(e) => return Err(e), + }; -let multipart_upload: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + + Ok(CompleteMultipartUploadInput { + bucket, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + checksum_type, + expected_bucket_owner, + if_match, + if_none_match, + key, + mpu_object_size, + multipart_upload, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) } - Err(e) => return Err(e), -}; - -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; - -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - -Ok(CompleteMultipartUploadInput { -bucket, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -checksum_type, -expected_bucket_owner, -if_match, -if_none_match, -key, -mpu_object_size, -multipart_upload, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - - } #[async_trait::async_trait] impl super::Operation for CompleteMultipartUpload { -fn name(&self) -> &'static str { -"CompleteMultipartUpload" -} + fn name(&self) -> &'static str { + "CompleteMultipartUpload" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.complete_multipart_upload(&mut s3_req).await?; -} -let result = s3.complete_multipart_upload(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.complete_multipart_upload(&mut s3_req).await?; + } + let result = s3.complete_multipart_upload(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CopyObject; impl CopyObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; -let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; + let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; -let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; + let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; -let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; + let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; -let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; + let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; -let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; + let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; -let copy_source_if_modified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; -let copy_source_if_none_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; + let copy_source_if_modified_since: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; -let copy_source_if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; + let copy_source_if_none_match: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; -let copy_source_sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let copy_source_if_unmodified_since: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; -let copy_source_sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let copy_source_sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let copy_source_sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let copy_source_sse_customer_key: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let copy_source_sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; + let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -let metadata: Option = http::parse_opt_metadata(req)?; + let metadata: Option = http::parse_opt_metadata(req)?; -let metadata_directive: Option = http::parse_opt_header(req, &X_AMZ_METADATA_DIRECTIVE)?; + let metadata_directive: Option = http::parse_opt_header(req, &X_AMZ_METADATA_DIRECTIVE)?; -let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; + let object_lock_legal_hold_status: Option = + http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; -let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; + let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; -let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let object_lock_retain_until_date: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; + let ssekms_encryption_context: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; -let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; + let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; -let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; + let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; -let tagging_directive: Option = http::parse_opt_header(req, &X_AMZ_TAGGING_DIRECTIVE)?; + let tagging_directive: Option = http::parse_opt_header(req, &X_AMZ_TAGGING_DIRECTIVE)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; + let website_redirect_location: Option = + http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; -Ok(CopyObjectInput { -acl, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -content_disposition, -content_encoding, -content_language, -content_type, -copy_source, -copy_source_if_match, -copy_source_if_modified_since, -copy_source_if_none_match, -copy_source_if_unmodified_since, -copy_source_sse_customer_algorithm, -copy_source_sse_customer_key, -copy_source_sse_customer_key_md5, -expected_bucket_owner, -expected_source_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -key, -metadata, -metadata_directive, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -tagging_directive, -version_id, -website_redirect_location, -}) -} - - -pub fn serialize_http(x: CopyObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.copy_object_result { - http::set_xml_body(&mut res, val)?; -} -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; -http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(CopyObjectInput { + acl, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + content_disposition, + content_encoding, + content_language, + content_type, + copy_source, + copy_source_if_match, + copy_source_if_modified_since, + copy_source_if_none_match, + copy_source_if_unmodified_since, + copy_source_sse_customer_algorithm, + copy_source_sse_customer_key, + copy_source_sse_customer_key_md5, + expected_bucket_owner, + expected_source_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + key, + metadata, + metadata_directive, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + tagging_directive, + version_id, + website_redirect_location, + }) + } + pub fn serialize_http(x: CopyObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.copy_object_result { + http::set_xml_body(&mut res, val)?; + } + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; + http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for CopyObject { -fn name(&self) -> &'static str { -"CopyObject" -} + fn name(&self) -> &'static str { + "CopyObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.copy_object(&mut s3_req).await?; -} -let result = s3.copy_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.copy_object(&mut s3_req).await?; + } + let result = s3.copy_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CreateBucket; impl CreateBucket { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - - -let create_bucket_configuration: Option = http::take_opt_xml_body(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let create_bucket_configuration: Option = http::take_opt_xml_body(req)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -let object_lock_enabled_for_bucket: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_ENABLED)?; + let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; -let object_ownership: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_OWNERSHIP)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -Ok(CreateBucketInput { -acl, -bucket, -create_bucket_configuration, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -object_lock_enabled_for_bucket, -object_ownership, -}) -} + let object_lock_enabled_for_bucket: Option = + http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_ENABLED)?; + let object_ownership: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_OWNERSHIP)?; -pub fn serialize_http(x: CreateBucketOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, LOCATION, x.location)?; -Ok(res) -} + Ok(CreateBucketInput { + acl, + bucket, + create_bucket_configuration, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + object_lock_enabled_for_bucket, + object_ownership, + }) + } + pub fn serialize_http(x: CreateBucketOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, LOCATION, x.location)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for CreateBucket { -fn name(&self) -> &'static str { -"CreateBucket" -} + fn name(&self) -> &'static str { + "CreateBucket" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.create_bucket(&mut s3_req).await?; -} -let result = s3.create_bucket(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.create_bucket(&mut s3_req).await?; + } + let result = s3.create_bucket(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CreateBucketMetadataTableConfiguration; impl CreateBucketMetadataTableConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let metadata_table_configuration: MetadataTableConfiguration = http::take_xml_body(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -Ok(CreateBucketMetadataTableConfigurationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -metadata_table_configuration, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let metadata_table_configuration: MetadataTableConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: CreateBucketMetadataTableConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(CreateBucketMetadataTableConfigurationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + metadata_table_configuration, + }) + } + pub fn serialize_http(_: CreateBucketMetadataTableConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for CreateBucketMetadataTableConfiguration { -fn name(&self) -> &'static str { -"CreateBucketMetadataTableConfiguration" -} + fn name(&self) -> &'static str { + "CreateBucketMetadataTableConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.create_bucket_metadata_table_configuration(&mut s3_req).await?; -} -let result = s3.create_bucket_metadata_table_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.create_bucket_metadata_table_configuration(&mut s3_req).await?; + } + let result = s3.create_bucket_metadata_table_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CreateMultipartUpload; impl CreateMultipartUpload { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; - - -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; + let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; -let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; + let checksum_type: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_TYPE)?; -let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; + let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; -let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; + let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; -let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; + let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -let metadata: Option = http::parse_opt_metadata(req)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; + let metadata: Option = http::parse_opt_metadata(req)?; -let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; + let object_lock_legal_hold_status: Option = + http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; -let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let object_lock_retain_until_date: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + let ssekms_encryption_context: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; -let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; + let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; -let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; + let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; -let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; - -Ok(CreateMultipartUploadInput { -acl, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_type, -content_disposition, -content_encoding, -content_language, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -version_id, -website_redirect_location, -}) -} + let version_id: Option = http::parse_opt_query(req, "versionId")?; + let website_redirect_location: Option = + http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; -pub fn serialize_http(x: CreateMultipartUploadOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; -http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_ALGORITHM, x.checksum_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -Ok(res) -} + Ok(CreateMultipartUploadInput { + acl, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_type, + content_disposition, + content_encoding, + content_language, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + version_id, + website_redirect_location, + }) + } + pub fn serialize_http(x: CreateMultipartUploadOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; + http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_ALGORITHM, x.checksum_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for CreateMultipartUpload { -fn name(&self) -> &'static str { -"CreateMultipartUpload" -} + fn name(&self) -> &'static str { + "CreateMultipartUpload" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.create_multipart_upload(&mut s3_req).await?; -} -let result = s3.create_multipart_upload(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.create_multipart_upload(&mut s3_req).await?; + } + let result = s3.create_multipart_upload(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct CreateSession; impl CreateSession { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + let ssekms_encryption_context: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; -let session_mode: Option = http::parse_opt_header(req, &X_AMZ_CREATE_SESSION_MODE)?; - -Ok(CreateSessionInput { -bucket, -bucket_key_enabled, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -session_mode, -}) -} + let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let session_mode: Option = http::parse_opt_header(req, &X_AMZ_CREATE_SESSION_MODE)?; -pub fn serialize_http(x: CreateSessionOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -Ok(res) -} + Ok(CreateSessionInput { + bucket, + bucket_key_enabled, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + session_mode, + }) + } + pub fn serialize_http(x: CreateSessionOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for CreateSession { -fn name(&self) -> &'static str { -"CreateSession" -} - -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.create_session(&mut s3_req).await?; -} -let result = s3.create_session(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} + fn name(&self) -> &'static str { + "CreateSession" + } + + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.create_session(&mut s3_req).await?; + } + let result = s3.create_session(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } +} pub struct DeleteBucket; impl DeleteBucket { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let force_delete: Option = http::parse_opt_header(req, &X_MINIO_FORCE_DELETE)?; - -Ok(DeleteBucketInput { -bucket, -expected_bucket_owner, -force_delete, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let force_delete: Option = http::parse_opt_header(req, &X_MINIO_FORCE_DELETE)?; -pub fn serialize_http(_: DeleteBucketOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketInput { + bucket, + expected_bucket_owner, + force_delete, + }) + } + pub fn serialize_http(_: DeleteBucketOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucket { -fn name(&self) -> &'static str { -"DeleteBucket" -} + fn name(&self) -> &'static str { + "DeleteBucket" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket(&mut s3_req).await?; -} -let result = s3.delete_bucket(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket(&mut s3_req).await?; + } + let result = s3.delete_bucket(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketAnalyticsConfiguration; impl DeleteBucketAnalyticsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: AnalyticsId = http::parse_query(req, "id")?; - -Ok(DeleteBucketAnalyticsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: AnalyticsId = http::parse_query(req, "id")?; -pub fn serialize_http(_: DeleteBucketAnalyticsConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketAnalyticsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(_: DeleteBucketAnalyticsConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketAnalyticsConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketAnalyticsConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketAnalyticsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_analytics_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_analytics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_analytics_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_analytics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketCors; impl DeleteBucketCors { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketCorsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketCorsOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketCorsInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketCorsOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketCors { -fn name(&self) -> &'static str { -"DeleteBucketCors" -} + fn name(&self) -> &'static str { + "DeleteBucketCors" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_cors(&mut s3_req).await?; -} -let result = s3.delete_bucket_cors(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_cors(&mut s3_req).await?; + } + let result = s3.delete_bucket_cors(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketEncryption; impl DeleteBucketEncryption { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketEncryptionInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketEncryptionOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketEncryptionInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketEncryptionOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketEncryption { -fn name(&self) -> &'static str { -"DeleteBucketEncryption" -} + fn name(&self) -> &'static str { + "DeleteBucketEncryption" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_encryption(&mut s3_req).await?; -} -let result = s3.delete_bucket_encryption(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_encryption(&mut s3_req).await?; + } + let result = s3.delete_bucket_encryption(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketIntelligentTieringConfiguration; impl DeleteBucketIntelligentTieringConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let id: IntelligentTieringId = http::parse_query(req, "id")?; - -Ok(DeleteBucketIntelligentTieringConfigurationInput { -bucket, -id, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let id: IntelligentTieringId = http::parse_query(req, "id")?; -pub fn serialize_http(_: DeleteBucketIntelligentTieringConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketIntelligentTieringConfigurationInput { bucket, id }) + } + pub fn serialize_http(_: DeleteBucketIntelligentTieringConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketIntelligentTieringConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketIntelligentTieringConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketIntelligentTieringConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_intelligent_tiering_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_intelligent_tiering_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_intelligent_tiering_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_intelligent_tiering_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketInventoryConfiguration; impl DeleteBucketInventoryConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: InventoryId = http::parse_query(req, "id")?; - -Ok(DeleteBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: InventoryId = http::parse_query(req, "id")?; -pub fn serialize_http(_: DeleteBucketInventoryConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(_: DeleteBucketInventoryConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketInventoryConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketInventoryConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketInventoryConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_inventory_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_inventory_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_inventory_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_inventory_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketLifecycle; impl DeleteBucketLifecycle { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketLifecycleInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketLifecycleOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketLifecycleInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketLifecycleOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketLifecycle { -fn name(&self) -> &'static str { -"DeleteBucketLifecycle" -} + fn name(&self) -> &'static str { + "DeleteBucketLifecycle" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_lifecycle(&mut s3_req).await?; -} -let result = s3.delete_bucket_lifecycle(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_lifecycle(&mut s3_req).await?; + } + let result = s3.delete_bucket_lifecycle(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketMetadataTableConfiguration; impl DeleteBucketMetadataTableConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketMetadataTableConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketMetadataTableConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketMetadataTableConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketMetadataTableConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketMetadataTableConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketMetadataTableConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketMetadataTableConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_metadata_table_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_metadata_table_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_metadata_table_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_metadata_table_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketMetricsConfiguration; impl DeleteBucketMetricsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: MetricsId = http::parse_query(req, "id")?; - -Ok(DeleteBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: MetricsId = http::parse_query(req, "id")?; -pub fn serialize_http(_: DeleteBucketMetricsConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(_: DeleteBucketMetricsConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketMetricsConfiguration { -fn name(&self) -> &'static str { -"DeleteBucketMetricsConfiguration" -} + fn name(&self) -> &'static str { + "DeleteBucketMetricsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_metrics_configuration(&mut s3_req).await?; -} -let result = s3.delete_bucket_metrics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_metrics_configuration(&mut s3_req).await?; + } + let result = s3.delete_bucket_metrics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketOwnershipControls; impl DeleteBucketOwnershipControls { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketOwnershipControlsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketOwnershipControlsOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketOwnershipControlsInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketOwnershipControlsOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketOwnershipControls { -fn name(&self) -> &'static str { -"DeleteBucketOwnershipControls" -} + fn name(&self) -> &'static str { + "DeleteBucketOwnershipControls" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_ownership_controls(&mut s3_req).await?; -} -let result = s3.delete_bucket_ownership_controls(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_ownership_controls(&mut s3_req).await?; + } + let result = s3.delete_bucket_ownership_controls(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketPolicy; impl DeleteBucketPolicy { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketPolicyInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(_: DeleteBucketPolicyOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketPolicyInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketPolicyOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketPolicy { -fn name(&self) -> &'static str { -"DeleteBucketPolicy" -} + fn name(&self) -> &'static str { + "DeleteBucketPolicy" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_policy(&mut s3_req).await?; -} -let result = s3.delete_bucket_policy(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_policy(&mut s3_req).await?; + } + let result = s3.delete_bucket_policy(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketReplication; impl DeleteBucketReplication { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketReplicationInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketReplicationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketReplicationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketReplicationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketReplication { -fn name(&self) -> &'static str { -"DeleteBucketReplication" -} + fn name(&self) -> &'static str { + "DeleteBucketReplication" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_replication(&mut s3_req).await?; -} -let result = s3.delete_bucket_replication(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_replication(&mut s3_req).await?; + } + let result = s3.delete_bucket_replication(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketTagging; impl DeleteBucketTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketTaggingInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketTaggingOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketTaggingInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketTaggingOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketTagging { -fn name(&self) -> &'static str { -"DeleteBucketTagging" -} + fn name(&self) -> &'static str { + "DeleteBucketTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_tagging(&mut s3_req).await?; -} -let result = s3.delete_bucket_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_tagging(&mut s3_req).await?; + } + let result = s3.delete_bucket_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteBucketWebsite; impl DeleteBucketWebsite { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeleteBucketWebsiteInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: DeleteBucketWebsiteOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeleteBucketWebsiteInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeleteBucketWebsiteOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeleteBucketWebsite { -fn name(&self) -> &'static str { -"DeleteBucketWebsite" -} + fn name(&self) -> &'static str { + "DeleteBucketWebsite" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_bucket_website(&mut s3_req).await?; -} -let result = s3.delete_bucket_website(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_bucket_website(&mut s3_req).await?; + } + let result = s3.delete_bucket_website(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteObject; impl DeleteObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let bypass_governance_retention: Option = + http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let if_match_last_modified_time: Option = http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_LAST_MODIFIED_TIME, TimestampFormat::HttpDate)?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; -let if_match_size: Option = http::parse_opt_header(req, &X_AMZ_IF_MATCH_SIZE)?; + let if_match_last_modified_time: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_IF_MATCH_LAST_MODIFIED_TIME, TimestampFormat::HttpDate)?; + let if_match_size: Option = http::parse_opt_header(req, &X_AMZ_IF_MATCH_SIZE)?; -let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; + let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -Ok(DeleteObjectInput { -bucket, -bypass_governance_retention, -expected_bucket_owner, -if_match, -if_match_last_modified_time, -if_match_size, -key, -mfa, -request_payer, -version_id, -}) -} - - -pub fn serialize_http(x: DeleteObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); -http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(DeleteObjectInput { + bucket, + bypass_governance_retention, + expected_bucket_owner, + if_match, + if_match_last_modified_time, + if_match_size, + key, + mfa, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: DeleteObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); + http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for DeleteObject { -fn name(&self) -> &'static str { -"DeleteObject" -} + fn name(&self) -> &'static str { + "DeleteObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_object(&mut s3_req).await?; -} -let result = s3.delete_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_object(&mut s3_req).await?; + } + let result = s3.delete_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteObjectTagging; impl DeleteObjectTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(DeleteObjectTaggingInput { -bucket, -expected_bucket_owner, -key, -version_id, -}) -} - - -pub fn serialize_http(x: DeleteObjectTaggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(DeleteObjectTaggingInput { + bucket, + expected_bucket_owner, + key, + version_id, + }) + } + pub fn serialize_http(x: DeleteObjectTaggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::NO_CONTENT); + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for DeleteObjectTagging { -fn name(&self) -> &'static str { -"DeleteObjectTagging" -} + fn name(&self) -> &'static str { + "DeleteObjectTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_object_tagging(&mut s3_req).await?; -} -let result = s3.delete_object_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_object_tagging(&mut s3_req).await?; + } + let result = s3.delete_object_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeleteObjects; impl DeleteObjects { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let bypass_governance_retention: Option = + http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; -let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let delete: Delete = http::take_xml_body(req)?; -let delete: Delete = http::take_xml_body(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; -let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -Ok(DeleteObjectsInput { -bucket, -bypass_governance_retention, -checksum_algorithm, -delete, -expected_bucket_owner, -mfa, -request_payer, -}) -} - - -pub fn serialize_http(x: DeleteObjectsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(DeleteObjectsInput { + bucket, + bypass_governance_retention, + checksum_algorithm, + delete, + expected_bucket_owner, + mfa, + request_payer, + }) + } + pub fn serialize_http(x: DeleteObjectsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for DeleteObjects { -fn name(&self) -> &'static str { -"DeleteObjects" -} + fn name(&self) -> &'static str { + "DeleteObjects" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_objects(&mut s3_req).await?; -} -let result = s3.delete_objects(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_objects(&mut s3_req).await?; + } + let result = s3.delete_objects(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct DeletePublicAccessBlock; impl DeletePublicAccessBlock { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(DeletePublicAccessBlockInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(_: DeletePublicAccessBlockOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(DeletePublicAccessBlockInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: DeletePublicAccessBlockOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for DeletePublicAccessBlock { -fn name(&self) -> &'static str { -"DeletePublicAccessBlock" -} + fn name(&self) -> &'static str { + "DeletePublicAccessBlock" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.delete_public_access_block(&mut s3_req).await?; -} -let result = s3.delete_public_access_block(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.delete_public_access_block(&mut s3_req).await?; + } + let result = s3.delete_public_access_block(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketAccelerateConfiguration; impl GetBucketAccelerateConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -Ok(GetBucketAccelerateConfigurationInput { -bucket, -expected_bucket_owner, -request_payer, -}) -} - - -pub fn serialize_http(x: GetBucketAccelerateConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(GetBucketAccelerateConfigurationInput { + bucket, + expected_bucket_owner, + request_payer, + }) + } + pub fn serialize_http(x: GetBucketAccelerateConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketAccelerateConfiguration { -fn name(&self) -> &'static str { -"GetBucketAccelerateConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketAccelerateConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_accelerate_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_accelerate_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_accelerate_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_accelerate_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketAcl; impl GetBucketAcl { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketAclInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketAclOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketAclInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketAclOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketAcl { -fn name(&self) -> &'static str { -"GetBucketAcl" -} + fn name(&self) -> &'static str { + "GetBucketAcl" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_acl(&mut s3_req).await?; -} -let result = s3.get_bucket_acl(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_acl(&mut s3_req).await?; + } + let result = s3.get_bucket_acl(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketAnalyticsConfiguration; impl GetBucketAnalyticsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: AnalyticsId = http::parse_query(req, "id")?; -let id: AnalyticsId = http::parse_query(req, "id")?; - -Ok(GetBucketAnalyticsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - - -pub fn serialize_http(x: GetBucketAnalyticsConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.analytics_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketAnalyticsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(x: GetBucketAnalyticsConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.analytics_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketAnalyticsConfiguration { -fn name(&self) -> &'static str { -"GetBucketAnalyticsConfiguration" -} - -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_analytics_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_analytics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} + fn name(&self) -> &'static str { + "GetBucketAnalyticsConfiguration" + } + + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_analytics_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_analytics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } +} pub struct GetBucketCors; impl GetBucketCors { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketCorsInput { -bucket, -expected_bucket_owner, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + Ok(GetBucketCorsInput { + bucket, + expected_bucket_owner, + }) + } -pub fn serialize_http(x: GetBucketCorsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} - + pub fn serialize_http(x: GetBucketCorsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketCors { -fn name(&self) -> &'static str { -"GetBucketCors" -} + fn name(&self) -> &'static str { + "GetBucketCors" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_cors(&mut s3_req).await?; -} -let result = s3.get_bucket_cors(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_cors(&mut s3_req).await?; + } + let result = s3.get_bucket_cors(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketEncryption; impl GetBucketEncryption { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketEncryptionInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketEncryptionOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.server_side_encryption_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketEncryptionInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketEncryptionOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.server_side_encryption_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketEncryption { -fn name(&self) -> &'static str { -"GetBucketEncryption" -} + fn name(&self) -> &'static str { + "GetBucketEncryption" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_encryption(&mut s3_req).await?; -} -let result = s3.get_bucket_encryption(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_encryption(&mut s3_req).await?; + } + let result = s3.get_bucket_encryption(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketIntelligentTieringConfiguration; impl GetBucketIntelligentTieringConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let id: IntelligentTieringId = http::parse_query(req, "id")?; -let id: IntelligentTieringId = http::parse_query(req, "id")?; - -Ok(GetBucketIntelligentTieringConfigurationInput { -bucket, -id, -}) -} - - -pub fn serialize_http(x: GetBucketIntelligentTieringConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.intelligent_tiering_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketIntelligentTieringConfigurationInput { bucket, id }) + } + pub fn serialize_http(x: GetBucketIntelligentTieringConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.intelligent_tiering_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketIntelligentTieringConfiguration { -fn name(&self) -> &'static str { -"GetBucketIntelligentTieringConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketIntelligentTieringConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_intelligent_tiering_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_intelligent_tiering_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_intelligent_tiering_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_intelligent_tiering_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketInventoryConfiguration; impl GetBucketInventoryConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: InventoryId = http::parse_query(req, "id")?; -let id: InventoryId = http::parse_query(req, "id")?; - -Ok(GetBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} - - -pub fn serialize_http(x: GetBucketInventoryConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.inventory_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(x: GetBucketInventoryConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.inventory_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketInventoryConfiguration { -fn name(&self) -> &'static str { -"GetBucketInventoryConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketInventoryConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_inventory_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_inventory_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_inventory_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_inventory_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketLifecycleConfiguration; impl GetBucketLifecycleConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketLifecycleConfigurationInput { -bucket, -expected_bucket_owner, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + Ok(GetBucketLifecycleConfigurationInput { + bucket, + expected_bucket_owner, + }) + } -pub fn serialize_http(x: GetBucketLifecycleConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, x.transition_default_minimum_object_size)?; -Ok(res) -} - + pub fn serialize_http(x: GetBucketLifecycleConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header( + &mut res, + X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, + x.transition_default_minimum_object_size, + )?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketLifecycleConfiguration { -fn name(&self) -> &'static str { -"GetBucketLifecycleConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketLifecycleConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_lifecycle_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_lifecycle_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_lifecycle_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_lifecycle_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketLocation; impl GetBucketLocation { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketLocationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketLocationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketLocationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketLocationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketLocation { -fn name(&self) -> &'static str { -"GetBucketLocation" -} + fn name(&self) -> &'static str { + "GetBucketLocation" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_location(&mut s3_req).await?; -} -let result = s3.get_bucket_location(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_location(&mut s3_req).await?; + } + let result = s3.get_bucket_location(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketLogging; impl GetBucketLogging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketLoggingInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketLoggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketLoggingInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketLoggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketLogging { -fn name(&self) -> &'static str { -"GetBucketLogging" -} + fn name(&self) -> &'static str { + "GetBucketLogging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_logging(&mut s3_req).await?; -} -let result = s3.get_bucket_logging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_logging(&mut s3_req).await?; + } + let result = s3.get_bucket_logging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketMetadataTableConfiguration; impl GetBucketMetadataTableConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketMetadataTableConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketMetadataTableConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.get_bucket_metadata_table_configuration_result { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketMetadataTableConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketMetadataTableConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.get_bucket_metadata_table_configuration_result { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketMetadataTableConfiguration { -fn name(&self) -> &'static str { -"GetBucketMetadataTableConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketMetadataTableConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_metadata_table_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_metadata_table_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_metadata_table_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_metadata_table_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketMetricsConfiguration; impl GetBucketMetricsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let id: MetricsId = http::parse_query(req, "id")?; - -Ok(GetBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: MetricsId = http::parse_query(req, "id")?; -pub fn serialize_http(x: GetBucketMetricsConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.metrics_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(x: GetBucketMetricsConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.metrics_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketMetricsConfiguration { -fn name(&self) -> &'static str { -"GetBucketMetricsConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketMetricsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_metrics_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_metrics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_metrics_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_metrics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketNotificationConfiguration; impl GetBucketNotificationConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketNotificationConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketNotificationConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketNotificationConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketNotificationConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketNotificationConfiguration { -fn name(&self) -> &'static str { -"GetBucketNotificationConfiguration" -} + fn name(&self) -> &'static str { + "GetBucketNotificationConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_notification_configuration(&mut s3_req).await?; -} -let result = s3.get_bucket_notification_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_notification_configuration(&mut s3_req).await?; + } + let result = s3.get_bucket_notification_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketOwnershipControls; impl GetBucketOwnershipControls { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketOwnershipControlsInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetBucketOwnershipControlsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.ownership_controls { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketOwnershipControlsInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketOwnershipControlsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.ownership_controls { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketOwnershipControls { -fn name(&self) -> &'static str { -"GetBucketOwnershipControls" -} + fn name(&self) -> &'static str { + "GetBucketOwnershipControls" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_ownership_controls(&mut s3_req).await?; -} -let result = s3.get_bucket_ownership_controls(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_ownership_controls(&mut s3_req).await?; + } + let result = s3.get_bucket_ownership_controls(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketPolicy; impl GetBucketPolicy { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketPolicyInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketPolicyOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(val) = x.policy { -res.body = http::Body::from(val); -} -Ok(res) -} + Ok(GetBucketPolicyInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketPolicyOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(val) = x.policy { + res.body = http::Body::from(val); + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketPolicy { -fn name(&self) -> &'static str { -"GetBucketPolicy" -} + fn name(&self) -> &'static str { + "GetBucketPolicy" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_policy(&mut s3_req).await?; -} -let result = s3.get_bucket_policy(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_policy(&mut s3_req).await?; + } + let result = s3.get_bucket_policy(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketPolicyStatus; impl GetBucketPolicyStatus { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketPolicyStatusInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetBucketPolicyStatusOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.policy_status { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketPolicyStatusInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketPolicyStatusOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.policy_status { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketPolicyStatus { -fn name(&self) -> &'static str { -"GetBucketPolicyStatus" -} + fn name(&self) -> &'static str { + "GetBucketPolicyStatus" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_policy_status(&mut s3_req).await?; -} -let result = s3.get_bucket_policy_status(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_policy_status(&mut s3_req).await?; + } + let result = s3.get_bucket_policy_status(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketReplication; impl GetBucketReplication { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketReplicationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketReplicationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.replication_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetBucketReplicationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketReplicationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.replication_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketReplication { -fn name(&self) -> &'static str { -"GetBucketReplication" -} + fn name(&self) -> &'static str { + "GetBucketReplication" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_replication(&mut s3_req).await?; -} -let result = s3.get_bucket_replication(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_replication(&mut s3_req).await?; + } + let result = s3.get_bucket_replication(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketRequestPayment; impl GetBucketRequestPayment { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(GetBucketRequestPaymentInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketRequestPaymentOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketRequestPaymentInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketRequestPaymentOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketRequestPayment { -fn name(&self) -> &'static str { -"GetBucketRequestPayment" -} + fn name(&self) -> &'static str { + "GetBucketRequestPayment" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_request_payment(&mut s3_req).await?; -} -let result = s3.get_bucket_request_payment(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_request_payment(&mut s3_req).await?; + } + let result = s3.get_bucket_request_payment(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketTagging; impl GetBucketTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketTaggingInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetBucketTaggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketTaggingInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketTaggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketTagging { -fn name(&self) -> &'static str { -"GetBucketTagging" -} + fn name(&self) -> &'static str { + "GetBucketTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_tagging(&mut s3_req).await?; -} -let result = s3.get_bucket_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_tagging(&mut s3_req).await?; + } + let result = s3.get_bucket_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketVersioning; impl GetBucketVersioning { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketVersioningInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetBucketVersioningOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketVersioningInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketVersioningOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketVersioning { -fn name(&self) -> &'static str { -"GetBucketVersioning" -} + fn name(&self) -> &'static str { + "GetBucketVersioning" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_versioning(&mut s3_req).await?; -} -let result = s3.get_bucket_versioning(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_versioning(&mut s3_req).await?; + } + let result = s3.get_bucket_versioning(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetBucketWebsite; impl GetBucketWebsite { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetBucketWebsiteInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetBucketWebsiteOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(GetBucketWebsiteInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetBucketWebsiteOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetBucketWebsite { -fn name(&self) -> &'static str { -"GetBucketWebsite" -} + fn name(&self) -> &'static str { + "GetBucketWebsite" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_bucket_website(&mut s3_req).await?; -} -let result = s3.get_bucket_website(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_bucket_website(&mut s3_req).await?; + } + let result = s3.get_bucket_website(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObject; impl GetObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; + let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - -let if_modified_since: Option = http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - -let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; - -let if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let if_modified_since: Option = + http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; -let part_number: Option = http::parse_opt_query(req, "partNumber")?; + let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; -let range: Option = http::parse_opt_header(req, &RANGE)?; + let if_unmodified_since: Option = + http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let part_number: Option = http::parse_opt_query(req, "partNumber")?; -let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; + let range: Option = http::parse_opt_header(req, &RANGE)?; -let response_content_disposition: Option = http::parse_opt_query(req, "response-content-disposition")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; + let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; -let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; + let response_content_disposition: Option = + http::parse_opt_query(req, "response-content-disposition")?; -let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; + let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; -let response_expires: Option = http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; + let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let response_expires: Option = + http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -Ok(GetObjectInput { -bucket, -checksum_mode, -expected_bucket_owner, -if_match, -if_modified_since, -if_none_match, -if_unmodified_since, -key, -part_number, -range, -request_payer, -response_cache_control, -response_content_disposition, -response_content_encoding, -response_content_language, -response_content_type, -response_expires, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectOutput) -> S3Result { -let mut res = http::Response::default(); -if x.content_range.is_some() { - res.status = http::StatusCode::PARTIAL_CONTENT; -} -if let Some(val) = x.body { -http::set_stream_body(&mut res, val); -} -http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; -http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; -http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; -http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; -http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; -http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; -http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; -http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; -http::add_opt_header(&mut res, ETAG, x.e_tag)?; -http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; -http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; -http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; -http::add_opt_metadata(&mut res, x.metadata)?; -http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; -http::add_opt_header_timestamp(&mut res, X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, x.object_lock_retain_until_date, TimestampFormat::DateTime)?; -http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; -http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; -http::add_opt_header(&mut res, X_AMZ_TAGGING_COUNT, x.tag_count)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; -Ok(res) -} + Ok(GetObjectInput { + bucket, + checksum_mode, + expected_bucket_owner, + if_match, + if_modified_since, + if_none_match, + if_unmodified_since, + key, + part_number, + range, + request_payer, + response_cache_control, + response_content_disposition, + response_content_encoding, + response_content_language, + response_content_type, + response_expires, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + pub fn serialize_http(x: GetObjectOutput) -> S3Result { + let mut res = http::Response::default(); + if x.content_range.is_some() { + res.status = http::StatusCode::PARTIAL_CONTENT; + } + if let Some(val) = x.body { + http::set_stream_body(&mut res, val); + } + http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; + http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; + http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; + http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; + http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; + http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; + http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; + http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; + http::add_opt_header(&mut res, ETAG, x.e_tag)?; + http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; + http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; + http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; + http::add_opt_metadata(&mut res, x.metadata)?; + http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; + http::add_opt_header_timestamp( + &mut res, + X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, + x.object_lock_retain_until_date, + TimestampFormat::DateTime, + )?; + http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; + http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; + http::add_opt_header(&mut res, X_AMZ_TAGGING_COUNT, x.tag_count)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObject { -fn name(&self) -> &'static str { -"GetObject" -} + fn name(&self) -> &'static str { + "GetObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object(&mut s3_req).await?; -} -let overridden_headers = super::get_object::extract_overridden_response_headers(&s3_req)?; -let result = s3.get_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(overridden_headers); -super::get_object::merge_custom_headers(&mut resp, s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object(&mut s3_req).await?; + } + let overridden_headers = super::get_object::extract_overridden_response_headers(&s3_req)?; + let result = s3.get_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(overridden_headers); + super::get_object::merge_custom_headers(&mut resp, s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectAcl; impl GetObjectAcl { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(GetObjectAclInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectAclOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(GetObjectAclInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: GetObjectAclOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectAcl { -fn name(&self) -> &'static str { -"GetObjectAcl" -} + fn name(&self) -> &'static str { + "GetObjectAcl" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_acl(&mut s3_req).await?; -} -let result = s3.get_object_acl(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_acl(&mut s3_req).await?; + } + let result = s3.get_object_acl(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectAttributes; impl GetObjectAttributes { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - - -let max_parts: Option = http::parse_opt_header(req, &X_AMZ_MAX_PARTS)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let object_attributes: ObjectAttributesList = http::parse_list_header(req, &X_AMZ_OBJECT_ATTRIBUTES)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let part_number_marker: Option = http::parse_opt_header(req, &X_AMZ_PART_NUMBER_MARKER)?; + let max_parts: Option = http::parse_opt_header(req, &X_AMZ_MAX_PARTS)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let object_attributes: ObjectAttributesList = http::parse_list_header(req, &X_AMZ_OBJECT_ATTRIBUTES)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let part_number_marker: Option = http::parse_opt_header(req, &X_AMZ_PART_NUMBER_MARKER)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -Ok(GetObjectAttributesInput { -bucket, -expected_bucket_owner, -key, -max_parts, -object_attributes, -part_number_marker, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectAttributesOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; -http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(GetObjectAttributesInput { + bucket, + expected_bucket_owner, + key, + max_parts, + object_attributes, + part_number_marker, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + pub fn serialize_http(x: GetObjectAttributesOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; + http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectAttributes { -fn name(&self) -> &'static str { -"GetObjectAttributes" -} + fn name(&self) -> &'static str { + "GetObjectAttributes" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_attributes(&mut s3_req).await?; -} -let result = s3.get_object_attributes(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_attributes(&mut s3_req).await?; + } + let result = s3.get_object_attributes(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectLegalHold; impl GetObjectLegalHold { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(GetObjectLegalHoldInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectLegalHoldOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.legal_hold { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetObjectLegalHoldInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: GetObjectLegalHoldOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.legal_hold { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectLegalHold { -fn name(&self) -> &'static str { -"GetObjectLegalHold" -} + fn name(&self) -> &'static str { + "GetObjectLegalHold" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_legal_hold(&mut s3_req).await?; -} -let result = s3.get_object_legal_hold(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_legal_hold(&mut s3_req).await?; + } + let result = s3.get_object_legal_hold(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectLockConfiguration; impl GetObjectLockConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetObjectLockConfigurationInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: GetObjectLockConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.object_lock_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetObjectLockConfigurationInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetObjectLockConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.object_lock_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectLockConfiguration { -fn name(&self) -> &'static str { -"GetObjectLockConfiguration" -} + fn name(&self) -> &'static str { + "GetObjectLockConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_lock_configuration(&mut s3_req).await?; -} -let result = s3.get_object_lock_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_lock_configuration(&mut s3_req).await?; + } + let result = s3.get_object_lock_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectRetention; impl GetObjectRetention { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -Ok(GetObjectRetentionInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} - - -pub fn serialize_http(x: GetObjectRetentionOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.retention { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetObjectRetentionInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: GetObjectRetentionOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.retention { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectRetention { -fn name(&self) -> &'static str { -"GetObjectRetention" -} + fn name(&self) -> &'static str { + "GetObjectRetention" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_retention(&mut s3_req).await?; -} -let result = s3.get_object_retention(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_retention(&mut s3_req).await?; + } + let result = s3.get_object_retention(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectTagging; impl GetObjectTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(GetObjectTaggingInput { -bucket, -expected_bucket_owner, -key, -request_payer, -version_id, -}) -} + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: GetObjectTaggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(GetObjectTaggingInput { + bucket, + expected_bucket_owner, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: GetObjectTaggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectTagging { -fn name(&self) -> &'static str { -"GetObjectTagging" -} + fn name(&self) -> &'static str { + "GetObjectTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_tagging(&mut s3_req).await?; -} -let result = s3.get_object_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_tagging(&mut s3_req).await?; + } + let result = s3.get_object_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetObjectTorrent; impl GetObjectTorrent { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -Ok(GetObjectTorrentInput { -bucket, -expected_bucket_owner, -key, -request_payer, -}) -} - - -pub fn serialize_http(x: GetObjectTorrentOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(val) = x.body { -http::set_stream_body(&mut res, val); -} -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(GetObjectTorrentInput { + bucket, + expected_bucket_owner, + key, + request_payer, + }) + } + pub fn serialize_http(x: GetObjectTorrentOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(val) = x.body { + http::set_stream_body(&mut res, val); + } + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetObjectTorrent { -fn name(&self) -> &'static str { -"GetObjectTorrent" -} + fn name(&self) -> &'static str { + "GetObjectTorrent" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_object_torrent(&mut s3_req).await?; -} -let result = s3.get_object_torrent(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_object_torrent(&mut s3_req).await?; + } + let result = s3.get_object_torrent(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct GetPublicAccessBlock; impl GetPublicAccessBlock { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(GetPublicAccessBlockInput { -bucket, -expected_bucket_owner, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: GetPublicAccessBlockOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.public_access_block_configuration { - http::set_xml_body(&mut res, val)?; -} -Ok(res) -} + Ok(GetPublicAccessBlockInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: GetPublicAccessBlockOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.public_access_block_configuration { + http::set_xml_body(&mut res, val)?; + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for GetPublicAccessBlock { -fn name(&self) -> &'static str { -"GetPublicAccessBlock" -} + fn name(&self) -> &'static str { + "GetPublicAccessBlock" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.get_public_access_block(&mut s3_req).await?; -} -let result = s3.get_public_access_block(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.get_public_access_block(&mut s3_req).await?; + } + let result = s3.get_public_access_block(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct HeadBucket; impl HeadBucket { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(HeadBucketInput { -bucket, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(x: HeadBucketOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_ACCESS_POINT_ALIAS, x.access_point_alias)?; -http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_NAME, x.bucket_location_name)?; -http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_TYPE, x.bucket_location_type)?; -http::add_opt_header(&mut res, X_AMZ_BUCKET_REGION, x.bucket_region)?; -Ok(res) -} + Ok(HeadBucketInput { + bucket, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: HeadBucketOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_ACCESS_POINT_ALIAS, x.access_point_alias)?; + http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_NAME, x.bucket_location_name)?; + http::add_opt_header(&mut res, X_AMZ_BUCKET_LOCATION_TYPE, x.bucket_location_type)?; + http::add_opt_header(&mut res, X_AMZ_BUCKET_REGION, x.bucket_region)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for HeadBucket { -fn name(&self) -> &'static str { -"HeadBucket" -} + fn name(&self) -> &'static str { + "HeadBucket" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.head_bucket(&mut s3_req).await?; -} -let result = s3.head_bucket(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.head_bucket(&mut s3_req).await?; + } + let result = s3.head_bucket(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct HeadObject; impl HeadObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; -let checksum_mode: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_MODE)?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; - -let if_modified_since: Option = http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; - -let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let if_modified_since: Option = + http::parse_opt_header_timestamp(req, &IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; -let part_number: Option = http::parse_opt_query(req, "partNumber")?; + let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; -let range: Option = http::parse_opt_header(req, &RANGE)?; + let if_unmodified_since: Option = + http::parse_opt_header_timestamp(req, &IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let part_number: Option = http::parse_opt_query(req, "partNumber")?; -let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; + let range: Option = http::parse_opt_header(req, &RANGE)?; -let response_content_disposition: Option = http::parse_opt_query(req, "response-content-disposition")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; + let response_cache_control: Option = http::parse_opt_query(req, "response-cache-control")?; -let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; + let response_content_disposition: Option = + http::parse_opt_query(req, "response-content-disposition")?; -let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; + let response_content_encoding: Option = http::parse_opt_query(req, "response-content-encoding")?; -let response_expires: Option = http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; + let response_content_language: Option = http::parse_opt_query(req, "response-content-language")?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let response_content_type: Option = http::parse_opt_query(req, "response-content-type")?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let response_expires: Option = + http::parse_opt_query_timestamp(req, "response-expires", TimestampFormat::HttpDate)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -Ok(HeadObjectInput { -bucket, -checksum_mode, -expected_bucket_owner, -if_match, -if_modified_since, -if_none_match, -if_unmodified_since, -key, -part_number, -range, -request_payer, -response_cache_control, -response_content_disposition, -response_content_encoding, -response_content_language, -response_content_type, -response_expires, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -version_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: HeadObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; -http::add_opt_header(&mut res, X_AMZ_ARCHIVE_STATUS, x.archive_status)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; -http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; -http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; -http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; -http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; -http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; -http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; -http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; -http::add_opt_header(&mut res, ETAG, x.e_tag)?; -http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; -http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; -http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; -http::add_opt_metadata(&mut res, x.metadata)?; -http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; -http::add_opt_header_timestamp(&mut res, X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, x.object_lock_retain_until_date, TimestampFormat::DateTime)?; -http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; -http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; -Ok(res) -} + Ok(HeadObjectInput { + bucket, + checksum_mode, + expected_bucket_owner, + if_match, + if_modified_since, + if_none_match, + if_unmodified_since, + key, + part_number, + range, + request_payer, + response_cache_control, + response_content_disposition, + response_content_encoding, + response_content_language, + response_content_type, + response_expires, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + version_id, + }) + } + pub fn serialize_http(x: HeadObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, ACCEPT_RANGES, x.accept_ranges)?; + http::add_opt_header(&mut res, X_AMZ_ARCHIVE_STATUS, x.archive_status)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, CACHE_CONTROL, x.cache_control)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; + http::add_opt_header(&mut res, CONTENT_DISPOSITION, x.content_disposition)?; + http::add_opt_header(&mut res, CONTENT_ENCODING, x.content_encoding)?; + http::add_opt_header(&mut res, CONTENT_LANGUAGE, x.content_language)?; + http::add_opt_header(&mut res, CONTENT_LENGTH, x.content_length)?; + http::add_opt_header(&mut res, CONTENT_RANGE, x.content_range)?; + http::add_opt_header(&mut res, CONTENT_TYPE, x.content_type)?; + http::add_opt_header(&mut res, X_AMZ_DELETE_MARKER, x.delete_marker)?; + http::add_opt_header(&mut res, ETAG, x.e_tag)?; + http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; + http::add_opt_header_timestamp(&mut res, EXPIRES, x.expires, TimestampFormat::HttpDate)?; + http::add_opt_header_timestamp(&mut res, LAST_MODIFIED, x.last_modified, TimestampFormat::HttpDate)?; + http::add_opt_metadata(&mut res, x.metadata)?; + http::add_opt_header(&mut res, X_AMZ_MISSING_META, x.missing_meta)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_LEGAL_HOLD, x.object_lock_legal_hold_status)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_LOCK_MODE, x.object_lock_mode)?; + http::add_opt_header_timestamp( + &mut res, + X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, + x.object_lock_retain_until_date, + TimestampFormat::DateTime, + )?; + http::add_opt_header(&mut res, X_AMZ_MP_PARTS_COUNT, x.parts_count)?; + http::add_opt_header(&mut res, X_AMZ_REPLICATION_STATUS, x.replication_status)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_RESTORE, x.restore)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + http::add_opt_header(&mut res, X_AMZ_STORAGE_CLASS, x.storage_class)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + http::add_opt_header(&mut res, X_AMZ_WEBSITE_REDIRECT_LOCATION, x.website_redirect_location)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for HeadObject { -fn name(&self) -> &'static str { -"HeadObject" -} + fn name(&self) -> &'static str { + "HeadObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.head_object(&mut s3_req).await?; -} -let result = s3.head_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.head_object(&mut s3_req).await?; + } + let result = s3.head_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBucketAnalyticsConfigurations; impl ListBucketAnalyticsConfigurations { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -Ok(ListBucketAnalyticsConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: ListBucketAnalyticsConfigurationsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketAnalyticsConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: ListBucketAnalyticsConfigurationsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBucketAnalyticsConfigurations { -fn name(&self) -> &'static str { -"ListBucketAnalyticsConfigurations" -} + fn name(&self) -> &'static str { + "ListBucketAnalyticsConfigurations" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_bucket_analytics_configurations(&mut s3_req).await?; -} -let result = s3.list_bucket_analytics_configurations(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_bucket_analytics_configurations(&mut s3_req).await?; + } + let result = s3.list_bucket_analytics_configurations(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBucketIntelligentTieringConfigurations; impl ListBucketIntelligentTieringConfigurations { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - -Ok(ListBucketIntelligentTieringConfigurationsInput { -bucket, -continuation_token, -}) -} + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; -pub fn serialize_http(x: ListBucketIntelligentTieringConfigurationsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketIntelligentTieringConfigurationsInput { + bucket, + continuation_token, + }) + } + pub fn serialize_http(x: ListBucketIntelligentTieringConfigurationsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBucketIntelligentTieringConfigurations { -fn name(&self) -> &'static str { -"ListBucketIntelligentTieringConfigurations" -} + fn name(&self) -> &'static str { + "ListBucketIntelligentTieringConfigurations" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_bucket_intelligent_tiering_configurations(&mut s3_req).await?; -} -let result = s3.list_bucket_intelligent_tiering_configurations(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_bucket_intelligent_tiering_configurations(&mut s3_req).await?; + } + let result = s3.list_bucket_intelligent_tiering_configurations(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBucketInventoryConfigurations; impl ListBucketInventoryConfigurations { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -Ok(ListBucketInventoryConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: ListBucketInventoryConfigurationsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketInventoryConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: ListBucketInventoryConfigurationsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBucketInventoryConfigurations { -fn name(&self) -> &'static str { -"ListBucketInventoryConfigurations" -} + fn name(&self) -> &'static str { + "ListBucketInventoryConfigurations" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_bucket_inventory_configurations(&mut s3_req).await?; -} -let result = s3.list_bucket_inventory_configurations(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_bucket_inventory_configurations(&mut s3_req).await?; + } + let result = s3.list_bucket_inventory_configurations(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBucketMetricsConfigurations; impl ListBucketMetricsConfigurations { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -Ok(ListBucketMetricsConfigurationsInput { -bucket, -continuation_token, -expected_bucket_owner, -}) -} + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(x: ListBucketMetricsConfigurationsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketMetricsConfigurationsInput { + bucket, + continuation_token, + expected_bucket_owner, + }) + } + pub fn serialize_http(x: ListBucketMetricsConfigurationsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBucketMetricsConfigurations { -fn name(&self) -> &'static str { -"ListBucketMetricsConfigurations" -} + fn name(&self) -> &'static str { + "ListBucketMetricsConfigurations" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_bucket_metrics_configurations(&mut s3_req).await?; -} -let result = s3.list_bucket_metrics_configurations(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_bucket_metrics_configurations(&mut s3_req).await?; + } + let result = s3.list_bucket_metrics_configurations(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListBuckets; impl ListBuckets { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket_region: Option = http::parse_opt_query(req, "bucket-region")?; - -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket_region: Option = http::parse_opt_query(req, "bucket-region")?; -let max_buckets: Option = http::parse_opt_query(req, "max-buckets")?; + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; - -Ok(ListBucketsInput { -bucket_region, -continuation_token, -max_buckets, -prefix, -}) -} + let max_buckets: Option = http::parse_opt_query(req, "max-buckets")?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -pub fn serialize_http(x: ListBucketsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListBucketsInput { + bucket_region, + continuation_token, + max_buckets, + prefix, + }) + } + pub fn serialize_http(x: ListBucketsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListBuckets { -fn name(&self) -> &'static str { -"ListBuckets" -} + fn name(&self) -> &'static str { + "ListBuckets" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_buckets(&mut s3_req).await?; -} -let result = s3.list_buckets(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_buckets(&mut s3_req).await?; + } + let result = s3.list_buckets(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListDirectoryBuckets; impl ListDirectoryBuckets { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; -let max_directory_buckets: Option = http::parse_opt_query(req, "max-directory-buckets")?; + let max_directory_buckets: Option = http::parse_opt_query(req, "max-directory-buckets")?; -Ok(ListDirectoryBucketsInput { -continuation_token, -max_directory_buckets, -}) -} - - -pub fn serialize_http(x: ListDirectoryBucketsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -Ok(res) -} + Ok(ListDirectoryBucketsInput { + continuation_token, + max_directory_buckets, + }) + } + pub fn serialize_http(x: ListDirectoryBucketsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListDirectoryBuckets { -fn name(&self) -> &'static str { -"ListDirectoryBuckets" -} + fn name(&self) -> &'static str { + "ListDirectoryBuckets" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_directory_buckets(&mut s3_req).await?; -} -let result = s3.list_directory_buckets(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_directory_buckets(&mut s3_req).await?; + } + let result = s3.list_directory_buckets(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListMultipartUploads; impl ListMultipartUploads { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let delimiter: Option = http::parse_opt_query(req, "delimiter")?; + let delimiter: Option = http::parse_opt_query(req, "delimiter")?; -let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; + let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let key_marker: Option = http::parse_opt_query(req, "key-marker")?; + let key_marker: Option = http::parse_opt_query(req, "key-marker")?; -let max_uploads: Option = http::parse_opt_query(req, "max-uploads")?; + let max_uploads: Option = http::parse_opt_query(req, "max-uploads")?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let upload_id_marker: Option = http::parse_opt_query(req, "upload-id-marker")?; + let upload_id_marker: Option = http::parse_opt_query(req, "upload-id-marker")?; -Ok(ListMultipartUploadsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -key_marker, -max_uploads, -prefix, -request_payer, -upload_id_marker, -}) -} - - -pub fn serialize_http(x: ListMultipartUploadsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListMultipartUploadsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + key_marker, + max_uploads, + prefix, + request_payer, + upload_id_marker, + }) + } + pub fn serialize_http(x: ListMultipartUploadsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListMultipartUploads { -fn name(&self) -> &'static str { -"ListMultipartUploads" -} + fn name(&self) -> &'static str { + "ListMultipartUploads" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_multipart_uploads(&mut s3_req).await?; -} -let result = s3.list_multipart_uploads(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_multipart_uploads(&mut s3_req).await?; + } + let result = s3.list_multipart_uploads(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListObjectVersions; impl ListObjectVersions { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let delimiter: Option = http::parse_opt_query(req, "delimiter")?; + let delimiter: Option = http::parse_opt_query(req, "delimiter")?; -let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; + let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let key_marker: Option = http::parse_opt_query(req, "key-marker")?; + let key_marker: Option = http::parse_opt_query(req, "key-marker")?; -let max_keys: Option = http::parse_opt_query(req, "max-keys")?; + let max_keys: Option = http::parse_opt_query(req, "max-keys")?; -let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; + let optional_object_attributes: Option = + http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let version_id_marker: Option = http::parse_opt_query(req, "version-id-marker")?; + let version_id_marker: Option = http::parse_opt_query(req, "version-id-marker")?; -Ok(ListObjectVersionsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -key_marker, -max_keys, -optional_object_attributes, -prefix, -request_payer, -version_id_marker, -}) -} - - -pub fn serialize_http(x: ListObjectVersionsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListObjectVersionsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + key_marker, + max_keys, + optional_object_attributes, + prefix, + request_payer, + version_id_marker, + }) + } + pub fn serialize_http(x: ListObjectVersionsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListObjectVersions { -fn name(&self) -> &'static str { -"ListObjectVersions" -} + fn name(&self) -> &'static str { + "ListObjectVersions" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_object_versions(&mut s3_req).await?; -} -let result = s3.list_object_versions(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_object_versions(&mut s3_req).await?; + } + let result = s3.list_object_versions(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListObjects; impl ListObjects { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let delimiter: Option = http::parse_opt_query(req, "delimiter")?; + let delimiter: Option = http::parse_opt_query(req, "delimiter")?; -let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; + let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let marker: Option = http::parse_opt_query(req, "marker")?; + let marker: Option = http::parse_opt_query(req, "marker")?; -let max_keys: Option = http::parse_opt_query(req, "max-keys")?; + let max_keys: Option = http::parse_opt_query(req, "max-keys")?; -let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; + let optional_object_attributes: Option = + http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -Ok(ListObjectsInput { -bucket, -delimiter, -encoding_type, -expected_bucket_owner, -marker, -max_keys, -optional_object_attributes, -prefix, -request_payer, -}) -} - - -pub fn serialize_http(x: ListObjectsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListObjectsInput { + bucket, + delimiter, + encoding_type, + expected_bucket_owner, + marker, + max_keys, + optional_object_attributes, + prefix, + request_payer, + }) + } + pub fn serialize_http(x: ListObjectsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListObjects { -fn name(&self) -> &'static str { -"ListObjects" -} + fn name(&self) -> &'static str { + "ListObjects" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_objects(&mut s3_req).await?; -} -let result = s3.list_objects(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_objects(&mut s3_req).await?; + } + let result = s3.list_objects(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListObjectsV2; impl ListObjectsV2 { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; + let continuation_token: Option = http::parse_opt_query(req, "continuation-token")?; -let delimiter: Option = http::parse_opt_query(req, "delimiter")?; + let delimiter: Option = http::parse_opt_query(req, "delimiter")?; -let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; + let encoding_type: Option = http::parse_opt_query(req, "encoding-type")?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let fetch_owner: Option = http::parse_opt_query(req, "fetch-owner")?; + let fetch_owner: Option = http::parse_opt_query(req, "fetch-owner")?; -let max_keys: Option = http::parse_opt_query(req, "max-keys")?; + let max_keys: Option = http::parse_opt_query(req, "max-keys")?; -let optional_object_attributes: Option = http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; + let optional_object_attributes: Option = + http::parse_opt_list_header(req, &X_AMZ_OPTIONAL_OBJECT_ATTRIBUTES)?; -let prefix: Option = http::parse_opt_query(req, "prefix")?; + let prefix: Option = http::parse_opt_query(req, "prefix")?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let start_after: Option = http::parse_opt_query(req, "start-after")?; + let start_after: Option = http::parse_opt_query(req, "start-after")?; -Ok(ListObjectsV2Input { -bucket, -continuation_token, -delimiter, -encoding_type, -expected_bucket_owner, -fetch_owner, -max_keys, -optional_object_attributes, -prefix, -request_payer, -start_after, -}) -} - - -pub fn serialize_http(x: ListObjectsV2Output) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListObjectsV2Input { + bucket, + continuation_token, + delimiter, + encoding_type, + expected_bucket_owner, + fetch_owner, + max_keys, + optional_object_attributes, + prefix, + request_payer, + start_after, + }) + } + pub fn serialize_http(x: ListObjectsV2Output) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListObjectsV2 { -fn name(&self) -> &'static str { -"ListObjectsV2" -} + fn name(&self) -> &'static str { + "ListObjectsV2" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_objects_v2(&mut s3_req).await?; -} -let result = s3.list_objects_v2(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_objects_v2(&mut s3_req).await?; + } + let result = s3.list_objects_v2(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct ListParts; impl ListParts { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let max_parts: Option = http::parse_opt_query(req, "max-parts")?; -let max_parts: Option = http::parse_opt_query(req, "max-parts")?; + let part_number_marker: Option = http::parse_opt_query(req, "part-number-marker")?; -let part_number_marker: Option = http::parse_opt_query(req, "part-number-marker")?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - -Ok(ListPartsInput { -bucket, -expected_bucket_owner, -key, -max_parts, -part_number_marker, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} - - -pub fn serialize_http(x: ListPartsOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::set_xml_body(&mut res, &x)?; -http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; -http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(ListPartsInput { + bucket, + expected_bucket_owner, + key, + max_parts, + part_number_marker, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + pub fn serialize_http(x: ListPartsOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::set_xml_body(&mut res, &x)?; + http::add_opt_header_timestamp(&mut res, X_AMZ_ABORT_DATE, x.abort_date, TimestampFormat::HttpDate)?; + http::add_opt_header(&mut res, X_AMZ_ABORT_RULE_ID, x.abort_rule_id)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for ListParts { -fn name(&self) -> &'static str { -"ListParts" -} + fn name(&self) -> &'static str { + "ListParts" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.list_parts(&mut s3_req).await?; -} -let result = s3.list_parts(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.list_parts(&mut s3_req).await?; + } + let result = s3.list_parts(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketAccelerateConfiguration; impl PutBucketAccelerateConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let accelerate_configuration: AccelerateConfiguration = http::take_xml_body(req)?; + let accelerate_configuration: AccelerateConfiguration = http::take_xml_body(req)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(PutBucketAccelerateConfigurationInput { -accelerate_configuration, -bucket, -checksum_algorithm, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(_: PutBucketAccelerateConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketAccelerateConfigurationInput { + accelerate_configuration, + bucket, + checksum_algorithm, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: PutBucketAccelerateConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketAccelerateConfiguration { -fn name(&self) -> &'static str { -"PutBucketAccelerateConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketAccelerateConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_accelerate_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_accelerate_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_accelerate_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_accelerate_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketAcl; impl PutBucketAcl { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let access_control_policy: Option = http::take_opt_xml_body(req)?; + let access_control_policy: Option = http::take_opt_xml_body(req)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; -let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; - -Ok(PutBucketAclInput { -acl, -access_control_policy, -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -}) -} - - -pub fn serialize_http(_: PutBucketAclOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketAclInput { + acl, + access_control_policy, + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + }) + } + pub fn serialize_http(_: PutBucketAclOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketAcl { -fn name(&self) -> &'static str { -"PutBucketAcl" -} + fn name(&self) -> &'static str { + "PutBucketAcl" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_acl(&mut s3_req).await?; -} -let result = s3.put_bucket_acl(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_acl(&mut s3_req).await?; + } + let result = s3.put_bucket_acl(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketAnalyticsConfiguration; impl PutBucketAnalyticsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let analytics_configuration: AnalyticsConfiguration = http::take_xml_body(req)?; + let analytics_configuration: AnalyticsConfiguration = http::take_xml_body(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: AnalyticsId = http::parse_query(req, "id")?; -let id: AnalyticsId = http::parse_query(req, "id")?; - -Ok(PutBucketAnalyticsConfigurationInput { -analytics_configuration, -bucket, -expected_bucket_owner, -id, -}) -} - - -pub fn serialize_http(_: PutBucketAnalyticsConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketAnalyticsConfigurationInput { + analytics_configuration, + bucket, + expected_bucket_owner, + id, + }) + } + pub fn serialize_http(_: PutBucketAnalyticsConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketAnalyticsConfiguration { -fn name(&self) -> &'static str { -"PutBucketAnalyticsConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketAnalyticsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_analytics_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_analytics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_analytics_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_analytics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketCors; impl PutBucketCors { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let cors_configuration: CORSConfiguration = http::take_xml_body(req)?; -let cors_configuration: CORSConfiguration = http::take_xml_body(req)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -Ok(PutBucketCorsInput { -bucket, -cors_configuration, -checksum_algorithm, -content_md5, -expected_bucket_owner, -}) -} - - -pub fn serialize_http(_: PutBucketCorsOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketCorsInput { + bucket, + cors_configuration, + checksum_algorithm, + content_md5, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: PutBucketCorsOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketCors { -fn name(&self) -> &'static str { -"PutBucketCors" -} + fn name(&self) -> &'static str { + "PutBucketCors" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_cors(&mut s3_req).await?; -} -let result = s3.put_bucket_cors(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_cors(&mut s3_req).await?; + } + let result = s3.put_bucket_cors(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketEncryption; impl PutBucketEncryption { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let server_side_encryption_configuration: ServerSideEncryptionConfiguration = http::take_xml_body(req)?; -let server_side_encryption_configuration: ServerSideEncryptionConfiguration = http::take_xml_body(req)?; - -Ok(PutBucketEncryptionInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -server_side_encryption_configuration, -}) -} - - -pub fn serialize_http(_: PutBucketEncryptionOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketEncryptionInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + server_side_encryption_configuration, + }) + } + pub fn serialize_http(_: PutBucketEncryptionOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketEncryption { -fn name(&self) -> &'static str { -"PutBucketEncryption" -} + fn name(&self) -> &'static str { + "PutBucketEncryption" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_encryption(&mut s3_req).await?; -} -let result = s3.put_bucket_encryption(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_encryption(&mut s3_req).await?; + } + let result = s3.put_bucket_encryption(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketIntelligentTieringConfiguration; impl PutBucketIntelligentTieringConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let id: IntelligentTieringId = http::parse_query(req, "id")?; -let id: IntelligentTieringId = http::parse_query(req, "id")?; + let intelligent_tiering_configuration: IntelligentTieringConfiguration = http::take_xml_body(req)?; -let intelligent_tiering_configuration: IntelligentTieringConfiguration = http::take_xml_body(req)?; - -Ok(PutBucketIntelligentTieringConfigurationInput { -bucket, -id, -intelligent_tiering_configuration, -}) -} - - -pub fn serialize_http(_: PutBucketIntelligentTieringConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketIntelligentTieringConfigurationInput { + bucket, + id, + intelligent_tiering_configuration, + }) + } + pub fn serialize_http(_: PutBucketIntelligentTieringConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketIntelligentTieringConfiguration { -fn name(&self) -> &'static str { -"PutBucketIntelligentTieringConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketIntelligentTieringConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_intelligent_tiering_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_intelligent_tiering_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_intelligent_tiering_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_intelligent_tiering_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketInventoryConfiguration; impl PutBucketInventoryConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let id: InventoryId = http::parse_query(req, "id")?; -let id: InventoryId = http::parse_query(req, "id")?; + let inventory_configuration: InventoryConfiguration = http::take_xml_body(req)?; -let inventory_configuration: InventoryConfiguration = http::take_xml_body(req)?; - -Ok(PutBucketInventoryConfigurationInput { -bucket, -expected_bucket_owner, -id, -inventory_configuration, -}) -} - - -pub fn serialize_http(_: PutBucketInventoryConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketInventoryConfigurationInput { + bucket, + expected_bucket_owner, + id, + inventory_configuration, + }) + } + pub fn serialize_http(_: PutBucketInventoryConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketInventoryConfiguration { -fn name(&self) -> &'static str { -"PutBucketInventoryConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketInventoryConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_inventory_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_inventory_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_inventory_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_inventory_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketLifecycleConfiguration; impl PutBucketLifecycleConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let lifecycle_configuration: Option = http::take_opt_xml_body(req)?; -let lifecycle_configuration: Option = http::take_opt_xml_body(req)?; + let transition_default_minimum_object_size: Option = + http::parse_opt_header(req, &X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE)?; -let transition_default_minimum_object_size: Option = http::parse_opt_header(req, &X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE)?; - -Ok(PutBucketLifecycleConfigurationInput { -bucket, -checksum_algorithm, -expected_bucket_owner, -lifecycle_configuration, -transition_default_minimum_object_size, -}) -} - - -pub fn serialize_http(x: PutBucketLifecycleConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, x.transition_default_minimum_object_size)?; -Ok(res) -} + Ok(PutBucketLifecycleConfigurationInput { + bucket, + checksum_algorithm, + expected_bucket_owner, + lifecycle_configuration, + transition_default_minimum_object_size, + }) + } + pub fn serialize_http(x: PutBucketLifecycleConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header( + &mut res, + X_AMZ_TRANSITION_DEFAULT_MINIMUM_OBJECT_SIZE, + x.transition_default_minimum_object_size, + )?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutBucketLifecycleConfiguration { -fn name(&self) -> &'static str { -"PutBucketLifecycleConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketLifecycleConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_lifecycle_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_lifecycle_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_lifecycle_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_lifecycle_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketLogging; impl PutBucketLogging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let bucket_logging_status: BucketLoggingStatus = http::take_xml_body(req)?; - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let bucket_logging_status: BucketLoggingStatus = http::take_xml_body(req)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -Ok(PutBucketLoggingInput { -bucket, -bucket_logging_status, -checksum_algorithm, -content_md5, -expected_bucket_owner, -}) -} + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -pub fn serialize_http(_: PutBucketLoggingOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketLoggingInput { + bucket, + bucket_logging_status, + checksum_algorithm, + content_md5, + expected_bucket_owner, + }) + } + pub fn serialize_http(_: PutBucketLoggingOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketLogging { -fn name(&self) -> &'static str { -"PutBucketLogging" -} + fn name(&self) -> &'static str { + "PutBucketLogging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_logging(&mut s3_req).await?; -} -let result = s3.put_bucket_logging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_logging(&mut s3_req).await?; + } + let result = s3.put_bucket_logging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketMetricsConfiguration; impl PutBucketMetricsConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let id: MetricsId = http::parse_query(req, "id")?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let metrics_configuration: MetricsConfiguration = http::take_xml_body(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(PutBucketMetricsConfigurationInput { -bucket, -expected_bucket_owner, -id, -metrics_configuration, -}) -} + let id: MetricsId = http::parse_query(req, "id")?; + let metrics_configuration: MetricsConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketMetricsConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketMetricsConfigurationInput { + bucket, + expected_bucket_owner, + id, + metrics_configuration, + }) + } + pub fn serialize_http(_: PutBucketMetricsConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketMetricsConfiguration { -fn name(&self) -> &'static str { -"PutBucketMetricsConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketMetricsConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_metrics_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_metrics_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_metrics_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_metrics_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketNotificationConfiguration; impl PutBucketNotificationConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let notification_configuration: NotificationConfiguration = http::take_xml_body(req)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let skip_destination_validation: Option = http::parse_opt_header(req, &X_AMZ_SKIP_DESTINATION_VALIDATION)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(PutBucketNotificationConfigurationInput { -bucket, -expected_bucket_owner, -notification_configuration, -skip_destination_validation, -}) -} + let notification_configuration: NotificationConfiguration = http::take_xml_body(req)?; + let skip_destination_validation: Option = + http::parse_opt_header(req, &X_AMZ_SKIP_DESTINATION_VALIDATION)?; -pub fn serialize_http(_: PutBucketNotificationConfigurationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketNotificationConfigurationInput { + bucket, + expected_bucket_owner, + notification_configuration, + skip_destination_validation, + }) + } + pub fn serialize_http(_: PutBucketNotificationConfigurationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketNotificationConfiguration { -fn name(&self) -> &'static str { -"PutBucketNotificationConfiguration" -} + fn name(&self) -> &'static str { + "PutBucketNotificationConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_notification_configuration(&mut s3_req).await?; -} -let result = s3.put_bucket_notification_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_notification_configuration(&mut s3_req).await?; + } + let result = s3.put_bucket_notification_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketOwnershipControls; impl PutBucketOwnershipControls { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let ownership_controls: OwnershipControls = http::take_xml_body(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -Ok(PutBucketOwnershipControlsInput { -bucket, -content_md5, -expected_bucket_owner, -ownership_controls, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let ownership_controls: OwnershipControls = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketOwnershipControlsOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketOwnershipControlsInput { + bucket, + content_md5, + expected_bucket_owner, + ownership_controls, + }) + } + pub fn serialize_http(_: PutBucketOwnershipControlsOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketOwnershipControls { -fn name(&self) -> &'static str { -"PutBucketOwnershipControls" -} + fn name(&self) -> &'static str { + "PutBucketOwnershipControls" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_ownership_controls(&mut s3_req).await?; -} -let result = s3.put_bucket_ownership_controls(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_ownership_controls(&mut s3_req).await?; + } + let result = s3.put_bucket_ownership_controls(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketPolicy; impl PutBucketPolicy { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let confirm_remove_self_bucket_access: Option = http::parse_opt_header(req, &X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let confirm_remove_self_bucket_access: Option = + http::parse_opt_header(req, &X_AMZ_CONFIRM_REMOVE_SELF_BUCKET_ACCESS)?; -let policy: Policy = http::take_string_body(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -Ok(PutBucketPolicyInput { -bucket, -checksum_algorithm, -confirm_remove_self_bucket_access, -content_md5, -expected_bucket_owner, -policy, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let policy: Policy = http::take_string_body(req)?; -pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) -} + Ok(PutBucketPolicyInput { + bucket, + checksum_algorithm, + confirm_remove_self_bucket_access, + content_md5, + expected_bucket_owner, + policy, + }) + } + pub fn serialize_http(_: PutBucketPolicyOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::NO_CONTENT)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketPolicy { -fn name(&self) -> &'static str { -"PutBucketPolicy" -} + fn name(&self) -> &'static str { + "PutBucketPolicy" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_policy(&mut s3_req).await?; -} -let result = s3.put_bucket_policy(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_policy(&mut s3_req).await?; + } + let result = s3.put_bucket_policy(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketReplication; impl PutBucketReplication { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let replication_configuration: ReplicationConfiguration = http::take_xml_body(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -Ok(PutBucketReplicationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -replication_configuration, -token, -}) -} + let replication_configuration: ReplicationConfiguration = http::take_xml_body(req)?; + let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; -pub fn serialize_http(_: PutBucketReplicationOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketReplicationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + replication_configuration, + token, + }) + } + pub fn serialize_http(_: PutBucketReplicationOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketReplication { -fn name(&self) -> &'static str { -"PutBucketReplication" -} + fn name(&self) -> &'static str { + "PutBucketReplication" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_replication(&mut s3_req).await?; -} -let result = s3.put_bucket_replication(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_replication(&mut s3_req).await?; + } + let result = s3.put_bucket_replication(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketRequestPayment; impl PutBucketRequestPayment { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let request_payment_configuration: RequestPaymentConfiguration = http::take_xml_body(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -Ok(PutBucketRequestPaymentInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -request_payment_configuration, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payment_configuration: RequestPaymentConfiguration = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketRequestPaymentOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketRequestPaymentInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + request_payment_configuration, + }) + } + pub fn serialize_http(_: PutBucketRequestPaymentOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketRequestPayment { -fn name(&self) -> &'static str { -"PutBucketRequestPayment" -} + fn name(&self) -> &'static str { + "PutBucketRequestPayment" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_request_payment(&mut s3_req).await?; -} -let result = s3.put_bucket_request_payment(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_request_payment(&mut s3_req).await?; + } + let result = s3.put_bucket_request_payment(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutBucketTagging; impl PutBucketTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let tagging: Tagging = http::take_xml_body(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -Ok(PutBucketTaggingInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -tagging, -}) -} + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let tagging: Tagging = http::take_xml_body(req)?; -pub fn serialize_http(_: PutBucketTaggingOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutBucketTaggingInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + tagging, + }) + } + pub fn serialize_http(_: PutBucketTaggingOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutBucketTagging { -fn name(&self) -> &'static str { -"PutBucketTagging" -} - -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_tagging(&mut s3_req).await?; -} -let result = s3.put_bucket_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} - -pub struct PutBucketVersioning; - -impl PutBucketVersioning { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; - -let versioning_configuration: VersioningConfiguration = http::take_versioning_configuration(req)?; - -Ok(PutBucketVersioningInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -mfa, -versioning_configuration, -}) -} - - -pub fn serialize_http(_: PutBucketVersioningOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} - -} - -#[async_trait::async_trait] -impl super::Operation for PutBucketVersioning { -fn name(&self) -> &'static str { -"PutBucketVersioning" -} - -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_versioning(&mut s3_req).await?; -} -let result = s3.put_bucket_versioning(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} -} - -pub struct PutBucketWebsite; - -impl PutBucketWebsite { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - -let website_configuration: WebsiteConfiguration = http::take_xml_body(req)?; - -Ok(PutBucketWebsiteInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -website_configuration, -}) -} - - -pub fn serialize_http(_: PutBucketWebsiteOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} - -} - -#[async_trait::async_trait] -impl super::Operation for PutBucketWebsite { -fn name(&self) -> &'static str { -"PutBucketWebsite" -} + fn name(&self) -> &'static str { + "PutBucketTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_bucket_website(&mut s3_req).await?; -} -let result = s3.put_bucket_website(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_tagging(&mut s3_req).await?; + } + let result = s3.put_bucket_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } -pub struct PutObject; +pub struct PutBucketVersioning; -impl PutObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -if let Some(m) = req.s3ext.multipart.take() { - return Self::deserialize_http_multipart(req, m); -} +impl PutBucketVersioning { + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let (bucket, key) = http::unwrap_object(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let body: Option = Some(http::take_stream_body(req)); + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let mfa: Option = http::parse_opt_header(req, &X_AMZ_MFA)?; -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; + let versioning_configuration: VersioningConfiguration = http::take_versioning_configuration(req)?; -let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; + Ok(PutBucketVersioningInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + mfa, + versioning_configuration, + }) + } -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + pub fn serialize_http(_: PutBucketVersioningOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } +} -let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; +#[async_trait::async_trait] +impl super::Operation for PutBucketVersioning { + fn name(&self) -> &'static str { + "PutBucketVersioning" + } -let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_versioning(&mut s3_req).await?; + } + let result = s3.put_bucket_versioning(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } +} -let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; +pub struct PutBucketWebsite; -let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; +impl PutBucketWebsite { + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); -let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; + let website_configuration: WebsiteConfiguration = http::take_xml_body(req)?; -let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; + Ok(PutBucketWebsiteInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + website_configuration, + }) + } -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + pub fn serialize_http(_: PutBucketWebsiteOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } +} -let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; +#[async_trait::async_trait] +impl super::Operation for PutBucketWebsite { + fn name(&self) -> &'static str { + "PutBucketWebsite" + } -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_bucket_website(&mut s3_req).await?; + } + let result = s3.put_bucket_website(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } +} -let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; +pub struct PutObject; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; +impl PutObject { + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + if let Some(m) = req.s3ext.multipart.take() { + return Self::deserialize_http_multipart(req, m); + } -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let (bucket, key) = http::unwrap_object(req); -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let body: Option = Some(http::take_stream_body(req)); -let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; + let cache_control: Option = http::parse_opt_header(req, &CACHE_CONTROL)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let metadata: Option = http::parse_opt_metadata(req)?; + let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; -let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; + let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; -let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; + let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; -let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let content_disposition: Option = http::parse_opt_header(req, &CONTENT_DISPOSITION)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let content_encoding: Option = http::parse_opt_header(req, &CONTENT_ENCODING)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let content_language: Option = http::parse_opt_header(req, &CONTENT_LANGUAGE)?; -let ssekms_encryption_context: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; + let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; + let content_type: Option = http::parse_opt_header(req, &CONTENT_TYPE)?; -let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; + let expires: Option = http::parse_opt_header_timestamp(req, &EXPIRES, TimestampFormat::HttpDate)?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let website_redirect_location: Option = http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let write_offset_bytes: Option = http::parse_opt_header(req, &X_AMZ_WRITE_OFFSET_BYTES)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -Ok(PutObjectInput { -acl, -body, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_md5, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -if_match, -if_none_match, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -version_id, -website_redirect_location, -write_offset_bytes, -}) -} + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; -pub fn deserialize_http_multipart(req: &mut http::Request, m: http::Multipart) -> S3Result { -let bucket = http::unwrap_bucket(req); -let key = http::parse_field_value(&m, "key")?.ok_or_else(|| invalid_request!("missing key"))?; + let if_match: Option = http::parse_opt_header(req, &IF_MATCH)?; -let vec_stream = req.s3ext.vec_stream.take().expect("missing vec stream"); + let if_none_match: Option = http::parse_opt_header(req, &IF_NONE_MATCH)?; -let content_length = i64::try_from(vec_stream.exact_remaining_length()) - .map_err(|e| s3_error!(e, InvalidArgument, "content-length overflow"))?; -let content_length = (content_length != 0).then_some(content_length); + let metadata: Option = http::parse_opt_metadata(req)?; -let body: Option = Some(StreamingBlob::new(vec_stream)); + let object_lock_legal_hold_status: Option = + http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; -let acl: Option = http::parse_field_value(&m, "x-amz-acl")?; + let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_OBJECT_LOCK_MODE)?; + let object_lock_retain_until_date: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let bucket_key_enabled: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-bucket-key-enabled")?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let cache_control: Option = http::parse_field_value(&m, "cache-control")?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let checksum_algorithm: Option = http::parse_field_value(&m, "x-amz-sdk-checksum-algorithm")?; + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; -let checksum_crc32: Option = http::parse_field_value(&m, "x-amz-checksum-crc32")?; + let ssekms_encryption_context: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT)?; -let checksum_crc32c: Option = http::parse_field_value(&m, "x-amz-checksum-crc32c")?; + let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; -let checksum_crc64nvme: Option = http::parse_field_value(&m, "x-amz-checksum-crc64nvme")?; + let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION)?; -let checksum_sha1: Option = http::parse_field_value(&m, "x-amz-checksum-sha1")?; + let storage_class: Option = http::parse_opt_header(req, &X_AMZ_STORAGE_CLASS)?; -let checksum_sha256: Option = http::parse_field_value(&m, "x-amz-checksum-sha256")?; + let tagging: Option = http::parse_opt_header(req, &X_AMZ_TAGGING)?; -let content_disposition: Option = http::parse_field_value(&m, "content-disposition")?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let content_encoding: Option = http::parse_field_value(&m, "content-encoding")?; + let website_redirect_location: Option = + http::parse_opt_header(req, &X_AMZ_WEBSITE_REDIRECT_LOCATION)?; -let content_language: Option = http::parse_field_value(&m, "content-language")?; + let write_offset_bytes: Option = http::parse_opt_header(req, &X_AMZ_WRITE_OFFSET_BYTES)?; -let content_md5: Option = http::parse_field_value(&m, "content-md5")?; + Ok(PutObjectInput { + acl, + body, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_md5, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + if_match, + if_none_match, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + version_id, + website_redirect_location, + write_offset_bytes, + }) + } -let content_type: Option = http::parse_field_value(&m, "content-type")?; + pub fn deserialize_http_multipart(req: &mut http::Request, m: http::Multipart) -> S3Result { + let bucket = http::unwrap_bucket(req); + let key = http::parse_field_value(&m, "key")?.ok_or_else(|| invalid_request!("missing key"))?; -let expected_bucket_owner: Option = http::parse_field_value(&m, "x-amz-expected-bucket-owner")?; + let vec_stream = req.s3ext.vec_stream.take().expect("missing vec stream"); -let expires: Option = http::parse_field_value_timestamp(&m, "expires", TimestampFormat::HttpDate)?; + let content_length = i64::try_from(vec_stream.exact_remaining_length()) + .map_err(|e| s3_error!(e, InvalidArgument, "content-length overflow"))?; + let content_length = (content_length != 0).then_some(content_length); -let grant_full_control: Option = http::parse_field_value(&m, "x-amz-grant-full-control")?; + let body: Option = Some(StreamingBlob::new(vec_stream)); -let grant_read: Option = http::parse_field_value(&m, "x-amz-grant-read")?; + let acl: Option = http::parse_field_value(&m, "x-amz-acl")?; -let grant_read_acp: Option = http::parse_field_value(&m, "x-amz-grant-read-acp")?; + let bucket_key_enabled: Option = + http::parse_field_value(&m, "x-amz-server-side-encryption-bucket-key-enabled")?; -let grant_write_acp: Option = http::parse_field_value(&m, "x-amz-grant-write-acp")?; + let cache_control: Option = http::parse_field_value(&m, "cache-control")?; -let if_match: Option = http::parse_field_value(&m, "if-match")?; + let checksum_algorithm: Option = http::parse_field_value(&m, "x-amz-sdk-checksum-algorithm")?; -let if_none_match: Option = http::parse_field_value(&m, "if-none-match")?; + let checksum_crc32: Option = http::parse_field_value(&m, "x-amz-checksum-crc32")?; + let checksum_crc32c: Option = http::parse_field_value(&m, "x-amz-checksum-crc32c")?; -let metadata: Option = { - let mut metadata = Metadata::default(); - for (name, value) in m.fields() { - if let Some(key) = name.strip_prefix("x-amz-meta-") { - if key.is_empty() { continue; } - metadata.insert(key.to_owned(), value.clone()); - } - } - if metadata.is_empty() { None } else { Some(metadata) } -}; + let checksum_crc64nvme: Option = http::parse_field_value(&m, "x-amz-checksum-crc64nvme")?; -let object_lock_legal_hold_status: Option = http::parse_field_value(&m, "x-amz-object-lock-legal-hold")?; + let checksum_sha1: Option = http::parse_field_value(&m, "x-amz-checksum-sha1")?; -let object_lock_mode: Option = http::parse_field_value(&m, "x-amz-object-lock-mode")?; + let checksum_sha256: Option = http::parse_field_value(&m, "x-amz-checksum-sha256")?; -let object_lock_retain_until_date: Option = http::parse_field_value_timestamp(&m, "x-amz-object-lock-retain-until-date", TimestampFormat::DateTime)?; + let content_disposition: Option = http::parse_field_value(&m, "content-disposition")?; -let request_payer: Option = http::parse_field_value(&m, "x-amz-request-payer")?; + let content_encoding: Option = http::parse_field_value(&m, "content-encoding")?; -let sse_customer_algorithm: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-algorithm")?; + let content_language: Option = http::parse_field_value(&m, "content-language")?; -let sse_customer_key: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key")?; + let content_md5: Option = http::parse_field_value(&m, "content-md5")?; -let sse_customer_key_md5: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key-md5")?; + let content_type: Option = http::parse_field_value(&m, "content-type")?; -let ssekms_encryption_context: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-context")?; + let expected_bucket_owner: Option = http::parse_field_value(&m, "x-amz-expected-bucket-owner")?; -let ssekms_key_id: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-aws-kms-key-id")?; + let expires: Option = http::parse_field_value_timestamp(&m, "expires", TimestampFormat::HttpDate)?; -let server_side_encryption: Option = http::parse_field_value(&m, "x-amz-server-side-encryption")?; + let grant_full_control: Option = http::parse_field_value(&m, "x-amz-grant-full-control")?; -let storage_class: Option = http::parse_field_value(&m, "x-amz-storage-class")?; + let grant_read: Option = http::parse_field_value(&m, "x-amz-grant-read")?; -let tagging: Option = http::parse_field_value(&m, "x-amz-tagging")?; + let grant_read_acp: Option = http::parse_field_value(&m, "x-amz-grant-read-acp")?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let grant_write_acp: Option = http::parse_field_value(&m, "x-amz-grant-write-acp")?; -let website_redirect_location: Option = http::parse_field_value(&m, "x-amz-website-redirect-location")?; + let if_match: Option = http::parse_field_value(&m, "if-match")?; -let write_offset_bytes: Option = http::parse_field_value(&m, "x-amz-write-offset-bytes")?; + let if_none_match: Option = http::parse_field_value(&m, "if-none-match")?; -Ok(PutObjectInput { -acl, -body, -bucket, -bucket_key_enabled, -cache_control, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_md5, -content_type, -expected_bucket_owner, -expires, -grant_full_control, -grant_read, -grant_read_acp, -grant_write_acp, -if_match, -if_none_match, -key, -metadata, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -ssekms_encryption_context, -ssekms_key_id, -server_side_encryption, -storage_class, -tagging, -version_id, -website_redirect_location, -write_offset_bytes, -}) -} + let metadata: Option = { + let mut metadata = Metadata::default(); + for (name, value) in m.fields() { + if let Some(key) = name.strip_prefix("x-amz-meta-") { + if key.is_empty() { + continue; + } + metadata.insert(key.to_owned(), value.clone()); + } + } + if metadata.is_empty() { None } else { Some(metadata) } + }; -pub fn serialize_http(x: PutObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; -http::add_opt_header(&mut res, ETAG, x.e_tag)?; -http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -http::add_opt_header(&mut res, X_AMZ_OBJECT_SIZE, x.size)?; -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + let object_lock_legal_hold_status: Option = + http::parse_field_value(&m, "x-amz-object-lock-legal-hold")?; + + let object_lock_mode: Option = http::parse_field_value(&m, "x-amz-object-lock-mode")?; + + let object_lock_retain_until_date: Option = + http::parse_field_value_timestamp(&m, "x-amz-object-lock-retain-until-date", TimestampFormat::DateTime)?; + + let request_payer: Option = http::parse_field_value(&m, "x-amz-request-payer")?; + + let sse_customer_algorithm: Option = + http::parse_field_value(&m, "x-amz-server-side-encryption-customer-algorithm")?; + + let sse_customer_key: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key")?; + + let sse_customer_key_md5: Option = + http::parse_field_value(&m, "x-amz-server-side-encryption-customer-key-md5")?; + + let ssekms_encryption_context: Option = + http::parse_field_value(&m, "x-amz-server-side-encryption-context")?; + + let ssekms_key_id: Option = http::parse_field_value(&m, "x-amz-server-side-encryption-aws-kms-key-id")?; + + let server_side_encryption: Option = http::parse_field_value(&m, "x-amz-server-side-encryption")?; + + let storage_class: Option = http::parse_field_value(&m, "x-amz-storage-class")?; + + let tagging: Option = http::parse_field_value(&m, "x-amz-tagging")?; + + let version_id: Option = http::parse_opt_query(req, "versionId")?; + + let website_redirect_location: Option = + http::parse_field_value(&m, "x-amz-website-redirect-location")?; + + let write_offset_bytes: Option = http::parse_field_value(&m, "x-amz-write-offset-bytes")?; + + Ok(PutObjectInput { + acl, + body, + bucket, + bucket_key_enabled, + cache_control, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_md5, + content_type, + expected_bucket_owner, + expires, + grant_full_control, + grant_read, + grant_read_acp, + grant_write_acp, + if_match, + if_none_match, + key, + metadata, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + ssekms_encryption_context, + ssekms_key_id, + server_side_encryption, + storage_class, + tagging, + version_id, + website_redirect_location, + write_offset_bytes, + }) + } + pub fn serialize_http(x: PutObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_TYPE, x.checksum_type)?; + http::add_opt_header(&mut res, ETAG, x.e_tag)?; + http::add_opt_header(&mut res, X_AMZ_EXPIRATION, x.expiration)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CONTEXT, x.ssekms_encryption_context)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + http::add_opt_header(&mut res, X_AMZ_OBJECT_SIZE, x.size)?; + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObject { -fn name(&self) -> &'static str { -"PutObject" -} + fn name(&self) -> &'static str { + "PutObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object(&mut s3_req).await?; -} -let result = s3.put_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object(&mut s3_req).await?; + } + let result = s3.put_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectAcl; impl PutObjectAcl { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - -let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let access_control_policy: Option = http::take_opt_xml_body(req)?; + let acl: Option = http::parse_opt_header(req, &X_AMZ_ACL)?; + let access_control_policy: Option = http::take_opt_xml_body(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; + let grant_full_control: Option = http::parse_opt_header(req, &X_AMZ_GRANT_FULL_CONTROL)?; -let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; + let grant_read: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ)?; -let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; + let grant_read_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_READ_ACP)?; -let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; + let grant_write: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE)?; -let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let grant_write_acp: Option = http::parse_opt_header(req, &X_AMZ_GRANT_WRITE_ACP)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(PutObjectAclInput { -acl, -access_control_policy, -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -grant_full_control, -grant_read, -grant_read_acp, -grant_write, -grant_write_acp, -key, -request_payer, -version_id, -}) -} - - -pub fn serialize_http(x: PutObjectAclOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(PutObjectAclInput { + acl, + access_control_policy, + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + grant_full_control, + grant_read, + grant_read_acp, + grant_write, + grant_write_acp, + key, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: PutObjectAclOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectAcl { -fn name(&self) -> &'static str { -"PutObjectAcl" -} + fn name(&self) -> &'static str { + "PutObjectAcl" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_acl(&mut s3_req).await?; -} -let result = s3.put_object_acl(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_acl(&mut s3_req).await?; + } + let result = s3.put_object_acl(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectLegalHold; impl PutObjectLegalHold { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - - -let legal_hold: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); - } - Err(e) => return Err(e), -}; - -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let version_id: Option = http::parse_opt_query(req, "versionId")?; + let legal_hold: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); + } + Err(e) => return Err(e), + }; -Ok(PutObjectLegalHoldInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -legal_hold, -request_payer, -version_id, -}) -} + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -pub fn serialize_http(x: PutObjectLegalHoldOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(PutObjectLegalHoldInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + legal_hold, + request_payer, + version_id, + }) + } + pub fn serialize_http(x: PutObjectLegalHoldOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectLegalHold { -fn name(&self) -> &'static str { -"PutObjectLegalHold" -} + fn name(&self) -> &'static str { + "PutObjectLegalHold" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_legal_hold(&mut s3_req).await?; -} -let result = s3.put_object_legal_hold(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_legal_hold(&mut s3_req).await?; + } + let result = s3.put_object_legal_hold(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectLockConfiguration; impl PutObjectLockConfiguration { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let object_lock_configuration: Option = http::take_opt_object_lock_configuration(req)?; -let object_lock_configuration: Option = http::take_opt_object_lock_configuration(req)?; - -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; - -Ok(PutObjectLockConfigurationInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -object_lock_configuration, -request_payer, -token, -}) -} + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let token: Option = http::parse_opt_header(req, &X_AMZ_BUCKET_OBJECT_LOCK_TOKEN)?; -pub fn serialize_http(x: PutObjectLockConfigurationOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + Ok(PutObjectLockConfigurationInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + object_lock_configuration, + request_payer, + token, + }) + } + pub fn serialize_http(x: PutObjectLockConfigurationOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectLockConfiguration { -fn name(&self) -> &'static str { -"PutObjectLockConfiguration" -} + fn name(&self) -> &'static str { + "PutObjectLockConfiguration" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_lock_configuration(&mut s3_req).await?; -} -let result = s3.put_object_lock_configuration(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_lock_configuration(&mut s3_req).await?; + } + let result = s3.put_object_lock_configuration(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectRetention; impl PutObjectRetention { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let bypass_governance_retention: Option = + http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; -let bypass_governance_retention: Option = http::parse_opt_header(req, &X_AMZ_BYPASS_GOVERNANCE_RETENTION)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let retention: Option = match http::take_xml_body(req) { + Ok(body) => Some(body), + Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { + return Err(crate::S3ErrorCode::MalformedXML.into()); + } + Err(e) => return Err(e), + }; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; - -let retention: Option = match http::take_xml_body(req) { - Ok(body) => Some(body), - Err(e) if *e.code() == crate::S3ErrorCode::MissingRequestBodyError => { - return Err(crate::S3ErrorCode::MalformedXML.into()); + let version_id: Option = http::parse_opt_query(req, "versionId")?; + + Ok(PutObjectRetentionInput { + bucket, + bypass_governance_retention, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + request_payer, + retention, + version_id, + }) } - Err(e) => return Err(e), -}; - -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(PutObjectRetentionInput { -bucket, -bypass_governance_retention, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -request_payer, -retention, -version_id, -}) -} - - -pub fn serialize_http(x: PutObjectRetentionOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -Ok(res) -} + pub fn serialize_http(x: PutObjectRetentionOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectRetention { -fn name(&self) -> &'static str { -"PutObjectRetention" -} + fn name(&self) -> &'static str { + "PutObjectRetention" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_retention(&mut s3_req).await?; -} -let result = s3.put_object_retention(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_retention(&mut s3_req).await?; + } + let result = s3.put_object_retention(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutObjectTagging; impl PutObjectTagging { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let tagging: Tagging = http::take_xml_body(req)?; -let tagging: Tagging = http::take_xml_body(req)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(PutObjectTaggingInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -key, -request_payer, -tagging, -version_id, -}) -} - - -pub fn serialize_http(x: PutObjectTaggingOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; -Ok(res) -} + Ok(PutObjectTaggingInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + key, + request_payer, + tagging, + version_id, + }) + } + pub fn serialize_http(x: PutObjectTaggingOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_VERSION_ID, x.version_id)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for PutObjectTagging { -fn name(&self) -> &'static str { -"PutObjectTagging" -} + fn name(&self) -> &'static str { + "PutObjectTagging" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_object_tagging(&mut s3_req).await?; -} -let result = s3.put_object_tagging(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_object_tagging(&mut s3_req).await?; + } + let result = s3.put_object_tagging(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PutPublicAccessBlock; impl PutPublicAccessBlock { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let bucket = http::unwrap_bucket(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let bucket = http::unwrap_bucket(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let public_access_block_configuration: PublicAccessBlockConfiguration = http::take_xml_body(req)?; -let public_access_block_configuration: PublicAccessBlockConfiguration = http::take_xml_body(req)?; - -Ok(PutPublicAccessBlockInput { -bucket, -checksum_algorithm, -content_md5, -expected_bucket_owner, -public_access_block_configuration, -}) -} - - -pub fn serialize_http(_: PutPublicAccessBlockOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + Ok(PutPublicAccessBlockInput { + bucket, + checksum_algorithm, + content_md5, + expected_bucket_owner, + public_access_block_configuration, + }) + } + pub fn serialize_http(_: PutPublicAccessBlockOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for PutPublicAccessBlock { -fn name(&self) -> &'static str { -"PutPublicAccessBlock" -} + fn name(&self) -> &'static str { + "PutPublicAccessBlock" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.put_public_access_block(&mut s3_req).await?; -} -let result = s3.put_public_access_block(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.put_public_access_block(&mut s3_req).await?; + } + let result = s3.put_public_access_block(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct RestoreObject; impl RestoreObject { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let restore_request: Option = http::take_opt_xml_body(req)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let version_id: Option = http::parse_opt_query(req, "versionId")?; -let restore_request: Option = http::take_opt_xml_body(req)?; - -let version_id: Option = http::parse_opt_query(req, "versionId")?; - -Ok(RestoreObjectInput { -bucket, -checksum_algorithm, -expected_bucket_owner, -key, -request_payer, -restore_request, -version_id, -}) -} - - -pub fn serialize_http(x: RestoreObjectOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_RESTORE_OUTPUT_PATH, x.restore_output_path)?; -Ok(res) -} + Ok(RestoreObjectInput { + bucket, + checksum_algorithm, + expected_bucket_owner, + key, + request_payer, + restore_request, + version_id, + }) + } + pub fn serialize_http(x: RestoreObjectOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_RESTORE_OUTPUT_PATH, x.restore_output_path)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for RestoreObject { -fn name(&self) -> &'static str { -"RestoreObject" -} + fn name(&self) -> &'static str { + "RestoreObject" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.restore_object(&mut s3_req).await?; -} -let result = s3.restore_object(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.restore_object(&mut s3_req).await?; + } + let result = s3.restore_object(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct SelectObjectContent; impl SelectObjectContent { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; - + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let request: SelectObjectContentRequest = http::take_xml_body(req)?; - -Ok(SelectObjectContentInput { -bucket, -expected_bucket_owner, -key, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -request, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let request: SelectObjectContentRequest = http::take_xml_body(req)?; -pub fn serialize_http(x: SelectObjectContentOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(val) = x.payload { -http::set_event_stream_body(&mut res, val); -} -Ok(res) -} + Ok(SelectObjectContentInput { + bucket, + expected_bucket_owner, + key, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + request, + }) + } + pub fn serialize_http(x: SelectObjectContentOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(val) = x.payload { + http::set_event_stream_body(&mut res, val); + } + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for SelectObjectContent { -fn name(&self) -> &'static str { -"SelectObjectContent" -} + fn name(&self) -> &'static str { + "SelectObjectContent" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.select_object_content(&mut s3_req).await?; -} -let result = s3.select_object_content(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.select_object_content(&mut s3_req).await?; + } + let result = s3.select_object_content(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct UploadPart; impl UploadPart { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - -let body: Option = Some(http::take_stream_body(req)); - - -let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; - -let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; + let body: Option = Some(http::take_stream_body(req)); -let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; + let checksum_algorithm: Option = http::parse_checksum_algorithm_header(req)?; -let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; + let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32)?; -let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; + let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC32C)?; -let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; + let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_CRC64NVME)?; -let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; + let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA1)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_CHECKSUM_SHA256)?; + let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; -let part_number: PartNumber = http::parse_query(req, "partNumber")?; + let content_md5: Option = http::parse_opt_header(req, &CONTENT_MD5)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let part_number: PartNumber = http::parse_query(req, "partNumber")?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -Ok(UploadPartInput { -body, -bucket, -checksum_algorithm, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_length, -content_md5, -expected_bucket_owner, -key, -part_number, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; -pub fn serialize_http(x: UploadPartOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; -http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; -http::add_opt_header(&mut res, ETAG, x.e_tag)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -Ok(res) -} + Ok(UploadPartInput { + body, + bucket, + checksum_algorithm, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_length, + content_md5, + expected_bucket_owner, + key, + part_number, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + pub fn serialize_http(x: UploadPartOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32, x.checksum_crc32)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC32C, x.checksum_crc32c)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_CRC64NVME, x.checksum_crc64nvme)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA1, x.checksum_sha1)?; + http::add_opt_header(&mut res, X_AMZ_CHECKSUM_SHA256, x.checksum_sha256)?; + http::add_opt_header(&mut res, ETAG, x.e_tag)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for UploadPart { -fn name(&self) -> &'static str { -"UploadPart" -} + fn name(&self) -> &'static str { + "UploadPart" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.upload_part(&mut s3_req).await?; -} -let result = s3.upload_part(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.upload_part(&mut s3_req).await?; + } + let result = s3.upload_part(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct UploadPartCopy; impl UploadPartCopy { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let (bucket, key) = http::unwrap_object(req); - - -let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; - -let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let (bucket, key) = http::unwrap_object(req); -let copy_source_if_modified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; + let copy_source: CopySource = http::parse_header(req, &X_AMZ_COPY_SOURCE)?; -let copy_source_if_none_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; + let copy_source_if_match: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_MATCH)?; -let copy_source_if_unmodified_since: Option = http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; + let copy_source_if_modified_since: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_MODIFIED_SINCE, TimestampFormat::HttpDate)?; -let copy_source_range: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_RANGE)?; + let copy_source_if_none_match: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_IF_NONE_MATCH)?; -let copy_source_sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let copy_source_if_unmodified_since: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_COPY_SOURCE_IF_UNMODIFIED_SINCE, TimestampFormat::HttpDate)?; -let copy_source_sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let copy_source_range: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_RANGE)?; -let copy_source_sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let copy_source_sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; + let copy_source_sse_customer_key: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; + let copy_source_sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_COPY_SOURCE_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let expected_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_EXPECTED_BUCKET_OWNER)?; -let part_number: PartNumber = http::parse_query(req, "partNumber")?; + let expected_source_bucket_owner: Option = http::parse_opt_header(req, &X_AMZ_SOURCE_EXPECTED_BUCKET_OWNER)?; -let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; + let part_number: PartNumber = http::parse_query(req, "partNumber")?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + let request_payer: Option = http::parse_opt_header(req, &X_AMZ_REQUEST_PAYER)?; -let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let sse_customer_key: Option = http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY)?; -let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; - -Ok(UploadPartCopyInput { -bucket, -copy_source, -copy_source_if_match, -copy_source_if_modified_since, -copy_source_if_none_match, -copy_source_if_unmodified_since, -copy_source_range, -copy_source_sse_customer_algorithm, -copy_source_sse_customer_key, -copy_source_sse_customer_key_md5, -expected_bucket_owner, -expected_source_bucket_owner, -key, -part_number, -request_payer, -sse_customer_algorithm, -sse_customer_key, -sse_customer_key_md5, -upload_id, -}) -} + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + let upload_id: MultipartUploadId = http::parse_query(req, "uploadId")?; -pub fn serialize_http(x: UploadPartCopyOutput) -> S3Result { -let mut res = http::Response::with_status(http::StatusCode::OK); -if let Some(ref val) = x.copy_part_result { - http::set_xml_body(&mut res, val)?; -} -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; -http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; -http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; -http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; -Ok(res) -} + Ok(UploadPartCopyInput { + bucket, + copy_source, + copy_source_if_match, + copy_source_if_modified_since, + copy_source_if_none_match, + copy_source_if_unmodified_since, + copy_source_range, + copy_source_sse_customer_algorithm, + copy_source_sse_customer_key, + copy_source_sse_customer_key_md5, + expected_bucket_owner, + expected_source_bucket_owner, + key, + part_number, + request_payer, + sse_customer_algorithm, + sse_customer_key, + sse_customer_key_md5, + upload_id, + }) + } + pub fn serialize_http(x: UploadPartCopyOutput) -> S3Result { + let mut res = http::Response::with_status(http::StatusCode::OK); + if let Some(ref val) = x.copy_part_result { + http::set_xml_body(&mut res, val)?; + } + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED, x.bucket_key_enabled)?; + http::add_opt_header(&mut res, X_AMZ_COPY_SOURCE_VERSION_ID, x.copy_source_version_id)?; + http::add_opt_header(&mut res, X_AMZ_REQUEST_CHARGED, x.request_charged)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM, x.sse_customer_algorithm)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5, x.sse_customer_key_md5)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID, x.ssekms_key_id)?; + http::add_opt_header(&mut res, X_AMZ_SERVER_SIDE_ENCRYPTION, x.server_side_encryption)?; + Ok(res) + } } #[async_trait::async_trait] impl super::Operation for UploadPartCopy { -fn name(&self) -> &'static str { -"UploadPartCopy" -} + fn name(&self) -> &'static str { + "UploadPartCopy" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.upload_part_copy(&mut s3_req).await?; -} -let result = s3.upload_part_copy(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.upload_part_copy(&mut s3_req).await?; + } + let result = s3.upload_part_copy(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct WriteGetObjectResponse; impl WriteGetObjectResponse { -pub fn deserialize_http(req: &mut http::Request) -> S3Result { -let accept_ranges: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_ACCEPT_RANGES)?; - -let body: Option = Some(http::take_stream_body(req)); - -let bucket_key_enabled: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; - -let cache_control: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CACHE_CONTROL)?; - -let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32)?; - -let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C)?; - -let checksum_crc64nvme: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME)?; - -let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1)?; - -let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA256)?; + pub fn deserialize_http(req: &mut http::Request) -> S3Result { + let accept_ranges: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_ACCEPT_RANGES)?; -let content_disposition: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_DISPOSITION)?; + let body: Option = Some(http::take_stream_body(req)); -let content_encoding: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_ENCODING)?; + let bucket_key_enabled: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_BUCKET_KEY_ENABLED)?; -let content_language: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_LANGUAGE)?; + let cache_control: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CACHE_CONTROL)?; -let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; + let checksum_crc32: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32)?; -let content_range: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_RANGE)?; + let checksum_crc32c: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC32C)?; -let content_type: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_TYPE)?; + let checksum_crc64nvme: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_CRC64NVME)?; -let delete_marker: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_DELETE_MARKER)?; + let checksum_sha1: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA1)?; -let e_tag: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_E_TAG)?; + let checksum_sha256: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_CHECKSUM_SHA256)?; -let error_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_CODE)?; + let content_disposition: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_DISPOSITION)?; -let error_message: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_MESSAGE)?; + let content_encoding: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_ENCODING)?; -let expiration: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_EXPIRATION)?; + let content_language: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_LANGUAGE)?; -let expires: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_EXPIRES, TimestampFormat::HttpDate)?; + let content_length: Option = http::parse_opt_header(req, &CONTENT_LENGTH)?; -let last_modified: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_LAST_MODIFIED, TimestampFormat::HttpDate)?; + let content_range: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_RANGE)?; -let metadata: Option = http::parse_opt_metadata(req)?; + let content_type: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_CONTENT_TYPE)?; -let missing_meta: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MISSING_META)?; + let delete_marker: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_DELETE_MARKER)?; -let object_lock_legal_hold_status: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; + let e_tag: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_E_TAG)?; -let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE)?; + let error_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_CODE)?; -let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, TimestampFormat::DateTime)?; + let error_message: Option = http::parse_opt_header(req, &X_AMZ_FWD_ERROR_MESSAGE)?; -let parts_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT)?; + let expiration: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_EXPIRATION)?; -let replication_status: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS)?; + let expires: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_EXPIRES, TimestampFormat::HttpDate)?; -let request_charged: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED)?; + let last_modified: Option = + http::parse_opt_header_timestamp(req, &X_AMZ_FWD_HEADER_LAST_MODIFIED, TimestampFormat::HttpDate)?; -let request_route: RequestRoute = http::parse_header(req, &X_AMZ_REQUEST_ROUTE)?; + let metadata: Option = http::parse_opt_metadata(req)?; -let request_token: RequestToken = http::parse_header(req, &X_AMZ_REQUEST_TOKEN)?; + let missing_meta: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MISSING_META)?; -let restore: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_RESTORE)?; + let object_lock_legal_hold_status: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_LEGAL_HOLD)?; -let sse_customer_algorithm: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; - -let sse_customer_key_md5: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; - -let ssekms_key_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; - -let server_side_encryption: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION)?; - -let status_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_STATUS)?; - -let storage_class: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS)?; - -let tag_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_TAGGING_COUNT)?; - -let version_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_VERSION_ID)?; - -Ok(WriteGetObjectResponseInput { -accept_ranges, -body, -bucket_key_enabled, -cache_control, -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -content_disposition, -content_encoding, -content_language, -content_length, -content_range, -content_type, -delete_marker, -e_tag, -error_code, -error_message, -expiration, -expires, -last_modified, -metadata, -missing_meta, -object_lock_legal_hold_status, -object_lock_mode, -object_lock_retain_until_date, -parts_count, -replication_status, -request_charged, -request_route, -request_token, -restore, -sse_customer_algorithm, -sse_customer_key_md5, -ssekms_key_id, -server_side_encryption, -status_code, -storage_class, -tag_count, -version_id, -}) -} + let object_lock_mode: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_MODE)?; + let object_lock_retain_until_date: Option = http::parse_opt_header_timestamp( + req, + &X_AMZ_FWD_HEADER_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE, + TimestampFormat::DateTime, + )?; -pub fn serialize_http(_: WriteGetObjectResponseOutput) -> S3Result { -Ok(http::Response::with_status(http::StatusCode::OK)) -} + let parts_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_MP_PARTS_COUNT)?; + + let replication_status: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REPLICATION_STATUS)?; + + let request_charged: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_REQUEST_CHARGED)?; + + let request_route: RequestRoute = http::parse_header(req, &X_AMZ_REQUEST_ROUTE)?; + + let request_token: RequestToken = http::parse_header(req, &X_AMZ_REQUEST_TOKEN)?; + + let restore: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_RESTORE)?; + + let sse_customer_algorithm: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM)?; + + let sse_customer_key_md5: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5)?; + + let ssekms_key_id: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID)?; + + let server_side_encryption: Option = + http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_SERVER_SIDE_ENCRYPTION)?; + + let status_code: Option = http::parse_opt_header(req, &X_AMZ_FWD_STATUS)?; + + let storage_class: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_STORAGE_CLASS)?; + + let tag_count: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_TAGGING_COUNT)?; + + let version_id: Option = http::parse_opt_header(req, &X_AMZ_FWD_HEADER_X_AMZ_VERSION_ID)?; + + Ok(WriteGetObjectResponseInput { + accept_ranges, + body, + bucket_key_enabled, + cache_control, + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + content_disposition, + content_encoding, + content_language, + content_length, + content_range, + content_type, + delete_marker, + e_tag, + error_code, + error_message, + expiration, + expires, + last_modified, + metadata, + missing_meta, + object_lock_legal_hold_status, + object_lock_mode, + object_lock_retain_until_date, + parts_count, + replication_status, + request_charged, + request_route, + request_token, + restore, + sse_customer_algorithm, + sse_customer_key_md5, + ssekms_key_id, + server_side_encryption, + status_code, + storage_class, + tag_count, + version_id, + }) + } + pub fn serialize_http(_: WriteGetObjectResponseOutput) -> S3Result { + Ok(http::Response::with_status(http::StatusCode::OK)) + } } #[async_trait::async_trait] impl super::Operation for WriteGetObjectResponse { -fn name(&self) -> &'static str { -"WriteGetObjectResponse" -} + fn name(&self) -> &'static str { + "WriteGetObjectResponse" + } -async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { -let input = Self::deserialize_http(req)?; -let mut s3_req = super::build_s3_request(input, req); -let s3 = ccx.s3; -if let Some(access) = ccx.access { - access.write_get_object_response(&mut s3_req).await?; -} -let result = s3.write_get_object_response(s3_req).await; -let s3_resp = match result { - Ok(val) => val, - Err(err) => return super::serialize_error(err, false), -}; -let mut resp = Self::serialize_http(s3_resp.output)?; -resp.headers.extend(s3_resp.headers); -resp.extensions.extend(s3_resp.extensions); -Ok(resp) -} + async fn call(&self, ccx: &CallContext<'_>, req: &mut http::Request) -> S3Result { + let input = Self::deserialize_http(req)?; + let mut s3_req = super::build_s3_request(input, req); + let s3 = ccx.s3; + if let Some(access) = ccx.access { + access.write_get_object_response(&mut s3_req).await?; + } + let result = s3.write_get_object_response(s3_req).await; + let s3_resp = match result { + Ok(val) => val, + Err(err) => return super::serialize_error(err, false), + }; + let mut resp = Self::serialize_http(s3_resp.output)?; + resp.headers.extend(s3_resp.headers); + resp.extensions.extend(s3_resp.extensions); + Ok(resp) + } } pub struct PostObject; @@ -6957,10 +6746,8 @@ impl PostObject { .append_pair("etag", etag_str); let mut res = http::Response::with_status(http::StatusCode::SEE_OTHER); - res.headers.insert( - hyper::header::LOCATION, - url.as_str().parse().map_err(|e| s3_error!(e, InternalError))? - ); + res.headers + .insert(hyper::header::LOCATION, url.as_str().parse().map_err(|e| s3_error!(e, InternalError))?); return Ok(res); } @@ -7026,366 +6813,361 @@ impl super::Operation for PostObject { Err(err) => return super::serialize_error(err, false), }; // Serialize with POST-specific response behavior - let mut resp = Self::serialize_http( - &bucket, - &key, - success_action_redirect.as_deref(), - success_action_status, - &s3_resp.output, - )?; + let mut resp = + Self::serialize_http(&bucket, &key, success_action_redirect.as_deref(), success_action_status, &s3_resp.output)?; resp.headers.extend(s3_resp.headers); resp.extensions.extend(s3_resp.extensions); Ok(resp) } } -pub fn resolve_route(req: &http::Request, s3_path: &S3Path, qs: Option<&http::OrderedQs>)-> S3Result<(&'static dyn super::Operation, bool)> { -match req.method { -hyper::Method::HEAD => match s3_path { -S3Path::Root => { -Err(super::unknown_operation()) -} -S3Path::Bucket{ .. } => { -Ok((&HeadBucket as &'static dyn super::Operation, false)) -} -S3Path::Object{ .. } => { -Ok((&HeadObject as &'static dyn super::Operation, false)) -} -} -hyper::Method::GET => match s3_path { -S3Path::Root => { -if let Some(qs) = qs { -if super::check_query_pattern(qs, "x-id","ListDirectoryBuckets") { -return Ok((&ListDirectoryBuckets as &'static dyn super::Operation, false)); -} -} -Ok((&ListBuckets as &'static dyn super::Operation, false)) -} -S3Path::Bucket{ .. } => { -if let Some(qs) = qs { -if qs.has("analytics") && qs.has("id") { -return Ok((&GetBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("intelligent-tiering") && qs.has("id") { -return Ok((&GetBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("inventory") && qs.has("id") { -return Ok((&GetBucketInventoryConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("metrics") && qs.has("id") { -return Ok((&GetBucketMetricsConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("session") { -return Ok((&CreateSession as &'static dyn super::Operation, false)); -} -if qs.has("accelerate") { -return Ok((&GetBucketAccelerateConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("acl") { -return Ok((&GetBucketAcl as &'static dyn super::Operation, false)); -} -if qs.has("cors") { -return Ok((&GetBucketCors as &'static dyn super::Operation, false)); -} -if qs.has("encryption") { -return Ok((&GetBucketEncryption as &'static dyn super::Operation, false)); -} -if qs.has("lifecycle") { -return Ok((&GetBucketLifecycleConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("location") { -return Ok((&GetBucketLocation as &'static dyn super::Operation, false)); -} -if qs.has("logging") { -return Ok((&GetBucketLogging as &'static dyn super::Operation, false)); -} -if qs.has("metadataTable") { -return Ok((&GetBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("notification") { -return Ok((&GetBucketNotificationConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("ownershipControls") { -return Ok((&GetBucketOwnershipControls as &'static dyn super::Operation, false)); -} -if qs.has("policy") { -return Ok((&GetBucketPolicy as &'static dyn super::Operation, false)); -} -if qs.has("policyStatus") { -return Ok((&GetBucketPolicyStatus as &'static dyn super::Operation, false)); -} -if qs.has("replication") { -return Ok((&GetBucketReplication as &'static dyn super::Operation, false)); -} -if qs.has("requestPayment") { -return Ok((&GetBucketRequestPayment as &'static dyn super::Operation, false)); -} -if qs.has("tagging") { -return Ok((&GetBucketTagging as &'static dyn super::Operation, false)); -} -if qs.has("versioning") { -return Ok((&GetBucketVersioning as &'static dyn super::Operation, false)); -} -if qs.has("website") { -return Ok((&GetBucketWebsite as &'static dyn super::Operation, false)); -} -if qs.has("object-lock") { -return Ok((&GetObjectLockConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("publicAccessBlock") { -return Ok((&GetPublicAccessBlock as &'static dyn super::Operation, false)); -} -if qs.has("analytics") && !qs.has("id") { -return Ok((&ListBucketAnalyticsConfigurations as &'static dyn super::Operation, false)); -} -if qs.has("intelligent-tiering") && !qs.has("id") { -return Ok((&ListBucketIntelligentTieringConfigurations as &'static dyn super::Operation, false)); -} -if qs.has("inventory") && !qs.has("id") { -return Ok((&ListBucketInventoryConfigurations as &'static dyn super::Operation, false)); -} -if qs.has("metrics") && !qs.has("id") { -return Ok((&ListBucketMetricsConfigurations as &'static dyn super::Operation, false)); -} -if qs.has("uploads") { -return Ok((&ListMultipartUploads as &'static dyn super::Operation, false)); -} -if qs.has("versions") { -return Ok((&ListObjectVersions as &'static dyn super::Operation, false)); -} -if super::check_query_pattern(qs, "list-type","2") { -return Ok((&ListObjectsV2 as &'static dyn super::Operation, false)); -} -} -Ok((&ListObjects as &'static dyn super::Operation, false)) -} -S3Path::Object{ .. } => { -if let Some(qs) = qs { -if qs.has("attributes") { -return Ok((&GetObjectAttributes as &'static dyn super::Operation, false)); -} -if qs.has("acl") { -return Ok((&GetObjectAcl as &'static dyn super::Operation, false)); -} -if qs.has("legal-hold") { -return Ok((&GetObjectLegalHold as &'static dyn super::Operation, false)); -} -if qs.has("retention") { -return Ok((&GetObjectRetention as &'static dyn super::Operation, false)); -} -if qs.has("tagging") { -return Ok((&GetObjectTagging as &'static dyn super::Operation, false)); -} -if qs.has("torrent") { -return Ok((&GetObjectTorrent as &'static dyn super::Operation, false)); -} -} -if let Some(qs) = qs - && qs.has("uploadId") { -return Ok((&ListParts as &'static dyn super::Operation, false)); -} -Ok((&GetObject as &'static dyn super::Operation, false)) -} -} -hyper::Method::POST => match s3_path { -S3Path::Root => { -Err(super::unknown_operation()) -} -S3Path::Bucket{ .. } => { -if let Some(qs) = qs { -if qs.has("metadataTable") { -return Ok((&CreateBucketMetadataTableConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("delete") { -return Ok((&DeleteObjects as &'static dyn super::Operation, true)); -} -} -if req.headers.contains_key("x-amz-request-route") && req.headers.contains_key("x-amz-request-token") { -return Ok((&WriteGetObjectResponse as &'static dyn super::Operation, false)); -} -Err(super::unknown_operation()) -} -S3Path::Object{ .. } => { -if let Some(qs) = qs { -if qs.has("select") && super::check_query_pattern(qs, "select-type","2") { -return Ok((&SelectObjectContent as &'static dyn super::Operation, true)); -} -if qs.has("uploads") { -return Ok((&CreateMultipartUpload as &'static dyn super::Operation, false)); -} -if qs.has("restore") { -return Ok((&RestoreObject as &'static dyn super::Operation, true)); -} -} -if let Some(qs) = qs - && qs.has("uploadId") { -return Ok((&CompleteMultipartUpload as &'static dyn super::Operation, true)); -} -Err(super::unknown_operation()) -} -} -hyper::Method::PUT => match s3_path { -S3Path::Root => { -Err(super::unknown_operation()) -} -S3Path::Bucket{ .. } => { -if let Some(qs) = qs { -if qs.has("analytics") { -return Ok((&PutBucketAnalyticsConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("intelligent-tiering") { -return Ok((&PutBucketIntelligentTieringConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("inventory") { -return Ok((&PutBucketInventoryConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("metrics") { -return Ok((&PutBucketMetricsConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("accelerate") { -return Ok((&PutBucketAccelerateConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("acl") { -return Ok((&PutBucketAcl as &'static dyn super::Operation, true)); -} -if qs.has("cors") { -return Ok((&PutBucketCors as &'static dyn super::Operation, true)); -} -if qs.has("encryption") { -return Ok((&PutBucketEncryption as &'static dyn super::Operation, true)); -} -if qs.has("lifecycle") { -return Ok((&PutBucketLifecycleConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("logging") { -return Ok((&PutBucketLogging as &'static dyn super::Operation, true)); -} -if qs.has("notification") { -return Ok((&PutBucketNotificationConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("ownershipControls") { -return Ok((&PutBucketOwnershipControls as &'static dyn super::Operation, true)); -} -if qs.has("policy") { -return Ok((&PutBucketPolicy as &'static dyn super::Operation, true)); -} -if qs.has("replication") { -return Ok((&PutBucketReplication as &'static dyn super::Operation, true)); -} -if qs.has("requestPayment") { -return Ok((&PutBucketRequestPayment as &'static dyn super::Operation, true)); -} -if qs.has("tagging") { -return Ok((&PutBucketTagging as &'static dyn super::Operation, true)); -} -if qs.has("versioning") { -return Ok((&PutBucketVersioning as &'static dyn super::Operation, true)); -} -if qs.has("website") { -return Ok((&PutBucketWebsite as &'static dyn super::Operation, true)); -} -if qs.has("object-lock") { -return Ok((&PutObjectLockConfiguration as &'static dyn super::Operation, true)); -} -if qs.has("publicAccessBlock") { -return Ok((&PutPublicAccessBlock as &'static dyn super::Operation, true)); -} -} -Ok((&CreateBucket as &'static dyn super::Operation, true)) -} -S3Path::Object{ .. } => { -if let Some(qs) = qs { -if qs.has("acl") { -return Ok((&PutObjectAcl as &'static dyn super::Operation, true)); -} -if qs.has("legal-hold") { -return Ok((&PutObjectLegalHold as &'static dyn super::Operation, true)); -} -if qs.has("retention") { -return Ok((&PutObjectRetention as &'static dyn super::Operation, true)); -} -if qs.has("tagging") { -return Ok((&PutObjectTagging as &'static dyn super::Operation, true)); -} -} -if let Some(qs) = qs - && qs.has("partNumber") && qs.has("uploadId") && req.headers.contains_key("x-amz-copy-source") { -return Ok((&UploadPartCopy as &'static dyn super::Operation, false)); -} -if let Some(qs) = qs - && qs.has("partNumber") && qs.has("uploadId") { -return Ok((&UploadPart as &'static dyn super::Operation, false)); -} -if req.headers.contains_key("x-amz-copy-source") { -return Ok((&CopyObject as &'static dyn super::Operation, false)); -} -Ok((&PutObject as &'static dyn super::Operation, false)) -} -} -hyper::Method::DELETE => match s3_path { -S3Path::Root => { -Err(super::unknown_operation()) -} -S3Path::Bucket{ .. } => { -if let Some(qs) = qs { -if qs.has("analytics") { -return Ok((&DeleteBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("intelligent-tiering") { -return Ok((&DeleteBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("inventory") { -return Ok((&DeleteBucketInventoryConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("metrics") { -return Ok((&DeleteBucketMetricsConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("cors") { -return Ok((&DeleteBucketCors as &'static dyn super::Operation, false)); -} -if qs.has("encryption") { -return Ok((&DeleteBucketEncryption as &'static dyn super::Operation, false)); -} -if qs.has("lifecycle") { -return Ok((&DeleteBucketLifecycle as &'static dyn super::Operation, false)); -} -if qs.has("metadataTable") { -return Ok((&DeleteBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); -} -if qs.has("ownershipControls") { -return Ok((&DeleteBucketOwnershipControls as &'static dyn super::Operation, false)); -} -if qs.has("policy") { -return Ok((&DeleteBucketPolicy as &'static dyn super::Operation, false)); -} -if qs.has("replication") { -return Ok((&DeleteBucketReplication as &'static dyn super::Operation, false)); -} -if qs.has("tagging") { -return Ok((&DeleteBucketTagging as &'static dyn super::Operation, false)); -} -if qs.has("website") { -return Ok((&DeleteBucketWebsite as &'static dyn super::Operation, false)); -} -if qs.has("publicAccessBlock") { -return Ok((&DeletePublicAccessBlock as &'static dyn super::Operation, false)); -} -} -Ok((&DeleteBucket as &'static dyn super::Operation, false)) -} -S3Path::Object{ .. } => { -if let Some(qs) = qs { -if qs.has("tagging") { -return Ok((&DeleteObjectTagging as &'static dyn super::Operation, false)); -} -} -if let Some(qs) = qs - && qs.has("uploadId") { -return Ok((&AbortMultipartUpload as &'static dyn super::Operation, false)); -} -Ok((&DeleteObject as &'static dyn super::Operation, false)) -} -} -_ => Err(super::unknown_operation()) -} +pub fn resolve_route( + req: &http::Request, + s3_path: &S3Path, + qs: Option<&http::OrderedQs>, +) -> S3Result<(&'static dyn super::Operation, bool)> { + match req.method { + hyper::Method::HEAD => match s3_path { + S3Path::Root => Err(super::unknown_operation()), + S3Path::Bucket { .. } => Ok((&HeadBucket as &'static dyn super::Operation, false)), + S3Path::Object { .. } => Ok((&HeadObject as &'static dyn super::Operation, false)), + }, + hyper::Method::GET => match s3_path { + S3Path::Root => { + if let Some(qs) = qs { + if super::check_query_pattern(qs, "x-id", "ListDirectoryBuckets") { + return Ok((&ListDirectoryBuckets as &'static dyn super::Operation, false)); + } + } + Ok((&ListBuckets as &'static dyn super::Operation, false)) + } + S3Path::Bucket { .. } => { + if let Some(qs) = qs { + if qs.has("analytics") && qs.has("id") { + return Ok((&GetBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("intelligent-tiering") && qs.has("id") { + return Ok((&GetBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("inventory") && qs.has("id") { + return Ok((&GetBucketInventoryConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("metrics") && qs.has("id") { + return Ok((&GetBucketMetricsConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("session") { + return Ok((&CreateSession as &'static dyn super::Operation, false)); + } + if qs.has("accelerate") { + return Ok((&GetBucketAccelerateConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("acl") { + return Ok((&GetBucketAcl as &'static dyn super::Operation, false)); + } + if qs.has("cors") { + return Ok((&GetBucketCors as &'static dyn super::Operation, false)); + } + if qs.has("encryption") { + return Ok((&GetBucketEncryption as &'static dyn super::Operation, false)); + } + if qs.has("lifecycle") { + return Ok((&GetBucketLifecycleConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("location") { + return Ok((&GetBucketLocation as &'static dyn super::Operation, false)); + } + if qs.has("logging") { + return Ok((&GetBucketLogging as &'static dyn super::Operation, false)); + } + if qs.has("metadataTable") { + return Ok((&GetBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("notification") { + return Ok((&GetBucketNotificationConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("ownershipControls") { + return Ok((&GetBucketOwnershipControls as &'static dyn super::Operation, false)); + } + if qs.has("policy") { + return Ok((&GetBucketPolicy as &'static dyn super::Operation, false)); + } + if qs.has("policyStatus") { + return Ok((&GetBucketPolicyStatus as &'static dyn super::Operation, false)); + } + if qs.has("replication") { + return Ok((&GetBucketReplication as &'static dyn super::Operation, false)); + } + if qs.has("requestPayment") { + return Ok((&GetBucketRequestPayment as &'static dyn super::Operation, false)); + } + if qs.has("tagging") { + return Ok((&GetBucketTagging as &'static dyn super::Operation, false)); + } + if qs.has("versioning") { + return Ok((&GetBucketVersioning as &'static dyn super::Operation, false)); + } + if qs.has("website") { + return Ok((&GetBucketWebsite as &'static dyn super::Operation, false)); + } + if qs.has("object-lock") { + return Ok((&GetObjectLockConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("publicAccessBlock") { + return Ok((&GetPublicAccessBlock as &'static dyn super::Operation, false)); + } + if qs.has("analytics") && !qs.has("id") { + return Ok((&ListBucketAnalyticsConfigurations as &'static dyn super::Operation, false)); + } + if qs.has("intelligent-tiering") && !qs.has("id") { + return Ok((&ListBucketIntelligentTieringConfigurations as &'static dyn super::Operation, false)); + } + if qs.has("inventory") && !qs.has("id") { + return Ok((&ListBucketInventoryConfigurations as &'static dyn super::Operation, false)); + } + if qs.has("metrics") && !qs.has("id") { + return Ok((&ListBucketMetricsConfigurations as &'static dyn super::Operation, false)); + } + if qs.has("uploads") { + return Ok((&ListMultipartUploads as &'static dyn super::Operation, false)); + } + if qs.has("versions") { + return Ok((&ListObjectVersions as &'static dyn super::Operation, false)); + } + if super::check_query_pattern(qs, "list-type", "2") { + return Ok((&ListObjectsV2 as &'static dyn super::Operation, false)); + } + } + Ok((&ListObjects as &'static dyn super::Operation, false)) + } + S3Path::Object { .. } => { + if let Some(qs) = qs { + if qs.has("attributes") { + return Ok((&GetObjectAttributes as &'static dyn super::Operation, false)); + } + if qs.has("acl") { + return Ok((&GetObjectAcl as &'static dyn super::Operation, false)); + } + if qs.has("legal-hold") { + return Ok((&GetObjectLegalHold as &'static dyn super::Operation, false)); + } + if qs.has("retention") { + return Ok((&GetObjectRetention as &'static dyn super::Operation, false)); + } + if qs.has("tagging") { + return Ok((&GetObjectTagging as &'static dyn super::Operation, false)); + } + if qs.has("torrent") { + return Ok((&GetObjectTorrent as &'static dyn super::Operation, false)); + } + } + if let Some(qs) = qs + && qs.has("uploadId") + { + return Ok((&ListParts as &'static dyn super::Operation, false)); + } + Ok((&GetObject as &'static dyn super::Operation, false)) + } + }, + hyper::Method::POST => match s3_path { + S3Path::Root => Err(super::unknown_operation()), + S3Path::Bucket { .. } => { + if let Some(qs) = qs { + if qs.has("metadataTable") { + return Ok((&CreateBucketMetadataTableConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("delete") { + return Ok((&DeleteObjects as &'static dyn super::Operation, true)); + } + } + if req.headers.contains_key("x-amz-request-route") && req.headers.contains_key("x-amz-request-token") { + return Ok((&WriteGetObjectResponse as &'static dyn super::Operation, false)); + } + Err(super::unknown_operation()) + } + S3Path::Object { .. } => { + if let Some(qs) = qs { + if qs.has("select") && super::check_query_pattern(qs, "select-type", "2") { + return Ok((&SelectObjectContent as &'static dyn super::Operation, true)); + } + if qs.has("uploads") { + return Ok((&CreateMultipartUpload as &'static dyn super::Operation, false)); + } + if qs.has("restore") { + return Ok((&RestoreObject as &'static dyn super::Operation, true)); + } + } + if let Some(qs) = qs + && qs.has("uploadId") + { + return Ok((&CompleteMultipartUpload as &'static dyn super::Operation, true)); + } + Err(super::unknown_operation()) + } + }, + hyper::Method::PUT => match s3_path { + S3Path::Root => Err(super::unknown_operation()), + S3Path::Bucket { .. } => { + if let Some(qs) = qs { + if qs.has("analytics") { + return Ok((&PutBucketAnalyticsConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("intelligent-tiering") { + return Ok((&PutBucketIntelligentTieringConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("inventory") { + return Ok((&PutBucketInventoryConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("metrics") { + return Ok((&PutBucketMetricsConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("accelerate") { + return Ok((&PutBucketAccelerateConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("acl") { + return Ok((&PutBucketAcl as &'static dyn super::Operation, true)); + } + if qs.has("cors") { + return Ok((&PutBucketCors as &'static dyn super::Operation, true)); + } + if qs.has("encryption") { + return Ok((&PutBucketEncryption as &'static dyn super::Operation, true)); + } + if qs.has("lifecycle") { + return Ok((&PutBucketLifecycleConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("logging") { + return Ok((&PutBucketLogging as &'static dyn super::Operation, true)); + } + if qs.has("notification") { + return Ok((&PutBucketNotificationConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("ownershipControls") { + return Ok((&PutBucketOwnershipControls as &'static dyn super::Operation, true)); + } + if qs.has("policy") { + return Ok((&PutBucketPolicy as &'static dyn super::Operation, true)); + } + if qs.has("replication") { + return Ok((&PutBucketReplication as &'static dyn super::Operation, true)); + } + if qs.has("requestPayment") { + return Ok((&PutBucketRequestPayment as &'static dyn super::Operation, true)); + } + if qs.has("tagging") { + return Ok((&PutBucketTagging as &'static dyn super::Operation, true)); + } + if qs.has("versioning") { + return Ok((&PutBucketVersioning as &'static dyn super::Operation, true)); + } + if qs.has("website") { + return Ok((&PutBucketWebsite as &'static dyn super::Operation, true)); + } + if qs.has("object-lock") { + return Ok((&PutObjectLockConfiguration as &'static dyn super::Operation, true)); + } + if qs.has("publicAccessBlock") { + return Ok((&PutPublicAccessBlock as &'static dyn super::Operation, true)); + } + } + Ok((&CreateBucket as &'static dyn super::Operation, true)) + } + S3Path::Object { .. } => { + if let Some(qs) = qs { + if qs.has("acl") { + return Ok((&PutObjectAcl as &'static dyn super::Operation, true)); + } + if qs.has("legal-hold") { + return Ok((&PutObjectLegalHold as &'static dyn super::Operation, true)); + } + if qs.has("retention") { + return Ok((&PutObjectRetention as &'static dyn super::Operation, true)); + } + if qs.has("tagging") { + return Ok((&PutObjectTagging as &'static dyn super::Operation, true)); + } + } + if let Some(qs) = qs + && qs.has("partNumber") + && qs.has("uploadId") + && req.headers.contains_key("x-amz-copy-source") + { + return Ok((&UploadPartCopy as &'static dyn super::Operation, false)); + } + if let Some(qs) = qs + && qs.has("partNumber") + && qs.has("uploadId") + { + return Ok((&UploadPart as &'static dyn super::Operation, false)); + } + if req.headers.contains_key("x-amz-copy-source") { + return Ok((&CopyObject as &'static dyn super::Operation, false)); + } + Ok((&PutObject as &'static dyn super::Operation, false)) + } + }, + hyper::Method::DELETE => match s3_path { + S3Path::Root => Err(super::unknown_operation()), + S3Path::Bucket { .. } => { + if let Some(qs) = qs { + if qs.has("analytics") { + return Ok((&DeleteBucketAnalyticsConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("intelligent-tiering") { + return Ok((&DeleteBucketIntelligentTieringConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("inventory") { + return Ok((&DeleteBucketInventoryConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("metrics") { + return Ok((&DeleteBucketMetricsConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("cors") { + return Ok((&DeleteBucketCors as &'static dyn super::Operation, false)); + } + if qs.has("encryption") { + return Ok((&DeleteBucketEncryption as &'static dyn super::Operation, false)); + } + if qs.has("lifecycle") { + return Ok((&DeleteBucketLifecycle as &'static dyn super::Operation, false)); + } + if qs.has("metadataTable") { + return Ok((&DeleteBucketMetadataTableConfiguration as &'static dyn super::Operation, false)); + } + if qs.has("ownershipControls") { + return Ok((&DeleteBucketOwnershipControls as &'static dyn super::Operation, false)); + } + if qs.has("policy") { + return Ok((&DeleteBucketPolicy as &'static dyn super::Operation, false)); + } + if qs.has("replication") { + return Ok((&DeleteBucketReplication as &'static dyn super::Operation, false)); + } + if qs.has("tagging") { + return Ok((&DeleteBucketTagging as &'static dyn super::Operation, false)); + } + if qs.has("website") { + return Ok((&DeleteBucketWebsite as &'static dyn super::Operation, false)); + } + if qs.has("publicAccessBlock") { + return Ok((&DeletePublicAccessBlock as &'static dyn super::Operation, false)); + } + } + Ok((&DeleteBucket as &'static dyn super::Operation, false)) + } + S3Path::Object { .. } => { + if let Some(qs) = qs { + if qs.has("tagging") { + return Ok((&DeleteObjectTagging as &'static dyn super::Operation, false)); + } + } + if let Some(qs) = qs + && qs.has("uploadId") + { + return Ok((&AbortMultipartUpload as &'static dyn super::Operation, false)); + } + Ok((&DeleteObject as &'static dyn super::Operation, false)) + } + }, + _ => Err(super::unknown_operation()), + } } diff --git a/crates/s3s/src/s3_trait.rs b/crates/s3s/src/s3_trait.rs index 48503956..44fb8d80 100644 --- a/crates/s3s/src/s3_trait.rs +++ b/crates/s3s/src/s3_trait.rs @@ -8,7074 +8,7274 @@ use crate::protocol::S3Response; /// An async trait which represents the S3 API #[async_trait::async_trait] pub trait S3: Send + Sync + 'static { + ///

    This operation aborts a multipart upload. After a multipart upload is aborted, no + /// additional parts can be uploaded using that upload ID. The storage consumed by any + /// previously uploaded parts will be freed. However, if any part uploads are currently in + /// progress, those part uploads might or might not succeed. As a result, it might be necessary + /// to abort a given multipart upload multiple times in order to completely free all storage + /// consumed by all parts.

    + ///

    To verify that all parts have been removed and prevent getting charged for the part + /// storage, you should call the ListParts API operation and ensure + /// that the parts list is empty.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - If multipart + /// uploads in a directory bucket are in progress, you can't delete the bucket until + /// all the in-progress multipart uploads are aborted or completed. To delete these + /// in-progress multipart uploads, use the ListMultipartUploads operation + /// to list the in-progress multipart uploads in the bucket and use the + /// AbortMultipartUpload operation to abort all the in-progress + /// multipart uploads.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - For + /// information about permissions required to use the multipart upload, see + /// Multipart Upload and + /// Permissions in the Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to AbortMultipartUpload:

    + /// + async fn abort_multipart_upload( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "AbortMultipartUpload is not implemented yet")) + } -///

    This operation aborts a multipart upload. After a multipart upload is aborted, no -/// additional parts can be uploaded using that upload ID. The storage consumed by any -/// previously uploaded parts will be freed. However, if any part uploads are currently in -/// progress, those part uploads might or might not succeed. As a result, it might be necessary -/// to abort a given multipart upload multiple times in order to completely free all storage -/// consumed by all parts.

    -///

    To verify that all parts have been removed and prevent getting charged for the part -/// storage, you should call the ListParts API operation and ensure -/// that the parts list is empty.

    -/// -///
      -///
    • -///

      -/// Directory buckets - If multipart -/// uploads in a directory bucket are in progress, you can't delete the bucket until -/// all the in-progress multipart uploads are aborted or completed. To delete these -/// in-progress multipart uploads, use the ListMultipartUploads operation -/// to list the in-progress multipart uploads in the bucket and use the -/// AbortMultipartUpload operation to abort all the in-progress -/// multipart uploads.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - For -/// information about permissions required to use the multipart upload, see -/// Multipart Upload and -/// Permissions in the Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to AbortMultipartUpload:

    -/// -async fn abort_multipart_upload(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "AbortMultipartUpload is not implemented yet")) -} + ///

    Completes a multipart upload by assembling previously uploaded parts.

    + ///

    You first initiate the multipart upload and then upload all parts using the UploadPart + /// operation or the UploadPartCopy operation. + /// After successfully uploading all relevant parts of an upload, you call this + /// CompleteMultipartUpload operation to complete the upload. Upon receiving + /// this request, Amazon S3 concatenates all the parts in ascending order by part number to create a + /// new object. In the CompleteMultipartUpload request, you must provide the parts list and + /// ensure that the parts list is complete. The CompleteMultipartUpload API operation + /// concatenates the parts that you provide in the list. For each part in the list, you must + /// provide the PartNumber value and the ETag value that are returned + /// after that part was uploaded.

    + ///

    The processing of a CompleteMultipartUpload request could take several minutes to + /// finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that + /// specifies a 200 OK response. While processing is in progress, Amazon S3 + /// periodically sends white space characters to keep the connection from timing out. A request + /// could fail after the initial 200 OK response has been sent. This means that a + /// 200 OK response can contain either a success or an error. The error + /// response might be embedded in the 200 OK response. If you call this API + /// operation directly, make sure to design your application to parse the contents of the + /// response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. + /// The SDKs detect the embedded error and apply error handling per your configuration settings + /// (including automatically retrying the request as appropriate). If the condition persists, + /// the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an + /// error).

    + ///

    Note that if CompleteMultipartUpload fails, applications should be prepared + /// to retry any failed requests (including 500 error responses). For more information, see + /// Amazon S3 Error + /// Best Practices.

    + /// + ///

    You can't use Content-Type: application/x-www-form-urlencoded for the + /// CompleteMultipartUpload requests. Also, if you don't provide a Content-Type + /// header, CompleteMultipartUpload can still return a 200 OK + /// response.

    + ///
    + ///

    For more information about multipart uploads, see Uploading Objects Using Multipart + /// Upload in the Amazon S3 User Guide.

    + /// + ///

    + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - For + /// information about permissions required to use the multipart upload API, see + /// Multipart Upload and + /// Permissions in the Amazon S3 User Guide.

      + ///

      If you provide an additional checksum + /// value in your MultipartUpload requests and the + /// object is encrypted with Key Management Service, you must have permission to use the + /// kms:Decrypt action for the + /// CompleteMultipartUpload request to succeed.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///

      If the object is encrypted with SSE-KMS, you must also have the + /// kms:GenerateDataKey and kms:Decrypt permissions + /// in IAM identity-based policies and KMS key policies for the KMS + /// key.

      + ///
    • + ///
    + ///
    + ///
    Special errors
    + ///
    + ///
      + ///
    • + ///

      Error Code: EntityTooSmall + ///

      + ///
        + ///
      • + ///

        Description: Your proposed upload is smaller than the minimum + /// allowed object size. Each part must be at least 5 MB in size, except + /// the last part.

        + ///
      • + ///
      • + ///

        HTTP Status Code: 400 Bad Request

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      Error Code: InvalidPart + ///

      + ///
        + ///
      • + ///

        Description: One or more of the specified parts could not be found. + /// The part might not have been uploaded, or the specified ETag might not + /// have matched the uploaded part's ETag.

        + ///
      • + ///
      • + ///

        HTTP Status Code: 400 Bad Request

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      Error Code: InvalidPartOrder + ///

      + ///
        + ///
      • + ///

        Description: The list of parts was not in ascending order. The + /// parts list must be specified in order by part number.

        + ///
      • + ///
      • + ///

        HTTP Status Code: 400 Bad Request

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      Error Code: NoSuchUpload + ///

      + ///
        + ///
      • + ///

        Description: The specified multipart upload does not exist. The + /// upload ID might be invalid, or the multipart upload might have been + /// aborted or completed.

        + ///
      • + ///
      • + ///

        HTTP Status Code: 404 Not Found

        + ///
      • + ///
      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to CompleteMultipartUpload:

    + /// + async fn complete_multipart_upload( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "CompleteMultipartUpload is not implemented yet")) + } -///

    Completes a multipart upload by assembling previously uploaded parts.

    -///

    You first initiate the multipart upload and then upload all parts using the UploadPart -/// operation or the UploadPartCopy operation. -/// After successfully uploading all relevant parts of an upload, you call this -/// CompleteMultipartUpload operation to complete the upload. Upon receiving -/// this request, Amazon S3 concatenates all the parts in ascending order by part number to create a -/// new object. In the CompleteMultipartUpload request, you must provide the parts list and -/// ensure that the parts list is complete. The CompleteMultipartUpload API operation -/// concatenates the parts that you provide in the list. For each part in the list, you must -/// provide the PartNumber value and the ETag value that are returned -/// after that part was uploaded.

    -///

    The processing of a CompleteMultipartUpload request could take several minutes to -/// finalize. After Amazon S3 begins processing the request, it sends an HTTP response header that -/// specifies a 200 OK response. While processing is in progress, Amazon S3 -/// periodically sends white space characters to keep the connection from timing out. A request -/// could fail after the initial 200 OK response has been sent. This means that a -/// 200 OK response can contain either a success or an error. The error -/// response might be embedded in the 200 OK response. If you call this API -/// operation directly, make sure to design your application to parse the contents of the -/// response and handle it appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. -/// The SDKs detect the embedded error and apply error handling per your configuration settings -/// (including automatically retrying the request as appropriate). If the condition persists, -/// the SDKs throw an exception (or, for the SDKs that don't use exceptions, they return an -/// error).

    -///

    Note that if CompleteMultipartUpload fails, applications should be prepared -/// to retry any failed requests (including 500 error responses). For more information, see -/// Amazon S3 Error -/// Best Practices.

    -/// -///

    You can't use Content-Type: application/x-www-form-urlencoded for the -/// CompleteMultipartUpload requests. Also, if you don't provide a Content-Type -/// header, CompleteMultipartUpload can still return a 200 OK -/// response.

    -///
    -///

    For more information about multipart uploads, see Uploading Objects Using Multipart -/// Upload in the Amazon S3 User Guide.

    -/// -///

    -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - For -/// information about permissions required to use the multipart upload API, see -/// Multipart Upload and -/// Permissions in the Amazon S3 User Guide.

      -///

      If you provide an additional checksum -/// value in your MultipartUpload requests and the -/// object is encrypted with Key Management Service, you must have permission to use the -/// kms:Decrypt action for the -/// CompleteMultipartUpload request to succeed.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///

      If the object is encrypted with SSE-KMS, you must also have the -/// kms:GenerateDataKey and kms:Decrypt permissions -/// in IAM identity-based policies and KMS key policies for the KMS -/// key.

      -///
    • -///
    -///
    -///
    Special errors
    -///
    -///
      -///
    • -///

      Error Code: EntityTooSmall -///

      -///
        -///
      • -///

        Description: Your proposed upload is smaller than the minimum -/// allowed object size. Each part must be at least 5 MB in size, except -/// the last part.

        -///
      • -///
      • -///

        HTTP Status Code: 400 Bad Request

        -///
      • -///
      -///
    • -///
    • -///

      Error Code: InvalidPart -///

      -///
        -///
      • -///

        Description: One or more of the specified parts could not be found. -/// The part might not have been uploaded, or the specified ETag might not -/// have matched the uploaded part's ETag.

        -///
      • -///
      • -///

        HTTP Status Code: 400 Bad Request

        -///
      • -///
      -///
    • -///
    • -///

      Error Code: InvalidPartOrder -///

      -///
        -///
      • -///

        Description: The list of parts was not in ascending order. The -/// parts list must be specified in order by part number.

        -///
      • -///
      • -///

        HTTP Status Code: 400 Bad Request

        -///
      • -///
      -///
    • -///
    • -///

      Error Code: NoSuchUpload -///

      -///
        -///
      • -///

        Description: The specified multipart upload does not exist. The -/// upload ID might be invalid, or the multipart upload might have been -/// aborted or completed.

        -///
      • -///
      • -///

        HTTP Status Code: 404 Not Found

        -///
      • -///
      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to CompleteMultipartUpload:

    -/// -async fn complete_multipart_upload(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "CompleteMultipartUpload is not implemented yet")) -} + ///

    Creates a copy of an object that is already stored in Amazon S3.

    + /// + ///

    You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your + /// object up to 5 GB in size in a single atomic action using this API. However, to copy an + /// object greater than 5 GB, you must use the multipart upload Upload Part - Copy + /// (UploadPartCopy) API. For more information, see Copy Object Using the + /// REST Multipart Upload API.

    + ///
    + ///

    You can copy individual objects between general purpose buckets, between directory buckets, + /// and between general purpose buckets and directory buckets.

    + /// + ///
      + ///
    • + ///

      Amazon S3 supports copy operations using Multi-Region Access Points only as a + /// destination when using the Multi-Region Access Point ARN.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      VPC endpoints don't support cross-Region requests (including copies). If you're + /// using VPC endpoints, your source and destination buckets should be in the same + /// Amazon Web Services Region as your VPC endpoint.

      + ///
    • + ///
    + ///
    + ///

    Both the Region that you want to copy the object from and the Region that you want to + /// copy the object to must be enabled for your account. For more information about how to + /// enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services + /// Account Management Guide.

    + /// + ///

    Amazon S3 transfer acceleration does not support cross-Region copies. If you request a + /// cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad + /// Request error. For more information, see Transfer + /// Acceleration.

    + ///
    + ///
    + ///
    Authentication and authorization
    + ///
    + ///

    All CopyObject requests must be authenticated and signed by using + /// IAM credentials (access key ID and secret access key for the IAM identities). + /// All headers with the x-amz- prefix, including + /// x-amz-copy-source, must be signed. For more information, see + /// REST Authentication.

    + ///

    + /// Directory buckets - You must use the + /// IAM credentials to authenticate and authorize your access to the + /// CopyObject API operation, instead of using the temporary security + /// credentials through the CreateSession API operation.

    + ///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your + /// behalf.

    + ///
    + ///
    Permissions
    + ///
    + ///

    You must have read access to the source object and + /// write access to the destination bucket.

    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - You + /// must have permissions in an IAM policy based on the source and destination + /// bucket types in a CopyObject operation.

      + ///
        + ///
      • + ///

        If the source object is in a general purpose bucket, you must have + /// + /// s3:GetObject + /// + /// permission to read the source object that is being copied.

        + ///
      • + ///
      • + ///

        If the destination bucket is a general purpose bucket, you must have + /// + /// s3:PutObject + /// + /// permission to write the object copy to the destination bucket.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// You must have permissions in a bucket policy or an IAM identity-based policy based on the + /// source and destination bucket types in a CopyObject + /// operation.

      + ///
        + ///
      • + ///

        If the source object that you want to copy is in a + /// directory bucket, you must have the + /// s3express:CreateSession + /// permission in + /// the Action element of a policy to read the object. By + /// default, the session is in the ReadWrite mode. If you + /// want to restrict the access, you can explicitly set the + /// s3express:SessionMode condition key to + /// ReadOnly on the copy source bucket.

        + ///
      • + ///
      • + ///

        If the copy destination is a directory bucket, you must have the + /// + /// s3express:CreateSession + /// permission in the + /// Action element of a policy to write the object to the + /// destination. The s3express:SessionMode condition key + /// can't be set to ReadOnly on the copy destination bucket. + ///

        + ///
      • + ///
      + ///

      If the object is encrypted with SSE-KMS, you must also have the + /// kms:GenerateDataKey and kms:Decrypt permissions + /// in IAM identity-based policies and KMS key policies for the KMS + /// key.

      + ///

      For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for + /// S3 Express One Zone in the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    Response and special errors
    + ///
    + ///

    When the request is an HTTP 1.1 request, the response is chunk encoded. When + /// the request is not an HTTP 1.1 request, the response would not contain the + /// Content-Length. You always need to read the entire response body + /// to check if the copy succeeds.

    + ///
      + ///
    • + ///

      If the copy is successful, you receive a response with information about + /// the copied object.

      + ///
    • + ///
    • + ///

      A copy request might return an error when Amazon S3 receives the copy request + /// or while Amazon S3 is copying the files. A 200 OK response can + /// contain either a success or an error.

      + ///
        + ///
      • + ///

        If the error occurs before the copy action starts, you receive a + /// standard Amazon S3 error.

        + ///
      • + ///
      • + ///

        If the error occurs during the copy operation, the error response + /// is embedded in the 200 OK response. For example, in a + /// cross-region copy, you may encounter throttling and receive a + /// 200 OK response. For more information, see Resolve the Error 200 response when copying objects to + /// Amazon S3. The 200 OK status code means the copy + /// was accepted, but it doesn't mean the copy is complete. Another + /// example is when you disconnect from Amazon S3 before the copy is complete, + /// Amazon S3 might cancel the copy and you may receive a 200 OK + /// response. You must stay connected to Amazon S3 until the entire response is + /// successfully received and processed.

        + ///

        If you call this API operation directly, make sure to design your + /// application to parse the content of the response and handle it + /// appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The + /// SDKs detect the embedded error and apply error handling per your + /// configuration settings (including automatically retrying the request + /// as appropriate). If the condition persists, the SDKs throw an + /// exception (or, for the SDKs that don't use exceptions, they return an + /// error).

        + ///
      • + ///
      + ///
    • + ///
    + ///
    + ///
    Charge
    + ///
    + ///

    The copy request charge is based on the storage class and Region that you + /// specify for the destination object. The request can also result in a data + /// retrieval charge for the source if the source storage class bills for data + /// retrieval. If the copy source is in a different region, the data transfer is + /// billed to the copy source account. For pricing information, see Amazon S3 pricing.

    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///
      + ///
    • + ///

      + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

      + ///
    • + ///
    • + ///

      + /// Amazon S3 on Outposts - When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the + /// form + /// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.

      + ///
    • + ///
    + ///
    + ///
    + ///

    The following operations are related to CopyObject:

    + /// + async fn copy_object(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "CopyObject is not implemented yet")) + } -///

    Creates a copy of an object that is already stored in Amazon S3.

    -/// -///

    You can store individual objects of up to 5 TB in Amazon S3. You create a copy of your -/// object up to 5 GB in size in a single atomic action using this API. However, to copy an -/// object greater than 5 GB, you must use the multipart upload Upload Part - Copy -/// (UploadPartCopy) API. For more information, see Copy Object Using the -/// REST Multipart Upload API.

    -///
    -///

    You can copy individual objects between general purpose buckets, between directory buckets, -/// and between general purpose buckets and directory buckets.

    -/// -///
      -///
    • -///

      Amazon S3 supports copy operations using Multi-Region Access Points only as a -/// destination when using the Multi-Region Access Point ARN.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      VPC endpoints don't support cross-Region requests (including copies). If you're -/// using VPC endpoints, your source and destination buckets should be in the same -/// Amazon Web Services Region as your VPC endpoint.

      -///
    • -///
    -///
    -///

    Both the Region that you want to copy the object from and the Region that you want to -/// copy the object to must be enabled for your account. For more information about how to -/// enable a Region for your account, see Enable or disable a Region for standalone accounts in the Amazon Web Services -/// Account Management Guide.

    -/// -///

    Amazon S3 transfer acceleration does not support cross-Region copies. If you request a -/// cross-Region copy using a transfer acceleration endpoint, you get a 400 Bad -/// Request error. For more information, see Transfer -/// Acceleration.

    -///
    -///
    -///
    Authentication and authorization
    -///
    -///

    All CopyObject requests must be authenticated and signed by using -/// IAM credentials (access key ID and secret access key for the IAM identities). -/// All headers with the x-amz- prefix, including -/// x-amz-copy-source, must be signed. For more information, see -/// REST Authentication.

    -///

    -/// Directory buckets - You must use the -/// IAM credentials to authenticate and authorize your access to the -/// CopyObject API operation, instead of using the temporary security -/// credentials through the CreateSession API operation.

    -///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your -/// behalf.

    -///
    -///
    Permissions
    -///
    -///

    You must have read access to the source object and -/// write access to the destination bucket.

    -///
      -///
    • -///

      -/// General purpose bucket permissions - You -/// must have permissions in an IAM policy based on the source and destination -/// bucket types in a CopyObject operation.

      -///
        -///
      • -///

        If the source object is in a general purpose bucket, you must have -/// -/// s3:GetObject -/// -/// permission to read the source object that is being copied.

        -///
      • -///
      • -///

        If the destination bucket is a general purpose bucket, you must have -/// -/// s3:PutObject -/// -/// permission to write the object copy to the destination bucket.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// You must have permissions in a bucket policy or an IAM identity-based policy based on the -/// source and destination bucket types in a CopyObject -/// operation.

      -///
        -///
      • -///

        If the source object that you want to copy is in a -/// directory bucket, you must have the -/// s3express:CreateSession -/// permission in -/// the Action element of a policy to read the object. By -/// default, the session is in the ReadWrite mode. If you -/// want to restrict the access, you can explicitly set the -/// s3express:SessionMode condition key to -/// ReadOnly on the copy source bucket.

        -///
      • -///
      • -///

        If the copy destination is a directory bucket, you must have the -/// -/// s3express:CreateSession -/// permission in the -/// Action element of a policy to write the object to the -/// destination. The s3express:SessionMode condition key -/// can't be set to ReadOnly on the copy destination bucket. -///

        -///
      • -///
      -///

      If the object is encrypted with SSE-KMS, you must also have the -/// kms:GenerateDataKey and kms:Decrypt permissions -/// in IAM identity-based policies and KMS key policies for the KMS -/// key.

      -///

      For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for -/// S3 Express One Zone in the Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    Response and special errors
    -///
    -///

    When the request is an HTTP 1.1 request, the response is chunk encoded. When -/// the request is not an HTTP 1.1 request, the response would not contain the -/// Content-Length. You always need to read the entire response body -/// to check if the copy succeeds.

    -///
      -///
    • -///

      If the copy is successful, you receive a response with information about -/// the copied object.

      -///
    • -///
    • -///

      A copy request might return an error when Amazon S3 receives the copy request -/// or while Amazon S3 is copying the files. A 200 OK response can -/// contain either a success or an error.

      -///
        -///
      • -///

        If the error occurs before the copy action starts, you receive a -/// standard Amazon S3 error.

        -///
      • -///
      • -///

        If the error occurs during the copy operation, the error response -/// is embedded in the 200 OK response. For example, in a -/// cross-region copy, you may encounter throttling and receive a -/// 200 OK response. For more information, see Resolve the Error 200 response when copying objects to -/// Amazon S3. The 200 OK status code means the copy -/// was accepted, but it doesn't mean the copy is complete. Another -/// example is when you disconnect from Amazon S3 before the copy is complete, -/// Amazon S3 might cancel the copy and you may receive a 200 OK -/// response. You must stay connected to Amazon S3 until the entire response is -/// successfully received and processed.

        -///

        If you call this API operation directly, make sure to design your -/// application to parse the content of the response and handle it -/// appropriately. If you use Amazon Web Services SDKs, SDKs handle this condition. The -/// SDKs detect the embedded error and apply error handling per your -/// configuration settings (including automatically retrying the request -/// as appropriate). If the condition persists, the SDKs throw an -/// exception (or, for the SDKs that don't use exceptions, they return an -/// error).

        -///
      • -///
      -///
    • -///
    -///
    -///
    Charge
    -///
    -///

    The copy request charge is based on the storage class and Region that you -/// specify for the destination object. The request can also result in a data -/// retrieval charge for the source if the source storage class bills for data -/// retrieval. If the copy source is in a different region, the data transfer is -/// billed to the copy source account. For pricing information, see Amazon S3 pricing.

    -///
    -///
    HTTP Host header syntax
    -///
    -///
      -///
    • -///

      -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

      -///
    • -///
    • -///

      -/// Amazon S3 on Outposts - When you use this action with S3 on Outposts through the REST API, you must direct requests to the S3 on Outposts hostname. The S3 on Outposts hostname takes the -/// form -/// AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. The hostname isn't required when you use the Amazon Web Services CLI or SDKs.

      -///
    • -///
    -///
    -///
    -///

    The following operations are related to CopyObject:

    -/// -async fn copy_object(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "CopyObject is not implemented yet")) -} + /// + ///

    This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see + /// CreateBucket + /// .

    + ///
    + ///

    Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services + /// Access Key ID to authenticate requests. Anonymous requests are never allowed to create + /// buckets. By creating the bucket, you become the bucket owner.

    + ///

    There are two types of buckets: general purpose buckets and directory buckets. For more + /// information about these bucket types, see Creating, configuring, and + /// working with Amazon S3 buckets in the Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets - If you send your + /// CreateBucket request to the s3.amazonaws.com global + /// endpoint, the request goes to the us-east-1 Region. So the signature + /// calculations in Signature Version 4 must use us-east-1 as the Region, + /// even if the location constraint in the request specifies another Region where the + /// bucket is to be created. If you create a bucket in a Region other than US East (N. + /// Virginia), your application must be able to handle 307 redirect. For more + /// information, see Virtual hosting of + /// buckets in the Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - In + /// addition to the s3:CreateBucket permission, the following + /// permissions are required in a policy when your CreateBucket + /// request includes specific headers:

      + ///
        + ///
      • + ///

        + /// Access control lists (ACLs) + /// - In your CreateBucket request, if you specify an + /// access control list (ACL) and set it to public-read, + /// public-read-write, authenticated-read, or + /// if you explicitly specify any other custom ACLs, both + /// s3:CreateBucket and s3:PutBucketAcl + /// permissions are required. In your CreateBucket request, + /// if you set the ACL to private, or if you don't specify + /// any ACLs, only the s3:CreateBucket permission is + /// required.

        + ///
      • + ///
      • + ///

        + /// Object Lock - In your + /// CreateBucket request, if you set + /// x-amz-bucket-object-lock-enabled to true, the + /// s3:PutBucketObjectLockConfiguration and + /// s3:PutBucketVersioning permissions are + /// required.

        + ///
      • + ///
      • + ///

        + /// S3 Object Ownership - If + /// your CreateBucket request includes the + /// x-amz-object-ownership header, then the + /// s3:PutBucketOwnershipControls permission is + /// required.

        + /// + ///

        To set an ACL on a bucket as part of a + /// CreateBucket request, you must explicitly set S3 + /// Object Ownership for the bucket to a different value than the + /// default, BucketOwnerEnforced. Additionally, if your + /// desired bucket ACL grants public access, you must first create the + /// bucket (without the bucket ACL) and then explicitly disable Block + /// Public Access on the bucket before using PutBucketAcl + /// to set the ACL. If you try to create a bucket with a public ACL, + /// the request will fail.

        + ///

        For the majority of modern use cases in S3, we recommend that + /// you keep all Block Public Access settings enabled and keep ACLs + /// disabled. If you would like to share data with users outside of + /// your account, you can use bucket policies as needed. For more + /// information, see Controlling ownership of objects and disabling ACLs for your + /// bucket and Blocking public access to your Amazon S3 storage in + /// the Amazon S3 User Guide.

        + ///
        + ///
      • + ///
      • + ///

        + /// S3 Block Public Access - If + /// your specific use case requires granting public access to your S3 + /// resources, you can disable Block Public Access. Specifically, you can + /// create a new bucket with Block Public Access enabled, then separately + /// call the + /// DeletePublicAccessBlock + /// API. To use this operation, you must have the + /// s3:PutBucketPublicAccessBlock permission. For more + /// information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage in the + /// Amazon S3 User Guide.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// You must have the s3express:CreateBucket permission in + /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      + /// + ///

      The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 + /// Block Public Access are not supported for directory buckets. For + /// directory buckets, all Block Public Access settings are enabled at the + /// bucket level and S3 Object Ownership is set to Bucket owner enforced + /// (ACLs disabled). These settings can't be modified.

      + ///

      For more information about permissions for creating and working with + /// directory buckets, see Directory buckets in the + /// Amazon S3 User Guide. For more information about + /// supported S3 features for directory buckets, see Features of S3 Express One Zone in the + /// Amazon S3 User Guide.

      + ///
      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to CreateBucket:

    + /// + async fn create_bucket(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "CreateBucket is not implemented yet")) + } -/// -///

    This action creates an Amazon S3 bucket. To create an Amazon S3 on Outposts bucket, see -/// CreateBucket -/// .

    -///
    -///

    Creates a new S3 bucket. To create a bucket, you must set up Amazon S3 and have a valid Amazon Web Services -/// Access Key ID to authenticate requests. Anonymous requests are never allowed to create -/// buckets. By creating the bucket, you become the bucket owner.

    -///

    There are two types of buckets: general purpose buckets and directory buckets. For more -/// information about these bucket types, see Creating, configuring, and -/// working with Amazon S3 buckets in the Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      -/// General purpose buckets - If you send your -/// CreateBucket request to the s3.amazonaws.com global -/// endpoint, the request goes to the us-east-1 Region. So the signature -/// calculations in Signature Version 4 must use us-east-1 as the Region, -/// even if the location constraint in the request specifies another Region where the -/// bucket is to be created. If you create a bucket in a Region other than US East (N. -/// Virginia), your application must be able to handle 307 redirect. For more -/// information, see Virtual hosting of -/// buckets in the Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - In -/// addition to the s3:CreateBucket permission, the following -/// permissions are required in a policy when your CreateBucket -/// request includes specific headers:

      -///
        -///
      • -///

        -/// Access control lists (ACLs) -/// - In your CreateBucket request, if you specify an -/// access control list (ACL) and set it to public-read, -/// public-read-write, authenticated-read, or -/// if you explicitly specify any other custom ACLs, both -/// s3:CreateBucket and s3:PutBucketAcl -/// permissions are required. In your CreateBucket request, -/// if you set the ACL to private, or if you don't specify -/// any ACLs, only the s3:CreateBucket permission is -/// required.

        -///
      • -///
      • -///

        -/// Object Lock - In your -/// CreateBucket request, if you set -/// x-amz-bucket-object-lock-enabled to true, the -/// s3:PutBucketObjectLockConfiguration and -/// s3:PutBucketVersioning permissions are -/// required.

        -///
      • -///
      • -///

        -/// S3 Object Ownership - If -/// your CreateBucket request includes the -/// x-amz-object-ownership header, then the -/// s3:PutBucketOwnershipControls permission is -/// required.

        -/// -///

        To set an ACL on a bucket as part of a -/// CreateBucket request, you must explicitly set S3 -/// Object Ownership for the bucket to a different value than the -/// default, BucketOwnerEnforced. Additionally, if your -/// desired bucket ACL grants public access, you must first create the -/// bucket (without the bucket ACL) and then explicitly disable Block -/// Public Access on the bucket before using PutBucketAcl -/// to set the ACL. If you try to create a bucket with a public ACL, -/// the request will fail.

        -///

        For the majority of modern use cases in S3, we recommend that -/// you keep all Block Public Access settings enabled and keep ACLs -/// disabled. If you would like to share data with users outside of -/// your account, you can use bucket policies as needed. For more -/// information, see Controlling ownership of objects and disabling ACLs for your -/// bucket and Blocking public access to your Amazon S3 storage in -/// the Amazon S3 User Guide.

        -///
        -///
      • -///
      • -///

        -/// S3 Block Public Access - If -/// your specific use case requires granting public access to your S3 -/// resources, you can disable Block Public Access. Specifically, you can -/// create a new bucket with Block Public Access enabled, then separately -/// call the -/// DeletePublicAccessBlock -/// API. To use this operation, you must have the -/// s3:PutBucketPublicAccessBlock permission. For more -/// information about S3 Block Public Access, see Blocking public access to your Amazon S3 storage in the -/// Amazon S3 User Guide.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// You must have the s3express:CreateBucket permission in -/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      -/// -///

      The permissions for ACLs, Object Lock, S3 Object Ownership, and S3 -/// Block Public Access are not supported for directory buckets. For -/// directory buckets, all Block Public Access settings are enabled at the -/// bucket level and S3 Object Ownership is set to Bucket owner enforced -/// (ACLs disabled). These settings can't be modified.

      -///

      For more information about permissions for creating and working with -/// directory buckets, see Directory buckets in the -/// Amazon S3 User Guide. For more information about -/// supported S3 features for directory buckets, see Features of S3 Express One Zone in the -/// Amazon S3 User Guide.

      -///
      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to CreateBucket:

    -/// -async fn create_bucket(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "CreateBucket is not implemented yet")) -} + ///

    Creates a metadata table configuration for a general purpose bucket. For more + /// information, see Accelerating data + /// discovery with S3 Metadata in the Amazon S3 User Guide.

    + ///
    + ///
    Permissions
    + ///
    + ///

    To use this operation, you must have the following permissions. For more + /// information, see Setting up + /// permissions for configuring metadata tables in the + /// Amazon S3 User Guide.

    + ///

    If you also want to integrate your table bucket with Amazon Web Services analytics services so that you + /// can query your metadata table, you need additional permissions. For more information, see + /// + /// Integrating Amazon S3 Tables with Amazon Web Services analytics services in the + /// Amazon S3 User Guide.

    + ///
      + ///
    • + ///

      + /// s3:CreateBucketMetadataTableConfiguration + ///

      + ///
    • + ///
    • + ///

      + /// s3tables:CreateNamespace + ///

      + ///
    • + ///
    • + ///

      + /// s3tables:GetTable + ///

      + ///
    • + ///
    • + ///

      + /// s3tables:CreateTable + ///

      + ///
    • + ///
    • + ///

      + /// s3tables:PutTablePolicy + ///

      + ///
    • + ///
    + ///
    + ///
    + ///

    The following operations are related to CreateBucketMetadataTableConfiguration:

    + /// + async fn create_bucket_metadata_table_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "CreateBucketMetadataTableConfiguration is not implemented yet")) + } -///

    Creates a metadata table configuration for a general purpose bucket. For more -/// information, see Accelerating data -/// discovery with S3 Metadata in the Amazon S3 User Guide.

    -///
    -///
    Permissions
    -///
    -///

    To use this operation, you must have the following permissions. For more -/// information, see Setting up -/// permissions for configuring metadata tables in the -/// Amazon S3 User Guide.

    -///

    If you also want to integrate your table bucket with Amazon Web Services analytics services so that you -/// can query your metadata table, you need additional permissions. For more information, see -/// -/// Integrating Amazon S3 Tables with Amazon Web Services analytics services in the -/// Amazon S3 User Guide.

    -///
      -///
    • -///

      -/// s3:CreateBucketMetadataTableConfiguration -///

      -///
    • -///
    • -///

      -/// s3tables:CreateNamespace -///

      -///
    • -///
    • -///

      -/// s3tables:GetTable -///

      -///
    • -///
    • -///

      -/// s3tables:CreateTable -///

      -///
    • -///
    • -///

      -/// s3tables:PutTablePolicy -///

      -///
    • -///
    -///
    -///
    -///

    The following operations are related to CreateBucketMetadataTableConfiguration:

    -/// -async fn create_bucket_metadata_table_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "CreateBucketMetadataTableConfiguration is not implemented yet")) -} + ///

    This action initiates a multipart upload and returns an upload ID. This upload ID is + /// used to associate all of the parts in the specific multipart upload. You specify this + /// upload ID in each of your subsequent upload part requests (see UploadPart). You also include this + /// upload ID in the final request to either complete or abort the multipart upload request. + /// For more information about multipart uploads, see Multipart Upload Overview in the + /// Amazon S3 User Guide.

    + /// + ///

    After you initiate a multipart upload and upload one or more parts, to stop being + /// charged for storing the uploaded parts, you must either complete or abort the multipart + /// upload. Amazon S3 frees up the space used to store the parts and stops charging you for + /// storing them only after you either complete or abort a multipart upload.

    + ///
    + ///

    If you have configured a lifecycle rule to abort incomplete multipart uploads, the + /// created multipart upload must be completed within the number of days specified in the + /// bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible + /// for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle + /// Configuration.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - + /// S3 Lifecycle is not supported by directory buckets.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    + ///
    Request signing
    + ///
    + ///

    For request signing, multipart upload is just a series of regular requests. You + /// initiate a multipart upload, send one or more requests to upload parts, and then + /// complete the multipart upload process. You sign each request individually. There + /// is nothing special about signing multipart upload requests. For more information + /// about signing, see Authenticating + /// Requests (Amazon Web Services Signature Version 4) in the + /// Amazon S3 User Guide.

    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - To + /// perform a multipart upload with encryption using an Key Management Service (KMS) + /// KMS key, the requester must have permission to the + /// kms:Decrypt and kms:GenerateDataKey actions on + /// the key. The requester must also have permissions for the + /// kms:GenerateDataKey action for the + /// CreateMultipartUpload API. Then, the requester needs + /// permissions for the kms:Decrypt action on the + /// UploadPart and UploadPartCopy APIs. These + /// permissions are required because Amazon S3 must decrypt and read data from the + /// encrypted file parts before it completes the multipart upload. For more + /// information, see Multipart upload API and permissions and Protecting data + /// using server-side encryption with Amazon Web Services KMS in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///
    • + ///
    + ///
    + ///
    Encryption
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose buckets - Server-side + /// encryption is for data encryption at rest. Amazon S3 encrypts your data as it + /// writes it to disks in its data centers and decrypts it when you access it. + /// Amazon S3 automatically encrypts all new objects that are uploaded to an S3 + /// bucket. When doing a multipart upload, if you don't specify encryption + /// information in your request, the encryption setting of the uploaded parts is + /// set to the default encryption configuration of the destination bucket. By + /// default, all buckets have a base level of encryption configuration that uses + /// server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination + /// bucket has a default encryption configuration that uses server-side + /// encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided + /// encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a + /// customer-provided key to encrypt the uploaded parts. When you perform a + /// CreateMultipartUpload operation, if you want to use a different type of + /// encryption setting for the uploaded parts, you can request that Amazon S3 + /// encrypts the object with a different encryption key (such as an Amazon S3 managed + /// key, a KMS key, or a customer-provided key). When the encryption setting + /// in your request is different from the default encryption configuration of + /// the destination bucket, the encryption setting in your request takes + /// precedence. If you choose to provide your own encryption key, the request + /// headers you provide in UploadPart and + /// UploadPartCopy + /// requests must match the headers you used in the + /// CreateMultipartUpload request.

      + ///
        + ///
      • + ///

        Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key + /// (aws/s3) and KMS customer managed keys stored in Key Management Service + /// (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, + /// specify the following headers in the request.

        + ///
          + ///
        • + ///

          + /// x-amz-server-side-encryption + ///

          + ///
        • + ///
        • + ///

          + /// x-amz-server-side-encryption-aws-kms-key-id + ///

          + ///
        • + ///
        • + ///

          + /// x-amz-server-side-encryption-context + ///

          + ///
        • + ///
        + /// + ///
          + ///
        • + ///

          If you specify + /// x-amz-server-side-encryption:aws:kms, but + /// don't provide + /// x-amz-server-side-encryption-aws-kms-key-id, + /// Amazon S3 uses the Amazon Web Services managed key (aws/s3 key) in + /// KMS to protect the data.

          + ///
        • + ///
        • + ///

          To perform a multipart upload with encryption by using an + /// Amazon Web Services KMS key, the requester must have permission to the + /// kms:Decrypt and + /// kms:GenerateDataKey* actions on the key. + /// These permissions are required because Amazon S3 must decrypt and + /// read data from the encrypted file parts before it completes + /// the multipart upload. For more information, see Multipart upload API and permissions and Protecting data using server-side encryption with Amazon Web Services + /// KMS in the + /// Amazon S3 User Guide.

          + ///
        • + ///
        • + ///

          If your Identity and Access Management (IAM) user or role is in the same + /// Amazon Web Services account as the KMS key, then you must have these + /// permissions on the key policy. If your IAM user or role is + /// in a different account from the key, then you must have the + /// permissions on both the key policy and your IAM user or + /// role.

          + ///
        • + ///
        • + ///

          All GET and PUT requests for an + /// object protected by KMS fail if you don't make them by + /// using Secure Sockets Layer (SSL), Transport Layer Security + /// (TLS), or Signature Version 4. For information about + /// configuring any of the officially supported Amazon Web Services SDKs and + /// Amazon Web Services CLI, see Specifying the Signature Version in + /// Request Authentication in the + /// Amazon S3 User Guide.

          + ///
        • + ///
        + ///
        + ///

        For more information about server-side encryption with KMS keys + /// (SSE-KMS), see Protecting + /// Data Using Server-Side Encryption with KMS keys in the + /// Amazon S3 User Guide.

        + ///
      • + ///
      • + ///

        Use customer-provided encryption keys (SSE-C) – If you want to + /// manage your own encryption keys, provide all the following headers in + /// the request.

        + ///
          + ///
        • + ///

          + /// x-amz-server-side-encryption-customer-algorithm + ///

          + ///
        • + ///
        • + ///

          + /// x-amz-server-side-encryption-customer-key + ///

          + ///
        • + ///
        • + ///

          + /// x-amz-server-side-encryption-customer-key-MD5 + ///

          + ///
        • + ///
        + ///

        For more information about server-side encryption with + /// customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with + /// customer-provided encryption keys (SSE-C) in the + /// Amazon S3 User Guide.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      + ///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. + /// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. + /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and + /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. + ///

      + /// + ///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the + /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. + /// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), + /// the encryption request headers must match the default encryption configuration of the directory bucket. + /// + ///

      + ///
      + /// + ///

      For directory buckets, when you perform a + /// CreateMultipartUpload operation and an + /// UploadPartCopy operation, the request headers you provide + /// in the CreateMultipartUpload request must match the default + /// encryption configuration of the destination bucket.

      + ///
      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to CreateMultipartUpload:

    + /// + async fn create_multipart_upload( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "CreateMultipartUpload is not implemented yet")) + } -///

    This action initiates a multipart upload and returns an upload ID. This upload ID is -/// used to associate all of the parts in the specific multipart upload. You specify this -/// upload ID in each of your subsequent upload part requests (see UploadPart). You also include this -/// upload ID in the final request to either complete or abort the multipart upload request. -/// For more information about multipart uploads, see Multipart Upload Overview in the -/// Amazon S3 User Guide.

    -/// -///

    After you initiate a multipart upload and upload one or more parts, to stop being -/// charged for storing the uploaded parts, you must either complete or abort the multipart -/// upload. Amazon S3 frees up the space used to store the parts and stops charging you for -/// storing them only after you either complete or abort a multipart upload.

    -///
    -///

    If you have configured a lifecycle rule to abort incomplete multipart uploads, the -/// created multipart upload must be completed within the number of days specified in the -/// bucket lifecycle configuration. Otherwise, the incomplete multipart upload becomes eligible -/// for an abort action and Amazon S3 aborts the multipart upload. For more information, see Aborting Incomplete Multipart Uploads Using a Bucket Lifecycle -/// Configuration.

    -/// -///
      -///
    • -///

      -/// Directory buckets - -/// S3 Lifecycle is not supported by directory buckets.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    -///
    Request signing
    -///
    -///

    For request signing, multipart upload is just a series of regular requests. You -/// initiate a multipart upload, send one or more requests to upload parts, and then -/// complete the multipart upload process. You sign each request individually. There -/// is nothing special about signing multipart upload requests. For more information -/// about signing, see Authenticating -/// Requests (Amazon Web Services Signature Version 4) in the -/// Amazon S3 User Guide.

    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - To -/// perform a multipart upload with encryption using an Key Management Service (KMS) -/// KMS key, the requester must have permission to the -/// kms:Decrypt and kms:GenerateDataKey actions on -/// the key. The requester must also have permissions for the -/// kms:GenerateDataKey action for the -/// CreateMultipartUpload API. Then, the requester needs -/// permissions for the kms:Decrypt action on the -/// UploadPart and UploadPartCopy APIs. These -/// permissions are required because Amazon S3 must decrypt and read data from the -/// encrypted file parts before it completes the multipart upload. For more -/// information, see Multipart upload API and permissions and Protecting data -/// using server-side encryption with Amazon Web Services KMS in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///
    • -///
    -///
    -///
    Encryption
    -///
    -///
      -///
    • -///

      -/// General purpose buckets - Server-side -/// encryption is for data encryption at rest. Amazon S3 encrypts your data as it -/// writes it to disks in its data centers and decrypts it when you access it. -/// Amazon S3 automatically encrypts all new objects that are uploaded to an S3 -/// bucket. When doing a multipart upload, if you don't specify encryption -/// information in your request, the encryption setting of the uploaded parts is -/// set to the default encryption configuration of the destination bucket. By -/// default, all buckets have a base level of encryption configuration that uses -/// server-side encryption with Amazon S3 managed keys (SSE-S3). If the destination -/// bucket has a default encryption configuration that uses server-side -/// encryption with an Key Management Service (KMS) key (SSE-KMS), or a customer-provided -/// encryption key (SSE-C), Amazon S3 uses the corresponding KMS key, or a -/// customer-provided key to encrypt the uploaded parts. When you perform a -/// CreateMultipartUpload operation, if you want to use a different type of -/// encryption setting for the uploaded parts, you can request that Amazon S3 -/// encrypts the object with a different encryption key (such as an Amazon S3 managed -/// key, a KMS key, or a customer-provided key). When the encryption setting -/// in your request is different from the default encryption configuration of -/// the destination bucket, the encryption setting in your request takes -/// precedence. If you choose to provide your own encryption key, the request -/// headers you provide in UploadPart and -/// UploadPartCopy -/// requests must match the headers you used in the -/// CreateMultipartUpload request.

      -///
        -///
      • -///

        Use KMS keys (SSE-KMS) that include the Amazon Web Services managed key -/// (aws/s3) and KMS customer managed keys stored in Key Management Service -/// (KMS) – If you want Amazon Web Services to manage the keys used to encrypt data, -/// specify the following headers in the request.

        -///
          -///
        • -///

          -/// x-amz-server-side-encryption -///

          -///
        • -///
        • -///

          -/// x-amz-server-side-encryption-aws-kms-key-id -///

          -///
        • -///
        • -///

          -/// x-amz-server-side-encryption-context -///

          -///
        • -///
        -/// -///
          -///
        • -///

          If you specify -/// x-amz-server-side-encryption:aws:kms, but -/// don't provide -/// x-amz-server-side-encryption-aws-kms-key-id, -/// Amazon S3 uses the Amazon Web Services managed key (aws/s3 key) in -/// KMS to protect the data.

          -///
        • -///
        • -///

          To perform a multipart upload with encryption by using an -/// Amazon Web Services KMS key, the requester must have permission to the -/// kms:Decrypt and -/// kms:GenerateDataKey* actions on the key. -/// These permissions are required because Amazon S3 must decrypt and -/// read data from the encrypted file parts before it completes -/// the multipart upload. For more information, see Multipart upload API and permissions and Protecting data using server-side encryption with Amazon Web Services -/// KMS in the -/// Amazon S3 User Guide.

          -///
        • -///
        • -///

          If your Identity and Access Management (IAM) user or role is in the same -/// Amazon Web Services account as the KMS key, then you must have these -/// permissions on the key policy. If your IAM user or role is -/// in a different account from the key, then you must have the -/// permissions on both the key policy and your IAM user or -/// role.

          -///
        • -///
        • -///

          All GET and PUT requests for an -/// object protected by KMS fail if you don't make them by -/// using Secure Sockets Layer (SSL), Transport Layer Security -/// (TLS), or Signature Version 4. For information about -/// configuring any of the officially supported Amazon Web Services SDKs and -/// Amazon Web Services CLI, see Specifying the Signature Version in -/// Request Authentication in the -/// Amazon S3 User Guide.

          -///
        • -///
        -///
        -///

        For more information about server-side encryption with KMS keys -/// (SSE-KMS), see Protecting -/// Data Using Server-Side Encryption with KMS keys in the -/// Amazon S3 User Guide.

        -///
      • -///
      • -///

        Use customer-provided encryption keys (SSE-C) – If you want to -/// manage your own encryption keys, provide all the following headers in -/// the request.

        -///
          -///
        • -///

          -/// x-amz-server-side-encryption-customer-algorithm -///

          -///
        • -///
        • -///

          -/// x-amz-server-side-encryption-customer-key -///

          -///
        • -///
        • -///

          -/// x-amz-server-side-encryption-customer-key-MD5 -///

          -///
        • -///
        -///

        For more information about server-side encryption with -/// customer-provided encryption keys (SSE-C), see Protecting data using server-side encryption with -/// customer-provided encryption keys (SSE-C) in the -/// Amazon S3 User Guide.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

      -///

      In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, the encryption request headers must match the encryption settings that are specified in the CreateSession request. -/// You can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) that are specified in the CreateSession request. -/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and -/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. -///

      -/// -///

      When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the -/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. -/// So in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), -/// the encryption request headers must match the default encryption configuration of the directory bucket. -/// -///

      -///
      -/// -///

      For directory buckets, when you perform a -/// CreateMultipartUpload operation and an -/// UploadPartCopy operation, the request headers you provide -/// in the CreateMultipartUpload request must match the default -/// encryption configuration of the destination bucket.

      -///
      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to CreateMultipartUpload:

    -/// -async fn create_multipart_upload(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "CreateMultipartUpload is not implemented yet")) -} + ///

    Creates a session that establishes temporary security credentials to support fast + /// authentication and authorization for the Zonal endpoint API operations on directory buckets. For more + /// information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone + /// APIs in the Amazon S3 User Guide.

    + ///

    To make Zonal endpoint API requests on a directory bucket, use the CreateSession + /// API operation. Specifically, you grant s3express:CreateSession permission to a + /// bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the + /// CreateSession API request on the bucket, which returns temporary security + /// credentials that include the access key ID, secret access key, session token, and + /// expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After + /// the session is created, you don’t need to use other policies to grant permissions to each + /// Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by + /// applying the temporary security credentials of the session to the request headers and + /// following the SigV4 protocol for authentication. You also apply the session token to the + /// x-amz-s3session-token request header for authorization. Temporary security + /// credentials are scoped to the bucket and expire after 5 minutes. After the expiration time, + /// any calls that you make with those credentials will fail. You must use IAM credentials + /// again to make a CreateSession API request that generates a new set of + /// temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond + /// the original specified interval.

    + ///

    If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid + /// service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to + /// initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the + /// Amazon S3 User Guide.

    + /// + ///
      + ///
    • + ///

      You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// + /// CopyObject API operation - + /// Unlike other Zonal endpoint API operations, the CopyObject API operation doesn't use + /// the temporary security credentials returned from the CreateSession + /// API operation for authentication and authorization. For information about + /// authentication and authorization of the CopyObject API operation on + /// directory buckets, see CopyObject.

      + ///
    • + ///
    • + ///

      + /// + /// HeadBucket API operation - + /// Unlike other Zonal endpoint API operations, the HeadBucket API operation doesn't use + /// the temporary security credentials returned from the CreateSession + /// API operation for authentication and authorization. For information about + /// authentication and authorization of the HeadBucket API operation on + /// directory buckets, see HeadBucket.

      + ///
    • + ///
    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///

    To obtain temporary security credentials, you must create + /// a bucket policy or an IAM identity-based policy that grants s3express:CreateSession + /// permission to the bucket. In a policy, you can have the + /// s3express:SessionMode condition key to control who can create a + /// ReadWrite or ReadOnly session. For more information + /// about ReadWrite or ReadOnly sessions, see + /// x-amz-create-session-mode + /// . For example policies, see + /// Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for + /// S3 Express One Zone in the Amazon S3 User Guide.

    + ///

    To grant cross-account access to Zonal endpoint API operations, the bucket policy should also + /// grant both accounts the s3express:CreateSession permission.

    + ///

    If you want to encrypt objects with SSE-KMS, you must also have the + /// kms:GenerateDataKey and the kms:Decrypt permissions + /// in IAM identity-based policies and KMS key policies for the target KMS + /// key.

    + ///
    + ///
    Encryption
    + ///
    + ///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    + ///

    For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, + /// you authenticate and authorize requests through CreateSession for low latency. + /// To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

    + /// + ///

    + /// Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. + /// After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration. + ///

    + ///
    + ///

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, + /// you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. + /// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and + /// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. + ///

    + /// + ///

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the + /// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. + /// Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), + /// it's not supported to override the values of the encryption settings from the CreateSession request. + /// + ///

    + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + async fn create_session(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "CreateSession is not implemented yet")) + } -///

    Creates a session that establishes temporary security credentials to support fast -/// authentication and authorization for the Zonal endpoint API operations on directory buckets. For more -/// information about Zonal endpoint API operations that include the Availability Zone in the request endpoint, see S3 Express One Zone -/// APIs in the Amazon S3 User Guide.

    -///

    To make Zonal endpoint API requests on a directory bucket, use the CreateSession -/// API operation. Specifically, you grant s3express:CreateSession permission to a -/// bucket in a bucket policy or an IAM identity-based policy. Then, you use IAM credentials to make the -/// CreateSession API request on the bucket, which returns temporary security -/// credentials that include the access key ID, secret access key, session token, and -/// expiration. These credentials have associated permissions to access the Zonal endpoint API operations. After -/// the session is created, you don’t need to use other policies to grant permissions to each -/// Zonal endpoint API individually. Instead, in your Zonal endpoint API requests, you sign your requests by -/// applying the temporary security credentials of the session to the request headers and -/// following the SigV4 protocol for authentication. You also apply the session token to the -/// x-amz-s3session-token request header for authorization. Temporary security -/// credentials are scoped to the bucket and expire after 5 minutes. After the expiration time, -/// any calls that you make with those credentials will fail. You must use IAM credentials -/// again to make a CreateSession API request that generates a new set of -/// temporary credentials for use. Temporary credentials cannot be extended or refreshed beyond -/// the original specified interval.

    -///

    If you use Amazon Web Services SDKs, SDKs handle the session token refreshes automatically to avoid -/// service interruptions when a session expires. We recommend that you use the Amazon Web Services SDKs to -/// initiate and manage requests to the CreateSession API. For more information, see Performance guidelines and design patterns in the -/// Amazon S3 User Guide.

    -/// -///
      -///
    • -///

      You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// -/// CopyObject API operation - -/// Unlike other Zonal endpoint API operations, the CopyObject API operation doesn't use -/// the temporary security credentials returned from the CreateSession -/// API operation for authentication and authorization. For information about -/// authentication and authorization of the CopyObject API operation on -/// directory buckets, see CopyObject.

      -///
    • -///
    • -///

      -/// -/// HeadBucket API operation - -/// Unlike other Zonal endpoint API operations, the HeadBucket API operation doesn't use -/// the temporary security credentials returned from the CreateSession -/// API operation for authentication and authorization. For information about -/// authentication and authorization of the HeadBucket API operation on -/// directory buckets, see HeadBucket.

      -///
    • -///
    -///
    -///
    -///
    Permissions
    -///
    -///

    To obtain temporary security credentials, you must create -/// a bucket policy or an IAM identity-based policy that grants s3express:CreateSession -/// permission to the bucket. In a policy, you can have the -/// s3express:SessionMode condition key to control who can create a -/// ReadWrite or ReadOnly session. For more information -/// about ReadWrite or ReadOnly sessions, see -/// x-amz-create-session-mode -/// . For example policies, see -/// Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for -/// S3 Express One Zone in the Amazon S3 User Guide.

    -///

    To grant cross-account access to Zonal endpoint API operations, the bucket policy should also -/// grant both accounts the s3express:CreateSession permission.

    -///

    If you want to encrypt objects with SSE-KMS, you must also have the -/// kms:GenerateDataKey and the kms:Decrypt permissions -/// in IAM identity-based policies and KMS key policies for the target KMS -/// key.

    -///
    -///
    Encryption
    -///
    -///

    For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    -///

    For Zonal endpoint (object-level) API operations except CopyObject and UploadPartCopy, -/// you authenticate and authorize requests through CreateSession for low latency. -/// To encrypt new objects in a directory bucket with SSE-KMS, you must specify SSE-KMS as the directory bucket's default encryption configuration with a KMS key (specifically, a customer managed key). Then, when a session is created for Zonal endpoint API operations, new objects are automatically encrypted and decrypted with SSE-KMS and S3 Bucket Keys during the session.

    -/// -///

    -/// Only 1 customer managed key is supported per directory bucket for the lifetime of the bucket. The Amazon Web Services managed key (aws/s3) isn't supported. -/// After you specify SSE-KMS as your bucket's default encryption configuration with a customer managed key, you can't change the customer managed key for the bucket's SSE-KMS configuration. -///

    -///
    -///

    In the Zonal endpoint API calls (except CopyObject and UploadPartCopy) using the REST API, -/// you can't override the values of the encryption settings (x-amz-server-side-encryption, x-amz-server-side-encryption-aws-kms-key-id, x-amz-server-side-encryption-context, and x-amz-server-side-encryption-bucket-key-enabled) from the CreateSession request. -/// You don't need to explicitly specify these encryption settings values in Zonal endpoint API calls, and -/// Amazon S3 will use the encryption settings values from the CreateSession request to protect new objects in the directory bucket. -///

    -/// -///

    When you use the CLI or the Amazon Web Services SDKs, for CreateSession, the session token refreshes automatically to avoid service interruptions when a session expires. The CLI or the Amazon Web Services SDKs use the bucket's default encryption configuration for the -/// CreateSession request. It's not supported to override the encryption settings values in the CreateSession request. -/// Also, in the Zonal endpoint API calls (except CopyObject and UploadPartCopy), -/// it's not supported to override the values of the encryption settings from the CreateSession request. -/// -///

    -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -async fn create_session(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "CreateSession is not implemented yet")) -} + ///

    Deletes the S3 bucket. All objects (including all object versions and delete markers) in + /// the bucket must be deleted before the bucket itself can be deleted.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - If multipart + /// uploads in a directory bucket are in progress, you can't delete the bucket until + /// all the in-progress multipart uploads are aborted or completed.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - You + /// must have the s3:DeleteBucket permission on the specified + /// bucket in a policy.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// You must have the s3express:DeleteBucket permission in + /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to DeleteBucket:

    + /// + async fn delete_bucket(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucket is not implemented yet")) + } -///

    Deletes the S3 bucket. All objects (including all object versions and delete markers) in -/// the bucket must be deleted before the bucket itself can be deleted.

    -/// -///
      -///
    • -///

      -/// Directory buckets - If multipart -/// uploads in a directory bucket are in progress, you can't delete the bucket until -/// all the in-progress multipart uploads are aborted or completed.

      -///
    • -///
    • -///

      -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - You -/// must have the s3:DeleteBucket permission on the specified -/// bucket in a policy.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// You must have the s3express:DeleteBucket permission in -/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to DeleteBucket:

    -/// -async fn delete_bucket(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucket is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Deletes an analytics configuration for the bucket (specified by the analytics + /// configuration ID).

    + ///

    To use this operation, you must have permissions to perform the + /// s3:PutAnalyticsConfiguration action. The bucket owner has this permission + /// by default. The bucket owner can grant this permission to others. For more information + /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For information about the Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class + /// Analysis.

    + ///

    The following operations are related to + /// DeleteBucketAnalyticsConfiguration:

    + /// + async fn delete_bucket_analytics_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketAnalyticsConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Deletes an analytics configuration for the bucket (specified by the analytics -/// configuration ID).

    -///

    To use this operation, you must have permissions to perform the -/// s3:PutAnalyticsConfiguration action. The bucket owner has this permission -/// by default. The bucket owner can grant this permission to others. For more information -/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For information about the Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class -/// Analysis.

    -///

    The following operations are related to -/// DeleteBucketAnalyticsConfiguration:

    -/// -async fn delete_bucket_analytics_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketAnalyticsConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Deletes the cors configuration information set for the bucket.

    + ///

    To use this operation, you must have permission to perform the + /// s3:PutBucketCORS action. The bucket owner has this permission by default + /// and can grant this permission to others.

    + ///

    For information about cors, see Enabling Cross-Origin Resource Sharing in + /// the Amazon S3 User Guide.

    + ///

    + /// Related Resources + ///

    + /// + async fn delete_bucket_cors(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketCors is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Deletes the cors configuration information set for the bucket.

    -///

    To use this operation, you must have permission to perform the -/// s3:PutBucketCORS action. The bucket owner has this permission by default -/// and can grant this permission to others.

    -///

    For information about cors, see Enabling Cross-Origin Resource Sharing in -/// the Amazon S3 User Guide.

    -///

    -/// Related Resources -///

    -/// -async fn delete_bucket_cors(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketCors is not implemented yet")) -} + ///

    This implementation of the DELETE action resets the default encryption for the bucket as + /// server-side encryption with Amazon S3 managed keys (SSE-S3).

    + /// + /// + /// + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The + /// s3:PutEncryptionConfiguration permission is required in a + /// policy. The bucket owner has this permission by default. The bucket owner + /// can grant this permission to others. For more information about permissions, + /// see Permissions Related to Bucket Operations and Managing Access + /// Permissions to Your Amazon S3 Resources.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// To grant access to this API operation, you must have the + /// s3express:PutEncryptionConfiguration permission in + /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to DeleteBucketEncryption:

    + /// + async fn delete_bucket_encryption( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketEncryption is not implemented yet")) + } -///

    This implementation of the DELETE action resets the default encryption for the bucket as -/// server-side encryption with Amazon S3 managed keys (SSE-S3).

    -/// -/// -/// -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The -/// s3:PutEncryptionConfiguration permission is required in a -/// policy. The bucket owner has this permission by default. The bucket owner -/// can grant this permission to others. For more information about permissions, -/// see Permissions Related to Bucket Operations and Managing Access -/// Permissions to Your Amazon S3 Resources.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// To grant access to this API operation, you must have the -/// s3express:PutEncryptionConfiguration permission in -/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to DeleteBucketEncryption:

    -/// -async fn delete_bucket_encryption(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketEncryption is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Deletes the S3 Intelligent-Tiering configuration from the specified bucket.

    + ///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    + ///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    + ///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    + ///

    Operations related to DeleteBucketIntelligentTieringConfiguration include:

    + /// + async fn delete_bucket_intelligent_tiering_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!( + NotImplemented, + "DeleteBucketIntelligentTieringConfiguration is not implemented yet" + )) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Deletes the S3 Intelligent-Tiering configuration from the specified bucket.

    -///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    -///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    -///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    -///

    Operations related to DeleteBucketIntelligentTieringConfiguration include:

    -/// -async fn delete_bucket_intelligent_tiering_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketIntelligentTieringConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Deletes an inventory configuration (identified by the inventory ID) from the + /// bucket.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:PutInventoryConfiguration action. The bucket owner has this permission + /// by default. The bucket owner can grant this permission to others. For more information + /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

    + ///

    Operations related to DeleteBucketInventoryConfiguration include:

    + /// + async fn delete_bucket_inventory_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketInventoryConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Deletes an inventory configuration (identified by the inventory ID) from the -/// bucket.

    -///

    To use this operation, you must have permissions to perform the -/// s3:PutInventoryConfiguration action. The bucket owner has this permission -/// by default. The bucket owner can grant this permission to others. For more information -/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

    -///

    Operations related to DeleteBucketInventoryConfiguration include:

    -/// -async fn delete_bucket_inventory_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketInventoryConfiguration is not implemented yet")) -} + ///

    Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the + /// lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your + /// objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of + /// rules contained in the deleted lifecycle configuration.

    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - By + /// default, all Amazon S3 resources are private, including buckets, objects, and + /// related subresources (for example, lifecycle configuration and website + /// configuration). Only the resource owner (that is, the Amazon Web Services account that + /// created it) can access the resource. The resource owner can optionally grant + /// access permissions to others by writing an access policy. For this + /// operation, a user must have the s3:PutLifecycleConfiguration + /// permission.

      + ///

      For more information about permissions, see Managing Access + /// Permissions to Your Amazon S3 Resources.

      + ///
    • + ///
    + ///
      + ///
    • + ///

      + /// Directory bucket permissions - + /// You must have the s3express:PutLifecycleConfiguration + /// permission in an IAM identity-based policy to use this operation. + /// Cross-account access to this API operation isn't supported. The resource + /// owner can optionally grant access permissions to others by creating a role + /// or user for them as long as they are within the same account as the owner + /// and resource.

      + ///

      For more information about directory bucket policies and permissions, see + /// Authorizing Regional endpoint APIs with IAM in the + /// Amazon S3 User Guide.

      + /// + ///

      + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
      + ///
    • + ///
    + ///
    + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host + /// header syntax is + /// s3express-control.region.amazonaws.com.

    + ///
    + ///
    + ///

    For more information about the object expiration, see Elements to Describe Lifecycle Actions.

    + ///

    Related actions include:

    + /// + async fn delete_bucket_lifecycle( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketLifecycle is not implemented yet")) + } -///

    Deletes the lifecycle configuration from the specified bucket. Amazon S3 removes all the -/// lifecycle configuration rules in the lifecycle subresource associated with the bucket. Your -/// objects never expire, and Amazon S3 no longer automatically deletes any objects on the basis of -/// rules contained in the deleted lifecycle configuration.

    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - By -/// default, all Amazon S3 resources are private, including buckets, objects, and -/// related subresources (for example, lifecycle configuration and website -/// configuration). Only the resource owner (that is, the Amazon Web Services account that -/// created it) can access the resource. The resource owner can optionally grant -/// access permissions to others by writing an access policy. For this -/// operation, a user must have the s3:PutLifecycleConfiguration -/// permission.

      -///

      For more information about permissions, see Managing Access -/// Permissions to Your Amazon S3 Resources.

      -///
    • -///
    -///
      -///
    • -///

      -/// Directory bucket permissions - -/// You must have the s3express:PutLifecycleConfiguration -/// permission in an IAM identity-based policy to use this operation. -/// Cross-account access to this API operation isn't supported. The resource -/// owner can optionally grant access permissions to others by creating a role -/// or user for them as long as they are within the same account as the owner -/// and resource.

      -///

      For more information about directory bucket policies and permissions, see -/// Authorizing Regional endpoint APIs with IAM in the -/// Amazon S3 User Guide.

      -/// -///

      -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
      -///
    • -///
    -///
    -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host -/// header syntax is -/// s3express-control.region.amazonaws.com.

    -///
    -///
    -///

    For more information about the object expiration, see Elements to Describe Lifecycle Actions.

    -///

    Related actions include:

    -/// -async fn delete_bucket_lifecycle(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketLifecycle is not implemented yet")) -} + ///

    + /// Deletes a metadata table configuration from a general purpose bucket. For more + /// information, see Accelerating data + /// discovery with S3 Metadata in the Amazon S3 User Guide.

    + ///
    + ///
    Permissions
    + ///
    + ///

    To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more + /// information, see Setting up + /// permissions for configuring metadata tables in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///

    The following operations are related to DeleteBucketMetadataTableConfiguration:

    + /// + async fn delete_bucket_metadata_table_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketMetadataTableConfiguration is not implemented yet")) + } -///

    -/// Deletes a metadata table configuration from a general purpose bucket. For more -/// information, see Accelerating data -/// discovery with S3 Metadata in the Amazon S3 User Guide.

    -///
    -///
    Permissions
    -///
    -///

    To use this operation, you must have the s3:DeleteBucketMetadataTableConfiguration permission. For more -/// information, see Setting up -/// permissions for configuring metadata tables in the -/// Amazon S3 User Guide.

    -///
    -///
    -///

    The following operations are related to DeleteBucketMetadataTableConfiguration:

    -/// -async fn delete_bucket_metadata_table_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketMetadataTableConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the + /// metrics configuration ID) from the bucket. Note that this doesn't include the daily storage + /// metrics.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:PutMetricsConfiguration action. The bucket owner has this permission by + /// default. The bucket owner can grant this permission to others. For more information about + /// permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with + /// Amazon CloudWatch.

    + ///

    The following operations are related to + /// DeleteBucketMetricsConfiguration:

    + /// + async fn delete_bucket_metrics_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketMetricsConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Deletes a metrics configuration for the Amazon CloudWatch request metrics (specified by the -/// metrics configuration ID) from the bucket. Note that this doesn't include the daily storage -/// metrics.

    -///

    To use this operation, you must have permissions to perform the -/// s3:PutMetricsConfiguration action. The bucket owner has this permission by -/// default. The bucket owner can grant this permission to others. For more information about -/// permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring Metrics with -/// Amazon CloudWatch.

    -///

    The following operations are related to -/// DeleteBucketMetricsConfiguration:

    -/// -async fn delete_bucket_metrics_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketMetricsConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you + /// must have the s3:PutBucketOwnershipControls permission. For more information + /// about Amazon S3 permissions, see Specifying Permissions in a + /// Policy.

    + ///

    For information about Amazon S3 Object Ownership, see Using Object Ownership.

    + ///

    The following operations are related to + /// DeleteBucketOwnershipControls:

    + /// + async fn delete_bucket_ownership_controls( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketOwnershipControls is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Removes OwnershipControls for an Amazon S3 bucket. To use this operation, you -/// must have the s3:PutBucketOwnershipControls permission. For more information -/// about Amazon S3 permissions, see Specifying Permissions in a -/// Policy.

    -///

    For information about Amazon S3 Object Ownership, see Using Object Ownership.

    -///

    The following operations are related to -/// DeleteBucketOwnershipControls:

    -/// -async fn delete_bucket_ownership_controls(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketOwnershipControls is not implemented yet")) -} + ///

    Deletes the policy of a specified bucket.

    + /// + ///

    + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///

    If you are using an identity other than the root user of the Amazon Web Services account that + /// owns the bucket, the calling identity must both have the + /// DeleteBucketPolicy permissions on the specified bucket and belong + /// to the bucket owner's account in order to use this operation.

    + ///

    If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a + /// 403 Access Denied error. If you have the correct permissions, but + /// you're not using an identity that belongs to the bucket owner's account, Amazon S3 + /// returns a 405 Method Not Allowed error.

    + /// + ///

    To ensure that bucket owners don't inadvertently lock themselves out of + /// their own buckets, the root principal in a bucket owner's Amazon Web Services account can + /// perform the GetBucketPolicy, PutBucketPolicy, and + /// DeleteBucketPolicy API actions, even if their bucket policy + /// explicitly denies the root principal's access. Bucket owner root principals can + /// only be blocked from performing these API actions by VPC endpoint policies and + /// Amazon Web Services Organizations policies.

    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The + /// s3:DeleteBucketPolicy permission is required in a policy. + /// For more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// To grant access to this API operation, you must have the + /// s3express:DeleteBucketPolicy permission in + /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to DeleteBucketPolicy + ///

    + /// + async fn delete_bucket_policy( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketPolicy is not implemented yet")) + } -///

    Deletes the policy of a specified bucket.

    -/// -///

    -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///

    If you are using an identity other than the root user of the Amazon Web Services account that -/// owns the bucket, the calling identity must both have the -/// DeleteBucketPolicy permissions on the specified bucket and belong -/// to the bucket owner's account in order to use this operation.

    -///

    If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a -/// 403 Access Denied error. If you have the correct permissions, but -/// you're not using an identity that belongs to the bucket owner's account, Amazon S3 -/// returns a 405 Method Not Allowed error.

    -/// -///

    To ensure that bucket owners don't inadvertently lock themselves out of -/// their own buckets, the root principal in a bucket owner's Amazon Web Services account can -/// perform the GetBucketPolicy, PutBucketPolicy, and -/// DeleteBucketPolicy API actions, even if their bucket policy -/// explicitly denies the root principal's access. Bucket owner root principals can -/// only be blocked from performing these API actions by VPC endpoint policies and -/// Amazon Web Services Organizations policies.

    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The -/// s3:DeleteBucketPolicy permission is required in a policy. -/// For more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// To grant access to this API operation, you must have the -/// s3express:DeleteBucketPolicy permission in -/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to DeleteBucketPolicy -///

    -/// -async fn delete_bucket_policy(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketPolicy is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Deletes the replication configuration from the bucket.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:PutReplicationConfiguration action. The bucket owner has these + /// permissions by default and can grant it to others. For more information about permissions, + /// see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + /// + ///

    It can take a while for the deletion of a replication configuration to fully + /// propagate.

    + ///
    + ///

    For information about replication configuration, see Replication in the + /// Amazon S3 User Guide.

    + ///

    The following operations are related to DeleteBucketReplication:

    + /// + async fn delete_bucket_replication( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketReplication is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Deletes the replication configuration from the bucket.

    -///

    To use this operation, you must have permissions to perform the -/// s3:PutReplicationConfiguration action. The bucket owner has these -/// permissions by default and can grant it to others. For more information about permissions, -/// see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -/// -///

    It can take a while for the deletion of a replication configuration to fully -/// propagate.

    -///
    -///

    For information about replication configuration, see Replication in the -/// Amazon S3 User Guide.

    -///

    The following operations are related to DeleteBucketReplication:

    -/// -async fn delete_bucket_replication(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketReplication is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Deletes the tags from the bucket.

    + ///

    To use this operation, you must have permission to perform the + /// s3:PutBucketTagging action. By default, the bucket owner has this + /// permission and can grant this permission to others.

    + ///

    The following operations are related to DeleteBucketTagging:

    + /// + async fn delete_bucket_tagging( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketTagging is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Deletes the tags from the bucket.

    -///

    To use this operation, you must have permission to perform the -/// s3:PutBucketTagging action. By default, the bucket owner has this -/// permission and can grant this permission to others.

    -///

    The following operations are related to DeleteBucketTagging:

    -/// -async fn delete_bucket_tagging(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketTagging is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    This action removes the website configuration for a bucket. Amazon S3 returns a 200 + /// OK response upon successfully deleting a website configuration on the specified + /// bucket. You will get a 200 OK response if the website configuration you are + /// trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if + /// the bucket specified in the request does not exist.

    + ///

    This DELETE action requires the S3:DeleteBucketWebsite permission. By + /// default, only the bucket owner can delete the website configuration attached to a bucket. + /// However, bucket owners can grant other users permission to delete the website configuration + /// by writing a bucket policy granting them the S3:DeleteBucketWebsite + /// permission.

    + ///

    For more information about hosting websites, see Hosting Websites on Amazon S3.

    + ///

    The following operations are related to DeleteBucketWebsite:

    + /// + async fn delete_bucket_website( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteBucketWebsite is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    This action removes the website configuration for a bucket. Amazon S3 returns a 200 -/// OK response upon successfully deleting a website configuration on the specified -/// bucket. You will get a 200 OK response if the website configuration you are -/// trying to delete does not exist on the bucket. Amazon S3 returns a 404 response if -/// the bucket specified in the request does not exist.

    -///

    This DELETE action requires the S3:DeleteBucketWebsite permission. By -/// default, only the bucket owner can delete the website configuration attached to a bucket. -/// However, bucket owners can grant other users permission to delete the website configuration -/// by writing a bucket policy granting them the S3:DeleteBucketWebsite -/// permission.

    -///

    For more information about hosting websites, see Hosting Websites on Amazon S3.

    -///

    The following operations are related to DeleteBucketWebsite:

    -/// -async fn delete_bucket_website(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteBucketWebsite is not implemented yet")) -} + ///

    Removes an object from a bucket. The behavior depends on the bucket's versioning state:

    + ///
      + ///
    • + ///

      If bucket versioning is not enabled, the operation permanently deletes the object.

      + ///
    • + ///
    • + ///

      If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object’s versionId in the request. For more information about versioning-enabled buckets, see Deleting object versions from a versioning-enabled bucket.

      + ///
    • + ///
    • + ///

      If bucket versioning is suspended, the operation removes the object that has a null versionId, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null versionId, and all versions of the object have a versionId, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a versionId, you must include the object’s versionId in the request. For more information about versioning-suspended buckets, see Deleting objects from versioning-suspended buckets.

      + ///
    • + ///
    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null + /// to the versionId query parameter in the request.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///

    To remove a specific version, you must use the versionId query parameter. Using this + /// query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 + /// sets the response header x-amz-delete-marker to true.

    + ///

    If the object you want to delete is in a bucket where the bucket versioning + /// configuration is MFA Delete enabled, you must include the x-amz-mfa request + /// header in the DELETE versionId request. Requests that include + /// x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3 + /// User Guide. To see sample + /// requests that use versioning, see Sample + /// Request.

    + /// + ///

    + /// Directory buckets - MFA delete is not supported by directory buckets.

    + ///
    + ///

    You can delete objects by explicitly calling DELETE Object or calling + /// (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block + /// users or accounts from removing or deleting objects from your bucket, you must deny them + /// the s3:DeleteObject, s3:DeleteObjectVersion, and + /// s3:PutLifeCycleConfiguration actions.

    + /// + ///

    + /// Directory buckets - S3 Lifecycle is not supported by directory buckets.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The following permissions are required in your policies when your + /// DeleteObjects request includes specific headers.

      + ///
        + ///
      • + ///

        + /// + /// s3:DeleteObject + /// - To delete an object from a bucket, you must always have the s3:DeleteObject permission.

        + ///
      • + ///
      • + ///

        + /// + /// s3:DeleteObjectVersion + /// - To delete a specific version of an object from a versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following action is related to DeleteObject:

    + ///
      + ///
    • + ///

      + /// PutObject + ///

      + ///
    • + ///
    + async fn delete_object(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteObject is not implemented yet")) + } -///

    Removes an object from a bucket. The behavior depends on the bucket's versioning state:

    -///
      -///
    • -///

      If bucket versioning is not enabled, the operation permanently deletes the object.

      -///
    • -///
    • -///

      If bucket versioning is enabled, the operation inserts a delete marker, which becomes the current version of the object. To permanently delete an object in a versioned bucket, you must include the object’s versionId in the request. For more information about versioning-enabled buckets, see Deleting object versions from a versioning-enabled bucket.

      -///
    • -///
    • -///

      If bucket versioning is suspended, the operation removes the object that has a null versionId, if there is one, and inserts a delete marker that becomes the current version of the object. If there isn't an object with a null versionId, and all versions of the object have a versionId, Amazon S3 does not remove the object and only inserts a delete marker. To permanently delete an object that has a versionId, you must include the object’s versionId in the request. For more information about versioning-suspended buckets, see Deleting objects from versioning-suspended buckets.

      -///
    • -///
    -/// -///
      -///
    • -///

      -/// Directory buckets - S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null -/// to the versionId query parameter in the request.

      -///
    • -///
    • -///

      -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///

    To remove a specific version, you must use the versionId query parameter. Using this -/// query parameter permanently deletes the version. If the object deleted is a delete marker, Amazon S3 -/// sets the response header x-amz-delete-marker to true.

    -///

    If the object you want to delete is in a bucket where the bucket versioning -/// configuration is MFA Delete enabled, you must include the x-amz-mfa request -/// header in the DELETE versionId request. Requests that include -/// x-amz-mfa must use HTTPS. For more information about MFA Delete, see Using MFA Delete in the Amazon S3 -/// User Guide. To see sample -/// requests that use versioning, see Sample -/// Request.

    -/// -///

    -/// Directory buckets - MFA delete is not supported by directory buckets.

    -///
    -///

    You can delete objects by explicitly calling DELETE Object or calling -/// (PutBucketLifecycle) to enable Amazon S3 to remove them for you. If you want to block -/// users or accounts from removing or deleting objects from your bucket, you must deny them -/// the s3:DeleteObject, s3:DeleteObjectVersion, and -/// s3:PutLifeCycleConfiguration actions.

    -/// -///

    -/// Directory buckets - S3 Lifecycle is not supported by directory buckets.

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The following permissions are required in your policies when your -/// DeleteObjects request includes specific headers.

      -///
        -///
      • -///

        -/// -/// s3:DeleteObject -/// - To delete an object from a bucket, you must always have the s3:DeleteObject permission.

        -///
      • -///
      • -///

        -/// -/// s3:DeleteObjectVersion -/// - To delete a specific version of an object from a versioning-enabled bucket, you must have the s3:DeleteObjectVersion permission.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following action is related to DeleteObject:

    -/// -async fn delete_object(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteObject is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Removes the entire tag set from the specified object. For more information about + /// managing object tags, see Object Tagging.

    + ///

    To use this operation, you must have permission to perform the + /// s3:DeleteObjectTagging action.

    + ///

    To delete tags of a specific object version, add the versionId query + /// parameter in the request. You will need permission for the + /// s3:DeleteObjectVersionTagging action.

    + ///

    The following operations are related to DeleteObjectTagging:

    + /// + async fn delete_object_tagging( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteObjectTagging is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Removes the entire tag set from the specified object. For more information about -/// managing object tags, see Object Tagging.

    -///

    To use this operation, you must have permission to perform the -/// s3:DeleteObjectTagging action.

    -///

    To delete tags of a specific object version, add the versionId query -/// parameter in the request. You will need permission for the -/// s3:DeleteObjectVersionTagging action.

    -///

    The following operations are related to DeleteObjectTagging:

    -/// -async fn delete_object_tagging(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteObjectTagging is not implemented yet")) -} + ///

    This operation enables you to delete multiple objects from a bucket using a single HTTP + /// request. If you know the object keys that you want to delete, then this operation provides + /// a suitable alternative to sending individual delete requests, reducing per-request + /// overhead.

    + ///

    The request can contain a list of up to 1,000 keys that you want to delete. In the XML, you + /// provide the object key names, and optionally, version IDs if you want to delete a specific + /// version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a + /// delete operation and returns the result of that delete, success or failure, in the response. + /// If the object specified in the request isn't found, Amazon S3 confirms the deletion by returning the result as deleted.

    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///

    The operation supports two modes for the response: verbose and quiet. By default, the + /// operation uses verbose mode in which the response includes the result of deletion of each + /// key in your request. In quiet mode the response includes only keys where the delete + /// operation encountered an error. For a successful deletion in a quiet mode, the operation + /// does not return any information about the delete in the response body.

    + ///

    When performing this action on an MFA Delete enabled bucket, that attempts to delete any + /// versioned objects, you must include an MFA token. If you do not provide one, the entire + /// request will fail, even if there are non-versioned objects you are trying to delete. If you + /// provide an invalid token, whether there are versioned keys in the request or not, the + /// entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA + /// Delete in the Amazon S3 User Guide.

    + /// + ///

    + /// Directory buckets - + /// MFA delete is not supported by directory buckets.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The + /// following permissions are required in your policies when your + /// DeleteObjects request includes specific headers.

      + ///
        + ///
      • + ///

        + /// + /// s3:DeleteObject + /// + /// - To delete an object from a bucket, you must always specify + /// the s3:DeleteObject permission.

        + ///
      • + ///
      • + ///

        + /// + /// s3:DeleteObjectVersion + /// - To delete a specific version of an object from a + /// versioning-enabled bucket, you must specify the + /// s3:DeleteObjectVersion permission.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///
    • + ///
    + ///
    + ///
    Content-MD5 request header
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket - The Content-MD5 + /// request header is required for all Multi-Object Delete requests. Amazon S3 uses + /// the header value to ensure that your request body has not been altered in + /// transit.

      + ///
    • + ///
    • + ///

      + /// Directory bucket - The + /// Content-MD5 request header or a additional checksum request header + /// (including x-amz-checksum-crc32, + /// x-amz-checksum-crc32c, x-amz-checksum-sha1, or + /// x-amz-checksum-sha256) is required for all Multi-Object + /// Delete requests.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to DeleteObjects:

    + /// + async fn delete_objects(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "DeleteObjects is not implemented yet")) + } -///

    This operation enables you to delete multiple objects from a bucket using a single HTTP -/// request. If you know the object keys that you want to delete, then this operation provides -/// a suitable alternative to sending individual delete requests, reducing per-request -/// overhead.

    -///

    The request can contain a list of up to 1,000 keys that you want to delete. In the XML, you -/// provide the object key names, and optionally, version IDs if you want to delete a specific -/// version of the object from a versioning-enabled bucket. For each key, Amazon S3 performs a -/// delete operation and returns the result of that delete, success or failure, in the response. -/// If the object specified in the request isn't found, Amazon S3 confirms the deletion by returning the result as deleted.

    -/// -///
      -///
    • -///

      -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///

    The operation supports two modes for the response: verbose and quiet. By default, the -/// operation uses verbose mode in which the response includes the result of deletion of each -/// key in your request. In quiet mode the response includes only keys where the delete -/// operation encountered an error. For a successful deletion in a quiet mode, the operation -/// does not return any information about the delete in the response body.

    -///

    When performing this action on an MFA Delete enabled bucket, that attempts to delete any -/// versioned objects, you must include an MFA token. If you do not provide one, the entire -/// request will fail, even if there are non-versioned objects you are trying to delete. If you -/// provide an invalid token, whether there are versioned keys in the request or not, the -/// entire Multi-Object Delete request will fail. For information about MFA Delete, see MFA -/// Delete in the Amazon S3 User Guide.

    -/// -///

    -/// Directory buckets - -/// MFA delete is not supported by directory buckets.

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The -/// following permissions are required in your policies when your -/// DeleteObjects request includes specific headers.

      -///
        -///
      • -///

        -/// -/// s3:DeleteObject -/// -/// - To delete an object from a bucket, you must always specify -/// the s3:DeleteObject permission.

        -///
      • -///
      • -///

        -/// -/// s3:DeleteObjectVersion -/// - To delete a specific version of an object from a -/// versioning-enabled bucket, you must specify the -/// s3:DeleteObjectVersion permission.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///
    • -///
    -///
    -///
    Content-MD5 request header
    -///
    -///
      -///
    • -///

      -/// General purpose bucket - The Content-MD5 -/// request header is required for all Multi-Object Delete requests. Amazon S3 uses -/// the header value to ensure that your request body has not been altered in -/// transit.

      -///
    • -///
    • -///

      -/// Directory bucket - The -/// Content-MD5 request header or a additional checksum request header -/// (including x-amz-checksum-crc32, -/// x-amz-checksum-crc32c, x-amz-checksum-sha1, or -/// x-amz-checksum-sha256) is required for all Multi-Object -/// Delete requests.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to DeleteObjects:

    -/// -async fn delete_objects(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeleteObjects is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this + /// operation, you must have the s3:PutBucketPublicAccessBlock permission. For + /// more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    The following operations are related to DeletePublicAccessBlock:

    + /// + async fn delete_public_access_block( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "DeletePublicAccessBlock is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use this -/// operation, you must have the s3:PutBucketPublicAccessBlock permission. For -/// more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    The following operations are related to DeletePublicAccessBlock:

    -/// -async fn delete_public_access_block(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "DeletePublicAccessBlock is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    This implementation of the GET action uses the accelerate subresource to + /// return the Transfer Acceleration state of a bucket, which is either Enabled or + /// Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that + /// enables you to perform faster data transfers to and from Amazon S3.

    + ///

    To use this operation, you must have permission to perform the + /// s3:GetAccelerateConfiguration action. The bucket owner has this permission + /// by default. The bucket owner can grant this permission to others. For more information + /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to your Amazon S3 Resources in the + /// Amazon S3 User Guide.

    + ///

    You set the Transfer Acceleration state of an existing bucket to Enabled or + /// Suspended by using the PutBucketAccelerateConfiguration operation.

    + ///

    A GET accelerate request does not return a state value for a bucket that + /// has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state + /// has never been set on the bucket.

    + ///

    For more information about transfer acceleration, see Transfer Acceleration in + /// the Amazon S3 User Guide.

    + ///

    The following operations are related to + /// GetBucketAccelerateConfiguration:

    + /// + async fn get_bucket_accelerate_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketAccelerateConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    This implementation of the GET action uses the accelerate subresource to -/// return the Transfer Acceleration state of a bucket, which is either Enabled or -/// Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that -/// enables you to perform faster data transfers to and from Amazon S3.

    -///

    To use this operation, you must have permission to perform the -/// s3:GetAccelerateConfiguration action. The bucket owner has this permission -/// by default. The bucket owner can grant this permission to others. For more information -/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to your Amazon S3 Resources in the -/// Amazon S3 User Guide.

    -///

    You set the Transfer Acceleration state of an existing bucket to Enabled or -/// Suspended by using the PutBucketAccelerateConfiguration operation.

    -///

    A GET accelerate request does not return a state value for a bucket that -/// has no transfer acceleration state. A bucket has no Transfer Acceleration state if a state -/// has never been set on the bucket.

    -///

    For more information about transfer acceleration, see Transfer Acceleration in -/// the Amazon S3 User Guide.

    -///

    The following operations are related to -/// GetBucketAccelerateConfiguration:

    -/// -async fn get_bucket_accelerate_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketAccelerateConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    This implementation of the GET action uses the acl subresource + /// to return the access control list (ACL) of a bucket. To use GET to return the + /// ACL of the bucket, you must have the READ_ACP access to the bucket. If + /// READ_ACP permission is granted to the anonymous user, you can return the + /// ACL of the bucket without using an authorization header.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + /// + ///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, + /// requests to read ACLs are still supported and return the + /// bucket-owner-full-control ACL with the owner being the account that + /// created the bucket. For more information, see Controlling object + /// ownership and disabling ACLs in the + /// Amazon S3 User Guide.

    + ///
    + ///

    The following operations are related to GetBucketAcl:

    + /// + async fn get_bucket_acl(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketAcl is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    This implementation of the GET action uses the acl subresource -/// to return the access control list (ACL) of a bucket. To use GET to return the -/// ACL of the bucket, you must have the READ_ACP access to the bucket. If -/// READ_ACP permission is granted to the anonymous user, you can return the -/// ACL of the bucket without using an authorization header.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    -/// -///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, -/// requests to read ACLs are still supported and return the -/// bucket-owner-full-control ACL with the owner being the account that -/// created the bucket. For more information, see Controlling object -/// ownership and disabling ACLs in the -/// Amazon S3 User Guide.

    -///
    -///

    The following operations are related to GetBucketAcl:

    -/// -async fn get_bucket_acl(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketAcl is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    This implementation of the GET action returns an analytics configuration (identified by + /// the analytics configuration ID) from the bucket.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:GetAnalyticsConfiguration action. The bucket owner has this permission + /// by default. The bucket owner can grant this permission to others. For more information + /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources in the + /// Amazon S3 User Guide.

    + ///

    For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class + /// Analysis in the Amazon S3 User Guide.

    + ///

    The following operations are related to + /// GetBucketAnalyticsConfiguration:

    + /// + async fn get_bucket_analytics_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketAnalyticsConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    This implementation of the GET action returns an analytics configuration (identified by -/// the analytics configuration ID) from the bucket.

    -///

    To use this operation, you must have permissions to perform the -/// s3:GetAnalyticsConfiguration action. The bucket owner has this permission -/// by default. The bucket owner can grant this permission to others. For more information -/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources in the -/// Amazon S3 User Guide.

    -///

    For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class -/// Analysis in the Amazon S3 User Guide.

    -///

    The following operations are related to -/// GetBucketAnalyticsConfiguration:

    -/// -async fn get_bucket_analytics_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketAnalyticsConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the + /// bucket.

    + ///

    To use this operation, you must have permission to perform the + /// s3:GetBucketCORS action. By default, the bucket owner has this permission + /// and can grant it to others.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + ///

    For more information about CORS, see Enabling Cross-Origin Resource + /// Sharing.

    + ///

    The following operations are related to GetBucketCors:

    + /// + async fn get_bucket_cors(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketCors is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the Cross-Origin Resource Sharing (CORS) configuration information set for the -/// bucket.

    -///

    To use this operation, you must have permission to perform the -/// s3:GetBucketCORS action. By default, the bucket owner has this permission -/// and can grant it to others.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    -///

    For more information about CORS, see Enabling Cross-Origin Resource -/// Sharing.

    -///

    The following operations are related to GetBucketCors:

    -/// -async fn get_bucket_cors(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketCors is not implemented yet")) -} + ///

    Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets + /// have a default encryption configuration that uses server-side encryption with Amazon S3 managed + /// keys (SSE-S3).

    + /// + /// + /// + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The + /// s3:GetEncryptionConfiguration permission is required in a + /// policy. The bucket owner has this permission by default. The bucket owner + /// can grant this permission to others. For more information about permissions, + /// see Permissions Related to Bucket Operations and Managing Access + /// Permissions to Your Amazon S3 Resources.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// To grant access to this API operation, you must have the + /// s3express:GetEncryptionConfiguration permission in + /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to GetBucketEncryption:

    + /// + async fn get_bucket_encryption( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketEncryption is not implemented yet")) + } -///

    Returns the default encryption configuration for an Amazon S3 bucket. By default, all buckets -/// have a default encryption configuration that uses server-side encryption with Amazon S3 managed -/// keys (SSE-S3).

    -/// -/// -/// -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The -/// s3:GetEncryptionConfiguration permission is required in a -/// policy. The bucket owner has this permission by default. The bucket owner -/// can grant this permission to others. For more information about permissions, -/// see Permissions Related to Bucket Operations and Managing Access -/// Permissions to Your Amazon S3 Resources.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// To grant access to this API operation, you must have the -/// s3express:GetEncryptionConfiguration permission in -/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to GetBucketEncryption:

    -/// -async fn get_bucket_encryption(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketEncryption is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Gets the S3 Intelligent-Tiering configuration from the specified bucket.

    + ///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    + ///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    + ///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    + ///

    Operations related to GetBucketIntelligentTieringConfiguration include:

    + /// + async fn get_bucket_intelligent_tiering_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!( + NotImplemented, + "GetBucketIntelligentTieringConfiguration is not implemented yet" + )) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Gets the S3 Intelligent-Tiering configuration from the specified bucket.

    -///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    -///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    -///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    -///

    Operations related to GetBucketIntelligentTieringConfiguration include:

    -/// -async fn get_bucket_intelligent_tiering_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketIntelligentTieringConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns an inventory configuration (identified by the inventory configuration ID) from + /// the bucket.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:GetInventoryConfiguration action. The bucket owner has this permission + /// by default and can grant this permission to others. For more information about permissions, + /// see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

    + ///

    The following operations are related to + /// GetBucketInventoryConfiguration:

    + /// + async fn get_bucket_inventory_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketInventoryConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns an inventory configuration (identified by the inventory configuration ID) from -/// the bucket.

    -///

    To use this operation, you must have permissions to perform the -/// s3:GetInventoryConfiguration action. The bucket owner has this permission -/// by default and can grant this permission to others. For more information about permissions, -/// see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory.

    -///

    The following operations are related to -/// GetBucketInventoryConfiguration:

    -/// -async fn get_bucket_inventory_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketInventoryConfiguration is not implemented yet")) -} + ///

    Returns the lifecycle configuration information set on the bucket. For information about + /// lifecycle configuration, see Object Lifecycle + /// Management.

    + ///

    Bucket lifecycle configuration now supports specifying a lifecycle rule using an object + /// key name prefix, one or more object tags, object size, or any combination of these. + /// Accordingly, this section describes the latest API, which is compatible with the new + /// functionality. The previous version of the API supported filtering based only on an object + /// key name prefix, which is supported for general purpose buckets for backward compatibility. + /// For the related API description, see GetBucketLifecycle.

    + /// + ///

    Lifecyle configurations for directory buckets only support expiring objects and + /// cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters + /// are not supported.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - By + /// default, all Amazon S3 resources are private, including buckets, objects, and + /// related subresources (for example, lifecycle configuration and website + /// configuration). Only the resource owner (that is, the Amazon Web Services account that + /// created it) can access the resource. The resource owner can optionally grant + /// access permissions to others by writing an access policy. For this + /// operation, a user must have the s3:GetLifecycleConfiguration + /// permission.

      + ///

      For more information about permissions, see Managing Access + /// Permissions to Your Amazon S3 Resources.

      + ///
    • + ///
    + ///
      + ///
    • + ///

      + /// Directory bucket permissions - + /// You must have the s3express:GetLifecycleConfiguration + /// permission in an IAM identity-based policy to use this operation. + /// Cross-account access to this API operation isn't supported. The resource + /// owner can optionally grant access permissions to others by creating a role + /// or user for them as long as they are within the same account as the owner + /// and resource.

      + ///

      For more information about directory bucket policies and permissions, see + /// Authorizing Regional endpoint APIs with IAM in the + /// Amazon S3 User Guide.

      + /// + ///

      + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host + /// header syntax is + /// s3express-control.region.amazonaws.com.

    + ///
    + ///
    + ///

    + /// GetBucketLifecycleConfiguration has the following special error:

    + ///
      + ///
    • + ///

      Error code: NoSuchLifecycleConfiguration + ///

      + ///
        + ///
      • + ///

        Description: The lifecycle configuration does not exist.

        + ///
      • + ///
      • + ///

        HTTP Status Code: 404 Not Found

        + ///
      • + ///
      • + ///

        SOAP Fault Code Prefix: Client

        + ///
      • + ///
      + ///
    • + ///
    + ///

    The following operations are related to + /// GetBucketLifecycleConfiguration:

    + /// + async fn get_bucket_lifecycle_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketLifecycleConfiguration is not implemented yet")) + } -///

    Returns the lifecycle configuration information set on the bucket. For information about -/// lifecycle configuration, see Object Lifecycle -/// Management.

    -///

    Bucket lifecycle configuration now supports specifying a lifecycle rule using an object -/// key name prefix, one or more object tags, object size, or any combination of these. -/// Accordingly, this section describes the latest API, which is compatible with the new -/// functionality. The previous version of the API supported filtering based only on an object -/// key name prefix, which is supported for general purpose buckets for backward compatibility. -/// For the related API description, see GetBucketLifecycle.

    -/// -///

    Lifecyle configurations for directory buckets only support expiring objects and -/// cancelling multipart uploads. Expiring of versioned objects, transitions and tag filters -/// are not supported.

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - By -/// default, all Amazon S3 resources are private, including buckets, objects, and -/// related subresources (for example, lifecycle configuration and website -/// configuration). Only the resource owner (that is, the Amazon Web Services account that -/// created it) can access the resource. The resource owner can optionally grant -/// access permissions to others by writing an access policy. For this -/// operation, a user must have the s3:GetLifecycleConfiguration -/// permission.

      -///

      For more information about permissions, see Managing Access -/// Permissions to Your Amazon S3 Resources.

      -///
    • -///
    -///
      -///
    • -///

      -/// Directory bucket permissions - -/// You must have the s3express:GetLifecycleConfiguration -/// permission in an IAM identity-based policy to use this operation. -/// Cross-account access to this API operation isn't supported. The resource -/// owner can optionally grant access permissions to others by creating a role -/// or user for them as long as they are within the same account as the owner -/// and resource.

      -///

      For more information about directory bucket policies and permissions, see -/// Authorizing Regional endpoint APIs with IAM in the -/// Amazon S3 User Guide.

      -/// -///

      -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host -/// header syntax is -/// s3express-control.region.amazonaws.com.

    -///
    -///
    -///

    -/// GetBucketLifecycleConfiguration has the following special error:

    -///
      -///
    • -///

      Error code: NoSuchLifecycleConfiguration -///

      -///
        -///
      • -///

        Description: The lifecycle configuration does not exist.

        -///
      • -///
      • -///

        HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    -///

    The following operations are related to -/// GetBucketLifecycleConfiguration:

    -/// -async fn get_bucket_lifecycle_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketLifecycleConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the Region the bucket resides in. You set the bucket's Region using the + /// LocationConstraint request parameter in a CreateBucket + /// request. For more information, see CreateBucket.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + /// + ///

    We recommend that you use HeadBucket to return the Region + /// that a bucket resides in. For backward compatibility, Amazon S3 continues to support + /// GetBucketLocation.

    + ///
    + ///

    The following operations are related to GetBucketLocation:

    + /// + async fn get_bucket_location( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketLocation is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the Region the bucket resides in. You set the bucket's Region using the -/// LocationConstraint request parameter in a CreateBucket -/// request. For more information, see CreateBucket.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    -/// -///

    We recommend that you use HeadBucket to return the Region -/// that a bucket resides in. For backward compatibility, Amazon S3 continues to support -/// GetBucketLocation.

    -///
    -///

    The following operations are related to GetBucketLocation:

    -/// -async fn get_bucket_location(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketLocation is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the logging status of a bucket and the permissions users have to view and modify + /// that status.

    + ///

    The following operations are related to GetBucketLogging:

    + /// + async fn get_bucket_logging(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketLogging is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the logging status of a bucket and the permissions users have to view and modify -/// that status.

    -///

    The following operations are related to GetBucketLogging:

    -/// -async fn get_bucket_logging(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketLogging is not implemented yet")) -} + ///

    + /// Retrieves the metadata table configuration for a general purpose bucket. For more + /// information, see Accelerating data + /// discovery with S3 Metadata in the Amazon S3 User Guide.

    + ///
    + ///
    Permissions
    + ///
    + ///

    To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more + /// information, see Setting up + /// permissions for configuring metadata tables in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///

    The following operations are related to GetBucketMetadataTableConfiguration:

    + /// + async fn get_bucket_metadata_table_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketMetadataTableConfiguration is not implemented yet")) + } -///

    -/// Retrieves the metadata table configuration for a general purpose bucket. For more -/// information, see Accelerating data -/// discovery with S3 Metadata in the Amazon S3 User Guide.

    -///
    -///
    Permissions
    -///
    -///

    To use this operation, you must have the s3:GetBucketMetadataTableConfiguration permission. For more -/// information, see Setting up -/// permissions for configuring metadata tables in the -/// Amazon S3 User Guide.

    -///
    -///
    -///

    The following operations are related to GetBucketMetadataTableConfiguration:

    -/// -async fn get_bucket_metadata_table_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketMetadataTableConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Gets a metrics configuration (specified by the metrics configuration ID) from the + /// bucket. Note that this doesn't include the daily storage metrics.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:GetMetricsConfiguration action. The bucket owner has this permission by + /// default. The bucket owner can grant this permission to others. For more information about + /// permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring + /// Metrics with Amazon CloudWatch.

    + ///

    The following operations are related to + /// GetBucketMetricsConfiguration:

    + /// + async fn get_bucket_metrics_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketMetricsConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Gets a metrics configuration (specified by the metrics configuration ID) from the -/// bucket. Note that this doesn't include the daily storage metrics.

    -///

    To use this operation, you must have permissions to perform the -/// s3:GetMetricsConfiguration action. The bucket owner has this permission by -/// default. The bucket owner can grant this permission to others. For more information about -/// permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring -/// Metrics with Amazon CloudWatch.

    -///

    The following operations are related to -/// GetBucketMetricsConfiguration:

    -/// -async fn get_bucket_metrics_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketMetricsConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the notification configuration of a bucket.

    + ///

    If notifications are not enabled on the bucket, the action returns an empty + /// NotificationConfiguration element.

    + ///

    By default, you must be the bucket owner to read the notification configuration of a + /// bucket. However, the bucket owner can use a bucket policy to grant permission to other + /// users to read this configuration with the s3:GetBucketNotification + /// permission.

    + ///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    + ///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. + /// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. + /// For more information about InvalidAccessPointAliasError, see List of + /// Error Codes.

    + ///

    For more information about setting and reading the notification configuration on a + /// bucket, see Setting Up Notification of Bucket Events. For more information about bucket + /// policies, see Using Bucket Policies.

    + ///

    The following action is related to GetBucketNotification:

    + /// + async fn get_bucket_notification_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketNotificationConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the notification configuration of a bucket.

    -///

    If notifications are not enabled on the bucket, the action returns an empty -/// NotificationConfiguration element.

    -///

    By default, you must be the bucket owner to read the notification configuration of a -/// bucket. However, the bucket owner can use a bucket policy to grant permission to other -/// users to read this configuration with the s3:GetBucketNotification -/// permission.

    -///

    When you use this API operation with an access point, provide the alias of the access point in place of the bucket name.

    -///

    When you use this API operation with an Object Lambda access point, provide the alias of the Object Lambda access point in place of the bucket name. -/// If the Object Lambda access point alias in a request is not valid, the error code InvalidAccessPointAliasError is returned. -/// For more information about InvalidAccessPointAliasError, see List of -/// Error Codes.

    -///

    For more information about setting and reading the notification configuration on a -/// bucket, see Setting Up Notification of Bucket Events. For more information about bucket -/// policies, see Using Bucket Policies.

    -///

    The following action is related to GetBucketNotification:

    -/// -async fn get_bucket_notification_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketNotificationConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you + /// must have the s3:GetBucketOwnershipControls permission. For more information + /// about Amazon S3 permissions, see Specifying permissions in a + /// policy.

    + ///

    For information about Amazon S3 Object Ownership, see Using Object + /// Ownership.

    + ///

    The following operations are related to GetBucketOwnershipControls:

    + /// + async fn get_bucket_ownership_controls( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketOwnershipControls is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation, you -/// must have the s3:GetBucketOwnershipControls permission. For more information -/// about Amazon S3 permissions, see Specifying permissions in a -/// policy.

    -///

    For information about Amazon S3 Object Ownership, see Using Object -/// Ownership.

    -///

    The following operations are related to GetBucketOwnershipControls:

    -/// -async fn get_bucket_ownership_controls(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketOwnershipControls is not implemented yet")) -} + ///

    Returns the policy of a specified bucket.

    + /// + ///

    + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///

    If you are using an identity other than the root user of the Amazon Web Services account that + /// owns the bucket, the calling identity must both have the + /// GetBucketPolicy permissions on the specified bucket and belong to + /// the bucket owner's account in order to use this operation.

    + ///

    If you don't have GetBucketPolicy permissions, Amazon S3 returns a + /// 403 Access Denied error. If you have the correct permissions, but + /// you're not using an identity that belongs to the bucket owner's account, Amazon S3 + /// returns a 405 Method Not Allowed error.

    + /// + ///

    To ensure that bucket owners don't inadvertently lock themselves out of + /// their own buckets, the root principal in a bucket owner's Amazon Web Services account can + /// perform the GetBucketPolicy, PutBucketPolicy, and + /// DeleteBucketPolicy API actions, even if their bucket policy + /// explicitly denies the root principal's access. Bucket owner root principals can + /// only be blocked from performing these API actions by VPC endpoint policies and + /// Amazon Web Services Organizations policies.

    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The + /// s3:GetBucketPolicy permission is required in a policy. For + /// more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// To grant access to this API operation, you must have the + /// s3express:GetBucketPolicy permission in + /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    Example bucket policies
    + ///
    + ///

    + /// General purpose buckets example bucket policies + /// - See Bucket policy + /// examples in the Amazon S3 User Guide.

    + ///

    + /// Directory bucket example bucket policies + /// - See Example bucket policies for S3 Express One Zone in the + /// Amazon S3 User Guide.

    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following action is related to GetBucketPolicy:

    + ///
      + ///
    • + ///

      + /// GetObject + ///

      + ///
    • + ///
    + async fn get_bucket_policy(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketPolicy is not implemented yet")) + } -///

    Returns the policy of a specified bucket.

    -/// -///

    -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///

    If you are using an identity other than the root user of the Amazon Web Services account that -/// owns the bucket, the calling identity must both have the -/// GetBucketPolicy permissions on the specified bucket and belong to -/// the bucket owner's account in order to use this operation.

    -///

    If you don't have GetBucketPolicy permissions, Amazon S3 returns a -/// 403 Access Denied error. If you have the correct permissions, but -/// you're not using an identity that belongs to the bucket owner's account, Amazon S3 -/// returns a 405 Method Not Allowed error.

    -/// -///

    To ensure that bucket owners don't inadvertently lock themselves out of -/// their own buckets, the root principal in a bucket owner's Amazon Web Services account can -/// perform the GetBucketPolicy, PutBucketPolicy, and -/// DeleteBucketPolicy API actions, even if their bucket policy -/// explicitly denies the root principal's access. Bucket owner root principals can -/// only be blocked from performing these API actions by VPC endpoint policies and -/// Amazon Web Services Organizations policies.

    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The -/// s3:GetBucketPolicy permission is required in a policy. For -/// more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// To grant access to this API operation, you must have the -/// s3express:GetBucketPolicy permission in -/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    Example bucket policies
    -///
    -///

    -/// General purpose buckets example bucket policies -/// - See Bucket policy -/// examples in the Amazon S3 User Guide.

    -///

    -/// Directory bucket example bucket policies -/// - See Example bucket policies for S3 Express One Zone in the -/// Amazon S3 User Guide.

    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    -///
    -///
    -///

    The following action is related to GetBucketPolicy:

    -/// -async fn get_bucket_policy(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketPolicy is not implemented yet")) -} - -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public. -/// In order to use this operation, you must have the s3:GetBucketPolicyStatus -/// permission. For more information about Amazon S3 permissions, see Specifying Permissions in a -/// Policy.

    -///

    For more information about when Amazon S3 considers a bucket public, see The Meaning of "Public".

    -///

    The following operations are related to GetBucketPolicyStatus:

    -/// -async fn get_bucket_policy_status(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketPolicyStatus is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Retrieves the policy status for an Amazon S3 bucket, indicating whether the bucket is public. + /// In order to use this operation, you must have the s3:GetBucketPolicyStatus + /// permission. For more information about Amazon S3 permissions, see Specifying Permissions in a + /// Policy.

    + ///

    For more information about when Amazon S3 considers a bucket public, see The Meaning of "Public".

    + ///

    The following operations are related to GetBucketPolicyStatus:

    + /// + async fn get_bucket_policy_status( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketPolicyStatus is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the replication configuration of a bucket.

    -/// -///

    It can take a while to propagate the put or delete a replication configuration to -/// all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong -/// result.

    -///
    -///

    For information about replication configuration, see Replication in the -/// Amazon S3 User Guide.

    -///

    This action requires permissions for the s3:GetReplicationConfiguration -/// action. For more information about permissions, see Using Bucket Policies and User -/// Policies.

    -///

    If you include the Filter element in a replication configuration, you must -/// also include the DeleteMarkerReplication and Priority elements. -/// The response also returns those elements.

    -///

    For information about GetBucketReplication errors, see List of -/// replication-related error codes -///

    -///

    The following operations are related to GetBucketReplication:

    -/// -async fn get_bucket_replication(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketReplication is not implemented yet")) -} - -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the request payment configuration of a bucket. To use this version of the -/// operation, you must be the bucket owner. For more information, see Requester Pays -/// Buckets.

    -///

    The following operations are related to GetBucketRequestPayment:

    -/// -async fn get_bucket_request_payment(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketRequestPayment is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the replication configuration of a bucket.

    + /// + ///

    It can take a while to propagate the put or delete a replication configuration to + /// all Amazon S3 systems. Therefore, a get request soon after put or delete can return a wrong + /// result.

    + ///
    + ///

    For information about replication configuration, see Replication in the + /// Amazon S3 User Guide.

    + ///

    This action requires permissions for the s3:GetReplicationConfiguration + /// action. For more information about permissions, see Using Bucket Policies and User + /// Policies.

    + ///

    If you include the Filter element in a replication configuration, you must + /// also include the DeleteMarkerReplication and Priority elements. + /// The response also returns those elements.

    + ///

    For information about GetBucketReplication errors, see List of + /// replication-related error codes + ///

    + ///

    The following operations are related to GetBucketReplication:

    + /// + async fn get_bucket_replication( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketReplication is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the tag set associated with the bucket.

    -///

    To use this operation, you must have permission to perform the -/// s3:GetBucketTagging action. By default, the bucket owner has this -/// permission and can grant this permission to others.

    -///

    -/// GetBucketTagging has the following special error:

    -///
      -///
    • -///

      Error code: NoSuchTagSet -///

      -///
        -///
      • -///

        Description: There is no tag set associated with the bucket.

        -///
      • -///
      -///
    • -///
    -///

    The following operations are related to GetBucketTagging:

    -/// -async fn get_bucket_tagging(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketTagging is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the request payment configuration of a bucket. To use this version of the + /// operation, you must be the bucket owner. For more information, see Requester Pays + /// Buckets.

    + ///

    The following operations are related to GetBucketRequestPayment:

    + /// + async fn get_bucket_request_payment( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketRequestPayment is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the versioning state of a bucket.

    -///

    To retrieve the versioning state of a bucket, you must be the bucket owner.

    -///

    This implementation also returns the MFA Delete status of the versioning state. If the -/// MFA Delete status is enabled, the bucket owner must use an authentication -/// device to change the versioning state of the bucket.

    -///

    The following operations are related to GetBucketVersioning:

    -/// -async fn get_bucket_versioning(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketVersioning is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the tag set associated with the bucket.

    + ///

    To use this operation, you must have permission to perform the + /// s3:GetBucketTagging action. By default, the bucket owner has this + /// permission and can grant this permission to others.

    + ///

    + /// GetBucketTagging has the following special error:

    + ///
      + ///
    • + ///

      Error code: NoSuchTagSet + ///

      + ///
        + ///
      • + ///

        Description: There is no tag set associated with the bucket.

        + ///
      • + ///
      + ///
    • + ///
    + ///

    The following operations are related to GetBucketTagging:

    + /// + async fn get_bucket_tagging(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketTagging is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the website configuration for a bucket. To host website on Amazon S3, you can -/// configure a bucket as website by adding a website configuration. For more information about -/// hosting websites, see Hosting Websites on Amazon S3.

    -///

    This GET action requires the S3:GetBucketWebsite permission. By default, -/// only the bucket owner can read the bucket website configuration. However, bucket owners can -/// allow other users to read the website configuration by writing a bucket policy granting -/// them the S3:GetBucketWebsite permission.

    -///

    The following operations are related to GetBucketWebsite:

    -/// -async fn get_bucket_website(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetBucketWebsite is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the versioning state of a bucket.

    + ///

    To retrieve the versioning state of a bucket, you must be the bucket owner.

    + ///

    This implementation also returns the MFA Delete status of the versioning state. If the + /// MFA Delete status is enabled, the bucket owner must use an authentication + /// device to change the versioning state of the bucket.

    + ///

    The following operations are related to GetBucketVersioning:

    + /// + async fn get_bucket_versioning( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketVersioning is not implemented yet")) + } -///

    Retrieves an object from Amazon S3.

    -///

    In the GetObject request, specify the full key name for the object.

    -///

    -/// General purpose buckets - Both the virtual-hosted-style -/// requests and the path-style requests are supported. For a virtual hosted-style request -/// example, if you have the object photos/2006/February/sample.jpg, specify the -/// object key name as /photos/2006/February/sample.jpg. For a path-style request -/// example, if you have the object photos/2006/February/sample.jpg in the bucket -/// named examplebucket, specify the object key name as -/// /examplebucket/photos/2006/February/sample.jpg. For more information about -/// request types, see HTTP Host -/// Header Bucket Specification in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - -/// Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named amzn-s3-demo-bucket--usw2-az1--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - You -/// must have the required permissions in a policy. To use -/// GetObject, you must have the READ access to the -/// object (or version). If you grant READ access to the anonymous -/// user, the GetObject operation returns the object without using -/// an authorization header. For more information, see Specifying permissions in a policy in the -/// Amazon S3 User Guide.

      -///

      If you include a versionId in your request header, you must -/// have the s3:GetObjectVersion permission to access a specific -/// version of an object. The s3:GetObject permission is not -/// required in this scenario.

      -///

      If you request the current version of an object without a specific -/// versionId in the request header, only the -/// s3:GetObject permission is required. The -/// s3:GetObjectVersion permission is not required in this -/// scenario.

      -///

      If the object that you request doesn’t exist, the error that Amazon S3 returns -/// depends on whether you also have the s3:ListBucket -/// permission.

      -///
        -///
      • -///

        If you have the s3:ListBucket permission on the -/// bucket, Amazon S3 returns an HTTP status code 404 Not Found -/// error.

        -///
      • -///
      • -///

        If you don’t have the s3:ListBucket permission, Amazon S3 -/// returns an HTTP status code 403 Access Denied -/// error.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///

      If -/// the -/// object is encrypted using SSE-KMS, you must also have the -/// kms:GenerateDataKey and kms:Decrypt permissions -/// in IAM identity-based policies and KMS key policies for the KMS -/// key.

      -///
    • -///
    -///
    -///
    Storage classes
    -///
    -///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval -/// storage class, the S3 Glacier Deep Archive storage class, the -/// S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, -/// before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an -/// InvalidObjectState error. For information about restoring archived -/// objects, see Restoring Archived -/// Objects in the Amazon S3 User Guide.

    -///

    -/// Directory buckets - -/// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. -/// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    -///
    -///
    Encryption
    -///
    -///

    Encryption request headers, like x-amz-server-side-encryption, -/// should not be sent for the GetObject requests, if your object uses -/// server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side -/// encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side -/// encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your -/// GetObject requests for the object that uses these types of keys, -/// you’ll get an HTTP 400 Bad Request error.

    -///

    -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    -///
    -///
    Overriding response header values through the request
    -///
    -///

    There are times when you want to override certain response header values of a -/// GetObject response. For example, you might override the -/// Content-Disposition response header value through your -/// GetObject request.

    -///

    You can override values for a set of response headers. These modified response -/// header values are included only in a successful response, that is, when the HTTP -/// status code 200 OK is returned. The headers you can override using -/// the following query parameters in the request are a subset of the headers that -/// Amazon S3 accepts when you create an object.

    -///

    The response headers that you can override for the GetObject -/// response are Cache-Control, Content-Disposition, -/// Content-Encoding, Content-Language, -/// Content-Type, and Expires.

    -///

    To override values for a set of response headers in the GetObject -/// response, you can use the following query parameters in the request.

    -///
      -///
    • -///

      -/// response-cache-control -///

      -///
    • -///
    • -///

      -/// response-content-disposition -///

      -///
    • -///
    • -///

      -/// response-content-encoding -///

      -///
    • -///
    • -///

      -/// response-content-language -///

      -///
    • -///
    • -///

      -/// response-content-type -///

      -///
    • -///
    • -///

      -/// response-expires -///

      -///
    • -///
    -/// -///

    When you use these parameters, you must sign the request by using either an -/// Authorization header or a presigned URL. These parameters cannot be used with -/// an unsigned (anonymous) request.

    -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to GetObject:

    -/// -async fn get_object(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetObject is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the website configuration for a bucket. To host website on Amazon S3, you can + /// configure a bucket as website by adding a website configuration. For more information about + /// hosting websites, see Hosting Websites on Amazon S3.

    + ///

    This GET action requires the S3:GetBucketWebsite permission. By default, + /// only the bucket owner can read the bucket website configuration. However, bucket owners can + /// allow other users to read the website configuration by writing a bucket policy granting + /// them the S3:GetBucketWebsite permission.

    + ///

    The following operations are related to GetBucketWebsite:

    + /// + async fn get_bucket_website(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetBucketWebsite is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the access control list (ACL) of an object. To use this operation, you must have -/// s3:GetObjectAcl permissions or READ_ACP access to the object. -/// For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3 -/// User Guide -///

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -///

    By default, GET returns ACL information about the current version of an object. To -/// return ACL information about a different version, use the versionId subresource.

    -/// -///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, -/// requests to read ACLs are still supported and return the -/// bucket-owner-full-control ACL with the owner being the account that -/// created the bucket. For more information, see Controlling object -/// ownership and disabling ACLs in the -/// Amazon S3 User Guide.

    -///
    -///

    The following operations are related to GetObjectAcl:

    -/// -async fn get_object_acl(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetObjectAcl is not implemented yet")) -} + ///

    Retrieves an object from Amazon S3.

    + ///

    In the GetObject request, specify the full key name for the object.

    + ///

    + /// General purpose buckets - Both the virtual-hosted-style + /// requests and the path-style requests are supported. For a virtual hosted-style request + /// example, if you have the object photos/2006/February/sample.jpg, specify the + /// object key name as /photos/2006/February/sample.jpg. For a path-style request + /// example, if you have the object photos/2006/February/sample.jpg in the bucket + /// named examplebucket, specify the object key name as + /// /examplebucket/photos/2006/February/sample.jpg. For more information about + /// request types, see HTTP Host + /// Header Bucket Specification in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - + /// Only virtual-hosted-style requests are supported. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named amzn-s3-demo-bucket--usw2-az1--x-s3, specify the object key name as /photos/2006/February/sample.jpg. Also, when you make requests to this API operation, your requests are sent to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - You + /// must have the required permissions in a policy. To use + /// GetObject, you must have the READ access to the + /// object (or version). If you grant READ access to the anonymous + /// user, the GetObject operation returns the object without using + /// an authorization header. For more information, see Specifying permissions in a policy in the + /// Amazon S3 User Guide.

      + ///

      If you include a versionId in your request header, you must + /// have the s3:GetObjectVersion permission to access a specific + /// version of an object. The s3:GetObject permission is not + /// required in this scenario.

      + ///

      If you request the current version of an object without a specific + /// versionId in the request header, only the + /// s3:GetObject permission is required. The + /// s3:GetObjectVersion permission is not required in this + /// scenario.

      + ///

      If the object that you request doesn’t exist, the error that Amazon S3 returns + /// depends on whether you also have the s3:ListBucket + /// permission.

      + ///
        + ///
      • + ///

        If you have the s3:ListBucket permission on the + /// bucket, Amazon S3 returns an HTTP status code 404 Not Found + /// error.

        + ///
      • + ///
      • + ///

        If you don’t have the s3:ListBucket permission, Amazon S3 + /// returns an HTTP status code 403 Access Denied + /// error.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///

      If + /// the + /// object is encrypted using SSE-KMS, you must also have the + /// kms:GenerateDataKey and kms:Decrypt permissions + /// in IAM identity-based policies and KMS key policies for the KMS + /// key.

      + ///
    • + ///
    + ///
    + ///
    Storage classes
    + ///
    + ///

    If the object you are retrieving is stored in the S3 Glacier Flexible Retrieval + /// storage class, the S3 Glacier Deep Archive storage class, the + /// S3 Intelligent-Tiering Archive Access tier, or the S3 Intelligent-Tiering Deep Archive Access tier, + /// before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this operation returns an + /// InvalidObjectState error. For information about restoring archived + /// objects, see Restoring Archived + /// Objects in the Amazon S3 User Guide.

    + ///

    + /// Directory buckets - + /// For directory buckets, only the S3 Express One Zone storage class is supported to store newly created objects. + /// Unsupported storage class values won't write a destination object and will respond with the HTTP status code 400 Bad Request.

    + ///
    + ///
    Encryption
    + ///
    + ///

    Encryption request headers, like x-amz-server-side-encryption, + /// should not be sent for the GetObject requests, if your object uses + /// server-side encryption with Amazon S3 managed encryption keys (SSE-S3), server-side + /// encryption with Key Management Service (KMS) keys (SSE-KMS), or dual-layer server-side + /// encryption with Amazon Web Services KMS keys (DSSE-KMS). If you include the header in your + /// GetObject requests for the object that uses these types of keys, + /// you’ll get an HTTP 400 Bad Request error.

    + ///

    + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    + ///
    + ///
    Overriding response header values through the request
    + ///
    + ///

    There are times when you want to override certain response header values of a + /// GetObject response. For example, you might override the + /// Content-Disposition response header value through your + /// GetObject request.

    + ///

    You can override values for a set of response headers. These modified response + /// header values are included only in a successful response, that is, when the HTTP + /// status code 200 OK is returned. The headers you can override using + /// the following query parameters in the request are a subset of the headers that + /// Amazon S3 accepts when you create an object.

    + ///

    The response headers that you can override for the GetObject + /// response are Cache-Control, Content-Disposition, + /// Content-Encoding, Content-Language, + /// Content-Type, and Expires.

    + ///

    To override values for a set of response headers in the GetObject + /// response, you can use the following query parameters in the request.

    + ///
      + ///
    • + ///

      + /// response-cache-control + ///

      + ///
    • + ///
    • + ///

      + /// response-content-disposition + ///

      + ///
    • + ///
    • + ///

      + /// response-content-encoding + ///

      + ///
    • + ///
    • + ///

      + /// response-content-language + ///

      + ///
    • + ///
    • + ///

      + /// response-content-type + ///

      + ///
    • + ///
    • + ///

      + /// response-expires + ///

      + ///
    • + ///
    + /// + ///

    When you use these parameters, you must sign the request by using either an + /// Authorization header or a presigned URL. These parameters cannot be used with + /// an unsigned (anonymous) request.

    + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to GetObject:

    + /// + async fn get_object(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetObject is not implemented yet")) + } -///

    Retrieves all the metadata from an object without returning the object itself. This -/// operation is useful if you're interested only in an object's metadata.

    -///

    -/// GetObjectAttributes combines the functionality of HeadObject -/// and ListParts. All of the data returned with each of those individual calls -/// can be returned with a single call to GetObjectAttributes.

    -/// -///

    -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - To -/// use GetObjectAttributes, you must have READ access to the -/// object. The permissions that you need to use this operation depend on -/// whether the bucket is versioned. If the bucket is versioned, you need both -/// the s3:GetObjectVersion and -/// s3:GetObjectVersionAttributes permissions for this -/// operation. If the bucket is not versioned, you need the -/// s3:GetObject and s3:GetObjectAttributes -/// permissions. For more information, see Specifying -/// Permissions in a Policy in the -/// Amazon S3 User Guide. If the object that you request does -/// not exist, the error Amazon S3 returns depends on whether you also have the -/// s3:ListBucket permission.

      -///
        -///
      • -///

        If you have the s3:ListBucket permission on the -/// bucket, Amazon S3 returns an HTTP status code 404 Not Found -/// ("no such key") error.

        -///
      • -///
      • -///

        If you don't have the s3:ListBucket permission, Amazon S3 -/// returns an HTTP status code 403 Forbidden ("access -/// denied") error.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///

      If -/// the -/// object is encrypted with SSE-KMS, you must also have the -/// kms:GenerateDataKey and kms:Decrypt permissions -/// in IAM identity-based policies and KMS key policies for the KMS -/// key.

      -///
    • -///
    -///
    -///
    Encryption
    -///
    -/// -///

    Encryption request headers, like x-amz-server-side-encryption, -/// should not be sent for HEAD requests if your object uses -/// server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer -/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side -/// encryption with Amazon S3 managed encryption keys (SSE-S3). The -/// x-amz-server-side-encryption header is used when you -/// PUT an object to S3 and want to specify the encryption method. -/// If you include this header in a GET request for an object that -/// uses these types of keys, you’ll get an HTTP 400 Bad Request -/// error. It's because the encryption method can't be changed when you retrieve -/// the object.

    -///
    -///

    If you encrypt an object by using server-side encryption with customer-provided -/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve -/// the metadata from the object, you must use the following headers to provide the -/// encryption key for the server to be able to retrieve the object's metadata. The -/// headers are:

    -///
      -///
    • -///

      -/// x-amz-server-side-encryption-customer-algorithm -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key-MD5 -///

      -///
    • -///
    -///

    For more information about SSE-C, see Server-Side -/// Encryption (Using Customer-Provided Encryption Keys) in the -/// Amazon S3 User Guide.

    -/// -///

    -/// Directory bucket permissions - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your -/// CreateSession requests or PUT object requests. Then, new objects -/// are automatically encrypted with the desired encryption settings. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    -///
    -///
    -///
    Versioning
    -///
    -///

    -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the -/// versionId query parameter in the request.

    -///
    -///
    Conditional request headers
    -///
    -///

    Consider the following when using request headers:

    -///
      -///
    • -///

      If both of the If-Match and If-Unmodified-Since -/// headers are present in the request as follows, then Amazon S3 returns the HTTP -/// status code 200 OK and the data requested:

      -///
        -///
      • -///

        -/// If-Match condition evaluates to -/// true.

        -///
      • -///
      • -///

        -/// If-Unmodified-Since condition evaluates to -/// false.

        -///
      • -///
      -///

      For more information about conditional requests, see RFC 7232.

      -///
    • -///
    • -///

      If both of the If-None-Match and -/// If-Modified-Since headers are present in the request as -/// follows, then Amazon S3 returns the HTTP status code 304 Not -/// Modified:

      -///
        -///
      • -///

        -/// If-None-Match condition evaluates to -/// false.

        -///
      • -///
      • -///

        -/// If-Modified-Since condition evaluates to -/// true.

        -///
      • -///
      -///

      For more information about conditional requests, see RFC 7232.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following actions are related to GetObjectAttributes:

    -/// -async fn get_object_attributes(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetObjectAttributes is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the access control list (ACL) of an object. To use this operation, you must have + /// s3:GetObjectAcl permissions or READ_ACP access to the object. + /// For more information, see Mapping of ACL permissions and access policy permissions in the Amazon S3 + /// User Guide + ///

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + ///

    By default, GET returns ACL information about the current version of an object. To + /// return ACL information about a different version, use the versionId subresource.

    + /// + ///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, + /// requests to read ACLs are still supported and return the + /// bucket-owner-full-control ACL with the owner being the account that + /// created the bucket. For more information, see Controlling object + /// ownership and disabling ACLs in the + /// Amazon S3 User Guide.

    + ///
    + ///

    The following operations are related to GetObjectAcl:

    + /// + async fn get_object_acl(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetObjectAcl is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Gets an object's current legal hold status. For more information, see Locking -/// Objects.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -///

    The following action is related to GetObjectLegalHold:

    -/// -async fn get_object_legal_hold(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetObjectLegalHold is not implemented yet")) -} + ///

    Retrieves all the metadata from an object without returning the object itself. This + /// operation is useful if you're interested only in an object's metadata.

    + ///

    + /// GetObjectAttributes combines the functionality of HeadObject + /// and ListParts. All of the data returned with each of those individual calls + /// can be returned with a single call to GetObjectAttributes.

    + /// + ///

    + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - To + /// use GetObjectAttributes, you must have READ access to the + /// object. The permissions that you need to use this operation depend on + /// whether the bucket is versioned. If the bucket is versioned, you need both + /// the s3:GetObjectVersion and + /// s3:GetObjectVersionAttributes permissions for this + /// operation. If the bucket is not versioned, you need the + /// s3:GetObject and s3:GetObjectAttributes + /// permissions. For more information, see Specifying + /// Permissions in a Policy in the + /// Amazon S3 User Guide. If the object that you request does + /// not exist, the error Amazon S3 returns depends on whether you also have the + /// s3:ListBucket permission.

      + ///
        + ///
      • + ///

        If you have the s3:ListBucket permission on the + /// bucket, Amazon S3 returns an HTTP status code 404 Not Found + /// ("no such key") error.

        + ///
      • + ///
      • + ///

        If you don't have the s3:ListBucket permission, Amazon S3 + /// returns an HTTP status code 403 Forbidden ("access + /// denied") error.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///

      If + /// the + /// object is encrypted with SSE-KMS, you must also have the + /// kms:GenerateDataKey and kms:Decrypt permissions + /// in IAM identity-based policies and KMS key policies for the KMS + /// key.

      + ///
    • + ///
    + ///
    + ///
    Encryption
    + ///
    + /// + ///

    Encryption request headers, like x-amz-server-side-encryption, + /// should not be sent for HEAD requests if your object uses + /// server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer + /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side + /// encryption with Amazon S3 managed encryption keys (SSE-S3). The + /// x-amz-server-side-encryption header is used when you + /// PUT an object to S3 and want to specify the encryption method. + /// If you include this header in a GET request for an object that + /// uses these types of keys, you’ll get an HTTP 400 Bad Request + /// error. It's because the encryption method can't be changed when you retrieve + /// the object.

    + ///
    + ///

    If you encrypt an object by using server-side encryption with customer-provided + /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve + /// the metadata from the object, you must use the following headers to provide the + /// encryption key for the server to be able to retrieve the object's metadata. The + /// headers are:

    + ///
      + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-algorithm + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key-MD5 + ///

      + ///
    • + ///
    + ///

    For more information about SSE-C, see Server-Side + /// Encryption (Using Customer-Provided Encryption Keys) in the + /// Amazon S3 User Guide.

    + /// + ///

    + /// Directory bucket permissions - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). We recommend that the bucket's default encryption uses the desired encryption configuration and you don't override the bucket default encryption in your + /// CreateSession requests or PUT object requests. Then, new objects + /// are automatically encrypted with the desired encryption settings. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide. For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

    + ///
    + ///
    + ///
    Versioning
    + ///
    + ///

    + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null to the + /// versionId query parameter in the request.

    + ///
    + ///
    Conditional request headers
    + ///
    + ///

    Consider the following when using request headers:

    + ///
      + ///
    • + ///

      If both of the If-Match and If-Unmodified-Since + /// headers are present in the request as follows, then Amazon S3 returns the HTTP + /// status code 200 OK and the data requested:

      + ///
        + ///
      • + ///

        + /// If-Match condition evaluates to + /// true.

        + ///
      • + ///
      • + ///

        + /// If-Unmodified-Since condition evaluates to + /// false.

        + ///
      • + ///
      + ///

      For more information about conditional requests, see RFC 7232.

      + ///
    • + ///
    • + ///

      If both of the If-None-Match and + /// If-Modified-Since headers are present in the request as + /// follows, then Amazon S3 returns the HTTP status code 304 Not + /// Modified:

      + ///
        + ///
      • + ///

        + /// If-None-Match condition evaluates to + /// false.

        + ///
      • + ///
      • + ///

        + /// If-Modified-Since condition evaluates to + /// true.

        + ///
      • + ///
      + ///

      For more information about conditional requests, see RFC 7232.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following actions are related to GetObjectAttributes:

    + /// + async fn get_object_attributes( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetObjectAttributes is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock -/// configuration will be applied by default to every new object placed in the specified -/// bucket. For more information, see Locking Objects.

    -///

    The following action is related to GetObjectLockConfiguration:

    -/// -async fn get_object_lock_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetObjectLockConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Gets an object's current legal hold status. For more information, see Locking + /// Objects.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + ///

    The following action is related to GetObjectLegalHold:

    + /// + async fn get_object_legal_hold( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetObjectLegalHold is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Retrieves an object's retention settings. For more information, see Locking -/// Objects.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -///

    The following action is related to GetObjectRetention:

    -/// -async fn get_object_retention(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetObjectRetention is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock + /// configuration will be applied by default to every new object placed in the specified + /// bucket. For more information, see Locking Objects.

    + ///

    The following action is related to GetObjectLockConfiguration:

    + /// + async fn get_object_lock_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetObjectLockConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns the tag-set of an object. You send the GET request against the tagging -/// subresource associated with the object.

    -///

    To use this operation, you must have permission to perform the -/// s3:GetObjectTagging action. By default, the GET action returns information -/// about current version of an object. For a versioned bucket, you can have multiple versions -/// of an object in your bucket. To retrieve tags of any other version, use the versionId query -/// parameter. You also need permission for the s3:GetObjectVersionTagging -/// action.

    -///

    By default, the bucket owner has this permission and can grant this permission to -/// others.

    -///

    For information about the Amazon S3 object tagging feature, see Object Tagging.

    -///

    The following actions are related to GetObjectTagging:

    -/// -async fn get_object_tagging(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetObjectTagging is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Retrieves an object's retention settings. For more information, see Locking + /// Objects.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + ///

    The following action is related to GetObjectRetention:

    + /// + async fn get_object_retention( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetObjectRetention is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're -/// distributing large files.

    -/// -///

    You can get torrent only for objects that are less than 5 GB in size, and that are -/// not encrypted using server-side encryption with a customer-provided encryption -/// key.

    -///
    -///

    To use GET, you must have READ access to the object.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -///

    The following action is related to GetObjectTorrent:

    -/// -async fn get_object_torrent(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetObjectTorrent is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns the tag-set of an object. You send the GET request against the tagging + /// subresource associated with the object.

    + ///

    To use this operation, you must have permission to perform the + /// s3:GetObjectTagging action. By default, the GET action returns information + /// about current version of an object. For a versioned bucket, you can have multiple versions + /// of an object in your bucket. To retrieve tags of any other version, use the versionId query + /// parameter. You also need permission for the s3:GetObjectVersionTagging + /// action.

    + ///

    By default, the bucket owner has this permission and can grant this permission to + /// others.

    + ///

    For information about the Amazon S3 object tagging feature, see Object Tagging.

    + ///

    The following actions are related to GetObjectTagging:

    + /// + async fn get_object_tagging(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetObjectTagging is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use -/// this operation, you must have the s3:GetBucketPublicAccessBlock permission. -/// For more information about Amazon S3 permissions, see Specifying Permissions in a -/// Policy.

    -/// -///

    When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or -/// an object, it checks the PublicAccessBlock configuration for both the -/// bucket (or the bucket that contains the object) and the bucket owner's account. If the -/// PublicAccessBlock settings are different between the bucket and the -/// account, Amazon S3 uses the most restrictive combination of the bucket-level and -/// account-level settings.

    -///
    -///

    For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".

    -///

    The following operations are related to GetPublicAccessBlock:

    -/// -async fn get_public_access_block(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "GetPublicAccessBlock is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're + /// distributing large files.

    + /// + ///

    You can get torrent only for objects that are less than 5 GB in size, and that are + /// not encrypted using server-side encryption with a customer-provided encryption + /// key.

    + ///
    + ///

    To use GET, you must have READ access to the object.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + ///

    The following action is related to GetObjectTorrent:

    + ///
      + ///
    • + ///

      + /// GetObject + ///

      + ///
    • + ///
    + async fn get_object_torrent(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "GetObjectTorrent is not implemented yet")) + } -///

    You can use this operation to determine if a bucket exists and if you have permission to -/// access it. The action returns a 200 OK if the bucket exists and you have -/// permission to access it.

    -/// -///

    If the bucket does not exist or you do not have permission to access it, the -/// HEAD request returns a generic 400 Bad Request, 403 -/// Forbidden or 404 Not Found code. A message body is not included, -/// so you cannot determine the exception beyond these HTTP response codes.

    -///
    -///
    -///
    Authentication and authorization
    -///
    -///

    -/// General purpose buckets - Request to public -/// buckets that grant the s3:ListBucket permission publicly do not need to be signed. -/// All other HeadBucket requests must be authenticated and signed by -/// using IAM credentials (access key ID and secret access key for the IAM -/// identities). All headers with the x-amz- prefix, including -/// x-amz-copy-source, must be signed. For more information, see -/// REST Authentication.

    -///

    -/// Directory buckets - You must use IAM -/// credentials to authenticate and authorize your access to the -/// HeadBucket API operation, instead of using the temporary security -/// credentials through the CreateSession API operation.

    -///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your -/// behalf.

    -///
    -///
    Permissions
    -///
    -///

    -/// -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -/// -///

    You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    -async fn head_bucket(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "HeadBucket is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use + /// this operation, you must have the s3:GetBucketPublicAccessBlock permission. + /// For more information about Amazon S3 permissions, see Specifying Permissions in a + /// Policy.

    + /// + ///

    When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or + /// an object, it checks the PublicAccessBlock configuration for both the + /// bucket (or the bucket that contains the object) and the bucket owner's account. If the + /// PublicAccessBlock settings are different between the bucket and the + /// account, Amazon S3 uses the most restrictive combination of the bucket-level and + /// account-level settings.

    + ///
    + ///

    For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".

    + ///

    The following operations are related to GetPublicAccessBlock:

    + /// + async fn get_public_access_block( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "GetPublicAccessBlock is not implemented yet")) + } -///

    The HEAD operation retrieves metadata from an object without returning the -/// object itself. This operation is useful if you're interested only in an object's -/// metadata.

    -/// -///

    A HEAD request has the same options as a GET operation on -/// an object. The response is identical to the GET response except that there -/// is no response body. Because of this, if the HEAD request generates an -/// error, it returns a generic code, such as 400 Bad Request, 403 -/// Forbidden, 404 Not Found, 405 Method Not Allowed, -/// 412 Precondition Failed, or 304 Not Modified. It's not -/// possible to retrieve the exact exception of these error codes.

    -///
    -///

    Request headers are limited to 8 KB in size. For more information, see Common -/// Request Headers.

    -///
    -///
    Permissions
    -///
    -///

    -///
      -///
    • -///

      -/// General purpose bucket permissions - To -/// use HEAD, you must have the s3:GetObject -/// permission. You need the relevant read object (or version) permission for -/// this operation. For more information, see Actions, resources, and -/// condition keys for Amazon S3 in the Amazon S3 User -/// Guide. For more information about the permissions to S3 API -/// operations by S3 resource types, see Required permissions for Amazon S3 API operations in the -/// Amazon S3 User Guide.

      -///

      If the object you request doesn't exist, the error that Amazon S3 returns -/// depends on whether you also have the s3:ListBucket -/// permission.

      -///
        -///
      • -///

        If you have the s3:ListBucket permission on the -/// bucket, Amazon S3 returns an HTTP status code 404 Not Found -/// error.

        -///
      • -///
      • -///

        If you don’t have the s3:ListBucket permission, Amazon S3 -/// returns an HTTP status code 403 Forbidden error.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///

      If you enable x-amz-checksum-mode in the request and the -/// object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must -/// also have the kms:GenerateDataKey and kms:Decrypt -/// permissions in IAM identity-based policies and KMS key policies for the -/// KMS key to retrieve the checksum of the object.

      -///
    • -///
    -///
    -///
    Encryption
    -///
    -/// -///

    Encryption request headers, like x-amz-server-side-encryption, -/// should not be sent for HEAD requests if your object uses -/// server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer -/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side -/// encryption with Amazon S3 managed encryption keys (SSE-S3). The -/// x-amz-server-side-encryption header is used when you -/// PUT an object to S3 and want to specify the encryption method. -/// If you include this header in a HEAD request for an object that -/// uses these types of keys, you’ll get an HTTP 400 Bad Request -/// error. It's because the encryption method can't be changed when you retrieve -/// the object.

    -///
    -///

    If you encrypt an object by using server-side encryption with customer-provided -/// encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve -/// the metadata from the object, you must use the following headers to provide the -/// encryption key for the server to be able to retrieve the object's metadata. The -/// headers are:

    -///
      -///
    • -///

      -/// x-amz-server-side-encryption-customer-algorithm -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key -///

      -///
    • -///
    • -///

      -/// x-amz-server-side-encryption-customer-key-MD5 -///

      -///
    • -///
    -///

    For more information about SSE-C, see Server-Side -/// Encryption (Using Customer-Provided Encryption Keys) in the -/// Amazon S3 User Guide.

    -/// -///

    -/// Directory bucket - -/// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    -///
    -///
    -///
    Versioning
    -///
    -///
      -///
    • -///

      If the current version of the object is a delete marker, Amazon S3 behaves as -/// if the object was deleted and includes x-amz-delete-marker: -/// true in the response.

      -///
    • -///
    • -///

      If the specified version is a delete marker, the response returns a -/// 405 Method Not Allowed error and the Last-Modified: -/// timestamp response header.

      -///
    • -///
    -/// -///
      -///
    • -///

      -/// Directory buckets - -/// Delete marker is not supported for directory buckets.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null -/// to the versionId query parameter in the request.

      -///
    • -///
    -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -/// -///

    For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    -///

    The following actions are related to HeadObject:

    -/// -async fn head_object(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "HeadObject is not implemented yet")) -} + ///

    You can use this operation to determine if a bucket exists and if you have permission to + /// access it. The action returns a 200 OK if the bucket exists and you have + /// permission to access it.

    + /// + ///

    If the bucket does not exist or you do not have permission to access it, the + /// HEAD request returns a generic 400 Bad Request, 403 + /// Forbidden or 404 Not Found code. A message body is not included, + /// so you cannot determine the exception beyond these HTTP response codes.

    + ///
    + ///
    + ///
    Authentication and authorization
    + ///
    + ///

    + /// General purpose buckets - Request to public + /// buckets that grant the s3:ListBucket permission publicly do not need to be signed. + /// All other HeadBucket requests must be authenticated and signed by + /// using IAM credentials (access key ID and secret access key for the IAM + /// identities). All headers with the x-amz- prefix, including + /// x-amz-copy-source, must be signed. For more information, see + /// REST Authentication.

    + ///

    + /// Directory buckets - You must use IAM + /// credentials to authenticate and authorize your access to the + /// HeadBucket API operation, instead of using the temporary security + /// credentials through the CreateSession API operation.

    + ///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your + /// behalf.

    + ///
    + ///
    Permissions
    + ///
    + ///

    + /// + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + /// + ///

    You must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://bucket-name.s3express-zone-id.region-code.amazonaws.com. Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    + async fn head_bucket(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "HeadBucket is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Lists the analytics configurations for the bucket. You can have up to 1,000 analytics -/// configurations per bucket.

    -///

    This action supports list pagination and does not return more than 100 configurations at -/// a time. You should always check the IsTruncated element in the response. If -/// there are no more configurations to list, IsTruncated is set to false. If -/// there are more configurations to list, IsTruncated is set to true, and there -/// will be a value in NextContinuationToken. You use the -/// NextContinuationToken value to continue the pagination of the list by -/// passing the value in continuation-token in the request to GET the next -/// page.

    -///

    To use this operation, you must have permissions to perform the -/// s3:GetAnalyticsConfiguration action. The bucket owner has this permission -/// by default. The bucket owner can grant this permission to others. For more information -/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class -/// Analysis.

    -///

    The following operations are related to -/// ListBucketAnalyticsConfigurations:

    -/// -async fn list_bucket_analytics_configurations(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListBucketAnalyticsConfigurations is not implemented yet")) -} + ///

    The HEAD operation retrieves metadata from an object without returning the + /// object itself. This operation is useful if you're interested only in an object's + /// metadata.

    + /// + ///

    A HEAD request has the same options as a GET operation on + /// an object. The response is identical to the GET response except that there + /// is no response body. Because of this, if the HEAD request generates an + /// error, it returns a generic code, such as 400 Bad Request, 403 + /// Forbidden, 404 Not Found, 405 Method Not Allowed, + /// 412 Precondition Failed, or 304 Not Modified. It's not + /// possible to retrieve the exact exception of these error codes.

    + ///
    + ///

    Request headers are limited to 8 KB in size. For more information, see Common + /// Request Headers.

    + ///
    + ///
    Permissions
    + ///
    + ///

    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - To + /// use HEAD, you must have the s3:GetObject + /// permission. You need the relevant read object (or version) permission for + /// this operation. For more information, see Actions, resources, and + /// condition keys for Amazon S3 in the Amazon S3 User + /// Guide. For more information about the permissions to S3 API + /// operations by S3 resource types, see Required permissions for Amazon S3 API operations in the + /// Amazon S3 User Guide.

      + ///

      If the object you request doesn't exist, the error that Amazon S3 returns + /// depends on whether you also have the s3:ListBucket + /// permission.

      + ///
        + ///
      • + ///

        If you have the s3:ListBucket permission on the + /// bucket, Amazon S3 returns an HTTP status code 404 Not Found + /// error.

        + ///
      • + ///
      • + ///

        If you don’t have the s3:ListBucket permission, Amazon S3 + /// returns an HTTP status code 403 Forbidden error.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///

      If you enable x-amz-checksum-mode in the request and the + /// object is encrypted with Amazon Web Services Key Management Service (Amazon Web Services KMS), you must + /// also have the kms:GenerateDataKey and kms:Decrypt + /// permissions in IAM identity-based policies and KMS key policies for the + /// KMS key to retrieve the checksum of the object.

      + ///
    • + ///
    + ///
    + ///
    Encryption
    + ///
    + /// + ///

    Encryption request headers, like x-amz-server-side-encryption, + /// should not be sent for HEAD requests if your object uses + /// server-side encryption with Key Management Service (KMS) keys (SSE-KMS), dual-layer + /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS), or server-side + /// encryption with Amazon S3 managed encryption keys (SSE-S3). The + /// x-amz-server-side-encryption header is used when you + /// PUT an object to S3 and want to specify the encryption method. + /// If you include this header in a HEAD request for an object that + /// uses these types of keys, you’ll get an HTTP 400 Bad Request + /// error. It's because the encryption method can't be changed when you retrieve + /// the object.

    + ///
    + ///

    If you encrypt an object by using server-side encryption with customer-provided + /// encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve + /// the metadata from the object, you must use the following headers to provide the + /// encryption key for the server to be able to retrieve the object's metadata. The + /// headers are:

    + ///
      + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-algorithm + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key + ///

      + ///
    • + ///
    • + ///

      + /// x-amz-server-side-encryption-customer-key-MD5 + ///

      + ///
    • + ///
    + ///

    For more information about SSE-C, see Server-Side + /// Encryption (Using Customer-Provided Encryption Keys) in the + /// Amazon S3 User Guide.

    + /// + ///

    + /// Directory bucket - + /// For directory buckets, there are only two supported options for server-side encryption: SSE-S3 and SSE-KMS. SSE-C isn't supported. For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Versioning
    + ///
    + ///
      + ///
    • + ///

      If the current version of the object is a delete marker, Amazon S3 behaves as + /// if the object was deleted and includes x-amz-delete-marker: + /// true in the response.

      + ///
    • + ///
    • + ///

      If the specified version is a delete marker, the response returns a + /// 405 Method Not Allowed error and the Last-Modified: + /// timestamp response header.

      + ///
    • + ///
    + /// + ///
      + ///
    • + ///

      + /// Directory buckets - + /// Delete marker is not supported for directory buckets.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// S3 Versioning isn't enabled and supported for directory buckets. For this API operation, only the null value of the version ID is supported by directory buckets. You can only specify null + /// to the versionId query parameter in the request.

      + ///
    • + ///
    + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + /// + ///

    For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    + ///

    The following actions are related to HeadObject:

    + /// + async fn head_object(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "HeadObject is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Lists the S3 Intelligent-Tiering configuration from the specified bucket.

    -///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    -///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    -///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    -///

    Operations related to ListBucketIntelligentTieringConfigurations include:

    -/// -async fn list_bucket_intelligent_tiering_configurations(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListBucketIntelligentTieringConfigurations is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Lists the analytics configurations for the bucket. You can have up to 1,000 analytics + /// configurations per bucket.

    + ///

    This action supports list pagination and does not return more than 100 configurations at + /// a time. You should always check the IsTruncated element in the response. If + /// there are no more configurations to list, IsTruncated is set to false. If + /// there are more configurations to list, IsTruncated is set to true, and there + /// will be a value in NextContinuationToken. You use the + /// NextContinuationToken value to continue the pagination of the list by + /// passing the value in continuation-token in the request to GET the next + /// page.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:GetAnalyticsConfiguration action. The bucket owner has this permission + /// by default. The bucket owner can grant this permission to others. For more information + /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class + /// Analysis.

    + ///

    The following operations are related to + /// ListBucketAnalyticsConfigurations:

    + /// + async fn list_bucket_analytics_configurations( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "ListBucketAnalyticsConfigurations is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns a list of inventory configurations for the bucket. You can have up to 1,000 -/// analytics configurations per bucket.

    -///

    This action supports list pagination and does not return more than 100 configurations at -/// a time. Always check the IsTruncated element in the response. If there are no -/// more configurations to list, IsTruncated is set to false. If there are more -/// configurations to list, IsTruncated is set to true, and there is a value in -/// NextContinuationToken. You use the NextContinuationToken value -/// to continue the pagination of the list by passing the value in continuation-token in the -/// request to GET the next page.

    -///

    To use this operation, you must have permissions to perform the -/// s3:GetInventoryConfiguration action. The bucket owner has this permission -/// by default. The bucket owner can grant this permission to others. For more information -/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory -///

    -///

    The following operations are related to -/// ListBucketInventoryConfigurations:

    -/// -async fn list_bucket_inventory_configurations(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListBucketInventoryConfigurations is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Lists the S3 Intelligent-Tiering configuration from the specified bucket.

    + ///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    + ///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    + ///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    + ///

    Operations related to ListBucketIntelligentTieringConfigurations include:

    + /// + async fn list_bucket_intelligent_tiering_configurations( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!( + NotImplemented, + "ListBucketIntelligentTieringConfigurations is not implemented yet" + )) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Lists the metrics configurations for the bucket. The metrics configurations are only for -/// the request metrics of the bucket and do not provide information on daily storage metrics. -/// You can have up to 1,000 configurations per bucket.

    -///

    This action supports list pagination and does not return more than 100 configurations at -/// a time. Always check the IsTruncated element in the response. If there are no -/// more configurations to list, IsTruncated is set to false. If there are more -/// configurations to list, IsTruncated is set to true, and there is a value in -/// NextContinuationToken. You use the NextContinuationToken value -/// to continue the pagination of the list by passing the value in -/// continuation-token in the request to GET the next page.

    -///

    To use this operation, you must have permissions to perform the -/// s3:GetMetricsConfiguration action. The bucket owner has this permission by -/// default. The bucket owner can grant this permission to others. For more information about -/// permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For more information about metrics configurations and CloudWatch request metrics, see -/// Monitoring Metrics with Amazon CloudWatch.

    -///

    The following operations are related to -/// ListBucketMetricsConfigurations:

    -/// -async fn list_bucket_metrics_configurations(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListBucketMetricsConfigurations is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns a list of inventory configurations for the bucket. You can have up to 1,000 + /// analytics configurations per bucket.

    + ///

    This action supports list pagination and does not return more than 100 configurations at + /// a time. Always check the IsTruncated element in the response. If there are no + /// more configurations to list, IsTruncated is set to false. If there are more + /// configurations to list, IsTruncated is set to true, and there is a value in + /// NextContinuationToken. You use the NextContinuationToken value + /// to continue the pagination of the list by passing the value in continuation-token in the + /// request to GET the next page.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:GetInventoryConfiguration action. The bucket owner has this permission + /// by default. The bucket owner can grant this permission to others. For more information + /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For information about the Amazon S3 inventory feature, see Amazon S3 Inventory + ///

    + ///

    The following operations are related to + /// ListBucketInventoryConfigurations:

    + /// + async fn list_bucket_inventory_configurations( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "ListBucketInventoryConfigurations is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns a list of all buckets owned by the authenticated sender of the request. To grant IAM permission to use -/// this operation, you must add the s3:ListAllMyBuckets policy action.

    -///

    For information about Amazon S3 buckets, see Creating, configuring, and -/// working with Amazon S3 buckets.

    -/// -///

    We strongly recommend using only paginated ListBuckets requests. Unpaginated ListBuckets requests are only supported for -/// Amazon Web Services accounts set to the default general purpose bucket quota of 10,000. If you have an approved -/// general purpose bucket quota above 10,000, you must send paginated ListBuckets requests to list your account’s buckets. -/// All unpaginated ListBuckets requests will be rejected for Amazon Web Services accounts with a general purpose bucket quota -/// greater than 10,000.

    -///
    -async fn list_buckets(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListBuckets is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Lists the metrics configurations for the bucket. The metrics configurations are only for + /// the request metrics of the bucket and do not provide information on daily storage metrics. + /// You can have up to 1,000 configurations per bucket.

    + ///

    This action supports list pagination and does not return more than 100 configurations at + /// a time. Always check the IsTruncated element in the response. If there are no + /// more configurations to list, IsTruncated is set to false. If there are more + /// configurations to list, IsTruncated is set to true, and there is a value in + /// NextContinuationToken. You use the NextContinuationToken value + /// to continue the pagination of the list by passing the value in + /// continuation-token in the request to GET the next page.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:GetMetricsConfiguration action. The bucket owner has this permission by + /// default. The bucket owner can grant this permission to others. For more information about + /// permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For more information about metrics configurations and CloudWatch request metrics, see + /// Monitoring Metrics with Amazon CloudWatch.

    + ///

    The following operations are related to + /// ListBucketMetricsConfigurations:

    + /// + async fn list_bucket_metrics_configurations( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "ListBucketMetricsConfigurations is not implemented yet")) + } -///

    Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the -/// request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

    -/// -///

    -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///

    You must have the s3express:ListAllMyDirectoryBuckets permission -/// in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host -/// header syntax is -/// s3express-control.region.amazonaws.com.

    -///
    -///
    -/// -///

    The BucketRegion response element is not part of the -/// ListDirectoryBuckets Response Syntax.

    -///
    -async fn list_directory_buckets(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListDirectoryBuckets is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns a list of all buckets owned by the authenticated sender of the request. To grant IAM permission to use + /// this operation, you must add the s3:ListAllMyBuckets policy action.

    + ///

    For information about Amazon S3 buckets, see Creating, configuring, and + /// working with Amazon S3 buckets.

    + /// + ///

    We strongly recommend using only paginated ListBuckets requests. Unpaginated ListBuckets requests are only supported for + /// Amazon Web Services accounts set to the default general purpose bucket quota of 10,000. If you have an approved + /// general purpose bucket quota above 10,000, you must send paginated ListBuckets requests to list your account’s buckets. + /// All unpaginated ListBuckets requests will be rejected for Amazon Web Services accounts with a general purpose bucket quota + /// greater than 10,000.

    + ///
    + async fn list_buckets(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "ListBuckets is not implemented yet")) + } -///

    This operation lists in-progress multipart uploads in a bucket. An in-progress multipart -/// upload is a multipart upload that has been initiated by the -/// CreateMultipartUpload request, but has not yet been completed or -/// aborted.

    -/// -///

    -/// Directory buckets - If multipart uploads in -/// a directory bucket are in progress, you can't delete the bucket until all the -/// in-progress multipart uploads are aborted or completed. To delete these in-progress -/// multipart uploads, use the ListMultipartUploads operation to list the -/// in-progress multipart uploads in the bucket and use the -/// AbortMultipartUpload operation to abort all the in-progress multipart -/// uploads.

    -///
    -///

    The ListMultipartUploads operation returns a maximum of 1,000 multipart -/// uploads in the response. The limit of 1,000 multipart uploads is also the default value. -/// You can further limit the number of uploads in a response by specifying the -/// max-uploads request parameter. If there are more than 1,000 multipart -/// uploads that satisfy your ListMultipartUploads request, the response returns -/// an IsTruncated element with the value of true, a -/// NextKeyMarker element, and a NextUploadIdMarker element. To -/// list the remaining multipart uploads, you need to make subsequent -/// ListMultipartUploads requests. In these requests, include two query -/// parameters: key-marker and upload-id-marker. Set the value of -/// key-marker to the NextKeyMarker value from the previous -/// response. Similarly, set the value of upload-id-marker to the -/// NextUploadIdMarker value from the previous response.

    -/// -///

    -/// Directory buckets - The -/// upload-id-marker element and the NextUploadIdMarker element -/// aren't supported by directory buckets. To list the additional multipart uploads, you -/// only need to set the value of key-marker to the NextKeyMarker -/// value from the previous response.

    -///
    -///

    For more information about multipart uploads, see Uploading Objects Using Multipart -/// Upload in the Amazon S3 User Guide.

    -/// -///

    -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - For -/// information about permissions required to use the multipart upload API, see -/// Multipart Upload and -/// Permissions in the Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///
    • -///
    -///
    -///
    Sorting of multipart uploads in response
    -///
    -///
      -///
    • -///

      -/// General purpose bucket - In the -/// ListMultipartUploads response, the multipart uploads are -/// sorted based on two criteria:

      -///
        -///
      • -///

        Key-based sorting - Multipart uploads are initially sorted -/// in ascending order based on their object keys.

        -///
      • -///
      • -///

        Time-based sorting - For uploads that share the same object -/// key, they are further sorted in ascending order based on the upload -/// initiation time. Among uploads with the same key, the one that was -/// initiated first will appear before the ones that were initiated -/// later.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket - In the -/// ListMultipartUploads response, the multipart uploads aren't -/// sorted lexicographically based on the object keys. -/// -///

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to ListMultipartUploads:

    -/// -async fn list_multipart_uploads(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListMultipartUploads is not implemented yet")) -} + ///

    Returns a list of all Amazon S3 directory buckets owned by the authenticated sender of the + /// request. For more information about directory buckets, see Directory buckets in the Amazon S3 User Guide.

    + /// + ///

    + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///

    You must have the s3express:ListAllMyDirectoryBuckets permission + /// in an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host + /// header syntax is + /// s3express-control.region.amazonaws.com.

    + ///
    + ///
    + /// + ///

    The BucketRegion response element is not part of the + /// ListDirectoryBuckets Response Syntax.

    + ///
    + async fn list_directory_buckets( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "ListDirectoryBuckets is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns metadata about all versions of the objects in a bucket. You can also use request -/// parameters as selection criteria to return metadata about a subset of all the object -/// versions.

    -/// -///

    To use this operation, you must have permission to perform the -/// s3:ListBucketVersions action. Be aware of the name difference.

    -///
    -/// -///

    A 200 OK response can contain valid or invalid XML. Make sure to design -/// your application to parse the contents of the response and handle it -/// appropriately.

    -///
    -///

    To use this operation, you must have READ access to the bucket.

    -///

    The following operations are related to ListObjectVersions:

    -/// -async fn list_object_versions(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListObjectVersions is not implemented yet")) -} + ///

    This operation lists in-progress multipart uploads in a bucket. An in-progress multipart + /// upload is a multipart upload that has been initiated by the + /// CreateMultipartUpload request, but has not yet been completed or + /// aborted.

    + /// + ///

    + /// Directory buckets - If multipart uploads in + /// a directory bucket are in progress, you can't delete the bucket until all the + /// in-progress multipart uploads are aborted or completed. To delete these in-progress + /// multipart uploads, use the ListMultipartUploads operation to list the + /// in-progress multipart uploads in the bucket and use the + /// AbortMultipartUpload operation to abort all the in-progress multipart + /// uploads.

    + ///
    + ///

    The ListMultipartUploads operation returns a maximum of 1,000 multipart + /// uploads in the response. The limit of 1,000 multipart uploads is also the default value. + /// You can further limit the number of uploads in a response by specifying the + /// max-uploads request parameter. If there are more than 1,000 multipart + /// uploads that satisfy your ListMultipartUploads request, the response returns + /// an IsTruncated element with the value of true, a + /// NextKeyMarker element, and a NextUploadIdMarker element. To + /// list the remaining multipart uploads, you need to make subsequent + /// ListMultipartUploads requests. In these requests, include two query + /// parameters: key-marker and upload-id-marker. Set the value of + /// key-marker to the NextKeyMarker value from the previous + /// response. Similarly, set the value of upload-id-marker to the + /// NextUploadIdMarker value from the previous response.

    + /// + ///

    + /// Directory buckets - The + /// upload-id-marker element and the NextUploadIdMarker element + /// aren't supported by directory buckets. To list the additional multipart uploads, you + /// only need to set the value of key-marker to the NextKeyMarker + /// value from the previous response.

    + ///
    + ///

    For more information about multipart uploads, see Uploading Objects Using Multipart + /// Upload in the Amazon S3 User Guide.

    + /// + ///

    + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - For + /// information about permissions required to use the multipart upload API, see + /// Multipart Upload and + /// Permissions in the Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///
    • + ///
    + ///
    + ///
    Sorting of multipart uploads in response
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket - In the + /// ListMultipartUploads response, the multipart uploads are + /// sorted based on two criteria:

      + ///
        + ///
      • + ///

        Key-based sorting - Multipart uploads are initially sorted + /// in ascending order based on their object keys.

        + ///
      • + ///
      • + ///

        Time-based sorting - For uploads that share the same object + /// key, they are further sorted in ascending order based on the upload + /// initiation time. Among uploads with the same key, the one that was + /// initiated first will appear before the ones that were initiated + /// later.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket - In the + /// ListMultipartUploads response, the multipart uploads aren't + /// sorted lexicographically based on the object keys. + /// + ///

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to ListMultipartUploads:

    + /// + async fn list_multipart_uploads( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "ListMultipartUploads is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Returns some or all (up to 1,000) of the objects in a bucket. You can use the request -/// parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK -/// response can contain valid or invalid XML. Be sure to design your application to parse the -/// contents of the response and handle it appropriately.

    -/// -///

    This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility, -/// Amazon S3 continues to support ListObjects.

    -///
    -///

    The following operations are related to ListObjects:

    -/// -async fn list_objects(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListObjects is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns metadata about all versions of the objects in a bucket. You can also use request + /// parameters as selection criteria to return metadata about a subset of all the object + /// versions.

    + /// + ///

    To use this operation, you must have permission to perform the + /// s3:ListBucketVersions action. Be aware of the name difference.

    + ///
    + /// + ///

    A 200 OK response can contain valid or invalid XML. Make sure to design + /// your application to parse the contents of the response and handle it + /// appropriately.

    + ///
    + ///

    To use this operation, you must have READ access to the bucket.

    + ///

    The following operations are related to ListObjectVersions:

    + /// + async fn list_object_versions( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "ListObjectVersions is not implemented yet")) + } -///

    Returns some or all (up to 1,000) of the objects in a bucket with each request. You can -/// use the request parameters as selection criteria to return a subset of the objects in a -/// bucket. A 200 OK response can contain valid or invalid XML. Make sure to -/// design your application to parse the contents of the response and handle it appropriately. -/// For more information about listing objects, see Listing object keys -/// programmatically in the Amazon S3 User Guide. To get a list of -/// your buckets, see ListBuckets.

    -/// -///
      -///
    • -///

      -/// General purpose bucket - For general purpose buckets, -/// ListObjectsV2 doesn't return prefixes that are related only to -/// in-progress multipart uploads.

      -///
    • -///
    • -///

      -/// Directory buckets - For -/// directory buckets, ListObjectsV2 response includes the prefixes that -/// are related only to in-progress multipart uploads.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - To -/// use this operation, you must have READ access to the bucket. You must have -/// permission to perform the s3:ListBucket action. The bucket -/// owner has this permission by default and can grant this permission to -/// others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access -/// Permissions to Your Amazon S3 Resources in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///
    • -///
    -///
    -///
    Sorting order of returned objects
    -///
    -///
      -///
    • -///

      -/// General purpose bucket - For -/// general purpose buckets, ListObjectsV2 returns objects in -/// lexicographical order based on their key names.

      -///
    • -///
    • -///

      -/// Directory bucket - For -/// directory buckets, ListObjectsV2 does not return objects in -/// lexicographical order.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -/// -///

    This section describes the latest revision of this action. We recommend that you use -/// this revised API operation for application development. For backward compatibility, Amazon S3 -/// continues to support the prior version of this API operation, ListObjects.

    -///
    -///

    The following operations are related to ListObjectsV2:

    -/// -async fn list_objects_v2(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListObjectsV2 is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Returns some or all (up to 1,000) of the objects in a bucket. You can use the request + /// parameters as selection criteria to return a subset of the objects in a bucket. A 200 OK + /// response can contain valid or invalid XML. Be sure to design your application to parse the + /// contents of the response and handle it appropriately.

    + /// + ///

    This action has been revised. We recommend that you use the newer version, ListObjectsV2, when developing applications. For backward compatibility, + /// Amazon S3 continues to support ListObjects.

    + ///
    + ///

    The following operations are related to ListObjects:

    + /// + async fn list_objects(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "ListObjects is not implemented yet")) + } -///

    Lists the parts that have been uploaded for a specific multipart upload.

    -///

    To use this operation, you must provide the upload ID in the request. You -/// obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

    -///

    The ListParts request returns a maximum of 1,000 uploaded parts. The limit -/// of 1,000 parts is also the default value. You can restrict the number of parts in a -/// response by specifying the max-parts request parameter. If your multipart -/// upload consists of more than 1,000 parts, the response returns an IsTruncated -/// field with the value of true, and a NextPartNumberMarker element. -/// To list remaining uploaded parts, in subsequent ListParts requests, include -/// the part-number-marker query string parameter and set its value to the -/// NextPartNumberMarker field value from the previous response.

    -///

    For more information on multipart uploads, see Uploading Objects Using Multipart -/// Upload in the Amazon S3 User Guide.

    -/// -///

    -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - For -/// information about permissions required to use the multipart upload API, see -/// Multipart Upload and -/// Permissions in the Amazon S3 User Guide.

      -///

      If the upload was created using server-side encryption with Key Management Service -/// (KMS) keys (SSE-KMS) or dual-layer server-side encryption with -/// Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the -/// kms:Decrypt action for the ListParts request to -/// succeed.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to ListParts:

    -/// -async fn list_parts(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "ListParts is not implemented yet")) -} + ///

    Returns some or all (up to 1,000) of the objects in a bucket with each request. You can + /// use the request parameters as selection criteria to return a subset of the objects in a + /// bucket. A 200 OK response can contain valid or invalid XML. Make sure to + /// design your application to parse the contents of the response and handle it appropriately. + /// For more information about listing objects, see Listing object keys + /// programmatically in the Amazon S3 User Guide. To get a list of + /// your buckets, see ListBuckets.

    + /// + ///
      + ///
    • + ///

      + /// General purpose bucket - For general purpose buckets, + /// ListObjectsV2 doesn't return prefixes that are related only to + /// in-progress multipart uploads.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - For + /// directory buckets, ListObjectsV2 response includes the prefixes that + /// are related only to in-progress multipart uploads.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - To + /// use this operation, you must have READ access to the bucket. You must have + /// permission to perform the s3:ListBucket action. The bucket + /// owner has this permission by default and can grant this permission to + /// others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access + /// Permissions to Your Amazon S3 Resources in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///
    • + ///
    + ///
    + ///
    Sorting order of returned objects
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket - For + /// general purpose buckets, ListObjectsV2 returns objects in + /// lexicographical order based on their key names.

      + ///
    • + ///
    • + ///

      + /// Directory bucket - For + /// directory buckets, ListObjectsV2 does not return objects in + /// lexicographical order.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + /// + ///

    This section describes the latest revision of this action. We recommend that you use + /// this revised API operation for application development. For backward compatibility, Amazon S3 + /// continues to support the prior version of this API operation, ListObjects.

    + ///
    + ///

    The following operations are related to ListObjectsV2:

    + /// + async fn list_objects_v2(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "ListObjectsV2 is not implemented yet")) + } -/// POST Object (multipart form upload) -/// -/// This is a synthetic method separated from `PutObject` so implementations can distinguish -/// POST vs PUT. By default it delegates to [`S3::put_object`] to keep behavior identical. -async fn post_object(&self, req: S3Request) -> S3Result> { -let resp = self.put_object(req.map_input(crate::dto::post_object_input_into_put_object_input)).await?; -Ok(resp.map_output(crate::dto::put_object_output_into_post_object_output)) -} + ///

    Lists the parts that have been uploaded for a specific multipart upload.

    + ///

    To use this operation, you must provide the upload ID in the request. You + /// obtain this uploadID by sending the initiate multipart upload request through CreateMultipartUpload.

    + ///

    The ListParts request returns a maximum of 1,000 uploaded parts. The limit + /// of 1,000 parts is also the default value. You can restrict the number of parts in a + /// response by specifying the max-parts request parameter. If your multipart + /// upload consists of more than 1,000 parts, the response returns an IsTruncated + /// field with the value of true, and a NextPartNumberMarker element. + /// To list remaining uploaded parts, in subsequent ListParts requests, include + /// the part-number-marker query string parameter and set its value to the + /// NextPartNumberMarker field value from the previous response.

    + ///

    For more information on multipart uploads, see Uploading Objects Using Multipart + /// Upload in the Amazon S3 User Guide.

    + /// + ///

    + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - For + /// information about permissions required to use the multipart upload API, see + /// Multipart Upload and + /// Permissions in the Amazon S3 User Guide.

      + ///

      If the upload was created using server-side encryption with Key Management Service + /// (KMS) keys (SSE-KMS) or dual-layer server-side encryption with + /// Amazon Web Services KMS keys (DSSE-KMS), you must have permission to the + /// kms:Decrypt action for the ListParts request to + /// succeed.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to ListParts:

    + /// + async fn list_parts(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "ListParts is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a -/// bucket-level feature that enables you to perform faster data transfers to Amazon S3.

    -///

    To use this operation, you must have permission to perform the -/// s3:PutAccelerateConfiguration action. The bucket owner has this permission -/// by default. The bucket owner can grant this permission to others. For more information -/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    The Transfer Acceleration state of a bucket can be set to one of the following two -/// values:

    -///
      -///
    • -///

      Enabled – Enables accelerated data transfers to the bucket.

      -///
    • -///
    • -///

      Suspended – Disables accelerated data transfers to the bucket.

      -///
    • -///
    -///

    The GetBucketAccelerateConfiguration action returns the transfer acceleration state -/// of a bucket.

    -///

    After setting the Transfer Acceleration state of a bucket to Enabled, it might take up -/// to thirty minutes before the data transfer rates to the bucket increase.

    -///

    The name of the bucket used for Transfer Acceleration must be DNS-compliant and must -/// not contain periods (".").

    -///

    For more information about transfer acceleration, see Transfer -/// Acceleration.

    -///

    The following operations are related to -/// PutBucketAccelerateConfiguration:

    -/// -async fn put_bucket_accelerate_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketAccelerateConfiguration is not implemented yet")) -} + /// POST Object (multipart form upload) + /// + /// This is a synthetic method separated from `PutObject` so implementations can distinguish + /// POST vs PUT. By default it delegates to [`S3::put_object`] to keep behavior identical. + async fn post_object(&self, req: S3Request) -> S3Result> { + let resp = self + .put_object(req.map_input(crate::dto::post_object_input_into_put_object_input)) + .await?; + Ok(resp.map_output(crate::dto::put_object_output_into_post_object_output)) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets the permissions on an existing bucket using access control lists (ACL). For more -/// information, see Using ACLs. To set the ACL of a -/// bucket, you must have the WRITE_ACP permission.

    -///

    You can use one of the following two ways to set a bucket's permissions:

    -///
      -///
    • -///

      Specify the ACL in the request body

      -///
    • -///
    • -///

      Specify permissions using request headers

      -///
    • -///
    -/// -///

    You cannot specify access permission using both the body and the request -/// headers.

    -///
    -///

    Depending on your application needs, you may choose to set the ACL on a bucket using -/// either the request body or the headers. For example, if you have an existing application -/// that updates a bucket ACL using the request body, then you can continue to use that -/// approach.

    -/// -///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs -/// are disabled and no longer affect permissions. You must use policies to grant access to -/// your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return -/// the AccessControlListNotSupported error code. Requests to read ACLs are -/// still supported. For more information, see Controlling object -/// ownership in the Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///

    You can set access permissions by using one of the following methods:

    -///
      -///
    • -///

      Specify a canned ACL with the x-amz-acl request header. Amazon S3 -/// supports a set of predefined ACLs, known as canned -/// ACLs. Each canned ACL has a predefined set of grantees and -/// permissions. Specify the canned ACL name as the value of -/// x-amz-acl. If you use this header, you cannot use other -/// access control-specific headers in your request. For more information, see -/// Canned -/// ACL.

      -///
    • -///
    • -///

      Specify access permissions explicitly with the -/// x-amz-grant-read, x-amz-grant-read-acp, -/// x-amz-grant-write-acp, and -/// x-amz-grant-full-control headers. When using these headers, -/// you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 -/// groups) who will receive the permission. If you use these ACL-specific -/// headers, you cannot use the x-amz-acl header to set a canned -/// ACL. These parameters map to the set of permissions that Amazon S3 supports in an -/// ACL. For more information, see Access Control List (ACL) -/// Overview.

      -///

      You specify each grantee as a type=value pair, where the type is one of -/// the following:

      -///
        -///
      • -///

        -/// id – if the value specified is the canonical user ID -/// of an Amazon Web Services account

        -///
      • -///
      • -///

        -/// uri – if you are granting permissions to a predefined -/// group

        -///
      • -///
      • -///

        -/// emailAddress – if the value specified is the email -/// address of an Amazon Web Services account

        -/// -///

        Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

        -///
          -///
        • -///

          US East (N. Virginia)

          -///
        • -///
        • -///

          US West (N. California)

          -///
        • -///
        • -///

          US West (Oregon)

          -///
        • -///
        • -///

          Asia Pacific (Singapore)

          -///
        • -///
        • -///

          Asia Pacific (Sydney)

          -///
        • -///
        • -///

          Asia Pacific (Tokyo)

          -///
        • -///
        • -///

          Europe (Ireland)

          -///
        • -///
        • -///

          South America (São Paulo)

          -///
        • -///
        -///

        For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

        -///
        -///
      • -///
      -///

      For example, the following x-amz-grant-write header grants -/// create, overwrite, and delete objects permission to LogDelivery group -/// predefined by Amazon S3 and two Amazon Web Services accounts identified by their email -/// addresses.

      -///

      -/// x-amz-grant-write: -/// uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", -/// id="555566667777" -///

      -///
    • -///
    -///

    You can use either a canned ACL or specify access permissions explicitly. You -/// cannot do both.

    -///
    -///
    Grantee Values
    -///
    -///

    You can specify the person (grantee) to whom you're assigning access rights -/// (using request elements) in the following ways:

    -///
      -///
    • -///

      By the person's ID:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> -/// </Grantee> -///

      -///

      DisplayName is optional and ignored in the request

      -///
    • -///
    • -///

      By URI:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> -///

      -///
    • -///
    • -///

      By Email address:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<>&</Grantee> -///

      -///

      The grantee is resolved to the CanonicalUser and, in a response to a GET -/// Object acl request, appears as the CanonicalUser.

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///
    -///
    -///

    The following operations are related to PutBucketAcl:

    -/// -async fn put_bucket_acl(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketAcl is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer Acceleration is a + /// bucket-level feature that enables you to perform faster data transfers to Amazon S3.

    + ///

    To use this operation, you must have permission to perform the + /// s3:PutAccelerateConfiguration action. The bucket owner has this permission + /// by default. The bucket owner can grant this permission to others. For more information + /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    The Transfer Acceleration state of a bucket can be set to one of the following two + /// values:

    + ///
      + ///
    • + ///

      Enabled – Enables accelerated data transfers to the bucket.

      + ///
    • + ///
    • + ///

      Suspended – Disables accelerated data transfers to the bucket.

      + ///
    • + ///
    + ///

    The GetBucketAccelerateConfiguration action returns the transfer acceleration state + /// of a bucket.

    + ///

    After setting the Transfer Acceleration state of a bucket to Enabled, it might take up + /// to thirty minutes before the data transfer rates to the bucket increase.

    + ///

    The name of the bucket used for Transfer Acceleration must be DNS-compliant and must + /// not contain periods (".").

    + ///

    For more information about transfer acceleration, see Transfer + /// Acceleration.

    + ///

    The following operations are related to + /// PutBucketAccelerateConfiguration:

    + /// + async fn put_bucket_accelerate_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketAccelerateConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets an analytics configuration for the bucket (specified by the analytics configuration -/// ID). You can have up to 1,000 analytics configurations per bucket.

    -///

    You can choose to have storage class analysis export analysis reports sent to a -/// comma-separated values (CSV) flat file. See the DataExport request element. -/// Reports are updated daily and are based on the object filters that you configure. When -/// selecting data export, you specify a destination bucket and an optional destination prefix -/// where the file is written. You can export the data to a destination bucket in a different -/// account. However, the destination bucket must be in the same Region as the bucket that you -/// are making the PUT analytics configuration to. For more information, see Amazon S3 -/// Analytics – Storage Class Analysis.

    -/// -///

    You must create a bucket policy on the destination bucket where the exported file is -/// written to grant permissions to Amazon S3 to write objects to the bucket. For an example -/// policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

    -///
    -///

    To use this operation, you must have permissions to perform the -/// s3:PutAnalyticsConfiguration action. The bucket owner has this permission -/// by default. The bucket owner can grant this permission to others. For more information -/// about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    -/// PutBucketAnalyticsConfiguration has the following special errors:

    -///
      -///
    • -///
        -///
      • -///

        -/// HTTP Error: HTTP 400 Bad Request -///

        -///
      • -///
      • -///

        -/// Code: InvalidArgument -///

        -///
      • -///
      • -///

        -/// Cause: Invalid argument. -///

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// HTTP Error: HTTP 400 Bad Request -///

        -///
      • -///
      • -///

        -/// Code: TooManyConfigurations -///

        -///
      • -///
      • -///

        -/// Cause: You are attempting to create a new configuration but have -/// already reached the 1,000-configuration limit. -///

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// HTTP Error: HTTP 403 Forbidden -///

        -///
      • -///
      • -///

        -/// Code: AccessDenied -///

        -///
      • -///
      • -///

        -/// Cause: You are not the owner of the specified bucket, or you do -/// not have the s3:PutAnalyticsConfiguration bucket permission to set the -/// configuration on the bucket. -///

        -///
      • -///
      -///
    • -///
    -///

    The following operations are related to -/// PutBucketAnalyticsConfiguration:

    -/// -async fn put_bucket_analytics_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketAnalyticsConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets the permissions on an existing bucket using access control lists (ACL). For more + /// information, see Using ACLs. To set the ACL of a + /// bucket, you must have the WRITE_ACP permission.

    + ///

    You can use one of the following two ways to set a bucket's permissions:

    + ///
      + ///
    • + ///

      Specify the ACL in the request body

      + ///
    • + ///
    • + ///

      Specify permissions using request headers

      + ///
    • + ///
    + /// + ///

    You cannot specify access permission using both the body and the request + /// headers.

    + ///
    + ///

    Depending on your application needs, you may choose to set the ACL on a bucket using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, then you can continue to use that + /// approach.

    + /// + ///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access to + /// your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return + /// the AccessControlListNotSupported error code. Requests to read ACLs are + /// still supported. For more information, see Controlling object + /// ownership in the Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///

    You can set access permissions by using one of the following methods:

    + ///
      + ///
    • + ///

      Specify a canned ACL with the x-amz-acl request header. Amazon S3 + /// supports a set of predefined ACLs, known as canned + /// ACLs. Each canned ACL has a predefined set of grantees and + /// permissions. Specify the canned ACL name as the value of + /// x-amz-acl. If you use this header, you cannot use other + /// access control-specific headers in your request. For more information, see + /// Canned + /// ACL.

      + ///
    • + ///
    • + ///

      Specify access permissions explicitly with the + /// x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and + /// x-amz-grant-full-control headers. When using these headers, + /// you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 + /// groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use the x-amz-acl header to set a canned + /// ACL. These parameters map to the set of permissions that Amazon S3 supports in an + /// ACL. For more information, see Access Control List (ACL) + /// Overview.

      + ///

      You specify each grantee as a type=value pair, where the type is one of + /// the following:

      + ///
        + ///
      • + ///

        + /// id – if the value specified is the canonical user ID + /// of an Amazon Web Services account

        + ///
      • + ///
      • + ///

        + /// uri – if you are granting permissions to a predefined + /// group

        + ///
      • + ///
      • + ///

        + /// emailAddress – if the value specified is the email + /// address of an Amazon Web Services account

        + /// + ///

        Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

        + ///
          + ///
        • + ///

          US East (N. Virginia)

          + ///
        • + ///
        • + ///

          US West (N. California)

          + ///
        • + ///
        • + ///

          US West (Oregon)

          + ///
        • + ///
        • + ///

          Asia Pacific (Singapore)

          + ///
        • + ///
        • + ///

          Asia Pacific (Sydney)

          + ///
        • + ///
        • + ///

          Asia Pacific (Tokyo)

          + ///
        • + ///
        • + ///

          Europe (Ireland)

          + ///
        • + ///
        • + ///

          South America (São Paulo)

          + ///
        • + ///
        + ///

        For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

        + ///
        + ///
      • + ///
      + ///

      For example, the following x-amz-grant-write header grants + /// create, overwrite, and delete objects permission to LogDelivery group + /// predefined by Amazon S3 and two Amazon Web Services accounts identified by their email + /// addresses.

      + ///

      + /// x-amz-grant-write: + /// uri="http://acs.amazonaws.com/groups/s3/LogDelivery", id="111122223333", + /// id="555566667777" + ///

      + ///
    • + ///
    + ///

    You can use either a canned ACL or specify access permissions explicitly. You + /// cannot do both.

    + ///
    + ///
    Grantee Values
    + ///
    + ///

    You can specify the person (grantee) to whom you're assigning access rights + /// (using request elements) in the following ways:

    + ///
      + ///
    • + ///

      By the person's ID:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> + /// </Grantee> + ///

      + ///

      DisplayName is optional and ignored in the request

      + ///
    • + ///
    • + ///

      By URI:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> + ///

      + ///
    • + ///
    • + ///

      By Email address:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<>&</Grantee> + ///

      + ///

      The grantee is resolved to the CanonicalUser and, in a response to a GET + /// Object acl request, appears as the CanonicalUser.

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///
    + ///
    + ///

    The following operations are related to PutBucketAcl:

    + /// + async fn put_bucket_acl(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketAcl is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets the cors configuration for your bucket. If the configuration exists, -/// Amazon S3 replaces it.

    -///

    To use this operation, you must be allowed to perform the s3:PutBucketCORS -/// action. By default, the bucket owner has this permission and can grant it to others.

    -///

    You set this configuration on a bucket so that the bucket can service cross-origin -/// requests. For example, you might want to enable a request whose origin is -/// http://www.example.com to access your Amazon S3 bucket at -/// my.example.bucket.com by using the browser's XMLHttpRequest -/// capability.

    -///

    To enable cross-origin resource sharing (CORS) on a bucket, you add the -/// cors subresource to the bucket. The cors subresource is an XML -/// document in which you configure rules that identify origins and the HTTP methods that can -/// be executed on your bucket. The document is limited to 64 KB in size.

    -///

    When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a -/// bucket, it evaluates the cors configuration on the bucket and uses the first -/// CORSRule rule that matches the incoming browser request to enable a -/// cross-origin request. For a rule to match, the following conditions must be met:

    -///
      -///
    • -///

      The request's Origin header must match AllowedOrigin -/// elements.

      -///
    • -///
    • -///

      The request method (for example, GET, PUT, HEAD, and so on) or the -/// Access-Control-Request-Method header in case of a pre-flight -/// OPTIONS request must be one of the AllowedMethod -/// elements.

      -///
    • -///
    • -///

      Every header specified in the Access-Control-Request-Headers request -/// header of a pre-flight request must match an AllowedHeader element. -///

      -///
    • -///
    -///

    For more information about CORS, go to Enabling Cross-Origin Resource Sharing in -/// the Amazon S3 User Guide.

    -///

    The following operations are related to PutBucketCors:

    -/// -async fn put_bucket_cors(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketCors is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets an analytics configuration for the bucket (specified by the analytics configuration + /// ID). You can have up to 1,000 analytics configurations per bucket.

    + ///

    You can choose to have storage class analysis export analysis reports sent to a + /// comma-separated values (CSV) flat file. See the DataExport request element. + /// Reports are updated daily and are based on the object filters that you configure. When + /// selecting data export, you specify a destination bucket and an optional destination prefix + /// where the file is written. You can export the data to a destination bucket in a different + /// account. However, the destination bucket must be in the same Region as the bucket that you + /// are making the PUT analytics configuration to. For more information, see Amazon S3 + /// Analytics – Storage Class Analysis.

    + /// + ///

    You must create a bucket policy on the destination bucket where the exported file is + /// written to grant permissions to Amazon S3 to write objects to the bucket. For an example + /// policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

    + ///
    + ///

    To use this operation, you must have permissions to perform the + /// s3:PutAnalyticsConfiguration action. The bucket owner has this permission + /// by default. The bucket owner can grant this permission to others. For more information + /// about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    + /// PutBucketAnalyticsConfiguration has the following special errors:

    + ///
      + ///
    • + ///
        + ///
      • + ///

        + /// HTTP Error: HTTP 400 Bad Request + ///

        + ///
      • + ///
      • + ///

        + /// Code: InvalidArgument + ///

        + ///
      • + ///
      • + ///

        + /// Cause: Invalid argument. + ///

        + ///
      • + ///
      + ///
    • + ///
    • + ///
        + ///
      • + ///

        + /// HTTP Error: HTTP 400 Bad Request + ///

        + ///
      • + ///
      • + ///

        + /// Code: TooManyConfigurations + ///

        + ///
      • + ///
      • + ///

        + /// Cause: You are attempting to create a new configuration but have + /// already reached the 1,000-configuration limit. + ///

        + ///
      • + ///
      + ///
    • + ///
    • + ///
        + ///
      • + ///

        + /// HTTP Error: HTTP 403 Forbidden + ///

        + ///
      • + ///
      • + ///

        + /// Code: AccessDenied + ///

        + ///
      • + ///
      • + ///

        + /// Cause: You are not the owner of the specified bucket, or you do + /// not have the s3:PutAnalyticsConfiguration bucket permission to set the + /// configuration on the bucket. + ///

        + ///
      • + ///
      + ///
    • + ///
    + ///

    The following operations are related to + /// PutBucketAnalyticsConfiguration:

    + /// + async fn put_bucket_analytics_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketAnalyticsConfiguration is not implemented yet")) + } -///

    This operation configures default encryption and Amazon S3 Bucket Keys for an existing -/// bucket.

    -/// -///

    -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///

    By default, all buckets have a default encryption configuration that uses server-side -/// encryption with Amazon S3 managed keys (SSE-S3).

    -/// -///
      -///
    • -///

      -/// General purpose buckets -///

      -///
        -///
      • -///

        You can optionally configure default encryption for a bucket by using -/// server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer -/// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify -/// default encryption by using SSE-KMS, you can also configure Amazon S3 -/// Bucket Keys. For information about the bucket default encryption -/// feature, see Amazon S3 Bucket Default -/// Encryption in the Amazon S3 User Guide.

        -///
      • -///
      • -///

        If you use PutBucketEncryption to set your default bucket -/// encryption to SSE-KMS, you should verify that your KMS key ID -/// is correct. Amazon S3 doesn't validate the KMS key ID provided in -/// PutBucketEncryption requests.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory buckets - You can -/// optionally configure default encryption for a bucket by using server-side -/// encryption with Key Management Service (KMS) keys (SSE-KMS).

      -///
        -///
      • -///

        We recommend that the bucket's default encryption uses the desired -/// encryption configuration and you don't override the bucket default -/// encryption in your CreateSession requests or PUT -/// object requests. Then, new objects are automatically encrypted with the -/// desired encryption settings. -/// For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

        -///
      • -///
      • -///

        Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. -/// The Amazon Web Services managed key (aws/s3) isn't supported. -///

        -///
      • -///
      • -///

        S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or -/// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

        -///
      • -///
      • -///

        When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

        -///
      • -///
      • -///

        For directory buckets, if you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, Amazon S3 validates the -/// KMS key ID provided in PutBucketEncryption requests.

        -///
      • -///
      -///
    • -///
    -///
    -/// -///

    If you're specifying a customer managed KMS key, we recommend using a fully -/// qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the -/// key within the requester’s account. This behavior can result in data that's encrypted -/// with a KMS key that belongs to the requester, and not the bucket owner.

    -///

    Also, this action requires Amazon Web Services Signature Version 4. For more information, see -/// Authenticating -/// Requests (Amazon Web Services Signature Version 4).

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The -/// s3:PutEncryptionConfiguration permission is required in a -/// policy. The bucket owner has this permission by default. The bucket owner -/// can grant this permission to others. For more information about permissions, -/// see Permissions Related to Bucket Operations and Managing Access -/// Permissions to Your Amazon S3 Resources in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// To grant access to this API operation, you must have the -/// s3express:PutEncryptionConfiguration permission in -/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      -///

      To set a directory bucket default encryption with SSE-KMS, you must also -/// have the kms:GenerateDataKey and the kms:Decrypt -/// permissions in IAM identity-based policies and KMS key policies for the -/// target KMS key.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to PutBucketEncryption:

    -/// -async fn put_bucket_encryption(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketEncryption is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets the cors configuration for your bucket. If the configuration exists, + /// Amazon S3 replaces it.

    + ///

    To use this operation, you must be allowed to perform the s3:PutBucketCORS + /// action. By default, the bucket owner has this permission and can grant it to others.

    + ///

    You set this configuration on a bucket so that the bucket can service cross-origin + /// requests. For example, you might want to enable a request whose origin is + /// http://www.example.com to access your Amazon S3 bucket at + /// my.example.bucket.com by using the browser's XMLHttpRequest + /// capability.

    + ///

    To enable cross-origin resource sharing (CORS) on a bucket, you add the + /// cors subresource to the bucket. The cors subresource is an XML + /// document in which you configure rules that identify origins and the HTTP methods that can + /// be executed on your bucket. The document is limited to 64 KB in size.

    + ///

    When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request) against a + /// bucket, it evaluates the cors configuration on the bucket and uses the first + /// CORSRule rule that matches the incoming browser request to enable a + /// cross-origin request. For a rule to match, the following conditions must be met:

    + ///
      + ///
    • + ///

      The request's Origin header must match AllowedOrigin + /// elements.

      + ///
    • + ///
    • + ///

      The request method (for example, GET, PUT, HEAD, and so on) or the + /// Access-Control-Request-Method header in case of a pre-flight + /// OPTIONS request must be one of the AllowedMethod + /// elements.

      + ///
    • + ///
    • + ///

      Every header specified in the Access-Control-Request-Headers request + /// header of a pre-flight request must match an AllowedHeader element. + ///

      + ///
    • + ///
    + ///

    For more information about CORS, go to Enabling Cross-Origin Resource Sharing in + /// the Amazon S3 User Guide.

    + ///

    The following operations are related to PutBucketCors:

    + /// + async fn put_bucket_cors(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketCors is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to -/// 1,000 S3 Intelligent-Tiering configurations per bucket.

    -///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    -///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    -///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    -///

    Operations related to PutBucketIntelligentTieringConfiguration include:

    -/// -/// -///

    You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically -/// move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access -/// or Deep Archive Access tier.

    -///
    -///

    -/// PutBucketIntelligentTieringConfiguration has the following special -/// errors:

    -///
    -///
    HTTP 400 Bad Request Error
    -///
    -///

    -/// Code: InvalidArgument

    -///

    -/// Cause: Invalid Argument

    -///
    -///
    HTTP 400 Bad Request Error
    -///
    -///

    -/// Code: TooManyConfigurations

    -///

    -/// Cause: You are attempting to create a new configuration -/// but have already reached the 1,000-configuration limit.

    -///
    -///
    HTTP 403 Forbidden Error
    -///
    -///

    -/// Cause: You are not the owner of the specified bucket, or -/// you do not have the s3:PutIntelligentTieringConfiguration bucket -/// permission to set the configuration on the bucket.

    -///
    -///
    -async fn put_bucket_intelligent_tiering_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketIntelligentTieringConfiguration is not implemented yet")) -} + ///

    This operation configures default encryption and Amazon S3 Bucket Keys for an existing + /// bucket.

    + /// + ///

    + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///

    By default, all buckets have a default encryption configuration that uses server-side + /// encryption with Amazon S3 managed keys (SSE-S3).

    + /// + ///
      + ///
    • + ///

      + /// General purpose buckets + ///

      + ///
        + ///
      • + ///

        You can optionally configure default encryption for a bucket by using + /// server-side encryption with Key Management Service (KMS) keys (SSE-KMS) or dual-layer + /// server-side encryption with Amazon Web Services KMS keys (DSSE-KMS). If you specify + /// default encryption by using SSE-KMS, you can also configure Amazon S3 + /// Bucket Keys. For information about the bucket default encryption + /// feature, see Amazon S3 Bucket Default + /// Encryption in the Amazon S3 User Guide.

        + ///
      • + ///
      • + ///

        If you use PutBucketEncryption to set your default bucket + /// encryption to SSE-KMS, you should verify that your KMS key ID + /// is correct. Amazon S3 doesn't validate the KMS key ID provided in + /// PutBucketEncryption requests.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory buckets - You can + /// optionally configure default encryption for a bucket by using server-side + /// encryption with Key Management Service (KMS) keys (SSE-KMS).

      + ///
        + ///
      • + ///

        We recommend that the bucket's default encryption uses the desired + /// encryption configuration and you don't override the bucket default + /// encryption in your CreateSession requests or PUT + /// object requests. Then, new objects are automatically encrypted with the + /// desired encryption settings. + /// For more information about the encryption overriding behaviors in directory buckets, see Specifying server-side encryption with KMS for new object uploads.

        + ///
      • + ///
      • + ///

        Your SSE-KMS configuration can only support 1 customer managed key per directory bucket's lifetime. + /// The Amazon Web Services managed key (aws/s3) isn't supported. + ///

        + ///
      • + ///
      • + ///

        S3 Bucket Keys are always enabled for GET and PUT operations in a directory bucket and can’t be disabled. S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through CopyObject, UploadPartCopy, the Copy operation in Batch Operations, or + /// the import jobs. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

        + ///
      • + ///
      • + ///

        When you specify an KMS customer managed key for encryption in your directory bucket, only use the key ID or key ARN. The key alias format of the KMS key isn't supported.

        + ///
      • + ///
      • + ///

        For directory buckets, if you use PutBucketEncryption to set your default bucket encryption to SSE-KMS, Amazon S3 validates the + /// KMS key ID provided in PutBucketEncryption requests.

        + ///
      • + ///
      + ///
    • + ///
    + ///
    + /// + ///

    If you're specifying a customer managed KMS key, we recommend using a fully + /// qualified KMS key ARN. If you use a KMS key alias instead, then KMS resolves the + /// key within the requester’s account. This behavior can result in data that's encrypted + /// with a KMS key that belongs to the requester, and not the bucket owner.

    + ///

    Also, this action requires Amazon Web Services Signature Version 4. For more information, see + /// Authenticating + /// Requests (Amazon Web Services Signature Version 4).

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The + /// s3:PutEncryptionConfiguration permission is required in a + /// policy. The bucket owner has this permission by default. The bucket owner + /// can grant this permission to others. For more information about permissions, + /// see Permissions Related to Bucket Operations and Managing Access + /// Permissions to Your Amazon S3 Resources in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// To grant access to this API operation, you must have the + /// s3express:PutEncryptionConfiguration permission in + /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      + ///

      To set a directory bucket default encryption with SSE-KMS, you must also + /// have the kms:GenerateDataKey and the kms:Decrypt + /// permissions in IAM identity-based policies and KMS key policies for the + /// target KMS key.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to PutBucketEncryption:

    + /// + async fn put_bucket_encryption( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketEncryption is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    This implementation of the PUT action adds an inventory configuration -/// (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory -/// configurations per bucket.

    -///

    Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly -/// basis, and the results are published to a flat file. The bucket that is inventoried is -/// called the source bucket, and the bucket where the inventory flat file -/// is stored is called the destination bucket. The -/// destination bucket must be in the same Amazon Web Services Region as the -/// source bucket.

    -///

    When you configure an inventory for a source bucket, you specify -/// the destination bucket where you want the inventory to be stored, and -/// whether to generate the inventory daily or weekly. You can also configure what object -/// metadata to include and whether to inventory all object versions or only current versions. -/// For more information, see Amazon S3 Inventory in the -/// Amazon S3 User Guide.

    -/// -///

    You must create a bucket policy on the destination bucket to -/// grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an -/// example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

    -///
    -///
    -///
    Permissions
    -///
    -///

    To use this operation, you must have permission to perform the -/// s3:PutInventoryConfiguration action. The bucket owner has this -/// permission by default and can grant this permission to others.

    -///

    The s3:PutInventoryConfiguration permission allows a user to -/// create an S3 Inventory -/// report that includes all object metadata fields available and to specify the -/// destination bucket to store the inventory. A user with read access to objects in -/// the destination bucket can also access all object metadata fields that are -/// available in the inventory report.

    -///

    To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the -/// Amazon S3 User Guide. For more information about the metadata -/// fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For -/// more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the -/// Amazon S3 User Guide.

    -///
    -///
    -///

    -/// PutBucketInventoryConfiguration has the following special errors:

    -///
    -///
    HTTP 400 Bad Request Error
    -///
    -///

    -/// Code: InvalidArgument

    -///

    -/// Cause: Invalid Argument

    -///
    -///
    HTTP 400 Bad Request Error
    -///
    -///

    -/// Code: TooManyConfigurations

    -///

    -/// Cause: You are attempting to create a new configuration -/// but have already reached the 1,000-configuration limit.

    -///
    -///
    HTTP 403 Forbidden Error
    -///
    -///

    -/// Cause: You are not the owner of the specified bucket, or -/// you do not have the s3:PutInventoryConfiguration bucket permission to -/// set the configuration on the bucket.

    -///
    -///
    -///

    The following operations are related to -/// PutBucketInventoryConfiguration:

    -/// -async fn put_bucket_inventory_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketInventoryConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Puts a S3 Intelligent-Tiering configuration to the specified bucket. You can have up to + /// 1,000 S3 Intelligent-Tiering configurations per bucket.

    + ///

    The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without performance impact or operational overhead. S3 Intelligent-Tiering delivers automatic cost savings in three low latency and high throughput access tiers. To get the lowest storage cost on data that can be accessed in minutes to hours, you can choose to activate additional archiving capabilities.

    + ///

    The S3 Intelligent-Tiering storage class is the ideal storage class for data with unknown, changing, or unpredictable access patterns, independent of object size or retention period. If the size of an object is less than 128 KB, it is not monitored and not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the Frequent Access tier rates in the S3 Intelligent-Tiering storage class.

    + ///

    For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

    + ///

    Operations related to PutBucketIntelligentTieringConfiguration include:

    + /// + /// + ///

    You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically + /// move objects stored in the S3 Intelligent-Tiering storage class to the Archive Access + /// or Deep Archive Access tier.

    + ///
    + ///

    + /// PutBucketIntelligentTieringConfiguration has the following special + /// errors:

    + ///
    + ///
    HTTP 400 Bad Request Error
    + ///
    + ///

    + /// Code: InvalidArgument

    + ///

    + /// Cause: Invalid Argument

    + ///
    + ///
    HTTP 400 Bad Request Error
    + ///
    + ///

    + /// Code: TooManyConfigurations

    + ///

    + /// Cause: You are attempting to create a new configuration + /// but have already reached the 1,000-configuration limit.

    + ///
    + ///
    HTTP 403 Forbidden Error
    + ///
    + ///

    + /// Cause: You are not the owner of the specified bucket, or + /// you do not have the s3:PutIntelligentTieringConfiguration bucket + /// permission to set the configuration on the bucket.

    + ///
    + ///
    + async fn put_bucket_intelligent_tiering_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!( + NotImplemented, + "PutBucketIntelligentTieringConfiguration is not implemented yet" + )) + } -///

    Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle -/// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, -/// so if you want to retain any configuration details, they must be included in the new -/// lifecycle configuration. For information about lifecycle configuration, see Managing -/// your storage lifecycle.

    -/// -///

    Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. -/// For the related API description, see PutBucketLifecycle.

    -///
    -///
    -///
    Rules
    -///
    Permissions
    -///
    HTTP Host header syntax
    -///
    -///

    You specify the lifecycle configuration in your request body. The lifecycle -/// configuration is specified as XML consisting of one or more rules. An Amazon S3 -/// Lifecycle configuration can have up to 1,000 rules. This limit is not -/// adjustable.

    -///

    Bucket lifecycle configuration supports specifying a lifecycle rule using an -/// object key name prefix, one or more object tags, object size, or any combination -/// of these. Accordingly, this section describes the latest API. The previous version -/// of the API supported filtering based only on an object key name prefix, which is -/// supported for backward compatibility for general purpose buckets. For the related -/// API description, see PutBucketLifecycle.

    -/// -///

    Lifecyle configurations for directory buckets only support expiring objects and -/// cancelling multipart uploads. Expiring of versioned objects,transitions and tag -/// filters are not supported.

    -///
    -///

    A lifecycle rule consists of the following:

    -///
      -///
    • -///

      A filter identifying a subset of objects to which the rule applies. The -/// filter can be based on a key name prefix, object tags, object size, or any -/// combination of these.

      -///
    • -///
    • -///

      A status indicating whether the rule is in effect.

      -///
    • -///
    • -///

      One or more lifecycle transition and expiration actions that you want -/// Amazon S3 to perform on the objects identified by the filter. If the state of -/// your bucket is versioning-enabled or versioning-suspended, you can have many -/// versions of the same object (one current version and zero or more noncurrent -/// versions). Amazon S3 provides predefined actions that you can specify for current -/// and noncurrent object versions.

      -///
    • -///
    -///

    For more information, see Object Lifecycle -/// Management and Lifecycle Configuration -/// Elements.

    -///
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - By -/// default, all Amazon S3 resources are private, including buckets, objects, and -/// related subresources (for example, lifecycle configuration and website -/// configuration). Only the resource owner (that is, the Amazon Web Services account that -/// created it) can access the resource. The resource owner can optionally grant -/// access permissions to others by writing an access policy. For this -/// operation, a user must have the s3:PutLifecycleConfiguration -/// permission.

      -///

      You can also explicitly deny permissions. An explicit deny also -/// supersedes any other permissions. If you want to block users or accounts -/// from removing or deleting objects from your bucket, you must deny them -/// permissions for the following actions:

      -/// -///
    • -///
    -///
      -///
    • -///

      -/// Directory bucket permissions - -/// You must have the s3express:PutLifecycleConfiguration -/// permission in an IAM identity-based policy to use this operation. -/// Cross-account access to this API operation isn't supported. The resource -/// owner can optionally grant access permissions to others by creating a role -/// or user for them as long as they are within the same account as the owner -/// and resource.

      -///

      For more information about directory bucket policies and permissions, see -/// Authorizing Regional endpoint APIs with IAM in the -/// Amazon S3 User Guide.

      -/// -///

      -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
      -///
    • -///
    -///
    -///
    -///

    -/// Directory buckets - The HTTP Host -/// header syntax is -/// s3express-control.region.amazonaws.com.

    -///

    The following operations are related to -/// PutBucketLifecycleConfiguration:

    -/// -///
    -///
    -async fn put_bucket_lifecycle_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketLifecycleConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    This implementation of the PUT action adds an inventory configuration + /// (identified by the inventory ID) to the bucket. You can have up to 1,000 inventory + /// configurations per bucket.

    + ///

    Amazon S3 inventory generates inventories of the objects in the bucket on a daily or weekly + /// basis, and the results are published to a flat file. The bucket that is inventoried is + /// called the source bucket, and the bucket where the inventory flat file + /// is stored is called the destination bucket. The + /// destination bucket must be in the same Amazon Web Services Region as the + /// source bucket.

    + ///

    When you configure an inventory for a source bucket, you specify + /// the destination bucket where you want the inventory to be stored, and + /// whether to generate the inventory daily or weekly. You can also configure what object + /// metadata to include and whether to inventory all object versions or only current versions. + /// For more information, see Amazon S3 Inventory in the + /// Amazon S3 User Guide.

    + /// + ///

    You must create a bucket policy on the destination bucket to + /// grant permissions to Amazon S3 to write objects to the bucket in the defined location. For an + /// example policy, see Granting Permissions for Amazon S3 Inventory and Storage Class Analysis.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///

    To use this operation, you must have permission to perform the + /// s3:PutInventoryConfiguration action. The bucket owner has this + /// permission by default and can grant this permission to others.

    + ///

    The s3:PutInventoryConfiguration permission allows a user to + /// create an S3 Inventory + /// report that includes all object metadata fields available and to specify the + /// destination bucket to store the inventory. A user with read access to objects in + /// the destination bucket can also access all object metadata fields that are + /// available in the inventory report.

    + ///

    To restrict access to an inventory report, see Restricting access to an Amazon S3 Inventory report in the + /// Amazon S3 User Guide. For more information about the metadata + /// fields available in S3 Inventory, see Amazon S3 Inventory lists in the Amazon S3 User Guide. For + /// more information about permissions, see Permissions related to bucket subresource operations and Identity and access management in Amazon S3 in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///

    + /// PutBucketInventoryConfiguration has the following special errors:

    + ///
    + ///
    HTTP 400 Bad Request Error
    + ///
    + ///

    + /// Code: InvalidArgument

    + ///

    + /// Cause: Invalid Argument

    + ///
    + ///
    HTTP 400 Bad Request Error
    + ///
    + ///

    + /// Code: TooManyConfigurations

    + ///

    + /// Cause: You are attempting to create a new configuration + /// but have already reached the 1,000-configuration limit.

    + ///
    + ///
    HTTP 403 Forbidden Error
    + ///
    + ///

    + /// Cause: You are not the owner of the specified bucket, or + /// you do not have the s3:PutInventoryConfiguration bucket permission to + /// set the configuration on the bucket.

    + ///
    + ///
    + ///

    The following operations are related to + /// PutBucketInventoryConfiguration:

    + /// + async fn put_bucket_inventory_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketInventoryConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Set the logging parameters for a bucket and to specify permissions for who can view and -/// modify the logging parameters. All logs are saved to buckets in the same Amazon Web Services Region as -/// the source bucket. To set the logging status of a bucket, you must be the bucket -/// owner.

    -///

    The bucket owner is automatically granted FULL_CONTROL to all logs. You use the -/// Grantee request element to grant access to other people. The -/// Permissions request element specifies the kind of access the grantee has to -/// the logs.

    -/// -///

    If the target bucket for log delivery uses the bucket owner enforced setting for S3 -/// Object Ownership, you can't use the Grantee request element to grant access -/// to others. Permissions can only be granted using policies. For more information, see -/// Permissions for server access log delivery in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Grantee Values
    -///
    -///

    You can specify the person (grantee) to whom you're assigning access rights (by -/// using request elements) in the following ways:

    -///
      -///
    • -///

      By the person's ID:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> -/// </Grantee> -///

      -///

      -/// DisplayName is optional and ignored in the request.

      -///
    • -///
    • -///

      By Email address:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<></Grantee> -///

      -///

      The grantee is resolved to the CanonicalUser and, in a -/// response to a GETObjectAcl request, appears as the -/// CanonicalUser.

      -///
    • -///
    • -///

      By URI:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> -///

      -///
    • -///
    -///
    -///
    -///

    To enable logging, you use LoggingEnabled and its children request -/// elements. To disable logging, you use an empty BucketLoggingStatus request -/// element:

    -///

    -/// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" -/// /> -///

    -///

    For more information about server access logging, see Server Access Logging in the -/// Amazon S3 User Guide.

    -///

    For more information about creating a bucket, see CreateBucket. For more -/// information about returning the logging status of a bucket, see GetBucketLogging.

    -///

    The following operations are related to PutBucketLogging:

    -/// -async fn put_bucket_logging(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketLogging is not implemented yet")) -} + ///

    Creates a new lifecycle configuration for the bucket or replaces an existing lifecycle + /// configuration. Keep in mind that this will overwrite an existing lifecycle configuration, + /// so if you want to retain any configuration details, they must be included in the new + /// lifecycle configuration. For information about lifecycle configuration, see Managing + /// your storage lifecycle.

    + /// + ///

    Bucket lifecycle configuration now supports specifying a lifecycle rule using an object key name prefix, one or more object tags, object size, or any combination of these. Accordingly, this section describes the latest API. The previous version of the API supported filtering based only on an object key name prefix, which is supported for backward compatibility. + /// For the related API description, see PutBucketLifecycle.

    + ///
    + ///
    + ///
    Rules
    + ///
    Permissions
    + ///
    HTTP Host header syntax
    + ///
    + ///

    You specify the lifecycle configuration in your request body. The lifecycle + /// configuration is specified as XML consisting of one or more rules. An Amazon S3 + /// Lifecycle configuration can have up to 1,000 rules. This limit is not + /// adjustable.

    + ///

    Bucket lifecycle configuration supports specifying a lifecycle rule using an + /// object key name prefix, one or more object tags, object size, or any combination + /// of these. Accordingly, this section describes the latest API. The previous version + /// of the API supported filtering based only on an object key name prefix, which is + /// supported for backward compatibility for general purpose buckets. For the related + /// API description, see PutBucketLifecycle.

    + /// + ///

    Lifecyle configurations for directory buckets only support expiring objects and + /// cancelling multipart uploads. Expiring of versioned objects,transitions and tag + /// filters are not supported.

    + ///
    + ///

    A lifecycle rule consists of the following:

    + ///
      + ///
    • + ///

      A filter identifying a subset of objects to which the rule applies. The + /// filter can be based on a key name prefix, object tags, object size, or any + /// combination of these.

      + ///
    • + ///
    • + ///

      A status indicating whether the rule is in effect.

      + ///
    • + ///
    • + ///

      One or more lifecycle transition and expiration actions that you want + /// Amazon S3 to perform on the objects identified by the filter. If the state of + /// your bucket is versioning-enabled or versioning-suspended, you can have many + /// versions of the same object (one current version and zero or more noncurrent + /// versions). Amazon S3 provides predefined actions that you can specify for current + /// and noncurrent object versions.

      + ///
    • + ///
    + ///

    For more information, see Object Lifecycle + /// Management and Lifecycle Configuration + /// Elements.

    + ///
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - By + /// default, all Amazon S3 resources are private, including buckets, objects, and + /// related subresources (for example, lifecycle configuration and website + /// configuration). Only the resource owner (that is, the Amazon Web Services account that + /// created it) can access the resource. The resource owner can optionally grant + /// access permissions to others by writing an access policy. For this + /// operation, a user must have the s3:PutLifecycleConfiguration + /// permission.

      + ///

      You can also explicitly deny permissions. An explicit deny also + /// supersedes any other permissions. If you want to block users or accounts + /// from removing or deleting objects from your bucket, you must deny them + /// permissions for the following actions:

      + /// + ///
    • + ///
    + ///
      + ///
    • + ///

      + /// Directory bucket permissions - + /// You must have the s3express:PutLifecycleConfiguration + /// permission in an IAM identity-based policy to use this operation. + /// Cross-account access to this API operation isn't supported. The resource + /// owner can optionally grant access permissions to others by creating a role + /// or user for them as long as they are within the same account as the owner + /// and resource.

      + ///

      For more information about directory bucket policies and permissions, see + /// Authorizing Regional endpoint APIs with IAM in the + /// Amazon S3 User Guide.

      + /// + ///

      + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
      + ///
    • + ///
    + ///
    + ///
    + ///

    + /// Directory buckets - The HTTP Host + /// header syntax is + /// s3express-control.region.amazonaws.com.

    + ///

    The following operations are related to + /// PutBucketLifecycleConfiguration:

    + /// + ///
    + ///
    + async fn put_bucket_lifecycle_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketLifecycleConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. -/// You can have up to 1,000 metrics configurations per bucket. If you're updating an existing -/// metrics configuration, note that this is a full replacement of the existing metrics -/// configuration. If you don't include the elements you want to keep, they are erased.

    -///

    To use this operation, you must have permissions to perform the -/// s3:PutMetricsConfiguration action. The bucket owner has this permission by -/// default. The bucket owner can grant this permission to others. For more information about -/// permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring -/// Metrics with Amazon CloudWatch.

    -///

    The following operations are related to -/// PutBucketMetricsConfiguration:

    -/// -///

    -/// PutBucketMetricsConfiguration has the following special error:

    -///
      -///
    • -///

      Error code: TooManyConfigurations -///

      -///
        -///
      • -///

        Description: You are attempting to create a new configuration but have -/// already reached the 1,000-configuration limit.

        -///
      • -///
      • -///

        HTTP Status Code: HTTP 400 Bad Request

        -///
      • -///
      -///
    • -///
    -async fn put_bucket_metrics_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketMetricsConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Set the logging parameters for a bucket and to specify permissions for who can view and + /// modify the logging parameters. All logs are saved to buckets in the same Amazon Web Services Region as + /// the source bucket. To set the logging status of a bucket, you must be the bucket + /// owner.

    + ///

    The bucket owner is automatically granted FULL_CONTROL to all logs. You use the + /// Grantee request element to grant access to other people. The + /// Permissions request element specifies the kind of access the grantee has to + /// the logs.

    + /// + ///

    If the target bucket for log delivery uses the bucket owner enforced setting for S3 + /// Object Ownership, you can't use the Grantee request element to grant access + /// to others. Permissions can only be granted using policies. For more information, see + /// Permissions for server access log delivery in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Grantee Values
    + ///
    + ///

    You can specify the person (grantee) to whom you're assigning access rights (by + /// using request elements) in the following ways:

    + ///
      + ///
    • + ///

      By the person's ID:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> + /// </Grantee> + ///

      + ///

      + /// DisplayName is optional and ignored in the request.

      + ///
    • + ///
    • + ///

      By Email address:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<></Grantee> + ///

      + ///

      The grantee is resolved to the CanonicalUser and, in a + /// response to a GETObjectAcl request, appears as the + /// CanonicalUser.

      + ///
    • + ///
    • + ///

      By URI:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> + ///

      + ///
    • + ///
    + ///
    + ///
    + ///

    To enable logging, you use LoggingEnabled and its children request + /// elements. To disable logging, you use an empty BucketLoggingStatus request + /// element:

    + ///

    + /// <BucketLoggingStatus xmlns="http://doc.s3.amazonaws.com/2006-03-01" + /// /> + ///

    + ///

    For more information about server access logging, see Server Access Logging in the + /// Amazon S3 User Guide.

    + ///

    For more information about creating a bucket, see CreateBucket. For more + /// information about returning the logging status of a bucket, see GetBucketLogging.

    + ///

    The following operations are related to PutBucketLogging:

    + /// + async fn put_bucket_logging(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketLogging is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Enables notifications of specified events for a bucket. For more information about event -/// notifications, see Configuring Event -/// Notifications.

    -///

    Using this API, you can replace an existing notification configuration. The -/// configuration is an XML file that defines the event types that you want Amazon S3 to publish and -/// the destination where you want Amazon S3 to publish an event notification when it detects an -/// event of the specified type.

    -///

    By default, your bucket has no event notifications configured. That is, the notification -/// configuration will be an empty NotificationConfiguration.

    -///

    -/// <NotificationConfiguration> -///

    -///

    -/// </NotificationConfiguration> -///

    -///

    This action replaces the existing notification configuration with the configuration you -/// include in the request body.

    -///

    After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification -/// Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and -/// that the bucket owner has permission to publish to it by sending a test notification. In -/// the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions -/// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information, -/// see Configuring Notifications for Amazon S3 Events.

    -///

    You can disable notifications by adding the empty NotificationConfiguration -/// element.

    -///

    For more information about the number of event notification configurations that you can -/// create per bucket, see Amazon S3 service quotas in Amazon Web Services -/// General Reference.

    -///

    By default, only the bucket owner can configure notifications on a bucket. However, -/// bucket owners can use a bucket policy to grant permission to other users to set this -/// configuration with the required s3:PutBucketNotification permission.

    -/// -///

    The PUT notification is an atomic operation. For example, suppose your notification -/// configuration includes SNS topic, SQS queue, and Lambda function configurations. When -/// you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS -/// topic. If the message fails, the entire PUT action will fail, and Amazon S3 will not add the -/// configuration to your bucket.

    -///
    -///

    If the configuration in the request body includes only one -/// TopicConfiguration specifying only the -/// s3:ReducedRedundancyLostObject event type, the response will also include -/// the x-amz-sns-test-message-id header containing the message ID of the test -/// notification sent to the topic.

    -///

    The following action is related to -/// PutBucketNotificationConfiguration:

    -/// -async fn put_bucket_notification_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketNotificationConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets a metrics configuration (specified by the metrics configuration ID) for the bucket. + /// You can have up to 1,000 metrics configurations per bucket. If you're updating an existing + /// metrics configuration, note that this is a full replacement of the existing metrics + /// configuration. If you don't include the elements you want to keep, they are erased.

    + ///

    To use this operation, you must have permissions to perform the + /// s3:PutMetricsConfiguration action. The bucket owner has this permission by + /// default. The bucket owner can grant this permission to others. For more information about + /// permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    For information about CloudWatch request metrics for Amazon S3, see Monitoring + /// Metrics with Amazon CloudWatch.

    + ///

    The following operations are related to + /// PutBucketMetricsConfiguration:

    + /// + ///

    + /// PutBucketMetricsConfiguration has the following special error:

    + ///
      + ///
    • + ///

      Error code: TooManyConfigurations + ///

      + ///
        + ///
      • + ///

        Description: You are attempting to create a new configuration but have + /// already reached the 1,000-configuration limit.

        + ///
      • + ///
      • + ///

        HTTP Status Code: HTTP 400 Bad Request

        + ///
      • + ///
      + ///
    • + ///
    + async fn put_bucket_metrics_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketMetricsConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this -/// operation, you must have the s3:PutBucketOwnershipControls permission. For -/// more information about Amazon S3 permissions, see Specifying permissions in a -/// policy.

    -///

    For information about Amazon S3 Object Ownership, see Using object -/// ownership.

    -///

    The following operations are related to PutBucketOwnershipControls:

    -/// -async fn put_bucket_ownership_controls(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketOwnershipControls is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Enables notifications of specified events for a bucket. For more information about event + /// notifications, see Configuring Event + /// Notifications.

    + ///

    Using this API, you can replace an existing notification configuration. The + /// configuration is an XML file that defines the event types that you want Amazon S3 to publish and + /// the destination where you want Amazon S3 to publish an event notification when it detects an + /// event of the specified type.

    + ///

    By default, your bucket has no event notifications configured. That is, the notification + /// configuration will be an empty NotificationConfiguration.

    + ///

    + /// <NotificationConfiguration> + ///

    + ///

    + /// </NotificationConfiguration> + ///

    + ///

    This action replaces the existing notification configuration with the configuration you + /// include in the request body.

    + ///

    After Amazon S3 receives this request, it first verifies that any Amazon Simple Notification + /// Service (Amazon SNS) or Amazon Simple Queue Service (Amazon SQS) destination exists, and + /// that the bucket owner has permission to publish to it by sending a test notification. In + /// the case of Lambda destinations, Amazon S3 verifies that the Lambda function permissions + /// grant Amazon S3 permission to invoke the function from the Amazon S3 bucket. For more information, + /// see Configuring Notifications for Amazon S3 Events.

    + ///

    You can disable notifications by adding the empty NotificationConfiguration + /// element.

    + ///

    For more information about the number of event notification configurations that you can + /// create per bucket, see Amazon S3 service quotas in Amazon Web Services + /// General Reference.

    + ///

    By default, only the bucket owner can configure notifications on a bucket. However, + /// bucket owners can use a bucket policy to grant permission to other users to set this + /// configuration with the required s3:PutBucketNotification permission.

    + /// + ///

    The PUT notification is an atomic operation. For example, suppose your notification + /// configuration includes SNS topic, SQS queue, and Lambda function configurations. When + /// you send a PUT request with this configuration, Amazon S3 sends test messages to your SNS + /// topic. If the message fails, the entire PUT action will fail, and Amazon S3 will not add the + /// configuration to your bucket.

    + ///
    + ///

    If the configuration in the request body includes only one + /// TopicConfiguration specifying only the + /// s3:ReducedRedundancyLostObject event type, the response will also include + /// the x-amz-sns-test-message-id header containing the message ID of the test + /// notification sent to the topic.

    + ///

    The following action is related to + /// PutBucketNotificationConfiguration:

    + /// + async fn put_bucket_notification_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketNotificationConfiguration is not implemented yet")) + } -///

    Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

    -/// -///

    -/// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name -/// . Virtual-hosted-style requests aren't supported. -/// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///

    If you are using an identity other than the root user of the Amazon Web Services account that -/// owns the bucket, the calling identity must both have the -/// PutBucketPolicy permissions on the specified bucket and belong to -/// the bucket owner's account in order to use this operation.

    -///

    If you don't have PutBucketPolicy permissions, Amazon S3 returns a -/// 403 Access Denied error. If you have the correct permissions, but -/// you're not using an identity that belongs to the bucket owner's account, Amazon S3 -/// returns a 405 Method Not Allowed error.

    -/// -///

    To ensure that bucket owners don't inadvertently lock themselves out of -/// their own buckets, the root principal in a bucket owner's Amazon Web Services account can -/// perform the GetBucketPolicy, PutBucketPolicy, and -/// DeleteBucketPolicy API actions, even if their bucket policy -/// explicitly denies the root principal's access. Bucket owner root principals can -/// only be blocked from performing these API actions by VPC endpoint policies and -/// Amazon Web Services Organizations policies.

    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The -/// s3:PutBucketPolicy permission is required in a policy. For -/// more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// To grant access to this API operation, you must have the -/// s3express:PutBucketPolicy permission in -/// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. -/// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    Example bucket policies
    -///
    -///

    -/// General purpose buckets example bucket policies -/// - See Bucket policy -/// examples in the Amazon S3 User Guide.

    -///

    -/// Directory bucket example bucket policies -/// - See Example bucket policies for S3 Express One Zone in the -/// Amazon S3 User Guide.

    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to PutBucketPolicy:

    -/// -async fn put_bucket_policy(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketPolicy is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this + /// operation, you must have the s3:PutBucketOwnershipControls permission. For + /// more information about Amazon S3 permissions, see Specifying permissions in a + /// policy.

    + ///

    For information about Amazon S3 Object Ownership, see Using object + /// ownership.

    + ///

    The following operations are related to PutBucketOwnershipControls:

    + /// + async fn put_bucket_ownership_controls( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketOwnershipControls is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Creates a replication configuration or replaces an existing one. For more information, -/// see Replication in the Amazon S3 User Guide.

    -///

    Specify the replication configuration in the request body. In the replication -/// configuration, you provide the name of the destination bucket or buckets where you want -/// Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your -/// behalf, and other relevant information. You can invoke this request for a specific Amazon Web Services -/// Region by using the -/// aws:RequestedRegion -/// condition key.

    -///

    A replication configuration must include at least one rule, and can contain a maximum of -/// 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in -/// the source bucket. To choose additional subsets of objects to replicate, add a rule for -/// each subset.

    -///

    To specify a subset of the objects in the source bucket to apply a replication rule to, -/// add the Filter element as a child of the Rule element. You can filter objects based on an -/// object key prefix, one or more object tags, or both. When you add the Filter element in the -/// configuration, you must also add the following elements: -/// DeleteMarkerReplication, Status, and -/// Priority.

    -/// -///

    If you are using an earlier version of the replication configuration, Amazon S3 handles -/// replication of delete markers differently. For more information, see Backward Compatibility.

    -///
    -///

    For information about enabling versioning on a bucket, see Using Versioning.

    -///
    -///
    Handling Replication of Encrypted Objects
    -///
    -///

    By default, Amazon S3 doesn't replicate objects that are stored at rest using -/// server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, -/// add the following: SourceSelectionCriteria, -/// SseKmsEncryptedObjects, Status, -/// EncryptionConfiguration, and ReplicaKmsKeyID. For -/// information about replication configuration, see Replicating -/// Objects Created with SSE Using KMS keys.

    -///

    For information on PutBucketReplication errors, see List of -/// replication-related error codes -///

    -///
    -///
    Permissions
    -///
    -///

    To create a PutBucketReplication request, you must have -/// s3:PutReplicationConfiguration permissions for the bucket. -/// -///

    -///

    By default, a resource owner, in this case the Amazon Web Services account that created the -/// bucket, can perform this operation. The resource owner can also grant others -/// permissions to perform the operation. For more information about permissions, see -/// Specifying Permissions in -/// a Policy and Managing Access -/// Permissions to Your Amazon S3 Resources.

    -/// -///

    To perform this operation, the user or role performing the action must have -/// the iam:PassRole -/// permission.

    -///
    -///
    -///
    -///

    The following operations are related to PutBucketReplication:

    -/// -async fn put_bucket_replication(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketReplication is not implemented yet")) -} + ///

    Applies an Amazon S3 bucket policy to an Amazon S3 bucket.

    + /// + ///

    + /// Directory buckets - For directory buckets, you must make requests for this API operation to the Regional endpoint. These endpoints support path-style requests in the format https://s3express-control.region-code.amazonaws.com/bucket-name + /// . Virtual-hosted-style requests aren't supported. + /// For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///

    If you are using an identity other than the root user of the Amazon Web Services account that + /// owns the bucket, the calling identity must both have the + /// PutBucketPolicy permissions on the specified bucket and belong to + /// the bucket owner's account in order to use this operation.

    + ///

    If you don't have PutBucketPolicy permissions, Amazon S3 returns a + /// 403 Access Denied error. If you have the correct permissions, but + /// you're not using an identity that belongs to the bucket owner's account, Amazon S3 + /// returns a 405 Method Not Allowed error.

    + /// + ///

    To ensure that bucket owners don't inadvertently lock themselves out of + /// their own buckets, the root principal in a bucket owner's Amazon Web Services account can + /// perform the GetBucketPolicy, PutBucketPolicy, and + /// DeleteBucketPolicy API actions, even if their bucket policy + /// explicitly denies the root principal's access. Bucket owner root principals can + /// only be blocked from performing these API actions by VPC endpoint policies and + /// Amazon Web Services Organizations policies.

    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The + /// s3:PutBucketPolicy permission is required in a policy. For + /// more information about general purpose buckets bucket policies, see Using Bucket Policies and User Policies in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// To grant access to this API operation, you must have the + /// s3express:PutBucketPolicy permission in + /// an IAM identity-based policy instead of a bucket policy. Cross-account access to this API operation isn't supported. This operation can only be performed by the Amazon Web Services account that owns the resource. + /// For more information about directory bucket policies and permissions, see Amazon Web Services Identity and Access Management (IAM) for S3 Express One Zone in the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    Example bucket policies
    + ///
    + ///

    + /// General purpose buckets example bucket policies + /// - See Bucket policy + /// examples in the Amazon S3 User Guide.

    + ///

    + /// Directory bucket example bucket policies + /// - See Example bucket policies for S3 Express One Zone in the + /// Amazon S3 User Guide.

    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is s3express-control.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to PutBucketPolicy:

    + /// + async fn put_bucket_policy(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketPolicy is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets the request payment configuration for a bucket. By default, the bucket owner pays -/// for downloads from the bucket. This configuration parameter enables the bucket owner (only) -/// to specify that the person requesting the download will be charged for the download. For -/// more information, see Requester Pays -/// Buckets.

    -///

    The following operations are related to PutBucketRequestPayment:

    -/// -async fn put_bucket_request_payment(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketRequestPayment is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Creates a replication configuration or replaces an existing one. For more information, + /// see Replication in the Amazon S3 User Guide.

    + ///

    Specify the replication configuration in the request body. In the replication + /// configuration, you provide the name of the destination bucket or buckets where you want + /// Amazon S3 to replicate objects, the IAM role that Amazon S3 can assume to replicate objects on your + /// behalf, and other relevant information. You can invoke this request for a specific Amazon Web Services + /// Region by using the + /// aws:RequestedRegion + /// condition key.

    + ///

    A replication configuration must include at least one rule, and can contain a maximum of + /// 1,000. Each rule identifies a subset of objects to replicate by filtering the objects in + /// the source bucket. To choose additional subsets of objects to replicate, add a rule for + /// each subset.

    + ///

    To specify a subset of the objects in the source bucket to apply a replication rule to, + /// add the Filter element as a child of the Rule element. You can filter objects based on an + /// object key prefix, one or more object tags, or both. When you add the Filter element in the + /// configuration, you must also add the following elements: + /// DeleteMarkerReplication, Status, and + /// Priority.

    + /// + ///

    If you are using an earlier version of the replication configuration, Amazon S3 handles + /// replication of delete markers differently. For more information, see Backward Compatibility.

    + ///
    + ///

    For information about enabling versioning on a bucket, see Using Versioning.

    + ///
    + ///
    Handling Replication of Encrypted Objects
    + ///
    + ///

    By default, Amazon S3 doesn't replicate objects that are stored at rest using + /// server-side encryption with KMS keys. To replicate Amazon Web Services KMS-encrypted objects, + /// add the following: SourceSelectionCriteria, + /// SseKmsEncryptedObjects, Status, + /// EncryptionConfiguration, and ReplicaKmsKeyID. For + /// information about replication configuration, see Replicating + /// Objects Created with SSE Using KMS keys.

    + ///

    For information on PutBucketReplication errors, see List of + /// replication-related error codes + ///

    + ///
    + ///
    Permissions
    + ///
    + ///

    To create a PutBucketReplication request, you must have + /// s3:PutReplicationConfiguration permissions for the bucket. + /// + ///

    + ///

    By default, a resource owner, in this case the Amazon Web Services account that created the + /// bucket, can perform this operation. The resource owner can also grant others + /// permissions to perform the operation. For more information about permissions, see + /// Specifying Permissions in + /// a Policy and Managing Access + /// Permissions to Your Amazon S3 Resources.

    + /// + ///

    To perform this operation, the user or role performing the action must have + /// the iam:PassRole + /// permission.

    + ///
    + ///
    + ///
    + ///

    The following operations are related to PutBucketReplication:

    + /// + async fn put_bucket_replication( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketReplication is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets the tags for a bucket.

    -///

    Use tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this, -/// sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost -/// of combined resources, organize your billing information according to resources with the -/// same tag key values. For example, you can tag several resources with a specific application -/// name, and then organize your billing information to see the total cost of that application -/// across several services. For more information, see Cost Allocation and -/// Tagging and Using Cost Allocation in Amazon S3 -/// Bucket Tags.

    -/// -///

    When this operation sets the tags for a bucket, it will overwrite any current tags -/// the bucket already has. You cannot use this operation to add tags to an existing list of -/// tags.

    -///
    -///

    To use this operation, you must have permissions to perform the -/// s3:PutBucketTagging action. The bucket owner has this permission by default -/// and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing -/// Access Permissions to Your Amazon S3 Resources.

    -///

    -/// PutBucketTagging has the following special errors. For more Amazon S3 errors -/// see, Error -/// Responses.

    -///
      -///
    • -///

      -/// InvalidTag - The tag provided was not a valid tag. This error -/// can occur if the tag did not pass input validation. For more information, see Using -/// Cost Allocation in Amazon S3 Bucket Tags.

      -///
    • -///
    • -///

      -/// MalformedXML - The XML provided does not match the -/// schema.

      -///
    • -///
    • -///

      -/// OperationAborted - A conflicting conditional action is -/// currently in progress against this resource. Please try again.

      -///
    • -///
    • -///

      -/// InternalError - The service was unable to apply the provided -/// tag to the bucket.

      -///
    • -///
    -///

    The following operations are related to PutBucketTagging:

    -/// -async fn put_bucket_tagging(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketTagging is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets the request payment configuration for a bucket. By default, the bucket owner pays + /// for downloads from the bucket. This configuration parameter enables the bucket owner (only) + /// to specify that the person requesting the download will be charged for the download. For + /// more information, see Requester Pays + /// Buckets.

    + ///

    The following operations are related to PutBucketRequestPayment:

    + /// + async fn put_bucket_request_payment( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketRequestPayment is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -/// -///

    When you enable versioning on a bucket for the first time, it might take a short -/// amount of time for the change to be fully propagated. While this change is propagating, -/// you might encounter intermittent HTTP 404 NoSuchKey errors for requests to -/// objects created or updated after enabling versioning. We recommend that you wait for 15 -/// minutes after enabling versioning before issuing write operations (PUT or -/// DELETE) on objects in the bucket.

    -///
    -///

    Sets the versioning state of an existing bucket.

    -///

    You can set the versioning state with one of the following values:

    -///

    -/// Enabled—Enables versioning for the objects in the -/// bucket. All objects added to the bucket receive a unique version ID.

    -///

    -/// Suspended—Disables versioning for the objects in the -/// bucket. All objects added to the bucket receive the version ID null.

    -///

    If the versioning state has never been set on a bucket, it has no versioning state; a -/// GetBucketVersioning request does not return a versioning state value.

    -///

    In order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner -/// and want to enable MFA Delete in the bucket versioning configuration, you must include the -/// x-amz-mfa request header and the Status and the -/// MfaDelete request elements in a request to set the versioning state of the -/// bucket.

    -/// -///

    If you have an object expiration lifecycle configuration in your non-versioned bucket -/// and you want to maintain the same permanent delete behavior when you enable versioning, -/// you must add a noncurrent expiration policy. The noncurrent expiration lifecycle -/// configuration will manage the deletes of the noncurrent object versions in the -/// version-enabled bucket. (A version-enabled bucket maintains one current and zero or more -/// noncurrent object versions.) For more information, see Lifecycle and Versioning.

    -///
    -///

    The following operations are related to PutBucketVersioning:

    -/// -async fn put_bucket_versioning(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketVersioning is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets the tags for a bucket.

    + ///

    Use tags to organize your Amazon Web Services bill to reflect your own cost structure. To do this, + /// sign up to get your Amazon Web Services account bill with tag key values included. Then, to see the cost + /// of combined resources, organize your billing information according to resources with the + /// same tag key values. For example, you can tag several resources with a specific application + /// name, and then organize your billing information to see the total cost of that application + /// across several services. For more information, see Cost Allocation and + /// Tagging and Using Cost Allocation in Amazon S3 + /// Bucket Tags.

    + /// + ///

    When this operation sets the tags for a bucket, it will overwrite any current tags + /// the bucket already has. You cannot use this operation to add tags to an existing list of + /// tags.

    + ///
    + ///

    To use this operation, you must have permissions to perform the + /// s3:PutBucketTagging action. The bucket owner has this permission by default + /// and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing + /// Access Permissions to Your Amazon S3 Resources.

    + ///

    + /// PutBucketTagging has the following special errors. For more Amazon S3 errors + /// see, Error + /// Responses.

    + ///
      + ///
    • + ///

      + /// InvalidTag - The tag provided was not a valid tag. This error + /// can occur if the tag did not pass input validation. For more information, see Using + /// Cost Allocation in Amazon S3 Bucket Tags.

      + ///
    • + ///
    • + ///

      + /// MalformedXML - The XML provided does not match the + /// schema.

      + ///
    • + ///
    • + ///

      + /// OperationAborted - A conflicting conditional action is + /// currently in progress against this resource. Please try again.

      + ///
    • + ///
    • + ///

      + /// InternalError - The service was unable to apply the provided + /// tag to the bucket.

      + ///
    • + ///
    + ///

    The following operations are related to PutBucketTagging:

    + /// + async fn put_bucket_tagging(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketTagging is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets the configuration of the website that is specified in the website -/// subresource. To configure a bucket as a website, you can add this subresource on the bucket -/// with website configuration information such as the file name of the index document and any -/// redirect rules. For more information, see Hosting Websites on Amazon S3.

    -///

    This PUT action requires the S3:PutBucketWebsite permission. By default, -/// only the bucket owner can configure the website attached to a bucket; however, bucket -/// owners can allow other users to set the website configuration by writing a bucket policy -/// that grants them the S3:PutBucketWebsite permission.

    -///

    To redirect all website requests sent to the bucket's website endpoint, you add a -/// website configuration with the following elements. Because all requests are sent to another -/// website, you don't need to provide index document name for the bucket.

    -///
      -///
    • -///

      -/// WebsiteConfiguration -///

      -///
    • -///
    • -///

      -/// RedirectAllRequestsTo -///

      -///
    • -///
    • -///

      -/// HostName -///

      -///
    • -///
    • -///

      -/// Protocol -///

      -///
    • -///
    -///

    If you want granular control over redirects, you can use the following elements to add -/// routing rules that describe conditions for redirecting requests and information about the -/// redirect destination. In this case, the website configuration must provide an index -/// document for the bucket, because some requests might not be redirected.

    -///
      -///
    • -///

      -/// WebsiteConfiguration -///

      -///
    • -///
    • -///

      -/// IndexDocument -///

      -///
    • -///
    • -///

      -/// Suffix -///

      -///
    • -///
    • -///

      -/// ErrorDocument -///

      -///
    • -///
    • -///

      -/// Key -///

      -///
    • -///
    • -///

      -/// RoutingRules -///

      -///
    • -///
    • -///

      -/// RoutingRule -///

      -///
    • -///
    • -///

      -/// Condition -///

      -///
    • -///
    • -///

      -/// HttpErrorCodeReturnedEquals -///

      -///
    • -///
    • -///

      -/// KeyPrefixEquals -///

      -///
    • -///
    • -///

      -/// Redirect -///

      -///
    • -///
    • -///

      -/// Protocol -///

      -///
    • -///
    • -///

      -/// HostName -///

      -///
    • -///
    • -///

      -/// ReplaceKeyPrefixWith -///

      -///
    • -///
    • -///

      -/// ReplaceKeyWith -///

      -///
    • -///
    • -///

      -/// HttpRedirectCode -///

      -///
    • -///
    -///

    Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more -/// than 50 routing rules, you can use object redirect. For more information, see Configuring an -/// Object Redirect in the Amazon S3 User Guide.

    -///

    The maximum request length is limited to 128 KB.

    -async fn put_bucket_website(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutBucketWebsite is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + /// + ///

    When you enable versioning on a bucket for the first time, it might take a short + /// amount of time for the change to be fully propagated. While this change is propagating, + /// you might encounter intermittent HTTP 404 NoSuchKey errors for requests to + /// objects created or updated after enabling versioning. We recommend that you wait for 15 + /// minutes after enabling versioning before issuing write operations (PUT or + /// DELETE) on objects in the bucket.

    + ///
    + ///

    Sets the versioning state of an existing bucket.

    + ///

    You can set the versioning state with one of the following values:

    + ///

    + /// Enabled—Enables versioning for the objects in the + /// bucket. All objects added to the bucket receive a unique version ID.

    + ///

    + /// Suspended—Disables versioning for the objects in the + /// bucket. All objects added to the bucket receive the version ID null.

    + ///

    If the versioning state has never been set on a bucket, it has no versioning state; a + /// GetBucketVersioning request does not return a versioning state value.

    + ///

    In order to enable MFA Delete, you must be the bucket owner. If you are the bucket owner + /// and want to enable MFA Delete in the bucket versioning configuration, you must include the + /// x-amz-mfa request header and the Status and the + /// MfaDelete request elements in a request to set the versioning state of the + /// bucket.

    + /// + ///

    If you have an object expiration lifecycle configuration in your non-versioned bucket + /// and you want to maintain the same permanent delete behavior when you enable versioning, + /// you must add a noncurrent expiration policy. The noncurrent expiration lifecycle + /// configuration will manage the deletes of the noncurrent object versions in the + /// version-enabled bucket. (A version-enabled bucket maintains one current and zero or more + /// noncurrent object versions.) For more information, see Lifecycle and Versioning.

    + ///
    + ///

    The following operations are related to PutBucketVersioning:

    + /// + async fn put_bucket_versioning( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketVersioning is not implemented yet")) + } -///

    Adds an object to a bucket.

    -/// -///
      -///
    • -///

      Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added -/// the entire object to the bucket. You cannot use PutObject to only -/// update a single piece of metadata for an existing object. You must put the entire -/// object with updated metadata if you want to update some values.

      -///
    • -///
    • -///

      If your bucket uses the bucket owner enforced setting for Object Ownership, -/// ACLs are disabled and no longer affect permissions. All objects written to the -/// bucket by any account will be owned by the bucket owner.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///

    Amazon S3 is a distributed system. If it receives multiple write requests for the same object -/// simultaneously, it overwrites all but the last object written. However, Amazon S3 provides -/// features that can modify this behavior:

    -///
      -///
    • -///

      -/// S3 Object Lock - To prevent objects from -/// being deleted or overwritten, you can use Amazon S3 Object -/// Lock in the Amazon S3 User Guide.

      -/// -///

      This functionality is not supported for directory buckets.

      -///
      -///
    • -///
    • -///

      -/// If-None-Match - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a 412 Precondition Failed error. If a conflicting operation occurs during the upload, S3 returns a 409 ConditionalRequestConflict response. On a 409 failure, retry the upload.

      -///

      Expects the * character (asterisk).

      -///

      For more information, see Add preconditions to S3 operations with conditional requests in the Amazon S3 User Guide or RFC 7232. -///

      -/// -///

      This functionality is not supported for S3 on Outposts.

      -///
      -///
    • -///
    • -///

      -/// S3 Versioning - When you enable versioning -/// for a bucket, if Amazon S3 receives multiple write requests for the same object -/// simultaneously, it stores all versions of the objects. For each write request that is -/// made to the same object, Amazon S3 automatically generates a unique version ID of that -/// object being stored in Amazon S3. You can retrieve, replace, or delete any version of the -/// object. For more information about versioning, see Adding -/// Objects to Versioning-Enabled Buckets in the Amazon S3 User -/// Guide. For information about returning the versioning state of a -/// bucket, see GetBucketVersioning.

      -/// -///

      This functionality is not supported for directory buckets.

      -///
      -///
    • -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - The -/// following permissions are required in your policies when your -/// PutObject request includes specific headers.

      -///
        -///
      • -///

        -/// -/// s3:PutObject -/// - -/// To successfully complete the PutObject request, you must -/// always have the s3:PutObject permission on a bucket to -/// add an object to it.

        -///
      • -///
      • -///

        -/// -/// s3:PutObjectAcl -/// - To successfully change the objects ACL of your -/// PutObject request, you must have the -/// s3:PutObjectAcl.

        -///
      • -///
      • -///

        -/// -/// s3:PutObjectTagging -/// - To successfully set the tag-set with your -/// PutObject request, you must have the -/// s3:PutObjectTagging.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///

      If the object is encrypted with SSE-KMS, you must also have the -/// kms:GenerateDataKey and kms:Decrypt permissions -/// in IAM identity-based policies and KMS key policies for the KMS -/// key.

      -///
    • -///
    -///
    -///
    Data integrity with Content-MD5
    -///
    -///
      -///
    • -///

      -/// General purpose bucket - To ensure that -/// data is not corrupted traversing the network, use the -/// Content-MD5 header. When you use this header, Amazon S3 checks -/// the object against the provided MD5 value and, if they do not match, Amazon S3 -/// returns an error. Alternatively, when the object's ETag is its MD5 digest, -/// you can calculate the MD5 while putting the object to Amazon S3 and compare the -/// returned ETag to the calculated MD5 value.

      -///
    • -///
    • -///

      -/// Directory bucket - -/// This functionality is not supported for directory buckets.

      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    For more information about related Amazon S3 APIs, see the following:

    -/// -async fn put_object(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutObject is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets the configuration of the website that is specified in the website + /// subresource. To configure a bucket as a website, you can add this subresource on the bucket + /// with website configuration information such as the file name of the index document and any + /// redirect rules. For more information, see Hosting Websites on Amazon S3.

    + ///

    This PUT action requires the S3:PutBucketWebsite permission. By default, + /// only the bucket owner can configure the website attached to a bucket; however, bucket + /// owners can allow other users to set the website configuration by writing a bucket policy + /// that grants them the S3:PutBucketWebsite permission.

    + ///

    To redirect all website requests sent to the bucket's website endpoint, you add a + /// website configuration with the following elements. Because all requests are sent to another + /// website, you don't need to provide index document name for the bucket.

    + ///
      + ///
    • + ///

      + /// WebsiteConfiguration + ///

      + ///
    • + ///
    • + ///

      + /// RedirectAllRequestsTo + ///

      + ///
    • + ///
    • + ///

      + /// HostName + ///

      + ///
    • + ///
    • + ///

      + /// Protocol + ///

      + ///
    • + ///
    + ///

    If you want granular control over redirects, you can use the following elements to add + /// routing rules that describe conditions for redirecting requests and information about the + /// redirect destination. In this case, the website configuration must provide an index + /// document for the bucket, because some requests might not be redirected.

    + ///
      + ///
    • + ///

      + /// WebsiteConfiguration + ///

      + ///
    • + ///
    • + ///

      + /// IndexDocument + ///

      + ///
    • + ///
    • + ///

      + /// Suffix + ///

      + ///
    • + ///
    • + ///

      + /// ErrorDocument + ///

      + ///
    • + ///
    • + ///

      + /// Key + ///

      + ///
    • + ///
    • + ///

      + /// RoutingRules + ///

      + ///
    • + ///
    • + ///

      + /// RoutingRule + ///

      + ///
    • + ///
    • + ///

      + /// Condition + ///

      + ///
    • + ///
    • + ///

      + /// HttpErrorCodeReturnedEquals + ///

      + ///
    • + ///
    • + ///

      + /// KeyPrefixEquals + ///

      + ///
    • + ///
    • + ///

      + /// Redirect + ///

      + ///
    • + ///
    • + ///

      + /// Protocol + ///

      + ///
    • + ///
    • + ///

      + /// HostName + ///

      + ///
    • + ///
    • + ///

      + /// ReplaceKeyPrefixWith + ///

      + ///
    • + ///
    • + ///

      + /// ReplaceKeyWith + ///

      + ///
    • + ///
    • + ///

      + /// HttpRedirectCode + ///

      + ///
    • + ///
    + ///

    Amazon S3 has a limitation of 50 routing rules per website configuration. If you require more + /// than 50 routing rules, you can use object redirect. For more information, see Configuring an + /// Object Redirect in the Amazon S3 User Guide.

    + ///

    The maximum request length is limited to 128 KB.

    + async fn put_bucket_website(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutBucketWebsite is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Uses the acl subresource to set the access control list (ACL) permissions -/// for a new or existing object in an S3 bucket. You must have the WRITE_ACP -/// permission to set the ACL of an object. For more information, see What -/// permissions can I grant? in the Amazon S3 User Guide.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -///

    Depending on your application needs, you can choose to set the ACL on an object using -/// either the request body or the headers. For example, if you have an existing application -/// that updates a bucket ACL using the request body, you can continue to use that approach. -/// For more information, see Access Control List (ACL) Overview -/// in the Amazon S3 User Guide.

    -/// -///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs -/// are disabled and no longer affect permissions. You must use policies to grant access to -/// your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return -/// the AccessControlListNotSupported error code. Requests to read ACLs are -/// still supported. For more information, see Controlling object -/// ownership in the Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///

    You can set access permissions using one of the following methods:

    -///
      -///
    • -///

      Specify a canned ACL with the x-amz-acl request header. Amazon S3 -/// supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has -/// a predefined set of grantees and permissions. Specify the canned ACL name as -/// the value of x-amz-acl. If you use this header, you cannot use -/// other access control-specific headers in your request. For more information, -/// see Canned -/// ACL.

      -///
    • -///
    • -///

      Specify access permissions explicitly with the -/// x-amz-grant-read, x-amz-grant-read-acp, -/// x-amz-grant-write-acp, and -/// x-amz-grant-full-control headers. When using these headers, -/// you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 -/// groups) who will receive the permission. If you use these ACL-specific -/// headers, you cannot use x-amz-acl header to set a canned ACL. -/// These parameters map to the set of permissions that Amazon S3 supports in an ACL. -/// For more information, see Access Control List (ACL) -/// Overview.

      -///

      You specify each grantee as a type=value pair, where the type is one of -/// the following:

      -///
        -///
      • -///

        -/// id – if the value specified is the canonical user ID -/// of an Amazon Web Services account

        -///
      • -///
      • -///

        -/// uri – if you are granting permissions to a predefined -/// group

        -///
      • -///
      • -///

        -/// emailAddress – if the value specified is the email -/// address of an Amazon Web Services account

        -/// -///

        Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

        -///
          -///
        • -///

          US East (N. Virginia)

          -///
        • -///
        • -///

          US West (N. California)

          -///
        • -///
        • -///

          US West (Oregon)

          -///
        • -///
        • -///

          Asia Pacific (Singapore)

          -///
        • -///
        • -///

          Asia Pacific (Sydney)

          -///
        • -///
        • -///

          Asia Pacific (Tokyo)

          -///
        • -///
        • -///

          Europe (Ireland)

          -///
        • -///
        • -///

          South America (São Paulo)

          -///
        • -///
        -///

        For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

        -///
        -///
      • -///
      -///

      For example, the following x-amz-grant-read header grants -/// list objects permission to the two Amazon Web Services accounts identified by their email -/// addresses.

      -///

      -/// x-amz-grant-read: emailAddress="xyz@amazon.com", -/// emailAddress="abc@amazon.com" -///

      -///
    • -///
    -///

    You can use either a canned ACL or specify access permissions explicitly. You -/// cannot do both.

    -///
    -///
    Grantee Values
    -///
    -///

    You can specify the person (grantee) to whom you're assigning access rights -/// (using request elements) in the following ways:

    -///
      -///
    • -///

      By the person's ID:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> -/// </Grantee> -///

      -///

      DisplayName is optional and ignored in the request.

      -///
    • -///
    • -///

      By URI:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> -///

      -///
    • -///
    • -///

      By Email address:

      -///

      -/// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" -/// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<>lt;/Grantee> -///

      -///

      The grantee is resolved to the CanonicalUser and, in a response to a GET -/// Object acl request, appears as the CanonicalUser.

      -/// -///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      -///
        -///
      • -///

        US East (N. Virginia)

        -///
      • -///
      • -///

        US West (N. California)

        -///
      • -///
      • -///

        US West (Oregon)

        -///
      • -///
      • -///

        Asia Pacific (Singapore)

        -///
      • -///
      • -///

        Asia Pacific (Sydney)

        -///
      • -///
      • -///

        Asia Pacific (Tokyo)

        -///
      • -///
      • -///

        Europe (Ireland)

        -///
      • -///
      • -///

        South America (São Paulo)

        -///
      • -///
      -///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      -///
      -///
    • -///
    -///
    -///
    Versioning
    -///
    -///

    The ACL of an object is set at the object version level. By default, PUT sets -/// the ACL of the current version of an object. To set the ACL of a different -/// version, use the versionId subresource.

    -///
    -///
    -///

    The following operations are related to PutObjectAcl:

    -/// -async fn put_object_acl(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutObjectAcl is not implemented yet")) -} + ///

    Adds an object to a bucket.

    + /// + ///
      + ///
    • + ///

      Amazon S3 never adds partial objects; if you receive a success response, Amazon S3 added + /// the entire object to the bucket. You cannot use PutObject to only + /// update a single piece of metadata for an existing object. You must put the entire + /// object with updated metadata if you want to update some values.

      + ///
    • + ///
    • + ///

      If your bucket uses the bucket owner enforced setting for Object Ownership, + /// ACLs are disabled and no longer affect permissions. All objects written to the + /// bucket by any account will be owned by the bucket owner.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///

    Amazon S3 is a distributed system. If it receives multiple write requests for the same object + /// simultaneously, it overwrites all but the last object written. However, Amazon S3 provides + /// features that can modify this behavior:

    + ///
      + ///
    • + ///

      + /// S3 Object Lock - To prevent objects from + /// being deleted or overwritten, you can use Amazon S3 Object + /// Lock in the Amazon S3 User Guide.

      + /// + ///

      This functionality is not supported for directory buckets.

      + ///
      + ///
    • + ///
    • + ///

      + /// If-None-Match - Uploads the object only if the object key name does not already exist in the specified bucket. Otherwise, Amazon S3 returns a 412 Precondition Failed error. If a conflicting operation occurs during the upload, S3 returns a 409 ConditionalRequestConflict response. On a 409 failure, retry the upload.

      + ///

      Expects the * character (asterisk).

      + ///

      For more information, see Add preconditions to S3 operations with conditional requests in the Amazon S3 User Guide or RFC 7232. + ///

      + /// + ///

      This functionality is not supported for S3 on Outposts.

      + ///
      + ///
    • + ///
    • + ///

      + /// S3 Versioning - When you enable versioning + /// for a bucket, if Amazon S3 receives multiple write requests for the same object + /// simultaneously, it stores all versions of the objects. For each write request that is + /// made to the same object, Amazon S3 automatically generates a unique version ID of that + /// object being stored in Amazon S3. You can retrieve, replace, or delete any version of the + /// object. For more information about versioning, see Adding + /// Objects to Versioning-Enabled Buckets in the Amazon S3 User + /// Guide. For information about returning the versioning state of a + /// bucket, see GetBucketVersioning.

      + /// + ///

      This functionality is not supported for directory buckets.

      + ///
      + ///
    • + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - The + /// following permissions are required in your policies when your + /// PutObject request includes specific headers.

      + ///
        + ///
      • + ///

        + /// + /// s3:PutObject + /// - + /// To successfully complete the PutObject request, you must + /// always have the s3:PutObject permission on a bucket to + /// add an object to it.

        + ///
      • + ///
      • + ///

        + /// + /// s3:PutObjectAcl + /// - To successfully change the objects ACL of your + /// PutObject request, you must have the + /// s3:PutObjectAcl.

        + ///
      • + ///
      • + ///

        + /// + /// s3:PutObjectTagging + /// - To successfully set the tag-set with your + /// PutObject request, you must have the + /// s3:PutObjectTagging.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///

      If the object is encrypted with SSE-KMS, you must also have the + /// kms:GenerateDataKey and kms:Decrypt permissions + /// in IAM identity-based policies and KMS key policies for the KMS + /// key.

      + ///
    • + ///
    + ///
    + ///
    Data integrity with Content-MD5
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket - To ensure that + /// data is not corrupted traversing the network, use the + /// Content-MD5 header. When you use this header, Amazon S3 checks + /// the object against the provided MD5 value and, if they do not match, Amazon S3 + /// returns an error. Alternatively, when the object's ETag is its MD5 digest, + /// you can calculate the MD5 while putting the object to Amazon S3 and compare the + /// returned ETag to the calculated MD5 value.

      + ///
    • + ///
    • + ///

      + /// Directory bucket - + /// This functionality is not supported for directory buckets.

      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    For more information about related Amazon S3 APIs, see the following:

    + /// + async fn put_object(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutObject is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Applies a legal hold configuration to the specified object. For more information, see -/// Locking -/// Objects.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -async fn put_object_legal_hold(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutObjectLegalHold is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Uses the acl subresource to set the access control list (ACL) permissions + /// for a new or existing object in an S3 bucket. You must have the WRITE_ACP + /// permission to set the ACL of an object. For more information, see What + /// permissions can I grant? in the Amazon S3 User Guide.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + ///

    Depending on your application needs, you can choose to set the ACL on an object using + /// either the request body or the headers. For example, if you have an existing application + /// that updates a bucket ACL using the request body, you can continue to use that approach. + /// For more information, see Access Control List (ACL) Overview + /// in the Amazon S3 User Guide.

    + /// + ///

    If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs + /// are disabled and no longer affect permissions. You must use policies to grant access to + /// your bucket and the objects in it. Requests to set ACLs or update ACLs fail and return + /// the AccessControlListNotSupported error code. Requests to read ACLs are + /// still supported. For more information, see Controlling object + /// ownership in the Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///

    You can set access permissions using one of the following methods:

    + ///
      + ///
    • + ///

      Specify a canned ACL with the x-amz-acl request header. Amazon S3 + /// supports a set of predefined ACLs, known as canned ACLs. Each canned ACL has + /// a predefined set of grantees and permissions. Specify the canned ACL name as + /// the value of x-amz-acl. If you use this header, you cannot use + /// other access control-specific headers in your request. For more information, + /// see Canned + /// ACL.

      + ///
    • + ///
    • + ///

      Specify access permissions explicitly with the + /// x-amz-grant-read, x-amz-grant-read-acp, + /// x-amz-grant-write-acp, and + /// x-amz-grant-full-control headers. When using these headers, + /// you specify explicit access permissions and grantees (Amazon Web Services accounts or Amazon S3 + /// groups) who will receive the permission. If you use these ACL-specific + /// headers, you cannot use x-amz-acl header to set a canned ACL. + /// These parameters map to the set of permissions that Amazon S3 supports in an ACL. + /// For more information, see Access Control List (ACL) + /// Overview.

      + ///

      You specify each grantee as a type=value pair, where the type is one of + /// the following:

      + ///
        + ///
      • + ///

        + /// id – if the value specified is the canonical user ID + /// of an Amazon Web Services account

        + ///
      • + ///
      • + ///

        + /// uri – if you are granting permissions to a predefined + /// group

        + ///
      • + ///
      • + ///

        + /// emailAddress – if the value specified is the email + /// address of an Amazon Web Services account

        + /// + ///

        Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

        + ///
          + ///
        • + ///

          US East (N. Virginia)

          + ///
        • + ///
        • + ///

          US West (N. California)

          + ///
        • + ///
        • + ///

          US West (Oregon)

          + ///
        • + ///
        • + ///

          Asia Pacific (Singapore)

          + ///
        • + ///
        • + ///

          Asia Pacific (Sydney)

          + ///
        • + ///
        • + ///

          Asia Pacific (Tokyo)

          + ///
        • + ///
        • + ///

          Europe (Ireland)

          + ///
        • + ///
        • + ///

          South America (São Paulo)

          + ///
        • + ///
        + ///

        For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

        + ///
        + ///
      • + ///
      + ///

      For example, the following x-amz-grant-read header grants + /// list objects permission to the two Amazon Web Services accounts identified by their email + /// addresses.

      + ///

      + /// x-amz-grant-read: emailAddress="xyz@amazon.com", + /// emailAddress="abc@amazon.com" + ///

      + ///
    • + ///
    + ///

    You can use either a canned ACL or specify access permissions explicitly. You + /// cannot do both.

    + ///
    + ///
    Grantee Values
    + ///
    + ///

    You can specify the person (grantee) to whom you're assigning access rights + /// (using request elements) in the following ways:

    + ///
      + ///
    • + ///

      By the person's ID:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="CanonicalUser"><>ID<><>GranteesEmail<> + /// </Grantee> + ///

      + ///

      DisplayName is optional and ignored in the request.

      + ///
    • + ///
    • + ///

      By URI:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="Group"><>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<></Grantee> + ///

      + ///
    • + ///
    • + ///

      By Email address:

      + ///

      + /// <Grantee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + /// xsi:type="AmazonCustomerByEmail"><>Grantees@email.com<>lt;/Grantee> + ///

      + ///

      The grantee is resolved to the CanonicalUser and, in a response to a GET + /// Object acl request, appears as the CanonicalUser.

      + /// + ///

      Using email addresses to specify a grantee is only supported in the following Amazon Web Services Regions:

      + ///
        + ///
      • + ///

        US East (N. Virginia)

        + ///
      • + ///
      • + ///

        US West (N. California)

        + ///
      • + ///
      • + ///

        US West (Oregon)

        + ///
      • + ///
      • + ///

        Asia Pacific (Singapore)

        + ///
      • + ///
      • + ///

        Asia Pacific (Sydney)

        + ///
      • + ///
      • + ///

        Asia Pacific (Tokyo)

        + ///
      • + ///
      • + ///

        Europe (Ireland)

        + ///
      • + ///
      • + ///

        South America (São Paulo)

        + ///
      • + ///
      + ///

      For a list of all the Amazon S3 supported Regions and endpoints, see Regions and Endpoints in the Amazon Web Services General Reference.

      + ///
      + ///
    • + ///
    + ///
    + ///
    Versioning
    + ///
    + ///

    The ACL of an object is set at the object version level. By default, PUT sets + /// the ACL of the current version of an object. To set the ACL of a different + /// version, use the versionId subresource.

    + ///
    + ///
    + ///

    The following operations are related to PutObjectAcl:

    + /// + async fn put_object_acl(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutObjectAcl is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Places an Object Lock configuration on the specified bucket. The rule specified in the -/// Object Lock configuration will be applied by default to every new object placed in the -/// specified bucket. For more information, see Locking Objects.

    -/// -///
      -///
    • -///

      The DefaultRetention settings require both a mode and a -/// period.

      -///
    • -///
    • -///

      The DefaultRetention period can be either Days or -/// Years but you must select one. You cannot specify -/// Days and Years at the same time.

      -///
    • -///
    • -///

      You can enable Object Lock for new or existing buckets. For more information, -/// see Configuring Object -/// Lock.

      -///
    • -///
    -///
    -async fn put_object_lock_configuration(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutObjectLockConfiguration is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Applies a legal hold configuration to the specified object. For more information, see + /// Locking + /// Objects.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + async fn put_object_legal_hold( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutObjectLegalHold is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Places an Object Retention configuration on an object. For more information, see Locking Objects. -/// Users or accounts require the s3:PutObjectRetention permission in order to -/// place an Object Retention configuration on objects. Bypassing a Governance Retention -/// configuration requires the s3:BypassGovernanceRetention permission.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -async fn put_object_retention(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutObjectRetention is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Places an Object Lock configuration on the specified bucket. The rule specified in the + /// Object Lock configuration will be applied by default to every new object placed in the + /// specified bucket. For more information, see Locking Objects.

    + /// + ///
      + ///
    • + ///

      The DefaultRetention settings require both a mode and a + /// period.

      + ///
    • + ///
    • + ///

      The DefaultRetention period can be either Days or + /// Years but you must select one. You cannot specify + /// Days and Years at the same time.

      + ///
    • + ///
    • + ///

      You can enable Object Lock for new or existing buckets. For more information, + /// see Configuring Object + /// Lock.

      + ///
    • + ///
    + ///
    + async fn put_object_lock_configuration( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutObjectLockConfiguration is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Sets the supplied tag-set to an object that already exists in a bucket. A tag is a -/// key-value pair. For more information, see Object Tagging.

    -///

    You can associate tags with an object by sending a PUT request against the tagging -/// subresource that is associated with the object. You can retrieve tags by sending a GET -/// request. For more information, see GetObjectTagging.

    -///

    For tagging-related restrictions related to characters and encodings, see Tag -/// Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per -/// object.

    -///

    To use this operation, you must have permission to perform the -/// s3:PutObjectTagging action. By default, the bucket owner has this -/// permission and can grant this permission to others.

    -///

    To put tags of any other version, use the versionId query parameter. You -/// also need permission for the s3:PutObjectVersionTagging action.

    -///

    -/// PutObjectTagging has the following special errors. For more Amazon S3 errors -/// see, Error -/// Responses.

    -///
      -///
    • -///

      -/// InvalidTag - The tag provided was not a valid tag. This error -/// can occur if the tag did not pass input validation. For more information, see Object -/// Tagging.

      -///
    • -///
    • -///

      -/// MalformedXML - The XML provided does not match the -/// schema.

      -///
    • -///
    • -///

      -/// OperationAborted - A conflicting conditional action is -/// currently in progress against this resource. Please try again.

      -///
    • -///
    • -///

      -/// InternalError - The service was unable to apply the provided -/// tag to the object.

      -///
    • -///
    -///

    The following operations are related to PutObjectTagging:

    -/// -async fn put_object_tagging(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutObjectTagging is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Places an Object Retention configuration on an object. For more information, see Locking Objects. + /// Users or accounts require the s3:PutObjectRetention permission in order to + /// place an Object Retention configuration on objects. Bypassing a Governance Retention + /// configuration requires the s3:BypassGovernanceRetention permission.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + async fn put_object_retention( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutObjectRetention is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket. -/// To use this operation, you must have the s3:PutBucketPublicAccessBlock -/// permission. For more information about Amazon S3 permissions, see Specifying Permissions in a -/// Policy.

    -/// -///

    When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or -/// an object, it checks the PublicAccessBlock configuration for both the -/// bucket (or the bucket that contains the object) and the bucket owner's account. If the -/// PublicAccessBlock configurations are different between the bucket and -/// the account, Amazon S3 uses the most restrictive combination of the bucket-level and -/// account-level settings.

    -///
    -///

    For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".

    -///

    The following operations are related to PutPublicAccessBlock:

    -/// -async fn put_public_access_block(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "PutPublicAccessBlock is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Sets the supplied tag-set to an object that already exists in a bucket. A tag is a + /// key-value pair. For more information, see Object Tagging.

    + ///

    You can associate tags with an object by sending a PUT request against the tagging + /// subresource that is associated with the object. You can retrieve tags by sending a GET + /// request. For more information, see GetObjectTagging.

    + ///

    For tagging-related restrictions related to characters and encodings, see Tag + /// Restrictions. Note that Amazon S3 limits the maximum number of tags to 10 tags per + /// object.

    + ///

    To use this operation, you must have permission to perform the + /// s3:PutObjectTagging action. By default, the bucket owner has this + /// permission and can grant this permission to others.

    + ///

    To put tags of any other version, use the versionId query parameter. You + /// also need permission for the s3:PutObjectVersionTagging action.

    + ///

    + /// PutObjectTagging has the following special errors. For more Amazon S3 errors + /// see, Error + /// Responses.

    + ///
      + ///
    • + ///

      + /// InvalidTag - The tag provided was not a valid tag. This error + /// can occur if the tag did not pass input validation. For more information, see Object + /// Tagging.

      + ///
    • + ///
    • + ///

      + /// MalformedXML - The XML provided does not match the + /// schema.

      + ///
    • + ///
    • + ///

      + /// OperationAborted - A conflicting conditional action is + /// currently in progress against this resource. Please try again.

      + ///
    • + ///
    • + ///

      + /// InternalError - The service was unable to apply the provided + /// tag to the object.

      + ///
    • + ///
    + ///

    The following operations are related to PutObjectTagging:

    + /// + async fn put_object_tagging(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "PutObjectTagging is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Restores an archived copy of an object back into Amazon S3

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -///

    This action performs the following types of requests:

    -///
      -///
    • -///

      -/// restore an archive - Restore an archived object

      -///
    • -///
    -///

    For more information about the S3 structure in the request body, see the -/// following:

    -/// -///
    -///
    Permissions
    -///
    -///

    To use this operation, you must have permissions to perform the -/// s3:RestoreObject action. The bucket owner has this permission by -/// default and can grant this permission to others. For more information about -/// permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the -/// Amazon S3 User Guide.

    -///
    -///
    Restoring objects
    -///
    -///

    Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval -/// or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or -/// S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real time. For objects in the -/// S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive -/// storage classes, you must first initiate a restore request, and then wait until a -/// temporary copy of the object is available. If you want a permanent copy of the -/// object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket. -/// To access an archived object, you must restore the object for the duration (number -/// of days) that you specify. For objects in the Archive Access or Deep Archive -/// Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request, -/// and then wait until the object is moved into the Frequent Access tier.

    -///

    To restore a specific object version, you can provide a version ID. If you -/// don't provide a version ID, Amazon S3 restores the current version.

    -///

    When restoring an archived object, you can specify one of the following data -/// access tier options in the Tier element of the request body:

    -///
      -///
    • -///

      -/// Expedited - Expedited retrievals allow you to quickly access -/// your data stored in the S3 Glacier Flexible Retrieval Flexible Retrieval -/// storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests -/// for restoring archives are required. For all but the largest archived -/// objects (250 MB+), data accessed using Expedited retrievals is typically -/// made available within 1–5 minutes. Provisioned capacity ensures that -/// retrieval capacity for Expedited retrievals is available when you need it. -/// Expedited retrievals and provisioned capacity are not available for objects -/// stored in the S3 Glacier Deep Archive storage class or -/// S3 Intelligent-Tiering Deep Archive tier.

      -///
    • -///
    • -///

      -/// Standard - Standard retrievals allow you to access any of -/// your archived objects within several hours. This is the default option for -/// retrieval requests that do not specify the retrieval option. Standard -/// retrievals typically finish within 3–5 hours for objects stored in the -/// S3 Glacier Flexible Retrieval Flexible Retrieval storage class or -/// S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for -/// objects stored in the S3 Glacier Deep Archive storage class or -/// S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored -/// in S3 Intelligent-Tiering.

      -///
    • -///
    • -///

      -/// Bulk - Bulk retrievals free for objects stored in the -/// S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes, -/// enabling you to retrieve large amounts, even petabytes, of data at no cost. -/// Bulk retrievals typically finish within 5–12 hours for objects stored in the -/// S3 Glacier Flexible Retrieval Flexible Retrieval storage class or -/// S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost -/// retrieval option when restoring objects from -/// S3 Glacier Deep Archive. They typically finish within 48 hours for -/// objects stored in the S3 Glacier Deep Archive storage class or -/// S3 Intelligent-Tiering Deep Archive tier.

      -///
    • -///
    -///

    For more information about archive retrieval options and provisioned capacity -/// for Expedited data access, see Restoring Archived -/// Objects in the Amazon S3 User Guide.

    -///

    You can use Amazon S3 restore speed upgrade to change the restore speed to a faster -/// speed while it is in progress. For more information, see Upgrading the speed of an in-progress restore in the -/// Amazon S3 User Guide.

    -///

    To get the status of object restoration, you can send a HEAD -/// request. Operations return the x-amz-restore header, which provides -/// information about the restoration status, in the response. You can use Amazon S3 event -/// notifications to notify you when a restore is initiated or completed. For more -/// information, see Configuring Amazon S3 Event -/// Notifications in the Amazon S3 User Guide.

    -///

    After restoring an archived object, you can update the restoration period by -/// reissuing the request with a new period. Amazon S3 updates the restoration period -/// relative to the current time and charges only for the request-there are no -/// data transfer charges. You cannot update the restoration period when Amazon S3 is -/// actively processing your current restore request for the object.

    -///

    If your bucket has a lifecycle configuration with a rule that includes an -/// expiration action, the object expiration overrides the life span that you specify -/// in a restore request. For example, if you restore an object copy for 10 days, but -/// the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. -/// For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle -/// Management in Amazon S3 User Guide.

    -///
    -///
    Responses
    -///
    -///

    A successful action returns either the 200 OK or 202 -/// Accepted status code.

    -///
      -///
    • -///

      If the object is not previously restored, then Amazon S3 returns 202 -/// Accepted in the response.

      -///
    • -///
    • -///

      If the object is previously restored, Amazon S3 returns 200 OK in -/// the response.

      -///
    • -///
    -///
      -///
    • -///

      Special errors:

      -///
        -///
      • -///

        -/// Code: RestoreAlreadyInProgress -///

        -///
      • -///
      • -///

        -/// Cause: Object restore is already in progress. -///

        -///
      • -///
      • -///

        -/// HTTP Status Code: 409 Conflict -///

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: Client -///

        -///
      • -///
      -///
    • -///
    • -///
        -///
      • -///

        -/// Code: GlacierExpeditedRetrievalNotAvailable -///

        -///
      • -///
      • -///

        -/// Cause: expedited retrievals are currently not available. -/// Try again later. (Returned if there is insufficient capacity to -/// process the Expedited request. This error applies only to Expedited -/// retrievals and not to S3 Standard or Bulk retrievals.) -///

        -///
      • -///
      • -///

        -/// HTTP Status Code: 503 -///

        -///
      • -///
      • -///

        -/// SOAP Fault Code Prefix: N/A -///

        -///
      • -///
      -///
    • -///
    -///
    -///
    -///

    The following operations are related to RestoreObject:

    -/// -async fn restore_object(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "RestoreObject is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Creates or modifies the PublicAccessBlock configuration for an Amazon S3 bucket. + /// To use this operation, you must have the s3:PutBucketPublicAccessBlock + /// permission. For more information about Amazon S3 permissions, see Specifying Permissions in a + /// Policy.

    + /// + ///

    When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or + /// an object, it checks the PublicAccessBlock configuration for both the + /// bucket (or the bucket that contains the object) and the bucket owner's account. If the + /// PublicAccessBlock configurations are different between the bucket and + /// the account, Amazon S3 uses the most restrictive combination of the bucket-level and + /// account-level settings.

    + ///
    + ///

    For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of "Public".

    + ///

    The following operations are related to PutPublicAccessBlock:

    + /// + async fn put_public_access_block( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "PutPublicAccessBlock is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    This action filters the contents of an Amazon S3 object based on a simple structured query -/// language (SQL) statement. In the request, along with the SQL expression, you must also -/// specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses -/// this format to parse object data into records, and returns only records that match the -/// specified SQL expression. You must also specify the data serialization format for the -/// response.

    -///

    This functionality is not supported for Amazon S3 on Outposts.

    -///

    For more information about Amazon S3 Select, see Selecting Content from -/// Objects and SELECT -/// Command in the Amazon S3 User Guide.

    -///

    -///
    -///
    Permissions
    -///
    -///

    You must have the s3:GetObject permission for this operation. Amazon S3 -/// Select does not support anonymous access. For more information about permissions, -/// see Specifying Permissions in -/// a Policy in the Amazon S3 User Guide.

    -///
    -///
    Object Data Formats
    -///
    -///

    You can use Amazon S3 Select to query objects that have the following format -/// properties:

    -///
      -///
    • -///

      -/// CSV, JSON, and Parquet - Objects must be in CSV, -/// JSON, or Parquet format.

      -///
    • -///
    • -///

      -/// UTF-8 - UTF-8 is the only encoding type Amazon S3 Select -/// supports.

      -///
    • -///
    • -///

      -/// GZIP or BZIP2 - CSV and JSON files can be compressed -/// using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that -/// Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar -/// compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support -/// whole-object compression for Parquet objects.

      -///
    • -///
    • -///

      -/// Server-side encryption - Amazon S3 Select supports -/// querying objects that are protected with server-side encryption.

      -///

      For objects that are encrypted with customer-provided encryption keys -/// (SSE-C), you must use HTTPS, and you must use the headers that are -/// documented in the GetObject. For more -/// information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) -/// in the Amazon S3 User Guide.

      -///

      For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and -/// Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently, -/// so you don't need to specify anything. For more information about -/// server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    Working with the Response Body
    -///
    -///

    Given the response size is unknown, Amazon S3 Select streams the response as a -/// series of messages and includes a Transfer-Encoding header with -/// chunked as its value in the response. For more information, see -/// Appendix: -/// SelectObjectContent -/// Response.

    -///
    -///
    GetObject Support
    -///
    -///

    The SelectObjectContent action does not support the following -/// GetObject functionality. For more information, see GetObject.

    -///
      -///
    • -///

      -/// Range: Although you can specify a scan range for an Amazon S3 Select -/// request (see SelectObjectContentRequest - ScanRange in the request -/// parameters), you cannot specify the range of bytes of an object to return. -///

      -///
    • -///
    • -///

      The GLACIER, DEEP_ARCHIVE, and -/// REDUCED_REDUNDANCY storage classes, or the -/// ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access -/// tiers of the INTELLIGENT_TIERING storage class: You cannot -/// query objects in the GLACIER, DEEP_ARCHIVE, or -/// REDUCED_REDUNDANCY storage classes, nor objects in the -/// ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access -/// tiers of the INTELLIGENT_TIERING storage class. For more -/// information about storage classes, see Using Amazon S3 -/// storage classes in the -/// Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    Special Errors
    -///
    -///

    For a list of special errors for this operation, see List of SELECT Object Content Error Codes -///

    -///
    -///
    -///

    The following operations are related to SelectObjectContent:

    -/// -async fn select_object_content(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "SelectObjectContent is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Restores an archived copy of an object back into Amazon S3

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + ///

    This action performs the following types of requests:

    + ///
      + ///
    • + ///

      + /// restore an archive - Restore an archived object

      + ///
    • + ///
    + ///

    For more information about the S3 structure in the request body, see the + /// following:

    + /// + ///
    + ///
    Permissions
    + ///
    + ///

    To use this operation, you must have permissions to perform the + /// s3:RestoreObject action. The bucket owner has this permission by + /// default and can grant this permission to others. For more information about + /// permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources in the + /// Amazon S3 User Guide.

    + ///
    + ///
    Restoring objects
    + ///
    + ///

    Objects that you archive to the S3 Glacier Flexible Retrieval Flexible Retrieval + /// or S3 Glacier Deep Archive storage class, and S3 Intelligent-Tiering Archive or + /// S3 Intelligent-Tiering Deep Archive tiers, are not accessible in real time. For objects in the + /// S3 Glacier Flexible Retrieval Flexible Retrieval or S3 Glacier Deep Archive + /// storage classes, you must first initiate a restore request, and then wait until a + /// temporary copy of the object is available. If you want a permanent copy of the + /// object, create a copy of it in the Amazon S3 Standard storage class in your S3 bucket. + /// To access an archived object, you must restore the object for the duration (number + /// of days) that you specify. For objects in the Archive Access or Deep Archive + /// Access tiers of S3 Intelligent-Tiering, you must first initiate a restore request, + /// and then wait until the object is moved into the Frequent Access tier.

    + ///

    To restore a specific object version, you can provide a version ID. If you + /// don't provide a version ID, Amazon S3 restores the current version.

    + ///

    When restoring an archived object, you can specify one of the following data + /// access tier options in the Tier element of the request body:

    + ///
      + ///
    • + ///

      + /// Expedited - Expedited retrievals allow you to quickly access + /// your data stored in the S3 Glacier Flexible Retrieval Flexible Retrieval + /// storage class or S3 Intelligent-Tiering Archive tier when occasional urgent requests + /// for restoring archives are required. For all but the largest archived + /// objects (250 MB+), data accessed using Expedited retrievals is typically + /// made available within 1–5 minutes. Provisioned capacity ensures that + /// retrieval capacity for Expedited retrievals is available when you need it. + /// Expedited retrievals and provisioned capacity are not available for objects + /// stored in the S3 Glacier Deep Archive storage class or + /// S3 Intelligent-Tiering Deep Archive tier.

      + ///
    • + ///
    • + ///

      + /// Standard - Standard retrievals allow you to access any of + /// your archived objects within several hours. This is the default option for + /// retrieval requests that do not specify the retrieval option. Standard + /// retrievals typically finish within 3–5 hours for objects stored in the + /// S3 Glacier Flexible Retrieval Flexible Retrieval storage class or + /// S3 Intelligent-Tiering Archive tier. They typically finish within 12 hours for + /// objects stored in the S3 Glacier Deep Archive storage class or + /// S3 Intelligent-Tiering Deep Archive tier. Standard retrievals are free for objects stored + /// in S3 Intelligent-Tiering.

      + ///
    • + ///
    • + ///

      + /// Bulk - Bulk retrievals free for objects stored in the + /// S3 Glacier Flexible Retrieval and S3 Intelligent-Tiering storage classes, + /// enabling you to retrieve large amounts, even petabytes, of data at no cost. + /// Bulk retrievals typically finish within 5–12 hours for objects stored in the + /// S3 Glacier Flexible Retrieval Flexible Retrieval storage class or + /// S3 Intelligent-Tiering Archive tier. Bulk retrievals are also the lowest-cost + /// retrieval option when restoring objects from + /// S3 Glacier Deep Archive. They typically finish within 48 hours for + /// objects stored in the S3 Glacier Deep Archive storage class or + /// S3 Intelligent-Tiering Deep Archive tier.

      + ///
    • + ///
    + ///

    For more information about archive retrieval options and provisioned capacity + /// for Expedited data access, see Restoring Archived + /// Objects in the Amazon S3 User Guide.

    + ///

    You can use Amazon S3 restore speed upgrade to change the restore speed to a faster + /// speed while it is in progress. For more information, see Upgrading the speed of an in-progress restore in the + /// Amazon S3 User Guide.

    + ///

    To get the status of object restoration, you can send a HEAD + /// request. Operations return the x-amz-restore header, which provides + /// information about the restoration status, in the response. You can use Amazon S3 event + /// notifications to notify you when a restore is initiated or completed. For more + /// information, see Configuring Amazon S3 Event + /// Notifications in the Amazon S3 User Guide.

    + ///

    After restoring an archived object, you can update the restoration period by + /// reissuing the request with a new period. Amazon S3 updates the restoration period + /// relative to the current time and charges only for the request-there are no + /// data transfer charges. You cannot update the restoration period when Amazon S3 is + /// actively processing your current restore request for the object.

    + ///

    If your bucket has a lifecycle configuration with a rule that includes an + /// expiration action, the object expiration overrides the life span that you specify + /// in a restore request. For example, if you restore an object copy for 10 days, but + /// the object is scheduled to expire in 3 days, Amazon S3 deletes the object in 3 days. + /// For more information about lifecycle configuration, see PutBucketLifecycleConfiguration and Object Lifecycle + /// Management in Amazon S3 User Guide.

    + ///
    + ///
    Responses
    + ///
    + ///

    A successful action returns either the 200 OK or 202 + /// Accepted status code.

    + ///
      + ///
    • + ///

      If the object is not previously restored, then Amazon S3 returns 202 + /// Accepted in the response.

      + ///
    • + ///
    • + ///

      If the object is previously restored, Amazon S3 returns 200 OK in + /// the response.

      + ///
    • + ///
    + ///
      + ///
    • + ///

      Special errors:

      + ///
        + ///
      • + ///

        + /// Code: RestoreAlreadyInProgress + ///

        + ///
      • + ///
      • + ///

        + /// Cause: Object restore is already in progress. + ///

        + ///
      • + ///
      • + ///

        + /// HTTP Status Code: 409 Conflict + ///

        + ///
      • + ///
      • + ///

        + /// SOAP Fault Code Prefix: Client + ///

        + ///
      • + ///
      + ///
    • + ///
    • + ///
        + ///
      • + ///

        + /// Code: GlacierExpeditedRetrievalNotAvailable + ///

        + ///
      • + ///
      • + ///

        + /// Cause: expedited retrievals are currently not available. + /// Try again later. (Returned if there is insufficient capacity to + /// process the Expedited request. This error applies only to Expedited + /// retrievals and not to S3 Standard or Bulk retrievals.) + ///

        + ///
      • + ///
      • + ///

        + /// HTTP Status Code: 503 + ///

        + ///
      • + ///
      • + ///

        + /// SOAP Fault Code Prefix: N/A + ///

        + ///
      • + ///
      + ///
    • + ///
    + ///
    + ///
    + ///

    The following operations are related to RestoreObject:

    + /// + async fn restore_object(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "RestoreObject is not implemented yet")) + } -///

    Uploads a part in a multipart upload.

    -/// -///

    In this operation, you provide new data as a part of an object in your request. -/// However, you have an option to specify your existing Amazon S3 object as a data source for -/// the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

    -///
    -///

    You must initiate a multipart upload (see CreateMultipartUpload) -/// before you can upload any part. In response to your initiate request, Amazon S3 returns an -/// upload ID, a unique identifier that you must include in your upload part request.

    -///

    Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely -/// identifies a part and also defines its position within the object being created. If you -/// upload a new part using the same part number that was used with a previous part, the -/// previously uploaded part is overwritten.

    -///

    For information about maximum and minimum part sizes and other multipart upload -/// specifications, see Multipart upload limits in the Amazon S3 User Guide.

    -/// -///

    After you initiate multipart upload and upload one or more parts, you must either -/// complete or abort multipart upload in order to stop getting charged for storage of the -/// uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up -/// the parts storage and stops charging you for the parts storage.

    -///
    -///

    For more information on multipart uploads, go to Multipart Upload Overview in the -/// Amazon S3 User Guide .

    -/// -///

    -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Permissions
    -///
    -///
      -///
    • -///

      -/// General purpose bucket permissions - To -/// perform a multipart upload with encryption using an Key Management Service key, the -/// requester must have permission to the kms:Decrypt and -/// kms:GenerateDataKey actions on the key. The requester must -/// also have permissions for the kms:GenerateDataKey action for -/// the CreateMultipartUpload API. Then, the requester needs -/// permissions for the kms:Decrypt action on the -/// UploadPart and UploadPartCopy APIs.

      -///

      These permissions are required because Amazon S3 must decrypt and read data -/// from the encrypted file parts before it completes the multipart upload. For -/// more information about KMS permissions, see Protecting data -/// using server-side encryption with KMS in the -/// Amazon S3 User Guide. For information about the -/// permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the -/// CreateSession -/// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. -/// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see -/// CreateSession -/// .

      -///

      If the object is encrypted with SSE-KMS, you must also have the -/// kms:GenerateDataKey and kms:Decrypt permissions -/// in IAM identity-based policies and KMS key policies for the KMS -/// key.

      -///
    • -///
    -///
    -///
    Data integrity
    -///
    -///

    -/// General purpose bucket - To ensure that data -/// is not corrupted traversing the network, specify the Content-MD5 -/// header in the upload part request. Amazon S3 checks the part data against the provided -/// MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is -/// signed with Signature Version 4, then Amazon Web Services S3 uses the -/// x-amz-content-sha256 header as a checksum instead of -/// Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature -/// Version 4).

    -/// -///

    -/// Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

    -///
    -///
    -///
    Encryption
    -///
    -///
      -///
    • -///

      -/// General purpose bucket - Server-side -/// encryption is for data encryption at rest. Amazon S3 encrypts your data as it -/// writes it to disks in its data centers and decrypts it when you access it. -/// You have mutually exclusive options to protect data using server-side -/// encryption in Amazon S3, depending on how you choose to manage the encryption -/// keys. Specifically, the encryption key options are Amazon S3 managed keys -/// (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C). -/// Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys -/// (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest -/// using server-side encryption with other key options. The option you use -/// depends on whether you want to use KMS keys (SSE-KMS) or provide your own -/// encryption key (SSE-C).

      -///

      Server-side encryption is supported by the S3 Multipart Upload -/// operations. Unless you are using a customer-provided encryption key (SSE-C), -/// you don't need to specify the encryption parameters in each UploadPart -/// request. Instead, you only need to specify the server-side encryption -/// parameters in the initial Initiate Multipart request. For more information, -/// see CreateMultipartUpload.

      -///

      If you request server-side encryption using a customer-provided -/// encryption key (SSE-C) in your initiate multipart upload request, you must -/// provide identical encryption information in each part upload using the -/// following request headers.

      -///
        -///
      • -///

        x-amz-server-side-encryption-customer-algorithm

        -///
      • -///
      • -///

        x-amz-server-side-encryption-customer-key

        -///
      • -///
      • -///

        x-amz-server-side-encryption-customer-key-MD5

        -///
      • -///
      -///

      For more information, see Using -/// Server-Side Encryption in the -/// Amazon S3 User Guide.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms).

      -///
    • -///
    -///
    -///
    Special errors
    -///
    -///
      -///
    • -///

      Error Code: NoSuchUpload -///

      -///
        -///
      • -///

        Description: The specified multipart upload does not exist. The -/// upload ID might be invalid, or the multipart upload might have been -/// aborted or completed.

        -///
      • -///
      • -///

        HTTP Status Code: 404 Not Found

        -///
      • -///
      • -///

        SOAP Fault Code Prefix: Client

        -///
      • -///
      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to UploadPart:

    -/// -async fn upload_part(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "UploadPart is not implemented yet")) -} + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    This action filters the contents of an Amazon S3 object based on a simple structured query + /// language (SQL) statement. In the request, along with the SQL expression, you must also + /// specify a data serialization format (JSON, CSV, or Apache Parquet) of the object. Amazon S3 uses + /// this format to parse object data into records, and returns only records that match the + /// specified SQL expression. You must also specify the data serialization format for the + /// response.

    + ///

    This functionality is not supported for Amazon S3 on Outposts.

    + ///

    For more information about Amazon S3 Select, see Selecting Content from + /// Objects and SELECT + /// Command in the Amazon S3 User Guide.

    + ///

    + ///
    + ///
    Permissions
    + ///
    + ///

    You must have the s3:GetObject permission for this operation. Amazon S3 + /// Select does not support anonymous access. For more information about permissions, + /// see Specifying Permissions in + /// a Policy in the Amazon S3 User Guide.

    + ///
    + ///
    Object Data Formats
    + ///
    + ///

    You can use Amazon S3 Select to query objects that have the following format + /// properties:

    + ///
      + ///
    • + ///

      + /// CSV, JSON, and Parquet - Objects must be in CSV, + /// JSON, or Parquet format.

      + ///
    • + ///
    • + ///

      + /// UTF-8 - UTF-8 is the only encoding type Amazon S3 Select + /// supports.

      + ///
    • + ///
    • + ///

      + /// GZIP or BZIP2 - CSV and JSON files can be compressed + /// using GZIP or BZIP2. GZIP and BZIP2 are the only compression formats that + /// Amazon S3 Select supports for CSV and JSON files. Amazon S3 Select supports columnar + /// compression for Parquet using GZIP or Snappy. Amazon S3 Select does not support + /// whole-object compression for Parquet objects.

      + ///
    • + ///
    • + ///

      + /// Server-side encryption - Amazon S3 Select supports + /// querying objects that are protected with server-side encryption.

      + ///

      For objects that are encrypted with customer-provided encryption keys + /// (SSE-C), you must use HTTPS, and you must use the headers that are + /// documented in the GetObject. For more + /// information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys) + /// in the Amazon S3 User Guide.

      + ///

      For objects that are encrypted with Amazon S3 managed keys (SSE-S3) and + /// Amazon Web Services KMS keys (SSE-KMS), server-side encryption is handled transparently, + /// so you don't need to specify anything. For more information about + /// server-side encryption, including SSE-S3 and SSE-KMS, see Protecting Data Using Server-Side Encryption in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    Working with the Response Body
    + ///
    + ///

    Given the response size is unknown, Amazon S3 Select streams the response as a + /// series of messages and includes a Transfer-Encoding header with + /// chunked as its value in the response. For more information, see + /// Appendix: + /// SelectObjectContent + /// Response.

    + ///
    + ///
    GetObject Support
    + ///
    + ///

    The SelectObjectContent action does not support the following + /// GetObject functionality. For more information, see GetObject.

    + ///
      + ///
    • + ///

      + /// Range: Although you can specify a scan range for an Amazon S3 Select + /// request (see SelectObjectContentRequest - ScanRange in the request + /// parameters), you cannot specify the range of bytes of an object to return. + ///

      + ///
    • + ///
    • + ///

      The GLACIER, DEEP_ARCHIVE, and + /// REDUCED_REDUNDANCY storage classes, or the + /// ARCHIVE_ACCESS and DEEP_ARCHIVE_ACCESS access + /// tiers of the INTELLIGENT_TIERING storage class: You cannot + /// query objects in the GLACIER, DEEP_ARCHIVE, or + /// REDUCED_REDUNDANCY storage classes, nor objects in the + /// ARCHIVE_ACCESS or DEEP_ARCHIVE_ACCESS access + /// tiers of the INTELLIGENT_TIERING storage class. For more + /// information about storage classes, see Using Amazon S3 + /// storage classes in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    Special Errors
    + ///
    + ///

    For a list of special errors for this operation, see List of SELECT Object Content Error Codes + ///

    + ///
    + ///
    + ///

    The following operations are related to SelectObjectContent:

    + /// + async fn select_object_content( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "SelectObjectContent is not implemented yet")) + } -///

    Uploads a part by copying data from an existing object as data source. To specify the -/// data source, you add the request header x-amz-copy-source in your request. To -/// specify a byte range, you add the request header x-amz-copy-source-range in -/// your request.

    -///

    For information about maximum and minimum part sizes and other multipart upload -/// specifications, see Multipart upload limits in the Amazon S3 User Guide.

    -/// -///

    Instead of copying data from an existing object as part data, you might use the -/// UploadPart action to upload new data as a part of an object in your -/// request.

    -///
    -///

    You must initiate a multipart upload before you can upload any part. In response to your -/// initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in -/// your upload part request.

    -///

    For conceptual information about multipart uploads, see Uploading Objects Using Multipart -/// Upload in the Amazon S3 User Guide. For information about -/// copying objects using a single atomic action vs. a multipart upload, see Operations on -/// Objects in the Amazon S3 User Guide.

    -/// -///

    -/// Directory buckets - -/// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name -/// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the -/// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the -/// Amazon S3 User Guide.

    -///
    -///
    -///
    Authentication and authorization
    -///
    -///

    All UploadPartCopy requests must be authenticated and signed by -/// using IAM credentials (access key ID and secret access key for the IAM -/// identities). All headers with the x-amz- prefix, including -/// x-amz-copy-source, must be signed. For more information, see -/// REST Authentication.

    -///

    -/// Directory buckets - You must use IAM -/// credentials to authenticate and authorize your access to the -/// UploadPartCopy API operation, instead of using the temporary -/// security credentials through the CreateSession API operation.

    -///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your -/// behalf.

    -///
    -///
    Permissions
    -///
    -///

    You must have READ access to the source object and -/// WRITE access to the destination bucket.

    -///
      -///
    • -///

      -/// General purpose bucket permissions - You -/// must have the permissions in a policy based on the bucket types of your -/// source bucket and destination bucket in an UploadPartCopy -/// operation.

      -///
        -///
      • -///

        If the source object is in a general purpose bucket, you must have the -/// -/// s3:GetObject -/// -/// permission to read the source object that is being copied.

        -///
      • -///
      • -///

        If the destination bucket is a general purpose bucket, you must have the -/// -/// s3:PutObject -/// -/// permission to write the object copy to the destination bucket.

        -///
      • -///
      • -///

        To perform a multipart upload with encryption using an Key Management Service -/// key, the requester must have permission to the -/// kms:Decrypt and kms:GenerateDataKey -/// actions on the key. The requester must also have permissions for the -/// kms:GenerateDataKey action for the -/// CreateMultipartUpload API. Then, the requester needs -/// permissions for the kms:Decrypt action on the -/// UploadPart and UploadPartCopy APIs. These -/// permissions are required because Amazon S3 must decrypt and read data from -/// the encrypted file parts before it completes the multipart upload. For -/// more information about KMS permissions, see Protecting -/// data using server-side encryption with KMS in the -/// Amazon S3 User Guide. For information about the -/// permissions required to use the multipart upload API, see Multipart upload -/// and permissions and Multipart upload API and permissions in the -/// Amazon S3 User Guide.

        -///
      • -///
      -///
    • -///
    • -///

      -/// Directory bucket permissions - -/// You must have permissions in a bucket policy or an IAM identity-based policy based on the -/// source and destination bucket types in an UploadPartCopy -/// operation.

      -///
        -///
      • -///

        If the source object that you want to copy is in a -/// directory bucket, you must have the -/// s3express:CreateSession -/// permission in -/// the Action element of a policy to read the object. By -/// default, the session is in the ReadWrite mode. If you -/// want to restrict the access, you can explicitly set the -/// s3express:SessionMode condition key to -/// ReadOnly on the copy source bucket.

        -///
      • -///
      • -///

        If the copy destination is a directory bucket, you must have the -/// -/// s3express:CreateSession -/// permission in the -/// Action element of a policy to write the object to the -/// destination. The s3express:SessionMode condition key -/// cannot be set to ReadOnly on the copy destination. -///

        -///
      • -///
      -///

      If the object is encrypted with SSE-KMS, you must also have the -/// kms:GenerateDataKey and kms:Decrypt permissions -/// in IAM identity-based policies and KMS key policies for the KMS -/// key.

      -///

      For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for -/// S3 Express One Zone in the Amazon S3 User Guide.

      -///
    • -///
    -///
    -///
    Encryption
    -///
    -///
      -///
    • -///

      -/// General purpose buckets - -/// For information about using -/// server-side encryption with customer-provided encryption keys with the -/// UploadPartCopy operation, see CopyObject and -/// UploadPart.

      -///
    • -///
    • -///

      -/// Directory buckets - -/// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). For more -/// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

      -/// -///

      For directory buckets, when you perform a -/// CreateMultipartUpload operation and an -/// UploadPartCopy operation, the request headers you provide -/// in the CreateMultipartUpload request must match the default -/// encryption configuration of the destination bucket.

      -///
      -///

      S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets -/// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through UploadPartCopy. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      -///
    • -///
    -///
    -///
    Special errors
    -///
    -///
      -///
    • -///

      Error Code: NoSuchUpload -///

      -///
        -///
      • -///

        Description: The specified multipart upload does not exist. The -/// upload ID might be invalid, or the multipart upload might have been -/// aborted or completed.

        -///
      • -///
      • -///

        HTTP Status Code: 404 Not Found

        -///
      • -///
      -///
    • -///
    • -///

      Error Code: InvalidRequest -///

      -///
        -///
      • -///

        Description: The specified copy source is not supported as a -/// byte-range copy source.

        -///
      • -///
      • -///

        HTTP Status Code: 400 Bad Request

        -///
      • -///
      -///
    • -///
    -///
    -///
    HTTP Host header syntax
    -///
    -///

    -/// Directory buckets - The HTTP Host header syntax is -/// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    -///
    -///
    -///

    The following operations are related to UploadPartCopy:

    -/// -async fn upload_part_copy(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "UploadPartCopy is not implemented yet")) -} + ///

    Uploads a part in a multipart upload.

    + /// + ///

    In this operation, you provide new data as a part of an object in your request. + /// However, you have an option to specify your existing Amazon S3 object as a data source for + /// the part you are uploading. To upload a part from an existing object, you use the UploadPartCopy operation.

    + ///
    + ///

    You must initiate a multipart upload (see CreateMultipartUpload) + /// before you can upload any part. In response to your initiate request, Amazon S3 returns an + /// upload ID, a unique identifier that you must include in your upload part request.

    + ///

    Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely + /// identifies a part and also defines its position within the object being created. If you + /// upload a new part using the same part number that was used with a previous part, the + /// previously uploaded part is overwritten.

    + ///

    For information about maximum and minimum part sizes and other multipart upload + /// specifications, see Multipart upload limits in the Amazon S3 User Guide.

    + /// + ///

    After you initiate multipart upload and upload one or more parts, you must either + /// complete or abort multipart upload in order to stop getting charged for storage of the + /// uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up + /// the parts storage and stops charging you for the parts storage.

    + ///
    + ///

    For more information on multipart uploads, go to Multipart Upload Overview in the + /// Amazon S3 User Guide .

    + /// + ///

    + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Permissions
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - To + /// perform a multipart upload with encryption using an Key Management Service key, the + /// requester must have permission to the kms:Decrypt and + /// kms:GenerateDataKey actions on the key. The requester must + /// also have permissions for the kms:GenerateDataKey action for + /// the CreateMultipartUpload API. Then, the requester needs + /// permissions for the kms:Decrypt action on the + /// UploadPart and UploadPartCopy APIs.

      + ///

      These permissions are required because Amazon S3 must decrypt and read data + /// from the encrypted file parts before it completes the multipart upload. For + /// more information about KMS permissions, see Protecting data + /// using server-side encryption with KMS in the + /// Amazon S3 User Guide. For information about the + /// permissions required to use the multipart upload API, see Multipart upload and permissions and Multipart upload API and permissions in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - To grant access to this API operation on a directory bucket, we recommend that you use the + /// CreateSession + /// API operation for session-based authorization. Specifically, you grant the s3express:CreateSession permission to the directory bucket in a bucket policy or an IAM identity-based policy. Then, you make the CreateSession API call on the bucket to obtain a session token. With the session token in your request header, you can make API requests to this operation. After the session token expires, you make another CreateSession API call to generate a new session token for use. + /// Amazon Web Services CLI or SDKs create session and refresh the session token automatically to avoid service interruptions when a session expires. For more information about authorization, see + /// CreateSession + /// .

      + ///

      If the object is encrypted with SSE-KMS, you must also have the + /// kms:GenerateDataKey and kms:Decrypt permissions + /// in IAM identity-based policies and KMS key policies for the KMS + /// key.

      + ///
    • + ///
    + ///
    + ///
    Data integrity
    + ///
    + ///

    + /// General purpose bucket - To ensure that data + /// is not corrupted traversing the network, specify the Content-MD5 + /// header in the upload part request. Amazon S3 checks the part data against the provided + /// MD5 value. If they do not match, Amazon S3 returns an error. If the upload request is + /// signed with Signature Version 4, then Amazon Web Services S3 uses the + /// x-amz-content-sha256 header as a checksum instead of + /// Content-MD5. For more information see Authenticating Requests: Using the Authorization Header (Amazon Web Services Signature + /// Version 4).

    + /// + ///

    + /// Directory buckets - MD5 is not supported by directory buckets. You can use checksum algorithms to check object integrity.

    + ///
    + ///
    + ///
    Encryption
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose bucket - Server-side + /// encryption is for data encryption at rest. Amazon S3 encrypts your data as it + /// writes it to disks in its data centers and decrypts it when you access it. + /// You have mutually exclusive options to protect data using server-side + /// encryption in Amazon S3, depending on how you choose to manage the encryption + /// keys. Specifically, the encryption key options are Amazon S3 managed keys + /// (SSE-S3), Amazon Web Services KMS keys (SSE-KMS), and Customer-Provided Keys (SSE-C). + /// Amazon S3 encrypts data with server-side encryption using Amazon S3 managed keys + /// (SSE-S3) by default. You can optionally tell Amazon S3 to encrypt data at rest + /// using server-side encryption with other key options. The option you use + /// depends on whether you want to use KMS keys (SSE-KMS) or provide your own + /// encryption key (SSE-C).

      + ///

      Server-side encryption is supported by the S3 Multipart Upload + /// operations. Unless you are using a customer-provided encryption key (SSE-C), + /// you don't need to specify the encryption parameters in each UploadPart + /// request. Instead, you only need to specify the server-side encryption + /// parameters in the initial Initiate Multipart request. For more information, + /// see CreateMultipartUpload.

      + ///

      If you request server-side encryption using a customer-provided + /// encryption key (SSE-C) in your initiate multipart upload request, you must + /// provide identical encryption information in each part upload using the + /// following request headers.

      + ///
        + ///
      • + ///

        x-amz-server-side-encryption-customer-algorithm

        + ///
      • + ///
      • + ///

        x-amz-server-side-encryption-customer-key

        + ///
      • + ///
      • + ///

        x-amz-server-side-encryption-customer-key-MD5

        + ///
      • + ///
      + ///

      For more information, see Using + /// Server-Side Encryption in the + /// Amazon S3 User Guide.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms).

      + ///
    • + ///
    + ///
    + ///
    Special errors
    + ///
    + ///
      + ///
    • + ///

      Error Code: NoSuchUpload + ///

      + ///
        + ///
      • + ///

        Description: The specified multipart upload does not exist. The + /// upload ID might be invalid, or the multipart upload might have been + /// aborted or completed.

        + ///
      • + ///
      • + ///

        HTTP Status Code: 404 Not Found

        + ///
      • + ///
      • + ///

        SOAP Fault Code Prefix: Client

        + ///
      • + ///
      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to UploadPart:

    + /// + async fn upload_part(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "UploadPart is not implemented yet")) + } -/// -///

    This operation is not supported for directory buckets.

    -///
    -///

    Passes transformed objects to a GetObject operation when using Object Lambda access points. For -/// information about Object Lambda access points, see Transforming objects with -/// Object Lambda access points in the Amazon S3 User Guide.

    -///

    This operation supports metadata that can be returned by GetObject, in addition to -/// RequestRoute, RequestToken, StatusCode, -/// ErrorCode, and ErrorMessage. The GetObject -/// response metadata is supported so that the WriteGetObjectResponse caller, -/// typically an Lambda function, can provide the same metadata when it internally invokes -/// GetObject. When WriteGetObjectResponse is called by a -/// customer-owned Lambda function, the metadata returned to the end user -/// GetObject call might differ from what Amazon S3 would normally return.

    -///

    You can include any number of metadata headers. When including a metadata header, it -/// should be prefaced with x-amz-meta. For example, -/// x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this -/// is to forward GetObject metadata.

    -///

    Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to -/// detect and redact personally identifiable information (PII) and decompress S3 objects. -/// These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and -/// can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

    -///

    Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a -/// natural language processing (NLP) service using machine learning to find insights and -/// relationships in text. It automatically detects personally identifiable information (PII) -/// such as names, addresses, dates, credit card numbers, and social security numbers from -/// documents in your Amazon S3 bucket.

    -///

    Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural -/// language processing (NLP) service using machine learning to find insights and relationships -/// in text. It automatically redacts personally identifiable information (PII) such as names, -/// addresses, dates, credit card numbers, and social security numbers from documents in your -/// Amazon S3 bucket.

    -///

    Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is -/// equipped to decompress objects stored in S3 in one of six compressed file formats including -/// bzip2, gzip, snappy, zlib, zstandard and ZIP.

    -///

    For information on how to view and use these functions, see Using Amazon Web Services built Lambda -/// functions in the Amazon S3 User Guide.

    -async fn write_get_object_response(&self, _req: S3Request) -> S3Result> { -Err(s3_error!(NotImplemented, "WriteGetObjectResponse is not implemented yet")) -} + ///

    Uploads a part by copying data from an existing object as data source. To specify the + /// data source, you add the request header x-amz-copy-source in your request. To + /// specify a byte range, you add the request header x-amz-copy-source-range in + /// your request.

    + ///

    For information about maximum and minimum part sizes and other multipart upload + /// specifications, see Multipart upload limits in the Amazon S3 User Guide.

    + /// + ///

    Instead of copying data from an existing object as part data, you might use the + /// UploadPart action to upload new data as a part of an object in your + /// request.

    + ///
    + ///

    You must initiate a multipart upload before you can upload any part. In response to your + /// initiate request, Amazon S3 returns the upload ID, a unique identifier that you must include in + /// your upload part request.

    + ///

    For conceptual information about multipart uploads, see Uploading Objects Using Multipart + /// Upload in the Amazon S3 User Guide. For information about + /// copying objects using a single atomic action vs. a multipart upload, see Operations on + /// Objects in the Amazon S3 User Guide.

    + /// + ///

    + /// Directory buckets - + /// For directory buckets, you must make requests for this API operation to the Zonal endpoint. These endpoints support virtual-hosted-style requests in the format https://amzn-s3-demo-bucket.s3express-zone-id.region-code.amazonaws.com/key-name + /// . Path-style requests are not supported. For more information about endpoints in Availability Zones, see Regional and Zonal endpoints for directory buckets in Availability Zones in the + /// Amazon S3 User Guide. For more information about endpoints in Local Zones, see Concepts for directory buckets in Local Zones in the + /// Amazon S3 User Guide.

    + ///
    + ///
    + ///
    Authentication and authorization
    + ///
    + ///

    All UploadPartCopy requests must be authenticated and signed by + /// using IAM credentials (access key ID and secret access key for the IAM + /// identities). All headers with the x-amz- prefix, including + /// x-amz-copy-source, must be signed. For more information, see + /// REST Authentication.

    + ///

    + /// Directory buckets - You must use IAM + /// credentials to authenticate and authorize your access to the + /// UploadPartCopy API operation, instead of using the temporary + /// security credentials through the CreateSession API operation.

    + ///

    Amazon Web Services CLI or SDKs handles authentication and authorization on your + /// behalf.

    + ///
    + ///
    Permissions
    + ///
    + ///

    You must have READ access to the source object and + /// WRITE access to the destination bucket.

    + ///
      + ///
    • + ///

      + /// General purpose bucket permissions - You + /// must have the permissions in a policy based on the bucket types of your + /// source bucket and destination bucket in an UploadPartCopy + /// operation.

      + ///
        + ///
      • + ///

        If the source object is in a general purpose bucket, you must have the + /// + /// s3:GetObject + /// + /// permission to read the source object that is being copied.

        + ///
      • + ///
      • + ///

        If the destination bucket is a general purpose bucket, you must have the + /// + /// s3:PutObject + /// + /// permission to write the object copy to the destination bucket.

        + ///
      • + ///
      • + ///

        To perform a multipart upload with encryption using an Key Management Service + /// key, the requester must have permission to the + /// kms:Decrypt and kms:GenerateDataKey + /// actions on the key. The requester must also have permissions for the + /// kms:GenerateDataKey action for the + /// CreateMultipartUpload API. Then, the requester needs + /// permissions for the kms:Decrypt action on the + /// UploadPart and UploadPartCopy APIs. These + /// permissions are required because Amazon S3 must decrypt and read data from + /// the encrypted file parts before it completes the multipart upload. For + /// more information about KMS permissions, see Protecting + /// data using server-side encryption with KMS in the + /// Amazon S3 User Guide. For information about the + /// permissions required to use the multipart upload API, see Multipart upload + /// and permissions and Multipart upload API and permissions in the + /// Amazon S3 User Guide.

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      + /// Directory bucket permissions - + /// You must have permissions in a bucket policy or an IAM identity-based policy based on the + /// source and destination bucket types in an UploadPartCopy + /// operation.

      + ///
        + ///
      • + ///

        If the source object that you want to copy is in a + /// directory bucket, you must have the + /// s3express:CreateSession + /// permission in + /// the Action element of a policy to read the object. By + /// default, the session is in the ReadWrite mode. If you + /// want to restrict the access, you can explicitly set the + /// s3express:SessionMode condition key to + /// ReadOnly on the copy source bucket.

        + ///
      • + ///
      • + ///

        If the copy destination is a directory bucket, you must have the + /// + /// s3express:CreateSession + /// permission in the + /// Action element of a policy to write the object to the + /// destination. The s3express:SessionMode condition key + /// cannot be set to ReadOnly on the copy destination. + ///

        + ///
      • + ///
      + ///

      If the object is encrypted with SSE-KMS, you must also have the + /// kms:GenerateDataKey and kms:Decrypt permissions + /// in IAM identity-based policies and KMS key policies for the KMS + /// key.

      + ///

      For example policies, see Example bucket policies for S3 Express One Zone and Amazon Web Services Identity and Access Management (IAM) identity-based policies for + /// S3 Express One Zone in the Amazon S3 User Guide.

      + ///
    • + ///
    + ///
    + ///
    Encryption
    + ///
    + ///
      + ///
    • + ///

      + /// General purpose buckets - + /// For information about using + /// server-side encryption with customer-provided encryption keys with the + /// UploadPartCopy operation, see CopyObject and + /// UploadPart.

      + ///
    • + ///
    • + ///

      + /// Directory buckets - + /// For directory buckets, there are only two supported options for server-side encryption: server-side encryption with Amazon S3 managed keys (SSE-S3) (AES256) and server-side encryption with KMS keys (SSE-KMS) (aws:kms). For more + /// information, see Protecting data with server-side encryption in the Amazon S3 User Guide.

      + /// + ///

      For directory buckets, when you perform a + /// CreateMultipartUpload operation and an + /// UploadPartCopy operation, the request headers you provide + /// in the CreateMultipartUpload request must match the default + /// encryption configuration of the destination bucket.

      + ///
      + ///

      S3 Bucket Keys aren't supported, when you copy SSE-KMS encrypted objects from general purpose buckets + /// to directory buckets, from directory buckets to general purpose buckets, or between directory buckets, through UploadPartCopy. In this case, Amazon S3 makes a call to KMS every time a copy request is made for a KMS-encrypted object.

      + ///
    • + ///
    + ///
    + ///
    Special errors
    + ///
    + ///
      + ///
    • + ///

      Error Code: NoSuchUpload + ///

      + ///
        + ///
      • + ///

        Description: The specified multipart upload does not exist. The + /// upload ID might be invalid, or the multipart upload might have been + /// aborted or completed.

        + ///
      • + ///
      • + ///

        HTTP Status Code: 404 Not Found

        + ///
      • + ///
      + ///
    • + ///
    • + ///

      Error Code: InvalidRequest + ///

      + ///
        + ///
      • + ///

        Description: The specified copy source is not supported as a + /// byte-range copy source.

        + ///
      • + ///
      • + ///

        HTTP Status Code: 400 Bad Request

        + ///
      • + ///
      + ///
    • + ///
    + ///
    + ///
    HTTP Host header syntax
    + ///
    + ///

    + /// Directory buckets - The HTTP Host header syntax is + /// Bucket-name.s3express-zone-id.region-code.amazonaws.com.

    + ///
    + ///
    + ///

    The following operations are related to UploadPartCopy:

    + /// + async fn upload_part_copy(&self, _req: S3Request) -> S3Result> { + Err(s3_error!(NotImplemented, "UploadPartCopy is not implemented yet")) + } + /// + ///

    This operation is not supported for directory buckets.

    + ///
    + ///

    Passes transformed objects to a GetObject operation when using Object Lambda access points. For + /// information about Object Lambda access points, see Transforming objects with + /// Object Lambda access points in the Amazon S3 User Guide.

    + ///

    This operation supports metadata that can be returned by GetObject, in addition to + /// RequestRoute, RequestToken, StatusCode, + /// ErrorCode, and ErrorMessage. The GetObject + /// response metadata is supported so that the WriteGetObjectResponse caller, + /// typically an Lambda function, can provide the same metadata when it internally invokes + /// GetObject. When WriteGetObjectResponse is called by a + /// customer-owned Lambda function, the metadata returned to the end user + /// GetObject call might differ from what Amazon S3 would normally return.

    + ///

    You can include any number of metadata headers. When including a metadata header, it + /// should be prefaced with x-amz-meta. For example, + /// x-amz-meta-my-custom-header: MyCustomValue. The primary use case for this + /// is to forward GetObject metadata.

    + ///

    Amazon Web Services provides some prebuilt Lambda functions that you can use with S3 Object Lambda to + /// detect and redact personally identifiable information (PII) and decompress S3 objects. + /// These Lambda functions are available in the Amazon Web Services Serverless Application Repository, and + /// can be selected through the Amazon Web Services Management Console when you create your Object Lambda access point.

    + ///

    Example 1: PII Access Control - This Lambda function uses Amazon Comprehend, a + /// natural language processing (NLP) service using machine learning to find insights and + /// relationships in text. It automatically detects personally identifiable information (PII) + /// such as names, addresses, dates, credit card numbers, and social security numbers from + /// documents in your Amazon S3 bucket.

    + ///

    Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a natural + /// language processing (NLP) service using machine learning to find insights and relationships + /// in text. It automatically redacts personally identifiable information (PII) such as names, + /// addresses, dates, credit card numbers, and social security numbers from documents in your + /// Amazon S3 bucket.

    + ///

    Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression, is + /// equipped to decompress objects stored in S3 in one of six compressed file formats including + /// bzip2, gzip, snappy, zlib, zstandard and ZIP.

    + ///

    For information on how to view and use these functions, see Using Amazon Web Services built Lambda + /// functions in the Amazon S3 User Guide.

    + async fn write_get_object_response( + &self, + _req: S3Request, + ) -> S3Result> { + Err(s3_error!(NotImplemented, "WriteGetObjectResponse is not implemented yet")) + } } - diff --git a/crates/s3s/src/xml/de.rs b/crates/s3s/src/xml/de.rs index c8d0cf74..4af4d175 100644 --- a/crates/s3s/src/xml/de.rs +++ b/crates/s3s/src/xml/de.rs @@ -239,11 +239,7 @@ impl<'xml> Deserializer<'xml> { /// /// # Errors /// Returns an error if the deserialization fails. - pub fn named_element_any( - &mut self, - names: &[&str], - f: impl FnOnce(&mut Self) -> DeResult, - ) -> DeResult { + pub fn named_element_any(&mut self, names: &[&str], f: impl FnOnce(&mut Self) -> DeResult) -> DeResult { let name = self.expect_start_any(names)?; let ans = f(self)?; self.expect_end(name)?; diff --git a/crates/s3s/src/xml/generated.rs b/crates/s3s/src/xml/generated.rs index 226cacc5..17495218 100644 --- a/crates/s3s/src/xml/generated.rs +++ b/crates/s3s/src/xml/generated.rs @@ -824,8679 +824,9385 @@ use std::io::Write; const XMLNS_S3: &str = "http://s3.amazonaws.com/doc/2006-03-01/"; impl Serialize for AccelerateConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("AccelerateConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("AccelerateConfiguration", self) + } } impl<'xml> Deserialize<'xml> for AccelerateConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("AccelerateConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("AccelerateConfiguration", Deserializer::content) + } } impl Serialize for AccessControlPolicy { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("AccessControlPolicy", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("AccessControlPolicy", self) + } } impl<'xml> Deserialize<'xml> for AccessControlPolicy { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("AccessControlPolicy", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("AccessControlPolicy", Deserializer::content) + } } impl Serialize for AnalyticsConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("AnalyticsConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("AnalyticsConfiguration", self) + } } impl<'xml> Deserialize<'xml> for AnalyticsConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("AnalyticsConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("AnalyticsConfiguration", Deserializer::content) + } } impl Serialize for BucketLifecycleConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("LifecycleConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("LifecycleConfiguration", self) + } } impl<'xml> Deserialize<'xml> for BucketLifecycleConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("LifecycleConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("LifecycleConfiguration", Deserializer::content) + } } impl Serialize for BucketLoggingStatus { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("BucketLoggingStatus", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("BucketLoggingStatus", self) + } } impl<'xml> Deserialize<'xml> for BucketLoggingStatus { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("BucketLoggingStatus", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("BucketLoggingStatus", Deserializer::content) + } } impl Serialize for CORSConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CORSConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CORSConfiguration", self) + } } impl<'xml> Deserialize<'xml> for CORSConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CORSConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CORSConfiguration", Deserializer::content) + } } impl Serialize for CompleteMultipartUploadOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("CompleteMultipartUploadResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("CompleteMultipartUploadResult", XMLNS_S3, self) + } } impl Serialize for CompletedMultipartUpload { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CompleteMultipartUpload", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CompleteMultipartUpload", self) + } } impl<'xml> Deserialize<'xml> for CompletedMultipartUpload { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CompleteMultipartUpload", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CompleteMultipartUpload", Deserializer::content) + } } impl Serialize for CopyObjectResult { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CopyObjectResult", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CopyObjectResult", self) + } } impl<'xml> Deserialize<'xml> for CopyObjectResult { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CopyObjectResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CopyObjectResult", Deserializer::content) + } } impl Serialize for CopyPartResult { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CopyPartResult", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CopyPartResult", self) + } } impl<'xml> Deserialize<'xml> for CopyPartResult { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CopyPartResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CopyPartResult", Deserializer::content) + } } impl Serialize for CreateBucketConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CreateBucketConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CreateBucketConfiguration", self) + } } impl<'xml> Deserialize<'xml> for CreateBucketConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CreateBucketConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CreateBucketConfiguration", Deserializer::content) + } } impl Serialize for CreateMultipartUploadOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("InitiateMultipartUploadResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("InitiateMultipartUploadResult", XMLNS_S3, self) + } } impl Serialize for CreateSessionOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("CreateSessionResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("CreateSessionResult", XMLNS_S3, self) + } } impl Serialize for Delete { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Delete", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Delete", self) + } } impl<'xml> Deserialize<'xml> for Delete { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Delete", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Delete", Deserializer::content) + } } impl Serialize for DeleteObjectsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("DeleteResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("DeleteResult", XMLNS_S3, self) + } } impl Serialize for GetBucketAccelerateConfigurationOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("AccelerateConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("AccelerateConfiguration", XMLNS_S3, self) + } } impl Serialize for GetBucketAclOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketAclOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("AccessControlPolicy", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("AccessControlPolicy", Deserializer::content) + } } impl Serialize for GetBucketCorsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("CORSConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("CORSConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketCorsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CORSConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CORSConfiguration", Deserializer::content) + } } impl Serialize for GetBucketLifecycleConfigurationOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("LifecycleConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("LifecycleConfiguration", XMLNS_S3, self) + } } impl Serialize for GetBucketLoggingOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("BucketLoggingStatus", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("BucketLoggingStatus", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketLoggingOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("BucketLoggingStatus", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("BucketLoggingStatus", Deserializer::content) + } } impl Serialize for GetBucketMetadataTableConfigurationResult { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("GetBucketMetadataTableConfigurationResult", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("GetBucketMetadataTableConfigurationResult", self) + } } impl<'xml> Deserialize<'xml> for GetBucketMetadataTableConfigurationResult { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("GetBucketMetadataTableConfigurationResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("GetBucketMetadataTableConfigurationResult", Deserializer::content) + } } impl Serialize for GetBucketNotificationConfigurationOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("NotificationConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("NotificationConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketNotificationConfigurationOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("NotificationConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("NotificationConfiguration", Deserializer::content) + } } impl Serialize for GetBucketRequestPaymentOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("RequestPaymentConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("RequestPaymentConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketRequestPaymentOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("RequestPaymentConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("RequestPaymentConfiguration", Deserializer::content) + } } impl Serialize for GetBucketTaggingOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("Tagging", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("Tagging", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketTaggingOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Tagging", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Tagging", Deserializer::content) + } } impl Serialize for GetBucketVersioningOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("VersioningConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("VersioningConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketVersioningOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("VersioningConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("VersioningConfiguration", Deserializer::content) + } } impl Serialize for GetBucketWebsiteOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("WebsiteConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("WebsiteConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketWebsiteOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("WebsiteConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("WebsiteConfiguration", Deserializer::content) + } } impl Serialize for GetObjectAclOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) + } } impl Serialize for GetObjectAttributesOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("GetObjectAttributesResponse", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("GetObjectAttributesResponse", XMLNS_S3, self) + } } impl Serialize for GetObjectTaggingOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("Tagging", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("Tagging", XMLNS_S3, self) + } } impl Serialize for IntelligentTieringConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("IntelligentTieringConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("IntelligentTieringConfiguration", self) + } } impl<'xml> Deserialize<'xml> for IntelligentTieringConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("IntelligentTieringConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("IntelligentTieringConfiguration", Deserializer::content) + } } impl Serialize for InventoryConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("InventoryConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("InventoryConfiguration", self) + } } impl<'xml> Deserialize<'xml> for InventoryConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("InventoryConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("InventoryConfiguration", Deserializer::content) + } } impl Serialize for ListBucketAnalyticsConfigurationsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListBucketAnalyticsConfigurationResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListBucketAnalyticsConfigurationResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketAnalyticsConfigurationsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListBucketAnalyticsConfigurationResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListBucketAnalyticsConfigurationResult", Deserializer::content) + } } impl Serialize for ListBucketIntelligentTieringConfigurationsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListBucketIntelligentTieringConfigurationsOutput", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListBucketIntelligentTieringConfigurationsOutput", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketIntelligentTieringConfigurationsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListBucketIntelligentTieringConfigurationsOutput", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListBucketIntelligentTieringConfigurationsOutput", Deserializer::content) + } } impl Serialize for ListBucketInventoryConfigurationsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListInventoryConfigurationsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListInventoryConfigurationsResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketInventoryConfigurationsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListInventoryConfigurationsResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListInventoryConfigurationsResult", Deserializer::content) + } } impl Serialize for ListBucketMetricsConfigurationsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListMetricsConfigurationsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListMetricsConfigurationsResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketMetricsConfigurationsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListMetricsConfigurationsResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListMetricsConfigurationsResult", Deserializer::content) + } } impl Serialize for ListBucketsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListAllMyBucketsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListAllMyBucketsResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListAllMyBucketsResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListAllMyBucketsResult", Deserializer::content) + } } impl Serialize for ListDirectoryBucketsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListAllMyDirectoryBucketsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListAllMyDirectoryBucketsResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListDirectoryBucketsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListAllMyDirectoryBucketsResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListAllMyDirectoryBucketsResult", Deserializer::content) + } } impl Serialize for ListMultipartUploadsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListMultipartUploadsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListMultipartUploadsResult", XMLNS_S3, self) + } } impl Serialize for ListObjectVersionsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListVersionsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListVersionsResult", XMLNS_S3, self) + } } impl Serialize for ListObjectsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListBucketResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListBucketResult", XMLNS_S3, self) + } } impl Serialize for ListObjectsV2Output { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListBucketResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListBucketResult", XMLNS_S3, self) + } } impl Serialize for ListPartsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListPartsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListPartsResult", XMLNS_S3, self) + } } impl Serialize for MetadataTableConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("MetadataTableConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("MetadataTableConfiguration", self) + } } impl<'xml> Deserialize<'xml> for MetadataTableConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("MetadataTableConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("MetadataTableConfiguration", Deserializer::content) + } } impl Serialize for MetricsConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("MetricsConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("MetricsConfiguration", self) + } } impl<'xml> Deserialize<'xml> for MetricsConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("MetricsConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("MetricsConfiguration", Deserializer::content) + } } impl Serialize for NotificationConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("NotificationConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("NotificationConfiguration", self) + } } impl<'xml> Deserialize<'xml> for NotificationConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("NotificationConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("NotificationConfiguration", Deserializer::content) + } } impl Serialize for ObjectLockConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("ObjectLockConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("ObjectLockConfiguration", self) + } } impl<'xml> Deserialize<'xml> for ObjectLockConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ObjectLockConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ObjectLockConfiguration", Deserializer::content) + } } impl Serialize for ObjectLockLegalHold { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("LegalHold", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("LegalHold", self) + } } impl<'xml> Deserialize<'xml> for ObjectLockLegalHold { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("LegalHold", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("LegalHold", Deserializer::content) + } } impl Serialize for ObjectLockRetention { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Retention", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Retention", self) + } } impl<'xml> Deserialize<'xml> for ObjectLockRetention { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Retention", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Retention", Deserializer::content) + } } impl Serialize for OwnershipControls { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("OwnershipControls", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("OwnershipControls", self) + } } impl<'xml> Deserialize<'xml> for OwnershipControls { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("OwnershipControls", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("OwnershipControls", Deserializer::content) + } } impl Serialize for PolicyStatus { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("PolicyStatus", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("PolicyStatus", self) + } } impl<'xml> Deserialize<'xml> for PolicyStatus { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("PolicyStatus", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("PolicyStatus", Deserializer::content) + } } impl Serialize for Progress { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Progress", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Progress", self) + } } impl<'xml> Deserialize<'xml> for Progress { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Progress", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Progress", Deserializer::content) + } } impl Serialize for PublicAccessBlockConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("PublicAccessBlockConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("PublicAccessBlockConfiguration", self) + } } impl<'xml> Deserialize<'xml> for PublicAccessBlockConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("PublicAccessBlockConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("PublicAccessBlockConfiguration", Deserializer::content) + } } impl Serialize for ReplicationConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("ReplicationConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("ReplicationConfiguration", self) + } } impl<'xml> Deserialize<'xml> for ReplicationConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ReplicationConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ReplicationConfiguration", Deserializer::content) + } } impl Serialize for RequestPaymentConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("RequestPaymentConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("RequestPaymentConfiguration", self) + } } impl<'xml> Deserialize<'xml> for RequestPaymentConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("RequestPaymentConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("RequestPaymentConfiguration", Deserializer::content) + } } impl Serialize for RestoreRequest { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("RestoreRequest", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("RestoreRequest", self) + } } impl<'xml> Deserialize<'xml> for RestoreRequest { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("RestoreRequest", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("RestoreRequest", Deserializer::content) + } } impl Serialize for SelectObjectContentRequest { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("SelectObjectContentRequest", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("SelectObjectContentRequest", self) + } } impl<'xml> Deserialize<'xml> for SelectObjectContentRequest { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("SelectObjectContentRequest", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("SelectObjectContentRequest", Deserializer::content) + } } impl Serialize for ServerSideEncryptionConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("ServerSideEncryptionConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("ServerSideEncryptionConfiguration", self) + } } impl<'xml> Deserialize<'xml> for ServerSideEncryptionConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ServerSideEncryptionConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ServerSideEncryptionConfiguration", Deserializer::content) + } } impl Serialize for Stats { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Stats", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Stats", self) + } } impl<'xml> Deserialize<'xml> for Stats { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Stats", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Stats", Deserializer::content) + } } impl Serialize for Tagging { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Tagging", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Tagging", self) + } } impl<'xml> Deserialize<'xml> for Tagging { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Tagging", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Tagging", Deserializer::content) + } } impl Serialize for VersioningConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("VersioningConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("VersioningConfiguration", self) + } } impl<'xml> Deserialize<'xml> for VersioningConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("VersioningConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("VersioningConfiguration", Deserializer::content) + } } impl Serialize for WebsiteConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("WebsiteConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("WebsiteConfiguration", self) + } } impl<'xml> Deserialize<'xml> for WebsiteConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("WebsiteConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("WebsiteConfiguration", Deserializer::content) + } } impl SerializeContent for AbortIncompleteMultipartUpload { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.days_after_initiation { -s.content("DaysAfterInitiation", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.days_after_initiation { + s.content("DaysAfterInitiation", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AbortIncompleteMultipartUpload { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut days_after_initiation: Option = None; -d.for_each_element(|d, x| match x { -b"DaysAfterInitiation" => { -if days_after_initiation.is_some() { return Err(DeError::DuplicateField); } -days_after_initiation = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -days_after_initiation, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut days_after_initiation: Option = None; + d.for_each_element(|d, x| match x { + b"DaysAfterInitiation" => { + if days_after_initiation.is_some() { + return Err(DeError::DuplicateField); + } + days_after_initiation = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { days_after_initiation }) + } } impl SerializeContent for AccelerateConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AccelerateConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { status }) + } } impl SerializeContent for AccessControlPolicy { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.grants { -s.list("AccessControlList", "Grant", iter)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.grants { + s.list("AccessControlList", "Grant", iter)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AccessControlPolicy { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut grants: Option = None; -let mut owner: Option = None; -d.for_each_element(|d, x| match x { -b"AccessControlList" => { -if grants.is_some() { return Err(DeError::DuplicateField); } -grants = Some(d.list_content("Grant")?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -grants, -owner, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut grants: Option = None; + let mut owner: Option = None; + d.for_each_element(|d, x| match x { + b"AccessControlList" => { + if grants.is_some() { + return Err(DeError::DuplicateField); + } + grants = Some(d.list_content("Grant")?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { grants, owner }) + } } impl SerializeContent for AccessControlTranslation { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Owner", &self.owner)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Owner", &self.owner)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AccessControlTranslation { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut owner: Option = None; -d.for_each_element(|d, x| match x { -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -owner: owner.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut owner: Option = None; + d.for_each_element(|d, x| match x { + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + owner: owner.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for AnalyticsAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix, tags }) + } } impl SerializeContent for AnalyticsConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -s.content("Id", &self.id)?; -s.content("StorageClassAnalysis", &self.storage_class_analysis)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + s.content("Id", &self.id)?; + s.content("StorageClassAnalysis", &self.storage_class_analysis)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut filter: Option = None; -let mut id: Option = None; -let mut storage_class_analysis: Option = None; -d.for_each_element(|d, x| match x { -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"StorageClassAnalysis" => { -if storage_class_analysis.is_some() { return Err(DeError::DuplicateField); } -storage_class_analysis = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -filter, -id: id.ok_or(DeError::MissingField)?, -storage_class_analysis: storage_class_analysis.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut filter: Option = None; + let mut id: Option = None; + let mut storage_class_analysis: Option = None; + d.for_each_element(|d, x| match x { + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"StorageClassAnalysis" => { + if storage_class_analysis.is_some() { + return Err(DeError::DuplicateField); + } + storage_class_analysis = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + filter, + id: id.ok_or(DeError::MissingField)?, + storage_class_analysis: storage_class_analysis.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for AnalyticsExportDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("S3BucketDestination", &self.s3_bucket_destination)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("S3BucketDestination", &self.s3_bucket_destination)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsExportDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3_bucket_destination: Option = None; -d.for_each_element(|d, x| match x { -b"S3BucketDestination" => { -if s3_bucket_destination.is_some() { return Err(DeError::DuplicateField); } -s3_bucket_destination = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3_bucket_destination: Option = None; + d.for_each_element(|d, x| match x { + b"S3BucketDestination" => { + if s3_bucket_destination.is_some() { + return Err(DeError::DuplicateField); + } + s3_bucket_destination = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for AnalyticsFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -match self { -Self::And(x) => s.content("And", x), -Self::Prefix(x) => s.content("Prefix", x), -Self::Tag(x) => s.content("Tag", x), -} -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + match self { + Self::And(x) => s.content("And", x), + Self::Prefix(x) => s.content("Prefix", x), + Self::Tag(x) => s.content("Tag", x), + } + } } impl<'xml> DeserializeContent<'xml> for AnalyticsFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.element(|d, x| match x { -b"And" => Ok(Self::And(d.content()?)), -b"Prefix" => Ok(Self::Prefix(d.content()?)), -b"Tag" => Ok(Self::Tag(d.content()?)), -_ => Err(DeError::UnexpectedTagName) -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.element(|d, x| match x { + b"And" => Ok(Self::And(d.content()?)), + b"Prefix" => Ok(Self::Prefix(d.content()?)), + b"Tag" => Ok(Self::Tag(d.content()?)), + _ => Err(DeError::UnexpectedTagName), + }) + } } impl SerializeContent for AnalyticsS3BucketDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Bucket", &self.bucket)?; -if let Some(ref val) = self.bucket_account_id { -s.content("BucketAccountId", val)?; -} -s.content("Format", &self.format)?; -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Bucket", &self.bucket)?; + if let Some(ref val) = self.bucket_account_id { + s.content("BucketAccountId", val)?; + } + s.content("Format", &self.format)?; + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsS3BucketDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bucket: Option = None; -let mut bucket_account_id: Option = None; -let mut format: Option = None; -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Bucket" => { -if bucket.is_some() { return Err(DeError::DuplicateField); } -bucket = Some(d.content()?); -Ok(()) -} -b"BucketAccountId" => { -if bucket_account_id.is_some() { return Err(DeError::DuplicateField); } -bucket_account_id = Some(d.content()?); -Ok(()) -} -b"Format" => { -if format.is_some() { return Err(DeError::DuplicateField); } -format = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bucket: bucket.ok_or(DeError::MissingField)?, -bucket_account_id, -format: format.ok_or(DeError::MissingField)?, -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bucket: Option = None; + let mut bucket_account_id: Option = None; + let mut format: Option = None; + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Bucket" => { + if bucket.is_some() { + return Err(DeError::DuplicateField); + } + bucket = Some(d.content()?); + Ok(()) + } + b"BucketAccountId" => { + if bucket_account_id.is_some() { + return Err(DeError::DuplicateField); + } + bucket_account_id = Some(d.content()?); + Ok(()) + } + b"Format" => { + if format.is_some() { + return Err(DeError::DuplicateField); + } + format = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bucket: bucket.ok_or(DeError::MissingField)?, + bucket_account_id, + format: format.ok_or(DeError::MissingField)?, + prefix, + }) + } } impl SerializeContent for AnalyticsS3ExportFileFormat { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsS3ExportFileFormat { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"CSV" => Ok(Self::from_static(AnalyticsS3ExportFileFormat::CSV)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"CSV" => Ok(Self::from_static(AnalyticsS3ExportFileFormat::CSV)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for AssumeRoleOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.assumed_role_user { -s.content("AssumedRoleUser", val)?; -} -if let Some(ref val) = self.credentials { -s.content("Credentials", val)?; -} -if let Some(ref val) = self.packed_policy_size { -s.content("PackedPolicySize", val)?; -} -if let Some(ref val) = self.source_identity { -s.content("SourceIdentity", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.assumed_role_user { + s.content("AssumedRoleUser", val)?; + } + if let Some(ref val) = self.credentials { + s.content("Credentials", val)?; + } + if let Some(ref val) = self.packed_policy_size { + s.content("PackedPolicySize", val)?; + } + if let Some(ref val) = self.source_identity { + s.content("SourceIdentity", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AssumeRoleOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut assumed_role_user: Option = None; -let mut credentials: Option = None; -let mut packed_policy_size: Option = None; -let mut source_identity: Option = None; -d.for_each_element(|d, x| match x { -b"AssumedRoleUser" => { -if assumed_role_user.is_some() { return Err(DeError::DuplicateField); } -assumed_role_user = Some(d.content()?); -Ok(()) -} -b"Credentials" => { -if credentials.is_some() { return Err(DeError::DuplicateField); } -credentials = Some(d.content()?); -Ok(()) -} -b"PackedPolicySize" => { -if packed_policy_size.is_some() { return Err(DeError::DuplicateField); } -packed_policy_size = Some(d.content()?); -Ok(()) -} -b"SourceIdentity" => { -if source_identity.is_some() { return Err(DeError::DuplicateField); } -source_identity = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -assumed_role_user, -credentials, -packed_policy_size, -source_identity, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut assumed_role_user: Option = None; + let mut credentials: Option = None; + let mut packed_policy_size: Option = None; + let mut source_identity: Option = None; + d.for_each_element(|d, x| match x { + b"AssumedRoleUser" => { + if assumed_role_user.is_some() { + return Err(DeError::DuplicateField); + } + assumed_role_user = Some(d.content()?); + Ok(()) + } + b"Credentials" => { + if credentials.is_some() { + return Err(DeError::DuplicateField); + } + credentials = Some(d.content()?); + Ok(()) + } + b"PackedPolicySize" => { + if packed_policy_size.is_some() { + return Err(DeError::DuplicateField); + } + packed_policy_size = Some(d.content()?); + Ok(()) + } + b"SourceIdentity" => { + if source_identity.is_some() { + return Err(DeError::DuplicateField); + } + source_identity = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + assumed_role_user, + credentials, + packed_policy_size, + source_identity, + }) + } } impl SerializeContent for AssumedRoleUser { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Arn", &self.arn)?; -s.content("AssumedRoleId", &self.assumed_role_id)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Arn", &self.arn)?; + s.content("AssumedRoleId", &self.assumed_role_id)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AssumedRoleUser { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut arn: Option = None; -let mut assumed_role_id: Option = None; -d.for_each_element(|d, x| match x { -b"Arn" => { -if arn.is_some() { return Err(DeError::DuplicateField); } -arn = Some(d.content()?); -Ok(()) -} -b"AssumedRoleId" => { -if assumed_role_id.is_some() { return Err(DeError::DuplicateField); } -assumed_role_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -arn: arn.ok_or(DeError::MissingField)?, -assumed_role_id: assumed_role_id.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut arn: Option = None; + let mut assumed_role_id: Option = None; + d.for_each_element(|d, x| match x { + b"Arn" => { + if arn.is_some() { + return Err(DeError::DuplicateField); + } + arn = Some(d.content()?); + Ok(()) + } + b"AssumedRoleId" => { + if assumed_role_id.is_some() { + return Err(DeError::DuplicateField); + } + assumed_role_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + arn: arn.ok_or(DeError::MissingField)?, + assumed_role_id: assumed_role_id.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Bucket { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket_region { -s.content("BucketRegion", val)?; -} -if let Some(ref val) = self.creation_date { -s.timestamp("CreationDate", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket_region { + s.content("BucketRegion", val)?; + } + if let Some(ref val) = self.creation_date { + s.timestamp("CreationDate", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Bucket { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bucket_region: Option = None; -let mut creation_date: Option = None; -let mut name: Option = None; -d.for_each_element(|d, x| match x { -b"BucketRegion" => { -if bucket_region.is_some() { return Err(DeError::DuplicateField); } -bucket_region = Some(d.content()?); -Ok(()) -} -b"CreationDate" => { -if creation_date.is_some() { return Err(DeError::DuplicateField); } -creation_date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Name" => { -if name.is_some() { return Err(DeError::DuplicateField); } -name = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bucket_region, -creation_date, -name, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bucket_region: Option = None; + let mut creation_date: Option = None; + let mut name: Option = None; + d.for_each_element(|d, x| match x { + b"BucketRegion" => { + if bucket_region.is_some() { + return Err(DeError::DuplicateField); + } + bucket_region = Some(d.content()?); + Ok(()) + } + b"CreationDate" => { + if creation_date.is_some() { + return Err(DeError::DuplicateField); + } + creation_date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Name" => { + if name.is_some() { + return Err(DeError::DuplicateField); + } + name = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bucket_region, + creation_date, + name, + }) + } } impl SerializeContent for BucketAccelerateStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketAccelerateStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Enabled" => Ok(Self::from_static(BucketAccelerateStatus::ENABLED)), -b"Suspended" => Ok(Self::from_static(BucketAccelerateStatus::SUSPENDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Enabled" => Ok(Self::from_static(BucketAccelerateStatus::ENABLED)), + b"Suspended" => Ok(Self::from_static(BucketAccelerateStatus::SUSPENDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for BucketInfo { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.data_redundancy { -s.content("DataRedundancy", val)?; -} -if let Some(ref val) = self.type_ { -s.content("Type", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.data_redundancy { + s.content("DataRedundancy", val)?; + } + if let Some(ref val) = self.type_ { + s.content("Type", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for BucketInfo { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut data_redundancy: Option = None; -let mut type_: Option = None; -d.for_each_element(|d, x| match x { -b"DataRedundancy" => { -if data_redundancy.is_some() { return Err(DeError::DuplicateField); } -data_redundancy = Some(d.content()?); -Ok(()) -} -b"Type" => { -if type_.is_some() { return Err(DeError::DuplicateField); } -type_ = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -data_redundancy, -type_, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut data_redundancy: Option = None; + let mut type_: Option = None; + d.for_each_element(|d, x| match x { + b"DataRedundancy" => { + if data_redundancy.is_some() { + return Err(DeError::DuplicateField); + } + data_redundancy = Some(d.content()?); + Ok(()) + } + b"Type" => { + if type_.is_some() { + return Err(DeError::DuplicateField); + } + type_ = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { data_redundancy, type_ }) + } } impl SerializeContent for BucketLifecycleConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.rules; -s.flattened_list("Rule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.rules; + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for BucketLifecycleConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut rules: Option = None; -d.for_each_element(|d, x| match x { -b"Rule" => { -let ans: LifecycleRule = d.content()?; -rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -rules: rules.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut rules: Option = None; + d.for_each_element(|d, x| match x { + b"Rule" => { + let ans: LifecycleRule = d.content()?; + rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + rules: rules.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for BucketLocationConstraint { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketLocationConstraint { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"EU" => Ok(Self::from_static(BucketLocationConstraint::EU)), -b"af-south-1" => Ok(Self::from_static(BucketLocationConstraint::AF_SOUTH_1)), -b"ap-east-1" => Ok(Self::from_static(BucketLocationConstraint::AP_EAST_1)), -b"ap-northeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_1)), -b"ap-northeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_2)), -b"ap-northeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_3)), -b"ap-south-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_1)), -b"ap-south-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_2)), -b"ap-southeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_1)), -b"ap-southeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_2)), -b"ap-southeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_3)), -b"ap-southeast-4" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_4)), -b"ap-southeast-5" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_5)), -b"ca-central-1" => Ok(Self::from_static(BucketLocationConstraint::CA_CENTRAL_1)), -b"cn-north-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTH_1)), -b"cn-northwest-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTHWEST_1)), -b"eu-central-1" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_1)), -b"eu-central-2" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_2)), -b"eu-north-1" => Ok(Self::from_static(BucketLocationConstraint::EU_NORTH_1)), -b"eu-south-1" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_1)), -b"eu-south-2" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_2)), -b"eu-west-1" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_1)), -b"eu-west-2" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_2)), -b"eu-west-3" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_3)), -b"il-central-1" => Ok(Self::from_static(BucketLocationConstraint::IL_CENTRAL_1)), -b"me-central-1" => Ok(Self::from_static(BucketLocationConstraint::ME_CENTRAL_1)), -b"me-south-1" => Ok(Self::from_static(BucketLocationConstraint::ME_SOUTH_1)), -b"sa-east-1" => Ok(Self::from_static(BucketLocationConstraint::SA_EAST_1)), -b"us-east-2" => Ok(Self::from_static(BucketLocationConstraint::US_EAST_2)), -b"us-gov-east-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_EAST_1)), -b"us-gov-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_WEST_1)), -b"us-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_1)), -b"us-west-2" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_2)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"EU" => Ok(Self::from_static(BucketLocationConstraint::EU)), + b"af-south-1" => Ok(Self::from_static(BucketLocationConstraint::AF_SOUTH_1)), + b"ap-east-1" => Ok(Self::from_static(BucketLocationConstraint::AP_EAST_1)), + b"ap-northeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_1)), + b"ap-northeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_2)), + b"ap-northeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_3)), + b"ap-south-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_1)), + b"ap-south-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_2)), + b"ap-southeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_1)), + b"ap-southeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_2)), + b"ap-southeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_3)), + b"ap-southeast-4" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_4)), + b"ap-southeast-5" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_5)), + b"ca-central-1" => Ok(Self::from_static(BucketLocationConstraint::CA_CENTRAL_1)), + b"cn-north-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTH_1)), + b"cn-northwest-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTHWEST_1)), + b"eu-central-1" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_1)), + b"eu-central-2" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_2)), + b"eu-north-1" => Ok(Self::from_static(BucketLocationConstraint::EU_NORTH_1)), + b"eu-south-1" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_1)), + b"eu-south-2" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_2)), + b"eu-west-1" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_1)), + b"eu-west-2" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_2)), + b"eu-west-3" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_3)), + b"il-central-1" => Ok(Self::from_static(BucketLocationConstraint::IL_CENTRAL_1)), + b"me-central-1" => Ok(Self::from_static(BucketLocationConstraint::ME_CENTRAL_1)), + b"me-south-1" => Ok(Self::from_static(BucketLocationConstraint::ME_SOUTH_1)), + b"sa-east-1" => Ok(Self::from_static(BucketLocationConstraint::SA_EAST_1)), + b"us-east-2" => Ok(Self::from_static(BucketLocationConstraint::US_EAST_2)), + b"us-gov-east-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_EAST_1)), + b"us-gov-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_WEST_1)), + b"us-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_1)), + b"us-west-2" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_2)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for BucketLoggingStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.logging_enabled { -s.content("LoggingEnabled", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.logging_enabled { + s.content("LoggingEnabled", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for BucketLoggingStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut logging_enabled: Option = None; -d.for_each_element(|d, x| match x { -b"LoggingEnabled" => { -if logging_enabled.is_some() { return Err(DeError::DuplicateField); } -logging_enabled = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -logging_enabled, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut logging_enabled: Option = None; + d.for_each_element(|d, x| match x { + b"LoggingEnabled" => { + if logging_enabled.is_some() { + return Err(DeError::DuplicateField); + } + logging_enabled = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { logging_enabled }) + } } impl SerializeContent for BucketLogsPermission { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketLogsPermission { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"FULL_CONTROL" => Ok(Self::from_static(BucketLogsPermission::FULL_CONTROL)), -b"READ" => Ok(Self::from_static(BucketLogsPermission::READ)), -b"WRITE" => Ok(Self::from_static(BucketLogsPermission::WRITE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"FULL_CONTROL" => Ok(Self::from_static(BucketLogsPermission::FULL_CONTROL)), + b"READ" => Ok(Self::from_static(BucketLogsPermission::READ)), + b"WRITE" => Ok(Self::from_static(BucketLogsPermission::WRITE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for BucketType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Directory" => Ok(Self::from_static(BucketType::DIRECTORY)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Directory" => Ok(Self::from_static(BucketType::DIRECTORY)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for BucketVersioningStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketVersioningStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Enabled" => Ok(Self::from_static(BucketVersioningStatus::ENABLED)), -b"Suspended" => Ok(Self::from_static(BucketVersioningStatus::SUSPENDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Enabled" => Ok(Self::from_static(BucketVersioningStatus::ENABLED)), + b"Suspended" => Ok(Self::from_static(BucketVersioningStatus::SUSPENDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for CORSConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.cors_rules; -s.flattened_list("CORSRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.cors_rules; + s.flattened_list("CORSRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CORSConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut cors_rules: Option = None; -d.for_each_element(|d, x| match x { -b"CORSRule" => { -let ans: CORSRule = d.content()?; -cors_rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -cors_rules: cors_rules.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut cors_rules: Option = None; + d.for_each_element(|d, x| match x { + b"CORSRule" => { + let ans: CORSRule = d.content()?; + cors_rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + cors_rules: cors_rules.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for CORSRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.allowed_headers { -s.flattened_list("AllowedHeader", iter)?; -} -{ -let iter = &self.allowed_methods; -s.flattened_list("AllowedMethod", iter)?; -} -{ -let iter = &self.allowed_origins; -s.flattened_list("AllowedOrigin", iter)?; -} -if let Some(iter) = &self.expose_headers { -s.flattened_list("ExposeHeader", iter)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -if let Some(ref val) = self.max_age_seconds { -s.content("MaxAgeSeconds", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.allowed_headers { + s.flattened_list("AllowedHeader", iter)?; + } + { + let iter = &self.allowed_methods; + s.flattened_list("AllowedMethod", iter)?; + } + { + let iter = &self.allowed_origins; + s.flattened_list("AllowedOrigin", iter)?; + } + if let Some(iter) = &self.expose_headers { + s.flattened_list("ExposeHeader", iter)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + if let Some(ref val) = self.max_age_seconds { + s.content("MaxAgeSeconds", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CORSRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut allowed_headers: Option = None; -let mut allowed_methods: Option = None; -let mut allowed_origins: Option = None; -let mut expose_headers: Option = None; -let mut id: Option = None; -let mut max_age_seconds: Option = None; -d.for_each_element(|d, x| match x { -b"AllowedHeader" => { -let ans: AllowedHeader = d.content()?; -allowed_headers.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"AllowedMethod" => { -let ans: AllowedMethod = d.content()?; -allowed_methods.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"AllowedOrigin" => { -let ans: AllowedOrigin = d.content()?; -allowed_origins.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ExposeHeader" => { -let ans: ExposeHeader = d.content()?; -expose_headers.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"MaxAgeSeconds" => { -if max_age_seconds.is_some() { return Err(DeError::DuplicateField); } -max_age_seconds = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -allowed_headers, -allowed_methods: allowed_methods.ok_or(DeError::MissingField)?, -allowed_origins: allowed_origins.ok_or(DeError::MissingField)?, -expose_headers, -id, -max_age_seconds, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut allowed_headers: Option = None; + let mut allowed_methods: Option = None; + let mut allowed_origins: Option = None; + let mut expose_headers: Option = None; + let mut id: Option = None; + let mut max_age_seconds: Option = None; + d.for_each_element(|d, x| match x { + b"AllowedHeader" => { + let ans: AllowedHeader = d.content()?; + allowed_headers.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"AllowedMethod" => { + let ans: AllowedMethod = d.content()?; + allowed_methods.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"AllowedOrigin" => { + let ans: AllowedOrigin = d.content()?; + allowed_origins.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ExposeHeader" => { + let ans: ExposeHeader = d.content()?; + expose_headers.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"MaxAgeSeconds" => { + if max_age_seconds.is_some() { + return Err(DeError::DuplicateField); + } + max_age_seconds = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + allowed_headers, + allowed_methods: allowed_methods.ok_or(DeError::MissingField)?, + allowed_origins: allowed_origins.ok_or(DeError::MissingField)?, + expose_headers, + id, + max_age_seconds, + }) + } } impl SerializeContent for CSVInput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.allow_quoted_record_delimiter { -s.content("AllowQuotedRecordDelimiter", val)?; -} -if let Some(ref val) = self.comments { -s.content("Comments", val)?; -} -if let Some(ref val) = self.field_delimiter { -s.content("FieldDelimiter", val)?; -} -if let Some(ref val) = self.file_header_info { -s.content("FileHeaderInfo", val)?; -} -if let Some(ref val) = self.quote_character { -s.content("QuoteCharacter", val)?; -} -if let Some(ref val) = self.quote_escape_character { -s.content("QuoteEscapeCharacter", val)?; -} -if let Some(ref val) = self.record_delimiter { -s.content("RecordDelimiter", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.allow_quoted_record_delimiter { + s.content("AllowQuotedRecordDelimiter", val)?; + } + if let Some(ref val) = self.comments { + s.content("Comments", val)?; + } + if let Some(ref val) = self.field_delimiter { + s.content("FieldDelimiter", val)?; + } + if let Some(ref val) = self.file_header_info { + s.content("FileHeaderInfo", val)?; + } + if let Some(ref val) = self.quote_character { + s.content("QuoteCharacter", val)?; + } + if let Some(ref val) = self.quote_escape_character { + s.content("QuoteEscapeCharacter", val)?; + } + if let Some(ref val) = self.record_delimiter { + s.content("RecordDelimiter", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CSVInput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut allow_quoted_record_delimiter: Option = None; -let mut comments: Option = None; -let mut field_delimiter: Option = None; -let mut file_header_info: Option = None; -let mut quote_character: Option = None; -let mut quote_escape_character: Option = None; -let mut record_delimiter: Option = None; -d.for_each_element(|d, x| match x { -b"AllowQuotedRecordDelimiter" => { -if allow_quoted_record_delimiter.is_some() { return Err(DeError::DuplicateField); } -allow_quoted_record_delimiter = Some(d.content()?); -Ok(()) -} -b"Comments" => { -if comments.is_some() { return Err(DeError::DuplicateField); } -comments = Some(d.content()?); -Ok(()) -} -b"FieldDelimiter" => { -if field_delimiter.is_some() { return Err(DeError::DuplicateField); } -field_delimiter = Some(d.content()?); -Ok(()) -} -b"FileHeaderInfo" => { -if file_header_info.is_some() { return Err(DeError::DuplicateField); } -file_header_info = Some(d.content()?); -Ok(()) -} -b"QuoteCharacter" => { -if quote_character.is_some() { return Err(DeError::DuplicateField); } -quote_character = Some(d.content()?); -Ok(()) -} -b"QuoteEscapeCharacter" => { -if quote_escape_character.is_some() { return Err(DeError::DuplicateField); } -quote_escape_character = Some(d.content()?); -Ok(()) -} -b"RecordDelimiter" => { -if record_delimiter.is_some() { return Err(DeError::DuplicateField); } -record_delimiter = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -allow_quoted_record_delimiter, -comments, -field_delimiter, -file_header_info, -quote_character, -quote_escape_character, -record_delimiter, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut allow_quoted_record_delimiter: Option = None; + let mut comments: Option = None; + let mut field_delimiter: Option = None; + let mut file_header_info: Option = None; + let mut quote_character: Option = None; + let mut quote_escape_character: Option = None; + let mut record_delimiter: Option = None; + d.for_each_element(|d, x| match x { + b"AllowQuotedRecordDelimiter" => { + if allow_quoted_record_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + allow_quoted_record_delimiter = Some(d.content()?); + Ok(()) + } + b"Comments" => { + if comments.is_some() { + return Err(DeError::DuplicateField); + } + comments = Some(d.content()?); + Ok(()) + } + b"FieldDelimiter" => { + if field_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + field_delimiter = Some(d.content()?); + Ok(()) + } + b"FileHeaderInfo" => { + if file_header_info.is_some() { + return Err(DeError::DuplicateField); + } + file_header_info = Some(d.content()?); + Ok(()) + } + b"QuoteCharacter" => { + if quote_character.is_some() { + return Err(DeError::DuplicateField); + } + quote_character = Some(d.content()?); + Ok(()) + } + b"QuoteEscapeCharacter" => { + if quote_escape_character.is_some() { + return Err(DeError::DuplicateField); + } + quote_escape_character = Some(d.content()?); + Ok(()) + } + b"RecordDelimiter" => { + if record_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + record_delimiter = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + allow_quoted_record_delimiter, + comments, + field_delimiter, + file_header_info, + quote_character, + quote_escape_character, + record_delimiter, + }) + } } impl SerializeContent for CSVOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.field_delimiter { -s.content("FieldDelimiter", val)?; -} -if let Some(ref val) = self.quote_character { -s.content("QuoteCharacter", val)?; -} -if let Some(ref val) = self.quote_escape_character { -s.content("QuoteEscapeCharacter", val)?; -} -if let Some(ref val) = self.quote_fields { -s.content("QuoteFields", val)?; -} -if let Some(ref val) = self.record_delimiter { -s.content("RecordDelimiter", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.field_delimiter { + s.content("FieldDelimiter", val)?; + } + if let Some(ref val) = self.quote_character { + s.content("QuoteCharacter", val)?; + } + if let Some(ref val) = self.quote_escape_character { + s.content("QuoteEscapeCharacter", val)?; + } + if let Some(ref val) = self.quote_fields { + s.content("QuoteFields", val)?; + } + if let Some(ref val) = self.record_delimiter { + s.content("RecordDelimiter", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CSVOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut field_delimiter: Option = None; -let mut quote_character: Option = None; -let mut quote_escape_character: Option = None; -let mut quote_fields: Option = None; -let mut record_delimiter: Option = None; -d.for_each_element(|d, x| match x { -b"FieldDelimiter" => { -if field_delimiter.is_some() { return Err(DeError::DuplicateField); } -field_delimiter = Some(d.content()?); -Ok(()) -} -b"QuoteCharacter" => { -if quote_character.is_some() { return Err(DeError::DuplicateField); } -quote_character = Some(d.content()?); -Ok(()) -} -b"QuoteEscapeCharacter" => { -if quote_escape_character.is_some() { return Err(DeError::DuplicateField); } -quote_escape_character = Some(d.content()?); -Ok(()) -} -b"QuoteFields" => { -if quote_fields.is_some() { return Err(DeError::DuplicateField); } -quote_fields = Some(d.content()?); -Ok(()) -} -b"RecordDelimiter" => { -if record_delimiter.is_some() { return Err(DeError::DuplicateField); } -record_delimiter = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -field_delimiter, -quote_character, -quote_escape_character, -quote_fields, -record_delimiter, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut field_delimiter: Option = None; + let mut quote_character: Option = None; + let mut quote_escape_character: Option = None; + let mut quote_fields: Option = None; + let mut record_delimiter: Option = None; + d.for_each_element(|d, x| match x { + b"FieldDelimiter" => { + if field_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + field_delimiter = Some(d.content()?); + Ok(()) + } + b"QuoteCharacter" => { + if quote_character.is_some() { + return Err(DeError::DuplicateField); + } + quote_character = Some(d.content()?); + Ok(()) + } + b"QuoteEscapeCharacter" => { + if quote_escape_character.is_some() { + return Err(DeError::DuplicateField); + } + quote_escape_character = Some(d.content()?); + Ok(()) + } + b"QuoteFields" => { + if quote_fields.is_some() { + return Err(DeError::DuplicateField); + } + quote_fields = Some(d.content()?); + Ok(()) + } + b"RecordDelimiter" => { + if record_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + record_delimiter = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + field_delimiter, + quote_character, + quote_escape_character, + quote_fields, + record_delimiter, + }) + } } impl SerializeContent for Checksum { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Checksum { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut checksum_type: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -checksum_type, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut checksum_type: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + checksum_type, + }) + } } impl SerializeContent for ChecksumAlgorithm { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ChecksumAlgorithm { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"CRC32" => Ok(Self::from_static(ChecksumAlgorithm::CRC32)), -b"CRC32C" => Ok(Self::from_static(ChecksumAlgorithm::CRC32C)), -b"CRC64NVME" => Ok(Self::from_static(ChecksumAlgorithm::CRC64NVME)), -b"SHA1" => Ok(Self::from_static(ChecksumAlgorithm::SHA1)), -b"SHA256" => Ok(Self::from_static(ChecksumAlgorithm::SHA256)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"CRC32" => Ok(Self::from_static(ChecksumAlgorithm::CRC32)), + b"CRC32C" => Ok(Self::from_static(ChecksumAlgorithm::CRC32C)), + b"CRC64NVME" => Ok(Self::from_static(ChecksumAlgorithm::CRC64NVME)), + b"SHA1" => Ok(Self::from_static(ChecksumAlgorithm::SHA1)), + b"SHA256" => Ok(Self::from_static(ChecksumAlgorithm::SHA256)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ChecksumType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ChecksumType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"COMPOSITE" => Ok(Self::from_static(ChecksumType::COMPOSITE)), -b"FULL_OBJECT" => Ok(Self::from_static(ChecksumType::FULL_OBJECT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"COMPOSITE" => Ok(Self::from_static(ChecksumType::COMPOSITE)), + b"FULL_OBJECT" => Ok(Self::from_static(ChecksumType::FULL_OBJECT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for CommonPrefix { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CommonPrefix { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix }) + } } impl SerializeContent for CompleteMultipartUploadOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.location { -s.content("Location", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.location { + s.content("Location", val)?; + } + Ok(()) + } } impl SerializeContent for CompletedMultipartUpload { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.parts { -s.flattened_list("Part", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.parts { + s.flattened_list("Part", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CompletedMultipartUpload { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut parts: Option = None; -d.for_each_element(|d, x| match x { -b"Part" => { -let ans: CompletedPart = d.content()?; -parts.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -parts, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut parts: Option = None; + d.for_each_element(|d, x| match x { + b"Part" => { + let ans: CompletedPart = d.content()?; + parts.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { parts }) + } } impl SerializeContent for CompletedPart { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.part_number { -s.content("PartNumber", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.part_number { + s.content("PartNumber", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CompletedPart { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut e_tag: Option = None; -let mut part_number: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"PartNumber" => { -if part_number.is_some() { return Err(DeError::DuplicateField); } -part_number = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -e_tag, -part_number, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut e_tag: Option = None; + let mut part_number: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"PartNumber" => { + if part_number.is_some() { + return Err(DeError::DuplicateField); + } + part_number = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + e_tag, + part_number, + }) + } } impl SerializeContent for CompressionType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for CompressionType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"BZIP2" => Ok(Self::from_static(CompressionType::BZIP2)), -b"GZIP" => Ok(Self::from_static(CompressionType::GZIP)), -b"NONE" => Ok(Self::from_static(CompressionType::NONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"BZIP2" => Ok(Self::from_static(CompressionType::BZIP2)), + b"GZIP" => Ok(Self::from_static(CompressionType::GZIP)), + b"NONE" => Ok(Self::from_static(CompressionType::NONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Condition { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.http_error_code_returned_equals { -s.content("HttpErrorCodeReturnedEquals", val)?; -} -if let Some(ref val) = self.key_prefix_equals { -s.content("KeyPrefixEquals", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.http_error_code_returned_equals { + s.content("HttpErrorCodeReturnedEquals", val)?; + } + if let Some(ref val) = self.key_prefix_equals { + s.content("KeyPrefixEquals", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Condition { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut http_error_code_returned_equals: Option = None; -let mut key_prefix_equals: Option = None; -d.for_each_element(|d, x| match x { -b"HttpErrorCodeReturnedEquals" => { -if http_error_code_returned_equals.is_some() { return Err(DeError::DuplicateField); } -http_error_code_returned_equals = Some(d.content()?); -Ok(()) -} -b"KeyPrefixEquals" => { -if key_prefix_equals.is_some() { return Err(DeError::DuplicateField); } -key_prefix_equals = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -http_error_code_returned_equals, -key_prefix_equals, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut http_error_code_returned_equals: Option = None; + let mut key_prefix_equals: Option = None; + d.for_each_element(|d, x| match x { + b"HttpErrorCodeReturnedEquals" => { + if http_error_code_returned_equals.is_some() { + return Err(DeError::DuplicateField); + } + http_error_code_returned_equals = Some(d.content()?); + Ok(()) + } + b"KeyPrefixEquals" => { + if key_prefix_equals.is_some() { + return Err(DeError::DuplicateField); + } + key_prefix_equals = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + http_error_code_returned_equals, + key_prefix_equals, + }) + } } impl SerializeContent for CopyObjectResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CopyObjectResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut checksum_type: Option = None; -let mut e_tag: Option = None; -let mut last_modified: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -checksum_type, -e_tag, -last_modified, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut checksum_type: Option = None; + let mut e_tag: Option = None; + let mut last_modified: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + checksum_type, + e_tag, + last_modified, + }) + } } impl SerializeContent for CopyPartResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CopyPartResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut e_tag: Option = None; -let mut last_modified: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -e_tag, -last_modified, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut e_tag: Option = None; + let mut last_modified: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + e_tag, + last_modified, + }) + } } impl SerializeContent for CreateBucketConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(ref val) = self.location { -s.content("Location", val)?; -} -if let Some(ref val) = self.location_constraint { -s.content("LocationConstraint", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(ref val) = self.location { + s.content("Location", val)?; + } + if let Some(ref val) = self.location_constraint { + s.content("LocationConstraint", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CreateBucketConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bucket: Option = None; -let mut location: Option = None; -let mut location_constraint: Option = None; -d.for_each_element(|d, x| match x { -b"Bucket" => { -if bucket.is_some() { return Err(DeError::DuplicateField); } -bucket = Some(d.content()?); -Ok(()) -} -b"Location" => { -if location.is_some() { return Err(DeError::DuplicateField); } -location = Some(d.content()?); -Ok(()) -} -b"LocationConstraint" => { -if location_constraint.is_some() { return Err(DeError::DuplicateField); } -location_constraint = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bucket, -location, -location_constraint, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bucket: Option = None; + let mut location: Option = None; + let mut location_constraint: Option = None; + d.for_each_element(|d, x| match x { + b"Bucket" => { + if bucket.is_some() { + return Err(DeError::DuplicateField); + } + bucket = Some(d.content()?); + Ok(()) + } + b"Location" => { + if location.is_some() { + return Err(DeError::DuplicateField); + } + location = Some(d.content()?); + Ok(()) + } + b"LocationConstraint" => { + if location_constraint.is_some() { + return Err(DeError::DuplicateField); + } + location_constraint = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bucket, + location, + location_constraint, + }) + } } impl SerializeContent for CreateMultipartUploadOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.upload_id { -s.content("UploadId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.upload_id { + s.content("UploadId", val)?; + } + Ok(()) + } } impl SerializeContent for CreateSessionOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Credentials", &self.credentials)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Credentials", &self.credentials)?; + Ok(()) + } } impl SerializeContent for Credentials { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("AccessKeyId", &self.access_key_id)?; -s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; -s.content("SecretAccessKey", &self.secret_access_key)?; -s.content("SessionToken", &self.session_token)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("AccessKeyId", &self.access_key_id)?; + s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; + s.content("SecretAccessKey", &self.secret_access_key)?; + s.content("SessionToken", &self.session_token)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Credentials { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_key_id: Option = None; -let mut expiration: Option = None; -let mut secret_access_key: Option = None; -let mut session_token: Option = None; -d.for_each_element(|d, x| match x { -b"AccessKeyId" => { -if access_key_id.is_some() { return Err(DeError::DuplicateField); } -access_key_id = Some(d.content()?); -Ok(()) -} -b"Expiration" => { -if expiration.is_some() { return Err(DeError::DuplicateField); } -expiration = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"SecretAccessKey" => { -if secret_access_key.is_some() { return Err(DeError::DuplicateField); } -secret_access_key = Some(d.content()?); -Ok(()) -} -b"SessionToken" => { -if session_token.is_some() { return Err(DeError::DuplicateField); } -session_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_key_id: access_key_id.ok_or(DeError::MissingField)?, -expiration: expiration.ok_or(DeError::MissingField)?, -secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, -session_token: session_token.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_key_id: Option = None; + let mut expiration: Option = None; + let mut secret_access_key: Option = None; + let mut session_token: Option = None; + d.for_each_element(|d, x| match x { + b"AccessKeyId" => { + if access_key_id.is_some() { + return Err(DeError::DuplicateField); + } + access_key_id = Some(d.content()?); + Ok(()) + } + b"Expiration" => { + if expiration.is_some() { + return Err(DeError::DuplicateField); + } + expiration = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"SecretAccessKey" => { + if secret_access_key.is_some() { + return Err(DeError::DuplicateField); + } + secret_access_key = Some(d.content()?); + Ok(()) + } + b"SessionToken" => { + if session_token.is_some() { + return Err(DeError::DuplicateField); + } + session_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_key_id: access_key_id.ok_or(DeError::MissingField)?, + expiration: expiration.ok_or(DeError::MissingField)?, + secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, + session_token: session_token.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for DataRedundancy { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for DataRedundancy { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"SingleAvailabilityZone" => Ok(Self::from_static(DataRedundancy::SINGLE_AVAILABILITY_ZONE)), -b"SingleLocalZone" => Ok(Self::from_static(DataRedundancy::SINGLE_LOCAL_ZONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"SingleAvailabilityZone" => Ok(Self::from_static(DataRedundancy::SINGLE_AVAILABILITY_ZONE)), + b"SingleLocalZone" => Ok(Self::from_static(DataRedundancy::SINGLE_LOCAL_ZONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for DefaultRetention { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -if let Some(ref val) = self.mode { -s.content("Mode", val)?; -} -if let Some(ref val) = self.years { -s.content("Years", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + if let Some(ref val) = self.mode { + s.content("Mode", val)?; + } + if let Some(ref val) = self.years { + s.content("Years", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DefaultRetention { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut days: Option = None; -let mut mode: Option = None; -let mut years: Option = None; -d.for_each_element(|d, x| match x { -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -b"Mode" => { -if mode.is_some() { return Err(DeError::DuplicateField); } -mode = Some(d.content()?); -Ok(()) -} -b"Years" => { -if years.is_some() { return Err(DeError::DuplicateField); } -years = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -days, -mode, -years, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut days: Option = None; + let mut mode: Option = None; + let mut years: Option = None; + d.for_each_element(|d, x| match x { + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + b"Mode" => { + if mode.is_some() { + return Err(DeError::DuplicateField); + } + mode = Some(d.content()?); + Ok(()) + } + b"Years" => { + if years.is_some() { + return Err(DeError::DuplicateField); + } + years = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { days, mode, years }) + } } impl SerializeContent for Delete { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.objects; -s.flattened_list("Object", iter)?; -} -if let Some(ref val) = self.quiet { -s.content("Quiet", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.objects; + s.flattened_list("Object", iter)?; + } + if let Some(ref val) = self.quiet { + s.content("Quiet", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Delete { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut objects: Option = None; -let mut quiet: Option = None; -d.for_each_element(|d, x| match x { -b"Object" => { -let ans: ObjectIdentifier = d.content()?; -objects.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Quiet" => { -if quiet.is_some() { return Err(DeError::DuplicateField); } -quiet = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -objects: objects.ok_or(DeError::MissingField)?, -quiet, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut objects: Option = None; + let mut quiet: Option = None; + d.for_each_element(|d, x| match x { + b"Object" => { + let ans: ObjectIdentifier = d.content()?; + objects.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Quiet" => { + if quiet.is_some() { + return Err(DeError::DuplicateField); + } + quiet = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + objects: objects.ok_or(DeError::MissingField)?, + quiet, + }) + } } impl SerializeContent for DeleteMarkerEntry { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.is_latest { -s.content("IsLatest", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.is_latest { + s.content("IsLatest", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DeleteMarkerEntry { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut is_latest: Option = None; -let mut key: Option = None; -let mut last_modified: Option = None; -let mut owner: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"IsLatest" => { -if is_latest.is_some() { return Err(DeError::DuplicateField); } -is_latest = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -is_latest, -key, -last_modified, -owner, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut is_latest: Option = None; + let mut key: Option = None; + let mut last_modified: Option = None; + let mut owner: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"IsLatest" => { + if is_latest.is_some() { + return Err(DeError::DuplicateField); + } + is_latest = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + is_latest, + key, + last_modified, + owner, + version_id, + }) + } } impl SerializeContent for DeleteMarkerReplication { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DeleteMarkerReplication { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { status }) + } } impl SerializeContent for DeleteMarkerReplicationStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for DeleteMarkerReplicationStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for DeleteObjectsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.deleted { -s.flattened_list("Deleted", iter)?; -} -if let Some(iter) = &self.errors { -s.flattened_list("Error", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.deleted { + s.flattened_list("Deleted", iter)?; + } + if let Some(iter) = &self.errors { + s.flattened_list("Error", iter)?; + } + Ok(()) + } } impl SerializeContent for DeletedObject { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.delete_marker { -s.content("DeleteMarker", val)?; -} -if let Some(ref val) = self.delete_marker_version_id { -s.content("DeleteMarkerVersionId", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.delete_marker { + s.content("DeleteMarker", val)?; + } + if let Some(ref val) = self.delete_marker_version_id { + s.content("DeleteMarkerVersionId", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DeletedObject { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut delete_marker: Option = None; -let mut delete_marker_version_id: Option = None; -let mut key: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"DeleteMarker" => { -if delete_marker.is_some() { return Err(DeError::DuplicateField); } -delete_marker = Some(d.content()?); -Ok(()) -} -b"DeleteMarkerVersionId" => { -if delete_marker_version_id.is_some() { return Err(DeError::DuplicateField); } -delete_marker_version_id = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -delete_marker, -delete_marker_version_id, -key, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut delete_marker: Option = None; + let mut delete_marker_version_id: Option = None; + let mut key: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"DeleteMarker" => { + if delete_marker.is_some() { + return Err(DeError::DuplicateField); + } + delete_marker = Some(d.content()?); + Ok(()) + } + b"DeleteMarkerVersionId" => { + if delete_marker_version_id.is_some() { + return Err(DeError::DuplicateField); + } + delete_marker_version_id = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + delete_marker, + delete_marker_version_id, + key, + version_id, + }) + } } impl SerializeContent for Destination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.access_control_translation { -s.content("AccessControlTranslation", val)?; -} -if let Some(ref val) = self.account { -s.content("Account", val)?; + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.access_control_translation { + s.content("AccessControlTranslation", val)?; + } + if let Some(ref val) = self.account { + s.content("Account", val)?; + } + s.content("Bucket", &self.bucket)?; + if let Some(ref val) = self.encryption_configuration { + s.content("EncryptionConfiguration", val)?; + } + if let Some(ref val) = self.metrics { + s.content("Metrics", val)?; + } + if let Some(ref val) = self.replication_time { + s.content("ReplicationTime", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } -s.content("Bucket", &self.bucket)?; -if let Some(ref val) = self.encryption_configuration { -s.content("EncryptionConfiguration", val)?; -} -if let Some(ref val) = self.metrics { -s.content("Metrics", val)?; -} -if let Some(ref val) = self.replication_time { -s.content("ReplicationTime", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} -} - -impl<'xml> DeserializeContent<'xml> for Destination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_control_translation: Option = None; -let mut account: Option = None; -let mut bucket: Option = None; -let mut encryption_configuration: Option = None; -let mut metrics: Option = None; -let mut replication_time: Option = None; -let mut storage_class: Option = None; -d.for_each_element(|d, x| match x { -b"AccessControlTranslation" => { -if access_control_translation.is_some() { return Err(DeError::DuplicateField); } -access_control_translation = Some(d.content()?); -Ok(()) -} -b"Account" => { -if account.is_some() { return Err(DeError::DuplicateField); } -account = Some(d.content()?); -Ok(()) -} -b"Bucket" => { -if bucket.is_some() { return Err(DeError::DuplicateField); } -bucket = Some(d.content()?); -Ok(()) -} -b"EncryptionConfiguration" => { -if encryption_configuration.is_some() { return Err(DeError::DuplicateField); } -encryption_configuration = Some(d.content()?); -Ok(()) -} -b"Metrics" => { -if metrics.is_some() { return Err(DeError::DuplicateField); } -metrics = Some(d.content()?); -Ok(()) -} -b"ReplicationTime" => { -if replication_time.is_some() { return Err(DeError::DuplicateField); } -replication_time = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_control_translation, -account, -bucket: bucket.ok_or(DeError::MissingField)?, -encryption_configuration, -metrics, -replication_time, -storage_class, -}) -} -} -impl SerializeContent for EncodingType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) + +impl<'xml> DeserializeContent<'xml> for Destination { + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_control_translation: Option = None; + let mut account: Option = None; + let mut bucket: Option = None; + let mut encryption_configuration: Option = None; + let mut metrics: Option = None; + let mut replication_time: Option = None; + let mut storage_class: Option = None; + d.for_each_element(|d, x| match x { + b"AccessControlTranslation" => { + if access_control_translation.is_some() { + return Err(DeError::DuplicateField); + } + access_control_translation = Some(d.content()?); + Ok(()) + } + b"Account" => { + if account.is_some() { + return Err(DeError::DuplicateField); + } + account = Some(d.content()?); + Ok(()) + } + b"Bucket" => { + if bucket.is_some() { + return Err(DeError::DuplicateField); + } + bucket = Some(d.content()?); + Ok(()) + } + b"EncryptionConfiguration" => { + if encryption_configuration.is_some() { + return Err(DeError::DuplicateField); + } + encryption_configuration = Some(d.content()?); + Ok(()) + } + b"Metrics" => { + if metrics.is_some() { + return Err(DeError::DuplicateField); + } + metrics = Some(d.content()?); + Ok(()) + } + b"ReplicationTime" => { + if replication_time.is_some() { + return Err(DeError::DuplicateField); + } + replication_time = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_control_translation, + account, + bucket: bucket.ok_or(DeError::MissingField)?, + encryption_configuration, + metrics, + replication_time, + storage_class, + }) + } } +impl SerializeContent for EncodingType { + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for EncodingType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"url" => Ok(Self::from_static(EncodingType::URL)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"url" => Ok(Self::from_static(EncodingType::URL)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Encryption { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("EncryptionType", &self.encryption_type)?; -if let Some(ref val) = self.kms_context { -s.content("KMSContext", val)?; -} -if let Some(ref val) = self.kms_key_id { -s.content("KMSKeyId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("EncryptionType", &self.encryption_type)?; + if let Some(ref val) = self.kms_context { + s.content("KMSContext", val)?; + } + if let Some(ref val) = self.kms_key_id { + s.content("KMSKeyId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Encryption { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut encryption_type: Option = None; -let mut kms_context: Option = None; -let mut kms_key_id: Option = None; -d.for_each_element(|d, x| match x { -b"EncryptionType" => { -if encryption_type.is_some() { return Err(DeError::DuplicateField); } -encryption_type = Some(d.content()?); -Ok(()) -} -b"KMSContext" => { -if kms_context.is_some() { return Err(DeError::DuplicateField); } -kms_context = Some(d.content()?); -Ok(()) -} -b"KMSKeyId" => { -if kms_key_id.is_some() { return Err(DeError::DuplicateField); } -kms_key_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -encryption_type: encryption_type.ok_or(DeError::MissingField)?, -kms_context, -kms_key_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut encryption_type: Option = None; + let mut kms_context: Option = None; + let mut kms_key_id: Option = None; + d.for_each_element(|d, x| match x { + b"EncryptionType" => { + if encryption_type.is_some() { + return Err(DeError::DuplicateField); + } + encryption_type = Some(d.content()?); + Ok(()) + } + b"KMSContext" => { + if kms_context.is_some() { + return Err(DeError::DuplicateField); + } + kms_context = Some(d.content()?); + Ok(()) + } + b"KMSKeyId" => { + if kms_key_id.is_some() { + return Err(DeError::DuplicateField); + } + kms_key_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + encryption_type: encryption_type.ok_or(DeError::MissingField)?, + kms_context, + kms_key_id, + }) + } } impl SerializeContent for EncryptionConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.replica_kms_key_id { -s.content("ReplicaKmsKeyID", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.replica_kms_key_id { + s.content("ReplicaKmsKeyID", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for EncryptionConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut replica_kms_key_id: Option = None; -d.for_each_element(|d, x| match x { -b"ReplicaKmsKeyID" => { -if replica_kms_key_id.is_some() { return Err(DeError::DuplicateField); } -replica_kms_key_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -replica_kms_key_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut replica_kms_key_id: Option = None; + d.for_each_element(|d, x| match x { + b"ReplicaKmsKeyID" => { + if replica_kms_key_id.is_some() { + return Err(DeError::DuplicateField); + } + replica_kms_key_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { replica_kms_key_id }) + } } impl SerializeContent for Error { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.code { -s.content("Code", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.message { -s.content("Message", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.code { + s.content("Code", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.message { + s.content("Message", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Error { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut code: Option = None; -let mut key: Option = None; -let mut message: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"Code" => { -if code.is_some() { return Err(DeError::DuplicateField); } -code = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"Message" => { -if message.is_some() { return Err(DeError::DuplicateField); } -message = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -code, -key, -message, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut code: Option = None; + let mut key: Option = None; + let mut message: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"Code" => { + if code.is_some() { + return Err(DeError::DuplicateField); + } + code = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"Message" => { + if message.is_some() { + return Err(DeError::DuplicateField); + } + message = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + code, + key, + message, + version_id, + }) + } } impl SerializeContent for ErrorDetails { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.error_code { -s.content("ErrorCode", val)?; -} -if let Some(ref val) = self.error_message { -s.content("ErrorMessage", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.error_code { + s.content("ErrorCode", val)?; + } + if let Some(ref val) = self.error_message { + s.content("ErrorMessage", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ErrorDetails { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut error_code: Option = None; -let mut error_message: Option = None; -d.for_each_element(|d, x| match x { -b"ErrorCode" => { -if error_code.is_some() { return Err(DeError::DuplicateField); } -error_code = Some(d.content()?); -Ok(()) -} -b"ErrorMessage" => { -if error_message.is_some() { return Err(DeError::DuplicateField); } -error_message = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -error_code, -error_message, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut error_code: Option = None; + let mut error_message: Option = None; + d.for_each_element(|d, x| match x { + b"ErrorCode" => { + if error_code.is_some() { + return Err(DeError::DuplicateField); + } + error_code = Some(d.content()?); + Ok(()) + } + b"ErrorMessage" => { + if error_message.is_some() { + return Err(DeError::DuplicateField); + } + error_message = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + error_code, + error_message, + }) + } } impl SerializeContent for ErrorDocument { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Key", &self.key)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Key", &self.key)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ErrorDocument { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut key: Option = None; -d.for_each_element(|d, x| match x { -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -key: key.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut key: Option = None; + d.for_each_element(|d, x| match x { + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + key: key.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for EventBridgeConfiguration { -fn serialize_content(&self, _: &mut Serializer) -> SerResult { -Ok(()) -} + fn serialize_content(&self, _: &mut Serializer) -> SerResult { + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for EventBridgeConfiguration { -fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { -Ok(Self { -}) -} + fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { + Ok(Self {}) + } } impl SerializeContent for ExistingObjectReplication { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ExistingObjectReplication { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ExistingObjectReplicationStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ExistingObjectReplicationStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ExpirationStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ExpirationStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ExpirationStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ExpirationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ExpirationStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ExpirationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ExpressionType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ExpressionType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"SQL" => Ok(Self::from_static(ExpressionType::SQL)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"SQL" => Ok(Self::from_static(ExpressionType::SQL)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for FileHeaderInfo { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for FileHeaderInfo { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"IGNORE" => Ok(Self::from_static(FileHeaderInfo::IGNORE)), -b"NONE" => Ok(Self::from_static(FileHeaderInfo::NONE)), -b"USE" => Ok(Self::from_static(FileHeaderInfo::USE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"IGNORE" => Ok(Self::from_static(FileHeaderInfo::IGNORE)), + b"NONE" => Ok(Self::from_static(FileHeaderInfo::NONE)), + b"USE" => Ok(Self::from_static(FileHeaderInfo::USE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for FilterRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.value { -s.content("Value", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.value { + s.content("Value", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for FilterRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut name: Option = None; -let mut value: Option = None; -d.for_each_element(|d, x| match x { -b"Name" => { -if name.is_some() { return Err(DeError::DuplicateField); } -name = Some(d.content()?); -Ok(()) -} -b"Value" => { -if value.is_some() { return Err(DeError::DuplicateField); } -value = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -name, -value, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut name: Option = None; + let mut value: Option = None; + d.for_each_element(|d, x| match x { + b"Name" => { + if name.is_some() { + return Err(DeError::DuplicateField); + } + name = Some(d.content()?); + Ok(()) + } + b"Value" => { + if value.is_some() { + return Err(DeError::DuplicateField); + } + value = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { name, value }) + } } impl SerializeContent for FilterRuleName { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for FilterRuleName { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"prefix" => Ok(Self::from_static(FilterRuleName::PREFIX)), -b"suffix" => Ok(Self::from_static(FilterRuleName::SUFFIX)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"prefix" => Ok(Self::from_static(FilterRuleName::PREFIX)), + b"suffix" => Ok(Self::from_static(FilterRuleName::SUFFIX)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for GetBucketAccelerateConfigurationOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl SerializeContent for GetBucketAclOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.grants { -s.list("AccessControlList", "Grant", iter)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.grants { + s.list("AccessControlList", "Grant", iter)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketAclOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut grants: Option = None; -let mut owner: Option = None; -d.for_each_element(|d, x| match x { -b"AccessControlList" => { -if grants.is_some() { return Err(DeError::DuplicateField); } -grants = Some(d.list_content("Grant")?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -grants, -owner, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut grants: Option = None; + let mut owner: Option = None; + d.for_each_element(|d, x| match x { + b"AccessControlList" => { + if grants.is_some() { + return Err(DeError::DuplicateField); + } + grants = Some(d.list_content("Grant")?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { grants, owner }) + } } impl SerializeContent for GetBucketCorsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.cors_rules { -s.flattened_list("CORSRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.cors_rules { + s.flattened_list("CORSRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketCorsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut cors_rules: Option = None; -d.for_each_element(|d, x| match x { -b"CORSRule" => { -let ans: CORSRule = d.content()?; -cors_rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -cors_rules, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut cors_rules: Option = None; + d.for_each_element(|d, x| match x { + b"CORSRule" => { + let ans: CORSRule = d.content()?; + cors_rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { cors_rules }) + } } impl SerializeContent for GetBucketLifecycleConfigurationOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.rules { -s.flattened_list("Rule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.rules { + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } impl SerializeContent for GetBucketLocationOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.location_constraint { -s.content("LocationConstraint", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.location_constraint { + s.content("LocationConstraint", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketLocationOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut location_constraint: Option = None; -d.for_each_element(|d, x| match x { -b"LocationConstraint" => { -if location_constraint.is_some() { return Err(DeError::DuplicateField); } -location_constraint = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -location_constraint, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut location_constraint: Option = None; + d.for_each_element(|d, x| match x { + b"LocationConstraint" => { + if location_constraint.is_some() { + return Err(DeError::DuplicateField); + } + location_constraint = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { location_constraint }) + } } impl SerializeContent for GetBucketLoggingOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.logging_enabled { -s.content("LoggingEnabled", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.logging_enabled { + s.content("LoggingEnabled", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketLoggingOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut logging_enabled: Option = None; -d.for_each_element(|d, x| match x { -b"LoggingEnabled" => { -if logging_enabled.is_some() { return Err(DeError::DuplicateField); } -logging_enabled = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -logging_enabled, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut logging_enabled: Option = None; + d.for_each_element(|d, x| match x { + b"LoggingEnabled" => { + if logging_enabled.is_some() { + return Err(DeError::DuplicateField); + } + logging_enabled = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { logging_enabled }) + } } impl SerializeContent for GetBucketMetadataTableConfigurationResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.error { -s.content("Error", val)?; -} -s.content("MetadataTableConfigurationResult", &self.metadata_table_configuration_result)?; -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.error { + s.content("Error", val)?; + } + s.content("MetadataTableConfigurationResult", &self.metadata_table_configuration_result)?; + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketMetadataTableConfigurationResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut error: Option = None; -let mut metadata_table_configuration_result: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Error" => { -if error.is_some() { return Err(DeError::DuplicateField); } -error = Some(d.content()?); -Ok(()) -} -b"MetadataTableConfigurationResult" => { -if metadata_table_configuration_result.is_some() { return Err(DeError::DuplicateField); } -metadata_table_configuration_result = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -error, -metadata_table_configuration_result: metadata_table_configuration_result.ok_or(DeError::MissingField)?, -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut error: Option = None; + let mut metadata_table_configuration_result: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Error" => { + if error.is_some() { + return Err(DeError::DuplicateField); + } + error = Some(d.content()?); + Ok(()) + } + b"MetadataTableConfigurationResult" => { + if metadata_table_configuration_result.is_some() { + return Err(DeError::DuplicateField); + } + metadata_table_configuration_result = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + error, + metadata_table_configuration_result: metadata_table_configuration_result.ok_or(DeError::MissingField)?, + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for GetBucketNotificationConfigurationOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.event_bridge_configuration { -s.content("EventBridgeConfiguration", val)?; -} -if let Some(iter) = &self.lambda_function_configurations { -s.flattened_list("CloudFunctionConfiguration", iter)?; -} -if let Some(iter) = &self.queue_configurations { -s.flattened_list("QueueConfiguration", iter)?; -} -if let Some(iter) = &self.topic_configurations { -s.flattened_list("TopicConfiguration", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.event_bridge_configuration { + s.content("EventBridgeConfiguration", val)?; + } + if let Some(iter) = &self.lambda_function_configurations { + s.flattened_list("CloudFunctionConfiguration", iter)?; + } + if let Some(iter) = &self.queue_configurations { + s.flattened_list("QueueConfiguration", iter)?; + } + if let Some(iter) = &self.topic_configurations { + s.flattened_list("TopicConfiguration", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketNotificationConfigurationOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut event_bridge_configuration: Option = None; -let mut lambda_function_configurations: Option = None; -let mut queue_configurations: Option = None; -let mut topic_configurations: Option = None; -d.for_each_element(|d, x| match x { -b"EventBridgeConfiguration" => { -if event_bridge_configuration.is_some() { return Err(DeError::DuplicateField); } -event_bridge_configuration = Some(d.content()?); -Ok(()) -} -b"CloudFunctionConfiguration" => { -let ans: LambdaFunctionConfiguration = d.content()?; -lambda_function_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"QueueConfiguration" => { -let ans: QueueConfiguration = d.content()?; -queue_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"TopicConfiguration" => { -let ans: TopicConfiguration = d.content()?; -topic_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -event_bridge_configuration, -lambda_function_configurations, -queue_configurations, -topic_configurations, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut event_bridge_configuration: Option = None; + let mut lambda_function_configurations: Option = None; + let mut queue_configurations: Option = None; + let mut topic_configurations: Option = None; + d.for_each_element(|d, x| match x { + b"EventBridgeConfiguration" => { + if event_bridge_configuration.is_some() { + return Err(DeError::DuplicateField); + } + event_bridge_configuration = Some(d.content()?); + Ok(()) + } + b"CloudFunctionConfiguration" => { + let ans: LambdaFunctionConfiguration = d.content()?; + lambda_function_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"QueueConfiguration" => { + let ans: QueueConfiguration = d.content()?; + queue_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"TopicConfiguration" => { + let ans: TopicConfiguration = d.content()?; + topic_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + event_bridge_configuration, + lambda_function_configurations, + queue_configurations, + topic_configurations, + }) + } } impl SerializeContent for GetBucketRequestPaymentOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.payer { -s.content("Payer", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.payer { + s.content("Payer", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketRequestPaymentOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut payer: Option = None; -d.for_each_element(|d, x| match x { -b"Payer" => { -if payer.is_some() { return Err(DeError::DuplicateField); } -payer = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -payer, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut payer: Option = None; + d.for_each_element(|d, x| match x { + b"Payer" => { + if payer.is_some() { + return Err(DeError::DuplicateField); + } + payer = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { payer }) + } } impl SerializeContent for GetBucketTaggingOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.tag_set; -s.list("TagSet", "Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.tag_set; + s.list("TagSet", "Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketTaggingOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut tag_set: Option = None; -d.for_each_element(|d, x| match x { -b"TagSet" => { -if tag_set.is_some() { return Err(DeError::DuplicateField); } -tag_set = Some(d.list_content("Tag")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -tag_set: tag_set.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut tag_set: Option = None; + d.for_each_element(|d, x| match x { + b"TagSet" => { + if tag_set.is_some() { + return Err(DeError::DuplicateField); + } + tag_set = Some(d.list_content("Tag")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + tag_set: tag_set.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for GetBucketVersioningOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.mfa_delete { -s.content("MfaDelete", val)?; -} -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.mfa_delete { + s.content("MfaDelete", val)?; + } + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketVersioningOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut mfa_delete: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"MfaDelete" => { -if mfa_delete.is_some() { return Err(DeError::DuplicateField); } -mfa_delete = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -mfa_delete, -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut mfa_delete: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"MfaDelete" => { + if mfa_delete.is_some() { + return Err(DeError::DuplicateField); + } + mfa_delete = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { mfa_delete, status }) + } } impl SerializeContent for GetBucketWebsiteOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.error_document { -s.content("ErrorDocument", val)?; -} -if let Some(ref val) = self.index_document { -s.content("IndexDocument", val)?; -} -if let Some(ref val) = self.redirect_all_requests_to { -s.content("RedirectAllRequestsTo", val)?; -} -if let Some(iter) = &self.routing_rules { -s.list("RoutingRules", "RoutingRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.error_document { + s.content("ErrorDocument", val)?; + } + if let Some(ref val) = self.index_document { + s.content("IndexDocument", val)?; + } + if let Some(ref val) = self.redirect_all_requests_to { + s.content("RedirectAllRequestsTo", val)?; + } + if let Some(iter) = &self.routing_rules { + s.list("RoutingRules", "RoutingRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketWebsiteOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut error_document: Option = None; -let mut index_document: Option = None; -let mut redirect_all_requests_to: Option = None; -let mut routing_rules: Option = None; -d.for_each_element(|d, x| match x { -b"ErrorDocument" => { -if error_document.is_some() { return Err(DeError::DuplicateField); } -error_document = Some(d.content()?); -Ok(()) -} -b"IndexDocument" => { -if index_document.is_some() { return Err(DeError::DuplicateField); } -index_document = Some(d.content()?); -Ok(()) -} -b"RedirectAllRequestsTo" => { -if redirect_all_requests_to.is_some() { return Err(DeError::DuplicateField); } -redirect_all_requests_to = Some(d.content()?); -Ok(()) -} -b"RoutingRules" => { -if routing_rules.is_some() { return Err(DeError::DuplicateField); } -routing_rules = Some(d.list_content("RoutingRule")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -error_document, -index_document, -redirect_all_requests_to, -routing_rules, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut error_document: Option = None; + let mut index_document: Option = None; + let mut redirect_all_requests_to: Option = None; + let mut routing_rules: Option = None; + d.for_each_element(|d, x| match x { + b"ErrorDocument" => { + if error_document.is_some() { + return Err(DeError::DuplicateField); + } + error_document = Some(d.content()?); + Ok(()) + } + b"IndexDocument" => { + if index_document.is_some() { + return Err(DeError::DuplicateField); + } + index_document = Some(d.content()?); + Ok(()) + } + b"RedirectAllRequestsTo" => { + if redirect_all_requests_to.is_some() { + return Err(DeError::DuplicateField); + } + redirect_all_requests_to = Some(d.content()?); + Ok(()) + } + b"RoutingRules" => { + if routing_rules.is_some() { + return Err(DeError::DuplicateField); + } + routing_rules = Some(d.list_content("RoutingRule")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + error_document, + index_document, + redirect_all_requests_to, + routing_rules, + }) + } } impl SerializeContent for GetObjectAclOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.grants { -s.list("AccessControlList", "Grant", iter)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.grants { + s.list("AccessControlList", "Grant", iter)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + Ok(()) + } } impl SerializeContent for GetObjectAttributesOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum { -s.content("Checksum", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.object_parts { -s.content("ObjectParts", val)?; -} -if let Some(ref val) = self.object_size { -s.content("ObjectSize", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum { + s.content("Checksum", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.object_parts { + s.content("ObjectParts", val)?; + } + if let Some(ref val) = self.object_size { + s.content("ObjectSize", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl SerializeContent for GetObjectAttributesParts { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.max_parts { -s.content("MaxParts", val)?; -} -if let Some(ref val) = self.next_part_number_marker { -s.content("NextPartNumberMarker", val)?; -} -if let Some(ref val) = self.part_number_marker { -s.content("PartNumberMarker", val)?; -} -if let Some(iter) = &self.parts { -s.flattened_list("Part", iter)?; -} -if let Some(ref val) = self.total_parts_count { -s.content("PartsCount", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.max_parts { + s.content("MaxParts", val)?; + } + if let Some(ref val) = self.next_part_number_marker { + s.content("NextPartNumberMarker", val)?; + } + if let Some(ref val) = self.part_number_marker { + s.content("PartNumberMarker", val)?; + } + if let Some(iter) = &self.parts { + s.flattened_list("Part", iter)?; + } + if let Some(ref val) = self.total_parts_count { + s.content("PartsCount", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetObjectAttributesParts { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut is_truncated: Option = None; -let mut max_parts: Option = None; -let mut next_part_number_marker: Option = None; -let mut part_number_marker: Option = None; -let mut parts: Option = None; -let mut total_parts_count: Option = None; -d.for_each_element(|d, x| match x { -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"MaxParts" => { -if max_parts.is_some() { return Err(DeError::DuplicateField); } -max_parts = Some(d.content()?); -Ok(()) -} -b"NextPartNumberMarker" => { -if next_part_number_marker.is_some() { return Err(DeError::DuplicateField); } -next_part_number_marker = Some(d.content()?); -Ok(()) -} -b"PartNumberMarker" => { -if part_number_marker.is_some() { return Err(DeError::DuplicateField); } -part_number_marker = Some(d.content()?); -Ok(()) -} -b"Part" => { -let ans: ObjectPart = d.content()?; -parts.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"PartsCount" => { -if total_parts_count.is_some() { return Err(DeError::DuplicateField); } -total_parts_count = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -is_truncated, -max_parts, -next_part_number_marker, -part_number_marker, -parts, -total_parts_count, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut is_truncated: Option = None; + let mut max_parts: Option = None; + let mut next_part_number_marker: Option = None; + let mut part_number_marker: Option = None; + let mut parts: Option = None; + let mut total_parts_count: Option = None; + d.for_each_element(|d, x| match x { + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"MaxParts" => { + if max_parts.is_some() { + return Err(DeError::DuplicateField); + } + max_parts = Some(d.content()?); + Ok(()) + } + b"NextPartNumberMarker" => { + if next_part_number_marker.is_some() { + return Err(DeError::DuplicateField); + } + next_part_number_marker = Some(d.content()?); + Ok(()) + } + b"PartNumberMarker" => { + if part_number_marker.is_some() { + return Err(DeError::DuplicateField); + } + part_number_marker = Some(d.content()?); + Ok(()) + } + b"Part" => { + let ans: ObjectPart = d.content()?; + parts.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"PartsCount" => { + if total_parts_count.is_some() { + return Err(DeError::DuplicateField); + } + total_parts_count = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + is_truncated, + max_parts, + next_part_number_marker, + part_number_marker, + parts, + total_parts_count, + }) + } } impl SerializeContent for GetObjectTaggingOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.tag_set; -s.list("TagSet", "Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.tag_set; + s.list("TagSet", "Tag", iter)?; + } + Ok(()) + } } impl SerializeContent for GlacierJobParameters { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Tier", &self.tier)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Tier", &self.tier)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GlacierJobParameters { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut tier: Option = None; -d.for_each_element(|d, x| match x { -b"Tier" => { -if tier.is_some() { return Err(DeError::DuplicateField); } -tier = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -tier: tier.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut tier: Option = None; + d.for_each_element(|d, x| match x { + b"Tier" => { + if tier.is_some() { + return Err(DeError::DuplicateField); + } + tier = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + tier: tier.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Grant { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.grantee { -let attrs = [ -("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), -("xsi:type", val.type_.as_str()), -]; -s.content_with_attrs("Grantee", &attrs, val)?; -} -if let Some(ref val) = self.permission { -s.content("Permission", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.grantee { + let attrs = [ + ("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), + ("xsi:type", val.type_.as_str()), + ]; + s.content_with_attrs("Grantee", &attrs, val)?; + } + if let Some(ref val) = self.permission { + s.content("Permission", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Grant { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut grantee: Option = None; -let mut permission: Option = None; -d.for_each_element_with_start(|d, x, start| match x { -b"Grantee" => { -if grantee.is_some() { return Err(DeError::DuplicateField); } -let mut type_: Option = None; -for attr in start.attributes() { - let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; - if attr.key.as_ref() == b"xsi:type" { - type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); - } -} -let mut display_name: Option = None; -let mut email_address: Option = None; -let mut id: Option = None; -let mut uri: Option = None; -d.for_each_element(|d, x| match x { -b"DisplayName" => { - if display_name.is_some() { return Err(DeError::DuplicateField); } - display_name = Some(d.content()?); - Ok(()) -} -b"EmailAddress" => { - if email_address.is_some() { return Err(DeError::DuplicateField); } - email_address = Some(d.content()?); - Ok(()) -} -b"ID" => { - if id.is_some() { return Err(DeError::DuplicateField); } - id = Some(d.content()?); - Ok(()) -} -b"URI" => { - if uri.is_some() { return Err(DeError::DuplicateField); } - uri = Some(d.content()?); - Ok(()) -} -_ => Err(DeError::UnexpectedTagName), -})?; -grantee = Some(Grantee { -display_name, -email_address, -id, -type_: type_.ok_or(DeError::MissingField)?, -uri, -}); -Ok(()) -} -b"Permission" => { -if permission.is_some() { return Err(DeError::DuplicateField); } -permission = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -grantee, -permission, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut grantee: Option = None; + let mut permission: Option = None; + d.for_each_element_with_start(|d, x, start| match x { + b"Grantee" => { + if grantee.is_some() { + return Err(DeError::DuplicateField); + } + let mut type_: Option = None; + for attr in start.attributes() { + let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; + if attr.key.as_ref() == b"xsi:type" { + type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); + } + } + let mut display_name: Option = None; + let mut email_address: Option = None; + let mut id: Option = None; + let mut uri: Option = None; + d.for_each_element(|d, x| match x { + b"DisplayName" => { + if display_name.is_some() { + return Err(DeError::DuplicateField); + } + display_name = Some(d.content()?); + Ok(()) + } + b"EmailAddress" => { + if email_address.is_some() { + return Err(DeError::DuplicateField); + } + email_address = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"URI" => { + if uri.is_some() { + return Err(DeError::DuplicateField); + } + uri = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + grantee = Some(Grantee { + display_name, + email_address, + id, + type_: type_.ok_or(DeError::MissingField)?, + uri, + }); + Ok(()) + } + b"Permission" => { + if permission.is_some() { + return Err(DeError::DuplicateField); + } + permission = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { grantee, permission }) + } } impl SerializeContent for Grantee { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.display_name { -s.content("DisplayName", val)?; -} -if let Some(ref val) = self.email_address { -s.content("EmailAddress", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -if let Some(ref val) = self.uri { -s.content("URI", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.display_name { + s.content("DisplayName", val)?; + } + if let Some(ref val) = self.email_address { + s.content("EmailAddress", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + if let Some(ref val) = self.uri { + s.content("URI", val)?; + } + Ok(()) + } } impl SerializeContent for IndexDocument { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Suffix", &self.suffix)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Suffix", &self.suffix)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for IndexDocument { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut suffix: Option = None; -d.for_each_element(|d, x| match x { -b"Suffix" => { -if suffix.is_some() { return Err(DeError::DuplicateField); } -suffix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -suffix: suffix.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut suffix: Option = None; + d.for_each_element(|d, x| match x { + b"Suffix" => { + if suffix.is_some() { + return Err(DeError::DuplicateField); + } + suffix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + suffix: suffix.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Initiator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.display_name { -s.content("DisplayName", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.display_name { + s.content("DisplayName", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Initiator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut display_name: Option = None; -let mut id: Option = None; -d.for_each_element(|d, x| match x { -b"DisplayName" => { -if display_name.is_some() { return Err(DeError::DuplicateField); } -display_name = Some(d.content()?); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -display_name, -id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut display_name: Option = None; + let mut id: Option = None; + d.for_each_element(|d, x| match x { + b"DisplayName" => { + if display_name.is_some() { + return Err(DeError::DuplicateField); + } + display_name = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { display_name, id }) + } } impl SerializeContent for InputSerialization { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.csv { -s.content("CSV", val)?; -} -if let Some(ref val) = self.compression_type { -s.content("CompressionType", val)?; -} -if let Some(ref val) = self.json { -s.content("JSON", val)?; -} -if let Some(ref val) = self.parquet { -s.content("Parquet", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.csv { + s.content("CSV", val)?; + } + if let Some(ref val) = self.compression_type { + s.content("CompressionType", val)?; + } + if let Some(ref val) = self.json { + s.content("JSON", val)?; + } + if let Some(ref val) = self.parquet { + s.content("Parquet", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InputSerialization { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut csv: Option = None; -let mut compression_type: Option = None; -let mut json: Option = None; -let mut parquet: Option = None; -d.for_each_element(|d, x| match x { -b"CSV" => { -if csv.is_some() { return Err(DeError::DuplicateField); } -csv = Some(d.content()?); -Ok(()) -} -b"CompressionType" => { -if compression_type.is_some() { return Err(DeError::DuplicateField); } -compression_type = Some(d.content()?); -Ok(()) -} -b"JSON" => { -if json.is_some() { return Err(DeError::DuplicateField); } -json = Some(d.content()?); -Ok(()) -} -b"Parquet" => { -if parquet.is_some() { return Err(DeError::DuplicateField); } -parquet = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -csv, -compression_type, -json, -parquet, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut csv: Option = None; + let mut compression_type: Option = None; + let mut json: Option = None; + let mut parquet: Option = None; + d.for_each_element(|d, x| match x { + b"CSV" => { + if csv.is_some() { + return Err(DeError::DuplicateField); + } + csv = Some(d.content()?); + Ok(()) + } + b"CompressionType" => { + if compression_type.is_some() { + return Err(DeError::DuplicateField); + } + compression_type = Some(d.content()?); + Ok(()) + } + b"JSON" => { + if json.is_some() { + return Err(DeError::DuplicateField); + } + json = Some(d.content()?); + Ok(()) + } + b"Parquet" => { + if parquet.is_some() { + return Err(DeError::DuplicateField); + } + parquet = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + csv, + compression_type, + json, + parquet, + }) + } } impl SerializeContent for IntelligentTieringAccessTier { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringAccessTier { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::ARCHIVE_ACCESS)), -b"DEEP_ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::DEEP_ARCHIVE_ACCESS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::ARCHIVE_ACCESS)), + b"DEEP_ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::DEEP_ARCHIVE_ACCESS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for IntelligentTieringAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix, tags }) + } } impl SerializeContent for IntelligentTieringConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -s.content("Id", &self.id)?; -s.content("Status", &self.status)?; -{ -let iter = &self.tierings; -s.flattened_list("Tiering", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + s.content("Id", &self.id)?; + s.content("Status", &self.status)?; + { + let iter = &self.tierings; + s.flattened_list("Tiering", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut filter: Option = None; -let mut id: Option = None; -let mut status: Option = None; -let mut tierings: Option = None; -d.for_each_element(|d, x| match x { -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -b"Tiering" => { -let ans: Tiering = d.content()?; -tierings.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -filter, -id: id.ok_or(DeError::MissingField)?, -status: status.ok_or(DeError::MissingField)?, -tierings: tierings.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut filter: Option = None; + let mut id: Option = None; + let mut status: Option = None; + let mut tierings: Option = None; + d.for_each_element(|d, x| match x { + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + b"Tiering" => { + let ans: Tiering = d.content()?; + tierings.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + filter, + id: id.ok_or(DeError::MissingField)?, + status: status.ok_or(DeError::MissingField)?, + tierings: tierings.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for IntelligentTieringFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.and { -s.content("And", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.tag { -s.content("Tag", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.and { + s.content("And", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.tag { + s.content("Tag", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut and: Option = None; -let mut prefix: Option = None; -let mut tag: Option = None; -d.for_each_element(|d, x| match x { -b"And" => { -if and.is_some() { return Err(DeError::DuplicateField); } -and = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -if tag.is_some() { return Err(DeError::DuplicateField); } -tag = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -and, -prefix, -tag, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut and: Option = None; + let mut prefix: Option = None; + let mut tag: Option = None; + d.for_each_element(|d, x| match x { + b"And" => { + if and.is_some() { + return Err(DeError::DuplicateField); + } + and = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + if tag.is_some() { + return Err(DeError::DuplicateField); + } + tag = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { and, prefix, tag }) + } } impl SerializeContent for IntelligentTieringStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(IntelligentTieringStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(IntelligentTieringStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(IntelligentTieringStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(IntelligentTieringStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for InventoryConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Destination", &self.destination)?; -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -s.content("Id", &self.id)?; -s.content("IncludedObjectVersions", &self.included_object_versions)?; -s.content("IsEnabled", &self.is_enabled)?; -if let Some(iter) = &self.optional_fields { -s.list("OptionalFields", "Field", iter)?; -} -s.content("Schedule", &self.schedule)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Destination", &self.destination)?; + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + s.content("Id", &self.id)?; + s.content("IncludedObjectVersions", &self.included_object_versions)?; + s.content("IsEnabled", &self.is_enabled)?; + if let Some(iter) = &self.optional_fields { + s.list("OptionalFields", "Field", iter)?; + } + s.content("Schedule", &self.schedule)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut destination: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut included_object_versions: Option = None; -let mut is_enabled: Option = None; -let mut optional_fields: Option = None; -let mut schedule: Option = None; -d.for_each_element(|d, x| match x { -b"Destination" => { -if destination.is_some() { return Err(DeError::DuplicateField); } -destination = Some(d.content()?); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"IncludedObjectVersions" => { -if included_object_versions.is_some() { return Err(DeError::DuplicateField); } -included_object_versions = Some(d.content()?); -Ok(()) -} -b"IsEnabled" => { -if is_enabled.is_some() { return Err(DeError::DuplicateField); } -is_enabled = Some(d.content()?); -Ok(()) -} -b"OptionalFields" => { -if optional_fields.is_some() { return Err(DeError::DuplicateField); } -optional_fields = Some(d.list_content("Field")?); -Ok(()) -} -b"Schedule" => { -if schedule.is_some() { return Err(DeError::DuplicateField); } -schedule = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -destination: destination.ok_or(DeError::MissingField)?, -filter, -id: id.ok_or(DeError::MissingField)?, -included_object_versions: included_object_versions.ok_or(DeError::MissingField)?, -is_enabled: is_enabled.ok_or(DeError::MissingField)?, -optional_fields, -schedule: schedule.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut destination: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut included_object_versions: Option = None; + let mut is_enabled: Option = None; + let mut optional_fields: Option = None; + let mut schedule: Option = None; + d.for_each_element(|d, x| match x { + b"Destination" => { + if destination.is_some() { + return Err(DeError::DuplicateField); + } + destination = Some(d.content()?); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"IncludedObjectVersions" => { + if included_object_versions.is_some() { + return Err(DeError::DuplicateField); + } + included_object_versions = Some(d.content()?); + Ok(()) + } + b"IsEnabled" => { + if is_enabled.is_some() { + return Err(DeError::DuplicateField); + } + is_enabled = Some(d.content()?); + Ok(()) + } + b"OptionalFields" => { + if optional_fields.is_some() { + return Err(DeError::DuplicateField); + } + optional_fields = Some(d.list_content("Field")?); + Ok(()) + } + b"Schedule" => { + if schedule.is_some() { + return Err(DeError::DuplicateField); + } + schedule = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + destination: destination.ok_or(DeError::MissingField)?, + filter, + id: id.ok_or(DeError::MissingField)?, + included_object_versions: included_object_versions.ok_or(DeError::MissingField)?, + is_enabled: is_enabled.ok_or(DeError::MissingField)?, + optional_fields, + schedule: schedule.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for InventoryDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("S3BucketDestination", &self.s3_bucket_destination)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("S3BucketDestination", &self.s3_bucket_destination)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3_bucket_destination: Option = None; -d.for_each_element(|d, x| match x { -b"S3BucketDestination" => { -if s3_bucket_destination.is_some() { return Err(DeError::DuplicateField); } -s3_bucket_destination = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3_bucket_destination: Option = None; + d.for_each_element(|d, x| match x { + b"S3BucketDestination" => { + if s3_bucket_destination.is_some() { + return Err(DeError::DuplicateField); + } + s3_bucket_destination = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for InventoryEncryption { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.ssekms { -s.content("SSE-KMS", val)?; -} -if let Some(ref val) = self.sses3 { -s.content("SSE-S3", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.ssekms { + s.content("SSE-KMS", val)?; + } + if let Some(ref val) = self.sses3 { + s.content("SSE-S3", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryEncryption { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut ssekms: Option = None; -let mut sses3: Option = None; -d.for_each_element(|d, x| match x { -b"SSE-KMS" => { -if ssekms.is_some() { return Err(DeError::DuplicateField); } -ssekms = Some(d.content()?); -Ok(()) -} -b"SSE-S3" => { -if sses3.is_some() { return Err(DeError::DuplicateField); } -sses3 = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -ssekms, -sses3, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut ssekms: Option = None; + let mut sses3: Option = None; + d.for_each_element(|d, x| match x { + b"SSE-KMS" => { + if ssekms.is_some() { + return Err(DeError::DuplicateField); + } + ssekms = Some(d.content()?); + Ok(()) + } + b"SSE-S3" => { + if sses3.is_some() { + return Err(DeError::DuplicateField); + } + sses3 = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { ssekms, sses3 }) + } } impl SerializeContent for InventoryFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Prefix", &self.prefix)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Prefix", &self.prefix)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix: prefix.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + prefix: prefix.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for InventoryFormat { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for InventoryFormat { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"CSV" => Ok(Self::from_static(InventoryFormat::CSV)), -b"ORC" => Ok(Self::from_static(InventoryFormat::ORC)), -b"Parquet" => Ok(Self::from_static(InventoryFormat::PARQUET)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"CSV" => Ok(Self::from_static(InventoryFormat::CSV)), + b"ORC" => Ok(Self::from_static(InventoryFormat::ORC)), + b"Parquet" => Ok(Self::from_static(InventoryFormat::PARQUET)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for InventoryFrequency { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for InventoryFrequency { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Daily" => Ok(Self::from_static(InventoryFrequency::DAILY)), -b"Weekly" => Ok(Self::from_static(InventoryFrequency::WEEKLY)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Daily" => Ok(Self::from_static(InventoryFrequency::DAILY)), + b"Weekly" => Ok(Self::from_static(InventoryFrequency::WEEKLY)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for InventoryIncludedObjectVersions { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for InventoryIncludedObjectVersions { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"All" => Ok(Self::from_static(InventoryIncludedObjectVersions::ALL)), -b"Current" => Ok(Self::from_static(InventoryIncludedObjectVersions::CURRENT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"All" => Ok(Self::from_static(InventoryIncludedObjectVersions::ALL)), + b"Current" => Ok(Self::from_static(InventoryIncludedObjectVersions::CURRENT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for InventoryOptionalField { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for InventoryOptionalField { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"BucketKeyStatus" => Ok(Self::from_static(InventoryOptionalField::BUCKET_KEY_STATUS)), -b"ChecksumAlgorithm" => Ok(Self::from_static(InventoryOptionalField::CHECKSUM_ALGORITHM)), -b"ETag" => Ok(Self::from_static(InventoryOptionalField::E_TAG)), -b"EncryptionStatus" => Ok(Self::from_static(InventoryOptionalField::ENCRYPTION_STATUS)), -b"IntelligentTieringAccessTier" => Ok(Self::from_static(InventoryOptionalField::INTELLIGENT_TIERING_ACCESS_TIER)), -b"IsMultipartUploaded" => Ok(Self::from_static(InventoryOptionalField::IS_MULTIPART_UPLOADED)), -b"LastModifiedDate" => Ok(Self::from_static(InventoryOptionalField::LAST_MODIFIED_DATE)), -b"ObjectAccessControlList" => Ok(Self::from_static(InventoryOptionalField::OBJECT_ACCESS_CONTROL_LIST)), -b"ObjectLockLegalHoldStatus" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_LEGAL_HOLD_STATUS)), -b"ObjectLockMode" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_MODE)), -b"ObjectLockRetainUntilDate" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_RETAIN_UNTIL_DATE)), -b"ObjectOwner" => Ok(Self::from_static(InventoryOptionalField::OBJECT_OWNER)), -b"ReplicationStatus" => Ok(Self::from_static(InventoryOptionalField::REPLICATION_STATUS)), -b"Size" => Ok(Self::from_static(InventoryOptionalField::SIZE)), -b"StorageClass" => Ok(Self::from_static(InventoryOptionalField::STORAGE_CLASS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"BucketKeyStatus" => Ok(Self::from_static(InventoryOptionalField::BUCKET_KEY_STATUS)), + b"ChecksumAlgorithm" => Ok(Self::from_static(InventoryOptionalField::CHECKSUM_ALGORITHM)), + b"ETag" => Ok(Self::from_static(InventoryOptionalField::E_TAG)), + b"EncryptionStatus" => Ok(Self::from_static(InventoryOptionalField::ENCRYPTION_STATUS)), + b"IntelligentTieringAccessTier" => Ok(Self::from_static(InventoryOptionalField::INTELLIGENT_TIERING_ACCESS_TIER)), + b"IsMultipartUploaded" => Ok(Self::from_static(InventoryOptionalField::IS_MULTIPART_UPLOADED)), + b"LastModifiedDate" => Ok(Self::from_static(InventoryOptionalField::LAST_MODIFIED_DATE)), + b"ObjectAccessControlList" => Ok(Self::from_static(InventoryOptionalField::OBJECT_ACCESS_CONTROL_LIST)), + b"ObjectLockLegalHoldStatus" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_LEGAL_HOLD_STATUS)), + b"ObjectLockMode" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_MODE)), + b"ObjectLockRetainUntilDate" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_RETAIN_UNTIL_DATE)), + b"ObjectOwner" => Ok(Self::from_static(InventoryOptionalField::OBJECT_OWNER)), + b"ReplicationStatus" => Ok(Self::from_static(InventoryOptionalField::REPLICATION_STATUS)), + b"Size" => Ok(Self::from_static(InventoryOptionalField::SIZE)), + b"StorageClass" => Ok(Self::from_static(InventoryOptionalField::STORAGE_CLASS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for InventoryS3BucketDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.account_id { -s.content("AccountId", val)?; -} -s.content("Bucket", &self.bucket)?; -if let Some(ref val) = self.encryption { -s.content("Encryption", val)?; -} -s.content("Format", &self.format)?; -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.account_id { + s.content("AccountId", val)?; + } + s.content("Bucket", &self.bucket)?; + if let Some(ref val) = self.encryption { + s.content("Encryption", val)?; + } + s.content("Format", &self.format)?; + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryS3BucketDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut account_id: Option = None; -let mut bucket: Option = None; -let mut encryption: Option = None; -let mut format: Option = None; -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"AccountId" => { -if account_id.is_some() { return Err(DeError::DuplicateField); } -account_id = Some(d.content()?); -Ok(()) -} -b"Bucket" => { -if bucket.is_some() { return Err(DeError::DuplicateField); } -bucket = Some(d.content()?); -Ok(()) -} -b"Encryption" => { -if encryption.is_some() { return Err(DeError::DuplicateField); } -encryption = Some(d.content()?); -Ok(()) -} -b"Format" => { -if format.is_some() { return Err(DeError::DuplicateField); } -format = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -account_id, -bucket: bucket.ok_or(DeError::MissingField)?, -encryption, -format: format.ok_or(DeError::MissingField)?, -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut account_id: Option = None; + let mut bucket: Option = None; + let mut encryption: Option = None; + let mut format: Option = None; + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"AccountId" => { + if account_id.is_some() { + return Err(DeError::DuplicateField); + } + account_id = Some(d.content()?); + Ok(()) + } + b"Bucket" => { + if bucket.is_some() { + return Err(DeError::DuplicateField); + } + bucket = Some(d.content()?); + Ok(()) + } + b"Encryption" => { + if encryption.is_some() { + return Err(DeError::DuplicateField); + } + encryption = Some(d.content()?); + Ok(()) + } + b"Format" => { + if format.is_some() { + return Err(DeError::DuplicateField); + } + format = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + account_id, + bucket: bucket.ok_or(DeError::MissingField)?, + encryption, + format: format.ok_or(DeError::MissingField)?, + prefix, + }) + } } impl SerializeContent for InventorySchedule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Frequency", &self.frequency)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Frequency", &self.frequency)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventorySchedule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut frequency: Option = None; -d.for_each_element(|d, x| match x { -b"Frequency" => { -if frequency.is_some() { return Err(DeError::DuplicateField); } -frequency = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -frequency: frequency.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut frequency: Option = None; + d.for_each_element(|d, x| match x { + b"Frequency" => { + if frequency.is_some() { + return Err(DeError::DuplicateField); + } + frequency = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + frequency: frequency.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for JSONInput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.type_ { -s.content("Type", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.type_ { + s.content("Type", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for JSONInput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut type_: Option = None; -d.for_each_element(|d, x| match x { -b"Type" => { -if type_.is_some() { return Err(DeError::DuplicateField); } -type_ = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -type_, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut type_: Option = None; + d.for_each_element(|d, x| match x { + b"Type" => { + if type_.is_some() { + return Err(DeError::DuplicateField); + } + type_ = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { type_ }) + } } impl SerializeContent for JSONOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.record_delimiter { -s.content("RecordDelimiter", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.record_delimiter { + s.content("RecordDelimiter", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for JSONOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut record_delimiter: Option = None; -d.for_each_element(|d, x| match x { -b"RecordDelimiter" => { -if record_delimiter.is_some() { return Err(DeError::DuplicateField); } -record_delimiter = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -record_delimiter, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut record_delimiter: Option = None; + d.for_each_element(|d, x| match x { + b"RecordDelimiter" => { + if record_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + record_delimiter = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { record_delimiter }) + } } impl SerializeContent for JSONType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for JSONType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DOCUMENT" => Ok(Self::from_static(JSONType::DOCUMENT)), -b"LINES" => Ok(Self::from_static(JSONType::LINES)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DOCUMENT" => Ok(Self::from_static(JSONType::DOCUMENT)), + b"LINES" => Ok(Self::from_static(JSONType::LINES)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for LambdaFunctionConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.events; -s.flattened_list("Event", iter)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("Id", val)?; -} -s.content("CloudFunction", &self.lambda_function_arn)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.events; + s.flattened_list("Event", iter)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("Id", val)?; + } + s.content("CloudFunction", &self.lambda_function_arn)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LambdaFunctionConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut events: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut lambda_function_arn: Option = None; -d.for_each_element(|d, x| match x { -b"Event" => { -let ans: Event = d.content()?; -events.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"CloudFunction" => { -if lambda_function_arn.is_some() { return Err(DeError::DuplicateField); } -lambda_function_arn = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -events: events.ok_or(DeError::MissingField)?, -filter, -id, -lambda_function_arn: lambda_function_arn.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut events: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut lambda_function_arn: Option = None; + d.for_each_element(|d, x| match x { + b"Event" => { + let ans: Event = d.content()?; + events.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"CloudFunction" => { + if lambda_function_arn.is_some() { + return Err(DeError::DuplicateField); + } + lambda_function_arn = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + events: events.ok_or(DeError::MissingField)?, + filter, + id, + lambda_function_arn: lambda_function_arn.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for LifecycleExpiration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.date { -s.timestamp("Date", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -if let Some(ref val) = self.expired_object_delete_marker { -s.content("ExpiredObjectDeleteMarker", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.date { + s.timestamp("Date", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + if let Some(ref val) = self.expired_object_delete_marker { + s.content("ExpiredObjectDeleteMarker", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LifecycleExpiration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut date: Option = None; -let mut days: Option = None; -let mut expired_object_delete_marker: Option = None; -d.for_each_element(|d, x| match x { -b"Date" => { -if date.is_some() { return Err(DeError::DuplicateField); } -date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -b"ExpiredObjectDeleteMarker" => { -if expired_object_delete_marker.is_some() { return Err(DeError::DuplicateField); } -expired_object_delete_marker = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -date, -days, -expired_object_delete_marker, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut date: Option = None; + let mut days: Option = None; + let mut expired_object_delete_marker: Option = None; + d.for_each_element(|d, x| match x { + b"Date" => { + if date.is_some() { + return Err(DeError::DuplicateField); + } + date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + b"ExpiredObjectDeleteMarker" => { + if expired_object_delete_marker.is_some() { + return Err(DeError::DuplicateField); + } + expired_object_delete_marker = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + date, + days, + expired_object_delete_marker, + }) + } } impl SerializeContent for LifecycleRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.abort_incomplete_multipart_upload { -s.content("AbortIncompleteMultipartUpload", val)?; -} -if let Some(ref val) = self.expiration { -s.content("Expiration", val)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -if let Some(ref val) = self.noncurrent_version_expiration { -s.content("NoncurrentVersionExpiration", val)?; -} -if let Some(iter) = &self.noncurrent_version_transitions { -s.flattened_list("NoncurrentVersionTransition", iter)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -s.content("Status", &self.status)?; -if let Some(iter) = &self.transitions { -s.flattened_list("Transition", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.abort_incomplete_multipart_upload { + s.content("AbortIncompleteMultipartUpload", val)?; + } + if let Some(ref val) = self.expiration { + s.content("Expiration", val)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + if let Some(ref val) = self.noncurrent_version_expiration { + s.content("NoncurrentVersionExpiration", val)?; + } + if let Some(iter) = &self.noncurrent_version_transitions { + s.flattened_list("NoncurrentVersionTransition", iter)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + s.content("Status", &self.status)?; + if let Some(iter) = &self.transitions { + s.flattened_list("Transition", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LifecycleRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut abort_incomplete_multipart_upload: Option = None; -let mut expiration: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut noncurrent_version_expiration: Option = None; -let mut noncurrent_version_transitions: Option = None; -let mut prefix: Option = None; -let mut status: Option = None; -let mut transitions: Option = None; -d.for_each_element(|d, x| match x { -b"AbortIncompleteMultipartUpload" => { -if abort_incomplete_multipart_upload.is_some() { return Err(DeError::DuplicateField); } -abort_incomplete_multipart_upload = Some(d.content()?); -Ok(()) -} -b"Expiration" => { -if expiration.is_some() { return Err(DeError::DuplicateField); } -expiration = Some(d.content()?); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"NoncurrentVersionExpiration" => { -if noncurrent_version_expiration.is_some() { return Err(DeError::DuplicateField); } -noncurrent_version_expiration = Some(d.content()?); -Ok(()) -} -b"NoncurrentVersionTransition" => { -let ans: NoncurrentVersionTransition = d.content()?; -noncurrent_version_transitions.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -b"Transition" => { -let ans: Transition = d.content()?; -transitions.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -abort_incomplete_multipart_upload, -expiration, -filter, -id, -noncurrent_version_expiration, -noncurrent_version_transitions, -prefix, -status: status.ok_or(DeError::MissingField)?, -transitions, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut abort_incomplete_multipart_upload: Option = None; + let mut expiration: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut noncurrent_version_expiration: Option = None; + let mut noncurrent_version_transitions: Option = None; + let mut prefix: Option = None; + let mut status: Option = None; + let mut transitions: Option = None; + d.for_each_element(|d, x| match x { + b"AbortIncompleteMultipartUpload" => { + if abort_incomplete_multipart_upload.is_some() { + return Err(DeError::DuplicateField); + } + abort_incomplete_multipart_upload = Some(d.content()?); + Ok(()) + } + b"Expiration" => { + if expiration.is_some() { + return Err(DeError::DuplicateField); + } + expiration = Some(d.content()?); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"NoncurrentVersionExpiration" => { + if noncurrent_version_expiration.is_some() { + return Err(DeError::DuplicateField); + } + noncurrent_version_expiration = Some(d.content()?); + Ok(()) + } + b"NoncurrentVersionTransition" => { + let ans: NoncurrentVersionTransition = d.content()?; + noncurrent_version_transitions.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + b"Transition" => { + let ans: Transition = d.content()?; + transitions.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + abort_incomplete_multipart_upload, + expiration, + filter, + id, + noncurrent_version_expiration, + noncurrent_version_transitions, + prefix, + status: status.ok_or(DeError::MissingField)?, + transitions, + }) + } } impl SerializeContent for LifecycleRuleAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.object_size_greater_than { -s.content("ObjectSizeGreaterThan", val)?; -} -if let Some(ref val) = self.object_size_less_than { -s.content("ObjectSizeLessThan", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.object_size_greater_than { + s.content("ObjectSizeGreaterThan", val)?; + } + if let Some(ref val) = self.object_size_less_than { + s.content("ObjectSizeLessThan", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LifecycleRuleAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut object_size_greater_than: Option = None; -let mut object_size_less_than: Option = None; -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"ObjectSizeGreaterThan" => { -if object_size_greater_than.is_some() { return Err(DeError::DuplicateField); } -object_size_greater_than = Some(d.content()?); -Ok(()) -} -b"ObjectSizeLessThan" => { -if object_size_less_than.is_some() { return Err(DeError::DuplicateField); } -object_size_less_than = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -object_size_greater_than, -object_size_less_than, -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut object_size_greater_than: Option = None; + let mut object_size_less_than: Option = None; + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"ObjectSizeGreaterThan" => { + if object_size_greater_than.is_some() { + return Err(DeError::DuplicateField); + } + object_size_greater_than = Some(d.content()?); + Ok(()) + } + b"ObjectSizeLessThan" => { + if object_size_less_than.is_some() { + return Err(DeError::DuplicateField); + } + object_size_less_than = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + object_size_greater_than, + object_size_less_than, + prefix, + tags, + }) + } } impl SerializeContent for LifecycleRuleFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.and { -s.content("And", val)?; -} -if let Some(ref val) = self.object_size_greater_than { -s.content("ObjectSizeGreaterThan", val)?; -} -if let Some(ref val) = self.object_size_less_than { -s.content("ObjectSizeLessThan", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.tag { -s.content("Tag", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.and { + s.content("And", val)?; + } + if let Some(ref val) = self.object_size_greater_than { + s.content("ObjectSizeGreaterThan", val)?; + } + if let Some(ref val) = self.object_size_less_than { + s.content("ObjectSizeLessThan", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.tag { + s.content("Tag", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LifecycleRuleFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut and: Option = None; -let mut object_size_greater_than: Option = None; -let mut object_size_less_than: Option = None; -let mut prefix: Option = None; -let mut tag: Option = None; -d.for_each_element(|d, x| match x { -b"And" => { -if and.is_some() { return Err(DeError::DuplicateField); } -and = Some(d.content()?); -Ok(()) -} -b"ObjectSizeGreaterThan" => { -if object_size_greater_than.is_some() { return Err(DeError::DuplicateField); } -object_size_greater_than = Some(d.content()?); -Ok(()) -} -b"ObjectSizeLessThan" => { -if object_size_less_than.is_some() { return Err(DeError::DuplicateField); } -object_size_less_than = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -if tag.is_some() { return Err(DeError::DuplicateField); } -tag = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -and, -object_size_greater_than, -object_size_less_than, -prefix, -tag, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut and: Option = None; + let mut object_size_greater_than: Option = None; + let mut object_size_less_than: Option = None; + let mut prefix: Option = None; + let mut tag: Option = None; + d.for_each_element(|d, x| match x { + b"And" => { + if and.is_some() { + return Err(DeError::DuplicateField); + } + and = Some(d.content()?); + Ok(()) + } + b"ObjectSizeGreaterThan" => { + if object_size_greater_than.is_some() { + return Err(DeError::DuplicateField); + } + object_size_greater_than = Some(d.content()?); + Ok(()) + } + b"ObjectSizeLessThan" => { + if object_size_less_than.is_some() { + return Err(DeError::DuplicateField); + } + object_size_less_than = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + if tag.is_some() { + return Err(DeError::DuplicateField); + } + tag = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + and, + object_size_greater_than, + object_size_less_than, + prefix, + tag, + }) + } } impl SerializeContent for ListBucketAnalyticsConfigurationsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.analytics_configuration_list { -s.flattened_list("AnalyticsConfiguration", iter)?; -} -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.analytics_configuration_list { + s.flattened_list("AnalyticsConfiguration", iter)?; + } + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketAnalyticsConfigurationsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut analytics_configuration_list: Option = None; -let mut continuation_token: Option = None; -let mut is_truncated: Option = None; -let mut next_continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"AnalyticsConfiguration" => { -let ans: AnalyticsConfiguration = d.content()?; -analytics_configuration_list.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"NextContinuationToken" => { -if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } -next_continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -analytics_configuration_list, -continuation_token, -is_truncated, -next_continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut analytics_configuration_list: Option = None; + let mut continuation_token: Option = None; + let mut is_truncated: Option = None; + let mut next_continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"AnalyticsConfiguration" => { + let ans: AnalyticsConfiguration = d.content()?; + analytics_configuration_list.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"NextContinuationToken" => { + if next_continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + next_continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + analytics_configuration_list, + continuation_token, + is_truncated, + next_continuation_token, + }) + } } impl SerializeContent for ListBucketIntelligentTieringConfigurationsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(iter) = &self.intelligent_tiering_configuration_list { -s.flattened_list("IntelligentTieringConfiguration", iter)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(iter) = &self.intelligent_tiering_configuration_list { + s.flattened_list("IntelligentTieringConfiguration", iter)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketIntelligentTieringConfigurationsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut continuation_token: Option = None; -let mut intelligent_tiering_configuration_list: Option = None; -let mut is_truncated: Option = None; -let mut next_continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"IntelligentTieringConfiguration" => { -let ans: IntelligentTieringConfiguration = d.content()?; -intelligent_tiering_configuration_list.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"NextContinuationToken" => { -if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } -next_continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -continuation_token, -intelligent_tiering_configuration_list, -is_truncated, -next_continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut continuation_token: Option = None; + let mut intelligent_tiering_configuration_list: Option = None; + let mut is_truncated: Option = None; + let mut next_continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"IntelligentTieringConfiguration" => { + let ans: IntelligentTieringConfiguration = d.content()?; + intelligent_tiering_configuration_list.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"NextContinuationToken" => { + if next_continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + next_continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + continuation_token, + intelligent_tiering_configuration_list, + is_truncated, + next_continuation_token, + }) + } } impl SerializeContent for ListBucketInventoryConfigurationsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(iter) = &self.inventory_configuration_list { -s.flattened_list("InventoryConfiguration", iter)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(iter) = &self.inventory_configuration_list { + s.flattened_list("InventoryConfiguration", iter)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketInventoryConfigurationsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut continuation_token: Option = None; -let mut inventory_configuration_list: Option = None; -let mut is_truncated: Option = None; -let mut next_continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"InventoryConfiguration" => { -let ans: InventoryConfiguration = d.content()?; -inventory_configuration_list.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"NextContinuationToken" => { -if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } -next_continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -continuation_token, -inventory_configuration_list, -is_truncated, -next_continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut continuation_token: Option = None; + let mut inventory_configuration_list: Option = None; + let mut is_truncated: Option = None; + let mut next_continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"InventoryConfiguration" => { + let ans: InventoryConfiguration = d.content()?; + inventory_configuration_list.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"NextContinuationToken" => { + if next_continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + next_continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + continuation_token, + inventory_configuration_list, + is_truncated, + next_continuation_token, + }) + } } impl SerializeContent for ListBucketMetricsConfigurationsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(iter) = &self.metrics_configuration_list { -s.flattened_list("MetricsConfiguration", iter)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(iter) = &self.metrics_configuration_list { + s.flattened_list("MetricsConfiguration", iter)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketMetricsConfigurationsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut continuation_token: Option = None; -let mut is_truncated: Option = None; -let mut metrics_configuration_list: Option = None; -let mut next_continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"MetricsConfiguration" => { -let ans: MetricsConfiguration = d.content()?; -metrics_configuration_list.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"NextContinuationToken" => { -if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } -next_continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -continuation_token, -is_truncated, -metrics_configuration_list, -next_continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut continuation_token: Option = None; + let mut is_truncated: Option = None; + let mut metrics_configuration_list: Option = None; + let mut next_continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"MetricsConfiguration" => { + let ans: MetricsConfiguration = d.content()?; + metrics_configuration_list.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"NextContinuationToken" => { + if next_continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + next_continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + continuation_token, + is_truncated, + metrics_configuration_list, + next_continuation_token, + }) + } } impl SerializeContent for ListBucketsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.buckets { -s.list("Buckets", "Bucket", iter)?; -} -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.buckets { + s.list("Buckets", "Bucket", iter)?; + } + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut buckets: Option = None; -let mut continuation_token: Option = None; -let mut owner: Option = None; -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Buckets" => { -if buckets.is_some() { return Err(DeError::DuplicateField); } -buckets = Some(d.list_content("Bucket")?); -Ok(()) -} -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -buckets, -continuation_token, -owner, -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut buckets: Option = None; + let mut continuation_token: Option = None; + let mut owner: Option = None; + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Buckets" => { + if buckets.is_some() { + return Err(DeError::DuplicateField); + } + buckets = Some(d.list_content("Bucket")?); + Ok(()) + } + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + buckets, + continuation_token, + owner, + prefix, + }) + } } impl SerializeContent for ListDirectoryBucketsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.buckets { -s.list("Buckets", "Bucket", iter)?; -} -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.buckets { + s.list("Buckets", "Bucket", iter)?; + } + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListDirectoryBucketsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut buckets: Option = None; -let mut continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"Buckets" => { -if buckets.is_some() { return Err(DeError::DuplicateField); } -buckets = Some(d.list_content("Bucket")?); -Ok(()) -} -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -buckets, -continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut buckets: Option = None; + let mut continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"Buckets" => { + if buckets.is_some() { + return Err(DeError::DuplicateField); + } + buckets = Some(d.list_content("Bucket")?); + Ok(()) + } + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + buckets, + continuation_token, + }) + } } impl SerializeContent for ListMultipartUploadsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(iter) = &self.common_prefixes { -s.flattened_list("CommonPrefixes", iter)?; -} -if let Some(ref val) = self.delimiter { -s.content("Delimiter", val)?; -} -if let Some(ref val) = self.encoding_type { -s.content("EncodingType", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.key_marker { -s.content("KeyMarker", val)?; -} -if let Some(ref val) = self.max_uploads { -s.content("MaxUploads", val)?; -} -if let Some(ref val) = self.next_key_marker { -s.content("NextKeyMarker", val)?; -} -if let Some(ref val) = self.next_upload_id_marker { -s.content("NextUploadIdMarker", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.upload_id_marker { -s.content("UploadIdMarker", val)?; -} -if let Some(iter) = &self.uploads { -s.flattened_list("Upload", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(iter) = &self.common_prefixes { + s.flattened_list("CommonPrefixes", iter)?; + } + if let Some(ref val) = self.delimiter { + s.content("Delimiter", val)?; + } + if let Some(ref val) = self.encoding_type { + s.content("EncodingType", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.key_marker { + s.content("KeyMarker", val)?; + } + if let Some(ref val) = self.max_uploads { + s.content("MaxUploads", val)?; + } + if let Some(ref val) = self.next_key_marker { + s.content("NextKeyMarker", val)?; + } + if let Some(ref val) = self.next_upload_id_marker { + s.content("NextUploadIdMarker", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.upload_id_marker { + s.content("UploadIdMarker", val)?; + } + if let Some(iter) = &self.uploads { + s.flattened_list("Upload", iter)?; + } + Ok(()) + } } impl SerializeContent for ListObjectVersionsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.common_prefixes { -s.flattened_list("CommonPrefixes", iter)?; -} -if let Some(iter) = &self.delete_markers { -s.flattened_list("DeleteMarker", iter)?; -} -if let Some(ref val) = self.delimiter { -s.content("Delimiter", val)?; -} -if let Some(ref val) = self.encoding_type { -s.content("EncodingType", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.key_marker { -s.content("KeyMarker", val)?; -} -if let Some(ref val) = self.max_keys { -s.content("MaxKeys", val)?; -} -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.next_key_marker { -s.content("NextKeyMarker", val)?; -} -if let Some(ref val) = self.next_version_id_marker { -s.content("NextVersionIdMarker", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.version_id_marker { -s.content("VersionIdMarker", val)?; -} -if let Some(iter) = &self.versions { -s.flattened_list("Version", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.common_prefixes { + s.flattened_list("CommonPrefixes", iter)?; + } + if let Some(iter) = &self.delete_markers { + s.flattened_list("DeleteMarker", iter)?; + } + if let Some(ref val) = self.delimiter { + s.content("Delimiter", val)?; + } + if let Some(ref val) = self.encoding_type { + s.content("EncodingType", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.key_marker { + s.content("KeyMarker", val)?; + } + if let Some(ref val) = self.max_keys { + s.content("MaxKeys", val)?; + } + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.next_key_marker { + s.content("NextKeyMarker", val)?; + } + if let Some(ref val) = self.next_version_id_marker { + s.content("NextVersionIdMarker", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.version_id_marker { + s.content("VersionIdMarker", val)?; + } + if let Some(iter) = &self.versions { + s.flattened_list("Version", iter)?; + } + Ok(()) + } } impl SerializeContent for ListObjectsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.marker { -s.content("Marker", val)?; -} -if let Some(ref val) = self.max_keys { -s.content("MaxKeys", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(iter) = &self.contents { -s.flattened_list("Contents", iter)?; -} -if let Some(iter) = &self.common_prefixes { -s.flattened_list("CommonPrefixes", iter)?; -} -if let Some(ref val) = self.delimiter { -s.content("Delimiter", val)?; -} -if let Some(ref val) = self.next_marker { -s.content("NextMarker", val)?; -} -if let Some(ref val) = self.encoding_type { -s.content("EncodingType", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.marker { + s.content("Marker", val)?; + } + if let Some(ref val) = self.max_keys { + s.content("MaxKeys", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(iter) = &self.contents { + s.flattened_list("Contents", iter)?; + } + if let Some(iter) = &self.common_prefixes { + s.flattened_list("CommonPrefixes", iter)?; + } + if let Some(ref val) = self.delimiter { + s.content("Delimiter", val)?; + } + if let Some(ref val) = self.next_marker { + s.content("NextMarker", val)?; + } + if let Some(ref val) = self.encoding_type { + s.content("EncodingType", val)?; + } + Ok(()) + } } impl SerializeContent for ListObjectsV2Output { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.max_keys { -s.content("MaxKeys", val)?; -} -if let Some(ref val) = self.key_count { -s.content("KeyCount", val)?; -} -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -if let Some(iter) = &self.contents { -s.flattened_list("Contents", iter)?; -} -if let Some(iter) = &self.common_prefixes { -s.flattened_list("CommonPrefixes", iter)?; -} -if let Some(ref val) = self.delimiter { -s.content("Delimiter", val)?; -} -if let Some(ref val) = self.encoding_type { -s.content("EncodingType", val)?; -} -if let Some(ref val) = self.start_after { -s.content("StartAfter", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.max_keys { + s.content("MaxKeys", val)?; + } + if let Some(ref val) = self.key_count { + s.content("KeyCount", val)?; + } + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + if let Some(iter) = &self.contents { + s.flattened_list("Contents", iter)?; + } + if let Some(iter) = &self.common_prefixes { + s.flattened_list("CommonPrefixes", iter)?; + } + if let Some(ref val) = self.delimiter { + s.content("Delimiter", val)?; + } + if let Some(ref val) = self.encoding_type { + s.content("EncodingType", val)?; + } + if let Some(ref val) = self.start_after { + s.content("StartAfter", val)?; + } + Ok(()) + } } impl SerializeContent for ListPartsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(ref val) = self.checksum_algorithm { -s.content("ChecksumAlgorithm", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.initiator { -s.content("Initiator", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.max_parts { -s.content("MaxParts", val)?; -} -if let Some(ref val) = self.next_part_number_marker { -s.content("NextPartNumberMarker", val)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.part_number_marker { -s.content("PartNumberMarker", val)?; -} -if let Some(iter) = &self.parts { -s.flattened_list("Part", iter)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -if let Some(ref val) = self.upload_id { -s.content("UploadId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(ref val) = self.checksum_algorithm { + s.content("ChecksumAlgorithm", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.initiator { + s.content("Initiator", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.max_parts { + s.content("MaxParts", val)?; + } + if let Some(ref val) = self.next_part_number_marker { + s.content("NextPartNumberMarker", val)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.part_number_marker { + s.content("PartNumberMarker", val)?; + } + if let Some(iter) = &self.parts { + s.flattened_list("Part", iter)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + if let Some(ref val) = self.upload_id { + s.content("UploadId", val)?; + } + Ok(()) + } } impl SerializeContent for LocationInfo { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.type_ { -s.content("Type", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.type_ { + s.content("Type", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LocationInfo { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut name: Option = None; -let mut type_: Option = None; -d.for_each_element(|d, x| match x { -b"Name" => { -if name.is_some() { return Err(DeError::DuplicateField); } -name = Some(d.content()?); -Ok(()) -} -b"Type" => { -if type_.is_some() { return Err(DeError::DuplicateField); } -type_ = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -name, -type_, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut name: Option = None; + let mut type_: Option = None; + d.for_each_element(|d, x| match x { + b"Name" => { + if name.is_some() { + return Err(DeError::DuplicateField); + } + name = Some(d.content()?); + Ok(()) + } + b"Type" => { + if type_.is_some() { + return Err(DeError::DuplicateField); + } + type_ = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { name, type_ }) + } } impl SerializeContent for LocationType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for LocationType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"AvailabilityZone" => Ok(Self::from_static(LocationType::AVAILABILITY_ZONE)), -b"LocalZone" => Ok(Self::from_static(LocationType::LOCAL_ZONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"AvailabilityZone" => Ok(Self::from_static(LocationType::AVAILABILITY_ZONE)), + b"LocalZone" => Ok(Self::from_static(LocationType::LOCAL_ZONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for LoggingEnabled { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("TargetBucket", &self.target_bucket)?; -if let Some(iter) = &self.target_grants { -s.list("TargetGrants", "Grant", iter)?; -} -if let Some(ref val) = self.target_object_key_format { -s.content("TargetObjectKeyFormat", val)?; -} -s.content("TargetPrefix", &self.target_prefix)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("TargetBucket", &self.target_bucket)?; + if let Some(iter) = &self.target_grants { + s.list("TargetGrants", "Grant", iter)?; + } + if let Some(ref val) = self.target_object_key_format { + s.content("TargetObjectKeyFormat", val)?; + } + s.content("TargetPrefix", &self.target_prefix)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LoggingEnabled { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut target_bucket: Option = None; -let mut target_grants: Option = None; -let mut target_object_key_format: Option = None; -let mut target_prefix: Option = None; -d.for_each_element(|d, x| match x { -b"TargetBucket" => { -if target_bucket.is_some() { return Err(DeError::DuplicateField); } -target_bucket = Some(d.content()?); -Ok(()) -} -b"TargetGrants" => { -if target_grants.is_some() { return Err(DeError::DuplicateField); } -target_grants = Some(d.list_content("Grant")?); -Ok(()) -} -b"TargetObjectKeyFormat" => { -if target_object_key_format.is_some() { return Err(DeError::DuplicateField); } -target_object_key_format = Some(d.content()?); -Ok(()) -} -b"TargetPrefix" => { -if target_prefix.is_some() { return Err(DeError::DuplicateField); } -target_prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -target_bucket: target_bucket.ok_or(DeError::MissingField)?, -target_grants, -target_object_key_format, -target_prefix: target_prefix.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut target_bucket: Option = None; + let mut target_grants: Option = None; + let mut target_object_key_format: Option = None; + let mut target_prefix: Option = None; + d.for_each_element(|d, x| match x { + b"TargetBucket" => { + if target_bucket.is_some() { + return Err(DeError::DuplicateField); + } + target_bucket = Some(d.content()?); + Ok(()) + } + b"TargetGrants" => { + if target_grants.is_some() { + return Err(DeError::DuplicateField); + } + target_grants = Some(d.list_content("Grant")?); + Ok(()) + } + b"TargetObjectKeyFormat" => { + if target_object_key_format.is_some() { + return Err(DeError::DuplicateField); + } + target_object_key_format = Some(d.content()?); + Ok(()) + } + b"TargetPrefix" => { + if target_prefix.is_some() { + return Err(DeError::DuplicateField); + } + target_prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + target_bucket: target_bucket.ok_or(DeError::MissingField)?, + target_grants, + target_object_key_format, + target_prefix: target_prefix.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for MFADelete { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for MFADelete { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(MFADelete::DISABLED)), -b"Enabled" => Ok(Self::from_static(MFADelete::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(MFADelete::DISABLED)), + b"Enabled" => Ok(Self::from_static(MFADelete::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for MFADeleteStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for MFADeleteStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(MFADeleteStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(MFADeleteStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(MFADeleteStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(MFADeleteStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for MetadataEntry { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.value { -s.content("Value", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.value { + s.content("Value", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetadataEntry { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut name: Option = None; -let mut value: Option = None; -d.for_each_element(|d, x| match x { -b"Name" => { -if name.is_some() { return Err(DeError::DuplicateField); } -name = Some(d.content()?); -Ok(()) -} -b"Value" => { -if value.is_some() { return Err(DeError::DuplicateField); } -value = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -name, -value, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut name: Option = None; + let mut value: Option = None; + d.for_each_element(|d, x| match x { + b"Name" => { + if name.is_some() { + return Err(DeError::DuplicateField); + } + name = Some(d.content()?); + Ok(()) + } + b"Value" => { + if value.is_some() { + return Err(DeError::DuplicateField); + } + value = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { name, value }) + } } impl SerializeContent for MetadataTableConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("S3TablesDestination", &self.s3_tables_destination)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("S3TablesDestination", &self.s3_tables_destination)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetadataTableConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3_tables_destination: Option = None; -d.for_each_element(|d, x| match x { -b"S3TablesDestination" => { -if s3_tables_destination.is_some() { return Err(DeError::DuplicateField); } -s3_tables_destination = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3_tables_destination: s3_tables_destination.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3_tables_destination: Option = None; + d.for_each_element(|d, x| match x { + b"S3TablesDestination" => { + if s3_tables_destination.is_some() { + return Err(DeError::DuplicateField); + } + s3_tables_destination = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + s3_tables_destination: s3_tables_destination.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for MetadataTableConfigurationResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("S3TablesDestinationResult", &self.s3_tables_destination_result)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("S3TablesDestinationResult", &self.s3_tables_destination_result)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetadataTableConfigurationResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3_tables_destination_result: Option = None; -d.for_each_element(|d, x| match x { -b"S3TablesDestinationResult" => { -if s3_tables_destination_result.is_some() { return Err(DeError::DuplicateField); } -s3_tables_destination_result = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3_tables_destination_result: s3_tables_destination_result.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3_tables_destination_result: Option = None; + d.for_each_element(|d, x| match x { + b"S3TablesDestinationResult" => { + if s3_tables_destination_result.is_some() { + return Err(DeError::DuplicateField); + } + s3_tables_destination_result = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + s3_tables_destination_result: s3_tables_destination_result.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Metrics { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.event_threshold { -s.content("EventThreshold", val)?; -} -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.event_threshold { + s.content("EventThreshold", val)?; + } + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Metrics { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut event_threshold: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"EventThreshold" => { -if event_threshold.is_some() { return Err(DeError::DuplicateField); } -event_threshold = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -event_threshold, -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut event_threshold: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"EventThreshold" => { + if event_threshold.is_some() { + return Err(DeError::DuplicateField); + } + event_threshold = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + event_threshold, + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for MetricsAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.access_point_arn { -s.content("AccessPointArn", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.access_point_arn { + s.content("AccessPointArn", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetricsAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_point_arn: Option = None; -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"AccessPointArn" => { -if access_point_arn.is_some() { return Err(DeError::DuplicateField); } -access_point_arn = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_point_arn, -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_point_arn: Option = None; + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"AccessPointArn" => { + if access_point_arn.is_some() { + return Err(DeError::DuplicateField); + } + access_point_arn = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_point_arn, + prefix, + tags, + }) + } } impl SerializeContent for MetricsConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -s.content("Id", &self.id)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + s.content("Id", &self.id)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetricsConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut filter: Option = None; -let mut id: Option = None; -d.for_each_element(|d, x| match x { -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -filter, -id: id.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut filter: Option = None; + let mut id: Option = None; + d.for_each_element(|d, x| match x { + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + filter, + id: id.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for MetricsFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -match self { -Self::AccessPointArn(x) => s.content("AccessPointArn", x), -Self::And(x) => s.content("And", x), -Self::Prefix(x) => s.content("Prefix", x), -Self::Tag(x) => s.content("Tag", x), -} -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + match self { + Self::AccessPointArn(x) => s.content("AccessPointArn", x), + Self::And(x) => s.content("And", x), + Self::Prefix(x) => s.content("Prefix", x), + Self::Tag(x) => s.content("Tag", x), + } + } } impl<'xml> DeserializeContent<'xml> for MetricsFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.element(|d, x| match x { -b"AccessPointArn" => Ok(Self::AccessPointArn(d.content()?)), -b"And" => Ok(Self::And(d.content()?)), -b"Prefix" => Ok(Self::Prefix(d.content()?)), -b"Tag" => Ok(Self::Tag(d.content()?)), -_ => Err(DeError::UnexpectedTagName) -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.element(|d, x| match x { + b"AccessPointArn" => Ok(Self::AccessPointArn(d.content()?)), + b"And" => Ok(Self::And(d.content()?)), + b"Prefix" => Ok(Self::Prefix(d.content()?)), + b"Tag" => Ok(Self::Tag(d.content()?)), + _ => Err(DeError::UnexpectedTagName), + }) + } } impl SerializeContent for MetricsStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for MetricsStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(MetricsStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(MetricsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(MetricsStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(MetricsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for MultipartUpload { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_algorithm { -s.content("ChecksumAlgorithm", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.initiated { -s.timestamp("Initiated", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.initiator { -s.content("Initiator", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -if let Some(ref val) = self.upload_id { -s.content("UploadId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_algorithm { + s.content("ChecksumAlgorithm", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.initiated { + s.timestamp("Initiated", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.initiator { + s.content("Initiator", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + if let Some(ref val) = self.upload_id { + s.content("UploadId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MultipartUpload { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_algorithm: Option = None; -let mut checksum_type: Option = None; -let mut initiated: Option = None; -let mut initiator: Option = None; -let mut key: Option = None; -let mut owner: Option = None; -let mut storage_class: Option = None; -let mut upload_id: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumAlgorithm" => { -if checksum_algorithm.is_some() { return Err(DeError::DuplicateField); } -checksum_algorithm = Some(d.content()?); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -b"Initiated" => { -if initiated.is_some() { return Err(DeError::DuplicateField); } -initiated = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Initiator" => { -if initiator.is_some() { return Err(DeError::DuplicateField); } -initiator = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -b"UploadId" => { -if upload_id.is_some() { return Err(DeError::DuplicateField); } -upload_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_algorithm, -checksum_type, -initiated, -initiator, -key, -owner, -storage_class, -upload_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_algorithm: Option = None; + let mut checksum_type: Option = None; + let mut initiated: Option = None; + let mut initiator: Option = None; + let mut key: Option = None; + let mut owner: Option = None; + let mut storage_class: Option = None; + let mut upload_id: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumAlgorithm" => { + if checksum_algorithm.is_some() { + return Err(DeError::DuplicateField); + } + checksum_algorithm = Some(d.content()?); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + b"Initiated" => { + if initiated.is_some() { + return Err(DeError::DuplicateField); + } + initiated = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Initiator" => { + if initiator.is_some() { + return Err(DeError::DuplicateField); + } + initiator = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + b"UploadId" => { + if upload_id.is_some() { + return Err(DeError::DuplicateField); + } + upload_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_algorithm, + checksum_type, + initiated, + initiator, + key, + owner, + storage_class, + upload_id, + }) + } } impl SerializeContent for NoncurrentVersionExpiration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.newer_noncurrent_versions { -s.content("NewerNoncurrentVersions", val)?; -} -if let Some(ref val) = self.noncurrent_days { -s.content("NoncurrentDays", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.newer_noncurrent_versions { + s.content("NewerNoncurrentVersions", val)?; + } + if let Some(ref val) = self.noncurrent_days { + s.content("NoncurrentDays", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for NoncurrentVersionExpiration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut newer_noncurrent_versions: Option = None; -let mut noncurrent_days: Option = None; -d.for_each_element(|d, x| match x { -b"NewerNoncurrentVersions" => { -if newer_noncurrent_versions.is_some() { return Err(DeError::DuplicateField); } -newer_noncurrent_versions = Some(d.content()?); -Ok(()) -} -b"NoncurrentDays" => { -if noncurrent_days.is_some() { return Err(DeError::DuplicateField); } -noncurrent_days = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -newer_noncurrent_versions, -noncurrent_days, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut newer_noncurrent_versions: Option = None; + let mut noncurrent_days: Option = None; + d.for_each_element(|d, x| match x { + b"NewerNoncurrentVersions" => { + if newer_noncurrent_versions.is_some() { + return Err(DeError::DuplicateField); + } + newer_noncurrent_versions = Some(d.content()?); + Ok(()) + } + b"NoncurrentDays" => { + if noncurrent_days.is_some() { + return Err(DeError::DuplicateField); + } + noncurrent_days = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + newer_noncurrent_versions, + noncurrent_days, + }) + } } impl SerializeContent for NoncurrentVersionTransition { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.newer_noncurrent_versions { -s.content("NewerNoncurrentVersions", val)?; -} -if let Some(ref val) = self.noncurrent_days { -s.content("NoncurrentDays", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.newer_noncurrent_versions { + s.content("NewerNoncurrentVersions", val)?; + } + if let Some(ref val) = self.noncurrent_days { + s.content("NoncurrentDays", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for NoncurrentVersionTransition { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut newer_noncurrent_versions: Option = None; -let mut noncurrent_days: Option = None; -let mut storage_class: Option = None; -d.for_each_element(|d, x| match x { -b"NewerNoncurrentVersions" => { -if newer_noncurrent_versions.is_some() { return Err(DeError::DuplicateField); } -newer_noncurrent_versions = Some(d.content()?); -Ok(()) -} -b"NoncurrentDays" => { -if noncurrent_days.is_some() { return Err(DeError::DuplicateField); } -noncurrent_days = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -newer_noncurrent_versions, -noncurrent_days, -storage_class, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut newer_noncurrent_versions: Option = None; + let mut noncurrent_days: Option = None; + let mut storage_class: Option = None; + d.for_each_element(|d, x| match x { + b"NewerNoncurrentVersions" => { + if newer_noncurrent_versions.is_some() { + return Err(DeError::DuplicateField); + } + newer_noncurrent_versions = Some(d.content()?); + Ok(()) + } + b"NoncurrentDays" => { + if noncurrent_days.is_some() { + return Err(DeError::DuplicateField); + } + noncurrent_days = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + newer_noncurrent_versions, + noncurrent_days, + storage_class, + }) + } } impl SerializeContent for NotificationConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.event_bridge_configuration { -s.content("EventBridgeConfiguration", val)?; -} -if let Some(iter) = &self.lambda_function_configurations { -s.flattened_list("CloudFunctionConfiguration", iter)?; -} -if let Some(iter) = &self.queue_configurations { -s.flattened_list("QueueConfiguration", iter)?; -} -if let Some(iter) = &self.topic_configurations { -s.flattened_list("TopicConfiguration", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.event_bridge_configuration { + s.content("EventBridgeConfiguration", val)?; + } + if let Some(iter) = &self.lambda_function_configurations { + s.flattened_list("CloudFunctionConfiguration", iter)?; + } + if let Some(iter) = &self.queue_configurations { + s.flattened_list("QueueConfiguration", iter)?; + } + if let Some(iter) = &self.topic_configurations { + s.flattened_list("TopicConfiguration", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for NotificationConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut event_bridge_configuration: Option = None; -let mut lambda_function_configurations: Option = None; -let mut queue_configurations: Option = None; -let mut topic_configurations: Option = None; -d.for_each_element(|d, x| match x { -b"EventBridgeConfiguration" => { -if event_bridge_configuration.is_some() { return Err(DeError::DuplicateField); } -event_bridge_configuration = Some(d.content()?); -Ok(()) -} -b"CloudFunctionConfiguration" => { -let ans: LambdaFunctionConfiguration = d.content()?; -lambda_function_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"QueueConfiguration" => { -let ans: QueueConfiguration = d.content()?; -queue_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"TopicConfiguration" => { -let ans: TopicConfiguration = d.content()?; -topic_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -event_bridge_configuration, -lambda_function_configurations, -queue_configurations, -topic_configurations, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut event_bridge_configuration: Option = None; + let mut lambda_function_configurations: Option = None; + let mut queue_configurations: Option = None; + let mut topic_configurations: Option = None; + d.for_each_element(|d, x| match x { + b"EventBridgeConfiguration" => { + if event_bridge_configuration.is_some() { + return Err(DeError::DuplicateField); + } + event_bridge_configuration = Some(d.content()?); + Ok(()) + } + b"CloudFunctionConfiguration" => { + let ans: LambdaFunctionConfiguration = d.content()?; + lambda_function_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"QueueConfiguration" => { + let ans: QueueConfiguration = d.content()?; + queue_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"TopicConfiguration" => { + let ans: TopicConfiguration = d.content()?; + topic_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + event_bridge_configuration, + lambda_function_configurations, + queue_configurations, + topic_configurations, + }) + } } impl SerializeContent for NotificationConfigurationFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.key { -s.content("S3Key", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.key { + s.content("S3Key", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for NotificationConfigurationFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut key: Option = None; -d.for_each_element(|d, x| match x { -b"S3Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -key, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut key: Option = None; + d.for_each_element(|d, x| match x { + b"S3Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { key }) + } } impl SerializeContent for Object { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.checksum_algorithm { -s.flattened_list("ChecksumAlgorithm", iter)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.restore_status { -s.content("RestoreStatus", val)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.checksum_algorithm { + s.flattened_list("ChecksumAlgorithm", iter)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.restore_status { + s.content("RestoreStatus", val)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Object { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_algorithm: Option = None; -let mut checksum_type: Option = None; -let mut e_tag: Option = None; -let mut key: Option = None; -let mut last_modified: Option = None; -let mut owner: Option = None; -let mut restore_status: Option = None; -let mut size: Option = None; -let mut storage_class: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumAlgorithm" => { -let ans: ChecksumAlgorithm = d.content()?; -checksum_algorithm.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"RestoreStatus" => { -if restore_status.is_some() { return Err(DeError::DuplicateField); } -restore_status = Some(d.content()?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_algorithm, -checksum_type, -e_tag, -key, -last_modified, -owner, -restore_status, -size, -storage_class, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_algorithm: Option = None; + let mut checksum_type: Option = None; + let mut e_tag: Option = None; + let mut key: Option = None; + let mut last_modified: Option = None; + let mut owner: Option = None; + let mut restore_status: Option = None; + let mut size: Option = None; + let mut storage_class: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumAlgorithm" => { + let ans: ChecksumAlgorithm = d.content()?; + checksum_algorithm.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"RestoreStatus" => { + if restore_status.is_some() { + return Err(DeError::DuplicateField); + } + restore_status = Some(d.content()?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_algorithm, + checksum_type, + e_tag, + key, + last_modified, + owner, + restore_status, + size, + storage_class, + }) + } } impl SerializeContent for ObjectCannedACL { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectCannedACL { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"authenticated-read" => Ok(Self::from_static(ObjectCannedACL::AUTHENTICATED_READ)), -b"aws-exec-read" => Ok(Self::from_static(ObjectCannedACL::AWS_EXEC_READ)), -b"bucket-owner-full-control" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_FULL_CONTROL)), -b"bucket-owner-read" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_READ)), -b"private" => Ok(Self::from_static(ObjectCannedACL::PRIVATE)), -b"public-read" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ)), -b"public-read-write" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ_WRITE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"authenticated-read" => Ok(Self::from_static(ObjectCannedACL::AUTHENTICATED_READ)), + b"aws-exec-read" => Ok(Self::from_static(ObjectCannedACL::AWS_EXEC_READ)), + b"bucket-owner-full-control" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_FULL_CONTROL)), + b"bucket-owner-read" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_READ)), + b"private" => Ok(Self::from_static(ObjectCannedACL::PRIVATE)), + b"public-read" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ)), + b"public-read-write" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ_WRITE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for ObjectIdentifier { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -s.content("Key", &self.key)?; -if let Some(ref val) = self.last_modified_time { -s.timestamp("LastModifiedTime", val, TimestampFormat::HttpDate)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + s.content("Key", &self.key)?; + if let Some(ref val) = self.last_modified_time { + s.timestamp("LastModifiedTime", val, TimestampFormat::HttpDate)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectIdentifier { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut e_tag: Option = None; -let mut key: Option = None; -let mut last_modified_time: Option = None; -let mut size: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"LastModifiedTime" => { -if last_modified_time.is_some() { return Err(DeError::DuplicateField); } -last_modified_time = Some(d.timestamp(TimestampFormat::HttpDate)?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -e_tag, -key: key.ok_or(DeError::MissingField)?, -last_modified_time, -size, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut e_tag: Option = None; + let mut key: Option = None; + let mut last_modified_time: Option = None; + let mut size: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"LastModifiedTime" => { + if last_modified_time.is_some() { + return Err(DeError::DuplicateField); + } + last_modified_time = Some(d.timestamp(TimestampFormat::HttpDate)?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + e_tag, + key: key.ok_or(DeError::MissingField)?, + last_modified_time, + size, + version_id, + }) + } } impl SerializeContent for ObjectLockConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.object_lock_enabled { -s.content("ObjectLockEnabled", val)?; -} -if let Some(ref val) = self.rule { -s.content("Rule", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.object_lock_enabled { + s.content("ObjectLockEnabled", val)?; + } + if let Some(ref val) = self.rule { + s.content("Rule", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut object_lock_enabled: Option = None; -let mut rule: Option = None; -d.for_each_element(|d, x| match x { -b"ObjectLockEnabled" => { -if object_lock_enabled.is_some() { return Err(DeError::DuplicateField); } -object_lock_enabled = Some(d.content()?); -Ok(()) -} -b"Rule" => { -if rule.is_some() { return Err(DeError::DuplicateField); } -rule = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -object_lock_enabled, -rule, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut object_lock_enabled: Option = None; + let mut rule: Option = None; + d.for_each_element(|d, x| match x { + b"ObjectLockEnabled" => { + if object_lock_enabled.is_some() { + return Err(DeError::DuplicateField); + } + object_lock_enabled = Some(d.content()?); + Ok(()) + } + b"Rule" => { + if rule.is_some() { + return Err(DeError::DuplicateField); + } + rule = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + object_lock_enabled, + rule, + }) + } } impl SerializeContent for ObjectLockEnabled { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockEnabled { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Enabled" => Ok(Self::from_static(ObjectLockEnabled::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Enabled" => Ok(Self::from_static(ObjectLockEnabled::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ObjectLockLegalHold { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockLegalHold { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { status }) + } } impl SerializeContent for ObjectLockLegalHoldStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockLegalHoldStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"OFF" => Ok(Self::from_static(ObjectLockLegalHoldStatus::OFF)), -b"ON" => Ok(Self::from_static(ObjectLockLegalHoldStatus::ON)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"OFF" => Ok(Self::from_static(ObjectLockLegalHoldStatus::OFF)), + b"ON" => Ok(Self::from_static(ObjectLockLegalHoldStatus::ON)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ObjectLockRetention { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.mode { -s.content("Mode", val)?; -} -if let Some(ref val) = self.retain_until_date { -s.timestamp("RetainUntilDate", val, TimestampFormat::DateTime)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.mode { + s.content("Mode", val)?; + } + if let Some(ref val) = self.retain_until_date { + s.timestamp("RetainUntilDate", val, TimestampFormat::DateTime)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockRetention { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut mode: Option = None; -let mut retain_until_date: Option = None; -d.for_each_element(|d, x| match x { -b"Mode" => { -if mode.is_some() { return Err(DeError::DuplicateField); } -mode = Some(d.content()?); -Ok(()) -} -b"RetainUntilDate" => { -if retain_until_date.is_some() { return Err(DeError::DuplicateField); } -retain_until_date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -mode, -retain_until_date, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut mode: Option = None; + let mut retain_until_date: Option = None; + d.for_each_element(|d, x| match x { + b"Mode" => { + if mode.is_some() { + return Err(DeError::DuplicateField); + } + mode = Some(d.content()?); + Ok(()) + } + b"RetainUntilDate" => { + if retain_until_date.is_some() { + return Err(DeError::DuplicateField); + } + retain_until_date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { mode, retain_until_date }) + } } impl SerializeContent for ObjectLockRetentionMode { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockRetentionMode { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"COMPLIANCE" => Ok(Self::from_static(ObjectLockRetentionMode::COMPLIANCE)), -b"GOVERNANCE" => Ok(Self::from_static(ObjectLockRetentionMode::GOVERNANCE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"COMPLIANCE" => Ok(Self::from_static(ObjectLockRetentionMode::COMPLIANCE)), + b"GOVERNANCE" => Ok(Self::from_static(ObjectLockRetentionMode::GOVERNANCE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ObjectLockRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.default_retention { -s.content("DefaultRetention", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.default_retention { + s.content("DefaultRetention", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut default_retention: Option = None; -d.for_each_element(|d, x| match x { -b"DefaultRetention" => { -if default_retention.is_some() { return Err(DeError::DuplicateField); } -default_retention = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -default_retention, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut default_retention: Option = None; + d.for_each_element(|d, x| match x { + b"DefaultRetention" => { + if default_retention.is_some() { + return Err(DeError::DuplicateField); + } + default_retention = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { default_retention }) + } } impl SerializeContent for ObjectOwnership { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectOwnership { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"BucketOwnerEnforced" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_ENFORCED)), -b"BucketOwnerPreferred" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_PREFERRED)), -b"ObjectWriter" => Ok(Self::from_static(ObjectOwnership::OBJECT_WRITER)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"BucketOwnerEnforced" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_ENFORCED)), + b"BucketOwnerPreferred" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_PREFERRED)), + b"ObjectWriter" => Ok(Self::from_static(ObjectOwnership::OBJECT_WRITER)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ObjectPart { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.part_number { -s.content("PartNumber", val)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.part_number { + s.content("PartNumber", val)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectPart { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut part_number: Option = None; -let mut size: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"PartNumber" => { -if part_number.is_some() { return Err(DeError::DuplicateField); } -part_number = Some(d.content()?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -part_number, -size, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut part_number: Option = None; + let mut size: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"PartNumber" => { + if part_number.is_some() { + return Err(DeError::DuplicateField); + } + part_number = Some(d.content()?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + part_number, + size, + }) + } } impl SerializeContent for ObjectStorageClass { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectStorageClass { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DEEP_ARCHIVE" => Ok(Self::from_static(ObjectStorageClass::DEEP_ARCHIVE)), -b"EXPRESS_ONEZONE" => Ok(Self::from_static(ObjectStorageClass::EXPRESS_ONEZONE)), -b"GLACIER" => Ok(Self::from_static(ObjectStorageClass::GLACIER)), -b"GLACIER_IR" => Ok(Self::from_static(ObjectStorageClass::GLACIER_IR)), -b"INTELLIGENT_TIERING" => Ok(Self::from_static(ObjectStorageClass::INTELLIGENT_TIERING)), -b"ONEZONE_IA" => Ok(Self::from_static(ObjectStorageClass::ONEZONE_IA)), -b"OUTPOSTS" => Ok(Self::from_static(ObjectStorageClass::OUTPOSTS)), -b"REDUCED_REDUNDANCY" => Ok(Self::from_static(ObjectStorageClass::REDUCED_REDUNDANCY)), -b"SNOW" => Ok(Self::from_static(ObjectStorageClass::SNOW)), -b"STANDARD" => Ok(Self::from_static(ObjectStorageClass::STANDARD)), -b"STANDARD_IA" => Ok(Self::from_static(ObjectStorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DEEP_ARCHIVE" => Ok(Self::from_static(ObjectStorageClass::DEEP_ARCHIVE)), + b"EXPRESS_ONEZONE" => Ok(Self::from_static(ObjectStorageClass::EXPRESS_ONEZONE)), + b"GLACIER" => Ok(Self::from_static(ObjectStorageClass::GLACIER)), + b"GLACIER_IR" => Ok(Self::from_static(ObjectStorageClass::GLACIER_IR)), + b"INTELLIGENT_TIERING" => Ok(Self::from_static(ObjectStorageClass::INTELLIGENT_TIERING)), + b"ONEZONE_IA" => Ok(Self::from_static(ObjectStorageClass::ONEZONE_IA)), + b"OUTPOSTS" => Ok(Self::from_static(ObjectStorageClass::OUTPOSTS)), + b"REDUCED_REDUNDANCY" => Ok(Self::from_static(ObjectStorageClass::REDUCED_REDUNDANCY)), + b"SNOW" => Ok(Self::from_static(ObjectStorageClass::SNOW)), + b"STANDARD" => Ok(Self::from_static(ObjectStorageClass::STANDARD)), + b"STANDARD_IA" => Ok(Self::from_static(ObjectStorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for ObjectVersion { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.checksum_algorithm { -s.flattened_list("ChecksumAlgorithm", iter)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.is_latest { -s.content("IsLatest", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.restore_status { -s.content("RestoreStatus", val)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.checksum_algorithm { + s.flattened_list("ChecksumAlgorithm", iter)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.is_latest { + s.content("IsLatest", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.restore_status { + s.content("RestoreStatus", val)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectVersion { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_algorithm: Option = None; -let mut checksum_type: Option = None; -let mut e_tag: Option = None; -let mut is_latest: Option = None; -let mut key: Option = None; -let mut last_modified: Option = None; -let mut owner: Option = None; -let mut restore_status: Option = None; -let mut size: Option = None; -let mut storage_class: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumAlgorithm" => { -let ans: ChecksumAlgorithm = d.content()?; -checksum_algorithm.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"IsLatest" => { -if is_latest.is_some() { return Err(DeError::DuplicateField); } -is_latest = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"RestoreStatus" => { -if restore_status.is_some() { return Err(DeError::DuplicateField); } -restore_status = Some(d.content()?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_algorithm, -checksum_type, -e_tag, -is_latest, -key, -last_modified, -owner, -restore_status, -size, -storage_class, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_algorithm: Option = None; + let mut checksum_type: Option = None; + let mut e_tag: Option = None; + let mut is_latest: Option = None; + let mut key: Option = None; + let mut last_modified: Option = None; + let mut owner: Option = None; + let mut restore_status: Option = None; + let mut size: Option = None; + let mut storage_class: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumAlgorithm" => { + let ans: ChecksumAlgorithm = d.content()?; + checksum_algorithm.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"IsLatest" => { + if is_latest.is_some() { + return Err(DeError::DuplicateField); + } + is_latest = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"RestoreStatus" => { + if restore_status.is_some() { + return Err(DeError::DuplicateField); + } + restore_status = Some(d.content()?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_algorithm, + checksum_type, + e_tag, + is_latest, + key, + last_modified, + owner, + restore_status, + size, + storage_class, + version_id, + }) + } } impl SerializeContent for ObjectVersionStorageClass { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectVersionStorageClass { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"STANDARD" => Ok(Self::from_static(ObjectVersionStorageClass::STANDARD)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"STANDARD" => Ok(Self::from_static(ObjectVersionStorageClass::STANDARD)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for OutputLocation { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.s3 { -s.content("S3", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.s3 { + s.content("S3", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for OutputLocation { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3: Option = None; -d.for_each_element(|d, x| match x { -b"S3" => { -if s3.is_some() { return Err(DeError::DuplicateField); } -s3 = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3: Option = None; + d.for_each_element(|d, x| match x { + b"S3" => { + if s3.is_some() { + return Err(DeError::DuplicateField); + } + s3 = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { s3 }) + } } impl SerializeContent for OutputSerialization { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.csv { -s.content("CSV", val)?; -} -if let Some(ref val) = self.json { -s.content("JSON", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.csv { + s.content("CSV", val)?; + } + if let Some(ref val) = self.json { + s.content("JSON", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for OutputSerialization { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut csv: Option = None; -let mut json: Option = None; -d.for_each_element(|d, x| match x { -b"CSV" => { -if csv.is_some() { return Err(DeError::DuplicateField); } -csv = Some(d.content()?); -Ok(()) -} -b"JSON" => { -if json.is_some() { return Err(DeError::DuplicateField); } -json = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -csv, -json, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut csv: Option = None; + let mut json: Option = None; + d.for_each_element(|d, x| match x { + b"CSV" => { + if csv.is_some() { + return Err(DeError::DuplicateField); + } + csv = Some(d.content()?); + Ok(()) + } + b"JSON" => { + if json.is_some() { + return Err(DeError::DuplicateField); + } + json = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { csv, json }) + } } impl SerializeContent for Owner { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.display_name { -s.content("DisplayName", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.display_name { + s.content("DisplayName", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Owner { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut display_name: Option = None; -let mut id: Option = None; -d.for_each_element(|d, x| match x { -b"DisplayName" => { -if display_name.is_some() { return Err(DeError::DuplicateField); } -display_name = Some(d.content()?); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -display_name, -id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut display_name: Option = None; + let mut id: Option = None; + d.for_each_element(|d, x| match x { + b"DisplayName" => { + if display_name.is_some() { + return Err(DeError::DuplicateField); + } + display_name = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { display_name, id }) + } } impl SerializeContent for OwnerOverride { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for OwnerOverride { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Destination" => Ok(Self::from_static(OwnerOverride::DESTINATION)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Destination" => Ok(Self::from_static(OwnerOverride::DESTINATION)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for OwnershipControls { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.rules; -s.flattened_list("Rule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.rules; + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for OwnershipControls { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut rules: Option = None; -d.for_each_element(|d, x| match x { -b"Rule" => { -let ans: OwnershipControlsRule = d.content()?; -rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -rules: rules.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut rules: Option = None; + d.for_each_element(|d, x| match x { + b"Rule" => { + let ans: OwnershipControlsRule = d.content()?; + rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + rules: rules.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for OwnershipControlsRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("ObjectOwnership", &self.object_ownership)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("ObjectOwnership", &self.object_ownership)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for OwnershipControlsRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut object_ownership: Option = None; -d.for_each_element(|d, x| match x { -b"ObjectOwnership" => { -if object_ownership.is_some() { return Err(DeError::DuplicateField); } -object_ownership = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -object_ownership: object_ownership.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut object_ownership: Option = None; + d.for_each_element(|d, x| match x { + b"ObjectOwnership" => { + if object_ownership.is_some() { + return Err(DeError::DuplicateField); + } + object_ownership = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + object_ownership: object_ownership.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ParquetInput { -fn serialize_content(&self, _: &mut Serializer) -> SerResult { -Ok(()) -} + fn serialize_content(&self, _: &mut Serializer) -> SerResult { + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ParquetInput { -fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { -Ok(Self { -}) -} + fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { + Ok(Self {}) + } } impl SerializeContent for Part { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.part_number { -s.content("PartNumber", val)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.part_number { + s.content("PartNumber", val)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Part { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut e_tag: Option = None; -let mut last_modified: Option = None; -let mut part_number: Option = None; -let mut size: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"PartNumber" => { -if part_number.is_some() { return Err(DeError::DuplicateField); } -part_number = Some(d.content()?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -e_tag, -last_modified, -part_number, -size, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut e_tag: Option = None; + let mut last_modified: Option = None; + let mut part_number: Option = None; + let mut size: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"PartNumber" => { + if part_number.is_some() { + return Err(DeError::DuplicateField); + } + part_number = Some(d.content()?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + e_tag, + last_modified, + part_number, + size, + }) + } } impl SerializeContent for PartitionDateSource { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for PartitionDateSource { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DeliveryTime" => Ok(Self::from_static(PartitionDateSource::DELIVERY_TIME)), -b"EventTime" => Ok(Self::from_static(PartitionDateSource::EVENT_TIME)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DeliveryTime" => Ok(Self::from_static(PartitionDateSource::DELIVERY_TIME)), + b"EventTime" => Ok(Self::from_static(PartitionDateSource::EVENT_TIME)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for PartitionedPrefix { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.partition_date_source { -s.content("PartitionDateSource", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.partition_date_source { + s.content("PartitionDateSource", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for PartitionedPrefix { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut partition_date_source: Option = None; -d.for_each_element(|d, x| match x { -b"PartitionDateSource" => { -if partition_date_source.is_some() { return Err(DeError::DuplicateField); } -partition_date_source = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -partition_date_source, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut partition_date_source: Option = None; + d.for_each_element(|d, x| match x { + b"PartitionDateSource" => { + if partition_date_source.is_some() { + return Err(DeError::DuplicateField); + } + partition_date_source = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { partition_date_source }) + } } impl SerializeContent for Payer { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Payer { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"BucketOwner" => Ok(Self::from_static(Payer::BUCKET_OWNER)), -b"Requester" => Ok(Self::from_static(Payer::REQUESTER)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"BucketOwner" => Ok(Self::from_static(Payer::BUCKET_OWNER)), + b"Requester" => Ok(Self::from_static(Payer::REQUESTER)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Permission { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Permission { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"FULL_CONTROL" => Ok(Self::from_static(Permission::FULL_CONTROL)), -b"READ" => Ok(Self::from_static(Permission::READ)), -b"READ_ACP" => Ok(Self::from_static(Permission::READ_ACP)), -b"WRITE" => Ok(Self::from_static(Permission::WRITE)), -b"WRITE_ACP" => Ok(Self::from_static(Permission::WRITE_ACP)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"FULL_CONTROL" => Ok(Self::from_static(Permission::FULL_CONTROL)), + b"READ" => Ok(Self::from_static(Permission::READ)), + b"READ_ACP" => Ok(Self::from_static(Permission::READ_ACP)), + b"WRITE" => Ok(Self::from_static(Permission::WRITE)), + b"WRITE_ACP" => Ok(Self::from_static(Permission::WRITE_ACP)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for PolicyStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.is_public { -s.content("IsPublic", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.is_public { + s.content("IsPublic", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for PolicyStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut is_public: Option = None; -d.for_each_element(|d, x| match x { -b"IsPublic" => { -if is_public.is_some() { return Err(DeError::DuplicateField); } -is_public = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -is_public, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut is_public: Option = None; + d.for_each_element(|d, x| match x { + b"IsPublic" => { + if is_public.is_some() { + return Err(DeError::DuplicateField); + } + is_public = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { is_public }) + } } impl SerializeContent for Progress { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bytes_processed { -s.content("BytesProcessed", val)?; -} -if let Some(ref val) = self.bytes_returned { -s.content("BytesReturned", val)?; -} -if let Some(ref val) = self.bytes_scanned { -s.content("BytesScanned", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bytes_processed { + s.content("BytesProcessed", val)?; + } + if let Some(ref val) = self.bytes_returned { + s.content("BytesReturned", val)?; + } + if let Some(ref val) = self.bytes_scanned { + s.content("BytesScanned", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Progress { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bytes_processed: Option = None; -let mut bytes_returned: Option = None; -let mut bytes_scanned: Option = None; -d.for_each_element(|d, x| match x { -b"BytesProcessed" => { -if bytes_processed.is_some() { return Err(DeError::DuplicateField); } -bytes_processed = Some(d.content()?); -Ok(()) -} -b"BytesReturned" => { -if bytes_returned.is_some() { return Err(DeError::DuplicateField); } -bytes_returned = Some(d.content()?); -Ok(()) -} -b"BytesScanned" => { -if bytes_scanned.is_some() { return Err(DeError::DuplicateField); } -bytes_scanned = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bytes_processed, -bytes_returned, -bytes_scanned, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bytes_processed: Option = None; + let mut bytes_returned: Option = None; + let mut bytes_scanned: Option = None; + d.for_each_element(|d, x| match x { + b"BytesProcessed" => { + if bytes_processed.is_some() { + return Err(DeError::DuplicateField); + } + bytes_processed = Some(d.content()?); + Ok(()) + } + b"BytesReturned" => { + if bytes_returned.is_some() { + return Err(DeError::DuplicateField); + } + bytes_returned = Some(d.content()?); + Ok(()) + } + b"BytesScanned" => { + if bytes_scanned.is_some() { + return Err(DeError::DuplicateField); + } + bytes_scanned = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bytes_processed, + bytes_returned, + bytes_scanned, + }) + } } impl SerializeContent for Protocol { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Protocol { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"http" => Ok(Self::from_static(Protocol::HTTP)), -b"https" => Ok(Self::from_static(Protocol::HTTPS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"http" => Ok(Self::from_static(Protocol::HTTP)), + b"https" => Ok(Self::from_static(Protocol::HTTPS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for PublicAccessBlockConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.block_public_acls { -s.content("BlockPublicAcls", val)?; -} -if let Some(ref val) = self.block_public_policy { -s.content("BlockPublicPolicy", val)?; -} -if let Some(ref val) = self.ignore_public_acls { -s.content("IgnorePublicAcls", val)?; -} -if let Some(ref val) = self.restrict_public_buckets { -s.content("RestrictPublicBuckets", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.block_public_acls { + s.content("BlockPublicAcls", val)?; + } + if let Some(ref val) = self.block_public_policy { + s.content("BlockPublicPolicy", val)?; + } + if let Some(ref val) = self.ignore_public_acls { + s.content("IgnorePublicAcls", val)?; + } + if let Some(ref val) = self.restrict_public_buckets { + s.content("RestrictPublicBuckets", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for PublicAccessBlockConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut block_public_acls: Option = None; -let mut block_public_policy: Option = None; -let mut ignore_public_acls: Option = None; -let mut restrict_public_buckets: Option = None; -d.for_each_element(|d, x| match x { -b"BlockPublicAcls" => { -if block_public_acls.is_some() { return Err(DeError::DuplicateField); } -block_public_acls = Some(d.content()?); -Ok(()) -} -b"BlockPublicPolicy" => { -if block_public_policy.is_some() { return Err(DeError::DuplicateField); } -block_public_policy = Some(d.content()?); -Ok(()) -} -b"IgnorePublicAcls" => { -if ignore_public_acls.is_some() { return Err(DeError::DuplicateField); } -ignore_public_acls = Some(d.content()?); -Ok(()) -} -b"RestrictPublicBuckets" => { -if restrict_public_buckets.is_some() { return Err(DeError::DuplicateField); } -restrict_public_buckets = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -block_public_acls, -block_public_policy, -ignore_public_acls, -restrict_public_buckets, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut block_public_acls: Option = None; + let mut block_public_policy: Option = None; + let mut ignore_public_acls: Option = None; + let mut restrict_public_buckets: Option = None; + d.for_each_element(|d, x| match x { + b"BlockPublicAcls" => { + if block_public_acls.is_some() { + return Err(DeError::DuplicateField); + } + block_public_acls = Some(d.content()?); + Ok(()) + } + b"BlockPublicPolicy" => { + if block_public_policy.is_some() { + return Err(DeError::DuplicateField); + } + block_public_policy = Some(d.content()?); + Ok(()) + } + b"IgnorePublicAcls" => { + if ignore_public_acls.is_some() { + return Err(DeError::DuplicateField); + } + ignore_public_acls = Some(d.content()?); + Ok(()) + } + b"RestrictPublicBuckets" => { + if restrict_public_buckets.is_some() { + return Err(DeError::DuplicateField); + } + restrict_public_buckets = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + block_public_acls, + block_public_policy, + ignore_public_acls, + restrict_public_buckets, + }) + } } impl SerializeContent for QueueConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.events; -s.flattened_list("Event", iter)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("Id", val)?; -} -s.content("Queue", &self.queue_arn)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.events; + s.flattened_list("Event", iter)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("Id", val)?; + } + s.content("Queue", &self.queue_arn)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for QueueConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut events: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut queue_arn: Option = None; -d.for_each_element(|d, x| match x { -b"Event" => { -let ans: Event = d.content()?; -events.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"Queue" => { -if queue_arn.is_some() { return Err(DeError::DuplicateField); } -queue_arn = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -events: events.ok_or(DeError::MissingField)?, -filter, -id, -queue_arn: queue_arn.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut events: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut queue_arn: Option = None; + d.for_each_element(|d, x| match x { + b"Event" => { + let ans: Event = d.content()?; + events.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"Queue" => { + if queue_arn.is_some() { + return Err(DeError::DuplicateField); + } + queue_arn = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + events: events.ok_or(DeError::MissingField)?, + filter, + id, + queue_arn: queue_arn.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for QuoteFields { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for QuoteFields { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"ALWAYS" => Ok(Self::from_static(QuoteFields::ALWAYS)), -b"ASNEEDED" => Ok(Self::from_static(QuoteFields::ASNEEDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"ALWAYS" => Ok(Self::from_static(QuoteFields::ALWAYS)), + b"ASNEEDED" => Ok(Self::from_static(QuoteFields::ASNEEDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Redirect { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.host_name { -s.content("HostName", val)?; -} -if let Some(ref val) = self.http_redirect_code { -s.content("HttpRedirectCode", val)?; -} -if let Some(ref val) = self.protocol { -s.content("Protocol", val)?; -} -if let Some(ref val) = self.replace_key_prefix_with { -s.content("ReplaceKeyPrefixWith", val)?; -} -if let Some(ref val) = self.replace_key_with { -s.content("ReplaceKeyWith", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.host_name { + s.content("HostName", val)?; + } + if let Some(ref val) = self.http_redirect_code { + s.content("HttpRedirectCode", val)?; + } + if let Some(ref val) = self.protocol { + s.content("Protocol", val)?; + } + if let Some(ref val) = self.replace_key_prefix_with { + s.content("ReplaceKeyPrefixWith", val)?; + } + if let Some(ref val) = self.replace_key_with { + s.content("ReplaceKeyWith", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Redirect { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut host_name: Option = None; -let mut http_redirect_code: Option = None; -let mut protocol: Option = None; -let mut replace_key_prefix_with: Option = None; -let mut replace_key_with: Option = None; -d.for_each_element(|d, x| match x { -b"HostName" => { -if host_name.is_some() { return Err(DeError::DuplicateField); } -host_name = Some(d.content()?); -Ok(()) -} -b"HttpRedirectCode" => { -if http_redirect_code.is_some() { return Err(DeError::DuplicateField); } -http_redirect_code = Some(d.content()?); -Ok(()) -} -b"Protocol" => { -if protocol.is_some() { return Err(DeError::DuplicateField); } -protocol = Some(d.content()?); -Ok(()) -} -b"ReplaceKeyPrefixWith" => { -if replace_key_prefix_with.is_some() { return Err(DeError::DuplicateField); } -replace_key_prefix_with = Some(d.content()?); -Ok(()) -} -b"ReplaceKeyWith" => { -if replace_key_with.is_some() { return Err(DeError::DuplicateField); } -replace_key_with = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -host_name, -http_redirect_code, -protocol, -replace_key_prefix_with, -replace_key_with, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut host_name: Option = None; + let mut http_redirect_code: Option = None; + let mut protocol: Option = None; + let mut replace_key_prefix_with: Option = None; + let mut replace_key_with: Option = None; + d.for_each_element(|d, x| match x { + b"HostName" => { + if host_name.is_some() { + return Err(DeError::DuplicateField); + } + host_name = Some(d.content()?); + Ok(()) + } + b"HttpRedirectCode" => { + if http_redirect_code.is_some() { + return Err(DeError::DuplicateField); + } + http_redirect_code = Some(d.content()?); + Ok(()) + } + b"Protocol" => { + if protocol.is_some() { + return Err(DeError::DuplicateField); + } + protocol = Some(d.content()?); + Ok(()) + } + b"ReplaceKeyPrefixWith" => { + if replace_key_prefix_with.is_some() { + return Err(DeError::DuplicateField); + } + replace_key_prefix_with = Some(d.content()?); + Ok(()) + } + b"ReplaceKeyWith" => { + if replace_key_with.is_some() { + return Err(DeError::DuplicateField); + } + replace_key_with = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + host_name, + http_redirect_code, + protocol, + replace_key_prefix_with, + replace_key_with, + }) + } } impl SerializeContent for RedirectAllRequestsTo { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("HostName", &self.host_name)?; -if let Some(ref val) = self.protocol { -s.content("Protocol", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("HostName", &self.host_name)?; + if let Some(ref val) = self.protocol { + s.content("Protocol", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RedirectAllRequestsTo { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut host_name: Option = None; -let mut protocol: Option = None; -d.for_each_element(|d, x| match x { -b"HostName" => { -if host_name.is_some() { return Err(DeError::DuplicateField); } -host_name = Some(d.content()?); -Ok(()) -} -b"Protocol" => { -if protocol.is_some() { return Err(DeError::DuplicateField); } -protocol = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -host_name: host_name.ok_or(DeError::MissingField)?, -protocol, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut host_name: Option = None; + let mut protocol: Option = None; + d.for_each_element(|d, x| match x { + b"HostName" => { + if host_name.is_some() { + return Err(DeError::DuplicateField); + } + host_name = Some(d.content()?); + Ok(()) + } + b"Protocol" => { + if protocol.is_some() { + return Err(DeError::DuplicateField); + } + protocol = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + host_name: host_name.ok_or(DeError::MissingField)?, + protocol, + }) + } } impl SerializeContent for ReplicaModifications { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicaModifications { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ReplicaModificationsStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} -} -impl<'xml> DeserializeContent<'xml> for ReplicaModificationsStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ReplicaModificationsStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ReplicaModificationsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) } -}) -} -} -impl SerializeContent for ReplicationConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Role", &self.role)?; -{ -let iter = &self.rules; -s.flattened_list("Rule", iter)?; -} -Ok(()) -} -} - -impl<'xml> DeserializeContent<'xml> for ReplicationConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut role: Option = None; -let mut rules: Option = None; -d.for_each_element(|d, x| match x { -b"Role" => { -if role.is_some() { return Err(DeError::DuplicateField); } -role = Some(d.content()?); -Ok(()) -} -b"Rule" => { -let ans: ReplicationRule = d.content()?; -rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -role: role.ok_or(DeError::MissingField)?, -rules: rules.ok_or(DeError::MissingField)?, -}) -} -} -impl SerializeContent for ReplicationRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.delete_marker_replication { -s.content("DeleteMarkerReplication", val)?; -} -s.content("Destination", &self.destination)?; -if let Some(ref val) = self.existing_object_replication { -s.content("ExistingObjectReplication", val)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; } -if let Some(ref val) = self.priority { -s.content("Priority", val)?; +impl<'xml> DeserializeContent<'xml> for ReplicaModificationsStatus { + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ReplicaModificationsStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ReplicaModificationsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } -if let Some(ref val) = self.source_selection_criteria { -s.content("SourceSelectionCriteria", val)?; +impl SerializeContent for ReplicationConfiguration { + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Role", &self.role)?; + { + let iter = &self.rules; + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } -s.content("Status", &self.status)?; -Ok(()) + +impl<'xml> DeserializeContent<'xml> for ReplicationConfiguration { + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut role: Option = None; + let mut rules: Option = None; + d.for_each_element(|d, x| match x { + b"Role" => { + if role.is_some() { + return Err(DeError::DuplicateField); + } + role = Some(d.content()?); + Ok(()) + } + b"Rule" => { + let ans: ReplicationRule = d.content()?; + rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + role: role.ok_or(DeError::MissingField)?, + rules: rules.ok_or(DeError::MissingField)?, + }) + } } +impl SerializeContent for ReplicationRule { + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.delete_marker_replication { + s.content("DeleteMarkerReplication", val)?; + } + s.content("Destination", &self.destination)?; + if let Some(ref val) = self.existing_object_replication { + s.content("ExistingObjectReplication", val)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.priority { + s.content("Priority", val)?; + } + if let Some(ref val) = self.source_selection_criteria { + s.content("SourceSelectionCriteria", val)?; + } + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut delete_marker_replication: Option = None; -let mut destination: Option = None; -let mut existing_object_replication: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut prefix: Option = None; -let mut priority: Option = None; -let mut source_selection_criteria: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"DeleteMarkerReplication" => { -if delete_marker_replication.is_some() { return Err(DeError::DuplicateField); } -delete_marker_replication = Some(d.content()?); -Ok(()) -} -b"Destination" => { -if destination.is_some() { return Err(DeError::DuplicateField); } -destination = Some(d.content()?); -Ok(()) -} -b"ExistingObjectReplication" => { -if existing_object_replication.is_some() { return Err(DeError::DuplicateField); } -existing_object_replication = Some(d.content()?); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Priority" => { -if priority.is_some() { return Err(DeError::DuplicateField); } -priority = Some(d.content()?); -Ok(()) -} -b"SourceSelectionCriteria" => { -if source_selection_criteria.is_some() { return Err(DeError::DuplicateField); } -source_selection_criteria = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -delete_marker_replication, -destination: destination.ok_or(DeError::MissingField)?, -existing_object_replication, -filter, -id, -prefix, -priority, -source_selection_criteria, -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut delete_marker_replication: Option = None; + let mut destination: Option = None; + let mut existing_object_replication: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut prefix: Option = None; + let mut priority: Option = None; + let mut source_selection_criteria: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"DeleteMarkerReplication" => { + if delete_marker_replication.is_some() { + return Err(DeError::DuplicateField); + } + delete_marker_replication = Some(d.content()?); + Ok(()) + } + b"Destination" => { + if destination.is_some() { + return Err(DeError::DuplicateField); + } + destination = Some(d.content()?); + Ok(()) + } + b"ExistingObjectReplication" => { + if existing_object_replication.is_some() { + return Err(DeError::DuplicateField); + } + existing_object_replication = Some(d.content()?); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Priority" => { + if priority.is_some() { + return Err(DeError::DuplicateField); + } + priority = Some(d.content()?); + Ok(()) + } + b"SourceSelectionCriteria" => { + if source_selection_criteria.is_some() { + return Err(DeError::DuplicateField); + } + source_selection_criteria = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + delete_marker_replication, + destination: destination.ok_or(DeError::MissingField)?, + existing_object_replication, + filter, + id, + prefix, + priority, + source_selection_criteria, + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ReplicationRuleAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationRuleAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix, tags }) + } } impl SerializeContent for ReplicationRuleFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.and { -s.content("And", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.tag { -s.content("Tag", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.and { + s.content("And", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.tag { + s.content("Tag", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationRuleFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut and: Option = None; -let mut prefix: Option = None; -let mut tag: Option = None; -d.for_each_element(|d, x| match x { -b"And" => { -if and.is_some() { return Err(DeError::DuplicateField); } -and = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -if tag.is_some() { return Err(DeError::DuplicateField); } -tag = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -and, -prefix, -tag, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut and: Option = None; + let mut prefix: Option = None; + let mut tag: Option = None; + d.for_each_element(|d, x| match x { + b"And" => { + if and.is_some() { + return Err(DeError::DuplicateField); + } + and = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + if tag.is_some() { + return Err(DeError::DuplicateField); + } + tag = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { and, prefix, tag }) + } } impl SerializeContent for ReplicationRuleStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ReplicationRuleStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ReplicationRuleStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ReplicationRuleStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ReplicationRuleStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ReplicationRuleStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ReplicationTime { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -s.content("Time", &self.time)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + s.content("Time", &self.time)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationTime { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -let mut time: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -b"Time" => { -if time.is_some() { return Err(DeError::DuplicateField); } -time = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -time: time.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + let mut time: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + b"Time" => { + if time.is_some() { + return Err(DeError::DuplicateField); + } + time = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + time: time.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ReplicationTimeStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ReplicationTimeStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ReplicationTimeStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ReplicationTimeStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ReplicationTimeStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ReplicationTimeStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ReplicationTimeValue { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.minutes { -s.content("Minutes", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.minutes { + s.content("Minutes", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationTimeValue { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut minutes: Option = None; -d.for_each_element(|d, x| match x { -b"Minutes" => { -if minutes.is_some() { return Err(DeError::DuplicateField); } -minutes = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -minutes, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut minutes: Option = None; + d.for_each_element(|d, x| match x { + b"Minutes" => { + if minutes.is_some() { + return Err(DeError::DuplicateField); + } + minutes = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { minutes }) + } } impl SerializeContent for RequestPaymentConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Payer", &self.payer)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Payer", &self.payer)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RequestPaymentConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut payer: Option = None; -d.for_each_element(|d, x| match x { -b"Payer" => { -if payer.is_some() { return Err(DeError::DuplicateField); } -payer = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -payer: payer.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut payer: Option = None; + d.for_each_element(|d, x| match x { + b"Payer" => { + if payer.is_some() { + return Err(DeError::DuplicateField); + } + payer = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + payer: payer.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for RequestProgress { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.enabled { -s.content("Enabled", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.enabled { + s.content("Enabled", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RequestProgress { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut enabled: Option = None; -d.for_each_element(|d, x| match x { -b"Enabled" => { -if enabled.is_some() { return Err(DeError::DuplicateField); } -enabled = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -enabled, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut enabled: Option = None; + d.for_each_element(|d, x| match x { + b"Enabled" => { + if enabled.is_some() { + return Err(DeError::DuplicateField); + } + enabled = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { enabled }) + } } impl SerializeContent for RestoreRequest { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -if let Some(ref val) = self.description { -s.content("Description", val)?; -} -if let Some(ref val) = self.glacier_job_parameters { -s.content("GlacierJobParameters", val)?; -} -if let Some(ref val) = self.output_location { -s.content("OutputLocation", val)?; -} -if let Some(ref val) = self.select_parameters { -s.content("SelectParameters", val)?; -} -if let Some(ref val) = self.tier { -s.content("Tier", val)?; -} -if let Some(ref val) = self.type_ { -s.content("Type", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + if let Some(ref val) = self.description { + s.content("Description", val)?; + } + if let Some(ref val) = self.glacier_job_parameters { + s.content("GlacierJobParameters", val)?; + } + if let Some(ref val) = self.output_location { + s.content("OutputLocation", val)?; + } + if let Some(ref val) = self.select_parameters { + s.content("SelectParameters", val)?; + } + if let Some(ref val) = self.tier { + s.content("Tier", val)?; + } + if let Some(ref val) = self.type_ { + s.content("Type", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RestoreRequest { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut days: Option = None; -let mut description: Option = None; -let mut glacier_job_parameters: Option = None; -let mut output_location: Option = None; -let mut select_parameters: Option = None; -let mut tier: Option = None; -let mut type_: Option = None; -d.for_each_element(|d, x| match x { -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -b"Description" => { -if description.is_some() { return Err(DeError::DuplicateField); } -description = Some(d.content()?); -Ok(()) -} -b"GlacierJobParameters" => { -if glacier_job_parameters.is_some() { return Err(DeError::DuplicateField); } -glacier_job_parameters = Some(d.content()?); -Ok(()) -} -b"OutputLocation" => { -if output_location.is_some() { return Err(DeError::DuplicateField); } -output_location = Some(d.content()?); -Ok(()) -} -b"SelectParameters" => { -if select_parameters.is_some() { return Err(DeError::DuplicateField); } -select_parameters = Some(d.content()?); -Ok(()) -} -b"Tier" => { -if tier.is_some() { return Err(DeError::DuplicateField); } -tier = Some(d.content()?); -Ok(()) -} -b"Type" => { -if type_.is_some() { return Err(DeError::DuplicateField); } -type_ = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -days, -description, -glacier_job_parameters, -output_location, -select_parameters, -tier, -type_, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut days: Option = None; + let mut description: Option = None; + let mut glacier_job_parameters: Option = None; + let mut output_location: Option = None; + let mut select_parameters: Option = None; + let mut tier: Option = None; + let mut type_: Option = None; + d.for_each_element(|d, x| match x { + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + b"Description" => { + if description.is_some() { + return Err(DeError::DuplicateField); + } + description = Some(d.content()?); + Ok(()) + } + b"GlacierJobParameters" => { + if glacier_job_parameters.is_some() { + return Err(DeError::DuplicateField); + } + glacier_job_parameters = Some(d.content()?); + Ok(()) + } + b"OutputLocation" => { + if output_location.is_some() { + return Err(DeError::DuplicateField); + } + output_location = Some(d.content()?); + Ok(()) + } + b"SelectParameters" => { + if select_parameters.is_some() { + return Err(DeError::DuplicateField); + } + select_parameters = Some(d.content()?); + Ok(()) + } + b"Tier" => { + if tier.is_some() { + return Err(DeError::DuplicateField); + } + tier = Some(d.content()?); + Ok(()) + } + b"Type" => { + if type_.is_some() { + return Err(DeError::DuplicateField); + } + type_ = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + days, + description, + glacier_job_parameters, + output_location, + select_parameters, + tier, + type_, + }) + } } impl SerializeContent for RestoreRequestType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for RestoreRequestType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"SELECT" => Ok(Self::from_static(RestoreRequestType::SELECT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"SELECT" => Ok(Self::from_static(RestoreRequestType::SELECT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for RestoreStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.is_restore_in_progress { -s.content("IsRestoreInProgress", val)?; -} -if let Some(ref val) = self.restore_expiry_date { -s.timestamp("RestoreExpiryDate", val, TimestampFormat::DateTime)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.is_restore_in_progress { + s.content("IsRestoreInProgress", val)?; + } + if let Some(ref val) = self.restore_expiry_date { + s.timestamp("RestoreExpiryDate", val, TimestampFormat::DateTime)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RestoreStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut is_restore_in_progress: Option = None; -let mut restore_expiry_date: Option = None; -d.for_each_element(|d, x| match x { -b"IsRestoreInProgress" => { -if is_restore_in_progress.is_some() { return Err(DeError::DuplicateField); } -is_restore_in_progress = Some(d.content()?); -Ok(()) -} -b"RestoreExpiryDate" => { -if restore_expiry_date.is_some() { return Err(DeError::DuplicateField); } -restore_expiry_date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -is_restore_in_progress, -restore_expiry_date, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut is_restore_in_progress: Option = None; + let mut restore_expiry_date: Option = None; + d.for_each_element(|d, x| match x { + b"IsRestoreInProgress" => { + if is_restore_in_progress.is_some() { + return Err(DeError::DuplicateField); + } + is_restore_in_progress = Some(d.content()?); + Ok(()) + } + b"RestoreExpiryDate" => { + if restore_expiry_date.is_some() { + return Err(DeError::DuplicateField); + } + restore_expiry_date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + is_restore_in_progress, + restore_expiry_date, + }) + } } impl SerializeContent for RoutingRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.condition { -s.content("Condition", val)?; -} -s.content("Redirect", &self.redirect)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.condition { + s.content("Condition", val)?; + } + s.content("Redirect", &self.redirect)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RoutingRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut condition: Option = None; -let mut redirect: Option = None; -d.for_each_element(|d, x| match x { -b"Condition" => { -if condition.is_some() { return Err(DeError::DuplicateField); } -condition = Some(d.content()?); -Ok(()) -} -b"Redirect" => { -if redirect.is_some() { return Err(DeError::DuplicateField); } -redirect = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -condition, -redirect: redirect.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut condition: Option = None; + let mut redirect: Option = None; + d.for_each_element(|d, x| match x { + b"Condition" => { + if condition.is_some() { + return Err(DeError::DuplicateField); + } + condition = Some(d.content()?); + Ok(()) + } + b"Redirect" => { + if redirect.is_some() { + return Err(DeError::DuplicateField); + } + redirect = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + condition, + redirect: redirect.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for S3KeyFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.filter_rules { -s.flattened_list("FilterRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.filter_rules { + s.flattened_list("FilterRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for S3KeyFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut filter_rules: Option = None; -d.for_each_element(|d, x| match x { -b"FilterRule" => { -let ans: FilterRule = d.content()?; -filter_rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -filter_rules, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut filter_rules: Option = None; + d.for_each_element(|d, x| match x { + b"FilterRule" => { + let ans: FilterRule = d.content()?; + filter_rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { filter_rules }) + } } impl SerializeContent for S3Location { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.access_control_list { -s.list("AccessControlList", "Grant", iter)?; -} -s.content("BucketName", &self.bucket_name)?; -if let Some(ref val) = self.canned_acl { -s.content("CannedACL", val)?; -} -if let Some(ref val) = self.encryption { -s.content("Encryption", val)?; -} -s.content("Prefix", &self.prefix)?; -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -if let Some(ref val) = self.tagging { -s.content("Tagging", val)?; -} -if let Some(iter) = &self.user_metadata { -s.list("UserMetadata", "MetadataEntry", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.access_control_list { + s.list("AccessControlList", "Grant", iter)?; + } + s.content("BucketName", &self.bucket_name)?; + if let Some(ref val) = self.canned_acl { + s.content("CannedACL", val)?; + } + if let Some(ref val) = self.encryption { + s.content("Encryption", val)?; + } + s.content("Prefix", &self.prefix)?; + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + if let Some(ref val) = self.tagging { + s.content("Tagging", val)?; + } + if let Some(iter) = &self.user_metadata { + s.list("UserMetadata", "MetadataEntry", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for S3Location { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_control_list: Option = None; -let mut bucket_name: Option = None; -let mut canned_acl: Option = None; -let mut encryption: Option = None; -let mut prefix: Option = None; -let mut storage_class: Option = None; -let mut tagging: Option = None; -let mut user_metadata: Option = None; -d.for_each_element(|d, x| match x { -b"AccessControlList" => { -if access_control_list.is_some() { return Err(DeError::DuplicateField); } -access_control_list = Some(d.list_content("Grant")?); -Ok(()) -} -b"BucketName" => { -if bucket_name.is_some() { return Err(DeError::DuplicateField); } -bucket_name = Some(d.content()?); -Ok(()) -} -b"CannedACL" => { -if canned_acl.is_some() { return Err(DeError::DuplicateField); } -canned_acl = Some(d.content()?); -Ok(()) -} -b"Encryption" => { -if encryption.is_some() { return Err(DeError::DuplicateField); } -encryption = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -b"Tagging" => { -if tagging.is_some() { return Err(DeError::DuplicateField); } -tagging = Some(d.content()?); -Ok(()) -} -b"UserMetadata" => { -if user_metadata.is_some() { return Err(DeError::DuplicateField); } -user_metadata = Some(d.list_content("MetadataEntry")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_control_list, -bucket_name: bucket_name.ok_or(DeError::MissingField)?, -canned_acl, -encryption, -prefix: prefix.ok_or(DeError::MissingField)?, -storage_class, -tagging, -user_metadata, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_control_list: Option = None; + let mut bucket_name: Option = None; + let mut canned_acl: Option = None; + let mut encryption: Option = None; + let mut prefix: Option = None; + let mut storage_class: Option = None; + let mut tagging: Option = None; + let mut user_metadata: Option = None; + d.for_each_element(|d, x| match x { + b"AccessControlList" => { + if access_control_list.is_some() { + return Err(DeError::DuplicateField); + } + access_control_list = Some(d.list_content("Grant")?); + Ok(()) + } + b"BucketName" => { + if bucket_name.is_some() { + return Err(DeError::DuplicateField); + } + bucket_name = Some(d.content()?); + Ok(()) + } + b"CannedACL" => { + if canned_acl.is_some() { + return Err(DeError::DuplicateField); + } + canned_acl = Some(d.content()?); + Ok(()) + } + b"Encryption" => { + if encryption.is_some() { + return Err(DeError::DuplicateField); + } + encryption = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + b"Tagging" => { + if tagging.is_some() { + return Err(DeError::DuplicateField); + } + tagging = Some(d.content()?); + Ok(()) + } + b"UserMetadata" => { + if user_metadata.is_some() { + return Err(DeError::DuplicateField); + } + user_metadata = Some(d.list_content("MetadataEntry")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_control_list, + bucket_name: bucket_name.ok_or(DeError::MissingField)?, + canned_acl, + encryption, + prefix: prefix.ok_or(DeError::MissingField)?, + storage_class, + tagging, + user_metadata, + }) + } } impl SerializeContent for S3TablesDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("TableBucketArn", &self.table_bucket_arn)?; -s.content("TableName", &self.table_name)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("TableBucketArn", &self.table_bucket_arn)?; + s.content("TableName", &self.table_name)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for S3TablesDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut table_bucket_arn: Option = None; -let mut table_name: Option = None; -d.for_each_element(|d, x| match x { -b"TableBucketArn" => { -if table_bucket_arn.is_some() { return Err(DeError::DuplicateField); } -table_bucket_arn = Some(d.content()?); -Ok(()) -} -b"TableName" => { -if table_name.is_some() { return Err(DeError::DuplicateField); } -table_name = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, -table_name: table_name.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut table_bucket_arn: Option = None; + let mut table_name: Option = None; + d.for_each_element(|d, x| match x { + b"TableBucketArn" => { + if table_bucket_arn.is_some() { + return Err(DeError::DuplicateField); + } + table_bucket_arn = Some(d.content()?); + Ok(()) + } + b"TableName" => { + if table_name.is_some() { + return Err(DeError::DuplicateField); + } + table_name = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, + table_name: table_name.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for S3TablesDestinationResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("TableArn", &self.table_arn)?; -s.content("TableBucketArn", &self.table_bucket_arn)?; -s.content("TableName", &self.table_name)?; -s.content("TableNamespace", &self.table_namespace)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("TableArn", &self.table_arn)?; + s.content("TableBucketArn", &self.table_bucket_arn)?; + s.content("TableName", &self.table_name)?; + s.content("TableNamespace", &self.table_namespace)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for S3TablesDestinationResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut table_arn: Option = None; -let mut table_bucket_arn: Option = None; -let mut table_name: Option = None; -let mut table_namespace: Option = None; -d.for_each_element(|d, x| match x { -b"TableArn" => { -if table_arn.is_some() { return Err(DeError::DuplicateField); } -table_arn = Some(d.content()?); -Ok(()) -} -b"TableBucketArn" => { -if table_bucket_arn.is_some() { return Err(DeError::DuplicateField); } -table_bucket_arn = Some(d.content()?); -Ok(()) -} -b"TableName" => { -if table_name.is_some() { return Err(DeError::DuplicateField); } -table_name = Some(d.content()?); -Ok(()) -} -b"TableNamespace" => { -if table_namespace.is_some() { return Err(DeError::DuplicateField); } -table_namespace = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -table_arn: table_arn.ok_or(DeError::MissingField)?, -table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, -table_name: table_name.ok_or(DeError::MissingField)?, -table_namespace: table_namespace.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut table_arn: Option = None; + let mut table_bucket_arn: Option = None; + let mut table_name: Option = None; + let mut table_namespace: Option = None; + d.for_each_element(|d, x| match x { + b"TableArn" => { + if table_arn.is_some() { + return Err(DeError::DuplicateField); + } + table_arn = Some(d.content()?); + Ok(()) + } + b"TableBucketArn" => { + if table_bucket_arn.is_some() { + return Err(DeError::DuplicateField); + } + table_bucket_arn = Some(d.content()?); + Ok(()) + } + b"TableName" => { + if table_name.is_some() { + return Err(DeError::DuplicateField); + } + table_name = Some(d.content()?); + Ok(()) + } + b"TableNamespace" => { + if table_namespace.is_some() { + return Err(DeError::DuplicateField); + } + table_namespace = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + table_arn: table_arn.ok_or(DeError::MissingField)?, + table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, + table_name: table_name.ok_or(DeError::MissingField)?, + table_namespace: table_namespace.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for SSEKMS { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("KeyId", &self.key_id)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("KeyId", &self.key_id)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SSEKMS { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut key_id: Option = None; -d.for_each_element(|d, x| match x { -b"KeyId" => { -if key_id.is_some() { return Err(DeError::DuplicateField); } -key_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -key_id: key_id.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut key_id: Option = None; + d.for_each_element(|d, x| match x { + b"KeyId" => { + if key_id.is_some() { + return Err(DeError::DuplicateField); + } + key_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + key_id: key_id.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for SSES3 { -fn serialize_content(&self, _: &mut Serializer) -> SerResult { -Ok(()) -} + fn serialize_content(&self, _: &mut Serializer) -> SerResult { + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SSES3 { -fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { -Ok(Self { -}) -} + fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { + Ok(Self {}) + } } impl SerializeContent for ScanRange { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.end { -s.content("End", val)?; -} -if let Some(ref val) = self.start { -s.content("Start", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.end { + s.content("End", val)?; + } + if let Some(ref val) = self.start { + s.content("Start", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ScanRange { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut end: Option = None; -let mut start: Option = None; -d.for_each_element(|d, x| match x { -b"End" => { -if end.is_some() { return Err(DeError::DuplicateField); } -end = Some(d.content()?); -Ok(()) -} -b"Start" => { -if start.is_some() { return Err(DeError::DuplicateField); } -start = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -end, -start, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut end: Option = None; + let mut start: Option = None; + d.for_each_element(|d, x| match x { + b"End" => { + if end.is_some() { + return Err(DeError::DuplicateField); + } + end = Some(d.content()?); + Ok(()) + } + b"Start" => { + if start.is_some() { + return Err(DeError::DuplicateField); + } + start = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { end, start }) + } } impl SerializeContent for SelectObjectContentRequest { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Expression", &self.expression)?; -s.content("ExpressionType", &self.expression_type)?; -s.content("InputSerialization", &self.input_serialization)?; -s.content("OutputSerialization", &self.output_serialization)?; -if let Some(ref val) = self.request_progress { -s.content("RequestProgress", val)?; -} -if let Some(ref val) = self.scan_range { -s.content("ScanRange", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Expression", &self.expression)?; + s.content("ExpressionType", &self.expression_type)?; + s.content("InputSerialization", &self.input_serialization)?; + s.content("OutputSerialization", &self.output_serialization)?; + if let Some(ref val) = self.request_progress { + s.content("RequestProgress", val)?; + } + if let Some(ref val) = self.scan_range { + s.content("ScanRange", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SelectObjectContentRequest { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut expression: Option = None; -let mut expression_type: Option = None; -let mut input_serialization: Option = None; -let mut output_serialization: Option = None; -let mut request_progress: Option = None; -let mut scan_range: Option = None; -d.for_each_element(|d, x| match x { -b"Expression" => { -if expression.is_some() { return Err(DeError::DuplicateField); } -expression = Some(d.content()?); -Ok(()) -} -b"ExpressionType" => { -if expression_type.is_some() { return Err(DeError::DuplicateField); } -expression_type = Some(d.content()?); -Ok(()) -} -b"InputSerialization" => { -if input_serialization.is_some() { return Err(DeError::DuplicateField); } -input_serialization = Some(d.content()?); -Ok(()) -} -b"OutputSerialization" => { -if output_serialization.is_some() { return Err(DeError::DuplicateField); } -output_serialization = Some(d.content()?); -Ok(()) -} -b"RequestProgress" => { -if request_progress.is_some() { return Err(DeError::DuplicateField); } -request_progress = Some(d.content()?); -Ok(()) -} -b"ScanRange" => { -if scan_range.is_some() { return Err(DeError::DuplicateField); } -scan_range = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -expression: expression.ok_or(DeError::MissingField)?, -expression_type: expression_type.ok_or(DeError::MissingField)?, -input_serialization: input_serialization.ok_or(DeError::MissingField)?, -output_serialization: output_serialization.ok_or(DeError::MissingField)?, -request_progress, -scan_range, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut expression: Option = None; + let mut expression_type: Option = None; + let mut input_serialization: Option = None; + let mut output_serialization: Option = None; + let mut request_progress: Option = None; + let mut scan_range: Option = None; + d.for_each_element(|d, x| match x { + b"Expression" => { + if expression.is_some() { + return Err(DeError::DuplicateField); + } + expression = Some(d.content()?); + Ok(()) + } + b"ExpressionType" => { + if expression_type.is_some() { + return Err(DeError::DuplicateField); + } + expression_type = Some(d.content()?); + Ok(()) + } + b"InputSerialization" => { + if input_serialization.is_some() { + return Err(DeError::DuplicateField); + } + input_serialization = Some(d.content()?); + Ok(()) + } + b"OutputSerialization" => { + if output_serialization.is_some() { + return Err(DeError::DuplicateField); + } + output_serialization = Some(d.content()?); + Ok(()) + } + b"RequestProgress" => { + if request_progress.is_some() { + return Err(DeError::DuplicateField); + } + request_progress = Some(d.content()?); + Ok(()) + } + b"ScanRange" => { + if scan_range.is_some() { + return Err(DeError::DuplicateField); + } + scan_range = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + expression: expression.ok_or(DeError::MissingField)?, + expression_type: expression_type.ok_or(DeError::MissingField)?, + input_serialization: input_serialization.ok_or(DeError::MissingField)?, + output_serialization: output_serialization.ok_or(DeError::MissingField)?, + request_progress, + scan_range, + }) + } } impl SerializeContent for SelectParameters { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Expression", &self.expression)?; -s.content("ExpressionType", &self.expression_type)?; -s.content("InputSerialization", &self.input_serialization)?; -s.content("OutputSerialization", &self.output_serialization)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Expression", &self.expression)?; + s.content("ExpressionType", &self.expression_type)?; + s.content("InputSerialization", &self.input_serialization)?; + s.content("OutputSerialization", &self.output_serialization)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SelectParameters { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut expression: Option = None; -let mut expression_type: Option = None; -let mut input_serialization: Option = None; -let mut output_serialization: Option = None; -d.for_each_element(|d, x| match x { -b"Expression" => { -if expression.is_some() { return Err(DeError::DuplicateField); } -expression = Some(d.content()?); -Ok(()) -} -b"ExpressionType" => { -if expression_type.is_some() { return Err(DeError::DuplicateField); } -expression_type = Some(d.content()?); -Ok(()) -} -b"InputSerialization" => { -if input_serialization.is_some() { return Err(DeError::DuplicateField); } -input_serialization = Some(d.content()?); -Ok(()) -} -b"OutputSerialization" => { -if output_serialization.is_some() { return Err(DeError::DuplicateField); } -output_serialization = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -expression: expression.ok_or(DeError::MissingField)?, -expression_type: expression_type.ok_or(DeError::MissingField)?, -input_serialization: input_serialization.ok_or(DeError::MissingField)?, -output_serialization: output_serialization.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut expression: Option = None; + let mut expression_type: Option = None; + let mut input_serialization: Option = None; + let mut output_serialization: Option = None; + d.for_each_element(|d, x| match x { + b"Expression" => { + if expression.is_some() { + return Err(DeError::DuplicateField); + } + expression = Some(d.content()?); + Ok(()) + } + b"ExpressionType" => { + if expression_type.is_some() { + return Err(DeError::DuplicateField); + } + expression_type = Some(d.content()?); + Ok(()) + } + b"InputSerialization" => { + if input_serialization.is_some() { + return Err(DeError::DuplicateField); + } + input_serialization = Some(d.content()?); + Ok(()) + } + b"OutputSerialization" => { + if output_serialization.is_some() { + return Err(DeError::DuplicateField); + } + output_serialization = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + expression: expression.ok_or(DeError::MissingField)?, + expression_type: expression_type.ok_or(DeError::MissingField)?, + input_serialization: input_serialization.ok_or(DeError::MissingField)?, + output_serialization: output_serialization.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ServerSideEncryption { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ServerSideEncryption { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"AES256" => Ok(Self::from_static(ServerSideEncryption::AES256)), -b"aws:kms" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS)), -b"aws:kms:dsse" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS_DSSE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"AES256" => Ok(Self::from_static(ServerSideEncryption::AES256)), + b"aws:kms" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS)), + b"aws:kms:dsse" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS_DSSE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ServerSideEncryptionByDefault { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.kms_master_key_id { -s.content("KMSMasterKeyID", val)?; -} -s.content("SSEAlgorithm", &self.sse_algorithm)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.kms_master_key_id { + s.content("KMSMasterKeyID", val)?; + } + s.content("SSEAlgorithm", &self.sse_algorithm)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionByDefault { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut kms_master_key_id: Option = None; -let mut sse_algorithm: Option = None; -d.for_each_element(|d, x| match x { -b"KMSMasterKeyID" => { -if kms_master_key_id.is_some() { return Err(DeError::DuplicateField); } -kms_master_key_id = Some(d.content()?); -Ok(()) -} -b"SSEAlgorithm" => { -if sse_algorithm.is_some() { return Err(DeError::DuplicateField); } -sse_algorithm = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -kms_master_key_id, -sse_algorithm: sse_algorithm.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut kms_master_key_id: Option = None; + let mut sse_algorithm: Option = None; + d.for_each_element(|d, x| match x { + b"KMSMasterKeyID" => { + if kms_master_key_id.is_some() { + return Err(DeError::DuplicateField); + } + kms_master_key_id = Some(d.content()?); + Ok(()) + } + b"SSEAlgorithm" => { + if sse_algorithm.is_some() { + return Err(DeError::DuplicateField); + } + sse_algorithm = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + kms_master_key_id, + sse_algorithm: sse_algorithm.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ServerSideEncryptionConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.rules; -s.flattened_list("Rule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.rules; + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut rules: Option = None; -d.for_each_element(|d, x| match x { -b"Rule" => { -let ans: ServerSideEncryptionRule = d.content()?; -rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -rules: rules.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut rules: Option = None; + d.for_each_element(|d, x| match x { + b"Rule" => { + let ans: ServerSideEncryptionRule = d.content()?; + rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + rules: rules.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ServerSideEncryptionRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.apply_server_side_encryption_by_default { -s.content("ApplyServerSideEncryptionByDefault", val)?; -} -if let Some(ref val) = self.bucket_key_enabled { -s.content("BucketKeyEnabled", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.apply_server_side_encryption_by_default { + s.content("ApplyServerSideEncryptionByDefault", val)?; + } + if let Some(ref val) = self.bucket_key_enabled { + s.content("BucketKeyEnabled", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut apply_server_side_encryption_by_default: Option = None; -let mut bucket_key_enabled: Option = None; -d.for_each_element(|d, x| match x { -b"ApplyServerSideEncryptionByDefault" => { -if apply_server_side_encryption_by_default.is_some() { return Err(DeError::DuplicateField); } -apply_server_side_encryption_by_default = Some(d.content()?); -Ok(()) -} -b"BucketKeyEnabled" => { -if bucket_key_enabled.is_some() { return Err(DeError::DuplicateField); } -bucket_key_enabled = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -apply_server_side_encryption_by_default, -bucket_key_enabled, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut apply_server_side_encryption_by_default: Option = None; + let mut bucket_key_enabled: Option = None; + d.for_each_element(|d, x| match x { + b"ApplyServerSideEncryptionByDefault" => { + if apply_server_side_encryption_by_default.is_some() { + return Err(DeError::DuplicateField); + } + apply_server_side_encryption_by_default = Some(d.content()?); + Ok(()) + } + b"BucketKeyEnabled" => { + if bucket_key_enabled.is_some() { + return Err(DeError::DuplicateField); + } + bucket_key_enabled = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + apply_server_side_encryption_by_default, + bucket_key_enabled, + }) + } } impl SerializeContent for SessionCredentials { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("AccessKeyId", &self.access_key_id)?; -s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; -s.content("SecretAccessKey", &self.secret_access_key)?; -s.content("SessionToken", &self.session_token)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("AccessKeyId", &self.access_key_id)?; + s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; + s.content("SecretAccessKey", &self.secret_access_key)?; + s.content("SessionToken", &self.session_token)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SessionCredentials { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_key_id: Option = None; -let mut expiration: Option = None; -let mut secret_access_key: Option = None; -let mut session_token: Option = None; -d.for_each_element(|d, x| match x { -b"AccessKeyId" => { -if access_key_id.is_some() { return Err(DeError::DuplicateField); } -access_key_id = Some(d.content()?); -Ok(()) -} -b"Expiration" => { -if expiration.is_some() { return Err(DeError::DuplicateField); } -expiration = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"SecretAccessKey" => { -if secret_access_key.is_some() { return Err(DeError::DuplicateField); } -secret_access_key = Some(d.content()?); -Ok(()) -} -b"SessionToken" => { -if session_token.is_some() { return Err(DeError::DuplicateField); } -session_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_key_id: access_key_id.ok_or(DeError::MissingField)?, -expiration: expiration.ok_or(DeError::MissingField)?, -secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, -session_token: session_token.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_key_id: Option = None; + let mut expiration: Option = None; + let mut secret_access_key: Option = None; + let mut session_token: Option = None; + d.for_each_element(|d, x| match x { + b"AccessKeyId" => { + if access_key_id.is_some() { + return Err(DeError::DuplicateField); + } + access_key_id = Some(d.content()?); + Ok(()) + } + b"Expiration" => { + if expiration.is_some() { + return Err(DeError::DuplicateField); + } + expiration = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"SecretAccessKey" => { + if secret_access_key.is_some() { + return Err(DeError::DuplicateField); + } + secret_access_key = Some(d.content()?); + Ok(()) + } + b"SessionToken" => { + if session_token.is_some() { + return Err(DeError::DuplicateField); + } + session_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_key_id: access_key_id.ok_or(DeError::MissingField)?, + expiration: expiration.ok_or(DeError::MissingField)?, + secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, + session_token: session_token.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for SimplePrefix { -fn serialize_content(&self, _: &mut Serializer) -> SerResult { -Ok(()) -} + fn serialize_content(&self, _: &mut Serializer) -> SerResult { + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SimplePrefix { -fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { -Ok(Self { -}) -} + fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { + Ok(Self {}) + } } impl SerializeContent for SourceSelectionCriteria { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.replica_modifications { -s.content("ReplicaModifications", val)?; -} -if let Some(ref val) = self.sse_kms_encrypted_objects { -s.content("SseKmsEncryptedObjects", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.replica_modifications { + s.content("ReplicaModifications", val)?; + } + if let Some(ref val) = self.sse_kms_encrypted_objects { + s.content("SseKmsEncryptedObjects", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SourceSelectionCriteria { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut replica_modifications: Option = None; -let mut sse_kms_encrypted_objects: Option = None; -d.for_each_element(|d, x| match x { -b"ReplicaModifications" => { -if replica_modifications.is_some() { return Err(DeError::DuplicateField); } -replica_modifications = Some(d.content()?); -Ok(()) -} -b"SseKmsEncryptedObjects" => { -if sse_kms_encrypted_objects.is_some() { return Err(DeError::DuplicateField); } -sse_kms_encrypted_objects = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -replica_modifications, -sse_kms_encrypted_objects, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut replica_modifications: Option = None; + let mut sse_kms_encrypted_objects: Option = None; + d.for_each_element(|d, x| match x { + b"ReplicaModifications" => { + if replica_modifications.is_some() { + return Err(DeError::DuplicateField); + } + replica_modifications = Some(d.content()?); + Ok(()) + } + b"SseKmsEncryptedObjects" => { + if sse_kms_encrypted_objects.is_some() { + return Err(DeError::DuplicateField); + } + sse_kms_encrypted_objects = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + replica_modifications, + sse_kms_encrypted_objects, + }) + } } impl SerializeContent for SseKmsEncryptedObjects { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SseKmsEncryptedObjects { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for SseKmsEncryptedObjectsStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for SseKmsEncryptedObjectsStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Stats { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bytes_processed { -s.content("BytesProcessed", val)?; -} -if let Some(ref val) = self.bytes_returned { -s.content("BytesReturned", val)?; -} -if let Some(ref val) = self.bytes_scanned { -s.content("BytesScanned", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bytes_processed { + s.content("BytesProcessed", val)?; + } + if let Some(ref val) = self.bytes_returned { + s.content("BytesReturned", val)?; + } + if let Some(ref val) = self.bytes_scanned { + s.content("BytesScanned", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Stats { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bytes_processed: Option = None; -let mut bytes_returned: Option = None; -let mut bytes_scanned: Option = None; -d.for_each_element(|d, x| match x { -b"BytesProcessed" => { -if bytes_processed.is_some() { return Err(DeError::DuplicateField); } -bytes_processed = Some(d.content()?); -Ok(()) -} -b"BytesReturned" => { -if bytes_returned.is_some() { return Err(DeError::DuplicateField); } -bytes_returned = Some(d.content()?); -Ok(()) -} -b"BytesScanned" => { -if bytes_scanned.is_some() { return Err(DeError::DuplicateField); } -bytes_scanned = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bytes_processed, -bytes_returned, -bytes_scanned, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bytes_processed: Option = None; + let mut bytes_returned: Option = None; + let mut bytes_scanned: Option = None; + d.for_each_element(|d, x| match x { + b"BytesProcessed" => { + if bytes_processed.is_some() { + return Err(DeError::DuplicateField); + } + bytes_processed = Some(d.content()?); + Ok(()) + } + b"BytesReturned" => { + if bytes_returned.is_some() { + return Err(DeError::DuplicateField); + } + bytes_returned = Some(d.content()?); + Ok(()) + } + b"BytesScanned" => { + if bytes_scanned.is_some() { + return Err(DeError::DuplicateField); + } + bytes_scanned = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bytes_processed, + bytes_returned, + bytes_scanned, + }) + } } impl SerializeContent for StorageClass { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for StorageClass { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DEEP_ARCHIVE" => Ok(Self::from_static(StorageClass::DEEP_ARCHIVE)), -b"EXPRESS_ONEZONE" => Ok(Self::from_static(StorageClass::EXPRESS_ONEZONE)), -b"GLACIER" => Ok(Self::from_static(StorageClass::GLACIER)), -b"GLACIER_IR" => Ok(Self::from_static(StorageClass::GLACIER_IR)), -b"INTELLIGENT_TIERING" => Ok(Self::from_static(StorageClass::INTELLIGENT_TIERING)), -b"ONEZONE_IA" => Ok(Self::from_static(StorageClass::ONEZONE_IA)), -b"OUTPOSTS" => Ok(Self::from_static(StorageClass::OUTPOSTS)), -b"REDUCED_REDUNDANCY" => Ok(Self::from_static(StorageClass::REDUCED_REDUNDANCY)), -b"SNOW" => Ok(Self::from_static(StorageClass::SNOW)), -b"STANDARD" => Ok(Self::from_static(StorageClass::STANDARD)), -b"STANDARD_IA" => Ok(Self::from_static(StorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DEEP_ARCHIVE" => Ok(Self::from_static(StorageClass::DEEP_ARCHIVE)), + b"EXPRESS_ONEZONE" => Ok(Self::from_static(StorageClass::EXPRESS_ONEZONE)), + b"GLACIER" => Ok(Self::from_static(StorageClass::GLACIER)), + b"GLACIER_IR" => Ok(Self::from_static(StorageClass::GLACIER_IR)), + b"INTELLIGENT_TIERING" => Ok(Self::from_static(StorageClass::INTELLIGENT_TIERING)), + b"ONEZONE_IA" => Ok(Self::from_static(StorageClass::ONEZONE_IA)), + b"OUTPOSTS" => Ok(Self::from_static(StorageClass::OUTPOSTS)), + b"REDUCED_REDUNDANCY" => Ok(Self::from_static(StorageClass::REDUCED_REDUNDANCY)), + b"SNOW" => Ok(Self::from_static(StorageClass::SNOW)), + b"STANDARD" => Ok(Self::from_static(StorageClass::STANDARD)), + b"STANDARD_IA" => Ok(Self::from_static(StorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for StorageClassAnalysis { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.data_export { -s.content("DataExport", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.data_export { + s.content("DataExport", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysis { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut data_export: Option = None; -d.for_each_element(|d, x| match x { -b"DataExport" => { -if data_export.is_some() { return Err(DeError::DuplicateField); } -data_export = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -data_export, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut data_export: Option = None; + d.for_each_element(|d, x| match x { + b"DataExport" => { + if data_export.is_some() { + return Err(DeError::DuplicateField); + } + data_export = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { data_export }) + } } impl SerializeContent for StorageClassAnalysisDataExport { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Destination", &self.destination)?; -s.content("OutputSchemaVersion", &self.output_schema_version)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Destination", &self.destination)?; + s.content("OutputSchemaVersion", &self.output_schema_version)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysisDataExport { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut destination: Option = None; -let mut output_schema_version: Option = None; -d.for_each_element(|d, x| match x { -b"Destination" => { -if destination.is_some() { return Err(DeError::DuplicateField); } -destination = Some(d.content()?); -Ok(()) -} -b"OutputSchemaVersion" => { -if output_schema_version.is_some() { return Err(DeError::DuplicateField); } -output_schema_version = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -destination: destination.ok_or(DeError::MissingField)?, -output_schema_version: output_schema_version.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut destination: Option = None; + let mut output_schema_version: Option = None; + d.for_each_element(|d, x| match x { + b"Destination" => { + if destination.is_some() { + return Err(DeError::DuplicateField); + } + destination = Some(d.content()?); + Ok(()) + } + b"OutputSchemaVersion" => { + if output_schema_version.is_some() { + return Err(DeError::DuplicateField); + } + output_schema_version = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + destination: destination.ok_or(DeError::MissingField)?, + output_schema_version: output_schema_version.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for StorageClassAnalysisSchemaVersion { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysisSchemaVersion { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"V_1" => Ok(Self::from_static(StorageClassAnalysisSchemaVersion::V_1)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"V_1" => Ok(Self::from_static(StorageClassAnalysisSchemaVersion::V_1)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Tag { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.value { -s.content("Value", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.value { + s.content("Value", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Tag { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut key: Option = None; -let mut value: Option = None; -d.for_each_element(|d, x| match x { -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"Value" => { -if value.is_some() { return Err(DeError::DuplicateField); } -value = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -key, -value, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut key: Option = None; + let mut value: Option = None; + d.for_each_element(|d, x| match x { + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"Value" => { + if value.is_some() { + return Err(DeError::DuplicateField); + } + value = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { key, value }) + } } impl SerializeContent for Tagging { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.tag_set; -s.list("TagSet", "Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.tag_set; + s.list("TagSet", "Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Tagging { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut tag_set: Option = None; -d.for_each_element(|d, x| match x { -b"TagSet" => { -if tag_set.is_some() { return Err(DeError::DuplicateField); } -tag_set = Some(d.list_content("Tag")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -tag_set: tag_set.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut tag_set: Option = None; + d.for_each_element(|d, x| match x { + b"TagSet" => { + if tag_set.is_some() { + return Err(DeError::DuplicateField); + } + tag_set = Some(d.list_content("Tag")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + tag_set: tag_set.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for TargetGrant { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.grantee { -let attrs = [ -("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), -("xsi:type", val.type_.as_str()), -]; -s.content_with_attrs("Grantee", &attrs, val)?; -} -if let Some(ref val) = self.permission { -s.content("Permission", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.grantee { + let attrs = [ + ("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), + ("xsi:type", val.type_.as_str()), + ]; + s.content_with_attrs("Grantee", &attrs, val)?; + } + if let Some(ref val) = self.permission { + s.content("Permission", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for TargetGrant { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut grantee: Option = None; -let mut permission: Option = None; -d.for_each_element_with_start(|d, x, start| match x { -b"Grantee" => { -if grantee.is_some() { return Err(DeError::DuplicateField); } -let mut type_: Option = None; -for attr in start.attributes() { - let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; - if attr.key.as_ref() == b"xsi:type" { - type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); - } -} -let mut display_name: Option = None; -let mut email_address: Option = None; -let mut id: Option = None; -let mut uri: Option = None; -d.for_each_element(|d, x| match x { -b"DisplayName" => { - if display_name.is_some() { return Err(DeError::DuplicateField); } - display_name = Some(d.content()?); - Ok(()) -} -b"EmailAddress" => { - if email_address.is_some() { return Err(DeError::DuplicateField); } - email_address = Some(d.content()?); - Ok(()) -} -b"ID" => { - if id.is_some() { return Err(DeError::DuplicateField); } - id = Some(d.content()?); - Ok(()) -} -b"URI" => { - if uri.is_some() { return Err(DeError::DuplicateField); } - uri = Some(d.content()?); - Ok(()) -} -_ => Err(DeError::UnexpectedTagName), -})?; -grantee = Some(Grantee { -display_name, -email_address, -id, -type_: type_.ok_or(DeError::MissingField)?, -uri, -}); -Ok(()) -} -b"Permission" => { -if permission.is_some() { return Err(DeError::DuplicateField); } -permission = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -grantee, -permission, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut grantee: Option = None; + let mut permission: Option = None; + d.for_each_element_with_start(|d, x, start| match x { + b"Grantee" => { + if grantee.is_some() { + return Err(DeError::DuplicateField); + } + let mut type_: Option = None; + for attr in start.attributes() { + let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; + if attr.key.as_ref() == b"xsi:type" { + type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); + } + } + let mut display_name: Option = None; + let mut email_address: Option = None; + let mut id: Option = None; + let mut uri: Option = None; + d.for_each_element(|d, x| match x { + b"DisplayName" => { + if display_name.is_some() { + return Err(DeError::DuplicateField); + } + display_name = Some(d.content()?); + Ok(()) + } + b"EmailAddress" => { + if email_address.is_some() { + return Err(DeError::DuplicateField); + } + email_address = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"URI" => { + if uri.is_some() { + return Err(DeError::DuplicateField); + } + uri = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + grantee = Some(Grantee { + display_name, + email_address, + id, + type_: type_.ok_or(DeError::MissingField)?, + uri, + }); + Ok(()) + } + b"Permission" => { + if permission.is_some() { + return Err(DeError::DuplicateField); + } + permission = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { grantee, permission }) + } } impl SerializeContent for TargetObjectKeyFormat { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.partitioned_prefix { -s.content("PartitionedPrefix", val)?; -} -if let Some(ref val) = self.simple_prefix { -s.content("SimplePrefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.partitioned_prefix { + s.content("PartitionedPrefix", val)?; + } + if let Some(ref val) = self.simple_prefix { + s.content("SimplePrefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for TargetObjectKeyFormat { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut partitioned_prefix: Option = None; -let mut simple_prefix: Option = None; -d.for_each_element(|d, x| match x { -b"PartitionedPrefix" => { -if partitioned_prefix.is_some() { return Err(DeError::DuplicateField); } -partitioned_prefix = Some(d.content()?); -Ok(()) -} -b"SimplePrefix" => { -if simple_prefix.is_some() { return Err(DeError::DuplicateField); } -simple_prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -partitioned_prefix, -simple_prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut partitioned_prefix: Option = None; + let mut simple_prefix: Option = None; + d.for_each_element(|d, x| match x { + b"PartitionedPrefix" => { + if partitioned_prefix.is_some() { + return Err(DeError::DuplicateField); + } + partitioned_prefix = Some(d.content()?); + Ok(()) + } + b"SimplePrefix" => { + if simple_prefix.is_some() { + return Err(DeError::DuplicateField); + } + simple_prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + partitioned_prefix, + simple_prefix, + }) + } } impl SerializeContent for Tier { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Tier { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Bulk" => Ok(Self::from_static(Tier::BULK)), -b"Expedited" => Ok(Self::from_static(Tier::EXPEDITED)), -b"Standard" => Ok(Self::from_static(Tier::STANDARD)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Bulk" => Ok(Self::from_static(Tier::BULK)), + b"Expedited" => Ok(Self::from_static(Tier::EXPEDITED)), + b"Standard" => Ok(Self::from_static(Tier::STANDARD)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Tiering { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("AccessTier", &self.access_tier)?; -s.content("Days", &self.days)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("AccessTier", &self.access_tier)?; + s.content("Days", &self.days)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Tiering { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_tier: Option = None; -let mut days: Option = None; -d.for_each_element(|d, x| match x { -b"AccessTier" => { -if access_tier.is_some() { return Err(DeError::DuplicateField); } -access_tier = Some(d.content()?); -Ok(()) -} -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_tier: access_tier.ok_or(DeError::MissingField)?, -days: days.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_tier: Option = None; + let mut days: Option = None; + d.for_each_element(|d, x| match x { + b"AccessTier" => { + if access_tier.is_some() { + return Err(DeError::DuplicateField); + } + access_tier = Some(d.content()?); + Ok(()) + } + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_tier: access_tier.ok_or(DeError::MissingField)?, + days: days.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for TopicConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.events; -s.flattened_list("Event", iter)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("Id", val)?; -} -s.content("Topic", &self.topic_arn)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.events; + s.flattened_list("Event", iter)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("Id", val)?; + } + s.content("Topic", &self.topic_arn)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for TopicConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut events: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut topic_arn: Option = None; -d.for_each_element(|d, x| match x { -b"Event" => { -let ans: Event = d.content()?; -events.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"Topic" => { -if topic_arn.is_some() { return Err(DeError::DuplicateField); } -topic_arn = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -events: events.ok_or(DeError::MissingField)?, -filter, -id, -topic_arn: topic_arn.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut events: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut topic_arn: Option = None; + d.for_each_element(|d, x| match x { + b"Event" => { + let ans: Event = d.content()?; + events.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"Topic" => { + if topic_arn.is_some() { + return Err(DeError::DuplicateField); + } + topic_arn = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + events: events.ok_or(DeError::MissingField)?, + filter, + id, + topic_arn: topic_arn.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Transition { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.date { -s.timestamp("Date", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.date { + s.timestamp("Date", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Transition { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut date: Option = None; -let mut days: Option = None; -let mut storage_class: Option = None; -d.for_each_element(|d, x| match x { -b"Date" => { -if date.is_some() { return Err(DeError::DuplicateField); } -date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -date, -days, -storage_class, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut date: Option = None; + let mut days: Option = None; + let mut storage_class: Option = None; + d.for_each_element(|d, x| match x { + b"Date" => { + if date.is_some() { + return Err(DeError::DuplicateField); + } + date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + date, + days, + storage_class, + }) + } } impl SerializeContent for TransitionStorageClass { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for TransitionStorageClass { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DEEP_ARCHIVE" => Ok(Self::from_static(TransitionStorageClass::DEEP_ARCHIVE)), -b"GLACIER" => Ok(Self::from_static(TransitionStorageClass::GLACIER)), -b"GLACIER_IR" => Ok(Self::from_static(TransitionStorageClass::GLACIER_IR)), -b"INTELLIGENT_TIERING" => Ok(Self::from_static(TransitionStorageClass::INTELLIGENT_TIERING)), -b"ONEZONE_IA" => Ok(Self::from_static(TransitionStorageClass::ONEZONE_IA)), -b"STANDARD_IA" => Ok(Self::from_static(TransitionStorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DEEP_ARCHIVE" => Ok(Self::from_static(TransitionStorageClass::DEEP_ARCHIVE)), + b"GLACIER" => Ok(Self::from_static(TransitionStorageClass::GLACIER)), + b"GLACIER_IR" => Ok(Self::from_static(TransitionStorageClass::GLACIER_IR)), + b"INTELLIGENT_TIERING" => Ok(Self::from_static(TransitionStorageClass::INTELLIGENT_TIERING)), + b"ONEZONE_IA" => Ok(Self::from_static(TransitionStorageClass::ONEZONE_IA)), + b"STANDARD_IA" => Ok(Self::from_static(TransitionStorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Type { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Type { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"AmazonCustomerByEmail" => Ok(Self::from_static(Type::AMAZON_CUSTOMER_BY_EMAIL)), -b"CanonicalUser" => Ok(Self::from_static(Type::CANONICAL_USER)), -b"Group" => Ok(Self::from_static(Type::GROUP)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"AmazonCustomerByEmail" => Ok(Self::from_static(Type::AMAZON_CUSTOMER_BY_EMAIL)), + b"CanonicalUser" => Ok(Self::from_static(Type::CANONICAL_USER)), + b"Group" => Ok(Self::from_static(Type::GROUP)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for VersioningConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.mfa_delete { -s.content("MfaDelete", val)?; -} -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.mfa_delete { + s.content("MfaDelete", val)?; + } + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for VersioningConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut mfa_delete: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"MfaDelete" => { -if mfa_delete.is_some() { return Err(DeError::DuplicateField); } -mfa_delete = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -mfa_delete, -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut mfa_delete: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"MfaDelete" => { + if mfa_delete.is_some() { + return Err(DeError::DuplicateField); + } + mfa_delete = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { mfa_delete, status }) + } } impl SerializeContent for WebsiteConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.error_document { -s.content("ErrorDocument", val)?; -} -if let Some(ref val) = self.index_document { -s.content("IndexDocument", val)?; -} -if let Some(ref val) = self.redirect_all_requests_to { -s.content("RedirectAllRequestsTo", val)?; -} -if let Some(iter) = &self.routing_rules { -s.list("RoutingRules", "RoutingRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.error_document { + s.content("ErrorDocument", val)?; + } + if let Some(ref val) = self.index_document { + s.content("IndexDocument", val)?; + } + if let Some(ref val) = self.redirect_all_requests_to { + s.content("RedirectAllRequestsTo", val)?; + } + if let Some(iter) = &self.routing_rules { + s.list("RoutingRules", "RoutingRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for WebsiteConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut error_document: Option = None; -let mut index_document: Option = None; -let mut redirect_all_requests_to: Option = None; -let mut routing_rules: Option = None; -d.for_each_element(|d, x| match x { -b"ErrorDocument" => { -if error_document.is_some() { return Err(DeError::DuplicateField); } -error_document = Some(d.content()?); -Ok(()) -} -b"IndexDocument" => { -if index_document.is_some() { return Err(DeError::DuplicateField); } -index_document = Some(d.content()?); -Ok(()) -} -b"RedirectAllRequestsTo" => { -if redirect_all_requests_to.is_some() { return Err(DeError::DuplicateField); } -redirect_all_requests_to = Some(d.content()?); -Ok(()) -} -b"RoutingRules" => { -if routing_rules.is_some() { return Err(DeError::DuplicateField); } -routing_rules = Some(d.list_content("RoutingRule")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -error_document, -index_document, -redirect_all_requests_to, -routing_rules, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut error_document: Option = None; + let mut index_document: Option = None; + let mut redirect_all_requests_to: Option = None; + let mut routing_rules: Option = None; + d.for_each_element(|d, x| match x { + b"ErrorDocument" => { + if error_document.is_some() { + return Err(DeError::DuplicateField); + } + error_document = Some(d.content()?); + Ok(()) + } + b"IndexDocument" => { + if index_document.is_some() { + return Err(DeError::DuplicateField); + } + index_document = Some(d.content()?); + Ok(()) + } + b"RedirectAllRequestsTo" => { + if redirect_all_requests_to.is_some() { + return Err(DeError::DuplicateField); + } + redirect_all_requests_to = Some(d.content()?); + Ok(()) + } + b"RoutingRules" => { + if routing_rules.is_some() { + return Err(DeError::DuplicateField); + } + routing_rules = Some(d.list_content("RoutingRule")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + error_document, + index_document, + redirect_all_requests_to, + routing_rules, + }) + } } diff --git a/crates/s3s/src/xml/generated_minio.rs b/crates/s3s/src/xml/generated_minio.rs index 88f9867a..8d73d5b5 100644 --- a/crates/s3s/src/xml/generated_minio.rs +++ b/crates/s3s/src/xml/generated_minio.rs @@ -836,8834 +836,9556 @@ use std::io::Write; const XMLNS_S3: &str = "http://s3.amazonaws.com/doc/2006-03-01/"; impl Serialize for AccelerateConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("AccelerateConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("AccelerateConfiguration", self) + } } impl<'xml> Deserialize<'xml> for AccelerateConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("AccelerateConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("AccelerateConfiguration", Deserializer::content) + } } impl Serialize for AccessControlPolicy { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("AccessControlPolicy", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("AccessControlPolicy", self) + } } impl<'xml> Deserialize<'xml> for AccessControlPolicy { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("AccessControlPolicy", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("AccessControlPolicy", Deserializer::content) + } } impl Serialize for AnalyticsConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("AnalyticsConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("AnalyticsConfiguration", self) + } } impl<'xml> Deserialize<'xml> for AnalyticsConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("AnalyticsConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("AnalyticsConfiguration", Deserializer::content) + } } impl Serialize for BucketLifecycleConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("LifecycleConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("LifecycleConfiguration", self) + } } impl<'xml> Deserialize<'xml> for BucketLifecycleConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element_any( - &["LifecycleConfiguration", "BucketLifecycleConfiguration"], - Deserializer::content, -) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element_any(&["LifecycleConfiguration", "BucketLifecycleConfiguration"], Deserializer::content) + } } impl Serialize for BucketLoggingStatus { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("BucketLoggingStatus", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("BucketLoggingStatus", self) + } } impl<'xml> Deserialize<'xml> for BucketLoggingStatus { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("BucketLoggingStatus", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("BucketLoggingStatus", Deserializer::content) + } } impl Serialize for CORSConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CORSConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CORSConfiguration", self) + } } impl<'xml> Deserialize<'xml> for CORSConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CORSConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CORSConfiguration", Deserializer::content) + } } impl Serialize for CompleteMultipartUploadOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("CompleteMultipartUploadResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("CompleteMultipartUploadResult", XMLNS_S3, self) + } } impl Serialize for CompletedMultipartUpload { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CompleteMultipartUpload", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CompleteMultipartUpload", self) + } } impl<'xml> Deserialize<'xml> for CompletedMultipartUpload { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CompleteMultipartUpload", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CompleteMultipartUpload", Deserializer::content) + } } impl Serialize for CopyObjectResult { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CopyObjectResult", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CopyObjectResult", self) + } } impl<'xml> Deserialize<'xml> for CopyObjectResult { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CopyObjectResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CopyObjectResult", Deserializer::content) + } } impl Serialize for CopyPartResult { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CopyPartResult", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CopyPartResult", self) + } } impl<'xml> Deserialize<'xml> for CopyPartResult { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CopyPartResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CopyPartResult", Deserializer::content) + } } impl Serialize for CreateBucketConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("CreateBucketConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("CreateBucketConfiguration", self) + } } impl<'xml> Deserialize<'xml> for CreateBucketConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CreateBucketConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CreateBucketConfiguration", Deserializer::content) + } } impl Serialize for CreateMultipartUploadOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("InitiateMultipartUploadResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("InitiateMultipartUploadResult", XMLNS_S3, self) + } } impl Serialize for CreateSessionOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("CreateSessionResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("CreateSessionResult", XMLNS_S3, self) + } } impl Serialize for Delete { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Delete", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Delete", self) + } } impl<'xml> Deserialize<'xml> for Delete { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Delete", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Delete", Deserializer::content) + } } impl Serialize for DeleteObjectsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("DeleteResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("DeleteResult", XMLNS_S3, self) + } } impl Serialize for GetBucketAccelerateConfigurationOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("AccelerateConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("AccelerateConfiguration", XMLNS_S3, self) + } } impl Serialize for GetBucketAclOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketAclOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("AccessControlPolicy", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("AccessControlPolicy", Deserializer::content) + } } impl Serialize for GetBucketCorsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("CORSConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("CORSConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketCorsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("CORSConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("CORSConfiguration", Deserializer::content) + } } impl Serialize for GetBucketLifecycleConfigurationOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("LifecycleConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("LifecycleConfiguration", XMLNS_S3, self) + } } impl Serialize for GetBucketLoggingOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("BucketLoggingStatus", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("BucketLoggingStatus", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketLoggingOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("BucketLoggingStatus", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("BucketLoggingStatus", Deserializer::content) + } } impl Serialize for GetBucketMetadataTableConfigurationResult { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("GetBucketMetadataTableConfigurationResult", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("GetBucketMetadataTableConfigurationResult", self) + } } impl<'xml> Deserialize<'xml> for GetBucketMetadataTableConfigurationResult { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("GetBucketMetadataTableConfigurationResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("GetBucketMetadataTableConfigurationResult", Deserializer::content) + } } impl Serialize for GetBucketNotificationConfigurationOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("NotificationConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("NotificationConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketNotificationConfigurationOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("NotificationConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("NotificationConfiguration", Deserializer::content) + } } impl Serialize for GetBucketRequestPaymentOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("RequestPaymentConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("RequestPaymentConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketRequestPaymentOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("RequestPaymentConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("RequestPaymentConfiguration", Deserializer::content) + } } impl Serialize for GetBucketTaggingOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("Tagging", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("Tagging", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketTaggingOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Tagging", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Tagging", Deserializer::content) + } } impl Serialize for GetBucketVersioningOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("VersioningConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("VersioningConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketVersioningOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("VersioningConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("VersioningConfiguration", Deserializer::content) + } } impl Serialize for GetBucketWebsiteOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("WebsiteConfiguration", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("WebsiteConfiguration", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for GetBucketWebsiteOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("WebsiteConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("WebsiteConfiguration", Deserializer::content) + } } impl Serialize for GetObjectAclOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("AccessControlPolicy", XMLNS_S3, self) + } } impl Serialize for GetObjectAttributesOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("GetObjectAttributesResponse", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("GetObjectAttributesResponse", XMLNS_S3, self) + } } impl Serialize for GetObjectTaggingOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("Tagging", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("Tagging", XMLNS_S3, self) + } } impl Serialize for IntelligentTieringConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("IntelligentTieringConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("IntelligentTieringConfiguration", self) + } } impl<'xml> Deserialize<'xml> for IntelligentTieringConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("IntelligentTieringConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("IntelligentTieringConfiguration", Deserializer::content) + } } impl Serialize for InventoryConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("InventoryConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("InventoryConfiguration", self) + } } impl<'xml> Deserialize<'xml> for InventoryConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("InventoryConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("InventoryConfiguration", Deserializer::content) + } } impl Serialize for ListBucketAnalyticsConfigurationsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListBucketAnalyticsConfigurationResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListBucketAnalyticsConfigurationResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketAnalyticsConfigurationsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListBucketAnalyticsConfigurationResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListBucketAnalyticsConfigurationResult", Deserializer::content) + } } impl Serialize for ListBucketIntelligentTieringConfigurationsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListBucketIntelligentTieringConfigurationsOutput", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListBucketIntelligentTieringConfigurationsOutput", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketIntelligentTieringConfigurationsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListBucketIntelligentTieringConfigurationsOutput", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListBucketIntelligentTieringConfigurationsOutput", Deserializer::content) + } } impl Serialize for ListBucketInventoryConfigurationsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListInventoryConfigurationsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListInventoryConfigurationsResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketInventoryConfigurationsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListInventoryConfigurationsResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListInventoryConfigurationsResult", Deserializer::content) + } } impl Serialize for ListBucketMetricsConfigurationsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListMetricsConfigurationsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListMetricsConfigurationsResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketMetricsConfigurationsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListMetricsConfigurationsResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListMetricsConfigurationsResult", Deserializer::content) + } } impl Serialize for ListBucketsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListAllMyBucketsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListAllMyBucketsResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListBucketsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListAllMyBucketsResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListAllMyBucketsResult", Deserializer::content) + } } impl Serialize for ListDirectoryBucketsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListAllMyDirectoryBucketsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListAllMyDirectoryBucketsResult", XMLNS_S3, self) + } } impl<'xml> Deserialize<'xml> for ListDirectoryBucketsOutput { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ListAllMyDirectoryBucketsResult", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ListAllMyDirectoryBucketsResult", Deserializer::content) + } } impl Serialize for ListMultipartUploadsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListMultipartUploadsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListMultipartUploadsResult", XMLNS_S3, self) + } } impl Serialize for ListObjectVersionsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListVersionsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListVersionsResult", XMLNS_S3, self) + } } impl Serialize for ListObjectsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListBucketResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListBucketResult", XMLNS_S3, self) + } } impl Serialize for ListObjectsV2Output { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListBucketResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListBucketResult", XMLNS_S3, self) + } } impl Serialize for ListPartsOutput { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content_with_ns("ListPartsResult", XMLNS_S3, self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content_with_ns("ListPartsResult", XMLNS_S3, self) + } } impl Serialize for MetadataTableConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("MetadataTableConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("MetadataTableConfiguration", self) + } } impl<'xml> Deserialize<'xml> for MetadataTableConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("MetadataTableConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("MetadataTableConfiguration", Deserializer::content) + } } impl Serialize for MetricsConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("MetricsConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("MetricsConfiguration", self) + } } impl<'xml> Deserialize<'xml> for MetricsConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("MetricsConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("MetricsConfiguration", Deserializer::content) + } } impl Serialize for NotificationConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("NotificationConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("NotificationConfiguration", self) + } } impl<'xml> Deserialize<'xml> for NotificationConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("NotificationConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("NotificationConfiguration", Deserializer::content) + } } impl Serialize for ObjectLockConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("ObjectLockConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("ObjectLockConfiguration", self) + } } impl<'xml> Deserialize<'xml> for ObjectLockConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ObjectLockConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ObjectLockConfiguration", Deserializer::content) + } } impl Serialize for ObjectLockLegalHold { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("LegalHold", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("LegalHold", self) + } } impl<'xml> Deserialize<'xml> for ObjectLockLegalHold { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("LegalHold", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("LegalHold", Deserializer::content) + } } impl Serialize for ObjectLockRetention { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Retention", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Retention", self) + } } impl<'xml> Deserialize<'xml> for ObjectLockRetention { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Retention", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Retention", Deserializer::content) + } } impl Serialize for OwnershipControls { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("OwnershipControls", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("OwnershipControls", self) + } } impl<'xml> Deserialize<'xml> for OwnershipControls { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("OwnershipControls", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("OwnershipControls", Deserializer::content) + } } impl Serialize for PolicyStatus { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("PolicyStatus", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("PolicyStatus", self) + } } impl<'xml> Deserialize<'xml> for PolicyStatus { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("PolicyStatus", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("PolicyStatus", Deserializer::content) + } } impl Serialize for Progress { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Progress", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Progress", self) + } } impl<'xml> Deserialize<'xml> for Progress { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Progress", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Progress", Deserializer::content) + } } impl Serialize for PublicAccessBlockConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("PublicAccessBlockConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("PublicAccessBlockConfiguration", self) + } } impl<'xml> Deserialize<'xml> for PublicAccessBlockConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("PublicAccessBlockConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("PublicAccessBlockConfiguration", Deserializer::content) + } } impl Serialize for ReplicationConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("ReplicationConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("ReplicationConfiguration", self) + } } impl<'xml> Deserialize<'xml> for ReplicationConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ReplicationConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ReplicationConfiguration", Deserializer::content) + } } impl Serialize for RequestPaymentConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("RequestPaymentConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("RequestPaymentConfiguration", self) + } } impl<'xml> Deserialize<'xml> for RequestPaymentConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("RequestPaymentConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("RequestPaymentConfiguration", Deserializer::content) + } } impl Serialize for RestoreRequest { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("RestoreRequest", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("RestoreRequest", self) + } } impl<'xml> Deserialize<'xml> for RestoreRequest { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("RestoreRequest", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("RestoreRequest", Deserializer::content) + } } impl Serialize for SelectObjectContentRequest { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("SelectObjectContentRequest", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("SelectObjectContentRequest", self) + } } impl<'xml> Deserialize<'xml> for SelectObjectContentRequest { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("SelectObjectContentRequest", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("SelectObjectContentRequest", Deserializer::content) + } } impl Serialize for ServerSideEncryptionConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("ServerSideEncryptionConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("ServerSideEncryptionConfiguration", self) + } } impl<'xml> Deserialize<'xml> for ServerSideEncryptionConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("ServerSideEncryptionConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("ServerSideEncryptionConfiguration", Deserializer::content) + } } impl Serialize for Stats { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Stats", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Stats", self) + } } impl<'xml> Deserialize<'xml> for Stats { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Stats", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Stats", Deserializer::content) + } } impl Serialize for Tagging { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("Tagging", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("Tagging", self) + } } impl<'xml> Deserialize<'xml> for Tagging { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("Tagging", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("Tagging", Deserializer::content) + } } impl Serialize for VersioningConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("VersioningConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("VersioningConfiguration", self) + } } impl<'xml> Deserialize<'xml> for VersioningConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("VersioningConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("VersioningConfiguration", Deserializer::content) + } } impl Serialize for WebsiteConfiguration { -fn serialize(&self, s: &mut Serializer) -> SerResult { -s.content("WebsiteConfiguration", self) -} + fn serialize(&self, s: &mut Serializer) -> SerResult { + s.content("WebsiteConfiguration", self) + } } impl<'xml> Deserialize<'xml> for WebsiteConfiguration { -fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { -d.named_element("WebsiteConfiguration", Deserializer::content) -} + fn deserialize(d: &mut Deserializer<'xml>) -> DeResult { + d.named_element("WebsiteConfiguration", Deserializer::content) + } } impl SerializeContent for AbortIncompleteMultipartUpload { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.days_after_initiation { -s.content("DaysAfterInitiation", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.days_after_initiation { + s.content("DaysAfterInitiation", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AbortIncompleteMultipartUpload { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut days_after_initiation: Option = None; -d.for_each_element(|d, x| match x { -b"DaysAfterInitiation" => { -if days_after_initiation.is_some() { return Err(DeError::DuplicateField); } -days_after_initiation = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -days_after_initiation, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut days_after_initiation: Option = None; + d.for_each_element(|d, x| match x { + b"DaysAfterInitiation" => { + if days_after_initiation.is_some() { + return Err(DeError::DuplicateField); + } + days_after_initiation = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { days_after_initiation }) + } } impl SerializeContent for AccelerateConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AccelerateConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { status }) + } } impl SerializeContent for AccessControlPolicy { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.grants { -s.list("AccessControlList", "Grant", iter)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.grants { + s.list("AccessControlList", "Grant", iter)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AccessControlPolicy { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut grants: Option = None; -let mut owner: Option = None; -d.for_each_element(|d, x| match x { -b"AccessControlList" => { -if grants.is_some() { return Err(DeError::DuplicateField); } -grants = Some(d.list_content("Grant")?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -grants, -owner, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut grants: Option = None; + let mut owner: Option = None; + d.for_each_element(|d, x| match x { + b"AccessControlList" => { + if grants.is_some() { + return Err(DeError::DuplicateField); + } + grants = Some(d.list_content("Grant")?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { grants, owner }) + } } impl SerializeContent for AccessControlTranslation { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Owner", &self.owner)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Owner", &self.owner)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AccessControlTranslation { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut owner: Option = None; -d.for_each_element(|d, x| match x { -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -owner: owner.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut owner: Option = None; + d.for_each_element(|d, x| match x { + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + owner: owner.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for AnalyticsAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix, tags }) + } } impl SerializeContent for AnalyticsConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -s.content("Id", &self.id)?; -s.content("StorageClassAnalysis", &self.storage_class_analysis)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + s.content("Id", &self.id)?; + s.content("StorageClassAnalysis", &self.storage_class_analysis)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut filter: Option = None; -let mut id: Option = None; -let mut storage_class_analysis: Option = None; -d.for_each_element(|d, x| match x { -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"StorageClassAnalysis" => { -if storage_class_analysis.is_some() { return Err(DeError::DuplicateField); } -storage_class_analysis = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -filter, -id: id.ok_or(DeError::MissingField)?, -storage_class_analysis: storage_class_analysis.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut filter: Option = None; + let mut id: Option = None; + let mut storage_class_analysis: Option = None; + d.for_each_element(|d, x| match x { + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"StorageClassAnalysis" => { + if storage_class_analysis.is_some() { + return Err(DeError::DuplicateField); + } + storage_class_analysis = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + filter, + id: id.ok_or(DeError::MissingField)?, + storage_class_analysis: storage_class_analysis.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for AnalyticsExportDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("S3BucketDestination", &self.s3_bucket_destination)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("S3BucketDestination", &self.s3_bucket_destination)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsExportDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3_bucket_destination: Option = None; -d.for_each_element(|d, x| match x { -b"S3BucketDestination" => { -if s3_bucket_destination.is_some() { return Err(DeError::DuplicateField); } -s3_bucket_destination = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3_bucket_destination: Option = None; + d.for_each_element(|d, x| match x { + b"S3BucketDestination" => { + if s3_bucket_destination.is_some() { + return Err(DeError::DuplicateField); + } + s3_bucket_destination = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for AnalyticsFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -match self { -Self::And(x) => s.content("And", x), -Self::Prefix(x) => s.content("Prefix", x), -Self::Tag(x) => s.content("Tag", x), -} -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + match self { + Self::And(x) => s.content("And", x), + Self::Prefix(x) => s.content("Prefix", x), + Self::Tag(x) => s.content("Tag", x), + } + } } impl<'xml> DeserializeContent<'xml> for AnalyticsFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.element(|d, x| match x { -b"And" => Ok(Self::And(d.content()?)), -b"Prefix" => Ok(Self::Prefix(d.content()?)), -b"Tag" => Ok(Self::Tag(d.content()?)), -_ => Err(DeError::UnexpectedTagName) -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.element(|d, x| match x { + b"And" => Ok(Self::And(d.content()?)), + b"Prefix" => Ok(Self::Prefix(d.content()?)), + b"Tag" => Ok(Self::Tag(d.content()?)), + _ => Err(DeError::UnexpectedTagName), + }) + } } impl SerializeContent for AnalyticsS3BucketDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Bucket", &self.bucket)?; -if let Some(ref val) = self.bucket_account_id { -s.content("BucketAccountId", val)?; -} -s.content("Format", &self.format)?; -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Bucket", &self.bucket)?; + if let Some(ref val) = self.bucket_account_id { + s.content("BucketAccountId", val)?; + } + s.content("Format", &self.format)?; + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsS3BucketDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bucket: Option = None; -let mut bucket_account_id: Option = None; -let mut format: Option = None; -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Bucket" => { -if bucket.is_some() { return Err(DeError::DuplicateField); } -bucket = Some(d.content()?); -Ok(()) -} -b"BucketAccountId" => { -if bucket_account_id.is_some() { return Err(DeError::DuplicateField); } -bucket_account_id = Some(d.content()?); -Ok(()) -} -b"Format" => { -if format.is_some() { return Err(DeError::DuplicateField); } -format = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bucket: bucket.ok_or(DeError::MissingField)?, -bucket_account_id, -format: format.ok_or(DeError::MissingField)?, -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bucket: Option = None; + let mut bucket_account_id: Option = None; + let mut format: Option = None; + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Bucket" => { + if bucket.is_some() { + return Err(DeError::DuplicateField); + } + bucket = Some(d.content()?); + Ok(()) + } + b"BucketAccountId" => { + if bucket_account_id.is_some() { + return Err(DeError::DuplicateField); + } + bucket_account_id = Some(d.content()?); + Ok(()) + } + b"Format" => { + if format.is_some() { + return Err(DeError::DuplicateField); + } + format = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bucket: bucket.ok_or(DeError::MissingField)?, + bucket_account_id, + format: format.ok_or(DeError::MissingField)?, + prefix, + }) + } } impl SerializeContent for AnalyticsS3ExportFileFormat { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for AnalyticsS3ExportFileFormat { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"CSV" => Ok(Self::from_static(AnalyticsS3ExportFileFormat::CSV)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"CSV" => Ok(Self::from_static(AnalyticsS3ExportFileFormat::CSV)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for AssumeRoleOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.assumed_role_user { -s.content("AssumedRoleUser", val)?; -} -if let Some(ref val) = self.credentials { -s.content("Credentials", val)?; -} -if let Some(ref val) = self.packed_policy_size { -s.content("PackedPolicySize", val)?; -} -if let Some(ref val) = self.source_identity { -s.content("SourceIdentity", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.assumed_role_user { + s.content("AssumedRoleUser", val)?; + } + if let Some(ref val) = self.credentials { + s.content("Credentials", val)?; + } + if let Some(ref val) = self.packed_policy_size { + s.content("PackedPolicySize", val)?; + } + if let Some(ref val) = self.source_identity { + s.content("SourceIdentity", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AssumeRoleOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut assumed_role_user: Option = None; -let mut credentials: Option = None; -let mut packed_policy_size: Option = None; -let mut source_identity: Option = None; -d.for_each_element(|d, x| match x { -b"AssumedRoleUser" => { -if assumed_role_user.is_some() { return Err(DeError::DuplicateField); } -assumed_role_user = Some(d.content()?); -Ok(()) -} -b"Credentials" => { -if credentials.is_some() { return Err(DeError::DuplicateField); } -credentials = Some(d.content()?); -Ok(()) -} -b"PackedPolicySize" => { -if packed_policy_size.is_some() { return Err(DeError::DuplicateField); } -packed_policy_size = Some(d.content()?); -Ok(()) -} -b"SourceIdentity" => { -if source_identity.is_some() { return Err(DeError::DuplicateField); } -source_identity = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -assumed_role_user, -credentials, -packed_policy_size, -source_identity, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut assumed_role_user: Option = None; + let mut credentials: Option = None; + let mut packed_policy_size: Option = None; + let mut source_identity: Option = None; + d.for_each_element(|d, x| match x { + b"AssumedRoleUser" => { + if assumed_role_user.is_some() { + return Err(DeError::DuplicateField); + } + assumed_role_user = Some(d.content()?); + Ok(()) + } + b"Credentials" => { + if credentials.is_some() { + return Err(DeError::DuplicateField); + } + credentials = Some(d.content()?); + Ok(()) + } + b"PackedPolicySize" => { + if packed_policy_size.is_some() { + return Err(DeError::DuplicateField); + } + packed_policy_size = Some(d.content()?); + Ok(()) + } + b"SourceIdentity" => { + if source_identity.is_some() { + return Err(DeError::DuplicateField); + } + source_identity = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + assumed_role_user, + credentials, + packed_policy_size, + source_identity, + }) + } } impl SerializeContent for AssumedRoleUser { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Arn", &self.arn)?; -s.content("AssumedRoleId", &self.assumed_role_id)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Arn", &self.arn)?; + s.content("AssumedRoleId", &self.assumed_role_id)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for AssumedRoleUser { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut arn: Option = None; -let mut assumed_role_id: Option = None; -d.for_each_element(|d, x| match x { -b"Arn" => { -if arn.is_some() { return Err(DeError::DuplicateField); } -arn = Some(d.content()?); -Ok(()) -} -b"AssumedRoleId" => { -if assumed_role_id.is_some() { return Err(DeError::DuplicateField); } -assumed_role_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -arn: arn.ok_or(DeError::MissingField)?, -assumed_role_id: assumed_role_id.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut arn: Option = None; + let mut assumed_role_id: Option = None; + d.for_each_element(|d, x| match x { + b"Arn" => { + if arn.is_some() { + return Err(DeError::DuplicateField); + } + arn = Some(d.content()?); + Ok(()) + } + b"AssumedRoleId" => { + if assumed_role_id.is_some() { + return Err(DeError::DuplicateField); + } + assumed_role_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + arn: arn.ok_or(DeError::MissingField)?, + assumed_role_id: assumed_role_id.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Bucket { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket_region { -s.content("BucketRegion", val)?; -} -if let Some(ref val) = self.creation_date { -s.timestamp("CreationDate", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket_region { + s.content("BucketRegion", val)?; + } + if let Some(ref val) = self.creation_date { + s.timestamp("CreationDate", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Bucket { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bucket_region: Option = None; -let mut creation_date: Option = None; -let mut name: Option = None; -d.for_each_element(|d, x| match x { -b"BucketRegion" => { -if bucket_region.is_some() { return Err(DeError::DuplicateField); } -bucket_region = Some(d.content()?); -Ok(()) -} -b"CreationDate" => { -if creation_date.is_some() { return Err(DeError::DuplicateField); } -creation_date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Name" => { -if name.is_some() { return Err(DeError::DuplicateField); } -name = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bucket_region, -creation_date, -name, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bucket_region: Option = None; + let mut creation_date: Option = None; + let mut name: Option = None; + d.for_each_element(|d, x| match x { + b"BucketRegion" => { + if bucket_region.is_some() { + return Err(DeError::DuplicateField); + } + bucket_region = Some(d.content()?); + Ok(()) + } + b"CreationDate" => { + if creation_date.is_some() { + return Err(DeError::DuplicateField); + } + creation_date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Name" => { + if name.is_some() { + return Err(DeError::DuplicateField); + } + name = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bucket_region, + creation_date, + name, + }) + } } impl SerializeContent for BucketAccelerateStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketAccelerateStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Enabled" => Ok(Self::from_static(BucketAccelerateStatus::ENABLED)), -b"Suspended" => Ok(Self::from_static(BucketAccelerateStatus::SUSPENDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Enabled" => Ok(Self::from_static(BucketAccelerateStatus::ENABLED)), + b"Suspended" => Ok(Self::from_static(BucketAccelerateStatus::SUSPENDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for BucketInfo { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.data_redundancy { -s.content("DataRedundancy", val)?; -} -if let Some(ref val) = self.type_ { -s.content("Type", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.data_redundancy { + s.content("DataRedundancy", val)?; + } + if let Some(ref val) = self.type_ { + s.content("Type", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for BucketInfo { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut data_redundancy: Option = None; -let mut type_: Option = None; -d.for_each_element(|d, x| match x { -b"DataRedundancy" => { -if data_redundancy.is_some() { return Err(DeError::DuplicateField); } -data_redundancy = Some(d.content()?); -Ok(()) -} -b"Type" => { -if type_.is_some() { return Err(DeError::DuplicateField); } -type_ = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -data_redundancy, -type_, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut data_redundancy: Option = None; + let mut type_: Option = None; + d.for_each_element(|d, x| match x { + b"DataRedundancy" => { + if data_redundancy.is_some() { + return Err(DeError::DuplicateField); + } + data_redundancy = Some(d.content()?); + Ok(()) + } + b"Type" => { + if type_.is_some() { + return Err(DeError::DuplicateField); + } + type_ = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { data_redundancy, type_ }) + } } impl SerializeContent for BucketLifecycleConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.expiry_updated_at { -s.timestamp("ExpiryUpdatedAt", val, TimestampFormat::DateTime)?; -} -{ -let iter = &self.rules; -s.flattened_list("Rule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.expiry_updated_at { + s.timestamp("ExpiryUpdatedAt", val, TimestampFormat::DateTime)?; + } + { + let iter = &self.rules; + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for BucketLifecycleConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut expiry_updated_at: Option = None; -let mut rules: Option = None; -d.for_each_element(|d, x| match x { -b"ExpiryUpdatedAt" => { -if expiry_updated_at.is_some() { return Err(DeError::DuplicateField); } -expiry_updated_at = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Rule" => { -let ans: LifecycleRule = d.content()?; -rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Ok(()), -})?; -Ok(Self { -expiry_updated_at, -rules: rules.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut expiry_updated_at: Option = None; + let mut rules: Option = None; + d.for_each_element(|d, x| match x { + b"ExpiryUpdatedAt" => { + if expiry_updated_at.is_some() { + return Err(DeError::DuplicateField); + } + expiry_updated_at = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Rule" => { + let ans: LifecycleRule = d.content()?; + rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Ok(()), + })?; + Ok(Self { + expiry_updated_at, + rules: rules.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for BucketLocationConstraint { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketLocationConstraint { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"EU" => Ok(Self::from_static(BucketLocationConstraint::EU)), -b"af-south-1" => Ok(Self::from_static(BucketLocationConstraint::AF_SOUTH_1)), -b"ap-east-1" => Ok(Self::from_static(BucketLocationConstraint::AP_EAST_1)), -b"ap-northeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_1)), -b"ap-northeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_2)), -b"ap-northeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_3)), -b"ap-south-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_1)), -b"ap-south-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_2)), -b"ap-southeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_1)), -b"ap-southeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_2)), -b"ap-southeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_3)), -b"ap-southeast-4" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_4)), -b"ap-southeast-5" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_5)), -b"ca-central-1" => Ok(Self::from_static(BucketLocationConstraint::CA_CENTRAL_1)), -b"cn-north-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTH_1)), -b"cn-northwest-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTHWEST_1)), -b"eu-central-1" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_1)), -b"eu-central-2" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_2)), -b"eu-north-1" => Ok(Self::from_static(BucketLocationConstraint::EU_NORTH_1)), -b"eu-south-1" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_1)), -b"eu-south-2" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_2)), -b"eu-west-1" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_1)), -b"eu-west-2" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_2)), -b"eu-west-3" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_3)), -b"il-central-1" => Ok(Self::from_static(BucketLocationConstraint::IL_CENTRAL_1)), -b"me-central-1" => Ok(Self::from_static(BucketLocationConstraint::ME_CENTRAL_1)), -b"me-south-1" => Ok(Self::from_static(BucketLocationConstraint::ME_SOUTH_1)), -b"sa-east-1" => Ok(Self::from_static(BucketLocationConstraint::SA_EAST_1)), -b"us-east-2" => Ok(Self::from_static(BucketLocationConstraint::US_EAST_2)), -b"us-gov-east-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_EAST_1)), -b"us-gov-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_WEST_1)), -b"us-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_1)), -b"us-west-2" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_2)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"EU" => Ok(Self::from_static(BucketLocationConstraint::EU)), + b"af-south-1" => Ok(Self::from_static(BucketLocationConstraint::AF_SOUTH_1)), + b"ap-east-1" => Ok(Self::from_static(BucketLocationConstraint::AP_EAST_1)), + b"ap-northeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_1)), + b"ap-northeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_2)), + b"ap-northeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_NORTHEAST_3)), + b"ap-south-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_1)), + b"ap-south-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTH_2)), + b"ap-southeast-1" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_1)), + b"ap-southeast-2" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_2)), + b"ap-southeast-3" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_3)), + b"ap-southeast-4" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_4)), + b"ap-southeast-5" => Ok(Self::from_static(BucketLocationConstraint::AP_SOUTHEAST_5)), + b"ca-central-1" => Ok(Self::from_static(BucketLocationConstraint::CA_CENTRAL_1)), + b"cn-north-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTH_1)), + b"cn-northwest-1" => Ok(Self::from_static(BucketLocationConstraint::CN_NORTHWEST_1)), + b"eu-central-1" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_1)), + b"eu-central-2" => Ok(Self::from_static(BucketLocationConstraint::EU_CENTRAL_2)), + b"eu-north-1" => Ok(Self::from_static(BucketLocationConstraint::EU_NORTH_1)), + b"eu-south-1" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_1)), + b"eu-south-2" => Ok(Self::from_static(BucketLocationConstraint::EU_SOUTH_2)), + b"eu-west-1" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_1)), + b"eu-west-2" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_2)), + b"eu-west-3" => Ok(Self::from_static(BucketLocationConstraint::EU_WEST_3)), + b"il-central-1" => Ok(Self::from_static(BucketLocationConstraint::IL_CENTRAL_1)), + b"me-central-1" => Ok(Self::from_static(BucketLocationConstraint::ME_CENTRAL_1)), + b"me-south-1" => Ok(Self::from_static(BucketLocationConstraint::ME_SOUTH_1)), + b"sa-east-1" => Ok(Self::from_static(BucketLocationConstraint::SA_EAST_1)), + b"us-east-2" => Ok(Self::from_static(BucketLocationConstraint::US_EAST_2)), + b"us-gov-east-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_EAST_1)), + b"us-gov-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_GOV_WEST_1)), + b"us-west-1" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_1)), + b"us-west-2" => Ok(Self::from_static(BucketLocationConstraint::US_WEST_2)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for BucketLoggingStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.logging_enabled { -s.content("LoggingEnabled", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.logging_enabled { + s.content("LoggingEnabled", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for BucketLoggingStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut logging_enabled: Option = None; -d.for_each_element(|d, x| match x { -b"LoggingEnabled" => { -if logging_enabled.is_some() { return Err(DeError::DuplicateField); } -logging_enabled = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -logging_enabled, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut logging_enabled: Option = None; + d.for_each_element(|d, x| match x { + b"LoggingEnabled" => { + if logging_enabled.is_some() { + return Err(DeError::DuplicateField); + } + logging_enabled = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { logging_enabled }) + } } impl SerializeContent for BucketLogsPermission { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketLogsPermission { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"FULL_CONTROL" => Ok(Self::from_static(BucketLogsPermission::FULL_CONTROL)), -b"READ" => Ok(Self::from_static(BucketLogsPermission::READ)), -b"WRITE" => Ok(Self::from_static(BucketLogsPermission::WRITE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"FULL_CONTROL" => Ok(Self::from_static(BucketLogsPermission::FULL_CONTROL)), + b"READ" => Ok(Self::from_static(BucketLogsPermission::READ)), + b"WRITE" => Ok(Self::from_static(BucketLogsPermission::WRITE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for BucketType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Directory" => Ok(Self::from_static(BucketType::DIRECTORY)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Directory" => Ok(Self::from_static(BucketType::DIRECTORY)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for BucketVersioningStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for BucketVersioningStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Enabled" => Ok(Self::from_static(BucketVersioningStatus::ENABLED)), -b"Suspended" => Ok(Self::from_static(BucketVersioningStatus::SUSPENDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Enabled" => Ok(Self::from_static(BucketVersioningStatus::ENABLED)), + b"Suspended" => Ok(Self::from_static(BucketVersioningStatus::SUSPENDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for CORSConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.cors_rules; -s.flattened_list("CORSRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.cors_rules; + s.flattened_list("CORSRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CORSConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut cors_rules: Option = None; -d.for_each_element(|d, x| match x { -b"CORSRule" => { -let ans: CORSRule = d.content()?; -cors_rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -cors_rules: cors_rules.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut cors_rules: Option = None; + d.for_each_element(|d, x| match x { + b"CORSRule" => { + let ans: CORSRule = d.content()?; + cors_rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + cors_rules: cors_rules.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for CORSRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.allowed_headers { -s.flattened_list("AllowedHeader", iter)?; -} -{ -let iter = &self.allowed_methods; -s.flattened_list("AllowedMethod", iter)?; -} -{ -let iter = &self.allowed_origins; -s.flattened_list("AllowedOrigin", iter)?; -} -if let Some(iter) = &self.expose_headers { -s.flattened_list("ExposeHeader", iter)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -if let Some(ref val) = self.max_age_seconds { -s.content("MaxAgeSeconds", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.allowed_headers { + s.flattened_list("AllowedHeader", iter)?; + } + { + let iter = &self.allowed_methods; + s.flattened_list("AllowedMethod", iter)?; + } + { + let iter = &self.allowed_origins; + s.flattened_list("AllowedOrigin", iter)?; + } + if let Some(iter) = &self.expose_headers { + s.flattened_list("ExposeHeader", iter)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + if let Some(ref val) = self.max_age_seconds { + s.content("MaxAgeSeconds", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CORSRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut allowed_headers: Option = None; -let mut allowed_methods: Option = None; -let mut allowed_origins: Option = None; -let mut expose_headers: Option = None; -let mut id: Option = None; -let mut max_age_seconds: Option = None; -d.for_each_element(|d, x| match x { -b"AllowedHeader" => { -let ans: AllowedHeader = d.content()?; -allowed_headers.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"AllowedMethod" => { -let ans: AllowedMethod = d.content()?; -allowed_methods.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"AllowedOrigin" => { -let ans: AllowedOrigin = d.content()?; -allowed_origins.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ExposeHeader" => { -let ans: ExposeHeader = d.content()?; -expose_headers.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"MaxAgeSeconds" => { -if max_age_seconds.is_some() { return Err(DeError::DuplicateField); } -max_age_seconds = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -allowed_headers, -allowed_methods: allowed_methods.ok_or(DeError::MissingField)?, -allowed_origins: allowed_origins.ok_or(DeError::MissingField)?, -expose_headers, -id, -max_age_seconds, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut allowed_headers: Option = None; + let mut allowed_methods: Option = None; + let mut allowed_origins: Option = None; + let mut expose_headers: Option = None; + let mut id: Option = None; + let mut max_age_seconds: Option = None; + d.for_each_element(|d, x| match x { + b"AllowedHeader" => { + let ans: AllowedHeader = d.content()?; + allowed_headers.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"AllowedMethod" => { + let ans: AllowedMethod = d.content()?; + allowed_methods.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"AllowedOrigin" => { + let ans: AllowedOrigin = d.content()?; + allowed_origins.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ExposeHeader" => { + let ans: ExposeHeader = d.content()?; + expose_headers.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"MaxAgeSeconds" => { + if max_age_seconds.is_some() { + return Err(DeError::DuplicateField); + } + max_age_seconds = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + allowed_headers, + allowed_methods: allowed_methods.ok_or(DeError::MissingField)?, + allowed_origins: allowed_origins.ok_or(DeError::MissingField)?, + expose_headers, + id, + max_age_seconds, + }) + } } impl SerializeContent for CSVInput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.allow_quoted_record_delimiter { -s.content("AllowQuotedRecordDelimiter", val)?; -} -if let Some(ref val) = self.comments { -s.content("Comments", val)?; -} -if let Some(ref val) = self.field_delimiter { -s.content("FieldDelimiter", val)?; -} -if let Some(ref val) = self.file_header_info { -s.content("FileHeaderInfo", val)?; -} -if let Some(ref val) = self.quote_character { -s.content("QuoteCharacter", val)?; -} -if let Some(ref val) = self.quote_escape_character { -s.content("QuoteEscapeCharacter", val)?; -} -if let Some(ref val) = self.record_delimiter { -s.content("RecordDelimiter", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.allow_quoted_record_delimiter { + s.content("AllowQuotedRecordDelimiter", val)?; + } + if let Some(ref val) = self.comments { + s.content("Comments", val)?; + } + if let Some(ref val) = self.field_delimiter { + s.content("FieldDelimiter", val)?; + } + if let Some(ref val) = self.file_header_info { + s.content("FileHeaderInfo", val)?; + } + if let Some(ref val) = self.quote_character { + s.content("QuoteCharacter", val)?; + } + if let Some(ref val) = self.quote_escape_character { + s.content("QuoteEscapeCharacter", val)?; + } + if let Some(ref val) = self.record_delimiter { + s.content("RecordDelimiter", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CSVInput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut allow_quoted_record_delimiter: Option = None; -let mut comments: Option = None; -let mut field_delimiter: Option = None; -let mut file_header_info: Option = None; -let mut quote_character: Option = None; -let mut quote_escape_character: Option = None; -let mut record_delimiter: Option = None; -d.for_each_element(|d, x| match x { -b"AllowQuotedRecordDelimiter" => { -if allow_quoted_record_delimiter.is_some() { return Err(DeError::DuplicateField); } -allow_quoted_record_delimiter = Some(d.content()?); -Ok(()) -} -b"Comments" => { -if comments.is_some() { return Err(DeError::DuplicateField); } -comments = Some(d.content()?); -Ok(()) -} -b"FieldDelimiter" => { -if field_delimiter.is_some() { return Err(DeError::DuplicateField); } -field_delimiter = Some(d.content()?); -Ok(()) -} -b"FileHeaderInfo" => { -if file_header_info.is_some() { return Err(DeError::DuplicateField); } -file_header_info = Some(d.content()?); -Ok(()) -} -b"QuoteCharacter" => { -if quote_character.is_some() { return Err(DeError::DuplicateField); } -quote_character = Some(d.content()?); -Ok(()) -} -b"QuoteEscapeCharacter" => { -if quote_escape_character.is_some() { return Err(DeError::DuplicateField); } -quote_escape_character = Some(d.content()?); -Ok(()) -} -b"RecordDelimiter" => { -if record_delimiter.is_some() { return Err(DeError::DuplicateField); } -record_delimiter = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -allow_quoted_record_delimiter, -comments, -field_delimiter, -file_header_info, -quote_character, -quote_escape_character, -record_delimiter, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut allow_quoted_record_delimiter: Option = None; + let mut comments: Option = None; + let mut field_delimiter: Option = None; + let mut file_header_info: Option = None; + let mut quote_character: Option = None; + let mut quote_escape_character: Option = None; + let mut record_delimiter: Option = None; + d.for_each_element(|d, x| match x { + b"AllowQuotedRecordDelimiter" => { + if allow_quoted_record_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + allow_quoted_record_delimiter = Some(d.content()?); + Ok(()) + } + b"Comments" => { + if comments.is_some() { + return Err(DeError::DuplicateField); + } + comments = Some(d.content()?); + Ok(()) + } + b"FieldDelimiter" => { + if field_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + field_delimiter = Some(d.content()?); + Ok(()) + } + b"FileHeaderInfo" => { + if file_header_info.is_some() { + return Err(DeError::DuplicateField); + } + file_header_info = Some(d.content()?); + Ok(()) + } + b"QuoteCharacter" => { + if quote_character.is_some() { + return Err(DeError::DuplicateField); + } + quote_character = Some(d.content()?); + Ok(()) + } + b"QuoteEscapeCharacter" => { + if quote_escape_character.is_some() { + return Err(DeError::DuplicateField); + } + quote_escape_character = Some(d.content()?); + Ok(()) + } + b"RecordDelimiter" => { + if record_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + record_delimiter = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + allow_quoted_record_delimiter, + comments, + field_delimiter, + file_header_info, + quote_character, + quote_escape_character, + record_delimiter, + }) + } } impl SerializeContent for CSVOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.field_delimiter { -s.content("FieldDelimiter", val)?; -} -if let Some(ref val) = self.quote_character { -s.content("QuoteCharacter", val)?; -} -if let Some(ref val) = self.quote_escape_character { -s.content("QuoteEscapeCharacter", val)?; -} -if let Some(ref val) = self.quote_fields { -s.content("QuoteFields", val)?; -} -if let Some(ref val) = self.record_delimiter { -s.content("RecordDelimiter", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.field_delimiter { + s.content("FieldDelimiter", val)?; + } + if let Some(ref val) = self.quote_character { + s.content("QuoteCharacter", val)?; + } + if let Some(ref val) = self.quote_escape_character { + s.content("QuoteEscapeCharacter", val)?; + } + if let Some(ref val) = self.quote_fields { + s.content("QuoteFields", val)?; + } + if let Some(ref val) = self.record_delimiter { + s.content("RecordDelimiter", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CSVOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut field_delimiter: Option = None; -let mut quote_character: Option = None; -let mut quote_escape_character: Option = None; -let mut quote_fields: Option = None; -let mut record_delimiter: Option = None; -d.for_each_element(|d, x| match x { -b"FieldDelimiter" => { -if field_delimiter.is_some() { return Err(DeError::DuplicateField); } -field_delimiter = Some(d.content()?); -Ok(()) -} -b"QuoteCharacter" => { -if quote_character.is_some() { return Err(DeError::DuplicateField); } -quote_character = Some(d.content()?); -Ok(()) -} -b"QuoteEscapeCharacter" => { -if quote_escape_character.is_some() { return Err(DeError::DuplicateField); } -quote_escape_character = Some(d.content()?); -Ok(()) -} -b"QuoteFields" => { -if quote_fields.is_some() { return Err(DeError::DuplicateField); } -quote_fields = Some(d.content()?); -Ok(()) -} -b"RecordDelimiter" => { -if record_delimiter.is_some() { return Err(DeError::DuplicateField); } -record_delimiter = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -field_delimiter, -quote_character, -quote_escape_character, -quote_fields, -record_delimiter, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut field_delimiter: Option = None; + let mut quote_character: Option = None; + let mut quote_escape_character: Option = None; + let mut quote_fields: Option = None; + let mut record_delimiter: Option = None; + d.for_each_element(|d, x| match x { + b"FieldDelimiter" => { + if field_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + field_delimiter = Some(d.content()?); + Ok(()) + } + b"QuoteCharacter" => { + if quote_character.is_some() { + return Err(DeError::DuplicateField); + } + quote_character = Some(d.content()?); + Ok(()) + } + b"QuoteEscapeCharacter" => { + if quote_escape_character.is_some() { + return Err(DeError::DuplicateField); + } + quote_escape_character = Some(d.content()?); + Ok(()) + } + b"QuoteFields" => { + if quote_fields.is_some() { + return Err(DeError::DuplicateField); + } + quote_fields = Some(d.content()?); + Ok(()) + } + b"RecordDelimiter" => { + if record_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + record_delimiter = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + field_delimiter, + quote_character, + quote_escape_character, + quote_fields, + record_delimiter, + }) + } } impl SerializeContent for Checksum { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Checksum { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut checksum_type: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -checksum_type, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut checksum_type: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + checksum_type, + }) + } } impl SerializeContent for ChecksumAlgorithm { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ChecksumAlgorithm { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"CRC32" => Ok(Self::from_static(ChecksumAlgorithm::CRC32)), -b"CRC32C" => Ok(Self::from_static(ChecksumAlgorithm::CRC32C)), -b"CRC64NVME" => Ok(Self::from_static(ChecksumAlgorithm::CRC64NVME)), -b"SHA1" => Ok(Self::from_static(ChecksumAlgorithm::SHA1)), -b"SHA256" => Ok(Self::from_static(ChecksumAlgorithm::SHA256)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"CRC32" => Ok(Self::from_static(ChecksumAlgorithm::CRC32)), + b"CRC32C" => Ok(Self::from_static(ChecksumAlgorithm::CRC32C)), + b"CRC64NVME" => Ok(Self::from_static(ChecksumAlgorithm::CRC64NVME)), + b"SHA1" => Ok(Self::from_static(ChecksumAlgorithm::SHA1)), + b"SHA256" => Ok(Self::from_static(ChecksumAlgorithm::SHA256)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ChecksumType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ChecksumType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"COMPOSITE" => Ok(Self::from_static(ChecksumType::COMPOSITE)), -b"FULL_OBJECT" => Ok(Self::from_static(ChecksumType::FULL_OBJECT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"COMPOSITE" => Ok(Self::from_static(ChecksumType::COMPOSITE)), + b"FULL_OBJECT" => Ok(Self::from_static(ChecksumType::FULL_OBJECT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for CommonPrefix { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CommonPrefix { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix }) + } } impl SerializeContent for CompleteMultipartUploadOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.location { -s.content("Location", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.location { + s.content("Location", val)?; + } + Ok(()) + } } impl SerializeContent for CompletedMultipartUpload { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.parts { -s.flattened_list("Part", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.parts { + s.flattened_list("Part", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CompletedMultipartUpload { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut parts: Option = None; -d.for_each_element(|d, x| match x { -b"Part" => { -let ans: CompletedPart = d.content()?; -parts.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -parts, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut parts: Option = None; + d.for_each_element(|d, x| match x { + b"Part" => { + let ans: CompletedPart = d.content()?; + parts.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { parts }) + } } impl SerializeContent for CompletedPart { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.part_number { -s.content("PartNumber", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.part_number { + s.content("PartNumber", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CompletedPart { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut e_tag: Option = None; -let mut part_number: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"PartNumber" => { -if part_number.is_some() { return Err(DeError::DuplicateField); } -part_number = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -e_tag, -part_number, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut e_tag: Option = None; + let mut part_number: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"PartNumber" => { + if part_number.is_some() { + return Err(DeError::DuplicateField); + } + part_number = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + e_tag, + part_number, + }) + } } impl SerializeContent for CompressionType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for CompressionType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"BZIP2" => Ok(Self::from_static(CompressionType::BZIP2)), -b"GZIP" => Ok(Self::from_static(CompressionType::GZIP)), -b"NONE" => Ok(Self::from_static(CompressionType::NONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"BZIP2" => Ok(Self::from_static(CompressionType::BZIP2)), + b"GZIP" => Ok(Self::from_static(CompressionType::GZIP)), + b"NONE" => Ok(Self::from_static(CompressionType::NONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Condition { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.http_error_code_returned_equals { -s.content("HttpErrorCodeReturnedEquals", val)?; -} -if let Some(ref val) = self.key_prefix_equals { -s.content("KeyPrefixEquals", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.http_error_code_returned_equals { + s.content("HttpErrorCodeReturnedEquals", val)?; + } + if let Some(ref val) = self.key_prefix_equals { + s.content("KeyPrefixEquals", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Condition { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut http_error_code_returned_equals: Option = None; -let mut key_prefix_equals: Option = None; -d.for_each_element(|d, x| match x { -b"HttpErrorCodeReturnedEquals" => { -if http_error_code_returned_equals.is_some() { return Err(DeError::DuplicateField); } -http_error_code_returned_equals = Some(d.content()?); -Ok(()) -} -b"KeyPrefixEquals" => { -if key_prefix_equals.is_some() { return Err(DeError::DuplicateField); } -key_prefix_equals = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -http_error_code_returned_equals, -key_prefix_equals, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut http_error_code_returned_equals: Option = None; + let mut key_prefix_equals: Option = None; + d.for_each_element(|d, x| match x { + b"HttpErrorCodeReturnedEquals" => { + if http_error_code_returned_equals.is_some() { + return Err(DeError::DuplicateField); + } + http_error_code_returned_equals = Some(d.content()?); + Ok(()) + } + b"KeyPrefixEquals" => { + if key_prefix_equals.is_some() { + return Err(DeError::DuplicateField); + } + key_prefix_equals = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + http_error_code_returned_equals, + key_prefix_equals, + }) + } } impl SerializeContent for CopyObjectResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CopyObjectResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut checksum_type: Option = None; -let mut e_tag: Option = None; -let mut last_modified: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -checksum_type, -e_tag, -last_modified, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut checksum_type: Option = None; + let mut e_tag: Option = None; + let mut last_modified: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + checksum_type, + e_tag, + last_modified, + }) + } } impl SerializeContent for CopyPartResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CopyPartResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut e_tag: Option = None; -let mut last_modified: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -e_tag, -last_modified, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut e_tag: Option = None; + let mut last_modified: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + e_tag, + last_modified, + }) + } } impl SerializeContent for CreateBucketConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(ref val) = self.location { -s.content("Location", val)?; -} -if let Some(ref val) = self.location_constraint { -s.content("LocationConstraint", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(ref val) = self.location { + s.content("Location", val)?; + } + if let Some(ref val) = self.location_constraint { + s.content("LocationConstraint", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for CreateBucketConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bucket: Option = None; -let mut location: Option = None; -let mut location_constraint: Option = None; -d.for_each_element(|d, x| match x { -b"Bucket" => { -if bucket.is_some() { return Err(DeError::DuplicateField); } -bucket = Some(d.content()?); -Ok(()) -} -b"Location" => { -if location.is_some() { return Err(DeError::DuplicateField); } -location = Some(d.content()?); -Ok(()) -} -b"LocationConstraint" => { -if location_constraint.is_some() { return Err(DeError::DuplicateField); } -location_constraint = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bucket, -location, -location_constraint, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bucket: Option = None; + let mut location: Option = None; + let mut location_constraint: Option = None; + d.for_each_element(|d, x| match x { + b"Bucket" => { + if bucket.is_some() { + return Err(DeError::DuplicateField); + } + bucket = Some(d.content()?); + Ok(()) + } + b"Location" => { + if location.is_some() { + return Err(DeError::DuplicateField); + } + location = Some(d.content()?); + Ok(()) + } + b"LocationConstraint" => { + if location_constraint.is_some() { + return Err(DeError::DuplicateField); + } + location_constraint = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bucket, + location, + location_constraint, + }) + } } impl SerializeContent for CreateMultipartUploadOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.upload_id { -s.content("UploadId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.upload_id { + s.content("UploadId", val)?; + } + Ok(()) + } } impl SerializeContent for CreateSessionOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Credentials", &self.credentials)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Credentials", &self.credentials)?; + Ok(()) + } } impl SerializeContent for Credentials { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("AccessKeyId", &self.access_key_id)?; -s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; -s.content("SecretAccessKey", &self.secret_access_key)?; -s.content("SessionToken", &self.session_token)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("AccessKeyId", &self.access_key_id)?; + s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; + s.content("SecretAccessKey", &self.secret_access_key)?; + s.content("SessionToken", &self.session_token)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Credentials { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_key_id: Option = None; -let mut expiration: Option = None; -let mut secret_access_key: Option = None; -let mut session_token: Option = None; -d.for_each_element(|d, x| match x { -b"AccessKeyId" => { -if access_key_id.is_some() { return Err(DeError::DuplicateField); } -access_key_id = Some(d.content()?); -Ok(()) -} -b"Expiration" => { -if expiration.is_some() { return Err(DeError::DuplicateField); } -expiration = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"SecretAccessKey" => { -if secret_access_key.is_some() { return Err(DeError::DuplicateField); } -secret_access_key = Some(d.content()?); -Ok(()) -} -b"SessionToken" => { -if session_token.is_some() { return Err(DeError::DuplicateField); } -session_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_key_id: access_key_id.ok_or(DeError::MissingField)?, -expiration: expiration.ok_or(DeError::MissingField)?, -secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, -session_token: session_token.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_key_id: Option = None; + let mut expiration: Option = None; + let mut secret_access_key: Option = None; + let mut session_token: Option = None; + d.for_each_element(|d, x| match x { + b"AccessKeyId" => { + if access_key_id.is_some() { + return Err(DeError::DuplicateField); + } + access_key_id = Some(d.content()?); + Ok(()) + } + b"Expiration" => { + if expiration.is_some() { + return Err(DeError::DuplicateField); + } + expiration = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"SecretAccessKey" => { + if secret_access_key.is_some() { + return Err(DeError::DuplicateField); + } + secret_access_key = Some(d.content()?); + Ok(()) + } + b"SessionToken" => { + if session_token.is_some() { + return Err(DeError::DuplicateField); + } + session_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_key_id: access_key_id.ok_or(DeError::MissingField)?, + expiration: expiration.ok_or(DeError::MissingField)?, + secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, + session_token: session_token.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for DataRedundancy { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for DataRedundancy { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"SingleAvailabilityZone" => Ok(Self::from_static(DataRedundancy::SINGLE_AVAILABILITY_ZONE)), -b"SingleLocalZone" => Ok(Self::from_static(DataRedundancy::SINGLE_LOCAL_ZONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"SingleAvailabilityZone" => Ok(Self::from_static(DataRedundancy::SINGLE_AVAILABILITY_ZONE)), + b"SingleLocalZone" => Ok(Self::from_static(DataRedundancy::SINGLE_LOCAL_ZONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for DefaultRetention { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -if let Some(ref val) = self.mode { -s.content("Mode", val)?; -} -if let Some(ref val) = self.years { -s.content("Years", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + if let Some(ref val) = self.mode { + s.content("Mode", val)?; + } + if let Some(ref val) = self.years { + s.content("Years", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DefaultRetention { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut days: Option = None; -let mut mode: Option = None; -let mut years: Option = None; -d.for_each_element(|d, x| match x { -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -b"Mode" => { -if mode.is_some() { return Err(DeError::DuplicateField); } -mode = Some(d.content()?); -Ok(()) -} -b"Years" => { -if years.is_some() { return Err(DeError::DuplicateField); } -years = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -days, -mode, -years, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut days: Option = None; + let mut mode: Option = None; + let mut years: Option = None; + d.for_each_element(|d, x| match x { + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + b"Mode" => { + if mode.is_some() { + return Err(DeError::DuplicateField); + } + mode = Some(d.content()?); + Ok(()) + } + b"Years" => { + if years.is_some() { + return Err(DeError::DuplicateField); + } + years = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { days, mode, years }) + } } impl SerializeContent for DelMarkerExpiration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DelMarkerExpiration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut days: Option = None; -d.for_each_element(|d, x| match x { -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -days, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut days: Option = None; + d.for_each_element(|d, x| match x { + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { days }) + } } impl SerializeContent for Delete { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.objects; -s.flattened_list("Object", iter)?; -} -if let Some(ref val) = self.quiet { -s.content("Quiet", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.objects; + s.flattened_list("Object", iter)?; + } + if let Some(ref val) = self.quiet { + s.content("Quiet", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Delete { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut objects: Option = None; -let mut quiet: Option = None; -d.for_each_element(|d, x| match x { -b"Object" => { -let ans: ObjectIdentifier = d.content()?; -objects.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Quiet" => { -if quiet.is_some() { return Err(DeError::DuplicateField); } -quiet = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -objects: objects.ok_or(DeError::MissingField)?, -quiet, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut objects: Option = None; + let mut quiet: Option = None; + d.for_each_element(|d, x| match x { + b"Object" => { + let ans: ObjectIdentifier = d.content()?; + objects.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Quiet" => { + if quiet.is_some() { + return Err(DeError::DuplicateField); + } + quiet = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + objects: objects.ok_or(DeError::MissingField)?, + quiet, + }) + } } impl SerializeContent for DeleteMarkerEntry { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.is_latest { -s.content("IsLatest", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.is_latest { + s.content("IsLatest", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DeleteMarkerEntry { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut is_latest: Option = None; -let mut key: Option = None; -let mut last_modified: Option = None; -let mut owner: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"IsLatest" => { -if is_latest.is_some() { return Err(DeError::DuplicateField); } -is_latest = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -is_latest, -key, -last_modified, -owner, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut is_latest: Option = None; + let mut key: Option = None; + let mut last_modified: Option = None; + let mut owner: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"IsLatest" => { + if is_latest.is_some() { + return Err(DeError::DuplicateField); + } + is_latest = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + is_latest, + key, + last_modified, + owner, + version_id, + }) + } } impl SerializeContent for DeleteMarkerReplication { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DeleteMarkerReplication { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { status }) + } } impl SerializeContent for DeleteMarkerReplicationStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for DeleteMarkerReplicationStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(DeleteMarkerReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for DeleteObjectsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.deleted { -s.flattened_list("Deleted", iter)?; -} -if let Some(iter) = &self.errors { -s.flattened_list("Error", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.deleted { + s.flattened_list("Deleted", iter)?; + } + if let Some(iter) = &self.errors { + s.flattened_list("Error", iter)?; + } + Ok(()) + } } impl SerializeContent for DeleteReplication { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DeleteReplication { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for DeleteReplicationStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for DeleteReplicationStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(DeleteReplicationStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(DeleteReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(DeleteReplicationStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(DeleteReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for DeletedObject { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.delete_marker { -s.content("DeleteMarker", val)?; -} -if let Some(ref val) = self.delete_marker_version_id { -s.content("DeleteMarkerVersionId", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.delete_marker { + s.content("DeleteMarker", val)?; + } + if let Some(ref val) = self.delete_marker_version_id { + s.content("DeleteMarkerVersionId", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for DeletedObject { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut delete_marker: Option = None; -let mut delete_marker_version_id: Option = None; -let mut key: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"DeleteMarker" => { -if delete_marker.is_some() { return Err(DeError::DuplicateField); } -delete_marker = Some(d.content()?); -Ok(()) -} -b"DeleteMarkerVersionId" => { -if delete_marker_version_id.is_some() { return Err(DeError::DuplicateField); } -delete_marker_version_id = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -delete_marker, -delete_marker_version_id, -key, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut delete_marker: Option = None; + let mut delete_marker_version_id: Option = None; + let mut key: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"DeleteMarker" => { + if delete_marker.is_some() { + return Err(DeError::DuplicateField); + } + delete_marker = Some(d.content()?); + Ok(()) + } + b"DeleteMarkerVersionId" => { + if delete_marker_version_id.is_some() { + return Err(DeError::DuplicateField); + } + delete_marker_version_id = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + delete_marker, + delete_marker_version_id, + key, + version_id, + }) + } } impl SerializeContent for Destination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.access_control_translation { -s.content("AccessControlTranslation", val)?; -} -if let Some(ref val) = self.account { -s.content("Account", val)?; -} -s.content("Bucket", &self.bucket)?; -if let Some(ref val) = self.encryption_configuration { -s.content("EncryptionConfiguration", val)?; -} -if let Some(ref val) = self.metrics { -s.content("Metrics", val)?; -} -if let Some(ref val) = self.replication_time { -s.content("ReplicationTime", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.access_control_translation { + s.content("AccessControlTranslation", val)?; + } + if let Some(ref val) = self.account { + s.content("Account", val)?; + } + s.content("Bucket", &self.bucket)?; + if let Some(ref val) = self.encryption_configuration { + s.content("EncryptionConfiguration", val)?; + } + if let Some(ref val) = self.metrics { + s.content("Metrics", val)?; + } + if let Some(ref val) = self.replication_time { + s.content("ReplicationTime", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Destination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_control_translation: Option = None; -let mut account: Option = None; -let mut bucket: Option = None; -let mut encryption_configuration: Option = None; -let mut metrics: Option = None; -let mut replication_time: Option = None; -let mut storage_class: Option = None; -d.for_each_element(|d, x| match x { -b"AccessControlTranslation" => { -if access_control_translation.is_some() { return Err(DeError::DuplicateField); } -access_control_translation = Some(d.content()?); -Ok(()) -} -b"Account" => { -if account.is_some() { return Err(DeError::DuplicateField); } -account = Some(d.content()?); -Ok(()) -} -b"Bucket" => { -if bucket.is_some() { return Err(DeError::DuplicateField); } -bucket = Some(d.content()?); -Ok(()) -} -b"EncryptionConfiguration" => { -if encryption_configuration.is_some() { return Err(DeError::DuplicateField); } -encryption_configuration = Some(d.content()?); -Ok(()) -} -b"Metrics" => { -if metrics.is_some() { return Err(DeError::DuplicateField); } -metrics = Some(d.content()?); -Ok(()) -} -b"ReplicationTime" => { -if replication_time.is_some() { return Err(DeError::DuplicateField); } -replication_time = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_control_translation, -account, -bucket: bucket.ok_or(DeError::MissingField)?, -encryption_configuration, -metrics, -replication_time, -storage_class, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_control_translation: Option = None; + let mut account: Option = None; + let mut bucket: Option = None; + let mut encryption_configuration: Option = None; + let mut metrics: Option = None; + let mut replication_time: Option = None; + let mut storage_class: Option = None; + d.for_each_element(|d, x| match x { + b"AccessControlTranslation" => { + if access_control_translation.is_some() { + return Err(DeError::DuplicateField); + } + access_control_translation = Some(d.content()?); + Ok(()) + } + b"Account" => { + if account.is_some() { + return Err(DeError::DuplicateField); + } + account = Some(d.content()?); + Ok(()) + } + b"Bucket" => { + if bucket.is_some() { + return Err(DeError::DuplicateField); + } + bucket = Some(d.content()?); + Ok(()) + } + b"EncryptionConfiguration" => { + if encryption_configuration.is_some() { + return Err(DeError::DuplicateField); + } + encryption_configuration = Some(d.content()?); + Ok(()) + } + b"Metrics" => { + if metrics.is_some() { + return Err(DeError::DuplicateField); + } + metrics = Some(d.content()?); + Ok(()) + } + b"ReplicationTime" => { + if replication_time.is_some() { + return Err(DeError::DuplicateField); + } + replication_time = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_control_translation, + account, + bucket: bucket.ok_or(DeError::MissingField)?, + encryption_configuration, + metrics, + replication_time, + storage_class, + }) + } } impl SerializeContent for EncodingType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for EncodingType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"url" => Ok(Self::from_static(EncodingType::URL)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"url" => Ok(Self::from_static(EncodingType::URL)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Encryption { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("EncryptionType", &self.encryption_type)?; -if let Some(ref val) = self.kms_context { -s.content("KMSContext", val)?; -} -if let Some(ref val) = self.kms_key_id { -s.content("KMSKeyId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("EncryptionType", &self.encryption_type)?; + if let Some(ref val) = self.kms_context { + s.content("KMSContext", val)?; + } + if let Some(ref val) = self.kms_key_id { + s.content("KMSKeyId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Encryption { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut encryption_type: Option = None; -let mut kms_context: Option = None; -let mut kms_key_id: Option = None; -d.for_each_element(|d, x| match x { -b"EncryptionType" => { -if encryption_type.is_some() { return Err(DeError::DuplicateField); } -encryption_type = Some(d.content()?); -Ok(()) -} -b"KMSContext" => { -if kms_context.is_some() { return Err(DeError::DuplicateField); } -kms_context = Some(d.content()?); -Ok(()) -} -b"KMSKeyId" => { -if kms_key_id.is_some() { return Err(DeError::DuplicateField); } -kms_key_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -encryption_type: encryption_type.ok_or(DeError::MissingField)?, -kms_context, -kms_key_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut encryption_type: Option = None; + let mut kms_context: Option = None; + let mut kms_key_id: Option = None; + d.for_each_element(|d, x| match x { + b"EncryptionType" => { + if encryption_type.is_some() { + return Err(DeError::DuplicateField); + } + encryption_type = Some(d.content()?); + Ok(()) + } + b"KMSContext" => { + if kms_context.is_some() { + return Err(DeError::DuplicateField); + } + kms_context = Some(d.content()?); + Ok(()) + } + b"KMSKeyId" => { + if kms_key_id.is_some() { + return Err(DeError::DuplicateField); + } + kms_key_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + encryption_type: encryption_type.ok_or(DeError::MissingField)?, + kms_context, + kms_key_id, + }) + } } impl SerializeContent for EncryptionConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.replica_kms_key_id { -s.content("ReplicaKmsKeyID", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.replica_kms_key_id { + s.content("ReplicaKmsKeyID", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for EncryptionConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut replica_kms_key_id: Option = None; -d.for_each_element(|d, x| match x { -b"ReplicaKmsKeyID" => { -if replica_kms_key_id.is_some() { return Err(DeError::DuplicateField); } -replica_kms_key_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -replica_kms_key_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut replica_kms_key_id: Option = None; + d.for_each_element(|d, x| match x { + b"ReplicaKmsKeyID" => { + if replica_kms_key_id.is_some() { + return Err(DeError::DuplicateField); + } + replica_kms_key_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { replica_kms_key_id }) + } } impl SerializeContent for Error { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.code { -s.content("Code", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.message { -s.content("Message", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.code { + s.content("Code", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.message { + s.content("Message", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Error { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut code: Option = None; -let mut key: Option = None; -let mut message: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"Code" => { -if code.is_some() { return Err(DeError::DuplicateField); } -code = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"Message" => { -if message.is_some() { return Err(DeError::DuplicateField); } -message = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -code, -key, -message, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut code: Option = None; + let mut key: Option = None; + let mut message: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"Code" => { + if code.is_some() { + return Err(DeError::DuplicateField); + } + code = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"Message" => { + if message.is_some() { + return Err(DeError::DuplicateField); + } + message = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + code, + key, + message, + version_id, + }) + } } impl SerializeContent for ErrorDetails { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.error_code { -s.content("ErrorCode", val)?; -} -if let Some(ref val) = self.error_message { -s.content("ErrorMessage", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.error_code { + s.content("ErrorCode", val)?; + } + if let Some(ref val) = self.error_message { + s.content("ErrorMessage", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ErrorDetails { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut error_code: Option = None; -let mut error_message: Option = None; -d.for_each_element(|d, x| match x { -b"ErrorCode" => { -if error_code.is_some() { return Err(DeError::DuplicateField); } -error_code = Some(d.content()?); -Ok(()) -} -b"ErrorMessage" => { -if error_message.is_some() { return Err(DeError::DuplicateField); } -error_message = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -error_code, -error_message, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut error_code: Option = None; + let mut error_message: Option = None; + d.for_each_element(|d, x| match x { + b"ErrorCode" => { + if error_code.is_some() { + return Err(DeError::DuplicateField); + } + error_code = Some(d.content()?); + Ok(()) + } + b"ErrorMessage" => { + if error_message.is_some() { + return Err(DeError::DuplicateField); + } + error_message = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + error_code, + error_message, + }) + } } impl SerializeContent for ErrorDocument { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Key", &self.key)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Key", &self.key)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ErrorDocument { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut key: Option = None; -d.for_each_element(|d, x| match x { -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -key: key.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut key: Option = None; + d.for_each_element(|d, x| match x { + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + key: key.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for EventBridgeConfiguration { -fn serialize_content(&self, _: &mut Serializer) -> SerResult { -Ok(()) -} + fn serialize_content(&self, _: &mut Serializer) -> SerResult { + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for EventBridgeConfiguration { -fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { -Ok(Self { -}) -} + fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { + Ok(Self {}) + } } impl SerializeContent for ExcludedPrefix { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ExcludedPrefix { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix }) + } } impl SerializeContent for ExistingObjectReplication { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ExistingObjectReplication { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ExistingObjectReplicationStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ExistingObjectReplicationStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ExistingObjectReplicationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ExpirationStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ExpirationStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ExpirationStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ExpirationStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ExpirationStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ExpirationStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ExpressionType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ExpressionType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"SQL" => Ok(Self::from_static(ExpressionType::SQL)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"SQL" => Ok(Self::from_static(ExpressionType::SQL)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for FileHeaderInfo { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for FileHeaderInfo { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"IGNORE" => Ok(Self::from_static(FileHeaderInfo::IGNORE)), -b"NONE" => Ok(Self::from_static(FileHeaderInfo::NONE)), -b"USE" => Ok(Self::from_static(FileHeaderInfo::USE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"IGNORE" => Ok(Self::from_static(FileHeaderInfo::IGNORE)), + b"NONE" => Ok(Self::from_static(FileHeaderInfo::NONE)), + b"USE" => Ok(Self::from_static(FileHeaderInfo::USE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for FilterRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.value { -s.content("Value", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.value { + s.content("Value", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for FilterRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut name: Option = None; -let mut value: Option = None; -d.for_each_element(|d, x| match x { -b"Name" => { -if name.is_some() { return Err(DeError::DuplicateField); } -name = Some(d.content()?); -Ok(()) -} -b"Value" => { -if value.is_some() { return Err(DeError::DuplicateField); } -value = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -name, -value, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut name: Option = None; + let mut value: Option = None; + d.for_each_element(|d, x| match x { + b"Name" => { + if name.is_some() { + return Err(DeError::DuplicateField); + } + name = Some(d.content()?); + Ok(()) + } + b"Value" => { + if value.is_some() { + return Err(DeError::DuplicateField); + } + value = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { name, value }) + } } impl SerializeContent for FilterRuleName { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for FilterRuleName { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"prefix" => Ok(Self::from_static(FilterRuleName::PREFIX)), -b"suffix" => Ok(Self::from_static(FilterRuleName::SUFFIX)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"prefix" => Ok(Self::from_static(FilterRuleName::PREFIX)), + b"suffix" => Ok(Self::from_static(FilterRuleName::SUFFIX)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for GetBucketAccelerateConfigurationOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl SerializeContent for GetBucketAclOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.grants { -s.list("AccessControlList", "Grant", iter)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.grants { + s.list("AccessControlList", "Grant", iter)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketAclOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut grants: Option = None; -let mut owner: Option = None; -d.for_each_element(|d, x| match x { -b"AccessControlList" => { -if grants.is_some() { return Err(DeError::DuplicateField); } -grants = Some(d.list_content("Grant")?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -grants, -owner, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut grants: Option = None; + let mut owner: Option = None; + d.for_each_element(|d, x| match x { + b"AccessControlList" => { + if grants.is_some() { + return Err(DeError::DuplicateField); + } + grants = Some(d.list_content("Grant")?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { grants, owner }) + } } impl SerializeContent for GetBucketCorsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.cors_rules { -s.flattened_list("CORSRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.cors_rules { + s.flattened_list("CORSRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketCorsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut cors_rules: Option = None; -d.for_each_element(|d, x| match x { -b"CORSRule" => { -let ans: CORSRule = d.content()?; -cors_rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -cors_rules, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut cors_rules: Option = None; + d.for_each_element(|d, x| match x { + b"CORSRule" => { + let ans: CORSRule = d.content()?; + cors_rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { cors_rules }) + } } impl SerializeContent for GetBucketLifecycleConfigurationOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.rules { -s.flattened_list("Rule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.rules { + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } impl SerializeContent for GetBucketLocationOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.location_constraint { -s.content("LocationConstraint", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.location_constraint { + s.content("LocationConstraint", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketLocationOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut location_constraint: Option = None; -d.for_each_element(|d, x| match x { -b"LocationConstraint" => { -if location_constraint.is_some() { return Err(DeError::DuplicateField); } -location_constraint = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -location_constraint, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut location_constraint: Option = None; + d.for_each_element(|d, x| match x { + b"LocationConstraint" => { + if location_constraint.is_some() { + return Err(DeError::DuplicateField); + } + location_constraint = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { location_constraint }) + } } impl SerializeContent for GetBucketLoggingOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.logging_enabled { -s.content("LoggingEnabled", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.logging_enabled { + s.content("LoggingEnabled", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketLoggingOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut logging_enabled: Option = None; -d.for_each_element(|d, x| match x { -b"LoggingEnabled" => { -if logging_enabled.is_some() { return Err(DeError::DuplicateField); } -logging_enabled = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -logging_enabled, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut logging_enabled: Option = None; + d.for_each_element(|d, x| match x { + b"LoggingEnabled" => { + if logging_enabled.is_some() { + return Err(DeError::DuplicateField); + } + logging_enabled = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { logging_enabled }) + } } impl SerializeContent for GetBucketMetadataTableConfigurationResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.error { -s.content("Error", val)?; -} -s.content("MetadataTableConfigurationResult", &self.metadata_table_configuration_result)?; -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.error { + s.content("Error", val)?; + } + s.content("MetadataTableConfigurationResult", &self.metadata_table_configuration_result)?; + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketMetadataTableConfigurationResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut error: Option = None; -let mut metadata_table_configuration_result: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Error" => { -if error.is_some() { return Err(DeError::DuplicateField); } -error = Some(d.content()?); -Ok(()) -} -b"MetadataTableConfigurationResult" => { -if metadata_table_configuration_result.is_some() { return Err(DeError::DuplicateField); } -metadata_table_configuration_result = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -error, -metadata_table_configuration_result: metadata_table_configuration_result.ok_or(DeError::MissingField)?, -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut error: Option = None; + let mut metadata_table_configuration_result: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Error" => { + if error.is_some() { + return Err(DeError::DuplicateField); + } + error = Some(d.content()?); + Ok(()) + } + b"MetadataTableConfigurationResult" => { + if metadata_table_configuration_result.is_some() { + return Err(DeError::DuplicateField); + } + metadata_table_configuration_result = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + error, + metadata_table_configuration_result: metadata_table_configuration_result.ok_or(DeError::MissingField)?, + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for GetBucketNotificationConfigurationOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.event_bridge_configuration { -s.content("EventBridgeConfiguration", val)?; -} -if let Some(iter) = &self.lambda_function_configurations { -s.flattened_list("CloudFunctionConfiguration", iter)?; -} -if let Some(iter) = &self.queue_configurations { -s.flattened_list("QueueConfiguration", iter)?; -} -if let Some(iter) = &self.topic_configurations { -s.flattened_list("TopicConfiguration", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.event_bridge_configuration { + s.content("EventBridgeConfiguration", val)?; + } + if let Some(iter) = &self.lambda_function_configurations { + s.flattened_list("CloudFunctionConfiguration", iter)?; + } + if let Some(iter) = &self.queue_configurations { + s.flattened_list("QueueConfiguration", iter)?; + } + if let Some(iter) = &self.topic_configurations { + s.flattened_list("TopicConfiguration", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketNotificationConfigurationOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut event_bridge_configuration: Option = None; -let mut lambda_function_configurations: Option = None; -let mut queue_configurations: Option = None; -let mut topic_configurations: Option = None; -d.for_each_element(|d, x| match x { -b"EventBridgeConfiguration" => { -if event_bridge_configuration.is_some() { return Err(DeError::DuplicateField); } -event_bridge_configuration = Some(d.content()?); -Ok(()) -} -b"CloudFunctionConfiguration" => { -let ans: LambdaFunctionConfiguration = d.content()?; -lambda_function_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"QueueConfiguration" => { -let ans: QueueConfiguration = d.content()?; -queue_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"TopicConfiguration" => { -let ans: TopicConfiguration = d.content()?; -topic_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -event_bridge_configuration, -lambda_function_configurations, -queue_configurations, -topic_configurations, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut event_bridge_configuration: Option = None; + let mut lambda_function_configurations: Option = None; + let mut queue_configurations: Option = None; + let mut topic_configurations: Option = None; + d.for_each_element(|d, x| match x { + b"EventBridgeConfiguration" => { + if event_bridge_configuration.is_some() { + return Err(DeError::DuplicateField); + } + event_bridge_configuration = Some(d.content()?); + Ok(()) + } + b"CloudFunctionConfiguration" => { + let ans: LambdaFunctionConfiguration = d.content()?; + lambda_function_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"QueueConfiguration" => { + let ans: QueueConfiguration = d.content()?; + queue_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"TopicConfiguration" => { + let ans: TopicConfiguration = d.content()?; + topic_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + event_bridge_configuration, + lambda_function_configurations, + queue_configurations, + topic_configurations, + }) + } } impl SerializeContent for GetBucketRequestPaymentOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.payer { -s.content("Payer", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.payer { + s.content("Payer", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketRequestPaymentOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut payer: Option = None; -d.for_each_element(|d, x| match x { -b"Payer" => { -if payer.is_some() { return Err(DeError::DuplicateField); } -payer = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -payer, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut payer: Option = None; + d.for_each_element(|d, x| match x { + b"Payer" => { + if payer.is_some() { + return Err(DeError::DuplicateField); + } + payer = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { payer }) + } } impl SerializeContent for GetBucketTaggingOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.tag_set; -s.list("TagSet", "Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.tag_set; + s.list("TagSet", "Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketTaggingOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut tag_set: Option = None; -d.for_each_element(|d, x| match x { -b"TagSet" => { -if tag_set.is_some() { return Err(DeError::DuplicateField); } -tag_set = Some(d.list_content("Tag")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -tag_set: tag_set.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut tag_set: Option = None; + d.for_each_element(|d, x| match x { + b"TagSet" => { + if tag_set.is_some() { + return Err(DeError::DuplicateField); + } + tag_set = Some(d.list_content("Tag")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + tag_set: tag_set.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for GetBucketVersioningOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.mfa_delete { -s.content("MfaDelete", val)?; -} -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.mfa_delete { + s.content("MfaDelete", val)?; + } + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketVersioningOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut mfa_delete: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"MfaDelete" => { -if mfa_delete.is_some() { return Err(DeError::DuplicateField); } -mfa_delete = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -mfa_delete, -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut mfa_delete: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"MfaDelete" => { + if mfa_delete.is_some() { + return Err(DeError::DuplicateField); + } + mfa_delete = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { mfa_delete, status }) + } } impl SerializeContent for GetBucketWebsiteOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.error_document { -s.content("ErrorDocument", val)?; -} -if let Some(ref val) = self.index_document { -s.content("IndexDocument", val)?; -} -if let Some(ref val) = self.redirect_all_requests_to { -s.content("RedirectAllRequestsTo", val)?; -} -if let Some(iter) = &self.routing_rules { -s.list("RoutingRules", "RoutingRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.error_document { + s.content("ErrorDocument", val)?; + } + if let Some(ref val) = self.index_document { + s.content("IndexDocument", val)?; + } + if let Some(ref val) = self.redirect_all_requests_to { + s.content("RedirectAllRequestsTo", val)?; + } + if let Some(iter) = &self.routing_rules { + s.list("RoutingRules", "RoutingRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetBucketWebsiteOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut error_document: Option = None; -let mut index_document: Option = None; -let mut redirect_all_requests_to: Option = None; -let mut routing_rules: Option = None; -d.for_each_element(|d, x| match x { -b"ErrorDocument" => { -if error_document.is_some() { return Err(DeError::DuplicateField); } -error_document = Some(d.content()?); -Ok(()) -} -b"IndexDocument" => { -if index_document.is_some() { return Err(DeError::DuplicateField); } -index_document = Some(d.content()?); -Ok(()) -} -b"RedirectAllRequestsTo" => { -if redirect_all_requests_to.is_some() { return Err(DeError::DuplicateField); } -redirect_all_requests_to = Some(d.content()?); -Ok(()) -} -b"RoutingRules" => { -if routing_rules.is_some() { return Err(DeError::DuplicateField); } -routing_rules = Some(d.list_content("RoutingRule")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -error_document, -index_document, -redirect_all_requests_to, -routing_rules, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut error_document: Option = None; + let mut index_document: Option = None; + let mut redirect_all_requests_to: Option = None; + let mut routing_rules: Option = None; + d.for_each_element(|d, x| match x { + b"ErrorDocument" => { + if error_document.is_some() { + return Err(DeError::DuplicateField); + } + error_document = Some(d.content()?); + Ok(()) + } + b"IndexDocument" => { + if index_document.is_some() { + return Err(DeError::DuplicateField); + } + index_document = Some(d.content()?); + Ok(()) + } + b"RedirectAllRequestsTo" => { + if redirect_all_requests_to.is_some() { + return Err(DeError::DuplicateField); + } + redirect_all_requests_to = Some(d.content()?); + Ok(()) + } + b"RoutingRules" => { + if routing_rules.is_some() { + return Err(DeError::DuplicateField); + } + routing_rules = Some(d.list_content("RoutingRule")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + error_document, + index_document, + redirect_all_requests_to, + routing_rules, + }) + } } impl SerializeContent for GetObjectAclOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.grants { -s.list("AccessControlList", "Grant", iter)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.grants { + s.list("AccessControlList", "Grant", iter)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + Ok(()) + } } impl SerializeContent for GetObjectAttributesOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum { -s.content("Checksum", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.object_parts { -s.content("ObjectParts", val)?; -} -if let Some(ref val) = self.object_size { -s.content("ObjectSize", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum { + s.content("Checksum", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.object_parts { + s.content("ObjectParts", val)?; + } + if let Some(ref val) = self.object_size { + s.content("ObjectSize", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl SerializeContent for GetObjectAttributesParts { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.max_parts { -s.content("MaxParts", val)?; -} -if let Some(ref val) = self.next_part_number_marker { -s.content("NextPartNumberMarker", val)?; -} -if let Some(ref val) = self.part_number_marker { -s.content("PartNumberMarker", val)?; -} -if let Some(iter) = &self.parts { -s.flattened_list("Part", iter)?; -} -if let Some(ref val) = self.total_parts_count { -s.content("PartsCount", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.max_parts { + s.content("MaxParts", val)?; + } + if let Some(ref val) = self.next_part_number_marker { + s.content("NextPartNumberMarker", val)?; + } + if let Some(ref val) = self.part_number_marker { + s.content("PartNumberMarker", val)?; + } + if let Some(iter) = &self.parts { + s.flattened_list("Part", iter)?; + } + if let Some(ref val) = self.total_parts_count { + s.content("PartsCount", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GetObjectAttributesParts { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut is_truncated: Option = None; -let mut max_parts: Option = None; -let mut next_part_number_marker: Option = None; -let mut part_number_marker: Option = None; -let mut parts: Option = None; -let mut total_parts_count: Option = None; -d.for_each_element(|d, x| match x { -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"MaxParts" => { -if max_parts.is_some() { return Err(DeError::DuplicateField); } -max_parts = Some(d.content()?); -Ok(()) -} -b"NextPartNumberMarker" => { -if next_part_number_marker.is_some() { return Err(DeError::DuplicateField); } -next_part_number_marker = Some(d.content()?); -Ok(()) -} -b"PartNumberMarker" => { -if part_number_marker.is_some() { return Err(DeError::DuplicateField); } -part_number_marker = Some(d.content()?); -Ok(()) -} -b"Part" => { -let ans: ObjectPart = d.content()?; -parts.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"PartsCount" => { -if total_parts_count.is_some() { return Err(DeError::DuplicateField); } -total_parts_count = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -is_truncated, -max_parts, -next_part_number_marker, -part_number_marker, -parts, -total_parts_count, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut is_truncated: Option = None; + let mut max_parts: Option = None; + let mut next_part_number_marker: Option = None; + let mut part_number_marker: Option = None; + let mut parts: Option = None; + let mut total_parts_count: Option = None; + d.for_each_element(|d, x| match x { + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"MaxParts" => { + if max_parts.is_some() { + return Err(DeError::DuplicateField); + } + max_parts = Some(d.content()?); + Ok(()) + } + b"NextPartNumberMarker" => { + if next_part_number_marker.is_some() { + return Err(DeError::DuplicateField); + } + next_part_number_marker = Some(d.content()?); + Ok(()) + } + b"PartNumberMarker" => { + if part_number_marker.is_some() { + return Err(DeError::DuplicateField); + } + part_number_marker = Some(d.content()?); + Ok(()) + } + b"Part" => { + let ans: ObjectPart = d.content()?; + parts.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"PartsCount" => { + if total_parts_count.is_some() { + return Err(DeError::DuplicateField); + } + total_parts_count = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + is_truncated, + max_parts, + next_part_number_marker, + part_number_marker, + parts, + total_parts_count, + }) + } } impl SerializeContent for GetObjectTaggingOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.tag_set; -s.list("TagSet", "Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.tag_set; + s.list("TagSet", "Tag", iter)?; + } + Ok(()) + } } impl SerializeContent for GlacierJobParameters { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Tier", &self.tier)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Tier", &self.tier)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for GlacierJobParameters { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut tier: Option = None; -d.for_each_element(|d, x| match x { -b"Tier" => { -if tier.is_some() { return Err(DeError::DuplicateField); } -tier = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -tier: tier.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut tier: Option = None; + d.for_each_element(|d, x| match x { + b"Tier" => { + if tier.is_some() { + return Err(DeError::DuplicateField); + } + tier = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + tier: tier.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Grant { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.grantee { -let attrs = [ -("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), -("xsi:type", val.type_.as_str()), -]; -s.content_with_attrs("Grantee", &attrs, val)?; -} -if let Some(ref val) = self.permission { -s.content("Permission", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.grantee { + let attrs = [ + ("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), + ("xsi:type", val.type_.as_str()), + ]; + s.content_with_attrs("Grantee", &attrs, val)?; + } + if let Some(ref val) = self.permission { + s.content("Permission", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Grant { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut grantee: Option = None; -let mut permission: Option = None; -d.for_each_element_with_start(|d, x, start| match x { -b"Grantee" => { -if grantee.is_some() { return Err(DeError::DuplicateField); } -let mut type_: Option = None; -for attr in start.attributes() { - let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; - if attr.key.as_ref() == b"xsi:type" { - type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); - } -} -let mut display_name: Option = None; -let mut email_address: Option = None; -let mut id: Option = None; -let mut uri: Option = None; -d.for_each_element(|d, x| match x { -b"DisplayName" => { - if display_name.is_some() { return Err(DeError::DuplicateField); } - display_name = Some(d.content()?); - Ok(()) -} -b"EmailAddress" => { - if email_address.is_some() { return Err(DeError::DuplicateField); } - email_address = Some(d.content()?); - Ok(()) -} -b"ID" => { - if id.is_some() { return Err(DeError::DuplicateField); } - id = Some(d.content()?); - Ok(()) -} -b"URI" => { - if uri.is_some() { return Err(DeError::DuplicateField); } - uri = Some(d.content()?); - Ok(()) -} -_ => Err(DeError::UnexpectedTagName), -})?; -grantee = Some(Grantee { -display_name, -email_address, -id, -type_: type_.ok_or(DeError::MissingField)?, -uri, -}); -Ok(()) -} -b"Permission" => { -if permission.is_some() { return Err(DeError::DuplicateField); } -permission = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -grantee, -permission, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut grantee: Option = None; + let mut permission: Option = None; + d.for_each_element_with_start(|d, x, start| match x { + b"Grantee" => { + if grantee.is_some() { + return Err(DeError::DuplicateField); + } + let mut type_: Option = None; + for attr in start.attributes() { + let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; + if attr.key.as_ref() == b"xsi:type" { + type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); + } + } + let mut display_name: Option = None; + let mut email_address: Option = None; + let mut id: Option = None; + let mut uri: Option = None; + d.for_each_element(|d, x| match x { + b"DisplayName" => { + if display_name.is_some() { + return Err(DeError::DuplicateField); + } + display_name = Some(d.content()?); + Ok(()) + } + b"EmailAddress" => { + if email_address.is_some() { + return Err(DeError::DuplicateField); + } + email_address = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"URI" => { + if uri.is_some() { + return Err(DeError::DuplicateField); + } + uri = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + grantee = Some(Grantee { + display_name, + email_address, + id, + type_: type_.ok_or(DeError::MissingField)?, + uri, + }); + Ok(()) + } + b"Permission" => { + if permission.is_some() { + return Err(DeError::DuplicateField); + } + permission = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { grantee, permission }) + } } impl SerializeContent for Grantee { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.display_name { -s.content("DisplayName", val)?; -} -if let Some(ref val) = self.email_address { -s.content("EmailAddress", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -if let Some(ref val) = self.uri { -s.content("URI", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.display_name { + s.content("DisplayName", val)?; + } + if let Some(ref val) = self.email_address { + s.content("EmailAddress", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + if let Some(ref val) = self.uri { + s.content("URI", val)?; + } + Ok(()) + } } impl SerializeContent for IndexDocument { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Suffix", &self.suffix)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Suffix", &self.suffix)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for IndexDocument { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut suffix: Option = None; -d.for_each_element(|d, x| match x { -b"Suffix" => { -if suffix.is_some() { return Err(DeError::DuplicateField); } -suffix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -suffix: suffix.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut suffix: Option = None; + d.for_each_element(|d, x| match x { + b"Suffix" => { + if suffix.is_some() { + return Err(DeError::DuplicateField); + } + suffix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + suffix: suffix.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Initiator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.display_name { -s.content("DisplayName", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.display_name { + s.content("DisplayName", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Initiator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut display_name: Option = None; -let mut id: Option = None; -d.for_each_element(|d, x| match x { -b"DisplayName" => { -if display_name.is_some() { return Err(DeError::DuplicateField); } -display_name = Some(d.content()?); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -display_name, -id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut display_name: Option = None; + let mut id: Option = None; + d.for_each_element(|d, x| match x { + b"DisplayName" => { + if display_name.is_some() { + return Err(DeError::DuplicateField); + } + display_name = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { display_name, id }) + } } impl SerializeContent for InputSerialization { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.csv { -s.content("CSV", val)?; -} -if let Some(ref val) = self.compression_type { -s.content("CompressionType", val)?; -} -if let Some(ref val) = self.json { -s.content("JSON", val)?; -} -if let Some(ref val) = self.parquet { -s.content("Parquet", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.csv { + s.content("CSV", val)?; + } + if let Some(ref val) = self.compression_type { + s.content("CompressionType", val)?; + } + if let Some(ref val) = self.json { + s.content("JSON", val)?; + } + if let Some(ref val) = self.parquet { + s.content("Parquet", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InputSerialization { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut csv: Option = None; -let mut compression_type: Option = None; -let mut json: Option = None; -let mut parquet: Option = None; -d.for_each_element(|d, x| match x { -b"CSV" => { -if csv.is_some() { return Err(DeError::DuplicateField); } -csv = Some(d.content()?); -Ok(()) -} -b"CompressionType" => { -if compression_type.is_some() { return Err(DeError::DuplicateField); } -compression_type = Some(d.content()?); -Ok(()) -} -b"JSON" => { -if json.is_some() { return Err(DeError::DuplicateField); } -json = Some(d.content()?); -Ok(()) -} -b"Parquet" => { -if parquet.is_some() { return Err(DeError::DuplicateField); } -parquet = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -csv, -compression_type, -json, -parquet, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut csv: Option = None; + let mut compression_type: Option = None; + let mut json: Option = None; + let mut parquet: Option = None; + d.for_each_element(|d, x| match x { + b"CSV" => { + if csv.is_some() { + return Err(DeError::DuplicateField); + } + csv = Some(d.content()?); + Ok(()) + } + b"CompressionType" => { + if compression_type.is_some() { + return Err(DeError::DuplicateField); + } + compression_type = Some(d.content()?); + Ok(()) + } + b"JSON" => { + if json.is_some() { + return Err(DeError::DuplicateField); + } + json = Some(d.content()?); + Ok(()) + } + b"Parquet" => { + if parquet.is_some() { + return Err(DeError::DuplicateField); + } + parquet = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + csv, + compression_type, + json, + parquet, + }) + } } impl SerializeContent for IntelligentTieringAccessTier { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringAccessTier { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::ARCHIVE_ACCESS)), -b"DEEP_ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::DEEP_ARCHIVE_ACCESS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::ARCHIVE_ACCESS)), + b"DEEP_ARCHIVE_ACCESS" => Ok(Self::from_static(IntelligentTieringAccessTier::DEEP_ARCHIVE_ACCESS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for IntelligentTieringAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix, tags }) + } } impl SerializeContent for IntelligentTieringConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -s.content("Id", &self.id)?; -s.content("Status", &self.status)?; -{ -let iter = &self.tierings; -s.flattened_list("Tiering", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + s.content("Id", &self.id)?; + s.content("Status", &self.status)?; + { + let iter = &self.tierings; + s.flattened_list("Tiering", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut filter: Option = None; -let mut id: Option = None; -let mut status: Option = None; -let mut tierings: Option = None; -d.for_each_element(|d, x| match x { -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -b"Tiering" => { -let ans: Tiering = d.content()?; -tierings.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -filter, -id: id.ok_or(DeError::MissingField)?, -status: status.ok_or(DeError::MissingField)?, -tierings: tierings.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut filter: Option = None; + let mut id: Option = None; + let mut status: Option = None; + let mut tierings: Option = None; + d.for_each_element(|d, x| match x { + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + b"Tiering" => { + let ans: Tiering = d.content()?; + tierings.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + filter, + id: id.ok_or(DeError::MissingField)?, + status: status.ok_or(DeError::MissingField)?, + tierings: tierings.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for IntelligentTieringFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.and { -s.content("And", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.tag { -s.content("Tag", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.and { + s.content("And", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.tag { + s.content("Tag", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut and: Option = None; -let mut prefix: Option = None; -let mut tag: Option = None; -d.for_each_element(|d, x| match x { -b"And" => { -if and.is_some() { return Err(DeError::DuplicateField); } -and = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -if tag.is_some() { return Err(DeError::DuplicateField); } -tag = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -and, -prefix, -tag, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut and: Option = None; + let mut prefix: Option = None; + let mut tag: Option = None; + d.for_each_element(|d, x| match x { + b"And" => { + if and.is_some() { + return Err(DeError::DuplicateField); + } + and = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + if tag.is_some() { + return Err(DeError::DuplicateField); + } + tag = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { and, prefix, tag }) + } } impl SerializeContent for IntelligentTieringStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for IntelligentTieringStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(IntelligentTieringStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(IntelligentTieringStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(IntelligentTieringStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(IntelligentTieringStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for InventoryConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Destination", &self.destination)?; -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -s.content("Id", &self.id)?; -s.content("IncludedObjectVersions", &self.included_object_versions)?; -s.content("IsEnabled", &self.is_enabled)?; -if let Some(iter) = &self.optional_fields { -s.list("OptionalFields", "Field", iter)?; -} -s.content("Schedule", &self.schedule)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Destination", &self.destination)?; + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + s.content("Id", &self.id)?; + s.content("IncludedObjectVersions", &self.included_object_versions)?; + s.content("IsEnabled", &self.is_enabled)?; + if let Some(iter) = &self.optional_fields { + s.list("OptionalFields", "Field", iter)?; + } + s.content("Schedule", &self.schedule)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut destination: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut included_object_versions: Option = None; -let mut is_enabled: Option = None; -let mut optional_fields: Option = None; -let mut schedule: Option = None; -d.for_each_element(|d, x| match x { -b"Destination" => { -if destination.is_some() { return Err(DeError::DuplicateField); } -destination = Some(d.content()?); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"IncludedObjectVersions" => { -if included_object_versions.is_some() { return Err(DeError::DuplicateField); } -included_object_versions = Some(d.content()?); -Ok(()) -} -b"IsEnabled" => { -if is_enabled.is_some() { return Err(DeError::DuplicateField); } -is_enabled = Some(d.content()?); -Ok(()) -} -b"OptionalFields" => { -if optional_fields.is_some() { return Err(DeError::DuplicateField); } -optional_fields = Some(d.list_content("Field")?); -Ok(()) -} -b"Schedule" => { -if schedule.is_some() { return Err(DeError::DuplicateField); } -schedule = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -destination: destination.ok_or(DeError::MissingField)?, -filter, -id: id.ok_or(DeError::MissingField)?, -included_object_versions: included_object_versions.ok_or(DeError::MissingField)?, -is_enabled: is_enabled.ok_or(DeError::MissingField)?, -optional_fields, -schedule: schedule.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut destination: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut included_object_versions: Option = None; + let mut is_enabled: Option = None; + let mut optional_fields: Option = None; + let mut schedule: Option = None; + d.for_each_element(|d, x| match x { + b"Destination" => { + if destination.is_some() { + return Err(DeError::DuplicateField); + } + destination = Some(d.content()?); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"IncludedObjectVersions" => { + if included_object_versions.is_some() { + return Err(DeError::DuplicateField); + } + included_object_versions = Some(d.content()?); + Ok(()) + } + b"IsEnabled" => { + if is_enabled.is_some() { + return Err(DeError::DuplicateField); + } + is_enabled = Some(d.content()?); + Ok(()) + } + b"OptionalFields" => { + if optional_fields.is_some() { + return Err(DeError::DuplicateField); + } + optional_fields = Some(d.list_content("Field")?); + Ok(()) + } + b"Schedule" => { + if schedule.is_some() { + return Err(DeError::DuplicateField); + } + schedule = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + destination: destination.ok_or(DeError::MissingField)?, + filter, + id: id.ok_or(DeError::MissingField)?, + included_object_versions: included_object_versions.ok_or(DeError::MissingField)?, + is_enabled: is_enabled.ok_or(DeError::MissingField)?, + optional_fields, + schedule: schedule.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for InventoryDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("S3BucketDestination", &self.s3_bucket_destination)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("S3BucketDestination", &self.s3_bucket_destination)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3_bucket_destination: Option = None; -d.for_each_element(|d, x| match x { -b"S3BucketDestination" => { -if s3_bucket_destination.is_some() { return Err(DeError::DuplicateField); } -s3_bucket_destination = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3_bucket_destination: Option = None; + d.for_each_element(|d, x| match x { + b"S3BucketDestination" => { + if s3_bucket_destination.is_some() { + return Err(DeError::DuplicateField); + } + s3_bucket_destination = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + s3_bucket_destination: s3_bucket_destination.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for InventoryEncryption { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.ssekms { -s.content("SSE-KMS", val)?; -} -if let Some(ref val) = self.sses3 { -s.content("SSE-S3", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.ssekms { + s.content("SSE-KMS", val)?; + } + if let Some(ref val) = self.sses3 { + s.content("SSE-S3", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryEncryption { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut ssekms: Option = None; -let mut sses3: Option = None; -d.for_each_element(|d, x| match x { -b"SSE-KMS" => { -if ssekms.is_some() { return Err(DeError::DuplicateField); } -ssekms = Some(d.content()?); -Ok(()) -} -b"SSE-S3" => { -if sses3.is_some() { return Err(DeError::DuplicateField); } -sses3 = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -ssekms, -sses3, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut ssekms: Option = None; + let mut sses3: Option = None; + d.for_each_element(|d, x| match x { + b"SSE-KMS" => { + if ssekms.is_some() { + return Err(DeError::DuplicateField); + } + ssekms = Some(d.content()?); + Ok(()) + } + b"SSE-S3" => { + if sses3.is_some() { + return Err(DeError::DuplicateField); + } + sses3 = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { ssekms, sses3 }) + } } impl SerializeContent for InventoryFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Prefix", &self.prefix)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Prefix", &self.prefix)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix: prefix.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + prefix: prefix.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for InventoryFormat { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for InventoryFormat { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"CSV" => Ok(Self::from_static(InventoryFormat::CSV)), -b"ORC" => Ok(Self::from_static(InventoryFormat::ORC)), -b"Parquet" => Ok(Self::from_static(InventoryFormat::PARQUET)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"CSV" => Ok(Self::from_static(InventoryFormat::CSV)), + b"ORC" => Ok(Self::from_static(InventoryFormat::ORC)), + b"Parquet" => Ok(Self::from_static(InventoryFormat::PARQUET)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for InventoryFrequency { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for InventoryFrequency { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Daily" => Ok(Self::from_static(InventoryFrequency::DAILY)), -b"Weekly" => Ok(Self::from_static(InventoryFrequency::WEEKLY)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Daily" => Ok(Self::from_static(InventoryFrequency::DAILY)), + b"Weekly" => Ok(Self::from_static(InventoryFrequency::WEEKLY)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for InventoryIncludedObjectVersions { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for InventoryIncludedObjectVersions { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"All" => Ok(Self::from_static(InventoryIncludedObjectVersions::ALL)), -b"Current" => Ok(Self::from_static(InventoryIncludedObjectVersions::CURRENT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"All" => Ok(Self::from_static(InventoryIncludedObjectVersions::ALL)), + b"Current" => Ok(Self::from_static(InventoryIncludedObjectVersions::CURRENT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for InventoryOptionalField { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for InventoryOptionalField { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"BucketKeyStatus" => Ok(Self::from_static(InventoryOptionalField::BUCKET_KEY_STATUS)), -b"ChecksumAlgorithm" => Ok(Self::from_static(InventoryOptionalField::CHECKSUM_ALGORITHM)), -b"ETag" => Ok(Self::from_static(InventoryOptionalField::E_TAG)), -b"EncryptionStatus" => Ok(Self::from_static(InventoryOptionalField::ENCRYPTION_STATUS)), -b"IntelligentTieringAccessTier" => Ok(Self::from_static(InventoryOptionalField::INTELLIGENT_TIERING_ACCESS_TIER)), -b"IsMultipartUploaded" => Ok(Self::from_static(InventoryOptionalField::IS_MULTIPART_UPLOADED)), -b"LastModifiedDate" => Ok(Self::from_static(InventoryOptionalField::LAST_MODIFIED_DATE)), -b"ObjectAccessControlList" => Ok(Self::from_static(InventoryOptionalField::OBJECT_ACCESS_CONTROL_LIST)), -b"ObjectLockLegalHoldStatus" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_LEGAL_HOLD_STATUS)), -b"ObjectLockMode" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_MODE)), -b"ObjectLockRetainUntilDate" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_RETAIN_UNTIL_DATE)), -b"ObjectOwner" => Ok(Self::from_static(InventoryOptionalField::OBJECT_OWNER)), -b"ReplicationStatus" => Ok(Self::from_static(InventoryOptionalField::REPLICATION_STATUS)), -b"Size" => Ok(Self::from_static(InventoryOptionalField::SIZE)), -b"StorageClass" => Ok(Self::from_static(InventoryOptionalField::STORAGE_CLASS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"BucketKeyStatus" => Ok(Self::from_static(InventoryOptionalField::BUCKET_KEY_STATUS)), + b"ChecksumAlgorithm" => Ok(Self::from_static(InventoryOptionalField::CHECKSUM_ALGORITHM)), + b"ETag" => Ok(Self::from_static(InventoryOptionalField::E_TAG)), + b"EncryptionStatus" => Ok(Self::from_static(InventoryOptionalField::ENCRYPTION_STATUS)), + b"IntelligentTieringAccessTier" => Ok(Self::from_static(InventoryOptionalField::INTELLIGENT_TIERING_ACCESS_TIER)), + b"IsMultipartUploaded" => Ok(Self::from_static(InventoryOptionalField::IS_MULTIPART_UPLOADED)), + b"LastModifiedDate" => Ok(Self::from_static(InventoryOptionalField::LAST_MODIFIED_DATE)), + b"ObjectAccessControlList" => Ok(Self::from_static(InventoryOptionalField::OBJECT_ACCESS_CONTROL_LIST)), + b"ObjectLockLegalHoldStatus" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_LEGAL_HOLD_STATUS)), + b"ObjectLockMode" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_MODE)), + b"ObjectLockRetainUntilDate" => Ok(Self::from_static(InventoryOptionalField::OBJECT_LOCK_RETAIN_UNTIL_DATE)), + b"ObjectOwner" => Ok(Self::from_static(InventoryOptionalField::OBJECT_OWNER)), + b"ReplicationStatus" => Ok(Self::from_static(InventoryOptionalField::REPLICATION_STATUS)), + b"Size" => Ok(Self::from_static(InventoryOptionalField::SIZE)), + b"StorageClass" => Ok(Self::from_static(InventoryOptionalField::STORAGE_CLASS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for InventoryS3BucketDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.account_id { -s.content("AccountId", val)?; -} -s.content("Bucket", &self.bucket)?; -if let Some(ref val) = self.encryption { -s.content("Encryption", val)?; -} -s.content("Format", &self.format)?; -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.account_id { + s.content("AccountId", val)?; + } + s.content("Bucket", &self.bucket)?; + if let Some(ref val) = self.encryption { + s.content("Encryption", val)?; + } + s.content("Format", &self.format)?; + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventoryS3BucketDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut account_id: Option = None; -let mut bucket: Option = None; -let mut encryption: Option = None; -let mut format: Option = None; -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"AccountId" => { -if account_id.is_some() { return Err(DeError::DuplicateField); } -account_id = Some(d.content()?); -Ok(()) -} -b"Bucket" => { -if bucket.is_some() { return Err(DeError::DuplicateField); } -bucket = Some(d.content()?); -Ok(()) -} -b"Encryption" => { -if encryption.is_some() { return Err(DeError::DuplicateField); } -encryption = Some(d.content()?); -Ok(()) -} -b"Format" => { -if format.is_some() { return Err(DeError::DuplicateField); } -format = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -account_id, -bucket: bucket.ok_or(DeError::MissingField)?, -encryption, -format: format.ok_or(DeError::MissingField)?, -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut account_id: Option = None; + let mut bucket: Option = None; + let mut encryption: Option = None; + let mut format: Option = None; + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"AccountId" => { + if account_id.is_some() { + return Err(DeError::DuplicateField); + } + account_id = Some(d.content()?); + Ok(()) + } + b"Bucket" => { + if bucket.is_some() { + return Err(DeError::DuplicateField); + } + bucket = Some(d.content()?); + Ok(()) + } + b"Encryption" => { + if encryption.is_some() { + return Err(DeError::DuplicateField); + } + encryption = Some(d.content()?); + Ok(()) + } + b"Format" => { + if format.is_some() { + return Err(DeError::DuplicateField); + } + format = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + account_id, + bucket: bucket.ok_or(DeError::MissingField)?, + encryption, + format: format.ok_or(DeError::MissingField)?, + prefix, + }) + } } impl SerializeContent for InventorySchedule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Frequency", &self.frequency)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Frequency", &self.frequency)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for InventorySchedule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut frequency: Option = None; -d.for_each_element(|d, x| match x { -b"Frequency" => { -if frequency.is_some() { return Err(DeError::DuplicateField); } -frequency = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -frequency: frequency.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut frequency: Option = None; + d.for_each_element(|d, x| match x { + b"Frequency" => { + if frequency.is_some() { + return Err(DeError::DuplicateField); + } + frequency = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + frequency: frequency.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for JSONInput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.type_ { -s.content("Type", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.type_ { + s.content("Type", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for JSONInput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut type_: Option = None; -d.for_each_element(|d, x| match x { -b"Type" => { -if type_.is_some() { return Err(DeError::DuplicateField); } -type_ = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -type_, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut type_: Option = None; + d.for_each_element(|d, x| match x { + b"Type" => { + if type_.is_some() { + return Err(DeError::DuplicateField); + } + type_ = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { type_ }) + } } impl SerializeContent for JSONOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.record_delimiter { -s.content("RecordDelimiter", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.record_delimiter { + s.content("RecordDelimiter", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for JSONOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut record_delimiter: Option = None; -d.for_each_element(|d, x| match x { -b"RecordDelimiter" => { -if record_delimiter.is_some() { return Err(DeError::DuplicateField); } -record_delimiter = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -record_delimiter, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut record_delimiter: Option = None; + d.for_each_element(|d, x| match x { + b"RecordDelimiter" => { + if record_delimiter.is_some() { + return Err(DeError::DuplicateField); + } + record_delimiter = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { record_delimiter }) + } } impl SerializeContent for JSONType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for JSONType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DOCUMENT" => Ok(Self::from_static(JSONType::DOCUMENT)), -b"LINES" => Ok(Self::from_static(JSONType::LINES)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DOCUMENT" => Ok(Self::from_static(JSONType::DOCUMENT)), + b"LINES" => Ok(Self::from_static(JSONType::LINES)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for LambdaFunctionConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.events; -s.flattened_list("Event", iter)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("Id", val)?; -} -s.content("CloudFunction", &self.lambda_function_arn)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.events; + s.flattened_list("Event", iter)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("Id", val)?; + } + s.content("CloudFunction", &self.lambda_function_arn)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LambdaFunctionConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut events: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut lambda_function_arn: Option = None; -d.for_each_element(|d, x| match x { -b"Event" => { -let ans: Event = d.content()?; -events.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"CloudFunction" => { -if lambda_function_arn.is_some() { return Err(DeError::DuplicateField); } -lambda_function_arn = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -events: events.ok_or(DeError::MissingField)?, -filter, -id, -lambda_function_arn: lambda_function_arn.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut events: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut lambda_function_arn: Option = None; + d.for_each_element(|d, x| match x { + b"Event" => { + let ans: Event = d.content()?; + events.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"CloudFunction" => { + if lambda_function_arn.is_some() { + return Err(DeError::DuplicateField); + } + lambda_function_arn = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + events: events.ok_or(DeError::MissingField)?, + filter, + id, + lambda_function_arn: lambda_function_arn.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for LifecycleExpiration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.date { -s.timestamp("Date", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -if let Some(ref val) = self.expired_object_all_versions { -s.content("ExpiredObjectAllVersions", val)?; -} -if let Some(ref val) = self.expired_object_delete_marker { -s.content("ExpiredObjectDeleteMarker", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.date { + s.timestamp("Date", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + if let Some(ref val) = self.expired_object_all_versions { + s.content("ExpiredObjectAllVersions", val)?; + } + if let Some(ref val) = self.expired_object_delete_marker { + s.content("ExpiredObjectDeleteMarker", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LifecycleExpiration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut date: Option = None; -let mut days: Option = None; -let mut expired_object_all_versions: Option = None; -let mut expired_object_delete_marker: Option = None; -d.for_each_element(|d, x| match x { -b"Date" => { -if date.is_some() { return Err(DeError::DuplicateField); } -date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -b"ExpiredObjectAllVersions" => { -if expired_object_all_versions.is_some() { return Err(DeError::DuplicateField); } -expired_object_all_versions = Some(d.content()?); -Ok(()) -} -b"ExpiredObjectDeleteMarker" => { -if expired_object_delete_marker.is_some() { return Err(DeError::DuplicateField); } -expired_object_delete_marker = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -date, -days, -expired_object_all_versions, -expired_object_delete_marker, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut date: Option = None; + let mut days: Option = None; + let mut expired_object_all_versions: Option = None; + let mut expired_object_delete_marker: Option = None; + d.for_each_element(|d, x| match x { + b"Date" => { + if date.is_some() { + return Err(DeError::DuplicateField); + } + date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + b"ExpiredObjectAllVersions" => { + if expired_object_all_versions.is_some() { + return Err(DeError::DuplicateField); + } + expired_object_all_versions = Some(d.content()?); + Ok(()) + } + b"ExpiredObjectDeleteMarker" => { + if expired_object_delete_marker.is_some() { + return Err(DeError::DuplicateField); + } + expired_object_delete_marker = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + date, + days, + expired_object_all_versions, + expired_object_delete_marker, + }) + } } impl SerializeContent for LifecycleRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.abort_incomplete_multipart_upload { -s.content("AbortIncompleteMultipartUpload", val)?; -} -if let Some(ref val) = self.del_marker_expiration { -s.content("DelMarkerExpiration", val)?; -} -if let Some(ref val) = self.expiration { -s.content("Expiration", val)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -if let Some(ref val) = self.noncurrent_version_expiration { -s.content("NoncurrentVersionExpiration", val)?; -} -if let Some(iter) = &self.noncurrent_version_transitions { -s.flattened_list("NoncurrentVersionTransition", iter)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -s.content("Status", &self.status)?; -if let Some(iter) = &self.transitions { -s.flattened_list("Transition", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.abort_incomplete_multipart_upload { + s.content("AbortIncompleteMultipartUpload", val)?; + } + if let Some(ref val) = self.del_marker_expiration { + s.content("DelMarkerExpiration", val)?; + } + if let Some(ref val) = self.expiration { + s.content("Expiration", val)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + if let Some(ref val) = self.noncurrent_version_expiration { + s.content("NoncurrentVersionExpiration", val)?; + } + if let Some(iter) = &self.noncurrent_version_transitions { + s.flattened_list("NoncurrentVersionTransition", iter)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + s.content("Status", &self.status)?; + if let Some(iter) = &self.transitions { + s.flattened_list("Transition", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LifecycleRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut abort_incomplete_multipart_upload: Option = None; -let mut del_marker_expiration: Option = None; -let mut expiration: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut noncurrent_version_expiration: Option = None; -let mut noncurrent_version_transitions: Option = None; -let mut prefix: Option = None; -let mut status: Option = None; -let mut transitions: Option = None; -d.for_each_element(|d, x| match x { -b"AbortIncompleteMultipartUpload" => { -if abort_incomplete_multipart_upload.is_some() { return Err(DeError::DuplicateField); } -abort_incomplete_multipart_upload = Some(d.content()?); -Ok(()) -} -b"DelMarkerExpiration" => { -if del_marker_expiration.is_some() { return Err(DeError::DuplicateField); } -del_marker_expiration = Some(d.content()?); -Ok(()) -} -b"Expiration" => { -if expiration.is_some() { return Err(DeError::DuplicateField); } -expiration = Some(d.content()?); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"NoncurrentVersionExpiration" => { -if noncurrent_version_expiration.is_some() { return Err(DeError::DuplicateField); } -noncurrent_version_expiration = Some(d.content()?); -Ok(()) -} -b"NoncurrentVersionTransition" => { -let ans: NoncurrentVersionTransition = d.content()?; -noncurrent_version_transitions.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -b"Transition" => { -let ans: Transition = d.content()?; -transitions.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -abort_incomplete_multipart_upload, -del_marker_expiration, -expiration, -filter, -id, -noncurrent_version_expiration, -noncurrent_version_transitions, -prefix, -status: status.ok_or(DeError::MissingField)?, -transitions, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut abort_incomplete_multipart_upload: Option = None; + let mut del_marker_expiration: Option = None; + let mut expiration: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut noncurrent_version_expiration: Option = None; + let mut noncurrent_version_transitions: Option = None; + let mut prefix: Option = None; + let mut status: Option = None; + let mut transitions: Option = None; + d.for_each_element(|d, x| match x { + b"AbortIncompleteMultipartUpload" => { + if abort_incomplete_multipart_upload.is_some() { + return Err(DeError::DuplicateField); + } + abort_incomplete_multipart_upload = Some(d.content()?); + Ok(()) + } + b"DelMarkerExpiration" => { + if del_marker_expiration.is_some() { + return Err(DeError::DuplicateField); + } + del_marker_expiration = Some(d.content()?); + Ok(()) + } + b"Expiration" => { + if expiration.is_some() { + return Err(DeError::DuplicateField); + } + expiration = Some(d.content()?); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"NoncurrentVersionExpiration" => { + if noncurrent_version_expiration.is_some() { + return Err(DeError::DuplicateField); + } + noncurrent_version_expiration = Some(d.content()?); + Ok(()) + } + b"NoncurrentVersionTransition" => { + let ans: NoncurrentVersionTransition = d.content()?; + noncurrent_version_transitions.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + b"Transition" => { + let ans: Transition = d.content()?; + transitions.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + abort_incomplete_multipart_upload, + del_marker_expiration, + expiration, + filter, + id, + noncurrent_version_expiration, + noncurrent_version_transitions, + prefix, + status: status.ok_or(DeError::MissingField)?, + transitions, + }) + } } impl SerializeContent for LifecycleRuleAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.object_size_greater_than { -s.content("ObjectSizeGreaterThan", val)?; -} -if let Some(ref val) = self.object_size_less_than { -s.content("ObjectSizeLessThan", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.object_size_greater_than { + s.content("ObjectSizeGreaterThan", val)?; + } + if let Some(ref val) = self.object_size_less_than { + s.content("ObjectSizeLessThan", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LifecycleRuleAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut object_size_greater_than: Option = None; -let mut object_size_less_than: Option = None; -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"ObjectSizeGreaterThan" => { -if object_size_greater_than.is_some() { return Err(DeError::DuplicateField); } -object_size_greater_than = Some(d.content()?); -Ok(()) -} -b"ObjectSizeLessThan" => { -if object_size_less_than.is_some() { return Err(DeError::DuplicateField); } -object_size_less_than = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -object_size_greater_than, -object_size_less_than, -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut object_size_greater_than: Option = None; + let mut object_size_less_than: Option = None; + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"ObjectSizeGreaterThan" => { + if object_size_greater_than.is_some() { + return Err(DeError::DuplicateField); + } + object_size_greater_than = Some(d.content()?); + Ok(()) + } + b"ObjectSizeLessThan" => { + if object_size_less_than.is_some() { + return Err(DeError::DuplicateField); + } + object_size_less_than = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + object_size_greater_than, + object_size_less_than, + prefix, + tags, + }) + } } impl SerializeContent for LifecycleRuleFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.and { -s.content("And", val)?; -} -if let Some(ref val) = self.object_size_greater_than { -s.content("ObjectSizeGreaterThan", val)?; -} -if let Some(ref val) = self.object_size_less_than { -s.content("ObjectSizeLessThan", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.tag { -s.content("Tag", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.and { + s.content("And", val)?; + } + if let Some(ref val) = self.object_size_greater_than { + s.content("ObjectSizeGreaterThan", val)?; + } + if let Some(ref val) = self.object_size_less_than { + s.content("ObjectSizeLessThan", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.tag { + s.content("Tag", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LifecycleRuleFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut and: Option = None; -let mut object_size_greater_than: Option = None; -let mut object_size_less_than: Option = None; -let mut prefix: Option = None; -let mut tag: Option = None; -d.for_each_element(|d, x| match x { -b"And" => { -if and.is_some() { return Err(DeError::DuplicateField); } -and = Some(d.content()?); -Ok(()) -} -b"ObjectSizeGreaterThan" => { -if object_size_greater_than.is_some() { return Err(DeError::DuplicateField); } -object_size_greater_than = Some(d.content()?); -Ok(()) -} -b"ObjectSizeLessThan" => { -if object_size_less_than.is_some() { return Err(DeError::DuplicateField); } -object_size_less_than = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -if tag.is_some() { return Err(DeError::DuplicateField); } -tag = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -and, -cached_tags: CachedTags::default(), -object_size_greater_than, -object_size_less_than, -prefix, -tag, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut and: Option = None; + let mut object_size_greater_than: Option = None; + let mut object_size_less_than: Option = None; + let mut prefix: Option = None; + let mut tag: Option = None; + d.for_each_element(|d, x| match x { + b"And" => { + if and.is_some() { + return Err(DeError::DuplicateField); + } + and = Some(d.content()?); + Ok(()) + } + b"ObjectSizeGreaterThan" => { + if object_size_greater_than.is_some() { + return Err(DeError::DuplicateField); + } + object_size_greater_than = Some(d.content()?); + Ok(()) + } + b"ObjectSizeLessThan" => { + if object_size_less_than.is_some() { + return Err(DeError::DuplicateField); + } + object_size_less_than = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + if tag.is_some() { + return Err(DeError::DuplicateField); + } + tag = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + and, + cached_tags: CachedTags::default(), + object_size_greater_than, + object_size_less_than, + prefix, + tag, + }) + } } impl SerializeContent for ListBucketAnalyticsConfigurationsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.analytics_configuration_list { -s.flattened_list("AnalyticsConfiguration", iter)?; -} -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.analytics_configuration_list { + s.flattened_list("AnalyticsConfiguration", iter)?; + } + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketAnalyticsConfigurationsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut analytics_configuration_list: Option = None; -let mut continuation_token: Option = None; -let mut is_truncated: Option = None; -let mut next_continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"AnalyticsConfiguration" => { -let ans: AnalyticsConfiguration = d.content()?; -analytics_configuration_list.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"NextContinuationToken" => { -if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } -next_continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -analytics_configuration_list, -continuation_token, -is_truncated, -next_continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut analytics_configuration_list: Option = None; + let mut continuation_token: Option = None; + let mut is_truncated: Option = None; + let mut next_continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"AnalyticsConfiguration" => { + let ans: AnalyticsConfiguration = d.content()?; + analytics_configuration_list.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"NextContinuationToken" => { + if next_continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + next_continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + analytics_configuration_list, + continuation_token, + is_truncated, + next_continuation_token, + }) + } } impl SerializeContent for ListBucketIntelligentTieringConfigurationsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(iter) = &self.intelligent_tiering_configuration_list { -s.flattened_list("IntelligentTieringConfiguration", iter)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(iter) = &self.intelligent_tiering_configuration_list { + s.flattened_list("IntelligentTieringConfiguration", iter)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketIntelligentTieringConfigurationsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut continuation_token: Option = None; -let mut intelligent_tiering_configuration_list: Option = None; -let mut is_truncated: Option = None; -let mut next_continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"IntelligentTieringConfiguration" => { -let ans: IntelligentTieringConfiguration = d.content()?; -intelligent_tiering_configuration_list.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"NextContinuationToken" => { -if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } -next_continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -continuation_token, -intelligent_tiering_configuration_list, -is_truncated, -next_continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut continuation_token: Option = None; + let mut intelligent_tiering_configuration_list: Option = None; + let mut is_truncated: Option = None; + let mut next_continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"IntelligentTieringConfiguration" => { + let ans: IntelligentTieringConfiguration = d.content()?; + intelligent_tiering_configuration_list.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"NextContinuationToken" => { + if next_continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + next_continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + continuation_token, + intelligent_tiering_configuration_list, + is_truncated, + next_continuation_token, + }) + } } impl SerializeContent for ListBucketInventoryConfigurationsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(iter) = &self.inventory_configuration_list { -s.flattened_list("InventoryConfiguration", iter)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(iter) = &self.inventory_configuration_list { + s.flattened_list("InventoryConfiguration", iter)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketInventoryConfigurationsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut continuation_token: Option = None; -let mut inventory_configuration_list: Option = None; -let mut is_truncated: Option = None; -let mut next_continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"InventoryConfiguration" => { -let ans: InventoryConfiguration = d.content()?; -inventory_configuration_list.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"NextContinuationToken" => { -if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } -next_continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -continuation_token, -inventory_configuration_list, -is_truncated, -next_continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut continuation_token: Option = None; + let mut inventory_configuration_list: Option = None; + let mut is_truncated: Option = None; + let mut next_continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"InventoryConfiguration" => { + let ans: InventoryConfiguration = d.content()?; + inventory_configuration_list.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"NextContinuationToken" => { + if next_continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + next_continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + continuation_token, + inventory_configuration_list, + is_truncated, + next_continuation_token, + }) + } } impl SerializeContent for ListBucketMetricsConfigurationsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(iter) = &self.metrics_configuration_list { -s.flattened_list("MetricsConfiguration", iter)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(iter) = &self.metrics_configuration_list { + s.flattened_list("MetricsConfiguration", iter)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketMetricsConfigurationsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut continuation_token: Option = None; -let mut is_truncated: Option = None; -let mut metrics_configuration_list: Option = None; -let mut next_continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"IsTruncated" => { -if is_truncated.is_some() { return Err(DeError::DuplicateField); } -is_truncated = Some(d.content()?); -Ok(()) -} -b"MetricsConfiguration" => { -let ans: MetricsConfiguration = d.content()?; -metrics_configuration_list.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"NextContinuationToken" => { -if next_continuation_token.is_some() { return Err(DeError::DuplicateField); } -next_continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -continuation_token, -is_truncated, -metrics_configuration_list, -next_continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut continuation_token: Option = None; + let mut is_truncated: Option = None; + let mut metrics_configuration_list: Option = None; + let mut next_continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"IsTruncated" => { + if is_truncated.is_some() { + return Err(DeError::DuplicateField); + } + is_truncated = Some(d.content()?); + Ok(()) + } + b"MetricsConfiguration" => { + let ans: MetricsConfiguration = d.content()?; + metrics_configuration_list.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"NextContinuationToken" => { + if next_continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + next_continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + continuation_token, + is_truncated, + metrics_configuration_list, + next_continuation_token, + }) + } } impl SerializeContent for ListBucketsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.buckets { -s.list("Buckets", "Bucket", iter)?; -} -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.buckets { + s.list("Buckets", "Bucket", iter)?; + } + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListBucketsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut buckets: Option = None; -let mut continuation_token: Option = None; -let mut owner: Option = None; -let mut prefix: Option = None; -d.for_each_element(|d, x| match x { -b"Buckets" => { -if buckets.is_some() { return Err(DeError::DuplicateField); } -buckets = Some(d.list_content("Bucket")?); -Ok(()) -} -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -buckets, -continuation_token, -owner, -prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut buckets: Option = None; + let mut continuation_token: Option = None; + let mut owner: Option = None; + let mut prefix: Option = None; + d.for_each_element(|d, x| match x { + b"Buckets" => { + if buckets.is_some() { + return Err(DeError::DuplicateField); + } + buckets = Some(d.list_content("Bucket")?); + Ok(()) + } + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + buckets, + continuation_token, + owner, + prefix, + }) + } } impl SerializeContent for ListDirectoryBucketsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.buckets { -s.list("Buckets", "Bucket", iter)?; -} -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.buckets { + s.list("Buckets", "Bucket", iter)?; + } + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ListDirectoryBucketsOutput { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut buckets: Option = None; -let mut continuation_token: Option = None; -d.for_each_element(|d, x| match x { -b"Buckets" => { -if buckets.is_some() { return Err(DeError::DuplicateField); } -buckets = Some(d.list_content("Bucket")?); -Ok(()) -} -b"ContinuationToken" => { -if continuation_token.is_some() { return Err(DeError::DuplicateField); } -continuation_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -buckets, -continuation_token, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut buckets: Option = None; + let mut continuation_token: Option = None; + d.for_each_element(|d, x| match x { + b"Buckets" => { + if buckets.is_some() { + return Err(DeError::DuplicateField); + } + buckets = Some(d.list_content("Bucket")?); + Ok(()) + } + b"ContinuationToken" => { + if continuation_token.is_some() { + return Err(DeError::DuplicateField); + } + continuation_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + buckets, + continuation_token, + }) + } } impl SerializeContent for ListMultipartUploadsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(iter) = &self.common_prefixes { -s.flattened_list("CommonPrefixes", iter)?; -} -if let Some(ref val) = self.delimiter { -s.content("Delimiter", val)?; -} -if let Some(ref val) = self.encoding_type { -s.content("EncodingType", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.key_marker { -s.content("KeyMarker", val)?; -} -if let Some(ref val) = self.max_uploads { -s.content("MaxUploads", val)?; -} -if let Some(ref val) = self.next_key_marker { -s.content("NextKeyMarker", val)?; -} -if let Some(ref val) = self.next_upload_id_marker { -s.content("NextUploadIdMarker", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.upload_id_marker { -s.content("UploadIdMarker", val)?; -} -if let Some(iter) = &self.uploads { -s.flattened_list("Upload", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(iter) = &self.common_prefixes { + s.flattened_list("CommonPrefixes", iter)?; + } + if let Some(ref val) = self.delimiter { + s.content("Delimiter", val)?; + } + if let Some(ref val) = self.encoding_type { + s.content("EncodingType", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.key_marker { + s.content("KeyMarker", val)?; + } + if let Some(ref val) = self.max_uploads { + s.content("MaxUploads", val)?; + } + if let Some(ref val) = self.next_key_marker { + s.content("NextKeyMarker", val)?; + } + if let Some(ref val) = self.next_upload_id_marker { + s.content("NextUploadIdMarker", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.upload_id_marker { + s.content("UploadIdMarker", val)?; + } + if let Some(iter) = &self.uploads { + s.flattened_list("Upload", iter)?; + } + Ok(()) + } } impl SerializeContent for ListObjectVersionsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.common_prefixes { -s.flattened_list("CommonPrefixes", iter)?; -} -if let Some(iter) = &self.delete_markers { -s.flattened_list("DeleteMarker", iter)?; -} -if let Some(ref val) = self.delimiter { -s.content("Delimiter", val)?; -} -if let Some(ref val) = self.encoding_type { -s.content("EncodingType", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.key_marker { -s.content("KeyMarker", val)?; -} -if let Some(ref val) = self.max_keys { -s.content("MaxKeys", val)?; -} -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.next_key_marker { -s.content("NextKeyMarker", val)?; -} -if let Some(ref val) = self.next_version_id_marker { -s.content("NextVersionIdMarker", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.version_id_marker { -s.content("VersionIdMarker", val)?; -} -if let Some(iter) = &self.versions { -s.flattened_list("Version", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.common_prefixes { + s.flattened_list("CommonPrefixes", iter)?; + } + if let Some(iter) = &self.delete_markers { + s.flattened_list("DeleteMarker", iter)?; + } + if let Some(ref val) = self.delimiter { + s.content("Delimiter", val)?; + } + if let Some(ref val) = self.encoding_type { + s.content("EncodingType", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.key_marker { + s.content("KeyMarker", val)?; + } + if let Some(ref val) = self.max_keys { + s.content("MaxKeys", val)?; + } + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.next_key_marker { + s.content("NextKeyMarker", val)?; + } + if let Some(ref val) = self.next_version_id_marker { + s.content("NextVersionIdMarker", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.version_id_marker { + s.content("VersionIdMarker", val)?; + } + if let Some(iter) = &self.versions { + s.flattened_list("Version", iter)?; + } + Ok(()) + } } impl SerializeContent for ListObjectsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.marker { -s.content("Marker", val)?; -} -if let Some(ref val) = self.max_keys { -s.content("MaxKeys", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(iter) = &self.contents { -s.flattened_list("Contents", iter)?; -} -if let Some(iter) = &self.common_prefixes { -s.flattened_list("CommonPrefixes", iter)?; -} -if let Some(ref val) = self.delimiter { -s.content("Delimiter", val)?; -} -if let Some(ref val) = self.next_marker { -s.content("NextMarker", val)?; -} -if let Some(ref val) = self.encoding_type { -s.content("EncodingType", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.marker { + s.content("Marker", val)?; + } + if let Some(ref val) = self.max_keys { + s.content("MaxKeys", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(iter) = &self.contents { + s.flattened_list("Contents", iter)?; + } + if let Some(iter) = &self.common_prefixes { + s.flattened_list("CommonPrefixes", iter)?; + } + if let Some(ref val) = self.delimiter { + s.content("Delimiter", val)?; + } + if let Some(ref val) = self.next_marker { + s.content("NextMarker", val)?; + } + if let Some(ref val) = self.encoding_type { + s.content("EncodingType", val)?; + } + Ok(()) + } } impl SerializeContent for ListObjectsV2Output { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.max_keys { -s.content("MaxKeys", val)?; -} -if let Some(ref val) = self.key_count { -s.content("KeyCount", val)?; -} -if let Some(ref val) = self.continuation_token { -s.content("ContinuationToken", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.next_continuation_token { -s.content("NextContinuationToken", val)?; -} -if let Some(iter) = &self.contents { -s.flattened_list("Contents", iter)?; -} -if let Some(iter) = &self.common_prefixes { -s.flattened_list("CommonPrefixes", iter)?; -} -if let Some(ref val) = self.delimiter { -s.content("Delimiter", val)?; -} -if let Some(ref val) = self.encoding_type { -s.content("EncodingType", val)?; -} -if let Some(ref val) = self.start_after { -s.content("StartAfter", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.max_keys { + s.content("MaxKeys", val)?; + } + if let Some(ref val) = self.key_count { + s.content("KeyCount", val)?; + } + if let Some(ref val) = self.continuation_token { + s.content("ContinuationToken", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.next_continuation_token { + s.content("NextContinuationToken", val)?; + } + if let Some(iter) = &self.contents { + s.flattened_list("Contents", iter)?; + } + if let Some(iter) = &self.common_prefixes { + s.flattened_list("CommonPrefixes", iter)?; + } + if let Some(ref val) = self.delimiter { + s.content("Delimiter", val)?; + } + if let Some(ref val) = self.encoding_type { + s.content("EncodingType", val)?; + } + if let Some(ref val) = self.start_after { + s.content("StartAfter", val)?; + } + Ok(()) + } } impl SerializeContent for ListPartsOutput { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bucket { -s.content("Bucket", val)?; -} -if let Some(ref val) = self.checksum_algorithm { -s.content("ChecksumAlgorithm", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.initiator { -s.content("Initiator", val)?; -} -if let Some(ref val) = self.is_truncated { -s.content("IsTruncated", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.max_parts { -s.content("MaxParts", val)?; -} -if let Some(ref val) = self.next_part_number_marker { -s.content("NextPartNumberMarker", val)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.part_number_marker { -s.content("PartNumberMarker", val)?; -} -if let Some(iter) = &self.parts { -s.flattened_list("Part", iter)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -if let Some(ref val) = self.upload_id { -s.content("UploadId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bucket { + s.content("Bucket", val)?; + } + if let Some(ref val) = self.checksum_algorithm { + s.content("ChecksumAlgorithm", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.initiator { + s.content("Initiator", val)?; + } + if let Some(ref val) = self.is_truncated { + s.content("IsTruncated", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.max_parts { + s.content("MaxParts", val)?; + } + if let Some(ref val) = self.next_part_number_marker { + s.content("NextPartNumberMarker", val)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.part_number_marker { + s.content("PartNumberMarker", val)?; + } + if let Some(iter) = &self.parts { + s.flattened_list("Part", iter)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + if let Some(ref val) = self.upload_id { + s.content("UploadId", val)?; + } + Ok(()) + } } impl SerializeContent for LocationInfo { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.type_ { -s.content("Type", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.type_ { + s.content("Type", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LocationInfo { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut name: Option = None; -let mut type_: Option = None; -d.for_each_element(|d, x| match x { -b"Name" => { -if name.is_some() { return Err(DeError::DuplicateField); } -name = Some(d.content()?); -Ok(()) -} -b"Type" => { -if type_.is_some() { return Err(DeError::DuplicateField); } -type_ = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -name, -type_, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut name: Option = None; + let mut type_: Option = None; + d.for_each_element(|d, x| match x { + b"Name" => { + if name.is_some() { + return Err(DeError::DuplicateField); + } + name = Some(d.content()?); + Ok(()) + } + b"Type" => { + if type_.is_some() { + return Err(DeError::DuplicateField); + } + type_ = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { name, type_ }) + } } impl SerializeContent for LocationType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for LocationType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"AvailabilityZone" => Ok(Self::from_static(LocationType::AVAILABILITY_ZONE)), -b"LocalZone" => Ok(Self::from_static(LocationType::LOCAL_ZONE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"AvailabilityZone" => Ok(Self::from_static(LocationType::AVAILABILITY_ZONE)), + b"LocalZone" => Ok(Self::from_static(LocationType::LOCAL_ZONE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for LoggingEnabled { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("TargetBucket", &self.target_bucket)?; -if let Some(iter) = &self.target_grants { -s.list("TargetGrants", "Grant", iter)?; -} -if let Some(ref val) = self.target_object_key_format { -s.content("TargetObjectKeyFormat", val)?; -} -s.content("TargetPrefix", &self.target_prefix)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("TargetBucket", &self.target_bucket)?; + if let Some(iter) = &self.target_grants { + s.list("TargetGrants", "Grant", iter)?; + } + if let Some(ref val) = self.target_object_key_format { + s.content("TargetObjectKeyFormat", val)?; + } + s.content("TargetPrefix", &self.target_prefix)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for LoggingEnabled { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut target_bucket: Option = None; -let mut target_grants: Option = None; -let mut target_object_key_format: Option = None; -let mut target_prefix: Option = None; -d.for_each_element(|d, x| match x { -b"TargetBucket" => { -if target_bucket.is_some() { return Err(DeError::DuplicateField); } -target_bucket = Some(d.content()?); -Ok(()) -} -b"TargetGrants" => { -if target_grants.is_some() { return Err(DeError::DuplicateField); } -target_grants = Some(d.list_content("Grant")?); -Ok(()) -} -b"TargetObjectKeyFormat" => { -if target_object_key_format.is_some() { return Err(DeError::DuplicateField); } -target_object_key_format = Some(d.content()?); -Ok(()) -} -b"TargetPrefix" => { -if target_prefix.is_some() { return Err(DeError::DuplicateField); } -target_prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -target_bucket: target_bucket.ok_or(DeError::MissingField)?, -target_grants, -target_object_key_format, -target_prefix: target_prefix.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut target_bucket: Option = None; + let mut target_grants: Option = None; + let mut target_object_key_format: Option = None; + let mut target_prefix: Option = None; + d.for_each_element(|d, x| match x { + b"TargetBucket" => { + if target_bucket.is_some() { + return Err(DeError::DuplicateField); + } + target_bucket = Some(d.content()?); + Ok(()) + } + b"TargetGrants" => { + if target_grants.is_some() { + return Err(DeError::DuplicateField); + } + target_grants = Some(d.list_content("Grant")?); + Ok(()) + } + b"TargetObjectKeyFormat" => { + if target_object_key_format.is_some() { + return Err(DeError::DuplicateField); + } + target_object_key_format = Some(d.content()?); + Ok(()) + } + b"TargetPrefix" => { + if target_prefix.is_some() { + return Err(DeError::DuplicateField); + } + target_prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + target_bucket: target_bucket.ok_or(DeError::MissingField)?, + target_grants, + target_object_key_format, + target_prefix: target_prefix.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for MFADelete { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for MFADelete { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(MFADelete::DISABLED)), -b"Enabled" => Ok(Self::from_static(MFADelete::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(MFADelete::DISABLED)), + b"Enabled" => Ok(Self::from_static(MFADelete::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for MFADeleteStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for MFADeleteStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(MFADeleteStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(MFADeleteStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(MFADeleteStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(MFADeleteStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for MetadataEntry { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.name { -s.content("Name", val)?; -} -if let Some(ref val) = self.value { -s.content("Value", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.name { + s.content("Name", val)?; + } + if let Some(ref val) = self.value { + s.content("Value", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetadataEntry { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut name: Option = None; -let mut value: Option = None; -d.for_each_element(|d, x| match x { -b"Name" => { -if name.is_some() { return Err(DeError::DuplicateField); } -name = Some(d.content()?); -Ok(()) -} -b"Value" => { -if value.is_some() { return Err(DeError::DuplicateField); } -value = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -name, -value, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut name: Option = None; + let mut value: Option = None; + d.for_each_element(|d, x| match x { + b"Name" => { + if name.is_some() { + return Err(DeError::DuplicateField); + } + name = Some(d.content()?); + Ok(()) + } + b"Value" => { + if value.is_some() { + return Err(DeError::DuplicateField); + } + value = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { name, value }) + } } impl SerializeContent for MetadataTableConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("S3TablesDestination", &self.s3_tables_destination)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("S3TablesDestination", &self.s3_tables_destination)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetadataTableConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3_tables_destination: Option = None; -d.for_each_element(|d, x| match x { -b"S3TablesDestination" => { -if s3_tables_destination.is_some() { return Err(DeError::DuplicateField); } -s3_tables_destination = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3_tables_destination: s3_tables_destination.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3_tables_destination: Option = None; + d.for_each_element(|d, x| match x { + b"S3TablesDestination" => { + if s3_tables_destination.is_some() { + return Err(DeError::DuplicateField); + } + s3_tables_destination = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + s3_tables_destination: s3_tables_destination.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for MetadataTableConfigurationResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("S3TablesDestinationResult", &self.s3_tables_destination_result)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("S3TablesDestinationResult", &self.s3_tables_destination_result)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetadataTableConfigurationResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3_tables_destination_result: Option = None; -d.for_each_element(|d, x| match x { -b"S3TablesDestinationResult" => { -if s3_tables_destination_result.is_some() { return Err(DeError::DuplicateField); } -s3_tables_destination_result = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3_tables_destination_result: s3_tables_destination_result.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3_tables_destination_result: Option = None; + d.for_each_element(|d, x| match x { + b"S3TablesDestinationResult" => { + if s3_tables_destination_result.is_some() { + return Err(DeError::DuplicateField); + } + s3_tables_destination_result = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + s3_tables_destination_result: s3_tables_destination_result.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Metrics { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.event_threshold { -s.content("EventThreshold", val)?; -} -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.event_threshold { + s.content("EventThreshold", val)?; + } + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Metrics { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut event_threshold: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"EventThreshold" => { -if event_threshold.is_some() { return Err(DeError::DuplicateField); } -event_threshold = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -event_threshold, -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut event_threshold: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"EventThreshold" => { + if event_threshold.is_some() { + return Err(DeError::DuplicateField); + } + event_threshold = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + event_threshold, + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for MetricsAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.access_point_arn { -s.content("AccessPointArn", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.access_point_arn { + s.content("AccessPointArn", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetricsAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_point_arn: Option = None; -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"AccessPointArn" => { -if access_point_arn.is_some() { return Err(DeError::DuplicateField); } -access_point_arn = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_point_arn, -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_point_arn: Option = None; + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"AccessPointArn" => { + if access_point_arn.is_some() { + return Err(DeError::DuplicateField); + } + access_point_arn = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_point_arn, + prefix, + tags, + }) + } } impl SerializeContent for MetricsConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -s.content("Id", &self.id)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + s.content("Id", &self.id)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MetricsConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut filter: Option = None; -let mut id: Option = None; -d.for_each_element(|d, x| match x { -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -filter, -id: id.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut filter: Option = None; + let mut id: Option = None; + d.for_each_element(|d, x| match x { + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + filter, + id: id.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for MetricsFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -match self { -Self::AccessPointArn(x) => s.content("AccessPointArn", x), -Self::And(x) => s.content("And", x), -Self::Prefix(x) => s.content("Prefix", x), -Self::Tag(x) => s.content("Tag", x), -} -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + match self { + Self::AccessPointArn(x) => s.content("AccessPointArn", x), + Self::And(x) => s.content("And", x), + Self::Prefix(x) => s.content("Prefix", x), + Self::Tag(x) => s.content("Tag", x), + } + } } impl<'xml> DeserializeContent<'xml> for MetricsFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.element(|d, x| match x { -b"AccessPointArn" => Ok(Self::AccessPointArn(d.content()?)), -b"And" => Ok(Self::And(d.content()?)), -b"Prefix" => Ok(Self::Prefix(d.content()?)), -b"Tag" => Ok(Self::Tag(d.content()?)), -_ => Err(DeError::UnexpectedTagName) -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.element(|d, x| match x { + b"AccessPointArn" => Ok(Self::AccessPointArn(d.content()?)), + b"And" => Ok(Self::And(d.content()?)), + b"Prefix" => Ok(Self::Prefix(d.content()?)), + b"Tag" => Ok(Self::Tag(d.content()?)), + _ => Err(DeError::UnexpectedTagName), + }) + } } impl SerializeContent for MetricsStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for MetricsStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(MetricsStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(MetricsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(MetricsStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(MetricsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for MultipartUpload { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_algorithm { -s.content("ChecksumAlgorithm", val)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.initiated { -s.timestamp("Initiated", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.initiator { -s.content("Initiator", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -if let Some(ref val) = self.upload_id { -s.content("UploadId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_algorithm { + s.content("ChecksumAlgorithm", val)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.initiated { + s.timestamp("Initiated", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.initiator { + s.content("Initiator", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + if let Some(ref val) = self.upload_id { + s.content("UploadId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for MultipartUpload { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_algorithm: Option = None; -let mut checksum_type: Option = None; -let mut initiated: Option = None; -let mut initiator: Option = None; -let mut key: Option = None; -let mut owner: Option = None; -let mut storage_class: Option = None; -let mut upload_id: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumAlgorithm" => { -if checksum_algorithm.is_some() { return Err(DeError::DuplicateField); } -checksum_algorithm = Some(d.content()?); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -b"Initiated" => { -if initiated.is_some() { return Err(DeError::DuplicateField); } -initiated = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Initiator" => { -if initiator.is_some() { return Err(DeError::DuplicateField); } -initiator = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -b"UploadId" => { -if upload_id.is_some() { return Err(DeError::DuplicateField); } -upload_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_algorithm, -checksum_type, -initiated, -initiator, -key, -owner, -storage_class, -upload_id, -}) -} -} -impl SerializeContent for NoncurrentVersionExpiration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.newer_noncurrent_versions { -s.content("NewerNoncurrentVersions", val)?; -} -if let Some(ref val) = self.noncurrent_days { -s.content("NoncurrentDays", val)?; -} -Ok(()) + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_algorithm: Option = None; + let mut checksum_type: Option = None; + let mut initiated: Option = None; + let mut initiator: Option = None; + let mut key: Option = None; + let mut owner: Option = None; + let mut storage_class: Option = None; + let mut upload_id: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumAlgorithm" => { + if checksum_algorithm.is_some() { + return Err(DeError::DuplicateField); + } + checksum_algorithm = Some(d.content()?); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + b"Initiated" => { + if initiated.is_some() { + return Err(DeError::DuplicateField); + } + initiated = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Initiator" => { + if initiator.is_some() { + return Err(DeError::DuplicateField); + } + initiator = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + b"UploadId" => { + if upload_id.is_some() { + return Err(DeError::DuplicateField); + } + upload_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_algorithm, + checksum_type, + initiated, + initiator, + key, + owner, + storage_class, + upload_id, + }) + } } +impl SerializeContent for NoncurrentVersionExpiration { + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.newer_noncurrent_versions { + s.content("NewerNoncurrentVersions", val)?; + } + if let Some(ref val) = self.noncurrent_days { + s.content("NoncurrentDays", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for NoncurrentVersionExpiration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut newer_noncurrent_versions: Option = None; -let mut noncurrent_days: Option = None; -d.for_each_element(|d, x| match x { -b"NewerNoncurrentVersions" => { -if newer_noncurrent_versions.is_some() { return Err(DeError::DuplicateField); } -newer_noncurrent_versions = Some(d.content()?); -Ok(()) -} -b"NoncurrentDays" => { -if noncurrent_days.is_some() { return Err(DeError::DuplicateField); } -noncurrent_days = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -newer_noncurrent_versions, -noncurrent_days, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut newer_noncurrent_versions: Option = None; + let mut noncurrent_days: Option = None; + d.for_each_element(|d, x| match x { + b"NewerNoncurrentVersions" => { + if newer_noncurrent_versions.is_some() { + return Err(DeError::DuplicateField); + } + newer_noncurrent_versions = Some(d.content()?); + Ok(()) + } + b"NoncurrentDays" => { + if noncurrent_days.is_some() { + return Err(DeError::DuplicateField); + } + noncurrent_days = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + newer_noncurrent_versions, + noncurrent_days, + }) + } } impl SerializeContent for NoncurrentVersionTransition { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.newer_noncurrent_versions { -s.content("NewerNoncurrentVersions", val)?; -} -if let Some(ref val) = self.noncurrent_days { -s.content("NoncurrentDays", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.newer_noncurrent_versions { + s.content("NewerNoncurrentVersions", val)?; + } + if let Some(ref val) = self.noncurrent_days { + s.content("NoncurrentDays", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for NoncurrentVersionTransition { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut newer_noncurrent_versions: Option = None; -let mut noncurrent_days: Option = None; -let mut storage_class: Option = None; -d.for_each_element(|d, x| match x { -b"NewerNoncurrentVersions" => { -if newer_noncurrent_versions.is_some() { return Err(DeError::DuplicateField); } -newer_noncurrent_versions = Some(d.content()?); -Ok(()) -} -b"NoncurrentDays" => { -if noncurrent_days.is_some() { return Err(DeError::DuplicateField); } -noncurrent_days = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -newer_noncurrent_versions, -noncurrent_days, -storage_class, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut newer_noncurrent_versions: Option = None; + let mut noncurrent_days: Option = None; + let mut storage_class: Option = None; + d.for_each_element(|d, x| match x { + b"NewerNoncurrentVersions" => { + if newer_noncurrent_versions.is_some() { + return Err(DeError::DuplicateField); + } + newer_noncurrent_versions = Some(d.content()?); + Ok(()) + } + b"NoncurrentDays" => { + if noncurrent_days.is_some() { + return Err(DeError::DuplicateField); + } + noncurrent_days = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + newer_noncurrent_versions, + noncurrent_days, + storage_class, + }) + } } impl SerializeContent for NotificationConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.event_bridge_configuration { -s.content("EventBridgeConfiguration", val)?; -} -if let Some(iter) = &self.lambda_function_configurations { -s.flattened_list("CloudFunctionConfiguration", iter)?; -} -if let Some(iter) = &self.queue_configurations { -s.flattened_list("QueueConfiguration", iter)?; -} -if let Some(iter) = &self.topic_configurations { -s.flattened_list("TopicConfiguration", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.event_bridge_configuration { + s.content("EventBridgeConfiguration", val)?; + } + if let Some(iter) = &self.lambda_function_configurations { + s.flattened_list("CloudFunctionConfiguration", iter)?; + } + if let Some(iter) = &self.queue_configurations { + s.flattened_list("QueueConfiguration", iter)?; + } + if let Some(iter) = &self.topic_configurations { + s.flattened_list("TopicConfiguration", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for NotificationConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut event_bridge_configuration: Option = None; -let mut lambda_function_configurations: Option = None; -let mut queue_configurations: Option = None; -let mut topic_configurations: Option = None; -d.for_each_element(|d, x| match x { -b"EventBridgeConfiguration" => { -if event_bridge_configuration.is_some() { return Err(DeError::DuplicateField); } -event_bridge_configuration = Some(d.content()?); -Ok(()) -} -b"CloudFunctionConfiguration" => { -let ans: LambdaFunctionConfiguration = d.content()?; -lambda_function_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"QueueConfiguration" => { -let ans: QueueConfiguration = d.content()?; -queue_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"TopicConfiguration" => { -let ans: TopicConfiguration = d.content()?; -topic_configurations.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -event_bridge_configuration, -lambda_function_configurations, -queue_configurations, -topic_configurations, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut event_bridge_configuration: Option = None; + let mut lambda_function_configurations: Option = None; + let mut queue_configurations: Option = None; + let mut topic_configurations: Option = None; + d.for_each_element(|d, x| match x { + b"EventBridgeConfiguration" => { + if event_bridge_configuration.is_some() { + return Err(DeError::DuplicateField); + } + event_bridge_configuration = Some(d.content()?); + Ok(()) + } + b"CloudFunctionConfiguration" => { + let ans: LambdaFunctionConfiguration = d.content()?; + lambda_function_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"QueueConfiguration" => { + let ans: QueueConfiguration = d.content()?; + queue_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"TopicConfiguration" => { + let ans: TopicConfiguration = d.content()?; + topic_configurations.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + event_bridge_configuration, + lambda_function_configurations, + queue_configurations, + topic_configurations, + }) + } } impl SerializeContent for NotificationConfigurationFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.key { -s.content("S3Key", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.key { + s.content("S3Key", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for NotificationConfigurationFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut key: Option = None; -d.for_each_element(|d, x| match x { -b"S3Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -key, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut key: Option = None; + d.for_each_element(|d, x| match x { + b"S3Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { key }) + } } impl SerializeContent for Object { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.checksum_algorithm { -s.flattened_list("ChecksumAlgorithm", iter)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.restore_status { -s.content("RestoreStatus", val)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.checksum_algorithm { + s.flattened_list("ChecksumAlgorithm", iter)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.restore_status { + s.content("RestoreStatus", val)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Object { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_algorithm: Option = None; -let mut checksum_type: Option = None; -let mut e_tag: Option = None; -let mut key: Option = None; -let mut last_modified: Option = None; -let mut owner: Option = None; -let mut restore_status: Option = None; -let mut size: Option = None; -let mut storage_class: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumAlgorithm" => { -let ans: ChecksumAlgorithm = d.content()?; -checksum_algorithm.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"RestoreStatus" => { -if restore_status.is_some() { return Err(DeError::DuplicateField); } -restore_status = Some(d.content()?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_algorithm, -checksum_type, -e_tag, -key, -last_modified, -owner, -restore_status, -size, -storage_class, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_algorithm: Option = None; + let mut checksum_type: Option = None; + let mut e_tag: Option = None; + let mut key: Option = None; + let mut last_modified: Option = None; + let mut owner: Option = None; + let mut restore_status: Option = None; + let mut size: Option = None; + let mut storage_class: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumAlgorithm" => { + let ans: ChecksumAlgorithm = d.content()?; + checksum_algorithm.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"RestoreStatus" => { + if restore_status.is_some() { + return Err(DeError::DuplicateField); + } + restore_status = Some(d.content()?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_algorithm, + checksum_type, + e_tag, + key, + last_modified, + owner, + restore_status, + size, + storage_class, + }) + } } impl SerializeContent for ObjectCannedACL { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectCannedACL { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"authenticated-read" => Ok(Self::from_static(ObjectCannedACL::AUTHENTICATED_READ)), -b"aws-exec-read" => Ok(Self::from_static(ObjectCannedACL::AWS_EXEC_READ)), -b"bucket-owner-full-control" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_FULL_CONTROL)), -b"bucket-owner-read" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_READ)), -b"private" => Ok(Self::from_static(ObjectCannedACL::PRIVATE)), -b"public-read" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ)), -b"public-read-write" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ_WRITE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"authenticated-read" => Ok(Self::from_static(ObjectCannedACL::AUTHENTICATED_READ)), + b"aws-exec-read" => Ok(Self::from_static(ObjectCannedACL::AWS_EXEC_READ)), + b"bucket-owner-full-control" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_FULL_CONTROL)), + b"bucket-owner-read" => Ok(Self::from_static(ObjectCannedACL::BUCKET_OWNER_READ)), + b"private" => Ok(Self::from_static(ObjectCannedACL::PRIVATE)), + b"public-read" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ)), + b"public-read-write" => Ok(Self::from_static(ObjectCannedACL::PUBLIC_READ_WRITE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for ObjectIdentifier { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -s.content("Key", &self.key)?; -if let Some(ref val) = self.last_modified_time { -s.timestamp("LastModifiedTime", val, TimestampFormat::HttpDate)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + s.content("Key", &self.key)?; + if let Some(ref val) = self.last_modified_time { + s.timestamp("LastModifiedTime", val, TimestampFormat::HttpDate)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectIdentifier { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut e_tag: Option = None; -let mut key: Option = None; -let mut last_modified_time: Option = None; -let mut size: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"LastModifiedTime" => { -if last_modified_time.is_some() { return Err(DeError::DuplicateField); } -last_modified_time = Some(d.timestamp(TimestampFormat::HttpDate)?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -e_tag, -key: key.ok_or(DeError::MissingField)?, -last_modified_time, -size, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut e_tag: Option = None; + let mut key: Option = None; + let mut last_modified_time: Option = None; + let mut size: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"LastModifiedTime" => { + if last_modified_time.is_some() { + return Err(DeError::DuplicateField); + } + last_modified_time = Some(d.timestamp(TimestampFormat::HttpDate)?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + e_tag, + key: key.ok_or(DeError::MissingField)?, + last_modified_time, + size, + version_id, + }) + } } impl SerializeContent for ObjectLockConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.object_lock_enabled { -s.content("ObjectLockEnabled", val)?; -} -if let Some(ref val) = self.rule { -s.content("Rule", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.object_lock_enabled { + s.content("ObjectLockEnabled", val)?; + } + if let Some(ref val) = self.rule { + s.content("Rule", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut object_lock_enabled: Option = None; -let mut rule: Option = None; -d.for_each_element(|d, x| match x { -b"ObjectLockEnabled" => { -if object_lock_enabled.is_some() { return Err(DeError::DuplicateField); } -object_lock_enabled = Some(d.content()?); -Ok(()) -} -b"Rule" => { -if rule.is_some() { return Err(DeError::DuplicateField); } -rule = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -object_lock_enabled, -rule, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut object_lock_enabled: Option = None; + let mut rule: Option = None; + d.for_each_element(|d, x| match x { + b"ObjectLockEnabled" => { + if object_lock_enabled.is_some() { + return Err(DeError::DuplicateField); + } + object_lock_enabled = Some(d.content()?); + Ok(()) + } + b"Rule" => { + if rule.is_some() { + return Err(DeError::DuplicateField); + } + rule = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + object_lock_enabled, + rule, + }) + } } impl SerializeContent for ObjectLockEnabled { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockEnabled { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Enabled" => Ok(Self::from_static(ObjectLockEnabled::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Enabled" => Ok(Self::from_static(ObjectLockEnabled::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ObjectLockLegalHold { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockLegalHold { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { status }) + } } impl SerializeContent for ObjectLockLegalHoldStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockLegalHoldStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"OFF" => Ok(Self::from_static(ObjectLockLegalHoldStatus::OFF)), -b"ON" => Ok(Self::from_static(ObjectLockLegalHoldStatus::ON)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"OFF" => Ok(Self::from_static(ObjectLockLegalHoldStatus::OFF)), + b"ON" => Ok(Self::from_static(ObjectLockLegalHoldStatus::ON)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ObjectLockRetention { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.mode { -s.content("Mode", val)?; -} -if let Some(ref val) = self.retain_until_date { -s.timestamp("RetainUntilDate", val, TimestampFormat::DateTime)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.mode { + s.content("Mode", val)?; + } + if let Some(ref val) = self.retain_until_date { + s.timestamp("RetainUntilDate", val, TimestampFormat::DateTime)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockRetention { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut mode: Option = None; -let mut retain_until_date: Option = None; -d.for_each_element(|d, x| match x { -b"Mode" => { -if mode.is_some() { return Err(DeError::DuplicateField); } -mode = Some(d.content()?); -Ok(()) -} -b"RetainUntilDate" => { -if retain_until_date.is_some() { return Err(DeError::DuplicateField); } -retain_until_date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -mode, -retain_until_date, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut mode: Option = None; + let mut retain_until_date: Option = None; + d.for_each_element(|d, x| match x { + b"Mode" => { + if mode.is_some() { + return Err(DeError::DuplicateField); + } + mode = Some(d.content()?); + Ok(()) + } + b"RetainUntilDate" => { + if retain_until_date.is_some() { + return Err(DeError::DuplicateField); + } + retain_until_date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { mode, retain_until_date }) + } } impl SerializeContent for ObjectLockRetentionMode { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockRetentionMode { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"COMPLIANCE" => Ok(Self::from_static(ObjectLockRetentionMode::COMPLIANCE)), -b"GOVERNANCE" => Ok(Self::from_static(ObjectLockRetentionMode::GOVERNANCE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"COMPLIANCE" => Ok(Self::from_static(ObjectLockRetentionMode::COMPLIANCE)), + b"GOVERNANCE" => Ok(Self::from_static(ObjectLockRetentionMode::GOVERNANCE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ObjectLockRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.default_retention { -s.content("DefaultRetention", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.default_retention { + s.content("DefaultRetention", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectLockRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut default_retention: Option = None; -d.for_each_element(|d, x| match x { -b"DefaultRetention" => { -if default_retention.is_some() { return Err(DeError::DuplicateField); } -default_retention = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -default_retention, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut default_retention: Option = None; + d.for_each_element(|d, x| match x { + b"DefaultRetention" => { + if default_retention.is_some() { + return Err(DeError::DuplicateField); + } + default_retention = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { default_retention }) + } } impl SerializeContent for ObjectOwnership { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectOwnership { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"BucketOwnerEnforced" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_ENFORCED)), -b"BucketOwnerPreferred" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_PREFERRED)), -b"ObjectWriter" => Ok(Self::from_static(ObjectOwnership::OBJECT_WRITER)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"BucketOwnerEnforced" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_ENFORCED)), + b"BucketOwnerPreferred" => Ok(Self::from_static(ObjectOwnership::BUCKET_OWNER_PREFERRED)), + b"ObjectWriter" => Ok(Self::from_static(ObjectOwnership::OBJECT_WRITER)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ObjectPart { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.part_number { -s.content("PartNumber", val)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.part_number { + s.content("PartNumber", val)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectPart { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut part_number: Option = None; -let mut size: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"PartNumber" => { -if part_number.is_some() { return Err(DeError::DuplicateField); } -part_number = Some(d.content()?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -part_number, -size, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut part_number: Option = None; + let mut size: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"PartNumber" => { + if part_number.is_some() { + return Err(DeError::DuplicateField); + } + part_number = Some(d.content()?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + part_number, + size, + }) + } } impl SerializeContent for ObjectStorageClass { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectStorageClass { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DEEP_ARCHIVE" => Ok(Self::from_static(ObjectStorageClass::DEEP_ARCHIVE)), -b"EXPRESS_ONEZONE" => Ok(Self::from_static(ObjectStorageClass::EXPRESS_ONEZONE)), -b"GLACIER" => Ok(Self::from_static(ObjectStorageClass::GLACIER)), -b"GLACIER_IR" => Ok(Self::from_static(ObjectStorageClass::GLACIER_IR)), -b"INTELLIGENT_TIERING" => Ok(Self::from_static(ObjectStorageClass::INTELLIGENT_TIERING)), -b"ONEZONE_IA" => Ok(Self::from_static(ObjectStorageClass::ONEZONE_IA)), -b"OUTPOSTS" => Ok(Self::from_static(ObjectStorageClass::OUTPOSTS)), -b"REDUCED_REDUNDANCY" => Ok(Self::from_static(ObjectStorageClass::REDUCED_REDUNDANCY)), -b"SNOW" => Ok(Self::from_static(ObjectStorageClass::SNOW)), -b"STANDARD" => Ok(Self::from_static(ObjectStorageClass::STANDARD)), -b"STANDARD_IA" => Ok(Self::from_static(ObjectStorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DEEP_ARCHIVE" => Ok(Self::from_static(ObjectStorageClass::DEEP_ARCHIVE)), + b"EXPRESS_ONEZONE" => Ok(Self::from_static(ObjectStorageClass::EXPRESS_ONEZONE)), + b"GLACIER" => Ok(Self::from_static(ObjectStorageClass::GLACIER)), + b"GLACIER_IR" => Ok(Self::from_static(ObjectStorageClass::GLACIER_IR)), + b"INTELLIGENT_TIERING" => Ok(Self::from_static(ObjectStorageClass::INTELLIGENT_TIERING)), + b"ONEZONE_IA" => Ok(Self::from_static(ObjectStorageClass::ONEZONE_IA)), + b"OUTPOSTS" => Ok(Self::from_static(ObjectStorageClass::OUTPOSTS)), + b"REDUCED_REDUNDANCY" => Ok(Self::from_static(ObjectStorageClass::REDUCED_REDUNDANCY)), + b"SNOW" => Ok(Self::from_static(ObjectStorageClass::SNOW)), + b"STANDARD" => Ok(Self::from_static(ObjectStorageClass::STANDARD)), + b"STANDARD_IA" => Ok(Self::from_static(ObjectStorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for ObjectVersion { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.checksum_algorithm { -s.flattened_list("ChecksumAlgorithm", iter)?; -} -if let Some(ref val) = self.checksum_type { -s.content("ChecksumType", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.is_latest { -s.content("IsLatest", val)?; -} -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.owner { -s.content("Owner", val)?; -} -if let Some(ref val) = self.restore_status { -s.content("RestoreStatus", val)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -if let Some(ref val) = self.version_id { -s.content("VersionId", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.checksum_algorithm { + s.flattened_list("ChecksumAlgorithm", iter)?; + } + if let Some(ref val) = self.checksum_type { + s.content("ChecksumType", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.is_latest { + s.content("IsLatest", val)?; + } + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.owner { + s.content("Owner", val)?; + } + if let Some(ref val) = self.restore_status { + s.content("RestoreStatus", val)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + if let Some(ref val) = self.version_id { + s.content("VersionId", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ObjectVersion { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_algorithm: Option = None; -let mut checksum_type: Option = None; -let mut e_tag: Option = None; -let mut is_latest: Option = None; -let mut key: Option = None; -let mut last_modified: Option = None; -let mut owner: Option = None; -let mut restore_status: Option = None; -let mut size: Option = None; -let mut storage_class: Option = None; -let mut version_id: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumAlgorithm" => { -let ans: ChecksumAlgorithm = d.content()?; -checksum_algorithm.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"ChecksumType" => { -if checksum_type.is_some() { return Err(DeError::DuplicateField); } -checksum_type = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"IsLatest" => { -if is_latest.is_some() { return Err(DeError::DuplicateField); } -is_latest = Some(d.content()?); -Ok(()) -} -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Owner" => { -if owner.is_some() { return Err(DeError::DuplicateField); } -owner = Some(d.content()?); -Ok(()) -} -b"RestoreStatus" => { -if restore_status.is_some() { return Err(DeError::DuplicateField); } -restore_status = Some(d.content()?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -b"VersionId" => { -if version_id.is_some() { return Err(DeError::DuplicateField); } -version_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_algorithm, -checksum_type, -e_tag, -is_latest, -key, -last_modified, -owner, -restore_status, -size, -storage_class, -version_id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_algorithm: Option = None; + let mut checksum_type: Option = None; + let mut e_tag: Option = None; + let mut is_latest: Option = None; + let mut key: Option = None; + let mut last_modified: Option = None; + let mut owner: Option = None; + let mut restore_status: Option = None; + let mut size: Option = None; + let mut storage_class: Option = None; + let mut version_id: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumAlgorithm" => { + let ans: ChecksumAlgorithm = d.content()?; + checksum_algorithm.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"ChecksumType" => { + if checksum_type.is_some() { + return Err(DeError::DuplicateField); + } + checksum_type = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"IsLatest" => { + if is_latest.is_some() { + return Err(DeError::DuplicateField); + } + is_latest = Some(d.content()?); + Ok(()) + } + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Owner" => { + if owner.is_some() { + return Err(DeError::DuplicateField); + } + owner = Some(d.content()?); + Ok(()) + } + b"RestoreStatus" => { + if restore_status.is_some() { + return Err(DeError::DuplicateField); + } + restore_status = Some(d.content()?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + b"VersionId" => { + if version_id.is_some() { + return Err(DeError::DuplicateField); + } + version_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_algorithm, + checksum_type, + e_tag, + is_latest, + key, + last_modified, + owner, + restore_status, + size, + storage_class, + version_id, + }) + } } impl SerializeContent for ObjectVersionStorageClass { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ObjectVersionStorageClass { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"STANDARD" => Ok(Self::from_static(ObjectVersionStorageClass::STANDARD)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"STANDARD" => Ok(Self::from_static(ObjectVersionStorageClass::STANDARD)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for OutputLocation { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.s3 { -s.content("S3", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.s3 { + s.content("S3", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for OutputLocation { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut s3: Option = None; -d.for_each_element(|d, x| match x { -b"S3" => { -if s3.is_some() { return Err(DeError::DuplicateField); } -s3 = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -s3, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut s3: Option = None; + d.for_each_element(|d, x| match x { + b"S3" => { + if s3.is_some() { + return Err(DeError::DuplicateField); + } + s3 = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { s3 }) + } } impl SerializeContent for OutputSerialization { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.csv { -s.content("CSV", val)?; -} -if let Some(ref val) = self.json { -s.content("JSON", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.csv { + s.content("CSV", val)?; + } + if let Some(ref val) = self.json { + s.content("JSON", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for OutputSerialization { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut csv: Option = None; -let mut json: Option = None; -d.for_each_element(|d, x| match x { -b"CSV" => { -if csv.is_some() { return Err(DeError::DuplicateField); } -csv = Some(d.content()?); -Ok(()) -} -b"JSON" => { -if json.is_some() { return Err(DeError::DuplicateField); } -json = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -csv, -json, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut csv: Option = None; + let mut json: Option = None; + d.for_each_element(|d, x| match x { + b"CSV" => { + if csv.is_some() { + return Err(DeError::DuplicateField); + } + csv = Some(d.content()?); + Ok(()) + } + b"JSON" => { + if json.is_some() { + return Err(DeError::DuplicateField); + } + json = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { csv, json }) + } } impl SerializeContent for Owner { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.display_name { -s.content("DisplayName", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.display_name { + s.content("DisplayName", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Owner { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut display_name: Option = None; -let mut id: Option = None; -d.for_each_element(|d, x| match x { -b"DisplayName" => { -if display_name.is_some() { return Err(DeError::DuplicateField); } -display_name = Some(d.content()?); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -display_name, -id, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut display_name: Option = None; + let mut id: Option = None; + d.for_each_element(|d, x| match x { + b"DisplayName" => { + if display_name.is_some() { + return Err(DeError::DuplicateField); + } + display_name = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { display_name, id }) + } } impl SerializeContent for OwnerOverride { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for OwnerOverride { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Destination" => Ok(Self::from_static(OwnerOverride::DESTINATION)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Destination" => Ok(Self::from_static(OwnerOverride::DESTINATION)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for OwnershipControls { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.rules; -s.flattened_list("Rule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.rules; + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for OwnershipControls { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut rules: Option = None; -d.for_each_element(|d, x| match x { -b"Rule" => { -let ans: OwnershipControlsRule = d.content()?; -rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -rules: rules.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut rules: Option = None; + d.for_each_element(|d, x| match x { + b"Rule" => { + let ans: OwnershipControlsRule = d.content()?; + rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + rules: rules.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for OwnershipControlsRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("ObjectOwnership", &self.object_ownership)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("ObjectOwnership", &self.object_ownership)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for OwnershipControlsRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut object_ownership: Option = None; -d.for_each_element(|d, x| match x { -b"ObjectOwnership" => { -if object_ownership.is_some() { return Err(DeError::DuplicateField); } -object_ownership = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -object_ownership: object_ownership.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut object_ownership: Option = None; + d.for_each_element(|d, x| match x { + b"ObjectOwnership" => { + if object_ownership.is_some() { + return Err(DeError::DuplicateField); + } + object_ownership = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + object_ownership: object_ownership.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ParquetInput { -fn serialize_content(&self, _: &mut Serializer) -> SerResult { -Ok(()) -} + fn serialize_content(&self, _: &mut Serializer) -> SerResult { + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ParquetInput { -fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { -Ok(Self { -}) -} + fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { + Ok(Self {}) + } } impl SerializeContent for Part { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.checksum_crc32 { -s.content("ChecksumCRC32", val)?; -} -if let Some(ref val) = self.checksum_crc32c { -s.content("ChecksumCRC32C", val)?; -} -if let Some(ref val) = self.checksum_crc64nvme { -s.content("ChecksumCRC64NVME", val)?; -} -if let Some(ref val) = self.checksum_sha1 { -s.content("ChecksumSHA1", val)?; -} -if let Some(ref val) = self.checksum_sha256 { -s.content("ChecksumSHA256", val)?; -} -if let Some(ref val) = self.e_tag { -s.content("ETag", val)?; -} -if let Some(ref val) = self.last_modified { -s.timestamp("LastModified", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.part_number { -s.content("PartNumber", val)?; -} -if let Some(ref val) = self.size { -s.content("Size", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.checksum_crc32 { + s.content("ChecksumCRC32", val)?; + } + if let Some(ref val) = self.checksum_crc32c { + s.content("ChecksumCRC32C", val)?; + } + if let Some(ref val) = self.checksum_crc64nvme { + s.content("ChecksumCRC64NVME", val)?; + } + if let Some(ref val) = self.checksum_sha1 { + s.content("ChecksumSHA1", val)?; + } + if let Some(ref val) = self.checksum_sha256 { + s.content("ChecksumSHA256", val)?; + } + if let Some(ref val) = self.e_tag { + s.content("ETag", val)?; + } + if let Some(ref val) = self.last_modified { + s.timestamp("LastModified", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.part_number { + s.content("PartNumber", val)?; + } + if let Some(ref val) = self.size { + s.content("Size", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Part { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut checksum_crc32: Option = None; -let mut checksum_crc32c: Option = None; -let mut checksum_crc64nvme: Option = None; -let mut checksum_sha1: Option = None; -let mut checksum_sha256: Option = None; -let mut e_tag: Option = None; -let mut last_modified: Option = None; -let mut part_number: Option = None; -let mut size: Option = None; -d.for_each_element(|d, x| match x { -b"ChecksumCRC32" => { -if checksum_crc32.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32 = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC32C" => { -if checksum_crc32c.is_some() { return Err(DeError::DuplicateField); } -checksum_crc32c = Some(d.content()?); -Ok(()) -} -b"ChecksumCRC64NVME" => { -if checksum_crc64nvme.is_some() { return Err(DeError::DuplicateField); } -checksum_crc64nvme = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA1" => { -if checksum_sha1.is_some() { return Err(DeError::DuplicateField); } -checksum_sha1 = Some(d.content()?); -Ok(()) -} -b"ChecksumSHA256" => { -if checksum_sha256.is_some() { return Err(DeError::DuplicateField); } -checksum_sha256 = Some(d.content()?); -Ok(()) -} -b"ETag" => { -if e_tag.is_some() { return Err(DeError::DuplicateField); } -e_tag = Some(d.content()?); -Ok(()) -} -b"LastModified" => { -if last_modified.is_some() { return Err(DeError::DuplicateField); } -last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"PartNumber" => { -if part_number.is_some() { return Err(DeError::DuplicateField); } -part_number = Some(d.content()?); -Ok(()) -} -b"Size" => { -if size.is_some() { return Err(DeError::DuplicateField); } -size = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -checksum_crc32, -checksum_crc32c, -checksum_crc64nvme, -checksum_sha1, -checksum_sha256, -e_tag, -last_modified, -part_number, -size, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut checksum_crc32: Option = None; + let mut checksum_crc32c: Option = None; + let mut checksum_crc64nvme: Option = None; + let mut checksum_sha1: Option = None; + let mut checksum_sha256: Option = None; + let mut e_tag: Option = None; + let mut last_modified: Option = None; + let mut part_number: Option = None; + let mut size: Option = None; + d.for_each_element(|d, x| match x { + b"ChecksumCRC32" => { + if checksum_crc32.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32 = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC32C" => { + if checksum_crc32c.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc32c = Some(d.content()?); + Ok(()) + } + b"ChecksumCRC64NVME" => { + if checksum_crc64nvme.is_some() { + return Err(DeError::DuplicateField); + } + checksum_crc64nvme = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA1" => { + if checksum_sha1.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha1 = Some(d.content()?); + Ok(()) + } + b"ChecksumSHA256" => { + if checksum_sha256.is_some() { + return Err(DeError::DuplicateField); + } + checksum_sha256 = Some(d.content()?); + Ok(()) + } + b"ETag" => { + if e_tag.is_some() { + return Err(DeError::DuplicateField); + } + e_tag = Some(d.content()?); + Ok(()) + } + b"LastModified" => { + if last_modified.is_some() { + return Err(DeError::DuplicateField); + } + last_modified = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"PartNumber" => { + if part_number.is_some() { + return Err(DeError::DuplicateField); + } + part_number = Some(d.content()?); + Ok(()) + } + b"Size" => { + if size.is_some() { + return Err(DeError::DuplicateField); + } + size = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + checksum_crc32, + checksum_crc32c, + checksum_crc64nvme, + checksum_sha1, + checksum_sha256, + e_tag, + last_modified, + part_number, + size, + }) + } } impl SerializeContent for PartitionDateSource { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for PartitionDateSource { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DeliveryTime" => Ok(Self::from_static(PartitionDateSource::DELIVERY_TIME)), -b"EventTime" => Ok(Self::from_static(PartitionDateSource::EVENT_TIME)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DeliveryTime" => Ok(Self::from_static(PartitionDateSource::DELIVERY_TIME)), + b"EventTime" => Ok(Self::from_static(PartitionDateSource::EVENT_TIME)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for PartitionedPrefix { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.partition_date_source { -s.content("PartitionDateSource", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.partition_date_source { + s.content("PartitionDateSource", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for PartitionedPrefix { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut partition_date_source: Option = None; -d.for_each_element(|d, x| match x { -b"PartitionDateSource" => { -if partition_date_source.is_some() { return Err(DeError::DuplicateField); } -partition_date_source = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -partition_date_source, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut partition_date_source: Option = None; + d.for_each_element(|d, x| match x { + b"PartitionDateSource" => { + if partition_date_source.is_some() { + return Err(DeError::DuplicateField); + } + partition_date_source = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { partition_date_source }) + } } impl SerializeContent for Payer { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Payer { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"BucketOwner" => Ok(Self::from_static(Payer::BUCKET_OWNER)), -b"Requester" => Ok(Self::from_static(Payer::REQUESTER)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"BucketOwner" => Ok(Self::from_static(Payer::BUCKET_OWNER)), + b"Requester" => Ok(Self::from_static(Payer::REQUESTER)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Permission { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Permission { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"FULL_CONTROL" => Ok(Self::from_static(Permission::FULL_CONTROL)), -b"READ" => Ok(Self::from_static(Permission::READ)), -b"READ_ACP" => Ok(Self::from_static(Permission::READ_ACP)), -b"WRITE" => Ok(Self::from_static(Permission::WRITE)), -b"WRITE_ACP" => Ok(Self::from_static(Permission::WRITE_ACP)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"FULL_CONTROL" => Ok(Self::from_static(Permission::FULL_CONTROL)), + b"READ" => Ok(Self::from_static(Permission::READ)), + b"READ_ACP" => Ok(Self::from_static(Permission::READ_ACP)), + b"WRITE" => Ok(Self::from_static(Permission::WRITE)), + b"WRITE_ACP" => Ok(Self::from_static(Permission::WRITE_ACP)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for PolicyStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.is_public { -s.content("IsPublic", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.is_public { + s.content("IsPublic", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for PolicyStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut is_public: Option = None; -d.for_each_element(|d, x| match x { -b"IsPublic" => { -if is_public.is_some() { return Err(DeError::DuplicateField); } -is_public = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -is_public, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut is_public: Option = None; + d.for_each_element(|d, x| match x { + b"IsPublic" => { + if is_public.is_some() { + return Err(DeError::DuplicateField); + } + is_public = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { is_public }) + } } impl SerializeContent for Progress { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bytes_processed { -s.content("BytesProcessed", val)?; -} -if let Some(ref val) = self.bytes_returned { -s.content("BytesReturned", val)?; -} -if let Some(ref val) = self.bytes_scanned { -s.content("BytesScanned", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bytes_processed { + s.content("BytesProcessed", val)?; + } + if let Some(ref val) = self.bytes_returned { + s.content("BytesReturned", val)?; + } + if let Some(ref val) = self.bytes_scanned { + s.content("BytesScanned", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Progress { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bytes_processed: Option = None; -let mut bytes_returned: Option = None; -let mut bytes_scanned: Option = None; -d.for_each_element(|d, x| match x { -b"BytesProcessed" => { -if bytes_processed.is_some() { return Err(DeError::DuplicateField); } -bytes_processed = Some(d.content()?); -Ok(()) -} -b"BytesReturned" => { -if bytes_returned.is_some() { return Err(DeError::DuplicateField); } -bytes_returned = Some(d.content()?); -Ok(()) -} -b"BytesScanned" => { -if bytes_scanned.is_some() { return Err(DeError::DuplicateField); } -bytes_scanned = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bytes_processed, -bytes_returned, -bytes_scanned, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bytes_processed: Option = None; + let mut bytes_returned: Option = None; + let mut bytes_scanned: Option = None; + d.for_each_element(|d, x| match x { + b"BytesProcessed" => { + if bytes_processed.is_some() { + return Err(DeError::DuplicateField); + } + bytes_processed = Some(d.content()?); + Ok(()) + } + b"BytesReturned" => { + if bytes_returned.is_some() { + return Err(DeError::DuplicateField); + } + bytes_returned = Some(d.content()?); + Ok(()) + } + b"BytesScanned" => { + if bytes_scanned.is_some() { + return Err(DeError::DuplicateField); + } + bytes_scanned = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bytes_processed, + bytes_returned, + bytes_scanned, + }) + } } impl SerializeContent for Protocol { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Protocol { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"http" => Ok(Self::from_static(Protocol::HTTP)), -b"https" => Ok(Self::from_static(Protocol::HTTPS)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"http" => Ok(Self::from_static(Protocol::HTTP)), + b"https" => Ok(Self::from_static(Protocol::HTTPS)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for PublicAccessBlockConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.block_public_acls { -s.content("BlockPublicAcls", val)?; -} -if let Some(ref val) = self.block_public_policy { -s.content("BlockPublicPolicy", val)?; -} -if let Some(ref val) = self.ignore_public_acls { -s.content("IgnorePublicAcls", val)?; -} -if let Some(ref val) = self.restrict_public_buckets { -s.content("RestrictPublicBuckets", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.block_public_acls { + s.content("BlockPublicAcls", val)?; + } + if let Some(ref val) = self.block_public_policy { + s.content("BlockPublicPolicy", val)?; + } + if let Some(ref val) = self.ignore_public_acls { + s.content("IgnorePublicAcls", val)?; + } + if let Some(ref val) = self.restrict_public_buckets { + s.content("RestrictPublicBuckets", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for PublicAccessBlockConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut block_public_acls: Option = None; -let mut block_public_policy: Option = None; -let mut ignore_public_acls: Option = None; -let mut restrict_public_buckets: Option = None; -d.for_each_element(|d, x| match x { -b"BlockPublicAcls" => { -if block_public_acls.is_some() { return Err(DeError::DuplicateField); } -block_public_acls = Some(d.content()?); -Ok(()) -} -b"BlockPublicPolicy" => { -if block_public_policy.is_some() { return Err(DeError::DuplicateField); } -block_public_policy = Some(d.content()?); -Ok(()) -} -b"IgnorePublicAcls" => { -if ignore_public_acls.is_some() { return Err(DeError::DuplicateField); } -ignore_public_acls = Some(d.content()?); -Ok(()) -} -b"RestrictPublicBuckets" => { -if restrict_public_buckets.is_some() { return Err(DeError::DuplicateField); } -restrict_public_buckets = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -block_public_acls, -block_public_policy, -ignore_public_acls, -restrict_public_buckets, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut block_public_acls: Option = None; + let mut block_public_policy: Option = None; + let mut ignore_public_acls: Option = None; + let mut restrict_public_buckets: Option = None; + d.for_each_element(|d, x| match x { + b"BlockPublicAcls" => { + if block_public_acls.is_some() { + return Err(DeError::DuplicateField); + } + block_public_acls = Some(d.content()?); + Ok(()) + } + b"BlockPublicPolicy" => { + if block_public_policy.is_some() { + return Err(DeError::DuplicateField); + } + block_public_policy = Some(d.content()?); + Ok(()) + } + b"IgnorePublicAcls" => { + if ignore_public_acls.is_some() { + return Err(DeError::DuplicateField); + } + ignore_public_acls = Some(d.content()?); + Ok(()) + } + b"RestrictPublicBuckets" => { + if restrict_public_buckets.is_some() { + return Err(DeError::DuplicateField); + } + restrict_public_buckets = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + block_public_acls, + block_public_policy, + ignore_public_acls, + restrict_public_buckets, + }) + } } impl SerializeContent for QueueConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.events; -s.flattened_list("Event", iter)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("Id", val)?; -} -s.content("Queue", &self.queue_arn)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.events; + s.flattened_list("Event", iter)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("Id", val)?; + } + s.content("Queue", &self.queue_arn)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for QueueConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut events: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut queue_arn: Option = None; -d.for_each_element(|d, x| match x { -b"Event" => { -let ans: Event = d.content()?; -events.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"Queue" => { -if queue_arn.is_some() { return Err(DeError::DuplicateField); } -queue_arn = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -events: events.ok_or(DeError::MissingField)?, -filter, -id, -queue_arn: queue_arn.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut events: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut queue_arn: Option = None; + d.for_each_element(|d, x| match x { + b"Event" => { + let ans: Event = d.content()?; + events.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"Queue" => { + if queue_arn.is_some() { + return Err(DeError::DuplicateField); + } + queue_arn = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + events: events.ok_or(DeError::MissingField)?, + filter, + id, + queue_arn: queue_arn.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for QuoteFields { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for QuoteFields { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"ALWAYS" => Ok(Self::from_static(QuoteFields::ALWAYS)), -b"ASNEEDED" => Ok(Self::from_static(QuoteFields::ASNEEDED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"ALWAYS" => Ok(Self::from_static(QuoteFields::ALWAYS)), + b"ASNEEDED" => Ok(Self::from_static(QuoteFields::ASNEEDED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Redirect { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.host_name { -s.content("HostName", val)?; -} -if let Some(ref val) = self.http_redirect_code { -s.content("HttpRedirectCode", val)?; -} -if let Some(ref val) = self.protocol { -s.content("Protocol", val)?; -} -if let Some(ref val) = self.replace_key_prefix_with { -s.content("ReplaceKeyPrefixWith", val)?; -} -if let Some(ref val) = self.replace_key_with { -s.content("ReplaceKeyWith", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.host_name { + s.content("HostName", val)?; + } + if let Some(ref val) = self.http_redirect_code { + s.content("HttpRedirectCode", val)?; + } + if let Some(ref val) = self.protocol { + s.content("Protocol", val)?; + } + if let Some(ref val) = self.replace_key_prefix_with { + s.content("ReplaceKeyPrefixWith", val)?; + } + if let Some(ref val) = self.replace_key_with { + s.content("ReplaceKeyWith", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Redirect { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut host_name: Option = None; -let mut http_redirect_code: Option = None; -let mut protocol: Option = None; -let mut replace_key_prefix_with: Option = None; -let mut replace_key_with: Option = None; -d.for_each_element(|d, x| match x { -b"HostName" => { -if host_name.is_some() { return Err(DeError::DuplicateField); } -host_name = Some(d.content()?); -Ok(()) -} -b"HttpRedirectCode" => { -if http_redirect_code.is_some() { return Err(DeError::DuplicateField); } -http_redirect_code = Some(d.content()?); -Ok(()) -} -b"Protocol" => { -if protocol.is_some() { return Err(DeError::DuplicateField); } -protocol = Some(d.content()?); -Ok(()) -} -b"ReplaceKeyPrefixWith" => { -if replace_key_prefix_with.is_some() { return Err(DeError::DuplicateField); } -replace_key_prefix_with = Some(d.content()?); -Ok(()) -} -b"ReplaceKeyWith" => { -if replace_key_with.is_some() { return Err(DeError::DuplicateField); } -replace_key_with = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -host_name, -http_redirect_code, -protocol, -replace_key_prefix_with, -replace_key_with, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut host_name: Option = None; + let mut http_redirect_code: Option = None; + let mut protocol: Option = None; + let mut replace_key_prefix_with: Option = None; + let mut replace_key_with: Option = None; + d.for_each_element(|d, x| match x { + b"HostName" => { + if host_name.is_some() { + return Err(DeError::DuplicateField); + } + host_name = Some(d.content()?); + Ok(()) + } + b"HttpRedirectCode" => { + if http_redirect_code.is_some() { + return Err(DeError::DuplicateField); + } + http_redirect_code = Some(d.content()?); + Ok(()) + } + b"Protocol" => { + if protocol.is_some() { + return Err(DeError::DuplicateField); + } + protocol = Some(d.content()?); + Ok(()) + } + b"ReplaceKeyPrefixWith" => { + if replace_key_prefix_with.is_some() { + return Err(DeError::DuplicateField); + } + replace_key_prefix_with = Some(d.content()?); + Ok(()) + } + b"ReplaceKeyWith" => { + if replace_key_with.is_some() { + return Err(DeError::DuplicateField); + } + replace_key_with = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + host_name, + http_redirect_code, + protocol, + replace_key_prefix_with, + replace_key_with, + }) + } } impl SerializeContent for RedirectAllRequestsTo { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("HostName", &self.host_name)?; -if let Some(ref val) = self.protocol { -s.content("Protocol", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("HostName", &self.host_name)?; + if let Some(ref val) = self.protocol { + s.content("Protocol", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RedirectAllRequestsTo { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut host_name: Option = None; -let mut protocol: Option = None; -d.for_each_element(|d, x| match x { -b"HostName" => { -if host_name.is_some() { return Err(DeError::DuplicateField); } -host_name = Some(d.content()?); -Ok(()) -} -b"Protocol" => { -if protocol.is_some() { return Err(DeError::DuplicateField); } -protocol = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -host_name: host_name.ok_or(DeError::MissingField)?, -protocol, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut host_name: Option = None; + let mut protocol: Option = None; + d.for_each_element(|d, x| match x { + b"HostName" => { + if host_name.is_some() { + return Err(DeError::DuplicateField); + } + host_name = Some(d.content()?); + Ok(()) + } + b"Protocol" => { + if protocol.is_some() { + return Err(DeError::DuplicateField); + } + protocol = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + host_name: host_name.ok_or(DeError::MissingField)?, + protocol, + }) + } } impl SerializeContent for ReplicaModifications { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicaModifications { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ReplicaModificationsStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ReplicaModificationsStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ReplicaModificationsStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ReplicaModificationsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ReplicaModificationsStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ReplicaModificationsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} -} -impl SerializeContent for ReplicationConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Role", &self.role)?; -{ -let iter = &self.rules; -s.flattened_list("Rule", iter)?; -} -Ok(()) -} -} - -impl<'xml> DeserializeContent<'xml> for ReplicationConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut role: Option = None; -let mut rules: Option = None; -d.for_each_element(|d, x| match x { -b"Role" => { -if role.is_some() { return Err(DeError::DuplicateField); } -role = Some(d.content()?); -Ok(()) -} -b"Rule" => { -let ans: ReplicationRule = d.content()?; -rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -role: role.ok_or(DeError::MissingField)?, -rules: rules.ok_or(DeError::MissingField)?, -}) -} -} -impl SerializeContent for ReplicationRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.delete_marker_replication { -s.content("DeleteMarkerReplication", val)?; -} -if let Some(ref val) = self.delete_replication { -s.content("DeleteReplication", val)?; -} -s.content("Destination", &self.destination)?; -if let Some(ref val) = self.existing_object_replication { -s.content("ExistingObjectReplication", val)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("ID", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.priority { -s.content("Priority", val)?; } -if let Some(ref val) = self.source_selection_criteria { -s.content("SourceSelectionCriteria", val)?; +impl SerializeContent for ReplicationConfiguration { + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Role", &self.role)?; + { + let iter = &self.rules; + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } -s.content("Status", &self.status)?; -Ok(()) + +impl<'xml> DeserializeContent<'xml> for ReplicationConfiguration { + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut role: Option = None; + let mut rules: Option = None; + d.for_each_element(|d, x| match x { + b"Role" => { + if role.is_some() { + return Err(DeError::DuplicateField); + } + role = Some(d.content()?); + Ok(()) + } + b"Rule" => { + let ans: ReplicationRule = d.content()?; + rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + role: role.ok_or(DeError::MissingField)?, + rules: rules.ok_or(DeError::MissingField)?, + }) + } } +impl SerializeContent for ReplicationRule { + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.delete_marker_replication { + s.content("DeleteMarkerReplication", val)?; + } + if let Some(ref val) = self.delete_replication { + s.content("DeleteReplication", val)?; + } + s.content("Destination", &self.destination)?; + if let Some(ref val) = self.existing_object_replication { + s.content("ExistingObjectReplication", val)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("ID", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.priority { + s.content("Priority", val)?; + } + if let Some(ref val) = self.source_selection_criteria { + s.content("SourceSelectionCriteria", val)?; + } + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut delete_marker_replication: Option = None; -let mut delete_replication: Option = None; -let mut destination: Option = None; -let mut existing_object_replication: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut prefix: Option = None; -let mut priority: Option = None; -let mut source_selection_criteria: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"DeleteMarkerReplication" => { -if delete_marker_replication.is_some() { return Err(DeError::DuplicateField); } -delete_marker_replication = Some(d.content()?); -Ok(()) -} -b"DeleteReplication" => { -if delete_replication.is_some() { return Err(DeError::DuplicateField); } -delete_replication = Some(d.content()?); -Ok(()) -} -b"Destination" => { -if destination.is_some() { return Err(DeError::DuplicateField); } -destination = Some(d.content()?); -Ok(()) -} -b"ExistingObjectReplication" => { -if existing_object_replication.is_some() { return Err(DeError::DuplicateField); } -existing_object_replication = Some(d.content()?); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"ID" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Priority" => { -if priority.is_some() { return Err(DeError::DuplicateField); } -priority = Some(d.content()?); -Ok(()) -} -b"SourceSelectionCriteria" => { -if source_selection_criteria.is_some() { return Err(DeError::DuplicateField); } -source_selection_criteria = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -delete_marker_replication, -delete_replication, -destination: destination.ok_or(DeError::MissingField)?, -existing_object_replication, -filter, -id, -prefix, -priority, -source_selection_criteria, -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut delete_marker_replication: Option = None; + let mut delete_replication: Option = None; + let mut destination: Option = None; + let mut existing_object_replication: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut prefix: Option = None; + let mut priority: Option = None; + let mut source_selection_criteria: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"DeleteMarkerReplication" => { + if delete_marker_replication.is_some() { + return Err(DeError::DuplicateField); + } + delete_marker_replication = Some(d.content()?); + Ok(()) + } + b"DeleteReplication" => { + if delete_replication.is_some() { + return Err(DeError::DuplicateField); + } + delete_replication = Some(d.content()?); + Ok(()) + } + b"Destination" => { + if destination.is_some() { + return Err(DeError::DuplicateField); + } + destination = Some(d.content()?); + Ok(()) + } + b"ExistingObjectReplication" => { + if existing_object_replication.is_some() { + return Err(DeError::DuplicateField); + } + existing_object_replication = Some(d.content()?); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Priority" => { + if priority.is_some() { + return Err(DeError::DuplicateField); + } + priority = Some(d.content()?); + Ok(()) + } + b"SourceSelectionCriteria" => { + if source_selection_criteria.is_some() { + return Err(DeError::DuplicateField); + } + source_selection_criteria = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + delete_marker_replication, + delete_replication, + destination: destination.ok_or(DeError::MissingField)?, + existing_object_replication, + filter, + id, + prefix, + priority, + source_selection_criteria, + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ReplicationRuleAndOperator { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(iter) = &self.tags { -s.flattened_list("Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(iter) = &self.tags { + s.flattened_list("Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationRuleAndOperator { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut prefix: Option = None; -let mut tags: Option = None; -d.for_each_element(|d, x| match x { -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -let ans: Tag = d.content()?; -tags.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -prefix, -tags, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut prefix: Option = None; + let mut tags: Option = None; + d.for_each_element(|d, x| match x { + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + let ans: Tag = d.content()?; + tags.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { prefix, tags }) + } } impl SerializeContent for ReplicationRuleFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.and { -s.content("And", val)?; -} -if let Some(ref val) = self.prefix { -s.content("Prefix", val)?; -} -if let Some(ref val) = self.tag { -s.content("Tag", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.and { + s.content("And", val)?; + } + if let Some(ref val) = self.prefix { + s.content("Prefix", val)?; + } + if let Some(ref val) = self.tag { + s.content("Tag", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationRuleFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut and: Option = None; -let mut prefix: Option = None; -let mut tag: Option = None; -d.for_each_element(|d, x| match x { -b"And" => { -if and.is_some() { return Err(DeError::DuplicateField); } -and = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"Tag" => { -if tag.is_some() { return Err(DeError::DuplicateField); } -tag = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -and, -cached_tags: CachedTags::default(), -prefix, -tag, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut and: Option = None; + let mut prefix: Option = None; + let mut tag: Option = None; + d.for_each_element(|d, x| match x { + b"And" => { + if and.is_some() { + return Err(DeError::DuplicateField); + } + and = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"Tag" => { + if tag.is_some() { + return Err(DeError::DuplicateField); + } + tag = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + and, + cached_tags: CachedTags::default(), + prefix, + tag, + }) + } } impl SerializeContent for ReplicationRuleStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ReplicationRuleStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ReplicationRuleStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ReplicationRuleStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ReplicationRuleStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ReplicationRuleStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ReplicationTime { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -s.content("Time", &self.time)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + s.content("Time", &self.time)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationTime { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -let mut time: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -b"Time" => { -if time.is_some() { return Err(DeError::DuplicateField); } -time = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -time: time.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + let mut time: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + b"Time" => { + if time.is_some() { + return Err(DeError::DuplicateField); + } + time = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + time: time.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ReplicationTimeStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ReplicationTimeStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(ReplicationTimeStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(ReplicationTimeStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(ReplicationTimeStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(ReplicationTimeStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ReplicationTimeValue { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.minutes { -s.content("Minutes", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.minutes { + s.content("Minutes", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ReplicationTimeValue { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut minutes: Option = None; -d.for_each_element(|d, x| match x { -b"Minutes" => { -if minutes.is_some() { return Err(DeError::DuplicateField); } -minutes = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -minutes, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut minutes: Option = None; + d.for_each_element(|d, x| match x { + b"Minutes" => { + if minutes.is_some() { + return Err(DeError::DuplicateField); + } + minutes = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { minutes }) + } } impl SerializeContent for RequestPaymentConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Payer", &self.payer)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Payer", &self.payer)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RequestPaymentConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut payer: Option = None; -d.for_each_element(|d, x| match x { -b"Payer" => { -if payer.is_some() { return Err(DeError::DuplicateField); } -payer = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -payer: payer.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut payer: Option = None; + d.for_each_element(|d, x| match x { + b"Payer" => { + if payer.is_some() { + return Err(DeError::DuplicateField); + } + payer = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + payer: payer.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for RequestProgress { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.enabled { -s.content("Enabled", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.enabled { + s.content("Enabled", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RequestProgress { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut enabled: Option = None; -d.for_each_element(|d, x| match x { -b"Enabled" => { -if enabled.is_some() { return Err(DeError::DuplicateField); } -enabled = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -enabled, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut enabled: Option = None; + d.for_each_element(|d, x| match x { + b"Enabled" => { + if enabled.is_some() { + return Err(DeError::DuplicateField); + } + enabled = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { enabled }) + } } impl SerializeContent for RestoreRequest { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -if let Some(ref val) = self.description { -s.content("Description", val)?; -} -if let Some(ref val) = self.glacier_job_parameters { -s.content("GlacierJobParameters", val)?; -} -if let Some(ref val) = self.output_location { -s.content("OutputLocation", val)?; -} -if let Some(ref val) = self.select_parameters { -s.content("SelectParameters", val)?; -} -if let Some(ref val) = self.tier { -s.content("Tier", val)?; -} -if let Some(ref val) = self.type_ { -s.content("Type", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + if let Some(ref val) = self.description { + s.content("Description", val)?; + } + if let Some(ref val) = self.glacier_job_parameters { + s.content("GlacierJobParameters", val)?; + } + if let Some(ref val) = self.output_location { + s.content("OutputLocation", val)?; + } + if let Some(ref val) = self.select_parameters { + s.content("SelectParameters", val)?; + } + if let Some(ref val) = self.tier { + s.content("Tier", val)?; + } + if let Some(ref val) = self.type_ { + s.content("Type", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RestoreRequest { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut days: Option = None; -let mut description: Option = None; -let mut glacier_job_parameters: Option = None; -let mut output_location: Option = None; -let mut select_parameters: Option = None; -let mut tier: Option = None; -let mut type_: Option = None; -d.for_each_element(|d, x| match x { -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -b"Description" => { -if description.is_some() { return Err(DeError::DuplicateField); } -description = Some(d.content()?); -Ok(()) -} -b"GlacierJobParameters" => { -if glacier_job_parameters.is_some() { return Err(DeError::DuplicateField); } -glacier_job_parameters = Some(d.content()?); -Ok(()) -} -b"OutputLocation" => { -if output_location.is_some() { return Err(DeError::DuplicateField); } -output_location = Some(d.content()?); -Ok(()) -} -b"SelectParameters" => { -if select_parameters.is_some() { return Err(DeError::DuplicateField); } -select_parameters = Some(d.content()?); -Ok(()) -} -b"Tier" => { -if tier.is_some() { return Err(DeError::DuplicateField); } -tier = Some(d.content()?); -Ok(()) -} -b"Type" => { -if type_.is_some() { return Err(DeError::DuplicateField); } -type_ = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -days, -description, -glacier_job_parameters, -output_location, -select_parameters, -tier, -type_, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut days: Option = None; + let mut description: Option = None; + let mut glacier_job_parameters: Option = None; + let mut output_location: Option = None; + let mut select_parameters: Option = None; + let mut tier: Option = None; + let mut type_: Option = None; + d.for_each_element(|d, x| match x { + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + b"Description" => { + if description.is_some() { + return Err(DeError::DuplicateField); + } + description = Some(d.content()?); + Ok(()) + } + b"GlacierJobParameters" => { + if glacier_job_parameters.is_some() { + return Err(DeError::DuplicateField); + } + glacier_job_parameters = Some(d.content()?); + Ok(()) + } + b"OutputLocation" => { + if output_location.is_some() { + return Err(DeError::DuplicateField); + } + output_location = Some(d.content()?); + Ok(()) + } + b"SelectParameters" => { + if select_parameters.is_some() { + return Err(DeError::DuplicateField); + } + select_parameters = Some(d.content()?); + Ok(()) + } + b"Tier" => { + if tier.is_some() { + return Err(DeError::DuplicateField); + } + tier = Some(d.content()?); + Ok(()) + } + b"Type" => { + if type_.is_some() { + return Err(DeError::DuplicateField); + } + type_ = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + days, + description, + glacier_job_parameters, + output_location, + select_parameters, + tier, + type_, + }) + } } impl SerializeContent for RestoreRequestType { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for RestoreRequestType { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"SELECT" => Ok(Self::from_static(RestoreRequestType::SELECT)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"SELECT" => Ok(Self::from_static(RestoreRequestType::SELECT)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for RestoreStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.is_restore_in_progress { -s.content("IsRestoreInProgress", val)?; -} -if let Some(ref val) = self.restore_expiry_date { -s.timestamp("RestoreExpiryDate", val, TimestampFormat::DateTime)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.is_restore_in_progress { + s.content("IsRestoreInProgress", val)?; + } + if let Some(ref val) = self.restore_expiry_date { + s.timestamp("RestoreExpiryDate", val, TimestampFormat::DateTime)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RestoreStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut is_restore_in_progress: Option = None; -let mut restore_expiry_date: Option = None; -d.for_each_element(|d, x| match x { -b"IsRestoreInProgress" => { -if is_restore_in_progress.is_some() { return Err(DeError::DuplicateField); } -is_restore_in_progress = Some(d.content()?); -Ok(()) -} -b"RestoreExpiryDate" => { -if restore_expiry_date.is_some() { return Err(DeError::DuplicateField); } -restore_expiry_date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -is_restore_in_progress, -restore_expiry_date, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut is_restore_in_progress: Option = None; + let mut restore_expiry_date: Option = None; + d.for_each_element(|d, x| match x { + b"IsRestoreInProgress" => { + if is_restore_in_progress.is_some() { + return Err(DeError::DuplicateField); + } + is_restore_in_progress = Some(d.content()?); + Ok(()) + } + b"RestoreExpiryDate" => { + if restore_expiry_date.is_some() { + return Err(DeError::DuplicateField); + } + restore_expiry_date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + is_restore_in_progress, + restore_expiry_date, + }) + } } impl SerializeContent for RoutingRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.condition { -s.content("Condition", val)?; -} -s.content("Redirect", &self.redirect)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.condition { + s.content("Condition", val)?; + } + s.content("Redirect", &self.redirect)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for RoutingRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut condition: Option = None; -let mut redirect: Option = None; -d.for_each_element(|d, x| match x { -b"Condition" => { -if condition.is_some() { return Err(DeError::DuplicateField); } -condition = Some(d.content()?); -Ok(()) -} -b"Redirect" => { -if redirect.is_some() { return Err(DeError::DuplicateField); } -redirect = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -condition, -redirect: redirect.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut condition: Option = None; + let mut redirect: Option = None; + d.for_each_element(|d, x| match x { + b"Condition" => { + if condition.is_some() { + return Err(DeError::DuplicateField); + } + condition = Some(d.content()?); + Ok(()) + } + b"Redirect" => { + if redirect.is_some() { + return Err(DeError::DuplicateField); + } + redirect = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + condition, + redirect: redirect.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for S3KeyFilter { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.filter_rules { -s.flattened_list("FilterRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.filter_rules { + s.flattened_list("FilterRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for S3KeyFilter { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut filter_rules: Option = None; -d.for_each_element(|d, x| match x { -b"FilterRule" => { -let ans: FilterRule = d.content()?; -filter_rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -filter_rules, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut filter_rules: Option = None; + d.for_each_element(|d, x| match x { + b"FilterRule" => { + let ans: FilterRule = d.content()?; + filter_rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { filter_rules }) + } } impl SerializeContent for S3Location { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(iter) = &self.access_control_list { -s.list("AccessControlList", "Grant", iter)?; -} -s.content("BucketName", &self.bucket_name)?; -if let Some(ref val) = self.canned_acl { -s.content("CannedACL", val)?; -} -if let Some(ref val) = self.encryption { -s.content("Encryption", val)?; -} -s.content("Prefix", &self.prefix)?; -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -if let Some(ref val) = self.tagging { -s.content("Tagging", val)?; -} -if let Some(iter) = &self.user_metadata { -s.list("UserMetadata", "MetadataEntry", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(iter) = &self.access_control_list { + s.list("AccessControlList", "Grant", iter)?; + } + s.content("BucketName", &self.bucket_name)?; + if let Some(ref val) = self.canned_acl { + s.content("CannedACL", val)?; + } + if let Some(ref val) = self.encryption { + s.content("Encryption", val)?; + } + s.content("Prefix", &self.prefix)?; + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + if let Some(ref val) = self.tagging { + s.content("Tagging", val)?; + } + if let Some(iter) = &self.user_metadata { + s.list("UserMetadata", "MetadataEntry", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for S3Location { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_control_list: Option = None; -let mut bucket_name: Option = None; -let mut canned_acl: Option = None; -let mut encryption: Option = None; -let mut prefix: Option = None; -let mut storage_class: Option = None; -let mut tagging: Option = None; -let mut user_metadata: Option = None; -d.for_each_element(|d, x| match x { -b"AccessControlList" => { -if access_control_list.is_some() { return Err(DeError::DuplicateField); } -access_control_list = Some(d.list_content("Grant")?); -Ok(()) -} -b"BucketName" => { -if bucket_name.is_some() { return Err(DeError::DuplicateField); } -bucket_name = Some(d.content()?); -Ok(()) -} -b"CannedACL" => { -if canned_acl.is_some() { return Err(DeError::DuplicateField); } -canned_acl = Some(d.content()?); -Ok(()) -} -b"Encryption" => { -if encryption.is_some() { return Err(DeError::DuplicateField); } -encryption = Some(d.content()?); -Ok(()) -} -b"Prefix" => { -if prefix.is_some() { return Err(DeError::DuplicateField); } -prefix = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -b"Tagging" => { -if tagging.is_some() { return Err(DeError::DuplicateField); } -tagging = Some(d.content()?); -Ok(()) -} -b"UserMetadata" => { -if user_metadata.is_some() { return Err(DeError::DuplicateField); } -user_metadata = Some(d.list_content("MetadataEntry")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_control_list, -bucket_name: bucket_name.ok_or(DeError::MissingField)?, -canned_acl, -encryption, -prefix: prefix.ok_or(DeError::MissingField)?, -storage_class, -tagging, -user_metadata, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_control_list: Option = None; + let mut bucket_name: Option = None; + let mut canned_acl: Option = None; + let mut encryption: Option = None; + let mut prefix: Option = None; + let mut storage_class: Option = None; + let mut tagging: Option = None; + let mut user_metadata: Option = None; + d.for_each_element(|d, x| match x { + b"AccessControlList" => { + if access_control_list.is_some() { + return Err(DeError::DuplicateField); + } + access_control_list = Some(d.list_content("Grant")?); + Ok(()) + } + b"BucketName" => { + if bucket_name.is_some() { + return Err(DeError::DuplicateField); + } + bucket_name = Some(d.content()?); + Ok(()) + } + b"CannedACL" => { + if canned_acl.is_some() { + return Err(DeError::DuplicateField); + } + canned_acl = Some(d.content()?); + Ok(()) + } + b"Encryption" => { + if encryption.is_some() { + return Err(DeError::DuplicateField); + } + encryption = Some(d.content()?); + Ok(()) + } + b"Prefix" => { + if prefix.is_some() { + return Err(DeError::DuplicateField); + } + prefix = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + b"Tagging" => { + if tagging.is_some() { + return Err(DeError::DuplicateField); + } + tagging = Some(d.content()?); + Ok(()) + } + b"UserMetadata" => { + if user_metadata.is_some() { + return Err(DeError::DuplicateField); + } + user_metadata = Some(d.list_content("MetadataEntry")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_control_list, + bucket_name: bucket_name.ok_or(DeError::MissingField)?, + canned_acl, + encryption, + prefix: prefix.ok_or(DeError::MissingField)?, + storage_class, + tagging, + user_metadata, + }) + } } impl SerializeContent for S3TablesDestination { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("TableBucketArn", &self.table_bucket_arn)?; -s.content("TableName", &self.table_name)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("TableBucketArn", &self.table_bucket_arn)?; + s.content("TableName", &self.table_name)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for S3TablesDestination { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut table_bucket_arn: Option = None; -let mut table_name: Option = None; -d.for_each_element(|d, x| match x { -b"TableBucketArn" => { -if table_bucket_arn.is_some() { return Err(DeError::DuplicateField); } -table_bucket_arn = Some(d.content()?); -Ok(()) -} -b"TableName" => { -if table_name.is_some() { return Err(DeError::DuplicateField); } -table_name = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, -table_name: table_name.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut table_bucket_arn: Option = None; + let mut table_name: Option = None; + d.for_each_element(|d, x| match x { + b"TableBucketArn" => { + if table_bucket_arn.is_some() { + return Err(DeError::DuplicateField); + } + table_bucket_arn = Some(d.content()?); + Ok(()) + } + b"TableName" => { + if table_name.is_some() { + return Err(DeError::DuplicateField); + } + table_name = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, + table_name: table_name.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for S3TablesDestinationResult { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("TableArn", &self.table_arn)?; -s.content("TableBucketArn", &self.table_bucket_arn)?; -s.content("TableName", &self.table_name)?; -s.content("TableNamespace", &self.table_namespace)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("TableArn", &self.table_arn)?; + s.content("TableBucketArn", &self.table_bucket_arn)?; + s.content("TableName", &self.table_name)?; + s.content("TableNamespace", &self.table_namespace)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for S3TablesDestinationResult { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut table_arn: Option = None; -let mut table_bucket_arn: Option = None; -let mut table_name: Option = None; -let mut table_namespace: Option = None; -d.for_each_element(|d, x| match x { -b"TableArn" => { -if table_arn.is_some() { return Err(DeError::DuplicateField); } -table_arn = Some(d.content()?); -Ok(()) -} -b"TableBucketArn" => { -if table_bucket_arn.is_some() { return Err(DeError::DuplicateField); } -table_bucket_arn = Some(d.content()?); -Ok(()) -} -b"TableName" => { -if table_name.is_some() { return Err(DeError::DuplicateField); } -table_name = Some(d.content()?); -Ok(()) -} -b"TableNamespace" => { -if table_namespace.is_some() { return Err(DeError::DuplicateField); } -table_namespace = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -table_arn: table_arn.ok_or(DeError::MissingField)?, -table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, -table_name: table_name.ok_or(DeError::MissingField)?, -table_namespace: table_namespace.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut table_arn: Option = None; + let mut table_bucket_arn: Option = None; + let mut table_name: Option = None; + let mut table_namespace: Option = None; + d.for_each_element(|d, x| match x { + b"TableArn" => { + if table_arn.is_some() { + return Err(DeError::DuplicateField); + } + table_arn = Some(d.content()?); + Ok(()) + } + b"TableBucketArn" => { + if table_bucket_arn.is_some() { + return Err(DeError::DuplicateField); + } + table_bucket_arn = Some(d.content()?); + Ok(()) + } + b"TableName" => { + if table_name.is_some() { + return Err(DeError::DuplicateField); + } + table_name = Some(d.content()?); + Ok(()) + } + b"TableNamespace" => { + if table_namespace.is_some() { + return Err(DeError::DuplicateField); + } + table_namespace = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + table_arn: table_arn.ok_or(DeError::MissingField)?, + table_bucket_arn: table_bucket_arn.ok_or(DeError::MissingField)?, + table_name: table_name.ok_or(DeError::MissingField)?, + table_namespace: table_namespace.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for SSEKMS { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("KeyId", &self.key_id)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("KeyId", &self.key_id)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SSEKMS { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut key_id: Option = None; -d.for_each_element(|d, x| match x { -b"KeyId" => { -if key_id.is_some() { return Err(DeError::DuplicateField); } -key_id = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -key_id: key_id.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut key_id: Option = None; + d.for_each_element(|d, x| match x { + b"KeyId" => { + if key_id.is_some() { + return Err(DeError::DuplicateField); + } + key_id = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + key_id: key_id.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for SSES3 { -fn serialize_content(&self, _: &mut Serializer) -> SerResult { -Ok(()) -} + fn serialize_content(&self, _: &mut Serializer) -> SerResult { + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SSES3 { -fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { -Ok(Self { -}) -} + fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { + Ok(Self {}) + } } impl SerializeContent for ScanRange { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.end { -s.content("End", val)?; -} -if let Some(ref val) = self.start { -s.content("Start", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.end { + s.content("End", val)?; + } + if let Some(ref val) = self.start { + s.content("Start", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ScanRange { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut end: Option = None; -let mut start: Option = None; -d.for_each_element(|d, x| match x { -b"End" => { -if end.is_some() { return Err(DeError::DuplicateField); } -end = Some(d.content()?); -Ok(()) -} -b"Start" => { -if start.is_some() { return Err(DeError::DuplicateField); } -start = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -end, -start, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut end: Option = None; + let mut start: Option = None; + d.for_each_element(|d, x| match x { + b"End" => { + if end.is_some() { + return Err(DeError::DuplicateField); + } + end = Some(d.content()?); + Ok(()) + } + b"Start" => { + if start.is_some() { + return Err(DeError::DuplicateField); + } + start = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { end, start }) + } } impl SerializeContent for SelectObjectContentRequest { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Expression", &self.expression)?; -s.content("ExpressionType", &self.expression_type)?; -s.content("InputSerialization", &self.input_serialization)?; -s.content("OutputSerialization", &self.output_serialization)?; -if let Some(ref val) = self.request_progress { -s.content("RequestProgress", val)?; -} -if let Some(ref val) = self.scan_range { -s.content("ScanRange", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Expression", &self.expression)?; + s.content("ExpressionType", &self.expression_type)?; + s.content("InputSerialization", &self.input_serialization)?; + s.content("OutputSerialization", &self.output_serialization)?; + if let Some(ref val) = self.request_progress { + s.content("RequestProgress", val)?; + } + if let Some(ref val) = self.scan_range { + s.content("ScanRange", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SelectObjectContentRequest { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut expression: Option = None; -let mut expression_type: Option = None; -let mut input_serialization: Option = None; -let mut output_serialization: Option = None; -let mut request_progress: Option = None; -let mut scan_range: Option = None; -d.for_each_element(|d, x| match x { -b"Expression" => { -if expression.is_some() { return Err(DeError::DuplicateField); } -expression = Some(d.content()?); -Ok(()) -} -b"ExpressionType" => { -if expression_type.is_some() { return Err(DeError::DuplicateField); } -expression_type = Some(d.content()?); -Ok(()) -} -b"InputSerialization" => { -if input_serialization.is_some() { return Err(DeError::DuplicateField); } -input_serialization = Some(d.content()?); -Ok(()) -} -b"OutputSerialization" => { -if output_serialization.is_some() { return Err(DeError::DuplicateField); } -output_serialization = Some(d.content()?); -Ok(()) -} -b"RequestProgress" => { -if request_progress.is_some() { return Err(DeError::DuplicateField); } -request_progress = Some(d.content()?); -Ok(()) -} -b"ScanRange" => { -if scan_range.is_some() { return Err(DeError::DuplicateField); } -scan_range = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -expression: expression.ok_or(DeError::MissingField)?, -expression_type: expression_type.ok_or(DeError::MissingField)?, -input_serialization: input_serialization.ok_or(DeError::MissingField)?, -output_serialization: output_serialization.ok_or(DeError::MissingField)?, -request_progress, -scan_range, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut expression: Option = None; + let mut expression_type: Option = None; + let mut input_serialization: Option = None; + let mut output_serialization: Option = None; + let mut request_progress: Option = None; + let mut scan_range: Option = None; + d.for_each_element(|d, x| match x { + b"Expression" => { + if expression.is_some() { + return Err(DeError::DuplicateField); + } + expression = Some(d.content()?); + Ok(()) + } + b"ExpressionType" => { + if expression_type.is_some() { + return Err(DeError::DuplicateField); + } + expression_type = Some(d.content()?); + Ok(()) + } + b"InputSerialization" => { + if input_serialization.is_some() { + return Err(DeError::DuplicateField); + } + input_serialization = Some(d.content()?); + Ok(()) + } + b"OutputSerialization" => { + if output_serialization.is_some() { + return Err(DeError::DuplicateField); + } + output_serialization = Some(d.content()?); + Ok(()) + } + b"RequestProgress" => { + if request_progress.is_some() { + return Err(DeError::DuplicateField); + } + request_progress = Some(d.content()?); + Ok(()) + } + b"ScanRange" => { + if scan_range.is_some() { + return Err(DeError::DuplicateField); + } + scan_range = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + expression: expression.ok_or(DeError::MissingField)?, + expression_type: expression_type.ok_or(DeError::MissingField)?, + input_serialization: input_serialization.ok_or(DeError::MissingField)?, + output_serialization: output_serialization.ok_or(DeError::MissingField)?, + request_progress, + scan_range, + }) + } } impl SerializeContent for SelectParameters { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Expression", &self.expression)?; -s.content("ExpressionType", &self.expression_type)?; -s.content("InputSerialization", &self.input_serialization)?; -s.content("OutputSerialization", &self.output_serialization)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Expression", &self.expression)?; + s.content("ExpressionType", &self.expression_type)?; + s.content("InputSerialization", &self.input_serialization)?; + s.content("OutputSerialization", &self.output_serialization)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SelectParameters { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut expression: Option = None; -let mut expression_type: Option = None; -let mut input_serialization: Option = None; -let mut output_serialization: Option = None; -d.for_each_element(|d, x| match x { -b"Expression" => { -if expression.is_some() { return Err(DeError::DuplicateField); } -expression = Some(d.content()?); -Ok(()) -} -b"ExpressionType" => { -if expression_type.is_some() { return Err(DeError::DuplicateField); } -expression_type = Some(d.content()?); -Ok(()) -} -b"InputSerialization" => { -if input_serialization.is_some() { return Err(DeError::DuplicateField); } -input_serialization = Some(d.content()?); -Ok(()) -} -b"OutputSerialization" => { -if output_serialization.is_some() { return Err(DeError::DuplicateField); } -output_serialization = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -expression: expression.ok_or(DeError::MissingField)?, -expression_type: expression_type.ok_or(DeError::MissingField)?, -input_serialization: input_serialization.ok_or(DeError::MissingField)?, -output_serialization: output_serialization.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut expression: Option = None; + let mut expression_type: Option = None; + let mut input_serialization: Option = None; + let mut output_serialization: Option = None; + d.for_each_element(|d, x| match x { + b"Expression" => { + if expression.is_some() { + return Err(DeError::DuplicateField); + } + expression = Some(d.content()?); + Ok(()) + } + b"ExpressionType" => { + if expression_type.is_some() { + return Err(DeError::DuplicateField); + } + expression_type = Some(d.content()?); + Ok(()) + } + b"InputSerialization" => { + if input_serialization.is_some() { + return Err(DeError::DuplicateField); + } + input_serialization = Some(d.content()?); + Ok(()) + } + b"OutputSerialization" => { + if output_serialization.is_some() { + return Err(DeError::DuplicateField); + } + output_serialization = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + expression: expression.ok_or(DeError::MissingField)?, + expression_type: expression_type.ok_or(DeError::MissingField)?, + input_serialization: input_serialization.ok_or(DeError::MissingField)?, + output_serialization: output_serialization.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ServerSideEncryption { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for ServerSideEncryption { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"AES256" => Ok(Self::from_static(ServerSideEncryption::AES256)), -b"aws:kms" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS)), -b"aws:kms:dsse" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS_DSSE)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"AES256" => Ok(Self::from_static(ServerSideEncryption::AES256)), + b"aws:kms" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS)), + b"aws:kms:dsse" => Ok(Self::from_static(ServerSideEncryption::AWS_KMS_DSSE)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for ServerSideEncryptionByDefault { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.kms_master_key_id { -s.content("KMSMasterKeyID", val)?; -} -s.content("SSEAlgorithm", &self.sse_algorithm)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.kms_master_key_id { + s.content("KMSMasterKeyID", val)?; + } + s.content("SSEAlgorithm", &self.sse_algorithm)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionByDefault { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut kms_master_key_id: Option = None; -let mut sse_algorithm: Option = None; -d.for_each_element(|d, x| match x { -b"KMSMasterKeyID" => { -if kms_master_key_id.is_some() { return Err(DeError::DuplicateField); } -kms_master_key_id = Some(d.content()?); -Ok(()) -} -b"SSEAlgorithm" => { -if sse_algorithm.is_some() { return Err(DeError::DuplicateField); } -sse_algorithm = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -kms_master_key_id, -sse_algorithm: sse_algorithm.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut kms_master_key_id: Option = None; + let mut sse_algorithm: Option = None; + d.for_each_element(|d, x| match x { + b"KMSMasterKeyID" => { + if kms_master_key_id.is_some() { + return Err(DeError::DuplicateField); + } + kms_master_key_id = Some(d.content()?); + Ok(()) + } + b"SSEAlgorithm" => { + if sse_algorithm.is_some() { + return Err(DeError::DuplicateField); + } + sse_algorithm = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + kms_master_key_id, + sse_algorithm: sse_algorithm.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ServerSideEncryptionConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.rules; -s.flattened_list("Rule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.rules; + s.flattened_list("Rule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut rules: Option = None; -d.for_each_element(|d, x| match x { -b"Rule" => { -let ans: ServerSideEncryptionRule = d.content()?; -rules.get_or_insert_with(List::new).push(ans); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -rules: rules.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut rules: Option = None; + d.for_each_element(|d, x| match x { + b"Rule" => { + let ans: ServerSideEncryptionRule = d.content()?; + rules.get_or_insert_with(List::new).push(ans); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + rules: rules.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for ServerSideEncryptionRule { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.apply_server_side_encryption_by_default { -s.content("ApplyServerSideEncryptionByDefault", val)?; -} -if let Some(ref val) = self.bucket_key_enabled { -s.content("BucketKeyEnabled", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.apply_server_side_encryption_by_default { + s.content("ApplyServerSideEncryptionByDefault", val)?; + } + if let Some(ref val) = self.bucket_key_enabled { + s.content("BucketKeyEnabled", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for ServerSideEncryptionRule { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut apply_server_side_encryption_by_default: Option = None; -let mut bucket_key_enabled: Option = None; -d.for_each_element(|d, x| match x { -b"ApplyServerSideEncryptionByDefault" => { -if apply_server_side_encryption_by_default.is_some() { return Err(DeError::DuplicateField); } -apply_server_side_encryption_by_default = Some(d.content()?); -Ok(()) -} -b"BucketKeyEnabled" => { -if bucket_key_enabled.is_some() { return Err(DeError::DuplicateField); } -bucket_key_enabled = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -apply_server_side_encryption_by_default, -bucket_key_enabled, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut apply_server_side_encryption_by_default: Option = None; + let mut bucket_key_enabled: Option = None; + d.for_each_element(|d, x| match x { + b"ApplyServerSideEncryptionByDefault" => { + if apply_server_side_encryption_by_default.is_some() { + return Err(DeError::DuplicateField); + } + apply_server_side_encryption_by_default = Some(d.content()?); + Ok(()) + } + b"BucketKeyEnabled" => { + if bucket_key_enabled.is_some() { + return Err(DeError::DuplicateField); + } + bucket_key_enabled = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + apply_server_side_encryption_by_default, + bucket_key_enabled, + }) + } } impl SerializeContent for SessionCredentials { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("AccessKeyId", &self.access_key_id)?; -s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; -s.content("SecretAccessKey", &self.secret_access_key)?; -s.content("SessionToken", &self.session_token)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("AccessKeyId", &self.access_key_id)?; + s.timestamp("Expiration", &self.expiration, TimestampFormat::DateTime)?; + s.content("SecretAccessKey", &self.secret_access_key)?; + s.content("SessionToken", &self.session_token)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SessionCredentials { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_key_id: Option = None; -let mut expiration: Option = None; -let mut secret_access_key: Option = None; -let mut session_token: Option = None; -d.for_each_element(|d, x| match x { -b"AccessKeyId" => { -if access_key_id.is_some() { return Err(DeError::DuplicateField); } -access_key_id = Some(d.content()?); -Ok(()) -} -b"Expiration" => { -if expiration.is_some() { return Err(DeError::DuplicateField); } -expiration = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"SecretAccessKey" => { -if secret_access_key.is_some() { return Err(DeError::DuplicateField); } -secret_access_key = Some(d.content()?); -Ok(()) -} -b"SessionToken" => { -if session_token.is_some() { return Err(DeError::DuplicateField); } -session_token = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_key_id: access_key_id.ok_or(DeError::MissingField)?, -expiration: expiration.ok_or(DeError::MissingField)?, -secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, -session_token: session_token.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_key_id: Option = None; + let mut expiration: Option = None; + let mut secret_access_key: Option = None; + let mut session_token: Option = None; + d.for_each_element(|d, x| match x { + b"AccessKeyId" => { + if access_key_id.is_some() { + return Err(DeError::DuplicateField); + } + access_key_id = Some(d.content()?); + Ok(()) + } + b"Expiration" => { + if expiration.is_some() { + return Err(DeError::DuplicateField); + } + expiration = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"SecretAccessKey" => { + if secret_access_key.is_some() { + return Err(DeError::DuplicateField); + } + secret_access_key = Some(d.content()?); + Ok(()) + } + b"SessionToken" => { + if session_token.is_some() { + return Err(DeError::DuplicateField); + } + session_token = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_key_id: access_key_id.ok_or(DeError::MissingField)?, + expiration: expiration.ok_or(DeError::MissingField)?, + secret_access_key: secret_access_key.ok_or(DeError::MissingField)?, + session_token: session_token.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for SimplePrefix { -fn serialize_content(&self, _: &mut Serializer) -> SerResult { -Ok(()) -} + fn serialize_content(&self, _: &mut Serializer) -> SerResult { + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SimplePrefix { -fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { -Ok(Self { -}) -} + fn deserialize_content(_: &mut Deserializer<'xml>) -> DeResult { + Ok(Self {}) + } } impl SerializeContent for SourceSelectionCriteria { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.replica_modifications { -s.content("ReplicaModifications", val)?; -} -if let Some(ref val) = self.sse_kms_encrypted_objects { -s.content("SseKmsEncryptedObjects", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.replica_modifications { + s.content("ReplicaModifications", val)?; + } + if let Some(ref val) = self.sse_kms_encrypted_objects { + s.content("SseKmsEncryptedObjects", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SourceSelectionCriteria { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut replica_modifications: Option = None; -let mut sse_kms_encrypted_objects: Option = None; -d.for_each_element(|d, x| match x { -b"ReplicaModifications" => { -if replica_modifications.is_some() { return Err(DeError::DuplicateField); } -replica_modifications = Some(d.content()?); -Ok(()) -} -b"SseKmsEncryptedObjects" => { -if sse_kms_encrypted_objects.is_some() { return Err(DeError::DuplicateField); } -sse_kms_encrypted_objects = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -replica_modifications, -sse_kms_encrypted_objects, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut replica_modifications: Option = None; + let mut sse_kms_encrypted_objects: Option = None; + d.for_each_element(|d, x| match x { + b"ReplicaModifications" => { + if replica_modifications.is_some() { + return Err(DeError::DuplicateField); + } + replica_modifications = Some(d.content()?); + Ok(()) + } + b"SseKmsEncryptedObjects" => { + if sse_kms_encrypted_objects.is_some() { + return Err(DeError::DuplicateField); + } + sse_kms_encrypted_objects = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + replica_modifications, + sse_kms_encrypted_objects, + }) + } } impl SerializeContent for SseKmsEncryptedObjects { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Status", &self.status)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Status", &self.status)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for SseKmsEncryptedObjects { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -status: status.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + status: status.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for SseKmsEncryptedObjectsStatus { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for SseKmsEncryptedObjectsStatus { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Disabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::DISABLED)), -b"Enabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::ENABLED)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Disabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::DISABLED)), + b"Enabled" => Ok(Self::from_static(SseKmsEncryptedObjectsStatus::ENABLED)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Stats { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.bytes_processed { -s.content("BytesProcessed", val)?; -} -if let Some(ref val) = self.bytes_returned { -s.content("BytesReturned", val)?; -} -if let Some(ref val) = self.bytes_scanned { -s.content("BytesScanned", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.bytes_processed { + s.content("BytesProcessed", val)?; + } + if let Some(ref val) = self.bytes_returned { + s.content("BytesReturned", val)?; + } + if let Some(ref val) = self.bytes_scanned { + s.content("BytesScanned", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Stats { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut bytes_processed: Option = None; -let mut bytes_returned: Option = None; -let mut bytes_scanned: Option = None; -d.for_each_element(|d, x| match x { -b"BytesProcessed" => { -if bytes_processed.is_some() { return Err(DeError::DuplicateField); } -bytes_processed = Some(d.content()?); -Ok(()) -} -b"BytesReturned" => { -if bytes_returned.is_some() { return Err(DeError::DuplicateField); } -bytes_returned = Some(d.content()?); -Ok(()) -} -b"BytesScanned" => { -if bytes_scanned.is_some() { return Err(DeError::DuplicateField); } -bytes_scanned = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -bytes_processed, -bytes_returned, -bytes_scanned, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut bytes_processed: Option = None; + let mut bytes_returned: Option = None; + let mut bytes_scanned: Option = None; + d.for_each_element(|d, x| match x { + b"BytesProcessed" => { + if bytes_processed.is_some() { + return Err(DeError::DuplicateField); + } + bytes_processed = Some(d.content()?); + Ok(()) + } + b"BytesReturned" => { + if bytes_returned.is_some() { + return Err(DeError::DuplicateField); + } + bytes_returned = Some(d.content()?); + Ok(()) + } + b"BytesScanned" => { + if bytes_scanned.is_some() { + return Err(DeError::DuplicateField); + } + bytes_scanned = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + bytes_processed, + bytes_returned, + bytes_scanned, + }) + } } impl SerializeContent for StorageClass { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for StorageClass { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DEEP_ARCHIVE" => Ok(Self::from_static(StorageClass::DEEP_ARCHIVE)), -b"EXPRESS_ONEZONE" => Ok(Self::from_static(StorageClass::EXPRESS_ONEZONE)), -b"GLACIER" => Ok(Self::from_static(StorageClass::GLACIER)), -b"GLACIER_IR" => Ok(Self::from_static(StorageClass::GLACIER_IR)), -b"INTELLIGENT_TIERING" => Ok(Self::from_static(StorageClass::INTELLIGENT_TIERING)), -b"ONEZONE_IA" => Ok(Self::from_static(StorageClass::ONEZONE_IA)), -b"OUTPOSTS" => Ok(Self::from_static(StorageClass::OUTPOSTS)), -b"REDUCED_REDUNDANCY" => Ok(Self::from_static(StorageClass::REDUCED_REDUNDANCY)), -b"SNOW" => Ok(Self::from_static(StorageClass::SNOW)), -b"STANDARD" => Ok(Self::from_static(StorageClass::STANDARD)), -b"STANDARD_IA" => Ok(Self::from_static(StorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), - } -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DEEP_ARCHIVE" => Ok(Self::from_static(StorageClass::DEEP_ARCHIVE)), + b"EXPRESS_ONEZONE" => Ok(Self::from_static(StorageClass::EXPRESS_ONEZONE)), + b"GLACIER" => Ok(Self::from_static(StorageClass::GLACIER)), + b"GLACIER_IR" => Ok(Self::from_static(StorageClass::GLACIER_IR)), + b"INTELLIGENT_TIERING" => Ok(Self::from_static(StorageClass::INTELLIGENT_TIERING)), + b"ONEZONE_IA" => Ok(Self::from_static(StorageClass::ONEZONE_IA)), + b"OUTPOSTS" => Ok(Self::from_static(StorageClass::OUTPOSTS)), + b"REDUCED_REDUNDANCY" => Ok(Self::from_static(StorageClass::REDUCED_REDUNDANCY)), + b"SNOW" => Ok(Self::from_static(StorageClass::SNOW)), + b"STANDARD" => Ok(Self::from_static(StorageClass::STANDARD)), + b"STANDARD_IA" => Ok(Self::from_static(StorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) + } } impl SerializeContent for StorageClassAnalysis { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.data_export { -s.content("DataExport", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.data_export { + s.content("DataExport", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysis { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut data_export: Option = None; -d.for_each_element(|d, x| match x { -b"DataExport" => { -if data_export.is_some() { return Err(DeError::DuplicateField); } -data_export = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -data_export, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut data_export: Option = None; + d.for_each_element(|d, x| match x { + b"DataExport" => { + if data_export.is_some() { + return Err(DeError::DuplicateField); + } + data_export = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { data_export }) + } } impl SerializeContent for StorageClassAnalysisDataExport { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("Destination", &self.destination)?; -s.content("OutputSchemaVersion", &self.output_schema_version)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("Destination", &self.destination)?; + s.content("OutputSchemaVersion", &self.output_schema_version)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysisDataExport { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut destination: Option = None; -let mut output_schema_version: Option = None; -d.for_each_element(|d, x| match x { -b"Destination" => { -if destination.is_some() { return Err(DeError::DuplicateField); } -destination = Some(d.content()?); -Ok(()) -} -b"OutputSchemaVersion" => { -if output_schema_version.is_some() { return Err(DeError::DuplicateField); } -output_schema_version = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -destination: destination.ok_or(DeError::MissingField)?, -output_schema_version: output_schema_version.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut destination: Option = None; + let mut output_schema_version: Option = None; + d.for_each_element(|d, x| match x { + b"Destination" => { + if destination.is_some() { + return Err(DeError::DuplicateField); + } + destination = Some(d.content()?); + Ok(()) + } + b"OutputSchemaVersion" => { + if output_schema_version.is_some() { + return Err(DeError::DuplicateField); + } + output_schema_version = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + destination: destination.ok_or(DeError::MissingField)?, + output_schema_version: output_schema_version.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for StorageClassAnalysisSchemaVersion { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for StorageClassAnalysisSchemaVersion { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"V_1" => Ok(Self::from_static(StorageClassAnalysisSchemaVersion::V_1)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"V_1" => Ok(Self::from_static(StorageClassAnalysisSchemaVersion::V_1)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Tag { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.key { -s.content("Key", val)?; -} -if let Some(ref val) = self.value { -s.content("Value", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.key { + s.content("Key", val)?; + } + if let Some(ref val) = self.value { + s.content("Value", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Tag { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut key: Option = None; -let mut value: Option = None; -d.for_each_element(|d, x| match x { -b"Key" => { -if key.is_some() { return Err(DeError::DuplicateField); } -key = Some(d.content()?); -Ok(()) -} -b"Value" => { -if value.is_some() { return Err(DeError::DuplicateField); } -value = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -key, -value, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut key: Option = None; + let mut value: Option = None; + d.for_each_element(|d, x| match x { + b"Key" => { + if key.is_some() { + return Err(DeError::DuplicateField); + } + key = Some(d.content()?); + Ok(()) + } + b"Value" => { + if value.is_some() { + return Err(DeError::DuplicateField); + } + value = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { key, value }) + } } impl SerializeContent for Tagging { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.tag_set; -s.list("TagSet", "Tag", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.tag_set; + s.list("TagSet", "Tag", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Tagging { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut tag_set: Option = None; -d.for_each_element(|d, x| match x { -b"TagSet" => { -if tag_set.is_some() { return Err(DeError::DuplicateField); } -tag_set = Some(d.list_content("Tag")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -tag_set: tag_set.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut tag_set: Option = None; + d.for_each_element(|d, x| match x { + b"TagSet" => { + if tag_set.is_some() { + return Err(DeError::DuplicateField); + } + tag_set = Some(d.list_content("Tag")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + tag_set: tag_set.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for TargetGrant { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.grantee { -let attrs = [ -("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), -("xsi:type", val.type_.as_str()), -]; -s.content_with_attrs("Grantee", &attrs, val)?; -} -if let Some(ref val) = self.permission { -s.content("Permission", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.grantee { + let attrs = [ + ("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"), + ("xsi:type", val.type_.as_str()), + ]; + s.content_with_attrs("Grantee", &attrs, val)?; + } + if let Some(ref val) = self.permission { + s.content("Permission", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for TargetGrant { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut grantee: Option = None; -let mut permission: Option = None; -d.for_each_element_with_start(|d, x, start| match x { -b"Grantee" => { -if grantee.is_some() { return Err(DeError::DuplicateField); } -let mut type_: Option = None; -for attr in start.attributes() { - let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; - if attr.key.as_ref() == b"xsi:type" { - type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); - } -} -let mut display_name: Option = None; -let mut email_address: Option = None; -let mut id: Option = None; -let mut uri: Option = None; -d.for_each_element(|d, x| match x { -b"DisplayName" => { - if display_name.is_some() { return Err(DeError::DuplicateField); } - display_name = Some(d.content()?); - Ok(()) -} -b"EmailAddress" => { - if email_address.is_some() { return Err(DeError::DuplicateField); } - email_address = Some(d.content()?); - Ok(()) -} -b"ID" => { - if id.is_some() { return Err(DeError::DuplicateField); } - id = Some(d.content()?); - Ok(()) -} -b"URI" => { - if uri.is_some() { return Err(DeError::DuplicateField); } - uri = Some(d.content()?); - Ok(()) -} -_ => Err(DeError::UnexpectedTagName), -})?; -grantee = Some(Grantee { -display_name, -email_address, -id, -type_: type_.ok_or(DeError::MissingField)?, -uri, -}); -Ok(()) -} -b"Permission" => { -if permission.is_some() { return Err(DeError::DuplicateField); } -permission = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -grantee, -permission, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut grantee: Option = None; + let mut permission: Option = None; + d.for_each_element_with_start(|d, x, start| match x { + b"Grantee" => { + if grantee.is_some() { + return Err(DeError::DuplicateField); + } + let mut type_: Option = None; + for attr in start.attributes() { + let Ok(attr) = attr else { return Err(DeError::InvalidAttribute) }; + if attr.key.as_ref() == b"xsi:type" { + type_ = Some(attr.unescape_value().map_err(DeError::InvalidXml)?.into_owned().into()); + } + } + let mut display_name: Option = None; + let mut email_address: Option = None; + let mut id: Option = None; + let mut uri: Option = None; + d.for_each_element(|d, x| match x { + b"DisplayName" => { + if display_name.is_some() { + return Err(DeError::DuplicateField); + } + display_name = Some(d.content()?); + Ok(()) + } + b"EmailAddress" => { + if email_address.is_some() { + return Err(DeError::DuplicateField); + } + email_address = Some(d.content()?); + Ok(()) + } + b"ID" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"URI" => { + if uri.is_some() { + return Err(DeError::DuplicateField); + } + uri = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + grantee = Some(Grantee { + display_name, + email_address, + id, + type_: type_.ok_or(DeError::MissingField)?, + uri, + }); + Ok(()) + } + b"Permission" => { + if permission.is_some() { + return Err(DeError::DuplicateField); + } + permission = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { grantee, permission }) + } } impl SerializeContent for TargetObjectKeyFormat { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.partitioned_prefix { -s.content("PartitionedPrefix", val)?; -} -if let Some(ref val) = self.simple_prefix { -s.content("SimplePrefix", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.partitioned_prefix { + s.content("PartitionedPrefix", val)?; + } + if let Some(ref val) = self.simple_prefix { + s.content("SimplePrefix", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for TargetObjectKeyFormat { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut partitioned_prefix: Option = None; -let mut simple_prefix: Option = None; -d.for_each_element(|d, x| match x { -b"PartitionedPrefix" => { -if partitioned_prefix.is_some() { return Err(DeError::DuplicateField); } -partitioned_prefix = Some(d.content()?); -Ok(()) -} -b"SimplePrefix" => { -if simple_prefix.is_some() { return Err(DeError::DuplicateField); } -simple_prefix = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -partitioned_prefix, -simple_prefix, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut partitioned_prefix: Option = None; + let mut simple_prefix: Option = None; + d.for_each_element(|d, x| match x { + b"PartitionedPrefix" => { + if partitioned_prefix.is_some() { + return Err(DeError::DuplicateField); + } + partitioned_prefix = Some(d.content()?); + Ok(()) + } + b"SimplePrefix" => { + if simple_prefix.is_some() { + return Err(DeError::DuplicateField); + } + simple_prefix = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + partitioned_prefix, + simple_prefix, + }) + } } impl SerializeContent for Tier { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Tier { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"Bulk" => Ok(Self::from_static(Tier::BULK)), -b"Expedited" => Ok(Self::from_static(Tier::EXPEDITED)), -b"Standard" => Ok(Self::from_static(Tier::STANDARD)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"Bulk" => Ok(Self::from_static(Tier::BULK)), + b"Expedited" => Ok(Self::from_static(Tier::EXPEDITED)), + b"Standard" => Ok(Self::from_static(Tier::STANDARD)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Tiering { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -s.content("AccessTier", &self.access_tier)?; -s.content("Days", &self.days)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + s.content("AccessTier", &self.access_tier)?; + s.content("Days", &self.days)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Tiering { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut access_tier: Option = None; -let mut days: Option = None; -d.for_each_element(|d, x| match x { -b"AccessTier" => { -if access_tier.is_some() { return Err(DeError::DuplicateField); } -access_tier = Some(d.content()?); -Ok(()) -} -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -access_tier: access_tier.ok_or(DeError::MissingField)?, -days: days.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut access_tier: Option = None; + let mut days: Option = None; + d.for_each_element(|d, x| match x { + b"AccessTier" => { + if access_tier.is_some() { + return Err(DeError::DuplicateField); + } + access_tier = Some(d.content()?); + Ok(()) + } + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + access_tier: access_tier.ok_or(DeError::MissingField)?, + days: days.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for TopicConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -{ -let iter = &self.events; -s.flattened_list("Event", iter)?; -} -if let Some(ref val) = self.filter { -s.content("Filter", val)?; -} -if let Some(ref val) = self.id { -s.content("Id", val)?; -} -s.content("Topic", &self.topic_arn)?; -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + { + let iter = &self.events; + s.flattened_list("Event", iter)?; + } + if let Some(ref val) = self.filter { + s.content("Filter", val)?; + } + if let Some(ref val) = self.id { + s.content("Id", val)?; + } + s.content("Topic", &self.topic_arn)?; + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for TopicConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut events: Option = None; -let mut filter: Option = None; -let mut id: Option = None; -let mut topic_arn: Option = None; -d.for_each_element(|d, x| match x { -b"Event" => { -let ans: Event = d.content()?; -events.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"Filter" => { -if filter.is_some() { return Err(DeError::DuplicateField); } -filter = Some(d.content()?); -Ok(()) -} -b"Id" => { -if id.is_some() { return Err(DeError::DuplicateField); } -id = Some(d.content()?); -Ok(()) -} -b"Topic" => { -if topic_arn.is_some() { return Err(DeError::DuplicateField); } -topic_arn = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -events: events.ok_or(DeError::MissingField)?, -filter, -id, -topic_arn: topic_arn.ok_or(DeError::MissingField)?, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut events: Option = None; + let mut filter: Option = None; + let mut id: Option = None; + let mut topic_arn: Option = None; + d.for_each_element(|d, x| match x { + b"Event" => { + let ans: Event = d.content()?; + events.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"Filter" => { + if filter.is_some() { + return Err(DeError::DuplicateField); + } + filter = Some(d.content()?); + Ok(()) + } + b"Id" => { + if id.is_some() { + return Err(DeError::DuplicateField); + } + id = Some(d.content()?); + Ok(()) + } + b"Topic" => { + if topic_arn.is_some() { + return Err(DeError::DuplicateField); + } + topic_arn = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + events: events.ok_or(DeError::MissingField)?, + filter, + id, + topic_arn: topic_arn.ok_or(DeError::MissingField)?, + }) + } } impl SerializeContent for Transition { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.date { -s.timestamp("Date", val, TimestampFormat::DateTime)?; -} -if let Some(ref val) = self.days { -s.content("Days", val)?; -} -if let Some(ref val) = self.storage_class { -s.content("StorageClass", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.date { + s.timestamp("Date", val, TimestampFormat::DateTime)?; + } + if let Some(ref val) = self.days { + s.content("Days", val)?; + } + if let Some(ref val) = self.storage_class { + s.content("StorageClass", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for Transition { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut date: Option = None; -let mut days: Option = None; -let mut storage_class: Option = None; -d.for_each_element(|d, x| match x { -b"Date" => { -if date.is_some() { return Err(DeError::DuplicateField); } -date = Some(d.timestamp(TimestampFormat::DateTime)?); -Ok(()) -} -b"Days" => { -if days.is_some() { return Err(DeError::DuplicateField); } -days = Some(d.content()?); -Ok(()) -} -b"StorageClass" => { -if storage_class.is_some() { return Err(DeError::DuplicateField); } -storage_class = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -date, -days, -storage_class, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut date: Option = None; + let mut days: Option = None; + let mut storage_class: Option = None; + d.for_each_element(|d, x| match x { + b"Date" => { + if date.is_some() { + return Err(DeError::DuplicateField); + } + date = Some(d.timestamp(TimestampFormat::DateTime)?); + Ok(()) + } + b"Days" => { + if days.is_some() { + return Err(DeError::DuplicateField); + } + days = Some(d.content()?); + Ok(()) + } + b"StorageClass" => { + if storage_class.is_some() { + return Err(DeError::DuplicateField); + } + storage_class = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + date, + days, + storage_class, + }) + } } impl SerializeContent for TransitionStorageClass { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for TransitionStorageClass { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"DEEP_ARCHIVE" => Ok(Self::from_static(TransitionStorageClass::DEEP_ARCHIVE)), -b"GLACIER" => Ok(Self::from_static(TransitionStorageClass::GLACIER)), -b"GLACIER_IR" => Ok(Self::from_static(TransitionStorageClass::GLACIER_IR)), -b"INTELLIGENT_TIERING" => Ok(Self::from_static(TransitionStorageClass::INTELLIGENT_TIERING)), -b"ONEZONE_IA" => Ok(Self::from_static(TransitionStorageClass::ONEZONE_IA)), -b"STANDARD_IA" => Ok(Self::from_static(TransitionStorageClass::STANDARD_IA)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"DEEP_ARCHIVE" => Ok(Self::from_static(TransitionStorageClass::DEEP_ARCHIVE)), + b"GLACIER" => Ok(Self::from_static(TransitionStorageClass::GLACIER)), + b"GLACIER_IR" => Ok(Self::from_static(TransitionStorageClass::GLACIER_IR)), + b"INTELLIGENT_TIERING" => Ok(Self::from_static(TransitionStorageClass::INTELLIGENT_TIERING)), + b"ONEZONE_IA" => Ok(Self::from_static(TransitionStorageClass::ONEZONE_IA)), + b"STANDARD_IA" => Ok(Self::from_static(TransitionStorageClass::STANDARD_IA)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for Type { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -self.as_str().serialize_content(s) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + self.as_str().serialize_content(s) + } } impl<'xml> DeserializeContent<'xml> for Type { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -d.text(|t| { - let b: &[u8] = &t; - match b { -b"AmazonCustomerByEmail" => Ok(Self::from_static(Type::AMAZON_CUSTOMER_BY_EMAIL)), -b"CanonicalUser" => Ok(Self::from_static(Type::CANONICAL_USER)), -b"Group" => Ok(Self::from_static(Type::GROUP)), - _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + d.text(|t| { + let b: &[u8] = &t; + match b { + b"AmazonCustomerByEmail" => Ok(Self::from_static(Type::AMAZON_CUSTOMER_BY_EMAIL)), + b"CanonicalUser" => Ok(Self::from_static(Type::CANONICAL_USER)), + b"Group" => Ok(Self::from_static(Type::GROUP)), + _ => Ok(Self::from(t.unescape().map_err(DeError::InvalidXml)?.into_owned())), + } + }) } -}) -} } impl SerializeContent for VersioningConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.exclude_folders { -s.content("ExcludeFolders", val)?; -} -if let Some(iter) = &self.excluded_prefixes { -s.flattened_list("ExcludedPrefixes", iter)?; -} -if let Some(ref val) = self.mfa_delete { -s.content("MfaDelete", val)?; -} -if let Some(ref val) = self.status { -s.content("Status", val)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.exclude_folders { + s.content("ExcludeFolders", val)?; + } + if let Some(iter) = &self.excluded_prefixes { + s.flattened_list("ExcludedPrefixes", iter)?; + } + if let Some(ref val) = self.mfa_delete { + s.content("MfaDelete", val)?; + } + if let Some(ref val) = self.status { + s.content("Status", val)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for VersioningConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut exclude_folders: Option = None; -let mut excluded_prefixes: Option = None; -let mut mfa_delete: Option = None; -let mut status: Option = None; -d.for_each_element(|d, x| match x { -b"ExcludeFolders" => { -if exclude_folders.is_some() { return Err(DeError::DuplicateField); } -exclude_folders = Some(d.content()?); -Ok(()) -} -b"ExcludedPrefixes" => { -let ans: ExcludedPrefix = d.content()?; -excluded_prefixes.get_or_insert_with(List::new).push(ans); -Ok(()) -} -b"MfaDelete" => { -if mfa_delete.is_some() { return Err(DeError::DuplicateField); } -mfa_delete = Some(d.content()?); -Ok(()) -} -b"Status" => { -if status.is_some() { return Err(DeError::DuplicateField); } -status = Some(d.content()?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -exclude_folders, -excluded_prefixes, -mfa_delete, -status, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut exclude_folders: Option = None; + let mut excluded_prefixes: Option = None; + let mut mfa_delete: Option = None; + let mut status: Option = None; + d.for_each_element(|d, x| match x { + b"ExcludeFolders" => { + if exclude_folders.is_some() { + return Err(DeError::DuplicateField); + } + exclude_folders = Some(d.content()?); + Ok(()) + } + b"ExcludedPrefixes" => { + let ans: ExcludedPrefix = d.content()?; + excluded_prefixes.get_or_insert_with(List::new).push(ans); + Ok(()) + } + b"MfaDelete" => { + if mfa_delete.is_some() { + return Err(DeError::DuplicateField); + } + mfa_delete = Some(d.content()?); + Ok(()) + } + b"Status" => { + if status.is_some() { + return Err(DeError::DuplicateField); + } + status = Some(d.content()?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + exclude_folders, + excluded_prefixes, + mfa_delete, + status, + }) + } } impl SerializeContent for WebsiteConfiguration { -fn serialize_content(&self, s: &mut Serializer) -> SerResult { -if let Some(ref val) = self.error_document { -s.content("ErrorDocument", val)?; -} -if let Some(ref val) = self.index_document { -s.content("IndexDocument", val)?; -} -if let Some(ref val) = self.redirect_all_requests_to { -s.content("RedirectAllRequestsTo", val)?; -} -if let Some(iter) = &self.routing_rules { -s.list("RoutingRules", "RoutingRule", iter)?; -} -Ok(()) -} + fn serialize_content(&self, s: &mut Serializer) -> SerResult { + if let Some(ref val) = self.error_document { + s.content("ErrorDocument", val)?; + } + if let Some(ref val) = self.index_document { + s.content("IndexDocument", val)?; + } + if let Some(ref val) = self.redirect_all_requests_to { + s.content("RedirectAllRequestsTo", val)?; + } + if let Some(iter) = &self.routing_rules { + s.list("RoutingRules", "RoutingRule", iter)?; + } + Ok(()) + } } impl<'xml> DeserializeContent<'xml> for WebsiteConfiguration { -fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { -let mut error_document: Option = None; -let mut index_document: Option = None; -let mut redirect_all_requests_to: Option = None; -let mut routing_rules: Option = None; -d.for_each_element(|d, x| match x { -b"ErrorDocument" => { -if error_document.is_some() { return Err(DeError::DuplicateField); } -error_document = Some(d.content()?); -Ok(()) -} -b"IndexDocument" => { -if index_document.is_some() { return Err(DeError::DuplicateField); } -index_document = Some(d.content()?); -Ok(()) -} -b"RedirectAllRequestsTo" => { -if redirect_all_requests_to.is_some() { return Err(DeError::DuplicateField); } -redirect_all_requests_to = Some(d.content()?); -Ok(()) -} -b"RoutingRules" => { -if routing_rules.is_some() { return Err(DeError::DuplicateField); } -routing_rules = Some(d.list_content("RoutingRule")?); -Ok(()) -} -_ => Err(DeError::UnexpectedTagName) -})?; -Ok(Self { -error_document, -index_document, -redirect_all_requests_to, -routing_rules, -}) -} + fn deserialize_content(d: &mut Deserializer<'xml>) -> DeResult { + let mut error_document: Option = None; + let mut index_document: Option = None; + let mut redirect_all_requests_to: Option = None; + let mut routing_rules: Option = None; + d.for_each_element(|d, x| match x { + b"ErrorDocument" => { + if error_document.is_some() { + return Err(DeError::DuplicateField); + } + error_document = Some(d.content()?); + Ok(()) + } + b"IndexDocument" => { + if index_document.is_some() { + return Err(DeError::DuplicateField); + } + index_document = Some(d.content()?); + Ok(()) + } + b"RedirectAllRequestsTo" => { + if redirect_all_requests_to.is_some() { + return Err(DeError::DuplicateField); + } + redirect_all_requests_to = Some(d.content()?); + Ok(()) + } + b"RoutingRules" => { + if routing_rules.is_some() { + return Err(DeError::DuplicateField); + } + routing_rules = Some(d.list_content("RoutingRule")?); + Ok(()) + } + _ => Err(DeError::UnexpectedTagName), + })?; + Ok(Self { + error_document, + index_document, + redirect_all_requests_to, + routing_rules, + }) + } } From a22d8032c350c699c9faec73a4747f884b77f83c Mon Sep 17 00:00:00 2001 From: weisd Date: Thu, 5 Mar 2026 14:48:19 +0800 Subject: [PATCH 4/4] fix: resolve clippy warnings (doc_markdown, needless_update, manual_contains) --- crates/s3s/src/http/de.rs | 8 +++----- crates/s3s/src/xml/de.rs | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/s3s/src/http/de.rs b/crates/s3s/src/http/de.rs index 00ec6957..11d71f72 100644 --- a/crates/s3s/src/http/de.rs +++ b/crates/s3s/src/http/de.rs @@ -258,17 +258,16 @@ where result } -/// MinIO compatibility: literal `" Enabled "` (with spaces) for legacy object lock/versioning config. +/// `MinIO` compatibility: literal `" Enabled "` (with spaces) for legacy object lock/versioning config. #[cfg(feature = "minio")] fn is_minio_enabled_literal(bytes: &[u8]) -> bool { bytes.trim_ascii() == b"Enabled" } -/// MinIO compatibility: take ObjectLockConfiguration, accepting literal `" Enabled "` as enabled. +/// `MinIO` compatibility: take `ObjectLockConfiguration`, accepting literal `" Enabled "` as enabled. #[cfg(feature = "minio")] pub fn take_opt_object_lock_configuration(req: &mut Request) -> S3Result> { use crate::dto::{ObjectLockConfiguration, ObjectLockEnabled}; - use stdx::default::default; let bytes = req.body.take_bytes().expect("full body not found"); if bytes.is_empty() { @@ -278,7 +277,6 @@ pub fn take_opt_object_lock_configuration(req: &mut Request) -> S3Result(&bytes).map(Some); @@ -288,7 +286,7 @@ pub fn take_opt_object_lock_configuration(req: &mut Request) -> S3Result S3Result { use crate::dto::{BucketVersioningStatus, VersioningConfiguration}; diff --git a/crates/s3s/src/xml/de.rs b/crates/s3s/src/xml/de.rs index 4af4d175..a0a82cca 100644 --- a/crates/s3s/src/xml/de.rs +++ b/crates/s3s/src/xml/de.rs @@ -182,7 +182,7 @@ impl<'xml> Deserializer<'xml> { match self.next_event()? { DeEvent::Start(x) => { let name = x.name().as_ref().to_vec(); - if names_bytes.iter().any(|n| *n == name) { + if names_bytes.contains(&name) { return Ok(name); } return Err(unexpected_tag_name()); @@ -235,7 +235,7 @@ impl<'xml> Deserializer<'xml> { Ok(ans) } - /// Deserializes an element with any of the given root names (MinIO compatibility). + /// Deserializes an element with any of the given root names (`MinIO` compatibility). /// /// # Errors /// Returns an error if the deserialization fails.